[FFmpeg-devel] [PATCH/RFC] Prefer getaddrinfo over gethostbyname

Ronald S. Bultje rsbultje
Wed Jan 20 15:51:24 CET 2010


Hi,

2010/1/20 M?ns Rullg?rd <mans at mansr.com>:
> Why don't you use the system struct sockaddr instead of trying to
> replicate it? ?If it's not big enough for ipv6 addresses, the system
> clearly doesn't support ipv6 in the first place.

See RFC-2553 (http://www.rfc-editor.org/rfc/rfc2553.txt). struct
sockaddr_storage is expected to be of that size and should contain a
ss_family member at the very least.

I agree making it that big is not necessary for most purposes, but
we're trying to tear apart the "do I have ipv6 or not" issue (which is
really a kernel thing, and can differ per system) from the
availability of some structs on the build system. At some point, we
might be able to build binaries that work and support "whatever's
best" on both win2k (ipv4-only) and winxp (ipv6-also), all in the same
binary.

I think the patch is a good idea (will review in a bit).

Ronald



More information about the ffmpeg-devel mailing list