185 for (
i = 0;
i < AssignedResources->
Count;
i++)
191 Adapter->InterruptLevel =
Descriptor->u.Interrupt.Level;
192 Adapter->InterruptVector =
Descriptor->u.Interrupt.Vector;
198 Adapter->IoBaseAddress =
Descriptor->u.Port.Start.LowPart;
237 UINT *RegNetworkAddress = 0;
238 UINT RegNetworkAddressLength = 0;
365 RegNetworkAddress[0], RegNetworkAddress[1], RegNetworkAddress[2], RegNetworkAddress[3],
366 RegNetworkAddress[4], RegNetworkAddress[5]));
382 for (
i = 0;
i < 4;
i++) {
399 for (
i = 0;
i < 8;
i++)
470 *InterruptRecognized =
TRUE;
471 *QueueMiniportHandleInterrupt =
TRUE;
479 IN ULONG InformationBufferLength,
507 CopyFrom = (
PVOID)&GenericULONG;
508 CopySize =
sizeof(
ULONG);
520 CopyFrom = (
PVOID)&Medium;
530 GenericULONG = 100000;
536 GenericULONG = Adapter->
RamSize -
548 GenericULONG &= 0xFFFFFF00;
549 GenericULONG |= 0x01;
557 CopyFrom = (
PVOID)&GenericUSHORT;
558 CopySize =
sizeof(
USHORT);
568 CopyFrom = (
PVOID)&GenericUSHORT;
569 CopySize =
sizeof(
USHORT);
616 if (CopySize > InformationBufferLength) {
617 *BytesNeeded = (CopySize - InformationBufferLength);
678 *AddressingReset =
TRUE;
730 IN ULONG InformationBufferLength,
756 if (InformationBufferLength <
sizeof(
ULONG)) {
758 *BytesNeeded =
sizeof(
ULONG) - InformationBufferLength;
785 if (InformationBufferLength <
sizeof(
ULONG)) {
787 *BytesNeeded =
sizeof(
ULONG) - InformationBufferLength;
863 if (BytesToTransfer == 0) {
883 BytesToCopy = (DstSize < BytesToTransfer) ? DstSize : BytesToTransfer;
893 if (BytesToTransfer == 0)
907 if (SrcData == RecvStop)
961 if (!NdisWrapperHandle) {
995 DbgPrint(
"ne2000!MiniportInitialize: failed to set DwordTest: 0x%x\n",
Status);
999 DbgPrint(
"ne2000!MiniportInitialize: DwordTest successfully set\n");
1009 DbgPrint(
"ne2000!MiniportInitialize: failed to set StringTest: 0x%x\n",
Status);
1013 DbgPrint(
"ne2000!MiniportInitialize: StringTest successfully set\n");
1025 DbgPrint(
"ne2000!MiniportInitialize: failed to read DwordTest: 0x%x\n",
Status);
1031 DbgPrint(
"ne2000!MiniportInitialize: DwordTest value is wrong: 0x%x\n",
1036 DbgPrint(
"ne2000!MiniportInitialize: DwordTest value was correctly read\n");
1043 DbgPrint(
"ne2000!MiniportInitialize: failed to read StringTest: 0x%x\n",
Status);
1050 DbgPrint(
"ne2000!MiniportInitialize: StringTest value is wrong: %wZ\n",
1055 DbgPrint(
"ne2000!MiniportInitialize: StringTest value was correctly read\n");
struct _DISCARD_HEADER DISCARD_HEADER
#define NICEnableInterrupts(Adapter)
#define NICDisableInterrupts(Adapter)
_In_opt_ PWSTR _In_ PWSTR _Inout_ PULONG ParameterValue
DRIVER_INITIALIZE DriverEntry
#define NDIS_DbgPrint(_t_, _x_)
#define ASSERT_IRQL_EQUAL(x)
VOID NTAPI MiniportHandleInterrupt(IN NDIS_HANDLE MiniportAdapterContext)
static VOID NTAPI MiniportEnableInterrupt(IN NDIS_HANDLE MiniportAdapterContext)
static ULONG MiniportOIDList[]
VOID NTAPI MiniportShutdown(PVOID Context)
static NDIS_STATUS NTAPI MiniportSetInformation(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_OID Oid, IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesRead, OUT PULONG BytesNeeded)
static NDIS_STATUS NTAPI MiniportInitialize(OUT PNDIS_STATUS OpenErrorStatus, OUT PUINT SelectedMediumIndex, IN PNDIS_MEDIUM MediumArray, IN UINT MediumArraySize, IN NDIS_HANDLE MiniportAdapterHandle, IN NDIS_HANDLE WrapperConfigurationContext)
static VOID NTAPI MiniportISR(OUT PBOOLEAN InterruptRecognized, OUT PBOOLEAN QueueMiniportHandleInterrupt, IN NDIS_HANDLE MiniportAdapterContext)
static VOID NTAPI MiniportHalt(IN NDIS_HANDLE MiniportAdapterContext)
static NDIS_STATUS NTAPI MiniportTransferData(OUT PNDIS_PACKET Packet, OUT PUINT BytesTransferred, IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_HANDLE MiniportReceiveContext, IN UINT ByteOffset, IN UINT BytesToTransfer)
static NDIS_STATUS NTAPI MiniportQueryInformation(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_OID Oid, IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesWritten, OUT PULONG BytesNeeded)
static VOID NTAPI MiniportDisableInterrupt(IN NDIS_HANDLE MiniportAdapterContext)
static BOOLEAN NTAPI MiniportCheckForHang(IN NDIS_HANDLE MiniportAdapterContext)
static NDIS_STATUS NTAPI MiniportReset(OUT PBOOLEAN AddressingReset, IN NDIS_HANDLE MiniportAdapterContext)
static VOID NTAPI MiQueryResources(OUT PNDIS_STATUS Status, IN PNIC_ADAPTER Adapter, IN NDIS_HANDLE WrapperConfigurationContext)
DRIVER_INFORMATION DriverInfo
NDIS_PHYSICAL_ADDRESS HighestAcceptableMax
static NDIS_STATUS NTAPI MiniportSend(IN NDIS_HANDLE MiniportAdapterContext, IN PNDIS_PACKET Packet, IN UINT Flags)
static NDIS_STATUS NTAPI MiniportReconfigure(OUT PNDIS_STATUS OpenErrorStatus, IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_HANDLE WrapperConfigurationContext)
VOID EXPORT NdisCloseConfiguration(IN NDIS_HANDLE ConfigurationHandle)
VOID EXPORT NdisWriteConfiguration(OUT PNDIS_STATUS Status, IN NDIS_HANDLE ConfigurationHandle, IN PNDIS_STRING Keyword, IN PNDIS_CONFIGURATION_PARAMETER ParameterValue)
VOID EXPORT NdisReadConfiguration(OUT PNDIS_STATUS Status, OUT PNDIS_CONFIGURATION_PARAMETER *ParameterValue, IN NDIS_HANDLE ConfigurationHandle, IN PNDIS_STRING Keyword, IN NDIS_PARAMETER_TYPE ParameterType)
VOID EXPORT NdisReadNetworkAddress(OUT PNDIS_STATUS Status, OUT PVOID *NetworkAddress, OUT PUINT NetworkAddressLength, IN NDIS_HANDLE ConfigurationHandle)
VOID EXPORT NdisOpenConfiguration(OUT PNDIS_STATUS Status, OUT PNDIS_HANDLE ConfigurationHandle, IN NDIS_HANDLE WrapperConfigurationContext)
VOID EXPORT NdisMQueryAdapterResources(OUT PNDIS_STATUS Status, IN NDIS_HANDLE WrapperConfigurationContext, OUT PNDIS_RESOURCE_LIST ResourceList, IN OUT PUINT BufferSize)
VOID EXPORT NdisMDeregisterInterrupt(IN PNDIS_MINIPORT_INTERRUPT Interrupt)
VOID EXPORT NdisMDeregisterIoPortRange(IN NDIS_HANDLE MiniportAdapterHandle, IN UINT InitialPort, IN UINT NumberOfPorts, IN PVOID PortOffset)
NDIS_STATUS EXPORT NdisMRegisterIoPortRange(OUT PVOID *PortOffset, IN NDIS_HANDLE MiniportAdapterHandle, IN UINT InitialPort, IN UINT NumberOfPorts)
NDIS_STATUS EXPORT NdisMRegisterInterrupt(OUT PNDIS_MINIPORT_INTERRUPT Interrupt, IN NDIS_HANDLE MiniportAdapterHandle, IN UINT InterruptVector, IN UINT InterruptLevel, IN BOOLEAN RequestIsr, IN BOOLEAN SharedInterrupt, IN NDIS_INTERRUPT_MODE InterruptMode)
VOID EXPORT NdisFreeMemory(IN PVOID VirtualAddress, IN UINT Length, IN UINT MemoryFlags)
NDIS_STATUS EXPORT NdisAllocateMemory(OUT PVOID *VirtualAddress, IN UINT Length, IN UINT MemoryFlags, IN NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress)
VOID EXPORT NdisInitUnicodeString(IN OUT PNDIS_STRING DestinationString, IN PCWSTR SourceString)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define InitializeListHead(ListHead)
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
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
#define CmResourceTypePort
#define CmResourceTypeInterrupt
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSYSAPI void WINAPI DbgBreakPoint(void)
#define NdisGetNextBuffer(CurrentBuffer, NextBuffer)
#define NDIS_STATUS_PENDING
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
@ NdisParameterHexInteger
#define NdisInterruptLatched
#define NdisZeroMemory(Destination, Length)
#define NdisMSetAttributes(MiniportAdapterHandle, MiniportAdapterContext, BusMaster, AdapterType)
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)
#define NDIS_STATUS_NOT_SUPPORTED
#define NDIS_PACKET_TYPE_MAC_FRAME
#define NdisInterruptLevelSensitive
#define NDIS_PACKET_TYPE_SOURCE_ROUTING
#define NDIS_STATUS_INVALID_LENGTH
#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL
#define NDIS_STATUS_FAILURE
_In_ UINT _In_ UINT _In_ PNDIS_PACKET _In_ UINT _Out_ PUINT BytesCopied
#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND
#define NDIS_MAC_OPTION_RECEIVE_SERIALIZED
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT SelectedMediumIndex
#define NdisStallExecution
#define NDIS_PACKET_TYPE_FUNCTIONAL
#define NDIS_PACKET_TYPE_GROUP
_In_ UINT _In_ UINT BytesToCopy
#define NDIS_STATUS_INVALID_OID
#define NDIS_STATUS_SUCCESS
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT MediumArraySize
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _In_ NDIS_HANDLE WrapperConfigurationContext
_In_ NDIS_HANDLE MiniportAdapterHandle
#define NDIS_PACKET_TYPE_SMT
#define NdisQueryBuffer(_Buffer, _VirtualAddress, _Length)
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE ConfigurationHandle
#define NDIS_STATUS_UNSUPPORTED_MEDIA
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_CONFIGURATION_PARAMETER _In_ NDIS_HANDLE _In_ PNDIS_STRING Keyword
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS OpenErrorStatus
#define NDIS_STATUS_ADAPTER_NOT_FOUND
#define NdisMInitializeWrapper(NdisWrapperHandle, SystemSpecific1, SystemSpecific2, SystemSpecific3)
#define NDIS_PHYSICAL_ADDRESS_CONST(Low, High)
#define NDIS_MAC_OPTION_NO_LOOPBACK
#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA
#define NdisMoveMemory(Destination, Source, Length)
#define CM_RESOURCE_INTERRUPT_LATCHED
#define DRIVER_VENDOR_DESCRIPTION
#define DRIVER_HEADER_SIZE
#define DRIVER_DEFAULT_INTERRUPT_MODE
struct _NIC_ADAPTER * PNIC_ADAPTER
#define DRIVER_MAXIMUM_LOOKAHEAD
#define DRIVER_MAX_MULTICAST_LIST_SIZE
BOOLEAN NICCheck(PNIC_ADAPTER Adapter)
#define DRIVER_FRAME_SIZE
VOID NICTransmit(PNIC_ADAPTER Adapter)
#define DRIVER_DEFAULT_INTERRUPT_SHARED
#define DRIVER_DEFAULT_INTERRUPT_NUMBER
#define DRIVER_DEFAULT_TX_BUFFER_COUNT
#define DRIVER_INTERRUPT_MASK
NDIS_STATUS NICStop(PNIC_ADAPTER Adapter)
#define DRIVER_NDIS_MAJOR_VERSION
VOID NICReadData(PNIC_ADAPTER Adapter, PUCHAR Target, ULONG_PTR Source, USHORT Length)
#define DRIVER_LENGTH_OF_ADDRESS
NDIS_STATUS NICSetup(PNIC_ADAPTER Adapter)
NDIS_STATUS NICReset(PNIC_ADAPTER Adapter)
#define DRIVER_VENDOR_DRIVER_VERSION
#define DRIVER_BLOCK_SIZE
#define DRIVER_NDIS_MINOR_VERSION
NDIS_STATUS NICStart(PNIC_ADAPTER Adapter)
NDIS_STATUS NICInitialize(PNIC_ADAPTER Adapter)
#define DRIVER_DEFAULT_IO_BASE_ADDRESS
VOID EXPORT NdisMDeregisterAdapterShutdownHandler(IN NDIS_HANDLE MiniportHandle)
VOID EXPORT NdisMRegisterAdapterShutdownHandler(IN NDIS_HANDLE MiniportHandle, IN PVOID ShutdownContext, IN ADAPTER_SHUTDOWN_HANDLER ShutdownHandler)
NDIS_STATUS EXPORT NdisMRegisterMiniport(IN NDIS_HANDLE NdisWrapperHandle, IN PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics, IN UINT CharacteristicsLength)
VOID EXPORT NdisTerminateWrapper(IN NDIS_HANDLE NdisWrapperHandle, IN PVOID SystemSpecific)
enum _NDIS_MEDIUM NDIS_MEDIUM
#define OID_GEN_TRANSMIT_BLOCK_SIZE
#define OID_GEN_PROTOCOL_OPTIONS
#define OID_GEN_MAXIMUM_TOTAL_SIZE
#define OID_GEN_VENDOR_DRIVER_VERSION
#define OID_802_3_PERMANENT_ADDRESS
#define OID_GEN_LINK_SPEED
#define OID_GEN_VENDOR_ID
#define OID_GEN_CURRENT_PACKET_FILTER
@ NdisMediaStateConnected
#define OID_GEN_RECEIVE_BUFFER_SPACE
#define OID_802_3_MAXIMUM_LIST_SIZE
#define OID_GEN_DRIVER_VERSION
#define OID_802_3_MAC_OPTIONS
#define OID_802_3_CURRENT_ADDRESS
enum _NDIS_MEDIUM * PNDIS_MEDIUM
#define OID_802_3_MULTICAST_LIST
#define OID_GEN_TRANSMIT_BUFFER_SPACE
#define OID_GEN_MEDIA_SUPPORTED
#define OID_GEN_MAXIMUM_FRAME_SIZE
#define OID_GEN_MEDIA_IN_USE
#define OID_GEN_MEDIA_CONNECT_STATUS
#define OID_GEN_MAXIMUM_LOOKAHEAD
@ NdisHardwareStatusReady
#define OID_GEN_CURRENT_LOOKAHEAD
#define OID_GEN_MAC_OPTIONS
#define OID_GEN_VENDOR_DESCRIPTION
#define OID_GEN_SUPPORTED_LIST
#define OID_GEN_RECEIVE_BLOCK_SIZE
#define OID_GEN_MAXIMUM_SEND_PACKETS
#define OID_GEN_HARDWARE_STATUS
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
union _NDIS_CONFIGURATION_PARAMETER::@2101 ParameterData
PACKET_HEADER PacketHeader
BOOLEAN InterruptRegistered
UCHAR MulticastAddressMask[8]
BOOLEAN IOPortRangeRegistered
DRIVER_HARDWARE_ADDRESS Addresses[DRIVER_MAX_MULTICAST_LIST_SIZE]
NDIS_MINIPORT_INTERRUPT Interrupt
DRIVER_HARDWARE_ADDRESS PermanentAddress
KINTERRUPT_MODE InterruptMode
NDIS_HANDLE MiniportAdapterHandle
ULONG MaxMulticastListSize
BOOLEAN ShutdownHandlerRegistered
DRIVER_HARDWARE_ADDRESS StationAddress
#define STATUS_UNSUCCESSFUL
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
_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
_Must_inspect_result_ _In_ ULONG Flags