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

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Thu Jan 20 01:45:09 CET 2005


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.

-- 
Stanley Hopcroft

IP Australia
Ph: (02) 6283 3189  Fax: (02) 6281 1353
PO Box 200 Woden  ACT 2606
http://www.ipaustralia.gov.au
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: disclaimer.txt
URL: <http://nagios-plugins.org/archive/devel/attachments/20050120/f46bf508/attachment.txt>


More information about the Devel mailing list