+ "\t-R,\t--require=NAME\tAdd NAME to request\n" \
"\t-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \
"\t-v,\t--version\tDisplay version"
-
+
Index: networking/udhcp/README.udhcpc
===================================================================
RCS file: /var/cvs/busybox/networking/udhcp/README.udhcpc,v
/usr/share/udhcpc/default.script)
-v, --version Display version
@@ -101,6 +102,8 @@
-
+
additional options are easily added in options.c.
-
+
+By default, only a few basic items are requested. To request additional
+items use the -R option. Example: "-R rootpath"
-
+
note on udhcpc's random seed
---------------------------
Index: networking/udhcp/dhcpc.c
- c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:v", arg_options, &option_index);
+ c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:R:s:v", arg_options, &option_index);
if (c == -1) break;
-
+
switch (c) {
@@ -254,6 +256,11 @@
case 'r':
@@ -57,7 +57,19 @@
[OPTION_S32] = 4
};
-
+
-
+/* find and mark requested item as required */
+int require_option(char *name)
+ }
+ return 1;
+}
-+
++
/* get an option with bounds checking (warning, not aligned). */
uint8_t *get_option(struct dhcpMessage *packet, int code)
{
@@ -30,6 +30,7 @@
extern struct dhcp_option dhcp_options[];
extern int option_lengths[];
-
+
+int require_option(char *name);
uint8_t *get_option(struct dhcpMessage *packet, int code);
int end_option(uint8_t *optionptr);