Go to the source code of this file.
Data Structures | |
struct | modem_conf_struct |
This structure contains the modems' configuration data. More... | |
Defines | |
#define | MODEM_CONF_MAX_ENTRY 256 |
Maximum number of modems' configuration records. | |
#define | MODEM_CONF_IDENTIFIER_SIZE 7 |
Maximum number of bytes (including the final 0) for the buffer used to store the constructor's signature. | |
#define | MODEM_CONF_TAG_NAME_SIZE 256 |
Maximum number of bytes (including the final 0) for the label that represents the constructor. | |
#define | MODEM_CONF_AUTOCONF_SIZE 4 |
Maximum number of bytes (including the final 0) for the auto-configuration tag ("yes" or "no"). | |
#define | MODEM_CONF_ACTION_SIZE 256 |
Maximum number of bytes (including the final 0) for the path to the dinamically loadable module that implements the calculation of the MAC address. | |
#define | PARSE_CONFIGURATION_FILE_NOT_FOUND -1 |
configuration parser could not open the configuration file. | |
#define | PARSE_CONFIGURATION_NO_MEM -2 |
configuration parser could not allocate memory. | |
#define | PARSE_CONFIGURATION_SYNTAX_ERROR -3 |
configuration parser found an invalid line. | |
#define | PARSE_CONFIGURATION_DUPLICATED_TAG -4 |
configuration parser found a duplicated tag. | |
#define | PARSE_CONFIGURATION_DLL_OPEN_ERROR -5 |
Could not load the DLL. | |
#define | PARSE_CONFIGURATION_DLL_INVALID -6 |
The DLL is not valid. | |
#define | PARSE_CONFIGURATION_MODEM_CONF_NOT_VALID -7 |
One record that represents a modem's configuration is not valid. | |
#define | PARSE_CONFIGURATION_OK 0 |
configuration parser terminated successfully. | |
#define | CONFIG_HD |
Functions | |
int | parse_configuration_file (char *path, int *err) |
Load a given configuration file. More... | |
void | free_all_configuration_data () |
Free all data allocated for the hash table. More... | |
int | get_value (char *tag, char **value) |
Return the value associated with a given tag. More... | |
char * | dummy_mac_processor (char *addr) |
Dummy MAC address calculator. More... | |
char * | conf_get_last_error () |
Return the last error message. More... | |
int | get_number_of_modem_conf () |
Return the number of records in the modems' configuration file. More... | |
int | modem_conf_get_id (char *mac) |
Returns the ID of a given MAC address. More... | |
char * | modem_conf_get_tag_name (int id) |
Returns the tag name of a given MAC address, representd by its ID. More... | |
int | modem_conf_is_autoconf (int id) |
Returns a value that indicates if a given modem supports auto-configuration. More... | |
void * | modem_conf_get_function (int id) |
Returns the MAC processor for a given MAC address. More... |
Definition in file config.h.
|
Return the last error message.
Definition at line 31 of file config.c. References last_error. Referenced by configuration_load(). |
|
Dummy MAC address calculator.
Definition at line 122 of file config.c. Referenced by parse_configuration_file(). |
|
Free all data allocated for the hash table.
Definition at line 330 of file config.c. References allochtab, and htab. Referenced by parse_configuration_file(). |
|
Return the number of records in the modems' configuration file.
Definition at line 112 of file config.c. References nb_modem. Referenced by modem_conf_get_id(), and parse_configuration_file(). |
|
Return the value associated with a given tag.
Definition at line 343 of file config.c. References htab. Referenced by configuration_load(), and load_mysql_configuration_from_file(). |
|
Returns the MAC processor for a given MAC address.
Definition at line 321 of file config.c. References modem_conf_struct::calculate_mac_address. |
|
Returns the ID of a given MAC address.
Definition at line 281 of file config.c. References get_number_of_modem_conf(). |
|
Returns the tag name of a given MAC address, representd by its ID.
Definition at line 297 of file config.c. References modem_conf_struct::tag_name. |
|
Returns a value that indicates if a given modem supports auto-configuration.
Definition at line 309 of file config.c. Referenced by main(). |
|
Load a given configuration file.
Definition at line 171 of file config.c. References allochtab, modem_conf_struct::calculate_mac_address, config_compare_user_data(), config_free_user_data(), CONFIG_H_ERROR_SIZE, config_hash_function(), configin, configlex(), modem_conf_struct::dll, dummy_mac_processor(), free_all_configuration_data(), get_number_of_modem_conf(), htab, modem_conf_struct::id, last_error, MODEM_CONF_ACTION_SIZE, MODEM_CONF_AUTOCONF_SIZE, MODEM_CONF_IDENTIFIER_SIZE, MODEM_CONF_TAG_NAME_SIZE, nb_modem, PARSE_CONFIGURATION_DLL_INVALID, PARSE_CONFIGURATION_DLL_OPEN_ERROR, PARSE_CONFIGURATION_DUPLICATED_TAG, PARSE_CONFIGURATION_FILE_NOT_FOUND, PARSE_CONFIGURATION_MODEM_CONF_NOT_VALID, PARSE_CONFIGURATION_NO_MEM, PARSE_CONFIGURATION_OK, and PARSE_CONFIGURATION_SYNTAX_ERROR. Referenced by configuration_load(), and load_mysql_configuration_from_file(). |