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

Postdissector executes more than one time per packet?

0

I'm trying to use Postdissector, but I found that postdissector may be triggered several times per packet captured. I tried the following code and it proved the fact. I'm a newbie to lua in wireshark and i'm not sure if there's something else needs to be done. Glad if anyone can help~

do
test_proto = Proto ("test", "Test Protocol")

function test_proto.dissector (buffer, pinfo, tree) tw:append(tostring(pinfo.abs_ts)) tw:append("\n") end register_postdissector(test_proto)

tw = TextWindow.new("Debug") end

something in the debug window: 1321624108.557 1321624108.557(this is the 2nd occurence) 1321624108.5764 1321624108.5764(and this)

asked 18 Nov ‘11, 05:53

forbidden's gravatar image

forbidden
6112
accept rate: 0%


One Answer:

0

The post-dissector is called for a packet each time it's dissected, and it goes through multiple passes of dissection, as Guy recently explained in another post.

answered 18 Nov '11, 06:48

bstn's gravatar image

bstn
3751415
accept rate: 14%