aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ssldump/0060-link_layer.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2019-09-02 23:02:38 +0200
committerJakub Jirutka <jakub@jirutka.cz>2019-09-02 23:02:51 +0200
commitebb712aa0a3b72ee629a5e30df237d21d6927fd1 (patch)
tree6a560511488237417915560f2173ea1bc009bbb0 /testing/ssldump/0060-link_layer.patch
parent854c539926a3bdd3d6ac2c5a5708e7e940884734 (diff)
downloadaports-ebb712aa0a3b72ee629a5e30df237d21d6927fd1.tar.bz2
aports-ebb712aa0a3b72ee629a5e30df237d21d6927fd1.tar.xz
testing/ssldump: new aport
Diffstat (limited to 'testing/ssldump/0060-link_layer.patch')
-rw-r--r--testing/ssldump/0060-link_layer.patch91
1 files changed, 91 insertions, 0 deletions
diff --git a/testing/ssldump/0060-link_layer.patch b/testing/ssldump/0060-link_layer.patch
new file mode 100644
index 0000000000..0b4df7cd66
--- /dev/null
+++ b/testing/ssldump/0060-link_layer.patch
@@ -0,0 +1,91 @@
+Patch by Robert Scheck <robert@fedoraproject.org> for ssldump >= 0.9b3 which adds
+some further link layer offsets; inspirated from the original DLT_LINUX_SLL patch
+by PeBek at http://sourceforge.net/p/ssldump/patches/6/.
+
+--- ssldump-0.9b3/base/pcap-snoop.c 2014-05-04 02:02:58.000000000 +0200
++++ ssldump-0.9b3/base/pcap-snoop.c.link_layer 2014-05-04 02:20:21.000000000 +0200
+@@ -136,6 +136,10 @@
+ len=hdr->len;
+
+ switch(pcap_if_type){
++ case DLT_RAW:
++#ifdef DLT_LOOP
++ case DLT_LOOP:
++#endif
+ case DLT_NULL:
+ data+=4;
+ len-=4;
+@@ -158,6 +162,73 @@
+ return;
+
+ break;
++ case DLT_IEEE802:
++ data+=22;
++ len-=22;
++ break;
++ case DLT_FDDI:
++ data+=21;
++ len-=21;
++ break;
++#ifdef __amigaos__
++ case DLT_MIAMI:
++ data+=16;
++ len-=16;
++ break;
++#endif
++ case DLT_SLIP:
++#ifdef DLT_SLIP_BSDOS
++ case DLT_SLIP_BSDOS:
++#endif
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__APPLE__)
++ data+=16;
++ len-=16;
++#else
++ data+=24;
++ len-=24;
++#endif
++ break;
++ case DLT_PPP:
++#ifdef DLT_PPP_BSDOS
++ case DLT_PPP_BSDOS:
++#endif
++#ifdef DLT_PPP_SERIAL
++ case DLT_PPP_SERIAL:
++#endif
++#ifdef DLT_PPP_ETHER
++ case DLT_PPP_ETHER:
++#endif
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__APPLE__)
++ data+=4;
++ len-=4;
++#else
++#if defined(sun) || defined(__sun)
++ data+=8;
++ len-=8;
++#else
++ data+=24;
++ len-=24;
++#endif
++#endif
++ break;
++#ifdef DLT_ENC
++ case DLT_ENC:
++ data+=12;
++ len-=12;
++ break;
++#endif
++#ifdef DLT_LINUX_SLL
++ case DLT_LINUX_SLL:
++ data+=16;
++ len-=16;
++ break;
++#endif
++#ifdef DLT_IPNET
++ case DLT_IPNET:
++ data+=24;
++ len-=24;
++ break;
++#endif
+ }
+ network_process_packet(n,&hdr->ts,data,len);
+ }