ReactOS 0.4.16-dev-334-g4d9f67c
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
26extern "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
76typedef enum
77{
83
84typedef enum
85{
91
93
94typedef struct _WSK_SOCKET
95{
96 const VOID *Dispatch;
98
99typedef struct _WSK_BUF
100{
105
106typedef struct _WSK_INSPECT_ID
107{
111
113{
120
121typedef
127 _In_opt_ PWSK_DATAGRAM_INDICATION DataIndication);
128
130{
134
135typedef
141 _In_opt_ PWSK_DATA_INDICATION DataIndication,
142 _In_ SIZE_T BytesIndicated,
143 _Inout_ SIZE_T *BytesAccepted);
144
145typedef
150
151typedef
155 _In_ SIZE_T IdealBacklogSize);
156
158{
163
164typedef
168(WSKAPI * PFN_WSK_ACCEPT_EVENT)(
176
177typedef
178_At_(Irp->IoStatus.Information, __drv_allocatesMem(Mem))
180(WSKAPI * PFN_WSK_SOCKET_CONNECT)(
193
194typedef
197 _In_ PWSK_SOCKET Socket,
201 _In_ SIZE_T InputSize,
203 _In_ SIZE_T OutputSize,
205 _Out_opt_ SIZE_T *OutputSizeReturned,
207
208typedef
209_At_(Socket, __drv_freesMem(Mem))
211(WSKAPI * PFN_WSK_CLOSE_SOCKET)(
212 _In_ PWSK_SOCKET Socket,
214
216{
218 PFN_WSK_CLOSE_SOCKET WskCloseSocket;
220
221typedef
224 _In_ PWSK_SOCKET Socket,
228
229typedef
230_At_(Irp->IoStatus.Information, __drv_allocatesMem(Mem))
232(WSKAPI * PFN_WSK_ACCEPT)(
233 _In_ PWSK_SOCKET ListenSocket,
240
241typedef
244 _In_ PWSK_SOCKET ListenSocket,
245 _In_ PWSK_INSPECT_ID InspectID,
248
249typedef
252 _In_ PWSK_SOCKET Socket,
255
257{
258#ifdef __cplusplus
260#else
262#endif
264 PFN_WSK_ACCEPT WskAccept;
268
269#if (NTDDI_VERSION >= NTDDI_WIN8)
270typedef struct _WSK_BUF_LIST {
274
275typedef
278 _In_ PWSK_SOCKET Socket,
279 _In_ PWSK_BUF_LIST BufferList,
282 _In_ ULONG ControlInfoLength,
283 _In_reads_bytes_opt_(ControlInfoLength) PCMSGHDR ControlInfo,
285#endif /* (NTDDI_VERSION >= NTDDI_WIN8) */
286
287typedef
290 _In_ PWSK_SOCKET Socket,
294
295typedef
298 _In_ PWSK_SOCKET Socket,
301
302typedef
305 _In_ PWSK_SOCKET Socket,
309
310typedef
313 _In_ PWSK_SOCKET Socket,
317
318typedef
321 _In_ PWSK_SOCKET Socket,
325
326typedef
329 _In_ PWSK_SOCKET Socket,
330 _In_ PWSK_DATA_INDICATION DataIndication);
331
333{
334#ifdef __cplusplus
336#else
338#endif
348
349typedef
356 _In_opt_ PWSK_INSPECT_ID InspectID);
357
358typedef
362 _In_ PWSK_INSPECT_ID InspectID);
363
364typedef
365_At_(Irp->IoStatus.Information, __drv_allocatesMem(Mem))
367(WSKAPI * PFN_WSK_SOCKET)(
374 _In_opt_ const VOID *Dispatch,
379
380typedef struct _WSK_TDI_MAP
381{
387
388typedef struct _WSK_TDI_MAP_INFO
389{
393
394typedef
399 _In_ SIZE_T InputSize,
401 _In_ SIZE_T OutputSize,
403 _Out_opt_ SIZE_T *OutputSizeReturned,
405
406#if (NTDDI_VERSION >= NTDDI_WIN7)
407
408typedef
411(WSKAPI * PFN_WSK_GET_ADDRESS_INFO)(
413 _In_opt_ PUNICODE_STRING NodeName,
415 _In_opt_ ULONG NameSpace,
417 _In_opt_ PADDRINFOEXW Hints,
418 _Outptr_ PADDRINFOEXW *Result,
422
423typedef
427 _In_ PSOCKADDR SockAddr,
428 _In_ ULONG SockAddrLength,
429 _Out_opt_ PUNICODE_STRING NodeName,
435
436typedef
438VOID
439(WSKAPI * PFN_WSK_FREE_ADDRESS_INFO)(
441 _In_ PADDRINFOEXW AddrInfo);
442
443#endif /* if (NTDDI_VERSION >= NTDDI_WIN7) */
444
446{
450
452{
457
459{
463
464typedef
467 _In_ PWSK_SOCKET Socket,
471 _In_ ULONG ControlInfoLength,
472 _In_reads_bytes_opt_(ControlInfoLength) PCMSGHDR ControlInfo,
474
475typedef
478 _In_ PWSK_SOCKET Socket,
482 _Inout_ PULONG ControlLength,
483 _Out_writes_bytes_opt_(*ControlLength) PCMSGHDR ControlInfo,
484 _Out_opt_ PULONG ControlFlags,
486
487typedef
490 _In_ PWSK_SOCKET Socket,
491 _In_ PWSK_DATAGRAM_INDICATION DatagramIndication);
492
494{
495#ifdef __cplusplus
497#else
499#endif
505#if (NTDDI_VERSION >= NTDDI_WIN8)
507#endif
509
510typedef
515 _In_reads_bytes_opt_(InformationLength) PVOID Information,
516 _In_ SIZE_T InformationLength);
517
519{
524
526{
527 PFN_WSK_ACCEPT_EVENT WskAcceptEvent;
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
552typedef struct _WSK_CLIENT_NPI
553{
557
558typedef struct _WSK_PROVIDER_NPI
559{
563
564typedef struct _WSK_REGISTRATION
565{
570
572{
576
577typedef struct _WSK_TRANSPORT
578{
585
588WSKAPI
590 _In_ PWSK_CLIENT_NPI WskClientNpi,
591 _Out_ PWSK_REGISTRATION WskRegistration);
592
595WSKAPI
597 _In_ PWSK_REGISTRATION WskRegistration,
598 _In_ ULONG WaitTimeout,
599 _Out_ PWSK_PROVIDER_NPI WskProviderNpi);
600
601VOID
602WSKAPI
604 _In_ PWSK_REGISTRATION WskRegistration);
605
608WSKAPI
610 _In_ PWSK_REGISTRATION WskRegistration,
611 _Out_ PWSK_PROVIDER_CHARACTERISTICS WskProviderCharacteristics);
612
613VOID
614WSKAPI
616 _In_ PWSK_REGISTRATION WskRegistration);
617
618#ifdef __cplusplus
619}
620#endif
621
622
#define VOID
Definition: acefi.h:82
LONG NTSTATUS
Definition: precomp.h:26
static WCHAR ServiceName[]
Definition: browser.c:19
#define __drv_aliasesMem
Definition: btrfs_drv.h:203
Definition: bufpool.h:45
_In_ PIRP Irp
Definition: csq.h:116
#define NTSTATUS
Definition: precomp.h:19
#define __drv_freesMem(kind)
Definition: driverspecs.h:272
#define __drv_allocatesMem(kind)
Definition: driverspecs.h:257
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ EVENT_TYPE EventType
Definition: exfuncs.h:167
_In_ PVOID ClientContext
Definition: netioddk.h:55
CONST NPIID * PNPIID
Definition: netiodef.h:1248
#define _Out_opt_
Definition: no_sal2.h:214
#define _Inout_
Definition: no_sal2.h:162
#define _Outptr_result_maybenull_
Definition: no_sal2.h:266
#define _Outptr_
Definition: no_sal2.h:262
#define _Out_writes_bytes_opt_(s)
Definition: no_sal2.h:228
#define _Inout_opt_
Definition: no_sal2.h:216
#define _Must_inspect_result_
Definition: no_sal2.h:62
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define _Reserved_
Definition: no_sal2.h:504
#define _In_reads_bytes_opt_(s)
Definition: no_sal2.h:224
#define CONST
Definition: pedump.c:81
unsigned short USHORT
Definition: pedump.c:61
Definition: client.c:28
WSK_BUF Buffer
Definition: wsk.h:272
struct _WSK_BUF_LIST * Next
Definition: wsk.h:271
Definition: wsk.h:100
SIZE_T Length
Definition: wsk.h:103
PMDL Mdl
Definition: wsk.h:101
ULONG Offset
Definition: wsk.h:102
PFN_WSK_DISCONNECT_EVENT WskDisconnectEvent
Definition: wsk.h:160
PFN_WSK_SEND_BACKLOG_EVENT WskSendBacklogEvent
Definition: wsk.h:161
PFN_WSK_RECEIVE_EVENT WskReceiveEvent
Definition: wsk.h:159
PFN_WSK_RECEIVE_FROM_EVENT WskReceiveFromEvent
Definition: wsk.h:534
USHORT Reserved
Definition: wsk.h:521
PFN_WSK_CLIENT_EVENT WskClientEvent
Definition: wsk.h:522
USHORT Version
Definition: wsk.h:520
PFN_WSK_INSPECT_EVENT WskInspectEvent
Definition: wsk.h:528
PFN_WSK_ACCEPT_EVENT WskAcceptEvent
Definition: wsk.h:527
PFN_WSK_ABORT_EVENT WskAbortEvent
Definition: wsk.h:529
const WSK_CLIENT_DISPATCH * Dispatch
Definition: wsk.h:555
PVOID ClientContext
Definition: wsk.h:554
_Field_size_bytes_(ControlInfoLength) PCMSGHDR ControlInfo
PSOCKADDR RemoteAddress
Definition: wsk.h:118
ULONG ControlInfoLength
Definition: wsk.h:117
struct _WSK_DATAGRAM_INDICATION * Next
Definition: wsk.h:114
struct _WSK_DATA_INDICATION * Next
Definition: wsk.h:131
WSK_BUF Buffer
Definition: wsk.h:132
const VOID * ClientDispatch
Definition: wsk.h:455
const VOID * ProviderDispatch
Definition: wsk.h:461
ULONG_PTR Key
Definition: wsk.h:108
ULONG SerialNumber
Definition: wsk.h:109
PFN_WSK_CLOSE_SOCKET WskCloseSocket
Definition: wsk.h:218
PFN_WSK_CONTROL_SOCKET WskControlSocket
Definition: wsk.h:217
PFN_WSK_DISCONNECT WskDisconnect
Definition: wsk.h:345
PFN_WSK_GET_LOCAL_ADDRESS WskGetLocalAddress
Definition: wsk.h:341
PFN_WSK_CONNECT WskConnect
Definition: wsk.h:340
PFN_WSK_RELEASE_DATA_INDICATION_LIST WskRelease
Definition: wsk.h:346
PFN_WSK_GET_REMOTE_ADDRESS WskGetRemoteAddress
Definition: wsk.h:342
PFN_WSK_RECEIVE WskReceive
Definition: wsk.h:344
PFN_WSK_RELEASE_DATAGRAM_INDICATION_LIST WskRelease
Definition: wsk.h:503
PFN_WSK_SEND_TO WskSendTo
Definition: wsk.h:501
PFN_WSK_SEND_MESSAGES WskSendMessages
Definition: wsk.h:506
PFN_WSK_RECEIVE_FROM WskReceiveFrom
Definition: wsk.h:502
PFN_WSK_GET_LOCAL_ADDRESS WskGetLocalAddress
Definition: wsk.h:504
PFN_WSK_GET_ADDRESS_INFO WskGetAddressInfo
Definition: wsk.h:545
PFN_WSK_FREE_ADDRESS_INFO WskFreeAddressInfo
Definition: wsk.h:546
PFN_WSK_GET_NAME_INFO WskGetNameInfo
Definition: wsk.h:547
PFN_WSK_CONTROL_CLIENT WskControlClient
Definition: wsk.h:543
PFN_WSK_SOCKET_CONNECT WskSocketConnect
Definition: wsk.h:542
PFN_WSK_SOCKET WskSocket
Definition: wsk.h:541
PFN_WSK_BIND WskBind
Definition: wsk.h:263
PFN_WSK_ACCEPT WskAccept
Definition: wsk.h:264
PFN_WSK_GET_LOCAL_ADDRESS WskGetLocalAddress
Definition: wsk.h:266
PFN_WSK_INSPECT_COMPLETE WskInspectComplete
Definition: wsk.h:265
PWSK_CLIENT Client
Definition: wsk.h:560
const WSK_PROVIDER_DISPATCH * Dispatch
Definition: wsk.h:561
KSPIN_LOCK ReservedRegistrationLock
Definition: wsk.h:568
PVOID ReservedRegistrationContext
Definition: wsk.h:567
ULONGLONG ReservedRegistrationState
Definition: wsk.h:566
const VOID * Dispatch
Definition: wsk.h:96
_Field_size_(ElementCount) const WSK_TDI_MAP *Map
const ULONG ElementCount
Definition: wsk.h:390
PCWSTR TdiDeviceName
Definition: wsk.h:385
ADDRESS_FAMILY AddressFamily
Definition: wsk.h:383
USHORT SocketType
Definition: wsk.h:382
ULONG Protocol
Definition: wsk.h:384
ADDRESS_FAMILY AddressFamily
Definition: wsk.h:582
USHORT SocketType
Definition: wsk.h:580
GUID ProviderId
Definition: wsk.h:583
ULONG Protocol
Definition: wsk.h:581
USHORT Version
Definition: wsk.h:579
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFQUEUE _In_ _Strict_type_match_ WDF_REQUEST_TYPE RequestType
Definition: wdfdevice.h:4233
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:953
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
Definition: wmitypes.h:55
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
USHORT ADDRESS_FAMILY
Definition: ws2def.h:25
struct _WSK_TRANSPORT * PWSK_TRANSPORT
struct _WSK_BUF_LIST WSK_BUF_LIST
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_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_DATA_INDICATION WSK_DATA_INDICATION
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
struct _WSK_DATAGRAM_INDICATION * PWSK_DATAGRAM_INDICATION
NTSTATUS(WSKAPI * PFN_WSK_BIND)(_In_ PWSK_SOCKET Socket, _In_ PSOCKADDR LocalAddress, _Reserved_ ULONG Flags, _Inout_ PIRP Irp)
Definition: wsk.h:223
NTSTATUS(WSKAPI * PFN_WSK_DISCONNECT_EVENT)(_In_opt_ PVOID SocketContext, _In_ ULONG Flags)
Definition: wsk.h:147
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:425
struct _WSK_CLIENT_CONNECTION_DISPATCH * PWSK_CLIENT_CONNECTION_DISPATCH
#define WSKAPI
Definition: wsk.h:35
NTSTATUS(WSKAPI * PFN_WSK_GET_LOCAL_ADDRESS)(_In_ PWSK_SOCKET Socket, _Out_ PSOCKADDR LocalAddress, _Inout_ PIRP Irp)
Definition: wsk.h:251
struct _WSK_PROVIDER_BASIC_DISPATCH WSK_PROVIDER_BASIC_DISPATCH
struct _WSK_PROVIDER_DATAGRAM_DISPATCH * PWSK_PROVIDER_DATAGRAM_DISPATCH
NTSTATUS(WSKAPI * PFN_WSK_SEND)(_In_ PWSK_SOCKET Socket, _In_ PWSK_BUF Buffer, _In_ ULONG Flags, _Inout_ PIRP Irp)
Definition: wsk.h:304
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _In_opt_ PWSK_SOCKET _Outptr_result_maybenull_ PVOID * AcceptSocketContext
Definition: wsk.h:174
struct _WSK_EXTENSION_CONTROL_OUT * PWSK_EXTENSION_CONTROL_OUT
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR LocalAddress
Definition: wsk.h:171
struct _WSK_PROVIDER_CHARACTERISTICS WSK_PROVIDER_CHARACTERISTICS
struct _WSK_CLIENT_LISTEN_DISPATCH WSK_CLIENT_LISTEN_DISPATCH
struct _WSK_INSPECT_ID WSK_INSPECT_ID
struct _WSK_CLIENT_NPI * PWSK_CLIENT_NPI
_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:190
struct _WSK_CLIENT_DATAGRAM_DISPATCH WSK_CLIENT_DATAGRAM_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
struct _WSK_TRANSPORT WSK_TRANSPORT
NTSTATUS(WSKAPI * PFN_WSK_ABORT_EVENT)(_In_opt_ PVOID SocketContext, _In_ PWSK_INSPECT_ID InspectID)
Definition: wsk.h:360
_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
struct _WSK_CLIENT_NPI WSK_CLIENT_NPI
struct _WSK_CLIENT_DISPATCH WSK_CLIENT_DISPATCH
struct _WSK_BUF WSK_BUF
CONST NPIID NPI_WSK_INTERFACE_ID
WSK_CONTROL_SOCKET_TYPE
Definition: wsk.h:85
@ WskIoctl
Definition: wsk.h:88
@ WskGetOption
Definition: wsk.h:87
@ WskSetOption
Definition: wsk.h:86
@ WskControlMax
Definition: wsk.h:89
_In_ USHORT _In_ ULONG Protocol
Definition: wsk.h:183
struct _WSK_EXTENSION_CONTROL_IN * PWSK_EXTENSION_CONTROL_IN
struct _WSK_PROVIDER_DATAGRAM_DISPATCH WSK_PROVIDER_DATAGRAM_DISPATCH
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:396
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:466
_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:192
struct _WSK_CLIENT_CONNECTION_DISPATCH WSK_CLIENT_CONNECTION_DISPATCH
struct _WSK_DATA_INDICATION * PWSK_DATA_INDICATION
NTSTATUS(WSKAPI * PFN_WSK_GET_REMOTE_ADDRESS)(_In_ PWSK_SOCKET Socket, _Out_ PSOCKADDR RemoteAddress, _Inout_ PIRP Irp)
Definition: wsk.h:297
struct _WSK_PROVIDER_LISTEN_DISPATCH WSK_PROVIDER_LISTEN_DISPATCH
struct _WSK_PROVIDER_CONNECTION_DISPATCH * PWSK_PROVIDER_CONNECTION_DISPATCH
struct _WSK_PROVIDER_LISTEN_DISPATCH * PWSK_PROVIDER_LISTEN_DISPATCH
_In_ ADDRESS_FAMILY AddressFamily
Definition: wsk.h:369
enum WSK_CONTROL_SOCKET_TYPE * PWSK_CONTROL_SOCKET_TYPE
NTSTATUS(WSKAPI * PFN_WSK_DISCONNECT)(_In_ PWSK_SOCKET Socket, _In_opt_ PWSK_BUF Buffer, _In_ ULONG Flags, _Inout_ PIRP Irp)
Definition: wsk.h:320
_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:191
_In_ PADDRINFOEXW AddrInfo
Definition: wsk.h:441
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH * Dispatch
Definition: wsk.h:188
struct _WSK_SOCKET * PWSK_SOCKET
struct _WSK_EXTENSION_CONTROL_OUT WSK_EXTENSION_CONTROL_OUT
WSK_INSPECT_ACTION
Definition: wsk.h:77
@ WskInspectAccept
Definition: wsk.h:79
@ WskInspectReject
Definition: wsk.h:78
@ WskInspectPend
Definition: wsk.h:80
@ WskInspectMax
Definition: wsk.h:81
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID SocketContext
Definition: wsk.h:187
struct _WSK_INSPECT_ID * PWSK_INSPECT_ID
NTSTATUS(WSKAPI * PFN_WSK_RELEASE_DATA_INDICATION_LIST)(_In_ PWSK_SOCKET Socket, _In_ PWSK_DATA_INDICATION DataIndication)
Definition: wsk.h:328
struct _WSK_TDI_MAP * PWSK_TDI_MAP
NTSTATUS(WSKAPI * PFN_WSK_SEND_BACKLOG_EVENT)(_In_opt_ PVOID SocketContext, _In_ SIZE_T IdealBacklogSize)
Definition: wsk.h:153
struct _WSK_PROVIDER_NPI * PWSK_PROVIDER_NPI
struct _WSK_PROVIDER_DISPATCH * PWSK_PROVIDER_DISPATCH
struct _WSK_REGISTRATION * PWSK_REGISTRATION
struct _WSK_CLIENT_DISPATCH * PWSK_CLIENT_DISPATCH
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _In_opt_ PWSK_SOCKET AcceptSocket
Definition: wsk.h:173
NTSTATUS(WSKAPI * PFN_WSK_RELEASE_DATAGRAM_INDICATION_LIST)(_In_ PWSK_SOCKET Socket, _In_ PWSK_DATAGRAM_INDICATION DatagramIndication)
Definition: wsk.h:489
NTSTATUS(WSKAPI * PFN_WSK_CONNECT)(_In_ PWSK_SOCKET Socket, _In_ PSOCKADDR RemoteAddress, _Reserved_ ULONG Flags, _Inout_ PIRP Irp)
Definition: wsk.h:289
struct _WSK_EVENT_CALLBACK_CONTROL WSK_EVENT_CALLBACK_CONTROL
struct _WSK_TDI_MAP WSK_TDI_MAP
VOID WSKAPI WskReleaseProviderNPI(_In_ PWSK_REGISTRATION WskRegistration)
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:477
PVOID PWSK_CLIENT
Definition: wsk.h:92
struct _WSK_PROVIDER_NPI WSK_PROVIDER_NPI
NTSTATUS(WSKAPI * PFN_WSK_RECEIVE)(_In_ PWSK_SOCKET Socket, _In_ PWSK_BUF Buffer, _In_ ULONG Flags, _Inout_ PIRP Irp)
Definition: wsk.h:312
_In_ USHORT SocketType
Definition: wsk.h:182
struct _WSK_CLIENT_DATAGRAM_DISPATCH * PWSK_CLIENT_DATAGRAM_DISPATCH
_Must_inspect_result_ NTSTATUS WSKAPI WskQueryProviderCharacteristics(_In_ PWSK_REGISTRATION WskRegistration, _Out_ PWSK_PROVIDER_CHARACTERISTICS WskProviderCharacteristics)
struct _WSK_TDI_MAP_INFO WSK_TDI_MAP_INFO
_Must_inspect_result_ _At_(AcceptSocket, __drv_aliasesMem) NTSTATUS(WSKAPI *PFN_WSK_ACCEPT_EVENT)(_In_opt_ PVOID SocketContext
Definition: wsk.h:166
struct _WSK_PROVIDER_DISPATCH WSK_PROVIDER_DISPATCH
struct _WSK_EVENT_CALLBACK_CONTROL * PWSK_EVENT_CALLBACK_CONTROL
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR RemoteAddress
Definition: wsk.h:172
VOID WSKAPI WskDeregister(_In_ PWSK_REGISTRATION WskRegistration)
_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_SOCKET WSK_SOCKET
struct _WSK_CLIENT_LISTEN_DISPATCH * PWSK_CLIENT_LISTEN_DISPATCH
struct _WSK_BUF_LIST * PWSK_BUF_LIST
struct _WSK_TDI_MAP_INFO * PWSK_TDI_MAP_INFO
struct _WSK_EXTENSION_CONTROL_IN WSK_EXTENSION_CONTROL_IN
struct _WSK_BUF * PWSK_BUF
struct _WSK_PROVIDER_CONNECTION_DISPATCH WSK_PROVIDER_CONNECTION_DISPATCH
_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:175
_Must_inspect_result_ NTSTATUS WSKAPI WskRegister(_In_ PWSK_CLIENT_NPI WskClientNpi, _Out_ PWSK_REGISTRATION WskRegistration)
struct _WSK_DATAGRAM_INDICATION WSK_DATAGRAM_INDICATION
_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:409
_Must_inspect_result_ NTSTATUS WSKAPI WskCaptureProviderNPI(_In_ PWSK_REGISTRATION WskRegistration, _In_ ULONG WaitTimeout, _Out_ PWSK_PROVIDER_NPI WskProviderNpi)
struct _WSK_PROVIDER_BASIC_DISPATCH * PWSK_PROVIDER_BASIC_DISPATCH
_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:352
struct _WSK_REGISTRATION WSK_REGISTRATION
struct _WSK_PROVIDER_CHARACTERISTICS * PWSK_PROVIDER_CHARACTERISTICS
_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:189
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
enum WSK_INSPECT_ACTION * PWSK_INSPECT_ACTION