2 * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer,
10 * without modification.
11 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12 * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
13 * redistribution must be conditioned upon including a substantially
14 * similar Disclaimer requirement for further binary redistribution.
15 * 3. Neither the names of the above-listed copyright holders nor the names
16 * of any contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
19 * Alternatively, this software may be distributed under the terms of the
20 * GNU General Public License ("GPL") version 2 as published by the Free
21 * Software Foundation.
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
27 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
28 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
29 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
32 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
34 * THE POSSIBILITY OF SUCH DAMAGES.
36 * $Id: //depot/sw/branches/fusion_usb/target_firmware/wlan/target/madwifi/net80211/if_llc.h#1 $
37 * $NetBSD: if_llc.h,v 1.12 1999/11/19 20:41:19 thorpej Exp $
38 * $Id: //depot/sw/branches/fusion_usb/target_firmware/wlan/target/madwifi/net80211/if_llc.h#1 $
42 * Copyright (c) 1988, 1993
43 * The Regents of the University of California. All rights reserved.
45 * Redistribution and use in source and binary forms, with or without
46 * modification, are permitted provided that the following conditions
48 * 1. Redistributions of source code must retain the above copyright
49 * notice, this list of conditions and the following disclaimer.
50 * 2. Redistributions in binary form must reproduce the above copyright
51 * notice, this list of conditions and the following disclaimer in the
52 * documentation and/or other materials provided with the distribution.
53 * 3. All advertising materials mentioning features or use of this software
54 * must display the following acknowledgement:
55 * This product includes software developed by the University of
56 * California, Berkeley and its contributors.
57 * 4. Neither the name of the University nor the names of its contributors
58 * may be used to endorse or promote products derived from this software
59 * without specific prior written permission.
61 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
62 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
63 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
64 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
65 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
66 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
67 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
68 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
69 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
70 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
73 * @(#)if_llc.h 8.1 (Berkeley) 6/10/93
74 * $FreeBSD: src/sys/net/if_llc.h,v 1.9 2002/09/23 06:25:08 alfred Exp $
77 #ifndef _NET_IF_LLC_H_
78 #define _NET_IF_LLC_H_
81 * IEEE 802.2 Link Level Control headers, for use in conjunction with
82 * 802.{3,4,5} media access control methods.
84 * Headers here do not use bit fields due to shortcommings in many
97 } type_u adf_os_packed;
100 a_uint8_t num_rcv_x2;
101 } type_i adf_os_packed;
104 a_uint8_t num_rcv_x2;
105 } type_s adf_os_packed;
109 * We cannot put the following fields in a structure because
110 * the structure rounding might cause padding.
112 a_uint8_t frmr_rej_pdu0;
113 a_uint8_t frmr_rej_pdu1;
114 a_uint8_t frmr_control;
115 a_uint8_t frmr_control_ext;
116 a_uint8_t frmr_cause;
117 } type_frmr adf_os_packed;
120 a_uint8_t org_code[3];
121 a_uint16_t ether_type;
122 } type_snap adf_os_packed;
125 a_uint8_t control_ext;
126 } type_raw adf_os_packed;
127 } llc_un /* XXX adf_os_packed ??? */;
131 a_uint8_t frmr_rej_pdu0;
132 a_uint8_t frmr_rej_pdu1;
133 a_uint8_t frmr_control;
134 a_uint8_t frmr_control_ext;
135 a_uint8_t frmr_cause;
138 #define llc_control llc_un.type_u.control
139 #define llc_control_ext llc_un.type_raw.control_ext
140 #define llc_fid llc_un.type_u.format_id
141 #define llc_class llc_un.type_u.class
142 #define llc_window llc_un.type_u.window_x2
143 #define llc_frmrinfo llc_un.type_frmr.frmr_rej_pdu0
144 #define llc_frmr_pdu0 llc_un.type_frmr.frmr_rej_pdu0
145 #define llc_frmr_pdu1 llc_un.type_frmr.frmr_rej_pdu1
146 #define llc_frmr_control llc_un.type_frmr.frmr_control
147 #define llc_frmr_control_ext llc_un.type_frmr.frmr_control_ext
148 #define llc_frmr_cause llc_un.type_frmr.frmr_cause
149 #define llc_snap llc_un.type_snap
152 * Don't use sizeof(struct llc_un) for LLC header sizes
154 #define LLC_ISFRAMELEN 4
155 #define LLC_UFRAMELEN 3
156 #define LLC_FRMRLEN 7
157 #define LLC_SNAPFRAMELEN 8
160 * Unnumbered LLC format commands
163 #define LLC_UI_P 0x13
164 #define LLC_DISC 0x43
165 #define LLC_DISC_P 0x53
167 #define LLC_UA_P 0x73
168 #define LLC_TEST 0xe3
169 #define LLC_TEST_P 0xf3
170 #define LLC_FRMR 0x87
171 #define LLC_FRMR_P 0x97
173 #define LLC_DM_P 0x1f
175 #define LLC_XID_P 0xbf
176 #define LLC_SABME 0x6f
177 #define LLC_SABME_P 0x7f
180 * Supervisory LLC commands
187 * Info format - dummy only
189 #define LLC_INFO 0x00
192 * ISO PDTR 10178 contains among others
194 #define LLC_X25_LSAP 0x7e
195 #define LLC_SNAP_LSAP 0xaa
196 #define LLC_ISO_LSAP 0xfe
198 #endif /* _NET_IF_LLC_H_ */