|
LIBRARY#include <xtend/string.h> -lxtend SYNOPSISint 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 otherwiseEXAMPLES#define IP_MAX_CHARS 64 char *hostname = "my.site.edu", ip[IP_MAX_CHARS + 1]; if ( resolve_hostname(hostname, ip, IP_MAX_CHARS + 1) == XT_OK ) { } SEE ALSOgethostbyname(3), getaddrinfo(3) Visit the GSP FreeBSD Man Page Interface. |