ib_pkt_hdrs.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_IB_IB_PKT_HDRS_H
#define _SYS_IB_IB_PKT_HDRS_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _ib_lrh_hdr_t {
/* link level protocol of pkt */
/* & headers following LRH */
} ib_lrh_hdr_t;
/* defines and masks that go with local routing header */
#define IB_LRH_VL_MASK 0xF0
#define IB_LRH_VERSION_MASK 0x0F
#define IB_LRH_SL_MASK 0xF0
#define IB_LRH_NEXT_HDR_MASK 0x03
#define IB_LRH_NEXT_HDR_RWH 0x00
#define IB_LRH_NEXT_HDR_IPV6 0x01
#define IB_LRH_NEXT_HDR_BTH 0x02
#define IB_LRH_NEXT_HDR_GRH 0x03
#define IB_LRH_PACKET_LENGTH_MASK 0x07FF
typedef struct _ib_grh_t {
/* flow label of the packet */
} ib_grh_t;
/* defines and masks that go with global route header */
#define IB_GRH_IPVER_MASK 0xF0000000
#define IB_GRH_TCLASS_MASK 0x0FF00000
#define IB_GRH_FLOW_LABEL_MASK 0x000FFFFF
#define IB_GRH_NEXT_HDR_BTH 0x1B
typedef struct _ib_bth_hdr_t {
/* & migration state & payload pad count */
/* & version of ibta transport headers */
/* packet sequence number */
} ib_bth_hdr_t;
/* defines and masks that go with base transport header */
#define IB_BTH_SOLICITED_EVENT_MASK 0x80
#define IB_BTH_MIG_REQ_MASK 0x40
#define IB_BTH_PAD_CNT_MASK 0x30
#define IB_BTH_TVER_MASK 0x0F
#define IB_BTH_DEST_QP_MASK 0x00FFFFFF
#define IB_BTH_ACK_REQ_MASK 0x80000000
#define IB_BTH_PSN_MASK 0x00FFFFFF
typedef struct _ib_deth_hdr_t {
#define IB_DETH_SRC_QP_MASK 0x00FFFFFF
/* defines and masks that go with datagram extended transport header */
#define IB_DETH_SRC_QP_MASK 0x00FFFFFF
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_IB_PKT_HDRS_H */