Patch by Robert Scheck 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); }