From f2f0c37e0727b5279c6d966242a4db7ae9b5c41f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 30 Dec 2005 18:28:00 +0000 Subject: Add HOSTAP list Ticket #763 --- usr/local/www/status_wireless.php | 109 ++++++++++++++++++++++++++------------ 1 file changed, 74 insertions(+), 35 deletions(-) (limited to 'usr/local/www/status_wireless.php') diff --git a/usr/local/www/status_wireless.php b/usr/local/www/status_wireless.php index e8b281e..28c17f8 100755 --- a/usr/local/www/status_wireless.php +++ b/usr/local/www/status_wireless.php @@ -65,6 +65,7 @@ include("fbegin.inc"); "") { if($if == $interface['if']) @@ -72,6 +73,7 @@ foreach($config['interfaces'] as $interface) { else $enabled = false; $friendly = convert_real_interface_to_friendly_interface_name($interface['if']); + $mode = $interface['wireless']['mode']; if($interface['descr'] <> "") $friendly = $interface['descr']; $tab_array[] = array("Status ($friendly)", $enabled, "status_wireless.php?if={$interface['if']}"); @@ -85,47 +87,84 @@ display_top_tabs($tab_array);
- "; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print "\n\n"; +if ($mode == 'bss') { + /* table header */ + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n\n"; + + $states=split("\n",`/sbin/ifconfig {$if} list scan | grep -v "CHAN RATE"`); -$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); + if($state_split[1] <> ""){ + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + print "\n"; + } + } +} elseif ($mode == 'hostap') { + /* table header */ + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n\n"; -$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"; + $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
SSIDBSSIDCHANRATERSSIINTCAPS
{$state_split[0]}{$state_split[1]}{$state_split[2]}{$state_split[3]}{$state_split[4]}{$state_split[5]}{$state_split[6]}
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]}
{$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]}
-- cgit v1.1