diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/if_arcnet.h |
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/linux/if_arcnet.h')
-rw-r--r-- | include/linux/if_arcnet.h | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/include/linux/if_arcnet.h b/include/linux/if_arcnet.h new file mode 100644 index 00000000000..af380cb876a --- /dev/null +++ b/include/linux/if_arcnet.h | |||
@@ -0,0 +1,137 @@ | |||
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. | ||
5 | * | ||
6 | * Global definitions for the ARCnet interface. | ||
7 | * | ||
8 | * Authors: David Woodhouse and Avery Pennarun | ||
9 | * | ||
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. | ||
14 | */ | ||
15 | |||
16 | #ifndef _LINUX_IF_ARCNET_H | ||
17 | #define _LINUX_IF_ARCNET_H | ||
18 | |||
19 | #include <linux/if_ether.h> | ||
20 | |||
21 | |||
22 | /* | ||
23 | * These are the defined ARCnet Protocol ID's. | ||
24 | */ | ||
25 | |||
26 | /* CAP mode */ | ||
27 | /* No macro but uses 1-8 */ | ||
28 | |||
29 | /* RFC1201 Protocol ID's */ | ||
30 | #define ARC_P_IP 212 /* 0xD4 */ | ||
31 | #define ARC_P_IPV6 196 /* 0xC4: RFC2497 */ | ||
32 | #define ARC_P_ARP 213 /* 0xD5 */ | ||
33 | #define ARC_P_RARP 214 /* 0xD6 */ | ||
34 | #define ARC_P_IPX 250 /* 0xFA */ | ||
35 | #define ARC_P_NOVELL_EC 236 /* 0xEC */ | ||
36 | |||
37 | /* Old RFC1051 Protocol ID's */ | ||
38 | #define ARC_P_IP_RFC1051 240 /* 0xF0 */ | ||
39 | #define ARC_P_ARP_RFC1051 241 /* 0xF1 */ | ||
40 | |||
41 | /* MS LanMan/WfWg "NDIS" encapsulation */ | ||
42 | #define ARC_P_ETHER 232 /* 0xE8 */ | ||
43 | |||
44 | /* Unsupported/indirectly supported protocols */ | ||
45 | #define ARC_P_DATAPOINT_BOOT 0 /* very old Datapoint equipment */ | ||
46 | #define ARC_P_DATAPOINT_MOUNT 1 | ||
47 | #define ARC_P_POWERLAN_BEACON 8 /* Probably ATA-Netbios related */ | ||
48 | #define ARC_P_POWERLAN_BEACON2 243 /* 0xF3 */ | ||
49 | #define ARC_P_LANSOFT 251 /* 0xFB - what is this? */ | ||
50 | #define ARC_P_ATALK 0xDD | ||
51 | |||
52 | /* Hardware address length */ | ||
53 | #define ARCNET_ALEN 1 | ||
54 | |||
55 | /* | ||
56 | * The RFC1201-specific components of an arcnet packet header. | ||
57 | */ | ||
58 | struct arc_rfc1201 | ||
59 | { | ||
60 | uint8_t proto; /* protocol ID field - varies */ | ||
61 | uint8_t split_flag; /* for use with split packets */ | ||
62 | uint16_t sequence; /* sequence number */ | ||
63 | uint8_t payload[0]; /* space remaining in packet (504 bytes)*/ | ||
64 | }; | ||
65 | #define RFC1201_HDR_SIZE 4 | ||
66 | |||
67 | |||
68 | /* | ||
69 | * The RFC1051-specific components. | ||
70 | */ | ||
71 | struct arc_rfc1051 | ||
72 | { | ||
73 | uint8_t proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */ | ||
74 | uint8_t payload[0]; /* 507 bytes */ | ||
75 | }; | ||
76 | #define RFC1051_HDR_SIZE 1 | ||
77 | |||
78 | |||
79 | /* | ||
80 | * The ethernet-encap-specific components. We have a real ethernet header | ||
81 | * and some data. | ||
82 | */ | ||
83 | struct arc_eth_encap | ||
84 | { | ||
85 | uint8_t proto; /* Always ARC_P_ETHER */ | ||
86 | struct ethhdr eth; /* standard ethernet header (yuck!) */ | ||
87 | uint8_t payload[0]; /* 493 bytes */ | ||
88 | }; | ||
89 | #define ETH_ENCAP_HDR_SIZE 14 | ||
90 | |||
91 | |||
92 | struct arc_cap | ||
93 | { | ||
94 | uint8_t proto; | ||
95 | uint8_t cookie[sizeof(int)]; /* Actually NOT sent over the network */ | ||
96 | union { | ||
97 | uint8_t ack; | ||
98 | uint8_t raw[0]; /* 507 bytes */ | ||
99 | } mes; | ||
100 | }; | ||
101 | |||
102 | /* | ||
103 | * The data needed by the actual arcnet hardware. | ||
104 | * | ||
105 | * Now, in the real arcnet hardware, the third and fourth bytes are the | ||
106 | * 'offset' specification instead of the length, and the soft data is at | ||
107 | * the _end_ of the 512-byte buffer. We hide this complexity inside the | ||
108 | * driver. | ||
109 | */ | ||
110 | struct arc_hardware | ||
111 | { | ||
112 | uint8_t source, /* source ARCnet - filled in automagically */ | ||
113 | dest, /* destination ARCnet - 0 for broadcast */ | ||
114 | offset[2]; /* offset bytes (some weird semantics) */ | ||
115 | }; | ||
116 | #define ARC_HDR_SIZE 4 | ||
117 | |||
118 | /* | ||
119 | * This is an ARCnet frame header, as seen by the kernel (and userspace, | ||
120 | * when you do a raw packet capture). | ||
121 | */ | ||
122 | struct archdr | ||
123 | { | ||
124 | /* hardware requirements */ | ||
125 | struct arc_hardware hard; | ||
126 | |||
127 | /* arcnet encapsulation-specific bits */ | ||
128 | union { | ||
129 | struct arc_rfc1201 rfc1201; | ||
130 | struct arc_rfc1051 rfc1051; | ||
131 | struct arc_eth_encap eth_encap; | ||
132 | struct arc_cap cap; | ||
133 | uint8_t raw[0]; /* 508 bytes */ | ||
134 | } soft; | ||
135 | }; | ||
136 | |||
137 | #endif /* _LINUX_IF_ARCNET_H */ | ||