Ethereal-dev: Re: [Ethereal-dev] compare_proto_id taking up 20% of Ethereal's time

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 16 Nov 2003 13:21:01 -0800
On Sun, Nov 16, 2003 at 10:04:32AM -0800, Richard Sharpe wrote:
> Yes, then the big problem is that we need to run an AWK script across all 
> the source changing all those protocol index def'ns.

No - we continue to have "proto_register_protocol()" return an index
(which is what "proto_tree_add_item()" and
"proto_tree_add_protocol_format()" expect); we just change what's inside
a dissector handle, and have "dissector_add()" and the like do the
translation.

Also, we could export a "protocol_t" without exposing its contents, by
having "epan/proto.h" just do

	struct protocol;

	typedef struct protocol protocol_t;

and have "epan/proto.c" define "struct protocol".