96 static struct option dhcp_options[] = {
107 {
"resource-location-servers",
"IA", &
dhcp_universe, 11, 1 },
128 {
"router-solicitation-address",
"I", &
dhcp_universe, 32, 1 },
139 {
"vendor-encapsulated-options",
"E.", &
dhcp_universe, 43, 1 },
151 {
"dhcp-parameter-request-list",
"BA", &
dhcp_universe, 55, 1 },
172 {
"streettalk-directory-assistance-server",
"IA",
179 {
"relay-agent-information",
"Eagent.", &
dhcp_universe, 82, 1 },
194 {
"client-last-transaction-time",
"L", &
dhcp_universe, 91, 1 },
204 #if defined(RFC4776_OPTIONS) 207 #if defined(RFC4833_OPTIONS) 214 #if defined(RFC2937_OPTIONS) 219 {
"classless-static-routes",
"RIA", &
dhcp_universe, 121, 1 },
236 #if defined(RFC5192_OPTIONS) 239 #if defined(RFC5223_OPTIONS) 242 #if defined(RFC5417_OPTIONS) 245 #if defined(RFC6731_OPTIONS) 259 #if defined(RFC5969_OPTIONS) 262 #if defined(RFC5986_OPTIONS) 265 { NULL, NULL, NULL, 0, 0 }
269 static struct option nwip_options[] = {
281 { NULL, NULL, NULL, 0, 0 }
298 static struct option fqdn_options[] = {
307 { NULL, NULL, NULL, 0, 0 }
311 static struct option vendor_class_options[] = {
313 { NULL, NULL, NULL, 0, 0 }
317 static struct option vendor_options[] = {
319 { NULL, NULL, NULL, 0, 0 }
323 static struct option isc_options [] = {
326 { NULL, NULL, NULL, 0, 0 }
330 static struct option dhcpv6_options[] = {
368 {
"auth",
"Nauth-protocol.Nauth-algorithm.Nrdm-type.LLX",
427 #if defined(RFC4776_OPTIONS) 458 {
"fqdn",
"Efqdn6-if-you-see-me-its-a-bug-bug-bug.",
463 #if defined(RFC5192_OPTIONS) 468 #if defined(RFC4833_OPTIONS) 474 #if defined(RFC4994_OPTIONS) 487 #if defined(RFC5223_OPTIONS) 492 #if defined(RFC5417_OPTIONS) 497 #if defined(RFC5460_OPTIONS) 502 #if defined(RFC5986_OPTIONS) 507 #if defined(RFC6011_OPTIONS) 512 #if defined(RFC5970_OPTIONS) 520 #if defined(RFC6334_OPTIONS) 525 #if defined(RFC6440_OPTIONS) 530 #if defined(RFC6731_OPTIONS) 535 #if defined(RFC6939_OPTIONS) 540 #if defined(RFC6977_OPTIONS) 545 #if defined(RFC7083_OPTIONS) 550 { NULL, NULL, NULL, 0, 0 }
563 dhcpv6_duid_type_values
569 {
"NoAddrsAvail", 2 },
572 {
"UseMulticast", 5 },
573 {
"NoPrefixAvail", 6 },
574 {
"UnknownQueryType", 7 },
575 {
"MalformedQuery", 8 },
576 {
"NotConfigured", 9 },
577 {
"NotAllowed", 10 },
584 dhcpv6_status_code_values
588 {
"query-by-address", 1 },
589 {
"query-by-clientid", 2 },
596 lq6_query_type_values
609 {
"RECONFIGURE", 10 },
610 {
"INFORMATION-REQUEST", 11 },
611 {
"RELAY-FORW", 12 },
612 {
"RELAY-REPL", 13 },
613 {
"LEASEQUERY", 14 },
614 {
"LEASEQUERY-REPLY", 15 },
631 "Information-request",
642 "dhcpv6-messages", 1,
643 dhcpv6_message_values
647 static struct option vsio_options[] = {
649 { NULL, NULL, NULL, 0, 0 }
653 static struct option isc6_options[] = {
656 { NULL, NULL, NULL, 0, 0 }
942 #if defined(POINTER_DEBUG) 943 log_fatal(
"%s(%d): reference store into non-null pointer!",
953 return(ISC_R_SUCCESS);
963 #if defined (POINTER_DEBUG) 964 log_fatal(
"%s(%d): dereference of null pointer!", file, line);
970 if ((*dest)->refcnt <= 0) {
971 #if defined (POINTER_DEBUG) 972 log_fatal(
"%s(%d): dereference of <= 0 refcnt!", file, line);
982 if ((*dest)->refcnt == 0) {
986 if ((
char *) (*dest)->name != (
char *) ((*dest) + 1))
987 dfree((
char *) (*dest)->name, file, line);
992 if (((*dest)->format != NULL) &&
993 ((*dest)->format != default_option_format)) {
994 dfree((
char *) (*dest)->format, file, line);
997 dfree(*dest, file, line);
1001 return ISC_R_SUCCESS;
1033 i = universe_max *
sizeof(
struct universe *);
1035 log_fatal(
"Ludicrous initial size option space table.");
1037 if (universes == NULL)
1038 log_fatal(
"Can't allocate option space table.");
1039 memset(universes, 0, i);
1066 log_fatal (
"Can't allocate dhcp option hash table.");
1067 for (i = 0 ; dhcp_options[i].name ; i++) {
1069 &dhcp_options[i].code, 0,
1070 &dhcp_options[i],
MDL);
1072 dhcp_options [i].name, 0,
1073 &dhcp_options [i],
MDL);
1075 #if defined(REPORT_HASH_PERFORMANCE) 1105 log_fatal(
"Unable to find NWIP parent option (%s:%d).",
MDL);
1112 log_fatal (
"Can't allocate nwip option hash table.");
1113 for (i = 0 ; nwip_options[i].
name ; i++) {
1115 &nwip_options[i].
code, 0,
1116 &nwip_options[i],
MDL);
1118 nwip_options[i].
name, 0,
1119 &nwip_options[i],
MDL);
1121 #if defined(REPORT_HASH_PERFORMANCE) 1152 log_fatal(
"Unable to find FQDN parent option (%s:%d).",
MDL);
1158 log_fatal (
"Can't allocate fqdn option hash table.");
1159 for (i = 0 ; fqdn_options[i].
name ; i++) {
1161 &fqdn_options[i].
code, 0,
1162 &fqdn_options[i],
MDL);
1164 fqdn_options[i].
name, 0,
1165 &fqdn_options[i],
MDL);
1167 #if defined(REPORT_HASH_PERFORMANCE) 1199 log_fatal(
"Unable to find VIVCO parent option (%s:%d).",
MDL);
1206 log_fatal(
"Can't allocate Vendor Identified Vendor Class " 1207 "option hash table.");
1208 for (i = 0 ; vendor_class_options[i].
name ; i++) {
1210 &vendor_class_options[i].
code, 0,
1211 &vendor_class_options[i],
MDL);
1213 vendor_class_options[i].
name, 0,
1214 &vendor_class_options[i],
MDL);
1216 #if defined(REPORT_HASH_PERFORMANCE) 1246 log_fatal(
"Unable to find VIVSO parent option (%s:%d).",
MDL);
1253 log_fatal(
"Can't allocate Vendor Identified Vendor Sub-" 1254 "options hash table.");
1255 for (i = 0 ; vendor_options[i].
name ; i++) {
1257 &vendor_options[i].
code, 0,
1258 &vendor_options[i],
MDL);
1260 vendor_options[i].
name, 0,
1261 &vendor_options[i],
MDL);
1263 #if defined(REPORT_HASH_PERFORMANCE) 1293 log_fatal(
"Unable to find ISC parent option (%s:%d).",
MDL);
1300 log_fatal(
"Can't allocate ISC Vendor options hash table.");
1301 for (i = 0 ; isc_options[i].
name ; i++) {
1303 &isc_options[i].
code, 0,
1304 &isc_options[i],
MDL);
1306 isc_options[i].
name, 0,
1307 &isc_options[i],
MDL);
1309 #if defined(REPORT_HASH_PERFORMANCE) 1342 log_fatal(
"Can't allocate dhcpv6 option hash tables.");
1343 for (i = 0 ; dhcpv6_options[i].
name ; i++) {
1345 &dhcpv6_options[i].
code, 0,
1346 &dhcpv6_options[i],
MDL);
1348 dhcpv6_options[i].
name, 0,
1349 &dhcpv6_options[i],
MDL);
1380 log_fatal(
"Unable to find VSIO parent option (%s:%d).",
MDL);
1387 log_fatal(
"Can't allocate Vendor Specific Information " 1389 for (i = 0 ; vsio_options[i].
name != NULL ; i++) {
1391 &vsio_options[i].
code, 0,
1392 &vsio_options[i],
MDL);
1394 vsio_options[i].
name, 0,
1395 &vsio_options[i],
MDL);
1421 log_fatal(
"Unable to find ISC parent option (%s:%d).",
MDL);
1428 log_fatal(
"Can't allocate Vendor Specific Information " 1430 for (i = 0 ; isc6_options[i].
name != NULL ; i++) {
1432 &isc6_options[i].
code, 0,
1433 &isc6_options[i],
MDL);
1435 isc6_options[i].
name, 0,
1436 &isc6_options[i],
MDL);
1466 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)
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)
void * dmalloc(unsigned, const char *, int)
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__
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
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 *))
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