15#define SERVICES_KEY L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"
16#define LINKAGE_KEY L"\\Linkage"
17#define PARAMETERS_KEY L"\\Parameters\\"
33 ULONG EventBufferLength)
47 if (EventBuffer !=
NULL)
100 CurrentEntry = CurrentEntry->
Flink;
265 MiniDisplayPacket(
Packet,
"INDICATE");
271 if (!LookaheadBuffer) {
330 Adapter = AdapterBinding->
Adapter;
408 MiniDisplayPacket(
Packet,
"SEND");
500 Adapter = AdapterBinding->
Adapter;
551 NdisStatus = Adapter->
NdisMiniportBlock.SystemAdapterObject->DmaOperations->GetScatterGatherList(
847 AdapterBinding->
Adapter = Adapter;
862 Protocol->Chars.RequestCompleteHandler;
886 CurrentEntry = ProtocolBinding->AdapterListHead.
Flink;
888 while (CurrentEntry != &ProtocolBinding->AdapterListHead)
895 return AdapterBinding;
898 CurrentEntry = CurrentEntry->
Flink;
981 KeyInformation =
NULL;
990 KeyInformation =
NULL;
1007 VOID *BindContext = 0;
1061 if(!RegistryPathStr)
1077 NDIS_DbgPrint(
MAX_TRACE, (
"Calling protocol's BindAdapter handler with DeviceName %wZ and RegistryPath %wZ\n",
1100 CurrentEntry = CurrentEntry->
Flink;
1212 if (
Protocol->Chars.PnPEventHandler)
1290#undef NdisSendPackets
1304#undef NdisTransferData
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
UINT CopyPacketToBuffer(PUCHAR DstData, PNDIS_PACKET SrcPacket, UINT SrcOffset, UINT Length)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define NDIS_DbgPrint(_t_, _x_)
LIST_ENTRY AdapterListHead
VOID MiniWorkItemComplete(PLOGICAL_ADAPTER Adapter, NDIS_WORK_ITEM_TYPE WorkItemType)
VOID NTAPI MiniSendComplete(IN NDIS_HANDLE MiniportAdapterHandle, IN PNDIS_PACKET Packet, IN NDIS_STATUS Status)
NDIS_STATUS MiniDoRequest(PLOGICAL_ADAPTER Adapter, PNDIS_REQUEST NdisRequest)
struct _LOGICAL_ADAPTER * PLOGICAL_ADAPTER
NDIS_STATUS MiniReset(PLOGICAL_ADAPTER Adapter)
BOOLEAN MiniAdapterHasAddress(PLOGICAL_ADAPTER Adapter, PNDIS_PACKET Packet)
VOID FASTCALL MiniQueueWorkItem(PLOGICAL_ADAPTER Adapter, NDIS_WORK_ITEM_TYPE WorkItemType, PVOID WorkItemContext, BOOLEAN Top)
PLOGICAL_ADAPTER MiniLocateDevice(PNDIS_STRING AdapterName)
BOOLEAN MiniIsBusy(PLOGICAL_ADAPTER Adapter, NDIS_WORK_ITEM_TYPE Type)
VOID MiniIndicateData(PLOGICAL_ADAPTER Adapter, NDIS_HANDLE MacReceiveContext, PVOID HeaderBuffer, UINT HeaderBufferSize, PVOID LookaheadBuffer, UINT LookaheadBufferSize, UINT PacketSize)
#define GET_PROTOCOL_BINDING(Handle)
struct _NDIS_REQUEST_MAC_BLOCK * PNDIS_REQUEST_MAC_BLOCK
struct _ADAPTER_BINDING * PADAPTER_BINDING
#define GET_ADAPTER_BINDING(Handle)
VOID EXPORT NdisCopyFromPacketToPacket(IN PNDIS_PACKET Destination, IN UINT DestinationOffset, IN UINT BytesToCopy, IN PNDIS_PACKET Source, IN UINT SourceOffset, OUT PUINT BytesCopied)
VOID NTAPI ScatterGatherSendPacket(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PSCATTER_GATHER_LIST ScatterGather, IN PVOID Context)
LIST_ENTRY ProtocolListHead
VOID EXPORT NdisOpenAdapter(OUT PNDIS_STATUS Status, OUT PNDIS_STATUS OpenErrorStatus, OUT PNDIS_HANDLE NdisBindingHandle, OUT PUINT SelectedMediumIndex, IN PNDIS_MEDIUM MediumArray, IN UINT MediumArraySize, IN NDIS_HANDLE NdisProtocolHandle, IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_STRING AdapterName, IN UINT OpenOptions, IN PSTRING AddressingInformation OPTIONAL)
VOID EXPORT NdisDeregisterProtocol(OUT PNDIS_STATUS Status, IN NDIS_HANDLE NdisProtocolHandle)
NTSTATUS NTAPI NdisIPnPCancelStopDevice(IN PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS NTAPI NdisIPwrQueryPower(IN PDEVICE_OBJECT DeviceObject, PIRP Irp)
PNET_PNP_EVENT ProSetupPnPEvent(NET_PNP_EVENT_CODE EventCode, PVOID EventBuffer, ULONG EventBufferLength)
VOID NTAPI ndisBindMiniportsToProtocol(OUT PNDIS_STATUS Status, IN PPROTOCOL_BINDING Protocol)
VOID EXPORT NdisCompleteBindAdapter(IN NDIS_HANDLE BindAdapterContext, IN NDIS_STATUS Status, IN NDIS_STATUS OpenStatus)
struct _DMA_CONTEXT * PDMA_CONTEXT
NDIS_STATUS NTAPI ProSend(IN NDIS_HANDLE MacBindingHandle, IN PNDIS_PACKET Packet)
VOID EXPORT NdisSendPackets(IN NDIS_HANDLE NdisBindingHandle, IN PPNDIS_PACKET PacketArray, IN UINT NumberOfPackets)
PADAPTER_BINDING NTAPI LocateAdapterBindingByName(IN PPROTOCOL_BINDING ProtocolBinding, IN PNDIS_STRING AdapterName)
VOID EXPORT NdisCompleteUnbindAdapter(IN NDIS_HANDLE UnbindAdapterContext, IN NDIS_STATUS Status)
struct _DMA_CONTEXT DMA_CONTEXT
NDIS_STATUS ProSendAndFreePnPEvent(PLOGICAL_ADAPTER Adapter, PNET_PNP_EVENT PnPEvent, PIRP Irp)
VOID NTAPI NdisReEnumerateProtocolBindings(IN NDIS_HANDLE NdisProtocolHandle)
NDIS_STATUS ProIndicatePacket(PLOGICAL_ADAPTER Adapter, PNDIS_PACKET Packet)
NTSTATUS NTAPI NdisIPwrSetPower(IN PDEVICE_OBJECT DeviceObject, PIRP Irp)
NDIS_STATUS NTAPI ProTransferData(IN NDIS_HANDLE MacBindingHandle, IN NDIS_HANDLE MacReceiveContext, IN UINT ByteOffset, IN UINT BytesToTransfer, IN OUT PNDIS_PACKET Packet, OUT PUINT BytesTransferred)
NDIS_STATUS NTAPI ProRequest(IN NDIS_HANDLE MacBindingHandle, IN PNDIS_REQUEST NdisRequest)
NTSTATUS NTAPI NdisIPnPQueryStopDevice(IN PDEVICE_OBJECT DeviceObject, PIRP Irp)
VOID EXPORT NdisSend(OUT PNDIS_STATUS Status, IN NDIS_HANDLE NdisBindingHandle, IN PNDIS_PACKET Packet)
VOID EXPORT NdisReset(OUT PNDIS_STATUS Status, IN NDIS_HANDLE NdisBindingHandle)
VOID EXPORT NdisCloseAdapter(OUT PNDIS_STATUS Status, IN NDIS_HANDLE NdisBindingHandle)
VOID EXPORT NdisTransferData(OUT PNDIS_STATUS Status, IN NDIS_HANDLE NdisBindingHandle, IN NDIS_HANDLE MacReceiveContext, IN UINT ByteOffset, IN UINT BytesToTransfer, IN OUT PNDIS_PACKET Packet, OUT PUINT BytesTransferred)
VOID EXPORT NdisRegisterProtocol(OUT PNDIS_STATUS Status, OUT PNDIS_HANDLE NdisProtocolHandle, IN PNDIS_PROTOCOL_CHARACTERISTICS ProtocolCharacteristics, IN UINT CharacteristicsLength)
KSPIN_LOCK ProtocolListLock
NDIS_STATUS proSendPacketToMiniport(PLOGICAL_ADAPTER Adapter, PNDIS_PACKET Packet)
VOID EXPORT NdisGetDriverHandle(IN PNDIS_HANDLE NdisBindingHandle, OUT PNDIS_HANDLE NdisDriverHandle)
NDIS_STATUS NTAPI ProReset(IN NDIS_HANDLE MacBindingHandle)
VOID NTAPI ProSendPackets(IN NDIS_HANDLE NdisBindingHandle, IN PPNDIS_PACKET PacketArray, IN UINT NumberOfPackets)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeRaiseIrql(irql, oldIrql)
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
#define KeReleaseSpinLock(sl, irql)
NTSTATUS RtlUpcaseUnicodeString(PUNICODE_STRING dst, PUNICODE_STRING src, BOOLEAN Alloc)
#define KeLowerIrql(oldIrql)
#define KeAcquireSpinLock(sl, irql)
#define KeGetCurrentIrql()
#define InitializeListHead(ListHead)
#define KeInitializeSpinLock(sl)
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
#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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
PLIST_ENTRY NTAPI ExInterlockedInsertTailList(IN OUT PLIST_ENTRY ListHead, IN OUT PLIST_ENTRY ListEntry, IN OUT PKSPIN_LOCK Lock)
#define InitializeObjectAttributes(p, n, a, r, s)
_Out_ PNDIS_HANDLE _In_ PNDIS_PROTOCOL_CHARACTERISTICS _In_ UINT CharacteristicsLength
#define NDIS_STATUS_BAD_VERSION
_Must_inspect_result_ _In_ NDIS_HANDLE NdisBindingHandle
#define NDIS_STATUS_PENDING
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
struct _NDIS30_PROTOCOL_CHARACTERISTICS NDIS30_PROTOCOL_CHARACTERISTICS
#define NDIS_STATUS_BAD_CHARACTERISTICS
static __inline VOID NdisQueryPacket(IN PNDIS_PACKET Packet, OUT PUINT PhysicalBufferCount OPTIONAL, OUT PUINT BufferCount OPTIONAL, OUT PNDIS_BUFFER *FirstBuffer OPTIONAL, OUT PUINT TotalPacketLength OPTIONAL)
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT _In_ NDIS_HANDLE _In_ NDIS_HANDLE _In_ PNDIS_STRING _In_ UINT _In_opt_ PSTRING AddressingInformation
@ NdisWorkItemSendLoopback
#define NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, InfoType)
#define NDIS_STATUS_FAILURE
struct _NDIS50_PROTOCOL_CHARACTERISTICS NDIS50_PROTOCOL_CHARACTERISTICS
_In_ PPNDIS_PACKET _In_ UINT NumberOfPackets
_In_ PPNDIS_PACKET PacketArray
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT _In_ NDIS_HANDLE _In_ NDIS_HANDLE ProtocolBindingContext
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT SelectedMediumIndex
_In_ NDIS_STATUS EventCode
_Out_ PNDIS_HANDLE _In_ PNDIS_PROTOCOL_CHARACTERISTICS ProtocolCharacteristics
_Out_ PNDIS_HANDLE NdisDriverHandle
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT _In_ NDIS_HANDLE _In_ NDIS_HANDLE _In_ PNDIS_STRING _In_ UINT OpenOptions
#define NDIS_STATUS_SUCCESS
#define NDIS_ATTRIBUTE_DESERIALIZE
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT MediumArraySize
@ ScatterGatherListPacketInfo
struct _NDIS40_PROTOCOL_CHARACTERISTICS NDIS40_PROTOCOL_CHARACTERISTICS
#define NDIS_GET_PACKET_STATUS(_Packet)
#define NDIS_STATUS_UNSUPPORTED_MEDIA
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS OpenErrorStatus
#define NDIS_STATUS_ADAPTER_NOT_FOUND
#define NDIS_MAC_OPTION_NO_LOOPBACK
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT _In_ NDIS_HANDLE _In_ NDIS_HANDLE _In_ PNDIS_STRING AdapterName
_In_opt_ NDIS_HANDLE _In_opt_ NDIS_HANDLE _Inout_ PNDIS_REQUEST NdisRequest
VOID(NTAPI * BIND_HANDLER)(OUT PNDIS_STATUS Status, IN NDIS_HANDLE BindContext, IN PNDIS_STRING DeviceName, IN PVOID SystemSpecific1, IN PVOID SystemSpecific2)
_In_ NDIS_STATUS _In_ NDIS_STATUS OpenStatus
#define NDIS_STATUS_RESOURCES
#define ExInterlockedRemoveEntryList(_List, _Lock)
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
enum _NET_PNP_EVENT_CODE NET_PNP_EVENT_CODE
@ NetEventQueryRemoveDevice
@ NetEventCancelRemoveDevice
@ KeyValuePartialInformation
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
enum _NDIS_DEVICE_POWER_STATE NDIS_DEVICE_POWER_STATE
enum _NDIS_MEDIUM * PNDIS_MEDIUM
static unsigned __int64 next
_CRTIMP wchar_t *__cdecl wcsncat(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
PULONG MinorVersion OPTIONAL
LIST_ENTRY ProtocolListEntry
NDIS_OPEN_BLOCK NdisOpenBlock
PPROTOCOL_BINDING ProtocolBinding
LIST_ENTRY AdapterListEntry
struct _LIST_ENTRY * Flink
LIST_ENTRY ProtocolListHead
NDIS_MINIPORT_BLOCK NdisMiniportBlock
PNP_EVENT_HANDLER PnPEventHandler
NDIS_HANDLE MiniportAdapterContext
PDEVICE_OBJECT PhysicalDeviceObject
UNICODE_STRING MiniportName
PNDIS_M_DRIVER_BLOCK DriverHandle
NDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics
NDIS_PACKET_PRIVATE Private
ULONG_PTR NdisReserved[4]
NET_PNP_EVENT_CODE NetEvent
NDIS_PROTOCOL_CHARACTERISTICS Chars
NDIS_HANDLE NdisProtocolHandle
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR _Out_opt_ PULONG BytesTransferred
struct _SCATTER_GATHER_LIST * PSCATTER_GATHER_LIST
_In_ struct _IRP _In_ struct _SCATTER_GATHER_LIST * ScatterGather
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
#define MmGetMdlVirtualAddress(_Mdl)