From 9f2bb020fa0c9e0766728081e2584b4ed7750505 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Thu, 11 Aug 2011 23:28:40 +0200 Subject: [PATCH] [wifi] capture: OpenBSD support Filter the tcpdump output on "received by filter" instead of "captured", since the OpenBSD's tcpdump does not print the number of packets captured. --- wifi/capture.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wifi/capture.sh b/wifi/capture.sh index 54631d5..d6d4b65 100755 --- a/wifi/capture.sh +++ b/wifi/capture.sh @@ -87,7 +87,7 @@ iface_set_channel() iface_up iwconfig $IFACE channel $1 ;; - NetBSD) + NetBSD | OpenBSD) iface_down ifconfig $IFACE media autoselect chan $1 iface_up @@ -112,7 +112,7 @@ iface_monitor() Linux) iwconfig $IFACE mode monitor ;; - NetBSD) + NetBSD | OpenBSD) ifconfig $IFACE media autoselect mediaopt monitor ;; *) @@ -145,7 +145,7 @@ iface_up() invoke_tcpdump() { NCAP=$(tcpdump -i $IFACE -c $NB_PKT -w "$FILE" 2>&1 \ - | sed -nr 's/([[:digit:]]+) packets captured$/\1/p') + | sed -nr 's/([[:digit:]]+) packets received by filter$/\1/p') [ "$NCAP" = "" ] \ && error "Error parsing the tcpdump messages! (NCAP=\"$NCAP\")" echo $NCAP @@ -179,7 +179,7 @@ gather_system_information() && lsusb >"$DESTDIR"/lsusb \ || echo "lsusb not available! Please install usbutils. " ;; - NetBSD) + NetBSD | OpenBSD) modstat >"$DESTDIR"/modstat which usbstats >/dev/null \ && usbstats >"$DESTDIR"/usbstats \