Hi, I am trying to create a custom lua dissector for the Modbus protocol. This protocol can have any number of identically structured attributes depending upon the packet contents. For example: Register 1 :some value Register 2 :some value Register 3 :some value Register 4 :some value and so on. I need to come up with a way to create protocol fields dynamically and give them dynamic names. In case of the above example since I do not know before hand how many registers are going to be present, I need to count the data during run time and accordingly number the registers (eg. Register 1, Register 2 and so on). So I wanted to know if there is any way to achieve this.
Also I wanted to know if there is any way to optimize the Lua dissectors as I am dealing with large chunks of wireshark data and it takes a lot of time to apply a filter due to the dissector. I was wondering is there a way to precompile Lua dissectors so that they are not compiled every time a filter is applied.
Thank you in advance.
asked 05 Aug '16, 12:56
edited 06 Aug '16, 04:03