diff options
author | Thomas Habets <thomas@habets.se> | 2014-06-01 18:50:56 +0100 |
---|---|---|
committer | Thomas Habets <thomas@habets.se> | 2014-06-01 18:50:56 +0100 |
commit | 694b983cb14a1745ee29c5e6ba092a6a4202fb3f (patch) | |
tree | 00c548a98ebb99fbe62e9356c3b16b75a546ba58 | |
parent | 0d5132d59c3693b602a293b366e7ac46ed5298c7 (diff) | |
download | arping-694b983cb14a1745ee29c5e6ba092a6a4202fb3f.tar.gz |
Update testing script to work with WLAN interfaces.
WLAN interfaces don't need the padding that wired ethernet does, and ARP
replies are therefore 42 bytes instead of 60.
-rwxr-xr-x | extra/testing.exp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/extra/testing.exp b/extra/testing.exp index 5e61b43..5996dcc 100755 --- a/extra/testing.exp +++ b/extra/testing.exp @@ -1,6 +1,6 @@ #!/usr/bin/expect -f # -# Usage: testing.ex <path to arping> <ip address> <mac address> +# Usage: testing.exp <path to arping> <ip address> <mac address> # # Test all cases against a "normal" machine: # * Responds to ARP @@ -92,7 +92,7 @@ expect "\r" { send_user -- "--------------- Ping IP Simple ------------------\n" spawn $bin -c 1 $ip expect -re "ARPING $ip\r -60 bytes from $mac \\($ip\\): index=0 time=(.*)sec\r +\(42|60\) bytes from $mac \\($ip\\): index=0 time=(.*)sec\r \r --- $ip statistics ---\r 1 packets transmitted, 1 packets received, 0% unanswered \\(0 extra\\)\r @@ -136,8 +136,8 @@ expect eof send_user -- "--------------- Ping IP max 2 (-C) ------------------\n" spawn $bin -C 2 -c 10 $ip expect -re "ARPING $ip\r -60 bytes from $mac \\($ip\\): index=0 time=(.*)sec\r -60 bytes from $mac \\($ip\\): index=1 time=(.*)sec\r +\(42|60\) bytes from $mac \\($ip\\): index=0 time=(.*)sec\r +\(42|60\) bytes from $mac \\($ip\\): index=1 time=(.*)sec\r \r --- $ip statistics ---\r 2 packets transmitted, 2 packets received, 0% unanswered \\(0 extra\\)\r @@ -148,9 +148,9 @@ expect eof send_user -- "--------------- Ping IP x 3 (-c) ------------------\n" spawn $bin -c 3 $ip expect -re "ARPING $ip\r -60 bytes from $mac \\($ip\\): index=0 time=\[0-9.\]+ \[mu\]?sec\r -60 bytes from $mac \\($ip\\): index=1 time=\[0-9.\]+ \[mu\]?sec\r -60 bytes from $mac \\($ip\\): index=2 time=\[0-9.\]+ \[mu\]?sec\r +\(42|60\) bytes from $mac \\($ip\\): index=0 time=\[0-9.\]+ \[mu\]?sec\r +\(42|60\) bytes from $mac \\($ip\\): index=1 time=\[0-9.\]+ \[mu\]?sec\r +\(42|60\) bytes from $mac \\($ip\\): index=2 time=\[0-9.\]+ \[mu\]?sec\r \r --- $ip statistics ---\r 3 packets transmitted, 3 packets received, 0% unanswered \\(0 extra\\)\r @@ -161,9 +161,9 @@ expect eof send_user -- "--------------- Ping IP x 3 with audio (-a) ------------------\n" spawn $bin -c 3 -a $ip expect -re "ARPING $ip\r -\a60 bytes from $mac \\($ip\\): index=0 time=\[0-9.\]+ \[mu\]?sec\r -\a60 bytes from $mac \\($ip\\): index=1 time=\[0-9.\]+ \[mu\]?sec\r -\a60 bytes from $mac \\($ip\\): index=2 time=\[0-9.\]+ \[mu\]?sec\r +\a\(42|60\) bytes from $mac \\($ip\\): index=0 time=\[0-9.\]+ \[mu\]?sec\r +\a\(42|60\) bytes from $mac \\($ip\\): index=1 time=\[0-9.\]+ \[mu\]?sec\r +\a\(42|60\) bytes from $mac \\($ip\\): index=2 time=\[0-9.\]+ \[mu\]?sec\r \r --- $ip statistics ---\r 3 packets transmitted, 3 packets received, 0% unanswered \\(0 extra\\)\r @@ -174,8 +174,8 @@ expect eof send_user -- "--------- Ping IP x 2 with inverted audio (-e) ------------\n" spawn $bin -c 2 -e $ip expect -re "ARPING $ip\r -60 bytes from $mac \\($ip\\): index=0 time=\[0-9.\]+ \[mu\]?sec\r -60 bytes from $mac \\($ip\\): index=1 time=\[0-9.\]+ \[mu\]?sec\r +\(42|60\) bytes from $mac \\($ip\\): index=0 time=\[0-9.\]+ \[mu\]?sec\r +\(42|60\) bytes from $mac \\($ip\\): index=1 time=\[0-9.\]+ \[mu\]?sec\r \r --- $ip statistics ---\r 2 packets transmitted, 2 packets received, 0% unanswered \\(0 extra\\)\r @@ -218,7 +218,7 @@ expect eof send_user -- "--------------- Ping IP Targeted (-t) ------------------\n" spawn $bin -c 1 $ip -t $mac expect -re "ARPING $ip\r -60 bytes from $mac \\($ip\\): index=0 time=(.*)sec\r +\(42|60\) bytes from $mac \\($ip\\): index=0 time=(.*)sec\r \r --- $ip statistics ---\r 1 packets transmitted, 1 packets received, 0% unanswered \\(0 extra\\)\r @@ -239,7 +239,7 @@ expect eof send_user -- "--------------- Ping MAC with IP destination ------------------\n" spawn $bin -A -c 1 $mac -T $ip expect -re "ARPING $mac\r -60 bytes from $ip \\($mac\\): icmp_seq=0 time=(.*)sec\r +\(42|60\) bytes from $ip \\($mac\\): icmp_seq=0 time=(.*)sec\r \r --- $mac statistics ---\r 1 packets transmitted, 1 packets received, 0% unanswered \\(0 extra\\)\r @@ -284,8 +284,8 @@ expect eof send_user -- "--------------- Ping MAC max 2 (-C) ------------------\n" spawn $bin -A -C 2 -c 10 $mac -T $ip expect -re "ARPING $mac\r -60 bytes from $ip \\($mac\\): icmp_seq=0 time=(.*)sec\r -60 bytes from $ip \\($mac\\): icmp_seq=1 time=(.*)sec\r +\(42|60\) bytes from $ip \\($mac\\): icmp_seq=0 time=(.*)sec\r +\(42|60\) bytes from $ip \\($mac\\): icmp_seq=1 time=(.*)sec\r \r --- $mac statistics ---\r 2 packets transmitted, 2 packets received, 0% unanswered \\(0 extra\\)\r @@ -306,8 +306,8 @@ expect eof send_user -- "--------- Ping MAC x 2 with inverted audio (-e) ------------\n" spawn $bin -c 2 "$mac" -T $ip expect -re "ARPING $mac\r -60 bytes from $ip \\($mac\\): icmp_seq=0 time=(.*)sec\r -60 bytes from $ip \\($mac\\): icmp_seq=1 time=(.*)sec\r +\(42|60\) bytes from $ip \\($mac\\): icmp_seq=0 time=(.*)sec\r +\(42|60\) bytes from $ip \\($mac\\): icmp_seq=1 time=(.*)sec\r \r --- $mac statistics ---\r 2 packets transmitted, 2 packets received, 0% unanswered \\(0 extra\\)\r |