Ethereal-dev: Re: [Ethereal-dev] Questions: Style, and one technical

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

From: "Ronnie Sahlberg" <sahlberg@xxxxxxxxxxxxxxxx>
Date: Fri, 27 Sep 2002 19:33:31 +1000
From: "David Frascone"
Sent: Friday, September 27, 2002 1:30 AM
Subject: [Ethereal-dev] Questions: Style, and one technical



> I've changed it to this, which I don't like, but I was hoping to get
> some input from people about how to do it better:
>
> {
>    Set PINFO
>
>    Examine headers/packet enough to get info about sub dissectors
>
>    if (tree) }
>       Do dissection
>    }
>
>    if (subdissector criterion) {
>       Call Subdissector
>    }
> }

You should ALWAYS do a dissection.
You may skip creating the subtree item if tree is NULL but you should still
dissect all
fields.
Othervise, filtering will not work properly.