ReactOS  r73918
wsk.h
Go to the documentation of this file.
1 /*
2  * wsk.h
3  *
4  * Windows Sockets Kernel-Mode Interface
5  *
6  * This file is part of the ReactOS DDK package.
7  *
8  * Contributors:
9  * Timo Kreuzer (timo.kreuzer@reactos.org)
10  *
11  * THIS SOFTWARE IS NOT COPYRIGHTED
12  *
13  * This source code is offered for use in the public domain. You may
14  * use, modify or distribute it freely.
15  *
16  * This code is distributed in the hope that it will be useful but
17  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18  * DISCLAIMED. This includes but is not limited to warranties of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20  *
21  */
22 #pragma once
23 #define _WSK_
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #include <netioddk.h>
30 #include <ws2def.h>
31 #include <mswsockdef.h>
32 
34 
35 #define WSKAPI NTAPI
36 
37 #define MAKE_WSK_VERSION(Mj, Mn) ((USHORT)((Mj) << 8) | (USHORT)((Mn) & 0xff))
38 #define WSK_MAJOR_VERSION(V) ((UCHAR)((V) >> 8))
39 #define WSK_MINOR_VERSION(V) ((UCHAR)(V))
40 #define WSK_FLAG_AT_DISPATCH_LEVEL 0x00000008
41 #define WSK_FLAG_RELEASE_ASAP 0x00000002
42 #define WSK_FLAG_ENTIRE_MESSAGE 0x00000004
43 #define WSK_FLAG_ABORTIVE 0x00000001
44 #define WSK_FLAG_BASIC_SOCKET 0x00000000
45 #define WSK_FLAG_LISTEN_SOCKET 0x00000001
46 #define WSK_FLAG_CONNECTION_SOCKET 0x00000002
47 #define WSK_FLAG_DATAGRAM_SOCKET 0x00000004
48 #define WSK_TRANSPORT_LIST_QUERY 2
49 #define WSK_TRANSPORT_LIST_CHANGE 3
50 #define WSK_CACHE_SD 4
51 #define WSK_RELEASE_SD 5
52 #define WSK_TDI_DEVICENAME_MAPPING 6
53 #define WSK_SET_STATIC_EVENT_CALLBACKS 7
54 #define WSK_TDI_BEHAVIOR 8
55 #define WSK_TDI_BEHAVIOR_BYPASS_TDI 0x00000001
56 #define SO_WSK_SECURITY (WSK_SO_BASE+1)
57 #define SO_WSK_EVENT_CALLBACK (WSK_SO_BASE+2)
58 #define WSK_EVENT_RECEIVE_FROM 0x00000100
59 #define WSK_EVENT_ACCEPT 0x00000200
60 #define WSK_EVENT_SEND_BACKLOG 0x00000010
61 #define WSK_EVENT_RECEIVE 0x00000040
62 #define WSK_EVENT_DISCONNECT 0x00000080
63 #define WSK_EVENT_DISABLE 0x80000000
64 #define SIO_WSK_SET_REMOTE_ADDRESS _WSAIOW(IOC_WSK,0x1)
65 #define SIO_WSK_REGISTER_EXTENSION _WSAIORW(IOC_WSK,0x2)
66 #define SIO_WSK_QUERY_IDEAL_SEND_BACKLOG _WSAIOR(IOC_WSK,0x3)
67 #define SIO_WSK_QUERY_RECEIVE_BACKLOG _WSAIOR(IOC_WSK,0x4)
68 #define SIO_WSK_QUERY_INSPECT_ID _WSAIOR(IOC_WSK,0x5)
69 #define SIO_WSK_SET_SENDTO_ADDRESS _WSAIOW(IOC_WSK,0x6)
70 #define WSK_FLAG_NODELAY 0x00000002
71 #define WSK_FLAG_WAITALL 0x00000002
72 #define WSK_FLAG_DRAIN 0x00000004
73 #define WSK_NO_WAIT 0
74 #define WSK_INFINITE_WAIT 0xffffffff
75 
76 typedef enum
77 {
83 
84 typedef enum
85 {
91 
93 
94 typedef struct _WSK_SOCKET
95 {
96  const VOID *Dispatch;
98 
99 typedef struct _WSK_BUF
100 {
104 } WSK_BUF, *PWSK_BUF;
105 
106 typedef struct _WSK_INSPECT_ID
107 {
111 
113 {
116  _Field_size_bytes_(ControlInfoLength) PCMSGHDR ControlInfo;
120 
121 typedef
123 NTSTATUS
126  _In_ ULONG Flags,
127  _In_opt_ PWSK_DATAGRAM_INDICATION DataIndication);
128 
130 {
131  struct _WSK_DATA_INDICATION *Next;
134 
135 typedef
137 NTSTATUS
140  _In_ ULONG Flags,
141  _In_opt_ PWSK_DATA_INDICATION DataIndication,
142  _In_ SIZE_T BytesIndicated,
143  _Inout_ SIZE_T *BytesAccepted);
144 
145 typedef
146 NTSTATUS
149  _In_ ULONG Flags);
150 
151 typedef
152 NTSTATUS
155  _In_ SIZE_T IdealBacklogSize);
156 
158 {
159  PFN_WSK_RECEIVE_EVENT WskReceiveEvent;
160  PFN_WSK_DISCONNECT_EVENT WskDisconnectEvent;
161  PFN_WSK_SEND_BACKLOG_EVENT WskSendBacklogEvent;
163 
164 typedef
167 NTSTATUS
168 (WSKAPI * PFN_WSK_ACCEPT_EVENT)(
173  _In_opt_ PWSK_SOCKET AcceptSocket,
176 
177 typedef
179 NTSTATUS
180 (WSKAPI * PFN_WSK_SOCKET_CONNECT)(
181  _In_ PWSK_CLIENT Client,
184  _In_ PSOCKADDR LocalAddress,
185  _In_ PSOCKADDR RemoteAddress,
186  _Reserved_ ULONG Flags,
187  _In_opt_ PVOID SocketContext,
192  _Inout_ PIRP Irp);
193 
194 typedef
195 NTSTATUS
197  _In_ PWSK_SOCKET Socket,
198  _In_ WSK_CONTROL_SOCKET_TYPE RequestType,
200  _In_ ULONG Level,
201  _In_ SIZE_T InputSize,
203  _In_ SIZE_T OutputSize,
205  _Out_opt_ SIZE_T *OutputSizeReturned,
206  _Inout_opt_ PIRP Irp);
207 
208 typedef
209 _At_(Socket, __drv_freesMem(Mem))
210 NTSTATUS
211 (WSKAPI * PFN_WSK_CLOSE_SOCKET)(
212  _In_ PWSK_SOCKET Socket,
213  _Inout_ PIRP Irp);
214 
216 {
218  PFN_WSK_CLOSE_SOCKET WskCloseSocket;
220 
221 typedef
222 NTSTATUS
223 (WSKAPI * PFN_WSK_BIND) (
224  _In_ PWSK_SOCKET Socket,
227  _Inout_ PIRP Irp);
228 
229 typedef
230 _At_(Irp->IoStatus.Information, __drv_allocatesMem(Mem))
231 NTSTATUS
232 (WSKAPI * PFN_WSK_ACCEPT)(
233  _In_ PWSK_SOCKET ListenSocket,
239  _Inout_ PIRP Irp);
240 
241 typedef
242 NTSTATUS
244  _In_ PWSK_SOCKET ListenSocket,
245  _In_ PWSK_INSPECT_ID InspectID,
247  _Inout_ PIRP Irp);
248 
249 typedef
250 NTSTATUS
252  _In_ PWSK_SOCKET Socket,
253  _Out_ PSOCKADDR LocalAddress,
254  _Inout_ PIRP Irp);
255 
257 {
258 #ifdef __cplusplus
260 #else
262 #endif
263  PFN_WSK_BIND WskBind;
264  PFN_WSK_ACCEPT WskAccept;
268 
269 #if (NTDDI_VERSION >= NTDDI_WIN8)
270 typedef struct _WSK_BUF_LIST {
274 
275 typedef
276 NTSTATUS
278  _In_ PWSK_SOCKET Socket,
279  _In_ PWSK_BUF_LIST BufferList,
283  _In_reads_bytes_opt_(ControlInfoLength) PCMSGHDR ControlInfo,
284  _Inout_ PIRP Irp);
285 #endif /* (NTDDI_VERSION >= NTDDI_WIN8) */
286 
288 {
289 #ifdef __cplusplus
291 #else
293 #endif
294  PFN_WSK_BIND WskBind;
299 #if (NTDDI_VERSION >= NTDDI_WIN8)
300  PFN_WSK_SEND_MESSAGES WskSendMessages;
301 #endif
303 
304 typedef
305 NTSTATUS
306 (WSKAPI * PFN_WSK_CONNECT) (
307  _In_ PWSK_SOCKET Socket,
310  _Inout_ PIRP Irp);
311 
312 typedef
313 NTSTATUS
315  _In_ PWSK_SOCKET Socket,
317  _Inout_ PIRP Irp);
318 
319 typedef
320 NTSTATUS
322  _In_ PWSK_SOCKET Socket,
323  _In_ PWSK_BUF Buffer,
324  _In_ ULONG Flags,
325  _Inout_ PIRP Irp);
326 
327 typedef
328 NTSTATUS
330  _In_ PWSK_SOCKET Socket,
331  _In_ PWSK_BUF Buffer,
332  _In_ ULONG Flags,
333  _Inout_ PIRP Irp);
334 
335 typedef
336 NTSTATUS
338  _In_ PWSK_SOCKET Socket,
339  _In_opt_ PWSK_BUF Buffer,
340  _In_ ULONG Flags,
341  _Inout_ PIRP Irp);
342 
343 typedef
344 NTSTATUS
346  _In_ PWSK_SOCKET Socket,
347  _In_ PWSK_DATA_INDICATION DataIndication);
348 
350 {
351 #ifdef __cplusplus
353 #else
355 #endif
356  PFN_WSK_BIND WskBind;
357  PFN_WSK_CONNECT WskConnect;
359  PFN_WSK_GET_REMOTE_ADDRESS WskGetRemoteAddress;
360  PFN_WSK_SEND WskSend;
361  PFN_WSK_RECEIVE WskReceive;
362  PFN_WSK_DISCONNECT WskDisconnect;
363  PFN_WSK_RELEASE_DATA_INDICATION_LIST WskRelease;
365 
366 typedef
373  _In_opt_ PWSK_INSPECT_ID InspectID);
374 
375 typedef
376 NTSTATUS
377 (WSKAPI * PFN_WSK_ABORT_EVENT) (
379  _In_ PWSK_INSPECT_ID InspectID);
380 
381 typedef
382 _At_(Irp->IoStatus.Information, __drv_allocatesMem(Mem))
383 NTSTATUS
384 (WSKAPI * PFN_WSK_SOCKET)(
385  _In_ PWSK_CLIENT Client,
389  _In_ ULONG Flags,
395  _Inout_ PIRP Irp);
396 
398 {
404 
405 typedef struct _WSK_TDI_MAP_INFO
406 {
408  _Field_size_(ElementCount) const WSK_TDI_MAP *Map;
410 
411 typedef
412 NTSTATUS
414  _In_ PWSK_CLIENT Client,
416  _In_ SIZE_T InputSize,
418  _In_ SIZE_T OutputSize,
420  _Out_opt_ SIZE_T *OutputSizeReturned,
421  _Inout_opt_ PIRP Irp);
422 
423 #if (NTDDI_VERSION >= NTDDI_WIN7)
424 
425 typedef
427 NTSTATUS
428 (WSKAPI * PFN_WSK_GET_ADDRESS_INFO)(
429  _In_ PWSK_CLIENT Client,
432  _In_opt_ ULONG NameSpace,
434  _In_opt_ PADDRINFOEXW Hints,
435  _Outptr_ PADDRINFOEXW *Result,
438  _Inout_ PIRP Irp);
439 
440 typedef
441 NTSTATUS
443  _In_ PWSK_CLIENT Client,
444  _In_ PSOCKADDR SockAddr,
445  _In_ ULONG SockAddrLength,
446  _Out_opt_ PUNICODE_STRING NodeName,
447  _Out_opt_ PUNICODE_STRING ServiceName,
448  _In_ ULONG Flags,
449  _In_opt_ PEPROCESS OwningProcess,
450  _In_opt_ PETHREAD OwningThread,
451  _Inout_ PIRP Irp);
452 
453 typedef
455 VOID
456 (WSKAPI * PFN_WSK_FREE_ADDRESS_INFO)(
457  _In_ PWSK_CLIENT Client,
458  _In_ PADDRINFOEXW AddrInfo);
459 
460 #endif /* if (NTDDI_VERSION >= NTDDI_WIN7) */
461 
463 {
467 
469 {
474 
476 {
480 
481 typedef
482 NTSTATUS
484  _In_ PWSK_SOCKET Socket,
485  _In_ PWSK_BUF Buffer,
489  _In_reads_bytes_opt_(ControlInfoLength) PCMSGHDR ControlInfo,
490  _Inout_ PIRP Irp);
491 
492 typedef
493 NTSTATUS
495  _In_ PWSK_SOCKET Socket,
496  _In_ PWSK_BUF Buffer,
497  _Reserved_ ULONG Flags,
499  _Inout_ PULONG ControlLength,
500  _Out_writes_bytes_opt_(*ControlLength) PCMSGHDR ControlInfo,
501  _Out_opt_ PULONG ControlFlags,
502  _Inout_ PIRP Irp);
503 
504 typedef
505 NTSTATUS
507  _In_ PWSK_SOCKET Socket,
508  _In_ PWSK_DATAGRAM_INDICATION DatagramIndication);
509 
510 typedef
511 NTSTATUS
515  _In_reads_bytes_opt_(InformationLength) PVOID Information,
516  _In_ SIZE_T InformationLength);
517 
519 {
524 
526 {
527  PFN_WSK_ACCEPT_EVENT WskAcceptEvent;
528  PFN_WSK_INSPECT_EVENT WskInspectEvent;
529  PFN_WSK_ABORT_EVENT WskAbortEvent;
531 
533 {
536 
538 {
541  PFN_WSK_SOCKET WskSocket;
542  PFN_WSK_SOCKET_CONNECT WskSocketConnect;
544 #if (NTDDI_VERSION >= NTDDI_WIN7)
545  PFN_WSK_GET_ADDRESS_INFO WskGetAddressInfo;
546  PFN_WSK_FREE_ADDRESS_INFO WskFreeAddressInfo;
548 #endif
550 
551 
552 typedef struct _WSK_CLIENT_NPI
553 {
557 
558 typedef struct _WSK_PROVIDER_NPI
559 {
560  PWSK_CLIENT Client;
563 
564 typedef struct _WSK_REGISTRATION
565 {
570 
572 {
576 
577 typedef struct _WSK_TRANSPORT
578 {
585 
587 NTSTATUS
589  _In_ PWSK_CLIENT_NPI WskClientNpi,
590  _Out_ PWSK_REGISTRATION WskRegistration);
591 
593 NTSTATUS
595  _In_ PWSK_REGISTRATION WskRegistration,
596  _In_ ULONG WaitTimeout,
597  _Out_ PWSK_PROVIDER_NPI WskProviderNpi);
598 
599 VOID
601  _In_ PWSK_REGISTRATION WskRegistration);
602 
604 NTSTATUS
606  _In_ PWSK_REGISTRATION WskRegistration,
607  _Out_ PWSK_PROVIDER_CHARACTERISTICS WskProviderCharacteristics);
608 
609 VOID
611  _In_ PWSK_REGISTRATION WskRegistration);
612 
613 #ifdef __cplusplus
614 }
615 #endif
616 
617 
_Must_inspect_result_ NTSTATUS(WSKAPI * PFN_WSK_RECEIVE_FROM_EVENT)(_In_opt_ PVOID SocketContext, _In_ ULONG Flags, _In_opt_ PWSK_DATAGRAM_INDICATION DataIndication)
Definition: wsk.h:124
struct _WSK_PROVIDER_LISTEN_DISPATCH * PWSK_PROVIDER_LISTEN_DISPATCH
DWORD *typedef PVOID
Definition: winlogon.h:52
PVOID PWSK_CLIENT
Definition: wsk.h:92
struct _WSK_PROVIDER_BASIC_DISPATCH * PWSK_PROVIDER_BASIC_DISPATCH
PFN_WSK_GET_ADDRESS_INFO WskGetAddressInfo
Definition: wsk.h:545
PMDL Mdl
Definition: wsk.h:101
struct _WSK_PROVIDER_CHARACTERISTICS WSK_PROVIDER_CHARACTERISTICS
_Must_inspect_result_ NTSTATUS(WSKAPI * PFN_WSK_RECEIVE_EVENT)(_In_opt_ PVOID SocketContext, _In_ ULONG Flags, _In_opt_ PWSK_DATA_INDICATION DataIndication, _In_ SIZE_T BytesIndicated, _Inout_ SIZE_T *BytesAccepted)
Definition: wsk.h:138
KSPIN_LOCK ReservedRegistrationLock
Definition: wsk.h:568
struct _WSK_CLIENT_NPI WSK_CLIENT_NPI
const uint16_t * PCWSTR
Definition: typedefs.h:56
PFN_WSK_GET_NAME_INFO WskGetNameInfo
Definition: wsk.h:547
struct _WSK_PROVIDER_DATAGRAM_DISPATCH WSK_PROVIDER_DATAGRAM_DISPATCH
struct _WSK_EXTENSION_CONTROL_IN WSK_EXTENSION_CONTROL_IN
#define _Must_inspect_result_
Definition: no_sal2.h:314
IN PCO_ADDRESS_FAMILY AddressFamily
Definition: ndis.h:1887
Definition: client.c:21
struct _WSK_DATA_INDICATION * PWSK_DATA_INDICATION
struct _WSK_INSPECT_ID * PWSK_INSPECT_ID
struct _WSK_BUF WSK_BUF
struct _WSK_TDI_MAP * PWSK_TDI_MAP
CONST NPIID NPI_WSK_INTERFACE_ID
PFN_WSK_RECEIVE_FROM WskReceiveFrom
Definition: wsk.h:296
SIZE_T Length
Definition: wsk.h:103
PVOID ClientContext
Definition: wsk.h:554
const WSK_CLIENT_DISPATCH * Dispatch
Definition: wsk.h:555
USHORT SocketType
Definition: wsk.h:399
_Must_inspect_result_ _At_(AcceptSocket, __drv_aliasesMem) NTSTATUS(WSKAPI *PFN_WSK_ACCEPT_EVENT)(_In_opt_ PVOID SocketContext
Definition: wsk.h:166
_Must_inspect_result_ NTSTATUS WskCaptureProviderNPI(_In_ PWSK_REGISTRATION WskRegistration, _In_ ULONG WaitTimeout, _Out_ PWSK_PROVIDER_NPI WskProviderNpi)
_In_ PIRP Irp
Definition: csq.h:116
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:182
PWSK_CLIENT Client
Definition: wsk.h:560
struct _WSK_BUF_LIST WSK_BUF_LIST
PFN_WSK_GET_REMOTE_ADDRESS WskGetRemoteAddress
Definition: wsk.h:359
PCWSTR TdiDeviceName
Definition: wsk.h:402
struct _WSK_TRANSPORT * PWSK_TRANSPORT
PFN_WSK_SEND_MESSAGES WskSendMessages
Definition: wsk.h:300
#define _In_reads_bytes_opt_(size)
Definition: no_sal2.h:230
PFN_WSK_ABORT_EVENT WskAbortEvent
Definition: wsk.h:529
struct _WSK_DATAGRAM_INDICATION * Next
Definition: wsk.h:114
PFN_WSK_RECEIVE_FROM_EVENT WskReceiveFromEvent
Definition: wsk.h:534
#define _Outptr_
Definition: no_sal2.h:396
Definition: wsk.h:99
WSK_INSPECT_ACTION
Definition: wsk.h:76
struct _WSK_PROVIDER_BASIC_DISPATCH WSK_PROVIDER_BASIC_DISPATCH
PFN_WSK_FREE_ADDRESS_INFO WskFreeAddressInfo
Definition: wsk.h:546
struct _WSK_CLIENT_NPI * PWSK_CLIENT_NPI
PFN_WSK_GET_LOCAL_ADDRESS WskGetLocalAddress
Definition: wsk.h:358
USHORT Reserved
Definition: wsk.h:521
struct _WSK_CLIENT_DISPATCH WSK_CLIENT_DISPATCH
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS OwningProcess
Definition: wsk.h:182
PFN_WSK_CONTROL_CLIENT WskControlClient
Definition: wsk.h:543
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
struct _WSK_EXTENSION_CONTROL_OUT WSK_EXTENSION_CONTROL_OUT
struct _WSK_PROVIDER_DISPATCH * PWSK_PROVIDER_DISPATCH
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
struct _WSK_CLIENT_DISPATCH * PWSK_CLIENT_DISPATCH
_Must_inspect_result_ NTSTATUS WskRegister(_In_ PWSK_CLIENT_NPI WskClientNpi, _Out_ PWSK_REGISTRATION WskRegistration)
WSK_BUF Buffer
Definition: wsk.h:132
PVOID PMDL
Definition: usb.h:39
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID SocketContext
Definition: wsk.h:182
ULONG SerialNumber
Definition: wsk.h:109
struct _WSK_TRANSPORT WSK_TRANSPORT
NTSTATUS(WSKAPI * PFN_WSK_GET_NAME_INFO)(_In_ PWSK_CLIENT Client, _In_ PSOCKADDR SockAddr, _In_ ULONG SockAddrLength, _Out_opt_ PUNICODE_STRING NodeName, _Out_opt_ PUNICODE_STRING ServiceName, _In_ ULONG Flags, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp)
Definition: wsk.h:442
Definition: wsk.h:88
CHAR InputBuffer[80]
Definition: conmgr.c:33
#define _In_opt_
Definition: no_sal2.h:213
WSK_BUF Buffer
Definition: wsk.h:272
PFN_WSK_INSPECT_COMPLETE WskInspectComplete
Definition: wsk.h:265
uint32_t ULONG_PTR
Definition: typedefs.h:64
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD OwningThread
Definition: wsk.h:182
PFN_WSK_SEND_BACKLOG_EVENT WskSendBacklogEvent
Definition: wsk.h:161
enum WSK_CONTROL_SOCKET_TYPE * PWSK_CONTROL_SOCKET_TYPE
struct _WSK_CLIENT_LISTEN_DISPATCH WSK_CLIENT_LISTEN_DISPATCH
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
VOID WskDeregister(_In_ PWSK_REGISTRATION WskRegistration)
#define __drv_aliasesMem
Definition: driverspecs.h:238
const VOID * ProviderDispatch
Definition: wsk.h:478
NTSTATUS(WSKAPI * PFN_WSK_GET_LOCAL_ADDRESS)(_In_ PWSK_SOCKET Socket, _Out_ PSOCKADDR LocalAddress, _Inout_ PIRP Irp)
Definition: wsk.h:251
PFN_WSK_GET_LOCAL_ADDRESS WskGetLocalAddress
Definition: wsk.h:266
PFN_WSK_RECEIVE WskReceive
Definition: wsk.h:361
PFN_WSK_GET_LOCAL_ADDRESS WskGetLocalAddress
Definition: wsk.h:298
const VOID * ClientDispatch
Definition: wsk.h:472
ULONG ControlInfoLength
Definition: wsk.h:117
struct _WSK_DATA_INDICATION * Next
Definition: wsk.h:131
Irp IoStatus Information
NTSTATUS(WSKAPI * PFN_WSK_DISCONNECT_EVENT)(_In_opt_ PVOID SocketContext, _In_ ULONG Flags)
Definition: wsk.h:147
#define _Out_
Definition: no_sal2.h:323
struct _WSK_EVENT_CALLBACK_CONTROL * PWSK_EVENT_CALLBACK_CONTROL
struct _WSK_PROVIDER_CONNECTION_DISPATCH WSK_PROVIDER_CONNECTION_DISPATCH
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
Definition: wmitypes.h:55
Definition: bufpool.h:45
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
struct _WSK_BUF_LIST * Next
Definition: wsk.h:271
enum WSK_INSPECT_ACTION * PWSK_INSPECT_ACTION
NTSTATUS(WSKAPI * PFN_WSK_CONTROL_CLIENT)(_In_ PWSK_CLIENT Client, _In_ ULONG ControlCode, _In_ SIZE_T InputSize, _In_reads_bytes_opt_(InputSize) PVOID InputBuffer, _In_ SIZE_T OutputSize, _Out_writes_bytes_opt_(OutputSize) PVOID OutputBuffer, _Out_opt_ SIZE_T *OutputSizeReturned, _Inout_opt_ PIRP Irp)
Definition: wsk.h:413
NTSTATUS(WSKAPI * PFN_WSK_SEND)(_In_ PWSK_SOCKET Socket, _In_ PWSK_BUF Buffer, _In_ ULONG Flags, _Inout_ PIRP Irp)
Definition: wsk.h:321
#define CONST
Definition: compiler.h:170
struct _WSK_PROVIDER_CONNECTION_DISPATCH * PWSK_PROVIDER_CONNECTION_DISPATCH
struct _WSK_REGISTRATION * PWSK_REGISTRATION
NTSTATUS(WSKAPI * PFN_WSK_DISCONNECT)(_In_ PWSK_SOCKET Socket, _In_opt_ PWSK_BUF Buffer, _In_ ULONG Flags, _Inout_ PIRP Irp)
Definition: wsk.h:337
PSOCKADDR RemoteAddress
Definition: wsk.h:118
#define _Out_opt_
Definition: no_sal2.h:339
PFN_WSK_RELEASE_DATAGRAM_INDICATION_LIST WskRelease
Definition: wsk.h:297
PFN_WSK_RECEIVE_EVENT WskReceiveEvent
Definition: wsk.h:159
#define const
Definition: zconf.h:230
#define _Field_size_(size)
Definition: no_sal2.h:189
#define __drv_allocatesMem(kind)
Definition: driverspecs.h:239
LPTSTR ServiceName
Definition: ServiceMain.c:15
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR RemoteAddress
Definition: wsk.h:170
PFN_WSK_ACCEPT_EVENT WskAcceptEvent
Definition: wsk.h:527
struct _WSK_SOCKET * PWSK_SOCKET
PVOID ReservedRegistrationContext
Definition: wsk.h:567
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR _Inout_ PIRP Irp
Definition: wsk.h:182
ULONGLONG ReservedRegistrationState
Definition: wsk.h:566
_In_ PVOID ClientContext
Definition: netioddk.h:55
ULONG_PTR Key
Definition: wsk.h:108
uint64_t ULONGLONG
Definition: typedefs.h:66
NTSTATUS(WSKAPI * PFN_WSK_RECEIVE)(_In_ PWSK_SOCKET Socket, _In_ PWSK_BUF Buffer, _In_ ULONG Flags, _Inout_ PIRP Irp)
Definition: wsk.h:329
struct _WSK_EVENT_CALLBACK_CONTROL WSK_EVENT_CALLBACK_CONTROL
struct _WSK_DATA_INDICATION WSK_DATA_INDICATION
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
const VOID * Dispatch
Definition: wsk.h:96
#define _Outptr_result_maybenull_
Definition: no_sal2.h:426
PFN_WSK_DISCONNECT WskDisconnect
Definition: wsk.h:362
PFN_WSK_CLOSE_SOCKET WskCloseSocket
Definition: wsk.h:218
#define _Inout_
Definition: no_sal2.h:244
NTSTATUS(WSKAPI * PFN_WSK_SEND_BACKLOG_EVENT)(_In_opt_ PVOID SocketContext, _In_ SIZE_T IdealBacklogSize)
Definition: wsk.h:153
ULONG Protocol
Definition: wsk.h:581
_In_ PADDRINFOEXW AddrInfo
Definition: wsk.h:458
ULONG Offset
Definition: wsk.h:102
PFN_WSK_CONNECT WskConnect
Definition: wsk.h:357
USHORT ADDRESS_FAMILY
Definition: ws2def.h:25
USHORT Version
Definition: wsk.h:520
const WSK_PROVIDER_DISPATCH * Dispatch
Definition: wsk.h:561
#define _Reserved_
Definition: no_sal2.h:573
static const char * NodeName(const NOTIFICATIONLIST *item)
Definition: changenotify.c:148
struct _WSK_BUF * PWSK_BUF
struct _WSK_CLIENT_CONNECTION_DISPATCH * PWSK_CLIENT_CONNECTION_DISPATCH
NTSTATUS(WSKAPI * PFN_WSK_RELEASE_DATAGRAM_INDICATION_LIST)(_In_ PWSK_SOCKET Socket, _In_ PWSK_DATAGRAM_INDICATION DatagramIndication)
Definition: wsk.h:506
PFN_WSK_INSPECT_EVENT WskInspectEvent
Definition: wsk.h:528
PFN_WSK_ACCEPT WskAccept
Definition: wsk.h:264
PFN_WSK_DISCONNECT_EVENT WskDisconnectEvent
Definition: wsk.h:160
struct _WSK_PROVIDER_NPI WSK_PROVIDER_NPI
NTSTATUS(WSKAPI * PFN_WSK_SEND_MESSAGES)(_In_ PWSK_SOCKET Socket, _In_ PWSK_BUF_LIST BufferList, _Reserved_ ULONG Flags, _In_opt_ PSOCKADDR RemoteAddress, _In_ ULONG ControlInfoLength, _In_reads_bytes_opt_(ControlInfoLength) PCMSGHDR ControlInfo, _Inout_ PIRP Irp)
Definition: wsk.h:277
struct _WSK_REGISTRATION WSK_REGISTRATION
NTSTATUS(WSKAPI * PFN_WSK_RECEIVE_FROM)(_In_ PWSK_SOCKET Socket, _In_ PWSK_BUF Buffer, _Reserved_ ULONG Flags, _Out_opt_ PSOCKADDR RemoteAddress, _Inout_ PULONG ControlLength, _Out_writes_bytes_opt_(*ControlLength) PCMSGHDR ControlInfo, _Out_opt_ PULONG ControlFlags, _Inout_ PIRP Irp)
Definition: wsk.h:494
struct _WSK_PROVIDER_LISTEN_DISPATCH WSK_PROVIDER_LISTEN_DISPATCH
_In_ USHORT SocketType
Definition: wsk.h:182
_In_ PLARGE_INTEGER _In_ ULONG _In_ BOOLEAN _In_ ULONG _Out_ PVOID _Out_ PIO_STATUS_BLOCK IoStatus
Definition: npfs.h:636
#define WSKAPI
Definition: wsk.h:35
#define _In_
Definition: no_sal2.h:204
struct _WSK_PROVIDER_NPI * PWSK_PROVIDER_NPI
ULONG_PTR SIZE_T
Definition: typedefs.h:79
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH * Dispatch
Definition: wsk.h:182
WSK_CONTROL_SOCKET_TYPE
Definition: wsk.h:84
LONG NTSTATUS
Definition: DriverTester.h:11
VOID WskReleaseProviderNPI(_In_ PWSK_REGISTRATION WskRegistration)
ADDRESS_FAMILY AddressFamily
Definition: wsk.h:400
unsigned short USHORT
Definition: pedump.c:61
_Field_size_bytes_(ControlInfoLength) PCMSGHDR ControlInfo
struct _WSK_SOCKET WSK_SOCKET
_In_ PWSK_INSPECT_ID InspectID
Definition: wsk.h:379
USHORT SocketType
Definition: wsk.h:580
ULONG Protocol
Definition: wsk.h:401
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
unsigned int * PULONG
Definition: retypes.h:1
const ULONG ElementCount
Definition: wsk.h:407
struct _WSK_INSPECT_ID WSK_INSPECT_ID
NTSTATUS(WSKAPI * PFN_WSK_RELEASE_DATA_INDICATION_LIST)(_In_ PWSK_SOCKET Socket, _In_ PWSK_DATA_INDICATION DataIndication)
Definition: wsk.h:345
#define __drv_freesMem(kind)
Definition: driverspecs.h:254
GUID ProviderId
Definition: wsk.h:583
PFN_WSK_CLIENT_EVENT WskClientEvent
Definition: wsk.h:522
struct _WSK_CLIENT_CONNECTION_DISPATCH WSK_CLIENT_CONNECTION_DISPATCH
PFN_WSK_SOCKET WskSocket
Definition: wsk.h:541
PFN_WSK_CONTROL_SOCKET WskControlSocket
Definition: wsk.h:217
struct _WSK_TDI_MAP WSK_TDI_MAP
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _In_opt_ PWSK_SOCKET _Outptr_result_maybenull_ PVOID * AcceptSocketContext
Definition: wsk.h:170
PFN_WSK_SOCKET_CONNECT WskSocketConnect
Definition: wsk.h:542
struct _WSK_PROVIDER_CHARACTERISTICS * PWSK_PROVIDER_CHARACTERISTICS
CONST NPIID * PNPIID
Definition: netiodef.h:1248
_Must_inspect_result_ WSK_INSPECT_ACTION(WSKAPI * PFN_WSK_INSPECT_EVENT)(_In_opt_ PVOID SocketContext, _In_ PSOCKADDR LocalAddress, _In_ PSOCKADDR RemoteAddress, _In_opt_ PWSK_INSPECT_ID InspectID)
Definition: wsk.h:369
struct _WSK_CLIENT_DATAGRAM_DISPATCH * PWSK_CLIENT_DATAGRAM_DISPATCH
struct _WSK_CLIENT_LISTEN_DISPATCH * PWSK_CLIENT_LISTEN_DISPATCH
struct _WSK_BUF_LIST * PWSK_BUF_LIST
ADDRESS_FAMILY AddressFamily
Definition: wsk.h:582
struct _WSK_PROVIDER_DATAGRAM_DISPATCH * PWSK_PROVIDER_DATAGRAM_DISPATCH
PVOID PIRP
Definition: usb.h:38
unsigned int ULONG
Definition: retypes.h:1
struct _WSK_CLIENT_DATAGRAM_DISPATCH WSK_CLIENT_DATAGRAM_DISPATCH
NTSTATUS(WSKAPI * PFN_WSK_GET_REMOTE_ADDRESS)(_In_ PWSK_SOCKET Socket, _Out_ PSOCKADDR RemoteAddress, _Inout_ PIRP Irp)
Definition: wsk.h:314
PFN_WSK_RELEASE_DATA_INDICATION_LIST WskRelease
Definition: wsk.h:363
struct _WSK_EXTENSION_CONTROL_IN * PWSK_EXTENSION_CONTROL_IN
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ EVENT_TYPE EventType
Definition: exfuncs.h:165
_Must_inspect_result_ NTSTATUS WskQueryProviderCharacteristics(_In_ PWSK_REGISTRATION WskRegistration, _Out_ PWSK_PROVIDER_CHARACTERISTICS WskProviderCharacteristics)
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _In_opt_ PWSK_SOCKET AcceptSocket
Definition: wsk.h:170
#define _Out_writes_bytes_opt_(size)
Definition: no_sal2.h:373
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _In_opt_ PWSK_SOCKET _Outptr_result_maybenull_ PVOID _Outptr_result_maybenull_ const WSK_CLIENT_CONNECTION_DISPATCH ** AcceptSocketDispatch
Definition: wsk.h:170
struct _WSK_EXTENSION_CONTROL_OUT * PWSK_EXTENSION_CONTROL_OUT
typedef NTSTATUS(WSKAPI *PFN_WSK_BIND)(_In_ PWSK_SOCKET Socket
struct _WSK_PROVIDER_DISPATCH WSK_PROVIDER_DISPATCH
NTSTATUS(WSKAPI * PFN_WSK_CONTROL_SOCKET)(_In_ PWSK_SOCKET Socket, _In_ WSK_CONTROL_SOCKET_TYPE RequestType, _In_ ULONG ControlCode, _In_ ULONG Level, _In_ SIZE_T InputSize, _In_reads_bytes_opt_(InputSize) PVOID InputBuffer, _In_ SIZE_T OutputSize, _Out_writes_bytes_opt_(OutputSize) PVOID OutputBuffer, _Out_opt_ SIZE_T *OutputSizeReturned, _Inout_opt_ PIRP Irp)
Definition: wsk.h:196
NTSTATUS(WSKAPI * PFN_WSK_CLIENT_EVENT)(_In_opt_ PVOID ClientContext, _In_ ULONG EventType, _In_reads_bytes_opt_(InformationLength) PVOID Information, _In_ SIZE_T InformationLength)
Definition: wsk.h:512
NTSTATUS(WSKAPI * PFN_WSK_INSPECT_COMPLETE)(_In_ PWSK_SOCKET ListenSocket, _In_ PWSK_INSPECT_ID InspectID, _In_ WSK_INSPECT_ACTION Action, _Inout_ PIRP Irp)
Definition: wsk.h:243
NTSTATUS(WSKAPI * PFN_WSK_SEND_TO)(_In_ PWSK_SOCKET Socket, _In_ PWSK_BUF Buffer, _Reserved_ ULONG Flags, _In_opt_ PSOCKADDR RemoteAddress, _In_ ULONG ControlInfoLength, _In_reads_bytes_opt_(ControlInfoLength) PCMSGHDR ControlInfo, _Inout_ PIRP Irp)
Definition: wsk.h:483
USHORT Version
Definition: wsk.h:579
#define _Inout_opt_
Definition: no_sal2.h:258
PFN_WSK_SEND_TO WskSendTo
Definition: wsk.h:295
PFN_WSK_BIND WskBind
Definition: wsk.h:263
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR LocalAddress
Definition: wsk.h:170