a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Copyright (C) 2010 Michael Brown <mbrown@fensystems.co.uk>.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * This program is free software; you can redistribute it and/or
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * modify it under the terms of the GNU General Public License as
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * published by the Free Software Foundation; either version 2 of the
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * License, or any later version.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * This program is distributed in the hope that it will be useful, but
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * WITHOUT ANY WARRANTY; without even the implied warranty of
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * General Public License for more details.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * You should have received a copy of the GNU General Public License
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * along with this program; if not, write to the Free Software
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Loopback testing commands
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** "lotest" options */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** "lotest" option list */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** "lotest" command descriptor */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync COMMAND_DESC ( struct lotest_options, lotest_opts, 2, 2,
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync "[--mtu <mtu>] <sending interface> "
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync "<receiving interface>" );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * "lotest" command
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v argc Argument count
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v argv Argument list
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @ret rc Return status code
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /* Parse options */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync if ( ( rc = parse_options ( argc, argv, &lotest_cmd, &opts ) ) != 0 )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /* Parse sending interface name */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync if ( ( rc = parse_netdev ( argv[optind], &sender ) ) != 0 )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /* Parse receiving interface name */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync if ( ( rc = parse_netdev ( argv[ optind + 1 ], &receiver ) ) != 0 )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /* Use default MTU if none specified */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /* Perform loopback test */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync if ( ( rc = loopback_test ( sender, receiver, opts.mtu ) ) != 0 ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Loopback testing commands */