[Nagiosplug-devel] Nagios plugin options -4 and -6

Jeremy T. Bouse jeremy+nagios at undergrid.net
Mon Jun 30 06:25:02 CEST 2003


Ton,

	Don't spend too much time on this... I believe I know exactly
what is wrong and will get it fixed up here shortly and committed back
to CVS... I hadn't had a chance to test the compile on my Solaris 7
SPARC machine at work yet so that's why I hadn't caught it as my
development machine does have AF_INET6 support...

	Regards,
	Jeremy

On Mon, Jun 30, 2003 at 01:40:43PM +0100, Voon, Ton wrote:
> Jeremy,
> 
> I get a compilation error on Solaris 2.6 using the latest version of
> netutils.c. Reverting back to netutils.c v1.7 works okay.
> 
> This is the error:
> gcc -DHAVE_CONFIG_H -I. -I. -I. -I.. -I../lib     -g -O2 -c `test -f
> 'netutils.c' || echo './'`netutils.c
> netutils.c: In function `is_addr':
> netutils.c:329: `AF_INET6' undeclared (first use in this function)
> netutils.c:329: (Each undeclared identifier is reported only once
> netutils.c:329: for each function it appears in.)
> 
> Looks like it is trying to use IPv6 when configure couldn't pick it up
> (--with-ipv6=no).
> 
> I get something similar in check_ping, but I haven't investigated much
> further.
> 
> Ton
> 
> > -----Original Message-----
> > From:	Jeremy T. Bouse [SMTP:jeremy+nagios at undergrid.net]
> > Sent:	Sunday, June 29, 2003 7:49 AM
> > To:	nagiosplug-devel at lists.sourceforge.net
> > Subject:	Re: [Nagiosplug-devel] Nagios plugin options -4 and -6
> > 
> > 	I have gone ahead and committed changes to check_ssh.c,
> > check_tcp.c, and netutils.[ch] which allow for easy use of -4 and -6
> > command line options...
> > 
> > 	I have defined a new extern int variable (address_family) in
> > netutils.h and default its assignment to AF_UNSPEC in netutils.c. This
> > is basically what the current default behavior is. To demonstrate it's
> > use and to test myself I have modified check_ssh and check_tcp to use
> > this by adding the following to the option parsing switch statement:
> > 
> > 	case '4':
> > 		address_family = AF_INET;
> > 		break;
> > 	case '6':
> > 		address_family = AF_INET6;
> > 		break;
> > 
> > 	I've also used --use-ipv4 and --use-ipv6 as standard long
> > options for both -4 and -6 respectively... Both are implimented in
> > check_ssh and check_tcp at this time...
> > 
> > 	This only affects the connection attempts themselves as the
> > modification only affects the my_connect() function in netutils.c... I
> > still need to modify is_inet_addr(), is_inet6_addr() and is_hostname()
> > to make use of address_family to determine during checks if a hostname
> > is valid or not... As well check_ping will take some work as I need to
> > modify the conditions under which it will attempt to use the PING6
> > command over the PING command...
> > 
> > 	With that in mind please leave check_ping to me to work on
> > initially... I will also work to get the hostname/address verification
> > functions utilizing this as soon as possible only with check_ping... I
> > would welcome help making the necessary changes to all other network
> > plugins which utilize netutils.h... From a cursory look it would appear
> > that work needs to be done on the following:
> > 
> > 	check_http, check_ldap, check_nt, check_nwstat, check_overcr,
> > 	check_real, check_smtp, check_time, check_udp and check_ups
> > 
> > 	These are the only other ones besides check_ssh, check_tcp and
> > check_ping which include netutils.h... If there are other network based
> > plugins not currently including netutils.h they will need to do so first
> > then make the modifications... This should not affect check_by_ssh which
> > already has a -4 and -6 (along with --use-ipv4 and --use-ipv6) which
> > only pass it on to the ssh command line call as it makes no direct
> > utilization of netutils...
> > 
> > 	Regards,
> > 	Jeremy
> > 
> > 
> > -------------------------------------------------------
> > This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> > Data Reports, E-commerce, Portals, and Forums are available now.
> > Download today and enter to win an XBOX or Visual Studio .NET.
> > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
> > _______________________________________________
> > Nagiosplug-devel mailing list
> > Nagiosplug-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> > ::: Please include plugins version (-v) and OS when reporting any issue. 
> > ::: Messages without supporting info will risk being sent to /dev/null
> 
> 
> This private and confidential e-mail has been sent to you by Egg.
> The Egg group of companies includes Egg Banking plc
> (registered no. 2999842), Egg Financial Products Ltd (registered
> no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
> carries out investment business on behalf of Egg and is regulated
> by the Financial Services Authority.  
> Registered in England and Wales. Registered offices: 1 Waterhouse Square,
> 138-142 Holborn, London EC1N 2NA.
> If you are not the intended recipient of this e-mail and have
> received it in error, please notify the sender by replying with
> 'received in error' as the subject and then delete it from your
> mailbox.
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
> _______________________________________________
> Nagiosplug-devel mailing list
> Nagiosplug-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null




More information about the Devel mailing list