Ethereal-dev: RE: [ethereal-dev] The first pass versus later display of frames

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

From: Jeff Foster <jfoste@xxxxxxxxxxxx>
Date: Thu, 13 Apr 2000 08:46:55 -0500
>is there any reliable way to tell that you are in the first pass decode or
>have been called to redisplay a frame?


This is a problem I struggled with for the socks dissector. I was using the
absolute timestamp of the packet to determine if it was new, but have change

to using the fd->num variable because it was simpler to code.

This is the code that I used...


static guint32 last_row= 0;	/* used to see if packet is new */

in the protocol init routine

	last_row = 0;		/* reset last row */		

in the dissector 
	if ( fd->num > last_row){	/* new packet */	
		last_row = fd->num;

	/* do what you must */
	}



Jeff Foster.