aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 576b1cbb8..fe8f4c8fa 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -132,7 +132,7 @@ int udhcpc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
132int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv) 132int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
133{ 133{
134 uint8_t *temp, *message; 134 uint8_t *temp, *message;
135 char *str_c, *str_V, *str_h, *str_F, *str_r, *str_T, *str_A, *str_t; 135 char *str_c, *str_V, *str_h, *str_F, *str_r;
136 USE_FEATURE_UDHCP_PORT(char *str_P;) 136 USE_FEATURE_UDHCP_PORT(char *str_P;)
137 llist_t *list_O = NULL; 137 llist_t *list_O = NULL;
138#if ENABLE_FEATURE_UDHCPC_ARPING 138#if ENABLE_FEATURE_UDHCPC_ARPING
@@ -223,7 +223,8 @@ int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
223 client_config.script = DEFAULT_SCRIPT; 223 client_config.script = DEFAULT_SCRIPT;
224 224
225 /* Parse command line */ 225 /* Parse command line */
226 opt_complementary = "c--C:C--c:O::"; // Cc: mutually exclusive; O: list 226 /* Cc: mutually exclusive; O: list; -T,-t,-A take numeric param */
227 opt_complementary = "c--C:C--c:O::T+:t+:A+";
227#if ENABLE_GETOPT_LONG 228#if ENABLE_GETOPT_LONG
228 applet_long_options = udhcpc_longopts; 229 applet_long_options = udhcpc_longopts;
229#endif 230#endif
@@ -233,7 +234,8 @@ int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
233 "O:" 234 "O:"
234 , &str_c, &str_V, &str_h, &str_h, &str_F 235 , &str_c, &str_V, &str_h, &str_h, &str_F
235 , &client_config.interface, &client_config.pidfile, &str_r 236 , &client_config.interface, &client_config.pidfile, &str_r
236 , &client_config.script, &str_T, &str_t, &str_A 237 , &client_config.script
238 , &discover_timeout, &discover_retries, &tryagain_timeout
237 USE_FEATURE_UDHCPC_ARPING(, &str_W) 239 USE_FEATURE_UDHCPC_ARPING(, &str_W)
238 USE_FEATURE_UDHCP_PORT(, &str_P) 240 USE_FEATURE_UDHCP_PORT(, &str_P)
239 , &list_O 241 , &list_O
@@ -273,12 +275,9 @@ int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
273 if (opt & OPT_r) 275 if (opt & OPT_r)
274 requested_ip = inet_addr(str_r); 276 requested_ip = inet_addr(str_r);
275 // if (opt & OPT_s) client_config.script = ... 277 // if (opt & OPT_s) client_config.script = ...
276 if (opt & OPT_T) 278 // if (opt & OPT_T) discover_timeout = xatoi_u(str_T);
277 discover_timeout = xatoi_u(str_T); 279 // if (opt & OPT_t) discover_retries = xatoi_u(str_t);
278 if (opt & OPT_t) 280 // if (opt & OPT_A) tryagain_timeout = xatoi_u(str_A);
279 discover_retries = xatoi_u(str_t);
280 if (opt & OPT_A)
281 tryagain_timeout = xatoi_u(str_A);
282 if (opt & OPT_v) { 281 if (opt & OPT_v) {
283 puts("version "BB_VER); 282 puts("version "BB_VER);
284 return 0; 283 return 0;