22 DPRINT(
"Wait for bind complete\n");
25 Irp->IoStatus.Information = 0;
58 CurrentEntry = CurrentEntry->
Flink;
63 DPRINT(
"Query binding for index %d is adapter %wZ\n",
i, &AdapterContext->
DeviceName);
136 Irp->IoStatus.Information = 0;
154 Irp->IoStatus.Information = 0;
156 SetOidRequest =
Irp->AssociatedIrp.SystemBuffer;
158 if (SetOidRequest && RequestLength >=
sizeof(
NDIS_OID))
162 Request.DATA.SET_INFORMATION.Oid = SetOidRequest->
Oid;
163 Request.DATA.SET_INFORMATION.InformationBufferLength = RequestLength -
sizeof(
NDIS_OID);
164 if (
Request.DATA.SET_INFORMATION.InformationBufferLength != 0)
166 Request.DATA.SET_INFORMATION.InformationBuffer = SetOidRequest->
Data;
170 Request.DATA.SET_INFORMATION.InformationBuffer =
NULL;
172 Request.DATA.SET_INFORMATION.BytesRead = 0;
174 DPRINT(
"Setting OID 0x%x on adapter %wZ\n", SetOidRequest->
Oid, &AdapterContext->
DeviceName);
200 Irp->IoStatus.Information =
sizeof(
NDIS_OID) +
Request.DATA.SET_INFORMATION.BytesRead;
203 DPRINT(
"Final request status: 0x%x (%d)\n",
Status,
Irp->IoStatus.Information);
228 Irp->IoStatus.Information = 0;
230 QueryOidRequest =
Irp->AssociatedIrp.SystemBuffer;
232 if (QueryOidRequest && RequestLength >=
sizeof(
NDIS_OID))
236 Request.DATA.QUERY_INFORMATION.Oid = QueryOidRequest->
Oid;
237 Request.DATA.QUERY_INFORMATION.InformationBufferLength = RequestLength -
sizeof(
NDIS_OID);
238 if (
Request.DATA.QUERY_INFORMATION.InformationBufferLength != 0)
240 Request.DATA.QUERY_INFORMATION.InformationBuffer = QueryOidRequest->
Data;
244 Request.DATA.QUERY_INFORMATION.InformationBuffer =
NULL;
246 Request.DATA.QUERY_INFORMATION.BytesWritten = 0;
248 DPRINT(
"Querying OID 0x%x on adapter %wZ\n", QueryOidRequest->
Oid, &AdapterContext->
DeviceName);
274 Irp->IoStatus.Information =
sizeof(
NDIS_OID) +
Request.DATA.QUERY_INFORMATION.BytesWritten;
277 DPRINT(
"Final request status: 0x%x (%d)\n",
Status,
Irp->IoStatus.Information);
312 if (AdapterContext !=
NULL)
378 Irp->IoStatus.Information = 0;
406 if (AdapterContext !=
NULL)
447 DereferenceAdapterContext(AdapterContext,
NULL);
459 Irp->IoStatus.Information = 0;
483 case IOCTL_NDISUIO_OPEN_WRITE_DEVICE:
497 Irp->IoStatus.Information = 0;
515 Irp->IoStatus.Information = 0;
524 case IOCTL_CANCEL_READ:
525 return CancelPacketRead(
Irp,
IrpSp);
534 Irp->IoStatus.Information = 0;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define NT_SUCCESS(StatCode)
_In_ PIO_STACK_LOCATION IrpSp
static NTSTATUS QueryAdapterOid(PIRP Irp, PIO_STACK_LOCATION IrpSp)
NTSTATUS NTAPI NduDispatchDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static NTSTATUS SetAdapterOid(PIRP Irp, PIO_STACK_LOCATION IrpSp)
static NTSTATUS QueryBinding(PIRP Irp, PIO_STACK_LOCATION IrpSp)
static NTSTATUS OpenDeviceReadWrite(PIRP Irp, PIO_STACK_LOCATION IrpSp)
static NTSTATUS WaitForBind(PIRP Irp, PIO_STACK_LOCATION IrpSp)
LIST_ENTRY GlobalAdapterList
KSPIN_LOCK GlobalAdapterListLock
PDEVICE_OBJECT GlobalDeviceObject
VOID DereferenceAdapterContextWithOpenEntry(PNDISUIO_ADAPTER_CONTEXT AdapterContext, PNDISUIO_OPEN_ENTRY OpenEntry)
PNDISUIO_ADAPTER_CONTEXT FindAdapterContextByName(PNDIS_STRING DeviceName)
VOID ReferenceAdapterContext(PNDISUIO_ADAPTER_CONTEXT AdapterContext)
#define InsertTailList(ListHead, Entry)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeReleaseSpinLock(sl, irql)
#define KeSetEvent(pEvt, foo, foo2)
#define KeAcquireSpinLock(sl, irql)
#define ExAllocatePool(type, size)
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
PLIST_ENTRY NTAPI ExInterlockedInsertHeadList(IN OUT PLIST_ENTRY ListHead, IN OUT PLIST_ENTRY ListEntry, IN OUT PKSPIN_LOCK Lock)
#define NDIS_STATUS_PENDING
#define NDIS_STATUS_INVALID_LENGTH
_In_ UINT _In_ UINT _In_ PNDIS_PACKET _In_ UINT _Out_ PUINT BytesCopied
#define NDIS_STATUS_SUCCESS
#define NDIS_STATUS_BUFFER_TOO_SHORT
_In_opt_ NDIS_HANDLE _In_opt_ NDIS_HANDLE _Inout_ PNDIS_REQUEST NdisRequest
@ NdisRequestQueryInformation
@ NdisRequestSetInformation
#define IoCompleteRequest
#define STATUS_NO_MORE_ENTRIES
#define STATUS_NOT_IMPLEMENTED
#define IOCTL_NDISUIO_QUERY_OID_VALUE
#define IOCTL_NDISUIO_BIND_WAIT
struct _NDISUIO_QUERY_BINDING NDISUIO_QUERY_BINDING
#define IOCTL_NDISUIO_OPEN_DEVICE
#define IOCTL_NDISUIO_QUERY_BINDING
#define IOCTL_NDISUIO_SET_OID_VALUE
#define STATUS_BUFFER_TOO_SMALL
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
struct _LIST_ENTRY * Flink
UNICODE_STRING DeviceName
NDIS_HANDLE BindingHandle
UCHAR Data[sizeof(ULONG)]
UCHAR Data[sizeof(ULONG)]
#define RtlCopyMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql