Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] proto_tree_add_item problem

Date: Tue, 23 Jan 2007 17:44:08 +0530
Hi ,
 
I've developed a dissector and it has one statement as :
    proto_tree_add_item(proto_tree, hf_xyz_any_field, tvb, offset, 16, FALSE);
 
 
This statement is not getting executed , the wireshark is giving error " malformed packet ".
But when I'm changing the length ( 16 ) to smaller value , say 2 or 4 , it's working well .
 
The corresponding hf is
     { &hf_xyz_any_field,
   {   "Any Field",  "xyz.any_field",    FT_UINT8,       BASE_DEC,       NULL,       0x0,    "",     HFILL }},
 
The packet is having sufficient number of data bytes , infact a few extra bytes are there .
 
Could anyone suggest what's going wrong .
 
Regards ,
Vikash

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com