From e5ce91b41b657a0dbd1db442ebc47f4c935e7d1f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 21 Mar 2010 00:43:11 +0100 Subject: udhcp: code shrink; disable time and log server options function old new delta add_server_options - 100 +100 udhcp_add_simple_option 92 90 -2 nobody_responds_to_arp 88 85 -3 dhcp_options 66 62 -4 udhcp_add_option_string 104 94 -10 udhcp_run_script 665 654 -11 dhcp_option_strings 203 188 -15 static.blank_chaddr 16 - -16 send_ACK 211 180 -31 add_bootp_options 61 - -61 udhcpd_main 1925 1846 -79 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 0/8 up/down: 100/-232) Total: -132 bytes Signed-off-by: Denys Vlasenko --- networking/udhcp/common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'networking/udhcp/common.h') diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index e88cfb1c7..d7c874e5b 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h @@ -44,6 +44,10 @@ struct dhcp_packet { uint32_t cookie; /* fixed first four option bytes (99,130,83,99 dec) */ uint8_t options[DHCP_OPTIONS_BUFSIZE + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS]; } PACKED; +#define DHCP_PKT_SNAME_LEN 64 +#define DHCP_PKT_FILE_LEN 128 +#define DHCP_PKT_SNAME_LEN_STR "64" +#define DHCP_PKT_FILE_LEN_STR "128" struct ip_udp_dhcp_packet { struct iphdr ip; -- cgit v1.2.3