On Sat, Mar 23, 2002 at 06:49:44AM -0500, Adam wrote:
> > > You should probably create conversations for LEAP messages - do it the
> > > same way the SMB dissector does, as SMB can also run atop TCP/IP or atop
> > > a raw link layer. Attach a LEAP state to the conversation when you
> > > create it, and, on the first pass through the capture (when
> > > "pinfo->fd->flags.visited" is false), update that state, and use it to
> > > figure out what various fields mean.
> >
> > I haven't done that yet.
>
> This patch (hopefully) does this:
>
> http://www.eax.com/patches/ETHEREAL/ethereal-leap-3-diff
It does all of that except for creating the conversations and attaching
state to them.
I've checked in a merger of your changes and changes I'd been doing to
create and maintain conversations and to keep state in the conversation.
(It turns out there's no need to check the "visited" flag; once a LEAP
frame has been visited, it has state attached to it - those are the only
frames where you use the state - and there's no harm in updating the
conversation state on visited frames, other than a small CPU time hit,
as it's only used for frames that don't have state attached to them.)
I also made it set the state to -1 on EAP_FAILURE before looking at any
subsequent fields in the packet, so that it gets updated even if
subsequent frame processing throws an exception, and replaced some C++
comments with C comments (not all C compilers accept C++ comments).