ACPI: simplify acpi_pci_irq_add_prt() API
[linux-2.6/linux-acpi-2.6.git] / include / linux / if_ec.h
blobe7499aa79783391d929eec4cc0696fe693d14b42
1 /* Definitions for Econet sockets. */
3 #ifndef __LINUX_IF_EC
4 #define __LINUX_IF_EC
6 /* User visible stuff. Glibc provides its own but libc5 folk will use these */
8 struct ec_addr
10 unsigned char station; /* Station number. */
11 unsigned char net; /* Network number. */
14 struct sockaddr_ec
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;
24 #define ECTYPE_PACKET_RECEIVED 0 /* Packet received */
25 #define ECTYPE_TRANSMIT_STATUS 0x10 /* Transmit completed,
26 low nibble holds status */
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
35 #ifdef __KERNEL__
37 #define EC_HLEN 6
39 /* This is what an Econet frame looks like on the wire. */
40 struct ec_framehdr
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;
50 struct 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;
60 static inline struct econet_sock *ec_sk(const struct sock *sk)
62 return (struct econet_sock *)sk;
65 struct ec_device
67 unsigned char station, net; /* Econet protocol address */
70 #endif
72 #endif