diff options
author | Stanley Hopcroft <stanleyhopcroft@users.sourceforge.net> | 2004-12-20 09:04:35 +0000 |
---|---|---|
committer | Stanley Hopcroft <stanleyhopcroft@users.sourceforge.net> | 2004-12-20 09:04:35 +0000 |
commit | 7bd302bd788d07391ca1c9d284bf443438fd4cfd (patch) | |
tree | f32cd6a7028c52c17d8402f98cf56d95014bfe71 /plugins | |
parent | 01e074cb62700c12166087bef0b27e3ae2f2f727 (diff) | |
download | monitoring-plugins-7bd302bd788d07391ca1c9d284bf443438fd4cfd.tar.gz |
Compilation fixes for check_dhcp.c HP-UX 11. Still fails on HP-UX 10. Unknown if check_dhcp works on UX.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1039 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_dhcp.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/plugins/check_dhcp.c b/plugins/check_dhcp.c index 5c3c199d..f668a880 100644 --- a/plugins/check_dhcp.c +++ b/plugins/check_dhcp.c | |||
@@ -55,7 +55,7 @@ | |||
55 | #include <sys/sysctl.h> | 55 | #include <sys/sysctl.h> |
56 | #include <net/if_dl.h> | 56 | #include <net/if_dl.h> |
57 | 57 | ||
58 | #elif defined(__sun__) || defined(__solaris__) | 58 | #elif defined(__sun__) || defined(__solaris__) || defined(__hpux__) |
59 | 59 | ||
60 | #define INSAP 22 | 60 | #define INSAP 22 |
61 | #define OUTSAP 24 | 61 | #define OUTSAP 24 |
@@ -367,13 +367,30 @@ int get_hardware_address(int sock,char *interface_name){ | |||
367 | exit(STATE_UNKNOWN); | 367 | exit(STATE_UNKNOWN); |
368 | } | 368 | } |
369 | 369 | ||
370 | #elif defined(__hpux__) | ||
371 | |||
372 | /* Martin Kompf again | ||
373 | * | ||
374 | * Nagios plugins thank you sincerely | ||
375 | */ | ||
376 | |||
377 | long stat; | ||
378 | char dev[20] = "/dev/dlpi" ; | ||
379 | int unit = 0; | ||
380 | |||
381 | stat = mac_addr_dlpi(dev, unit, client_hardware_address); | ||
382 | if (stat != 0) { | ||
383 | printf("Error: can't read MAC address from DLPI streams interface for device %s unit %d.\n", dev, unit); | ||
384 | exit(STATE_UNKNOWN); | ||
385 | } | ||
386 | |||
370 | #else | 387 | #else |
371 | printf("Error: can't get MAC address for this architcture.\n"); | 388 | printf("Error: can't get MAC address for this architecture.\n"); |
372 | exit(STATE_UNKNOWN); | 389 | exit(STATE_UNKNOWN); |
373 | #endif | 390 | #endif |
374 | 391 | ||
375 | if (verbose) { | 392 | if (verbose) { |
376 | printf( "Hadrware address: "); | 393 | printf( "Hardware address: "); |
377 | for (i=0; i<6; ++i) | 394 | for (i=0; i<6; ++i) |
378 | printf("%2.2x", client_hardware_address[i]); | 395 | printf("%2.2x", client_hardware_address[i]); |
379 | printf( "\n"); | 396 | printf( "\n"); |
@@ -1137,7 +1154,7 @@ int validate_arguments(void){ | |||
1137 | return OK; | 1154 | return OK; |
1138 | } | 1155 | } |
1139 | 1156 | ||
1140 | #if defined(__sun__) || defined(__solaris__) | 1157 | #if defined(__sun__) || defined(__solaris__) || defined(__hpux__) |
1141 | 1158 | ||
1142 | 1159 | ||
1143 | /* | 1160 | /* |