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

How do I access a column's data for a packet from my dissector code?

asked 28 Jun '11, 09:31

tut087's gravatar image

tut087
1443
accept rate: 0%

edited 30 Jun '11, 18:13

cmaynard's gravatar image

cmaynard ♦♦
9.3k1038142

Well, the Protocol and Info column reflect what you've put there, so you access them by remembering what you put there.

Many of the other columns are generated from data in the packet_info structure; what particular column or columns do you want?

(28 Jun '11, 10:58) Guy Harris ♦♦

I just want the packet number... guess that is there in frame_data. How do I access frame_data?

(28 Jun '11, 11:02) tut087

PINFO_FD_NUM(pinfo)

or, in older versions of Wireshark that might not have that macro,

pinfo->fd->num
permanent link

answered 28 Jun '11, 11:06

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

Thanks a lot.... :)

(28 Jun '11, 11:13) tut087
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:

×637
×29

question asked: 28 Jun '11, 09:31

question was seen: 3,194 times

last updated: 30 Jun '11, 18:13

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