aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/options.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-07-03 18:14:03 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-07-03 18:14:03 +0200
commit97ef65483a40f8622aaa73408dc0909f01ebd118 (patch)
treee5ea5c626bedf51c271c480eedbea0b827b1f5ed /networking/udhcp/options.c
parent7895b91743702497efc179a4fe30808e49c67977 (diff)
downloadbusybox-w32-97ef65483a40f8622aaa73408dc0909f01ebd118.tar.gz
busybox-w32-97ef65483a40f8622aaa73408dc0909f01ebd118.tar.bz2
busybox-w32-97ef65483a40f8622aaa73408dc0909f01ebd118.zip
udhcpc: support option 0x79 (static routes) (part of bug 341)
function old new delta xmalloc_optname_optval - 583 +583 dhcp_option_strings 258 266 +8 dhcp_options 70 72 +2 len_of_option_as_string 11 12 +1 dhcp_option_lengths 11 12 +1 udhcp_run_script 1187 669 -518 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/1 up/down: 595/-518) Total: 77 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/options.c')
-rw-r--r--networking/udhcp/options.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/networking/udhcp/options.c b/networking/udhcp/options.c
index 76d6e3737..ddb894432 100644
--- a/networking/udhcp/options.c
+++ b/networking/udhcp/options.c
@@ -48,6 +48,7 @@ const struct dhcp_option dhcp_options[] = {
48#if ENABLE_FEATURE_UDHCP_RFC3397 48#if ENABLE_FEATURE_UDHCP_RFC3397
49 { OPTION_STR1035 | OPTION_LIST , 0x77 }, /* search */ 49 { OPTION_STR1035 | OPTION_LIST , 0x77 }, /* search */
50#endif 50#endif
51 { OPTION_STATIC_ROUTES , 0x79 }, /* DHCP_STATIC_ROUTES */
51 /* MSIE's "Web Proxy Autodiscovery Protocol" support */ 52 /* MSIE's "Web Proxy Autodiscovery Protocol" support */
52 { OPTION_STRING , 0xfc }, /* wpad */ 53 { OPTION_STRING , 0xfc }, /* wpad */
53 54
@@ -97,6 +98,7 @@ const char dhcp_option_strings[] ALIGN1 =
97#if ENABLE_FEATURE_UDHCP_RFC3397 98#if ENABLE_FEATURE_UDHCP_RFC3397
98 "search" "\0" 99 "search" "\0"
99#endif 100#endif
101 "staticroutes" "\0" /* DHCP_STATIC_ROUTES */
100 /* MSIE's "Web Proxy Autodiscovery Protocol" support */ 102 /* MSIE's "Web Proxy Autodiscovery Protocol" support */
101 "wpad" "\0" 103 "wpad" "\0"
102 ; 104 ;
@@ -116,6 +118,8 @@ const uint8_t dhcp_option_lengths[] ALIGN1 = {
116 [OPTION_S16] = 2, 118 [OPTION_S16] = 2,
117 [OPTION_U32] = 4, 119 [OPTION_U32] = 4,
118 [OPTION_S32] = 4, 120 [OPTION_S32] = 4,
121 /* Just like OPTION_STRING, we use minimum length here */
122 [OPTION_STATIC_ROUTES] = 5,
119}; 123};
120 124
121 125