Ethereal-dev: RE: [Ethereal-dev] Print in packet Bytes pane

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

From: "Guy Harris" <gharris@xxxxxxxxx>
Date: Thu, 25 May 2006 16:35:45 -0700 (PDT)
Marinko Cabrilo wrote:

> Thank you for information.
> I have planned to print data from the TCP packet under "Packet Details
> pane" after "Data (20 Bytes)". I like to use same place where data store
> for printing for the "Packet Byte pane".

You can't put arbitrary text in the packet details pane; you can only put
strings in there with proto_tree_add_text().

You can't fetch the text from the packet byte pane to do that.  There's no
guarantee that the text for the packet byte pane *exists* at the time you
add items to the protocol tree, and you can't add items to the protocol
tree from the code that puts text in the packet byte pane.

If you want to put the raw data into the packet details pane for TCP,
modify the TCP dissector to take the tvbuff it hands to the data dissector
and format the data itself, putting it into the protocol tree with
proto_tree_add_text().


_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev