Revert "Revert "and added files""
[bcm963xx.git] / userapps / broadcom / cfm / html / wlqosedit.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--
3         (c) 2005 U.S. Robotics Corporation.
4 -->
5 <html>
6 <head>
7         <meta http-equiv="Pragma" content="no-cache">
8
9         <link href="usr_menus.css" rel="stylesheet" type="text/css">
10         <script src="usr_menus.js" type="text/javascript"></script>
11         <script src="usr_menus_build.js" type="text/javascript"></script>
12         <link href="usr_main.css" rel="stylesheet" type="text/css">
13         <script src="usr_common.js" type="text/javascript"></script>
14
15    <script type="text/javascript" src="util.js"></script>
16    <script type="text/javascript" src="portName.js"></script>
17    <script type="text/javascript">
18 <!-- hide
19 setPageTitle("<%ejGetWlJS(wlInterface)%>");
20
21 function btnApply() {
22    var loc = 'wlqos.cmd?action=editsubmit';
23
24    with ( document.forms[0] ) {
25       if ( txtclsname.value == '' ) {
26          alert('Please enter the QoS class name.');
27          return;
28       }
29
30       if ( isValidName(txtclsname.value) == false ) {
31          alert("The QoS class name cannot use special characters.");
32          return;
33       }
34
35       if ( srcaddr.value == "" && srcmask.value == "" && srcport.value == "" &&
36            dstaddr.value == "" && dstmask.value == "" && dstport.value == "" &&
37            protocol.selectedIndex < 0 ) {
38          alert("At least one condition must be specified.");
39          return;
40       }
41
42       if ( srcaddr.value != "" && isValidIpAddress(srcaddr.value) == false ) {
43          alert('Source address "' + srcaddr.value + '" is an invalid IP address.');
44          return;
45       }
46
47       if ( srcmask.value != "" && isValidSubnetMask(srcmask.value) == false ) {
48          alert('Source subnet mask "' + srcmask.value + '" is an invalid subnet mask.');
49          return;
50       }
51
52       if ( srcaddr.value == "" && srcmask.value != "" ) {
53          alert('A source subnet mask requires a source IP address.');
54          return;
55       }
56
57       if ( srcport.value != "" && isValidPort(srcport.value) == false ) {
58          alert('Source port "' + srcport.value + '" is an invalid port number or port range.');
59          return;
60       }
61
62       if ( dstaddr.value != "" && isValidIpAddress(dstaddr.value) == false ) {
63          alert('Destination address "' + dstaddr.value + '" is an invalid IP address.');
64          return;
65       }
66
67       if ( dstmask.value != "" && isValidSubnetMask(dstmask.value) == false ) {
68          alert('Destination subnet mask "' + dstmask.value + '" is an invalid subnet mask.');
69          return;
70       }
71
72       if ( dstaddr.value == "" && dstmask.value != "" ) {
73          alert('A destination subnet mask requires a destination IP address.');
74          return;
75       }
76
77       if ( dstport.value != "" && isValidPort(dstport.value) == false ) {
78          alert('Destination port "' + dstport.value + '" is an invalid port number or port range.');
79          return;
80       }
81
82       if ( (srcport.value != "" || dstport.value != "") &&
83            (protocol.selectedIndex > 2) ) {
84          alert('TCP or UDP Protocol must be selected together with port number.');
85               return;
86       }
87
88       // class name
89       loc += '&clsName=' + encodeUrl(txtclsname.value);
90
91       // priority
92       var idx = priority.selectedIndex;
93       var val = priority.options[idx].value;
94       loc += '&priority=' + val;
95
96       // protocol
97       idx = protocol.selectedIndex;
98       val = protocol.options[idx].value;
99       loc += '&protocol=' + val;
100
101       // source address
102       if ( srcaddr.value != "" )
103          loc += '&srcAddr=' + srcaddr.value;
104
105       // source subnet mask
106       if ( srcmask.value != "" )
107          loc += '&srcMask=' + srcmask.value;
108
109       // source port
110       if ( srcport.value != "" )
111          loc += '&srcPort=' + srcport.value;
112
113       // destination address
114       if ( dstaddr.value != "" )
115          loc += '&dstAddr=' + dstaddr.value;
116
117       // destination subnet mask
118       if ( dstaddr.value != "" )
119          loc += '&dstMask=' + dstmask.value;
120
121       // destination port
122       if ( dstport.value != "" )
123          loc += '&dstPort=' + dstport.value;
124    }
125    eval('location = "' + loc + '"');
126 }
127
128 // done hiding -->
129    </script>
130 </head>
131 <body onload="initMenu();">
132
133 <script type="text/javascript">
134         writeHeaderInfo("Add Wireless QoS Rule");
135 </script>
136
137 <form>
138         <p>A wireless QoS rule consists of a class name and at least one of the conditions below.
139         All of the specified conditions in this classification rule must be satisfied for the
140         rule to take effect.
141         Press the <b>Save</b> button to save and activate the rule.</p>
142
143         <table border="0">
144                 <tr>
145                         <td><label for="txtclsname">Traffic class name:</label></td>
146                         <td><input type="text" size="22" maxlength="22" name="txtclsname" id="txtclsname"></td>
147                 </tr>
148                 <tr>
149                         <td><label>Transmit priority:</label></td>
150                         <td><select name="priority">
151                                         <option value="0" selected>0 - WMM Best Effort (default)</option>
152                                         <option value="1">1 - WMM Background</option>
153                                         <option value="2">2 - WMM Background</option>
154                                         <option value="3">3 - WMM Best Effort</option>
155                                         <option value="4">4 - WMM Video Priority</option>
156                                         <option value="5">5 - WMM Video Priority</option>
157                                         <option value="6">6 - WMM Voice Priority</option>
158                                         <option value="7">7 - WMM Voice Priority</option>
159                                 </select></td>
160                 </tr>
161                 <tr>
162                         <td>Protocol:</td>
163                         <td><select size="1" name="protocol">
164                                         <option value="0">TCP/UDP</option>
165                                         <option value="1">TCP</option>
166                                         <option value="2">UDP</option>
167                                         <option value="3">ICMP</option>
168                                 </select></td>
169                 </tr>
170                 <tr>
171                         <td><label for="srcaddr">Source IP address:</td>
172                         <td><input type="text" size="22" maxlength="22" name="srcaddr" id="srcaddr"></td>
173                 </tr>
174                 <tr>
175                         <td><label for="srcmask">Source subnet mask:</td>
176                         <td><input type="text" size="22" maxlength="22" name="srcmask" id="srcmask"></td>
177                 </tr>
178                 <tr>
179                         <td><label for="srcport">UDP/TCP source port:</td>
180                         <td><input type="text" size="22" maxlength="22" name="srcport" id="srcport"> <span class="clsNote">(port or port:port)</span></td>
181                 </tr>
182                 <tr>
183                         <td><label for="dstaddr">Destination IP address:</td>
184                         <td><input type="text" size="22" maxlength="22" name="dstaddr" id="dstaddr"></td>
185                 </tr>
186                 <tr>
187                         <td><label for="dstmask">Destination subnet mask:</td>
188                         <td><input type="text" size="22" maxlength="22" name="dstmask" id="dstmask"></td>
189                 </tr>
190                 <tr>
191                         <td><label for="dstport">UDP/TCP destination port:</td>
192                         <td><input type="text" size="22" maxlength="22" name="dstport" id="dstport"> <span class="clsNote">(port or port:port)</span></td>
193                 </tr>
194         </table>
195
196         <p><input type='button' onClick='btnApply()' value="Save"></p>
197 </form>
198
199 <script type="text/javascript">
200         writeFooter();
201 </script>
202
203 </body>
204 </html>