Check your proto_register_xyz function (hf_register_info). One or more
of your header fields might be registered incorrectly.
You want to add an uint to the proto tree. Then check (in
hf_register_info) if all the registered header fields you pass to the
proto_tree_add_uint function are FT_UINT8, FT_UINT16, FT_UINT24,
FT_UINT32, FT_FRAMENUM types instead of FT_NONE or others.
bogdana
Lars Dörner wrote:
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
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev