262 lines
4.8 KiB
C
262 lines
4.8 KiB
C
/************************************************************************
|
|
*
|
|
* NRPE Common Header File
|
|
* Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
|
|
* Last Modified: 11-23-2007
|
|
*
|
|
* License:
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
************************************************************************/
|
|
|
|
#ifndef _CONFIG_H
|
|
#define _CONFIG_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
|
|
#define DEFAULT_SERVER_PORT @nrpe_port@ /* default port to use */
|
|
|
|
#define NRPE_LOG_FACILITY @log_facility@
|
|
|
|
#undef ENABLE_COMMAND_ARGUMENTS
|
|
#undef ENABLE_BASH_COMMAND_SUBSTITUTION
|
|
#undef socklen_t
|
|
#undef HAVE_GETOPT_LONG
|
|
#undef HAVE_LIBWRAP
|
|
#undef STDC_HEADERS
|
|
#undef HAVE_STRDUP
|
|
#undef HAVE_STRSTR
|
|
#undef HAVE_STRTOUL
|
|
#undef HAVE_STRTOK_R
|
|
#undef HAVE_INITGROUPS
|
|
#undef HAVE_CLOSESOCKET
|
|
#undef HAVE_SIGACTION
|
|
#undef HAVE_RFC931_TIMEOUT
|
|
|
|
#undef SIZEOF_INT
|
|
#undef SIZEOF_SHORT
|
|
#undef SIZEOF_LONG
|
|
|
|
/* #undef const */
|
|
#undef USE_SSL_DH
|
|
|
|
/* stupid stuff for u_int32_t */
|
|
#undef U_INT32_T_IS_USHORT
|
|
#undef U_INT32_T_IS_UINT
|
|
#undef U_INT32_T_IS_ULONG
|
|
#undef U_INT32_T_IS_UINT32_T
|
|
|
|
#ifdef U_INT32_T_IS_USHORT
|
|
typedef unsigned short u_int32_t;
|
|
#endif
|
|
#ifdef U_INT32_T_IS_ULONG
|
|
typedef unsigned long u_int32_t;
|
|
#endif
|
|
#ifdef U_INT32_T_IS_UINT
|
|
typedef unsigned int u_int32_t;
|
|
#endif
|
|
#ifdef U_INT32_T_IS_UINT32_t
|
|
typedef uint32_t u_int32_t;
|
|
#endif
|
|
|
|
/* stupid stuff for int32_t */
|
|
#undef INT32_T_IS_SHORT
|
|
#undef INT32_T_IS_INT
|
|
#undef INT32_T_IS_LONG
|
|
|
|
#ifdef INT32_T_IS_USHORT
|
|
typedef short int32_t;
|
|
#endif
|
|
#ifdef INT32_T_IS_ULONG
|
|
typedef long int32_t;
|
|
#endif
|
|
#ifdef INT32_T_IS_UINT
|
|
typedef int int32_t;
|
|
#endif
|
|
|
|
|
|
/***** ASPRINTF() AND FRIENDS *****/
|
|
|
|
#undef HAVE_VSNPRINTF
|
|
#undef HAVE_SNPRINTF
|
|
#undef HAVE_ASPRINTF
|
|
#undef HAVE_VASPRINTF
|
|
#undef HAVE_C99_VSNPRINTF
|
|
#undef HAVE_VA_COPY
|
|
#undef HAVE___VA_COPY
|
|
|
|
|
|
#define SOCKET_SIZE_TYPE ""
|
|
#define GETGROUPS_T ""
|
|
#define RETSIGTYPE ""
|
|
#undef HAVE_STRUCT_SOCKADDR_STORAGE
|
|
|
|
/* Use seteuid() or setresuid() depending on the platform */
|
|
#undef SETEUID
|
|
|
|
/* Is this a Solaris 10 machine? */
|
|
#undef SOLARIS_10
|
|
|
|
#undef HAVE_GETOPT_H
|
|
#ifdef HAVE_GETOPT_H
|
|
#include <getopt.h>
|
|
#endif
|
|
|
|
#undef HAVE_STRINGS_H
|
|
#undef HAVE_STRING_H
|
|
#ifdef HAVE_STRINGS_H
|
|
#include <strings.h>
|
|
#endif
|
|
#ifdef HAVE_STRINGS_H
|
|
#include <string.h>
|
|
#endif
|
|
|
|
#undef HAVE_UNISTD_H
|
|
#ifdef HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
|
|
#undef HAVE_SIGNAL_H
|
|
#ifdef HAVE_SIGNAL_H
|
|
#include <signal.h>
|
|
#endif
|
|
|
|
#undef HAVE_SYSLOG_H
|
|
#ifdef HAVE_SYSLOG_H
|
|
#include <syslog.h>
|
|
#endif
|
|
|
|
#undef HAVE_SYS_STAT_H
|
|
#ifdef HAVE_SYS_STAT_H
|
|
#include <sys/stat.h>
|
|
#endif
|
|
|
|
#undef HAVE_FCNTL_H
|
|
#ifdef HAVE_FCNTL_H
|
|
#include <fcntl.h>
|
|
#endif
|
|
|
|
#undef HAVE_SYS_TYPES_H
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
#include <sys/types.h>
|
|
#endif
|
|
|
|
#undef HAVE_SYS_WAIT_H
|
|
#ifdef HAVE_SYS_WAIT_H
|
|
#include <sys/wait.h>
|
|
#endif
|
|
|
|
#ifndef WEXITSTATUS
|
|
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
|
|
#endif
|
|
#ifndef WIFEXITED
|
|
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
|
|
#endif
|
|
|
|
#undef HAVE_ERRNO_H
|
|
#ifdef HAVE_ERRNO_H
|
|
#include <errno.h>
|
|
#endif
|
|
|
|
/* needed for the time_t structures we use later... */
|
|
#undef TIME_WITH_SYS_TIME
|
|
#undef HAVE_SYS_TIME_H
|
|
#if TIME_WITH_SYS_TIME
|
|
# include <sys/time.h>
|
|
# include <time.h>
|
|
#else
|
|
# if HAVE_SYS_TIME_H
|
|
# include <sys/time.h>
|
|
# else
|
|
# include <time.h>
|
|
# endif
|
|
#endif
|
|
|
|
|
|
#undef HAVE_SYS_SOCKET_H
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
#include <sys/socket.h>
|
|
#endif
|
|
|
|
/* Define to 'int' if <sys/socket.h> does not define */
|
|
#undef socklen_t
|
|
|
|
#undef HAVE_SOCKET_H
|
|
#ifdef HAVE_SOCKET_H
|
|
#include <socket.h>
|
|
#endif
|
|
|
|
#undef HAVE_TCPD_H
|
|
#ifdef HAVE_TCPD_H
|
|
#include <tcpd.h>
|
|
#endif
|
|
|
|
#undef HAVE_NETINET_IN_H
|
|
#ifdef HAVE_NETINET_IN_H
|
|
#include <netinet/in.h>
|
|
#endif
|
|
|
|
#undef HAVE_ARPA_INET_H
|
|
#ifdef HAVE_ARPA_INET_H
|
|
#include <arpa/inet.h>
|
|
#endif
|
|
|
|
#undef HAVE_NETDB_H
|
|
#ifdef HAVE_NETDB_H
|
|
#include <netdb.h>
|
|
#endif
|
|
|
|
#undef HAVE_CTYPE_H
|
|
#ifdef HAVE_CTYPE_H
|
|
#include <ctype.h>
|
|
#endif
|
|
|
|
#undef HAVE_PWD_H
|
|
#ifdef HAVE_PWD_H
|
|
#include <pwd.h>
|
|
#endif
|
|
|
|
#undef HAVE_GRP_H
|
|
#ifdef HAVE_GRP_H
|
|
#include <grp.h>
|
|
#endif
|
|
|
|
#undef HAVE_DIRENT_H
|
|
#ifdef HAVE_DIRENT_H
|
|
#include <dirent.h>
|
|
#endif
|
|
|
|
#undef HAVE_SSL
|
|
|
|
#undef HAVE_KRB5_H
|
|
#ifdef HAVE_KRB5_H
|
|
#include <krb5.h>
|
|
#endif
|
|
|
|
#undef HAVE_INTTYPES_H
|
|
#undef HAVE_STDINT_H
|
|
#ifdef HAVE_INTTYPES_H
|
|
#include <inttypes.h>
|
|
#else
|
|
#ifdef HAVE_STDINT_H
|
|
#include <stdint.h>
|
|
#endif
|
|
#endif
|
|
|
|
#endif
|