GNOME Bugzilla – Bug 515962
[udp] add ipv6 support to multiudpsink and udpsrc, add multiudpsink ttl and loopback properties
Last modified: 2008-05-22 20:57:15 UTC
This patch adds ipv6 support for udpsrc and udpsink. It has been tested in Ubuntu7.10 (x86) and Nokia N800 (armel) with an ipv6 enabled kernel. At this moment I'm unable to use cvs, because of the internet connection I'm using, so the patch for cvs will be made available later. Issues: In order to receive ipv6 packets with udpsrc we need to specify the ipv6 localhost or else it will default to ipv4, we can do this by specifying multicast-group=::1 for unicast or multicast-group=FF0E::1 for multicast. This patch was written by request of IT Aveiro (www.av.it.pt) on behalf of the C-Mobile Project.
Created attachment 105016 [details] [review] ipv6 patch for udp
Created attachment 105017 [details] [review] ipv6 patch for udp
Created attachment 105133 [details] [review] udp patch for the cvs version
Created attachment 105224 [details] [review] Adds IPv6 support to udpsrc and udpsink This patch improves over the previous one by removing the uncessary additional socket, since we can use an AF_INET6 socket to send to IPv4 addresses.
Created attachment 105233 [details] [review] Adds IPv6 support to udpsrc and udpsink, adds ttl and loopback properties to multiudpsink. Adds ttl and loopback properties to multiudpsink over the previous patch
*** Bug 341537 has been marked as a duplicate of this bug. ***
Created attachment 106153 [details] [review] Add ipv6 support to udp This patch improves over the previous ones by fixing a potencial read buffer overflow in gst_udp_get_addr.
Created attachment 107079 [details] [review] updated patch Updated patch that applies to current HEAD.
Created attachment 107176 [details] [review] added fallback to ipv4 in multiudpsink if OS does not support ipv6 If the OS does not support IPv6 multiudpsink will fail in gst_multiudpsink_init_send. This new updated patch will created a IPv4 socket if it fails creating and Ipv6 socket.
Patch by: Bruno Santos <brunof at ua dot pt> * gst/udp/gstudpnetutils.c: (gst_udp_get_addr), (gst_udp_join_group), (gst_udp_leave_group), (gst_udp_is_multicast): * gst/udp/gstudpnetutils.h: Provide a bunch of helper methods to deal with IPv4 and IPv6 transparently. * gst/udp/gstmultiudpsink.c: (gst_multiudpsink_class_init), (gst_multiudpsink_init), (gst_multiudpsink_set_property), (gst_multiudpsink_get_property), (join_multicast), (gst_multiudpsink_init_send), (gst_multiudpsink_add_internal), (gst_multiudpsink_remove): * gst/udp/gstmultiudpsink.h: Add multicast TTL and loopback properties. Use the helper methods to implement ip4 and ip6. * gst/udp/gstudpsrc.c: (gst_udpsrc_create), (gst_udpsrc_start): * gst/udp/gstudpsrc.h: Use the helper methods to implement ip4 and ip6. Fixes #515962.
Nice :) If you have any problems or issues regarding this patch (or anything related to IPv6), do not be afraid to ask for support.