summaryrefslogtreecommitdiffstats
path: root/contrib/check_dhcp.c
diff options
context:
space:
mode:
authorEthan Galstad <egalstad@users.sourceforge.net>2002-03-01 02:42:56 (GMT)
committerEthan Galstad <egalstad@users.sourceforge.net>2002-03-01 02:42:56 (GMT)
commitecc185f1a43d2b01acb14c9cdcc98e80d3b67122 (patch)
tree29839707d5910c08ce881a3bcddb2822f67afb2f /contrib/check_dhcp.c
parent44a321cb8a42d6c0ea2d96a1086a17f2134c89cc (diff)
downloadmonitoring-plugins-ecc185f1a43d2b01acb14c9cdcc98e80d3b67122.tar.gz
Contrib plugin cleanup
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@6 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'contrib/check_dhcp.c')
-rw-r--r--contrib/check_dhcp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/check_dhcp.c b/contrib/check_dhcp.c
index 8168b94..6a6037f 100644
--- a/contrib/check_dhcp.c
+++ b/contrib/check_dhcp.c
@@ -4,7 +4,7 @@
4* 4*
5* Program: DHCP plugin for Nagios 5* Program: DHCP plugin for Nagios
6* License: GPL 6* License: GPL
7* Copyright (c) 2001 Ethan Galstad (nagios@nagios.org) 7* Copyright (c) 2001-2002 Ethan Galstad (nagios@nagios.org)
8* 8*
9* License Information: 9* License Information:
10* 10*
@@ -437,7 +437,7 @@ int send_dhcp_packet(void *buffer, int buffer_size, int sock, struct sockaddr_in
437 struct sockaddr_in myname; 437 struct sockaddr_in myname;
438 int result; 438 int result;
439 439
440 result=sendto(sock,(char *)buffer,buffer_size,0,(struct sockaddr_in *)dest,sizeof(*dest)); 440 result=sendto(sock,(char *)buffer,buffer_size,0,(struct sockaddr *)dest,sizeof(*dest));
441 441
442#ifdef DEBUG 442#ifdef DEBUG
443 printf("send_dhcp_packet result: %d\n",result); 443 printf("send_dhcp_packet result: %d\n",result);
@@ -480,11 +480,11 @@ int receive_dhcp_packet(void *buffer, int buffer_size, int sock, int timeout, st
480 /* why do we need to peek first? i don't know, its a hack. without it, the source address of the first packet received was 480 /* why do we need to peek first? i don't know, its a hack. without it, the source address of the first packet received was
481 not being interpreted correctly. sigh... */ 481 not being interpreted correctly. sigh... */
482 bzero(&source_address,sizeof(source_address)); 482 bzero(&source_address,sizeof(source_address));
483 recv_result=recvfrom(sock,(char *)buffer,buffer_size,MSG_PEEK,(struct sockaddr_in *)&source_address,&address_size); 483 recv_result=recvfrom(sock,(char *)buffer,buffer_size,MSG_PEEK,(struct sockaddr *)&source_address,&address_size);
484#ifdef DEBUG 484#ifdef DEBUG
485 printf("recv_result_1: %d\n",recv_result); 485 printf("recv_result_1: %d\n",recv_result);
486#endif 486#endif
487 recv_result=recvfrom(sock,(char *)buffer,buffer_size,0,(struct sockaddr_in *)&source_address,&address_size); 487 recv_result=recvfrom(sock,(char *)buffer,buffer_size,0,(struct sockaddr *)&source_address,&address_size);
488#ifdef DEBUG 488#ifdef DEBUG
489 printf("recv_result_2: %d\n",recv_result); 489 printf("recv_result_2: %d\n",recv_result);
490#endif 490#endif
@@ -812,7 +812,7 @@ void print_help(void){
812 812
813 /*print_revision(PROGNAME,"$Revision$");*/ 813 /*print_revision(PROGNAME,"$Revision$");*/
814 814
815 printf("Copyright (c) 2001 Ethan Galstad (nagios@nagios.org)\n\n"); 815 printf("Copyright (c) 2001-2002 Ethan Galstad (nagios@nagios.org)\n\n");
816 printf("This plugin tests the availability of DHCP servers on a network.\n\n"); 816 printf("This plugin tests the availability of DHCP servers on a network.\n\n");
817 817
818 print_usage(); 818 print_usage();