117680Spst/*
239297Sfenner * Copyright (c) 1993, 1994, 1997
317680Spst *	The Regents of the University of California.  All rights reserved.
417680Spst *
517680Spst * Redistribution and use in source and binary forms, with or without
617680Spst * modification, are permitted provided that: (1) source code distributions
717680Spst * retain the above copyright notice and this paragraph in its entirety, (2)
817680Spst * distributions including binary code include the above copyright notice and
917680Spst * this paragraph in its entirety in the documentation or other materials
1017680Spst * provided with the distribution, and (3) all advertising materials mentioning
1117680Spst * features or use of this software display the following acknowledgement:
1217680Spst * ``This product includes software developed by the University of California,
1317680Spst * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
1417680Spst * the University nor the names of its contributors may be used to endorse
1517680Spst * or promote products derived from this software without specific prior
1617680Spst * written permission.
1717680Spst * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
1817680Spst * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
1917680Spst * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2017680Spst *
21190207Srpaulo * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.23 2007-04-13 09:43:11 hannes Exp $ (LBL)
2217680Spst */
2317680Spst
2417680Spst/*
25147899Ssam * Definitions for information in the LLC header.
2617680Spst */
2717680Spst
2817680Spst#define	LLC_U_FMT	3
2917680Spst#define	LLC_GSAP	1
30162017Ssam#define	LLC_IG	        1 /* Individual / Group */
3117680Spst#define LLC_S_FMT	1
3217680Spst
3317680Spst#define	LLC_U_POLL	0x10
3475115Sfenner#define	LLC_IS_POLL	0x0100
3517680Spst#define	LLC_XID_FI	0x81
3617680Spst
3717680Spst#define	LLC_U_CMD(u)	((u) & 0xef)
3817680Spst#define	LLC_UI		0x03
3917680Spst#define	LLC_UA		0x63
4017680Spst#define	LLC_DISC	0x43
4117680Spst#define	LLC_DM		0x0f
4217680Spst#define	LLC_SABME	0x6f
4317680Spst#define	LLC_TEST	0xe3
4417680Spst#define	LLC_XID		0xaf
4517680Spst#define	LLC_FRMR	0x87
4617680Spst
47172683Smlaier#define	LLC_S_CMD(is)	(((is) >> 2) & 0x03)
4875115Sfenner#define	LLC_RR		0x0001
4975115Sfenner#define	LLC_RNR		0x0005
5075115Sfenner#define	LLC_REJ		0x0009
5117680Spst
5275115Sfenner#define LLC_IS_NR(is)	(((is) >> 9) & 0x7f)
5375115Sfenner#define LLC_I_NS(is)	(((is) >> 1) & 0x7f)
5417680Spst
5517680Spst#ifndef LLCSAP_NULL
5617680Spst#define	LLCSAP_NULL		0x00
5717680Spst#endif
5817680Spst#ifndef LLCSAP_GLOBAL
5917680Spst#define	LLCSAP_GLOBAL		0xff
6017680Spst#endif
6198524Sfenner#ifndef LLCSAP_8021B_I
6217680Spst#define	LLCSAP_8021B_I		0x02
6317680Spst#endif
6498524Sfenner#ifndef LLCSAP_8021B_G
6517680Spst#define	LLCSAP_8021B_G		0x03
6617680Spst#endif
67162017Ssam#ifndef LLCSAP_SNA
68162017Ssam#define	LLCSAP_SNA		0x04
69162017Ssam#endif
7017680Spst#ifndef LLCSAP_IP
7117680Spst#define	LLCSAP_IP		0x06
7217680Spst#endif
7317680Spst#ifndef LLCSAP_PROWAYNM
7417680Spst#define	LLCSAP_PROWAYNM		0x0e
7517680Spst#endif
7617680Spst#ifndef LLCSAP_8021D
7717680Spst#define	LLCSAP_8021D		0x42
7817680Spst#endif
7917680Spst#ifndef LLCSAP_RS511
8017680Spst#define	LLCSAP_RS511		0x4e
8117680Spst#endif
8217680Spst#ifndef LLCSAP_ISO8208
8317680Spst#define	LLCSAP_ISO8208		0x7e
8417680Spst#endif
8517680Spst#ifndef LLCSAP_PROWAY
8617680Spst#define	LLCSAP_PROWAY		0x8e
8717680Spst#endif
8817680Spst#ifndef LLCSAP_SNAP
8917680Spst#define	LLCSAP_SNAP		0xaa
9017680Spst#endif
9198524Sfenner#ifndef LLCSAP_IPX
9298524Sfenner#define LLCSAP_IPX		0xe0
9398524Sfenner#endif
9498524Sfenner#ifndef LLCSAP_NETBEUI
9598524Sfenner#define LLCSAP_NETBEUI		0xf0
9698524Sfenner#endif
9717680Spst#ifndef LLCSAP_ISONS
9817680Spst#define	LLCSAP_ISONS		0xfe
9917680Spst#endif
10098524Sfenner
101127668Sbms/*
102127668Sbms * PIDs for use with OUI_CISCO.
103127668Sbms */
104127668Sbms#define	PID_CISCO_CDP		0x2000	/* Cisco Discovery Protocol */
105172683Smlaier#define	PID_CISCO_VTP		0x2003	/* Cisco VLAN Trunk Protocol */
106172683Smlaier#define	PID_CISCO_DTP		0x2004	/* Cisco Dynamic Trunk Protocol */
107190207Srpaulo#define	PID_CISCO_UDLD		0x0111	/* Unidirectional Link Detection */
108190207Srpaulo#define	PID_CISCO_PVST		0x010b	/* Per VLAN Spanning Tree+ and RPVST+ */
109127668Sbms
110127668Sbms/*
111127668Sbms * PIDs for use with OUI_RFC2684.
112127668Sbms */
113127668Sbms#define PID_RFC2684_ETH_FCS	0x0001	/* Ethernet, with FCS */
114127668Sbms#define PID_RFC2684_ETH_NOFCS	0x0007	/* Ethernet, without FCS */
115127668Sbms#define PID_RFC2684_802_4_FCS	0x0002	/* 802.4, with FCS */
116127668Sbms#define PID_RFC2684_802_4_NOFCS	0x0008	/* 802.4, without FCS */
117127668Sbms#define PID_RFC2684_802_5_FCS	0x0003	/* 802.5, with FCS */
118127668Sbms#define PID_RFC2684_802_5_NOFCS	0x0009	/* 802.5, without FCS */
119127668Sbms#define PID_RFC2684_FDDI_FCS	0x0004	/* FDDI, with FCS */
120127668Sbms#define PID_RFC2684_FDDI_NOFCS	0x000a	/* FDDI, without FCS */
121127668Sbms#define PID_RFC2684_802_6_FCS	0x0005	/* 802.6, with FCS */
122127668Sbms#define PID_RFC2684_802_6_NOFCS	0x000b	/* 802.6, without FCS */
123127668Sbms#define PID_RFC2684_BPDU	0x000e	/* BPDUs */
124