diff options
Diffstat (limited to 'plugins/netutils.h')
-rw-r--r-- | plugins/netutils.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/netutils.h b/plugins/netutils.h index 2766029e..ea653e72 100644 --- a/plugins/netutils.h +++ b/plugins/netutils.h | |||
@@ -45,6 +45,10 @@ | |||
45 | # endif /* UNIX_PATH_MAX */ | 45 | # endif /* UNIX_PATH_MAX */ |
46 | #endif /* HAVE_SYS_UN_H */ | 46 | #endif /* HAVE_SYS_UN_H */ |
47 | 47 | ||
48 | #ifndef HOST_MAX_BYTES | ||
49 | # define HOST_MAX_BYTES 255 | ||
50 | #endif | ||
51 | |||
48 | /* process_request and wrapper macros */ | 52 | /* process_request and wrapper macros */ |
49 | #define process_tcp_request(addr, port, sbuf, rbuf, rsize) \ | 53 | #define process_tcp_request(addr, port, sbuf, rbuf, rsize) \ |
50 | process_request(addr, port, IPPROTO_TCP, sbuf, rbuf, rsize) | 54 | process_request(addr, port, IPPROTO_TCP, sbuf, rbuf, rsize) |
@@ -71,8 +75,9 @@ int send_request (int sd, int proto, const char *send_buffer, char *recv_buffer, | |||
71 | /* "is_*" wrapper macros and functions */ | 75 | /* "is_*" wrapper macros and functions */ |
72 | int is_host (const char *); | 76 | int is_host (const char *); |
73 | int is_addr (const char *); | 77 | int is_addr (const char *); |
74 | int resolve_host_or_addr (const char *, int); | 78 | int dns_lookup (const char *, struct sockaddr_storage *, int); |
75 | void host_or_die(const char *str); | 79 | void host_or_die(const char *str); |
80 | #define resolve_host_or_addr(addr, family) dns_lookup(addr, NULL, family) | ||
76 | #define is_inet_addr(addr) resolve_host_or_addr(addr, AF_INET) | 81 | #define is_inet_addr(addr) resolve_host_or_addr(addr, AF_INET) |
77 | #ifdef USE_IPV6 | 82 | #ifdef USE_IPV6 |
78 | # define is_inet6_addr(addr) resolve_host_or_addr(addr, AF_INET6) | 83 | # define is_inet6_addr(addr) resolve_host_or_addr(addr, AF_INET6) |
@@ -87,7 +92,7 @@ extern int econn_refuse_state; | |||
87 | extern int was_refused; | 92 | extern int was_refused; |
88 | extern int address_family; | 93 | extern int address_family; |
89 | 94 | ||
90 | RETSIGTYPE socket_timeout_alarm_handler (int) __attribute__((noreturn)); | 95 | void socket_timeout_alarm_handler (int) __attribute__((noreturn)); |
91 | 96 | ||
92 | /* SSL-Related functionality */ | 97 | /* SSL-Related functionality */ |
93 | #ifdef HAVE_SSL | 98 | #ifdef HAVE_SSL |