In Wireshark, in packet details, sometimes a field occurs more than once, i.e. sometimes it is nested inside more than one nodes. If I want to read the .pcap file in tshark and filter a particular field which occurs more than once under different nodes, can I specify which one I want? For example, in the following screenshot, there is a field called
The question is, that in Tshark, can I specify that I want the asked 04 Oct '16, 00:09 Jesss |
2 Answers:
Unfortunately, currently there is no way to do so for fields which occur at the same encapsulation level. For your particular case where the two identically named fields exist at different encapsulation levels, you could possibly "misuse" MATE, which allows to specify the list of transport layers below which no extraction is performed, to extract your desired field into a new one like answered 04 Oct '16, 01:51 sindy |
The tshark answered 04 Oct '16, 02:20 grahamb ♦ |
True, but the OP wanted to filter on a particular occurrence, while
-E occurrence
only controls what the-e
shows.It wasn't clear to me if the OP did want to filter as in display or capture filter or filter the output to restrict the occurrence of a repeated field. Unfortunately the term filter is used (and misused) in many ways by Wireshark folks.
If the occurrence the OP wants displayed is the first (or last) then the issue is resolved :-)