aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/common.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-07 01:05:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-07 01:05:47 +0000
commitfbd2918f5c91723063ed698026217a77a0fe565b (patch)
treecddfe351592f4a876232cf4c67c23df25bf0563c /networking/udhcp/common.h
parentbb5b01c7c711dd9ffc2abf23a05ccdfbf7fc0325 (diff)
downloadbusybox-fbd2918f5c91723063ed698026217a77a0fe565b.tar.gz
udhcp: MAC_BCAST_ADDR and blank_chaddr are in fact constant, move to rodata.
a few global variables reduced to smallints function old new delta add_lease 75 227 +152 static.blank_chaddr - 16 +16 MAC_BCAST_ADDR - 6 +6 sockfd 4 8 +4 udhcp_run_script 1153 1155 +2 state 8 5 -3 listen_mode 4 1 -3 perform_release 152 148 -4 fd 8 4 -4 blank_chaddr 16 - -16 udhcpc_main 2518 2497 -21 .rodata 131864 131832 -32 oldest_expired_lease 61 - -61 clear_lease 127 - -127 ------------------------------------------------------------------------------ (add/remove: 2/3 grow/shrink: 3/6 up/down: 180/-271) Total: -91 bytes
Diffstat (limited to 'networking/udhcp/common.h')
-rw-r--r--networking/udhcp/common.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
index 00890ac1c..6c0db5b4c 100644
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -14,8 +14,7 @@
#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
-#define COMBINED_BINARY
-
+extern const uint8_t MAC_BCAST_ADDR[6]; /* six all-ones */
/*** packet.h ***/
@@ -52,7 +51,8 @@ int udhcp_get_packet(struct dhcpMessage *packet, int fd);
uint16_t udhcp_checksum(void *addr, int count);
int udhcp_raw_packet(struct dhcpMessage *payload,
uint32_t source_ip, int source_port,
- uint32_t dest_ip, int dest_port, uint8_t *dest_arp, int ifindex);
+ uint32_t dest_ip, int dest_port,
+ const uint8_t *dest_arp, int ifindex);
int udhcp_kernel_packet(struct dhcpMessage *payload,
uint32_t source_ip, int source_port,
uint32_t dest_ip, int dest_port);