Extract packet direction from tshark cmd line
I want to extract the packet direction (tx,rx) of all inbound and outbound packets in the wireshark (pcap ng) file pro grammatically in Python, I read it is possible through pcapng format.
What are the tshark options to club all inbound and outbound traffic from a pcapng file and output to a csv file
Thanks ! -Farida
For future reference do you have a link to the reference that said it is possible?
https://stackoverflow.com/questions/1... This is the link where they mention that the newer pcapng has packet direction as one of the fields :
From the link above : The PCAP file format does not contain a field that holds the interface used during the capture. With that said, the newer PCAP-NG file format, currently used by Wireshark & Tshark, supports it along with packet direction.
Existing pcap-ng features:
packet dropped count annotations (comments) local IP address interface & direction hostname <-> IP address database
pcap-ng file format: https://github.com/pcapng/pcapng
(more)Support for packet direction:
https://osqa-ask.wireshark.org/questi...
You can see the EPB and bits in Wireshark GUI by reloading a capture with
Doesn't help with getting the data programmatically but a start to make sure it's in your capture files.