Sync usage with man page.
[netbsd-mini2440.git] / dist / tcpdump / llc.h
blob9947af04c3ef854cc2012b823a5d8c2020a62ab0
1 /* $NetBSD$ */
3 /*
4 * Copyright (c) 1993, 1994, 1997
5 * The Regents of the University of California. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that: (1) source code distributions
9 * retain the above copyright notice and this paragraph in its entirety, (2)
10 * distributions including binary code include the above copyright notice and
11 * this paragraph in its entirety in the documentation or other materials
12 * provided with the distribution, and (3) all advertising materials mentioning
13 * features or use of this software display the following acknowledgement:
14 * ``This product includes software developed by the University of California,
15 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
16 * the University nor the names of its contributors may be used to endorse
17 * or promote products derived from this software without specific prior
18 * written permission.
19 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
20 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
23 * @(#) Header: /tcpdump/master/tcpdump/llc.h,v 1.17.2.4 2007/02/08 07:07:51 guy Exp (LBL)
27 * Definitions for information in the LLC header.
30 #define LLC_U_FMT 3
31 #define LLC_GSAP 1
32 #define LLC_IG 1 /* Individual / Group */
33 #define LLC_S_FMT 1
35 #define LLC_U_POLL 0x10
36 #define LLC_IS_POLL 0x0100
37 #define LLC_XID_FI 0x81
39 #define LLC_U_CMD(u) ((u) & 0xef)
40 #define LLC_UI 0x03
41 #define LLC_UA 0x63
42 #define LLC_DISC 0x43
43 #define LLC_DM 0x0f
44 #define LLC_SABME 0x6f
45 #define LLC_TEST 0xe3
46 #define LLC_XID 0xaf
47 #define LLC_FRMR 0x87
49 #define LLC_S_CMD(is) (((is) >> 2) & 0x03)
50 #define LLC_RR 0x0001
51 #define LLC_RNR 0x0005
52 #define LLC_REJ 0x0009
54 #define LLC_IS_NR(is) (((is) >> 9) & 0x7f)
55 #define LLC_I_NS(is) (((is) >> 1) & 0x7f)
57 #ifndef LLCSAP_NULL
58 #define LLCSAP_NULL 0x00
59 #endif
60 #ifndef LLCSAP_GLOBAL
61 #define LLCSAP_GLOBAL 0xff
62 #endif
63 #ifndef LLCSAP_8021B_I
64 #define LLCSAP_8021B_I 0x02
65 #endif
66 #ifndef LLCSAP_8021B_G
67 #define LLCSAP_8021B_G 0x03
68 #endif
69 #ifndef LLCSAP_SNA
70 #define LLCSAP_SNA 0x04
71 #endif
72 #ifndef LLCSAP_IP
73 #define LLCSAP_IP 0x06
74 #endif
75 #ifndef LLCSAP_PROWAYNM
76 #define LLCSAP_PROWAYNM 0x0e
77 #endif
78 #ifndef LLCSAP_8021D
79 #define LLCSAP_8021D 0x42
80 #endif
81 #ifndef LLCSAP_RS511
82 #define LLCSAP_RS511 0x4e
83 #endif
84 #ifndef LLCSAP_ISO8208
85 #define LLCSAP_ISO8208 0x7e
86 #endif
87 #ifndef LLCSAP_PROWAY
88 #define LLCSAP_PROWAY 0x8e
89 #endif
90 #ifndef LLCSAP_SNAP
91 #define LLCSAP_SNAP 0xaa
92 #endif
93 #ifndef LLCSAP_IPX
94 #define LLCSAP_IPX 0xe0
95 #endif
96 #ifndef LLCSAP_NETBEUI
97 #define LLCSAP_NETBEUI 0xf0
98 #endif
99 #ifndef LLCSAP_ISONS
100 #define LLCSAP_ISONS 0xfe
101 #endif
104 * PIDs for use with OUI_CISCO.
106 #define PID_CISCO_CDP 0x2000 /* Cisco Discovery Protocol */
107 #define PID_CISCO_VTP 0x2003 /* Cisco VLAN Trunk Protocol */
108 #define PID_CISCO_DTP 0x2004 /* Cisco Dynamic Trunk Protocol */
111 * PIDs for use with OUI_RFC2684.
113 #define PID_RFC2684_ETH_FCS 0x0001 /* Ethernet, with FCS */
114 #define PID_RFC2684_ETH_NOFCS 0x0007 /* Ethernet, without FCS */
115 #define PID_RFC2684_802_4_FCS 0x0002 /* 802.4, with FCS */
116 #define PID_RFC2684_802_4_NOFCS 0x0008 /* 802.4, without FCS */
117 #define PID_RFC2684_802_5_FCS 0x0003 /* 802.5, with FCS */
118 #define PID_RFC2684_802_5_NOFCS 0x0009 /* 802.5, without FCS */
119 #define PID_RFC2684_FDDI_FCS 0x0004 /* FDDI, with FCS */
120 #define PID_RFC2684_FDDI_NOFCS 0x000a /* FDDI, without FCS */
121 #define PID_RFC2684_802_6_FCS 0x0005 /* 802.6, with FCS */
122 #define PID_RFC2684_802_6_NOFCS 0x000b /* 802.6, without FCS */
123 #define PID_RFC2684_BPDU 0x000e /* BPDUs */