aboutsummaryrefslogtreecommitdiffstats
path: root/include/openssl
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-04-20 09:51:55 +0100
committerMatt Caswell <matt@openssl.org>2017-04-25 11:13:39 +0100
commit5114d8227e0516fffc0c8653f5118290709f6494 (patch)
treee5626dd44bfe76607fc068314b7dc12fa977b780 /include/openssl
parentb3c42fc2503a685a9e51427c1a83c8f09487389d (diff)
downloadopenssl-5114d8227e0516fffc0c8653f5118290709f6494.tar.gz
Add a BIO_lookup_ex() function
The existing BIO_lookup() wraps a call to getaddrinfo and provides an abstracted capability to lookup addresses based on socket type and family. However it provides no ability to lookup based on protocol. Normally, when dealing with TCP/UDP this is not required. However getaddrinfo (at least on linux) never returns SCTP addresses unless you specifically ask for them in the protocol field. Therefore BIO_lookup_ex() is added which provides the protocol field. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3286)
Diffstat (limited to 'include/openssl')
-rw-r--r--include/openssl/bio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/openssl/bio.h b/include/openssl/bio.h
index 6585ec03b4..225642bed0 100644
--- a/include/openssl/bio.h
+++ b/include/openssl/bio.h
@@ -667,6 +667,9 @@ enum BIO_lookup_type {
int BIO_lookup(const char *host, const char *service,
enum BIO_lookup_type lookup_type,
int family, int socktype, BIO_ADDRINFO **res);
+int BIO_lookup_ex(const char *host, const char *service,
+ enum BIO_lookup_type lookup_type,
+ int family, int socktype, int protocol, BIO_ADDRINFO **res);
int BIO_sock_error(int sock);
int BIO_socket_ioctl(int fd, long type, void *arg);
int BIO_socket_nbio(int fd, int mode);
@@ -805,6 +808,7 @@ int ERR_load_BIO_strings(void);
# define BIO_F_BIO_GET_PORT 107
# define BIO_F_BIO_LISTEN 139
# define BIO_F_BIO_LOOKUP 135
+# define BIO_F_BIO_LOOKUP_EX 143
# define BIO_F_BIO_MAKE_PAIR 121
# define BIO_F_BIO_NEW 108
# define BIO_F_BIO_NEW_FILE 109