"") $if = $_GET['if']; if($if == "") { /* Find the first interface that is wireless */ foreach($config['interfaces'] as $interface) { if($interface['wireless'] <> "") { $if = $interface['if']; } } } ?>

"") { if($if == $interface['if']) { $enabled = true; $mode = $interface['wireless']['mode']; } else $enabled = false; $friendly = convert_real_interface_to_friendly_interface_name($interface['if']); if($interface['descr'] <> "") $friendly = $interface['descr']; $tab_array[] = array("Status ($friendly)", $enabled, "status_wireless.php?if={$interface['if']}"); } } /* XXX: add other wireless interfaces here */ display_top_tabs($tab_array); ?>
"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n\n"; $states=split("\n",`/sbin/ifconfig {$if} list scan | grep -v "CHAN RATE"`); $counter=0; foreach($states as $state) { print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; print "\n"; } print "
SSIDBSSIDCHANRATERSSIINTCAPS
" . trim(substr($state, 0 , 16)) . "" . trim(substr($state, 16, 19)) . "" . trim(substr($state, 35, 5)) . "" . trim(substr($state, 40, 5)) . "" . trim(substr($state, 45, 9)) . "" . trim(substr($state, 54, 4)) . "" . trim(substr($state, 58)) . "
"; /* table header */ print "\n"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; 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 ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; print "\n"; } /* XXX: what stats to we get for adhoc mode? */ ?>
ADDRAIDCHANRATERSSIIDLETXSEQRXSEQCAPSERP
{$state_split[0]}{$state_split[1]}{$state_split[2]}{$state_split[3]}{$state_split[4]}{$state_split[5]}{$state_split[6]}{$state_split[7]}{$state_split[8]}{$state_split[9]}