/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_IB_MGT_SM_ATTR_H
#define _SYS_IB_MGT_SM_ATTR_H
/*
* This file contains the definitions of the various attributes specified
* in IB spec volume 1, release 1.1, chapter 14.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* LID routed smp class header
*/
typedef struct sm_lid_class_hdr_s {
/*
* Directed route smp mad header
*/
typedef struct sm_dr_mad_hdr_s {
/* Common MAD Header1: 4 bytes, bytes 0-3 of header */
/* perform based on mgmtclass */
/* Common MAD Header2: 16 bytes, bytes 8-23 of header */
/* Direction bit */
/*
* Direct route smp class header:
*/
typedef struct sm_dr_class_hdr_s {
typedef struct sm_dr_data_s {
} sm_dr_data_t;
/* Traps: Table 118 */
/*
* Notice Data details for various sm traps
*/
/* Traps 64, 65, 66,and 67: Table 119 */
typedef struct sm_trap_64_s {
} sm_trap_64_t;
/* Trap 128: Table 120 */
typedef struct sm_trap_128_s {
/* Traps 129, 130, and 131: Table 121 */
typedef struct sm_trap_129_s {
/* Trap 144: Table 122 */
typedef struct sm_trap_144_s {
/* Trap 145: Table 123 */
typedef struct sm_trap_145_s {
/* Trap 256: Table 124 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_trap_256_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_trap_256_s {
#else
#endif /* _BIT_FIELDS_HTOL */
/* Traps 257 and 258: Table 125 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_trap_257_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_trap_257_s {
#else
#endif /* _BIT_FIELDS_HTOL */
/* Trap 259: Table 126 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_trap_259_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_trap_259_s {
#else
#endif /* _BIT_FIELDS_HTOL */
/*
* NodeDescription: Table 127
* NodeDescription is applicable to all ports of a node.
*/
typedef struct sm_nodedesc_s {
/*
* NodeInfo: Table 128
* The value of some NodeInfo components varies by port within a node.
*/
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_nodeinfo_s {
/* with nodes controlled by */
/* common supervisory code */
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_nodeinfo_s {
/* with nodes controlled by */
/* common supervisory code */
#else
#endif /* _BIT_FIELDS_HTOL */
/* Defines and Masks that go with NodeInfo */
/* SwitchInfo: Table 129 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_switchinfo_s {
/* not in FDB */
/* pkts from def port */
/* have DLID not in FDB */
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_switchinfo_s {
/* not in FDB */
/* pkts from def port */
/* have DLID not in FDB */
#else
#endif /* _BIT_FIELDS_HTOL */
/* Defines and Masks that go with SwitchInfo */
/* GUIDInfo: Table 130 */
typedef struct sm_guidinfo_s {
/* defines that go with guid info */
/*
* PortInfo: Table 132
* PortInfo is applicable to all ports of a node.
*/
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_portinfo_s {
/* VL arbitration table */
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_portinfo_s {
/* VL arbitration table */
#else
#endif /* _BIT_FIELDS_HTOL */
/* Defines and Masks that go with PortInfo */
/* Standard Encoding of DiagCode Bits 3-0: Table 133 */
/* MKey Protection Levels: Table 115 */
/* P_Key Table: Table 134 */
typedef struct sm_pkey_table_s {
/* P_Key Block Element: Table 135 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_pkey_block_element_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_pkey_block_element_s {
#else
#endif /* _BIT_FIELDS_HTOL */
/*
* SLtoVLMapping Table: Table 136
* Each field specifies the VL onto which packets using that SL are dropped.
*/
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_SLtoVL_mapping_table_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_SLtoVL_mapping_table_s {
#else
#endif /* _BIT_FIELDS_HTOL */
typedef struct sm_VL_weight_block_s {
/* VLArbitration Table: Table 137 */
typedef struct sm_VLarb_table_s {
/* Defines and masks that go with VLArbitrationTable & address modifier */
/* Defines that go with the linear forwarding table */
/* Linear Forwarding Table: Table 139 */
typedef struct sm_linear_forwarding_table_s {
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_lid_port_block_s {
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_lid_port_block_s {
#else
#endif /* _BIT_FIELDS_HTOL */
/* Random Forwarding Table: Table 141 */
typedef struct sm_random_forwarding_table_s {
/* Multicast Forwarding Table: Table 143 */
typedef struct sm_multicast_forwarding_table_s {
/*
* SMInfo: Table 145
* SMInfo struct is applicable to all end ports hosting an SM
*/
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_sminfo_s {
} sm_sminfo_t;
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_sminfo_s {
} sm_sminfo_t;
#else
#endif /* _BIT_FIELDS_HTOL */
/* defines that go with the sminfo structure */
/* SMState Defines */
#define SM_SMSTATE_INACTIVE 0
/* SMInfo Control Packets: Table 148 */
/* attribute ID defines */
/* VendorDiag: Table 146 */
typedef struct sm_vendor_diag_s {
/* LedInfo: Table 147 */
#if defined(_BIT_FIELDS_HTOL)
typedef struct sm_ledinfo_s {
} sm_ledinfo_t;
#elif defined(_BIT_FIELDS_LTOH)
typedef struct sm_ledinfo_s {
} sm_ledinfo_t;
#else
#endif /* _BIT_FIELDS_HTOL */
/* LED Info Defines */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_MGT_SM_ATTR_H */