From 739e30fbc3363756e574b5761ff63ea97ffd61c1 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 26 Sep 2008 23:45:20 +0000 Subject: udhcp: add inline docs; small code shrink function old new delta send_packet 103 87 -16 udhcpc_main 2359 2323 -36 --- networking/udhcp/packet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'networking/udhcp/packet.c') diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index 4eedbb53a..1a6f7e6a0 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c @@ -18,12 +18,12 @@ void FAST_FUNC udhcp_init_header(struct dhcpMessage *packet, char type) { memset(packet, 0, sizeof(struct dhcpMessage)); - packet->op = BOOTREQUEST; + packet->op = BOOTREQUEST; /* if client to a server */ switch (type) { case DHCPOFFER: case DHCPACK: case DHCPNAK: - packet->op = BOOTREPLY; + packet->op = BOOTREPLY; /* if server to client */ } packet->htype = ETH_10MB; packet->hlen = ETH_10MB_LEN; @@ -65,7 +65,7 @@ int FAST_FUNC udhcp_recv_kernel_packet(struct dhcpMessage *packet, int fd) if (vendor[OPT_LEN - 2] == (uint8_t)strlen(broken_vendors[i]) && !strncmp((char*)vendor, broken_vendors[i], vendor[OPT_LEN - 2]) ) { - DEBUG("broken client (%s), forcing broadcast", + DEBUG("broken client (%s), forcing broadcast replies", broken_vendors[i]); packet->flags |= htons(BROADCAST_FLAG); } @@ -74,7 +74,7 @@ int FAST_FUNC udhcp_recv_kernel_packet(struct dhcpMessage *packet, int fd) if (vendor[OPT_LEN - 2] == (uint8_t)(sizeof("MSFT 98")-1) && memcmp(vendor, "MSFT 98", sizeof("MSFT 98")-1) == 0 ) { - DEBUG("broken client (%s), forcing broadcast", "MSFT 98"); + DEBUG("broken client (%s), forcing broadcast replies", "MSFT 98"); packet->flags |= htons(BROADCAST_FLAG); } #endif -- cgit v1.2.3