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

Ethereal-dev: AW: [Ethereal-dev] adding multiple values to tree

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

From: Lars Dörner <mail@xxxxxxxxx>
Date: Tue, 31 Jan 2006 16:22:52 +0100
That's the fuction :


/* Add FT_UINT{8,16,24,32} to a proto_tree */
proto_item *
proto_tree_add_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint
start, gint length,
		guint32 value)
{
	proto_item		*pi = NULL;
	field_info		*new_fi;
	header_field_info	*hfinfo;

	if (!tree)
		return (NULL);

	TRY_TO_FAKE_THIS_ITEM(tree, hfindex);

	PROTO_REGISTRAR_GET_NTH(hfindex, hfinfo);
	switch(hfinfo->type) {
		case FT_UINT8:
		case FT_UINT16:
		case FT_UINT24:
		case FT_UINT32:
		case FT_FRAMENUM:
			pi = proto_tree_add_pi(tree, hfindex, tvb, start,
&length,
					&new_fi);
			proto_tree_set_uint(new_fi, value);
			break;

		default:
			DISSECTOR_ASSERT_NOT_REACHED();  <--- line 1895
	}

	return pi;
}


-----Ursprüngliche Nachricht-----
Von: ethereal-dev-bounces@xxxxxxxxxxxx
[mailto:ethereal-dev-bounces@xxxxxxxxxxxx] Im Auftrag von Gilbert Ramirez
Gesendet: Dienstag, 31. Januar 2006 16:16
An: Ethereal development
Betreff: Re: [Ethereal-dev] adding multiple values to tree

We don't know which version of the ethereal source code you are using.
Can you show us line 1895 of epan/proto.c ? (a few lines before, and a
few lines after, too, would be good).

--gilbert