libc/sysvipc: Fix some style issues (no functional change).
[dragonfly.git] / contrib / tcpdump / arcnet.h
blob3b609566ff81bb26f755f04e2f0df9888bb8bc8f
1 /*
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
33 * @(#) $Id: arcnet.h,v 1.3 2003-01-23 09:05:37 guy Exp $ (LBL)
35 * from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp
39 * Structure of a 2.5MB/s Arcnet header on the BSDs,
40 * as given to interface code.
42 struct arc_header {
43 u_int8_t arc_shost;
44 u_int8_t arc_dhost;
45 u_int8_t arc_type;
47 * only present for newstyle encoding with LL fragmentation.
48 * Don't use sizeof(anything), use ARC_HDR{,NEW}LEN instead.
50 u_int8_t arc_flag;
51 u_int16_t arc_seqid;
54 * only present in exception packets (arc_flag == 0xff)
56 u_int8_t arc_type2; /* same as arc_type */
57 u_int8_t arc_flag2; /* real flag value */
58 u_int16_t arc_seqid2; /* real seqid value */
61 #define ARC_HDRLEN 3
62 #define ARC_HDRNEWLEN 6
63 #define ARC_HDRNEWLEN_EXC 10
65 /* RFC 1051 */
66 #define ARCTYPE_IP_OLD 240 /* IP protocol */
67 #define ARCTYPE_ARP_OLD 241 /* address resolution protocol */
69 /* RFC 1201 */
70 #define ARCTYPE_IP 212 /* IP protocol */
71 #define ARCTYPE_ARP 213 /* address resolution protocol */
72 #define ARCTYPE_REVARP 214 /* reverse addr resolution protocol */
74 #define ARCTYPE_ATALK 221 /* Appletalk */
75 #define ARCTYPE_BANIAN 247 /* Banyan Vines */
76 #define ARCTYPE_IPX 250 /* Novell IPX */
78 #define ARCTYPE_INET6 0xc4 /* IPng */
79 #define ARCTYPE_DIAGNOSE 0x80 /* as per ANSI/ATA 878.1 */
82 * Structure of a 2.5MB/s Arcnet header on Linux. Linux has
83 * an extra "offset" field when given to interface code, and
84 * never presents packets that look like exception frames.
86 struct arc_linux_header {
87 u_int8_t arc_shost;
88 u_int8_t arc_dhost;
89 u_int16_t arc_offset;
90 u_int8_t arc_type;
92 * only present for newstyle encoding with LL fragmentation.
93 * Don't use sizeof(anything), use ARC_LINUX_HDR{,NEW}LEN
94 * instead.
96 u_int8_t arc_flag;
97 u_int16_t arc_seqid;
100 #define ARC_LINUX_HDRLEN 5
101 #define ARC_LINUX_HDRNEWLEN 8