Updated BGP polling for Cisco to support CISCO-BGP4-MIB better

This commit is contained in:
laf
2015-06-02 16:32:39 +01:00
parent 9ea274e9a4
commit b9dabae7d8
5 changed files with 2382 additions and 1161 deletions
+14
View File
@@ -1201,3 +1201,17 @@ function first_oid_match($device, $list) {
}
}
}
function ip_to_hex($ip) {
if (strstr($ip, ":")) {
$ipv6 = explode(':', $ip);
foreach ($ipv6 as $item) {
$return .= hexdec($item).'.';
}
$return = substr($return, 0, -1);
} else {
$return = $ip;
}
return $return;
}