BIO_lookup_ex

Resolve host / service into a BIO_ADDRINFO list with protocol selection.

Synopsis

Declared in <openssl/bio.h>

int
BIO_lookup_ex(
    char const* host,
    char const* service,
    int lookup_type,
    int family,
    int socktype,
    int protocol,
    BIO_ADDRINFO** res);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
hostHostname or address string to look up, or NULL for wildcard.
serviceService name or port string, or NULL.
lookup_typeBIO_LOOKUP_CLIENT or BIO_LOOKUP_SERVER.
familyAddress family (for example AF_INET, AF_INET6, or AF_UNSPEC).
socktypeSocket type (for example SOCK_STREAM or SOCK_DGRAM).
protocolProtocol number (for example IPPROTO_TCP), or 0 for default.
resReceives the head of the allocated BIO_ADDRINFO list; free with BIO_ADDRINFO_free().