http://downloads.netgear.com/files/GPL/DM111PSP_v3.61d_GPL.tar.gz
[bcm963xx.git] / userapps / broadcom / cfm / html / scoutflt.html
1 <html>
2    <head>
3       <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
4       <link rel="stylesheet" href='stylemain.css' type='text/css'>
5          <link rel="stylesheet" href='colors.css' type='text/css'>
6             <script language="javascript" src="util.js"></script>
7             <script language="javascript">
8 <!-- hide
9
10 function btnApply() {
11    var loc = 'scoutflt.cmd?action=add';
12
13    with ( document.forms[0] ) {
14       if ( txtfltname.value == '' ) {
15          msg = 'Please enter outgoing IP filtering name.';
16          alert(msg);
17          return;
18       }
19
20       if ( isValidName(txtfltname.value) == false ) {
21          msg = 'Please enter valid outgoing IP filtering name: No special characters.';
22          alert(msg);
23          return;
24       }      
25
26       if ( srcaddr.value == "" && srcmask.value == "" && srcport.value == "" &&
27            dstaddr.value == "" && dstmask.value == "" && dstport.value == "" &&
28            protocol.selectedIndex == 0 ) {
29          msg = 'At least one condition must be specified.'
30          alert(msg);
31          return;
32       }      
33
34       if ( srcaddr.value != "" && isValidIpAddress(srcaddr.value) == false ) {
35          msg = 'Source address "' + srcaddr.value + '" is invalid IP address.';
36          alert(msg);
37          return;
38       }
39
40       if ( srcmask.value != "" && isValidSubnetMask(srcmask.value) == false ) {
41          msg = 'Source subnet mask "' + srcmask.value + '" is invalid subnet mask.';
42          alert(msg);
43          return;
44       }
45
46       if ( srcaddr.value == "" && srcmask.value != "" ) {
47          msg = 'Cannot have source subnet mask without source IP address.';
48          alert(msg);
49          return;
50       }
51
52       if ( srcport.value != "" && isValidPort(srcport.value) == false ) {
53          msg = 'Source port "' + srcport.value + '" is invalid port number or port range.';
54          alert(msg);
55          return;
56       }
57
58       if ( dstaddr.value != "" && isValidIpAddress(dstaddr.value) == false ) {
59          msg = 'Destination address "' + dstaddr.value + '" is invalid IP address.';
60          alert(msg);
61          return;
62       }
63
64       if ( dstmask.value != "" && isValidSubnetMask(dstmask.value) == false ) {
65          msg = 'Destination subnet mask "' + dstmask.value + '" is invalid subnet mask.';
66          alert(msg);
67          return;
68       }
69
70       if ( dstaddr.value == "" && dstmask.value != "" ) {
71          msg = 'Cannot have destination subnet mask without destination IP address.';
72          alert(msg);
73          return;
74       }
75
76       if ( dstport.value != "" && isValidPort(dstport.value) == false ) {
77          msg = 'Destination port "' + dstport.value + '" is invalid port number or port range.';
78          alert(msg);
79          return;
80       }
81
82       if ( (srcport.value != "" || dstport.value != "") && 
83            (protocol.selectedIndex == 0 || protocol.selectedIndex == 4) ) {
84          msg = 'TCP or UDP Protocol must be selected together with port number';
85          alert(msg);
86          return;
87       } 
88       
89       // outgoing IP filter name
90       loc += '&fltName=' + encodeUrl(txtfltname.value);
91
92       // protocol
93       idx = protocol.selectedIndex;
94       val = protocol.options[idx].value;
95       loc += '&protocol=' + val;
96
97       // source address
98       if ( srcaddr.value != "" )
99          loc += '&srcAddr=' + srcaddr.value;
100
101       // source subnet mask
102       if ( srcmask.value != "" )
103          loc += '&srcMask=' + srcmask.value;
104
105       // source port
106       if ( srcport.value != "" )
107          loc += '&srcPort=' + srcport.value;
108
109       // destination address
110       if ( dstaddr.value != "" )
111          loc += '&dstAddr=' + dstaddr.value;
112
113       // destination subnet mask
114       if ( dstaddr.value != "" )
115          loc += '&dstMask=' + dstmask.value;
116
117       // destination port
118       if ( dstport.value != "" )
119          loc += '&dstPort=' + dstport.value;
120    }
121
122    var code = 'location="' + loc + '"';
123    eval(code);
124 }
125
126 // done hiding -->
127       </script>
128    </head>
129    <body>
130       <blockquote>
131          <form>
132             <b>Add IP Filter -- Outgoing</b><br>
133             <br>
134             The screen allows you to create a filter rule to identify outgoing IP traffic 
135             by specifying a new filter name and at least one condition below. All of the 
136             specified conditions in this filter rule must be satisfied for the rule to take 
137             effect. Click 'Save/Apply' to save and activate the filter.<br>
138             <br>
139             <table border="0" cellpadding="0" cellspacing="0">
140                <tr>
141                   <td>Filter Name:</td>
142                   <td><input type='text' size="22" name="txtfltname"></td>
143                </tr>
144                <tr>
145                   <td colspan="2">&nbsp;</td>
146                </tr>
147                <tr>
148                   <td>Protocol:</td>
149                   <td><select name='protocol' size="1">
150                         <option value="4">
151                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
152                         <option value="0">
153                         TCP/UDP
154                         <option value="1">
155                         TCP
156                         <option value="2">
157                         UDP
158                         <option value="3">
159                         ICMP
160                      </select></td>
161                </tr>
162                <tr>
163                   <td>Source IP address:</td>
164                   <td><input type='text' size="22" name="srcaddr"></td>
165                </tr>
166                <tr>
167                   <td>Source Subnet Mask:</td>
168                   <td><input type='text' size="22" name="srcmask"></td>
169                </tr>
170                <tr>
171                   <td>Source Port (port or port:port):</td>
172                   <td><input type='text' size="22" name="srcport"></td>
173                </tr>
174                <tr>
175                   <td>Destination IP address:</td>
176                   <td><input type='text' size="22" name="dstaddr"></td>
177                </tr>
178                <tr>
179                   <td>Destination Subnet Mask:</td>
180                   <td><input type='text' size="22" name="dstmask"></td>
181                </tr>
182                <tr>
183                   <td>Destination Port (port or port:port):</td>
184                   <td><input type='text' size="22" name="dstport"></td>
185                </tr>
186             </table>
187             <br>
188             <br>
189             <center><input type='button' onClick='btnApply()' value='Save/Apply'></center>
190          </form>
191       </blockquote>
192    </body>
193 </html>