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

Michael Niedermayer michaelni
Thu Nov 8 01:08:01 CET 2007


On Wed, Nov 07, 2007 at 03:16:17PM -0800, Ronald S. Bultje wrote:
> Hi,
> 
> On Nov 7, 2007 10:35 AM, Nicolas George <nicolas.george at normalesup.org>
> wrote:
> 
> > - Implement a version of getaddrinfo and getnameinfo suitable for
> > ffmppeg's
> >  needs.
> >
> > - Drop the IPv4-only code.
> 
> [..]
> 
> > I just looked at Ronald's code, and I am wondering about his
> > inetaddr_resolve function: as far as I can see, it does exactly the same
> > as
> > getaddrinfo, only with a different API. Is it so?
> 
> 
> In part (largely), yes. However, once in, I plan to extend it with good
> error handling (see my antique errno patches if you want to know how I got
> at this point).
> 
> As for making a getaddrinfo() for systems that do have it, I guess that's
> another way, but then I wouldn't be able to generalize error handling into
> the wrapper, plus that I would risk (and be asking for) symbol clashes,
> which is especially bad since I want to export this stuff and have ffserver
> use the exported symbols (see other antique patches) rather than the current
> hacks. I originally just changed resolve_host() to be ipv6-compatible (and

the problems are that
1. its not libavformats job at all to provide any way to resolve names to
IPs, this really is outside of libavformats area, and would be a huge hack
by itself. So you can expect more resistance here no matter if AVWhatever
or getaddrinfo() libavformat has no busness exporting these
2. if there were a seperate lib for working around missing things on various
platforms then i think it would be better to export
a standard API instead of some private one
3. name clashes can only happen if a application links to 2 such getaddrinfo
implementations, and neither can be in a standard lib as in that case
our getaddrinfo code would not have been compiled

this boils down to how much are we willing to add to work around such missing
functions
if someone would post a patch to remove all rednudant code and just leave the
single IPv4/6 code id approve it as long as it works on recent
linux+macosx+bsd

also i think lack of the standard functions has to be shown to be real on
some major platform before any form of getaddrinfo() can be added

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071108/168ac1a4/attachment.pgp>



More information about the ffmpeg-devel mailing list