options.c: Conditionalize some functions to only be compiled for ndhs, as

ndhc does not use them.
This commit is contained in:
Nicholas J. Kain 2014-03-19 06:00:45 -04:00
parent 861ab28186
commit 89d4649439
2 changed files with 4 additions and 0 deletions

View File

@ -241,6 +241,7 @@ size_t add_option_request_list(struct dhcpmsg *packet)
(char *)reqdata, sizeof reqdata); (char *)reqdata, sizeof reqdata);
} }
#ifdef NDHS_BUILD
size_t add_option_domain_name(struct dhcpmsg *packet, const char *dom, size_t add_option_domain_name(struct dhcpmsg *packet, const char *dom,
size_t domlen) size_t domlen)
{ {
@ -256,6 +257,7 @@ void add_option_broadcast(struct dhcpmsg *packet, uint32_t bc)
{ {
add_u32_option(packet, DCODE_BROADCAST, bc); add_u32_option(packet, DCODE_BROADCAST, bc);
} }
#endif
void add_option_msgtype(struct dhcpmsg *packet, uint8_t type) void add_option_msgtype(struct dhcpmsg *packet, uint8_t type)
{ {

View File

@ -65,10 +65,12 @@ size_t add_option_string(struct dhcpmsg *packet, uint8_t code, const char *str,
size_t add_u32_option(struct dhcpmsg *packet, uint8_t code, uint32_t data); size_t add_u32_option(struct dhcpmsg *packet, uint8_t code, uint32_t data);
size_t add_option_request_list(struct dhcpmsg *packet); size_t add_option_request_list(struct dhcpmsg *packet);
#ifdef NDHS_BUILD
size_t add_option_domain_name(struct dhcpmsg *packet, const char *dom, size_t add_option_domain_name(struct dhcpmsg *packet, const char *dom,
size_t domlen); size_t domlen);
void add_option_subnet_mask(struct dhcpmsg *packet, uint32_t subnet); void add_option_subnet_mask(struct dhcpmsg *packet, uint32_t subnet);
void add_option_broadcast(struct dhcpmsg *packet, uint32_t bc); void add_option_broadcast(struct dhcpmsg *packet, uint32_t bc);
#endif
void add_option_msgtype(struct dhcpmsg *packet, uint8_t type); void add_option_msgtype(struct dhcpmsg *packet, uint8_t type);
void add_option_reqip(struct dhcpmsg *packet, uint32_t ip); void add_option_reqip(struct dhcpmsg *packet, uint32_t ip);
void add_option_serverid(struct dhcpmsg *packet, uint32_t sid); void add_option_serverid(struct dhcpmsg *packet, uint32_t sid);