Ethereal-dev: Re: [Ethereal-dev] Re: Improving filter speed

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

From: didier <dgautheron@xxxxxxxx>
Date: Fri, 25 Mar 2005 22:53:46 +0000
ronnie sahlberg wrote:
Ok,

Can you
1, change the new variable infilter to a better name   like
is_referenced  or something

2, change the proto_tree_is_null() function to only take one
parameter, the protocol hf_field and return a gboolean TRUE/FALSE and
rename it as  is_protocol_referenced() or something, and only take the
int  proto hf field as parameter so one would write code like
    if(!is_protocol_referenced(proto_nfs)){
	tree=NULL
}
is_protocol_referenced() needs to know the tree. Ie it's is_protocol_referenced or tree is visible.

so one can also solve the problem with NLM and similar which calls
dissectors from other protocols and make nfs do
if( !is_protocol_referenced(proto_nfs)
  &&!is_protocol_referenced(proto_nlm)){
	tree=NULL;
}
3, document the new variable, the assumptions and howto use the new
optimization for dissectors so others can add it to the other
dissectors.
What values does it take for fields and protocols etc.
Didier