-1

I would like a Python file that uses a serial port to generate Wireshark/pcap compatible "trace" files of the serial data being exchanged. Can someone point me at the format of the pcap file I need to create for such data? For example do I have to fake a SLIP/PPP type file or is there such a thing as a "raw serial data" file?

Note that I appreciate that serial data does not have to be "packetized" although in the case I'm working on, it logically is.

And if there is a Python library that already allows me to create the file without much effort, even better! Thanks.

Paul D Smith
  • 639
  • 5
  • 16

1 Answers1

0

For example do I have to fake a SLIP/PPP type file

No.

or is there such a thing as a "raw serial data" file?

No.

What you can do is use one of the user-defined private LINKTYPE_USER0 through LINKTYPE_USER15 values for your packets. Note that other pcap or pcapng files may use those values for different types of packets, so it's not as if your choice will be universal.

user16139739
  • 862
  • 3
  • 5