aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_ec.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/if_ec.h
Linux-2.6.12-rc2v2.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_ec.h')
-rw-r--r--include/linux/if_ec.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/include/linux/if_ec.h b/include/linux/if_ec.h
new file mode 100644
index 000000000000..e7499aa79783
--- /dev/null
+++ b/include/linux/if_ec.h
@@ -0,0 +1,72 @@
1/* Definitions for Econet sockets. */
2
3#ifndef __LINUX_IF_EC
4#define __LINUX_IF_EC
5
6/* User visible stuff. Glibc provides its own but libc5 folk will use these */
7
8struct ec_addr
9{
10 unsigned char station; /* Station number. */
11 unsigned char net; /* Network number. */
12};
13
14struct sockaddr_ec
15{
16 unsigned short sec_family;
17 unsigned char port; /* Port number. */
18 unsigned char cb; /* Control/flag byte. */
19 unsigned char type; /* Type of message. */
20 struct ec_addr addr;
21 unsigned long cookie;
22};
23
24#define ECTYPE_PACKET_RECEIVED 0 /* Packet received */
25#define ECTYPE_TRANSMIT_STATUS 0x10 /* Transmit completed,
26 low nibble holds status */
27
28#define ECTYPE_TRANSMIT_OK 1
29#define ECTYPE_TRANSMIT_NOT_LISTENING 2
30#define ECTYPE_TRANSMIT_NET_ERROR 3
31#define ECTYPE_TRANSMIT_NO_CLOCK 4
32#define ECTYPE_TRANSMIT_LINE_JAMMED 5
33#define ECTYPE_TRANSMIT_NOT_PRESENT 6
34
35#ifdef __KERNEL__
36
37#define EC_HLEN 6
38
39/* This is what an Econet frame looks like on the wire. */
40struct ec_framehdr
41{
42 unsigned char dst_stn;
43 unsigned char dst_net;
44 unsigned char src_stn;
45 unsigned char src_net;
46 unsigned char cb;
47 unsigned char port;
48};
49
50struct econet_sock {
51 /* struct sock has to be the first member of econet_sock */
52 struct sock sk;
53 unsigned char cb;
54 unsigned char port;
55 unsigned char station;
56 unsigned char net;
57 unsigned short num;
58};
59
60static inline struct econet_sock *ec_sk(const struct sock *sk)
61{
62 return (struct econet_sock *)sk;
63}
64
65struct ec_device
66{
67 unsigned char station, net; /* Econet protocol address */
68};
69
70#endif
71
72#endif