99static 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)
214#if defined(RFC8925_OPTIONS)
220#if defined(RFC2563_OPTIONS)
223#if defined(RFC2937_OPTIONS)
228 {
"classless-static-routes",
"RIA", &
dhcp_universe, 121, 1 },
245#if defined(RFC5192_OPTIONS)
248#if defined(RFC5223_OPTIONS)
251#if defined(RFC5417_OPTIONS)
254#if defined(RFC6011_OPTIONS)
257#if defined(RFC6153_OPTIONS)
260#if defined(RFC6731_OPTIONS)
263#if defined(RFC5859_OPTIONS)
266#if defined(RFC7618_OPTIONS)
269#if defined(RFC7710_OPTIONS)
272#if defined(RFC5071_OPTIONS)
281#if defined(RFC5969_OPTIONS)
284#if defined(RFC5986_OPTIONS)
287 { NULL, NULL, NULL, 0, 0 }
291static struct option nwip_options[] = {
303 { NULL, NULL, NULL, 0, 0 }
320static struct option fqdn_options[] = {
329 { NULL, NULL, NULL, 0, 0 }
333static struct option vendor_class_options[] = {
335 { NULL, NULL, NULL, 0, 0 }
339static struct option vendor_options[] = {
341 { NULL, NULL, NULL, 0, 0 }
345static struct option isc_options [] = {
348 { NULL, NULL, NULL, 0, 0 }
352static struct option dhcpv6_options[] = {
390 {
"auth",
"Nauth-protocol.Nauth-algorithm.Nrdm-type.LLX",
449#if defined(RFC4776_OPTIONS)
480 {
"fqdn",
"Efqdn6-if-you-see-me-its-a-bug-bug-bug.",
485#if defined(RFC5192_OPTIONS)
490#if defined(RFC4833_OPTIONS)
496#if defined(RFC4994_OPTIONS)
509#if defined(RFC5223_OPTIONS)
514#if defined(RFC5417_OPTIONS)
519#if defined(RFC5460_OPTIONS)
524#if defined(RFC5986_OPTIONS)
529#if defined(RFC6011_OPTIONS)
534#if defined(RFC5970_OPTIONS)
542#if defined(RFC6334_OPTIONS)
547#if defined(RFC6440_OPTIONS)
552#if defined(RFC6731_OPTIONS)
557#if defined(RFC6939_OPTIONS)
562#if defined(RFC6977_OPTIONS)
567#if defined(RFC7083_OPTIONS)
573#if defined(RFC7341_OPTIONS)
578#if defined(RFC7710_OPTIONS)
584#if defined(RFC6153_OPTIONS)
588 { NULL, NULL, NULL, 0, 0 }
608 {
"NoAddrsAvail", 2 },
611 {
"UseMulticast", 5 },
612 {
"NoPrefixAvail", 6 },
613 {
"UnknownQueryType", 7 },
614 {
"MalformedQuery", 8 },
615 {
"NotConfigured", 9 },
616 {
"NotAllowed", 10 },
617 {
"QueryTerminated", 11 },
628 {
"query-by-address", 1 },
629 {
"query-by-clientid", 2 },
630 {
"query-by-relay-id", 3 },
631 {
"query-by-link-address", 4 },
632 {
"query-by-remote-id", 5 },
652 {
"RECONFIGURE", 10 },
653 {
"INFORMATION-REQUEST", 11 },
654 {
"RELAY-FORW", 12 },
655 {
"RELAY-REPL", 13 },
656 {
"LEASEQUERY", 14 },
657 {
"LEASEQUERY-REPLY", 15 },
658 {
"LEASEQUERY-DONE", 16 },
659 {
"LEASEQUERY-DATA", 17 },
660 {
"RECONFIGURE-REQUEST", 18 },
661 {
"RECONFIGURE-REPLY", 19 },
662 {
"DHCPV4-QUERY", 20 },
663 {
"DHCPV4-RESPONSE", 21 },
680 "Information-request",
687 "Reconfigure-request",
697 "dhcpv6-messages", 1,
702static struct option vsio_options[] = {
704 { NULL, NULL, NULL, 0, 0 }
708static struct option isc6_options[] = {
713 { NULL, NULL, NULL, 0, 0 }
999#if defined(POINTER_DEBUG)
1000 log_fatal(
"%s(%d): reference store into non-null pointer!",
1020#if defined (POINTER_DEBUG)
1027 if ((*dest)->refcnt <= 0) {
1028#if defined (POINTER_DEBUG)
1039 if ((*dest)->refcnt == 0) {
1043 if ((
char *) (*dest)->name != (
char *) ((*dest) + 1))
1049 if (((*dest)->format != NULL) &&
1092 log_fatal(
"Ludicrous initial size option space table.");
1095 log_fatal(
"Can't allocate option space table.");
1123 log_fatal (
"Can't allocate dhcp option hash table.");
1124 for (i = 0 ; dhcp_options[i].
name ; i++) {
1126 &dhcp_options[i].
code, 0,
1127 &dhcp_options[i],
MDL);
1129 dhcp_options [i].
name, 0,
1130 &dhcp_options [i],
MDL);
1132#if defined(REPORT_HASH_PERFORMANCE)
1162 log_fatal(
"Unable to find NWIP parent option (%s:%d).",
MDL);
1169 log_fatal (
"Can't allocate nwip option hash table.");
1170 for (i = 0 ; nwip_options[i].name ; i++) {
1172 &nwip_options[i].code, 0,
1173 &nwip_options[i],
MDL);
1175 nwip_options[i].name, 0,
1176 &nwip_options[i],
MDL);
1178#if defined(REPORT_HASH_PERFORMANCE)
1209 log_fatal(
"Unable to find FQDN parent option (%s:%d).",
MDL);
1215 log_fatal (
"Can't allocate fqdn option hash table.");
1216 for (i = 0 ; fqdn_options[i].name ; i++) {
1218 &fqdn_options[i].code, 0,
1219 &fqdn_options[i],
MDL);
1221 fqdn_options[i].name, 0,
1222 &fqdn_options[i],
MDL);
1224#if defined(REPORT_HASH_PERFORMANCE)
1256 log_fatal(
"Unable to find VIVCO parent option (%s:%d).",
MDL);
1263 log_fatal(
"Can't allocate Vendor Identified Vendor Class "
1264 "option hash table.");
1265 for (i = 0 ; vendor_class_options[i].name ; i++) {
1267 &vendor_class_options[i].code, 0,
1268 &vendor_class_options[i],
MDL);
1270 vendor_class_options[i].name, 0,
1271 &vendor_class_options[i],
MDL);
1273#if defined(REPORT_HASH_PERFORMANCE)
1303 log_fatal(
"Unable to find VIVSO parent option (%s:%d).",
MDL);
1310 log_fatal(
"Can't allocate Vendor Identified Vendor Sub-"
1311 "options hash table.");
1312 for (i = 0 ; vendor_options[i].name ; i++) {
1314 &vendor_options[i].code, 0,
1315 &vendor_options[i],
MDL);
1317 vendor_options[i].name, 0,
1318 &vendor_options[i],
MDL);
1320#if defined(REPORT_HASH_PERFORMANCE)
1350 log_fatal(
"Unable to find ISC parent option (%s:%d).",
MDL);
1357 log_fatal(
"Can't allocate ISC Vendor options hash table.");
1358 for (i = 0 ; isc_options[i].name ; i++) {
1360 &isc_options[i].code, 0,
1361 &isc_options[i],
MDL);
1363 isc_options[i].name, 0,
1364 &isc_options[i],
MDL);
1366#if defined(REPORT_HASH_PERFORMANCE)
1399 log_fatal(
"Can't allocate dhcpv6 option hash tables.");
1400 for (i = 0 ; dhcpv6_options[i].name ; i++) {
1402 &dhcpv6_options[i].code, 0,
1403 &dhcpv6_options[i],
MDL);
1405 dhcpv6_options[i].name, 0,
1406 &dhcpv6_options[i],
MDL);
1437 log_fatal(
"Unable to find VSIO parent option (%s:%d).",
MDL);
1444 log_fatal(
"Can't allocate Vendor Specific Information "
1446 for (i = 0 ; vsio_options[i].name != NULL ; i++) {
1448 &vsio_options[i].code, 0,
1449 &vsio_options[i],
MDL);
1451 vsio_options[i].name, 0,
1452 &vsio_options[i],
MDL);
1478 log_fatal(
"Unable to find ISC parent option (%s:%d).",
MDL);
1485 log_fatal(
"Can't allocate Vendor Specific Information "
1487 for (i = 0 ; isc6_options[i].name != NULL ; i++) {
1489 &isc6_options[i].code, 0,
1490 &isc6_options[i],
MDL);
1492 isc6_options[i].name, 0,
1493 &isc6_options[i],
MDL);
1523 log_fatal(
"Unable to find FQDN v6 parent option. (%s:%d).",
#define rc_register(file, line, reference, addr, refcnt, d, f)
int group_dereference(struct group **ptr, const char *file, int line)
int group_reference(struct group **ptr, struct group *bp, const char *file, int line)
void delete_fqdn6_option(struct universe *universe, struct option_state *options, int code)
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)
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 save_hashed_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
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)
int fqdn_universe_decode(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *u)
int hashed_option_state_dereference(struct universe *universe, struct option_state *state, const char *file, int line)
int linked_option_state_dereference(struct universe *universe, struct option_state *state, 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 option_cache * lookup_fqdn6_option(struct universe *universe, struct option_state *options, unsigned code)
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)
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 *))
struct option_cache * lookup_hashed_option(struct universe *universe, struct option_state *options, unsigned code)
struct option_cache * lookup_linked_option(struct universe *universe, struct option_state *options, unsigned code)
void delete_hashed_option(struct universe *universe, struct option_state *options, int code)
void save_linked_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
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)
int fqdn6_universe_decode(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *u)
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)
int parse_option_buffer(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *universe)
void save_fqdn6_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
void delete_linked_option(struct universe *universe, struct option_state *options, int code)
void add_enumeration(struct enumeration *enumeration)
u_int32_t getUShort(const unsigned char *)
void putUShort(unsigned char *, u_int32_t)
u_int32_t getULong(const unsigned char *)
void putUChar(unsigned char *, u_int32_t)
u_int32_t getUChar(const unsigned char *)
void putULong(unsigned char *, u_int32_t)
#define VENDOR_ISC_SUBOPTIONS
#define DHO_VIVSO_SUBOPTIONS
#define DHO_VIVCO_SUBOPTIONS
#define DHO_NWIP_SUBOPTIONS
#define BYTE_NAME_HASH_SIZE
#define BYTE_CODE_HASH_SIZE
#define UNIVERSE_HASH_SIZE
struct hash_table option_name_hash_t
struct hash_table universe_hash_t
struct hash_table group_hash_t
#define VIV_ISC_HASH_SIZE
#define WORD_NAME_HASH_SIZE
struct universe dhcp_universe
struct hash_table option_code_hash_t
#define WORD_CODE_HASH_SIZE
unsigned do_case_hash(const void *, unsigned, unsigned)
#define HASH_FUNCTIONS(name, bufarg, type, hashtype, ref, deref, hasher)
unsigned do_string_hash(const void *, unsigned, unsigned)
unsigned do_number_hash(const void *, unsigned, unsigned)
void * dmalloc(size_t, const char *, int)
void dfree(void *, const char *, int)
void log_fatal(const char *,...) __attribute__((__format__(__printf__
int int log_info(const char *,...) __attribute__((__format__(__printf__
#define DHCP_R_INVALIDARG
const int dhcpv6_type_name_max
struct enumeration dhcpv6_status_codes
struct enumeration_value dhcpv6_duid_type_values[]
struct universe isc_universe
const char * hardware_types[]
struct universe fqdn_universe
struct enumeration_value lq6_query_type_values[]
struct enumeration_value dhcpv6_status_code_values[]
struct universe * config_universe
struct universe nwip_universe
char * default_option_format
struct universe vsio_universe
struct enumeration lq6_query_types
int option_reference(struct option **dest, struct option *src, const char *file, int line)
struct enumeration_value dhcpv6_message_values[]
struct universe fqdn6_universe
struct universe vendor_universe
struct enumeration dhcpv6_messages
const char * dhcpv6_type_names[]
struct universe isc6_universe
int option_dereference(struct option **dest, const char *file, int line)
universe_hash_t * universe_hash
struct universe vendor_class_universe
struct universe dhcpv6_universe
void initialize_common_option_spaces()
struct enumeration dhcpv6_duid_types
struct universe ** universes