diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-03-13 10:29:00 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-03-13 10:29:00 +0000 |
commit | 95eb79c6b29a575b1fcf0447ea1af2038c2aa6cd (patch) | |
tree | e8b6570c770b12e2f948a637a9a15a2c37e04896 /epan/exceptions.h | |
parent | b85f335bbbc41c865c959b22e7f87a45264cd8aa (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17611 f5534014-38df-0310-8fa8-9805f1628bb7
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 { |