diff options
| author | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | 2003-03-08 02:26:22 +0000 |
|---|---|---|
| committer | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | 2003-03-08 02:26:22 +0000 |
| commit | 4a95946a9b634513494553808b31372060e3c045 (patch) | |
| tree | 25a976382e9e4812e565599de93e68cb0b2d0a83 /plugins/netutils.h.in | |
| parent | c8ba525d6a1f040cb439f3a963cdb32c36c8f2a8 (diff) | |
| download | monitoring-plugins-4a95946a9b634513494553808b31372060e3c045.tar.gz | |
AF indepedent routines introduced.
Modifed process_request() & my_connect() parameters to make 'proto' type
'int' rather than 'char *' and use IPPROTO_* POSIX values.
Removed is_dotted_quad() & my_inet_aton() functions
Added is_addr(), is_inet_addr(), is_inet6_addr() and resolve_host_or_addr()
functions to check whether it is a valid IP address
Modified is_host() to call is_addr() and is_hostname()
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@384 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/netutils.h.in')
| -rw-r--r-- | plugins/netutils.h.in | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/plugins/netutils.h.in b/plugins/netutils.h.in index 1907ab7e..69cf2781 100644 --- a/plugins/netutils.h.in +++ b/plugins/netutils.h.in | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #undef HAVE_STRINGS_H | 34 | #undef HAVE_STRINGS_H |
| 35 | #undef HAVE_STRING_H | 35 | #undef HAVE_STRING_H |
| 36 | 36 | ||
| 37 | #include "config.h" | ||
| 37 | #include "common.h" | 38 | #include "common.h" |
| 38 | #include <netinet/in.h> | 39 | #include <netinet/in.h> |
| 39 | #include <arpa/inet.h> | 40 | #include <arpa/inet.h> |
| @@ -41,22 +42,16 @@ | |||
| 41 | void socket_timeout_alarm_handler (int); | 42 | void socket_timeout_alarm_handler (int); |
| 42 | 43 | ||
| 43 | int process_tcp_request2 (char *address, int port, char *sbuffer, | 44 | int process_tcp_request2 (char *address, int port, char *sbuffer, |
| 44 | char *rbuffer, int rsize); | 45 | char *rbuffer, int rsize); |
| 45 | int process_tcp_request (char *address, int port, char *sbuffer, | 46 | int process_tcp_request (char *address, int port, char *sbuffer, |
| 46 | char *rbuffer, int rsize); | 47 | char *rbuffer, int rsize); |
| 47 | int process_udp_request (char *address, int port, char *sbuffer, | 48 | int process_udp_request (char *address, int port, char *sbuffer, |
| 48 | char *rbuffer, int rsize); | 49 | char *rbuffer, int rsize); |
| 49 | int process_request (char *address, int port, char *proto, char *sbuffer, | 50 | int process_request (char *address, int port, char *proto, char *sbuffer, |
| 50 | char *rbuffer, int rsize); | 51 | char *rbuffer, int rsize); |
| 51 | 52 | ||
| 52 | int my_tcp_connect (char *address, int port, int *sd); | 53 | int my_tcp_connect (char *address, int port, int *sd); |
| 53 | int my_udp_connect (char *address, int port, int *sd); | 54 | int my_udp_connect (char *address, int port, int *sd); |
| 54 | int my_connect (char *address, int port, int *sd, char *proto); | 55 | int my_connect (char *address, int port, int *sd, int proto); |
| 55 | |||
| 56 | int my_inet_aton (register const char *cp, struct in_addr *addr); | ||
| 57 | 56 | ||
| 58 | #ifndef DEFAULT_SOCKET_TIMEOUT | ||
| 59 | #include "config.h" | ||
| 60 | #include "common.h" | ||
| 61 | #endif | ||
| 62 | int socket_timeout = DEFAULT_SOCKET_TIMEOUT; | 57 | int socket_timeout = DEFAULT_SOCKET_TIMEOUT; |
