tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: struct sockaddr_storage issues



>I think getaddrinfo() has a lot of baggage. For my current use case I
>prefer to keep it simple and only deal with IPv4 or IPv6 addresses.
>I've seen reports of buggy getaddrinfo() implementations on some
>platforms, which ignore some of the flags you mentioned. May be those
>bugs have been fixed by now...

As far as I can tell, if you used getaddrinfo() it would result in less
code and zero portability concerns which I think meets the definition of
"simpler", and depending on the platform it could get you some things
for free you might not know about but could find useful (e.g: IPv6 scope
identifer support).  I am aware that some early implementations of
getaddrinfo() did not support all of the specified flags in the hints
structure but as far as I know those are all super-old at this point and
shoudn't be an issue on any reasonably modern system.

Just my $0.02, it's your code after all.

--Ken


Home | Main Index | Thread Index | Old Index