2 * IEEE 802.2 Link Level Control.
5 /* $NetBSD: if_llc.h,v 1.9 1997/05/02 21:08:54 christos Exp $ */
8 * Copyright (c) 1988, 1993
9 * The Regents of the University of California. All rights reserved.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgement:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * @(#)if_llc.h 8.1 (Berkeley) 6/10/93
41 #ifndef __NET_IF_LLC_H
42 #define __NET_IF_LLC_H
45 * IEEE 802.2 Link Level Control headers, for use in conjunction with
46 * 802.{3,4,5} media access control methods.
48 * Headers here do not use bit fields due to shortcommings in many
52 #include <sys/packon.h>
75 * We cannot put the following fields in a structure because
76 * the structure rounding might cause padding.
78 u_int8_t frmr_rej_pdu0;
79 u_int8_t frmr_rej_pdu1;
80 u_int8_t frmr_control;
81 u_int8_t frmr_control_ext;
97 u_int8_t frmr_rej_pdu0;
98 u_int8_t frmr_rej_pdu1;
99 u_int8_t frmr_control;
100 u_int8_t frmr_control_ext;
104 #include <sys/packoff.h>
106 #define llc_control llc_un.type_u.control
107 #define llc_control_ext llc_un.type_raw.control_ext
108 #define llc_fid llc_un.type_u.format_id
109 #define llc_class llc_un.type_u.class
110 #define llc_window llc_un.type_u.window_x2
111 #define llc_frmrinfo llc_un.type_frmr.frmr_rej_pdu0
112 #define llc_frmr_pdu0 llc_un.type_frmr.frmr_rej_pdu0
113 #define llc_frmr_pdu1 llc_un.type_frmr.frmr_rej_pdu1
114 #define llc_frmr_control llc_un.type_frmr.frmr_control
115 #define llc_frmr_control_ext llc_un.type_frmr.frmr_control_ext
116 #define llc_frmr_cause llc_un.type_frmr.frmr_cause
119 * Don't use sizeof(struct llc_un) for LLC header sizes
121 #define LLC_ISFRAMELEN 4
122 #define LLC_UFRAMELEN 3
123 #define LLC_FRMRLEN 7
126 * Unnumbered LLC format commands
129 #define LLC_UI_P 0x13
130 #define LLC_DISC 0x43
131 #define LLC_DISC_P 0x53
133 #define LLC_UA_P 0x73
134 #define LLC_TEST 0xe3
135 #define LLC_TEST_P 0xf3
136 #define LLC_FRMR 0x87
137 #define LLC_FRMR_P 0x97
139 #define LLC_DM_P 0x1f
141 #define LLC_XID_P 0xbf
142 #define LLC_SABME 0x6f
143 #define LLC_SABME_P 0x7f
146 * Supervisory LLC commands
153 * Info format - dummy only
155 #define LLC_INFO 0x00
158 * ISO PDTR 10178 contains among others
160 #define LLC_X25_LSAP 0x7e
161 #define LLC_SNAP_LSAP 0xaa
162 #define LLC_ISO_LSAP 0xfe