Update get_option() to use the function from busybox's udhcp variant;

it's much easier to read.  The original one is indecipherable, and thus
it is difficult to verify correctness.
This commit is contained in:
Nicholas J. Kain
2010-11-14 03:41:36 -05:00
parent 1ffd1d9df3
commit 5a38e49a81
3 changed files with 58 additions and 51 deletions

View File

@@ -30,7 +30,7 @@ struct dhcp_option {
extern struct dhcp_option options[];
extern int option_lengths[];
unsigned char *get_option(struct dhcpMessage *packet, int code);
uint8_t *get_option(struct dhcpMessage *packet, int code);
int end_option(unsigned char *optionptr);
int add_option_string(unsigned char *optionptr, unsigned char *string);
int add_simple_option(unsigned char *optionptr, unsigned char code, uint32_t data);