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

Wireshark-bugs: [Wireshark-bugs] [Bug 5635] Create a ETSI TETRA dissector for wireshark

Date: Wed, 2 Feb 2011 06:30:26 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5635

--- Comment #24 from Anders Broman <anders.broman@xxxxxxxxxxxx> 2011-02-02 06:30:26 PST ---
Hi,
I have not studied the code in great detail so it might not be relevant in this
case, but it is prefered to do:

 proto_tree_add_item(ver_tree, hf_gtp_cdr_app, tvb, offset, 1, FALSE);

Rather than

app = tvb_get_guint8(tvb,offset);
proto_tree_add_uint(ver_tree, hf_gtp_cdr_app, tvb, offset, 1, app);

Unless "app" needs to be manipulated or is needed elsewhere in the code.

Again I just browsed the code but as it is ASN.1 PER you might want to
have a look at tvb_get_bits[8-64]() and proto_tree_add_bits_item() which
can be handy.

Best regards
Anders

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.