ReactOS  0.4.14-dev-49-gfb4591c
rnr20lib.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS WinSock 2 NSP
4  * FILE: include/reactos/winsock/rnr20lib.h
5  * PURPOSE: WinSock 2 NSP Header
6  */
7 
8 #ifndef __NSP_H
9 #define __NSP_H
10 
11 /* DEFINES *******************************************************************/
12 
13 /* Lookup Flags */
14 #define DONE 0x01
15 #define REVERSE 0x02
16 #define LOCAL 0x04
17 #define IANA 0x10
18 #define LOOPBACK 0x20
19 
20 /* Protocol Flags */
21 #define UDP 0x01
22 #define TCP 0x02
23 #define ATM 0x04
24 
25 /* GUID Masks */
26 #define NBT_MASK 0x01
27 #define DNS_MASK 0x02
28 
29 /* TYPES *********************************************************************/
30 
31 typedef struct _RNR_CONTEXT
32 {
52 
53 typedef struct _RNR_TEB_DATA
54 {
57 
58 /* PROTOTYPES ****************************************************************/
59 
60 /*
61  * proc.c
62  */
63 BOOLEAN
64 WINAPI
66 
67 /*
68  * oldutil.c
69  */
70 DWORD
71 WINAPI
73  PWCHAR ServiceString,
74  LPGUID ServiceType,
75  PSERVENT *ReverseServent
76 );
77 
78 DWORD
79 WINAPI
81  IN DWORD Type,
82  IN LPGUID Guid,
83  IN LPWSASERVICECLASSINFOW ServiceClassInfo
84 );
85 
87 WSPAPI
89  IN PSERVENT Servent,
90  IN OUT PULONG_PTR BufferPos,
91  IN OUT PULONG BufferFreeSize,
92  IN OUT PULONG BlobSize,
93  IN BOOLEAN Relative
94 );
95 
96 WORD
97 WINAPI
99  IN LPGUID Guid
100 );
101 
102 /*
103  * context.c
104  */
105 VOID
106 WSPAPI
108 
109 VOID
110 WSPAPI
111 RnrCtx_Release(PRNR_CONTEXT RnrContext);
112 
114 WSPAPI
115 RnrCtx_Get(
116  HANDLE LookupHandle,
117  DWORD dwControlFlags,
119 );
120 
122 WSPAPI
124  IN HANDLE LookupHandle,
126 );
127 
128 VOID
129 WSPAPI
131 
132 /*
133  * util.c
134  */
135 PVOID
136 WSPAPI
138 
139 /*
140  * lookup.c
141  */
142 PDNS_BLOB
143 WSPAPI
145 
146 PDNS_BLOB
147 WSPAPI
149 
150 PDNS_BLOB
151 WSPAPI
153 
154 BOOLEAN
155 WINAPI
156 Rnr_CheckIfUseNbt(PRNR_CONTEXT RnrContext);
157 
158 PDNS_BLOB
159 WINAPI
161 
162 PDNS_BLOB
163 WINAPI
165 
166 /*
167  * init.c
168  */
169 VOID
170 WSPAPI
172 
173 VOID
174 WSPAPI
176 
177 BOOLEAN
178 WSPAPI
180 
181 VOID
182 WSPAPI
184 
185 /*
186  * nsp.c
187  */
188 VOID
189 WSPAPI
191 
192 INT
193 WINAPI
194 Dns_NSPCleanup(IN LPGUID lpProviderId);
195 
196 INT
197 WINAPI
199  IN LPGUID lpProviderId,
200  IN LPWSASERVICECLASSINFOW lpServiceClassInfo,
201  IN LPWSAQUERYSETW lpqsRegInfo,
202  IN WSAESETSERVICEOP essOperation,
203  IN DWORD dwControlFlags
204 );
205 
206 INT
207 WINAPI
209  IN LPGUID lpProviderId,
210  IN LPWSASERVICECLASSINFOW lpServiceClassInfo
211 );
212 
213 INT
214 WINAPI
216  IN LPGUID lpProviderId,
217  IN LPGUID lpServiceCallId
218 );
219 
220 INT
221 WINAPI
223  IN LPGUID lpProviderId,
224  IN OUT LPDWORD lpdwBufSize,
225  IN OUT LPWSASERVICECLASSINFOW lpServiceClassInfo
226 );
227 
228 INT
229 WINAPI
231  LPGUID lpProviderId,
232  LPWSAQUERYSETW lpqsRestrictions,
233  LPWSASERVICECLASSINFOW lpServiceClassInfo,
234  DWORD dwControlFlags,
235  LPHANDLE lphLookup
236 );
237 
238 INT
239 WINAPI
241  IN HANDLE hLookup,
242  IN DWORD dwControlFlags,
244  OUT LPWSAQUERYSETW lpqsResults
245 );
246 
247 INT
248 WINAPI
250 
251 INT
252 WINAPI
254  IN LPGUID lpProviderId,
255  IN OUT LPNSP_ROUTINE lpsnpRoutines
256 );
257 
258 /* Unchecked yet */
259 #define ATM_ADDRESS_LENGTH 20
260 #define WS2_INTERNAL_MAX_ALIAS 16
261 #define MAX_HOSTNAME_LEN 256
262 #define MAXADDRS 16
263 
264 #endif
265 
#define IN
Definition: typedefs.h:38
DWORD ProtocolFlags
Definition: rnr20lib.h:46
INT WINAPI Dns_NSPInstallServiceClass(IN LPGUID lpProviderId, IN LPWSASERVICECLASSINFOW lpServiceClassInfo)
ULONG Foo
Definition: rnr20lib.h:55
Type
Definition: Type.h:6
PDNS_BLOB WSPAPI Rnr_DoHostnameLookup(IN PRNR_CONTEXT Context)
DWORD Signature
Definition: rnr20lib.h:36
DWORD UdpPort
Definition: rnr20lib.h:44
PRNR_CONTEXT WSPAPI RnrCtx_Create(IN HANDLE LookupHandle, IN LPWSTR ServiceName)
VOID WSPAPI Rnr_ThreadCleanup(VOID)
DWORD dwControlFlags
Definition: rnr20lib.h:43
static LPWSAQUERYSETW
Definition: sock.c:91
uint16_t * PWCHAR
Definition: typedefs.h:54
Definition: nspapi.h:57
int32_t INT
Definition: typedefs.h:56
BOOLEAN WINAPI Rnr_CheckIfUseNbt(PRNR_CONTEXT RnrContext)
PDNS_BLOB WSPAPI Rnr_GetHostByAddr(IN PRNR_CONTEXT Context)
PDNS_BLOB WSPAPI Rnr_DoDnsLookup(IN PRNR_CONTEXT Context)
PDNS_BLOB WINAPI Rnr_NbtResolveAddr(IN IN_ADDR Address)
DWORD RnrId
Definition: rnr20lib.h:40
DWORD TcpPort
Definition: rnr20lib.h:45
INT WINAPI Dns_NSPRemoveServiceClass(IN LPGUID lpProviderId, IN LPGUID lpServiceCallId)
VOID WSPAPI RnrCtx_Release(PRNR_CONTEXT RnrContext)
unsigned char BOOLEAN
static GUID * Guid
Definition: apphelp.c:93
static WCHAR Address[46]
Definition: ping.c:68
DWORD Instance
Definition: rnr20lib.h:38
DWORD WINAPI GetServerAndProtocolsFromString(PWCHAR ServiceString, LPGUID ServiceType, PSERVENT *ReverseServent)
DWORD RrType
Definition: rnr20lib.h:42
PDNS_BLOB WINAPI Rnr_NbtResolveName(IN LPWSTR Name)
INT WINAPI Dns_NSPGetServiceClassInfo(IN LPGUID lpProviderId, IN OUT LPDWORD lpdwBufSize, IN OUT LPWSASERVICECLASSINFOW lpServiceClassInfo)
PSERVENT WSPAPI CopyServEntry(IN PSERVENT Servent, IN OUT PULONG_PTR BufferPos, IN OUT PULONG BufferFreeSize, IN OUT PULONG BlobSize, IN BOOLEAN Relative)
DWORD WINAPI FetchPortFromClassInfo(IN DWORD Type, IN LPGUID Guid, IN LPWSASERVICECLASSINFOW ServiceClassInfo)
LPTSTR ServiceName
Definition: ServiceMain.c:15
GUID lpProviderId
Definition: rnr20lib.h:49
__wchar_t WCHAR
Definition: xmlstorage.h:180
Definition: tcpip.h:125
BOOLEAN WINAPI RNRPROV_SockEnterApi(VOID)
enum _WSAESETSERVICEOP WSAESETSERVICEOP
#define WINAPI
Definition: msvc.h:8
BLOB CachedBlob
Definition: rnr20lib.h:47
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _RNR_TEB_DATA * PRNR_TEB_DATA
INT WINAPI Dns_NSPStartup(IN LPGUID lpProviderId, IN OUT LPNSP_ROUTINE lpsnpRoutines)
VOID WSPAPI Nsp_GlobalCleanup(VOID)
WORD WINAPI GetDnsQueryTypeFromGuid(IN LPGUID Guid)
VOID WSPAPI RnrCtx_ListCleanup(VOID)
INT WINAPI Dns_NSPLookupServiceEnd(IN HANDLE hLookup)
GUID lpServiceClassId
Definition: rnr20lib.h:48
Definition: typedefs.h:117
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
INT WINAPI Dns_NSPLookupServiceNext(IN HANDLE hLookup, IN DWORD dwControlFlags, IN OUT LPDWORD lpdwBufferLength, OUT LPWSAQUERYSETW lpqsResults)
struct _RNR_CONTEXT * PRNR_CONTEXT
DWORD RefCount
Definition: rnr20lib.h:37
INT WINAPI Dns_NSPCleanup(IN LPGUID lpProviderId)
VOID WSPAPI Rnr_ProcessCleanup(VOID)
LIST_ENTRY ListEntry
Definition: rnr20lib.h:33
struct _RNR_CONTEXT RNR_CONTEXT
WCHAR ServiceName[1]
Definition: rnr20lib.h:50
unsigned int * PULONG
Definition: retypes.h:1
INT WINAPI Dns_NSPLookupServiceBegin(LPGUID lpProviderId, LPWSAQUERYSETW lpqsRestrictions, LPWSASERVICECLASSINFOW lpServiceClassInfo, DWORD dwControlFlags, LPHANDLE lphLookup)
PVOID WSPAPI Temp_AllocZero(IN DWORD Size)
IN PVOID Instance
Definition: pci.h:359
DWORD LookupFlags
Definition: rnr20lib.h:39
struct _RNR_TEB_DATA RNR_TEB_DATA
#define OUT
Definition: typedefs.h:39
uint32_t * LPDWORD
Definition: typedefs.h:57
PRNR_CONTEXT WSPAPI RnrCtx_Get(HANDLE LookupHandle, DWORD dwControlFlags, PLONG Instance)
unsigned int ULONG
Definition: retypes.h:1
uint32_t * PULONG_PTR
Definition: typedefs.h:63
VOID WSPAPI RnrCtx_DecInstance(IN PRNR_CONTEXT RnrContext)
PDNS_BLOB CachedSaBlob
Definition: rnr20lib.h:35
BOOLEAN WSPAPI Rnr_ThreadInit(VOID)
DWORD dwNameSpace
Definition: rnr20lib.h:41
_In_ _In_opt_ _Out_writes_bytes_to_opt_ lpdwBufferLength _Inout_ LPDWORD lpdwBufferLength
Definition: winhttp.h:675
WCHAR * LPWSTR
Definition: xmlstorage.h:184
INT WINAPI Dns_NSPSetService(IN LPGUID lpProviderId, IN LPWSASERVICECLASSINFOW lpServiceClassInfo, IN LPWSAQUERYSETW lpqsRegInfo, IN WSAESETSERVICEOP essOperation, IN DWORD dwControlFlags)
signed int * PLONG
Definition: retypes.h:5
HANDLE Handle
Definition: rnr20lib.h:34
VOID WSPAPI Rnr_ProcessInit(VOID)
#define WSPAPI
Definition: ws2spi.h:39