docs/how-to-build.md: use proper markup for directory names
[unleashed/tickless.git] / include / sys / mac_ib.h
blob79c802d7f539a20d5f977724f9e597a67638234c
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_MAC_ETHER_H
27 #define _SYS_MAC_ETHER_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
32 * Ethernet MAC Plugin
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 #ifdef _KERNEL
41 #define MAC_PLUGIN_IDENT_IB "mac_ib"
43 #define MAC_IB_MAX_802_SAP 255
44 #define MAC_IB_ETHERTYPE_MAX 65535
45 #define MAC_IB_GID_SIZE 10
46 #define MAC_IB_BROADCAST_GID 0xFFFFFFFF
49 * In order to transmit the datagram to correct destination, an extra
50 * header including destination address is required. IB does not provide an
51 * interface for sending a link layer header directly to the IB link and the
52 * link layer header received from the IB link is missing information that
53 * GLDv3 requires. So mac_ib plugin defines a "soft" header as below.
55 typedef struct ib_addrs {
56 ipoib_mac_t ipib_src;
57 ipoib_mac_t ipib_dst;
58 } ib_addrs_t;
60 typedef struct ib_header_info {
61 union {
62 ipoib_pgrh_t ipib_grh;
63 ib_addrs_t ipib_addrs;
64 } ipib_prefix;
65 ipoib_hdr_t ipib_rhdr;
66 } ib_header_info_t;
68 #define ib_dst ipib_prefix.ipib_addrs.ipib_dst
69 #define ib_src ipib_prefix.ipib_addrs.ipib_src
70 #define ib_grh ipib_prefix.ipib_grh
72 #endif /* _KERNEL */
74 #ifdef __cplusplus
76 #endif
78 #endif /* _SYS_MAC_ETHER_H */