Wireshark-bugs: [Wireshark-bugs] [Bug 2935] New simulcrypt protocol dissector

Date: Sat, 4 Oct 2008 01:23:37 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2935





--- Comment #4 from Jaap Keuter <jaap.keuter@xxxxxxxxx>  2008-10-04 01:23:35 PDT ---
A few remarks after a quick review:

Replace // comment strings with /*  */. The double slash is C++ only.

Clean up development left overs as well please.

value_string arrays have to end in {0, NULL} tuple to cover non listed values.

{name, abbrev, type, display, strings, bitmask, blurb, HFILL}
if abbrev eq blurb then blurb can be NULL.

{ &hf_simulcrypt_version,
{ "Version", "simulcrypt.version", FT_UINT8, BASE_HEX, NULL, 0x0,
"Version Length", HFILL }},
Is it version or version length ?

FT_BOOLEAN fields have no BASE_, they have a fieldwidth.

+       tempType = tvb_get_guint8(tvb,1); // Get the type 2 bytes - MSB byte
+       type+=tempType;
+       type=type<<8; // shift 1 byte as MSB
+       tempType = tvb_get_guint8(tvb,2); // Get the type 2 bytes - LSB byte
+       type+=tempType; // add LSB to 2 byte type
why not use
+       type = tvb_get_ntohs(tvb, 1);
This comes up numerous times. 


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