Revision 4a60bca6
Added by Ermal LUÇI about 14 years ago
usr/local/www/wizards/traffic_shaper_wizard.inc | ||
---|---|---|
1044 | 1044 |
} else |
1045 | 1045 |
$remainbw = 100 - $remainbw; |
1046 | 1046 |
|
1047 |
if ($sched == "PRIQ") |
|
1048 |
$q =& new priq_queue(); |
|
1049 |
else if ($sched == "CBQ") |
|
1050 |
$q =& new cbq_queue(); |
|
1051 |
else if ($sched == "HFSC") |
|
1052 |
$q =& new hfsc_queue(); |
|
1053 |
$tmpcf = array(); |
|
1054 |
$tmpcf['name'] = "qLink"; |
|
1055 |
$tmpcf['priority'] = 1; |
|
1056 |
$tmpcf['enabled'] = "on"; |
|
1057 |
$tmpcf['default'] = "on"; |
|
1058 |
$tmpcf['ecn'] = "on"; |
|
1059 |
if ($sched == "CBQ") { |
|
1060 |
$tmpcf['borrow'] = "on"; |
|
1061 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1062 |
$tmpcf['bandwidthtype'] = "%"; |
|
1063 |
} else if ($sched == "HFSC") { |
|
1064 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1065 |
$tmpcf['bandwidthtype'] = "%"; |
|
1047 |
if (!$p2pcatchall) { |
|
1048 |
if ($sched == "PRIQ") |
|
1049 |
$q =& new priq_queue(); |
|
1050 |
else if ($sched == "CBQ") |
|
1051 |
$q =& new cbq_queue(); |
|
1052 |
else if ($sched == "HFSC") |
|
1053 |
$q =& new hfsc_queue(); |
|
1054 |
$tmpcf = array(); |
|
1055 |
$tmpcf['name'] = "qLink"; |
|
1056 |
$tmpcf['priority'] = 1; |
|
1057 |
$tmpcf['enabled'] = "on"; |
|
1058 |
$tmpcf['default'] = "on"; |
|
1059 |
$tmpcf['ecn'] = "on"; |
|
1060 |
if ($sched == "CBQ") { |
|
1061 |
$tmpcf['borrow'] = "on"; |
|
1062 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1063 |
$tmpcf['bandwidthtype'] = "%"; |
|
1064 |
} else if ($sched == "HFSC") { |
|
1065 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1066 |
$tmpcf['bandwidthtype'] = "%"; |
|
1067 |
} |
|
1068 |
array_push($tmppath, $tmpcf['name']); |
|
1069 |
$qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); |
|
1070 |
array_pop($tmppath); |
|
1071 |
//echo "qDefault <br />"; |
|
1072 |
//var_dump($input_errors); |
|
1073 |
$qtmp->wconfig(); |
|
1066 | 1074 |
} |
1067 |
array_push($tmppath, $tmpcf['name']); |
|
1068 |
$qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); |
|
1069 |
array_pop($tmppath); |
|
1070 |
//echo "qDefault <br />"; |
|
1071 |
//var_dump($input_errors); |
|
1072 |
$qtmp->wconfig(); |
|
1073 | 1075 |
|
1074 |
if ($sched != "PRIQ") {
|
|
1075 |
if ($sched == "CBQ")
|
|
1076 |
$q =& new cbq_queue();
|
|
1077 |
else if ($sched == "HFSC")
|
|
1078 |
$q =& new hfsc_queue();
|
|
1079 |
$tmpcf = array();
|
|
1080 |
$tmpcf['name'] = "qInternet";
|
|
1081 |
//$tmpcf['priority'] = 6;
|
|
1082 |
$tmpcf['ecn'] = "on";
|
|
1083 |
$tmpcf['enabled'] = "on";
|
|
1076 |
if ($sched != "PRIQ") {
|
|
1077 |
if ($sched == "CBQ")
|
|
1078 |
$q =& new cbq_queue();
|
|
1079 |
else if ($sched == "HFSC") |
|
1080 |
$q =& new hfsc_queue(); |
|
1081 |
$tmpcf = array(); |
|
1082 |
$tmpcf['name'] = "qInternet"; |
|
1083 |
//$tmpcf['priority'] = 6; |
|
1084 |
$tmpcf['ecn'] = "on"; |
|
1085 |
$tmpcf['enabled'] = "on"; |
|
1084 | 1086 |
If ($sched == "CBQ") { |
1085 | 1087 |
$tmpcf['bandwidth'] = $lanbw/1000; |
1086 | 1088 |
$tmpcf['bandwidthtype'] = "Kb"; |
... | ... | |
1156 | 1158 |
$tmpcf['bandwidth'] = $p2pcatchbw; |
1157 | 1159 |
$tmpcf['bandwidthtype'] = $p2pcatchbwunit; |
1158 | 1160 |
} |
1159 |
//$tmpcf['default'] = "on";
|
|
1161 |
$tmpcf['default'] = "on"; |
|
1160 | 1162 |
} else { |
1161 | 1163 |
if ($sched == "CBQ") { |
1162 | 1164 |
$tmpcf['borrow'] = "on"; |
usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc | ||
---|---|---|
1107 | 1107 |
$remainbw = 100 - $remainbw; |
1108 | 1108 |
} |
1109 | 1109 |
|
1110 |
if ($sched == "PRIQ") |
|
1111 |
$q =& new priq_queue(); |
|
1112 |
else if ($sched == "CBQ") |
|
1113 |
$q =& new cbq_queue(); |
|
1114 |
else if ($sched == "HFSC") |
|
1115 |
$q =& new hfsc_queue(); |
|
1116 |
$tmpcf = array(); |
|
1117 |
$tmpcf['name'] = "qLink"; |
|
1118 |
$tmpcf['priority'] = 3; |
|
1119 |
$tmpcf['enabled'] = "on"; |
|
1120 |
$tmpcf['default'] = "on"; |
|
1121 |
$tmpcf['ecn'] = "on"; |
|
1122 |
if ($sched == "CBQ") { |
|
1123 |
$tmpcf['borrow'] = "on"; |
|
1124 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1125 |
$tmpcf['bandwidthtype'] = "%"; |
|
1126 |
} else if ($sched == "HFSC") { |
|
1127 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1128 |
$tmpcf['bandwidthtype'] = "%"; |
|
1110 |
if (!$p2pcatchall) { |
|
1111 |
if ($sched == "PRIQ") |
|
1112 |
$q =& new priq_queue(); |
|
1113 |
else if ($sched == "CBQ") |
|
1114 |
$q =& new cbq_queue(); |
|
1115 |
else if ($sched == "HFSC") |
|
1116 |
$q =& new hfsc_queue(); |
|
1117 |
$tmpcf = array(); |
|
1118 |
$tmpcf['name'] = "qLink"; |
|
1119 |
$tmpcf['priority'] = 3; |
|
1120 |
$tmpcf['enabled'] = "on"; |
|
1121 |
$tmpcf['default'] = "on"; |
|
1122 |
$tmpcf['ecn'] = "on"; |
|
1123 |
if ($sched == "CBQ") { |
|
1124 |
$tmpcf['borrow'] = "on"; |
|
1125 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1126 |
$tmpcf['bandwidthtype'] = "%"; |
|
1127 |
} else if ($sched == "HFSC") { |
|
1128 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1129 |
$tmpcf['bandwidthtype'] = "%"; |
|
1130 |
} |
|
1131 |
array_push($tmppath, $tmpcf['name']); |
|
1132 |
$qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); |
|
1133 |
array_pop($tmppath); |
|
1134 |
//echo "qDefault <br />"; |
|
1135 |
//var_dump($input_errors); |
|
1136 |
$qtmp->wconfig(); |
|
1129 | 1137 |
} |
1130 |
array_push($tmppath, $tmpcf['name']); |
|
1131 |
$qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); |
|
1132 |
array_pop($tmppath); |
|
1133 |
//echo "qDefault <br />"; |
|
1134 |
//var_dump($input_errors); |
|
1135 |
$qtmp->wconfig(); |
|
1136 | 1138 |
|
1137 | 1139 |
if ($sched != "PRIQ") { |
1138 | 1140 |
if ($sched == "CBQ") |
... | ... | |
1219 | 1221 |
$tmpcf['bandwidth'] = $p2pcatchbw; |
1220 | 1222 |
$tmpcf['bandwidthtype'] = $p2pcatchbwunit; |
1221 | 1223 |
} |
1222 |
//$tmpcf['default'] = "on";
|
|
1224 |
$tmpcf['default'] = "on"; |
|
1223 | 1225 |
} else { |
1224 | 1226 |
if ($sched == "CBQ") { |
1225 | 1227 |
$tmpcf['borrow'] = "on"; |
usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc | ||
---|---|---|
1155 | 1155 |
$remainbw = 100 - $remainbw; |
1156 | 1156 |
} |
1157 | 1157 |
|
1158 |
if ($sched == "PRIQ") |
|
1159 |
$q =& new priq_queue(); |
|
1160 |
else if ($sched == "CBQ") |
|
1161 |
$q =& new cbq_queue(); |
|
1162 |
else if ($sched == "HFSC") |
|
1163 |
$q =& new hfsc_queue(); |
|
1164 |
$tmpcf = array(); |
|
1165 |
$tmpcf['name'] = "qLink"; |
|
1166 |
$tmpcf['priority'] = 1; |
|
1167 |
$tmpcf['enabled'] = "on"; |
|
1168 |
$tmpcf['default'] = "on"; |
|
1169 |
$tmpcf['ecn'] = "on"; |
|
1170 |
if ($sched == "CBQ") { |
|
1171 |
$tmpcf['borrow'] = "on"; |
|
1172 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1173 |
$tmpcf['bandwidthtype'] = "%"; |
|
1174 |
} else if ($sched == "HFSC") { |
|
1175 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1176 |
$tmpcf['bandwidthtype'] = "%"; |
|
1158 |
if (!$p2pcatchall) { |
|
1159 |
if ($sched == "PRIQ") |
|
1160 |
$q =& new priq_queue(); |
|
1161 |
else if ($sched == "CBQ") |
|
1162 |
$q =& new cbq_queue(); |
|
1163 |
else if ($sched == "HFSC") |
|
1164 |
$q =& new hfsc_queue(); |
|
1165 |
$tmpcf = array(); |
|
1166 |
$tmpcf['name'] = "qLink"; |
|
1167 |
$tmpcf['priority'] = 1; |
|
1168 |
$tmpcf['enabled'] = "on"; |
|
1169 |
$tmpcf['default'] = "on"; |
|
1170 |
$tmpcf['ecn'] = "on"; |
|
1171 |
if ($sched == "CBQ") { |
|
1172 |
$tmpcf['borrow'] = "on"; |
|
1173 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1174 |
$tmpcf['bandwidthtype'] = "%"; |
|
1175 |
} else if ($sched == "HFSC") { |
|
1176 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
1177 |
$tmpcf['bandwidthtype'] = "%"; |
|
1178 |
} |
|
1179 |
array_push($tmppath, $tmpcf['name']); |
|
1180 |
$qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); |
|
1181 |
array_pop($tmppath); |
|
1182 |
//echo "qDefault <br />"; |
|
1183 |
//var_dump($input_errors); |
|
1184 |
$qtmp->wconfig(); |
|
1177 | 1185 |
} |
1178 |
array_push($tmppath, $tmpcf['name']); |
|
1179 |
$qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); |
|
1180 |
array_pop($tmppath); |
|
1181 |
//echo "qDefault <br />"; |
|
1182 |
//var_dump($input_errors); |
|
1183 |
$qtmp->wconfig(); |
|
1184 | 1186 |
|
1185 | 1187 |
if ($sched != "PRIQ") { |
1186 | 1188 |
if ($sched == "CBQ") |
... | ... | |
1268 | 1270 |
$tmpcf['bandwidth'] = $p2pcatchbw; |
1269 | 1271 |
$tmpcf['bandwidthtype'] = $p2pcatchbwunit; |
1270 | 1272 |
} |
1271 |
//$tmpcf['default'] = "on";
|
|
1273 |
$tmpcf['default'] = "on"; |
|
1272 | 1274 |
|
1273 | 1275 |
} else { |
1274 | 1276 |
if ($sched == "CBQ") { |
usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc | ||
---|---|---|
547 | 547 |
$remainbw = 100 - $remainbw; |
548 | 548 |
} |
549 | 549 |
|
550 |
if ($sched == "PRIQ") |
|
551 |
$q =& new priq_queue(); |
|
552 |
else if ($sched == "CBQ") |
|
553 |
$q =& new cbq_queue(); |
|
554 |
else if ($sched == "HFSC") |
|
555 |
$q =& new hfsc_queue(); |
|
556 |
$tmpcf = array(); |
|
557 |
$tmpcf['name'] = "qLink"; |
|
558 |
$tmpcf['priority'] = 1; |
|
559 |
$tmpcf['enabled'] = "on"; |
|
560 |
$tmpcf['default'] = "on"; |
|
561 |
$tmpcf['ecn'] = "on"; |
|
562 |
if ($sched == "CBQ") { |
|
563 |
$tmpcf['borrow'] = "on"; |
|
564 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
565 |
$tmpcf['bandwidthtype'] = "%"; |
|
566 |
} else if ($sched == "HFSC") { |
|
567 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
568 |
$tmpcf['bandwidthtype'] = "%"; |
|
550 |
if (!$p2pcatchall) { |
|
551 |
if ($sched == "PRIQ") |
|
552 |
$q =& new priq_queue(); |
|
553 |
else if ($sched == "CBQ") |
|
554 |
$q =& new cbq_queue(); |
|
555 |
else if ($sched == "HFSC") |
|
556 |
$q =& new hfsc_queue(); |
|
557 |
$tmpcf = array(); |
|
558 |
$tmpcf['name'] = "qLink"; |
|
559 |
$tmpcf['priority'] = 1; |
|
560 |
$tmpcf['enabled'] = "on"; |
|
561 |
$tmpcf['default'] = "on"; |
|
562 |
$tmpcf['ecn'] = "on"; |
|
563 |
if ($sched == "CBQ") { |
|
564 |
$tmpcf['borrow'] = "on"; |
|
565 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
566 |
$tmpcf['bandwidthtype'] = "%"; |
|
567 |
} else if ($sched == "HFSC") { |
|
568 |
$tmpcf['bandwidth'] = 20; /* 20% bandwidth */ |
|
569 |
$tmpcf['bandwidthtype'] = "%"; |
|
570 |
} |
|
571 |
array_push($tmppath, $tmpcf['name']); |
|
572 |
$qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); |
|
573 |
array_pop($tmppath); |
|
574 |
//echo "qDefault <br />"; |
|
575 |
//var_dump($input_errors); |
|
576 |
$qtmp->wconfig(); |
|
569 | 577 |
} |
570 |
array_push($tmppath, $tmpcf['name']); |
|
571 |
$qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors); |
|
572 |
array_pop($tmppath); |
|
573 |
//echo "qDefault <br />"; |
|
574 |
//var_dump($input_errors); |
|
575 |
$qtmp->wconfig(); |
|
576 | 578 |
|
577 | 579 |
if ($sched != "PRIQ") { |
578 | 580 |
if ($sched == "CBQ") |
... | ... | |
663 | 665 |
$tmpcf['bandwidth'] = $p2pcatchbw; |
664 | 666 |
$tmpcf['bandwidthtype'] = $p2pcatchbwunit; |
665 | 667 |
} |
666 |
//$tmpcf['default'] = "on";
|
|
668 |
$tmpcf['default'] = "on"; |
|
667 | 669 |
|
668 | 670 |
} else { |
669 | 671 |
if ($sched == "CBQ") { |
Also available in: Unified diff
Respect the p2p catchall setting.