Commit Graph

100 Commits

Author SHA1 Message Date
Ronnie Sahlberg c0cccf43c2 start splitting the monolitic scsi dissector up into commandset dissectors
split the MMC commandset out of the main scsi dissector



svn path=/trunk/; revision=19738
2006-10-30 12:18:29 +00:00
Gerald Combs fb22815c2b Attempt to squelch Coverity CID 221.
svn path=/trunk/; revision=19678
2006-10-25 00:49:36 +00:00
Ronnie Sahlberg 26e2395f1d if reassembly did not give us a new tvb, then dont call any scsi payload subdissector
svn path=/trunk/; revision=19534
2006-10-14 22:05:57 +00:00
Ronnie Sahlberg 057c7a0555 let SCSI reassembly default to FALSE
put "reassembled in" in the summary line

put the fragment list at the top of the tree instead of down inside the SCSI expansion



svn path=/trunk/; revision=19523
2006-10-14 01:44:29 +00:00
Ronnie Sahlberg 91ff6ddaf4 add scsi data reassembly
svn path=/trunk/; revision=19519
2006-10-13 22:25:35 +00:00
Ronnie Sahlberg 02ea9c5608 check the estinated data transfer length for the current transfer and start adding checks for scsi data reassembly
svn path=/trunk/; revision=19518
2006-10-13 21:26:03 +00:00
Ronnie Sahlberg 9768637878 dont call the scsi data in/out dissectors unless data offset is 0 i.e. the beginning of data in/out
svn path=/trunk/; revision=19517
2006-10-13 21:07:07 +00:00
Ronnie Sahlberg 8826c144f7 pass the relative data offset of data in/out pdu's to the scsi data in/out dissector (dissect_scsi_payload) so that we can later add reassembly of data pdu's
and also (if reassembly is disabled) only dissect the initial (offset==0) data pdu.

dissect_scsi_payload() does not yet use this parameter.


now that we have both data offset and expected data length/bidir expected data length and also the read/write flags availabe we have what we need to reassemble data in/out pdus    (modulo overflow/underflow  but those are so rare we can worry about them later).


ndmp:   ndmp conceptually always has a data in and a data out phase and never fragment the data into smaller pdu's os that dissector always report offset as 0.





svn path=/trunk/; revision=19511
2006-10-13 09:16:45 +00:00
Ronnie Sahlberg 2f6fb1fe7f From Patrick vd Lageweg
Hi,

This patch makes several bit fields in the LOG SELECT command being displayed as bits instead of as numbers.



svn path=/trunk/; revision=19497
2006-10-11 20:05:27 +00:00
Ronnie Sahlberg 10893e51d7 From Patrick vd Lageweg
Hi,

This patch fixes the page number user for the "write error couner page".






svn path=/trunk/; revision=19496
2006-10-11 20:03:44 +00:00
Ronnie Sahlberg d8a8ec9b36 From Patrick vd Lageweg
Hi,

This patch impelments a dissect for the SCSI SSC Medium Partition Page.


Patrick


svn path=/trunk/; revision=19495
2006-10-11 20:00:43 +00:00
Ronnie Sahlberg 494e873eb0 move the ITL and the ITLQ structure to packet-scsi.h where it belongs
svn path=/trunk/; revision=19492
2006-10-11 10:38:59 +00:00
Ronnie Sahlberg e2a851e18d add initial scsi osd dissector but only dissect sdbs that are impoerted from SPC
various changes to the existing scsi dissector to start allowing different commandsets to be implemented in their own dissector files to prevent the scsi dissector to become as huge as the parlay dissector




svn path=/trunk/; revision=19360
2006-09-29 10:40:51 +00:00
Ronnie Sahlberg d09cfb2bb8 move the defines for SPC command opcode values to the headerfile
svn path=/trunk/; revision=19359
2006-09-29 09:24:51 +00:00
Ronnie Sahlberg c20b7c8eda additional scsi sense codes from patrick@abra2.bitwizard.nl
svn path=/trunk/; revision=19349
2006-09-28 15:57:54 +00:00
Ronnie Sahlberg ad305c630b Hi,
This patch fixes the page code selector for the scsi log sense command.

Patrick




svn path=/trunk/; revision=19348
2006-09-28 15:55:13 +00:00
Ronnie Sahlberg fe3114d00b check that itl is non-NULL to prevent a NULL pointer dereference that would crash the windows build but funnily enough not linux (since you can read from the null page on linux?)
svn path=/trunk/; revision=18832
2006-08-04 00:36:25 +00:00
Ronnie Sahlberg cea0653059 we need a itl structure to decode a scsi cdb properly.
make dissect_scsi_cdb abort with an assert if called with a null pointer for itl.

This means scsi over ndmp will be aborted by an assert sicne ndmp passes a null pointer here always but at least is better than a segv since some cdb's require itl to decode properly.


next checkin will fix ndmp in this regard.



svn path=/trunk/; revision=18489
2006-06-17 05:42:55 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg 7521c5a32c update the itl structure so that it sets the cmdset field to the current command set even for the case where we have not detected it by seeing the inquiry response.
Make teh msb of the cmdset variable indicate whether we detected the commandset from the trace or whether we used the default value from preferences.

indicate in the dissection of the packet whether the command set is "known" or whether we are using the default one.

make scsi srt stats work even for when we are using the "default" dommandset. Previously scsi srt would ignore all pdus for itl sessions where the "default" command set was used.



svn path=/trunk/; revision=18098
2006-05-05 22:01:45 +00:00
Ronnie Sahlberg 9c18c35c38 remove a test for NULL we dont need since itlq can not be null here and thus we
dont need to test for it.

this unnecessary test for itlq==NULL was shown by coverity issue 151



svn path=/trunk/; revision=18052
2006-05-01 07:32:09 +00:00
Ronnie Sahlberg 2f08653337 rename some value_Strings from ..._val to ..._vals
svn path=/trunk/; revision=17991
2006-04-25 01:42:35 +00:00
Ronnie Sahlberg c8cc76e2e2 SCSI Service Response Time Staistics
svn path=/trunk/; revision=17984
2006-04-24 23:09:34 +00:00
Ronnie Sahlberg acbaf3fe1f change the signature for dissect_scsi_snsinfo() to take itlq and itl structures
update the comment in packet-scsi.c   to reflect that it is the transport now that is responsible to track itl and itlq data

make scsi tapable

svn path=/trunk/; revision=17974
2006-04-24 08:16:18 +00:00
Ronnie Sahlberg 72adb19810 put some exchange tracking info in scsi CDBs and DATA pdus
svn path=/trunk/; revision=17957
2006-04-22 10:31:30 +00:00
Ronnie Sahlberg e09c0cde8c add the spc commands to the mmc tables
svn path=/trunk/; revision=17956
2006-04-22 10:15:00 +00:00
Ronnie Sahlberg 351b882cbb add the spc commands to the smc and ssc tables
svn path=/trunk/; revision=17955
2006-04-22 10:00:05 +00:00
Ronnie Sahlberg 4e4e2f2406 add all supported SPC commands used by SBC to the SBC tables
svn path=/trunk/; revision=17954
2006-04-22 09:23:52 +00:00
Ronnie Sahlberg a0f84a5726 start prettifying the dissection
make scsi responses also display the opcode in the info column


svn path=/trunk/; revision=17953
2006-04-22 04:42:07 +00:00
Ronnie Sahlberg e776696d14 the scsi transports (fc/fcp and iscsi) now track both itl and itlq
structures for scsi.

we no longer need the scsi_task_id structure passed by pinfo->private_data   so get rid of it.

we no longer need the (broken by design) scsi_task_data   hash table   since this has been replaced byt hte itl and itlq structures and tracking




svn path=/trunk/; revision=17952
2006-04-22 02:16:52 +00:00
Ronnie Sahlberg 73e65216bc remover the lun parameter from dissect_scsi_cdb/payload since this is now part of the exchange data in itlq
remove the two fields opcode and devtype from the scsi_task_data structure since these are also part of the itlq and itl structures



svn path=/trunk/; revision=17949
2006-04-21 22:00:38 +00:00
Ronnie Sahlberg 60e65f4869 updates to get the fc and scsi dissectors
and get rid of some breakage in the design


let the scsi transport keep track of itl (initiator, target, lun) matching
and let it pass a itl structure to scsi   that is persistent across packets.

let scsi use this itl structure to track device type for a specific itl instead of the (must have been) broken hashtable.

update both iscsi and fc to track the itl structure for scsi and schange the scsi signature to accept itl as a parameter.


more to come.



svn path=/trunk/; revision=17942
2006-04-21 11:08:24 +00:00
Ronnie Sahlberg a72d39bb05 rename the fc_exchange_data structure to the more appropriate itlq_nexus_t
svn path=/trunk/; revision=17921
2006-04-20 09:16:09 +00:00
Ronnie Sahlberg 9481eac669 make dissect_scsi_rsp() take an exchange structure as parameter instead of just a lun.
this finally allows us to have scsi.time  for scsi transactions   but we need to cleanup and refactor the other three scsi entrypoints before we should implement scsi srt    to make the other three also take an exchange data structure as parameter from their transports (and get rid of the pinfo->private_data )


svn path=/trunk/; revision=17838
2006-04-07 10:15:15 +00:00
Ronnie Sahlberg a9f636b41d imake fcp responses that do carry a scsi response code
call the scsi response dissector as well
(so that eventually we can do things like SRT for SCSI)


it doesnt work yet since fcp is using some incredibly broken logic to
track state between frames.

the cdata stuff can just not ever work exscept for single scan tethereal dissection.
is there noone at all looking at these protocols wioth ethereal?
has noone noticed it is completely broken yet?


sigh,    soon   i think i will be able to add the originally estimated trivial to implement   SCSI SRT



svn path=/trunk/; revision=17811
2006-04-05 08:51:45 +00:00
Ronnie Sahlberg 6fd403ee95 make reportluns use the new macros to catch and flag alloclen truncation
svn path=/trunk/; revision=17810
2006-04-05 07:25:57 +00:00
Ronnie Sahlberg ab9b2e6836 dislay a flags field as "Flags" instead of "SCCS Flags"
svn path=/trunk/; revision=17801
2006-04-03 20:39:55 +00:00
Ronnie Sahlberg 54d8591809 use col_set_fence() after we have populated the info column with the SCSI details so that if there are other pdus followinf this scsi pdu in the packet they will not overwrite it
svn path=/trunk/; revision=17800
2006-04-03 20:29:53 +00:00
Ronnie Sahlberg 5ee1c8d1e4 add dissection of the inq sync flag
sort the entries in scsi_verdesc_val   so it is easier to add missing entries


svn path=/trunk/; revision=17799
2006-04-03 20:12:24 +00:00
Ronnie Sahlberg f886744b64 further prettification of the inq dissector.
further refactorinf of  the scsi  alloc_len macros



svn path=/trunk/; revision=17795
2006-04-03 08:20:54 +00:00
Ronnie Sahlberg 700a7f527a dissect byte 7 of the inq response
svn path=/trunk/; revision=17794
2006-04-03 03:19:52 +00:00
Ronnie Sahlberg 0f1f0c8d8a add dissection of byte 6 of inq response
(except fopr 3 bits that only exist for pscsi)


svn path=/trunk/; revision=17791
2006-04-03 02:40:07 +00:00
Ronnie Sahlberg d5585760e7 add dissection of the flags in byte 5 of the inquiry response
svn path=/trunk/; revision=17788
2006-04-03 01:44:56 +00:00
Ronnie Sahlberg ae66a76a1a prettify dissection of the aca flags byte in the inq response data.
add dissection of two additional bits and the respdataformat bitvield

add booleans for the filter fields

make all the fields filterable



svn path=/trunk/; revision=17787
2006-04-03 00:55:21 +00:00
Ronnie Sahlberg 695b605cbb change TRY_SCSI_SHORT_TRANSFER to use the allocation length specified in the CDB
instead of the allocation length from the data pdu   since sometimes the datapdu will be completely empty and thus we cant extract it from the data pdu.
(unclear if this is really allowed by scsi   but anyway)
this should make the scsi transfer length checking more correct.


update mmc  getconfiguration   and spc  inquiry  to use these macros
and flag these packets that are short due to a too small alloc_len
as truncated due to scsi  and not being short/malformed packets.


at the same time,  get rid of a few horrible   offset+x   in the inquiry dissector and replace with proper offset incrementation instead.





svn path=/trunk/; revision=17784
2006-04-02 22:50:46 +00:00
Anders Broman 89de25406b From Ming Zhang:
fix a minor error in mode_select, packet-scsi.c

svn path=/trunk/; revision=17780
2006-03-31 05:11:57 +00:00
Jaap Keuter 9734da71a8 From Ming Zhang: the track # in read toc command dissector should be 1 instead of 4.
svn path=/trunk/; revision=17753
2006-03-28 21:03:01 +00:00
Jaap Keuter 719b8effbe From Ming Zhang: fix for several wrong use of ntohs in packet-scsi.c
svn path=/trunk/; revision=17725
2006-03-25 07:57:11 +00:00
Guy Harris 0d66eda9ba Fix some format strings to display all fields in some mode sense page
bytes.

Constify some variables to squelch compiler warnings.

svn path=/trunk/; revision=17672
2006-03-19 20:23:17 +00:00
Anders Broman d2ae4f4c7a From Ming Zhang:
added 3 MCC mode pages decode support.

MRW page
Write param page
capacity page

also fixed several wrong tvb_get_ntohs usage introduced in previous patch.

svn path=/trunk/; revision=17654
2006-03-17 06:26:14 +00:00