Ethereal-dev: Re: [Ethereal-dev] patch for packet-isis.c and friends

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

Date Next Thread Next
From: Guy Harris <gharris@xxxxxxxxx>
Date: Sun, 1 Jul 2001 17:25:51 -0700
On Sat, Jun 30, 2001 at 09:55:16PM +1000, Ronnie Sahlberg wrote:
> Attached is a patch that tvbuffifies packet-isis.c and friends.

Checked in...

> The patch is not tested since I have no access to any isis captures.
> 
> Could anyone please test this patch?

...with some changes found as a result of running it against some
captures (some of the checks against "tvb_reported_length_remaining()"
were falsely saying "there's not enough data in the packet" - and
weren't necessary, as tvbuffifying lets the tvbuff accessors do that,
and aren't even desirable, as you don't want to give up dissecting until
you actually need a piece of data that's not there, so I removed those
checks), and some other cleanups found while auditing the changes (e.g.,
using "tvb_memcpy()" rather than handing "memcpy()" the result of
"tvb_get_ptr()").

Another change was to put back the protocol-disabled checks for the
various types of ISIS frames ("CHECK_DISPLAY_AS_DATA()" won't do it, as
it's expected to be used when a dissector has been handed a tvbuff where
the stuff to dissect starts at an offset of 0, so I put in explicit
checks and calls to "dissect_data()").

That raises a question - why does ISIS treat the various PDU types as
subprotocols in the first place?  Is this just because they're dissected
by code in separate source files, with each file registering its own set
of fields?  If so, perhaps we should arrange that multiple calls to
"proto_register_field_array()" be allowed for a protocol, with new calls
adding additional fields, and get rid of the subprotocol stuff, putting
it all under ISIS.