server/confpars.c File Reference

#include "dhcpd.h"

Go to the source code of this file.

Functions

void parse_trace_setup ()
isc_result_t readconf ()
isc_result_t read_conf_file (const char *filename, struct group *group, int group_type, int leasep)
void trace_conf_input (trace_type_t *ttype, unsigned len, char *data)
void trace_conf_stop (trace_type_t *ttype)
isc_result_t conf_file_subparse (struct parse *cfile, struct group *group, int group_type)
isc_result_t lease_file_subparse (struct parse *cfile)
int parse_statement (struct parse *cfile, struct group *group, int type, struct host_decl *host_decl, int declaration)
void parse_failover_peer (struct parse *cfile, struct group *group, int type)
void parse_failover_state_declaration (struct parse *cfile, dhcp_failover_state_t *peer)
void parse_failover_state (struct parse *cfile, enum failover_state *state, TIME *stos)
void get_permit (struct parse *cfile, struct permit **permit_head, int is_allow, TIME *valid_from, TIME *valid_until)
 Parse allow and deny statements.
int permit_list_match (struct permit *lhs, struct permit *rhs)
void parse_pool_statement (struct parse *cfile, struct group *group, int type)
 Parse a pool statement.
int parse_lbrace (struct parse *cfile)
void parse_host_declaration (struct parse *cfile, struct group *group)
int parse_class_declaration (struct class **cp, struct parse *cfile, struct group *group, int type)
void parse_shared_net_declaration (struct parse *cfile, struct group *group)
void parse_subnet_declaration (struct parse *cfile, struct shared_network *share)
void parse_subnet6_declaration (struct parse *cfile, struct shared_network *share)
void parse_group_declaration (struct parse *cfile, struct group *group)
int parse_fixed_addr_param (struct option_cache **oc, struct parse *cfile, enum dhcp_token type)
int parse_lease_declaration (struct lease **lp, struct parse *cfile)
void parse_address_range (struct parse *cfile, struct group *group, int type, struct pool *inpool, struct lease **lpchain)
void parse_address_range6 (struct parse *cfile, struct group *group, struct ipv6_pond *inpond)
void parse_prefix6 (struct parse *cfile, struct group *group, struct ipv6_pond *inpond)
void parse_fixed_prefix6 (struct parse *cfile, struct host_decl *host_decl)
void parse_pool6_statement (struct parse *cfile, struct group *group, int type)
 Parse a pool6 statement.
int parse_allow_deny (struct option_cache **oc, struct parse *cfile, int flag)
void parse_ia_na_declaration (struct parse *cfile)
void parse_ia_ta_declaration (struct parse *cfile)
void parse_ia_pd_declaration (struct parse *cfile)
void parse_server_duid (struct parse *cfile)
void parse_server_duid_conf (struct parse *cfile)

Variables

trace_type_ttrace_readconf_type
trace_type_ttrace_readleases_type

Detailed Description

Definition in file confpars.c.


Function Documentation

isc_result_t conf_file_subparse ( struct parse cfile,
struct group group,
int  group_type 
)

Definition at line 239 of file confpars.c.

void get_permit ( struct parse cfile,
struct permit **  permit_head,
int  is_allow,
TIME valid_from,
TIME valid_until 
)

Parse allow and deny statements.

This function handles the common processing code for permit and deny statements in the parse_pool_statement and parse_pool6_statement functions. It reads in the configuration and constructs a new permit structure that it attachs to the permit_head passed in from the caller.

The allow or deny token should already be consumed, this function expects one of the following: known-clients; unknown-clients; known clients; unknown clients; authenticated clients; unauthenticated clients; all clients; dynamic bootp clients; members of <class name>="">; after <date>;

Parameters:
[in] cfile = the configuration file being parsed
[in] permit_head = the head of the permit list (permit or prohibit) to which to attach the newly created permit structure
[in] is_allow = 1 if this is being invoked for an allow statement = 0 if this is being invoked for a deny statement
[in] valid_from = pointers to the time values from the enclosing pool
[in] valid_until or pond structure. One of them will be filled in if the configuration includes an "after" clause

Definition at line 1424 of file confpars.c.

isc_result_t lease_file_subparse ( struct parse cfile  ) 

Definition at line 266 of file confpars.c.

void parse_address_range ( struct parse cfile,
struct group group,
int  type,
struct pool inpool,
struct lease **  lpchain 
)

Definition at line 3611 of file confpars.c.

void parse_address_range6 ( struct parse cfile,
struct group group,
struct ipv6_pond inpond 
)

Definition at line 3940 of file confpars.c.

int parse_allow_deny ( struct option_cache **  oc,
struct parse cfile,
int  flag 
)

Definition at line 4420 of file confpars.c.

int parse_class_declaration ( struct class **  cp,
struct parse cfile,
struct group group,
int  type 
)

Definition at line 2081 of file confpars.c.

void parse_failover_peer ( struct parse cfile,
struct group group,
int  type 
)

Definition at line 870 of file confpars.c.

void parse_failover_state ( struct parse cfile,
enum failover_state state,
TIME stos 
)

Definition at line 1299 of file confpars.c.

void parse_failover_state_declaration ( struct parse cfile,
dhcp_failover_state_t peer 
)

Definition at line 1194 of file confpars.c.

int parse_fixed_addr_param ( struct option_cache **  oc,
struct parse cfile,
enum dhcp_token  type 
)

Definition at line 2903 of file confpars.c.

void parse_fixed_prefix6 ( struct parse cfile,
struct host_decl host_decl 
)

Definition at line 4201 of file confpars.c.

void parse_group_declaration ( struct parse cfile,
struct group group 
)

Definition at line 2810 of file confpars.c.

void parse_host_declaration ( struct parse cfile,
struct group group 
)

Definition at line 1817 of file confpars.c.

void parse_ia_na_declaration ( struct parse cfile  ) 

Definition at line 4487 of file confpars.c.

void parse_ia_pd_declaration ( struct parse cfile  ) 

Definition at line 5371 of file confpars.c.

void parse_ia_ta_declaration ( struct parse cfile  ) 

Definition at line 4929 of file confpars.c.

int parse_lbrace ( struct parse cfile  ) 

Definition at line 1799 of file confpars.c.

int parse_lease_declaration ( struct lease **  lp,
struct parse cfile 
)

Definition at line 2974 of file confpars.c.

void parse_pool6_statement ( struct parse cfile,
struct group group,
int  type 
)

Parse a pool6 statement.

Pool statements are used to group declarations and permit & deny information with a specific address range. They must be declared within a shared network or subnet and there may be multiple pools withing a shared network or subnet. Each pool may have a different set of permit or deny options.

Parameters:
[in] cfile = the configuration file being parsed
[in] group = the group structure for this pool
[in] type = the type of the enclosing statement. This must be SUBNET_DECL for this function.
Returns:
void - This function either parses the statement and updates the structures or it generates an error message and possible halts the program if it encounters a problem.

Definition at line 4298 of file confpars.c.

void parse_pool_statement ( struct parse cfile,
struct group group,
int  type 
)

Parse a pool statement.

Pool statements are used to group declarations and permit & deny information with a specific address range. They must be declared within a shared network or subnet and there may be multiple pools withing a shared network or subnet. Each pool may have a different set of permit or deny options.

Parameters:
[in] cfile = the configuration file being parsed
[in] group = the group structure for this pool
[in] type = the type of the enclosing statement. This must be SHARED_NET_DECL or SUBNET_DECL for this function.
Returns:
void - This function either parses the statement and updates the structures or it generates an error message and possible halts the program if it encounters a problem.

Definition at line 1598 of file confpars.c.

void parse_prefix6 ( struct parse cfile,
struct group group,
struct ipv6_pond inpond 
)

Definition at line 4095 of file confpars.c.

void parse_server_duid ( struct parse cfile  ) 

Definition at line 5823 of file confpars.c.

void parse_server_duid_conf ( struct parse cfile  ) 

Definition at line 5868 of file confpars.c.

void parse_shared_net_declaration ( struct parse cfile,
struct group group 
)

Definition at line 2459 of file confpars.c.

int parse_statement ( struct parse cfile,
struct group group,
int  type,
struct host_decl host_decl,
int  declaration 
)

Definition at line 351 of file confpars.c.

void parse_subnet6_declaration ( struct parse cfile,
struct shared_network share 
)

Definition at line 2698 of file confpars.c.

void parse_subnet_declaration ( struct parse cfile,
struct shared_network share 
)

Definition at line 2616 of file confpars.c.

void parse_trace_setup ( void   ) 

Definition at line 42 of file confpars.c.

int permit_list_match ( struct permit lhs,
struct permit rhs 
)

Definition at line 1554 of file confpars.c.

isc_result_t read_conf_file ( const char *  filename,
struct group group,
int  group_type,
int  leasep 
)

Definition at line 72 of file confpars.c.

isc_result_t readconf ( void   ) 

Definition at line 57 of file confpars.c.

void trace_conf_input ( trace_type_t ttype,
unsigned  len,
char *  data 
)

Definition at line 185 of file confpars.c.

void trace_conf_stop ( trace_type_t ttype  ) 

Definition at line 232 of file confpars.c.


Variable Documentation

Definition at line 39 of file confpars.c.

Definition at line 40 of file confpars.c.


Generated on 5 Apr 2014 for ISC DHCP by  doxygen 1.6.1