$ifdescr) {
if (is_interface_wireless(get_real_interface($interface))) {
$if = $interface;
break;
}
}
}
$tab_array = array();
foreach($ciflist as $interface => $ifdescr) {
if (is_interface_wireless(get_real_interface($interface))) {
$enabled = false;
if($if == $interface)
$enabled = true;
$tab_array[] = array(gettext("Status") . " ({$ifdescr})", $enabled, "status_wireless.php?if={$interface}");
}
}
$rwlif = get_real_interface($if);
if($_POST['rescanwifi'] != "") {
mwexec_bg("/sbin/ifconfig {$rwlif} scan 2>&1");
$savemsg = gettext("Rescan has been initiated in the background. Refresh this page in 10 seconds to see the results.");
}
if ($savemsg)
print_info_box($savemsg, 'success');
display_top_tabs($tab_array);
?>
=gettext("Nearby access points or ad-hoc peers")?>
SSID |
BSSID |
CHAN |
RATE |
RSSI |
INT |
CAPS |
&1", $states, $ret);
/* Skip Header */
array_shift($states);
$counter = 0;
foreach ($states as $state) {
/* Split by Mac address for the SSID Field */
$split = preg_split("/([0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f])/i", $state);
preg_match("/([0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f])/i", $state, $bssid);
$ssid = htmlspecialchars($split[0]);
$bssid = $bssid[0];
/* Split the rest by using spaces for this line using the 2nd part */
$split = preg_split("/[ ]+/i", $split[1]);
$channel = $split[1];
$rate = $split[2];
$rssi = $split[3];
$int = $split[4];
$caps = "$split[5] $split[6] $split[7] $split[8] $split[9] $split[10] $split[11] ";
?>
=$ssid?>
|
=$bssid?>
|
=$channel?>
|
=$rate?>
|
=$rssi?>
|
=$int?>
|
=$caps?>
|
=gettext("Associated or ad-hoc peers")?>
ADDR |
AID |
CHAN |
RATE |
RSSI |
IDLE |
TXSEQ |
RXSEQ |
CAPS |
ERP |
&1", $states, $ret);
array_shift($states);
$counter=0;
foreach($states as $state) {
$split = preg_split("/[ ]+/i", $state);
?>
=$split[$idx]?>
|
Flags: A = authorized, E = Extended Rate (802.11g), P = Power saving mode
' .
'Capabilities: E = ESS (infrastructure mode), I = IBSS (ad-hoc mode), P = privacy (WEP/TKIP/AES), ' .
'S = Short preamble, s = Short slot time');
include("foot.inc");