ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] color in the protocol tree widget

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

From: Matthijs Melchior <mmelchior@xxxxxxxxx>
Date: Tue, 09 Sep 2003 23:00:28 +0200
Hi,
   In the course of verifying the behaviour of my ASN.1 dissector,
I have implemented a feature in ethereal that may be more generally

uesful.  I want to make two changes before submitting a patch.

   The new featue is the following:

   When a filter is applied to the packet list, the protocol fields
that participated in the match are marked [with a different background
color] in the protocol tree display. All fields in the tree that enclose
the relevant value are marked, from the value up to the root of the tree.
This is particuilarly handy when there are more PDUs in a packet and
only one PDU matches the selection expression...

If the field in the expression was hidden, the code looks for a field
that is not hidden and describes the same byte in the tvbuff, and marks
that one. It uses the routine to map from byte display to tree display.

There are two issues I want some guidance on.

- I want the gnome2 GtkTreeView widget to display colored backgrounds
 just like the old GtkCTree widget, with a white separation between
 the rows and not as a contigues colored area,  All my experiments
 to achieve this have failed....
 Please direct me to info how to do this.

- I really want to mark the fields according to the outcome of the test
 they participared in, not just due to the fact that their value was read.
 The structure of the code is such that by the time the outconme of the
 test is known, the reference to the field_info struct is long gone...
 And the presence test does not involve a field_info struct at all...
 The indicator for color must be part of the field_info struct because
 that is the one that gets presented in the gui widget.

 Should I expand the fvalue_t struct with a pointer to the appropriate
 field_info struct [and how about littereals that do not have field_info]..
 Maybe there are better ways!


And of course, the colors will be modifiable in the color preferences
dialogue.

Thanks.

--
Regards,
----------------------------------------------------------------  -o)
Matthijs Melchior                                       Maarssen  /\\
mmelchior@xxxxxxxxx                                  Netherlands _\_v
---------------------------------------------------------------- ----