#include <string.h>
#include <stdio.h>
#include "mysql_interface.h"
#include "strings_utils.h"
#include "conversion.h"
#include "modem.h"
#include "logging.h"
Go to the source code of this file.
Defines | |
#define | SQL_REQUEST_SIZE 2048 |
Maximum number of bytes for a SQL request. | |
#define | NASPORT_SIZE 512 |
Maximum number of bytes for the "NASPORT" identifier. The "NASPORT" identifier is the following string : "node= shelf= port= slot= vlan=<>", (that describes the exact location on the DSLAM). | |
Functions | |
int | load_abonnes (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Load the content of table 'abonnes'. This function is called wether the DHCP request went through the relay agent or not (directly from client to server). More... | |
int | load_vlan (struct smysql *mysql_info, struct smysql *mysql_info_pool, struct mysql_tables *mysql_tables, struct global_config *config) |
Load the content of table 'vlan'. More... | |
int | load_ip_lease (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Load the content of table 'ip_lease'. More... | |
int | load_pool (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Load the content of table 'pool'. More... | |
int | try_reserve_ip_from_pool (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config, unsigned long int timeout) |
Update an element in the table 'pool'. Try to reserve an IP in the pool. More... | |
int | try_find_and_reserve_ip_from_pool (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config, unsigned long int timeout) |
Update an element in the table 'pool'. Try to find and reserve an IP in the pool. More... | |
void | clear_tables (struct mysql_tables *mysql_tables) |
Initialize the table structure. More... | |
int | my_fake_syslog (const char *file, const char *fmt,...) |
Fake logging service (used if logging is not activated). More... | |
int | load_abonne_ip (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Load the content of table 'abonne_ip'. More... | |
int | load_options (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Load the content of table 'options'. More... | |
int | release_ip_from_pool (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Release IP from pool. More... | |
int | load_context (struct smysql *mysql_info, struct smysql *mysql_info_write, struct mysql_tables *mysql_tables, struct global_config *config) |
Load the entire context associated with a user. More... | |
int | find_ip_in_vlan_pool (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Lookup the IP pool in order to find out if a guven user has an IP address. More... | |
int | get_ip_from_pool (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config, unsigned int timeout, int reserve_ip) |
Try to reserve an IP address in the IP pool. More... | |
int | send_to_radonline (struct smysql *mysql_info, struct mysql_tables *mysql_tables, char *ip, int action, struct global_config *config) |
Send a ticket (START or STOP) into the Radonline database. More... | |
int | mydns_init (struct smysql *mysql_info) |
Initialize the MyDns service. More... | |
int | send_to_mydns (struct smysql *mysql_info, struct mysql_tables *mysql_tables, char *ip, int action, struct global_config *config) |
Send a ticket (START or STOP) into the MyDns database. More... | |
int | load_logistic (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Load the content of table 'LOGIDTIC'. More... | |
int | blackhole_abonne (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Set a client's profile to "autoconfblackhole". More... | |
int | remove_autoconf_bh (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Set a client's profile to "STANDARD". More... | |
int | set_flag_check_radius (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Set the flag FLAG_CHECK_RADIUS to the value 1. More... | |
int | signal_unknown_mac_address (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config) |
Insert a couple (login_modem,mac_address) into the LOGISTIC_RADIUS table. More... | |
int | nack_flag_abonne (struct smysql *mysql_info, struct mysql_tables *mysql_tables, struct global_config *config, unsigned long int new_value) |
Update the value of the field 'nack_flag' of the table 'abonnes'. More... | |
Variables | |
unsigned int | mydns_id |
This value is used for all transactions with MyDns. It comes from the following SQL request: SELECT id FROM soa WHERE origin='user.'. |
Definition in file mysql_interface.c.
|
Set a client's profile to "autoconfblackhole".
Definition at line 3360 of file mysql_interface.c. References mysql_tables::abonnes, table_abonnes::abonnes_id, smysql::debug, smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, SQL_REQUEST_SIZE, and sql_update(). Referenced by look_up_logistic(). |
|
Initialize the table structure.
Definition at line 62 of file mysql_interface.c. Referenced by main(). |
|
Lookup the IP pool in order to find out if a guven user has an IP address.
Definition at line 2090 of file mysql_interface.c. References mysql_tables::abonnes, mysql_tables::ip_lease, load_ip_lease(), load_pool(), smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NO_IP_FOUND, MYSQL_INTERFACE_NO_LEASE_ID, MYSQL_INTERFACE_NO_TIMESTAMP, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, mysql_tables::pool, and mysql_tables::vlan. Referenced by find_ip_and_reply(), and get_ip_from_pool(). |
|
Try to reserve an IP address in the IP pool.
Definition at line 2272 of file mysql_interface.c. References table_pool::abonnes_id, smysql::debug, find_ip_in_vlan_pool(), table_pool::ip, mysql_tables::ip_lease, table_pool::ip_lease_id, table_ip_lease::ip_lease_id, load_pool(), smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NO_IP_FOUND, MYSQL_INTERFACE_NO_LEASE_ID, MYSQL_INTERFACE_NO_TIMESTAMP, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, mysql_tables::pool, table_pool::pool_id, try_find_and_reserve_ip_from_pool(), and try_reserve_ip_from_pool(). Referenced by find_ip_and_reply(). |
|
Load the content of table 'abonne_ip'.
Definition at line 699 of file mysql_interface.c. References mysql_tables::abonne_ip, table_abonne_ip::abonne_ip_id, table_abonne_ip::abonnes_id, smysql::debug, table_abonne_ip::gateway, table_abonne_ip::ip, IP_ADDRESS_STR_SIZE, smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, smysql::result, SQL_REQUEST_SIZE, sql_select(), table_abonne_ip::subnet, and table_abonne_ip::vlan_id. Referenced by find_ip_and_reply(). |
|
Load the content of table 'abonnes'. This function is called wether the DHCP request went through the relay agent or not (directly from client to server).
Definition at line 111 of file mysql_interface.c. References mysql_tables::abonnes, table_abonnes::abonnes_id, smysql::debug, table_abonnes::first_connection, smysql::log_file, table_abonnes::login_radius, LOGIN_RADIUS_SIZE, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, table_abonnes::nack_flag, table_abonnes::node_id, table_abonnes::numero_port, table_abonnes::numero_slot, OPTIONNAL_PROFILE_SIZE, table_abonnes::profile, smysql::result, table_abonnes::shelf, SQL_REQUEST_SIZE, and sql_select(). Referenced by load_context(). |
|
Load the entire context associated with a user.
Definition at line 1818 of file mysql_interface.c. References mysql_tables::abonnes, smysql::debug, load_abonnes(), load_options(), load_vlan(), smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_TOO_MANY_ITEMS, MYSQL_INTERFACE_UNEXPECTED_ERROR, OPTIONNAL_PROFILE_SIZE, mysql_tables::options, and mysql_tables::vlan. Referenced by main(). |
|
Load the content of table 'ip_lease'.
Definition at line 1033 of file mysql_interface.c. References table_ip_lease::cidr, CIDR_SIZE, smysql::debug, table_ip_lease::gateway, IP_ADDRESS_STR_SIZE, mysql_tables::ip_lease, table_ip_lease::ip_lease_id, smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, smysql::result, SQL_REQUEST_SIZE, sql_select(), table_ip_lease::subnet, and table_ip_lease::vlan_id. Referenced by find_ip_in_vlan_pool(). |
|
Load the content of table 'LOGIDTIC'.
Definition at line 3227 of file mysql_interface.c. References smysql::debug, table_logistic_radius::FLAG_CHECK_RADIUS, smysql::log_file, table_logistic_radius::LOGIN_MODEM, mysql_tables::logistic, LOGISTIC_RADIUS_LOGIN_SIZE, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, table_logistic_radius::RADIUS_LOGIN, smysql::result, SQL_REQUEST_SIZE, and sql_select(). Referenced by look_up_logistic(). |
|
Load the content of table 'options'.
Definition at line 856 of file mysql_interface.c. References COMMENT_SIZE, smysql::debug, smysql::log_file, MAX_PROFILE_OPTIONS, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_TOO_MANY_ITEMS, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, mysql_tables::option_number, OPTION_TYPE_SIZE, OPTION_VALUE_SIZE, OPTIONNAL_PROFILE_SIZE, mysql_tables::options, smysql::result, SQL_REQUEST_SIZE, and sql_select(). Referenced by load_context(), and main(). |
|
Load the content of table 'pool'.
Definition at line 1186 of file mysql_interface.c. References table_pool::abonnes_id, smysql::debug, table_pool::expiration, get_unix_timestamp(), table_pool::ip, IP_ADDRESS_STR_SIZE, table_pool::ip_lease_id, smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NO_TIMESTAMP, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_NO_TIMESTAMP, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, mysql_tables::pool, table_pool::pool_id, smysql::result, global_config::sql_expiration_security_delay, SQL_REQUEST_SIZE, and sql_select(). Referenced by find_ip_in_vlan_pool(), and get_ip_from_pool(). |
|
Load the content of table 'vlan'.
Definition at line 297 of file mysql_interface.c. References ACCT_IDENTIFIER_SIZE, table_vlan::comment, COMMENT_SIZE, smysql::debug, get_unix_timestamp(), LABEL_SIZE, table_vlan::libelle, smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NO_TIMESTAMP, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_NO_TIMESTAMP, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, table_vlan::offer_timeout, OPTIONNAL_PROFILE_SIZE, table_vlan::profile_optionnel, table_vlan::radius_identifiant, smysql::result, global_config::sql_expiration_security_delay, SQL_REQUEST_SIZE, sql_select(), mysql_tables::vlan, table_vlan::vlan_gateway, table_vlan::vlan_id, and table_vlan::vlan_tag. Referenced by load_context(). |
|
Fake logging service (used if logging is not activated).
Definition at line 69 of file mysql_interface.c. Referenced by blackhole_abonne(), find_ip_in_vlan_pool(), get_ip_from_pool(), load_abonne_ip(), load_abonnes(), load_context(), load_ip_lease(), load_logistic(), load_options(), load_pool(), load_vlan(), mydns_init(), nack_flag_abonne(), release_ip_from_pool(), remove_autoconf_bh(), send_to_mydns(), send_to_radonline(), set_flag_check_radius(), signal_unknown_mac_address(), try_find_and_reserve_ip_from_pool(), and try_reserve_ip_from_pool(). |
|
Initialize the MyDns service.
Definition at line 2884 of file mysql_interface.c. References smysql::debug, smysql::log_file, my_fake_syslog(), smysql::my_syslog, mydns_id, MYSQL_CONNECTION_LOST, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, smysql::result, SQL_REQUEST_SIZE, and sql_select(). Referenced by main(). |
|
Update the value of the field 'nack_flag' of the table 'abonnes'.
Definition at line 3763 of file mysql_interface.c. References mysql_tables::abonnes, table_abonnes::abonnes_id, smysql::debug, smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, SQL_REQUEST_SIZE, and sql_update(). Referenced by find_ip_and_reply(). |
|
Release IP from pool.
Definition at line 1666 of file mysql_interface.c. References table_pool::abonnes_id, smysql::debug, get_unix_timestamp(), table_pool::ip_lease_id, smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_NO_TIMESTAMP, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_NO_TIMESTAMP, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, mysql_tables::pool, SQL_REQUEST_SIZE, and sql_update(). Referenced by find_ip_and_reply(). |
|
Set a client's profile to "STANDARD".
Definition at line 3449 of file mysql_interface.c. References mysql_tables::abonnes, table_abonnes::abonnes_id, smysql::debug, smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, SQL_REQUEST_SIZE, and sql_update(). Referenced by main(). |
|
Send a ticket (START or STOP) into the MyDns database.
Definition at line 2992 of file mysql_interface.c. References mysql_tables::abonnes, smysql::debug, smysql::log_file, my_fake_syslog(), smysql::my_syslog, mydns_id, MYDNS_LOGIN_SIZE, MYDNS_START, MYDNS_STOP, MYSQL_CONNECTION_LOST, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, sql_delete(), sql_insert(), and SQL_REQUEST_SIZE. Referenced by find_ip_and_reply(). |
|
Send a ticket (START or STOP) into the Radonline database.
Definition at line 2586 of file mysql_interface.c. References mysql_tables::abonnes, smysql::debug, smysql::log_file, mysql_tables::logistic, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, NASPORT_SIZE, RADONLINE_START, RADONLINE_STOP, sql_delete(), sql_insert(), SQL_REQUEST_SIZE, and mysql_tables::vlan. Referenced by find_ip_and_reply(). |
|
Set the flag FLAG_CHECK_RADIUS to the value 1.
Definition at line 3538 of file mysql_interface.c. References smysql::debug, smysql::log_file, table_logistic_radius::LOGIN_MODEM, mysql_tables::logistic, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_MORE_THAN_ONE, MYSQL_INTERFACE_NOT_FOUND, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, SQL_REQUEST_SIZE, and sql_update(). Referenced by look_up_logistic(). |
|
Insert a couple (login_modem,mac_address) into the LOGISTIC_RADIUS table.
Definition at line 3629 of file mysql_interface.c. References smysql::debug, smysql::log_file, table_logistic_radius::LOGIN_MODEM, mysql_tables::logistic, table_logistic_radius::MAC_ADDRESS, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, sql_insert(), and SQL_REQUEST_SIZE. Referenced by look_up_logistic(). |
|
Update an element in the table 'pool'. Try to find and reserve an IP in the pool.
Definition at line 1521 of file mysql_interface.c. References table_pool::abonnes_id, smysql::debug, get_unix_timestamp(), table_pool::ip_lease_id, smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_NO_TIMESTAMP, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_NO_TIMESTAMP, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, mysql_tables::pool, SQL_REQUEST_SIZE, and sql_update(). Referenced by get_ip_from_pool(). |
|
Update an element in the table 'pool'. Try to reserve an IP in the pool.
Definition at line 1386 of file mysql_interface.c. References table_pool::abonnes_id, smysql::debug, get_unix_timestamp(), smysql::log_file, my_fake_syslog(), smysql::my_syslog, MYSQL_CONNECTION_LOST, MYSQL_INTERFACE_CONNECTION_LOST, MYSQL_INTERFACE_NO_TIMESTAMP, MYSQL_INTERFACE_RECONNECTION_FAILED, MYSQL_INTERFACE_REQUEST_SKIPED, MYSQL_INTERFACE_SQL_PROBLEM, MYSQL_INTERFACE_UNEXPECTED_ERROR, MYSQL_NO_TIMESTAMP, MYSQL_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, mysql_tables::pool, table_pool::pool_id, global_config::sql_expiration_security_delay, SQL_REQUEST_SIZE, and sql_update(). Referenced by get_ip_from_pool(). |