cgi/cmd.c File Reference

#include "../include/config.h"
#include "../include/common.h"
#include "../include/objects.h"
#include "../include/comments.h"
#include "../include/downtime.h"
#include "../include/cgiutils.h"
#include "../include/cgiauth.h"
#include "../include/getcgi.h"

Data Structures

struct  hostlist
struct  errorlist

Defines

#define MAX_AUTHOR_LENGTH   64
#define MAX_COMMENT_LENGTH   1024
#define PRINT_COMMON_HEADER   1
#define PRINT_AUTHOR   2
#define PRINT_STICKY_ACK   3
#define PRINT_PERSISTENT   4
#define PRINT_SEND_NOTFICATION   5
#define PRINT_COMMENT_BOX   6
#define PRINT_NOTIFICATION_DELAY   7
#define PRINT_START_TIME   8
#define PRINT_END_TIME   9
#define PRINT_CHECK_TIME   10
#define PRINT_FORCE_CHECK   11
#define PRINT_CHECK_OUTPUT_BOX   12
#define PRINT_PERFORMANCE_DATA_BOX   13
#define PRINT_FIXED_FLEXIBLE_TYPE   14
#define PRINT_BROADCAST_NOTIFICATION   15
#define PRINT_FORCE_NOTIFICATION   16
#define PRINT_HOST_LIST   17
#define PRINT_SERVICE_LIST   18
#define PRINT_COMMENT_LIST   19
#define PRINT_DOWNTIME_LIST   20
#define NUMBER_OF_STRUCTS   500

Functions

const char * extcmd_get_name (int id)
void request_command_data (int)
void commit_command_data (int)
int commit_command (int)
int write_command_to_file (char *)
void clean_comment_data (char *)
void print_form_element (int, int)
void print_object_list (int)
void print_help_box (char *)
void check_comment_sanity (int *)
void check_time_sanity (int *)
int process_cgivars (void)
int string_to_time (char *, time_t *)
int main (void)
 __attribute__ ((format(printf, 2, 3)))

Variables

char main_config_file [MAX_FILENAME_LENGTH]
char url_html_path [MAX_FILENAME_LENGTH]
char url_images_path [MAX_FILENAME_LENGTH]
char command_file [MAX_FILENAME_LENGTH]
char comment_file [MAX_FILENAME_LENGTH]
int check_external_commands
int use_authentication
int lock_author_names
int persistent_ack_comments
int log_external_commands_user
int content_type
int display_header
int daemon_check
int date_format
scheduled_downtimescheduled_downtime_list
commentcomment_list
char * host_name = ""
char * hostgroup_name = ""
char * servicegroup_name = ""
char * service_desc = ""
char * comment_author = ""
char * comment_data = ""
char * start_time_string = ""
char * end_time_string = ""
char help_text [MAX_INPUT_BUFFER] = ""
int notification_delay = 0
int schedule_delay = 0
int persistent_comment = FALSE
int sticky_ack = FALSE
int send_notification = FALSE
int force_check = FALSE
int plugin_state = STATE_OK
char plugin_output [MAX_INPUT_BUFFER] = ""
char performance_data [MAX_INPUT_BUFFER] = ""
time_t start_time = 0L
time_t end_time = 0L
int affect_host_and_services = FALSE
int propagate_to_children = FALSE
int fixed = FALSE
unsigned long duration = 0L
unsigned long triggered_by = 0L
int child_options = 0
int force_notification = 0
int broadcast_notification = 0
int display_type = DISPLAY_HOSTS
int show_all_hosts = TRUE
int show_all_hostgroups = TRUE
int show_all_servicegroups = TRUE
int command_type = CMD_NONE
int command_mode = CMDMODE_REQUEST
authdata current_authdata
hostlist commands [NUMBER_OF_STRUCTS]
errorlist error [NUMBER_OF_STRUCTS]
unsigned long multi_ids [NUMBER_OF_STRUCTS]
short is_authorized [NUMBER_OF_STRUCTS]
short submit_result [NUMBER_OF_STRUCTS]
int CGI_ID = CMD_CGI_ID

Define Documentation

#define MAX_AUTHOR_LENGTH   64

#define MAX_COMMENT_LENGTH   1024

#define NUMBER_OF_STRUCTS   500

#define PRINT_AUTHOR   2

#define PRINT_BROADCAST_NOTIFICATION   15

#define PRINT_CHECK_OUTPUT_BOX   12

#define PRINT_CHECK_TIME   10

#define PRINT_COMMENT_BOX   6

#define PRINT_COMMENT_LIST   19

#define PRINT_COMMON_HEADER   1

#define PRINT_DOWNTIME_LIST   20

#define PRINT_END_TIME   9

#define PRINT_FIXED_FLEXIBLE_TYPE   14

#define PRINT_FORCE_CHECK   11

#define PRINT_FORCE_NOTIFICATION   16

#define PRINT_HOST_LIST   17

#define PRINT_NOTIFICATION_DELAY   7

#define PRINT_PERFORMANCE_DATA_BOX   13

#define PRINT_PERSISTENT   4

#define PRINT_SEND_NOTFICATION   5

#define PRINT_SERVICE_LIST   18

#define PRINT_START_TIME   8

#define PRINT_STICKY_ACK   3


Function Documentation

__attribute__ ( (format(printf, 2, 3))   ) 

void check_comment_sanity ( int *   ) 

void check_time_sanity ( int *   ) 

void clean_comment_data ( char *   ) 

int commit_command ( int   ) 

void commit_command_data ( int   ) 

const char* extcmd_get_name ( int  id  ) 

int main ( void   ) 

void print_form_element ( int  ,
int   
)

void print_help_box ( char *   ) 

void print_object_list ( int   ) 

int process_cgivars ( void   ) 

void request_command_data ( int   ) 

int string_to_time ( char *  ,
time_t *   
)

int write_command_to_file ( char *   ) 


Variable Documentation

int affect_host_and_services = FALSE

int broadcast_notification = 0

int CGI_ID = CMD_CGI_ID

int check_external_commands

int child_options = 0

char command_file[MAX_FILENAME_LENGTH]

int command_mode = CMDMODE_REQUEST

int command_type = CMD_NONE

struct hostlist commands[NUMBER_OF_STRUCTS]

char* comment_author = ""

char* comment_data = ""

char comment_file[MAX_FILENAME_LENGTH]

comment* comment_list

int content_type

authdata current_authdata

int daemon_check

int date_format

int display_header

int display_type = DISPLAY_HOSTS

unsigned long duration = 0L

time_t end_time = 0L

char* end_time_string = ""

struct errorlist error[NUMBER_OF_STRUCTS]

int fixed = FALSE

int force_check = FALSE

int force_notification = 0

char help_text[MAX_INPUT_BUFFER] = ""

char* host_name = ""

char* hostgroup_name = ""

short is_authorized[NUMBER_OF_STRUCTS]

int lock_author_names

int log_external_commands_user

char main_config_file[MAX_FILENAME_LENGTH]

unsigned long multi_ids[NUMBER_OF_STRUCTS]

int notification_delay = 0

char performance_data[MAX_INPUT_BUFFER] = ""

int persistent_ack_comments

int persistent_comment = FALSE

char plugin_output[MAX_INPUT_BUFFER] = ""

int plugin_state = STATE_OK

int propagate_to_children = FALSE

int schedule_delay = 0

scheduled_downtime* scheduled_downtime_list

int send_notification = FALSE

char* service_desc = ""

char* servicegroup_name = ""

int show_all_hostgroups = TRUE

int show_all_hosts = TRUE

int show_all_servicegroups = TRUE

time_t start_time = 0L

char* start_time_string = ""

int sticky_ack = FALSE

short submit_result[NUMBER_OF_STRUCTS]

unsigned long triggered_by = 0L

char url_html_path[MAX_FILENAME_LENGTH]

char url_images_path[MAX_FILENAME_LENGTH]

int use_authentication


Generated on Wed Mar 30 17:22:22 2011 for icinga-core by  doxygen 1.4.7