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

Hi.

I need to process pcap files and extract data into csv files, including the protocol name. If I do this via Wireshark, the Protocol column is exactly what I need. However, it's very inconvenient to manually open files and export them. I've tried using TShark and it's great, but the closest thing I've found to the Protoocl is frame.protocols. I don't mind the extra data, but in several files I've tried to open this does not display the needed information. Sometimes I get eth:ip:tcp:data while Wireshark's protocol column will display the protocol name accurately.

Anything I'm missing?

Thanks.

asked 31 Jul '13, 09:51

vadgros's gravatar image

vadgros
36245
accept rate: 0%


Use -e col.Protocol. The col prefix is short for column, then the column name with the same case as is shown in Wireshark.

permanent link

answered 31 Jul '13, 10:07

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Great. Thanks a lot.

(31 Jul '13, 10:22) vadgros

As of the 1.11.x and 1.12 versions of tshark, the field names are "_ws.col.Protocol" and "_ws.col.Info", instead of "col.Protocol" and "col.Info".

Example:

tshark -T fields -e _ws.col.Protocol -e _ws.col.Info

Source: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10201

permanent link

answered 19 Jun '14, 16:58

CraigGarrett's gravatar image

CraigGarrett
8613
accept rate: 0%

edited 20 Jun '14, 10:21

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×1,620
×832
×238
×124

question asked: 31 Jul '13, 09:51

question was seen: 4,961 times

last updated: 20 Jun '14, 10:21

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