99 static struct option dhcp_options[] = {
110 {
"resource-location-servers",
"IA", &
dhcp_universe, 11, 1 },
131 {
"router-solicitation-address",
"I", &
dhcp_universe, 32, 1 },
142 {
"vendor-encapsulated-options",
"E.", &
dhcp_universe, 43, 1 },
154 {
"dhcp-parameter-request-list",
"BA", &
dhcp_universe, 55, 1 },
175 {
"streettalk-directory-assistance-server",
"IA",
182 {
"relay-agent-information",
"Eagent.", &
dhcp_universe, 82, 1 },
197 {
"client-last-transaction-time",
"L", &
dhcp_universe, 91, 1 },
199 #if defined(RFC4578_OPTIONS) 207 #if defined(RFC4776_OPTIONS) 210 #if defined(RFC4833_OPTIONS) 217 #if defined(RFC2563_OPTIONS) 220 #if defined(RFC2937_OPTIONS) 225 {
"classless-static-routes",
"RIA", &
dhcp_universe, 121, 1 },
242 #if defined(RFC5192_OPTIONS) 245 #if defined(RFC5223_OPTIONS) 248 #if defined(RFC5417_OPTIONS) 251 #if defined(RFC6011_OPTIONS) 254 #if defined(RFC6153_OPTIONS) 257 #if defined(RFC6731_OPTIONS) 260 #if defined(RFC5859_OPTIONS) 263 #if defined(RFC7618_OPTIONS) 266 #if defined(RFC7710_OPTIONS) 269 #if defined(RFC5071_OPTIONS) 278 #if defined(RFC5969_OPTIONS) 281 #if defined(RFC5986_OPTIONS) 284 { NULL, NULL, NULL, 0, 0 }
288 static struct option nwip_options[] = {
300 { NULL, NULL, NULL, 0, 0 }
317 static struct option fqdn_options[] = {
326 { NULL, NULL, NULL, 0, 0 }
330 static struct option vendor_class_options[] = {
332 { NULL, NULL, NULL, 0, 0 }
336 static struct option vendor_options[] = {
338 { NULL, NULL, NULL, 0, 0 }
342 static struct option isc_options [] = {
345 { NULL, NULL, NULL, 0, 0 }
349 static struct option dhcpv6_options[] = {
387 {
"auth",
"Nauth-protocol.Nauth-algorithm.Nrdm-type.LLX",
446 #if defined(RFC4776_OPTIONS) 477 {
"fqdn",
"Efqdn6-if-you-see-me-its-a-bug-bug-bug.",
482 #if defined(RFC5192_OPTIONS) 487 #if defined(RFC4833_OPTIONS) 493 #if defined(RFC4994_OPTIONS) 506 #if defined(RFC5223_OPTIONS) 511 #if defined(RFC5417_OPTIONS) 516 #if defined(RFC5460_OPTIONS) 521 #if defined(RFC5986_OPTIONS) 526 #if defined(RFC6011_OPTIONS) 531 #if defined(RFC5970_OPTIONS) 539 #if defined(RFC6334_OPTIONS) 544 #if defined(RFC6440_OPTIONS) 549 #if defined(RFC6731_OPTIONS) 554 #if defined(RFC6939_OPTIONS) 559 #if defined(RFC6977_OPTIONS) 564 #if defined(RFC7083_OPTIONS) 570 #if defined(RFC7341_OPTIONS) 575 #if defined(RFC7710_OPTIONS) 581 #if defined(RFC6153_OPTIONS) 585 { NULL, NULL, NULL, 0, 0 }
605 {
"NoAddrsAvail", 2 },
608 {
"UseMulticast", 5 },
609 {
"NoPrefixAvail", 6 },
610 {
"UnknownQueryType", 7 },
611 {
"MalformedQuery", 8 },
612 {
"NotConfigured", 9 },
613 {
"NotAllowed", 10 },
614 {
"QueryTerminated", 11 },
625 {
"query-by-address", 1 },
626 {
"query-by-clientid", 2 },
627 {
"query-by-relay-id", 3 },
628 {
"query-by-link-address", 4 },
629 {
"query-by-remote-id", 5 },
649 {
"RECONFIGURE", 10 },
650 {
"INFORMATION-REQUEST", 11 },
651 {
"RELAY-FORW", 12 },
652 {
"RELAY-REPL", 13 },
653 {
"LEASEQUERY", 14 },
654 {
"LEASEQUERY-REPLY", 15 },
655 {
"LEASEQUERY-DONE", 16 },
656 {
"LEASEQUERY-DATA", 17 },
657 {
"RECONFIGURE-REQUEST", 18 },
658 {
"RECONFIGURE-REPLY", 19 },
659 {
"DHCPV4-QUERY", 20 },
660 {
"DHCPV4-RESPONSE", 21 },
677 "Information-request",
684 "Reconfigure-request",
694 "dhcpv6-messages", 1,
699 static struct option vsio_options[] = {
701 { NULL, NULL, NULL, 0, 0 }
705 static struct option isc6_options[] = {
710 { NULL, NULL, NULL, 0, 0 }
996 #if defined(POINTER_DEBUG) 997 log_fatal(
"%s(%d): reference store into non-null pointer!",
1017 #if defined (POINTER_DEBUG) 1024 if ((*dest)->refcnt <= 0) {
1025 #if defined (POINTER_DEBUG) 1036 if ((*dest)->refcnt == 0) {
1040 if ((
char *) (*dest)->name != (
char *) ((*dest) + 1))
1046 if (((*dest)->format != NULL) &&
1089 log_fatal(
"Ludicrous initial size option space table.");
1092 log_fatal(
"Can't allocate option space table.");
1120 log_fatal (
"Can't allocate dhcp option hash table.");
1121 for (i = 0 ; dhcp_options[i].
name ; i++) {
1123 &dhcp_options[i].
code, 0,
1124 &dhcp_options[i],
MDL);
1126 dhcp_options [i].
name, 0,
1127 &dhcp_options [i],
MDL);
1129 #if defined(REPORT_HASH_PERFORMANCE) 1159 log_fatal(
"Unable to find NWIP parent option (%s:%d).",
MDL);
1166 log_fatal (
"Can't allocate nwip option hash table.");
1167 for (i = 0 ; nwip_options[i].
name ; i++) {
1169 &nwip_options[i].
code, 0,
1170 &nwip_options[i],
MDL);
1172 nwip_options[i].
name, 0,
1173 &nwip_options[i],
MDL);
1175 #if defined(REPORT_HASH_PERFORMANCE) 1206 log_fatal(
"Unable to find FQDN parent option (%s:%d).",
MDL);
1212 log_fatal (
"Can't allocate fqdn option hash table.");
1213 for (i = 0 ; fqdn_options[i].
name ; i++) {
1215 &fqdn_options[i].
code, 0,
1216 &fqdn_options[i],
MDL);
1218 fqdn_options[i].
name, 0,
1219 &fqdn_options[i],
MDL);
1221 #if defined(REPORT_HASH_PERFORMANCE) 1253 log_fatal(
"Unable to find VIVCO parent option (%s:%d).",
MDL);
1260 log_fatal(
"Can't allocate Vendor Identified Vendor Class " 1261 "option hash table.");
1262 for (i = 0 ; vendor_class_options[i].
name ; i++) {
1264 &vendor_class_options[i].
code, 0,
1265 &vendor_class_options[i],
MDL);
1267 vendor_class_options[i].
name, 0,
1268 &vendor_class_options[i],
MDL);
1270 #if defined(REPORT_HASH_PERFORMANCE) 1300 log_fatal(
"Unable to find VIVSO parent option (%s:%d).",
MDL);
1307 log_fatal(
"Can't allocate Vendor Identified Vendor Sub-" 1308 "options hash table.");
1309 for (i = 0 ; vendor_options[i].
name ; i++) {
1311 &vendor_options[i].
code, 0,
1312 &vendor_options[i],
MDL);
1314 vendor_options[i].
name, 0,
1315 &vendor_options[i],
MDL);
1317 #if defined(REPORT_HASH_PERFORMANCE) 1347 log_fatal(
"Unable to find ISC parent option (%s:%d).",
MDL);
1354 log_fatal(
"Can't allocate ISC Vendor options hash table.");
1355 for (i = 0 ; isc_options[i].
name ; i++) {
1357 &isc_options[i].
code, 0,
1358 &isc_options[i],
MDL);
1360 isc_options[i].
name, 0,
1361 &isc_options[i],
MDL);
1363 #if defined(REPORT_HASH_PERFORMANCE) 1396 log_fatal(
"Can't allocate dhcpv6 option hash tables.");
1397 for (i = 0 ; dhcpv6_options[i].
name ; i++) {
1399 &dhcpv6_options[i].
code, 0,
1400 &dhcpv6_options[i],
MDL);
1402 dhcpv6_options[i].
name, 0,
1403 &dhcpv6_options[i],
MDL);
1434 log_fatal(
"Unable to find VSIO parent option (%s:%d).",
MDL);
1441 log_fatal(
"Can't allocate Vendor Specific Information " 1443 for (i = 0 ; vsio_options[i].
name != NULL ; i++) {
1445 &vsio_options[i].
code, 0,
1446 &vsio_options[i],
MDL);
1448 vsio_options[i].
name, 0,
1449 &vsio_options[i],
MDL);
1475 log_fatal(
"Unable to find ISC parent option (%s:%d).",
MDL);
1482 log_fatal(
"Can't allocate Vendor Specific Information " 1484 for (i = 0 ; isc6_options[i].
name != NULL ; i++) {
1486 &isc6_options[i].
code, 0,
1487 &isc6_options[i],
MDL);
1489 isc6_options[i].
name, 0,
1490 &isc6_options[i],
MDL);
1520 log_fatal(
"Unable to find FQDN v6 parent option. (%s:%d).",
#define rc_register(file, line, reference, addr, refcnt, d, f)
struct enumeration dhcpv6_messages
const char * hardware_types[]
void(* save_func)(struct universe *, struct option_state *, struct option_cache *, isc_boolean_t)
void(* foreach)(struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *, void(*)(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *))
int fqdn6_universe_decode(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *u)
u_int32_t(* get_length)(const unsigned char *)
struct universe fqdn6_universe
struct enumeration_value dhcpv6_status_code_values[]
struct universe isc_universe
#define DHCP_R_INVALIDARG
const char * dhcpv6_type_names[]
int(* option_state_dereference)(struct universe *, struct option_state *, const char *, int)
int option_reference(struct option **dest, struct option *src, const char *file, int line)
void hashed_option_space_foreach(struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct universe *u, void *stuff, void(*func)(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *))
struct universe dhcp_universe
int group_reference(struct group **ptr, struct group *bp, const char *file, int line)
void(* delete_func)(struct universe *universe, struct option_state *, int)
#define WORD_NAME_HASH_SIZE
int linked_option_state_dereference(struct universe *universe, struct option_state *state, const char *file, int line)
struct option_cache *(* lookup_func)(struct universe *, struct option_state *, unsigned)
int linked_option_space_encapsulate(struct data_string *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct universe *universe)
int(* decode)(struct option_state *, const unsigned char *, unsigned, struct universe *)
void log_fatal(const char *,...) __attribute__((__format__(__printf__
#define DHO_NWIP_SUBOPTIONS
struct universe vsio_universe
#define VIV_ISC_HASH_SIZE
universe_hash_t * universe_hash
struct enumeration dhcpv6_status_codes
#define UNIVERSE_HASH_SIZE
void save_fqdn6_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
struct universe * config_universe
struct universe vendor_universe
unsigned do_string_hash(const void *, unsigned, unsigned)
void(* store_length)(unsigned char *, u_int32_t)
int nwip_option_space_encapsulate(struct data_string *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct universe *universe)
struct universe vendor_class_universe
char * default_option_format
#define DHO_VIVSO_SUBOPTIONS
void putULong(unsigned char *, u_int32_t)
int group_dereference(struct group **ptr, const char *file, int line)
option_name_hash_t * name_hash
unsigned do_number_hash(const void *, unsigned, unsigned)
u_int32_t getUShort(const unsigned char *)
void dfree(void *, const char *, int)
void delete_linked_option(struct universe *universe, struct option_state *options, int code)
#define BYTE_NAME_HASH_SIZE
int hashed_option_space_encapsulate(struct data_string *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct universe *universe)
void fqdn6_option_space_foreach(struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct universe *u, void *stuff, void(*func)(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *))
int int log_info(const char *,...) __attribute__((__format__(__printf__
void * dmalloc(size_t, const char *, int)
u_int32_t getULong(const unsigned char *)
#define DHO_VIVCO_SUBOPTIONS
struct option_cache * lookup_linked_option(struct universe *universe, struct option_state *options, unsigned code)
#define WORD_CODE_HASH_SIZE
void delete_fqdn6_option(struct universe *universe, struct option_state *options, int code)
int fqdn6_option_space_encapsulate(struct data_string *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct universe *universe)
void putUChar(unsigned char *, u_int32_t)
struct universe ** universes
u_int32_t getUChar(const unsigned char *)
void initialize_common_option_spaces()
const int dhcpv6_type_name_max
int fqdn_universe_decode(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *u)
void save_hashed_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
struct enumeration_value lq6_query_type_values[]
struct universe dhcpv6_universe
struct enumeration dhcpv6_duid_types
struct option_cache * lookup_hashed_option(struct universe *universe, struct option_state *options, unsigned code)
void delete_hashed_option(struct universe *universe, struct option_state *options, int code)
void add_enumeration(struct enumeration *enumeration)
HASH_FUNCTIONS(group, HASH_FUNCTIONS(const char *, struct group_object, group_hash_t, group_reference, group_dereference, do_string_hash)
int(* encapsulate)(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *)
u_int32_t(* get_tag)(const unsigned char *)
int fqdn_option_space_encapsulate(struct data_string *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct universe *universe)
struct enumeration_value dhcpv6_duid_type_values[]
struct enumeration_value dhcpv6_message_values[]
struct universe isc6_universe
struct universe fqdn_universe
int hashed_option_state_dereference(struct universe *universe, struct option_state *state, const char *file, int line)
option_code_hash_t * code_hash
struct option_cache * lookup_fqdn6_option(struct universe *universe, struct option_state *options, unsigned code)
void putUShort(unsigned char *, u_int32_t)
struct universe nwip_universe
void save_linked_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
unsigned do_case_hash(const void *, unsigned, unsigned)
#define VENDOR_ISC_SUBOPTIONS
void(* store_tag)(unsigned char *, u_int32_t)
void linked_option_space_foreach(struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct universe *u, void *stuff, void(*func)(struct option_cache *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *, void *))
int option_dereference(struct option **dest, const char *file, int line)
struct enumeration lq6_query_types
#define BYTE_CODE_HASH_SIZE
int parse_option_buffer(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *universe)