aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/arpping.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-06-10 17:22:49 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-06-10 17:22:49 +0000
commit24833430bc2dbea733c3b0b9ea6c6b976f95474a (patch)
tree805a4197b8a0d36eaa6880dfc23d8c2539359fe9 /networking/udhcp/arpping.c
parent6c43f743a3f607f91ee22a53db880fce2df645f0 (diff)
downloadbusybox-24833430bc2dbea733c3b0b9ea6c6b976f95474a.tar.gz
Vodz, last_patch_88
Diffstat (limited to 'networking/udhcp/arpping.c')
-rw-r--r--networking/udhcp/arpping.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c
index 4c0b3d83b..e20395a9e 100644
--- a/networking/udhcp/arpping.c
+++ b/networking/udhcp/arpping.c
@@ -5,22 +5,19 @@
* by Yoichi Hariguchi <yoichi@fore.com>
*/
-#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/if_ether.h>
#include <net/if_arp.h>
#include <netinet/in.h>
-#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include "dhcpd.h"
-#include "debug.h"
#include "arpping.h"
+#include "common.h"
/* args: yiaddr - what IP to ping
* ip - our ip
@@ -47,7 +44,7 @@ int arpping(u_int32_t yiaddr, u_int32_t ip, unsigned char *mac, char *interface)
if ((s = socket (PF_PACKET, SOCK_PACKET, htons(ETH_P_ARP))) == -1) {
- LOG(LOG_ERR, "Could not open raw socket");
+ LOG(LOG_ERR, bb_msg_can_not_create_raw_socket);
return -1;
}
@@ -84,7 +81,7 @@ int arpping(u_int32_t yiaddr, u_int32_t ip, unsigned char *mac, char *interface)
FD_SET(s, &fdset);
tm.tv_sec = timeout;
if (select(s + 1, &fdset, (fd_set *) NULL, (fd_set *) NULL, &tm) < 0) {
- DEBUG(LOG_ERR, "Error on ARPING request: %s", strerror(errno));
+ DEBUG(LOG_ERR, "Error on ARPING request: %m");
if (errno != EINTR) rv = 0;
} else if (FD_ISSET(s, &fdset)) {
if (recv(s, &arp, sizeof(arp), 0) < 0 ) rv = 0;