Hi all,

I am writing a client program to connect to the server and  I want my code to support both IPV4 and IPV6 addresses and henceforth I am using the APR calls as APR internal takes care of it.

The issues I am facing are:
1> The apr_sockaddr_info_get () goes fine if I specify the hostname(myserver.domain.com) with APR_UNSPEC, but the same thing fails when I specify the IP address in dotted format in place of hostname.
apr_sockaddr_info_get(&sa, hostname, APR_UNSPEC, port, APR_IPV4_ADDR_OK, mypool);
2> Are there any equivalent APR calls similar to inet_addr() and inet_ntoa() and gethostbyname()? i.e to convert network address to IP and vice versa and also hostname to IP address mapping.
Can some one please guide me to write a simple client program thats handles both IPV4 and IPV6 address and also how to resolve a given hostname/IP address?

--
With Regards,
Raj