Ethereal-dev: Re: [ethereal-dev] dup xid in rpc dissector after applying display filter

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Tue, 16 Nov 1999 22:40:08 -0800
> rpc_init_protocol() needs to be called after a dfilter is applied, I keep
> a state of some packets in rpc_call_table to find request/reply pairs but
> also to find duplicate requests and duplicate replies. rpc_init_protocol()
> is called in open_cap_file() (file.c). Where should I add another call to 
> rpc_init_protocol()?

Nowhere. :-)

The requirement that "XXX_init_protocol()" calls be added by hand, as
necessary, is a bit of a botch.  Protocols should, if they need an init
routine, call a routine to register that init routine, and, in all
places where init routines should be called, the Ethereal infrastructure
should call all registered init routines (right now, that's in
"open_cap_file()" and "colorize_packets()" - yes, "colorize_packets()";
"filter_packet()" calls it, because most of the code path for colorizing
and filtering is the same).

I'll look at implementing that.