I have a Wireshark capture file, and I'd like to see what encapsulations it has in one of its packages. How can I do this? asked 11 Mar '12, 05:17 Skorzeny8814 edited 11 Mar '12, 12:29 Guy Harris ♦♦ |
One Answer:
I'm not sure what you mean by "encapsulations it has in one of its packages". Encapsulation, defined simply, is the "top-level" format of each frame in the file and can be "per file" or "per packet". Examples:
(Do you mean "protocols in a frame" ?) The encapsulation (or possibly the list of encapsulations) for a capture file can be determined by using Example::
answered 11 Mar '12, 07:57 Bill Meier ♦♦ edited 11 Mar '12, 12:59 |
And if you do mean "protocols in a frame" - or even those protocols sometimes thought of as "encapsulations", for example, GRE - the only way to do that would be to read the file with Wireshark or TShark and look at the frame's contents.
Thank you for pointing to capinfos.exe - I was able to check if my file format ended up in something that scapy would throw an exception on (e.g. a file type of pcapng). I then used the editcap with the -F libpcap flag to convert my pcap to libpcap (which scapy did not throw an exception on).
Yes, scapy has its own capture-file-reading code, rather than using one of the Python wrappers for libpcap, so it wouldn't magically pick up libpcap 1.1's ability to read some pcap-ng files.