ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-users: Re: [Wireshark-users] New dissector: variable length of a fields

From: Dmitrij K <kdiman@xxxxxxx>
Date: Sun, 16 Feb 2014 10:09:47 +0000
I have corrected that by:

// for sz
tvb_memcpy(tvb, (guint8 *)&ldata, offset, 2);
proto_tree_add_item(my_tree, hf_hdr_sz, tvb, offset, 2, TRUE); offset += 2;

// for e_flags:
proto_tree_add_item(my_tree, hf_hdr_e_flags, tvb, offset, 2, TRUE); offset += 2;

// for magic3:
proto_tree_add_item(my_tree, hf_hdr_magic3, tvb, offset, 1, FALSE); offset += 1;

--
regards