#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <pwd.h>
#include <grp.h>
#include <time.h>
#include "dhcp.h"
#include "modem.h"
#include "sockets.h"
#include "server_config.h"
#include "mysql_header.h"
#include "mysql_interface.h"
#include "logging.h"
#include "deamon.h"
#include "logistic.h"
#include "packets_data.h"
#include "conversion.h"
#include "packets.h"
#include "find_ip_and_reply.h"
#include "packets_operations.h"
Go to the source code of this file.
Defines | |
#define | BUILD "This binary was build the __DATE__ on __HOST__" |
Build information. The tags __DATE__ and __HOST__ will be replaced by the output of commands 'date' and 'uname -a'. | |
#define | CVS_TAGS "__CVSTAGS__" |
CVS tags for all sources. | |
#define | MTSQL_TESTING(n, s) |
Functions | |
void | dump_packet_hexa (void *packet, int size, char *file) |
Dump a packet into hexa. This function is called when it is not possible to parse the packet (invalid size ot invalid organisation). More... | |
int | main (int argc, char **argv) |
Main entry point for the DHCP server. More... | |
Variables | |
char | mysql_error_str [MYSQL_MAX_ERROR_SIZE] |
Last MySql error message. This variable is defined in the file 'mysql.c'. | |
int | mysql_error_errno |
Last MySql error code. This variable is defined in the file 'mysql.c'. | |
global_config | configuration_globale |
This structure contains the global server configuration. It is defined in the C file 'configuration.c'. | |
smysql | conf_mysql_dhcp_read_only |
This structure contains the configuration for the connection to the local DHCP database. This database is access only for READ operations. | |
smysql | conf_mysql_dhcp_read_write |
This structure contains the configuration for the connection to the POOL database. This database contains the pool of dynamic IP addresses. It is accessed for READ and WRITE operations. | |
smysql | conf_mysql_radonline |
This structure contains the configuration for the connection to the Radonline database. | |
smysql | conf_mysql_mydns |
This structure contains the configuration for the connection to the Mydns database. | |
smysql | conf_mysql_logistic |
This structure contains the configuration for the connection to the Logistic database. | |
char * | tags_read [MYSQL_CONFIGURATION_TAG_NUMBER] |
This array contains the configuration tags associated to the local DHCP database (read only database). More... | |
char * | tags_read_write [MYSQL_CONFIGURATION_TAG_NUMBER] |
This array contains the configuration tags associated to the POOL DHCP database. (read/write database). More... | |
char * | tags_radonline [MYSQL_CONFIGURATION_TAG_NUMBER] |
This array contains the configuration tags associated to the radonline database. More... | |
char * | tags_mydns [MYSQL_CONFIGURATION_TAG_NUMBER] |
This array contains the configuration tags associated to the mydns database. More... | |
char * | tags_logistic [MYSQL_CONFIGURATION_TAG_NUMBER] |
This array contains the configuration tags associated to the Logistic database. More... | |
int | dump_sync_fd = 0 |
This file descriptor is defined in the main server source (dhcp.c). It is used to synchronize access to the dump file. |
Definition in file dhcp.c.
|
Dump a packet into hexa. This function is called when it is not possible to parse the packet (invalid size ot invalid organisation).
Definition at line 1935 of file dhcp.c. References my_syslog(). Referenced by main(). |
|
|
Initial value: { "mysql-host-logistic", "mysql-user-logistic", "mysql-passwd-logistic", "mysql-db-logistic", "mysql-port-logistic", "mysql-socket-logistic", "mysql-retry-logistic", "mysql-timeout-logistic", "mysql-sleep-logistic", "mysql-debug-logistic", "mysql-log-file-logistic", "mysql-reconnection-delay-logistic" }
Definition at line 173 of file dhcp.c. Referenced by main(). |
|
Initial value: { "mysql-host-mydns", "mysql-user-mydns", "mysql-passwd-mydns", "mysql-db-mydns", "mysql-port-mydns", "mysql-socket-mydns", "mysql-retry-mydns", "mysql-timeout-mydns", "mysql-sleep-mydns", "mysql-debug-mydns", "mysql-log-file-mydns", "mysql-reconnection-delay-mydns" }
Definition at line 154 of file dhcp.c. Referenced by main(). |
|
Initial value: { "mysql-host-radonline", "mysql-user-radonline", "mysql-passwd-radonline", "mysql-db-radonline", "mysql-port-radonline", "mysql-socket-radonline", "mysql-retry-radonline", "mysql-timeout-radonline", "mysql-sleep-radonline", "mysql-debug-radonline", "mysql-log-file-radonline", "mysql-reconnection-delay-radonline" }
Definition at line 135 of file dhcp.c. Referenced by main(). |
|
Initial value: { "mysql-host-dhcp-read", "mysql-user-dhcp-read", "mysql-passwd-dhcp-read", "mysql-db-dhcp-read", "mysql-port-dhcp-read", "mysql-socket-dhcp-read", "mysql-retry-dhcp-read", "mysql-timeout-dhcp-read", "mysql-sleep-dhcp-read", "mysql-debug-dhcp-read", "mysql-log-file-dhcp-read", "mysql-reconnection-delay-dhcp-read" }
Definition at line 96 of file dhcp.c. Referenced by main(). |
|
Initial value: { "mysql-host-dhcp-read-write", "mysql-user-dhcp-read-write", "mysql-passwd-dhcp-read-write", "mysql-db-dhcp-read-write", "mysql-port-dhcp-read-write", "mysql-socket-dhcp-read-write", "mysql-retry-dhcp-read-write", "mysql-timeout-dhcp-read-write", "mysql-sleep-dhcp-read-write", "mysql-debug-dhcp-read-write", "mysql-log-file-dhcp-read-write", "mysql-reconnection-delay-dhcp-read-write" }
Definition at line 116 of file dhcp.c. Referenced by main(). |