diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-12-30 22:52:15 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-12-30 22:52:15 -0800 |
commit | 27d428c0a126e9ca6518b16f011cacc1caab1f2c (patch) | |
tree | ab35943e9ecc9e1a9ae0712439183c8968b64045 /print-fddi.c | |
parent | 5301862d3094513e509cc95b17a778299b581bd3 (diff) | |
download | tcpdump-27d428c0a126e9ca6518b16f011cacc1caab1f2c.tar.gz |
Pull a bunch of headers into the only source file that includes them.
For headers included in only one source file, put the header contents in
the source file in question, and get rid of a bunch of stuff from the
header not used in the source file.
Diffstat (limited to 'print-fddi.c')
-rw-r--r-- | print-fddi.c | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/print-fddi.c b/print-fddi.c index f34f766f..490b10aa 100644 --- a/print-fddi.c +++ b/print-fddi.c @@ -39,7 +39,54 @@ static const char rcsid[] _U_ = #include "ethertype.h" #include "ether.h" -#include "fddi.h" + +/* + * Based on Ultrix if_fddi.h + */ + +struct fddi_header { + u_char fddi_fc; /* frame control */ + u_char fddi_dhost[6]; + u_char fddi_shost[6]; +}; + +/* + * Length of an FDDI header; note that some compilers may pad + * "struct fddi_header" to a multiple of 4 bytes, for example, so + * "sizeof (struct fddi_header)" may not give the right + * answer. + */ +#define FDDI_HDRLEN 13 + +/* Useful values for fddi_fc (frame control) field */ + +/* + * FDDI Frame Control bits + */ +#define FDDIFC_C 0x80 /* Class bit */ +#define FDDIFC_L 0x40 /* Address length bit */ +#define FDDIFC_F 0x30 /* Frame format bits */ +#define FDDIFC_Z 0x0f /* Control bits */ + +/* + * FDDI Frame Control values. (48-bit addressing only). + */ +#define FDDIFC_VOID 0x40 /* Void frame */ +#define FDDIFC_NRT 0x80 /* Nonrestricted token */ +#define FDDIFC_RT 0xc0 /* Restricted token */ +#define FDDIFC_SMT_INFO 0x41 /* SMT Info */ +#define FDDIFC_SMT_NSA 0x4F /* SMT Next station adrs */ +#define FDDIFC_MAC_BEACON 0xc2 /* MAC Beacon frame */ +#define FDDIFC_MAC_CLAIM 0xc3 /* MAC Claim frame */ +#define FDDIFC_LLC_ASYNC 0x50 /* Async. LLC frame */ +#define FDDIFC_LLC_SYNC 0xd0 /* Sync. LLC frame */ +#define FDDIFC_IMP_ASYNC 0x60 /* Implementor Async. */ +#define FDDIFC_IMP_SYNC 0xe0 /* Implementor Synch. */ +#define FDDIFC_SMT 0x40 /* SMT frame */ +#define FDDIFC_MAC 0xc0 /* MAC frame */ + +#define FDDIFC_CLFF 0xF0 /* Class/Length/Format bits */ +#define FDDIFC_ZZZZ 0x0F /* Control bits */ /* * Some FDDI interfaces use bit-swapped addresses. |