Hi, the following are the statements to manipulate the tvb data in my code:
1) void proto_register_gtp(void)
{
static hf_register_info hf_gtp[] = {
{ &hf_record_type, {" Record Type", "RecordType.val",FT_UINT32, BASE_DEC, NULL,0,"", HFILL }},
........................................... .....................
}
2) proto_item *ti = NULL;
proto_tree *foo_tree = NULL;
ti = proto_tree_add_item(tree, proto_foo, tvb, 0, -1, FALSE);
foo_tree = proto_item_add_subtree(ti, ett_foo);
3) proto_tree_add_item(foo_tree, hf_record_type, tvb, offset + bytestoreturn, length, FALSE);
proto_tree_add_text(foo_tree, tvb, offset+bytestoreturn, 4, " Record Length: %d", length);
4)
static gint *ett_gtp_array[] = {
..............
................
&ett_foo,
};
But I'm getting the following errors:
Please any one tell me what i need to do to avoid this error.
Regards,
Prashanth
ERRORS :
(near initialization for `hf_gtp[60]')
initializer element is not constant
(near initialization for `hf_gtp[61].hfinfo')
warning: missing initializer
warning: (near initialization for `hf_gtp[61].hfinfo')
initializer element is not constant
(near initialization
for `hf_gtp[61]')
initializer element is not constant
(near initialization for `hf_gtp[62].hfinfo')
warning: missing initializer
.......... ...................................
And it continues for values like 63, 64 etc.............
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.
Great rates starting at 1�/min.