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

Ronald S. Bultje rsbultje
Sun Nov 4 18:46:01 CET 2007


Hi,

On 10/30/07, Ronald S. Bultje <rsbultje at gmail.com> wrote:

> On 10/28/07, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> >
> > ffmpeg-avinetaddr-ipv6.patch - add IPv6 host resolution and info API,
> > this deprecates resolve_host() (ipv4-only). Also converts tcp.c over to
> > the new API.
>
>
> This API needed a small enhancement (new flag) to handle the address
> family problem discussed in the rtp/ipv6 thread elsewhere. Updated patch
> attached.
>
> AVInetAddr is a replacement API for resolve_host(), which is limited to
> IPv4. AVInetAddr is fully IPv6-compatible. The API is similar to
> resolve_host(), which means that relatively minor changes are needed to port
> protocols over to the new API and become IPv6-compatible. The API consists
> of:
> - AVInetAddr: sort of a container for struct addrinfo, works on both
> ipv4-only and ipv6-capable systems
> - inetaddr_resolve: replaces resolve_host(), can either parse IPv4/6 names
> w/o host resolution or resolve hosts on a name server
> - inetaddr_alloc: for those cases where you need an empty AVInetAddr, e.g.
> for use in accept()
> - inetaddr_str: basically inet_ntop() and inet_ntoa().
> - there's also a bunch of macros to directly access (set/get) the
> port/address of AVInetAddr and some flags as last argument in
> inetaddr_resolve(). To access the family, simply use
> AVInetAddr::addr->sa_family.
>
> Other changes:
> - ports tcp.c over to the new API
>
> (I have patches for udp, ffserver, rtsp and for removal of resolve_host()
> also, I'll try 1-by-1 and see if that makes this whole submission process
> somewhat faster...)
>

Anyone want to go through the review process with me (or: ping!)? I'm
willing to address any concern, but in the end I'll need some review help to
get it in. I really think IPv6 support would be a nice feature to have in
ffmpeg, so anyone interested in networking+ff, please go along with me so we
can try to get this stuff in. In addition, once in, udp.c will get a lot
simpler, which should be good for all of us also.

Ronald




More information about the ffmpeg-devel mailing list