Ethereal-dev: Re: [Ethereal-dev] Re: [Ethereal-announce] Ethereal 0.9.2 released

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Tue, 5 Mar 2002 14:28:59 -0800
On Tue, Mar 05, 2002 at 01:53:39PM +0100, andreas.sikkema@xxxxxxxxxxx wrote:
> I have another Q.931 problem, the find_dissector("h225") returns 0 when
> called from proto_reg_handoff_q931.  When I register my dissectors in
> plugin_reg_handoff(), the Q.931 dissector can't find it.

Dissectors should be registered by name in "plugin_init()", not
"plugin_reg_handoff()".

The registration process for a dissector is a two-stage process.

In the first stage, the "proto_register_XXX()" routines, for built-in
dissectors, and the "plugin_init()" routines, for plug-in dissectors,
are called.  Those routines should register, by name, anything that will
be needed in the second phase, such as dissector tables/heuristic
dissector tables and named dissectors.  They should also register
protocols and preferences, if any.

In the second stage, the "proto_reg_handoff_XXX()" routines, for
built-in dissectors, and the "plugin_reg_handoff()" routines, for
plug-in dissectors, are called.  Those should

	fetch handles for any dissectors the dissector will call
	directly;

	register the dissector in any dissector tables or heuristic
	dissector tables.