"") $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) { $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 ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; print "\n"; } print "
SSIDBSSIDCHANRATERSSIINTCAPS
{$state_split[$starting_at]}{$state_split[$starting_at+1]}{$state_split[$starting_at+2]}{$state_split[$starting_at+3]}{$state_split[$starting_at+4]}{$state_split[$starting_at+5]}{$state_split[$starting_at+6]}
"; /* 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]}