udhcp: optionally support RFC3397 (by Gabriel L. Somlo <somlo@cmu.edu>)

This commit is contained in:
Denis Vlasenko
2007-02-27 21:15:08 +00:00
parent 966bb43766
commit 5066473d41
6 changed files with 77 additions and 21 deletions

View File

@@ -9,6 +9,9 @@ enum {
OPTION_IP=1,
OPTION_IP_PAIR,
OPTION_STRING,
#if ENABLE_FEATURE_RFC3397
OPTION_STR1035, /* RFC1035 compressed domain name list */
#endif
OPTION_BOOLEAN,
OPTION_U8,
OPTION_U16,
@@ -33,5 +36,9 @@ uint8_t *get_option(struct dhcpMessage *packet, int code);
int end_option(uint8_t *optionptr);
int add_option_string(uint8_t *optionptr, uint8_t *string);
int add_simple_option(uint8_t *optionptr, uint8_t code, uint32_t data);
#if ENABLE_FEATURE_RFC3397
char *dname_dec(const uint8_t *cstr, int clen, const char *pre);
uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen);
#endif
#endif