After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735991 - pcapparse: add support for IPv6
pcapparse: add support for IPv6
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-03 20:27 UTC by Felipe Alexandre Ferreira
Modified: 2018-11-03 13:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Changes to add support for IPv6 and IP in IP tunneling (10.56 KB, patch)
2014-09-03 20:27 UTC, Felipe Alexandre Ferreira
needs-work Details | Review
patch, add IPv6 support, in git format-patch format (13.19 KB, patch)
2014-09-04 19:53 UTC, Felipe Alexandre Ferreira
needs-work Details | Review
removing C99 comment, changing "{{{" for memset (1.62 KB, patch)
2014-09-05 21:15 UTC, Felipe Alexandre Ferreira
needs-work Details | Review

Description Felipe Alexandre Ferreira 2014-09-03 20:27:56 UTC
Created attachment 285288 [details] [review]
Changes to add support for IPv6 and IP in IP tunneling

pcapparse bad plugin don't support IPv6 packages, just IPv4. I made a patch to add IPv6 support, and tunneling 6in4 or 4in6. 
I've made the patch based in 0.10 branch, but since the code of function that decodes IP header don't changed, i think it will work in 1.x branches.
Comment 1 Tim-Philipp Müller 2014-09-03 20:44:15 UTC
Thanks for the patch. Could you please create a patch in 'git format-patch' style format? (i.e. incl. full commit message and author etc.)

And run gst-indent over the .c file, and convert the c++ comments into C comments please? Thanks!

I can confirm that it does apply to git master, although it would still be good if you could make one on top of git master.
Comment 2 Felipe Alexandre Ferreira 2014-09-04 12:32:24 UTC
Ok, thank you for attention. I will do this changes and i will post here today later.
Comment 3 Felipe Alexandre Ferreira 2014-09-04 19:53:32 UTC
Created attachment 285409 [details] [review]
patch, add IPv6 support, in git format-patch format

Here is!
Comment 4 Sebastian Dröge (slomo) 2014-09-05 07:57:11 UTC
Review of attachment 285409 [details] [review]:

Thanks for the patch :)

::: gst/pcapparse/gstpcapparse.c
@@ +63,3 @@
   PROP_DST_IP,
+  PROP_SRC_IP6,
+  PROP_DST_IP6,

It should be possible to re-use the existing IP properties, and detect if the string is an IPv6 or IPv4 IP.

@@ +256,3 @@
+    return FALSE;
+
+  //ret can be 1,0 or -1

No C99 comments

@@ +563,3 @@
   guint16 len;
+  struct in6_addr ip6_src_addr = { {{0}} };     /* This triple braces is a workaround for GCC bug 53119 */
+  struct in6_addr ip6_dst_addr = { {{0}} };     /* this triple braces is a workaround for GCC bug 53119 */

Maybe just memset()?
Comment 5 Felipe Alexandre Ferreira 2014-09-05 21:15:09 UTC
Created attachment 285527 [details] [review]
removing C99 comment, changing "{{{" for memset

Ok, I did as you recommended. For new changes,  should I post a patch with the last changes only or a full patch?
Comment 6 Sebastian Dröge (slomo) 2014-09-12 11:17:37 UTC
Comment on attachment 285527 [details] [review]
removing C99 comment, changing "{{{" for memset

A full patch please, and you forgot the first change I mentioned :) The one about the properties.

Also please use your full name in the GIT config instead of just your first name
Comment 7 David Woodhouse 2014-10-09 14:45:42 UTC
The decode_network_layer() function should be static. I get this warning:
gstpcapparse.c: At top level:
gstpcapparse.c:507:10: warning: no previous prototype for 'decode_network_layer' [-Wmissing-prototypes]
 gboolean decode_network_layer



And the patch doesn't actually build:

gstpcapparse.c: In function 'gst_pcap_parse_init':
gstpcapparse.c:193:7: error: 'GstPcapParse' has no member named 'has_src_ip6'
   self->has_src_ip6 = FALSE;
       ^
gstpcapparse.c:194:7: error: 'GstPcapParse' has no member named 'has_dst_ip6'
   self->has_dst_ip6 = FALSE;
       ^
gstpcapparse.c: In function 'gst_pcap_parse_get_property':
gstpcapparse.c:283:39: error: 'GstPcapParse' has no member named 'src_ip6'
       get_ip6_address_as_string (&self->src_ip6, ip_str);
                                       ^
gstpcapparse.c:288:39: error: 'GstPcapParse' has no member named 'dst_ip6'
       get_ip6_address_as_string (&self->dst_ip6, ip_str);
Comment 8 Sebastian Dröge (slomo) 2016-11-16 14:56:42 UTC
Any progress here?
Comment 9 Konstantin Ripak 2018-02-19 12:57:53 UTC
Tested with version 1.8.3 - seems to work (after adding missing members in the header). Patches themselves require reformatting (please remove non-related code formatting change).
Comment 10 GStreamer system administrator 2018-11-03 13:26:29 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/173.