Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenws2bth.h
Go to the documentation of this file.
00001 #pragma once 00002 00003 #if (NTDDI_VERSION >= NTDDI_WINXPSP2) 00004 00005 #include <bthdef.h> 00006 00007 #include <pshpack1.h> 00008 00009 #define BT_PORT_ANY ((ULONG)-1) 00010 #define BT_PORT_MIN 0x1 00011 #define BT_PORT_MAX 0xffff 00012 #define BT_PORT_DYN_FIRST 0x1001 00013 00014 #ifndef AF_BTH 00015 #define AF_BTH 32 00016 #endif 00017 #ifndef PF_BTH 00018 #define PF_BTH AF_BTH 00019 #endif 00020 #ifndef NS_BTH 00021 #define NS_BTH 16 00022 #endif 00023 00024 DEFINE_GUID(SVCID_BTH_PROVIDER, 0x6aa63e0, 0x7d60, 0x41ff, 0xaf, 0xb2, 0x3e, 0xe6, 0xd2, 0xd9, 0x39, 0x2d); 00025 00026 #define BTH_ADDR_STRING_SIZE 12 00027 00028 #define BTHPROTO_RFCOMM 0x0003 00029 #define BTHPROTO_L2CAP 0x0100 00030 00031 #define SOL_RFCOMM BTHPROTO_RFCOMM 00032 #define SOL_L2CAP BTHPROTO_L2CAP 00033 #define SOL_SDP 0x0101 00034 00035 #define SO_BTH_AUTHENTICATE 0x80000001 00036 #define SO_BTH_ENCRYPT 0x00000002 00037 #define SO_BTH_MTU 0x80000007 00038 #define SO_BTH_MTU_MAX 0x80000008 00039 #define SO_BTH_MTU_MIN 0x8000000a 00040 00041 #define RFCOMM_MAX_MTU 0x000003F3 00042 #define RFCOMM_MIN_MTU 0x00000017 00043 00044 #define BTH_SDP_VERSION 1 00045 00046 #define SDP_DEFAULT_INQUIRY_SECONDS 6 00047 #define SDP_MAX_INQUIRY_SECONDS 60 00048 00049 #define SDP_DEFAULT_INQUIRY_MAX_RESPONSES 255 00050 00051 #define SDP_SERVICE_SEARCH_REQUEST 1 00052 #define SDP_SERVICE_ATTRIBUTE_REQUEST 2 00053 #define SDP_SERVICE_SEARCH_ATTRIBUTE_REQUEST 3 00054 00055 #define BTHNS_RESULT_DEVICE_CONNECTED 0x00010000 00056 #define BTHNS_RESULT_DEVICE_REMEMBERED 0x00020000 00057 #define BTHNS_RESULT_DEVICE_AUTHENTICATED 0x00040000 00058 00059 #define SIO_RFCOMM_SEND_COMMAND _WSAIORW (IOC_VENDOR, 101) 00060 #define SIO_RFCOMM_WAIT_COMMAND _WSAIORW (IOC_VENDOR, 102) 00061 00062 #define SIO_BTH_PING _WSAIORW (IOC_VENDOR, 8) 00063 #define SIO_BTH_INFO _WSAIORW (IOC_VENDOR, 9) 00064 #define SIO_RFCOMM_SESSION_FLOW_OFF _WSAIORW (IOC_VENDOR, 103) 00065 #define SIO_RFCOMM_TEST _WSAIORW (IOC_VENDOR, 104) 00066 #define SIO_RFCOMM_USECFC _WSAIORW (IOC_VENDOR, 105) 00067 00068 #ifndef BIT 00069 #define BIT(b) (1<<(b)) 00070 #endif 00071 00072 #define MSC_EA_BIT EA_BIT 00073 #define MSC_FC_BIT BIT(1) 00074 #define MSC_RTC_BIT BIT(2) 00075 #define MSC_RTR_BIT BIT(3) 00076 #define MSC_RESERVED (BIT(4)|BIT(5)) 00077 #define MSC_IC_BIT BIT(6) 00078 #define MSC_DV_BIT BIT(7) 00079 #define MSC_BREAK_BIT BIT(1) 00080 #define MSC_SET_BREAK_LENGTH(b, l) ((b) = ((b)&0x3) | (((l)&0xf) << 4)) 00081 00082 #define RLS_ERROR 0x01 00083 #define RLS_OVERRUN 0x02 00084 #define RLS_PARITY 0x04 00085 #define RLS_FRAMING 0x08 00086 00087 #define RPN_BAUD_2400 0 00088 #define RPN_BAUD_4800 1 00089 #define RPN_BAUD_7200 2 00090 #define RPN_BAUD_9600 3 00091 #define RPN_BAUD_19200 4 00092 #define RPN_BAUD_38400 5 00093 #define RPN_BAUD_57600 6 00094 #define RPN_BAUD_115200 7 00095 #define RPN_BAUD_230400 8 00096 00097 #define RPN_DATA_5 0x0 00098 #define RPN_DATA_6 0x1 00099 #define RPN_DATA_7 0x2 00100 #define RPN_DATA_8 0x3 00101 00102 #define RPN_STOP_1 0x0 00103 #define RPN_STOP_1_5 0x4 00104 00105 #define RPN_PARITY_NONE 0x00 00106 #define RPN_PARITY_ODD 0x08 00107 #define RPN_PARITY_EVEN 0x18 00108 #define RPN_PARITY_MARK 0x28 00109 #define RPN_PARITY_SPACE 0x38 00110 00111 #define RPN_FLOW_X_IN 0x01 00112 #define RPN_FLOW_X_OUT 0x02 00113 #define RPN_FLOW_RTR_IN 0x04 00114 #define RPN_FLOW_RTR_OUT 0x08 00115 #define RPN_FLOW_RTC_IN 0x10 00116 #define RPN_FLOW_RTC_OUT 0x20 00117 00118 #define RPN_PARAM_BAUD 0x01 00119 #define RPN_PARAM_DATA 0x02 00120 #define RPN_PARAM_STOP 0x04 00121 #define RPN_PARAM_PARITY 0x08 00122 #define RPN_PARAM_P_TYPE 0x10 00123 #define RPN_PARAM_XON 0x20 00124 #define RPN_PARAM_XOFF 0x40 00125 #define RPN_PARAM_X_IN 0x01 00126 #define RPN_PARAM_X_OUT 0x02 00127 #define RPN_PARAM_RTR_IN 0x04 00128 #define RPN_PARAM_RTR_OUT 0x08 00129 #define RPN_PARAM_RTC_IN 0x10 00130 #define RPN_PARAM_RTC_OUT 0x20 00131 00132 #define RFCOMM_CMD_NONE 0 00133 #define RFCOMM_CMD_MSC 1 00134 #define RFCOMM_CMD_RLS 2 00135 #define RFCOMM_CMD_RPN 3 00136 #define RFCOMM_CMD_RPN_REQUEST 4 00137 #define RFCOMM_CMD_RPN_RESPONSE 5 00138 00139 00140 00141 00142 00143 00144 00145 typedef struct _SOCKADDR_BTH { 00146 USHORT addressFamily; 00147 BTH_ADDR btAddr; 00148 GUID serviceClassId; 00149 ULONG port; 00150 } SOCKADDR_BTH, *PSOCKADDR_BTH; 00151 00152 typedef struct _BTH_SET_SERVICE { 00153 PULONG pSdpVersion; 00154 HANDLE *pRecordHandle; 00155 ULONG fCodService; 00156 ULONG Reserved[5]; 00157 ULONG ulRecordLength; 00158 UCHAR pRecord[1]; 00159 } BTH_SET_SERVICE, *PBTH_SET_SERVICE; 00160 00161 typedef struct _BTH_QUERY_DEVICE { 00162 ULONG LAP; 00163 UCHAR length; 00164 } BTH_QUERY_DEVICE, *PBTH_QUERY_DEVICE; 00165 00166 typedef struct _BTH_QUERY_SERVICE { 00167 ULONG type; 00168 ULONG serviceHandle; 00169 SdpQueryUuid uuids[MAX_UUIDS_IN_QUERY]; 00170 ULONG numRange; 00171 SdpAttributeRange pRange[1]; 00172 } BTH_QUERY_SERVICE, *PBTH_QUERY_SERVICE; 00173 00174 typedef struct _RFCOMM_MSC_DATA { 00175 UCHAR Signals; 00176 UCHAR Break; 00177 } RFCOMM_MSC_DATA, *PRFCOMM_MSC_DATA; 00178 00179 typedef struct _RFCOMM_RLS_DATA { 00180 UCHAR LineStatus; 00181 } RFCOMM_RLS_DATA, *PRFCOMM_RLS_DATA; 00182 00183 typedef struct _RFCOMM_RPN_DATA { 00184 UCHAR Baud; 00185 UCHAR Data; 00186 UCHAR FlowControl; 00187 UCHAR XonChar; 00188 UCHAR XoffChar; 00189 UCHAR ParameterMask1; 00190 UCHAR ParameterMask2; 00191 } RFCOMM_RPN_DATA, *PRFCOMM_RPN_DATA; 00192 00193 typedef struct _RFCOMM_COMMAND { 00194 ULONG CmdType; 00195 union { 00196 RFCOMM_MSC_DATA MSC; 00197 RFCOMM_RLS_DATA RLS; 00198 RFCOMM_RPN_DATA RPN; 00199 } Data; 00200 } RFCOMM_COMMAND, *PRFCOMM_COMMAND; 00201 00202 typedef struct _BTH_PING_REQ { 00203 BTH_ADDR btAddr; 00204 UCHAR dataLen; 00205 UCHAR data[MAX_L2CAP_PING_DATA_LENGTH]; 00206 } BTH_PING_REQ, *PBTH_PING_REQ; 00207 00208 typedef struct _BTH_PING_RSP { 00209 UCHAR dataLen; 00210 UCHAR data[MAX_L2CAP_PING_DATA_LENGTH]; 00211 } BTH_PING_RSP, *PBTH_PING_RSP; 00212 00213 typedef struct _BTH_INFO_REQ { 00214 BTH_ADDR btAddr; 00215 USHORT infoType; 00216 } BTH_INFO_REQ, *PBTH_INFO_REQ; 00217 00218 typedef struct _BTH_INFO_RSP { 00219 USHORT result; 00220 UCHAR dataLen; 00221 union { 00222 USHORT connectionlessMTU; 00223 UCHAR data[MAX_L2CAP_INFO_DATA_LENGTH]; 00224 }; 00225 } BTH_INFO_RSP, *PBTH_INFO_RSP; 00226 00227 typedef struct _BTH_SET_SERVICE BTHNS_SETBLOB, *PBTHNS_SETBLOB; 00228 typedef struct _BTH_QUERY_DEVICE BTHNS_INQUIRYBLOB, *PBTHNS_INQUIRYBLOB; 00229 typedef struct _BTH_QUERY_SERVICE BTHNS_RESTRICTIONBLOB, *PBTHNS_RESTRICTIONBLOB; 00230 00231 #include <poppack.h> 00232 00233 #endif /* (NTDDI_VERSION >= NTDDI_WINXPSP2) */ Generated on Mon May 28 2012 04:32:44 for ReactOS by
1.7.6.1
|