[Nagiosplug-checkins] nagiosplug/plugins check_dhcp.c,1.3,1.4
Stanley Hopcroft
stanleyhopcroft at users.sourceforge.net
Tue Dec 21 00:57:02 CET 2004
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5282/plugins
Modified Files:
check_dhcp.c
Log Message:
Commentary changes only: cite origin of copied code with reference to ACK file
Index: check_dhcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dhcp.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- check_dhcp.c 20 Dec 2004 09:04:34 -0000 1.3
+++ check_dhcp.c 21 Dec 2004 08:56:30 -0000 1.4
@@ -291,10 +291,7 @@
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;
@@ -332,20 +329,11 @@
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 at 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;
@@ -369,11 +357,6 @@
#elif defined(__hpux__)
- /* Martin Kompf again
- *
- * Nagios plugins thank you sincerely
- */
-
long stat;
char dev[20] = "/dev/dlpi" ;
int unit = 0;
@@ -383,6 +366,7 @@
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");
@@ -1156,12 +1140,7 @@
#if defined(__sun__) || defined(__solaris__) || defined(__hpux__)
-
-/*
- * Copyright @2000, 2003 Martin Kompf, martin at 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)
@@ -1289,4 +1268,5 @@
}
#endif
+ /* Kompf 2000-2003 */
More information about the Commits
mailing list