";
print "";
print "SSID | ";
print "BSSID | ";
print "CHAN | ";
print "RATE | ";
print "RSSI | ";
print "INT | ";
print "CAPS | ";
print " \n\n";
$states=split("\n",`/sbin/ifconfig {$if} list scan | grep -v "CHAN RATE"`);
$counter=0;
foreach($states as $state) {
$state_fixed = str_replace(" ", " ", $state);
$state_fixed = str_replace(" ", " ", $state_fixed);
$state_fixed = str_replace(" ", " ", $state_fixed);
$state_fixed = str_replace(" ", " ", $state_fixed);
$state_fixed = str_replace(" ", " ", $state_fixed);
$state_fixed = str_replace(" ", " ", $state_fixed);
$state_fixed = str_replace(" ", " ", $state_fixed);
$state_split = split(" ", $state_fixed);
print "";
$state_split = split(" ", $state_fixed);
$items = count($state_split);
$starting_at = $items-8;
print " ";
print "{$state_split[$starting_at]} | ";
print "{$state_split[$starting_at+1]} | ";
print "{$state_split[$starting_at+2]} | ";
print "{$state_split[$starting_at+3]} | ";
print "{$state_split[$starting_at+4]} | ";
print "{$state_split[$starting_at+5]} | ";
print "{$state_split[$starting_at+6]} | ";
print " \n";
print "\n";
}
print " ";
/* table header */
print "\n";
print " ";
print "ADDR | ";
print "AID | ";
print "CHAN | ";
print "RATE | ";
print "RSSI | ";
print "IDLE | ";
print "TXSEQ | ";
print "RXSEQ | ";
print "CAPS | ";
print "ERP | ";
print " \n\n";
$states=split("\n",`/sbin/ifconfig {$if} list sta | grep -v "AID CHAN"`);
$counter=0;
foreach($states as $state) {
$state_fixed = str_replace(" ", " ", $state);
$state_fixed = str_replace(" ", " ", $state_fixed);
$state_fixed = str_replace(" ", " ", $state_fixed);
$state_split = split(" ", $state_fixed);
print "";
print "{$state_split[0]} | ";
print "{$state_split[1]} | ";
print "{$state_split[2]} | ";
print "{$state_split[3]} | ";
print "{$state_split[4]} | ";
print "{$state_split[5]} | ";
print "{$state_split[6]} | ";
print "{$state_split[7]} | ";
print "{$state_split[8]} | ";
print "{$state_split[9]} | ";
print " \n";
print "\n";
}
/* XXX: what stats to we get for adhoc mode? */
?>
|