[Nagiosplug-devel] system specific defines ... Was: check_dhc p - a possible addition

Andreas Ericsson ae at op5.se
Thu Jan 20 03:04:42 UTC 2005


Voon, Ton wrote:
> Stanley,
> 
> Is there any other open source project that uses dhcp to see how it is done?
> 

dhcpd/dhclient by ISC.

> This might be too large a change for 1.4 at this stage, so I would err on
> the side of moving it to contrib.
> 
> Ton
> 
> -----Original Message-----
> From: Stanley Hopcroft [mailto:Stanley.Hopcroft at IPAustralia.Gov.AU] 
> Sent: 20 January 2005 09:43
> To: nagiosplug-devel at lists.sourceforge.net
> Subject: [Nagiosplug-devel] system specific defines ... Was: check_dhcp - a
> possible addition
> 
> 
> Dear Folks,
> 
> As pointed out by Mr Ericsson, check_dhcp will not build properly 
> without preprocessor symbols being defined (__bsd__ etc).
> 
> I thought this was necessary to select _completely_ different code to 
> get the MAC address of the interface from the system (eg BSD use raw 
> sockets, solaris and hpux use DLPI [and prob AIX ...], Linux uses a 
> Linux specific ioctl()).
> 
> Continuing down this path requires that configure.in and config.h.in be 
> patched to set these symbols depending on the value of 'host'.
> 
> While tbis is feasable, doing so is seems anti-autoconf and 
> anachronistic (although this is the way that fping seems to operate) - 
> it looks bad and probably is too.
> 
> What is a better way ?
> 
> Chuck the system specific stuff and let the user define the broadcast 
> interface _and_ the MAC address (simply set the hardware address in the 
> DISCOVER packet and let the server respond with an OFFER to the real 
> MAC) ?
> 
> Chuck the C version and build a Perl one (based on Net::DHCP or friends) 
> ?
> 
> Leave the C version Linux specific (and prob put it back in  contrib/) 
> and or build a Perl one ?
> 
> Yours sincerely.
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer




More information about the Nagiosplugin-devel mailing list