--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+ (c) 2005 U.S. Robotics Corporation
+-->
+<html>
+<head>
+ <title></title>
+
+ <link href="usr_main.css" rel="stylesheet" type="text/css">
+ <script src="usr_menus.js" type="text/javascript"></script>
+ <script src="usr_common.js" type="text/javascript"></script>
+
+ <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
+
+ <script type="text/javascript" src="util.js"></script>
+ <script type="text/javascript">
+<!-- hide
+
+setPageTitle("<%ejGetWl(wlInterface)%>");
+
+function btnApply() {
+ var loc = 'qoscls.cmd?action=add';
+
+ with ( document.forms[0] ) {
+ if ( txtclsname.value == '' ) {
+ alert('Please enter a Quality of Service class name.');
+ return;
+ }
+
+ if ( isValidName(txtclsname.value) == false ) {
+ alert('Please enter valid Quality of Service class name. Special characters are not permitted.');
+ return;
+ }
+
+ idx = priority.selectedIndex;
+ if ( idx == 0 ) {
+ alert('Please select a priority.');
+ return;
+ }
+
+ if ( srcaddr.value == "" && srcmask.value == "" && srcport.value == "" &&
+ dstaddr.value == "" && dstmask.value == "" && dstport.value == "" &&
+ // switchport.selectedIndex == 0 && protocol.selectedIndex && vlan8021p.selectedIndex == 0 ) {
+ protocol.selectedIndex == 0 && vlan8021p.selectedIndex == 0 ) {
+ alert('At least one condition must be specified.');
+ return;
+ }
+
+ if ( srcaddr.value != "" && isValidIpAddress(srcaddr.value) == false ) {
+ alert('Source address "' + srcaddr.value + '" is an invalid IP address.');
+ return;
+ }
+
+ if ( srcmask.value != "" && isValidSubnetMask(srcmask.value) == false ) {
+ alert('Source subnet mask "' + srcmask.value + '" is an invalid subnet mask.');
+ return;
+ }
+
+ if ( srcaddr.value == "" && srcmask.value != "" ) {
+ alert('Cannot have source subnet mask without source IP address.');
+ return;
+ }
+
+ if ( srcport.value != "" && isValidPort(srcport.value) == false ) {
+ alert('Source port "' + srcport.value + '" is an invalid port number or port range.');
+ return;
+ }
+
+ if ( dstaddr.value != "" && isValidIpAddress(dstaddr.value) == false ) {
+ alert('Destination address "' + dstaddr.value + '" is invalid IP address.');
+ return;
+ }
+
+ if ( dstmask.value != "" && isValidSubnetMask(dstmask.value) == false ) {
+ alert('Destination subnet mask "' + dstmask.value + '" is an invalid subnet mask.');
+ return;
+ }
+
+ if ( dstaddr.value == "" && dstmask.value != "" ) {
+ alert('Cannot have destination subnet mask without destination IP address.');
+ return;
+ }
+
+ if ( dstport.value != "" && isValidPort(dstport.value) == false ) {
+ alert('Destination port "' + dstport.value + '" is invalid port number or port range.');
+ return;
+ }
+
+ if ( (srcport.value != "" || dstport.value != "") &&
+ (protocol.selectedIndex == 0 || protocol.selectedIndex == 4) ) {
+ alert('TCP or UDP Protocol must be selected together with port number.');
+ return;
+ }
+
+ if ( (vlan8021p.selectedIndex != 0) &&
+ (dstaddr.value != "" || dstaddr.value != "" ||
+ srcaddr.value != "" || srcport.value != "" || protocol.selectedIndex != 0) ) {
+ alert('802.1p Priority cannot be selected together with IP traffic condition.');
+ return;
+ }
+
+ // class name
+ loc += '&clsName=' + encodeUrl(txtclsname.value);
+
+ // priority
+ idx = priority.selectedIndex;
+ val = priority.options[idx].value;
+ loc += '&priority=' + val;
+
+ // IP precedence bits
+ idx = precedence.selectedIndex;
+ val = precedence.options[idx].value;
+ loc += '&precedence=' + val;
+
+ // IP type of service bits
+ idx = tos.selectedIndex;
+ val = tos.options[idx].value;
+ loc += '&tos=' + val;
+
+ // physical switch port
+ // idx = switchport.selectedIndex;
+ // val = switchport.options[idx].value;
+ val = -1;
+ loc += '&switchport=' + val;
+
+ // protocol
+ idx = protocol.selectedIndex;
+ val = protocol.options[idx].value;
+ loc += '&protocol=' + val;
+
+ // source address
+ if ( srcaddr.value != "" )
+ loc += '&srcAddr=' + srcaddr.value;
+
+ // source subnet mask
+ if ( srcmask.value != "" )
+ loc += '&srcMask=' + srcmask.value;
+
+ // source port
+ if ( srcport.value != "" )
+ loc += '&srcPort=' + srcport.value;
+
+ // destination address
+ if ( dstaddr.value != "" )
+ loc += '&dstAddr=' + dstaddr.value;
+
+ // destination subnet mask
+ if ( dstaddr.value != "" )
+ loc += '&dstMask=' + dstmask.value;
+
+ // destination port
+ if ( dstport.value != "" )
+ loc += '&dstPort=' + dstport.value;
+
+ // VLAN 802.1p priority
+ idx = vlan8021p.selectedIndex;
+ val = vlan8021p.options[idx].value;
+ loc += '&vlan8021p=' + val;
+
+ }
+
+ var code = 'location.assign("' + loc + '")';
+ eval(code);
+}
+
+// done hiding -->
+ </script>
+ </head>
+ <body onload="initMenu('idMenu');">
+
+<script type="text/javascript">
+ writeHeader("Add Network Traffic Class", "<%ejGet(curUserName)%>", "<%ejGetOther(sysInfo, adslStd)%>", "<%ejGetOther(sysInfo, noBrPrtcl)%>", <%ejGetOther(sysInfo, pppIpExtension)%>, <%ejGetOther(sysInfo, enblFirewall)%>, <%ejGetOther(sysInfo, enblNat)%>, "<%ejGetWl(wlInterface)%>", <%ejGet(enblQos)%>);
+</script>
+<form>
+ <p>This page creates a traffic class rule to classify the upstream traffic,
+ assign queuing priority and optionally overwrite the IP header TOS byte. A rule
+ consists of a class name and at least one condition below. All of the specified
+ conditions in this classification rule must be satisfied for the rule to take
+ effect. Press <b>Apply</b> to save and activate the rule.</p>
+ <table border="0" cellpadding="1" cellspacing="0">
+ <tr>
+ <td><label for="txtclsname">Traffic class name:</label></td>
+ <td><input type='text' size="22" name="txtclsname" id="txtclsname"></td>
+ </tr>
+
+ <tr><td> </td><td> </td></tr>
+
+ <tr>
+ <td colspan="2">
+ <p><b>Assign priority and/or IP precedence and/or type of service for the class</b></p>
+ <p>If a non-zero value is selected for <b>IP Precedence</b> or
+ a value other than "Normal" for <b>IP Type Of Service</b>,
+ the corresponding TOS byte in the IP header of the upstream packet will be
+ overwritten by the selected value.</p>
+ </td>
+ </tr>
+
+ <tr><td> </td><td> </td></tr>
+
+ <tr>
+ <td><label>Priority:</label></td>
+ <td><select name='priority' id='priority'>
+ <option value="1">Low</option>
+ <option value="2">Medium</option>
+ <option value="3">High</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td><label>IP precedence:</label></td>
+ <td><select name='precedence' id='precedence'>
+ <option value="0">0</option>
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ <option value="6">6</option>
+ <option value="7">7</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td><label>IP type of service:</label></td>
+ <td><select name='tos' id='tos'>
+ <option value="0">Normal service</option>
+ <option value="2">Minimize cost</option>
+ <option value="4">Maximize reliability</option>
+ <option value="8">Maximize throughput</option>
+ <option value="16">Minimize delay</option>
+ </select></td>
+ </tr>
+
+ <tr><td> </td><td> </td></tr>
+
+ <tr>
+ <td colspan="2"><p><b>Specify traffic conditions for the class</b></p>
+ <p>Enter the following conditions either for IP layer or for the IEEE 802.1p priority.</p>
+ </td>
+ </tr>
+
+ <tr><td> </td><td> </td></tr>
+<!--
+ <tr>
+ <td><label>Physical switch port:</label></td>
+ <td><select name='switchport' id='switchport'>
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ </select></td>
+ </tr>
+-->
+ <tr>
+ <td><label>Protocol:</label></td>
+ <td><select name='protocol' id='protocol'>
+ <option value="0">TCP/UDP</option>
+ <option value="1">TCP</option>
+ <option value="2">UDP</option>
+ <option value="3">ICMP</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td><label for="srcaddr">Source IP address:</label></td>
+ <td><input type='text' size="22" name="srcaddr" id="srcaddr"></td>
+ </tr>
+ <tr>
+ <td><label for="srcmask">Source subnet mask:</label></td>
+ <td><input type='text' size="22" name="srcmask" id="srcmask"></td>
+ </tr>
+ <tr>
+ <td><label for="srcport">Source port (port or port:port):</label></td>
+ <td><input type='text' size="22" name="srcport" id="srcport"></td>
+ </tr>
+ <tr>
+ <td><label for="dstaddr">Destination IP address:</label></td>
+ <td><input type='text' size="22" name="dstaddr" id="dstaddr"></td>
+ </tr>
+ <tr>
+ <td><label for="dstmask">Destination subnet mask:</label></td>
+ <td><input type='text' size="22" name="dstmask" id="dstmask"></td>
+ </tr>
+ <tr>
+ <td><label for="dstport">Destination port (port or port:port):</label></td>
+ <td><input type='text' size="22" name="dstport" id="dstport"></td>
+ </tr>
+
+ <tr><td> </td><td> </td></tr>
+
+ <tr>
+ <td><label>802.1p priority:</label></td>
+ <td><select name='vlan8021p' id='vlan8021p' size="1">
+ <option value="0">0</option>
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ <option value="6">6</option>
+ <option value="7">7</option>
+ </select></td>
+ </tr>
+ </table>
+ <p><input type='button' onClick='btnApply()' value='Apply'></p>
+</form>
+
+<script type="text/javascript">
+ writeFooter();
+</script>
+
+</body>
+</html>