[Nagiosplug-devel] system specific defines ... Was: check_dhcp - a possible addition
Stanley.Hopcroft at IPAustralia.Gov.AU
Thu Jan 20 01:45:09 UTC 2005
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
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 ?
Ph: (02) 6283 3189 Fax: (02) 6281 1353
PO Box 200 Woden ACT 2606
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Nagiosplugin-devel