+++ /dev/null
-<html>
- <head>
- <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
- <link rel="stylesheet" href='stylemain.css' type='text/css'>
- <link rel="stylesheet" href='colors.css' type='text/css'>
- <script language="javascript" src="util.js"></script>
- <script language="javascript">
-<!-- hide
-var ifCount = 0;
-
-function btnApply() {
- var loc = 'scmacflt.cmd?action=add';
- var okChk = 0;
-
- with ( document.forms[0] ) {
- loc += '&protocol=' + protocol.value;
- if (destMac.value != '') {
- if (isValidMacAddress(destMac.value) == false ) {
- alert('MAC address "' + destMac.value + '" is invalid. Eg. 11:22:33:AA:BB:CC');
- return;
- }
- loc += '&destMac=' + destMac.value;
- }
- if (srcMac.value != '') {
- if (isValidMacAddress(srcMac.value) == false ) {
- alert('MAC address "' + srcMac.value + '" is invalid. Eg. 11:22:33:AA:BB:CC');
- return;
- }
- loc += '&srcMac=' + srcMac.value;
- }
- if (protocol.value == 0 && destMac.value == '' && srcMac.value == '') {
- alert('At least one condition must be specified.');
- return;
- }
- if (ifCount == 1) {
- if (ifChk.checked)
- okChk = 1;
- }
- else {
- for (i = 0; i < ifCount; i++)
- if (ifChk[i].checked)
- okChk++;
- }
- if (!okChk) {
- alert('At least one configured Bridge interface must be selected.');
- return;
- }
- loc += '&wanIf=';
- if (chkAll.checked)
- loc += 'ALL';
- else {
- var first = true;
- if (ifCount == 1)
- loc += ifChk.value
- else {
- for (i = 0; i < ifCount; i++)
- if (ifChk[i].checked) {
- if (!first)
- loc += '|';
- loc += ifChk[i].value;
- first = false;
- }
- }
- }
- loc += '&direction=' + direction.value;
- }
- var code = 'location="' + loc + '"';
- eval(code);
-}
-
-function toggle(cb) {
- var chkCount = 0;
- with ( document.forms[0] ) {
- if (ifCount == 1)
- chkAll.checked = cb.checked;
- else {
- for (i = 0; i < ifCount; i++)
- if (ifChk[i].checked)
- chkCount++;
- if (chkCount == ifCount)
- chkAll.checked = true;
- else
- chkAll.checked = false;
- }
- }
-}
-
-function toggleIfs(cb) {
- var chkStatus = false;
- with ( document.forms[0] ) {
- if (chkAll.checked)
- chkStatus = true;
- if (ifCount == 1)
- ifChk.checked = chkStatus;
- else
- for (i = 0; i < ifCount; i++)
- ifChk[i].checked = chkStatus;
- }
-}
-
-// done hiding -->
-</script>
- </head>
- <body>
- <blockquote>
- <form>
- <P>
- <b>Add MAC Filter</b><br>
- <br>
- Create a filter to identify the MAC layer frames by specifying at least one
- condition below. If multiple conditions are specified, all of them take effect.
- Click "Apply" to save and activate the filter.</P>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="175" height="31">Protocol Type:</td>
- <td height="31"><select name='protocol' size="1">
- <option value="0" selected>
-
- <option value="1">
- PPPoE
- <option value="2">
- IPv4
- <option value="3">
- IPv6
- <option value="4">
- AppleTalk
- <option value="5">
- IPX
- <option value="6">
- NetBEUI
- <option value="7">
- IGMP
- </option>
- </select></td>
- </tr>
- <tr>
- <td width="175">Destination MAC Address:</td>
- <td><input type='text' name="destMac"></td>
- </tr>
- <tr>
- <td width="175">Source MAC Address:</td>
- <td><input type='text' name="srcMac"></td>
- </tr>
- <tr>
- <td width="175"><br>
- </td>
- </tr>
- <tr>
- <td width="175">
- Frame Direction:</td>
- <td><select name='direction' size="1">
- <option value="2" selected>
- LAN<=>WAN
- <option value="1">
- WAN=>LAN
- <option value="0">
- LAN=>WAN
- </option>
- </select></td>
- </tr>
- </table>
- <br>
- WAN Interfaces (Configured in Bridge mode only)
- <br>
- <br>
- <table>
- <tr>
- <input type='checkbox' name='chkAll' checked onclick='toggleIfs(this)'> Select All</tr>
- <tr>
- <script language="javascript">
-<!-- hide
-{
- var i = 0;
- var interfaceInfo = '<%ejGetOther(wanInterfaceInfo, bridge)%>';
- var interfaces = interfaceInfo.split('|');
-
- for ( i = 0; i < interfaces.length; i++ ) {
- var names = interfaces[i].split('/');
- document.writeln("<tr> <input type='checkbox' name='ifChk' checked value=" +
- names[1] + '>' + ' ' + interfaces[i] + "</tr>");
- ifCount++;
- }
-}
-// done hiding -->
-</script>
- </tr>
- </table>
- <br>
- <center><input type='button' onClick='btnApply()' value='Save/Apply'></center>
- </form>
- </blockquote>
- </body>
-</html>