Back to index

nagios-nrpe  2.13
nrpe.h
Go to the documentation of this file.
00001 /************************************************************************
00002  *
00003  * NRPE.H - NRPE Include File
00004  * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
00005  * Last Modified: 08-10-2011 by Konstantin Malov
00006  *
00007  * License:
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00022  *
00023  ************************************************************************/
00024 
00025  /*
00026   * 08-10-2011 IPv4 subnetworks support added.
00027   * Main change in nrpe.c is that is_an_allowed_host() moved to acl.c
00028   *
00029   */
00030 
00031 /**************** COMMAND STRUCTURE DEFINITION **********/
00032 
00033 typedef struct command_struct{
00034        char *command_name;
00035        char *command_line;
00036        struct command_struct *next;
00037         }command;
00038 
00039 int process_arguments(int,char **);
00040 void wait_for_connections(void);
00041 void handle_connection(int);
00042 int read_config_file(char *);
00043 int read_config_dir(char *);
00044 int get_log_facility(char *);
00045 int add_command(char *,char *);
00046 command *find_command(char *);
00047 void sighandler(int);
00048 int drop_privileges(char *,char *);
00049 int check_privileges(void);
00050 
00051 int write_pid_file(void);
00052 int remove_pid_file(void);
00053 
00054 void free_memory(void);
00055 int validate_request(packet *);
00056 int contains_nasty_metachars(char *);
00057 int process_macros(char *,char *,int);
00058 int my_system(char *,int,int *,char *,int);             /* executes a command via popen(), but also protects against timeouts */
00059 void my_system_sighandler(int);                         /* handles timeouts when executing commands via my_system() */
00060 void my_connection_sighandler(int);                     /* handles timeouts of connection */
00061 
00062 void sighandler(int);
00063 void child_sighandler(int);
00064 
00065