Kernel Functions for Drivers scsifindsensedescr(9F)
NAME
scsifindsensedescr - find descriptor in SCSI sense data
SYNOPSIS
#include
uint8t *scsifindsensedescr(uint8t *sensebuffer, int sensebuflen,
int reqdescrtype);
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
PARAMETERS
sensebuffer Pointer to a buffer containing SCSI
descriptor sense data. The data is
expected in wire format starting at the
response code.
sensebuflen Integer that contains the length of sense
buffer in bytes.
reqdescrtype Integer that contains the descriptor type
value for the desired sense descriptor.
DESCRIPTION
The scsifindsensedescr() function is used to obtain a
pointer to a specific descriptor type, specified by
reqdescrtype, within a descriptor sense buffer. Before
returning the pointer, scsifindsensedescr() verifies that
the entire descriptor is present based on the length pro-
vided in sensebuflen.
Any value for reqdescrtype can be requested. The following
descriptor types are already defined:
#define DESCRINFORMATION 0x00
#define DESCRCOMANDSPECIFIC 0x01
#define DESCRSENSEKEYSPECIFIC 0x02
#define DESCRFRU 0x03
#define DESCRSTREAMCOMANDS 0x04
#define DESCRBLOCKCOMANDS 0x05
#define DESCROSDOID 0x06
#define DESCROSDRESPINTEGRITY 0x07
#define DESCROSDATRID 0x08
SunOS 5.11 Last change: 30 Jun 2006 1
Kernel Functions for Drivers scsifindsensedescr(9F)
Drivers should use scsivalidatesense(9F) to ensure that
the sense buffer contains valid descriptor sense data.
RETURN VALUES
The scsifindsensedescr() function returns a pointer to a
sense descriptor of the requested type if a descriptor of
that type exists. If no such descriptor exists,
scsifindsensedescr() returns NUL.
CONTEXT
The scsifindsensedescr() function can be called from user
or interrupt context.
SEE ALSO
scsiextsensefields(9F), scsisenseasc(9F),
scsisenseascq(9F), scsisensecmdspecificuint64(9F),
scsisenseinfouint64(9F), scsisensekey(9F),
scsivalidatesense(9F)
SunOS 5.11 Last change: 30 Jun 2006 2
|