jablonka.czprosek.czf

wifimon

Subversion Repositories:
[/] [trunk/] [wifimon] - Diff between revs 7 and 8

Show entire file Ignore whitespace

Rev 7 Rev 8
Line 2... Line 2...
# authors : Petr Simandl www.simandl.cz # authors : Petr Simandl www.simandl.cz
# : Fyzik # : Fyzik
# release date : 10/2/2003 # release date : 9/3/2003
# name : wifimon # name : wifimon
# version : 0.4beta2 # version : 0.4beta3
# description : hostap powered wifi card monitoring # description : hostap powered wifi card monitoring
# license : GPL # license : GPL
   
wl_iwccmd="/usr/local/sbin/iwconfig" wl_iwccmd="/usr/local/sbin/iwconfig"
wl_ifccmd="/sbin/ifconfig" wl_ifccmd="/sbin/ifconfig"
Line 98... Line 98...
wl_numcllast=$(($wl_numcllast + $wl_numcl)) wl_numcllast=$(($wl_numcllast + $wl_numcl))
for wl_mac in `ls $wl_hostap$wl_iface | grep 00 ` for wl_mac in `ls $wl_hostap$wl_iface | grep 00 `
do do
wl_macparam=`cat $wl_hostap$wl_iface/$wl_mac | grep -E 'last_rx|last_tx'` wl_macparam=`cat $wl_hostap$wl_iface/$wl_mac | grep -E 'last_rx|last_tx'`
wl_cnt=`echo $wl_macparam | awk '{print $5}' | sed 's/signal=//g'` wl_cnt=`echo $wl_macparam | awk '{print $5}' | sed 's/signal=//g'`
wl_umac=`echo $wl_mac | tr abcdef ABCDEF` wl_ipc=`cat $wl_arp | grep -i $wl_mac | awk '{print $1}'` # IP adresa peeru z arp tabulky
wl_ipc=`cat $wl_arp | grep $wl_umac | awk '{print $1}'` # IP adresa peeru z arp tabulky wl_name=`cat /etc/dhcpd.conf | grep -i $wl_mac | awk '{print $2}'`
if [ $wcm_oneline -eq 0 ] if [ $wcm_oneline -eq 0 ]
then then
  echo -n "$wl_name "
echo -n "${wlc_ip}$wl_ipc${wlc_std} " echo -n "${wlc_ip}$wl_ipc${wlc_std} "
echo -n "${wlc_mac}$wl_umac${wlc_std} Signal ${wlc_sig}$wl_cnt${wlc_std} " echo -n "${wlc_mac}$wl_mac${wlc_std} Signal ${wlc_sig}$wl_cnt${wlc_std} "
echo $wl_macparam | awk '{print $1,$2" "}' echo $wl_macparam | awk '{print $1,$2" "}'
w_bar w_bar
else else
  echo -n "$wl_name "
#echo -n "${wlc_ip}$wl_ipc${wlc_std} " #echo -n "${wlc_ip}$wl_ipc${wlc_std} "
echo -n "${wlc_mac}$wl_umac${wlc_std} ${wlc_sig}$wl_cnt${wlc_std} " echo -n "${wlc_mac}$wl_mac${wlc_std} ${wlc_sig}$wl_cnt${wlc_std} "
#echo -n $wl_macparam | awk '{print $1,$2" "}' #echo -n $wl_macparam | awk '{print $1,$2" "}'
w_bar w_bar
fi fi
done done
   
Line 122... Line 124...
###################################################################### ######################################################################
w_iface() w_iface()
{ wl_iwctxt=`$wl_iwccmd $wl_iface | grep -v 'Device|Some|Extension' | sed 's/ Nick/_Nick/g'` { wl_iwctxt=`$wl_iwccmd $wl_iface | grep -v 'Device|Some|Extension' | sed 's/ Nick/_Nick/g'`
wl_mode=`echo $wl_iwctxt | awk '{print $5}' | sed 's/Mode://g'` wl_mode=`echo $wl_iwctxt | awk '{print $5}' | sed 's/Mode://g'`
if [ "a$wl_mode" = "aManaged" ] if [ "a$wl_mode" = "aManaged" ]
  then
  w_managed
  elif [ "a$wl_mode" = "aAd-Hoc" ]
then then
w_managed w_managed
elif [ "a$wl_mode" = "aMaster" ] elif [ "a$wl_mode" = "aMaster" ]
then then
w_master w_master

Powered by WebSVN 2.2.1