lwip_getaddrinfo() function
Translates the name of a service location (for example, a host name) and/or a service name and returns a set of socket addresses and associated information to be used in creating a socket with which to address the specified service. Memory for the result is allocated internally and must be freed by calling lwip_freeaddrinfo()! Due to a limitation in dns_gethostbyname, only the first address of a host is returned. Also, service names are not supported (only port numbers)! @todo: implement AI_V4MAPPED, AI_ADDRCONFIG
Arguments
nodename
descriptive name or address string of the host (may be NULL -> local address)
servname
port number as string of NULL
hints
structure containing input values that set socktype and protocol
res
pointer to a pointer where to store the result (set to NULL on failure)
Return value
0 on success, non-zero on failure
Examples
lwip_getaddrinfo() is referenced by
6 libraries and example projects.
Location | Text |
netdb.c:269 | lwip_getaddrinfo(const char *nodename, const char *servname, |
netdb.h:126 | int lwip_getaddrinfo(const char *nodename, |
Functions called by lwip_getaddrinfo()
lwip_getaddrinfo()
Data read by lwip_getaddrinfo()
Data written by lwip_getaddrinfo()
lwip_getaddrinfo()
Type of lwip_getaddrinfo()
lwip_getaddrinfo()
size_t all items filtered out