async: make sure independent async domains can't accidentally entangle
[linux-2.6/mini2440.git] / include / linux / if_arcnet.h
blob0835debab115c29eedd196dc29b16fb870a71adf
1 /*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
6 * Global definitions for the ARCnet interface.
8 * Authors: David Woodhouse and Avery Pennarun
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
16 #ifndef _LINUX_IF_ARCNET_H
17 #define _LINUX_IF_ARCNET_H
19 #include <linux/types.h>
20 #include <linux/if_ether.h>
24 * These are the defined ARCnet Protocol ID's.
27 /* CAP mode */
28 /* No macro but uses 1-8 */
30 /* RFC1201 Protocol ID's */
31 #define ARC_P_IP 212 /* 0xD4 */
32 #define ARC_P_IPV6 196 /* 0xC4: RFC2497 */
33 #define ARC_P_ARP 213 /* 0xD5 */
34 #define ARC_P_RARP 214 /* 0xD6 */
35 #define ARC_P_IPX 250 /* 0xFA */
36 #define ARC_P_NOVELL_EC 236 /* 0xEC */
38 /* Old RFC1051 Protocol ID's */
39 #define ARC_P_IP_RFC1051 240 /* 0xF0 */
40 #define ARC_P_ARP_RFC1051 241 /* 0xF1 */
42 /* MS LanMan/WfWg "NDIS" encapsulation */
43 #define ARC_P_ETHER 232 /* 0xE8 */
45 /* Unsupported/indirectly supported protocols */
46 #define ARC_P_DATAPOINT_BOOT 0 /* very old Datapoint equipment */
47 #define ARC_P_DATAPOINT_MOUNT 1
48 #define ARC_P_POWERLAN_BEACON 8 /* Probably ATA-Netbios related */
49 #define ARC_P_POWERLAN_BEACON2 243 /* 0xF3 */
50 #define ARC_P_LANSOFT 251 /* 0xFB - what is this? */
51 #define ARC_P_ATALK 0xDD
53 /* Hardware address length */
54 #define ARCNET_ALEN 1
57 * The RFC1201-specific components of an arcnet packet header.
59 struct arc_rfc1201
61 __u8 proto; /* protocol ID field - varies */
62 __u8 split_flag; /* for use with split packets */
63 __be16 sequence; /* sequence number */
64 __u8 payload[0]; /* space remaining in packet (504 bytes)*/
66 #define RFC1201_HDR_SIZE 4
70 * The RFC1051-specific components.
72 struct arc_rfc1051
74 __u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */
75 __u8 payload[0]; /* 507 bytes */
77 #define RFC1051_HDR_SIZE 1
81 * The ethernet-encap-specific components. We have a real ethernet header
82 * and some data.
84 struct arc_eth_encap
86 __u8 proto; /* Always ARC_P_ETHER */
87 struct ethhdr eth; /* standard ethernet header (yuck!) */
88 __u8 payload[0]; /* 493 bytes */
90 #define ETH_ENCAP_HDR_SIZE 14
93 struct arc_cap
95 __u8 proto;
96 __u8 cookie[sizeof(int)]; /* Actually NOT sent over the network */
97 union {
98 __u8 ack;
99 __u8 raw[0]; /* 507 bytes */
100 } mes;
104 * The data needed by the actual arcnet hardware.
106 * Now, in the real arcnet hardware, the third and fourth bytes are the
107 * 'offset' specification instead of the length, and the soft data is at
108 * the _end_ of the 512-byte buffer. We hide this complexity inside the
109 * driver.
111 struct arc_hardware
113 __u8 source, /* source ARCnet - filled in automagically */
114 dest, /* destination ARCnet - 0 for broadcast */
115 offset[2]; /* offset bytes (some weird semantics) */
117 #define ARC_HDR_SIZE 4
120 * This is an ARCnet frame header, as seen by the kernel (and userspace,
121 * when you do a raw packet capture).
123 struct archdr
125 /* hardware requirements */
126 struct arc_hardware hard;
128 /* arcnet encapsulation-specific bits */
129 union {
130 struct arc_rfc1201 rfc1201;
131 struct arc_rfc1051 rfc1051;
132 struct arc_eth_encap eth_encap;
133 struct arc_cap cap;
134 __u8 raw[0]; /* 508 bytes */
135 } soft;
138 #endif /* _LINUX_IF_ARCNET_H */