00001 #ifndef scsidef_h 00002 #define scsidef_h 00003 00004 #define INQ_CMD_K_INQ_OPCODE 18 00005 #define INQ_CMD_M_ENABLE_VPD 0x1 00006 #define INQ_CMD_M_COMMAND_DATA 0x2 00007 #define INQ_CMD_K_LENGTH 6 00008 00009 struct _inq_cmd { 00010 unsigned char inq_cmd_b_opcode; 00011 union { 00012 unsigned char inq_cmd_b_flags; 00013 struct { 00014 unsigned inq_cmd_v_enable_vpd : 1; 00015 unsigned inq_cmd_v_command_data : 1; 00016 unsigned inq_cmd_v_reserved1 : 6; 00017 }; 00018 }; 00019 unsigned char inq_cmd_b_vpd_page; 00020 unsigned char inq_cmd_b_reserved2; 00021 unsigned char inq_cmd_b_alloc_length; 00022 unsigned char inq_cmd_b_control; 00023 char inq_cmd_b_fill_0_ [2]; 00024 }; 00025 00026 #define SCSI_INQ$M_DEVICE_TYPE 0x1F 00027 #define SCSI_C_DISK 0 00028 #define SCSI_C_TAPE 1 00029 #define SCSI_C_PRINTER 2 00030 #define SCSI_C_CPU 3 00031 #define SCSI_C_WORM 4 00032 #define SCSI_C_CDROM 5 00033 #define SCSI_C_SCANNER 6 00034 #define SCSI_C_OPTICAL 7 00035 #define SCSI_C_JUKEBOX 8 00036 #define SCSI_C_INTERCONNECT 9 00037 00038 00039 #define SCSI_C_SCC 12 00040 #define SCSI_C_ENC_SVCS 13 00041 #define SCSI_C_RBC 14 00042 00043 00044 #define SCSI_C_UNKNOWN 31 00045 #define SCSI_INQ$M_QUALIFIER 0xE0 00046 #define SCSI_C_LUN_CONNECTED 0 00047 #define SCSI_C_LUN_NOCONNECT 1 00048 #define SCSI_C_LUN_UNAVAILABLE 3 00049 #define SCSI_INQ$M_MODIFIER 0x7F 00050 #define SCSI_INQ$M_RMB 0x80 00051 #define SCSI_INQ$M_ANSI_VERSION 0x7 00052 #define SCSI_C_ANSI_UNKNOWN 0 00053 #define SCSI_C_ANSI_SCSI_1 1 00054 #define SCSI_C_ANSI_SCSI_2 2 00055 #define SCSI_C_ANSI_SCSI_3_SPC1 3 00056 #define SCSI_C_ANSI_SCSI_3_SPC2 4 00057 #define SCSI_C_ANSI_SCSI_3 3 00058 #define SCSI_INQ$M_ECMA_VERSION 0x38 00059 #define SCSI_INQ$M_ISO_VERSION 0xC0 00060 #define SCSI_INQ$M_RESP_DATA_FORMAT 0xF 00061 #define SCSI_C_SCSI_1 0 00062 #define SCSI_C_OTHER 1 00063 #define SCSI_C_SCSI_2 2 00064 #define SCSI_INQ$M_HIERARCH_SUPPORT 0x10 00065 #define SCSI_INQ$M_NORMAL_ACA 0x20 00066 #define SCSI_INQ$M_TRMIOP 0x40 00067 #define SCSI_INQ$M_AENC 0x80 00068 #define SCSI_INQ$M_SSC_SUPPORT 0x80 00069 #define SCSI_INQ$M_ADDRESS_16BIT 0x1 00070 #define SCSI_INQ$M_ADDRESS_32BIT 0x2 00071 #define SCSI_INQ$M_REQ_ACK_XFERS 0x4 00072 #define SCSI_INQ$M_MEDIUM_CHANGER 0x8 00073 #define SCSI_INQ$M_MULTI_PORT 0x10 00074 #define SCSI_INQ$M_VENDOR_SPEC1 0x20 00075 #define SCSI_INQ$M_ENCLOSURE_SVCS 0x40 00076 #define SCSI_INQ$M_BASIC_QUEUING 0x80 00077 #define SCSI_INQ$M_SFTRE 0x1 00078 #define SCSI_INQ$M_CMDQUE 0x2 00079 #define SCSI_INQ$M_XFER_DISABLE 0x4 00080 #define SCSI_INQ$M_LINKED 0x8 00081 #define SCSI_INQ$M_SYNC 0x10 00082 #define SCSI_INQ$M_WBUS16 0x20 00083 #define SCSI_INQ$M_WBUS32 0x40 00084 #define SCSI_INQ$M_RELADR 0x80 00085 #define INQ_DATA_K_STANDARD_LENGTH 36 00086 #define SCSI_INQ$M_RESERVED3 0xF 00087 #define SCSI_INQ$M_OTHER_STATUS 0x10 00088 #define SCSI_INQ$M_MULTIBUS 0x20 00089 #define SCSI_INQ$M_BOOT_PREFERENCE 0x40 00090 #define SCSI_INQ$M_EXT_LUN_SUPPORT 0x80 00091 #define INQ_DATA_K_LENGTH 255 00092 00093 struct _inquiry_data { 00094 struct { 00095 unsigned scsi_inq$v_device_type : 5; 00096 unsigned scsi_inq$v_qualifier : 3; 00097 }; 00098 struct { 00099 unsigned scsi_inq$v_modifier : 7; 00100 unsigned scsi_inq$v_rmb : 1; 00101 }; 00102 struct { 00103 unsigned scsi_inq$v_ansi_version : 3; 00104 unsigned scsi_inq$v_ecma_version : 3; 00105 unsigned scsi_inq$v_iso_version : 2; 00106 }; 00107 struct { 00108 unsigned scsi_inq$v_resp_data_format : 4; 00109 unsigned scsi_inq$v_hierarch_support : 1; 00110 unsigned scsi_inq$v_normal_aca : 1; 00111 unsigned scsi_inq$v_trmiop : 1; 00112 unsigned scsi_inq$v_aenc : 1; 00113 }; 00114 unsigned char scsi_inq$b_add_length; 00115 struct { 00116 unsigned scsi_inq$v_reserved2 : 7; 00117 unsigned scsi_inq$v_ssc_support : 1; 00118 }; 00119 struct { 00120 unsigned scsi_inq$v_address_16bit : 1; 00121 unsigned scsi_inq$v_address_32bit : 1; 00122 unsigned scsi_inq$v_req_ack_xfers : 1; 00123 unsigned scsi_inq$v_medium_changer : 1; 00124 unsigned scsi_inq$v_multi_port : 1; 00125 unsigned scsi_inq$v_vendor_spec1 : 1; 00126 unsigned scsi_inq$v_enclosure_svcs : 1; 00127 unsigned scsi_inq$v_basic_queuing : 1; 00128 }; 00129 struct { 00130 unsigned scsi_inq$v_sftre : 1; 00131 unsigned scsi_inq$v_cmdque : 1; 00132 unsigned scsi_inq$v_xfer_disable : 1; 00133 unsigned scsi_inq$v_linked : 1; 00134 unsigned scsi_inq$v_sync : 1; 00135 unsigned scsi_inq$v_wbus16 : 1; 00136 unsigned scsi_inq$v_wbus32 : 1; 00137 unsigned scsi_inq$v_reladr : 1; 00138 }; 00139 char scsi_inq$b_vendor_id [8]; 00140 char scsi_inq$b_product_id [16]; 00141 char scsi_inq$b_product_revision [4]; 00142 unsigned char scsi_inq$b_this_serial_no [10]; 00143 unsigned char scsi_inq$b_other_serial_no [10]; 00144 unsigned char scsi_inq$b_reserved2 [40]; 00145 struct { 00146 unsigned scsi_inq$v_reserved3 : 4; 00147 unsigned scsi_inq$v_other_status : 1; 00148 unsigned scsi_inq$v_multibus : 1; 00149 unsigned scsi_inq$v_boot_preference : 1; 00150 unsigned scsi_inq$v_ext_lun_support : 1; 00151 }; 00152 unsigned char scsi_inq$b_preferred_luns [32]; 00153 unsigned char scsi_inq$b_reserved4; 00154 unsigned char scsi_inq$b_node_id [8]; 00155 unsigned long long scsi_inq$q_reserved5 [13]; 00156 unsigned char scsi_inq$b_allocation_class [4]; 00157 unsigned char scsi_inq$b_reserved6 [9]; 00158 unsigned char scsi_inq$b_fill1; 00159 }; 00160 00161 #define inquiry_data _inquiry_data 00162 00163 struct mode_param_hdr_6 { 00164 unsigned char scsi_mph6$b_data_length; 00165 unsigned char scsi_mph6$b_medium_type; 00166 unsigned char scsi_mph6$b_device_param; 00167 unsigned char scsi_mph6$b_block_length; 00168 }; 00169 00170 struct mode_param_hdr_10 { 00171 unsigned short int scsi_mph10$w_data_length; 00172 unsigned char scsi_mph10$b_medium_type; 00173 unsigned char scsi_mph10$b_device_param; 00174 unsigned char scsi_mph10$b_reserved1 [2]; 00175 unsigned short int scsi_mph10$w_block_length; 00176 }; 00177 00178 #define SCSI_DK$C_DEFAULT 0 00179 #define SCSI_DK$C_SS 1 00180 #define SCSI_DK$C_DS 2 00181 #define SCSI_DK$C_DD 3 00182 00183 #define SCSI_DK$M_DPOFUA 0x10 00184 #define SCSI_DK$M_WP 0x80 00185 00186 struct disk_specific_param { 00187 unsigned scsi_dk$v_reserved1 : 4; 00188 unsigned scsi_dk$v_dpofua : 1; 00189 unsigned scsi_dk$v_reserved2 : 2; 00190 unsigned scsi_dk$v_wp : 1; 00191 }; 00192 00193 #define SCSI_CD$M_EBC 0x1 00194 #define SCSI_CD$M_CACHE 0x10 00195 00196 struct cdrom_specific_param { 00197 unsigned scsi_cd$v_ebc : 1; 00198 unsigned scsi_cd$v_reserved1 : 3; 00199 unsigned scsi_cd$v_cache : 1; 00200 unsigned scsi_cd$v_reserved2 : 3; 00201 }; 00202 00203 00204 00205 00206 struct mode_parameter { 00207 unsigned char scsi_mpbd$b_density; 00208 unsigned char scsi_mpbd$b_block [3]; 00209 char scsi_mpbd$b_reserved1; 00210 unsigned char scsi_mpbd$b_length [3]; 00211 }; 00212 00213 #define SCSI_IDENT$M_LUNTRN 0x7 00214 #define SCSI_IDENT$M_LUNTAR 0x20 00215 #define SCSI_IDENT$M_DISC_PRIV 0x40 00216 #define SCSI_IDENT$M_IDENTIFY 0x80 00217 00218 struct identify_message { 00219 struct { 00220 unsigned scsi_ident$v_luntrn : 3; 00221 unsigned scsi_ident$v_reserved_1 : 1; 00222 unsigned scsi_ident$v_reserved_2 : 1; 00223 unsigned scsi_ident$v_luntar : 1; 00224 unsigned scsi_ident$v_disc_priv : 1; 00225 unsigned scsi_ident$v_identify : 1; 00226 }; 00227 }; 00228 00229 #define SCSI_C_GOOD 0 00230 #define SCSI_C_CHECK_CONDITION 2 00231 #define SCSI_C_CONDITION_MET 4 00232 #define SCSI_C_BUSY 8 00233 #define SCSI_C_INTERMEDIATE 16 00234 #define SCSI_C_INTERMEDIATE_COND_MET 20 00235 #define SCSI_C_RESERVATION_CONFLICT 24 00236 #define SCSI_C_COMMAND_TERMINATED 34 00237 #define SCSI_C_QUEUE_FULL 40 00238 #define SCSI_M_STATUS_BYTE_RESERVED 193 00239 00240 00241 00242 #define SCSI_C_COMMAND_COMPLETE 0 00243 #define SCSI_C_EXTENDED_MESSAGE 1 00244 #define SCSI_C_SAVE_DATA_POINTERS 2 00245 #define SCSI_C_RESTORE_POINTERS 3 00246 #define SCSI_C_DISCONNECT 4 00247 #define SCSI_C_INITIATOR_DETECT_ERROR 5 00248 #define SCSI_C_ABORT 6 00249 #define SCSI_C_MESSAGE_REJECT 7 00250 #define SCSI_C_NO_OPERATION 8 00251 #define SCSI_C_MESSAGE_PARITY_ERROR 9 00252 #define SCSI_C_LINKED_COMMAND 10 00253 #define SCSI_C_LINKED_COMMAND_FLAGED 11 00254 #define SCSI_C_BUS_DEVICE_RESET 12 00255 #define SCSI_C_ABORT_TAG 13 00256 #define SCSI_C_CLEAR_QUEUE 14 00257 #define SCSI_C_INITIATE_RECOVERY 15 00258 #define SCSI_C_RELEASE_RECOVERY 16 00259 #define SCSI_C_TERMINATE_IO_PROCESS 17 00260 #define SCSI_C_CLEAR_ACA 22 00261 #define SCSI_C_SIMPLE_QUEUE_TAG 32 00262 #define SCSI_C_HEAD_OF_QUEUE_TAG 33 00263 #define SCSI_C_ORDERED_QUEUE_TAG 34 00264 #define SCSI_C_IGNORE_WIDE_RESIDUE 35 00265 00266 00267 00268 #define SCSI_C_MODIFY_DATA_POINTER 0 00269 #define SCSI_C_SYNCH_DATA_TRANSFER 1 00270 #define SCSI_C_WIDE_DATA_TRANSFER 3 00271 00272 00273 00274 #define SCSI_SNS$M_ERROR_CODE 0x7F 00275 #define SCSI_SC1$C_CURRENT 112 00276 #define SCSI_SC1$C_DEFERRED 113 00277 #define SCSI_SNS$M_VALID 0x80 00278 #define SCSI_SNS$M_SENSE_KEY 0xF 00279 #define SCSI_SNS$M_ILI 0x20 00280 #define SCSI_SNS$M_EOM 0x40 00281 #define SCSI_SNS$M_FILEMARK 0x80 00282 #define SCSI_C_RECOVERED_DATA 23 00283 00284 #define SCSI_SNS$M_BIT_POINTER 0x7 00285 #define SCSI_SNS$M_BPV 0x8 00286 #define SCSI_SNS$M_C_D 0x40 00287 #define SCSI_SNS$M_SKSV 0x80 00288 00289 struct sense_data { 00290 struct { 00291 unsigned scsi_sns$v_error_code : 7; 00292 unsigned scsi_sns$v_valid : 1; 00293 }; 00294 unsigned char scsi_sns$b_segement; 00295 struct { 00296 unsigned scsi_sns$v_sense_key : 4; 00297 unsigned scsi_sns$v_reserved1 : 1; 00298 unsigned scsi_sns$v_ili : 1; 00299 unsigned scsi_sns$v_eom : 1; 00300 unsigned scsi_sns$v_filemark : 1; 00301 }; 00302 union { 00303 unsigned int scsi_sns$l_lba_address; 00304 unsigned int scsi_sns$l_residual_length; 00305 unsigned int scsi_sns$l_residual_blocks; 00306 unsigned int scsi_sns$l_data_blocks; 00307 unsigned int scsi_sns$l_file_marks; 00308 unsigned int scsi_sns$l_set_marks; 00309 }; 00310 unsigned char scsi_sns$b_add_sense_len; 00311 union { 00312 unsigned char scsi_sns$b_sense_information [4]; 00313 }; 00314 unsigned char scsi_sns$b_add_sense_code; 00315 00316 00317 00318 00319 00320 00321 00322 unsigned char scsi_sns$b_add_sense_qual; 00323 unsigned char scsi_sns$b_fru_code; 00324 struct { 00325 unsigned scsi_sns$v_bit_pointer : 3; 00326 unsigned scsi_sns$v_bpv : 1; 00327 unsigned scsi_sns$v_reserved2 : 2; 00328 unsigned scsi_sns$v_c_d : 1; 00329 unsigned scsi_sns$v_sksv : 1; 00330 unsigned short int scsi_sns$w_field_pointer; 00331 }; 00332 struct { 00333 unsigned char scsi_sns$b_add_sense_bytes [1]; 00334 }; 00335 }; 00336 00337 #define SCSI_C_NO_SENSE 0 00338 #define SCSI_C_RECOVERED_ERROR 1 00339 #define SCSI_C_NOT_READY 2 00340 #define SCSI_C_MEDIUM_ERROR 3 00341 #define SCSI_C_HARDWARE_ERROR 4 00342 #define SCSI_C_ILLEGAL_REQUEST 5 00343 #define SCSI_C_UNIT_ATTENTION 6 00344 #define SCSI_C_DATA_PROTECT 7 00345 #define SCSI_C_BLANK_CHECK 8 00346 #define SCSI_C_VENDOR_SPECIFIC 9 00347 #define SCSI_C_COPY_ABORTED 10 00348 #define SCSI_C_ABORTED_COMMAND 11 00349 #define SCSI_C_EQUAL 12 00350 #define SCSI_C_VOLUME_OVERFLOW 13 00351 #define SCSI_C_MISCOMPARE 14 00352 #define SCSI_C_RESERVED 15 00353 00354 00355 00356 #define SCSI_C_AUDIO_CONTROL_PAGE 14 00357 #define SCSI_C_MEDIA_CHANGE 40 00358 00359 #define SCSI_C_MODE_CHANGE 42 00360 00361 00362 00363 #define SCSI_C_INCOMPATIBLE_MEDIA 48 00364 00365 00366 00367 00368 #define SCSI_C_DRIVE_NOT_READY 4 00369 00370 00371 00372 00373 00374 #define SCSI_C_MEDIUM_NOT_PRESENT 58 00375 00376 00377 00378 00379 #define SCSI_OPT$C_MEDIA_DEFAULT 0 00380 #define SCSI_OPT$C_MEDIA_RO 1 00381 #define SCSI_OPT$C_MEDIA_WORM 2 00382 #define SCSI_OPT$C_MEDIA_ERASE 3 00383 #define SCSI_OPT$C_MEDIA_RO_WORM 4 00384 #define SCSI_OPT$C_MEDIA_RO_ERASE 5 00385 #define SCSI_OPT$C_MEDIA_WORM_ERASE 6 00386 00387 00388 00389 #define SCSI_PGCD$C_VENDOR_SPECIFIC 0 00390 #define SCSI_PGCD$C_READ_WRITE_ERR 1 00391 #define SCSI_PGCD$C_DISCONNECT_REC 2 00392 #define SCSI_PGCD$C_FORMAT_DEVICE 3 00393 #define SCSI_PGCD$C_RIGID_DISK 4 00394 #define SCSI_PGCD$C_FLEXIBLE_DISK 5 00395 #define SCSI_PGCD$C_RESERVED 6 00396 #define SCSI_PGCD$C_VERIFY_ERROR 7 00397 #define SCSI_PGCD$C_CACHING 8 00398 #define SCSI_PGCD$C_PERIPHERAL 9 00399 #define SCSI_PGCD$C_CONTROL_MODE 10 00400 #define SCSI_PGCD$C_MEDIUM_TYPES 11 00401 #define SCSI_PGCD$C_NOTCH_PARTION 12 00402 #define SCSI_PGCD$C_ALL_PAGES 63 00403 #define SCSI_PGCD$C_MAX_PAGE_CODE 63 00404 #define SCSI_PGCD$M_CURRENT 0 00405 #define SCSI_PGCD$M_CHANGEABLE 64 00406 #define SCSI_PGCD$M_DEFAULT 128 00407 #define SCSI_PGCD$M_SAVED 192 00408 #define SCSI_PGCD$C_PAGE_SIZE 512 00409 00410 00411 00412 #define SCSI_ACP$M_PAGE_CODE 0x3F 00413 #define SCSI_ACP$C_PAGE_CODE 14 00414 #define SCSI_ACP$M_PS 0x80 00415 #define SCSI_S_HEADER 2 00416 #define SCSI_ACP$C_PAGE_LENGTH 14 00417 #define SCSI_ACP$M_SOTC 0x2 00418 #define SCSI_ACP$M_IMMED 0x4 00419 #define SCSI_ACP$M_LBA_FORMAT 0xF000000 00420 #define SCSI_ACP$M_CHANNEL_0 0x1 00421 #define SCSI_ACP$M_CHANNEL_1 0x2 00422 #define SCSI_ACP$M_CHANNEL_2 0x4 00423 #define SCSI_ACP$M_CHANNEL_3 0x8 00424 00425 struct audio_control { 00426 struct { 00427 unsigned scsi_acp$v_page_code : 6; 00428 unsigned scsi_acp$v_reserved1 : 1; 00429 unsigned scsi_acp$v_ps : 1; 00430 }; 00431 unsigned char scsi_acp$b_page_length; 00432 struct { 00433 unsigned scsi_acp$v_reserved2 : 1; 00434 unsigned scsi_acp$v_sotc : 1; 00435 unsigned scsi_acp$v_immed : 1; 00436 unsigned scsi_acp$v_reserved3 : 21; 00437 unsigned scsi_acp$v_lba_format : 4; 00438 unsigned scsi_acp$v_fill_3_ : 4; 00439 }; 00440 unsigned short int scsi_acp$w_lbs_per_sec; 00441 union { 00442 unsigned short int scsi_acp$w_channel_volume [4]; 00443 struct { 00444 unsigned scsi_acp$v_channel_0 : 1; 00445 unsigned scsi_acp$v_channel_1 : 1; 00446 unsigned scsi_acp$v_channel_2 : 1; 00447 unsigned scsi_acp$v_channel_3 : 1; 00448 unsigned scsi_acp$v_reserved4 : 4; 00449 unsigned char scsi_acp$b_volume; 00450 }; 00451 }; 00452 }; 00453 00454 #define SCSI_CMP$M_PAGE_CODE 0x3F 00455 #define SCSI_CMP$C_PAGE_CODE 10 00456 #define SCSI_CMP$M_PS 0x80 00457 #define SCSI_CMP$C_PAGE_LENGTH 6 00458 #define SCSI_CMP$M_RLEC 0x1 00459 #define SCSI_CMP$M_DQUE 0x100 00460 #define SCSI_CMP$M_QERR 0x200 00461 #define SCSI_CMP$M_QAM 0x7000 00462 #define SCSI_QAM$C_RESTRICTED 0 00463 #define SCSI_QAM$C_UNRESTRICTED 1 00464 #define SCSI_CMP$M_EAENP 0x8000 00465 #define SCSI_CMP$M_UAAENP 0x10000 00466 #define SCSI_CMP$M_RAENP 0x20000 00467 #define SCSI_CMP$M_EECA 0x400000 00468 00469 struct control_mode { 00470 struct { 00471 unsigned scsi_cmp$v_page_code : 6; 00472 unsigned scsi_cmp$v_reserved1 : 1; 00473 unsigned scsi_cmp$v_ps : 1; 00474 }; 00475 unsigned char scsi_cmp$b_page_length; 00476 struct { 00477 unsigned scsi_cmp$v_rlec : 1; 00478 unsigned scsi_cmp$v_reserved2 : 7; 00479 unsigned scsi_cmp$v_dque : 1; 00480 unsigned scsi_cmp$v_qerr : 1; 00481 unsigned scsi_cmp$v_reserved3 : 2; 00482 unsigned scsi_cmp$v_qam : 3; 00483 unsigned scsi_cmp$v_eaenp : 1; 00484 unsigned scsi_cmp$v_uaaenp : 1; 00485 unsigned scsi_cmp$v_raenp : 1; 00486 unsigned scsi_cmp$v_reserved4 : 4; 00487 unsigned scsi_cmp$v_eeca : 1; 00488 unsigned scsi_cmp$v_fill_4_ : 1; 00489 }; 00490 char scsi_cmp$b_reserved5; 00491 unsigned short int scsi_cmp$w_ready_aen; 00492 }; 00493 00494 #define SCSI_ERP$M_PAGE_CODE 0x3F 00495 #define SCSI_ERP$C_PAGE_CODE 1 00496 #define SCSI_ERP$M_PS 0x80 00497 #define SCSI_ERP$C_PAGE_LENGTH 10 00498 #define SCSI_ERP$M_DCR 0x1 00499 #define SCSI_ERP$M_DTE 0x2 00500 #define SCSI_ERP$M_PER 0x4 00501 #define SCSI_ERP$M_EER 0x8 00502 #define SCSI_ERP$M_RC 0x10 00503 #define SCSI_ERP$M_TB 0x20 00504 #define SCSI_ERP$M_ARRE 0x40 00505 #define SCSI_ERP$M_AWRE 0x80 00506 00507 struct error_recovery { 00508 struct { 00509 unsigned scsi_erp$v_page_code : 6; 00510 unsigned scsi_erp$v_reserved1 : 1; 00511 unsigned scsi_erp$v_ps : 1; 00512 }; 00513 unsigned char scsi_erp$b_page_length; 00514 struct { 00515 unsigned scsi_erp$v_dcr : 1; 00516 unsigned scsi_erp$v_dte : 1; 00517 unsigned scsi_erp$v_per : 1; 00518 unsigned scsi_erp$v_eer : 1; 00519 unsigned scsi_erp$v_rc : 1; 00520 unsigned scsi_erp$v_tb : 1; 00521 unsigned scsi_erp$v_arre : 1; 00522 unsigned scsi_erp$v_awre : 1; 00523 }; 00524 unsigned char scsi_erp$b_read_rerty_count; 00525 unsigned char scsi_erp$b_correction_span; 00526 unsigned char scsi_erp$b_head_offset_count; 00527 unsigned char scsi_erp$b_data_strobe_offset; 00528 unsigned char scsi_erp$b_reserved2; 00529 unsigned char scsi_erp$b_write_retry_count; 00530 unsigned char scsi_erp$b_reserved3; 00531 unsigned short int scsi_erp$w_recovery_time_limit; 00532 }; 00533 00534 #define SCSI_FMT$M_PAGE_CODE 0x3F 00535 #define SCSI_FMT$C_PAGE_CODE 3 00536 #define SCSI_FMT$M_PS 0x80 00537 #define SCSI_FMT$C_PAGE_LENGTH 22 00538 #define SCSI_FMT$M_SURF 0x10 00539 #define SCSI_FMT$M_RMB 0x20 00540 #define SCSI_FMT$M_HSEC 0x40 00541 #define SCSI_FMT$M_SSEC 0x80 00542 00543 struct format_device { 00544 struct { 00545 unsigned scsi_fmt$v_page_code : 6; 00546 unsigned scsi_fmt$v_reserved1 : 1; 00547 unsigned scsi_fmt$v_ps : 1; 00548 }; 00549 unsigned char scsi_fmt$b_page_length; 00550 unsigned short int scsi_fmt$w_tracks; 00551 unsigned short int scsi_fmt$w_alt_sectors; 00552 unsigned short int scsi_fmt$w_alt_tracks; 00553 unsigned short int scsi_fmt$w_alt_tracks_unit; 00554 unsigned short int scsi_fmt$w_sectors; 00555 unsigned short int scsi_fmt$w_sector_size; 00556 unsigned short int scsi_fmt$w_interleave; 00557 unsigned short int scsi_fmt$w_track_skew; 00558 unsigned short int scsi_fmt$w_cyl_skew; 00559 struct { 00560 unsigned scsi_fmt$v_reserved2 : 4; 00561 unsigned scsi_fmt$v_surf : 1; 00562 unsigned scsi_fmt$v_rmb : 1; 00563 unsigned scsi_fmt$v_hsec : 1; 00564 unsigned scsi_fmt$v_ssec : 1; 00565 }; 00566 char scsi_fmt$b_reserved3 [3]; 00567 }; 00568 00569 #define SCSI_RGD$M_PAGE_CODE 0x3F 00570 #define SCSI_RGD$C_PAGE_CODE 4 00571 #define SCSI_RGD$M_PS 0x80 00572 #define SCSI_RGD$C_PAGE_LENGTH 22 00573 #define SCSI_RGD$M_RPL 0x3 00574 #define SCSI_RGD$C_DISABLED 0 00575 #define SCSI_RGD$C_SLAVE 1 00576 #define SCSI_RGD$C_MASTER 2 00577 #define SCSI_RGD$C_CONTROL 3 00578 00579 struct rigid_disk { 00580 struct { 00581 unsigned scsi_rgd$v_page_code : 6; 00582 unsigned scsi_rgd$v_reserved1 : 1; 00583 unsigned scsi_rgd$v_ps : 1; 00584 }; 00585 unsigned char scsi_rgd$b_page_length; 00586 char scsi_rgd$b_cylinders [3]; 00587 unsigned char scsi_rgd$b_heads; 00588 unsigned short int scsi_rgd$w_cylinder_write; 00589 unsigned short int scsi_rgd$w_cylinder_reduced; 00590 unsigned short int scsi_rgd$w_step_rate; 00591 unsigned short int scsi_rgd$w_landing_zone; 00592 struct { 00593 unsigned scsi_rgd$v_rpl : 2; 00594 unsigned scsi_rgd$v_reserved2 : 6; 00595 }; 00596 unsigned char scsi_rgd$b_rotational_offset; 00597 unsigned char scsi_rgd$b_reserved3; 00598 unsigned short int scsi_rgd$w_medium_rotation; 00599 unsigned short int scsi_rgd$w_rotational_offset; 00600 }; 00601 00602 #define SCSI_FLX$M_PAGE_CODE 0x3F 00603 #define SCSI_FLX$C_PAGE_CODE 5 00604 #define SCSI_FLX$M_PS 0x80 00605 #define SCSI_FLX$C_PAGE_LENGTH 30 00606 #define SCSI_FLX$C_XFR_250KHZ 64000 00607 #define SCSI_FLX$C_XFR_300KHZ 11265 00608 #define SCSI_FLX$C_XFR_500KHZ 62465 00609 #define SCSI_FLX$C_XFR_1MHZ 59395 00610 #define SCSI_FLX$C_XFR_2MHZ 53255 00611 #define SCSI_FLX$C_XFR_5MHZ 34835 00612 #define SCSI_FLX$M_MO 0x20 00613 #define SCSI_FLX$M_SSN 0x40 00614 #define SCSI_FLX$M_TRDY 0x80 00615 #define SCSI_FLX$M_SPC 0xF00 00616 #define SCSI_FLX$M_PIN2 0x1 00617 #define SCSI_FLX$M_PIN34 0x2 00618 #define SCSI_FLX$M_PIN1 0x4 00619 #define SCSI_FLX$M_PIN4 0x8 00620 00621 struct flexible_disk { 00622 struct { 00623 unsigned scsi_flx$v_page_code : 6; 00624 unsigned scsi_flx$v_reserved1 : 1; 00625 unsigned scsi_flx$v_ps : 1; 00626 }; 00627 unsigned char scsi_flx$b_page_length; 00628 unsigned short int scsi_flx$w_transfer_rate; 00629 00630 unsigned char scsi_flx$b_heads; 00631 unsigned char scsi_flx$b_sectors_track; 00632 unsigned short int scsi_flx$w_sector_size; 00633 unsigned short int scsi_flx$w_cylinders; 00634 unsigned short int scsi_flx$w_cylinder_write; 00635 unsigned short int scsi_flx$w_cylinder_reduced; 00636 unsigned short int scsi_flx$w_step_rate; 00637 unsigned char scsi_flx$b_step_pulse; 00638 unsigned short int scsi_flx$w_head_settle; 00639 unsigned char scsi_flx$b_motor_on; 00640 unsigned char scsi_flx$b_motor_off; 00641 struct { 00642 unsigned scsi_flx$v_reserved2 : 5; 00643 unsigned scsi_flx$v_mo : 1; 00644 unsigned scsi_flx$v_ssn : 1; 00645 unsigned scsi_flx$v_trdy : 1; 00646 unsigned scsi_flx$v_spc : 4; 00647 unsigned scsi_flx$v_reserved3 : 4; 00648 }; 00649 unsigned char scsi_flx$b_write_comp; 00650 unsigned char scsi_flx$b_head_load; 00651 unsigned char scsi_flx$b_head_unload; 00652 struct { 00653 unsigned scsi_flx$v_pin2 : 1; 00654 unsigned scsi_flx$v_pin34 : 1; 00655 unsigned scsi_flx$v_pin1 : 1; 00656 unsigned scsi_flx$v_pin4 : 1; 00657 unsigned scsi_flx$v_fill_5_ : 4; 00658 }; 00659 unsigned short int scsi_flx$w_rotation; 00660 unsigned short int scsi_flx$w_reserved4; 00661 }; 00662 00663 #define SCSI_SUB$C_SUBQ_CHANNEL_DATA 0 00664 #define SCSI_SUB$C_CD_ROM_POSITION 1 00665 #define SCSI_SUB$C_MCN 2 00666 #define SCSI_SUB$C_ISRC 3 00667 00668 00669 00670 #define SCSI_SUBQ$C_NOT_VALID 0 00671 #define SCSI_SUBQ$C_PLAY 1 00672 #define SCSI_SUBQ$C_PAUSED 2 00673 #define SCSI_SUBQ$C_COMPLETE 3 00674 #define SCSI_SUBQ$C_ERROR 4 00675 #define SCSI_SUBQ$C_ACTIVE 5 00676 #define SCSI_SUBQ$M_CONTROL 0xF 00677 #define SCSI_SUBQ$C_PRE_EMPHASIS 0 00678 #define SCSI_SUBQ$C_COPY_PERMITTED 1 00679 #define SCSI_SUBQ$C_DATA_TRACK 2 00680 #define SCSI_SUBQ$C_FOUR_CHANNEL 3 00681 #define SCSI_SUBQ$M_ADR 0xF0 00682 #define SCSI_SUBQ$C_UNKNOWN 0 00683 #define SCSI_SUBQ$C_CURRENT_POS 1 00684 #define SCSI_SUBQ$C_MCN 2 00685 #define SCSI_SUBQ$C_ISRC 3 00686 #define SCSI_SUBQ$M_MC_VAL 0x80 00687 #define SCSI_SUBQ$C_MCN_LENGTH 32 00688 #define SCSI_SUBQ$M_TC_VAL 0x80 00689 00690 struct subq_channel { 00691 char scsi_subq$b_reserved1; 00692 unsigned char scsi_subq$b_audio_status; 00693 unsigned short int scsi_subq$w_data_length; 00694 unsigned char scsi_subq$b_format_code; 00695 struct { 00696 unsigned scsi_subq$v_control : 4; 00697 unsigned scsi_subq$v_adr : 4; 00698 }; 00699 unsigned char scsi_subq$b_track; 00700 unsigned char scsi_subq$b_index; 00701 unsigned int scsi_subq$l_abs_address; 00702 unsigned int scsi_subq$l_rel_address; 00703 struct { 00704 unsigned scsi_subq$v_reserved2 : 7; 00705 unsigned scsi_subq$v_mc_val : 1; 00706 }; 00707 unsigned char scsi_subq$b_mcn [15]; 00708 struct { 00709 unsigned scsi_subq$v_reserved3 : 7; 00710 unsigned scsi_subq$v_tc_val : 1; 00711 }; 00712 unsigned char scsi_subq$b_irrc [15]; 00713 }; 00714 00715 #define SCSIPATH_K_VMS 1 00716 #define SCSIPATH_K_CONSOLE 2 00717 #define SCSIPATH_K_QIOSERVER 3 00718 00719 struct _scsipath { 00720 unsigned char scsipath_b_type; 00721 unsigned char scsipath_b_reserved1 [3]; 00722 struct _ucb *scsipath_ps_port_ucb; 00723 long long scsipath_q_target_id; 00724 long long scsipath_q_lun; 00725 }; 00726 00727 00728 00729 #define DEVID_CMD_K_WR_DEVID_OPCODE 235 00730 #define DEVID_CMD_K_RD_DEVID_OPCODE 236 00731 #define DEVID_CMD_K_LENGTH 10 00732 00733 struct _devid_cmd { 00734 unsigned char devid_cmd_b_opcode; 00735 unsigned char devid_cmd_b_reserved1 [6]; 00736 unsigned char devid_cmd_b_alloc_length [2]; 00737 unsigned char devid_cmd_b_control; 00738 char devid_cmd_b_fill_6_ [2]; 00739 }; 00740 00741 00742 00743 #define DEVID_HDR_K_LENGTH 4 00744 #define DEVID_K_LENGTH 255 00745 00746 struct _devid { 00747 unsigned char devid_b_reserved1; 00748 unsigned char devid_b_reserved2; 00749 struct { 00750 unsigned devid_v_valid : 1; 00751 unsigned devid_v_reserved3 : 7; 00752 }; 00753 unsigned char devid_b_ident_len; 00754 unsigned char devid_b_ident [251]; 00755 char devid_b_fill1; 00756 }; 00757 00758 #define RPTLUN_CMD_K_RPTLUN_OPCODE 160 00759 #define RPTLUN_CMD_K_LENGTH 12 00760 00761 struct _rptlun_cmd { 00762 unsigned char rptlun_cmd_b_opcode; 00763 unsigned char rptlun_cmd_b_reserved1 [5]; 00764 unsigned char rptlun_cmd_b_alloc_length [4]; 00765 unsigned char rptlun_cmd_b_reserved2; 00766 unsigned char rptlun_cmd_b_control; 00767 }; 00768 00769 struct _lunlist_entry { 00770 unsigned long long lunlist_entry_q_lun [1]; 00771 }; 00772 00773 #define RPTLUN_HDR_K_LENGTH 8 00774 00775 struct _rptlun_data { 00776 unsigned int rptlun_data_l_list_length; 00777 unsigned int rptlun_data_l_reserved1; 00778 struct _lunlist_entry rptlun_data_r_lun_list; 00779 }; 00780 00781 00782 00783 00784 #define PG83_IDENT_K_RESERVED 0 00785 #define PG83_IDENT_K_BINARY 1 00786 #define PG83_IDENT_K_ASCII 2 00787 #define PG83_IDENT_K_VENDOR_SPEC 0 00788 #define PG83_IDENT_K_VENDOR_ID 1 00789 #define PG83_IDENT_K_IEEE_EUI64 2 00790 #define PG83_IDENT_K_FCPH_NAME_ID 3 00791 #define PG83_IDENT_K_USER_SUPPLIED 4 00792 #define PG83_IDENT_K_DEVICE_ASSOC 0 00793 #define PG83_IDENT_K_PORT_ASSOC 1 00794 #define IDENT_HDR_K_LENGTH 4 00795 #define FCPH_C_STD_ID 1 00796 #define FCPH_C_EXT_ID 2 00797 #define FCPH_C_REG_ID 5 00798 #define FCPH_C_REGEXT_ID 6 00799 00800 struct _pg83_ident { 00801 struct { 00802 unsigned pg83_ident_v_codeset : 4; 00803 unsigned pg83_ident_v_reserved1 : 4; 00804 }; 00805 struct { 00806 unsigned pg83_ident_v_id_type : 4; 00807 unsigned pg83_ident_v_assoc : 2; 00808 unsigned pg83_ident_v_reserved2 : 2; 00809 }; 00810 unsigned char pg83_ident_b_reserved3; 00811 unsigned char pg83_ident_b_ident_len; 00812 union { 00813 unsigned char pg83_ident_b_ident; 00814 struct { 00815 unsigned pg83_ident_v_unused : 4; 00816 unsigned pg83_ident_v_naa : 4; 00817 }; 00818 }; 00819 char pg83_ident_b_fill_7_ [3]; 00820 }; 00821 00822 #define PAGE83_HDR_K_LENGTH 4 00823 #define PAGE83_K_LENGTH 255 00824 00825 struct _page83 { 00826 struct { 00827 unsigned page83_v_device_type : 5; 00828 unsigned page83_v_qualifier : 3; 00829 }; 00830 unsigned char page83_b_page_code; 00831 unsigned char page83_b_reserved1; 00832 unsigned char page83_b_page_len; 00833 unsigned char page83_b_ident_list [251]; 00834 char page83_b_fill1; 00835 }; 00836 00837 #define PAGE00_HDR_K_LENGTH 4 00838 #define PAGE00_K_LENGTH 80 00839 00840 struct _page00 { 00841 struct { 00842 unsigned page00_v_device_type : 5; 00843 unsigned page00_v_qualifier : 3; 00844 }; 00845 unsigned char page00_b_page_code; 00846 unsigned char page00_b_reserved1; 00847 unsigned char page00_b_page_len; 00848 unsigned char page00_b_supported_page [76]; 00849 }; 00850 00851 #define PAGE80_HDR_K_LENGTH 4 00852 #define PAGE80_K_LENGTH 255 00853 00854 struct _page80 { 00855 struct { 00856 unsigned page80_v_device_type : 5; 00857 unsigned page80_v_qualifier : 3; 00858 }; 00859 unsigned char page80_b_page_code; 00860 unsigned char page80_b_reserved1; 00861 unsigned char page80_b_page_len; 00862 unsigned char page80_b_serial_no [251]; 00863 char page80_b_fill1; 00864 }; 00865 00866 #define SPTB_K_LENGTH 299 00867 00868 struct sptbdef { 00869 unsigned int sptb_l_size; 00870 unsigned int sptb_l_lkid; 00871 unsigned int sptb_l_channel; 00872 int sptb_l_retries; 00873 union { 00874 long long sptb_q_iosb; 00875 struct { 00876 unsigned short int sptb_w_status; 00877 unsigned short int sptb_w_retlen; 00878 }; 00879 }; 00880 unsigned int sptb_l_scsi_id; 00881 unsigned int sptb_l_lun; 00882 void *sptb_ps_busarray; 00883 unsigned int sptb_l_handle; 00884 unsigned int sptb_l_allocls; 00885 char sptb_t_inquirybuf [255]; 00886 }; 00887 00888 #define RPTDENS_CMD_K_RPTDENS_OPCODE 68 00889 #define RPTDENS_CMD_K_LENGTH 10 00890 00891 struct _rptdens_cmd { 00892 unsigned char rptdens_cmd_b_opcode; 00893 unsigned char rptdens_cmd_b_reserved1 [6]; 00894 unsigned char rptdens_cmd_b_alloc_length [2]; 00895 unsigned char rptdens_cmd_b_control; 00896 char rptdens_cmd_b_fill_8_ [2]; 00897 }; 00898 00899 00900 00901 00902 00903 00904 00905 00906 #define DENS_DESC_M_RESERVED1 0x1 00907 #define DENS_DESC_M_DEFLT 0x20 00908 #define DENS_DESC_M_DUP 0x40 00909 #define DENS_DESC_M_WRTOK 0x80 00910 #define DENS_DESC_K_LENGTH 52 00911 00912 struct _dens_descriptor { 00913 unsigned char dens_desc_b_primary_dens_code; 00914 unsigned char dens_desc_b_secondary_dens_code; 00915 struct { 00916 unsigned dens_desc_v_reserved1 : 5 ; 00917 unsigned dens_desc_v_deflt : 1; 00918 unsigned dens_desc_v_dup : 1; 00919 unsigned dens_desc_v_wrtok : 1; 00920 }; 00921 unsigned char dens_desc_b_reserved2; 00922 unsigned char dens_desc_b_reserved3; 00923 unsigned char dens_desc_b_bits_per_mm [3]; 00924 unsigned char dens_desc_b_media_width [2]; 00925 unsigned char dens_desc_b_tracks [2]; 00926 unsigned char dens_desc_b_capacity [4]; 00927 unsigned char dens_desc_b_assigning_org [8]; 00928 unsigned char dens_desc_b_density_name [8]; 00929 unsigned char dens_desc_b_description [20]; 00930 }; 00931 00932 #define RPTDENS_HDR_K_LENGTH 4 00933 00934 struct _rptdens_data { 00935 unsigned char rptdens_b_list_length_msb; 00936 unsigned char rptdens_b_list_length_lsb; 00937 unsigned char rptdens_b_reserved1 [2]; 00938 struct _dens_descriptor rptdens_r_first_desc; 00939 }; 00940 00941 00942 00943 #define PAGE_0F_K_PAGE_CODE 15 00944 #define PAGE_0F_K_PAGE_LENGTH 14 00945 #define PAGE_0F_M_DCC 0x40 00946 #define PAGE_0F_M_DCE 0x80 00947 #define PAGE_0F_M_RED 0x60 00948 #define PAGE_0F_M_DDE 0x80 00949 #define PAGE_0F_K_NOCOMP 0 00950 #define PAGE_0F_K_DEFAULT 1 00951 #define PAGE_0F_K_IBM_ALDC_512 3 00952 #define PAGE_0F_K_IBM_ALDC_1024 4 00953 #define PAGE_0F_K_IBM_ALDC_2048 5 00954 #define PAGE_0F_K_IBM_IDRC 16 00955 #define PAGE_0F_K_DCLZ 32 00956 00957 struct _datcomp_pg { 00958 struct { 00959 unsigned page_0f_v_pagecode : 6; 00960 unsigned page_0f_v_rsvd1 : 1; 00961 unsigned page_0f_v_ps : 1; 00962 }; 00963 unsigned char page_0f_b_page_len; 00964 struct { 00965 unsigned page_0f_v_rsvd2 : 6; 00966 unsigned page_0f_v_dcc : 1; 00967 unsigned page_0f_v_dce : 1; 00968 }; 00969 struct { 00970 unsigned page_0f_v_rsvd3 : 5; 00971 unsigned page_0f_v_red : 2; 00972 unsigned page_0f_v_dde : 1; 00973 }; 00974 union { 00975 unsigned int page_0f_l_comp_algorithm; 00976 unsigned char page_0f_b_comp_bytes [4]; 00977 }; 00978 union { 00979 unsigned int page_0f_l_decomp_algorithm; 00980 unsigned char page_0f_b_decomp_bytes [4]; 00981 }; 00982 unsigned char page_0f_b_rsvd4 [4]; 00983 }; 00984 00985 #include <wwiddef.h> 00986 00987 struct _dev_wwid_duple { 00988 struct _dev_wwid_duple *dev_wwid_duple_ps_flink; 00989 struct _dev_wwid_duple *dev_wwid_duple_ps_blink; 00990 unsigned short int dev_wwid_duple_w_size; 00991 unsigned char dev_wwid_duple_b_type; 00992 unsigned char dev_wwid_duple_b_subtype; 00993 unsigned int dev_wwid_duple_l_flags; 00994 char dev_wwid_duple_t_device [16]; 00995 struct _wwid dev_wwid_duple_r_wwid; 00996 }; 00997 00998 #define DEV_WWID_DUPLE_K_LENGTH 312 00999 #define DEV_WWID_DUPLE_C_LENGTH 312 01000 01001 01002 01003 01004 #define PROUT_CMD_K_PROUT_OPCODE 95 01005 #define PROUT_CMD_M_SERVICE_ACTION 0x1F00 01006 #define PROUT_CMD_C_REGISTER 0 01007 #define PROUT_CMD_C_RESERVE 1 01008 #define PROUT_CMD_C_RELEASE 2 01009 #define PROUT_CMD_C_CLEAR 3 01010 #define PROUT_CMD_C_PREEMPT 4 01011 #define PROUT_CMD_C_PREEMPT_ABORT 5 01012 #define PROUT_CMD_C_REGISTER_IGNORE 6 01013 #define PROUT_CMD_M_RESERVED1 0xE000 01014 #define PROUT_CMD_M_TYPE 0xF0000 01015 #define PROUT_CMD_C_OBSELETE1 0 01016 #define PROUT_CMD_C_WRITE_EX 1 01017 #define PROUT_CMD_C_OBSELETE2 2 01018 #define PROUT_CMD_C_EXCLUSIVE 3 01019 #define PROUT_CMD_C_OBSELETE3 4 01020 #define PROUT_CMD_C_WRITE_EX_RO 5 01021 #define PROUT_CMD_C_EXCLUSIVE_RO 6 01022 #define PROUT_CMD_M_SCOPE 0xF00000 01023 #define PROUT_CMD_C_LOGICAL_UNIT 0 01024 #define PROUT_CMD_C_OBSELETE4 1 01025 #define PROUT_CMD_C_ELEMENT 2 01026 #define PROUT_CMD_K_PROUT_PLL 24 01027 #define PROUT_CMD_K_LENGTH 10 01028 01029 struct _prout_cmd { 01030 unsigned char prout_cmd_b_opcode; 01031 unsigned prout_cmd_v_service_action : 5; 01032 unsigned prout_cmd_v_reserved1 : 3; 01033 unsigned prout_cmd_v_type : 4; 01034 unsigned prout_cmd_v_scope : 4; 01035 unsigned int prout_cmd_l_reserved2; 01036 unsigned char prout_cmd_b_param_list_len_msb; 01037 unsigned char prout_cmd_b_param_list_len_lsb; 01038 unsigned char prout_cmd_b_control; 01039 }; 01040 01041 01042 01043 #define PROUT_PL_M_APTPL 0x0 01044 #define PROUT_PL_M_RESERVED 0x0 01045 #define PROUT_PL_K_LENGTH 24 01046 01047 struct _prout_pl { 01048 unsigned long long prout_pl_q_reservation_key; 01049 unsigned long long prout_pl_q_sa_reservation_key; 01050 unsigned int prout_pl_l_scope_address; 01051 unsigned prout_pl_v_aptpl : 1; 01052 unsigned prout_pl_v_reserved : 15; 01053 unsigned short int prout_pl_w_obselete; 01054 }; 01055 01056 01057 01058 #define PRIN_CMD_K_PRIN_OPCODE 94 01059 #define PRIN_CMD_M_SERVICE_ACTION 0x1F00 01060 #define PRIN_CMD_C_READ_KEYS 0 01061 #define PRIN_CMD_C_READ_RESERVATION 1 01062 #define PRIN_CMD_M_RESERVED1 0xE000 01063 #define PRIN_CMD_K_LENGTH 10 01064 01065 struct _prin_cmd { 01066 unsigned char prin_cmd_b_opcode; 01067 unsigned prin_cmd_v_service_action : 5; 01068 unsigned prin_cmd_v_reserved1 : 3; 01069 unsigned int prin_cmd_l_reserved2; 01070 unsigned char prin_cmd_b_reserved3; 01071 unsigned short int prin_cmd_w_allocation_len; 01072 unsigned char prin_cmd_b_control; 01073 }; 01074 01075 01076 01077 #define PRIN_KEYS_K_LENGTH 16 01078 01079 struct _prin_keys { 01080 unsigned int prin_keys_l_generation; 01081 unsigned int prin_keys_l_additional_len; 01082 unsigned long long prin_keys_q_key; 01083 }; 01084 01085 01086 01087 #define PRIN_RES_M_TYPE 0x0 01088 #define PRIN_RES_C_OBSELETE1 0 01089 #define PRIN_RES_C_WRITE_EX 1 01090 #define PRIN_RES_C_OBSELETE2 2 01091 #define PRIN_RES_C_EXCLUSIVE 3 01092 #define PRIN_RES_C_OBSELETE3 4 01093 #define PRIN_RES_C_WRITE_EX_RO 5 01094 #define PRIN_RES_C_EXCLUSIVE_RO 6 01095 #define PRIN_RES_M_SCOPE 0x0 01096 #define PRIN_RES_C_LOGICAL_UNIT 0 01097 #define PRIN_RES_C_OBSELETE4 1 01098 #define PRIN_RES_C_ELEMENT 2 01099 #define PRIN_RES_K_LENGTH 24 01100 01101 struct _prin_res { 01102 unsigned int prin_res_l_generation; 01103 unsigned int prin_res_l_additional_len; 01104 unsigned long long prin_res_q_key; 01105 unsigned int prin_res_l_scope_address; 01106 unsigned char prin_res_b_reserved1; 01107 unsigned prin_res_v_type : 4; 01108 unsigned prin_res_v_scope : 4; 01109 unsigned short int prin_res_w_obselete; 01110 }; 01111 01112 #endif 01113 01114