aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/common.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-12-20 21:11:38 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-12-20 21:11:38 +0000
commitfff145dba309df2a6ba2986ad2b690f7e0858cad (patch)
treeddd42dcde1f1d52b477c63d2c85e6f1f1f075bda /networking/udhcp/common.h
parentf77f369ce89549ae3b0b70bfbac4e9c242ec5298 (diff)
downloadbusybox-w32-fff145dba309df2a6ba2986ad2b690f7e0858cad.tar.gz
busybox-w32-fff145dba309df2a6ba2986ad2b690f7e0858cad.tar.bz2
busybox-w32-fff145dba309df2a6ba2986ad2b690f7e0858cad.zip
udhcp: fix oversized packet sending (introduced by "slack for bad dhcp servers" options);
slight optimizations and function renaming udhcp_send_raw_packet - 391 +391 udhcp_send_kernel_packet - 197 +197 udhcp_recv_packet - 134 +134 get_raw_packet 353 326 -27 udhcp_get_packet 134 - -134 udhcp_kernel_packet 197 - -197 udhcp_raw_packet 391 - -391 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 0/1 up/down: 722/-749) Total: -27 bytes
Diffstat (limited to 'networking/udhcp/common.h')
-rw-r--r--networking/udhcp/common.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
index 55782b51b..38ede0124 100644
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -54,14 +54,16 @@ struct BUG_bad_sizeof_struct_udp_dhcp_packet {
54 [(sizeof(struct udp_dhcp_packet) != 576 + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS) ? -1 : 1]; 54 [(sizeof(struct udp_dhcp_packet) != 576 + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS) ? -1 : 1];
55}; 55};
56 56
57void udhcp_init_header(struct dhcpMessage *packet, char type);
58int udhcp_get_packet(struct dhcpMessage *packet, int fd);
59uint16_t udhcp_checksum(void *addr, int count); 57uint16_t udhcp_checksum(void *addr, int count);
60int udhcp_raw_packet(struct dhcpMessage *payload, 58
59void udhcp_init_header(struct dhcpMessage *packet, char type);
60
61int udhcp_recv_packet(struct dhcpMessage *packet, int fd);
62int udhcp_send_raw_packet(struct dhcpMessage *payload,
61 uint32_t source_ip, int source_port, 63 uint32_t source_ip, int source_port,
62 uint32_t dest_ip, int dest_port, 64 uint32_t dest_ip, int dest_port,
63 const uint8_t *dest_arp, int ifindex); 65 const uint8_t *dest_arp, int ifindex);
64int udhcp_kernel_packet(struct dhcpMessage *payload, 66int udhcp_send_kernel_packet(struct dhcpMessage *payload,
65 uint32_t source_ip, int source_port, 67 uint32_t source_ip, int source_port,
66 uint32_t dest_ip, int dest_port); 68 uint32_t dest_ip, int dest_port);
67 69