📄 cpqfctsstructs.h
字号:
extern const UCHAR valid_al_pa[];extern const int number_of_al_pa;#define FCP_RESID_UNDER 0x80000#define FCP_RESID_OVER 0x40000#define FCP_SNS_LEN_VALID 0x20000#define FCP_RSP_LEN_VALID 0x10000// RSP_CODE definitions (dpANS Fibre Channel Protocol for SCSI, pg 34)#define FCP_DATA_LEN_NOT_BURST_LEN 0x1000000#define FCP_CMND_FIELD_INVALID 0x2000000#define FCP_DATA_RO_NOT_XRDY_RO 0x3000000#define FCP_TASKFUNCTION_NS 0x4000000#define FCP_TASKFUNCTION_FAIL 0x5000000// FCP-SCSI response status structtypedef struct // see "TachFCHDR_RSP" definition - 64 bytes{ __u32 reserved; __u32 reserved1; __u32 fcp_status; // field validity and SCSI status __u32 fcp_resid; __u32 fcp_sns_len; // length of FCP_SNS_INFO field __u32 fcp_rsp_len; // length of FCP_RSP_INFO field (expect 8) __u32 fcp_rsp_info; // 4 bytes of FCP protocol response information __u32 fcp_rsp_info2; // (4 more bytes, since most implementations use 8) __u8 fcp_sns_info[36]; // bytes for SCSI sense (ASC, ASCQ)} FCP_STATUS_RESPONSE, *PFCP_STATUS_RESPONSE;// Fabric State Change Registrationtypedef struct scrpl{ __u32 command; __u32 function;} SCR_PL;// Fabric Name Service Requesttypedef struct nsrpl{ __u32 CT_Rev; // (& IN_ID) WORD 0 __u32 FCS_Type; // WORD 1 __u32 Command_code; // WORD 2 __u32 reason_code; // WORD 3 __u32 FCP; // WORD 4 (lower byte) } NSR_PL;// "FC.H"#define MAX_RX_SIZE 0x800 // Max Receive Buffer Size is 2048#define MIN_RX_SIZE 0x100 // Min Size is 256, per FC-PLDA Spec#define MAX_TARGET_RXIDS SEST_DEPTH#define TARGET_RX_SIZE SEST_BUFFER_LENGTH#define CLASS_1 0x01#define CLASS_2 0x02#define CLASS_3 0x03#define FC_PH42 0x08#define FC_PH43 0x09#define FC_PH3 0x20#define RR_TOV 2 // Minimum Time for target to wait for // PDISC after a LIP.#define E_D_TOV 2 // Minimum Time to wait for Sequence // Completion.#define R_A_TOV 0 // Minimum Time for Target to wait // before reclaiming resources.//// R_CTL Field//// Routing Bits (31-28)//#define FC4_DEVICE_DATA 0x00000000#define EXT_LINK_DATA 0x20000000#define FC4_LINK_DATA 0x30000000#define VIDEO_DATA 0x40000000#define BASIC_LINK_DATA 0x80000000#define LINK_CONTROL 0xC0000000#define ROUTING_MASK 0xF0000000//// Information Bits (27-24)//#define UNCAT_INFORMATION 0x00000000#define SOLICITED_DATA 0x01000000#define UNSOLICITED_CONTROL 0x02000000#define SOLICITED_CONTROL 0x03000000#define UNSOLICITED_DATA 0x04000000#define DATA_DESCRIPTOR 0x05000000#define UNSOLICITED_COMMAND 0x06000000#define COMMAND_STATUS 0x07000000#define INFO_MASK 0x0F000000//// (Link Control Codes)//#define ACK_1 0x00000000#define ACK_0_OR_N 0x01000000#define P_RJT 0x02000000 #define F_RJT 0x03000000 #define P_BSY 0x04000000#define FABRIC_BUSY_TO_DF 0x05000000 // Fabric Busy to Data Frame#define FABRIC_BUSY_TO_LC 0x06000000 // Fabric Busy to Link Ctl Frame#define LINK_CREDIT_RESET 0x07000000//// (Link Service Command Codes)////#define LS_RJT 0x01000000 // LS Reject#define LS_ACC 0x02000000 // LS Accept#define LS_PLOGI 0x03000000 // N_PORT Login#define LS_FLOGI 0x04000000 // F_PORT Login#define LS_LOGO 0x05000000 // Logout#define LS_ABTX 0x06000000 // Abort Exchange#define LS_RCS 0x07000000 // Read Connection Status#define LS_RES 0x08000000 // Read Exchange Status#define LS_RSS 0x09000000 // Read Sequence Status#define LS_RSI 0x0A000000 // Request Seq Initiative#define LS_ESTS 0x0B000000 // Establish Steaming#define LS_ESTC 0x0C000000 // Estimate Credit#define LS_ADVC 0x0D000000 // Advice Credit#define LS_RTV 0x0E000000 // Read Timeout Value#define LS_RLS 0x0F000000 // Read Link Status#define LS_ECHO 0x10000000 // Echo#define LS_TEST 0x11000000 // Test#define LS_RRQ 0x12000000 // Reinstate Rec. Qual.#define LS_PRLI 0x20000000 // Process Login#define LS_PRLO 0x21000000 // Process Logout#define LS_TPRLO 0x24000000 // 3rd Party Process Logout#define LS_PDISC 0x50000000 // Process Discovery#define LS_FDISC 0x51000000 // Fabric Discovery#define LS_ADISC 0x52000000 // Discover Address#define LS_RNC 0x53000000 // Report Node Capability#define LS_SCR 0x62000000 // State Change Registration#define LS_MASK 0xFF000000 //// TYPE Bit Masks//#define BASIC_LINK_SERVICE 0x00000000#define EXT_LINK_SERVICE 0x01000000#define LLC 0x04000000#define LLC_SNAP 0x05000000#define SCSI_FCP 0x08000000#define SCSI_GPP 0x09000000#define IPI3_MASTER 0x11000000#define IPI3_SLAVE 0x12000000#define IPI3_PEER 0x13000000#define CP_IPI3_MASTER 0x15000000#define CP_IPI3_SLAVE 0x16000000#define CP_IPI3_PEER 0x17000000#define SBCCS_CHANNEL 0x19000000#define SBCCS_CONTROL 0x1A000000#define FIBRE_SERVICES 0x20000000#define FC_FG 0x21000000#define FC_XS 0x22000000#define FC_AL 0x23000000#define SNMP 0x24000000#define HIPPI_FP 0x40000000#define TYPE_MASK 0xFF000000typedef struct { UCHAR seq_id_valid; UCHAR seq_id; USHORT reserved; // 2 bytes reserved ULONG ox_rx_id; USHORT low_seq_cnt; USHORT high_seq_cnt;} BA_ACC_PAYLOAD;typedef struct { UCHAR reserved; UCHAR reason_code; UCHAR reason_explain; UCHAR vendor_unique;} BA_RJT_PAYLOAD;typedef struct { ULONG command_code; ULONG sid; USHORT ox_id; USHORT rx_id;} RRQ_MESSAGE;typedef struct { ULONG command_code; UCHAR vendor; UCHAR explain; UCHAR reason; UCHAR reserved;} REJECT_MESSAGE;#define N_OR_F_PORT 0x1000#define RANDOM_RELATIVE_OFFSET 0x4000#define CONTINUOSLY_INCREASING 0x8000#define CLASS_VALID 0x8000#define INTERMIX_MODE 0x4000#define TRANSPARENT_STACKED 0x2000#define LOCKDOWN_STACKED 0x1000#define SEQ_DELIVERY 0x800#define XID_NOT_SUPPORTED 0x00#define XID_SUPPORTED 0x4000#define XID_REQUIRED 0xC000#define ASSOCIATOR_NOT_SUPPORTED 0x00#define ASSOCIATOR_SUPPORTED 0x1000#define ASSOCIATOR_REQUIRED 0x3000#define INIT_ACK0_SUPPORT 0x800#define INIT_ACKN_SUPPORT 0x400#define RECIP_ACK0_SUPPORT 0x8000#define RECIP_ACKN_SUPPORT 0x4000#define X_ID_INTERLOCK 0x2000#define ERROR_POLICY 0x1800 // Error Policy Supported#define ERROR_DISCARD 0x00 // Only Discard Supported#define ERROR_DISC_PROCESS 0x02 // Discard and process supported#define NODE_ID 0x01#define IEEE_EXT 0x20//// Categories Supported Per Sequence//#define CATEGORIES_PER_SEQUENCE 0x300#define ONE_CATEGORY_SEQUENCE 0x00 // 1 Category per Sequence#define TWO_CATEGORY_SEQUENCE 0x01 // 2 Categories per Sequence#define MANY_CATEGORY_SEQUENCE 0x03 // > 2 Categories/Sequencetypedef struct { USHORT initiator_control; USHORT service_options; USHORT rx_data_size; USHORT recipient_control; USHORT ee_credit; USHORT concurrent_sequences; USHORT reserved; USHORT open_sequences;} CLASS_PARAMETERS;typedef struct { ULONG login_cmd; // // Common Service Parameters // struct { USHORT bb_credit; UCHAR lowest_ver; UCHAR highest_ver; USHORT bb_rx_size; USHORT common_features; USHORT rel_offset; USHORT concurrent_seq; ULONG e_d_tov; } cmn_services; // // Port Name // UCHAR port_name[8]; // // Node/Fabric Name // UCHAR node_name[8]; // // Class 1, 2 and 3 Service Parameters // CLASS_PARAMETERS class1; CLASS_PARAMETERS class2; CLASS_PARAMETERS class3; ULONG reserved[4]; // // Vendor Version Level // UCHAR vendor_id[2]; UCHAR vendor_version[6]; ULONG buffer_size; USHORT rxid_start; USHORT total_rxids;} LOGIN_PAYLOAD;typedef struct{ ULONG cmd; // 4 bytes UCHAR n_port_identifier[3]; UCHAR reserved; UCHAR port_name[8];} LOGOUT_PAYLOAD;//// PRLI Request Service Parameter Defines//#define PRLI_ACC 0x01#define PRLI_REQ 0x02#define ORIG_PROCESS_ASSOC_VALID 0x8000#define RESP_PROCESS_ASSOC_VALID 0x4000#define ESTABLISH_PAIR 0x2000#define DATA_OVERLAY_ALLOWED 0x40#define INITIATOR_FUNCTION 0x20#define TARGET_FUNCTION 0x10#define CMD_DATA_MIXED 0x08#define DATA_RESP_MIXED 0x04#define READ_XFER_RDY 0x02#define WRITE_XFER_RDY 0x01#define RESPONSE_CODE_MASK 0xF00#define REQUEST_EXECUTED 0x100#define NO_RESOURCES 0x200#define INIT_NOT_COMPLETE 0x300#define IMAGE_DOES_NOT_EXIST 0x400#define BAD_PREDEFINED_COND 0x500#define REQ_EXEC_COND 0x600#define NO_MULTI_PAGE 0x700typedef struct { USHORT payload_length; UCHAR page_length; UCHAR cmd; ULONG valid; ULONG orig_process_associator; ULONG resp_process_associator; ULONG fcp_info;} PRLI_REQUEST;typedef struct { USHORT payload_length; UCHAR page_length; UCHAR cmd; ULONG valid; ULONG orig_process_associator; ULONG resp_process_associator; ULONG reserved;} PRLO_REQUEST;typedef struct { ULONG cmd; ULONG hard_address; UCHAR port_name[8]; UCHAR node_name[8]; ULONG s_id;} ADISC_PAYLOAD;// J. McCarty's LINK.H//// LS_RJT Reason Codes//#define INVALID_COMMAND_CODE 0x01#define LOGICAL_ERROR 0x03#define LOGICAL_BUSY 0x05#define PROTOCOL_ERROR 0x07#define UNABLE_TO_PERFORM 0x09#define COMMAND_NOT_SUPPORTED 0x0B#define LS_VENDOR_UNIQUE 0xFF//// LS_RJT Reason Codes Explanations//#define NO_REASON 0x00#define OPTIONS_ERROR 0x01#define INITIATOR_CTL_ERROR 0x03#define RECIPIENT_CTL_ERROR 0x05#define DATA_FIELD_SIZE_ERROR 0x07#define CONCURRENT_SEQ_ERROR 0x09#define CREDIT_ERROR 0x0B#define INVALID_PORT_NAME 0x0D#define INVALID_NODE_NAME 0x0E#define INVALID_CSP 0x0F // Invalid Service Parameters#define INVALID_ASSOC_HDR 0x11 // Invalid Association Header#define ASSOC_HDR_REQUIRED 0x13 // Association Header Required#define LS_INVALID_S_ID 0x15#define INVALID_OX_RX_ID 0x17 // Invalid OX_ID RX_ID Combination#define CMD_IN_PROCESS 0x19#define INVALID_IDENTIFIER 0x1F // Invalid N_PORT Identifier#define INVALID_SEQ_ID 0x21#define ABT_INVALID_XCHNG 0x23 // Attempt to Abort an invalid Exchange#define ABT_INACTIVE_XCHNG 0x25 // Attempt to Abort an inactive Exchange#define NEED_REC_QUAL 0x27 // Recovery Qualifier required#define NO_LOGIN_RESOURCES 0x29 // No resources to support login#define NO_DATA 0x2A // Unable to supply requested data#define REQUEST_NOT_SUPPORTED 0x2C // Request Not Supported//// Link Control Codes////// P_BSY Action Codes//#define SEQUENCE_TERMINATED 0x01000000#define SEQUENCE_ACTIVE 0x02000000//// P_BSY Reason Codes//#define PHYS_NPORT_BUSY 0x010000#define NPORT_RESOURCE_BUSY 0x020000//// P_RJT, F_RJT Action Codes//#define RETRYABLE_ERROR 0x01000000#define NON_RETRYABLE_ERROR 0x02000000//// P_RJT, F_RJT Reason Codes//#define INVALID_D_ID 0x010000#define INVALID_S_ID 0x020000#define NPORT_NOT_AVAIL_TMP 0x030000#define NPORT_NOT_AVAIL_PERM 0x040000#define CLASS_NOT_SUPPORTED 0x050000#define USAGE_ERROR 0x060000#define TYPE_NOT_SUPPORTED 0x070000#define INVAL_LINK_CONTROL 0x080000#define INVAL_R_CTL 0x090000#define INVAL_F_CTL 0x0A0000#define INVAL_OX_ID 0x0B0000#define INVAL_RX_ID 0x0C0000#define INVAL_SEQ_ID 0x0D0000#define INVAL_DF_CTL 0x0E0000#define INVAL_SEQ_CNT 0x0F0000#define INVAL_PARAMS 0x100000#define EXCHANGE_ERROR 0x110000#define LS_PROTOCOL_ERROR 0x120000#define INCORRECT_LENGTH 0x130000#define UNEXPECTED_ACK 0x140000#define LOGIN_REQ 0x160000#define EXCESSIVE_SEQ 0x170000#define NO_EXCHANGE 0x180000#define SEC_HDR_NOT_SUPPORTED 0x190000#define NO_FABRIC 0x1A0000#define P_VENDOR_UNIQUE 0xFF0000//// BA_RJT Reason Codes//#define BA_INVALID_COMMAND 0x00010000#define BA_LOGICAL_ERROR 0x00030000#define BA_LOGICAL_BUSY 0x00050000#define BA_PROTOCOL_ERROR 0x00070000#define BA_UNABLE_TO_PERFORM 0x00090000//// BA_RJT Reason Explanation Codes//#define BA_NO_REASON 0x00000000#define BA_INVALID_OX_RX 0x00000300#define BA_SEQUENCE_ABORTED 0x00000500#endif /* CPQFCTSSTRUCTS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -