aboutsummaryrefslogtreecommitdiffstats
path: root/e_os.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-02-02 15:54:57 +0100
committerRichard Levitte <levitte@openssl.org>2016-02-03 19:37:07 +0100
commit28a0841bf58e3813b2e07ad22f19484308e2f70a (patch)
tree41bc78f3b4c995f1e97f85d930537103e41d4dbb /e_os.h
parentba2de73b185016e0a98e62f75b368ab6ae673919 (diff)
downloadopenssl-28a0841bf58e3813b2e07ad22f19484308e2f70a.tar.gz
Refactoring BIO: add wrappers around sockaddr et al
Because different platforms have different levels of support for IPv6, different kinds of sockaddr variants, and some have getaddrinfo et al while others don't, we could end up with a mess if ifdefs, duplicate code and other maintainance nightmares. Instead, we're introducing wrappers around the common form for socket communication: BIO_ADDR, closely related to struct sockaddr and some of its variants. BIO_ADDRINFO, closely related to struct addrinfo. With that comes support routines, both convenient creators and accessors, plus a few utility functions: BIO_parse_hostserv, takes a string of the form host:service and splits it into host and service. It checks for * in both parts, and converts any [ipv6-address] syntax to ust the IPv6 address. BIO_lookup, looks up information on a host. All routines handle IPv4 (AF_INET) and IPv6 (AF_INET6) addresses, and there is support for local sockets (AF_UNIX) as well. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/e_os.h b/e_os.h
index 9b9bb4f765..4456b7e51c 100644
--- a/e_os.h
+++ b/e_os.h
@@ -497,6 +497,7 @@ struct servent *PASCAL getservbyname(const char *, const char *);
* configured for BSD
*/
# if defined(NETWARE_BSDSOCK)
+# include <netdb.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <sys/time.h>
@@ -545,6 +546,7 @@ struct servent *PASCAL getservbyname(const char *, const char *);
# endif
# include <netinet/in.h>
# include <arpa/inet.h>
+# include <netinet/tcp.h>
# endif
# ifdef OPENSSL_SYS_AIX