#include "../../../include/config.h"
#include "utils.h"
#include <dbi/dbi.h>
Go to the source code of this file.
#define DEFAULT_HOUSEKEEPING_THREAD_STARTUP_DELAY 60 |
#define DEFAULT_OCI_ERRORS_TO_SYSLOG 1 |
#define DEFAULT_TRIM_DB_INTERVAL 60 |
#define IDO2DB_CONFIGTYPE_ORIGINAL 0 |
#define IDO2DB_CONFIGTYPE_RETAINED 1 |
#define IDO2DB_DATE "03-31-2011" |
#define IDO2DB_DBI_DRIVER_DB2 "db2l" |
#define IDO2DB_DBI_DRIVER_FIREBIRD "firebird" |
#define IDO2DB_DBI_DRIVER_FREETDS "freetds" |
#define IDO2DB_DBI_DRIVER_INGRES "ingres" |
#define IDO2DB_DBI_DRIVER_MSQL "msql" |
#define IDO2DB_DBI_DRIVER_MYSQL "mysql" |
#define IDO2DB_DBI_DRIVER_ORACLE "Oracle" |
#define IDO2DB_DBI_DRIVER_PGSQL "pgsql" |
#define IDO2DB_DBI_DRIVER_SQLITE "sqlite" |
#define IDO2DB_DBI_DRIVER_SQLITE3 "sqlite3" |
#define IDO2DB_DBSERVER_DB2 3 |
#define IDO2DB_DBSERVER_FIREBIRD 4 |
#define IDO2DB_DBSERVER_FREETDS 5 |
#define IDO2DB_DBSERVER_INGRES 6 |
#define IDO2DB_DBSERVER_MSQL 7 |
#define IDO2DB_DBSERVER_MYSQL 1 |
#define IDO2DB_DBSERVER_NONE 0 |
#define IDO2DB_DBSERVER_ORACLE 8 |
#define IDO2DB_DBSERVER_PGSQL 2 |
#define IDO2DB_DBSERVER_SQLITE 9 |
#define IDO2DB_DBSERVER_SQLITE3 10 |
#define IDO2DB_DEBUGL_ALL -1 |
#define IDO2DB_DEBUGL_NONE 0 |
#define IDO2DB_DEBUGL_PROCESSINFO 1 |
#define IDO2DB_DEBUGL_SQL 2 |
#define IDO2DB_DEBUGV_BASIC 0 |
#define IDO2DB_DEBUGV_MORE 1 |
#define IDO2DB_DEBUGV_MOST 2 |
#define IDO2DB_INPUT_BUFFER 1024 |
#define IDO2DB_INPUT_DATA_ACKNOWLEDGEMENTDATA 42 |
#define IDO2DB_INPUT_DATA_ADAPTIVECONTACTDATA 45 |
#define IDO2DB_INPUT_DATA_ADAPTIVEHOSTDATA 35 |
#define IDO2DB_INPUT_DATA_ADAPTIVEPROGRAMDATA 34 |
#define IDO2DB_INPUT_DATA_ADAPTIVESERVICEDATA 36 |
#define IDO2DB_INPUT_DATA_AGGREGATEDSTATUSDATA 38 |
#define IDO2DB_INPUT_DATA_COMMANDDEFINITION 69 |
#define IDO2DB_INPUT_DATA_COMMENTDATA 28 |
#define IDO2DB_INPUT_DATA_CONFIGDUMPEND 2 |
#define IDO2DB_INPUT_DATA_CONFIGDUMPSTART 1 |
#define IDO2DB_INPUT_DATA_CONFIGVARIABLES 52 |
#define IDO2DB_INPUT_DATA_CONTACTDEFINITION 71 |
#define IDO2DB_INPUT_DATA_CONTACTGROUPDEFINITION 72 |
#define IDO2DB_INPUT_DATA_CONTACTNOTIFICATIONDATA 40 |
#define IDO2DB_INPUT_DATA_CONTACTNOTIFICATIONMETHODDATA 41 |
#define IDO2DB_INPUT_DATA_CONTACTSTATUSDATA 44 |
#define IDO2DB_INPUT_DATA_DOWNTIMEDATA 29 |
#define IDO2DB_INPUT_DATA_EVENTHANDLERDATA 24 |
#define IDO2DB_INPUT_DATA_EXTERNALCOMMANDDATA 37 |
#define IDO2DB_INPUT_DATA_FLAPPINGDATA 30 |
#define IDO2DB_INPUT_DATA_HOSTCHECKDATA 27 |
#define IDO2DB_INPUT_DATA_HOSTDEFINITION 61 |
#define IDO2DB_INPUT_DATA_HOSTDEPENDENCYDEFINITION 65 |
#define IDO2DB_INPUT_DATA_HOSTESCALATIONDEFINITION 67 |
#define IDO2DB_INPUT_DATA_HOSTEXTINFODEFINITION 73 |
#define IDO2DB_INPUT_DATA_HOSTGROUPDEFINITION 62 |
#define IDO2DB_INPUT_DATA_HOSTSTATUSDATA 32 |
#define IDO2DB_INPUT_DATA_LOGDATA 22 |
#define IDO2DB_INPUT_DATA_LOGENTRY 10 |
#define IDO2DB_INPUT_DATA_MAINCONFIGFILEVARIABLES 50 |
#define IDO2DB_INPUT_DATA_NONE 0 |
#define IDO2DB_INPUT_DATA_NOTIFICATIONDATA 25 |
#define IDO2DB_INPUT_DATA_PROCESSDATA 20 |
#define IDO2DB_INPUT_DATA_PROGRAMSTATUSDATA 31 |
#define IDO2DB_INPUT_DATA_RESOURCECONFIGFILEVARIABLES 51 |
#define IDO2DB_INPUT_DATA_RETENTIONDATA 39 |
#define IDO2DB_INPUT_DATA_RUNTIMEVARIABLES 53 |
#define IDO2DB_INPUT_DATA_SERVICECHECKDATA 26 |
#define IDO2DB_INPUT_DATA_SERVICEDEFINITION 63 |
#define IDO2DB_INPUT_DATA_SERVICEDEPENDENCYDEFINITION 66 |
#define IDO2DB_INPUT_DATA_SERVICEESCALATIONDEFINITION 68 |
#define IDO2DB_INPUT_DATA_SERVICEEXTINFODEFINITION 74 |
#define IDO2DB_INPUT_DATA_SERVICEGROUPDEFINITION 64 |
#define IDO2DB_INPUT_DATA_SERVICESTATUSDATA 33 |
#define IDO2DB_INPUT_DATA_STATECHANGEDATA 43 |
#define IDO2DB_INPUT_DATA_SYSTEMCOMMANDDATA 23 |
#define IDO2DB_INPUT_DATA_TIMEDEVENTDATA 21 |
#define IDO2DB_INPUT_DATA_TIMEPERIODDEFINITION 70 |
#define IDO2DB_INPUT_SECTION_DATA 3 |
#define IDO2DB_INPUT_SECTION_FOOTER 2 |
#define IDO2DB_INPUT_SECTION_HEADER 1 |
#define IDO2DB_INPUT_SECTION_NONE 0 |
#define IDO2DB_MAX_BUFLEN 16384 |
#define IDO2DB_MAX_MBUF_ITEMS 14 |
#define IDO2DB_MBUF_CONFIGFILEVARIABLE 9 |
#define IDO2DB_MBUF_CONFIGVARIABLE 10 |
#define IDO2DB_MBUF_CONTACT 13 |
#define IDO2DB_MBUF_CONTACTADDRESS 6 |
#define IDO2DB_MBUF_CONTACTGROUP 0 |
#define IDO2DB_MBUF_CONTACTGROUPMEMBER 1 |
#define IDO2DB_MBUF_CUSTOMVARIABLE 12 |
#define IDO2DB_MBUF_HOSTGROUPMEMBER 3 |
#define IDO2DB_MBUF_HOSTNOTIFICATIONCOMMAND 5 |
#define IDO2DB_MBUF_PARENTHOST 8 |
#define IDO2DB_MBUF_RUNTIMEVARIABLE 11 |
#define IDO2DB_MBUF_SERVICEGROUPMEMBER 2 |
#define IDO2DB_MBUF_SERVICENOTIFICATIONCOMMAND 4 |
#define IDO2DB_MBUF_TIMERANGE 7 |
#define IDO2DB_NAME "IDO2DB" |
#define IDO2DB_OBJECT_HASHSLOTS 50240 |
#define IDO2DB_VERSION "1.3.1" |
typedef struct ido2db_dbconninfo_struct ido2db_dbconninfo |
typedef struct ido2db_dbobject_struct ido2db_dbobject |
typedef struct ido2db_input_data_info_struct ido2db_idi |
typedef struct ido2db_mbuf_struct ido2db_mbuf |
int ido2db_add_input_data_item | ( | ido2db_idi * | , | |
int | , | |||
char * | ||||
) |
int ido2db_add_input_data_mbuf | ( | ido2db_idi * | , | |
int | , | |||
int | , | |||
char * | ||||
) |
int ido2db_check_for_client_input | ( | ido2db_idi * | , | |
ido_dbuf * | , | |||
pthread_t * | ||||
) |
int ido2db_check_init_reqs | ( | void | ) |
void ido2db_child_sighandler | ( | int | ) |
int ido2db_cleanup_socket | ( | void | ) |
int ido2db_convert_standard_data_elements | ( | ido2db_idi * | , | |
int * | , | |||
int * | , | |||
int * | , | |||
struct timeval * | ||||
) |
int ido2db_convert_string_to_double | ( | char * | , | |
double * | ||||
) |
int ido2db_convert_string_to_float | ( | char * | , | |
float * | ||||
) |
int ido2db_convert_string_to_int | ( | char * | , | |
int * | ||||
) |
int ido2db_convert_string_to_long | ( | char * | , | |
long * | ||||
) |
int ido2db_convert_string_to_timeval | ( | char * | , | |
struct timeval * | ||||
) |
int ido2db_convert_string_to_unsignedlong | ( | char * | , | |
unsigned long * | ||||
) |
int ido2db_daemonize | ( | void | ) |
int ido2db_drop_privileges | ( | char * | , | |
char * | ||||
) |
int ido2db_end_input_data | ( | ido2db_idi * | ) |
int ido2db_free_connection_memory | ( | ido2db_idi * | ) |
int ido2db_free_input_memory | ( | ido2db_idi * | ) |
int ido2db_free_program_memory | ( | void | ) |
int ido2db_handle_client_connection | ( | int | ) |
int ido2db_handle_client_input | ( | ido2db_idi * | , | |
char * | , | |||
pthread_t * | ||||
) |
int ido2db_idi_init | ( | ido2db_idi * | ) |
int ido2db_initialize_variables | ( | void | ) |
int ido2db_kill_threads | ( | void | ) |
int ido2db_log_debug_info | ( | int | , | |
int | , | |||
const char * | , | |||
... | ||||
) |
void ido2db_parent_sighandler | ( | int | ) |
int ido2db_process_arguments | ( | int | , | |
char ** | ||||
) |
int ido2db_process_config_file | ( | char * | ) |
int ido2db_process_config_var | ( | char * | ) |
int ido2db_start_input_data | ( | ido2db_idi * | ) |
void* ido2db_thread_cleanup | ( | void * | ) |
int ido2db_wait_for_connections | ( | void | ) |