Wireshark-bugs: [Wireshark-bugs] [Bug 5466] Improve dissection of bit-oriented fields, text fiel
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5466
--- Comment #6 from Chris Maynard <christopher.maynard@xxxxxxxxx> 2010-12-06 11:07:04 PST ---
(In reply to comment #5)
> Created an attachment (id=5572)
--> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=5572) [details]
> Final patch for the control field
>
> This version fixes the control field in all of the packet-scsi*.c files.
>
> I will likely look at more things over the next few days.
Is the offset wrong here? Should it be:
+ proto_tree_add_bitmask(tree, tvb, offset+8, ... ?
@@ -3878,11 +3890,8 @@ dissect_spc_persistentreservein (tvbuff_
1, 0);
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
- flags = tvb_get_guint8 (tvb, offset+8);
- proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
- flags,
- "Vendor Unique = %u, NACA = %u, Link =
%u",
- flags & 0xC0, flags & 0x4, flags & 0x1);
+ proto_tree_add_bitmask(tree, tvb, offset+4, hf_scsi_control,
+ ett_scsi_control, cdb_control_fields, FALSE);
Looks OK otherwise. Passes tools/checkAPIs.pl. tools/checkhf.pl does produce
some "NO ARRAY" and "Unused entry" output, but I believe they're all false
positivies. Maybe you could just verify them all.
Do you have a(ny) capture file(s) you could post so the changes can be
fuzz-tested?
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.