diff --git a/ndhc/options.c b/ndhc/options.c index ec573b3..e887da9 100644 --- a/ndhc/options.c +++ b/ndhc/options.c @@ -237,17 +237,6 @@ int add_simple_option(unsigned char *optionptr, unsigned char code, return add_option_string(optionptr, option); } -/* find option 'code' in opt_list */ -struct option_set *find_option(struct option_set *opt_list, char code) -{ - while (opt_list && opt_list->data[OPT_CODE] < code) - opt_list = opt_list->next; - - if (opt_list && opt_list->data[OPT_CODE] == code) - return opt_list; - return NULL; -} - // List of options that will be sent on the parameter request list to the // remote DHCP server. static unsigned char req_opts[] = { diff --git a/ndhc/options.h b/ndhc/options.h index ca8fa59..4c5a22c 100644 --- a/ndhc/options.h +++ b/ndhc/options.h @@ -67,11 +67,6 @@ struct dhcp_option { unsigned char code; }; -struct option_set { - unsigned char *data; - struct option_set *next; -}; - extern struct dhcp_option options[]; extern int option_lengths[]; @@ -88,7 +83,6 @@ uint8_t *get_option(struct dhcpMessage *packet, int code); int end_option(uint8_t *optionptr); int add_option_string(unsigned char *optionptr, unsigned char *string); int add_simple_option(unsigned char *optionptr, unsigned char code, uint32_t data); -struct option_set *find_option(struct option_set *opt_list, char code); void add_requests(struct dhcpMessage *packet);