Rev 25 |
|
Rev 26 |
Line 2... |
|
Line 2... |
# authors : Petr Simandl www.simandl.cz |
|
# authors : Petr Simandl www.simandl.cz |
# : Fyzik, Covex, Tydyt, Thunder.m |
|
# : Fyzik, Covex, Tydyt, Thunder.m |
# release date : 17/09/2005 |
|
# release date : 21/09/2005 |
# name : wifimon |
|
# name : wifimon |
# description : hostap and madwifi powered card monitoring |
|
# description : hostap and madwifi powered card monitoring |
# license : GPL |
|
# license : GPL |
###################################################################### |
|
###################################################################### |
|
|
|
wl_version="0.5.6pre2" |
|
wl_version="0.5.6pre3" |
|
|
|
###################################################################### |
|
###################################################################### |
#custom settings |
|
#custom settings |
|
|
|
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:usr/local/bin:/usr/local/sbin |
|
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:usr/local/bin:/usr/local/sbin |
Line 310... |
|
Line 310... |
if [ $wcm_macoff -eq 0 ] |
|
if [ $wcm_macoff -eq 0 ] |
then |
|
then |
wl_mac=`echo -n $wl_iwctxt | $wl_awkcmd '{print $8}'` |
|
wl_mac=`echo -n $wl_iwctxt | $wl_awkcmd '{print $8}'` |
echo -n "${wlc_mac}$wl_mac${wlc_std} " |
|
echo -n "${wlc_mac}$wl_mac${wlc_std} " |
fi |
|
fi |
echo $wl_iwctxt | $wl_awkcmd '{print $6,$10" "}' |
|
echo $wl_iwctxt | $wl_awkcmd '{print $6,$10,$11,$12" "}' |
|
|
|
wl_wtxt=`cat $wl_wireless | grep $wl_iface | $wl_awkcmd '{print $3,$4,$5}' | sed 's/\.//g'` |
|
wl_wtxt=`cat $wl_wireless | grep $wl_iface | $wl_awkcmd '{print $3,$4,$5}' | sed 's/\.//g'` |
wl_quality=`echo $wl_wtxt | $wl_awkcmd '{print $1}'` |
|
wl_quality=`echo $wl_wtxt | $wl_awkcmd '{print $1}'` |
wl_signal=`echo $wl_wtxt | $wl_awkcmd '{print $2}'` |
|
wl_signal=`echo $wl_wtxt | $wl_awkcmd '{print $2}'` |
wl_signal=$(($wl_signal - 256)) |
|
wl_signal=$(($wl_signal - 256)) |
Line 331... |
|
Line 331... |
{ if [ $wcm_oneline -eq 0 ] |
|
{ if [ $wcm_oneline -eq 0 ] |
then |
|
then |
echo $wl_iwctxt | $wl_awkcmd '{print $1,$3,$4,$5" "}' |
|
echo $wl_iwctxt | $wl_awkcmd '{print $1,$3,$4,$5" "}' |
if [ $wcm_macoff -eq 1 ] |
|
if [ $wcm_macoff -eq 1 ] |
then |
|
then |
echo $wl_iwctxt | $wl_awkcmd '{print $6,$11" "}' |
|
echo $wl_iwctxt | $wl_awkcmd '{print $6,$11,$12" "}' |
else |
|
else |
echo $wl_iwctxt | $wl_awkcmd '{print $6,$8,$11" "}' |
|
echo $wl_iwctxt | $wl_awkcmd '{print $6,$8,$11,$12" "}' |
fi |
|
fi |
else |
|
else |
echo $wl_iwctxt | $wl_awkcmd '{print $1,$4,$5,$6,$11" "}' | sed 's/ [^": ]*:/ /g' |
|
echo $wl_iwctxt | $wl_awkcmd '{print $1,$4,$5,$6,$11,$12" "}' | sed 's/ [^": ]*:/ /g' |
fi |
|
fi |
|
|
|
if [ -d $wl_hostap$wl_iface ] |
|
if [ -d $wl_hostap$wl_iface ] |
then |
|
then |
wl_numcl=`ls $wl_hostap$wl_iface | grep -c 00` |
|
wl_numcl=`ls $wl_hostap$wl_iface | grep -c 00` |
Line 431... |
|
Line 431... |
echo |
|
echo |
} # w_master |
|
} # w_master |
|
|
|
###################################################################### |
|
###################################################################### |
w_iface() |
|
w_iface() |
{ wl_iwctxt=`$wl_iwccmd $wl_iface 2>/dev/null | grep -v 'Device|Some|Extension' | sed 's/ GHz/GHz/' | sed 's/ Mb/Mb/' | sed 's/ Nick/_Nick/' | sed 's/Access Point/Access_Point/'` |
|
{ wl_iwctxt=`$wl_iwccmd $wl_iface 2>/dev/null | grep -v 'Device|Some|Extension' | sed 's/ dBm/dBm/' | sed 's/ GHz/GHz/' | sed 's/ Mb/Mb/' | sed 's/ Nick/_Nick/' | sed 's/Access Point/Access_Point/'` |
wl_mode=`echo $wl_iwctxt | $wl_awkcmd '{print $5}' | sed 's/Mode://g'` |
|
wl_mode=`echo $wl_iwctxt | $wl_awkcmd '{print $5}' | sed 's/Mode://g'` |
if [ "a$wl_mode" = "aManaged" ] |
|
if [ "a$wl_mode" = "aManaged" ] |
then |
|
then |
w_managed |
|
w_managed |
elif [ "a$wl_mode" = "aAd-Hoc" ] |
|
elif [ "a$wl_mode" = "aAd-Hoc" ] |