doesn't configure one. */
struct string_list *media; /* Possible network media values. */
char *script_name; /* Name of config script. */
+ char *vendor_space_name; /* Name of config script. */
enum policy bootp_policy;
/* Ignore, accept or prefer BOOTP
responses. */
/* options.c */
+extern struct option *vendor_cfg_option;
int parse_options PROTO ((struct packet *));
-int parse_option_buffer PROTO ((struct packet *, unsigned char *, unsigned));
+int parse_option_buffer PROTO ((struct option_state *,
+ unsigned char *, unsigned, struct universe *));
+int parse_encapsulated_suboptions (struct option_state *, struct option *,
+ unsigned char *, unsigned,
+ struct universe *, struct universe *);
int cons_options PROTO ((struct packet *, struct dhcp_packet *, struct lease *,
int, struct option_state *, struct option_state *,
struct binding_scope **,
- int, int, int, struct data_string *));
+ int, int, int, struct data_string *, const char *));
+int fqdn_universe_decode (struct option_state *,
+ unsigned char *, unsigned, struct universe *);
int store_options PROTO ((unsigned char *, unsigned, struct packet *,
struct lease *, struct option_state *,
struct option_state *, struct binding_scope **,
- unsigned *, int, unsigned, unsigned, int));
+ unsigned *, int, unsigned, unsigned,
+ int, const char *));
const char *pretty_print_option PROTO ((unsigned int, const unsigned char *,
unsigned, int, int));
-void do_packet PROTO ((struct interface_info *,
- struct dhcp_packet *, unsigned,
- unsigned int, struct iaddr, struct hardware *));
-int hashed_option_get PROTO ((struct data_string *, struct universe *,
- struct packet *, struct lease *,
- struct option_state *, struct option_state *,
- struct option_state *, struct binding_scope **,
- unsigned));
-int agent_option_get PROTO ((struct data_string *, struct universe *,
- struct packet *, struct lease *,
- struct option_state *, struct option_state *,
- struct option_state *, struct binding_scope **,
- unsigned));
-void hashed_option_set PROTO ((struct universe *, struct option_state *,
- struct option_cache *,
- enum statement_op));
+int get_option (struct data_string *, struct universe *,
+ struct packet *, struct lease *,
+ struct option_state *, struct option_state *,
+ struct option_state *, struct binding_scope **, unsigned);
+void set_option (struct universe *, struct option_state *,
+ struct option_cache *, enum statement_op);
struct option_cache *lookup_option PROTO ((struct universe *,
struct option_state *, unsigned));
struct option_cache *lookup_hashed_option PROTO ((struct universe *,
struct option_state *,
unsigned));
+int save_option_buffer (struct universe *, struct option_state *,
+ struct buffer *, unsigned char *, unsigned,
+ struct option *, int);
void save_option PROTO ((struct universe *,
struct option_state *, struct option_cache *));
void save_hashed_option PROTO ((struct universe *,
int hashed_option_state_dereference PROTO ((struct universe *,
struct option_state *,
const char *, int));
-int agent_option_state_dereference PROTO ((struct universe *,
- struct option_state *,
- const char *, int));
int store_option PROTO ((struct data_string *,
struct universe *, struct packet *, struct lease *,
struct option_state *, struct option_state *,
struct option_state *,
struct binding_scope **,
struct universe *));
+int fqdn_option_space_encapsulate (struct data_string *,
+ struct packet *, struct lease *,
+ struct option_state *,
+ struct option_state *,
+ struct binding_scope **,
+ struct universe *);
+void option_space_foreach (struct packet *, struct lease *,
+ struct option_state *,
+ struct option_state *,
+ struct binding_scope **,
+ struct universe *, void *,
+ void (*) (struct option_cache *,
+ struct packet *,
+ struct lease *, struct option_state *,
+ struct option_state *,
+ struct binding_scope **,
+ struct universe *, void *));
+void hashed_option_space_foreach (struct packet *, struct lease *,
+ struct option_state *,
+ struct option_state *,
+ struct binding_scope **,
+ struct universe *, void *,
+ void (*) (struct option_cache *,
+ struct packet *,
+ struct lease *,
+ struct option_state *,
+ struct option_state *,
+ struct binding_scope **,
+ struct universe *, void *));
+int linked_option_get PROTO ((struct data_string *, struct universe *,
+ struct packet *, struct lease *,
+ struct option_state *, struct option_state *,
+ struct option_state *, struct binding_scope **,
+ unsigned));
+int linked_option_state_dereference PROTO ((struct universe *,
+ struct option_state *,
+ const char *, int));
+void save_linked_option (struct universe *, struct option_state *,
+ struct option_cache *);
+void linked_option_space_foreach (struct packet *, struct lease *,
+ struct option_state *,
+ struct option_state *,
+ struct binding_scope **,
+ struct universe *, void *,
+ void (*) (struct option_cache *,
+ struct packet *,
+ struct lease *,
+ struct option_state *,
+ struct option_state *,
+ struct binding_scope **,
+ struct universe *, void *));
+int linked_option_space_encapsulate (struct data_string *, struct packet *,
+ struct lease *, struct option_state *,
+ struct option_state *,
+ struct binding_scope **,
+ struct universe *);
+void delete_linked_option (struct universe *, struct option_state *, int);
+struct option_cache *lookup_linked_option (struct universe *,
+ struct option_state *, unsigned);
+void do_packet PROTO ((struct interface_info *,
+ struct dhcp_packet *, unsigned,
+ unsigned int, struct iaddr, struct hardware *));
/* dhcpd.c */
extern TIME cur_time;
struct option_state *, struct binding_scope **,
struct expression *);
int binding_value_dereference (struct binding_value **, const char *, int);
-int fundef_dereference (struct fundef **, const char *, int);
#if defined (NSUPDATE)
int evaluate_dns_expression PROTO ((ns_updrec **, struct packet *,
struct lease *, struct option_state *,
int free_bindings PROTO ((struct binding_scope *, const char *, int));
int binding_scope_dereference PROTO ((struct binding_scope **,
const char *, int));
+int fundef_dereference (struct fundef **, const char *, int);
+int data_subexpression_length (int *, struct expression *);
+int expr_valid_for_context (struct expression *, enum expression_context);
/* dhcp.c */
extern int outstanding_pings;
struct iaddr, struct hardware *));
extern struct timeout *timeouts;
extern omapi_object_type_t *dhcp_type_interface;
+isc_result_t interface_initialize (omapi_object_t *, const char *, int);
void discover_interfaces PROTO ((int));
int setup_fallback (struct interface_info **, const char *, int);
int if_readsocket PROTO ((omapi_object_t *));
/* tables.c */
extern struct universe dhcp_universe;
-extern struct universe nwip_universe;
extern struct option dhcp_options [256];
+extern struct universe nwip_universe;
+extern struct option nwip_options [256];
+extern struct universe fqdn_universe;
+extern struct option fqdn_options [256];
extern int dhcp_option_default_priority_list [];
extern int dhcp_option_default_priority_list_count;
extern const char *hardware_types [256];
void destroy_client_lease PROTO ((struct client_lease *));
void rewrite_client_leases PROTO ((void));
+void write_lease_option (struct option_cache *, struct packet *,
+ struct lease *, struct option_state *,
+ struct option_state *, struct binding_scope **,
+ struct universe *, void *);
int write_client_lease PROTO ((struct client_state *,
struct client_lease *, int, int));
int dhcp_option_ev_name (char *, size_t, struct option *);
void script_init PROTO ((struct client_state *, const char *,
struct string_list *));
+void client_option_envadd (struct option_cache *, struct packet *,
+ struct lease *, struct option_state *,
+ struct option_state *, struct binding_scope **,
+ struct universe *, void *);
void script_write_params PROTO ((struct client_state *,
const char *, struct client_lease *));
int script_go PROTO ((struct client_state *));