[FFmpeg-devel] [PATCH] Clean up ipv6 vs the udp protocol
Tue Jan 12 12:13:27 CET 2010
On Tue, 12 Jan 2010, Luca Abeni wrote:
> Well, I think if there is no sockaddr_in6 there is no IPv6 too.
> So, CONFIG_IPV6 seems to be a better name than CONFIG_IPV6_MULTICAST.
> (the point being: sockaddr_in6 is related to IPv6, not to IPv6
> Or maybe the best thing would be to have HAVE_SOCKADDR_IN6,
> instead of a CONFIG_* thing.
> Based on this, I think your third patch should just check for the
> presence of sockaddr_in6, instead of checking for IN6_IS_ADDR_MULTICAST...
We need struct ipv6_mreq also, and having struct sockaddr_in6 doesn't
imply ipv6_mreq. E.g., on OS X leopard, we have sockaddr_in6, but
ipv6_mreq vanishes if -D_POSIX_C_SOURCE=200112 is set.
All the uses of sockaddr_in6 are within sections dealing with multicast,
at the moment, so having the switch named CONFIG_IPV6_MULTICAST seemed
natural to me. Or we could keep the name CONFIG_IPV6, even if other IPv6
things work just fine without it.
But yes, we could switch to checking for individual types, instead. Then
we'd have to check for both "struct ipv6_mreq" and "struct sockaddr_in6"
(unless you assume ipv6_mreq implies sockaddr_in6). Do you prefer that?
Any other opinions?
More information about the ffmpeg-devel