1
0
mirror of https://github.com/limosek/zaf-plugins.git synced 2025-01-21 23:45:56 +01:00

Added minor modifications to iwx

This commit is contained in:
Lukas Macura 2016-12-07 13:31:54 +01:00
parent 77d0e54c02
commit fcc76c0072
2 changed files with 118 additions and 75 deletions

View File

@ -4,7 +4,7 @@ Description::
Plugin for wifi mac80211 informations and discovery Plugin for wifi mac80211 informations and discovery
:: ::
Version: 0.2 Version: 0.3
Url: https://raw.githubusercontent.com/limosek/zaf-plugins/master/iwx Url: https://raw.githubusercontent.com/limosek/zaf-plugins/master/iwx
Web: https://github.com/limosek/zaf-plugins Web: https://github.com/limosek/zaf-plugins

View File

@ -119,15 +119,36 @@ wifi_channel_transmittime(){
} }
wifi_neigh_channel(){ wifi_neigh_channel(){
wifi_scan_dump $1 | grep "^$1 $2" | (read dev bss freq signal ssid; echo $freq) wifi_scan_dump $1 | grep "^$1 $2" | (
read dev bss freq signal ssid;
if [ -n "$freq" ]; then
echo $freq
else
echo "0"
fi
)
} }
wifi_neigh_signal(){ wifi_neigh_signal(){
wifi_scan_dump $1 | grep "^$1 $2" | (read dev bss freq signal ssid; echo $signal) wifi_scan_dump $1 | grep "^$1 $2" | (
read dev bss freq signal ssid;
if [ -n "$signal" ]; then
echo $signal
else
echo "-200"
fi
)
} }
wifi_neigh_ssid(){ wifi_neigh_ssid(){
wifi_scan_dump $1 | grep "^$1 $2" | (read dev bss freq signal ssid; echo $ssid) wifi_scan_dump $1 | grep "^$1 $2" | (
read dev bss freq signal ssid;
if [ -n "$ssid" ]; then
echo $ssid
else
echo "N/A"
fi
)
} }
wifi_clients(){ wifi_clients(){
@ -145,14 +166,36 @@ wifi_clients_discovery(){
} }
wifi_client_signal(){ wifi_client_signal(){
wifi_clients_dump $1 | grep "^$1 $2" | (read dev station signal tx rx; echo $signal) wifi_clients_dump $1 | grep "^$1 $2" | (
read dev station signal tx rx;
if [ -n "$signal" ]; then
echo $signal
else
echo "-200"
fi
)
} }
wifi_client_rxrate(){ wifi_client_rxrate(){
wifi_clients_dump $1 | grep "^$1 $2" | (read dev station signal tx rx; echo $rx) wifi_clients_dump $1 | grep "^$1 $2" | (
read dev station signal tx rx;
if [ -n "$rx" ]; then
echo $rx
else
echo "0"
fi
)
} }
wifi_client_txrate(){ wifi_client_txrate(){
wifi_clients_dump $1 | grep "^$1 $2" | (read dev station signal tx rx; echo $tx) wifi_clients_dump $1 | grep "^$1 $2" | (
read dev station signal tx rx;
if [ -n "$tx" ]; then
echo $tx
else
echo "0"
fi
)
} }