29#define DHCP_OPTION_DATA
36static int pretty_text(
char **,
char *,
const unsigned char **,
37 const unsigned char *,
int);
38static int pretty_dname(
char **,
char *,
const unsigned char *,
39 const unsigned char *);
40static int pretty_domain(
char **,
char *,
const unsigned char **,
41 const unsigned char *);
43 unsigned char *
buffer,
unsigned length,
56 packet -> options_valid = 0;
63 &
packet -> raw -> options [4],
106 (
unsigned char *)
packet -> raw -> sname,
107 sizeof packet -> raw -> sname,
112 packet -> options_valid = 1;
121 const unsigned char *
buffer;
125 unsigned len, offset;
130 char *
reason =
"general failure";
133 log_error (
"no memory for option buffer.");
149 reason =
"code tag at end of buffer - missing "
166 log_fatal(
"Improperly configured option space(%s): "
167 "may not have a nonzero length size "
168 "AND a NULL get_length function.",
181 if (
offset + len > length) {
184 reason =
"option length exceeds option buffer length";
186 log_error(
"parse_option_buffer: malformed option "
213 log_debug (
"Ignoring empty DHO_HOST_NAME option");
226 "save_option_buffer failed");
235 memset(&
new, 0,
sizeof new);
238 log_error(
"parse_option_buffer: No memory.");
248 bp->data + offset,
len);
250 new.data =
new.buffer->data;
263 log_error(
"parse_option_buffer: No memory.");
273 nop->data.data =
bp->data + offset;
301 log_error (
"internal encapsulation format error 1.");
309 log_error (
"internal encapsulation format error 2.");
323 s, (
unsigned)(
t -
s))) {
339 const unsigned char *
buffer,
360 if (
eopt -> format [0] !=
'E')
367 const unsigned char *
buffer,
368 unsigned length,
struct universe *u)
378 log_error (
"no memory for option buffer.");
414 if (
buffer [length - 1] == 0) {
422 for (
i = 3;
i < length &&
buffer [
i] !=
'.';
i++);
433 if (length > 4 +
i &&
441 &
bp ->
data [5], length - 3,
457 log_info (
"label length exceeds 63 in fqdn option");
464 if (
s + len > &
bp ->
data [0] + length + 3) {
465 log_info (
"fqdn label longer than buffer");
546#define PRIORITY_COUNT 300
695 for (
i = 0;
i <
prl->len;
i++) {
858 log_error(
"Unable to store relay agent information "
910 vs->buf[
vs->bufpos++] =
oc->option->code;
921 vs->buf[
vs->bufpos++] =
ds.len;
932 vs->bufpos +=
ds.len;
934 log_debug(
"No space for option %d in VSIO space %s.",
939 log_error(
"Error evaluating option %d in VSIO space %s.",
962add_option6_data(
char *buf,
int buflen,
int* bufpos,
uint16_t code,
964 if ((
ds->len + 4) > (buflen - *bufpos)) {
965 log_debug(
"No space for option %d", code);
967 unsigned char*
tmp = (
unsigned char *)buf + *bufpos;
975 *bufpos += 4 +
ds->len;
1006store_encap6 (
char *buf,
int buflen,
int* bufpos,
1021 if ((
t ==
NULL) || (
t ==
s)) {
1026 memset(&name, 0,
sizeof(name));
1027 name.data = (
unsigned char *)
s;
1035 add_option6_data(buf, buflen, bufpos, code, &
ds);
1079 o =
o->universe->enc_opt;
1082 log_fatal(
"No VSIO option code found.");
1181 store_encap6(buf, buflen, &bufpos,
opt_state,
1199 vs.bufpos = bufpos+8;
1212 if (
vs.bufpos > bufpos+8) {
1213 tmp = (
unsigned char *)buf +
1218 vs.bufpos-bufpos-4);
1237 unsigned char *
buffer,
unsigned index,
unsigned buflen,
1247 int bufix = 0,
six = 0,
tix = 0;
1273 log_fatal(
"%s:%d:store_options: Invalid first cutoff.",
MDL);
1278 log_fatal(
"%s:%d:store_options: Invalid second cutoff.",
1284 log_fatal(
"%s:%d:store_options: Invalid second cutoff.",
MDL);
1318 for (
ix =
i - 1 ;
ix >= 0 ;
ix--) {
1359 if (
oc &&
oc->option)
1383 memset (&name, 0,
sizeof name);
1400 name.
data = (
unsigned char *)
s;
1404 name.
data = (
unsigned char *)
s;
1515 unsigned incr = length;
1517 unsigned char *base;
1522 (bufix + 2 + length <
bufend)) ||
1523 (bufix + 5 + length <
bufend))) {
1541 if (bufix + 6 <
bufend) {
1577 od.data +
ix, (
unsigned)(
incr - 1));
1578 base [*
pix + 2 +
incr - 1] = 0;
1599 log_fatal(
"Second buffer overflow in overloaded options.");
1611 log_fatal(
"Third buffer overflow in overloaded options.");
1619 log_fatal(
"Not enough space for option overload option.");
1635 while (*
p !=
'\0') {
1660 log_error(
"format_has_text(%s): 'c' atoms are illegal "
1661 "except after 'D' atoms.", format);
1673 while ((*
p !=
'\0') && (*
p++ !=
'.'))
1696 const char *
p, *name;
1702 while (*
p !=
'\0') {
1728 log_fatal(
"Corrupt format: %s", format);
1732 log_error(
"Unknown enumeration: %s", format);
1774 log_error(
"format_min_length(%s): 'c' atom is illegal "
1775 "except after 'D' atom.", format);
1780 log_error(
"format_min_length(%s): No safe value "
1781 "for unknown format symbols.", format);
1792#define MAX_OUTPUT_SIZE 32*1024
1795 const unsigned char *data;
1814 const unsigned char *
dp = data;
1832 log_fatal(
"Bounds failure on internal buffer at "
1836 log_error (
"%s: Extra codes in format string: %s",
1843 switch (
option -> format [
i]) {
1854 while (
option -> format [
i] &&
1859 for (
k = 0;
k < len;
k++) {
1867 if (
k == len || (
k + 1 == len && data [
k] == 0)) {
1882 log_error(
"'c' atom not following D atom in format "
1902 log_error(
"%s: Illegal use of domain name: %s",
1922 while (
option -> format [
i] &&
1966 log_error (
"%s: garbage in format string: %s",
1975 log_error (
"%s: expecting at least %d bytes; got %d",
2000 log_error (
"%s: invalid 'a' format: %s",
2016 log_error (
"%s: invalid 'A' format: %s",
2027 log_error (
"%s: %d extra bytes at end of array\n",
2053 log_error (
"wrong subnet mask width in destination descriptor");
2060 log_error (
"classless static routes option has wrong size or "
2061 "there's some garbage in format");
2104 pretty_dname(&op,
endbuf-1,
dp, data + len);
2110 for( ;
dp < (data + len) ;
dp +=
k) {
2112 const unsigned char *
nbp, *
nend;
2153 pretty_domain(&op,
endbuf-1,
2209 return "<double impossible condition>";
2238 log_error (
"wrong subnet mask width in destination descriptor");
2260 sprintf (op,
"%s",
"infinite");
2278 sprintf (op,
"%d", *(
const char *)
dp++);
2288 strcpy (op, *
dp++ ?
"true" :
"false");
2309 if (
dp == data + len)
2317 if (
dp == data + len)
2417 log_error (
"bogus statement type in set_option.");
2445 log_error (
"Can't allocate const expression.");
2479 (
memcmp(
oc->option->format,
"Dc", 2) == 0))) {
2484 log_error (
"Both options must be Dc format");
2513 log_error (
"can't look up options in %s space.",
2594 unsigned char *
buffer,
unsigned length,
unsigned code,
2613 if (code > 0xffffffff)
2618 log_fatal(
"Inconsistent universe tag size at %s:%d.",
MDL);
2631 char nbuf[
sizeof(
"unknown-4294967295")];
2649 log_error(
"No memory for option code %s.%s.",
2664 log_error (
"no memory for option buffer.");
2680 op ->
data.len = length;
2689 op ->
data.terminated = 1;
2691 op ->
data.terminated = 0;
2786 log_fatal(
"no memory to build server ORO");
2810 o =
o->universe->enc_opt;
2883 ocloc = &(*ocloc)->next;
2897 log_error (
"No memory for option_cache reference.");
2914 log_error (
"can't delete options from %s space.",
2942 prev -> cdr =
bptr -> cdr;
2958 if (!ptr || !*ptr) {
2959 log_error (
"Null pointer in option_cache_dereference: %s(%d)",
2961#if defined (POINTER_DEBUG)
2986 if ((*ptr) ->
refcnt < 0) {
2988#if defined (DEBUG_RC_HISTORY)
2991#if defined (POINTER_DEBUG)
3066 tmp.data =
tmp.buffer->data;
3111 if (
oc->option->format &&
3112 oc->option->format[0] ==
'e') {
3132 "refers to unknown "
3133 "option space '%.*s'.",
3178 log_error(
"option_space_encapsulate: option space '%.*s' does "
3179 "not exist, but is configured.",
3189 log_error(
"encapsulation requested for '%s' with no support.",
3232 subu->enc_opt->format[0] ==
'E' &&
3277 for (
p = hash [
i];
p;
p =
p -> cdr) {
3330 static unsigned char nni [] = { 1, 0 };
3340 log_fatal(
"Nwip option hash does not contain "
3358 ds.data = &
ds.buffer -> data [0];
3359 ds.buffer -> data [0] = 2;
3360 ds.buffer -> data [1] = 0;
3377fqdn_encode(
unsigned char *
dst,
int dstlen,
const unsigned char *
src,
3465 log_error (
"no memory for option buffer.");
3500 i = fqdn_encode(&
bp->data[3], len - 3,
3517 result -> terminated = 0;
3602 unsigned char *
data;
3603 int i, len,
rval = 0, count;
3631 log_error(
"No memory for virtual option buffer.");
3664 count = fqdn_encode(
data + 1, len - 1,
3691 const unsigned char *
buffer,
unsigned length,
3696 int len, hlen,
dlen;
3711 unsigned bp_size = 3 + (length * 4);
3714 log_error(
"No memory for dhcp6.fqdn option buffer.");
3746 log_error(
"Unable to convert dhcp6.fqdn domain name to "
3860 for (
p = hash [
i];
p;
p =
p -> cdr) {
3890 for (tail = &head ->
first; *tail; tail = &((*tail) -> cdr)) {
3893 if (
oc->option->code == (*ocloc)->option->code) {
3896 ocloc = &(*ocloc)->next;
3906 *tail =
cons (0, 0);
3909 (&(*tail) -> car),
oc,
MDL);
3964 for (tail = &head ->
first; *tail; tail = &((*tail) -> cdr)) {
3968 tmp = (*tail) -> cdr;
3970 (&(*tail) -> car),
MDL);
4038 for (car = head ->
first; car; car = car -> cdr) {
4049 unsigned int from_port;
4055#if defined (DEBUG_MEMORY_LEAKAGE)
4059#if defined (TRACING)
4065 log_error(
"do_packet: no memory for incoming packet!");
4077 log_info(
"Discarding packet with bogus hlen.");
4122#if defined (DEBUG_MEMORY_LEAKAGE)
4123 log_info(
"generation %ld: %ld new, %ld outstanding, %ld long-term",
4129#if defined (DEBUG_RC_HISTORY_EXHAUSTIVELY)
4158 int len,
int from_port,
const struct iaddr *from,
4160 unsigned char msg_type;
4167#if defined (DEBUG_MEMORY_LEAKAGE)
4173 "short packet from %s port %d, len %d, dropped",
4174 piaddr(*from), from_port, len);
4180 log_error(
"do_packet6: no memory for incoming packet.");
4185 log_error(
"do_packet6: no memory for options.");
4256 msg->transaction_id,
4273#if defined (DEBUG_MEMORY_LEAKAGE)
4274 log_info(
"generation %ld: %ld new, %ld outstanding, %ld long-term",
4280#if defined (DEBUG_RC_HISTORY_EXHAUSTIVELY)
4288 const unsigned char *
send)
4300 for ( ; *
src <
send ; (*src)++) {
4312 }
else if (**
src ==
'"' || **
src ==
'\'' || **
src ==
'$' ||
4313 **
src ==
'`' || **
src ==
'\\' || **
src ==
'|' ||
4337pretty_text(
char **
dst,
char *
dend,
const unsigned char **
src,
4370pretty_dname(
char **
dst,
char *
dend,
const unsigned char *
src,
4371 const unsigned char *
send)
4373 const unsigned char *
tend;
4374 const unsigned char *
srcp =
src;
4407 if ((status == -1) || ((*
dst + 1) >
dend))
4412 count += status + 1;
4420pretty_domain(
char **
dst,
char *
dend,
const unsigned char **
src,
4421 const unsigned char *
send)
4423 const unsigned char *
tend;
4460 if ((status == -1) || ((*
dst + 2) >
dend))
4465 count += status + 1;
4500 log_error(
"No memory for option cache adding %s (option %d).",
4513 log_error(
"No memory for constant data adding %s (option %d).",
4546 if (
oc->data.len == 0) {
4547 log_debug(
"Dropped DHCPv4 packet with zero-length client-id");
4550 }
else if (
oc->data.len == 1) {
4557 log_debug(
"Accepted DHCPv4 packet with one-character client-id - "
4558 "a future version of ISC DHCP will reject this");
4565 if ((
oc->data.len < 2) ||
4566 (
oc->data.data[0] ==
'\0' &&
4567 oc->data.len != 17)) {
4568 log_debug(
"Dropped DHCPv4 packet with wrong "
4569 "(len == %d) pxe-client-id",
oc->data.len);
4578 log_debug(
"Received DHCPv4 packet without client-id"
4579 " option and empty hlen field.");
4651 if (
name.len == 0) {
4660 if ((
oc ==
NULL) || (
oc->data.len == 0)) {
4674 oc->data.data,
oc->data.len,
4676 (
const char *)
name.data);
#define rc_register(file, line, reference, addr, refcnt, d, f)
int buffer_reference(struct buffer **ptr, struct buffer *bp, const char *file, int line)
int expression_allocate(struct expression **cptr, const char *file, int line)
int option_cache_reference(struct option_cache **ptr, struct option_cache *src, const char *file, int line)
int buffer_allocate(struct buffer **ptr, unsigned len, const char *file, int line)
int option_chain_head_allocate(struct option_chain_head **ptr, const char *file, int line)
void free_pair(pair foo, const char *file, int line)
void data_string_forget(struct data_string *data, const char *file, int line)
int option_state_allocate(struct option_state **ptr, const char *file, int line)
void data_string_truncate(struct data_string *dp, int len)
int packet_dereference(struct packet **ptr, const char *file, int line)
struct option * new_option(char *name, const char *file, int line) const
void data_string_copy(struct data_string *dest, const struct data_string *src, const char *file, int line)
int packet_allocate(struct packet **ptr, const char *file, int line)
pair new_pair(char *file, int line) const
int option_cache_allocate(struct option_cache **cptr, const char *file, int line)
int option_chain_head_dereference(struct option_chain_head **ptr, const char *file, int line)
int buffer_dereference(struct buffer **ptr, const char *file, int line)
void save_option(struct universe *universe, struct option_state *options, struct option_cache *oc)
void delete_fqdn6_option(struct universe *universe, struct option_state *options, int code)
int option_cache_dereference(struct option_cache **ptr, const char *file, int line)
const char * pretty_print_option(struct option *option, const unsigned char *data, unsigned len, int emit_commas, int emit_quotes)
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)
void delete_option(struct universe *universe, struct option_state *options, int code)
struct universe * find_option_universe(struct option *eopt, const char *uname)
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 parse_encapsulated_suboptions(struct option_state *options, struct option *eopt, const unsigned char *buffer, unsigned len, struct universe *eu, const char *uname)
int hashed_option_state_dereference(struct universe *universe, struct option_state *state, const char *file, int line)
int store_options(int *ocount, unsigned char *buffer, unsigned index, unsigned buflen, 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, unsigned *priority_list, int priority_len, unsigned first_cutoff, int second_cutoff, int terminate, const char *vuname)
int linked_option_state_dereference(struct universe *universe, struct option_state *state, const char *file, int line)
void set_option(struct universe *universe, struct option_state *options, struct option_cache *option, enum statement_op op)
void suboption_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 *oc, const char *vsname)
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 *))
int 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 data_string *name)
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)
int append_option_buffer(struct universe *universe, struct option_state *options, struct buffer *bp, unsigned char *buffer, unsigned length, unsigned code, int terminatep)
int parse_options(struct packet *packet)
void 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 format_has_text(char *format) const
int save_option_buffer(struct universe *universe, struct option_state *options, struct buffer *bp, unsigned char *buffer, unsigned length, unsigned code, int terminatep)
int get_option(struct data_string *result, struct universe *universe, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct option_state *options, struct binding_scope **scope, unsigned code, const char *file, int line)
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 * free_option_caches
struct option_cache * lookup_option(struct universe *universe, struct option_state *options, unsigned code)
void do_packet(struct interface_info *interface, struct dhcp_packet *packet, unsigned len, unsigned int from_port, struct iaddr from, struct hardware *hfrom)
struct option_cache * lookup_hashed_option(struct universe *universe, struct option_state *options, unsigned code)
int append_option(struct data_string *dst, struct universe *universe, struct option *option, struct data_string *src)
int pretty_escape(char **dst, char *dend, const unsigned char **src, const unsigned char *send)
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)
struct option * vendor_cfg_option
void save_linked_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
int get_option_int(int *result, struct universe *universe, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct option_state *options, struct binding_scope **scope, unsigned code, const char *file, int line)
int store_options6(char *buf, int buflen, struct option_state *opt_state, struct packet *packet, const int *required_opts, struct data_string *oro)
void also_save_option(struct universe *universe, struct option_state *options, struct option_cache *oc)
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 store_option(struct data_string *result, struct universe *universe, 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 option_cache *oc)
int add_option(struct option_state *options, unsigned int option_num, void *data, unsigned int data_len)
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 packet6_len_okay(const char *packet, int len)
void build_server_oro(struct data_string *server_oro, struct option_state *options, const char *file, int line)
int parse_option_buffer(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *universe)
int cons_options(struct packet *inpacket, struct dhcp_packet *outpacket, struct lease *lease, struct client_state *client_state, int mms, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, int overload_avail, int terminate, int bootpp, struct data_string *prl, const char *vuname)
int validate_packet(struct packet *packet)
void save_fqdn6_option(struct universe *universe, struct option_state *options, struct option_cache *oc, isc_boolean_t appendp)
void parse_vendor_option(struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *out_options, struct binding_scope **scope)
Parse a vendor option (option 43)
int format_min_length(char *format, struct option_cache *oc) const
void delete_linked_option(struct universe *universe, struct option_state *options, int code)
struct enumeration * find_enumeration(const char *name, int length)
int32_t getLong(const unsigned char *)
u_int32_t getUShort(const unsigned char *)
void putUShort(unsigned char *, u_int32_t)
u_int32_t getULong(const unsigned char *)
int32_t getShort(const unsigned char *)
u_int32_t getUChar(const unsigned char *)
void putULong(unsigned char *, u_int32_t)
void trace_inpacket_stash(struct interface_info *, struct dhcp_packet *, unsigned, unsigned int, struct iaddr, struct hardware *)
void bootp(struct packet *packet)
void dhcp(struct packet *packet)
#define DHCPV6_RELAY_REPL
#define DHCPV6_RELAY_FORW
#define DHCPV6_DHCPV4_QUERY
#define DHCPV6_DHCPV4_RESPONSE
#define DHO_DHCP_MAX_MESSAGE_SIZE
#define DHO_VENDOR_ENCAPSULATED_OPTIONS
#define DHO_SUBNET_SELECTION
#define DHO_DHCP_AGENT_OPTIONS
#define FQDN_SERVER_UPDATE
#define FQDN_SUBOPTION_COUNT
#define DHCP_FIXED_NON_UDP
#define DHO_DHCP_CLIENT_IDENTIFIER
#define FQDN_NO_CLIENT_UPDATE
#define DHO_ASSOCIATED_IP
#define DHO_PXE_CLIENT_ID
#define DHO_DHCP_MESSAGE_TYPE
#define DHCP_OPTIONS_COOKIE
#define DHO_CLASSLESS_STATIC_ROUTES
#define DHO_DHCP_RENEWAL_TIME
#define DHCP_MIN_OPTION_LEN
#define DHO_DOMAIN_NAME_SERVERS
#define DHO_DHCP_REBINDING_TIME
#define DHO_DHCP_OPTION_OVERLOAD
#define DHO_DHCP_SERVER_IDENTIFIER
#define DHO_DHCP_REQUESTED_ADDRESS
#define DHO_DHCP_LEASE_TIME
#define DHCP_MAX_OPTION_LEN
void do_packet6(struct interface_info *, const char *, int, int, const struct iaddr *, isc_boolean_t)
#define compute_option_hash(x)
struct universe dhcp_universe
void dhcpv6(struct packet *)
const char * piaddr(const struct iaddr addr)
const char * pdestdesc(const struct iaddr addr)
@ supersede_option_statement
@ default_option_statement
@ prepend_option_statement
@ append_option_statement
int MRns_name_ntop(const u_char *src, char *dst, size_t dstsiz)
int MRns_name_len(const u_char *eom, const u_char *src)
int MRns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src, u_char *dst, size_t dstsiz)
#define dmalloc_reuse(x, y, l, z)
void * dmalloc(size_t, const char *, int)
void dfree(void *, const char *, int)
int log_error(const char *,...) __attribute__((__format__(__printf__
int int int log_debug(const char *,...) __attribute__((__format__(__printf__
void log_fatal(const char *,...) __attribute__((__format__(__printf__
int int log_info(const char *,...) __attribute__((__format__(__printf__
const unsigned char * data
unsigned char options[DHCP_MAX_OPTION_LEN]
unsigned char options[FLEXIBLE_ARRAY_MEMBER]
unsigned char options[FLEXIBLE_ARRAY_MEMBER]
unsigned char options[FLEXIBLE_ARRAY_MEMBER]
unsigned char link_address[16]
unsigned char peer_address[16]
struct enumeration_value * values
struct option_cache * next
struct universe * universe
unsigned char dhcpv6_msg_type
struct interface_info * interface
struct option_state * options
int(* decode)(struct option_state *, const unsigned char *, unsigned, struct universe *)
void(* store_length)(unsigned char *, u_int32_t)
void(* save_func)(struct universe *, struct option_state *, struct option_cache *, isc_boolean_t)
int(* encapsulate)(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *)
void(* store_tag)(unsigned char *, u_int32_t)
option_code_hash_t * code_hash
u_int32_t(* get_tag)(const unsigned char *)
u_int32_t(* get_length)(const unsigned char *)
struct option_cache *(* lookup_func)(struct universe *, struct option_state *, unsigned)
struct universe fqdn_universe
struct universe nwip_universe
char * default_option_format
struct universe vsio_universe
int option_reference(struct option **dest, struct option *src, const char *file, int line)
int option_dereference(struct option **dest, const char *file, int line)
universe_hash_t * universe_hash
struct universe dhcpv6_universe
struct universe ** universes
int evaluate_option_cache(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 option_cache *oc, const char *file, int line)
int make_const_data(struct expression **expr, const unsigned char *data, unsigned len, int terminated, int allocate, const char *file, int line)
void expression_dereference(struct expression **eptr, const char *file, int line)
struct binding_scope * global_scope
pair cons(caddr_t car, pair cdr)
int make_concat(struct expression **expr, struct expression *left, struct expression *right)
struct expression * offset