|
| #define | IPPORT_RESERVED 1024 |
| | Highest reserved Internet port number.
|
| |
| #define | AI_PASSIVE ZSOCK_AI_PASSIVE |
| | Return an address suitable for bind() (a passive open).
|
| |
| #define | AI_CANONNAME ZSOCK_AI_CANONNAME |
| | Request the canonical host name in addrinfo.ai_canonname.
|
| |
| #define | AI_NUMERICHOST ZSOCK_AI_NUMERICHOST |
| | Treat the host name as a numeric address string.
|
| |
| #define | AI_NUMERICSERV ZSOCK_AI_NUMERICSERV |
| | Treat the service name as a numeric port string.
|
| |
| #define | AI_V4MAPPED ZSOCK_AI_V4MAPPED |
| | Return IPv4-mapped IPv6 addresses when no IPv6 addresses are found.
|
| |
| #define | AI_ALL ZSOCK_AI_ALL |
| | With AI_V4MAPPED, return both IPv6 and IPv4-mapped addresses.
|
| |
| #define | AI_ADDRCONFIG ZSOCK_AI_ADDRCONFIG |
| | Return addresses only for locally configured address families.
|
| |
| #define | NI_NOFQDN ZSOCK_NI_NOFQDN |
| | Do not return the fully qualified domain name.
|
| |
| #define | NI_NUMERICHOST ZSOCK_NI_NUMERICHOST |
| | Return the host address in numeric form.
|
| |
| #define | NI_NAMEREQD ZSOCK_NI_NAMEREQD |
| | Return an error if the host name cannot be located.
|
| |
| #define | NI_NUMERICSERV ZSOCK_NI_NUMERICSERV |
| | Return the service in numeric (port number) form.
|
| |
| #define | NI_NUMERICSCOPE 32 |
| | Return the numeric form of the scope identifier.
|
| |
| #define | NI_DGRAM ZSOCK_NI_DGRAM |
| | Look up the service name for a datagram socket.
|
| |
| #define | EAI_AGAIN DNS_EAI_AGAIN |
| | Temporary failure in name resolution.
|
| |
| #define | EAI_BADFLAGS DNS_EAI_BADFLAGS |
| | Flags argument to getaddrinfo contained an invalid value.
|
| |
| #define | EAI_FAIL DNS_EAI_FAIL |
| | Non-recoverable failure in name resolution.
|
| |
| #define | EAI_FAMILY DNS_EAI_FAMILY |
| | Address family not supported.
|
| |
| #define | EAI_MEMORY DNS_EAI_MEMORY |
| | Memory allocation failure.
|
| |
| #define | EAI_NONAME DNS_EAI_NONAME |
| | The name does not resolve for the supplied parameters.
|
| |
| #define | EAI_SERVICE DNS_EAI_SERVICE |
| | Requested service not available for the given socket type.
|
| |
| #define | EAI_SOCKTYPE DNS_EAI_SOCKTYPE |
| | Socket type not supported.
|
| |
| #define | EAI_SYSTEM DNS_EAI_SYSTEM |
| | A system error occurred; errno is set.
|
| |
| #define | EAI_OVERFLOW DNS_EAI_OVERFLOW |
| | Output buffer overflow.
|
| |
| #define | NI_MAXHOST 64 |
| | Reasonable buffer size for getnameinfo host names (extension).
|
| |
| #define | NI_MAXSERV 32 |
| | Reasonable buffer size for getnameinfo service names (extension).
|
| |
| #define | EAI_NODATA DNS_EAI_NODATA |
| | The requested name is valid but has no address data (obsolescent extension).
|
| |
|
| void | endhostent (void) |
| | Close the hosts database.
|
| |
| void | endnetent (void) |
| | Close the networks database.
|
| |
| void | endprotoent (void) |
| | Close the protocols database.
|
| |
| void | endservent (void) |
| | Close the services database.
|
| |
| void | freeaddrinfo (struct addrinfo *ai) |
| | Free addrinfo list returned by getaddrinfo.
|
| |
| const char * | gai_strerror (int errcode) |
| | Return a string describing a getaddrinfo error code.
|
| |
| int | getaddrinfo (const char *host, const char *service, const struct addrinfo *hints, struct addrinfo **res) |
| | Translate a hostname and service to a list of socket addresses.
|
| |
| struct hostent * | gethostent (void) |
| | Get the next entry from the hosts database.
|
| |
| int | getnameinfo (const struct sockaddr *addr, socklen_t addrlen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags) |
| | Translate a socket address to a hostname and service name.
|
| |
| struct netent * | getnetbyaddr (uint32_t net, int type) |
| | Look up a network by address.
|
| |
| struct netent * | getnetbyname (const char *name) |
| | Look up a network by name.
|
| |
| struct netent * | getnetent (void) |
| | Get the next entry from the networks database.
|
| |
| struct protoent * | getprotobyname (const char *name) |
| | Look up a protocol by name.
|
| |
| struct protoent * | getprotobynumber (int proto) |
| | Look up a protocol by number.
|
| |
| struct protoent * | getprotoent (void) |
| | Get the next entry from the protocols database.
|
| |
| struct servent * | getservbyname (const char *name, const char *proto) |
| | Look up a service by name and protocol.
|
| |
| struct servent * | getservbyport (int port, const char *proto) |
| | Look up a service by port number and protocol.
|
| |
| struct servent * | getservent (void) |
| | Get the next entry from the services database.
|
| |
| void | sethostent (int stayopen) |
| | Open the hosts database.
|
| |
| void | setnetent (int stayopen) |
| | Open the networks database.
|
| |
| void | setprotoent (int stayopen) |
| | Open the protocols database.
|
| |
| void | setservent (int stayopen) |
| | Open the services database.
|
| |
POSIX network database operations (<netdb.h>)
Provides hostname and service resolution (getaddrinfo/getnameinfo) and the host/network/protocol/service database functions.
- See also
- POSIX.1-2017 <netdb.h>
Definition in file netdb.h.