Ethereal-dev: [Ethereal-dev] Appending data to a proto_item

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

From: Biot Olivier <Olivier.Biot@xxxxxxxxxxx>
Date: Tue, 14 Oct 2003 14:54:47 +0200
Hi all,

Is it normal that when appending text to a proto_item linked to an header
field, this extra text cannot be searched for in a display filter expression
that applies to this header field?

Somewhere in my code I write:

	ti = proto_tree_add_string(tree, hf_hdr_accept_charset,
				tvb, hdr_start, offset-hdr_start,
				val_to_str(val, vals_character_sets,
					"Unknown character set identifier
(0x%X)"));

And at some later point I write:

	/* computation of str not shown here */
	proto_item_append_text (ti, "; Q=%s", str);

I define hf_hdr_accept_charset as an FT_STRING. There are packets in my
trace where I get in both parts of the code, thus:

	Accept-Charset: utf-8; Q=0.80

gets into the tree view, and

	wsp.hdr.accept_charset == "utf-8"

matches this entry, while

	wsp.hdr.accept_charset == "utf-8; Q=0.80"

Does not match any packet.

Any ideas?

Regards,

Olivier