Ethereal-users: Re: [Ethereal-users] Effort to implement support for a new protocol

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 28 Jul 2003 15:43:57 -0700

On Monday, July 28, 2003, at 3:31 PM, Andy Howell wrote:
	Setting column headings is done before if(tree)

Not necessarily. It has to be done regardless of whether the "tree" argument is null, but you can set column headings after you start building the protocol tree.

However, you should set the Protocol column, and put *something* in the Info column even if you only clear it, before you extract anything from the packet, so that if the dissector throws an exception (because, for example, the frame is too short), the columns reflect the protocol for your dissector, not the protocol for the dissector that called yours.

Note also that, if your dissector calls subdissecotrs, you must, regardless of whether the "tree" argument is null, do enough work to call those subdissectors.

When debugging, the gui version, ethereal grabs the mouse, making debugging troublesome.

Yes - when you click on a frame the keyboard and/or mouse is grabbed (I forget which). At home, at least, I use a version of GTK+ that I hacked to have a "--gtk-no-grabs" command-line argument, which disables those grabs, and run Ethereal with that argument when debugging.