RE: Print in packet Bytes pane
"Guy Harris" <[email protected]>
| Newsgroups | gmane.network.ethereal.devel |
|---|---|
| Message-ID | <[email protected]> |
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().