Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What am I doing wrong

Assuming that Wireshark correctly supports Lua dissectors registering dissector tables and Lua dissectors registering in those dissector tables.

For non-Lua dissectors, there are routines that are called during the first pass of dissector initialization - those routines register protocols, dissectors, protocol fields, and dissector tables - and routines that are called during the second pass of dissector initialization - those routines fetch named dissector handles and field information, and register in dissector tables. All pass 1 routines are called before any pass 2 routine is called, ensuring that, for example, all dissector tables are created before any dissector tries to register in the table.

No mechanism to do that is provided for Lua dissectors, so you would have to manually ensure that the protocol's dissector creates the new dissector table before the sub-protocol's dissector tries to register in it; that means you'll have to put both of the protocol implementations in the same Lua source file, as, if they were in separate files, there would be no way to ensure that the protocol's Lua file gets run before the sub-protocol's Lua file.

I have filed bug 15907 for this problem.