diff options
Diffstat (limited to 'patches/udhcp_additional_items.diff')
-rw-r--r-- | patches/udhcp_additional_items.diff | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/patches/udhcp_additional_items.diff b/patches/udhcp_additional_items.diff index 262ccc266..933be2ad4 100644 --- a/patches/udhcp_additional_items.diff +++ b/patches/udhcp_additional_items.diff | |||
@@ -12,7 +12,7 @@ diff -u -r1.191 usage.h | |||
12 | + "\t-R,\t--require=NAME\tAdd NAME to request\n" \ | 12 | + "\t-R,\t--require=NAME\tAdd NAME to request\n" \ |
13 | "\t-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \ | 13 | "\t-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \ |
14 | "\t-v,\t--version\tDisplay version" | 14 | "\t-v,\t--version\tDisplay version" |
15 | 15 | ||
16 | Index: networking/udhcp/README.udhcpc | 16 | Index: networking/udhcp/README.udhcpc |
17 | =================================================================== | 17 | =================================================================== |
18 | RCS file: /var/cvs/busybox/networking/udhcp/README.udhcpc,v | 18 | RCS file: /var/cvs/busybox/networking/udhcp/README.udhcpc,v |
@@ -29,12 +29,12 @@ diff -u -r1.3 README.udhcpc | |||
29 | /usr/share/udhcpc/default.script) | 29 | /usr/share/udhcpc/default.script) |
30 | -v, --version Display version | 30 | -v, --version Display version |
31 | @@ -101,6 +102,8 @@ | 31 | @@ -101,6 +102,8 @@ |
32 | 32 | ||
33 | additional options are easily added in options.c. | 33 | additional options are easily added in options.c. |
34 | 34 | ||
35 | +By default, only a few basic items are requested. To request additional | 35 | +By default, only a few basic items are requested. To request additional |
36 | +items use the -R option. Example: "-R rootpath" | 36 | +items use the -R option. Example: "-R rootpath" |
37 | 37 | ||
38 | note on udhcpc's random seed | 38 | note on udhcpc's random seed |
39 | --------------------------- | 39 | --------------------------- |
40 | Index: networking/udhcp/dhcpc.c | 40 | Index: networking/udhcp/dhcpc.c |
@@ -67,7 +67,7 @@ diff -u -r1.16 dhcpc.c | |||
67 | - c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:v", arg_options, &option_index); | 67 | - c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:v", arg_options, &option_index); |
68 | + c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:R:s:v", arg_options, &option_index); | 68 | + c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:R:s:v", arg_options, &option_index); |
69 | if (c == -1) break; | 69 | if (c == -1) break; |
70 | 70 | ||
71 | switch (c) { | 71 | switch (c) { |
72 | @@ -254,6 +256,11 @@ | 72 | @@ -254,6 +256,11 @@ |
73 | case 'r': | 73 | case 'r': |
@@ -91,7 +91,7 @@ diff -u -r1.7 options.c | |||
91 | @@ -57,7 +57,19 @@ | 91 | @@ -57,7 +57,19 @@ |
92 | [OPTION_S32] = 4 | 92 | [OPTION_S32] = 4 |
93 | }; | 93 | }; |
94 | 94 | ||
95 | - | 95 | - |
96 | +/* find and mark requested item as required */ | 96 | +/* find and mark requested item as required */ |
97 | +int require_option(char *name) | 97 | +int require_option(char *name) |
@@ -105,7 +105,7 @@ diff -u -r1.7 options.c | |||
105 | + } | 105 | + } |
106 | + return 1; | 106 | + return 1; |
107 | +} | 107 | +} |
108 | + | 108 | + |
109 | /* get an option with bounds checking (warning, not aligned). */ | 109 | /* get an option with bounds checking (warning, not aligned). */ |
110 | uint8_t *get_option(struct dhcpMessage *packet, int code) | 110 | uint8_t *get_option(struct dhcpMessage *packet, int code) |
111 | { | 111 | { |
@@ -119,7 +119,7 @@ diff -u -r1.5 options.h | |||
119 | @@ -30,6 +30,7 @@ | 119 | @@ -30,6 +30,7 @@ |
120 | extern struct dhcp_option dhcp_options[]; | 120 | extern struct dhcp_option dhcp_options[]; |
121 | extern int option_lengths[]; | 121 | extern int option_lengths[]; |
122 | 122 | ||
123 | +int require_option(char *name); | 123 | +int require_option(char *name); |
124 | uint8_t *get_option(struct dhcpMessage *packet, int code); | 124 | uint8_t *get_option(struct dhcpMessage *packet, int code); |
125 | int end_option(uint8_t *optionptr); | 125 | int end_option(uint8_t *optionptr); |