32 #if defined (FAILOVER_PROTOCOL)
43 { 0,
"unused", FT_UNDEF, 0, 0, 0 },
44 { FTO_ADDRESSES_TRANSFERRED,
"addresses-transferred", FT_UINT32, 1,
45 FM_OFFSET(addresses_transferred), FTB_ADDRESSES_TRANSFERRED },
46 { FTO_ASSIGNED_IP_ADDRESS,
"assigned-IP-address", FT_IPADDR, 1,
47 FM_OFFSET(assigned_addr), FTB_ASSIGNED_IP_ADDRESS },
48 { FTO_BINDING_STATUS,
"binding-status", FT_UINT8, 1,
49 FM_OFFSET(binding_status), FTB_BINDING_STATUS },
50 { FTO_CLIENT_IDENTIFIER,
"client-identifier", FT_BYTES, 0,
51 FM_OFFSET(client_identifier), FTB_CLIENT_IDENTIFIER },
52 { FTO_CHADDR,
"client-hardware-address", FT_BYTES, 0,
53 FM_OFFSET(chaddr), FTB_CHADDR },
54 { FTO_CLTT,
"client-last-transaction-time", FT_UINT32, 1,
55 FM_OFFSET(cltt), FTB_CLTT },
56 { FTO_REPLY_OPTIONS,
"client-reply-options", FT_BYTES, 0,
57 FM_OFFSET(reply_options), FTB_REPLY_OPTIONS },
58 { FTO_REQUEST_OPTIONS,
"client-request-options", FT_BYTES, 0,
59 FM_OFFSET(request_options), FTB_REQUEST_OPTIONS },
60 { FTO_DDNS,
"DDNS", FT_DDNS, 1, FM_OFFSET(ddns), FTB_DDNS },
61 { FTO_DELAYED_SERVICE,
"delayed-service", FT_UINT8, 1,
62 FM_OFFSET(delayed_service), FTB_DELAYED_SERVICE },
63 { FTO_HBA,
"hash-bucket-assignment", FT_BYTES, 0,
64 FM_OFFSET(hba), FTB_HBA },
65 { FTO_IP_FLAGS,
"IP-flags", FT_UINT16, 1,
66 FM_OFFSET(ip_flags), FTB_IP_FLAGS },
67 { FTO_LEASE_EXPIRY,
"lease-expiration-time", FT_UINT32, 1,
68 FM_OFFSET(expiry), FTB_LEASE_EXPIRY },
69 { FTO_MAX_UNACKED,
"max-unacked-bndupd", FT_UINT32, 1,
70 FM_OFFSET(max_unacked), FTB_MAX_UNACKED },
71 { FTO_MCLT,
"MCLT", FT_UINT32, 1, FM_OFFSET(mclt), FTB_MCLT },
72 { FTO_MESSAGE,
"message", FT_TEXT, 0,
73 FM_OFFSET(message), FTB_MESSAGE },
74 { FTO_MESSAGE_DIGEST,
"message-digest", FT_BYTES, 0,
75 FM_OFFSET(message_digest), FTB_MESSAGE_DIGEST },
76 { FTO_POTENTIAL_EXPIRY,
"potential-expiration-time", FT_UINT32, 1,
77 FM_OFFSET(potential_expiry), FTB_POTENTIAL_EXPIRY },
78 { FTO_RECEIVE_TIMER,
"receive-timer", FT_UINT32, 1,
79 FM_OFFSET(receive_timer), FTB_RECEIVE_TIMER },
80 { FTO_PROTOCOL_VERSION,
"protocol-version", FT_UINT8, 1,
81 FM_OFFSET(protocol_version), FTB_PROTOCOL_VERSION },
82 { FTO_REJECT_REASON,
"reject-reason", FT_UINT8, 1,
83 FM_OFFSET(reject_reason), FTB_REJECT_REASON },
84 { FTO_RELATIONSHIP_NAME,
"relationship-name", FT_BYTES, 0,
85 FM_OFFSET(relationship_name), FTB_RELATIONSHIP_NAME },
86 { FTO_SERVER_FLAGS,
"server-flags", FT_UINT8, 1,
87 FM_OFFSET(server_flags), FTB_SERVER_FLAGS },
88 { FTO_SERVER_STATE,
"server-state", FT_UINT8, 1,
89 FM_OFFSET(server_state), FTB_SERVER_STATE },
90 { FTO_STOS,
"start-time-of-state", FT_UINT32, 1,
91 FM_OFFSET(stos), FTB_STOS },
92 { FTO_TLS_REPLY,
"TLS-reply", FT_UINT8, 1,
93 FM_OFFSET(tls_reply), FTB_TLS_REPLY },
94 { FTO_TLS_REQUEST,
"TLS-request", FT_UINT8, 1,
95 FM_OFFSET(tls_request), FTB_TLS_REQUEST },
96 { FTO_VENDOR_CLASS,
"vendor-class-identifier", FT_BYTES, 0,
97 FM_OFFSET(vendor_class), FTB_VENDOR_CLASS },
98 { FTO_VENDOR_OPTIONS,
"vendor-specific-options", FT_BYTES, 0,
99 FM_OFFSET(vendor_options), FTB_VENDOR_OPTIONS }
111 FTB_ADDRESSES_TRANSFERRED,
112 (FTB_ASSIGNED_IP_ADDRESS | FTB_BINDING_STATUS | FTB_CLIENT_IDENTIFIER |
113 FTB_CHADDR | FTB_DDNS | FTB_IP_FLAGS | FTB_LEASE_EXPIRY |
114 FTB_POTENTIAL_EXPIRY | FTB_STOS | FTB_CLTT | FTB_REQUEST_OPTIONS |
116 (FTB_ASSIGNED_IP_ADDRESS | FTB_BINDING_STATUS | FTB_CLIENT_IDENTIFIER |
117 FTB_CHADDR | FTB_DDNS | FTB_IP_FLAGS | FTB_LEASE_EXPIRY |
118 FTB_POTENTIAL_EXPIRY | FTB_STOS | FTB_CLTT | FTB_REQUEST_OPTIONS |
119 FTB_REPLY_OPTIONS | FTB_REJECT_REASON | FTB_MESSAGE),
120 (FTB_RELATIONSHIP_NAME | FTB_MAX_UNACKED | FTB_RECEIVE_TIMER |
121 FTB_VENDOR_CLASS | FTB_PROTOCOL_VERSION | FTB_TLS_REQUEST |
123 (FTB_RELATIONSHIP_NAME | FTB_MAX_UNACKED | FTB_RECEIVE_TIMER |
124 FTB_VENDOR_CLASS | FTB_PROTOCOL_VERSION | FTB_TLS_REPLY |
125 FTB_REJECT_REASON | FTB_MESSAGE),
129 (FTB_SERVER_STATE | FTB_SERVER_FLAGS | FTB_STOS),
131 (FTB_REJECT_REASON | FTB_MESSAGE)
153 "message length wait",
162 "free",
"active",
"expired",
"released",
"abandoned",
172 { NULL, NULL, NULL, 0, 0 }
176 static struct option server_options[] = {
189 {
"use-lease-addr-for-default-route",
"f",
221 {
"log-facility",
"Nsyslog-facilities.",
237 #if defined(DELAYED_ACK)
241 #if defined(LDAP_CONFIGURATION)
251 #if defined(LDAP_USE_SSL)
258 {
"ldap-tls-crlcheck",
"Nldap-tls-crlcheck.", &
server_universe, 75, 1 },
270 { NULL, NULL, NULL, 0, 0 }
273 #if defined(LDAP_CONFIGURATION)
275 {
"static", LDAP_METHOD_STATIC },
276 {
"dynamic", LDAP_METHOD_DYNAMIC },
286 #if defined(LDAP_USE_SSL)
288 {
"off", LDAP_SSL_OFF },
289 {
"on",LDAP_SSL_ON },
290 {
"ldaps", LDAP_SSL_LDAPS },
291 {
"start_tls", LDAP_SSL_TLS },
298 ldap_ssl_usage_values
302 {
"never", LDAP_OPT_X_TLS_NEVER },
303 {
"hard", LDAP_OPT_X_TLS_HARD },
304 {
"demand", LDAP_OPT_X_TLS_DEMAND},
305 {
"allow", LDAP_OPT_X_TLS_ALLOW },
306 {
"try", LDAP_OPT_X_TLS_TRY },
311 "ldap-tls-reqcert", 1,
312 ldap_tls_reqcert_values
316 {
"none", LDAP_OPT_X_TLS_CRL_NONE},
317 {
"peer", LDAP_OPT_X_TLS_CRL_PEER},
318 {
"all", LDAP_OPT_X_TLS_CRL_ALL },
323 "ldap-tls-crlcheck", 1,
324 ldap_tls_crlcheck_values
344 #if defined (LOG_KERN)
345 {
"kern", LOG_KERN },
347 #if defined (LOG_USER)
348 {
"user", LOG_USER },
350 #if defined (LOG_MAIL)
351 {
"mail", LOG_MAIL },
353 #if defined (LOG_DAEMON)
354 {
"daemon", LOG_DAEMON },
356 #if defined (LOG_AUTH)
357 {
"auth", LOG_AUTH },
359 #if defined (LOG_SYSLOG)
360 {
"syslog", LOG_SYSLOG },
362 #if defined (LOG_LPR)
365 #if defined (LOG_NEWS)
366 {
"news", LOG_NEWS },
368 #if defined (LOG_UUCP)
369 {
"uucp", LOG_UUCP },
371 #if defined (LOG_CRON)
372 {
"cron", LOG_CRON },
374 #if defined (LOG_AUTHPRIV)
375 {
"authpriv", LOG_AUTHPRIV },
377 #if defined (LOG_FTP)
380 #if defined (LOG_LOCAL0)
381 {
"local0", LOG_LOCAL0 },
383 #if defined (LOG_LOCAL1)
384 {
"local1", LOG_LOCAL1 },
386 #if defined (LOG_LOCAL2)
387 {
"local2", LOG_LOCAL2 },
389 #if defined (LOG_LOCAL3)
390 {
"local3", LOG_LOCAL3 },
392 #if defined (LOG_LOCAL4)
393 {
"local4", LOG_LOCAL4 },
395 #if defined (LOG_LOCAL5)
396 {
"local5", LOG_LOCAL5 },
398 #if defined (LOG_LOCAL6)
399 {
"local6", LOG_LOCAL6 },
401 #if defined (LOG_LOCAL7)
402 {
"local7", LOG_LOCAL7 },
409 "syslog-facilities", 1,
443 log_fatal (
"Can't allocate agent option hash table.");
444 for (i = 0 ; agent_options[i].
name ; i++) {
446 &agent_options[i].
code, 0,
447 &agent_options[i],
MDL);
449 agent_options[i].
name, 0,
450 &agent_options[i],
MDL);
452 #if defined(REPORT_HASH_PERFORMANCE)
453 log_info(
"Relay Agent name hash: %s",
455 log_info(
"Relay Agent code hash: %s",
484 log_fatal (
"Can't allocate server option hash table.");
485 for (i = 0 ; server_options[i].
name ; i++) {
487 &server_options[i].
code, 0,
488 &server_options[i],
MDL);
490 server_options[i].
name, 0,
491 &server_options[i],
MDL);
493 #if defined(REPORT_HASH_PERFORMANCE)
494 log_info(
"Server-Config Option name hash: %s",
496 log_info(
"Server-Config Option code hash: %s",
struct option_cache * lookup_hashed_option(struct universe *universe, struct option_state *options, unsigned code)
int(* decode)(struct option_state *, const unsigned char *, unsigned, struct universe *)
int(* encapsulate)(struct data_string *, struct packet *, struct lease *, struct client_state *, struct option_state *, struct option_state *, struct binding_scope **, struct universe *)
#define DHO_DHCP_AGENT_OPTIONS
void save_linked_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)
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 option_cache *(* lookup_func)(struct universe *, struct option_state *, unsigned)
int(* option_state_dereference)(struct universe *, struct option_state *, const char *, int)
struct universe dhcp_universe
u_int32_t(* get_length)(const unsigned char *)
struct universe agent_universe
failover_option_t null_failover_option
const char * binding_state_names[]
void log_fatal(const char *,...) __attribute__((__format__(__printf__
const char * dhcp_flink_state_names[]
int parse_option_buffer(struct option_state *options, const unsigned char *buffer, unsigned length, struct universe *universe)
void(* store_length)(unsigned char *, u_int32_t)
struct enumeration ddns_styles
universe_hash_t * universe_hash
failover_option_t skip_failover_option
int linked_option_state_dereference(struct universe *universe, struct option_state *state, const char *file, int line)
struct universe * config_universe
void delete_hashed_option(struct universe *universe, struct option_state *options, int code)
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 *))
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)
int hashed_option_state_dereference(struct universe *universe, struct option_state *state, const char *file, int line)
struct enumeration syslog_enum
int int log_info(const char *,...) __attribute__((__format__(__printf__
void(* delete_func)(struct universe *universe, struct option_state *, int)
void initialize_server_option_spaces()
struct enumeration_value syslog_values[]
void putUChar(unsigned char *, u_int32_t)
struct universe ** universes
u_int32_t getUChar(const unsigned char *)
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_tag)(const unsigned char *)
struct enumeration_value ddns_styles_values[]
struct failover_option_info ft_options[]
void(* store_tag)(unsigned char *, u_int32_t)
struct universe server_universe
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 *))
option_code_hash_t * code_hash
struct option * vendor_cfg_option
void(* save_func)(struct universe *, struct option_state *, struct option_cache *, isc_boolean_t)
#define SV_VENDOR_OPTION_SPACE
struct option_cache * lookup_linked_option(struct universe *universe, struct option_state *options, unsigned code)