System Administration & Network Administration
wireshark filter tshark
Updated Mon, 20 Jun 2022 04:40:49 GMT

How to display only the source port with tshark


I can display the source and destination tcp ports with

tshark -T fields -e tcp.port
1111,2222
2222,1111
[...]

How can I display only the source port in order to get

1111
2222



Solution

Like this

tshark -e tcp.srcport -T fields




Comments (1)

  • +0 – And the way to find it - is via tshark -G. This will print all possible supported fields and then you just search in the output field that interests you — Nov 11, 2016 at 23:04