summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2ffc01a)
raw | patch | inline | side by side (parent: 2ffc01a)
author | Stanley Hopcroft <stanleyhopcroft@users.sourceforge.net> | |
Tue, 21 Dec 2004 08:56:30 +0000 (08:56 +0000) | ||
committer | Stanley Hopcroft <stanleyhopcroft@users.sourceforge.net> | |
Tue, 21 Dec 2004 08:56:30 +0000 (08:56 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1046 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_dhcp.c | patch | blob | history |
diff --git a/plugins/check_dhcp.c b/plugins/check_dhcp.c
index f668a8806029a5b4b0c557a786d97ef70dd1fd2b..623636c89f6e05b3d86f8253e27894fe8642c19f 100644 (file)
--- a/plugins/check_dhcp.c
+++ b/plugins/check_dhcp.c
memcpy(&client_hardware_address[0],&ifr.ifr_hwaddr.sa_data,6);
#elif defined(__bsd__)
-
- /* Code from getmac.c posted at http://lists.freebsd.org/pipermail/freebsd-hackers/2004-June/007415.html
- * by Alecs King based on Unix Network programming Ch 17
- */
+ /* King 2004 see ACKNOWLEDGEMENTS */
int mib[6], len;
char *buf;
sdl = (struct sockaddr_dl *)(ifm + 1);
ptr = (unsigned char *)LLADDR(sdl);
memcpy(&client_hardware_address[0], ptr, 6) ;
+ /* King 2004 */
#elif defined(__sun__) || defined(__solaris__)
- /*
- * Lifted from
- *
- * mac_addr_dlpi.c
- *
- * Copyright @2000, 2003 Martin Kompf, martin@kompf.de
- *
- * Return the MAC (ie, ethernet hardware) address by using the dlpi api.
- *
- */
-
+ /* Kompf 2000-2003 see ACKNOWLEDGEMENTS */
long stat;
char dev[20] = "/dev/";
char *p;
#elif defined(__hpux__)
- /* Martin Kompf again
- *
- * Nagios plugins thank you sincerely
- */
-
long stat;
char dev[20] = "/dev/dlpi" ;
int unit = 0;
printf("Error: can't read MAC address from DLPI streams interface for device %s unit %d.\n", dev, unit);
exit(STATE_UNKNOWN);
}
+ /* Kompf 2000-2003 */
#else
printf("Error: can't get MAC address for this architecture.\n");
#if defined(__sun__) || defined(__solaris__) || defined(__hpux__)
-
-/*
- * Copyright @2000, 2003 Martin Kompf, martin@kompf.de
- *
- * Nagios plugins thanks Martin for this code.
- */
+ /* Kompf 2000-2003 see ACKNOWLEDGEMENTS */
/* get a message from a stream; return type of message */
static int get_msg(int fd)
}
#endif
+ /* Kompf 2000-2003 */