[ Cross-posting to comp.unix.programmer and setting Followup-To ]

user923005 wrote:

> The OP should keep in mind that inet_aton() does NOT support IPv6


> and that getnameinfo() should be used instead for IPv4/v6 dual
> stack support.

inet_pton() seems more appropriate.


This function converts the character string src into a network address
structure in the af address family, then copies the network address
structure to dst.