diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-03-27 20:06:47 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-03-27 20:06:47 +0000 |
commit | ed682cc0ac62c961403ae9bbc0469ab690b8459b (patch) | |
tree | 33fa7897aeb736d9194ed0d1850fa679afa779a9 /usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc | |
parent | 63502467e908ea3a205449e1717934bfeeb80799 (diff) | |
download | pfsense-ed682cc0ac62c961403ae9bbc0469ab690b8459b.zip pfsense-ed682cc0ac62c961403ae9bbc0469ab690b8459b.tar.gz |
* Remove the previous added wizard
* Make the wizard generate 2 levels of queues for Local/Lan interfaces by default
* Create a rule between Local interafces for multi Lan wizard
* Fix other bugs on the wizards
Diffstat (limited to 'usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc')
-rwxr-xr-x | usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc | 124 |
1 files changed, 120 insertions, 4 deletions
diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc index 15a28b0..2c8944f 100755 --- a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc @@ -970,8 +970,8 @@ $othersplist = array(); $altq->SetInterface($config['ezshaper']['step2']["conn{$i}interface"]); $altq->SetScheduler($config['ezshaper']['step2']["conn{$i}uploadscheduler"]); - $altq->SetBandwidth(floatval($config['ezshaper']['step2']["conn{$i}upload"])); - $altq->SetBwscale($config['ezshaper']['step2']["conn{$i}uploadspeed"]); + //$altq->SetBandwidth(floatval($config['ezshaper']['step2']["conn{$i}upload"])); + //$altq->SetBwscale($config['ezshaper']['step2']["conn{$i}uploadspeed"]); $altq->SetEnabled("on"); $altq_list_queues[$altq->GetQname()] =& $altq; array_push($tmppath, $config['ezshaper']['step2']["conn{$i}interface"]); @@ -1068,6 +1068,66 @@ $othersplist = array(); $remainbw = 100 - $remainbw; //} + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qLocal"; + //$tmpcf['priority'] = 6; + $tmpcf['red'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ" || $sched == "HFSC") { + $ifbwguess = 10 * 1000 * 1000; // 10Mbit/s + $tmpcf['bandwidth'] = ($ifbwguess - $upbw) / 1000; + $tmpcf['bandwidthtype'] = "Kb"; + } + array_push($tmppath, "qLocal"); + $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); + array_pop($tmppath); + //echo "qLocal <br />"; + //var_dump($input_errors); + $qtmp->wconfig(); + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qInternet"; + //$tmpcf['priority'] = 6; + $tmpcf['red'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ") { + $tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}upload"]); + $tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + } + else if ($sched == "HFSC") { + $tmpcf['linkshare1'] = $tmpcf['linkshare3'] = + floatval($config['ezshaper']['step2']["conn{$i}upload"]) . $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + $tmpcf['upperlimit3'] = + floatval($config['ezshaper']['step2']["conn{$i}upload"]) . $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + $tmpcf['upperlimit'] = "on"; + + + $tmpcf['linkshare2'] = 100; + //$tmpcf['linkshare1'] = "0b"; + $tmpcf['linkshare'] = "on"; + $tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}upload"]); + $tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + } + array_push($tmppath, "qInternet"); + $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); + //array_pop($tmppath); + //echo "qInternet <br />"; + //var_dump($input_errors); + $qtmp->wconfig(); + $altq =& $qtmp; + if ($sched == "PRIQ") $q =& new priq_queue(); else if ($sched == "CBQ") @@ -1355,8 +1415,8 @@ $othersplist = array(); $altq->SetInterface($config['ezshaper']['step2']["local{$i}interface"]); $altq->SetScheduler($config['ezshaper']['step2']["local{$i}downloadscheduler"]); - $altq->SetBandwidth($lanbw/1000); - $altq->SetBwscale("Kb"); + //$altq->SetBandwidth($lanbw/1000); + //$altq->SetBwscale("Kb"); $altq->SetEnabled("on"); $altq_list_queues[$altq->GetQname()] =& $altq; array_push($tmppath, $config['ezshaper']['step2']["local{$i}interface"]); @@ -1447,6 +1507,62 @@ $othersplist = array(); $remainbw = 100 - $remainbw; //} + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qLocal"; + //$tmpcf['priority'] = 6; + $tmpcf['red'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ" || $sched == "HFSC") { + $ifbwguess = 10 * 1000 * 1000; // 10Mbit/s + $tmpcf['bandwidth'] = ($ifbwguess - $lanbw) / 1000; + $tmpcf['bandwidthtype'] = "Kb"; + } + array_push($tmppath, "qLocal"); + $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); + array_pop($tmppath); + //echo "qLocal <br />"; + //var_dump($input_errors); + $qtmp->wconfig(); + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qInternet"; + //$tmpcf['priority'] = 6; + $tmpcf['red'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ") { + $tmpcf['bandwidth'] = $lanbw/1000; + $tmpcf['bandwidthtype'] = "Kb"; + } + else if ($sched == "HFSC") { + $tmpcf['linkshare1'] = $tmpcf['linkshare3'] = $lanbw/1000 . "Kb"; + $tmpcf['upperlimit3'] = $lanbw/1000 . "Kb"; + $tmpcf['upperlimit'] = "on"; + $tmpcf['linkshare2'] = 100; + //$tmpcf['linkshare1'] = "0b"; + $tmpcf['linkshare'] = "on"; + $tmpcf['bandwidth'] = $lanbw/1000; + $tmpcf['bandwidthtype'] = "Kb"; + } + array_push($tmppath, "qInternet"); + $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); + //array_pop($tmppath); + //echo "qInternet <br />"; + //var_dump($input_errors); + $qtmp->wconfig(); + $altq =& $qtmp; + if ($sched == "PRIQ") $q =& new priq_queue(); else if ($sched == "CBQ") |