mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
new mac address search
git-svn-id: http://www.observium.org/svn/observer/trunk@2151 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -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);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Reference in New Issue
Block a user