xref: /openbsd/usr.sbin/tcpdump/fddi.h (revision 2068f686)
1 /*	$OpenBSD: fddi.h,v 1.7 2007/10/07 16:41:05 deraadt Exp $	*/
2 
3 /*
4  * Copyright (c) 1992, 1993, 1994, 1995, 1996
5  *	The Regents of the University of California.  All rights reserved.
6  *
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.
22  *
23  * @(#) $Id: fddi.h,v 1.7 2007/10/07 16:41:05 deraadt Exp $ (LBL)
24  */
25 
26 /*
27  * Based on Ultrix if_fddi.h
28  */
29 
30 /*
31  * This stuff should come from a system header file, but there's no
32  * obviously portable way to do that and it's not really going
33  * to change from system to system (except for the padding business).
34  */
35 
36 struct fddi_header {
37 	u_char  fddi_fc;		/* frame control */
38 	u_char  fddi_dhost[6];
39 	u_char  fddi_shost[6];
40 };
41 
42 
43 /* Useful values for fddi_fc (frame control) field */
44 
45 /*
46  * FDDI Frame Control bits
47  */
48 #define	FDDIFC_C		0x80		/* Class bit */
49 #define	FDDIFC_L		0x40		/* Address length bit */
50 #define	FDDIFC_F		0x30		/* Frame format bits */
51 #define	FDDIFC_Z		0x0f		/* Control bits */
52 
53 /*
54  * FDDI Frame Control values. (48-bit addressing only).
55  */
56 #define	FDDIFC_VOID		0x40		/* Void frame */
57 #define	FDDIFC_NRT		0x80		/* Nonrestricted token */
58 #define	FDDIFC_RT		0xc0		/* Restricted token */
59 #define	FDDIFC_SMT_INFO		0x41		/* SMT Info */
60 #define	FDDIFC_SMT_NSA		0x4F		/* SMT Next station adrs */
61 #define	FDDIFC_MAC_BEACON	0xc2		/* MAC Beacon frame */
62 #define	FDDIFC_MAC_CLAIM	0xc3		/* MAC Claim frame */
63 #define	FDDIFC_LLC_ASYNC	0x50		/* Async. LLC frame */
64 #define	FDDIFC_LLC_SYNC		0xd0		/* Sync. LLC frame */
65 #define	FDDIFC_IMP_ASYNC	0x60		/* Implementor Async. */
66 #define	FDDIFC_IMP_SYNC		0xe0		/* Implementor Synch. */
67 #define FDDIFC_SMT		0x40		/* SMT frame */
68 #define FDDIFC_MAC		0xc0		/* MAC frame */
69 
70 #define	FDDIFC_CLFF		0xF0		/* Class/Length/Format bits */
71 #define	FDDIFC_ZZZZ		0x0F		/* Control bits */
72