From 9107b63a7fb80fcab0da71cf12e8c81dfc394d20 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 27 Mar 2010 23:23:41 +0100 Subject: udhcp: abort if we see unknown option, and show valid options if so function old new delta udhcp_option_idx - 77 +77 udhcp_str2optset 366 351 -15 udhcpc_main 2845 2801 -44 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 77/-59) Total: 18 bytes Signed-off-by: Denys Vlasenko --- networking/udhcp/common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'networking/udhcp/common.h') diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index b4e8b5d43..1c5afa6f9 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h @@ -169,6 +169,8 @@ extern const struct dhcp_option dhcp_options[]; extern const char dhcp_option_strings[]; extern const uint8_t dhcp_option_lengths[]; +unsigned FAST_FUNC udhcp_option_idx(const char *name); + uint8_t *udhcp_get_option(struct dhcp_packet *packet, int code) FAST_FUNC; int udhcp_end_option(uint8_t *optionptr) FAST_FUNC; void udhcp_add_binary_option(struct dhcp_packet *packet, uint8_t *addopt) FAST_FUNC; -- cgit v1.2.3