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

Accessing the column data

0

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.4k1038142

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

One Answer:

1
PINFO_FD_NUM(pinfo)

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

pinfo->fd->num

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