/*
* options.c -- DHCP server option packet tools
* Rewrite by Russ Dill <Russ.Dill@asu.edu> July 2001
+ *
+ * Licensed under GPLv2, see file LICENSE in this tarball for details.
*/
#include "common.h"
{ OPTION_STRING , 0x42 }, /* tftp */
{ OPTION_STRING , 0x43 }, /* bootfile */
{ OPTION_STRING , 0x4D }, /* userclass */
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
{ OPTION_STR1035 | OPTION_LIST , 0x77 }, /* search */
#endif
/* MSIE's "Web Proxy Autodiscovery Protocol" support */
"tftp" "\0"
"bootfile" "\0"
"userclass" "\0"
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
"search" "\0"
#endif
/* MSIE's "Web Proxy Autodiscovery Protocol" support */
[OPTION_IP_PAIR] = 8,
[OPTION_BOOLEAN] = 1,
[OPTION_STRING] = 1,
-#if ENABLE_FEATURE_RFC3397
+#if ENABLE_FEATURE_UDHCP_RFC3397
[OPTION_STR1035] = 1,
#endif
[OPTION_U8] = 1,
/* get an option with bounds checking (warning, not aligned). */
-uint8_t *get_option(struct dhcpMessage *packet, int code)
+uint8_t* FAST_FUNC get_option(struct dhcpMessage *packet, int code)
{
int i, length;
uint8_t *optionptr;
/* return the position of the 'end' option (no bounds checking) */
-int end_option(uint8_t *optionptr)
+int FAST_FUNC end_option(uint8_t *optionptr)
{
int i = 0;
/* add an option string to the options (an option string contains an option code,
* length, then data) */
-int add_option_string(uint8_t *optionptr, uint8_t *string)
+int FAST_FUNC add_option_string(uint8_t *optionptr, uint8_t *string)
{
int end = end_option(optionptr);
/* add a one to four byte option to a packet */
-int add_simple_option(uint8_t *optionptr, uint8_t code, uint32_t data)
+int FAST_FUNC add_simple_option(uint8_t *optionptr, uint8_t code, uint32_t data)
{
const struct dhcp_option *dh;