aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-scsi-osd.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-12Create/use a number of extended value-strings;Bill Meier1-860/+859
Remove or comment out dups from several value-string arrays; Sort a number of value-string arrays; Reformat many hf[] entries; Remove some unneeded initializers; Add editor-modelines; Use consistent indentation; Reformat whitespace. svn path=/trunk/; revision=53968
2013-12-11- Make local functions static.Anders Broman1-0/+2
- Forward declaration of register functions. svn path=/trunk/; revision=53942
2013-11-09Don't include <epan/strutil.h> when not needed.Jakub Zawadzki1-1/+0
svn path=/trunk/; revision=53194
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-1/+1
hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly. The script didn't catch as many as I would have liked, but it's a start. The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum. svn path=/trunk/; revision=52045
2013-08-31Convert another 10 dissectors to wmem.Evan Huus1-14/+14
svn path=/trunk/; revision=51612
2013-08-13From Javier Godoy:Anders Broman1-23/+332
Dissect additional OSD-2 service actions (CREATE/REMOVE PARTITION, GET/SET ATTRIBUTES, QUERY). This patch adds support for some OSD-2 service actions, following the approach described in bug 8832. The implemented service actions are: - CREATE PARTITION - REMOVE PARTITION - REMOVE COLLECTION - GET ATTRIBUTES - SET ATTRIBUTES - QUERY The following service action codes was #defined - OSD_2_REMOVE_PARTITION 0x888c The following trees were added - ett_osd2_query_criteria_entry The following fields were added: - hf_scsi_osd2_remove_scope (REMOVE PARTITION) - hf_scsi_osd2_immed_tr (QUERY) - hf_scsi_osd2_matches_collection_object_id (QUERY) - hf_scsi_osd2_query_type (query list CDB continuation descriptor) - hf_scsi_osd2_query_entry_length (query list CDB continuation descriptor) - hf_scsi_osd2_query_attributes_page (query list CDB continuation descriptor) - hf_scsi_osd2_query_attribute_number (query list CDB continuation descriptor) - hf_scsi_osd2_query_minimum_attribute_value_length (query list CDB continuation descriptor)* - hf_scsi_osd2_query_maximum_attribute_value_length (query list CDB continuation descriptor)* * (dissection of the attribute value in query descriptors is not implemented yet) The following value_string arrays were added: - scsi_osd2_remove_scope_val (OSD2r4 Table 143) - scsi_osd2_query_type_vals (OSD2r4 Table 75) The following value_string arrays were updated: - scsi_osd_svcaction_vals - scsi_osd2_object_descriptor_format_val The following functions were added: - dissect_osd2_query - dissect_osd2_query_list_descriptor (dissect CDB continuation descriptor type 0x0002) The following expert_info fields were added: - ei_osd2_query_values_equal (PI_PROTOCOL,PI_NOTE) - the minimum and maximum attribute values are equal in a query descriptor entry Changes in dissect_osd2_cdb_continuation: - Dissect case 0x0002 Changes in dissect_osd_* - Initialize extra_data->osd2 - Dissect OSD-2 specific fields - Call dissect_osd_cdb_continuation_length / dissect_osd_cdb_continuation (if osd2) - Version-specific increment of offset after dissecting capability/security_parameters https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9029 svn path=/trunk/; revision=51331
2013-08-07From Javier Godoy:Anders Broman1-17/+5
Dissect SCSI OSD attribute identification sense data descriptor. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8971 svn path=/trunk/; revision=51179
2013-07-26From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8951 :Jeff Morriss1-186/+234
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. svn path=/trunk/; revision=50900
2013-07-23From Javier Godoy:Anders Broman1-78/+2
Remove function osd_list_collection and update scsi_osd_svcaction. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8944#attach_11229 svn path=/trunk/; revision=50809
2013-07-18Fix error: 'format' may be used uninitialized in this functionPascal Quantin1-1/+1
svn path=/trunk/; revision=50721
2013-07-18From Javier Godoy:Anders Broman1-32/+58
* Remove dissect_osd_list_collection and dissect LIST COLLECTION by calling dissect_osd_list. * Handle the few differences depending on the value of svcaction in extra data. * dissect_osd_collection_object_id now returns proto_item* instead of void. The following field was added: * hf_scsi_osd_list_collection_flags_coltn The following true_false_string array was added * list_coltn_tfs https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8944 svn path=/trunk/; revision=50717
2013-07-15Use 4 Spaces indent and add modelines infoAlexis La Goutte1-2326/+2340
svn path=/trunk/; revision=50622
2013-07-15Use "generic" tfs (tfs_set_notset)Alexis La Goutte1-70/+15
svn path=/trunk/; revision=50615
2013-07-15Fix error from checkAPI.plAlexis La Goutte1-1/+1
Error: Found non-ASCII characters on line 871 of packet-scsi-osd.c svn path=/trunk/; revision=50608
2013-07-15From Javier Godoy:Anders Broman1-22/+232
adds support for the OSD-2 CREATE USER TRACKING COLLECTION service action, following the approach described in bug 8832. It also implements dissection of the CDB continuation segment. Change in scsi_osd_extra_data_t: - Add a continuation_length field (we need that value from the CDB when later dissecting the Data In buffer) The following fields were added: - hf_scsi_osd2_cdb_continuation_length - hf_scsi_osd2_cdb_continuation_format - hf_scsi_osd2_continued_service_action - hf_scsi_osd2_cdb_continuation_descriptor_type - hf_scsi_osd2_cdb_continuation_descriptor_pad_length - hf_scsi_osd2_cdb_continuation_descriptor_length - hf_scsi_osd2_source_collection_object_id The following expert_info fields were added: - ei_osd2_cdb_continuation_format_unknown (PI_UNDECODED, PI_ERROR) - ei_osd2_continued_service_action_mismatch (PI_PROTOCOL, PI_WARN) - ei_osd2_cdb_continuation_descriptor_type_unknown (PI_UNDECODED, PI_WARN) - ei_osd2_cdb_continuation_descriptor_length_invalid (PI_PROTOCOL, PI_ERROR) - ei_osd2_cdb_continuation_length_invalid (PI_PROTOCOL, PI_ERROR) The following value_string arrays were added: - scsi_osd2_cdb_continuation_format_val (OSD2r4 Table 69) - scsi_osd2_cdb_continuation_descriptor_type_val (OSD2r4 Table 71) The following functions were added: - dissect_osd2_cdb_continuation_length (dissect the cdb continuation length field in cdb and save continuation_length in extra_data) - dissect_osd2_cdb_continuation (dissect the cdb continuation segment from the data out buffer; currently, descriptor-specific fields are not dissected) - dissect_osd2_create_user_tracking_collection Changes in dissect_osd_collection_object_id - add an int hfindex parameter - the return type was made void (previously it returned int, but the return type was unused) - this function is used for filling collection_id related fields (there are several flavors of them) and may be modified for displaying creation/removal information (à la dissect_osd_partition_id) - one call to dissect_osd_requested_collection_object_id was replaced by dissect_osd_collection_object_id(...,hf_scsi_osd_requested_collection_object_id) - two calls to dissect_osd_collection_object_id were updated with the new signature https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8922 svn path=/trunk/; revision=50605
2013-07-15From Javier Godoy:Anders Broman1-2/+2
fix partitions being inadvertently set as removed. In dissect_osd_get_attributes and dissect_osd_set_attributes there were calls to dissect_osd_partition_id with the last parameter (is_removed) set to TRUE instead of FALSE. That caused dissect_osd_partition_id reporting the partitions as "removed". The only service action where is_removed must be TRUE is dissect_osd_remove_partition. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8927 svn path=/trunk/; revision=50603
2013-07-10From Javier Godoy:Anders Broman1-9/+20
Proper dissection of responses with insufficient allocation length. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8919 svn path=/trunk/; revision=50481
2013-07-09From Javier Godoy via ↵Alexis La Goutte1-128/+147
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8905 SCSI OSD: per-attribute subtree The response of the OSD-2 LIST command may contain attributes in multi-object retrieved attributes format. Currently all proto_items for that attributes are put under the SCSI Payload tree, yielding a large list of items: Partition Id Object Type Attribute Page Attribute Number Attribute Length (optional attribute-specific fields) Attribute Page, ... Partition Id Object Type Attribute Page, ... ... This patch classifies the OSD-2 LIST attributes (from the Data In buffer) in one tree per object and one sub-tree per attribute Partition Id (ett_osd_multi_object tree) Object Type Attribute (ett_osd_attribute tree) Attribute Page Attribute Number Attribute Length (optional attribute-specific fields) Attribute, ... Partition Id Object Type Attribute Page, ... ... The same approach is applied to attributes in the Get/Set attributes segments. A function *attribute_page_numbers_t lookup_osd_attribute(page,number) was created, with common code that is called from dissect_osd_attributes_list, dissect_osd_attribute_value and dissect_osd2_attribute_list_entry. The trees are built in function dissect_osd_attribute_list_entry. That function was modified for avoiding code duplication with case 0x09 of dissect_osd_attributes_list. A missing padding was added in the process. The function dissect_osd_partition_id now returns proto_item*, so that we can create a subtree rooted at the partition_id (previously it returned an offset, but the return value was unused). From me: Fix clang warning duplicate code... Remove some trailing whitespace svn path=/trunk/; revision=50462
2013-07-03Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+1
svn path=/trunk/; revision=50365
2013-07-03From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8881Evan Huus1-8/+16
Follow-up to r50308: misc bug fixes and tweaks to OSD2 dissection. svn path=/trunk/; revision=50333
2013-07-01From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8832Evan Huus1-135/+450
Support for OSD-2/3 in the SCSI dissector. svn path=/trunk/; revision=50308
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-6/+4
svn path=/trunk/; revision=49921
2013-05-18SCSI: Add dissection of REPORT SUPPORTED OPCODESRonnie Sahlberg1-1/+2
svn path=/trunk/; revision=49408
2013-03-18From beroset:Anders Broman1-12/+12
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48399
2013-03-17Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-23/+65
svn path=/trunk/; revision=48382
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-2/+2
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-07-25Converted scsi dissectors display filter format from scsi.<protocol> to ↵Michael Mann1-81/+81
scsi_<protocol> (matching their registered filter name) svn path=/trunk/; revision=43993
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-10-21Fix a few proto_tree_add_item() encoding args manually.Bill Meier1-2/+2
Some whitespace cleanup. svn path=/trunk/; revision=39507
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-16/+16
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) svn path=/trunk/; revision=39328
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-47/+47
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_UINT8 FT_UINT16 FT_UINT24 FT_UINT32 FT_UINT64 FT_INT8 FT_INT16 FT_INT24 FT_INT32 FT_INT64 FT_FLOAT FT_DOUBLE svn path=/trunk/; revision=39288
2011-10-05Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-15/+15
reference an hf item with types in hf[] of: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID svn path=/trunk/; revision=39261
2011-09-21(Trivial) Remove trailing whitespace from lines for a few files.Bill Meier1-27/+27
svn path=/trunk/; revision=39084
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32410
2009-08-07Clean up the last two DIRTY_DISSECTOR_SRC entries.Gerald Combs1-5/+6
svn path=/trunk/; revision=29321
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-94/+94
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2008-12-20Fix various typos and spelling errors (mostly in text strings)Bill Meier1-14/+14
svn path=/trunk/; revision=27065
2008-12-17Fix some typos and spelling (mostly in text strings)Bill Meier1-1/+1
svn path=/trunk/; revision=27037
2008-08-25#include <prefs.h> not req'dBill Meier1-1/+0
svn path=/trunk/; revision=26089
2008-03-14From Dan Messinger:Jaap Keuter1-2/+1
The OSD APPEND command does not use the sort order field. Wireshark is decoding it. svn path=/trunk/; revision=24627
2007-10-23Apply the small performance enhancment patches for:Anders Broman1-2/+2
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster. Replace - col_append_fstr() with faster col_append_str() - col_add_str() with col_set_str() when it's safe svn path=/trunk/; revision=23252
2007-04-23Add some GCC warnings to the standard set, and add some others to theGuy Harris1-1/+1
--enable-extra-gcc-checks set. If we turn on -pedantic, try turning on -Wno-long-long as well, so that it's not *so* pedantic that it rejects the 64-bit integral data types that we explicitly require. Constify a bunch of stuff, and make some other changes, to get rid of warnings. Clean up some indentation. svn path=/trunk/; revision=21526
2007-04-13another attempt to let windows buildbot becoming greenSebastien Tandel1-2/+2
fix rev21398 (gcc warning fix) svn path=/trunk/; revision=21412
2007-04-13miss some volatile qualifiers in scsi-osdSebastien Tandel1-2/+2
svn path=/trunk/; revision=21411
2007-02-19Continuing the tradition: squelch some compiler warnings ....Bill Meier1-1/+1
svn path=/trunk/; revision=20866
2007-02-11remove the revision number from the spc symbolsRonnie Sahlberg1-16/+16
change all spc2 and spc3 to spc svn path=/trunk/; revision=20779
2006-11-06some compilers dont like unnamed unions and structsRonnie Sahlberg1-20/+20
svn path=/trunk/; revision=19817