. * * Version 0.1 * Author: Octavio Benedi Sanchez * Author: Daniel Larraz */ include_once $base_plugin."php/display_security_info.php"; function make_wireless($path, $interface,$initial=true) { global $url_plugin; global $section; global $plugin; global $base_plugin; $input=parse_interfaces($path); $list.='
'; $list.='
Network
'; $list.=''; } $list.=""; $list.=""; $list.=""; $list.=""; $list.=""; $list.=""; $list.='
Choose IP method "; } else { $list.=''; $list.=''; $list.='
"; $list.="Address
"; $list.="Netmask
"; $list.="Gateway
"; $list.="Broadcast
"; $list.="Primary DNS
"; $list.="Secondary DNS
'; // Second block of options. $list.='
Radio
"; $list.=""; $list.=""; } elseif ($input[$interface]['post-up']['iwconfig']['mode']=='ad-hoc') { $list.="Mode"; } else { $list.="Mode"; } $list.=""; $list.=""; // Two selections b/g for 2.4 and a for 5GHz $list.="'; $list.="'; $list.=""; $list.='
'; $list.="ESSID
"; $list.="MAC Address
"; if ($input[$interface]['post-up']['iwconfig']['mode']=='managed') { $list.="Mode
"; $list.="Frequency
"; $list.="
"; $list.="Channel "; $list.="
"; $list.="Protocol
"; $list.="
"; $list.="
"; $tx_power_values=array('auto'=>'auto','0'=>'0 dB','1'=>'1 dB','2'=>'2 dB','3'=>'3 dB','4'=>'4 dB','5'=>'5 dB','6'=>'6 dB','7'=>'7 dB','8'=>'8 dB','9'=>'9 dB','10'=>'10 dB','11'=>'11 dB','12'=>'12 dB','13'=>'13 dB','14'=>'14 dB','15'=>'15 dB','16'=>'16 dB','17'=>'17 dB','18'=>'18 dB','19'=>'19 dB'); if(!empty($input[$interface]['post-up']['iwconfig']['txpower'])) { $default_tx_power=$input[$interface]['post-up']['iwconfig']['txpower']; } else { $default_tx_power='auto'; } $list.="Tx power".make_select_detailed('tx_power',$tx_power_values,$default_tx_power); $list.='
"; $rate_values=array('auto','1Mbps','2Mbps','6Mbps','9Mbps','11Mbps','12Mbps','18Mbps','24Mbps','36Mbps','48Mbps','54Mbps'); $list.="Rate".make_select('rate',$rate_values,$input[$interface]['post-up']['iwconfig']['rate']); $list.='
"; $list.="Fragmentation
'; // Third block of options. $list.='
'; $list .= make_security ($interface); $list.='
'; // Forth blok of options $list.='
'; $list.=make_mac_filter($interface,$input[$interface]['up']['interfaces_plus.sh']); $list.='
'; $list.='
'; return $list; } function make_selector() { global $plugin; global $section; $options=array(' ','ath0','ath1'); $list='
WIFI
Interface configuration
'; $list.= make_select('interface_selector',$options,' '); $list.='
'; return $list; } ?>