Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-dev: [Wireshark-dev] Errors in decoder function.

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: prashanth joshi <prashanthsjoshi2000@xxxxxxxxx>
Date: Tue, 3 Oct 2006 07:51:04 -0700 (PDT)

 
 
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.
  • Follow-Ups:
    • Re: [Wireshark-dev] Errors in decoder function.
      • From: Jeff Morriss
  • Prev by Date: [Wireshark-dev] Patch for gtk/capture_dlg.c (Bug 771)
  • Next by Date: [Wireshark-dev] Repost a patch for tap-iostat.c to have new output format
  • Previous by thread: Re: [Wireshark-dev] Patch for gtk/capture_dlg.c (Bug 771)
  • Next by thread: Re: [Wireshark-dev] Errors in decoder function.
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation