diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-03-13 10:29:00 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-03-13 10:29:00 +0000 |
commit | edcaaee164ad486bc1302d11f08a021d0301e8b5 (patch) | |
tree | e8b6570c770b12e2f948a637a9a15a2c37e04896 /epan/exceptions.h | |
parent | 11c3d3d90dead7cbc4439cf6e70ac89182e61d90 (diff) |
SCSI is fairly unique among the ethereal protocols in that it is sometimes normal for a PDU we receive back froma device to be truncated.
(report luns with allocation length 8 for example)
Therefore it is a bit wrong to mark these packets as [malformed packets]
Since they are truncated by scsi and this is NOTY an error condition.
Add a new exception type : ScsiBoundsError
If this exception is caught by packet-frame, then print an appropriate message
instead of [malformed packet]
For SCSI, add helper macros TRY_SCSI_SHORT_PACKET and END_...
If the packet was not short in the normal sense (snaplen < packetlen) then intercept the exception for BoundsError and rethrow it as ScsiBoundsError instead.
svn path=/trunk/; revision=17611
Diffstat (limited to 'epan/exceptions.h')
-rw-r--r-- | epan/exceptions.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/epan/exceptions.h b/epan/exceptions.h index a3d814cba9..92cf9a7ced 100644 --- a/epan/exceptions.h +++ b/epan/exceptions.h @@ -56,6 +56,18 @@ **/ #define DissectorError 4 +/** + Index is out of range. + An attempt was made to read past the end of a buffer. + This error is specific to SCSI data transfers where for some CDBs + it is normal that the data PDU might be short. + I.e. ReportLuns initially called with allocation_length=8, just enough + to get the "size" of lun list back after which the initiator will + reissue the command with an allocation_length that is big enough. +**/ +#define ScsiBoundsError 5 + + /* Usage: * * TRY { |