. * * Version 0.1 * Author: Octavio Benedi Sanchez */ function make_input($interface) { global $url_plugin; global $section; global $plugin; // Detect current values for acktimeout, slottime and ctstimeout. $acktimeout=''; exec('/sbin/sysctl dev.wifi'.substr($interface,3,1).'.acktimeout 2>/dev/null',$ret); $ret[0]=trim($ret[0]); if ($ret[0][0]=='d'){ $ret2=explode('=',trim($ret[0])); $ret2[1]=trim($ret2[1]); $acktimeout=$ret2[1]; } unset($ret); unset($ret2); $ctstimeout=''; exec('/sbin/sysctl dev.wifi'.substr($interface,3,1).'.ctstimeout 2>/dev/null',$ret); $ret[0]=trim($ret[0]); if ($ret[0][0]=='d'){ $ret2=explode('=',trim($ret[0])); $ret2[1]=trim($ret2[1]); $ctstimeout=$ret2[1]; } unset($ret); unset($ret2); $slottime=''; exec('/sbin/sysctl dev.wifi'.substr($interface,3,1).'.slottime 2>/dev/null',$ret); $ret[0]=trim($ret[0]); if ($ret[0][0]=='d'){ $ret2=explode('=',trim($ret[0])); $ret2[1]=trim($ret2[1]); $slottime=$ret2[1]; } $long_range_link_data=parse_long_range_link(); if($long_range_link_data[$interface]['permanent_changes']=='1') { $checked='checked'; } $list='
Long range link configuration
'; return $list; } function make_interface($interface) { global $url_plugin; global $section; global $plugin; $list.=make_input($interface); return $list; } function select_interface() { global $section; global $plugin; $options=array(' ','ath0','ath1'); $list='
Long range link
Interface configuration
'; $list.=make_select('interface_selector',$options,' '); $list.='
'; $list.='
'; $list.='
'; return $list; } ?>