1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3 (c) 2005 U.S. Robotics Corporation
7 <title>Add MAC Filtering Rule Entry</title>
9 <link href="usr_layout.css" type="text/css" rel="stylesheet" /><script src="usr_layout.js" type="text/javascript"></script>
10 <link href="usr_menus_dropdown.css" rel="stylesheet" type="text/css"><script src="usr_menus_dropdown.js" type="text/javascript"></script><script src="usr_menus_build.js" type="text/javascript"></script>
11 <link href="usr_device.css" type="text/css" rel="stylesheet" /><script src="usr_device.js" type="text/javascript"></script><link href="usr_91xx.css" type="text/css" rel="stylesheet" /><script src="usr_91xx.js" type="text/javascript"></script><script src="usr_resources.js" type="text/javascript"></script>
13 <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
15 <script type="text/javascript" src="util.js"></script>
16 <script type="text/javascript">
23 var loc = 'scmacflt.cmd?action=add';
26 with ( document.forms[0] ) {
27 loc += '&protocol=' + protocol.value;
28 if (destMac.value != '') {
29 if (isValidMacAddress(destMac.value) == false ) {
30 alert('MAC address "' + destMac.value + '" is invalid. Eg. 11:22:33:AA:BB:CC');
33 loc += '&destMac=' + destMac.value;
35 if (srcMac.value != '') {
36 if (isValidMacAddress(srcMac.value) == false ) {
37 alert('MAC address "' + srcMac.value + '" is invalid. Eg. 11:22:33:AA:BB:CC');
40 loc += '&srcMac=' + srcMac.value;
42 if (protocol.value == 0 && destMac.value == '' && srcMac.value == '') {
43 alert('At least one condition must be specified.');
51 for (i = 0; i < ifCount; i++)
56 alert('At least one configured Bridge interface must be selected.');
67 for (i = 0; i < ifCount; i++)
68 if (ifChk[i].checked) {
71 loc += ifChk[i].value;
76 loc += '&direction=' + direction.value;
78 var code = 'location="' + loc + '"';
84 with ( document.forms[0] ) {
86 chkAll.checked = cb.checked;
88 for (i = 0; i < ifCount; i++)
91 if (chkCount == ifCount)
92 chkAll.checked = true;
94 chkAll.checked = false;
99 function toggleIfs(cb) {
100 var chkStatus = false;
101 with ( document.forms[0] ) {
105 ifChk.checked = chkStatus;
107 for (i = 0; i < ifCount; i++)
108 ifChk[i].checked = chkStatus;
112 function addIf(pr, ifName, sn)
114 if (pr == 'Bridge' && pr != ' ') {
115 document.writeln("<tr> <input type='checkbox' name='ifChk' id='ifChk' checked value=" +
116 ifName + '>' + ' ' + sn + '/' + ifName+ "</tr>");
125 <body onload="initMenu();">
127 <script type="text/javascript">
128 writeHeader("Add MAC Filtering Rule Entry");
132 <p>Select protocol and/or destination MAC addresses and/or source MAC address.
133 Press <b>Apply</b> to save.</P>
135 <table border="0" cellpadding="0" cellspacing="0">
138 <td><b>MAC Filtering Rule</b></td>
141 <td><label for="">Protocol type:</label></td>
142 <td><select name='protocol' id='protocol'>
143 <option value="0" selected></option>
144 <option value="1">PPPoE</option>
145 <option value="2">IPv4</option>
146 <option value="3">IPv6</option>
147 <option value="4">AppleTalk</option>
148 <option value="5">IPX</option>
149 <option value="6">NetBEUI</option>
150 <option value="7">IGMP</option>
154 <td><label for="destMac">Destination MAC address:</label></td>
155 <td><input type='text' name="destMac" id="destMac"></td>
158 <td><label for="srcMac">Source MAC address:</label></td>
159 <td><input type='text' name="srcMac" id="srcMac"></td>
165 <td><label for="">Frame direction:</label></td>
166 <td><select name='direction' id='direction'>
167 <option value="2" selected>LAN <=> WAN</option>
168 <option value="1">LAN <= WAN</option>
169 <option value="0">LAN => WAN</option>
176 <td><b>WAN Interfaces:</b> (Bridges only)</td>
180 <input type='checkbox' name='chkAll' id='chkAll' checked onclick='toggleIfs(this)'> <label for="chkAll">Select all</label>
184 <script type="text/javascript">
187 var ifName = '<%ejGetOther(wanInfo, deviceName, 1)%>';
188 var pr = '<%ejGetOther(wanInfo, ntwkPrtcl, 1)%>';
189 var sn = '<%ejGetOther(wanInfo, serviceName, 1)%>';
191 addIf(pr, ifName, sn);
192 ifName = '<%ejGetOther(wanInfo, deviceName, 2)%>';
193 pr = '<%ejGetOther(wanInfo, ntwkPrtcl, 2)%>';
194 sn = '<%ejGetOther(wanInfo, serviceName, 2)%>';
195 addIf(pr, ifName, sn);
196 ifName = '<%ejGetOther(wanInfo, deviceName, 3)%>';
197 pr = '<%ejGetOther(wanInfo, ntwkPrtcl, 3)%>';
198 sn = '<%ejGetOther(wanInfo, serviceName, 3)%>';
199 addIf(pr, ifName, sn);
200 ifName = '<%ejGetOther(wanInfo, deviceName, 4)%>';
201 pr = '<%ejGetOther(wanInfo, ntwkPrtcl, 4)%>';
202 sn = '<%ejGetOther(wanInfo, serviceName, 4)%>';
203 addIf(pr, ifName, sn);
204 ifName = '<%ejGetOther(wanInfo, deviceName, 5)%>';
205 pr = '<%ejGetOther(wanInfo, ntwkPrtcl, 5)%>';
206 sn = '<%ejGetOther(wanInfo, serviceName, 5)%>';
207 addIf(pr, ifName, sn);
208 ifName = '<%ejGetOther(wanInfo, deviceName, 6)%>';
209 pr = '<%ejGetOther(wanInfo, ntwkPrtcl, 6)%>';
210 sn = '<%ejGetOther(wanInfo, serviceName, 6)%>';
211 addIf(pr, ifName, sn);
212 ifName = '<%ejGetOther(wanInfo, deviceName, 7)%>';
213 pr = '<%ejGetOther(wanInfo, ntwkPrtcl, 7)%>';
214 sn = '<%ejGetOther(wanInfo, serviceName, 7)%>';
215 addIf(pr, ifName, sn);
216 ifName = '<%ejGetOther(wanInfo, deviceName, 8)%>';
217 pr = '<%ejGetOther(wanInfo, ntwkPrtcl, 8)%>';
218 sn = '<%ejGetOther(wanInfo, serviceName, 8)%>';
219 addIf(pr, ifName, sn);
226 <p><input type='button' onClick='btnApply()' value='Apply'></p>
229 <script type="text/javascript">