Ethereal-dev: [Ethereal-dev] Re: [Ethereal-users] multi-line tree node

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: Tue, 20 Nov 2001 23:19:40 -0800
(Sent to ethereal-dev, as that's the list appropriate for questions
about writing protocol dissectors.)

On Mon, Nov 19, 2001 at 03:57:20PM -0800, Guy Harris wrote:
> > I would like to add a node to the protocol tree in the
> > middle pane that can display multiple lines of pure
> > text.
> > I tried both proto_tree_add_text() and
> > proto_tree_add_string_format(), both display the
> > multi-line string in one line, with the "\n" replaced
> > by a funny character, and the entire string truncated.
> > Is there a way to do this?
> 
> No, there isn't.  It might be nice, but nobody's implemented it yet.

An alternative might be to put multiple nodes into the protocol tree,
one per line, as the Cisco Discovery Protocol dissector does; see
"add_multi_line_string_to_tree()" in "packet-cdp.c".  That *isn't* a
node that can display multiple lines of pure text, it's *multiple*
nodes, one per line, but that may be good enough.