Ethereal-dev: Re: [ethereal-dev] New Dissector for Sinec H1

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: Wed, 1 Mar 2000 23:42:23 -0800
> - A further quick check is to look at the first two bytes of the higher
> level
>   which are ASCII 'S5'.

If they're always "S5" - the H1 dissector only dissects the data as H1
if it begins with "S5", otherwise it just calls "dissect_data()" -
perhaps the H1 dissector should be changed to return a "gboolean", and
to return FALSE if the packet doesn't begin with "S5" and TRUE
otherwise; the COTP dissector can then call "dissect_h1()" (or do so
only if the inactive subset of CLNP was used) and, if it returns TRUE,
return, otherwise call "dissect_data()".

(This could then be generalized if other protocols running atop COTP are
supported; this is similar to the way we handle ONC RPC, and there are
some other protocols, e.g. GIOP atop TCP, that could be handled
similarly, moving the check for "GIOP", say, out of "packet-tcp.c" and
into "packet-giop.c".)