config.h.in 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. /************************************************************************
  2. *
  3. * NRPE Common Header File
  4. * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
  5. * Last Modified: 11-23-2007
  6. *
  7. * License:
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. ************************************************************************/
  23. #ifndef _CONFIG_H
  24. #define _CONFIG_H
  25. #include <stdio.h>
  26. #include <stdlib.h>
  27. #define DEFAULT_SERVER_PORT @nrpe_port@ /* default port to use */
  28. #define NRPE_LOG_FACILITY @log_facility@
  29. #undef ENABLE_COMMAND_ARGUMENTS
  30. #undef ENABLE_BASH_COMMAND_SUBSTITUTION
  31. #undef socklen_t
  32. #undef HAVE_GETOPT_LONG
  33. #undef HAVE_LIBWRAP
  34. #undef STDC_HEADERS
  35. #undef HAVE_STRDUP
  36. #undef HAVE_STRSTR
  37. #undef HAVE_STRTOUL
  38. #undef HAVE_STRTOK_R
  39. #undef HAVE_INITGROUPS
  40. #undef HAVE_CLOSESOCKET
  41. #undef HAVE_SIGACTION
  42. #undef SIZEOF_INT
  43. #undef SIZEOF_SHORT
  44. #undef SIZEOF_LONG
  45. /* stupid stuff for u_int32_t */
  46. #undef U_INT32_T_IS_USHORT
  47. #undef U_INT32_T_IS_UINT
  48. #undef U_INT32_T_IS_ULONG
  49. #undef U_INT32_T_IS_UINT32_T
  50. #ifdef U_INT32_T_IS_USHORT
  51. typedef unsigned short u_int32_t;
  52. #endif
  53. #ifdef U_INT32_T_IS_ULONG
  54. typedef unsigned long u_int32_t;
  55. #endif
  56. #ifdef U_INT32_T_IS_UINT
  57. typedef unsigned int u_int32_t;
  58. #endif
  59. #ifdef U_INT32_T_IS_UINT32_t
  60. typedef uint32_t u_int32_t;
  61. #endif
  62. /* stupid stuff for int32_t */
  63. #undef INT32_T_IS_SHORT
  64. #undef INT32_T_IS_INT
  65. #undef INT32_T_IS_LONG
  66. #ifdef INT32_T_IS_USHORT
  67. typedef short int32_t;
  68. #endif
  69. #ifdef INT32_T_IS_ULONG
  70. typedef long int32_t;
  71. #endif
  72. #ifdef INT32_T_IS_UINT
  73. typedef int int32_t;
  74. #endif
  75. /***** ASPRINTF() AND FRIENDS *****/
  76. #undef HAVE_VSNPRINTF
  77. #undef HAVE_SNPRINTF
  78. #undef HAVE_ASPRINTF
  79. #undef HAVE_VASPRINTF
  80. #undef HAVE_C99_VSNPRINTF
  81. #undef HAVE_VA_COPY
  82. #undef HAVE___VA_COPY
  83. #define SOCKET_SIZE_TYPE ""
  84. #define GETGROUPS_T ""
  85. #define RETSIGTYPE ""
  86. #undef HAVE_STRUCT_SOCKADDR_STORAGE
  87. /* Use seteuid() or setresuid() depending on the platform */
  88. #undef SETEUID
  89. #undef HAVE_GETOPT_H
  90. #ifdef HAVE_GETOPT_H
  91. #include <getopt.h>
  92. #endif
  93. #undef HAVE_STRINGS_H
  94. #undef HAVE_STRING_H
  95. #ifdef HAVE_STRINGS_H
  96. #include <strings.h>
  97. #endif
  98. #ifdef HAVE_STRINGS_H
  99. #include <string.h>
  100. #endif
  101. #undef HAVE_UNISTD_H
  102. #ifdef HAVE_UNISTD_H
  103. #include <unistd.h>
  104. #endif
  105. #undef HAVE_SIGNAL_H
  106. #ifdef HAVE_SIGNAL_H
  107. #include <signal.h>
  108. #endif
  109. #undef HAVE_SYSLOG_H
  110. #ifdef HAVE_SYSLOG_H
  111. #include <syslog.h>
  112. #endif
  113. #undef HAVE_SYS_STAT_H
  114. #ifdef HAVE_SYS_STAT_H
  115. #include <sys/stat.h>
  116. #endif
  117. #undef HAVE_FCNTL_H
  118. #ifdef HAVE_FCNTL_H
  119. #include <fcntl.h>
  120. #endif
  121. #undef HAVE_SYS_TYPES_H
  122. #ifdef HAVE_SYS_TYPES_H
  123. #include <sys/types.h>
  124. #endif
  125. #undef HAVE_SYS_WAIT_H
  126. #ifdef HAVE_SYS_WAIT_H
  127. #include <sys/wait.h>
  128. #endif
  129. #ifndef WEXITSTATUS
  130. # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  131. #endif
  132. #ifndef WIFEXITED
  133. # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  134. #endif
  135. #undef HAVE_ERRNO_H
  136. #ifdef HAVE_ERRNO_H
  137. #include <errno.h>
  138. #endif
  139. /* needed for the time_t structures we use later... */
  140. #undef TIME_WITH_SYS_TIME
  141. #undef HAVE_SYS_TIME_H
  142. #if TIME_WITH_SYS_TIME
  143. # include <sys/time.h>
  144. # include <time.h>
  145. #else
  146. # if HAVE_SYS_TIME_H
  147. # include <sys/time.h>
  148. # else
  149. # include <time.h>
  150. # endif
  151. #endif
  152. #undef HAVE_SYS_SOCKET_H
  153. #ifdef HAVE_SYS_SOCKET_H
  154. #include <sys/socket.h>
  155. #endif
  156. /* Define to 'int' if <sys/socket.h> does not define */
  157. #undef socklen_t
  158. #undef HAVE_SOCKET_H
  159. #ifdef HAVE_SOCKET_H
  160. #include <socket.h>
  161. #endif
  162. #undef HAVE_TCPD_H
  163. #ifdef HAVE_TCPD_H
  164. #include <tcpd.h>
  165. #endif
  166. #undef HAVE_NETINET_IN_H
  167. #ifdef HAVE_NETINET_IN_H
  168. #include <netinet/in.h>
  169. #endif
  170. #undef HAVE_ARPA_INET_H
  171. #ifdef HAVE_ARPA_INET_H
  172. #include <arpa/inet.h>
  173. #endif
  174. #undef HAVE_NETDB_H
  175. #ifdef HAVE_NETDB_H
  176. #include <netdb.h>
  177. #endif
  178. #undef HAVE_CTYPE_H
  179. #ifdef HAVE_CTYPE_H
  180. #include <ctype.h>
  181. #endif
  182. #undef HAVE_PWD_H
  183. #ifdef HAVE_PWD_H
  184. #include <pwd.h>
  185. #endif
  186. #undef HAVE_GRP_H
  187. #ifdef HAVE_GRP_H
  188. #include <grp.h>
  189. #endif
  190. #undef HAVE_DIRENT_H
  191. #ifdef HAVE_DIRENT_H
  192. #include <dirent.h>
  193. #endif
  194. #undef HAVE_SSL
  195. #ifdef HAVE_SSL
  196. #include <rsa.h>
  197. #include <crypto.h>
  198. #include <dh.h>
  199. #include <pem.h>
  200. #include <ssl.h>
  201. #include <err.h>
  202. #include <rand.h>
  203. #endif
  204. #undef HAVE_KRB5_H
  205. #ifdef HAVE_KRB5_H
  206. #include <krb5.h>
  207. #endif
  208. #undef HAVE_INTTYPES_H
  209. #undef HAVE_STDINT_H
  210. #ifdef HAVE_INTTYPES_H
  211. #include <inttypes.h>
  212. #else
  213. #ifdef HAVE_STDINT_H
  214. #include <stdint.h>
  215. #endif
  216. #endif
  217. #endif