diff options
Diffstat (limited to 'networking/udhcp/common.h')
-rw-r--r-- | networking/udhcp/common.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index ad6991c94..a7f9395b8 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
@@ -88,6 +88,7 @@ enum { | |||
88 | OPTION_S32, | 88 | OPTION_S32, |
89 | OPTION_BIN, | 89 | OPTION_BIN, |
90 | OPTION_STATIC_ROUTES, | 90 | OPTION_STATIC_ROUTES, |
91 | OPTION_6RD, | ||
91 | #if ENABLE_FEATURE_UDHCP_RFC3397 | 92 | #if ENABLE_FEATURE_UDHCP_RFC3397 |
92 | OPTION_DNS_STRING, /* RFC1035 compressed domain name list */ | 93 | OPTION_DNS_STRING, /* RFC1035 compressed domain name list */ |
93 | OPTION_SIP_SERVERS, | 94 | OPTION_SIP_SERVERS, |
@@ -103,7 +104,7 @@ enum { | |||
103 | /* DHCP option codes (partial list). See RFC 2132 and | 104 | /* DHCP option codes (partial list). See RFC 2132 and |
104 | * http://www.iana.org/assignments/bootp-dhcp-parameters/ | 105 | * http://www.iana.org/assignments/bootp-dhcp-parameters/ |
105 | * Commented out options are handled by common option machinery, | 106 | * Commented out options are handled by common option machinery, |
106 | * uncommented ones have spacial cases (grep for them to see). | 107 | * uncommented ones have special cases (grep for them to see). |
107 | */ | 108 | */ |
108 | #define DHCP_PADDING 0x00 | 109 | #define DHCP_PADDING 0x00 |
109 | #define DHCP_SUBNET 0x01 | 110 | #define DHCP_SUBNET 0x01 |
@@ -248,6 +249,7 @@ struct option_set *udhcp_find_option(struct option_set *opt_list, uint8_t code) | |||
248 | /*** Logging ***/ | 249 | /*** Logging ***/ |
249 | 250 | ||
250 | #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1 | 251 | #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1 |
252 | # define IF_UDHCP_VERBOSE(...) __VA_ARGS__ | ||
251 | extern unsigned dhcp_verbose; | 253 | extern unsigned dhcp_verbose; |
252 | # define log1(...) do { if (dhcp_verbose >= 1) bb_info_msg(__VA_ARGS__); } while (0) | 254 | # define log1(...) do { if (dhcp_verbose >= 1) bb_info_msg(__VA_ARGS__); } while (0) |
253 | # if CONFIG_UDHCP_DEBUG >= 2 | 255 | # if CONFIG_UDHCP_DEBUG >= 2 |
@@ -263,6 +265,7 @@ void udhcp_dump_packet(struct dhcp_packet *packet) FAST_FUNC; | |||
263 | # define log3(...) ((void)0) | 265 | # define log3(...) ((void)0) |
264 | # endif | 266 | # endif |
265 | #else | 267 | #else |
268 | # define IF_UDHCP_VERBOSE(...) | ||
266 | # define udhcp_dump_packet(...) ((void)0) | 269 | # define udhcp_dump_packet(...) ((void)0) |
267 | # define log1(...) ((void)0) | 270 | # define log1(...) ((void)0) |
268 | # define log2(...) ((void)0) | 271 | # define log2(...) ((void)0) |
@@ -277,8 +280,6 @@ int FAST_FUNC udhcp_str2nip(const char *str, void *arg); | |||
277 | /* 2nd param is "struct option_set**" */ | 280 | /* 2nd param is "struct option_set**" */ |
278 | int FAST_FUNC udhcp_str2optset(const char *str, void *arg); | 281 | int FAST_FUNC udhcp_str2optset(const char *str, void *arg); |
279 | 282 | ||
280 | uint16_t udhcp_checksum(void *addr, int count) FAST_FUNC; | ||
281 | |||
282 | void udhcp_init_header(struct dhcp_packet *packet, char type) FAST_FUNC; | 283 | void udhcp_init_header(struct dhcp_packet *packet, char type) FAST_FUNC; |
283 | 284 | ||
284 | int udhcp_recv_kernel_packet(struct dhcp_packet *packet, int fd) FAST_FUNC; | 285 | int udhcp_recv_kernel_packet(struct dhcp_packet *packet, int fd) FAST_FUNC; |