117680Spst/*
217680Spst * Copyright (c) 1992, 1993, 1994, 1995, 1996
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/fddi.h,v 1.11 2002-12-11 07:13:51 guy Exp $ (LBL)
2217680Spst */
2317680Spst
2417680Spst/*
2517680Spst * Based on Ultrix if_fddi.h
2617680Spst */
2717680Spst
2817680Spst/*
2917680Spst * This stuff should come from a system header file, but there's no
3017680Spst * obviously portable way to do that and it's not really going
3117680Spst * to change from system to system (except for the padding business).
3217680Spst */
3317680Spst
3417680Spststruct fddi_header {
3517680Spst	u_char  fddi_fc;		/* frame control */
3617680Spst	u_char  fddi_dhost[6];
3717680Spst	u_char  fddi_shost[6];
3817680Spst};
3917680Spst
4075115Sfenner/*
4175115Sfenner * Length of an FDDI header; note that some compilers may pad
4275115Sfenner * "struct fddi_header" to a multiple of 4 bytes, for example, so
4375115Sfenner * "sizeof (struct fddi_header)" may not give the right
4475115Sfenner * answer.
4575115Sfenner */
4675115Sfenner#define FDDI_HDRLEN 13
4717680Spst
4817680Spst/* Useful values for fddi_fc (frame control) field */
4917680Spst
5017680Spst/*
5117680Spst * FDDI Frame Control bits
5217680Spst */
5317680Spst#define	FDDIFC_C		0x80		/* Class bit */
5417680Spst#define	FDDIFC_L		0x40		/* Address length bit */
5517680Spst#define	FDDIFC_F		0x30		/* Frame format bits */
5617680Spst#define	FDDIFC_Z		0x0f		/* Control bits */
5717680Spst
5817680Spst/*
5917680Spst * FDDI Frame Control values. (48-bit addressing only).
6017680Spst */
6117680Spst#define	FDDIFC_VOID		0x40		/* Void frame */
6217680Spst#define	FDDIFC_NRT		0x80		/* Nonrestricted token */
6317680Spst#define	FDDIFC_RT		0xc0		/* Restricted token */
6417680Spst#define	FDDIFC_SMT_INFO		0x41		/* SMT Info */
6517680Spst#define	FDDIFC_SMT_NSA		0x4F		/* SMT Next station adrs */
6617680Spst#define	FDDIFC_MAC_BEACON	0xc2		/* MAC Beacon frame */
6717680Spst#define	FDDIFC_MAC_CLAIM	0xc3		/* MAC Claim frame */
6817680Spst#define	FDDIFC_LLC_ASYNC	0x50		/* Async. LLC frame */
6917680Spst#define	FDDIFC_LLC_SYNC		0xd0		/* Sync. LLC frame */
7017680Spst#define	FDDIFC_IMP_ASYNC	0x60		/* Implementor Async. */
7117680Spst#define	FDDIFC_IMP_SYNC		0xe0		/* Implementor Synch. */
7217680Spst#define FDDIFC_SMT		0x40		/* SMT frame */
7317680Spst#define FDDIFC_MAC		0xc0		/* MAC frame */
7417680Spst
7517680Spst#define	FDDIFC_CLFF		0xF0		/* Class/Length/Format bits */
7617680Spst#define	FDDIFC_ZZZZ		0x0F		/* Control bits */
77