summaryrefslogtreecommitdiff
path: root/networking/udhcp/serverpacket.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-05-21 07:05:06 +0000
committerDenis Vlasenko2008-05-21 07:05:06 +0000
commit6de8994440165e2f30c50d2d7c1f332d9cd649bd (patch)
treed1e2794c09b2b73e93e64c84444cb52806498494 /networking/udhcp/serverpacket.c
parent19903f0d447116baef455eddc14458b1dfd1c834 (diff)
downloadbusybox-6de8994440165e2f30c50d2d7c1f332d9cd649bd.zip
busybox-6de8994440165e2f30c50d2d7c1f332d9cd649bd.tar.gz
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 1dc7233..fc62497 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
/* send a dhcp packet, if force broadcast is set, the packet will be broadcast to the client */
static int send_packet(struct dhcpMessage *payload, int force_broadcast)
{
- int ret;
-
if (payload->giaddr)
- ret = send_packet_to_relay(payload);
- else ret = send_packet_to_client(payload, force_broadcast);
- return ret;
+ return send_packet_to_relay(payload);
+ return send_packet_to_client(payload, force_broadcast);
}
@@ -100,7 +97,7 @@ static void add_bootp_options(struct dhcpMessage *packet)
/* send a DHCP OFFER to a DHCP DISCOVER */
-int sendOffer(struct dhcpMessage *oldpacket)
+int send_offer(struct dhcpMessage *oldpacket)
{
struct dhcpMessage packet;
struct dhcpOfferedAddr *lease = NULL;
@@ -188,7 +185,7 @@ int sendOffer(struct dhcpMessage *oldpacket)
}
-int sendNAK(struct dhcpMessage *oldpacket)
+int send_NAK(struct dhcpMessage *oldpacket)
{
struct dhcpMessage packet;
@@ -199,7 +196,7 @@ int sendNAK(struct dhcpMessage *oldpacket)
}
-int sendACK(struct dhcpMessage *oldpacket, uint32_t yiaddr)
+int send_ACK(struct dhcpMessage *oldpacket, uint32_t yiaddr)
{
struct dhcpMessage packet;
struct option_set *curr;