1scsi_find_sense_descr(9F)Kernel Functions for Driversscsi_find_sense_descr(9F)
2
3
4

NAME

6       scsi_find_sense_descr - find descriptor in SCSI sense data
7

SYNOPSIS

9       #include <sys/scsi/scsi.h>
10
11
12
13       uint8_t *scsi_find_sense_descr(uint8_t *sense_buffer, int sense_buf_len,
14            int req_descr_type);
15
16

INTERFACE LEVEL

18       Solaris DDI specific (Solaris DDI).
19

PARAMETERS

21       sense_buffer      Pointer  to a buffer containing SCSI descriptor sense
22                         data. The data is expected in wire format starting at
23                         the response code.
24
25
26       sense_buf_len     Integer  that  contains the length of sense buffer in
27                         bytes.
28
29
30       req_descr_type    Integer that contains the descriptor type  value  for
31                         the desired sense descriptor.
32
33

DESCRIPTION

35       The  scsi_find_sense_descr()  function is used to obtain a pointer to a
36       specific  descriptor  type,  specified  by  req_descr_type,  within   a
37       descriptor    sense    buffer.    Before    returning    the   pointer,
38       scsi_find_sense_descr() verifies that the entire descriptor is  present
39       based on the length provided in sense_buf_len.
40
41
42       Any value for req_descr_type can be requested. The following descriptor
43       types are already defined:
44
45         #define DESCR_INFORMATION         0x00
46         #define DESCR_COMMAND_SPECIFIC    0x01
47         #define DESCR_SENSE_KEY_SPECIFIC  0x02
48         #define DESCR_FRU                 0x03
49         #define DESCR_STREAM_COMMANDS     0x04
50         #define DESCR_BLOCK_COMMANDS      0x05
51         #define DESCR_OSD_OID             0x06
52         #define DESCR_OSD_RESP_INTEGRITY  0x07
53         #define DESCR_OSD_ATTR_ID         0x08
54
55
56
57       Drivers should use scsi_validate_sense(9F) to  ensure  that  the  sense
58       buffer contains valid descriptor sense data.
59

RETURN VALUES

61       The  scsi_find_sense_descr()  function  returns  a  pointer  to a sense
62       descriptor of the requested type if a descriptor of that  type  exists.
63       If no such descriptor exists, scsi_find_sense_descr() returns NULL.
64

CONTEXT

66       The  scsi_find_sense_descr() function can be called from user or inter‐
67       rupt context.
68

SEE ALSO

70       scsi_ext_sense_fields(9F),   scsi_sense_asc(9F),   scsi_sense_ascq(9F),
71       scsi_sense_cmdspecific_uint64(9F),          scsi_sense_info_uint64(9F),
72       scsi_sense_key(9F), scsi_validate_sense(9F)
73
74
75
76SunOS 5.11                        30 Jun 2006        scsi_find_sense_descr(9F)
Impressum