Wireshark

  • Riverbed Technology
  • WinPcap
SHARKFEST '13 - Wireshark Developer and User Conference - June 16-19, 2013 - UC Berkeley
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-users: Re: [Wireshark-users] OpenBSD enc0 capture from tcpdump failes to decode

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: Brad Guillory <brad@xxxxxxxxx>
Date: Fri, 25 Sep 2009 14:05:33 -0600


On Sep 25, 2009, at 12:53 PM, Guy Harris wrote:

Now, given that BSD/OS died a while ago, we could just treat a link-
layer type of 13 as "encapsulated IPSec packets".  (Of course, OpenBSD
could just write them out with a link-layer type of 109 in the file,
too - nothing *requires* that the value returned by pcap_datalink()
and the value in the file be the same, and, in fact, tcpdump.org's
libpcap maps them, precisely to *avoid* this problem.)

When I change the link type to 109 (6d) using a hex editor tshark was able to decode the packet so things look promising. Is there a tool that people regularly use to made this kind of change en-mass? I'm sure I can work something out in perl but I don't want to reinvent the wheel.


Try changing

#if defined(DLT_ATM_RFC1483) && (DLT_ATM_RFC1483 == 13)
	{ 13,		WTAP_ENCAP_ATM_RFC1483 },
#elif defined(DLT_ENC) && (DLT_ENC == 13)
	{ 13,		WTAP_ENCAP_ENC },
#endif

in wiretap/pcap-common.c in the Wireshark source to just

	{ 13,		WTAP_ENCAP_ENC },

and recompiling.

Making this change and recompiling works with unmodified capture files. Does the final solution need to be done here: ./epan/ dissectors/packet-enc.c?

It seems to me that if we make the change above it might break something for someone. But if we add the enc dissector to the end of linktype 13's chain, anything that fell through to the enc dissector was not going to decode anyway. I don't fully understand the architecture so that might be entirely wrongheaded.

I will try to code up an alternative to this fix that won't break anything else.

Thanks,

Brad Guillory

  • Follow-Ups:
    • Re: [Wireshark-users] OpenBSD enc0 capture from tcpdump failes to decode
      • From: Guy Harris
  • Prev by Date: Re: [Wireshark-users] OpenBSD enc0 capture from tcpdump failes to decode
  • Next by Date: [Wireshark-users] TCP Stream Graph
  • Previous by thread: [Wireshark-users] mutlpile traces in a single pcap file - how to split?
  • Next by thread: Re: [Wireshark-users] OpenBSD enc0 capture from tcpdump failes to decode
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation