Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

configuration.c File Reference

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "server_config.h"
#include "strings_utils.h"

Go to the source code of this file.

Defines

#define CONFIGURATION_ERROR_SIZE   4096
 Maximum number of characters for the error message associated with the error message.


Functions

char * configuration_last_error ()
 return a pointer to a zero terminated string of characters that represents the last error message. More...

int configuration_load (char *path, char **error)
 Load the DHCP server configuration from a given file. More...


Variables

global_config configuration_globale
 Global DHCP configuration handler.

char last_error [CONFIGURATION_ERROR_SIZE]
 Buffer used to store the last error message.


Detailed Description

This file implements the configuration loader.

Definition in file configuration.c.


Function Documentation

char* configuration_last_error  
 

return a pointer to a zero terminated string of characters that represents the last error message.

Author:
Denis BEURIVE
Warning:
The string is returned in a statically allocated buffer, which subsequent calls will overwrite.

Definition at line 33 of file configuration.c.

References last_error.

int configuration_load char *    path,
char **    error
 

Load the DHCP server configuration from a given file.

Author:
Denis BEURIVE
Parameters:
path  Pointer to a zero terminated string of characters that represents the path to the configuration file to load.
error  pointer to a pointer that will point to the error message if an error occured.
Returns:
Upon successful completion, the function returns the value 0. Otherwize, the function returns the value 1.

Definition at line 44 of file configuration.c.

References global_config::broadcast_mode, conf_get_last_error(), CONFIGURATION_ERROR_SIZE, global_config::csv_file, global_config::deamon_group_id, global_config::deamon_user_id, global_config::debug, global_config::debug_file, global_config::dhcp_bind_ip, global_config::dummy_ip, global_config::dumper_mode, FILE_NAME_SIZE, get_value(), HOST_NAME_MAX_SIZE, last_error, global_config::log_file, global_config::log_size_management, MAX_GID_SIZE, MAX_UID_SIZE, PARSE_CONFIGURATION_DLL_INVALID, PARSE_CONFIGURATION_DLL_OPEN_ERROR, PARSE_CONFIGURATION_DUPLICATED_TAG, parse_configuration_file(), PARSE_CONFIGURATION_FILE_NOT_FOUND, PARSE_CONFIGURATION_MODEM_CONF_NOT_VALID, PARSE_CONFIGURATION_NO_MEM, PARSE_CONFIGURATION_OK, PARSE_CONFIGURATION_SYNTAX_ERROR, global_config::pid_file, global_config::server_ip_seen_by_client, global_config::sql_expiration_security_delay, global_config::sync_dump, and global_config::working_dir.

Referenced by main().


Generated on Mon Jun 19 12:31:06 2006 for MyDhcp_V2 by doxygen1.2.15