This is our old Q&A Site. Please post any new questions and answers at

I'm currently using this to get a list of protocols found in a pcap file.

tshark -r ~/Downloads/smallFlows.pcap -Tfields -eframe.protocols | sort | uniq

I would like to narrow this down to application layer protocols only. Can I do this without filtering the output with a script (ie: Tshark and terminal commands only?)


I managed to get it doing this:

tshark -r ~/Downloads/smallFlows.pcap -Tfields -eframe.protocols -R "tcp && ip.addr==" -2 | sort | uniq | cut -d ':' -f 5

I'm curious to know if there's a better way of doing this though!

asked 15 Jun '15, 02:32

Alexandre%20Kaskasoli's gravatar image

Alexandre Ka...
accept rate: 0%

edited 15 Jun '15, 02:47

How about this one?

tshark -nr input.pcap -T fields -e frame.protocols | tr ":" "\n" | egrep -v "(eth|ip|tcp|udp)" | sort -u


permanent link

answered 15 Jun '15, 09:51

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
accept rate: 15%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 15 Jun '15, 02:32

question was seen: 3,278 times

last updated: 15 Jun '15, 09:51

p​o​w​e​r​e​d by O​S​Q​A