#ifndef _SYS_IB_MGT_IB_DM_ATTR_H
#define _SYS_IB_MGT_IB_DM_ATTR_H
#ifdef __cplusplus
extern "C" {
#endif
#define IB_DM_DEVMGT_METHOD_GET 0x01
#define IB_DM_DEVMGT_METHOD_SET 0x02
#define IB_DM_DEVMGT_METHOD_GET_RESP 0x81
#define IB_DM_DEVMGT_METHOD_TRAP 0x05
#define IB_DM_DEVMGT_METHOD_TRAP_REPRESS 0x07
#define IB_DM_CLASS_VERSION_1 0x1
#define IB_DM_DEVMGT_MAD_STAT_NORESP 0x0100
#define IB_DM_DEVMGT_MAD_STAT_NOSVC_ENTRIES 0x0200
#define IB_DM_DEVMGT_MAD_STAT_GEN_FAILURE 0x8000
#define IB_DM_ATTR_CLASSPORTINFO 0x1
#define IB_DM_ATTR_NOTICE 0x2
#define IB_DM_ATTR_IO_UNITINFO 0x10
#define IB_DM_ATTR_IOC_CTRL_PROFILE 0x11
#define IB_DM_ATTR_SERVICE_ENTRIES 0x12
#define IB_DM_ATTR_DIAG_TIMEOUT 0x20
#define IB_DM_ATTR_PREPARE_TO_TEST 0x21
#define IB_DM_ATTR_TEST_DEV_ONCE 0x22
#define IB_DM_ATTR_TEST_DEV_LOOP 0x23
#define IB_DM_ATTR_DIAG_CODE 0x24
#define IB_DM_MAX_IOCS_IN_IOU 256
typedef struct ib_dm_io_unitinfo_s {
uint16_t iou_changeid;
uint8_t iou_num_ctrl_slots;
uint8_t iou_flag;
uint8_t iou_ctrl_list[128];
} ib_dm_io_unitinfo_t;
#define IB_DM_IOU_OPTIONROM_ABSENT 0x0
#define IB_DM_IOU_OPTIONROM_PRESENT 0x1
#define IB_DM_IOU_OPTIONROM_MASK 0x1
#define IB_DM_IOU_DEVICEID_MASK 0x2
#define IB_DM_IOC_ID_STRING_LEN 64
#define IB_DM_VENDORID_MASK 0xFFFFFF00
#define IB_DM_VENDORID_SHIFT 8
typedef struct ib_dm_ioc_ctrl_profile_s {
ib_guid_t ioc_guid;
uint32_t ioc_vendorid;
uint32_t ioc_deviceid;
uint16_t ioc_device_ver;
uint16_t ioc_rsvd1;
uint32_t ioc_subsys_vendorid;
uint32_t ioc_subsys_id;
uint16_t ioc_io_class;
uint16_t ioc_io_subclass;
uint16_t ioc_protocol;
uint16_t ioc_protocol_ver;
uint16_t ioc_rsvd2;
uint16_t ioc_rsvd3;
uint16_t ioc_send_msg_qdepth;
uint8_t ioc_rsvd4;
uint8_t ioc_rdma_read_qdepth;
uint32_t ioc_send_msg_sz;
uint32_t ioc_rdma_xfer_sz;
uint8_t ioc_ctrl_opcap_mask;
uint8_t ioc_rsvd5;
uint8_t ioc_service_entries;
uint8_t ioc_rsvd6[9];
uint8_t ioc_id_string[IB_DM_IOC_ID_STRING_LEN];
} ib_dm_ioc_ctrl_profile_t;
#define IB_DM_IO_CLASS_VENDOR_SPECIFIC 0xFFFF
#define IB_DM_IO_CLASS_NONE 0x00FF
#define IB_DM_IO_CLASS_STORAGE 0x10FF
#define IB_DM_IO_CLASS_NETWORK 0x20FF
#define IB_DM_IO_CLASS_VEDIO_MULTIMEDIA 0x40FF
#define IB_DM_IO_CLASS_UNKNOWN_OR_MULTIPLE 0xF0FF
#define IB_DM_IO_SUBCLASS_VENDOR_SPECIFIC 0xFFFF
#define IB_DM_CTRL_CAP_MASK_ST 0x0
#define IB_DM_CTRL_CAP_MASK_SF 0x1
#define IB_DM_CTRL_CAP_MASK_RT 0x2
#define IB_DM_CTRL_CAP_MASK_RF 0x3
#define IB_DM_CTRL_CAP_MASK_WT 0x4
#define IB_DM_CTRL_CAP_MASK_WF 0x5
#define IB_DM_CTRL_CAP_MASK_AT 0x6
#define IB_DM_CTRL_CAP_MASK_AF 0x7
#define IB_DM_CTRL_SRVC_MASK_CS 0x0
#define IB_DM_CTRL_SRVC_MASK_SBWP 0x1
#define IB_DM_CTRL_SRVC_MASK_NBWP 0x2
#define IB_DM_MAX_SVC_ENTS_PER_REQ 4
#define IB_DM_MAX_SVC_NAME_LEN 40
#define IB_DM_MAX_SVC_ENTRIES 0x100
typedef struct ib_dm_srv_s {
uint8_t srv_name[IB_DM_MAX_SVC_NAME_LEN];
ib_svc_id_t srv_id;
} ib_dm_srv_t;
#ifdef __cplusplus
}
#endif
#endif