[FFmpeg-devel] [PATCH] IPv6 support v.2

Ronald S. Bultje rsbultje
Sat Dec 1 16:11:57 CET 2007


On Dec 1, 2007 8:05 AM, M?ns Rullg?rd <mans at mansr.com> wrote:

> "Ronald S. Bultje" <rsbultje at gmail.com> writes:
> > Can I make CONFIG_NETWORK depend on CONFIG_IPV6 then, just to cover for
> the
> > general future direction here? Makes the rest of the patch a bit easier.
> Are you suggesting we require IPv6 support?  IMHO that's not so good,
> unless you can convince me that everybody that matters has the
> necessary headers.

Not exactly, but everybody will need the getaddrinfo() API, which is the API
that allows IPv6 (in addition to other network protocols), whereas the
currently used API only does IPv4 (gethostbyname()). That's probably what
you meant, but so it doesn't require IPv6.

The idea proposed by Michael, Luca and others is to use getaddrinfo()
directly and to provide a fallback getaddrinfo() implementation in a
separate library (or to link it in if it exists already) for those systems (
e.g. OS/2) that lack it.

The easiest way to do that is to make CONFIG_NETWORK depend on CONFIG_IPV6
and to add configure checks for those platform that require the special code
if they lack getaddrinfo() itself, such as to set up the linking to the new
lib providing the getaddrinfo() wrapper (Michael suggested providing a
libossupport library if that's needed), etc.

The idea of a wrapper function to wrap IPv4/IPv-independent code (a la
resolve_host()) was rejected because it looks too much like getaddrinfo()
and is redundant on all those systems that have it, doing it like in
udp.c(#ifdef CONFIG_IPV6 spaghetti) will lead to a gigantic mess (I'd
rather not
do that) and other than that, I don't really think there's a good way to do


More information about the ffmpeg-devel mailing list