In the GUI I can use Analyze > Decode as... > RTP Searching on google I find two "ways" of doing this:
and
neither of these work. When I open the p_out.pcap in wireshark it's still in UDP What is the proper method for achieving this? asked 15 Feb '16, 23:42 testname0110 edited 16 Feb '16, 00:35 sindy |
2 Answers:
The pcap (or pcapng, or any other capture file format) does not store the So you could use "display filter" answered 16 Feb '16, 01:06 sindy |
Back to the basics. Wireshark makes interpretations based on its knowledge on how network frames are composed. Therefore we start at the bottom. For most common network frames the datalinktype is Ethernet. Therefore the (generic) frame dissector hands the received frame (read form the pcap file) to the ethernet dissector. This reads the beginning of the frame and decides it contains an IP packet, and hands the remainder to the IP dissector. The IP dissector decides it contains an UDP payload, and hands the remainder to the UDP dissector. The UDP dissector now has a problem. The port number in the dissector doesn't uniformly identify the payload type, so it has to try to find out where to hand the payload another way. Sometimes there are other protocols in the capture which tell something (think SIP/SDP for example), sometimes the payload itself has a 'magic' value to identify the payload type. For RTP there is very little to go on, unless an external signalling protocol identifies gives you the port numbers, the payload doesn't give you much to go on. That's where the option 'decode as' and rtp_udp preference come into play. These allow the operator to force interpretation of the UDP payload as RTP, because of the high probability of false positive identification of random UDP payload as RTP. So, the capture file just contains network frames, it's the interpretation Wireshark makes of them that shows RTP. answered 16 Feb '16, 12:44 Jaap ♦ |
Are you saying that the changes are being made but only within that command line? So if I need the file in that format I need to pipe it immediately in the same command to use it in that format?
No. I am saying that no changes are made at all, and I am saying that "piping the output to another application on a common command line" has nothing to do with it either. By specifying command line parameters to tshark, you are not modifying environmental values of the shell (which another application could look at) but merely controlling the behaviour of that tshark instance alone.
I am also saying that there is no way to associate any individual
decode as
rules to a particular capture file, which is what I suppose you want to achieve. You can define a set of staticdecode as
rules in the basic preferences profile and/or additional preferences profiles you can switch among, but the rule set from the chosen profile will be used to any capture file, not just to a particular one.Without the
-w filename
option, tshark's output is textual. With that option, its output is in a pcapng binary format, whose structure provides no room for specification of any dissection rules.What you tell tshark is:
what dissectors to use for specific packets on top / instead of the default ones. This is the equivalent of manual
Decode as...
setting in Wireshark.which packets to let through to the output, using the "display filter" and/or "capture filter" expressions. This is a direct equivalent of capture filter and display filter in Wireshark.
only if the specified output type is textual, i.e. if
-w
is not specified: which information from the packets elected by the display filter and in what form to display in textual form.If you would use
-w -
to tell tshark that the format of the output shall be pcapng but stdout shall be used, and pipe that output to another instance of tshark (or to Wireshark), that other instance of tshark would not inherit the settings from the first one.When I run "tshark -r file.pcap -o rtp.heuristic_rtp" it does indeed output the decoded, dynamic payload packets. But this is only during that thread of execution, so it is necessary to pipe the output where I want it immediately. But you are correct