330 {
337
340
342
344
345 FCB->EventSelectDisabled &= ~AFD_EVENT_SEND;
346
348 {
351
352
354 {
357 0 );
358 }
359
362
363
368
372 }
373
375
377 FCB->PollState &= ~AFD_EVENT_SEND;
378
381 {
383 FCB->AddressFile.Object,
390 {
393 Irp->IoStatus.Information = 0;
398 }
399 }
400
402
404
406 }
407 else
408 {
411 }
412 }
413
415 {
417
418
420 }
421
423 {
425
426
428 }
429
431 {
433
434
436 }
437
441
446
450 }
451
453
458 }
459
461 FCB->Send.BytesUsed));
462
463 SpaceAvail =
FCB->Send.Size -
FCB->Send.BytesUsed;
464
466 SpaceAvail));
467
468
469 SendLength = 0;
471 {
473 }
474
475
476 if (SendLength > SpaceAvail)
477 {
478
480 {
481 FCB->PollState &= ~AFD_EVENT_SEND;
483 }
484
485
486 if (SpaceAvail == 0)
487 {
488 FCB->PollState &= ~AFD_EVENT_SEND;
489
490
492 {
495 }
496 else
497 {
498
500 }
501 }
502 }
503
505 {
507
512 FCB->Send.Window +
FCB->Send.BytesUsed));
513
517
521 }
522
523 Irp->IoStatus.Information = TotalBytesCopied;
524
525 if( TotalBytesCopied == 0 ) {
530 }
531
532 if (SpaceAvail)
533 {
537 }
538 else
539 {
540 FCB->PollState &= ~AFD_EVENT_SEND;
541 }
542
543
544 Irp->Tail.Overlay.DriverContext[3] = (
PVOID)
Irp->IoStatus.Information;
545
548 {
550 FCB->Connection.Object,
551 0,
556 }
557
559
561}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define SOCKET_STATE_CONNECTED
#define TAG_AFD_TDI_CONNECTION_INFORMATION
#define SOCKET_STATE_BOUND
#define NT_SUCCESS(StatCode)
_In_ PIO_STACK_LOCATION IrpSp
PVOID LockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp, BOOLEAN Output, KPROCESSOR_MODE *LockMode)
VOID UnlockBuffers(PAFD_WSABUF Buf, UINT Count, BOOL Address)
VOID UnlockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp)
NTSTATUS QueueUserModeIrp(PAFD_FCB FCB, PIRP Irp, UINT Function)
NTSTATUS LostSocket(PIRP Irp)
NTSTATUS NTAPI UnlockAndMaybeComplete(PAFD_FCB FCB, NTSTATUS Status, PIRP Irp, UINT Information)
PAFD_WSABUF LockBuffers(PAFD_WSABUF Buf, UINT Count, PVOID AddressBuf, PINT AddressLen, BOOLEAN Write, BOOLEAN LockAddress, KPROCESSOR_MODE LockMode)
VOID SocketStateUnlock(PAFD_FCB FCB)
NTSTATUS LeaveIrpUntilLater(PAFD_FCB FCB, PIRP Irp, UINT Function)
BOOLEAN SocketAcquireStateLock(PAFD_FCB FCB)
VOID PollReeval(PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject)
NTSTATUS TdiSendDatagram(PIRP *Irp, PFILE_OBJECT TransportObject, PCHAR Buffer, UINT BufferLength, PTDI_CONNECTION_INFORMATION Addr, PIO_COMPLETION_ROUTINE CompletionRoutine, PVOID CompletionContext)
NTSTATUS TdiSend(PIRP *Irp, PFILE_OBJECT TransportObject, USHORT Flags, PCHAR Buffer, UINT BufferLength, PIO_COMPLETION_ROUTINE CompletionRoutine, PVOID CompletionContext)
static IO_COMPLETION_ROUTINE SendComplete
static IO_COMPLETION_ROUTINE PacketSocketSendComplete
#define AFD_DbgPrint(_t_, _x_)
#define IO_NETWORK_INCREMENT
#define RemoveHeadList(ListHead)
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
IoSetCancelRoutine(Irp, CancelRoutine)
#define ExFreePoolWithTag(_P, _T)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET _In_ UINT _Out_ PUINT BytesCopied
#define UNREFERENCED_PARAMETER(P)
#define IoCompleteRequest
#define STATUS_FILE_CLOSED
#define STATUS_INVALID_CONNECTION
#define STATUS_ACCESS_VIOLATION
#define AFD_ENDPOINT_CONNECTIONLESS
NTSTATUS TdiBuildConnectionInfo(PTDI_CONNECTION_INFORMATION *ConnectionInfo, PTRANSPORT_ADDRESS Address)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_PARAMETER
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER _Outptr_ PVOID * TargetAddress