ReactOS 0.4.16-dev-297-gc569aee
connect.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: drivers/net/afd/afd/connect.c
5 * PURPOSE: Ancillary functions driver
6 * PROGRAMMER: Art Yerkes (ayerkes@speakeasy.net)
7 * UPDATE HISTORY:
8 * 20040708 Created
9 */
10
11#include "afd.h"
12
17{
19 PAFD_FCB FCB = FileObject->FsContext;
20 UINT BufferSize = IrpSp->Parameters.DeviceIoControl.OutputBufferLength;
21
23
25
26 if (FCB->ConnectOptionsSize == 0)
27 {
28 AFD_DbgPrint(MIN_TRACE,("Invalid parameter\n"));
30 }
31
32 ASSERT(FCB->ConnectOptions);
33
34 if (FCB->FilledConnectOptions < BufferSize) BufferSize = FCB->FilledConnectOptions;
35
36 RtlCopyMemory(Irp->UserBuffer,
37 FCB->ConnectOptions,
39
41}
42
47{
49 PAFD_FCB FCB = FileObject->FsContext;
50 PVOID ConnectOptions = LockRequest(Irp, IrpSp, FALSE, NULL);
51 UINT ConnectOptionsSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength;
52
54
56
57 if (!ConnectOptions)
59
60 if (FCB->ConnectOptions)
61 {
63 FCB->ConnectOptions = NULL;
64 FCB->ConnectOptionsSize = 0;
65 FCB->FilledConnectOptions = 0;
66 }
67
68 FCB->ConnectOptions = ExAllocatePoolWithTag(PagedPool,
69 ConnectOptionsSize,
71
72 if (!FCB->ConnectOptions)
74
75 RtlCopyMemory(FCB->ConnectOptions,
76 ConnectOptions,
77 ConnectOptionsSize);
78
79 FCB->ConnectOptionsSize = ConnectOptionsSize;
80
82}
83
88{
90 PAFD_FCB FCB = FileObject->FsContext;
91 PUINT ConnectOptionsSize = LockRequest(Irp, IrpSp, FALSE, NULL);
92 UINT BufferSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength;
93
95
97
98 if (!ConnectOptionsSize)
100
101 if (BufferSize < sizeof(UINT))
102 {
103 AFD_DbgPrint(MIN_TRACE,("Buffer too small\n"));
105 }
106
107 if (FCB->ConnectOptions)
108 {
110 FCB->ConnectOptionsSize = 0;
111 FCB->FilledConnectOptions = 0;
112 }
113
114 FCB->ConnectOptions = ExAllocatePoolWithTag(PagedPool,
115 *ConnectOptionsSize,
117
118 if (!FCB->ConnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
119
120 FCB->ConnectOptionsSize = *ConnectOptionsSize;
121
123}
124
126NTAPI
129{
131 PAFD_FCB FCB = FileObject->FsContext;
132 UINT BufferSize = IrpSp->Parameters.DeviceIoControl.OutputBufferLength;
133
135
137
138 if (FCB->ConnectDataSize == 0)
139 {
140 AFD_DbgPrint(MIN_TRACE,("Invalid parameter\n"));
142 }
143
144 ASSERT(FCB->ConnectData);
145
146 if (FCB->FilledConnectData < BufferSize) BufferSize = FCB->FilledConnectData;
147
148 RtlCopyMemory(Irp->UserBuffer,
149 FCB->ConnectData,
150 BufferSize);
151
153}
154
156NTAPI
159{
161 PAFD_FCB FCB = FileObject->FsContext;
162 PVOID ConnectData = LockRequest(Irp, IrpSp, FALSE, NULL);
163 UINT ConnectDataSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength;
164
166
168
169 if (!ConnectData)
171
172 if (FCB->ConnectData)
173 {
175 FCB->ConnectData = NULL;
176 FCB->ConnectDataSize = 0;
177 FCB->FilledConnectData = 0;
178 }
179
180 FCB->ConnectData = ExAllocatePoolWithTag(PagedPool,
181 ConnectDataSize,
183
184 if (!FCB->ConnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
185
186 RtlCopyMemory(FCB->ConnectData,
187 ConnectData,
188 ConnectDataSize);
189
190 FCB->ConnectDataSize = ConnectDataSize;
191
193}
194
196NTAPI
199{
201 PAFD_FCB FCB = FileObject->FsContext;
202 PUINT ConnectDataSize = LockRequest(Irp, IrpSp, FALSE, NULL);
203 UINT BufferSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength;
204
206
208
209 if (!ConnectDataSize)
211
212 if (BufferSize < sizeof(UINT))
213 {
214 AFD_DbgPrint(MIN_TRACE,("Buffer too small\n"));
216 }
217
218 if (FCB->ConnectData)
219 {
221 FCB->ConnectDataSize = 0;
222 FCB->FilledConnectData = 0;
223 }
224
225 FCB->ConnectData = ExAllocatePoolWithTag(PagedPool,
226 *ConnectDataSize,
228
229 if (!FCB->ConnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
230
231 FCB->ConnectDataSize = *ConnectDataSize;
232
234}
235
236
240
241 if( !FCB->TdiDeviceName.Length || !FCB->TdiDeviceName.Buffer ) {
242 AFD_DbgPrint(MIN_TRACE,("Null Device\n"));
244 }
245
246 Status = TdiOpenConnectionEndpointFile(&FCB->TdiDeviceName,
247 &FCB->Connection.Handle,
248 &FCB->Connection.Object );
249
250 if( NT_SUCCESS(Status) ) {
251 Status = TdiAssociateAddressFile( FCB->AddressFile.Handle,
252 FCB->Connection.Object );
253 }
254
255 return Status;
256}
257
261
262 ASSERT(!FCB->Recv.Window);
263 ASSERT(!FCB->Send.Window);
264
265 if (!FCB->Recv.Size)
266 {
267 Status = TdiQueryMaxDatagramLength(FCB->Connection.Object,
268 &FCB->Recv.Size);
269 if (!NT_SUCCESS(Status))
270 return Status;
271 }
272
273 if (!FCB->Send.Size)
274 {
275 Status = TdiQueryMaxDatagramLength(FCB->Connection.Object,
276 &FCB->Send.Size);
277 if (!NT_SUCCESS(Status))
278 return Status;
279 }
280
281 /* Allocate the receive area and start receiving */
282 if (!FCB->Recv.Window)
283 {
284 FCB->Recv.Window = ExAllocatePoolWithTag(PagedPool,
285 FCB->Recv.Size,
287
288 if( !FCB->Recv.Window ) return STATUS_NO_MEMORY;
289 }
290
291 if (!FCB->Send.Window)
292 {
293 FCB->Send.Window = ExAllocatePoolWithTag(PagedPool,
294 FCB->Send.Size,
296
297 if( !FCB->Send.Window ) return STATUS_NO_MEMORY;
298 }
299
301
302 Status = TdiReceive( &FCB->ReceiveIrp.InFlightRequest,
303 FCB->Connection.Object,
305 FCB->Recv.Window,
306 FCB->Recv.Size,
308 FCB );
309
311
312 FCB->PollState |= AFD_EVENT_CONNECT | AFD_EVENT_SEND;
313 FCB->PollStatus[FD_CONNECT_BIT] = STATUS_SUCCESS;
314 FCB->PollStatus[FD_WRITE_BIT] = STATUS_SUCCESS;
315 PollReeval( FCB->DeviceExt, FCB->FileObject );
316
317 return Status;
318}
319
320static IO_COMPLETION_ROUTINE StreamSocketConnectComplete;
321static
323NTAPI
325 PVOID Context) {
326 NTSTATUS Status = Irp->IoStatus.Status;
328 PLIST_ENTRY NextIrpEntry;
329 PIRP NextIrp;
330
331 AFD_DbgPrint(MID_TRACE,("Called: FCB %p, FO %p\n",
333
334 /* I was wrong about this before as we can have pending writes to a not
335 * yet connected socket */
337 return STATUS_FILE_CLOSED;
338
339 AFD_DbgPrint(MID_TRACE,("Irp->IoStatus.Status = %x\n",
340 Irp->IoStatus.Status));
341
342 ASSERT(FCB->ConnectIrp.InFlightRequest == Irp);
343 FCB->ConnectIrp.InFlightRequest = NULL;
344
345 if( FCB->State == SOCKET_STATE_CLOSED ) {
346 /* Cleanup our IRP queue because the FCB is being destroyed */
347 while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_CONNECT] ) ) {
348 NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_CONNECT]);
349 NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry);
351 NextIrp->IoStatus.Information = 0;
352 if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) );
353 (void)IoSetCancelRoutine(NextIrp, NULL);
355 }
357 return STATUS_FILE_CLOSED;
358 }
359
360 if( !NT_SUCCESS(Irp->IoStatus.Status) ) {
361 FCB->PollState |= AFD_EVENT_CONNECT_FAIL;
362 FCB->PollStatus[FD_CONNECT_BIT] = Irp->IoStatus.Status;
363 AFD_DbgPrint(MID_TRACE,("Going to bound state\n"));
364 FCB->State = SOCKET_STATE_BOUND;
365 PollReeval( FCB->DeviceExt, FCB->FileObject );
366 }
367
368 /* Succeed pending irps on the FUNCTION_CONNECT list */
369 while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_CONNECT] ) ) {
370 NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_CONNECT]);
371 NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry);
372 AFD_DbgPrint(MID_TRACE,("Completing connect %p\n", NextIrp));
373 NextIrp->IoStatus.Status = Status;
374 NextIrp->IoStatus.Information = NT_SUCCESS(Status) ? ((ULONG_PTR)FCB->Connection.Handle) : 0;
375 if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) );
376 (void)IoSetCancelRoutine(NextIrp, NULL);
378 }
379
380 if( NT_SUCCESS(Status) ) {
382
383 if( !NT_SUCCESS(Status) ) {
385 return Status;
386 }
387
388 FCB->FilledConnectData = MIN(FCB->ConnectReturnInfo->UserDataLength, FCB->ConnectDataSize);
389 if (FCB->FilledConnectData)
390 {
391 RtlCopyMemory(FCB->ConnectData,
392 FCB->ConnectReturnInfo->UserData,
393 FCB->FilledConnectData);
394 }
395
396 FCB->FilledConnectOptions = MIN(FCB->ConnectReturnInfo->OptionsLength, FCB->ConnectOptionsSize);
397 if (FCB->FilledConnectOptions)
398 {
399 RtlCopyMemory(FCB->ConnectOptions,
400 FCB->ConnectReturnInfo->Options,
401 FCB->FilledConnectOptions);
402 }
403
404 if( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND] ) ) {
405 NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]);
406 NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP,
407 Tail.Overlay.ListEntry);
408 AFD_DbgPrint(MID_TRACE,("Launching send request %p\n", NextIrp));
410 ( DeviceObject,
411 NextIrp,
413 FALSE );
414 }
415
416 if( Status == STATUS_PENDING )
418 }
419
421
422 AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status));
423
424 return Status;
425}
426
427/* Return the socket object for ths request only if it is a connected or
428 stream type. */
430NTAPI
435 PAFD_FCB FCB = FileObject->FsContext;
436 PAFD_CONNECT_INFO ConnectReq;
437 AFD_DbgPrint(MID_TRACE,("Called on %p\n", FCB));
438
440
441 if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
442 if( !(ConnectReq = LockRequest( Irp, IrpSp, FALSE, NULL )) )
444 0 );
445
446 AFD_DbgPrint(MID_TRACE,("Connect request:\n"));
447#if 0
449 ( (PCHAR)ConnectReq,
450 IrpSp->Parameters.DeviceIoControl.InputBufferLength );
451#endif
452
454 {
455 if (FCB->RemoteAddress)
456 {
458 }
459
460 FCB->RemoteAddress =
462
463 if( !FCB->RemoteAddress )
465 else
467
468 return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
469 }
470
471 switch( FCB->State ) {
474 break;
475
478
480 if (FCB->LocalAddress)
481 {
483 }
484
485 FCB->LocalAddress =
487
488 if( FCB->LocalAddress ) {
490
491 if( NT_SUCCESS(Status) )
492 FCB->State = SOCKET_STATE_BOUND;
493 else
494 return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
495 } else
497 ( FCB, STATUS_NO_MEMORY, Irp, 0 );
498
499 /* Drop through to SOCKET_STATE_BOUND */
500
502 if (FCB->RemoteAddress)
503 {
505 }
506
507 FCB->RemoteAddress =
509
510 if( !FCB->RemoteAddress ) {
512 break;
513 }
514
516
517 if( !NT_SUCCESS(Status) )
518 break;
519
520 if (FCB->ConnectReturnInfo)
521 {
523 }
524
526 ( &FCB->ConnectReturnInfo,
527 &ConnectReq->RemoteAddress );
528
529 if( NT_SUCCESS(Status) )
530 {
531 if (FCB->ConnectCallInfo)
532 {
534 }
535
536 Status = TdiBuildConnectionInfo(&FCB->ConnectCallInfo,
537 &ConnectReq->RemoteAddress);
538 }
539 else break;
540
541
542 if( NT_SUCCESS(Status) ) {
543 FCB->ConnectCallInfo->UserData = FCB->ConnectData;
544 FCB->ConnectCallInfo->UserDataLength = FCB->ConnectDataSize;
545 FCB->ConnectCallInfo->Options = FCB->ConnectOptions;
546 FCB->ConnectCallInfo->OptionsLength = FCB->ConnectOptionsSize;
547
549
550 AFD_DbgPrint(MID_TRACE,("Queueing IRP %p\n", Irp));
552 if (Status == STATUS_PENDING)
553 {
554 Status = TdiConnect( &FCB->ConnectIrp.InFlightRequest,
555 FCB->Connection.Object,
556 FCB->ConnectCallInfo,
557 FCB->ConnectReturnInfo,
559 FCB );
560 }
561
562 if (Status != STATUS_PENDING)
563 FCB->State = SOCKET_STATE_BOUND;
564
566
567 return Status;
568 }
569 break;
570
571 default:
572 AFD_DbgPrint(MIN_TRACE,("Inappropriate socket state %u for connect\n",
573 FCB->State));
574 break;
575 }
576
577 return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
578}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define FUNCTION_CONNECT
Definition: afd.h:84
#define SOCKET_STATE_CLOSED
Definition: afd.h:82
IO_COMPLETION_ROUTINE ReceiveComplete
Definition: afd.h:308
#define SOCKET_STATE_CONNECTED
Definition: afd.h:76
#define SOCKET_STATE_CREATED
Definition: afd.h:73
struct _AFD_FCB * PAFD_FCB
#define TAG_AFD_TDI_CONNECTION_INFORMATION
Definition: afd.h:53
#define TAG_AFD_CONNECT_OPTIONS
Definition: afd.h:44
#define TAG_AFD_CONNECT_DATA
Definition: afd.h:41
#define SOCKET_STATE_CONNECTING
Definition: afd.h:75
#define SOCKET_STATE_BOUND
Definition: afd.h:74
#define TAG_AFD_DATA_BUFFER
Definition: afd.h:38
#define TAG_AFD_TRANSPORT_ADDRESS
Definition: afd.h:39
#define FUNCTION_SEND
Definition: afd.h:86
LONG NTSTATUS
Definition: precomp.h:26
#define MIN(x, y)
Definition: rdesktop.h:171
#define MIN_TRACE
Definition: debug.h:14
#define MID_TRACE
Definition: debug.h:15
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_PENDING
Definition: d3dkmdt.h:43
#define STATUS_NO_MEMORY
Definition: d3dkmdt.h:51
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4137
NTSTATUS WarmSocketForBind(PAFD_FCB FCB, ULONG ShareType)
Definition: bind.c:13
NTSTATUS MakeSocketIntoConnection(PAFD_FCB FCB)
Definition: connect.c:259
NTSTATUS NTAPI AfdSetConnectData(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
Definition: connect.c:157
NTSTATUS NTAPI AfdSetConnectDataSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
Definition: connect.c:197
NTSTATUS NTAPI AfdStreamSocketConnect(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
Definition: connect.c:431
NTSTATUS NTAPI AfdGetConnectOptions(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
Definition: connect.c:15
NTSTATUS NTAPI AfdGetConnectData(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
Definition: connect.c:127
NTSTATUS NTAPI AfdSetConnectOptions(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
Definition: connect.c:45
NTSTATUS WarmSocketForConnection(PAFD_FCB FCB)
Definition: connect.c:238
static IO_COMPLETION_ROUTINE StreamSocketConnectComplete
Definition: connect.c:320
NTSTATUS NTAPI AfdSetConnectOptionsSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
Definition: connect.c:86
PVOID LockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp, BOOLEAN Output, KPROCESSOR_MODE *LockMode)
Definition: lock.c:24
VOID UnlockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp)
Definition: lock.c:180
NTSTATUS QueueUserModeIrp(PAFD_FCB FCB, PIRP Irp, UINT Function)
Definition: lock.c:397
NTSTATUS LostSocket(PIRP Irp)
Definition: lock.c:387
NTSTATUS NTAPI UnlockAndMaybeComplete(PAFD_FCB FCB, NTSTATUS Status, PIRP Irp, UINT Information)
Definition: lock.c:375
VOID SocketStateUnlock(PAFD_FCB FCB)
Definition: lock.c:370
NTSTATUS LeaveIrpUntilLater(PAFD_FCB FCB, PIRP Irp, UINT Function)
Definition: lock.c:433
BOOLEAN SocketAcquireStateLock(PAFD_FCB FCB)
Definition: lock.c:360
void OskitDumpBuffer(PCHAR Data, UINT Len)
Definition: main.c:29
VOID PollReeval(PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject)
Definition: select.c:407
NTSTATUS TdiAssociateAddressFile(HANDLE AddressHandle, PFILE_OBJECT ConnectionObject)
Definition: tdi.c:391
NTSTATUS TdiOpenConnectionEndpointFile(PUNICODE_STRING DeviceName, PHANDLE ConnectionHandle, PFILE_OBJECT *ConnectionObject)
Definition: tdi.c:281
NTSTATUS TdiQueryMaxDatagramLength(PFILE_OBJECT FileObject, PUINT MaxDatagramLength)
Definition: tdi.c:226
NTSTATUS TdiConnect(PIRP *Irp, PFILE_OBJECT ConnectionObject, PTDI_CONNECTION_INFORMATION ConnectionCallInfo, PTDI_CONNECTION_INFORMATION ConnectionReturnInfo, PIO_COMPLETION_ROUTINE CompletionRoutine, PVOID CompletionContext)
Definition: tdi.c:334
NTSTATUS TdiReceive(PIRP *Irp, PFILE_OBJECT TransportObject, USHORT Flags, PCHAR Buffer, UINT BufferLength, PIO_COMPLETION_ROUTINE CompletionRoutine, PVOID CompletionContext)
Definition: tdi.c:976
NTSTATUS NTAPI AfdConnectedSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp, BOOLEAN Short)
Definition: write.c:329
#define AFD_DbgPrint(_t_, _x_)
Definition: debug.h:60
#define IO_NETWORK_INCREMENT
Definition: tcpip.h:43
#define ULONG_PTR
Definition: config.h:101
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define RemoveHeadList(ListHead)
Definition: env_spec_w32.h:964
#define PagedPool
Definition: env_spec_w32.h:308
Status
Definition: gdiplustypes.h:25
IoSetCancelRoutine(Irp, CancelRoutine)
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
#define IoCompleteRequest
Definition: irp.c:1240
#define STATUS_FILE_CLOSED
Definition: ntstatus.h:532
#define AFD_SHARE_WILDCARD
Definition: shared.h:193
#define AFD_EVENT_SEND
Definition: shared.h:205
#define AFD_EVENT_CONNECT_FAIL
Definition: shared.h:211
#define AFD_ENDPOINT_CONNECTIONLESS
Definition: shared.h:153
#define AFD_EVENT_CONNECT
Definition: shared.h:209
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
TRANSPORT_ADDRESS RemoteAddress
Definition: shared.h:121
Definition: afd.h:159
Definition: cdstruc.h:902
ULONG Flags
Definition: ntfs.h:536
PFILE_OBJECT FileObject
Definition: ntfs.h:520
PFILE_OBJECT FileObject
Definition: iotypes.h:3169
struct _IO_STACK_LOCATION::@1579::@1580 DeviceIoControl
union _IO_STACK_LOCATION::@1579 Parameters
IO_STATUS_BLOCK IoStatus
Definition: typedefs.h:120
USHORT AddressType
Definition: tdi.h:339
TA_ADDRESS Address[1]
Definition: tdi.h:377
#define TDI_RECEIVE_NORMAL
Definition: tdi.h:122
NTSTATUS TdiBuildConnectionInfo(PTDI_CONNECTION_INFORMATION *ConnectionInfo, PTRANSPORT_ADDRESS Address)
Definition: tdiconn.c:237
PTRANSPORT_ADDRESS TaBuildNullTransportAddress(UINT AddressType)
Definition: tdiconn.c:113
PTRANSPORT_ADDRESS TaCopyTransportAddress(PTRANSPORT_ADDRESS OtherAddress)
Definition: tdiconn.c:80
#define NTAPI
Definition: typedefs.h:36
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
char * PCHAR
Definition: typedefs.h:51
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_NO_SUCH_DEVICE
Definition: udferr_usr.h:136
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
#define FD_CONNECT_BIT
Definition: winsock2.h:301
#define FD_WRITE_BIT
Definition: winsock2.h:295
* PFILE_OBJECT
Definition: iotypes.h:1998