]>
The Tcpdump Group git mirrors - tcpdump/blob - llc.h
2 * Copyright (c) 1993, 1994, 1997
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and
9 * this paragraph in its entirety in the documentation or other materials
10 * provided with the distribution, and (3) all advertising materials mentioning
11 * features or use of this software display the following acknowledgement:
12 * ``This product includes software developed by the University of California,
13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.6 1999-10-07 23:47:10 mcr Exp $ (LBL)
25 * This stuff should come from a system header file, but there's no
26 * obviously portable way to do that and it's not really going
27 * to change from system to system.
31 * A somewhat abstracted view of the LLC header
46 u_char snap_orgcode
[3];
47 u_char snap_ethertype
[2];
52 #define llcui ctl.snap.snap_ui
53 #define llcpi ctl.snap.snap_pi
54 #define orgcode ctl.snap_ether.snap_orgcode
55 #define ethertype ctl.snap_ether.snap_ethertype
56 #define llcis ctl.is_ctl
57 #define llcu ctl.u_ctl
63 #define LLC_U_POLL 0x10
64 #define LLC_IS_POLL 0x0001
65 #define LLC_XID_FI 0x81
67 #define LLC_U_CMD(u) ((u) & 0xef)
72 #define LLC_SABME 0x6f
77 #define LLC_S_CMD(is) (((is) >> 10) & 0x03)
79 #define LLC_RNR 0x0500
80 #define LLC_REJ 0x0900
82 #define LLC_IS_NR(is) (((is) >> 1) & 0x7f)
83 #define LLC_I_NS(is) (((is) >> 9) & 0x7f)
86 #define LLCSAP_NULL 0x00
89 #define LLCSAP_GLOBAL 0xff
92 #define LLCSAP_8021B_I 0x02
95 #define LLCSAP_8021B_G 0x03
98 #define LLCSAP_IP 0x06
100 #ifndef LLCSAP_PROWAYNM
101 #define LLCSAP_PROWAYNM 0x0e
104 #define LLCSAP_8021D 0x42
107 #define LLCSAP_RS511 0x4e
109 #ifndef LLCSAP_ISO8208
110 #define LLCSAP_ISO8208 0x7e
112 #ifndef LLCSAP_PROWAY
113 #define LLCSAP_PROWAY 0x8e
116 #define LLCSAP_SNAP 0xaa
119 #define LLCSAP_ISONS 0xfe