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

Wireshark-dev: [Wireshark-dev] proto_tree_get_parent()

From: Eloy Paris <peloy@xxxxxxxxxx>
Date: Thu, 25 Mar 2010 20:48:47 -0400
Is this right (from epan/proto.c):

proto_item*
proto_tree_get_parent(proto_tree *tree) {
	if (!tree)
		return (NULL);
	return (proto_item*) tree;
}

This basically returns the same thing that is received as a parameter. Shouldn't tree->parent be returned instead, just as proto_item_get_parent() (a few lines above in the same file) does?

The weird thing is that there is code using this seemingly broken proto_tree_get_parent(). I don't know how things are working given that proto_tree_get_parent() is not really providing the parent node.

Confused,

Eloy Paris.-
netexpect.org