I am trying to write a dissector to dissect my protocol in Wireshark. There are some statuses I want to save for every TCP stream (or session). I want to know the last packet length in the same TCP stream. I try to use a big table to store. I use the Field("tcp.stream") to index the stream but it caused an amazing bug. When I double-click the Pinfo columns, the result in the tree item (which had dissected correctly) suddenly goes bad .I try to use pinfo.visited to slove it , but the pinfo.visted always be true . So, can someone help me? asked 27 May '15, 19:04 DavidNorth |
2 Answers:
As pointed out earlier, the protocol tree is rebuilt each time you click on a packet in the GUI - or more to the point, the packet is completely re-dissected/parsed each time it's clicked, as well as some other times (like when you apply a display filter). You said you tried to use a big Lua table to store using the So what you need to do is also have a Lua table indexed by packet numbers ( answered 27 Jun '15, 18:26 Hadriel Thanks a million. You are very helpful.I'm not good at English, I don't know how to express my gratitude But what you said really means a lot to me,thanks!!!!!^__^ (28 Jun '15, 20:42) DavidNorth |
According to JeffMorriss "The protocol tree is rebuilt each time you click on the item.." answered 29 May '15, 06:20 izopizo edited 28 Jun '15, 20:57 Guy Harris ♦♦ |
the bug happend not only when i double-click the pinfo cols , click differnet pinfo cols can also cause the the bug