On Thu, Jan 04, 2001 at 08:17:34PM -0800, David Hampton wrote:
> This is my first attempt at programming in GTK, so I'd welcome any
> comments. I'm not particularly pleased with the need for a new function
> to connect protocol names and their dissectors, but I couldn't find any
> other way to get this information to put into the dialog box.
There should be, for other reasons, other ways to connect protocols and
dissectors; for example:
the code to call dissectors through dissector tables and
dissector handles could check whether the protocol is disabled
and, if so, act as if there were no entry for the dissector in
the dissector table, or call "dissect_data()" rather than the
dissector to which the handle refers;
that code could also set "pinfo->current_proto" from the
protocol's short name rather than obliging dissectors to set it.
In addition, TCP and UDP aren't the only protocols for which one might
want to say "this conversation should be handled by this dissector" -
one could imagine it being used for the OSI protocols, or X.25, or ATM,
or..., in those cases where the dissector to be used couldn't be
determined automatically.