Ethereal-dev: Re: [ethereal-dev] SCTP bakeoff experiences and more ...

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Mon, 03 Jul 2000 16:34:21 -0500
On Mon, Jul 03, 2000 at 12:04:58PM -0700, Guy Harris wrote:
> > But how can I raise an exception manually?
> 
> Well, if you include "exceptions.h", you can do
> 
> 	THROW(<exception>)

(exceptions.h is included automatically by every dissector.
packet.h includes tvbuff.h which includes exceptions.h)

In exceptions.h I try to [tersely] document how to use TRY, CATCH, THROW,
and friends.

> 
> > The last question I have is dealing with the IP dissector. Is anyone
> > adapting it to the tvbuff structure?
> 
> It (along with all the other dissectors) will ultimately be converted to
> use tvbuffs; I don't know whether Gilbert is currently working on that -
> it's currently not at the head of my list of things to do.

No, I haven't been working on it. I started converting packet-ip.c, but only
converted IGMP. I was making good progress on the conversion, but it got
boring. I'm trying to motivate myself to continue the tvbuffication process. :)

> > Or should one contribute
> > modifictions to it regarding some kind of error handling: for example
> > handling of wrong length field or padding at the end of short IP datagrams?
> 
> It's probably worth doing that for now; that code (along with other
> bounds-checking code already in various dissectors) will probably be
> removed when dissectors get converted to use tvbuffs (as it's presumably
> redundant).

Yes, feel free to modify the code as it currently is.

--gilbert