Wireshark-dev: [Wireshark-dev] dynamic dissector
From: "John R." <jhoger@xxxxxxxxx>
Date: Tue, 10 Oct 2006 12:11:29 -0700
I have an existing dissector which has an hf table entry for every
possible parameter... and there are a lot of optional parameters in my
protocol. I have parsable descriptor files for the protocol, and the
protocol is gradually evolving even while we ship units which
implement it.

I'd like to revise my dissector to read these descriptor files
dynamically at runtime and use a heuristic function to determine which
version of the descriptor files (if the right version is available)
should be used.

I was hoping I could just have a few hf table entries for the fixed
portions of the header. But it seems that all of the
proto_tree_add_xxx functions expect a hf id. Is it possible to add
entries to the tree control  that are not based on an hf entry? Would
I lose the ability to search for particular values?

If that's not possible to do without losing searchability (i.e. by
simply composing the entire tree control of custom formatted strings)
is it possible to dynamically create new hf entries at runtime?

Thanks,

-- John.