ReactOS 0.4.15-dev-8064-gdaf8068
ws2bth.h
Go to the documentation of this file.
1#pragma once
2
3#if (NTDDI_VERSION >= NTDDI_WINXPSP2)
4
5#include <bthdef.h>
6
7#include <pshpack1.h>
8
9#define BT_PORT_ANY ((ULONG)-1)
10#define BT_PORT_MIN 0x1
11#define BT_PORT_MAX 0xffff
12#define BT_PORT_DYN_FIRST 0x1001
13
14#ifndef AF_BTH
15#define AF_BTH 32
16#endif
17#ifndef PF_BTH
18#define PF_BTH AF_BTH
19#endif
20#ifndef NS_BTH
21#define NS_BTH 16
22#endif
23
24DEFINE_GUID(SVCID_BTH_PROVIDER, 0x6aa63e0, 0x7d60, 0x41ff, 0xaf, 0xb2, 0x3e, 0xe6, 0xd2, 0xd9, 0x39, 0x2d);
25
26#define BTH_ADDR_STRING_SIZE 12
27
28#define BTHPROTO_RFCOMM 0x0003
29#define BTHPROTO_L2CAP 0x0100
30
31#define SOL_RFCOMM BTHPROTO_RFCOMM
32#define SOL_L2CAP BTHPROTO_L2CAP
33#define SOL_SDP 0x0101
34
35#define SO_BTH_AUTHENTICATE 0x80000001
36#define SO_BTH_ENCRYPT 0x00000002
37#define SO_BTH_MTU 0x80000007
38#define SO_BTH_MTU_MAX 0x80000008
39#define SO_BTH_MTU_MIN 0x8000000a
40
41#define RFCOMM_MAX_MTU 0x000003F3
42#define RFCOMM_MIN_MTU 0x00000017
43
44#define BTH_SDP_VERSION 1
45
46#define SDP_DEFAULT_INQUIRY_SECONDS 6
47#define SDP_MAX_INQUIRY_SECONDS 60
48
49#define SDP_DEFAULT_INQUIRY_MAX_RESPONSES 255
50
51#define SDP_SERVICE_SEARCH_REQUEST 1
52#define SDP_SERVICE_ATTRIBUTE_REQUEST 2
53#define SDP_SERVICE_SEARCH_ATTRIBUTE_REQUEST 3
54
55#define BTHNS_RESULT_DEVICE_CONNECTED 0x00010000
56#define BTHNS_RESULT_DEVICE_REMEMBERED 0x00020000
57#define BTHNS_RESULT_DEVICE_AUTHENTICATED 0x00040000
58
59#define SIO_RFCOMM_SEND_COMMAND _WSAIORW (IOC_VENDOR, 101)
60#define SIO_RFCOMM_WAIT_COMMAND _WSAIORW (IOC_VENDOR, 102)
61
62#define SIO_BTH_PING _WSAIORW (IOC_VENDOR, 8)
63#define SIO_BTH_INFO _WSAIORW (IOC_VENDOR, 9)
64#define SIO_RFCOMM_SESSION_FLOW_OFF _WSAIORW (IOC_VENDOR, 103)
65#define SIO_RFCOMM_TEST _WSAIORW (IOC_VENDOR, 104)
66#define SIO_RFCOMM_USECFC _WSAIORW (IOC_VENDOR, 105)
67
68#ifndef BIT
69#define BIT(b) (1<<(b))
70#endif
71
72#define MSC_EA_BIT EA_BIT
73#define MSC_FC_BIT BIT(1)
74#define MSC_RTC_BIT BIT(2)
75#define MSC_RTR_BIT BIT(3)
76#define MSC_RESERVED (BIT(4)|BIT(5))
77#define MSC_IC_BIT BIT(6)
78#define MSC_DV_BIT BIT(7)
79#define MSC_BREAK_BIT BIT(1)
80#define MSC_SET_BREAK_LENGTH(b, l) ((b) = ((b)&0x3) | (((l)&0xf) << 4))
81
82#define RLS_ERROR 0x01
83#define RLS_OVERRUN 0x02
84#define RLS_PARITY 0x04
85#define RLS_FRAMING 0x08
86
87#define RPN_BAUD_2400 0
88#define RPN_BAUD_4800 1
89#define RPN_BAUD_7200 2
90#define RPN_BAUD_9600 3
91#define RPN_BAUD_19200 4
92#define RPN_BAUD_38400 5
93#define RPN_BAUD_57600 6
94#define RPN_BAUD_115200 7
95#define RPN_BAUD_230400 8
96
97#define RPN_DATA_5 0x0
98#define RPN_DATA_6 0x1
99#define RPN_DATA_7 0x2
100#define RPN_DATA_8 0x3
101
102#define RPN_STOP_1 0x0
103#define RPN_STOP_1_5 0x4
104
105#define RPN_PARITY_NONE 0x00
106#define RPN_PARITY_ODD 0x08
107#define RPN_PARITY_EVEN 0x18
108#define RPN_PARITY_MARK 0x28
109#define RPN_PARITY_SPACE 0x38
110
111#define RPN_FLOW_X_IN 0x01
112#define RPN_FLOW_X_OUT 0x02
113#define RPN_FLOW_RTR_IN 0x04
114#define RPN_FLOW_RTR_OUT 0x08
115#define RPN_FLOW_RTC_IN 0x10
116#define RPN_FLOW_RTC_OUT 0x20
117
118#define RPN_PARAM_BAUD 0x01
119#define RPN_PARAM_DATA 0x02
120#define RPN_PARAM_STOP 0x04
121#define RPN_PARAM_PARITY 0x08
122#define RPN_PARAM_P_TYPE 0x10
123#define RPN_PARAM_XON 0x20
124#define RPN_PARAM_XOFF 0x40
125#define RPN_PARAM_X_IN 0x01
126#define RPN_PARAM_X_OUT 0x02
127#define RPN_PARAM_RTR_IN 0x04
128#define RPN_PARAM_RTR_OUT 0x08
129#define RPN_PARAM_RTC_IN 0x10
130#define RPN_PARAM_RTC_OUT 0x20
131
132#define RFCOMM_CMD_NONE 0
133#define RFCOMM_CMD_MSC 1
134#define RFCOMM_CMD_RLS 2
135#define RFCOMM_CMD_RPN 3
136#define RFCOMM_CMD_RPN_REQUEST 4
137#define RFCOMM_CMD_RPN_RESPONSE 5
138
139
140
141
142
143
144
145typedef struct _SOCKADDR_BTH {
151
152typedef struct _BTH_SET_SERVICE {
160
161typedef struct _BTH_QUERY_DEVICE {
165
166typedef struct _BTH_QUERY_SERVICE {
171 SdpAttributeRange pRange[1];
173
174typedef struct _RFCOMM_MSC_DATA {
178
179typedef struct _RFCOMM_RLS_DATA {
182
183typedef struct _RFCOMM_RPN_DATA {
192
193typedef struct _RFCOMM_COMMAND {
195 union {
201
202typedef struct _BTH_PING_REQ {
207
208typedef struct _BTH_PING_RSP {
212
213typedef struct _BTH_INFO_REQ {
217
218typedef struct _BTH_INFO_RSP {
221 union {
224 };
226
230
231#include <poppack.h>
232
233#endif /* (NTDDI_VERSION >= NTDDI_WINXPSP2) */
#define MAX_L2CAP_INFO_DATA_LENGTH
Definition: bthdef.h:418
#define MAX_UUIDS_IN_QUERY
Definition: bthdef.h:456
#define MAX_L2CAP_PING_DATA_LENGTH
Definition: bthdef.h:417
__MINGW_EXTENSION typedef ULONGLONG BTH_ADDR
Definition: bthdef.h:16
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
unsigned short USHORT
Definition: pedump.c:61
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
USHORT infoType
Definition: ws2bth.h:215
BTH_ADDR btAddr
Definition: ws2bth.h:214
UCHAR dataLen
Definition: ws2bth.h:220
USHORT result
Definition: ws2bth.h:219
USHORT connectionlessMTU
Definition: ws2bth.h:222
BTH_ADDR btAddr
Definition: ws2bth.h:203
UCHAR dataLen
Definition: ws2bth.h:204
UCHAR dataLen
Definition: ws2bth.h:209
ULONG serviceHandle
Definition: ws2bth.h:168
SdpAttributeRange pRange[1]
Definition: ws2bth.h:171
SdpQueryUuid uuids[MAX_UUIDS_IN_QUERY]
Definition: ws2bth.h:169
PULONG pSdpVersion
Definition: ws2bth.h:153
HANDLE * pRecordHandle
Definition: ws2bth.h:154
ULONG fCodService
Definition: ws2bth.h:155
UCHAR pRecord[1]
Definition: ws2bth.h:158
ULONG ulRecordLength
Definition: ws2bth.h:157
ULONG CmdType
Definition: ws2bth.h:194
RFCOMM_RPN_DATA RPN
Definition: ws2bth.h:198
RFCOMM_RLS_DATA RLS
Definition: ws2bth.h:197
union _RFCOMM_COMMAND::@3367 Data
RFCOMM_MSC_DATA MSC
Definition: ws2bth.h:196
UCHAR Signals
Definition: ws2bth.h:175
UCHAR LineStatus
Definition: ws2bth.h:180
UCHAR XonChar
Definition: ws2bth.h:187
UCHAR ParameterMask1
Definition: ws2bth.h:189
UCHAR ParameterMask2
Definition: ws2bth.h:190
UCHAR FlowControl
Definition: ws2bth.h:186
UCHAR XoffChar
Definition: ws2bth.h:188
USHORT addressFamily
Definition: ws2bth.h:146
BTH_ADDR btAddr
Definition: ws2bth.h:147
GUID serviceClassId
Definition: ws2bth.h:148
ULONG port
Definition: ws2bth.h:149
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
struct _BTH_QUERY_DEVICE * PBTHNS_INQUIRYBLOB
Definition: ws2bth.h:228
struct _RFCOMM_RPN_DATA RFCOMM_RPN_DATA
struct _RFCOMM_MSC_DATA * PRFCOMM_MSC_DATA
struct _BTH_QUERY_DEVICE BTH_QUERY_DEVICE
struct _SOCKADDR_BTH * PSOCKADDR_BTH
struct _RFCOMM_RLS_DATA RFCOMM_RLS_DATA
struct _BTH_PING_REQ BTH_PING_REQ
struct _BTH_SET_SERVICE * PBTHNS_SETBLOB
Definition: ws2bth.h:227
struct _BTH_QUERY_SERVICE * PBTH_QUERY_SERVICE
struct _BTH_QUERY_SERVICE * PBTHNS_RESTRICTIONBLOB
Definition: ws2bth.h:229
struct _BTH_QUERY_SERVICE BTH_QUERY_SERVICE
struct _BTH_INFO_RSP * PBTH_INFO_RSP
struct _BTH_INFO_REQ * PBTH_INFO_REQ
struct _BTH_SET_SERVICE * PBTH_SET_SERVICE
struct _BTH_PING_RSP BTH_PING_RSP
struct _RFCOMM_RLS_DATA * PRFCOMM_RLS_DATA
struct _RFCOMM_COMMAND * PRFCOMM_COMMAND
struct _BTH_QUERY_DEVICE * PBTH_QUERY_DEVICE
struct _BTH_INFO_REQ BTH_INFO_REQ
struct _RFCOMM_COMMAND RFCOMM_COMMAND
struct _BTH_INFO_RSP BTH_INFO_RSP
struct _RFCOMM_RPN_DATA * PRFCOMM_RPN_DATA
struct _BTH_PING_RSP * PBTH_PING_RSP
struct _BTH_PING_REQ * PBTH_PING_REQ
struct _RFCOMM_MSC_DATA RFCOMM_MSC_DATA
struct _BTH_SET_SERVICE BTH_SET_SERVICE
struct _SOCKADDR_BTH SOCKADDR_BTH
unsigned char UCHAR
Definition: xmlstorage.h:181