Lines 126-132
int udhcpc_main(int argc, char *argv[]);
Link Here
|
126 |
int udhcpc_main(int argc, char *argv[]) |
126 |
int udhcpc_main(int argc, char *argv[]) |
127 |
{ |
127 |
{ |
128 |
uint8_t *temp, *message; |
128 |
uint8_t *temp, *message; |
129 |
char *str_c, *str_V, *str_h, *str_F, *str_r, *str_T, *str_t; |
129 |
char *str_c, *str_V, *str_h, *str_F, *str_r, *str_T, *str_t, *str_O; |
130 |
unsigned long t1 = 0, t2 = 0, xid = 0; |
130 |
unsigned long t1 = 0, t2 = 0, xid = 0; |
131 |
unsigned long start = 0, lease = 0; |
131 |
unsigned long start = 0, lease = 0; |
132 |
long now; |
132 |
long now; |
Lines 160-165
int udhcpc_main(int argc, char *argv[])
Link Here
|
160 |
OPT_T = 1 << 15, |
160 |
OPT_T = 1 << 15, |
161 |
OPT_t = 1 << 16, |
161 |
OPT_t = 1 << 16, |
162 |
OPT_v = 1 << 17, |
162 |
OPT_v = 1 << 17, |
|
|
163 |
OPT_O = 1 << 18, |
163 |
}; |
164 |
}; |
164 |
#if ENABLE_GETOPT_LONG |
165 |
#if ENABLE_GETOPT_LONG |
165 |
static const struct option arg_options[] = { |
166 |
static const struct option arg_options[] = { |
Lines 173-178
int udhcpc_main(int argc, char *argv[])
Link Here
|
173 |
{ "fqdn", required_argument, 0, 'F' }, |
174 |
{ "fqdn", required_argument, 0, 'F' }, |
174 |
{ "interface", required_argument, 0, 'i' }, |
175 |
{ "interface", required_argument, 0, 'i' }, |
175 |
{ "now", no_argument, 0, 'n' }, |
176 |
{ "now", no_argument, 0, 'n' }, |
|
|
177 |
{ "request-option", required_argument, 0, 'O' }, |
176 |
{ "pidfile", required_argument, 0, 'p' }, |
178 |
{ "pidfile", required_argument, 0, 'p' }, |
177 |
{ "quit", no_argument, 0, 'q' }, |
179 |
{ "quit", no_argument, 0, 'q' }, |
178 |
{ "release", no_argument, 0, 'R' }, |
180 |
{ "release", no_argument, 0, 'R' }, |
Lines 196-205
int udhcpc_main(int argc, char *argv[])
Link Here
|
196 |
#if ENABLE_GETOPT_LONG |
198 |
#if ENABLE_GETOPT_LONG |
197 |
applet_long_options = arg_options; |
199 |
applet_long_options = arg_options; |
198 |
#endif |
200 |
#endif |
199 |
opt = getopt32(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:v", |
201 |
opt = getopt32(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:vO", |
200 |
&str_c, &str_V, &str_h, &str_h, &str_F, |
202 |
&str_c, &str_V, &str_h, &str_h, &str_F, |
201 |
&client_config.interface, &client_config.pidfile, &str_r, |
203 |
&client_config.interface, &client_config.pidfile, &str_r, |
202 |
&client_config.script, &str_T, &str_t |
204 |
&client_config.script, &str_T, &str_t, &str_O |
203 |
); |
205 |
); |
204 |
|
206 |
|
205 |
if (opt & OPT_c) |
207 |
if (opt & OPT_c) |
Lines 244-249
int udhcpc_main(int argc, char *argv[])
Link Here
|
244 |
if (opt & OPT_v) { |
246 |
if (opt & OPT_v) { |
245 |
printf("version %s\n\n", BB_VER); |
247 |
printf("version %s\n\n", BB_VER); |
246 |
return 0; |
248 |
return 0; |
|
|
249 |
if (opt & OPT_O) |
250 |
if (require_option(str_O)) { |
251 |
printf("Option: %s unknown/not-supported\n", str_O); |
252 |
return 1; |
253 |
} |
247 |
} |
254 |
} |
248 |
|
255 |
|
249 |
/* Start the log, sanitize fd's, and write a pid file */ |
256 |
/* Start the log, sanitize fd's, and write a pid file */ |