Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Calling chained dissector only once and modifying payload for fu

From: Jeswin Mathai <jeswinrokz@xxxxxxxxx>
Date: Thu, 12 Apr 2018 12:45:21 +0000
want to modify payload of a packet before it is processed by its desired dissector. I've written a chained dissector in lua, which modifies the tvb and then calls the next dissector with the modified tvb. The plugins is working correctly. The issue I'm facing is that the dissector is called every time, upon applying filter or opening the io graph, which makes it slower. I can call my dissector only once by checking the value of pinfo.visited. But doing so the payload is not modified and the desired dissector processes the original payload after the first run. I'm looking for a solution so that my dissector is called only onces, which will processes and modifies the payload on the first run. The modified payload should persist so that whenever the packet is visited again(by applying filters or IO graph or Endpoints) the desired dissector would process the modifed payload rather than the original one