#include <netinet/in.h>
#include "packets_data.h"
#include "mysql_interface.h"
Go to the source code of this file.
Defines | |
#define | DHCP_INVALID_MESSAGE_TYPE -100 |
Return value for the function find_ip_and_reply(). Invailid DHCP message type. | |
#define | DHCP_NO_DYNAMIC_IP_FOUND -101 |
Return value for the function find_ip_and_reply(). Could not find any available IP address. | |
#define | DHCP_LEASE_INCONSTANCY -102 |
Return value for the function find_ip_and_reply(). An unexpected error occured while trying to retrieve the lease value. | |
#define | DHCP_NO_DYNAMIC_IP_FOUND_RELEASE -103 |
Return value for the function find_ip_and_reply(). The server received a DHCP RELEASE from a user that got a dynamic IP address. But the server could not find any busy IP address associated to this user within the pool. This is not a problem. We just ignore this event. | |
#define | DHCP_RADONLINE_MYSQL_SQL_PROBLEM -104 |
Return value for the function find_ip_and_reply(). Could not send a (START or STOP) ticket to Radonline. Some SQL error occured. | |
#define | DHCP_RADONLINE_MYSQL_UNEXPECTED_ERROR -105 |
Return value for the function find_ip_and_reply(). Could not send a (START or STOP) ticket to Radonline. An unexpected SQL error occured. | |
#define | DHCP_MYDNS_MYSQL_SQL_PROBLEM -106 |
Return value for the function find_ip_and_reply(). Could not send a (START or STOP) ticket to MyDqs database. Some SQL error occured. | |
#define | DHCP_MYDNS_MYSQL_UNEXPECTED_ERROR -107 |
Return value for the function find_ip_and_reply(). Could not send a (START or STOP) ticket to MyDqs database. An unexpected SQL error occured. | |
Functions | |
int | find_ip_and_reply (struct smysql *mysql_info_read, struct smysql *mysql_info_read_write, struct smysql *mysql_radonline, struct smysql *mysql_mydns, struct mysql_tables *mysql_tables, struct dhcp_packet *packet, struct global_config *config, int sck, unsigned long int broadcast, unsigned long int server_ip, struct sockaddr_in *client_address) |
Try to find an IP address for the client and send a DHCP response. More... |
Definition in file find_ip_and_reply.h.
|
Try to find an IP address for the client and send a DHCP response.
Definition at line 117 of file find_ip_and_reply.c. References mysql_tables::abonne_ip, mysql_tables::abonnes, table_abonnes::abonnes_id, dhcp_packet::ctrl, global_config::debug, DHCP_INVALID_MESSAGE_TYPE, DHCP_LEASE_INCONSTANCY, DHCP_MYDNS_MYSQL_SQL_PROBLEM, DHCP_MYDNS_MYSQL_UNEXPECTED_ERROR, DHCP_NO_DYNAMIC_IP_FOUND, DHCP_NO_DYNAMIC_IP_FOUND_RELEASE, DHCP_RADONLINE_MYSQL_SQL_PROBLEM, DHCP_RADONLINE_MYSQL_UNEXPECTED_ERROR, DHCPDISCOVER, DHCPINFORM, DHCPRELEASE, DHCPREQUEST, DYNAMIC_IP, find_ip_in_vlan_pool(), get_ip_from_pool(), get_lease_from_context(), mysql_tables::ip_lease, load_abonne_ip(), global_config::log_file, table_abonnes::login_radius, my_syslog(), MYDNS_START, MYDNS_STOP, MYSQL_CONNECTION_LOST, 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_RECONNECTION_FAILED, MYSQL_REQUEST_SKIPED, MYSQL_SQL_PROBLEM, MYSQL_UNEXPECTED_ERROR, nack_flag_abonne(), packets_get_message_type(), packets_get_vlan_id(), packets_send_ack(), packets_send_nack(), packets_send_offer(), mysql_tables::pool, RADONLINE_START, RADONLINE_STOP, release_ip_from_pool(), reply_to_inform(), send_to_mydns(), send_to_radonline(), STATIC_IP, and mysql_tables::vlan. Referenced by main(). |