mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
allow for custom ASN textual descriptions
git-svn-id: http://www.observium.org/svn/observer/trunk@637 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -733,9 +733,18 @@ function discover_process_ipv6($ifIndex,$ipv6_address,$ipv6_prefixlen,$ipv6_orig
|
||||
|
||||
function get_astext($asn)
|
||||
{
|
||||
$result = dns_get_record("AS$asn.asn.cymru.com",DNS_TXT);
|
||||
$txt = explode('|',$result[0]['txt']);
|
||||
return trim(str_replace('"', '', $txt[4]));
|
||||
global $config;
|
||||
|
||||
if (isset($config['astext'][$asn]))
|
||||
{
|
||||
return $config['astext'][$asn];
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = dns_get_record("AS$asn.asn.cymru.com",DNS_TXT);
|
||||
$txt = explode('|',$result[0]['txt']);
|
||||
return trim(str_replace('"', '', $txt[4]));
|
||||
}
|
||||
}
|
||||
|
||||
function eventlog($eventtext,$device_id = "", $interface_id = "")
|
||||
|
||||
Reference in New Issue
Block a user