configparse.c File Reference

#include "stdinc.h"
#include "server.h"
#include "configparse.h"

Go to the source code of this file.

Defines

#define MAX_INCLUDE   10

Functions

int config_load (char *file)
int config_parse (char *buffer)
void config_test (void)
dlink_list * get_config_base (char *index)
char * get_config_entry (char *index, char *sub)
int get_config_bool (char *index, char *sub)
int destroy_config_tree ()

Variables

int include_cnt = 0
char include_stack [MAX_INCLUDE][255]
char * current_file

Define Documentation

#define MAX_INCLUDE   10

Definition at line 6 of file configparse.c.

Referenced by config_load().


Function Documentation

int config_load ( char *  file  ) 

Open a config file and begin reading it

Parameters:
file (string) path to the file we are opening
Returns:
(int) 1 on success

Definition at line 23 of file configparse.c.

References config_parse(), current_file, include_cnt, include_stack, and MAX_INCLUDE.

int config_parse ( char *  buffer  ) 

Parse a config buffer

Parameters:
(String) Buffer we are to parse
Returns:
(int) 1 on success

Do nothing

Definition at line 94 of file configparse.c.

References config_load(), config_tree, config_tree_entries, config_tree_index, current_file, dlink_add_tail(), dlink_create(), ConfBase::entry_cnt, HASH, HASH_B, HASH_BY, and ConfBase::map.

void config_test ( void   ) 

Test configuration

Returns:
(int) 1 on success

Definition at line 312 of file configparse.c.

References CfgSettings, Conf::conf_name, config_load(), and destroy_config_tree().

Referenced by main().

int destroy_config_tree (  ) 
dlink_list* get_config_base ( char *  index  ) 

Definition at line 331 of file configparse.c.

References config_tree, HASH, and HASH_BY.

Referenced by build_access_list(), load_modules(), and SigHandler().

int get_config_bool ( char *  index,
char *  sub 
)

Definition at line 361 of file configparse.c.

References config_tree, DLINK_FOREACH, HASH, HASH_B, HASH_BY, and ConfBase::map.

Referenced by Run().

char* get_config_entry ( char *  index,
char *  sub 
)

Definition at line 338 of file configparse.c.

References config_tree, DLINK_FOREACH, HASH, HASH_B, HASH_BY, and ConfBase::map.

Referenced by InitDefaults(), and load_protocol().


Variable Documentation

char* current_file

Definition at line 11 of file configparse.c.

Referenced by config_load(), and config_parse().

int include_cnt = 0

Definition at line 9 of file configparse.c.

Referenced by config_load().

char include_stack[MAX_INCLUDE][255]

Definition at line 10 of file configparse.c.

Referenced by config_load(), and destroy_config_tree().

Generated on Mon Jul 19 21:53:04 2010 for Omega Security Services by  doxygen 1.6.3