![]() |
![]()
| ![]() |
![]()
NAMExt_resolve_hostname() - Convert hostname to IP address LIBRARY#include <xtend/string.h> -lxtend SYNOPSISint xt_resolve_hostname(const char *hostname, char *ip, size_t ip_buff_len) ARGUMENTShostname Name of the host to be resolved ip Character array to receive IP address ip_buff_len Size of ip array including null byte DESCRIPTIONResolve a host name to an IP address. RETURN VALUESXT_OK on success, XT_FAIL otherwise EXAMPLES#define IP_MAX_CHARS 64 char *hostname = "my.site.edu", SEE ALSOgethostbyname(3), getaddrinfo(3)
|