ReactOS 0.4.17-dev-966-gf06eace
udp.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
4 * FILE: transport/udp/udp.c
5 * PURPOSE: User Datagram Protocol routines
6 * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * REVISIONS:
8 * CSH 01/08-2000 Created
9 */
10
11#include "precomp.h"
12
15
17 PADDRESS_FILE AddrFile,
19 USHORT RemotePort,
21 USHORT LocalPort,
22 PIP_PACKET IPPacket,
23 PVOID Data,
25/*
26 * FUNCTION: Adds an IPv4 and UDP header to an IP packet
27 * ARGUMENTS:
28 * SendRequest = Pointer to send request
29 * LocalAddress = Pointer to our local address
30 * LocalPort = The port we send this datagram from
31 * IPPacket = Pointer to IP packet
32 * RETURNS:
33 * Status of operation
34 */
35{
38
39 TI_DbgPrint(MID_TRACE, ("Packet: %x NdisPacket %x\n",
40 IPPacket, IPPacket->NdisPacket));
41
43 ( AddrFile, RemoteAddress, RemotePort,
44 LocalAddress, LocalPort,
45 IPPacket, DataLength, IPPROTO_UDP,
46 sizeof(UDP_HEADER), (PVOID *)&UDPHeader );
47
48 if (!NT_SUCCESS(Status))
49 return Status;
50
51 /* Port values are already big-endian values */
52 UDPHeader->SourcePort = LocalPort;
53 UDPHeader->DestPort = RemotePort;
54 UDPHeader->Checksum = 0;
55 /* Length of UDP header and data */
56 UDPHeader->Length = WH2N(DataLength + sizeof(UDP_HEADER));
57
58 TI_DbgPrint(MID_TRACE, ("Copying data (hdr %x data %x (%d))\n",
59 IPPacket->Header, IPPacket->Data,
60 (PCHAR)IPPacket->Data - (PCHAR)IPPacket->Header));
61
62 RtlCopyMemory(IPPacket->Data, Data, DataLength);
63
66 DataLength + sizeof(UDP_HEADER));
67 UDPHeader->Checksum = WH2N(UDPHeader->Checksum);
68
69 TI_DbgPrint(MID_TRACE, ("Packet: %d ip %d udp %d payload\n",
70 (PCHAR)UDPHeader - (PCHAR)IPPacket->Header,
71 (PCHAR)IPPacket->Data - (PCHAR)UDPHeader,
72 DataLength));
73
74 return STATUS_SUCCESS;
75}
76
77
79 PADDRESS_FILE AddrFile,
82 USHORT RemotePort,
84 USHORT LocalPort,
85 PCHAR DataBuffer,
86 UINT DataLen )
87/*
88 * FUNCTION: Builds an UDP packet
89 * ARGUMENTS:
90 * Context = Pointer to context information (DATAGRAM_SEND_REQUEST)
91 * LocalAddress = Pointer to our local address
92 * LocalPort = The port we send this datagram from
93 * IPPacket = Address of pointer to IP packet
94 * RETURNS:
95 * Status of operation
96 */
97{
99
100 TI_DbgPrint(MAX_TRACE, ("Called.\n"));
101
102 /* FIXME: Assumes IPv4 */
104
105 Packet->TotalSize = sizeof(IPv4_HEADER) + sizeof(UDP_HEADER) + DataLen;
106
107 /* Prepare packet */
109 NULL,
110 Packet->TotalSize );
111
112 if( !NT_SUCCESS(Status) )
113 {
114 Packet->Free(Packet);
115 return Status;
116 }
117
118 TI_DbgPrint(MID_TRACE, ("Allocated packet: %x\n", Packet->NdisPacket));
119 TI_DbgPrint(MID_TRACE, ("Local Addr : %s\n", A2S(LocalAddress)));
120 TI_DbgPrint(MID_TRACE, ("Remote Addr: %s\n", A2S(RemoteAddress)));
121
122 switch (RemoteAddress->Type) {
123 case IP_ADDRESS_V4:
124 Status = AddUDPHeaderIPv4(AddrFile, RemoteAddress, RemotePort,
125 LocalAddress, LocalPort, Packet, DataBuffer, DataLen);
126 break;
127 case IP_ADDRESS_V6:
128 /* FIXME: Support IPv6 */
129 TI_DbgPrint(MIN_TRACE, ("IPv6 UDP datagrams are not supported.\n"));
130 default:
132 break;
133 }
134 if (!NT_SUCCESS(Status)) {
135 TI_DbgPrint(MIN_TRACE, ("Cannot add UDP header. Status = (0x%X)\n",
136 Status));
137 Packet->Free(Packet);
138 return Status;
139 }
140
141 TI_DbgPrint(MID_TRACE, ("Displaying packet\n"));
142
144
145 TI_DbgPrint(MID_TRACE, ("Leaving\n"));
146
147 return STATUS_SUCCESS;
148}
149
161static
165{
166 BOOLEAN IsBroadcast = FALSE;
168 IF_LIST_ITER(CurrentIF);
169
170 if (Address->Type != IP_ADDRESS_V4)
171 return FALSE;
172
173 if (Address->Address.IPv4Address == 0xFFFFFFFF)
174 return TRUE;
175
177
178 ForEachInterface(CurrentIF) {
179 if (CurrentIF != Loopback && AddrIsEqual(&CurrentIF->Broadcast, Address))
180 {
181 IsBroadcast = TRUE;
182 break;
183 }
184 } EndFor(CurrentIF);
185
187
188 return IsBroadcast;
189}
190
192 PADDRESS_FILE AddrFile,
194 PCHAR BufferData,
196 PULONG DataUsed )
197/*
198 * FUNCTION: Sends an UDP datagram to a remote address
199 * ARGUMENTS:
200 * Request = Pointer to TDI request
201 * ConnInfo = Pointer to connection information
202 * Buffer = Pointer to NDIS buffer with data
203 * DataSize = Size in bytes of data to be sent
204 * RETURNS:
205 * Status of operation
206 */
207{
209 PTA_IP_ADDRESS RemoteAddressTa = (PTA_IP_ADDRESS)ConnInfo->RemoteAddress;
212 USHORT RemotePort;
215 IP_PACKET LoopPacket;
216 PNEIGHBOR_CACHE_ENTRY LoopNCE = NULL;
217
218 LockObject(AddrFile);
219
220 TI_DbgPrint(MID_TRACE,("Sending Datagram(%x %x %x %d)\n",
221 AddrFile, ConnInfo, BufferData, DataSize));
222 TI_DbgPrint(MID_TRACE,("RemoteAddressTa: %x\n", RemoteAddressTa));
223
224 switch( RemoteAddressTa->Address[0].AddressType ) {
227 RemoteAddress.Address.IPv4Address =
228 RemoteAddressTa->Address[0].Address[0].in_addr;
229 RemotePort = RemoteAddressTa->Address[0].Address[0].sin_port;
230 break;
231
232 default:
233 UnlockObject(AddrFile);
234 return STATUS_UNSUCCESSFUL;
235 }
236
237 LocalAddress = AddrFile->Address;
239 {
240 /* If the local address is unspecified (0),
241 * then use the unicast address of the
242 * interface we're sending over
243 */
245 UnlockObject(AddrFile);
247 }
248
249 LocalAddress = NCE->Interface->Unicast;
250 }
251 else
252 {
253 if(!(NCE = NBLocateNeighbor( &LocalAddress, NULL ))) {
254 UnlockObject(AddrFile);
256 }
257 }
258
259 Status = BuildUDPPacket( AddrFile,
260 &Packet,
262 RemotePort,
264 AddrFile->Port,
265 BufferData,
266 DataSize );
267
268 if (!NT_SUCCESS(Status))
269 {
270 UnlockObject(AddrFile);
271 return Status;
272 }
273
274 /* NDIS does not loop broadcasts back to the sender, so deliver a local copy */
275 if (Loopback != NULL &&
276 NCE->Interface != Loopback &&
278 {
280 if (LoopNCE != NULL &&
281 !NT_SUCCESS(BuildUDPPacket(AddrFile,
282 &LoopPacket,
284 RemotePort,
286 AddrFile->Port,
287 BufferData,
288 DataSize)))
289 {
290 LoopNCE = NULL;
291 }
292 }
293
294 UnlockObject(AddrFile);
295
297
298 if (LoopNCE != NULL)
299 IPSendDatagram(&LoopPacket, LoopNCE);
300
301 if (!NT_SUCCESS(Status))
302 return Status;
303
304 *DataUsed = DataSize;
305
306 return STATUS_SUCCESS;
307}
308
309
311/*
312 * FUNCTION: Receives and queues a UDP datagram
313 * ARGUMENTS:
314 * NTE = Pointer to net table entry which the packet was received on
315* IPPacket = Pointer to an IP packet that was received
316* NOTES:
317* This is the low level interface for receiving UDP datagrams. It strips
318* the UDP header from a packet and delivers the data to anyone that wants it
319*/
320{
321 AF_SEARCH SearchContext;
323 PADDRESS_FILE AddrFile;
325 PIP_ADDRESS DstAddress, SrcAddress;
326 UINT DataSize, i;
327
328 TI_DbgPrint(MAX_TRACE, ("Called.\n"));
329
330 switch (IPPacket->Type) {
331 /* IPv4 packet */
332 case IP_ADDRESS_V4:
333 IPv4Header = IPPacket->Header;
334 DstAddress = &IPPacket->DstAddr;
335 SrcAddress = &IPPacket->SrcAddr;
336 break;
337
338 /* IPv6 packet */
339 case IP_ADDRESS_V6:
340 TI_DbgPrint(MIN_TRACE, ("Discarded IPv6 UDP datagram (%i bytes).\n", IPPacket->TotalSize));
341
342 /* FIXME: IPv6 is not supported */
343 return;
344
345 default:
346 return;
347 }
348
349 UDPHeader = (PUDP_HEADER)IPPacket->Data;
350
351 /* Calculate and validate UDP checksum */
354 WH2N(UDPHeader->Length));
355 if (i != DH2N(0x0000FFFF) && UDPHeader->Checksum != 0)
356 {
357 TI_DbgPrint(MIN_TRACE, ("Bad checksum on packet received.\n"));
358 return;
359 }
360
361 /* Sanity checks */
362 i = WH2N(UDPHeader->Length);
363 if ((i < sizeof(UDP_HEADER)) || (i > IPPacket->TotalSize - IPPacket->Position)) {
364 /* Incorrect or damaged packet received, discard it */
365 TI_DbgPrint(MIN_TRACE, ("Incorrect or damaged UDP packet received.\n"));
366 return;
367 }
368
369 DataSize = i - sizeof(UDP_HEADER);
370
371 /* Go to UDP data area */
372 IPPacket->Data = (PVOID)((ULONG_PTR)IPPacket->Data + sizeof(UDP_HEADER));
373
374 /* Locate a receive request on destination address file object
375 and deliver the packet if one is found. If there is no receive
376 request on the address file object, call the associated receive
377 handler. If no receive handler is registered, drop the packet */
378
379 AddrFile = AddrSearchFirst(DstAddress,
380 UDPHeader->DestPort,
382 &SearchContext);
383 if (AddrFile) {
384 do {
385 DGDeliverData(AddrFile,
386 SrcAddress,
387 DstAddress,
388 UDPHeader->SourcePort,
389 UDPHeader->DestPort,
390 IPPacket,
391 DataSize);
392 DereferenceObject(AddrFile);
393 } while ((AddrFile = AddrSearchNext(&SearchContext)) != NULL);
394 } else {
395 /* There are no open address files that will take this datagram */
396 /* FIXME: IPv4 only */
397 TI_DbgPrint(MID_TRACE, ("Cannot deliver IPv4 UDP datagram to address (0x%X).\n",
398 DN2H(DstAddress->Address.IPv4Address)));
399
400 /* FIXME: Send ICMP reply */
401 }
402 TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
403}
404
405
407 VOID)
408/*
409 * FUNCTION: Initializes the UDP subsystem
410 * RETURNS:
411 * Status of operation
412 */
413{
415
417
419
420 if( !NT_SUCCESS(Status) ) return Status;
421
422 /* Register this protocol with IP layer */
424
426
427 return STATUS_SUCCESS;
428}
429
430
432 VOID)
433/*
434 * FUNCTION: Shuts down the UDP subsystem
435 * RETURNS:
436 * Status of operation
437 */
438{
439 if (!UDPInitialized)
440 return STATUS_SUCCESS;
441
443
444 /* Deregister this protocol with IP layer */
446
448
449 return STATUS_SUCCESS;
450}
451
453 if( HintPort ) {
454 if( AllocatePort( &UDPPorts, HintPort ) ) return HintPort;
455 else return (UINT)-1;
456 } else return AllocatePortFromRange
459}
460
463}
464
465/* EOF */
unsigned char BOOLEAN
Definition: actypes.h:127
#define DH2N(dw)
Definition: addrconv.c:28
#define WH2N(w)
Definition: addrconv.c:40
#define DN2H(dw)
Definition: addrconv.c:21
PADDRESS_FILE AddrSearchFirst(PIP_ADDRESS Address, USHORT Port, USHORT Protocol, PAF_SEARCH SearchContext)
Definition: fileobjs.c:38
PADDRESS_FILE AddrSearchNext(PAF_SEARCH SearchContext)
Definition: fileobjs.c:231
BOOLEAN AddrIsUnspecified(PIP_ADDRESS Address)
Definition: address.c:113
BOOLEAN AddrIsEqual(PIP_ADDRESS Address1, PIP_ADDRESS Address2)
Definition: address.c:221
LONG NTSTATUS
Definition: precomp.h:26
#define MIN_TRACE
Definition: debug.h:14
#define MID_TRACE
Definition: debug.h:15
#define MAX_TRACE
Definition: debug.h:16
ULONG UDPv4ChecksumCalculate(PIPv4_HEADER IPHeader, PUCHAR PacketBuffer, ULONG DataLength)
Definition: checksum.c:60
VOID DGDeliverData(PADDRESS_FILE AddrFile, PIP_ADDRESS SrcAddress, PIP_ADDRESS DstAddress, USHORT SrcPort, USHORT DstPort, PIP_PACKET IPPacket, UINT DataSize)
Definition: datagram.c:52
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ ULONG _In_ ULONG DataLength
Definition: dispmprt.h:233
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
#define IP_ADDRESS_V6
Definition: ip.h:33
KSPIN_LOCK InterfaceListLock
Definition: ip.c:18
#define IP_ADDRESS_V4
Definition: ip.h:32
#define IPPROTO_UDP
Definition: ip.h:198
VOID IPRegisterProtocol(UINT ProtocolNumber, IP_PROTOCOL_HANDLER Handler)
Definition: ip.c:386
PIP_PACKET IPInitializePacket(PIP_PACKET IPPacket, ULONG Type)
Definition: ip.c:92
VOID TcpipReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL Irql)
Definition: lock.c:26
VOID TcpipAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL Irql)
Definition: lock.c:18
VOID DeallocatePort(PPORT_SET PortSet, ULONG Port)
Definition: ports.c:35
BOOLEAN AllocatePort(PPORT_SET PortSet, ULONG Port)
Definition: ports.c:47
VOID PortsShutdown(PPORT_SET PortSet)
Definition: ports.c:31
NTSTATUS PortsStartup(PPORT_SET PortSet, UINT StartingPort, UINT PortsToManage)
Definition: ports.c:13
ULONG AllocatePortFromRange(PPORT_SET PortSet, ULONG Lowest, ULONG Highest)
Definition: ports.c:86
PNEIGHBOR_CACHE_ENTRY RouteGetRouteToDestination(PIP_ADDRESS Destination)
Definition: router.c:330
PCHAR A2S(PIP_ADDRESS Address)
Definition: address.c:17
UCHAR KIRQL
Definition: env_spec_w32.h:591
struct _tagUDPHeader UDPHeader
struct _tagIPv4Header IPv4Header
Status
Definition: gdiplustypes.h:24
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: sysinfo.c:13
CPPORT Port[4]
Definition: headless.c:38
struct UDP_HEADER * PUDP_HEADER
#define UDP_STARTING_PORT
Definition: udp.h:10
UDP_STATISTICS UDPStats
Definition: main.c:30
#define UDP_DYNAMIC_PORTS
Definition: udp.h:11
BOOLEAN UDPInitialized
Definition: udp.c:13
NTSTATUS BuildUDPPacket(PADDRESS_FILE AddrFile, PIP_PACKET Packet, PIP_ADDRESS RemoteAddress, USHORT RemotePort, PIP_ADDRESS LocalAddress, USHORT LocalPort, PCHAR DataBuffer, UINT DataLen)
Definition: udp.c:78
VOID UDPReceive(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
Definition: udp.c:310
static BOOLEAN UDPIsBroadcastAddress(_In_ PIP_ADDRESS Address)
Checks whether an address is the limited broadcast address or the directed broadcast address of a non...
Definition: udp.c:163
VOID UDPFreePort(UINT Port)
Definition: udp.c:461
NTSTATUS UDPStartup(VOID)
Definition: udp.c:406
NTSTATUS AddUDPHeaderIPv4(PADDRESS_FILE AddrFile, PIP_ADDRESS RemoteAddress, USHORT RemotePort, PIP_ADDRESS LocalAddress, USHORT LocalPort, PIP_PACKET IPPacket, PVOID Data, UINT DataLength)
Definition: udp.c:16
NTSTATUS UDPSendDatagram(PADDRESS_FILE AddrFile, PTDI_CONNECTION_INFORMATION ConnInfo, PCHAR BufferData, ULONG DataSize, PULONG DataUsed)
Definition: udp.c:191
UINT UDPAllocatePort(UINT HintPort)
Definition: udp.c:452
PORT_SET UDPPorts
Definition: udp.c:14
NTSTATUS UDPShutdown(VOID)
Definition: udp.c:431
PIP_INTERFACE Loopback
Definition: loopback.c:13
#define AllocatePacketWithBuffer(x, y, z)
Definition: memtrack.h:7
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1549
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4755
PNEIGHBOR_CACHE_ENTRY NBLocateNeighbor(PIP_ADDRESS Address, PIP_INTERFACE Interface)
Definition: neighbor.c:424
#define _In_
Definition: no_sal2.h:158
#define STATUS_NETWORK_UNREACHABLE
Definition: ntstatus.h:826
unsigned short USHORT
Definition: pedump.c:61
static WCHAR Address[46]
Definition: ping.c:68
NTSTATUS AddGenericHeaderIPv4(PADDRESS_FILE AddrFile, PIP_ADDRESS RemoteAddress, USHORT RemotePort, PIP_ADDRESS LocalAddress, USHORT LocalPort, PIP_PACKET IPPacket, UINT DataLength, UINT Protocol, UINT ExtraLength, PVOID *NextHeader)
Definition: rawip.c:13
#define DISPLAY_IP_PACKET(x)
Definition: routines.h:69
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: ip.h:23
union IP_ADDRESS::@1204 Address
IPv4_RAW_ADDRESS IPv4Address
Definition: ip.h:26
Definition: neighbor.h:28
Definition: udp.h:15
USHORT Port
Definition: titypes.h:120
IP_ADDRESS Address
Definition: titypes.h:117
IP_ADDRESS Unicast
Definition: ip.h:160
Definition: ip.h:77
PVOID Data
Definition: ip.h:85
UCHAR Type
Definition: ip.h:79
IP_ADDRESS SrcAddr
Definition: ip.h:89
UINT Position
Definition: ip.h:87
PNDIS_PACKET NdisPacket
Definition: ip.h:88
PVOID Header
Definition: ip.h:83
IP_ADDRESS DstAddr
Definition: ip.h:90
UINT TotalSize
Definition: ip.h:86
struct _TA_ADDRESS_IP::_AddrIp Address[1]
struct _TA_ADDRESS_IP * PTA_IP_ADDRESS
#define TDI_ADDRESS_TYPE_IP
Definition: tdi.h:345
#define ForEachInterface(n)
Definition: tilists.h:9
#define EndFor(n)
Definition: tilists.h:20
#define IF_LIST_ITER(n)
Definition: tilists.h:5
#define UnlockObject(Object)
Definition: titypes.h:44
#define LockObject(Object)
Definition: titypes.h:34
#define DereferenceObject(Object)
Definition: titypes.h:24
NTSTATUS IPSendDatagram(PIP_PACKET IPPacket, PNEIGHBOR_CACHE_ENTRY NCE)
Definition: transmit.c:223
uint32_t * PULONG
Definition: typedefs.h:59
void * PVOID
Definition: typedefs.h:50
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR LocalAddress
Definition: wsk.h:171
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR RemoteAddress
Definition: wsk.h:172
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778