source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/af_irda.h@ 1166

Last change on this file since 1166 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 5.4 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef __AFIRDA__
7#define __AFIRDA__
8
9#ifdef __LP64__
10#pragma push_macro("u_long")
11#undef u_long
12#define u_long __ms_u_long
13#endif
14
15#include <_bsd_types.h>
16
17#define WINDOWS_AF_IRDA 26
18#define WINDOWS_PF_IRDA WINDOWS_AF_IRDA
19
20#define WCE_AF_IRDA 22
21#define WCE_PF_IRDA WCE_AF_IRDA
22
23#ifndef AF_IRDA
24#define AF_IRDA WINDOWS_AF_IRDA
25#endif
26#define IRDA_PROTO_SOCK_STREAM 1
27
28#define PF_IRDA AF_IRDA
29
30#define SOL_IRLMP 0x00FF
31
32#define IRLMP_ENUMDEVICES 0x00000010
33#define IRLMP_IAS_SET 0x00000011
34#define IRLMP_IAS_QUERY 0x00000012
35
36#define IRLMP_SEND_PDU_LEN 0x00000013
37#define IRLMP_EXCLUSIVE_MODE 0x00000014
38#define IRLMP_IRLPT_MODE 0x00000015
39#define IRLMP_9WIRE_MODE 0x00000016
40
41#define IRLMP_TINYTP_MODE 0x00000017
42#define IRLMP_PARAMETERS 0x00000018
43#define IRLMP_DISCOVERY_MODE 0x00000019
44
45#define IRLMP_SHARP_MODE 0x00000020
46
47#define SIO_LAZY_DISCOVERY _IOR('t',127,u_long)
48
49#define IAS_ATTRIB_NO_CLASS 0x00000010
50#define IAS_ATTRIB_NO_ATTRIB 0x00000000
51#define IAS_ATTRIB_INT 0x00000001
52#define IAS_ATTRIB_OCTETSEQ 0x00000002
53#define IAS_ATTRIB_STR 0x00000003
54
55#define IAS_MAX_USER_STRING 256
56#define IAS_MAX_OCTET_STRING 1024
57#define IAS_MAX_CLASSNAME 64
58#define IAS_MAX_ATTRIBNAME 256
59
60enum {
61 LM_HB_Extension = 128,LM_HB1_PnP = 1,LM_HB1_PDA_Palmtop = 2,LM_HB1_Computer = 4,LM_HB1_Printer = 8,LM_HB1_Modem = 16,LM_HB1_Fax = 32,
62 LM_HB1_LANAccess = 64,LM_HB2_Telephony = 1,LM_HB2_FileServer = 2,
63};
64
65#define LmCharSetASCII 0
66#define LmCharSetISO_8859_1 1
67#define LmCharSetISO_8859_2 2
68#define LmCharSetISO_8859_3 3
69#define LmCharSetISO_8859_4 4
70#define LmCharSetISO_8859_5 5
71#define LmCharSetISO_8859_6 6
72#define LmCharSetISO_8859_7 7
73#define LmCharSetISO_8859_8 8
74#define LmCharSetISO_8859_9 9
75#define LmCharSetUNICODE 0xff
76
77typedef u_long LM_BAUD_RATE;
78
79#define LM_BAUD_1200 1200
80#define LM_BAUD_2400 2400
81#define LM_BAUD_9600 9600
82#define LM_BAUD_19200 19200
83#define LM_BAUD_38400 38400
84#define LM_BAUD_57600 57600
85#define LM_BAUD_115200 115200
86#define LM_BAUD_576K 576000
87#define LM_BAUD_1152K 1152000
88#define LM_BAUD_4M 4000000
89
90typedef struct {
91 u_long nTXDataBytes;
92 u_long nRXDataBytes;
93 LM_BAUD_RATE nBaudRate;
94 u_long thresholdTime;
95 u_long discTime;
96 u_short nMSLinkTurn;
97 u_char nTXPackets;
98 u_char nRXPackets;
99} LM_IRPARMS,*PLM_IRPARMS;
100
101typedef struct _SOCKADDR_IRDA {
102 u_short irdaAddressFamily;
103 u_char irdaDeviceID[4];
104 char irdaServiceName[25];
105} SOCKADDR_IRDA,*PSOCKADDR_IRDA,*LPSOCKADDR_IRDA;
106
107typedef struct _WINDOWS_IRDA_DEVICE_INFO {
108 u_char irdaDeviceID[4];
109 char irdaDeviceName[22];
110 u_char irdaDeviceHints1;
111 u_char irdaDeviceHints2;
112 u_char irdaCharSet;
113} WINDOWS_IRDA_DEVICE_INFO,*PWINDOWS_IRDA_DEVICE_INFO,*LPWINDOWS_IRDA_DEVICE_INFO;
114
115typedef struct _WCE_IRDA_DEVICE_INFO {
116 u_char irdaDeviceID[4];
117 char irdaDeviceName[22];
118 u_char Reserved[2];
119} WCE_IRDA_DEVICE_INFO,*PWCE_IRDA_DEVICE_INFO;
120
121typedef WINDOWS_IRDA_DEVICE_INFO IRDA_DEVICE_INFO,*PIRDA_DEVICE_INFO,*LPIRDA_DEVICE_INFO;
122
123typedef struct _WINDOWS_DEVICELIST {
124 ULONG numDevice;
125 WINDOWS_IRDA_DEVICE_INFO Device[1];
126} WINDOWS_DEVICELIST,*PWINDOWS_DEVICELIST,*LPWINDOWS_DEVICELIST;
127
128typedef struct _WCE_DEVICELIST {
129 ULONG numDevice;
130 WCE_IRDA_DEVICE_INFO Device[1];
131} WCE_DEVICELIST,*PWCE_DEVICELIST;
132
133typedef WINDOWS_DEVICELIST DEVICELIST,*PDEVICELIST,*LPDEVICELIST;
134
135typedef struct _WINDOWS_IAS_SET {
136 char irdaClassName[IAS_MAX_CLASSNAME];
137 char irdaAttribName[IAS_MAX_ATTRIBNAME];
138 u_long irdaAttribType;
139 union {
140 LONG irdaAttribInt;
141 struct {
142 u_short Len;
143 u_char OctetSeq[IAS_MAX_OCTET_STRING];
144 } irdaAttribOctetSeq;
145 struct {
146 u_char Len;
147 u_char CharSet;
148 u_char UsrStr[IAS_MAX_USER_STRING];
149 } irdaAttribUsrStr;
150 } irdaAttribute;
151} WINDOWS_IAS_SET,*PWINDOWS_IAS_SET,*LPWINDOWS_IAS_SET;
152
153typedef struct _WINDOWS_IAS_QUERY {
154 u_char irdaDeviceID[4];
155 char irdaClassName[IAS_MAX_CLASSNAME];
156 char irdaAttribName[IAS_MAX_ATTRIBNAME];
157 u_long irdaAttribType;
158 union {
159 LONG irdaAttribInt;
160 struct {
161 u_long Len;
162 u_char OctetSeq[IAS_MAX_OCTET_STRING];
163 } irdaAttribOctetSeq;
164 struct {
165 u_long Len;
166 u_long CharSet;
167 u_char UsrStr[IAS_MAX_USER_STRING];
168 } irdaAttribUsrStr;
169 } irdaAttribute;
170} WINDOWS_IAS_QUERY,*PWINDOWS_IAS_QUERY,*LPWINDOWS_IAS_QUERY;
171
172typedef struct _WCE_IAS_SET {
173 char irdaClassName[61];
174 char irdaAttribName[61];
175 u_short irdaAttribType;
176 union {
177 int irdaAttribInt;
178 struct {
179 int Len;
180 u_char OctetSeq[1];
181 u_char Reserved[3];
182 } irdaAttribOctetSeq;
183 struct {
184 int Len;
185 u_char CharSet;
186 u_char UsrStr[1];
187 u_char Reserved[2];
188 } irdaAttribUsrStr;
189 } irdaAttribute;
190} WCE_IAS_SET,*PWCE_IAS_SET;
191
192typedef struct _WCE_IAS_QUERY {
193 u_char irdaDeviceID[4];
194 char irdaClassName[61];
195 char irdaAttribName[61];
196 u_short irdaAttribType;
197 union {
198 int irdaAttribInt;
199 struct {
200 int Len;
201 u_char OctetSeq[1];
202 u_char Reserved[3];
203 } irdaAttribOctetSeq;
204 struct {
205 int Len;
206 u_char CharSet;
207 u_char UsrStr[1];
208 u_char Reserved[2];
209 } irdaAttribUsrStr;
210 } irdaAttribute;
211} WCE_IAS_QUERY,*PWCE_IAS_QUERY;
212
213typedef WINDOWS_IAS_SET IAS_SET,*PIAS_SET,*LPIASSET;
214typedef WINDOWS_IAS_QUERY IAS_QUERY,*PIAS_QUERY,*LPIASQUERY;
215
216#ifdef __LP64__
217#pragma pop_macro("u_long")
218#endif
219
220#endif
Note: See TracBrowser for help on using the repository browser.