Hi, I've written a Wireshark Lua postdissector to calculate some timing values for HTTP packets. The initial code (the code that runs on Wireshark start up) includes the definition of some tables that are used to retain data between calls to the dissector function. Everything works OK but if I load a new trace file I'm picking up residual table entries associated with the previous file. I can then reinitialize the global tables if I know that the trace file has changed. How can my dissector detect that the trace file has changed? Thanks and regards...Paul asked 09 Jul '14, 13:07 PaulOfford edited 10 Jul '14, 12:59 Guy Harris ♦♦ |
One Answer:
OK, so you'd add an init routine, using Lua Your init routine would be called whenever you need to reinitialize whatever global state you maintain. answered 10 Jul '14, 12:58 Guy Harris ♦♦ |
Hadriel, is the
init_routines
table documented anywhere?It's added to using the Lua "
Proto.init()
", so documented here.Thanks for that. It works fine.
Best regards...Paul