#include "keama.h"
#include <sys/errno.h>
#include <arpa/inet.h>
#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | subnet |
Functions | |
TAILQ_HEAD (subnets, subnet) | |
TAILQ_HEAD (ranges, range) | |
void | read_conf_file (struct parse *parent, const char *filename, int group_type) |
size_t | conf_file_subparse (struct parse *cfile, int type) |
isc_boolean_t | parse_statement (struct parse *cfile, int type, isc_boolean_t declaration) |
void | get_permit (struct parse *cfile, struct element *permit_head) |
Parse allow and deny statements. | |
void | parse_pool_statement (struct parse *cfile, int type) |
Parse a pool statement. | |
void | parse_lbrace (struct parse *cfile) |
void | parse_host_declaration (struct parse *cfile) |
void | parse_class_declaration (struct parse *cfile, int type) |
void | parse_shared_net_declaration (struct parse *cfile) |
void | parse_subnet_declaration (struct parse *cfile) |
void | parse_subnet6_declaration (struct parse *cfile) |
void | parse_group_declaration (struct parse *cfile) |
void | close_group (struct parse *cfile, struct element *group) |
struct element * | parse_fixed_addr_param (struct parse *cfile, enum dhcp_token type) |
void | parse_address_range (struct parse *cfile, int type, size_t where) |
void | parse_address_range6 (struct parse *cfile, int type, size_t where) |
void | parse_prefix6 (struct parse *cfile, int type, size_t where) |
void | parse_fixed_prefix6 (struct parse *cfile, size_t host_decl) |
void | parse_pool6_statement (struct parse *cfile, int type) |
Parse a pool6 statement. | |
struct element * | parse_allow_deny (struct parse *cfile, int flag) |
void | parse_server_duid_conf (struct parse *cfile) |
void | parse_directive (struct parse *cfile) |
Parse (and execute) a directive (extension) | |
void | parse_option_space_dir (struct parse *cfile) |
void | parse_option_code_dir (struct parse *cfile, struct option *option) |
void | parse_option_status_dir (struct parse *cfile, struct option *option, enum dhcp_token token) |
void | parse_option_local_dir (struct parse *cfile, struct option *option) |
void | parse_option_define_dir (struct parse *cfile, struct option *option) |
Variables | |
isc_boolean_t | failover_once = ISC_TRUE |
isc_boolean_t | use_client_id = ISC_FALSE |
isc_boolean_t | use_flex_id = ISC_FALSE |
isc_boolean_t | use_hw_address = ISC_FALSE |
const struct option * | host_id_option = NULL |
int | host_id_relays = 0 |
unsigned | subnet_counter = 0 |
unsigned | subclass_counter = 0 |
Definition at line 2589 of file confparse.c.
Definition at line 535 of file confparse.c.
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.
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>;
[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 |
Definition at line 1004 of file confparse.c.
Definition at line 3097 of file confparse.c.
Definition at line 3212 of file confparse.c.
Definition at line 3703 of file confparse.c.
Definition at line 1584 of file confparse.c.
void parse_directive | ( | struct parse * | cfile | ) |
Parse (and execute) a directive (extension)
OPTION SPACE <name> [ALIAS <kea-name>] [KNOWN*2|UNKNOWN*2|DYNAMIC] OPTION <universe>.<name> [CHECK] [ALIAS <name>] [CODE = "<format>"] [KNOWN*2|UNKNOWN*2|DYNAMIC] [LOCAL|DEFINE]
Definition at line 4001 of file confparse.c.
struct element * parse_fixed_addr_param | ( | struct parse * | cfile, |
enum dhcp_token | type ) |
Definition at line 3008 of file confparse.c.
void parse_fixed_prefix6 | ( | struct parse * | cfile, |
size_t | host_decl ) |
Definition at line 3409 of file confparse.c.
void parse_group_declaration | ( | struct parse * | cfile | ) |
Definition at line 2520 of file confparse.c.
void parse_host_declaration | ( | struct parse * | cfile | ) |
Definition at line 1282 of file confparse.c.
void parse_lbrace | ( | struct parse * | cfile | ) |
Definition at line 1269 of file confparse.c.
Definition at line 4156 of file confparse.c.
Definition at line 4316 of file confparse.c.
Definition at line 4268 of file confparse.c.
void parse_option_space_dir | ( | struct parse * | cfile | ) |
Definition at line 4091 of file confparse.c.
void parse_option_status_dir | ( | struct parse * | cfile, |
struct option * | option, | ||
enum dhcp_token | token ) |
Definition at line 4236 of file confparse.c.
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.
[in] | cfile | = the configuration file being parsed |
[in] | type | = the type of the enclosing statement. This must be SUBNET_DECL for this function. |
Definition at line 3472 of file confparse.c.
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.
[in] | cfile | = the configuration file being parsed |
[in] | type | = the type of the enclosing statement. This must be SHARED_NET_DECL or SUBNET_DECL for this function. |
Definition at line 1142 of file confparse.c.
Definition at line 3333 of file confparse.c.
void parse_server_duid_conf | ( | struct parse * | cfile | ) |
Definition at line 3790 of file confparse.c.
void parse_shared_net_declaration | ( | struct parse * | cfile | ) |
Definition at line 2105 of file confparse.c.
isc_boolean_t parse_statement | ( | struct parse * | cfile, |
int | type, | ||
isc_boolean_t | declaration ) |
Definition at line 584 of file confparse.c.
void parse_subnet6_declaration | ( | struct parse * | cfile | ) |
Definition at line 2429 of file confparse.c.
void parse_subnet_declaration | ( | struct parse * | cfile | ) |
Definition at line 2337 of file confparse.c.
Definition at line 480 of file confparse.c.
TAILQ_HEAD | ( | ranges | , |
range | ) |
Definition at line 74 of file confparse.c.
Definition at line 64 of file confparse.c.
isc_boolean_t failover_once = ISC_TRUE |
Definition at line 38 of file confparse.c.
const struct option* host_id_option = NULL |
Definition at line 46 of file confparse.c.
int host_id_relays = 0 |
Definition at line 47 of file confparse.c.
unsigned subclass_counter = 0 |
Definition at line 53 of file confparse.c.
unsigned subnet_counter = 0 |
Definition at line 50 of file confparse.c.
isc_boolean_t use_client_id = ISC_FALSE |
Definition at line 41 of file confparse.c.
isc_boolean_t use_flex_id = ISC_FALSE |
Definition at line 42 of file confparse.c.
isc_boolean_t use_hw_address = ISC_FALSE |
Definition at line 43 of file confparse.c.