I have a trace where I don't need the media inside the RTP Packets. I need the RTP headers, but not the real payload. Is it possible to discard/drop the media/payload while saving a trace? asked 16 May '12, 09:12 Ramsundar Ka... edited 16 May '12, 09:54 multipleinte... |
2 Answers:
Yes, this is possible. You want to set the snaplen of the capture. answered 16 May '12, 09:53 multipleinte... |
Setting the snaplen as @multipleinterfaces suggested is a good idea. If you want to truncate only specific packets (specified by a display filter), you can use the following snap.sh:
I tested the script on a sample pcap, containing SIP and RTP packets. For example, to truncate all RTP packets to 12 UDP bytes (which is the RTP header length in the sample pcap), enter this:
Note the 54 snaplen comes from the frame headers (Ethernet, IP, etc) leading up to UDP plus the length of the desired UDP payload answered 19 May ‘12, 22:26 helloworld |
Thanks a lot.
It might have been better if we have an option to set snaplen for particular payload type. Eg. If RTP then set snaplen to xx bytes.
The problem is that, if we set snaplen to zz bytes and if a non rtp (say sip signalling) packet is stripped to that size it could be a problem while analyzing a trace.
Thanks, Ram