Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

logistic.c File Reference

#include <string.h>
#include <stdio.h>
#include "logistic.h"
#include "mysql_interface.h"
#include "modem.h"
#include "logging.h"

Go to the source code of this file.

Functions

int my_fake_syslog (const char *file, const char *fmt,...)
 Fake logging service (used if logging is not activated). More...

int look_up_logistic (struct smysql *mysql_info_logistic, struct smysql *mysql_info_abonnes, struct mysql_tables *mysql_tables, struct global_config *config, struct dhcp_packet *packet_in)
 Lookup the table LOGISTIC and perform the required actions. More...


Detailed Description

This file implements high level MySql functionnalities for the LOGISTIC_RADIUS.

Definition in file logistic.c.


Function Documentation

int look_up_logistic struct smysql   mysql_info_logistic,
struct smysql   mysql_info_abonnes,
struct mysql_tables   mysql_tables,
struct global_config   config,
struct dhcp_packet   packet_in
 

Lookup the table LOGISTIC and perform the required actions.

Author:
Denis BEURIVE
Parameters:
mysql_info_logistic  Pointer to a 'smysql' data structure that contains the MySql configuration for the LOGISTIC_RADIUS table.
mysql_info_abonnes  Pointer to a 'smysql' data structure that contains the MySql configuration for the 'abonnes' table.
mysql_tables  Pointer to a 'mysql_tables' data structure that represents the databases model. The context must have been loaded.
config  Pointer to a 'global_config' data structure that contains the main server's configuration.
packet_in  Pointer to a 'dhcp_packet' data structure that contains the incoming DHCP packet.
Returns:
Upon successful completion, the function returns the value 0. Otherwize, the function may return one of the following values:
  • 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

Definition at line 41 of file logistic.c.

References mysql_tables::abonnes, table_abonnes::abonnes_id, ACCT_IDENTIFIER_SIZE, blackhole_abonne(), global_config::debug, table_logistic_radius::FLAG_CHECK_RADIUS, load_logistic(), smysql::log_file, global_config::log_file, table_logistic_radius::LOGIN_MODEM, table_logistic_radius::login_modem, LOGIN_MODEM_SIZE, table_abonnes::login_radius, LOGIN_RADIUS_SIZE, mysql_tables::logistic, LOGISTIC_LOGIN_MODEM_SIZE, LOGISTIC_MAC_ADDRESS_SIZE, table_logistic_radius::MAC_ADDRESS, table_logistic_radius::modem_manufacturor, my_fake_syslog(), smysql::my_syslog, 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_UNEXPECTED_ERROR, table_abonnes::node_id, table_abonnes::numero_port, table_abonnes::numero_slot, OPTIONNAL_PROFILE_SIZE, packets_get_message_type(), table_abonnes::profile, table_logistic_radius::RADIUS_LOGIN, table_logistic_radius::radonline_acct_identifier, table_logistic_radius::radonline_user_name, set_flag_check_radius(), table_abonnes::shelf, and signal_unknown_mac_address().

Referenced by main().

int my_fake_syslog const char *    file,
const char *    fmt,
...   
[static]
 

Fake logging service (used if logging is not activated).

Author:
Denis BEURIVE

Definition at line 16 of file logistic.c.

Referenced by look_up_logistic().


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