[Nagiosplug-devel] check_ntp plugin
Jeremy T. Bouse
Jeremy.Bouse at UnderGrid.net
Mon Dec 30 14:17:03 CET 2002
I think to get this working off the patches I've submit'd we'd be
looking at modifing is_host() in utils.c a lil bit so instead of:
int
is_host (char *address)
{
if (is_ipv4_addr (address) || is_ipv6_addr (address) ||
is_hostname (address))
return (TRUE);
return (FALSE);
}
we'd have something along the lines of:
int
is_host (char *address)
{
if (naf_family == AF_IPV4)
if (is_ipv4_addr (address) || is_hostname (address))
return (TRUE);
else if (naf_family == AF_IPV6)
if (is_ipv6_addr (address) || is_hostname (address))
return (TRUE);
else
if (is_ipv4_addr (address) || is_ipv6_addr (address) ||
is_hostname (address))
return (TRUE);
return (FALSE);
}
Of course is_hostname could be modified as well to add a
naf_family parameter so it only checks for IPv4 or IPv6 hostnames...
in netutils.c it would mean adding the parameter to the calls
and then resolve_host_or_addr() is already written to handle an AF
family parameter...
Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20021230/3b56fc3a/attachment.sig>
More information about the Devel
mailing list