summaryrefslogtreecommitdiff
path: root/networking/udhcp/clientsocket.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-06-17 11:54:52 +0200
committerDenys Vlasenko2009-06-17 11:54:52 +0200
commitac906fa85e61b4e34161709de777616f858bc945 (patch)
tree7b247714814fd9dcf3fd3dccf954521b29eef5a2 /networking/udhcp/clientsocket.c
parented8982bfc0e9895fe707a5f6152cf184e06f2052 (diff)
downloadbusybox-ac906fa85e61b4e34161709de777616f858bc945.zip
busybox-ac906fa85e61b4e34161709de777616f858bc945.tar.gz
udhcp: change UDHCP_DEBUG into int, make verbosity selectable with -v
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/clientsocket.c')
-rw-r--r--networking/udhcp/clientsocket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/udhcp/clientsocket.c b/networking/udhcp/clientsocket.c
index 1dcc105..851d5ab 100644
--- a/networking/udhcp/clientsocket.c
+++ b/networking/udhcp/clientsocket.c
@@ -85,24 +85,24 @@ int FAST_FUNC udhcp_raw_socket(int ifindex)
.filter = (struct sock_filter *) filter_instr,
};
- DEBUG("opening raw socket on ifindex %d", ifindex);
+ log1("Opening raw socket on ifindex %d", ifindex); //log2?
fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
- DEBUG("got raw socket fd %d", fd);
+ log1("Got raw socket fd %d", fd); //log2?
if (SERVER_PORT == 67 && CLIENT_PORT == 68) {
/* Use only if standard ports are in use */
/* Ignoring error (kernel may lack support for this) */
if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog,
sizeof(filter_prog)) >= 0)
- DEBUG("attached filter to raw socket fd %d", fd);
+ log1("Attached filter to raw socket fd %d", fd); // log?
}
sock.sll_family = AF_PACKET;
sock.sll_protocol = htons(ETH_P_IP);
sock.sll_ifindex = ifindex;
xbind(fd, (struct sockaddr *) &sock, sizeof(sock));
- DEBUG("bound to raw socket fd %d", fd);
+ log1("Created raw socket");
return fd;
}