');
@@ -317,6 +314,17 @@ if ($_SESSION['userlevel'] >= '5')
?>
+-
+
+
+
System
|
diff --git a/html/pages/device/ports/neighbours.inc.php b/html/pages/device/ports/neighbours.inc.php
index 37cb0e24b..300278a6f 100644
--- a/html/pages/device/ports/neighbours.inc.php
+++ b/html/pages/device/ports/neighbours.inc.php
@@ -10,7 +10,7 @@ $i = "1";
echo(' | | Local Port |
Remote Port |
Remote Device |
- |
+ Protocol |
');
while($neighbour = mysql_fetch_assoc($query))
@@ -32,6 +32,8 @@ while($neighbour = mysql_fetch_assoc($query))
echo("".$neighbour['remote_hostname']."
".$neighbour['remote_platform']." | ");
}
+ echo("".$neighbour['protocol']." | ");
+ echo("");
$i++;
}
diff --git a/html/pages/ipv4.inc.php b/html/pages/search/ipv4.inc.php
similarity index 100%
rename from html/pages/ipv4.inc.php
rename to html/pages/search/ipv4.inc.php
diff --git a/html/pages/ipv6.inc.php b/html/pages/search/ipv6.inc.php
similarity index 100%
rename from html/pages/ipv6.inc.php
rename to html/pages/search/ipv6.inc.php
diff --git a/html/pages/search/mac.inc.php b/html/pages/search/mac.inc.php
new file mode 100644
index 000000000..fe6036fe8
--- /dev/null
+++ b/html/pages/search/mac.inc.php
@@ -0,0 +1,86 @@
+
+
+
+
+');
+
+$where = "AND `ifPhysAddress` LIKE '%".$_POST['address']."%'";
+if (is_numeric($_POST['device_id'])) { $where .= " AND I.device_id = '".$_POST['device_id']."'"; }
+if ($_POST['interface']) { $where .= " AND I.ifDescr LIKE '".mres($_POST['interface'])."'"; }
+
+$sql = "SELECT * FROM `ports` AS P, `devices` AS D WHERE P.device_id = D.device_id $where ORDER BY P.ifPhysAddress";
+
+$query = mysql_query($sql);
+
+echo('| Device | Interface | MAC Address | Description | ');
+$row = 1;
+while ($entry = mysql_fetch_assoc($query))
+{
+
+ if (!$ignore)
+ {
+ if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
+
+ $speed = humanspeed($entry['ifSpeed']);
+ $type = humanmedia($entry['ifType']);
+
+ if ($entry['in_errors'] > 0 || $entry['out_errors'] > 0)
+ {
+ $error_img = generate_port_link($entry," ",errors);
+ } else { $error_img = ""; }
+
+ if (port_permitted($entry['interface_id']))
+ {
+ echo('
+ | ' . generate_device_link($entry) . ' |
+ ' . generate_port_link($entry, makeshortif(fixifname($entry['ifDescr']))) . ' ' . $error_img . ' |
+ ' . formatMac($entry['ifPhysAddress']) . ' |
+ ' . $entry['ifAlias'] . " |
+ \n");
+
+ $row++;
+ }
+ }
+
+ unset($ignore);
+}
+
+echo(" ");
+
+?>
diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php
index 500dbd803..f7754696f 100755
--- a/includes/polling/ports.inc.php
+++ b/includes/polling/ports.inc.php
@@ -123,6 +123,21 @@ while ($port = mysql_fetch_assoc($port_query))
$this_port['ifOutOctets'] = $this_port['ifHCOutOctets'];
}
+ ### rewrite the ifPhysAddress
+
+ if(strpos($this_port['ifPhysAddress'], ":"))
+ {
+ list($a_a, $a_b, $a_c, $a_d, $a_e, $a_f) = explode(":", $this_port['ifPhysAddress']);
+ $ah_a = zeropad(dechex($a_a));
+ $ah_b = zeropad(dechex($a_b));
+ $ah_c = zeropad(dechex($a_c));
+ $ah_d = zeropad(dechex($a_d));
+ $ah_e = zeropad(dechex($a_e));
+ $ah_f = zeropad(dechex($a_f));
+ #$this_port['ifPhysAddress'] = $ah_a.":".$ah_b.":".$ah_c.":".$ah_d.":".$ah_e.":".$ah_f;
+ $this_port['ifPhysAddress'] = $ah_a.$ah_b.$ah_c.$ah_d.$ah_e.$ah_f;
+ }
+
if (is_numeric($this_port['ifHCInBroadcastPkts']) && is_numeric($this_port['ifHCOutBroadcastPkts']) && is_numeric($this_port['ifHCInMulticastPkts']) && is_numeric($this_port['ifHCOutMulticastPkts']))
{
echo("HC ");
@@ -319,4 +334,4 @@ while ($port = mysql_fetch_assoc($port_query))
#### Clear Variables Here
unset($port_stats);
-?>
\ No newline at end of file
+?>
|