Bug ID |
8951
|
Summary |
patch: (packet-scsi-osd.c) support for dissecting attribute-specific fields
|
Classification |
Unclassified
|
Product |
Wireshark
|
Version |
SVN
|
Hardware |
All
|
OS |
Windows 7
|
Status |
UNCONFIRMED
|
Severity |
Enhancement
|
Priority |
Low
|
Component |
Wireshark
|
Assignee |
[email protected]
|
Reporter |
[email protected]
|
Build Information:
--
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).
Proposal:
* Add the expected length and pointer to header field to
attribute_page_numbers_t
* Update the signature of the attribute_dissector function type (pass a pointer
to attribute_page_numbers_t).
* Define a generic_attribute_dissector that:
- Checks the attribute length against the expected length
- If the length is correct, proto_tree_add_item the field given in
attribute_page_numbers_t.
- If the length is not correct, generate expert info and return.
* Define an specific dissector for attributes that represent a Partition ID
that:
- Checks the attribute length against the expected length.
- If the length is correct, call dissect_osd_partition_id.
- If the length is not correct, generate expert info and return.
* Some functions were updated to make available a scsi_osd_lun_info_t* pointer
that is required by partition_id_attribute_dissector.
The following fields are used for dissecting attributes in the Current Command
attributes page (0xFFFFFFFE)
- hf_scsi_osd_attrval_object_type (attribute Object Type, number 0x02)
- hf_scsi_osd_attrval_partition_id (attribute Partition ID, number 0x03)
- hf_scsi_osd_attrval_object_id (attribute Collection Object ID or User Object
ID, number 0x04)
The following expert fields was added:
- ei_osd_attr_length_invalid (PI_PROTOCOL, PI_ERROR) - mismatch between the
attribute expected length and its actual length
Convention: attribute header fields variables are prefixed with
hf_scsi_osd_attrval_ or hf_scsi_osd2_attrval_ (in order to distinguish them
from fields with similar names in the CDB, e.g.
hf_scsi_osd_attrval_partition_id vs. hf_scsi_osd_partition_id). The field
hf_scsi_osd_user_object_logical_length was renamed as
hf_scsi_osd_attrval_user_object_logical_length because of this rule.
The function attribute_1_82(...) was removed, since that attribute is now
dissected by the generic attribute dissector.
Examples:
OSD-1: scsi-osd-example-001 in http://wiki.wireshark.org/SampleCaptures (Frame
278: User Object Logical Length attribute)
OSD-2: available, but requires dissection of service actions that are not yet
implemented.
You are receiving this mail because:
- You are watching all bug changes.