15 char *events_list[] = {
"AFD_EVENT_RECEIVE",
16 "AFD_EVENT_OOB_RECEIVE",
18 "AFD_EVENT_DISCONNECT",
23 "AFD_EVENT_CONNECT_FAIL",
25 "AFD_EVENT_GROUP_QOS",
29 for(
i = 0; events_list[
i];
i++ )
38 for(
i = 0;
i < HandleCount;
i++ ) {
48 for(
i = 0;
i < HandleCount;
i++ ) {
64 PIRP Irp = _Irp ? _Irp : Poll->Irp;
75 Irp->IoStatus.Information =
82 (
"Handle(%x): Got %x,%x\n",
114 PollReq =
Irp->AssociatedIrp.SystemBuffer;
141 while ( ListEntry != &DeviceExt->
Polls ) {
143 ListEntry = ListEntry->
Flink;
145 PollReq =
Irp->AssociatedIrp.SystemBuffer;
152 (!OnlyExclusive || (OnlyExclusive && Poll->
Exclusive)) ) {
173 UINT i, Signalled = 0;
187 Irp->IoStatus.Information = 0;
279 if ( !EventSelectInfo ) {
285 EventSelectInfo->
Events));
305 FCB->EventSelectTriggers = EventSelectInfo->
Events;
308 FCB->EventSelectTriggers = 0;
312 if((
FCB->EventSelect) &&
313 (
FCB->PollState & (
FCB->EventSelectTriggers & ~
FCB->EventSelectDisabled)))
376 FCB->EventSelectDisabled |= (
FCB->PollState &
FCB->EventSelectTriggers);
404 return Signalled ? 1 : 0;
430 while( ThePollEnt != &DeviceExt->
Polls ) {
436 ThePollEnt = ThePollEnt->
Flink;
440 ThePollEnt = ThePollEnt->
Flink;
445 if((
FCB->EventSelect) &&
446 (
FCB->PollState & (
FCB->EventSelectTriggers & ~
FCB->EventSelectDisabled)))
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define SET_AFD_HANDLES(x, y)
struct _AFD_FCB * PAFD_FCB
DRIVER_CANCEL AfdCancelHandler
#define TAG_AFD_ACTIVE_POLL
#define NT_SUCCESS(StatCode)
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
_In_ PIO_STACK_LOCATION IrpSp
PVOID LockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp, BOOLEAN Output, KPROCESSOR_MODE *LockMode)
VOID UnlockHandles(PAFD_HANDLE HandleArray, UINT HandleCount)
VOID UnlockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp)
NTSTATUS LostSocket(PIRP Irp)
NTSTATUS NTAPI UnlockAndMaybeComplete(PAFD_FCB FCB, NTSTATUS Status, PIRP Irp, UINT Information)
BOOLEAN SocketAcquireStateLock(PAFD_FCB FCB)
PAFD_HANDLE LockHandles(PAFD_HANDLE HandleArray, UINT HandleCount)
NTSTATUS NTAPI AfdEnumEvents(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
VOID KillSelectsForFCB(PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, BOOLEAN OnlyExclusive)
NTSTATUS NTAPI AfdSelect(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
static VOID CopyBackStatus(PAFD_HANDLE HandleArray, UINT HandleCount)
static KDEFERRED_ROUTINE SelectTimeout
NTSTATUS NTAPI AfdEventSelect(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
VOID ZeroEvents(PAFD_HANDLE HandleArray, UINT HandleCount)
VOID PollReeval(PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject)
static BOOLEAN UpdatePollWithFCB(PAFD_ACTIVE_POLL Poll, PFILE_OBJECT FileObject)
VOID SignalSocket(PAFD_ACTIVE_POLL Poll OPTIONAL, PIRP _Irp OPTIONAL, PAFD_POLL_INFO PollReq, NTSTATUS Status)
static VOID PrintEvents(ULONG Events)
#define AFD_DbgPrint(_t_, _x_)
#define IO_NETWORK_INCREMENT
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeReleaseSpinLock(sl, irql)
#define KeSetEvent(pEvt, foo, foo2)
#define KeAcquireSpinLock(sl, irql)
#define KeGetCurrentIrql()
VOID NTAPI KeClearEvent(IN PKEVENT Event)
__in PWDFDEVICE_INIT __in BOOLEAN Exclusive
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)
#define UNREFERENCED_PARAMETER(P)
POBJECT_TYPE ExEventObjectType
#define IoCompleteRequest
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
struct _AFD_ENUM_NETWORK_EVENTS_INFO * PAFD_ENUM_NETWORK_EVENTS_INFO
struct _AFD_HANDLE_ AFD_HANDLE
struct _AFD_EVENT_SELECT_INFO * PAFD_EVENT_SELECT_INFO
PULONG MinorVersion OPTIONAL
PAFD_DEVICE_EXTENSION DeviceExt
NTSTATUS EventStatus[AFD_MAX_EVENTS]
union _IRP::@1577 AssociatedIrp
struct _LIST_ENTRY * Flink
BOOLEAN NTAPI KeSetTimer(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN PKDPC Dpc OPTIONAL)
BOOLEAN NTAPI KeCancelTimer(IN OUT PKTIMER Timer)
VOID NTAPI KeInitializeTimerEx(OUT PKTIMER Timer, IN TIMER_TYPE Type)
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
_In_opt_ PVOID DeferredContext
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
#define ObDereferenceObject