[Nagiosplug-devel] RFC: netutils.c function change
Jeremy T. Bouse
Jeremy.Bouse at UnderGrid.net
Fri Dec 13 06:36:03 CET 2002
On Fri, Dec 13, 2002 at 07:47:46AM -0500, Karl DeBisschop wrote:
> I assume that IPPROTO_TCP and IPPROTO_UDP are POSIX-specified and have
> been for some time?
>
> If they are in POSIX, in addition to generally available, I would
> generally strongly advocate their use. Thus a patch would be likely to
> go in quickly.
>
> If not in POSIX, I'd want to do more investigation.
>
I'm checking on it's POSIX status... I am able to confirm it is
part of netinet/in.h on FreeBSD, Linux and Solaris 9... I couldn't reach
the OpenBSD build machine in my cubicle at work from home as it gets
it's IP via DHCP... Main reason I actually went ahead to make the change
in my code and test it was because I was getting random segmentation
faults when proto being declared as char *... Some functions calls to
getprotobyname() were receiving the SEGV while others weren't... Also by
using the IPPROTO_* defines being integers it makes conditions easier as
you don't need to use strcmp or strcasecmp to test... I'll see what
more I can find on it being POSIX or not...
> I would suggest that waitng is the lesser amount of work for you. I'm
> quite enthusiastic about your earlier patch, but where I just moved I've
> had serious connectivity issues that have slowed my looking at it. But
> it sounds like good thoughtful work, and I hope we can include it very
> quickly.
>
Thank you, I've been working out of the CVS code base since
around early November to get the plugins to support IPv6 as we need to
be able to monitor our growing IPv6 network at work... So I'm making the
migration from netsaint to nagios and doing the porting work to make it
independent of protocol... The nice side affect was getting around the
inet_aton() issue on Solaris as the method which I used to modify it is
portable on all platforms that I can tell... Most of the notes I used on
porting came from a KAME document...
Jeremy
More information about the Devel
mailing list