aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/serverpacket.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-21 07:05:06 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-21 07:05:06 +0000
commit6de8994440165e2f30c50d2d7c1f332d9cd649bd (patch)
treed1e2794c09b2b73e93e64c84444cb52806498494 /networking/udhcp/serverpacket.c
parent19903f0d447116baef455eddc14458b1dfd1c834 (diff)
downloadbusybox-w32-6de8994440165e2f30c50d2d7c1f332d9cd649bd.tar.gz
busybox-w32-6de8994440165e2f30c50d2d7c1f332d9cd649bd.tar.bz2
busybox-w32-6de8994440165e2f30c50d2d7c1f332d9cd649bd.zip
udhcpc: regularize the names of receiving functions,
pause on "serious failure to receive". Some misc fixes are also folded in here.
Diffstat (limited to 'networking/udhcp/serverpacket.c')
-rw-r--r--networking/udhcp/serverpacket.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/networking/udhcp/serverpacket.c b/networking/udhcp/serverpacket.c
index 1dc7233f2..fc6249725 100644
--- a/networking/udhcp/serverpacket.c
+++ b/networking/udhcp/serverpacket.c
@@ -67,12 +67,9 @@ static int send_packet_to_client(struct dhcpMessage *payload, int force_broadcas
67/* send a dhcp packet, if force broadcast is set, the packet will be broadcast to the client */ 67/* send a dhcp packet, if force broadcast is set, the packet will be broadcast to the client */
68static int send_packet(struct dhcpMessage *payload, int force_broadcast) 68static int send_packet(struct dhcpMessage *payload, int force_broadcast)
69{ 69{
70 int ret;
71
72 if (payload->giaddr) 70 if (payload->giaddr)
73 ret = send_packet_to_relay(payload); 71 return send_packet_to_relay(payload);
74 else ret = send_packet_to_client(payload, force_broadcast); 72 return send_packet_to_client(payload, force_broadcast);
75 return ret;
76} 73}
77 74
78 75
@@ -100,7 +97,7 @@ static void add_bootp_options(struct dhcpMessage *packet)
100 97
101 98
102/* send a DHCP OFFER to a DHCP DISCOVER */ 99/* send a DHCP OFFER to a DHCP DISCOVER */
103int sendOffer(struct dhcpMessage *oldpacket) 100int send_offer(struct dhcpMessage *oldpacket)
104{ 101{
105 struct dhcpMessage packet; 102 struct dhcpMessage packet;
106 struct dhcpOfferedAddr *lease = NULL; 103 struct dhcpOfferedAddr *lease = NULL;
@@ -188,7 +185,7 @@ int sendOffer(struct dhcpMessage *oldpacket)
188} 185}
189 186
190 187
191int sendNAK(struct dhcpMessage *oldpacket) 188int send_NAK(struct dhcpMessage *oldpacket)
192{ 189{
193 struct dhcpMessage packet; 190 struct dhcpMessage packet;
194 191
@@ -199,7 +196,7 @@ int sendNAK(struct dhcpMessage *oldpacket)
199} 196}
200 197
201 198
202int sendACK(struct dhcpMessage *oldpacket, uint32_t yiaddr) 199int send_ACK(struct dhcpMessage *oldpacket, uint32_t yiaddr)
203{ 200{
204 struct dhcpMessage packet; 201 struct dhcpMessage packet;
205 struct option_set *curr; 202 struct option_set *curr;