Wireshark-commits: [Wireshark-commits] rev 50900: /trunk/epan/dissectors/ /trunk/epan/dissectors/:

Date: Fri, 26 Jul 2013 01:09:42 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=50900

User: morriss
Date: 2013/07/25 06:09 PM

Log:
 From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8951 :
 
 Currently, the only attribute that is dissected is attribute 82 in page 1.
 
 The approach for dissecting an attribute requires defining a function that
 processes the attribute-specific fields. However, most attributes consists of
 a single field, and the only difference between attributes is because of their
 length and format (that is already defined for the header field). The current
 code also assumes that the attribute length is always correct (e.g. the
 attribute has 8 bytes if the field is registered as FT_UINT64).
 
 As a proof of concept, this patch adds support for 3 attributes in the Current
 Command attributes page (see OSD2r4 section 7.1.3.31) and prepares a framework
 for dissecting additional attributes (dissection of additional attributes will
 be delivered in a separate patch).
 
 
 From me:
 
 Move the new length checking up to the caller rather than repeating it in
 every attribute dissector.
 
 Use proto_tree_add_expert_format() instead of proto_tree_add_text() plus
 expert_add_info().
 
 Fix checkfiltername.pl error:
 
     scsi_osd.scsi_osd_attribute_length.invalid duplicates PROTOABBREV of scsi_osd
 
 Remove trailing white space and fix up some indentation.

Directory: /trunk/epan/dissectors/
  Changes    Path                 Action
  +234 -186  packet-scsi-osd.c    Modified