Ethereal-dev: [ethereal-dev] new macro

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

From: gram@xxxxxxxxxxxxxxxxxxx (Gilbert Ramirez Jr.)
Date: Wed, 23 Sep 1998 00:35:00 -0500 (CDT)
I just added a new very small macro to the cvs tree, in packet.h.

#define END_OF_FRAME	(fd->cap_len - offset)

This is useful inside a dissect_*() routine when you want ethereal to
highlight your protocol from some offset to the end of the frame.  It makes
the code a bit more readable I think.

So the code in dissect_data() becomes:

 (void) add_item_to_tree(GTK_WIDGET(tree), offset, END_OF_FRAME,
                        "Data");

--gilbert
-- 
Gilbert Ramirez                Voice:  +1 210 358 4032
Technical Services             Fax:    +1 210 358 1122
University Health System       San Antonio, Texas, USA