[FFmpeg-devel] [PATCH] Use getaddrinfo in resolve_host (ipv6 support)

Ronald S. Bultje rsbultje
Tue Aug 21 04:02:00 CEST 2007


Hi,

attached patch makes resolve_host() use getaddrinfo() in addition to
gethostbyname(). This makes ffmpeg's tcp (udp already was) ipv6-compatible.

Features:
- tcp.c is now ipv6-compatible

Bugs:
- ffserver (which also uses resolve_host()) is not, because it uses all sort
of ipv4-specific structures internally. I will fix this later.
- udp.c was already ipv6-compatible, and I didn't do anything to integrate
it. The new function declaration of resolve_host() is now similar to the
ipv6-version inside udp.c, which should make it easy to integrate the two
versions. However, the ipv4 and ipv6-versions in udp.c are not only
completely different code paths, they are also completely non-resemblent, so
I can't integrate them in any reasonable way without changing at least one
of the two completely. Merging those two codepaths should, at the least, be
in a separate patch, and whoever cracked up udp.c should fix it (after being
shot), not me. I don't feel much like fixing what I didn't break to begin
with.
- the return code (what I'm really interested in, for things like "could not
resolve host" error notices to users etc.) isn't useful/used yet, that'll
come in a next version or separate patch (I expect people will want separate
patches for this one).

The patch is not ready yet, this preliminary version is more for comments on
the way in which I did it, I'll fix up ffserver for the final version in
addition to stuff you guys want me to change.

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resolvehost-ipv6.patch
Type: application/octet-stream
Size: 13023 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070820/1c6618e5/attachment.obj>



More information about the ffmpeg-devel mailing list