Ethereal-dev: Re: [ethereal-dev] Picking up info along the way and making it available later

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

From: Lars Gaarden <Lars.Gaarden@xxxxxxx>
Date: Sun, 28 Mar 1999 05:17:17 +0200

"Gilbert Ramirez Jr." wrote:

> The NCP dissect code would be able to take advantage of this. I need IPX to
> pass certain values down to the NCP layer. Right now I pass them through
> global variables. yuck!  Would your list be permanent? That is, would you
> keep a list in memory for every packet? Or would you free the memory after
> the packet is dissected? IPX/NCP only needs them temporarily, during the
> packet-dissection. It uses the variables to make a key into the NCP
> hashtable.

It seems to me that many protocol analyzers have to implement some kind
of state machine to properly decode sessions. Instead of implementing all
this separately for each single protocol, wouldn't it be better to make a
generic facility to keep state? That is - make it possible for the dissect-*
routines to save state to a structure, and later retrieve it.

LarsG