P_dns4_name_to_IP 3porty 2011-04-13 libporty manual

NAME

P_dns4_name_to_IP, P_dns4_IP_to_name

SYNPOSIS

#include <libporty/net/dns4.h>

int P_dns4_name_to_IP (unsigned long int * ip , const char * hostname );
int P_dns4_IP_to_name (char ** hostname , unsigned long int * ip );

Link with -lporty_net

DESCRIPTION

Convert hostname to IP or back (dns resolve). Input for P_dns4_name_to_IP is a const string hostname , IP will be stored in ip . P_dns4_IP_to_name takes a pointer to an IP and upon successful call will allocate a string and store the hostname in it. The caller needs to use free(3) on the pointer.

RETURN VALUE

Both call returns 0 on success.

P_dns4_name_to_IP 3porty 2011-04-13 libporty manual