• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef KERNEL_IRDA_H
20 #define KERNEL_IRDA_H
21 #include <linux/types.h>
22 #include <linux/socket.h>
23 #define HINT_PNP 0x01
24 #define HINT_PDA 0x02
25 #define HINT_COMPUTER 0x04
26 #define HINT_PRINTER 0x08
27 #define HINT_MODEM 0x10
28 #define HINT_FAX 0x20
29 #define HINT_LAN 0x40
30 #define HINT_EXTENSION 0x80
31 #define HINT_TELEPHONY 0x01
32 #define HINT_FILE_SERVER 0x02
33 #define HINT_COMM 0x04
34 #define HINT_MESSAGE 0x08
35 #define HINT_HTTP 0x10
36 #define HINT_OBEX 0x20
37 #define CS_ASCII 0x00
38 #define CS_ISO_8859_1 0x01
39 #define CS_ISO_8859_2 0x02
40 #define CS_ISO_8859_3 0x03
41 #define CS_ISO_8859_4 0x04
42 #define CS_ISO_8859_5 0x05
43 #define CS_ISO_8859_6 0x06
44 #define CS_ISO_8859_7 0x07
45 #define CS_ISO_8859_8 0x08
46 #define CS_ISO_8859_9 0x09
47 #define CS_UNICODE 0xff
48 typedef enum {
49   IRDA_TEKRAM_DONGLE = 0,
50   IRDA_ESI_DONGLE = 1,
51   IRDA_ACTISYS_DONGLE = 2,
52   IRDA_ACTISYS_PLUS_DONGLE = 3,
53   IRDA_GIRBIL_DONGLE = 4,
54   IRDA_LITELINK_DONGLE = 5,
55   IRDA_AIRPORT_DONGLE = 6,
56   IRDA_OLD_BELKIN_DONGLE = 7,
57   IRDA_EP7211_IR = 8,
58   IRDA_MCP2120_DONGLE = 9,
59   IRDA_ACT200L_DONGLE = 10,
60   IRDA_MA600_DONGLE = 11,
61   IRDA_TOIM3232_DONGLE = 12,
62   IRDA_EP7211_DONGLE = 13,
63 } IRDA_DONGLE;
64 enum {
65   IRDAPROTO_UNITDATA = 0,
66   IRDAPROTO_ULTRA = 1,
67   IRDAPROTO_MAX
68 };
69 #define SOL_IRLMP 266
70 #define SOL_IRTTP 266
71 #define IRLMP_ENUMDEVICES 1
72 #define IRLMP_IAS_SET 2
73 #define IRLMP_IAS_QUERY 3
74 #define IRLMP_HINTS_SET 4
75 #define IRLMP_QOS_SET 5
76 #define IRLMP_QOS_GET 6
77 #define IRLMP_MAX_SDU_SIZE 7
78 #define IRLMP_IAS_GET 8
79 #define IRLMP_IAS_DEL 9
80 #define IRLMP_HINT_MASK_SET 10
81 #define IRLMP_WAITDEVICE 11
82 #define IRTTP_MAX_SDU_SIZE IRLMP_MAX_SDU_SIZE
83 #define IAS_MAX_STRING 256
84 #define IAS_MAX_OCTET_STRING 1024
85 #define IAS_MAX_CLASSNAME 60
86 #define IAS_MAX_ATTRIBNAME 60
87 #define IAS_MAX_ATTRIBNUMBER 256
88 #define IAS_EXPORT_CLASSNAME 64
89 #define IAS_EXPORT_ATTRIBNAME 256
90 #define IAS_MISSING 0
91 #define IAS_INTEGER 1
92 #define IAS_OCT_SEQ 2
93 #define IAS_STRING 3
94 #define LSAP_ANY 0xff
95 struct sockaddr_irda {
96   __kernel_sa_family_t sir_family;
97   __u8 sir_lsap_sel;
98   __u32 sir_addr;
99   char sir_name[25];
100 };
101 struct irda_device_info {
102   __u32 saddr;
103   __u32 daddr;
104   char info[22];
105   __u8 charset;
106   __u8 hints[2];
107 };
108 struct irda_device_list {
109   __u32 len;
110   struct irda_device_info dev[1];
111 };
112 struct irda_ias_set {
113   char irda_class_name[IAS_EXPORT_CLASSNAME];
114   char irda_attrib_name[IAS_EXPORT_ATTRIBNAME];
115   unsigned int irda_attrib_type;
116   union {
117     unsigned int irda_attrib_int;
118     struct {
119       unsigned short len;
120       __u8 octet_seq[IAS_MAX_OCTET_STRING];
121     } irda_attrib_octet_seq;
122     struct {
123       __u8 len;
124       __u8 charset;
125       __u8 string[IAS_MAX_STRING];
126     } irda_attrib_string;
127   } attribute;
128   __u32 daddr;
129 };
130 #define SIOCSDONGLE (SIOCDEVPRIVATE + 0)
131 #define SIOCGDONGLE (SIOCDEVPRIVATE + 1)
132 #define SIOCSBANDWIDTH (SIOCDEVPRIVATE + 2)
133 #define SIOCSMEDIABUSY (SIOCDEVPRIVATE + 3)
134 #define SIOCGMEDIABUSY (SIOCDEVPRIVATE + 4)
135 #define SIOCGRECEIVING (SIOCDEVPRIVATE + 5)
136 #define SIOCSMODE (SIOCDEVPRIVATE + 6)
137 #define SIOCGMODE (SIOCDEVPRIVATE + 7)
138 #define SIOCSDTRRTS (SIOCDEVPRIVATE + 8)
139 #define SIOCGQOS (SIOCDEVPRIVATE + 9)
140 #define IRNAMSIZ 16
141 struct if_irda_qos {
142   unsigned long baudrate;
143   unsigned short data_size;
144   unsigned short window_size;
145   unsigned short min_turn_time;
146   unsigned short max_turn_time;
147   unsigned char add_bofs;
148   unsigned char link_disc;
149 };
150 struct if_irda_line {
151   __u8 dtr;
152   __u8 rts;
153 };
154 struct if_irda_req {
155   union {
156     char ifrn_name[IRNAMSIZ];
157   } ifr_ifrn;
158   union {
159     struct if_irda_line ifru_line;
160     struct if_irda_qos ifru_qos;
161     unsigned short ifru_flags;
162     unsigned int ifru_receiving;
163     unsigned int ifru_mode;
164     unsigned int ifru_dongle;
165   } ifr_ifru;
166 };
167 #define ifr_baudrate ifr_ifru.ifru_qos.baudrate
168 #define ifr_receiving ifr_ifru.ifru_receiving
169 #define ifr_dongle ifr_ifru.ifru_dongle
170 #define ifr_mode ifr_ifru.ifru_mode
171 #define ifr_dtr ifr_ifru.ifru_line.dtr
172 #define ifr_rts ifr_ifru.ifru_line.rts
173 #define IRDA_NL_NAME "irda"
174 #define IRDA_NL_VERSION 1
175 enum irda_nl_commands {
176   IRDA_NL_CMD_UNSPEC,
177   IRDA_NL_CMD_SET_MODE,
178   IRDA_NL_CMD_GET_MODE,
179   __IRDA_NL_CMD_AFTER_LAST
180 };
181 #define IRDA_NL_CMD_MAX (__IRDA_NL_CMD_AFTER_LAST - 1)
182 enum nl80211_attrs {
183   IRDA_NL_ATTR_UNSPEC,
184   IRDA_NL_ATTR_IFNAME,
185   IRDA_NL_ATTR_MODE,
186   __IRDA_NL_ATTR_AFTER_LAST
187 };
188 #define IRDA_NL_ATTR_MAX (__IRDA_NL_ATTR_AFTER_LAST - 1)
189 #define IRDA_MODE_PRIMARY 0x1
190 #define IRDA_MODE_SECONDARY 0x2
191 #define IRDA_MODE_MONITOR 0x4
192 #endif
193