On 12/27/10 07:48, kiranb wrote: > For IP address validation, 'm using network address and service translation > API getaddrinfo(). It is used to validate the configured machine is IPV4 or > IPV6 by checking retrieved struct addrinfo member ai_family contents.
Can you describe in more detail what you're trying to accomplish? Are you trying to check whether the machine you're running on supports IPv4 and/or IPv6? Or are you trying to check whether a given string conforms to the proper syntax for a numeric IPv4 or IPv6 address? If it's the former, I don't think getaddrinfo() is a good choice. It'd probably be simpler to create a UDP socket and bind to loopback (127.1 and ::1). If a protocol isn't supported, you should get an error in doing that. (For what it's worth, on modern OpenSolaris, both IPv4 and IPv6 are always enabled.) If it's the latter, then it sounds like you may have found a bug. -- James Carlson 42.703N 71.076W <carls...@workingcode.com> _______________________________________________ networking-discuss mailing list networking-discuss@opensolaris.org