From 24833430bc2dbea733c3b0b9ea6c6b976f95474a Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Tue, 10 Jun 2003 17:22:49 +0000 Subject: Vodz, last_patch_88 --- networking/udhcp/arpping.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'networking/udhcp/arpping.c') 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 */ -#include #include #include -#include #include #include #include #include -#include #include #include #include #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; -- cgit v1.2.3