#include "../include/config.h"
#include "../include/common.h"
#include "../include/objects.h"
#include "../include/locations.h"
#include "../include/macros.h"
#include "../include/skiplist.h"
#include "xodtemplate.h"
#define X_SERVICE_IS_FROM_HOSTGROUP (1 << 1) |
#define xod_begin_def | ( | type | ) |
Value:
do { \ new_##type = (xodtemplate_##type *)calloc(1, sizeof(*new_##type)); \ if (new_##type == NULL) \ return ERROR; \ new_##type->register_object=TRUE; \ new_##type->_config_file=config_file; \ new_##type->_start_line=start_line; \ \ /* precached object files are already sorted, so add to tail */ \ if(presorted_objects==TRUE){ \ \ if(xodtemplate_##type##_list==NULL){ \ xodtemplate_##type##_list=new_##type; \ xodtemplate_##type##_list_tail=xodtemplate_##type##_list; \ } else { \ xodtemplate_##type##_list_tail->next=new_##type; \ xodtemplate_##type##_list_tail=new_##type; \ } \ \ /* update current object pointer */ \ xodtemplate_current_object=xodtemplate_##type##_list_tail; \ } else { \ /* add new object to head of list in memory */ \ new_##type->next=xodtemplate_##type##_list; \ xodtemplate_##type##_list=new_##type; \ \ /* update current object pointer */ \ xodtemplate_current_object=xodtemplate_##type##_list; \ } \ } while (0)
#define xodtemplate_is_service_is_from_hostgroup | ( | srv | ) | ((srv->have_initial_state & X_SERVICE_IS_FROM_HOSTGROUP) != 0) |
#define xodtemplate_set_service_is_from_hostgroup | ( | srv | ) | srv->have_initial_state |= X_SERVICE_IS_FROM_HOSTGROUP |
#define xodtemplate_unset_service_is_from_hostgroup | ( | srv | ) | srv->have_initial_state &= ~X_SERVICE_IS_FROM_HOSTGROUP |
xodtemplate_customvariablesmember* xodtemplate_add_custom_variable_to_contact | ( | xodtemplate_contact * | cntct, | |
char * | varname, | |||
char * | varvalue | |||
) |
xodtemplate_customvariablesmember* xodtemplate_add_custom_variable_to_host | ( | xodtemplate_host * | hst, | |
char * | varname, | |||
char * | varvalue | |||
) |
xodtemplate_customvariablesmember* xodtemplate_add_custom_variable_to_object | ( | xodtemplate_customvariablesmember ** | object_ptr, | |
char * | varname, | |||
char * | varvalue | |||
) |
xodtemplate_customvariablesmember* xodtemplate_add_custom_variable_to_service | ( | xodtemplate_service * | svc, | |
char * | varname, | |||
char * | varvalue | |||
) |
xodtemplate_daterange* xodtemplate_add_exception_to_timeperiod | ( | xodtemplate_timeperiod * | period, | |
int | type, | |||
int | syear, | |||
int | smon, | |||
int | smday, | |||
int | swday, | |||
int | swday_offset, | |||
int | eyear, | |||
int | emon, | |||
int | emday, | |||
int | ewday, | |||
int | ewday_offset, | |||
int | skip_interval, | |||
char * | timeranges | |||
) |
int xodtemplate_add_object_property | ( | char * | input, | |
int | options | |||
) |
int xodtemplate_begin_object_definition | ( | char * | input, | |
int | options, | |||
int | config_file, | |||
int | start_line | |||
) |
static char* xodtemplate_config_file_name | ( | int | config_file | ) | [static] |
int xodtemplate_create_escalation_condition | ( | char * | , | |
xodtemplate_escalation_condition * | ||||
) |
int xodtemplate_end_object_definition | ( | int | options | ) |
int xodtemplate_free_memory | ( | void | ) |
int xodtemplate_free_xobject_skiplists | ( | void | ) |
int xodtemplate_get_month_from_string | ( | char * | str, | |
int * | month | |||
) |
int xodtemplate_get_time_ranges | ( | char * | buf, | |
unsigned long * | range_start, | |||
unsigned long * | range_end | |||
) |
int xodtemplate_get_weekday_from_string | ( | char * | str, | |
int * | weekday | |||
) |
int xodtemplate_grab_config_info | ( | char * | main_config_file | ) |
int xodtemplate_init_xobject_skiplists | ( | void | ) |
int xodtemplate_parse_timeperiod_directive | ( | xodtemplate_timeperiod * | tperiod, | |
char * | var, | |||
char * | val | |||
) |
int xodtemplate_process_config_dir | ( | char * | dirname, | |
int | options | |||
) |
int xodtemplate_process_config_file | ( | char * | filename, | |
int | options | |||
) |
int xodtemplate_read_config_data | ( | char * | main_config_file, | |
int | options, | |||
int | cache, | |||
int | precache | |||
) |
int xodtemplate_register_command | ( | xodtemplate_command * | this_command | ) |
int xodtemplate_register_contact | ( | xodtemplate_contact * | this_contact | ) |
int xodtemplate_register_contactgroup | ( | xodtemplate_contactgroup * | this_contactgroup | ) |
int xodtemplate_register_host | ( | xodtemplate_host * | this_host | ) |
int xodtemplate_register_hostdependency | ( | xodtemplate_hostdependency * | this_hostdependency | ) |
int xodtemplate_register_hostescalation | ( | xodtemplate_hostescalation * | this_hostescalation | ) |
int xodtemplate_register_hostgroup | ( | xodtemplate_hostgroup * | this_hostgroup | ) |
int xodtemplate_register_objects | ( | void | ) |
int xodtemplate_register_service | ( | xodtemplate_service * | this_service | ) |
int xodtemplate_register_servicedependency | ( | xodtemplate_servicedependency * | this_servicedependency | ) |
int xodtemplate_register_serviceescalation | ( | xodtemplate_serviceescalation * | this_serviceescalation | ) |
int xodtemplate_register_servicegroup | ( | xodtemplate_servicegroup * | this_servicegroup | ) |
int xodtemplate_register_timeperiod | ( | xodtemplate_timeperiod * | this_timeperiod | ) |
int xodtemplate_skiplist_compare_command | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_command_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_contact | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_contact_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_contactgroup | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_contactgroup_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_host | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_host_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_hostdependency | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_hostdependency_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_hostescalation | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_hostescalation_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_hostextinfo_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_hostgroup | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_hostgroup_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_service | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_service_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_servicedependency | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_servicedependency_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_serviceescalation | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_serviceescalation_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_serviceextinfo_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_servicegroup | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_servicegroup_template | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_text | ( | const char * | val1a, | |
const char * | val1b, | |||
const char * | val2a, | |||
const char * | val2b | |||
) |
int xodtemplate_skiplist_compare_timeperiod | ( | void * | a, | |
void * | b | |||
) |
int xodtemplate_skiplist_compare_timeperiod_template | ( | void * | a, | |
void * | b | |||
) |
int presorted_objects = FALSE |
skiplist* xobject_skiplists[NUM_XOBJECT_SKIPLISTS] |
skiplist* xobject_template_skiplists[NUM_XOBJECT_SKIPLISTS] |
char* xodtemplate_cache_file = NULL |
char** xodtemplate_config_files = NULL |
int xodtemplate_current_config_file = 0 |
void* xodtemplate_current_object = NULL |
int xodtemplate_current_object_type = XODTEMPLATE_NONE |
char* xodtemplate_precache_file = NULL |