aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/udhcp/d6_dhcpc.c19
-rw-r--r--networking/udhcp/dhcpc.c3
2 files changed, 9 insertions, 13 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 62d79b363..5c98e82f1 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -38,7 +38,7 @@
38 38
39 39
40#if ENABLE_LONG_OPTS 40#if ENABLE_LONG_OPTS
41static const char udhcpc_longopts[] ALIGN1 = 41static const char udhcpc6_longopts[] ALIGN1 =
42 "interface\0" Required_argument "i" 42 "interface\0" Required_argument "i"
43 "now\0" No_argument "n" 43 "now\0" No_argument "n"
44 "pidfile\0" Required_argument "p" 44 "pidfile\0" Required_argument "p"
@@ -47,7 +47,6 @@ static const char udhcpc_longopts[] ALIGN1 =
47 "request\0" Required_argument "r" 47 "request\0" Required_argument "r"
48 "script\0" Required_argument "s" 48 "script\0" Required_argument "s"
49 "timeout\0" Required_argument "T" 49 "timeout\0" Required_argument "T"
50 "version\0" No_argument "v"
51 "retries\0" Required_argument "t" 50 "retries\0" Required_argument "t"
52 "tryagain\0" Required_argument "A" 51 "tryagain\0" Required_argument "A"
53 "syslog\0" No_argument "S" 52 "syslog\0" No_argument "S"
@@ -55,7 +54,6 @@ static const char udhcpc_longopts[] ALIGN1 =
55 "no-default-options\0" No_argument "o" 54 "no-default-options\0" No_argument "o"
56 "foreground\0" No_argument "f" 55 "foreground\0" No_argument "f"
57 "background\0" No_argument "b" 56 "background\0" No_argument "b"
58 "broadcast\0" No_argument "B"
59/// IF_FEATURE_UDHCPC_ARPING("arping\0" No_argument "a") 57/// IF_FEATURE_UDHCPC_ARPING("arping\0" No_argument "a")
60 IF_FEATURE_UDHCP_PORT("client-port\0" Required_argument "P") 58 IF_FEATURE_UDHCP_PORT("client-port\0" Required_argument "P")
61 ; 59 ;
@@ -77,9 +75,8 @@ enum {
77 OPT_o = 1 << 12, 75 OPT_o = 1 << 12,
78 OPT_x = 1 << 13, 76 OPT_x = 1 << 13,
79 OPT_f = 1 << 14, 77 OPT_f = 1 << 14,
80 OPT_B = 1 << 15,
81/* The rest has variable bit positions, need to be clever */ 78/* The rest has variable bit positions, need to be clever */
82 OPTBIT_B = 15, 79 OPTBIT_f = 14,
83 USE_FOR_MMU( OPTBIT_b,) 80 USE_FOR_MMU( OPTBIT_b,)
84 ///IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,) 81 ///IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
85 IF_FEATURE_UDHCP_PORT( OPTBIT_P,) 82 IF_FEATURE_UDHCP_PORT( OPTBIT_P,)
@@ -751,7 +748,7 @@ static void client_background(void)
751//usage:# define IF_UDHCP_VERBOSE(...) 748//usage:# define IF_UDHCP_VERBOSE(...)
752//usage:#endif 749//usage:#endif
753//usage:#define udhcpc6_trivial_usage 750//usage:#define udhcpc6_trivial_usage
754//usage: "[-fbnq"IF_UDHCP_VERBOSE("v")"oRB] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]\n" 751//usage: "[-fbnq"IF_UDHCP_VERBOSE("v")"oR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]\n"
755//usage: " [-x OPT:VAL]... [-O OPT]..." IF_FEATURE_UDHCP_PORT(" [-P N]") 752//usage: " [-x OPT:VAL]... [-O OPT]..." IF_FEATURE_UDHCP_PORT(" [-P N]")
756//usage:#define udhcpc6_full_usage "\n" 753//usage:#define udhcpc6_full_usage "\n"
757//usage: IF_LONG_OPTS( 754//usage: IF_LONG_OPTS(
@@ -771,7 +768,7 @@ static void client_background(void)
771//usage: "\n -R,--release Release IP on exit" 768//usage: "\n -R,--release Release IP on exit"
772//usage: "\n -S,--syslog Log to syslog too" 769//usage: "\n -S,--syslog Log to syslog too"
773//usage: IF_FEATURE_UDHCP_PORT( 770//usage: IF_FEATURE_UDHCP_PORT(
774//usage: "\n -P,--client-port N Use port N (default 68)" 771//usage: "\n -P,--client-port N Use port N (default 546)"
775//usage: ) 772//usage: )
776////usage: IF_FEATURE_UDHCPC_ARPING( 773////usage: IF_FEATURE_UDHCPC_ARPING(
777////usage: "\n -a,--arping Use arping to validate offered address" 774////usage: "\n -a,--arping Use arping to validate offered address"
@@ -805,7 +802,7 @@ static void client_background(void)
805//usage: "\n -R Release IP on exit" 802//usage: "\n -R Release IP on exit"
806//usage: "\n -S Log to syslog too" 803//usage: "\n -S Log to syslog too"
807//usage: IF_FEATURE_UDHCP_PORT( 804//usage: IF_FEATURE_UDHCP_PORT(
808//usage: "\n -P N Use port N (default 68)" 805//usage: "\n -P N Use port N (default 546)"
809//usage: ) 806//usage: )
810////usage: IF_FEATURE_UDHCPC_ARPING( 807////usage: IF_FEATURE_UDHCPC_ARPING(
811////usage: "\n -a Use arping to validate offered address" 808////usage: "\n -a Use arping to validate offered address"
@@ -859,8 +856,8 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
859 /* Parse command line */ 856 /* Parse command line */
860 /* O,x: list; -T,-t,-A take numeric param */ 857 /* O,x: list; -T,-t,-A take numeric param */
861 opt_complementary = "O::x::T+:t+:A+" IF_UDHCP_VERBOSE(":vv") ; 858 opt_complementary = "O::x::T+:t+:A+" IF_UDHCP_VERBOSE(":vv") ;
862 IF_LONG_OPTS(applet_long_options = udhcpc_longopts;) 859 IF_LONG_OPTS(applet_long_options = udhcpc6_longopts;)
863 opt = getopt32(argv, "i:np:qRr:s:T:t:SA:O:ox:fB" 860 opt = getopt32(argv, "i:np:qRr:s:T:t:SA:O:ox:f"
864 USE_FOR_MMU("b") 861 USE_FOR_MMU("b")
865 ///IF_FEATURE_UDHCPC_ARPING("a") 862 ///IF_FEATURE_UDHCPC_ARPING("a")
866 IF_FEATURE_UDHCP_PORT("P:") 863 IF_FEATURE_UDHCP_PORT("P:")
@@ -872,7 +869,7 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
872 , &list_x 869 , &list_x
873 IF_FEATURE_UDHCP_PORT(, &str_P) 870 IF_FEATURE_UDHCP_PORT(, &str_P)
874 IF_UDHCP_VERBOSE(, &dhcp_verbose) 871 IF_UDHCP_VERBOSE(, &dhcp_verbose)
875 ); 872 );
876 requested_ipv6 = NULL; 873 requested_ipv6 = NULL;
877 if (opt & OPT_r) { 874 if (opt & OPT_r) {
878 if (inet_pton(AF_INET6, str_r, &ipv6_buf) <= 0) 875 if (inet_pton(AF_INET6, str_r, &ipv6_buf) <= 0)
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 3a4ef9e64..3c4e8dee1 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -46,7 +46,6 @@ static const char udhcpc_longopts[] ALIGN1 =
46 "request\0" Required_argument "r" 46 "request\0" Required_argument "r"
47 "script\0" Required_argument "s" 47 "script\0" Required_argument "s"
48 "timeout\0" Required_argument "T" 48 "timeout\0" Required_argument "T"
49 "version\0" No_argument "v"
50 "retries\0" Required_argument "t" 49 "retries\0" Required_argument "t"
51 "tryagain\0" Required_argument "A" 50 "tryagain\0" Required_argument "A"
52 "syslog\0" No_argument "S" 51 "syslog\0" No_argument "S"
@@ -1183,7 +1182,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1183 , &list_x 1182 , &list_x
1184 IF_FEATURE_UDHCP_PORT(, &str_P) 1183 IF_FEATURE_UDHCP_PORT(, &str_P)
1185 IF_UDHCP_VERBOSE(, &dhcp_verbose) 1184 IF_UDHCP_VERBOSE(, &dhcp_verbose)
1186 ); 1185 );
1187 if (opt & (OPT_h|OPT_H)) { 1186 if (opt & (OPT_h|OPT_H)) {
1188 //msg added 2011-11 1187 //msg added 2011-11
1189 bb_error_msg("option -h NAME is deprecated, use -x hostname:NAME"); 1188 bb_error_msg("option -h NAME is deprecated, use -x hostname:NAME");