ReactOS 0.4.15-dev-5666-gc548b97
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
288{
289#ifdef __cplusplus
291#else
293#endif
299#if (NTDDI_VERSION >= NTDDI_WIN8)
301#endif
303
304typedef
307 _In_ PWSK_SOCKET Socket,
311
312typedef
315 _In_ PWSK_SOCKET Socket,
318
319typedef
322 _In_ PWSK_SOCKET Socket,
326
327typedef
330 _In_ PWSK_SOCKET Socket,
334
335typedef
338 _In_ PWSK_SOCKET Socket,
342
343typedef
346 _In_ PWSK_SOCKET Socket,
347 _In_ PWSK_DATA_INDICATION DataIndication);
348
350{
351#ifdef __cplusplus
353#else
355#endif
365
366typedef
373 _In_opt_ PWSK_INSPECT_ID InspectID);
374
375typedef
379 _In_ PWSK_INSPECT_ID InspectID);
380
381typedef
382_At_(Irp->IoStatus.Information, __drv_allocatesMem(Mem))
384(WSKAPI * PFN_WSK_SOCKET)(
391 _In_opt_ const VOID *Dispatch,
396
397typedef struct _WSK_TDI_MAP
398{
404
405typedef struct _WSK_TDI_MAP_INFO
406{
410
411typedef
416 _In_ SIZE_T InputSize,
418 _In_ SIZE_T OutputSize,
420 _Out_opt_ SIZE_T *OutputSizeReturned,
422
423#if (NTDDI_VERSION >= NTDDI_WIN7)
424
425typedef
428(WSKAPI * PFN_WSK_GET_ADDRESS_INFO)(
430 _In_opt_ PUNICODE_STRING NodeName,
432 _In_opt_ ULONG NameSpace,
434 _In_opt_ PADDRINFOEXW Hints,
435 _Outptr_ PADDRINFOEXW *Result,
439
440typedef
444 _In_ PSOCKADDR SockAddr,
445 _In_ ULONG SockAddrLength,
446 _Out_opt_ PUNICODE_STRING NodeName,
452
453typedef
455VOID
456(WSKAPI * PFN_WSK_FREE_ADDRESS_INFO)(
458 _In_ PADDRINFOEXW AddrInfo);
459
460#endif /* if (NTDDI_VERSION >= NTDDI_WIN7) */
461
463{
467
469{
474
476{
480
481typedef
484 _In_ PWSK_SOCKET Socket,
488 _In_ ULONG ControlInfoLength,
489 _In_reads_bytes_opt_(ControlInfoLength) PCMSGHDR ControlInfo,
491
492typedef
495 _In_ PWSK_SOCKET Socket,
499 _Inout_ PULONG ControlLength,
500 _Out_writes_bytes_opt_(*ControlLength) PCMSGHDR ControlInfo,
501 _Out_opt_ PULONG ControlFlags,
503
504typedef
507 _In_ PWSK_SOCKET Socket,
508 _In_ PWSK_DATAGRAM_INDICATION DatagramIndication);
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
589 _In_ PWSK_CLIENT_NPI WskClientNpi,
590 _Out_ PWSK_REGISTRATION WskRegistration);
591
595 _In_ PWSK_REGISTRATION WskRegistration,
596 _In_ ULONG WaitTimeout,
597 _Out_ PWSK_PROVIDER_NPI WskProviderNpi);
598
599VOID
601 _In_ PWSK_REGISTRATION WskRegistration);
602
606 _In_ PWSK_REGISTRATION WskRegistration,
607 _Out_ PWSK_PROVIDER_CHARACTERISTICS WskProviderCharacteristics);
608
609VOID
611 _In_ PWSK_REGISTRATION WskRegistration);
612
613#ifdef __cplusplus
614}
615#endif
616
617
#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:20
#define __drv_freesMem(kind)
Definition: driverspecs.h:271
#define __drv_allocatesMem(kind)
Definition: driverspecs.h:256
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
unsigned int * PULONG
Definition: retypes.h:1
unsigned int ULONG
Definition: retypes.h:1
#define _Out_opt_
Definition: ms_sal.h:346
#define _Inout_
Definition: ms_sal.h:378
#define _Outptr_result_maybenull_
Definition: ms_sal.h:428
#define _Outptr_
Definition: ms_sal.h:427
#define _Inout_opt_
Definition: ms_sal.h:379
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_reads_bytes_opt_(size)
Definition: ms_sal.h:322
#define _In_opt_
Definition: ms_sal.h:309
#define _Reserved_
Definition: ms_sal.h:295
#define _Out_writes_bytes_opt_(size)
Definition: ms_sal.h:351
_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 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:472
const VOID * ProviderDispatch
Definition: wsk.h:478
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:362
PFN_WSK_GET_LOCAL_ADDRESS WskGetLocalAddress
Definition: wsk.h:358
PFN_WSK_CONNECT WskConnect
Definition: wsk.h:357
PFN_WSK_RELEASE_DATA_INDICATION_LIST WskRelease
Definition: wsk.h:363
PFN_WSK_GET_REMOTE_ADDRESS WskGetRemoteAddress
Definition: wsk.h:359
PFN_WSK_RECEIVE WskReceive
Definition: wsk.h:361
PFN_WSK_RELEASE_DATAGRAM_INDICATION_LIST WskRelease
Definition: wsk.h:297
PFN_WSK_SEND_TO WskSendTo
Definition: wsk.h:295
PFN_WSK_SEND_MESSAGES WskSendMessages
Definition: wsk.h:300
PFN_WSK_RECEIVE_FROM WskReceiveFrom
Definition: wsk.h:296
PFN_WSK_GET_LOCAL_ADDRESS WskGetLocalAddress
Definition: wsk.h:298
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:407
PCWSTR TdiDeviceName
Definition: wsk.h:402
ADDRESS_FAMILY AddressFamily
Definition: wsk.h:400
USHORT SocketType
Definition: wsk.h:399
ULONG Protocol
Definition: wsk.h:401
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
const uint16_t * PCWSTR
Definition: typedefs.h:57
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG_PTR
Definition: typedefs.h:65
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:442
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:321
_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
_Must_inspect_result_ NTSTATUS WskQueryProviderCharacteristics(_In_ PWSK_REGISTRATION WskRegistration, _Out_ PWSK_PROVIDER_CHARACTERISTICS WskProviderCharacteristics)
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:377
_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
_Must_inspect_result_ NTSTATUS WskCaptureProviderNPI(_In_ PWSK_REGISTRATION WskRegistration, _In_ ULONG WaitTimeout, _Out_ PWSK_PROVIDER_NPI WskProviderNpi)
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:413
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
_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:314
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:386
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:337
_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:458
_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:345
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:506
NTSTATUS(WSKAPI * PFN_WSK_CONNECT)(_In_ PWSK_SOCKET Socket, _In_ PSOCKADDR RemoteAddress, _Reserved_ ULONG Flags, _Inout_ PIRP Irp)
Definition: wsk.h:306
struct _WSK_EVENT_CALLBACK_CONTROL WSK_EVENT_CALLBACK_CONTROL
struct _WSK_TDI_MAP WSK_TDI_MAP
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
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:329
_In_ USHORT SocketType
Definition: wsk.h:182
struct _WSK_CLIENT_DATAGRAM_DISPATCH * PWSK_CLIENT_DATAGRAM_DISPATCH
struct _WSK_TDI_MAP_INFO WSK_TDI_MAP_INFO
VOID WskDeregister(_In_ PWSK_REGISTRATION WskRegistration)
_Must_inspect_result_ NTSTATUS WskRegister(_In_ PWSK_CLIENT_NPI WskClientNpi, _Out_ PWSK_REGISTRATION WskRegistration)
_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
_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
VOID WskReleaseProviderNPI(_In_ PWSK_REGISTRATION WskRegistration)
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
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:426
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:369
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