95 static struct option dhcp_options[] = {
106 {
"resource-location-servers",
"IA", &
dhcp_universe, 11, 1 },
127 {
"router-solicitation-address",
"I", &
dhcp_universe, 32, 1 },
138 {
"vendor-encapsulated-options",
"E.", &
dhcp_universe, 43, 1 },
150 {
"dhcp-parameter-request-list",
"BA", &
dhcp_universe, 55, 1 },
171 {
"streettalk-directory-assistance-server",
"IA",
178 {
"relay-agent-information",
"Eagent.", &
dhcp_universe, 82, 1 },
193 {
"client-last-transaction-time",
"L", &
dhcp_universe, 91, 1 },
203 #if defined(RFC4776_OPTIONS) 206 #if defined(RFC4833_OPTIONS) 213 #if defined(RFC2563_OPTIONS) 216 #if defined(RFC2937_OPTIONS) 221 {
"classless-static-routes",
"RIA", &
dhcp_universe, 121, 1 },
238 #if defined(RFC5192_OPTIONS) 241 #if defined(RFC5223_OPTIONS) 244 #if defined(RFC5417_OPTIONS) 247 #if defined(RFC6011_OPTIONS) 250 #if defined(RFC6153_OPTIONS) 253 #if defined(RFC6731_OPTIONS) 260 #if defined(RFC7618_OPTIONS) 263 #if defined(RFC7710_OPTIONS) 273 #if defined(RFC5969_OPTIONS) 276 #if defined(RFC5986_OPTIONS) 279 { NULL, NULL, NULL, 0, 0 }
283 static struct option nwip_options[] = {
295 { NULL, NULL, NULL, 0, 0 }
312 static struct option fqdn_options[] = {
321 { NULL, NULL, NULL, 0, 0 }
325 static struct option vendor_class_options[] = {
327 { NULL, NULL, NULL, 0, 0 }
331 static struct option vendor_options[] = {
333 { NULL, NULL, NULL, 0, 0 }
337 static struct option isc_options [] = {
340 { NULL, NULL, NULL, 0, 0 }
344 static struct option dhcpv6_options[] = {
382 {
"auth",
"Nauth-protocol.Nauth-algorithm.Nrdm-type.LLX",
441 #if defined(RFC4776_OPTIONS) 472 {
"fqdn",
"Efqdn6-if-you-see-me-its-a-bug-bug-bug.",
477 #if defined(RFC5192_OPTIONS) 482 #if defined(RFC4833_OPTIONS) 488 #if defined(RFC4994_OPTIONS) 501 #if defined(RFC5223_OPTIONS) 506 #if defined(RFC5417_OPTIONS) 511 #if defined(RFC5460_OPTIONS) 516 #if defined(RFC5986_OPTIONS) 521 #if defined(RFC6011_OPTIONS) 526 #if defined(RFC5970_OPTIONS) 534 #if defined(RFC6334_OPTIONS) 539 #if defined(RFC6440_OPTIONS) 544 #if defined(RFC6731_OPTIONS) 549 #if defined(RFC6939_OPTIONS) 554 #if defined(RFC6977_OPTIONS) 559 #if defined(RFC7083_OPTIONS) 563 #if defined(RFC7710_OPTIONS) 566 #if defined(RFC6153_OPTIONS) 571 #if defined(RFC7341_OPTIONS) 576 { NULL, NULL, NULL, 0, 0 }
590 dhcpv6_duid_type_values
596 {
"NoAddrsAvail", 2 },
599 {
"UseMulticast", 5 },
600 {
"NoPrefixAvail", 6 },
601 {
"UnknownQueryType", 7 },
602 {
"MalformedQuery", 8 },
603 {
"NotConfigured", 9 },
604 {
"NotAllowed", 10 },
605 {
"QueryTerminated", 11 },
612 dhcpv6_status_code_values
616 {
"query-by-address", 1 },
617 {
"query-by-clientid", 2 },
618 {
"query-by-relay-id", 3 },
619 {
"query-by-link-address", 4 },
620 {
"query-by-remote-id", 5 },
627 lq6_query_type_values
640 {
"RECONFIGURE", 10 },
641 {
"INFORMATION-REQUEST", 11 },
642 {
"RELAY-FORW", 12 },
643 {
"RELAY-REPL", 13 },
644 {
"LEASEQUERY", 14 },
645 {
"LEASEQUERY-REPLY", 15 },
646 {
"LEASEQUERY-DONE", 16 },
647 {
"LEASEQUERY-DATA", 17 },
648 {
"RECONFIGURE-REQUEST", 18 },
649 {
"RECONFIGURE-REPLY", 19 },
650 {
"DHCPV4-QUERY", 20 },
651 {
"DHCPV4-RESPONSE", 21 },
668 "Information-request",
675 "Reconfigure-request",
685 "dhcpv6-messages", 1,
686 dhcpv6_message_values
690 static struct option vsio_options[] = {
692 { NULL, NULL, NULL, 0, 0 }
696 static struct option isc6_options[] = {
701 { NULL, NULL, NULL, 0, 0 }
987 #if defined(POINTER_DEBUG) 988 log_fatal(
"%s(%d): reference store into non-null pointer!",
998 return(ISC_R_SUCCESS);
1008 #if defined (POINTER_DEBUG) 1009 log_fatal(
"%s(%d): dereference of null pointer!", file, line);
1015 if ((*dest)->refcnt <= 0) {
1016 #if defined (POINTER_DEBUG) 1017 log_fatal(
"%s(%d): dereference of <= 0 refcnt!", file, line);
1027 if ((*dest)->refcnt == 0) {
1031 if ((
char *) (*dest)->name != (
char *) ((*dest) + 1))
1032 dfree((
char *) (*dest)->name, file, line);
1037 if (((*dest)->format != NULL) &&
1038 ((*dest)->format != default_option_format)) {
1039 dfree((
char *) (*dest)->format, file, line);
1042 dfree(*dest, file, line);
1046 return ISC_R_SUCCESS;
1078 i = universe_max *
sizeof(
struct universe *);
1080 log_fatal(
"Ludicrous initial size option space table.");
1082 if (universes == NULL)
1083 log_fatal(
"Can't allocate option space table.");
1084 memset(universes, 0, i);
1111 log_fatal (
"Can't allocate dhcp option hash table.");
1112 for (i = 0 ; dhcp_options[i].name ; i++) {
1114 &dhcp_options[i].code, 0,
1115 &dhcp_options[i],
MDL);
1117 dhcp_options [i].name, 0,
1118 &dhcp_options [i],
MDL);
1120 #if defined(REPORT_HASH_PERFORMANCE) 1150 log_fatal(
"Unable to find NWIP parent option (%s:%d).",
MDL);
1157 log_fatal (
"Can't allocate nwip option hash table.");
1158 for (i = 0 ; nwip_options[i].
name ; i++) {
1160 &nwip_options[i].
code, 0,
1161 &nwip_options[i],
MDL);
1163 nwip_options[i].
name, 0,
1164 &nwip_options[i],
MDL);
1166 #if defined(REPORT_HASH_PERFORMANCE) 1197 log_fatal(
"Unable to find FQDN parent option (%s:%d).",
MDL);
1203 log_fatal (
"Can't allocate fqdn option hash table.");
1204 for (i = 0 ; fqdn_options[i].
name ; i++) {
1206 &fqdn_options[i].
code, 0,
1207 &fqdn_options[i],
MDL);
1209 fqdn_options[i].
name, 0,
1210 &fqdn_options[i],
MDL);
1212 #if defined(REPORT_HASH_PERFORMANCE) 1244 log_fatal(
"Unable to find VIVCO parent option (%s:%d).",
MDL);
1251 log_fatal(
"Can't allocate Vendor Identified Vendor Class " 1252 "option hash table.");
1253 for (i = 0 ; vendor_class_options[i].
name ; i++) {
1255 &vendor_class_options[i].
code, 0,
1256 &vendor_class_options[i],
MDL);
1258 vendor_class_options[i].
name, 0,
1259 &vendor_class_options[i],
MDL);
1261 #if defined(REPORT_HASH_PERFORMANCE) 1291 log_fatal(
"Unable to find VIVSO parent option (%s:%d).",
MDL);
1298 log_fatal(
"Can't allocate Vendor Identified Vendor Sub-" 1299 "options hash table.");
1300 for (i = 0 ; vendor_options[i].
name ; i++) {
1302 &vendor_options[i].
code, 0,
1303 &vendor_options[i],
MDL);
1305 vendor_options[i].
name, 0,
1306 &vendor_options[i],
MDL);
1308 #if defined(REPORT_HASH_PERFORMANCE) 1338 log_fatal(
"Unable to find ISC parent option (%s:%d).",
MDL);
1345 log_fatal(
"Can't allocate ISC Vendor options hash table.");
1346 for (i = 0 ; isc_options[i].
name ; i++) {
1348 &isc_options[i].
code, 0,
1349 &isc_options[i],
MDL);
1351 isc_options[i].
name, 0,
1352 &isc_options[i],
MDL);
1354 #if defined(REPORT_HASH_PERFORMANCE) 1387 log_fatal(
"Can't allocate dhcpv6 option hash tables.");
1388 for (i = 0 ; dhcpv6_options[i].
name ; i++) {
1390 &dhcpv6_options[i].
code, 0,
1391 &dhcpv6_options[i],
MDL);
1393 dhcpv6_options[i].
name, 0,
1394 &dhcpv6_options[i],
MDL);
1425 log_fatal(
"Unable to find VSIO parent option (%s:%d).",
MDL);
1432 log_fatal(
"Can't allocate Vendor Specific Information " 1434 for (i = 0 ; vsio_options[i].
name != NULL ; i++) {
1436 &vsio_options[i].
code, 0,
1437 &vsio_options[i],
MDL);
1439 vsio_options[i].
name, 0,
1440 &vsio_options[i],
MDL);
1466 log_fatal(
"Unable to find ISC parent option (%s:%d).",
MDL);
1473 log_fatal(
"Can't allocate Vendor Specific Information " 1475 for (i = 0 ; isc6_options[i].
name != NULL ; i++) {
1477 &isc6_options[i].
code, 0,
1478 &isc6_options[i],
MDL);
1480 isc6_options[i].
name, 0,
1481 &isc6_options[i],
MDL);
1511 log_fatal(
"Unable to find FQDN v6 parent option. (%s:%d).",
struct option_cache * lookup_hashed_option(struct universe *universe, struct option_state *options, unsigned code)
#define rc_register(file, line, reference, addr, refcnt, d, f)
struct enumeration dhcpv6_messages
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)
void add_enumeration(struct enumeration *enumeration)
const char * hardware_types[]
void save_linked_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
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 *))
u_int32_t(* get_length)(const unsigned char *)
struct universe fqdn6_universe
void delete_linked_option(struct universe *universe, struct option_state *options, int code)
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)
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)
struct universe dhcp_universe
int fqdn_universe_decode(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *u)
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
struct option_cache *(* lookup_func)(struct universe *, struct option_state *, unsigned)
int fqdn6_universe_decode(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *u)
int(* decode)(struct option_state *, const unsigned char *, unsigned, struct universe *)
void log_fatal(const char *,...) __attribute__((__format__(__printf__
#define DHO_NWIP_SUBOPTIONS
int parse_option_buffer(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *universe)
struct universe vsio_universe
#define VIV_ISC_HASH_SIZE
universe_hash_t * universe_hash
struct enumeration dhcpv6_status_codes
#define UNIVERSE_HASH_SIZE
int linked_option_state_dereference(struct universe *universe, struct option_state *state, const char *file, int line)
struct universe * config_universe
struct option_cache * lookup_fqdn6_option(struct universe *universe, struct option_state *options, unsigned code)
struct universe vendor_universe
void delete_hashed_option(struct universe *universe, struct option_state *options, int code)
unsigned do_string_hash(const void *, unsigned, unsigned)
void(* store_length)(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 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)
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)
void delete_fqdn6_option(struct universe *universe, struct option_state *options, int code)
void save_hashed_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
option_name_hash_t * name_hash
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)
unsigned do_number_hash(const void *, unsigned, unsigned)
u_int32_t getUShort(const unsigned char *)
int hashed_option_state_dereference(struct universe *universe, struct option_state *state, const char *file, int line)
void dfree(void *, const char *, int)
#define BYTE_NAME_HASH_SIZE
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
#define WORD_CODE_HASH_SIZE
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 *))
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
struct enumeration_value lq6_query_type_values[]
struct universe dhcpv6_universe
struct enumeration dhcpv6_duid_types
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 *)
void save_fqdn6_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
struct enumeration_value dhcpv6_duid_type_values[]
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 enumeration_value dhcpv6_message_values[]
struct universe isc6_universe
struct universe fqdn_universe
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)
option_code_hash_t * code_hash
void putUShort(unsigned char *, u_int32_t)
struct universe nwip_universe
unsigned do_case_hash(const void *, unsigned, unsigned)
#define VENDOR_ISC_SUBOPTIONS
void(* store_tag)(unsigned char *, u_int32_t)
int option_dereference(struct option **dest, const char *file, int line)
struct enumeration lq6_query_types
struct option_cache * lookup_linked_option(struct universe *universe, struct option_state *options, unsigned code)
#define BYTE_CODE_HASH_SIZE