aboutsummaryrefslogtreecommitdiffstats
path: root/src/hci
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2016-05-20 20:57:18 +0100
committerMichael Brown <mcb30@ipxe.org>2016-05-23 14:17:47 +0100
commit80dd6cbcc4fd8c013969e205ee410344d9180b27 (patch)
treeb3726edd26398d3ba032d9e0fc5b00bbe32fdbe7 /src/hci
parent231adda40f55610efd1c6028a300a3f46db23103 (diff)
downloadipxe-80dd6cbcc4fd8c013969e205ee410344d9180b27.tar.gz
[lotest] Add option to use broadcast packets for loopback testing
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci')
-rw-r--r--src/hci/commands/lotest_cmd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hci/commands/lotest_cmd.c b/src/hci/commands/lotest_cmd.c
index a989932d4..393b3c36e 100644
--- a/src/hci/commands/lotest_cmd.c
+++ b/src/hci/commands/lotest_cmd.c
@@ -43,12 +43,16 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
struct lotest_options {
/** MTU */
unsigned int mtu;
+ /** Broadcast */
+ int broadcast;
};
/** "lotest" option list */
static struct option_descriptor lotest_opts[] = {
OPTION_DESC ( "mtu", 'm', required_argument,
struct lotest_options, mtu, parse_integer ),
+ OPTION_DESC ( "broadcast", 'b', no_argument,
+ struct lotest_options, broadcast, parse_flag ),
};
/** "lotest" command descriptor */
@@ -86,7 +90,8 @@ static int lotest_exec ( int argc, char **argv ) {
opts.mtu = ETH_MAX_MTU;
/* Perform loopback test */
- if ( ( rc = loopback_test ( sender, receiver, opts.mtu ) ) != 0 ) {
+ if ( ( rc = loopback_test ( sender, receiver, opts.mtu,
+ opts.broadcast ) ) != 0 ) {
printf ( "Test failed: %s\n", strerror ( rc ) );
return rc;
}