diff options
author | M. Sean Finney <seanius@users.sourceforge.net> | 2005-10-19 12:59:55 +0000 |
---|---|---|
committer | M. Sean Finney <seanius@users.sourceforge.net> | 2005-10-19 12:59:55 +0000 |
commit | 65282c7685ca01c57d94d3df93c2f95d5b945e57 (patch) | |
tree | eb1d0c95752126bd526d939332d14bf40cf7d1f7 /plugins/netutils.h | |
parent | 8611341fb989382545c0c934c700e027d9bbab15 (diff) | |
download | monitoring-plugins-65282c7685ca01c57d94d3df93c2f95d5b945e57.tar.gz |
- initial attempt at consolidating ssl-related code into netutils.{c,h}
- added some #ifdefs to common.h and netutils.h to prevent multiple
inclusions (as netlibs now includes common.h)
- all ssl plugins (tcp/http/smtp) compile cleanly against gnutls, though
certificate checking still needs to be done.
- modified configure script so you can also explicitly say "without-gnutls"
too (otherwise if you disable openssl you have no way of disabling
gnutls too)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1255 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/netutils.h')
-rw-r--r-- | plugins/netutils.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/netutils.h b/plugins/netutils.h index 1a52eecc..85b5aa99 100644 --- a/plugins/netutils.h +++ b/plugins/netutils.h | |||
@@ -32,7 +32,11 @@ | |||
32 | * | 32 | * |
33 | ******************************************************************************/ | 33 | ******************************************************************************/ |
34 | 34 | ||
35 | #ifndef _NETUTILS_H_ | ||
36 | #define _NETUTILS_H_ | ||
37 | |||
35 | #include "config.h" | 38 | #include "config.h" |
39 | #include "common.h" | ||
36 | #include <netinet/in.h> | 40 | #include <netinet/in.h> |
37 | #include <arpa/inet.h> | 41 | #include <arpa/inet.h> |
38 | 42 | ||
@@ -77,3 +81,14 @@ extern unsigned int socket_timeout; | |||
77 | extern int econn_refuse_state; | 81 | extern int econn_refuse_state; |
78 | extern int was_refused; | 82 | extern int was_refused; |
79 | extern int address_family; | 83 | extern int address_family; |
84 | |||
85 | /* SSL-Related functionality */ | ||
86 | #ifdef HAVE_SSL | ||
87 | /* maybe this could be merged with the above np_net_connect, via some flags */ | ||
88 | int np_net_ssl_init(int sd); | ||
89 | void np_net_ssl_cleanup(); | ||
90 | int np_net_ssl_write(const void *buf, int num); | ||
91 | int np_net_ssl_read(void *buf, int num); | ||
92 | #endif /* HAVE_SSL */ | ||
93 | |||
94 | #endif /* _NETUTILS_H_ */ | ||