ISC DHCP 4.4.3-P1
A reference DHCPv4 and DHCPv6 implementation
 
Loading...
Searching...
No Matches
confpars.c File Reference
#include "dhcpd.h"

Go to the source code of this file.

Functions

isc_result_t readconf ()
 
isc_result_t read_conf_file (const char *filename, struct group *group, int group_type, int leasep)
 
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 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)
 
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)
 

Function Documentation

◆ conf_file_subparse()

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

Definition at line 250 of file confpars.c.

◆ get_permit()

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_untilor pond structure. One of them will be filled in if the configuration includes an "after" clause

Definition at line 1558 of file confpars.c.

◆ lease_file_subparse()

isc_result_t lease_file_subparse ( struct parse * cfile)

Definition at line 277 of file confpars.c.

◆ parse_address_range()

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

Definition at line 3787 of file confpars.c.

◆ parse_allow_deny()

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

Definition at line 4684 of file confpars.c.

◆ parse_class_declaration()

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

Definition at line 2226 of file confpars.c.

◆ parse_fixed_addr_param()

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

Definition at line 3070 of file confpars.c.

◆ parse_group_declaration()

void parse_group_declaration ( struct parse * cfile,
struct group * group )

Definition at line 2977 of file confpars.c.

◆ parse_host_declaration()

void parse_host_declaration ( struct parse * cfile,
struct group * group )

Definition at line 1959 of file confpars.c.

◆ parse_ia_na_declaration()

void parse_ia_na_declaration ( struct parse * cfile)

Definition at line 4752 of file confpars.c.

◆ parse_ia_pd_declaration()

void parse_ia_pd_declaration ( struct parse * cfile)

Definition at line 5637 of file confpars.c.

◆ parse_ia_ta_declaration()

void parse_ia_ta_declaration ( struct parse * cfile)

Definition at line 5200 of file confpars.c.

◆ parse_lbrace()

int parse_lbrace ( struct parse * cfile)

Definition at line 1941 of file confpars.c.

◆ parse_lease_declaration()

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

Definition at line 3141 of file confpars.c.

◆ parse_pool_statement()

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 1732 of file confpars.c.

◆ parse_shared_net_declaration()

void parse_shared_net_declaration ( struct parse * cfile,
struct group * group )

Definition at line 2606 of file confpars.c.

◆ parse_statement()

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

Definition at line 364 of file confpars.c.

◆ parse_subnet6_declaration()

void parse_subnet6_declaration ( struct parse * cfile,
struct shared_network * share )

Definition at line 2852 of file confpars.c.

◆ parse_subnet_declaration()

void parse_subnet_declaration ( struct parse * cfile,
struct shared_network * share )

Definition at line 2763 of file confpars.c.

◆ permit_list_match()

int permit_list_match ( struct permit * lhs,
struct permit * rhs )

Definition at line 1688 of file confpars.c.

◆ read_conf_file()

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

Definition at line 79 of file confpars.c.

◆ readconf()

isc_result_t readconf ( void )

Definition at line 64 of file confpars.c.