Ethereal-users: Re: [Ethereal-users] Problems adding a dissector

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

From: Patrick Hartling <patrick@xxxxxxx>
Date: Tue, 29 May 2001 10:12:54 -0500
Guy Harris <gharris@xxxxxxxxx> wrote:

} On Mon, May 28, 2001 at 07:52:10PM -0500, Patrick Hartling wrote:
} > } > When I try to decode it using
} > } > my dissector (through the Decode As ... menu option), the added protoco
*** l
} > } > isn't showing up in the list.
} > } 
} > } It'll only show up if either
} > } 
} > } 	1) the dissector is registered, using "dissector_add", with the
} > } 	   "tcp.port" dissector table (as a dissector for port 6000)
} > 
} > This is being done in the proto_reg_handoff_xxx() function for the
} > dissector.
} 
} Only one dissector per port number shows up in the hash table used both
} for handoffs based on port number and used to generate the menu, so you
} either will see only your dissector or will see only the X11 dissector,
} depending on the order in which their handoff registration routines are
} run (which is the order in which their handoff routines are called from
} "register_all_protocol_handoffs()", which is the order in which they're
} put into there by "make-reg-dotc", which is the order in which the
} source files for the dissectors is scanned by "make-reg-dotc", which is
} their order in "DISSECTOR_SRC" - except that it's done in two passes,
} the first of which looks for "proto_reg_handoff_xxx" at the beginning of
} the line and the second of which looks for "void proto_reg_handof_xxx"
} at the beginning of the line, so dissectors that do
} 
} 	void
} 	proto_reg_handoff_xxx(void)
} 	{
} 		...
} 	}
} 
} get their handoff routines called before dissectors that do
} 
} 	void proto_reg_handoff_xxx(void)
} 	{
} 		...
} 	}
} 
} .)

Thanks, this suggestion is working nicely.  :)

 -Patrick


Patrick L. Hartling			| Research Assistant, VRAC
patrick@xxxxxxx				| 2624 Howe Hall -- (515)294-4916
http://www.137.org/patrick/		| http://www.vrac.iastate.edu/