xref: /aosp_15_r20/external/libpcap/llc.h (revision 8b26181f966a6af5cf6981a6f474313de533bb28)
1*8b26181fSAndroid Build Coastguard Worker /*
2*8b26181fSAndroid Build Coastguard Worker  * Copyright (c) 1993, 1994, 1997
3*8b26181fSAndroid Build Coastguard Worker  *	The Regents of the University of California.  All rights reserved.
4*8b26181fSAndroid Build Coastguard Worker  *
5*8b26181fSAndroid Build Coastguard Worker  * Redistribution and use in source and binary forms, with or without
6*8b26181fSAndroid Build Coastguard Worker  * modification, are permitted provided that: (1) source code distributions
7*8b26181fSAndroid Build Coastguard Worker  * retain the above copyright notice and this paragraph in its entirety, (2)
8*8b26181fSAndroid Build Coastguard Worker  * distributions including binary code include the above copyright notice and
9*8b26181fSAndroid Build Coastguard Worker  * this paragraph in its entirety in the documentation or other materials
10*8b26181fSAndroid Build Coastguard Worker  * provided with the distribution, and (3) all advertising materials mentioning
11*8b26181fSAndroid Build Coastguard Worker  * features or use of this software display the following acknowledgement:
12*8b26181fSAndroid Build Coastguard Worker  * ``This product includes software developed by the University of California,
13*8b26181fSAndroid Build Coastguard Worker  * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14*8b26181fSAndroid Build Coastguard Worker  * the University nor the names of its contributors may be used to endorse
15*8b26181fSAndroid Build Coastguard Worker  * or promote products derived from this software without specific prior
16*8b26181fSAndroid Build Coastguard Worker  * written permission.
17*8b26181fSAndroid Build Coastguard Worker  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18*8b26181fSAndroid Build Coastguard Worker  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19*8b26181fSAndroid Build Coastguard Worker  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20*8b26181fSAndroid Build Coastguard Worker  */
21*8b26181fSAndroid Build Coastguard Worker 
22*8b26181fSAndroid Build Coastguard Worker /*
23*8b26181fSAndroid Build Coastguard Worker  * Definitions for information in the LLC header.
24*8b26181fSAndroid Build Coastguard Worker  */
25*8b26181fSAndroid Build Coastguard Worker 
26*8b26181fSAndroid Build Coastguard Worker #define	LLC_U_FMT	3
27*8b26181fSAndroid Build Coastguard Worker #define	LLC_GSAP	1
28*8b26181fSAndroid Build Coastguard Worker #define	LLC_IG	        1 /* Individual / Group */
29*8b26181fSAndroid Build Coastguard Worker #define LLC_S_FMT	1
30*8b26181fSAndroid Build Coastguard Worker 
31*8b26181fSAndroid Build Coastguard Worker #define	LLC_U_POLL	0x10
32*8b26181fSAndroid Build Coastguard Worker #define	LLC_IS_POLL	0x0100
33*8b26181fSAndroid Build Coastguard Worker #define	LLC_XID_FI	0x81
34*8b26181fSAndroid Build Coastguard Worker 
35*8b26181fSAndroid Build Coastguard Worker #define LLC_U_CMD_MASK	0xef
36*8b26181fSAndroid Build Coastguard Worker #define	LLC_UI		0x03
37*8b26181fSAndroid Build Coastguard Worker #define	LLC_UA		0x63
38*8b26181fSAndroid Build Coastguard Worker #define	LLC_DISC	0x43
39*8b26181fSAndroid Build Coastguard Worker #define	LLC_DM		0x0f
40*8b26181fSAndroid Build Coastguard Worker #define	LLC_SABME	0x6f
41*8b26181fSAndroid Build Coastguard Worker #define	LLC_TEST	0xe3
42*8b26181fSAndroid Build Coastguard Worker #define	LLC_XID		0xaf
43*8b26181fSAndroid Build Coastguard Worker #define	LLC_FRMR	0x87
44*8b26181fSAndroid Build Coastguard Worker 
45*8b26181fSAndroid Build Coastguard Worker #define LLC_S_CMD_MASK	0x0f
46*8b26181fSAndroid Build Coastguard Worker #define	LLC_RR		0x0001
47*8b26181fSAndroid Build Coastguard Worker #define	LLC_RNR		0x0005
48*8b26181fSAndroid Build Coastguard Worker #define	LLC_REJ		0x0009
49*8b26181fSAndroid Build Coastguard Worker 
50*8b26181fSAndroid Build Coastguard Worker #define LLC_IS_NR(is)	(((is) >> 9) & 0x7f)
51*8b26181fSAndroid Build Coastguard Worker #define LLC_I_NS(is)	(((is) >> 1) & 0x7f)
52*8b26181fSAndroid Build Coastguard Worker 
53*8b26181fSAndroid Build Coastguard Worker /*
54*8b26181fSAndroid Build Coastguard Worker  * 802.2 LLC SAP values.
55*8b26181fSAndroid Build Coastguard Worker  */
56*8b26181fSAndroid Build Coastguard Worker 
57*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_NULL
58*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_NULL		0x00
59*8b26181fSAndroid Build Coastguard Worker #endif
60*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_GLOBAL
61*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_GLOBAL		0xff
62*8b26181fSAndroid Build Coastguard Worker #endif
63*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_8021B_I
64*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_8021B_I		0x02
65*8b26181fSAndroid Build Coastguard Worker #endif
66*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_8021B_G
67*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_8021B_G		0x03
68*8b26181fSAndroid Build Coastguard Worker #endif
69*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_IP
70*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_IP		0x06
71*8b26181fSAndroid Build Coastguard Worker #endif
72*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_PROWAYNM
73*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_PROWAYNM		0x0e
74*8b26181fSAndroid Build Coastguard Worker #endif
75*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_8021D
76*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_8021D		0x42
77*8b26181fSAndroid Build Coastguard Worker #endif
78*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_RS511
79*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_RS511		0x4e
80*8b26181fSAndroid Build Coastguard Worker #endif
81*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_ISO8208
82*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_ISO8208		0x7e
83*8b26181fSAndroid Build Coastguard Worker #endif
84*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_PROWAY
85*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_PROWAY		0x8e
86*8b26181fSAndroid Build Coastguard Worker #endif
87*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_SNAP
88*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_SNAP		0xaa
89*8b26181fSAndroid Build Coastguard Worker #endif
90*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_IPX
91*8b26181fSAndroid Build Coastguard Worker #define LLCSAP_IPX		0xe0
92*8b26181fSAndroid Build Coastguard Worker #endif
93*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_NETBEUI
94*8b26181fSAndroid Build Coastguard Worker #define LLCSAP_NETBEUI		0xf0
95*8b26181fSAndroid Build Coastguard Worker #endif
96*8b26181fSAndroid Build Coastguard Worker #ifndef LLCSAP_ISONS
97*8b26181fSAndroid Build Coastguard Worker #define	LLCSAP_ISONS		0xfe
98*8b26181fSAndroid Build Coastguard Worker #endif
99