[wifi] capture: NetBSD support

This commit is contained in:
Matteo Cypriani 2011-08-06 12:26:59 +02:00
parent 99ea201832
commit 627102d6ce
1 changed files with 15 additions and 6 deletions

View File

@ -12,10 +12,10 @@
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -71,14 +71,17 @@ case $OS in
Linux)
[ -x /sbin/iwconfig ] \
|| error "iwconfig is required to run this program on Linux!"
iwconfig $IFACE mode monitor channel $CHANNEL \
&& echo "OK." \
|| error "Cannot configure the interface!"
iwconfig $IFACE mode monitor channel $CHANNEL
;;
NetBSD)
ifconfig $IFACE media autoselect mediaopt monitor chan $CHANNEL
;;
*)
error "Your OS is not supported."
;;
esac
esac \
&& echo "OK." \
|| error "Cannot configure the interface!"
echo -n "Turning up interface $IFACE... "
ifconfig $IFACE up && echo "OK." \
@ -107,6 +110,12 @@ case $OS in
&& lsusb >"$DIR"/lsusb \
|| echo "lsusb not available! Please install usbutils. "
;;
NetBSD)
modstat >"$DIR"/modstat
which usbstats >/dev/null \
&& usbstats >"$DIR"/usbstats \
|| echo "usbstats not available! Please install usbutil. "
;;
DragonFly)
kldstat >"$DIR"/kldstat
which usbstats >/dev/null \