[gst-devel] New UDPSrc in CVS.
Sjoerd Simons
sjoerd at air.luon.net
Thu Feb 26 10:47:09 CET 2004
On Thu, Feb 26, 2004 at 04:53:56PM +0100, Ramón García wrote:
> > Yes, but for now it's not that bad, since you're
> > working on your own branch. Once you plan on
> > backporting to CVS HEAD,it'd be nice if it'd
> > work on ipv4-only machines (which is most machines
> > currently in existance
>
> Any recent Linux distro, including Redhat Linux 7.2 or
> later, has the necessary IPv6 support. The ipv6.o
> module stored somewhere under /lib/modules is enough.
>
> Of course, it would be much better that the element
> decides whether to enable or no depending on kernel
> support. But there is a complication. The element has
> calls to IPv6 name resolving functions defined in
> libc, such as getaddrinfo(3). Thus it will probably
> not run if the libc installed in the system has IPv6
> support. Thus to enable runtime conditional support of
> IPv6, calls to that functions would have to be
> conditional as well, something like:
>
> getaddrinfo = dlsym(libc_handle, "getaddrinfo");
>
> If you know how to do this, please tell me :-).
The getaddrinfo call works just fine on ipv4 only machines. There is
nothing ipv6 specific about this call. Also it's supported on all recent
unix afaik, so that shouldn't be a big problem.
But if you use AF_UNSPEC as the ai_family in your request, then you can
get addrinfo's back for address family's your kernel doesn't support. In
this case creating a socket will fail. This is easily handled by looping
through all the returned addrinfo structs untill you get to one for which you
can create a socket.
Another thing that you have to look out for is that some machines do have
ipv6 support but aren't connected to an ipv6 network. In tcp
applications this can be handled by trying the next addrinfo struct when
connect fails, i don't know how to do that with udp.
Note that i didn't read your code and you didn't really explain what the
problem was. But i hope this helps
Sjoerd
--
There are ten or twenty basic truths, and life is the process of
discovering them over and over and over.
-- David Nichols
More information about the gstreamer-devel
mailing list