Recently I created a few ProtoFields in a Lua file that contains a dissector. The ProtoFields seem to work great when I test the dissector, and I can even use them as a display filter. The file looks like this:
The problem occurs in a separate file, where I want to create a Listener to gather some statistics for the protocol. In this file I have
I’m aware that Field objects have to be created outside of the callback functions of dissectors, post-dissectors, heuristic-dissectors, and taps, which is why I did so in my code.
My questions and concerns are:
Why are my fields in the Listener file not recognized, when they are clearly recognized in the dissector?
Are they instantly destroyed after they’re used in the dissector?
Do the Field extractors have to be created in the same file that the Protofields were created in?
Does the Listener have to be created in the same file as the Dissector for this particular scenario?
I really appreciate the help and advice!
asked 10 Jul ‘14, 07:23
edited 10 Jul ‘14, 12:22
Well, first you have this:
Also, you need to make sure the file that defines the new protocol (the one with the code at the beginning of your question) is loaded before the file with the
answered 10 Jul '14, 09:06