mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
MS DDK compatibility fixes.
svn path=/trunk/; revision=17488
This commit is contained in:
parent
4076e16a99
commit
f6283b4bca
22 changed files with 317 additions and 313 deletions
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
|
|
||||||
extern DWORD DebugTraceLevel;
|
extern ULONG DebugTraceLevel;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
|
|
|
@ -8,15 +8,54 @@
|
||||||
#ifndef __EFILTER_H
|
#ifndef __EFILTER_H
|
||||||
#define __EFILTER_H
|
#define __EFILTER_H
|
||||||
|
|
||||||
|
#define DECLARE_UNKNOWN_STRUCT(BaseName) \
|
||||||
|
typedef struct _##BaseName BaseName, *P##BaseName;
|
||||||
|
|
||||||
|
#define DECLARE_UNKNOWN_PROTOTYPE(Name) \
|
||||||
|
typedef VOID (*(Name))(VOID);
|
||||||
|
|
||||||
|
#define ETH_LENGTH_OF_ADDRESS 6
|
||||||
|
|
||||||
|
DECLARE_UNKNOWN_STRUCT(ETH_BINDING_INFO)
|
||||||
|
|
||||||
|
DECLARE_UNKNOWN_PROTOTYPE(ETH_ADDRESS_CHANGE)
|
||||||
|
DECLARE_UNKNOWN_PROTOTYPE(ETH_FILTER_CHANGE)
|
||||||
|
DECLARE_UNKNOWN_PROTOTYPE(ETH_DEFERRED_CLOSE)
|
||||||
|
|
||||||
|
typedef struct ETHI_FILTER {
|
||||||
|
PNDIS_SPIN_LOCK Lock;
|
||||||
|
CHAR (*MCastAddressBuf)[ETH_LENGTH_OF_ADDRESS];
|
||||||
|
struct _NDIS_MINIPORT_BLOCK *Miniport;
|
||||||
|
UINT CombinedPacketFilter;
|
||||||
|
PETH_BINDING_INFO OpenList;
|
||||||
|
ETH_ADDRESS_CHANGE AddressChangeAction;
|
||||||
|
ETH_FILTER_CHANGE FilterChangeAction;
|
||||||
|
ETH_DEFERRED_CLOSE CloseAction;
|
||||||
|
UINT MaxMulticastAddresses;
|
||||||
|
UINT NumAddresses;
|
||||||
|
UCHAR AdapterAddress[ETH_LENGTH_OF_ADDRESS];
|
||||||
|
UINT OldCombinedPacketFilter;
|
||||||
|
CHAR (*OldMCastAddressBuf)[ETH_LENGTH_OF_ADDRESS];
|
||||||
|
UINT OldNumAddresses;
|
||||||
|
PETH_BINDING_INFO DirectedList;
|
||||||
|
PETH_BINDING_INFO BMList;
|
||||||
|
PETH_BINDING_INFO MCastSet;
|
||||||
|
#if defined(NDIS_WRAPPER)
|
||||||
|
UINT NumOpens;
|
||||||
|
PVOID BindListLock;
|
||||||
|
#endif
|
||||||
|
} ETHI_FILTER, *PETHI_FILTER;
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
STDCALL
|
NTAPI
|
||||||
EthCreateFilter(
|
EthCreateFilter(
|
||||||
IN UINT MaximumMulticastAddresses,
|
IN UINT MaximumMulticastAddresses,
|
||||||
IN PUCHAR AdapterAddress,
|
IN PUCHAR AdapterAddress,
|
||||||
OUT PETH_FILTER * Filter);
|
OUT PETH_FILTER * Filter);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
NTAPI
|
||||||
EthFilterDprIndicateReceive(
|
EthFilterDprIndicateReceive(
|
||||||
IN PETH_FILTER Filter,
|
IN PETH_FILTER Filter,
|
||||||
IN NDIS_HANDLE MacReceiveContext,
|
IN NDIS_HANDLE MacReceiveContext,
|
||||||
|
@ -28,7 +67,7 @@ EthFilterDprIndicateReceive(
|
||||||
IN UINT PacketSize);
|
IN UINT PacketSize);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
NTAPI
|
||||||
EthFilterDprIndicateReceiveComplete(
|
EthFilterDprIndicateReceiveComplete(
|
||||||
IN PETH_FILTER Filter);
|
IN PETH_FILTER Filter);
|
||||||
|
|
||||||
|
|
|
@ -10,22 +10,29 @@
|
||||||
#ifndef __NDISSYS_H
|
#ifndef __NDISSYS_H
|
||||||
#define __NDISSYS_H
|
#define __NDISSYS_H
|
||||||
|
|
||||||
#define NDIS50 1 /* Use NDIS 5.0 structures by default */
|
typedef unsigned long NDIS_STATS;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <basetsd.h>
|
|
||||||
#include <ntddk.h>
|
|
||||||
#include <windef.h>
|
|
||||||
#include <ndis.h>
|
#include <ndis.h>
|
||||||
|
#include <xfilter.h>
|
||||||
|
#include <afilter.h>
|
||||||
|
|
||||||
|
#if _MSC_VER
|
||||||
|
/* FIXME: These were removed and are no longer used! */
|
||||||
|
#define NdisWorkItemHalt NdisMaxWorkItems
|
||||||
|
#define NdisWorkItemSendLoopback (NdisMaxWorkItems + 1)
|
||||||
#else /* _MSC_VER */
|
#else /* _MSC_VER */
|
||||||
#include <ddk/ntddk.h>
|
/* FIXME: We miss the ATM headers. */
|
||||||
#include <ddk/ntifs.h>
|
|
||||||
#include <ddk/ndis.h>
|
|
||||||
#include <ddk/xfilter.h>
|
|
||||||
#include <ddk/afilter.h>
|
|
||||||
typedef struct _ATM_ADDRESS *PATM_ADDRESS;
|
typedef struct _ATM_ADDRESS *PATM_ADDRESS;
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
|
/* FIXME: This should go away once NDK will be compatible with MS DDK headers. */
|
||||||
|
#if _MSC_VER
|
||||||
|
NTSTATUS NTAPI ZwDuplicateObject(IN HANDLE, IN HANDLE, IN HANDLE, OUT PHANDLE, IN ACCESS_MASK, IN ULONG, IN ULONG);
|
||||||
|
#else
|
||||||
|
#include <ndk/ntndk.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NDIS_MINIPORT_WORK_QUEUE_SIZE 10
|
||||||
|
|
||||||
struct _ADAPTER_BINDING;
|
struct _ADAPTER_BINDING;
|
||||||
|
|
||||||
typedef struct _INTERNAL_NDIS_MINIPORT_WORK_ITEM {
|
typedef struct _INTERNAL_NDIS_MINIPORT_WORK_ITEM {
|
||||||
|
@ -34,16 +41,21 @@ typedef struct _INTERNAL_NDIS_MINIPORT_WORK_ITEM {
|
||||||
NDIS_MINIPORT_WORK_ITEM RealWorkItem;
|
NDIS_MINIPORT_WORK_ITEM RealWorkItem;
|
||||||
} INTERNAL_NDIS_MINIPORT_WORK_ITEM, *PINTERNAL_NDIS_MINIPORT_WORK_ITEM;
|
} INTERNAL_NDIS_MINIPORT_WORK_ITEM, *PINTERNAL_NDIS_MINIPORT_WORK_ITEM;
|
||||||
|
|
||||||
|
typedef struct _NDISI_PACKET_POOL {
|
||||||
|
NDIS_SPIN_LOCK SpinLock;
|
||||||
|
struct _NDIS_PACKET *FreeList;
|
||||||
|
UINT PacketLength;
|
||||||
|
UCHAR Buffer[1];
|
||||||
|
} NDISI_PACKET_POOL, * PNDISI_PACKET_POOL;
|
||||||
|
|
||||||
#include "miniport.h"
|
#include "miniport.h"
|
||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
/* Exported functions */
|
/* Exported functions */
|
||||||
#ifdef _MSC_VER
|
#ifndef EXPORT
|
||||||
#define EXPORT __declspec(dllexport)
|
#define EXPORT NTAPI
|
||||||
#else
|
|
||||||
#define EXPORT STDCALL
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||||
|
|
|
@ -128,7 +128,6 @@ NdisIMRevertBack@8
|
||||||
NdisIMSwitchToMiniport@8
|
NdisIMSwitchToMiniport@8
|
||||||
NdisInitAnsiString@8
|
NdisInitAnsiString@8
|
||||||
NdisInitializeEvent@4
|
NdisInitializeEvent@4
|
||||||
NdisInitializeInterrupt@40
|
|
||||||
NdisInitializeReadWriteLock@4
|
NdisInitializeReadWriteLock@4
|
||||||
NdisInitializeString@8
|
NdisInitializeString@8
|
||||||
NdisInitializeTimer@12
|
NdisInitializeTimer@12
|
||||||
|
@ -239,13 +238,11 @@ NdisReadPcmciaAttributeMemory@16
|
||||||
NdisReinitializePacket@4
|
NdisReinitializePacket@4
|
||||||
NdisRegisterAdapter@24
|
NdisRegisterAdapter@24
|
||||||
NdisRegisterAdapterShutdownHandler@12
|
NdisRegisterAdapterShutdownHandler@12
|
||||||
NdisRegisterMac@24
|
|
||||||
NdisRegisterProtocol@16
|
NdisRegisterProtocol@16
|
||||||
;NdisRegisterTdiCallBack ?
|
;NdisRegisterTdiCallBack ?
|
||||||
NdisReleaseAdapterResources@4
|
NdisReleaseAdapterResources@4
|
||||||
NdisReleaseReadWriteLock@8
|
NdisReleaseReadWriteLock@8
|
||||||
NdisReleaseSpinLock@4
|
NdisReleaseSpinLock@4
|
||||||
NdisRemoveInterrupt@4
|
|
||||||
NdisRequest@12
|
NdisRequest@12
|
||||||
NdisReset@8
|
NdisReset@8
|
||||||
NdisResetEvent@4
|
NdisResetEvent@4
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<include base="ndis">include</include>
|
<include base="ndis">include</include>
|
||||||
<define name="NDIS_WRAPPER" />
|
<define name="NDIS_WRAPPER" />
|
||||||
<define name="NDIS50" />
|
<define name="NDIS50" />
|
||||||
|
<define name="NDIS51" />
|
||||||
<define name="NDIS50_MINIPORT" />
|
<define name="NDIS50_MINIPORT" />
|
||||||
<define name="BINARY_COMPATIBLE" />
|
<define name="NDIS51_MINIPORT" />
|
||||||
<define name="__USE_W32API" />
|
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
<directory name="include">
|
<directory name="include">
|
||||||
|
|
|
@ -105,6 +105,7 @@ NdisAllocateSharedMemory(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisCompleteBufferPhysicalMapping
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisCompleteBufferPhysicalMapping(
|
NdisCompleteBufferPhysicalMapping(
|
||||||
|
@ -119,6 +120,7 @@ NdisCompleteBufferPhysicalMapping(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisCompleteRequest
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisCompleteRequest(
|
NdisCompleteRequest(
|
||||||
|
@ -133,6 +135,7 @@ NdisCompleteRequest(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisCompleteReset
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisCompleteReset(
|
NdisCompleteReset(
|
||||||
|
@ -146,6 +149,7 @@ NdisCompleteReset(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisCompleteSend
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisCompleteSend(
|
NdisCompleteSend(
|
||||||
|
@ -160,6 +164,7 @@ NdisCompleteSend(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisCompleteTransferData
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisCompleteTransferData(
|
NdisCompleteTransferData(
|
||||||
|
@ -175,6 +180,7 @@ NdisCompleteTransferData(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisIndicateReceive
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisIndicateReceive(
|
NdisIndicateReceive(
|
||||||
|
@ -194,6 +200,7 @@ NdisIndicateReceive(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisIndicateReceiveComplete
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisIndicateReceiveComplete(
|
NdisIndicateReceiveComplete(
|
||||||
|
@ -206,6 +213,7 @@ NdisIndicateReceiveComplete(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisIndicateStatus
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisIndicateStatus(
|
NdisIndicateStatus(
|
||||||
|
@ -221,6 +229,7 @@ NdisIndicateStatus(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisIndicateStatusComplete
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisIndicateStatusComplete(
|
NdisIndicateStatusComplete(
|
||||||
|
@ -265,6 +274,7 @@ NdisReadBindingInformation (
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisReadDmaCounter
|
||||||
ULONG
|
ULONG
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisReadDmaCounter(
|
NdisReadDmaCounter(
|
||||||
|
@ -279,6 +289,7 @@ NdisReadDmaCounter(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisStartBufferPhysicalMapping
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisStartBufferPhysicalMapping(
|
NdisStartBufferPhysicalMapping(
|
||||||
|
@ -296,22 +307,7 @@ NdisStartBufferPhysicalMapping(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
BOOLEAN
|
#undef NdisUnmapIoSpace
|
||||||
EXPORT
|
|
||||||
NdisSynchronizeWithInterrupt(
|
|
||||||
IN PNDIS_INTERRUPT Interrupt,
|
|
||||||
IN PVOID SynchronizeFunction,
|
|
||||||
IN PVOID SynchronizeContext)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisUnmapIoSpace(
|
NdisUnmapIoSpace(
|
||||||
|
|
|
@ -209,33 +209,6 @@ NdisIMSwitchToMiniport(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
VOID
|
|
||||||
EXPORT
|
|
||||||
NdisInitializeInterrupt(
|
|
||||||
OUT PNDIS_STATUS Status,
|
|
||||||
IN OUT PNDIS_INTERRUPT Interrupt,
|
|
||||||
IN NDIS_HANDLE NdisAdapterHandle,
|
|
||||||
IN PNDIS_INTERRUPT_SERVICE InterruptServiceRoutine,
|
|
||||||
IN PVOID InterruptContext,
|
|
||||||
IN PNDIS_DEFERRED_PROCESSING DeferredProcessingRoutine,
|
|
||||||
IN UINT InterruptVector,
|
|
||||||
IN UINT InterruptLevel,
|
|
||||||
IN BOOLEAN SharedInterrupt,
|
|
||||||
IN NDIS_INTERRUPT_MODE InterruptMode)
|
|
||||||
/*
|
|
||||||
* FUNCTION:
|
|
||||||
* ARGUMENTS:
|
|
||||||
* NOTES:
|
|
||||||
* NDIS 4.0
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -370,29 +343,6 @@ NdisRegisterAdapterShutdownHandler(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
VOID
|
|
||||||
EXPORT
|
|
||||||
NdisRegisterMac(
|
|
||||||
OUT PNDIS_STATUS Status,
|
|
||||||
OUT PNDIS_HANDLE NdisMacHandle,
|
|
||||||
IN NDIS_HANDLE NdisWrapperHandle,
|
|
||||||
IN NDIS_HANDLE MacMacContext,
|
|
||||||
IN PNDIS_MAC_CHARACTERISTICS MacCharacteristics,
|
|
||||||
IN UINT CharacteristicsLength)
|
|
||||||
/*
|
|
||||||
* FUNCTION:
|
|
||||||
* ARGUMENTS:
|
|
||||||
* NOTES:
|
|
||||||
* NDIS 4.0
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -411,24 +361,6 @@ NdisReleaseAdapterResources(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
VOID
|
|
||||||
EXPORT
|
|
||||||
NdisRemoveInterrupt(
|
|
||||||
IN PNDIS_INTERRUPT Interrupt)
|
|
||||||
/*
|
|
||||||
* FUNCTION:
|
|
||||||
* ARGUMENTS:
|
|
||||||
* NOTES:
|
|
||||||
* NDIS 4.0
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,32 +1,15 @@
|
||||||
### THIS FILE IS OFFICIALLY OBSOLETE ###
|
|
||||||
### SEE ../README.TXT ###
|
|
||||||
|
|
||||||
TARGETNAME=ndis
|
TARGETNAME=ndis
|
||||||
TARGETPATH=..\objects
|
TARGETPATH=obj
|
||||||
TARGETTYPE=EXPORT_DRIVER
|
TARGETTYPE=EXPORT_DRIVER
|
||||||
|
|
||||||
TARGETLIBS=
|
C_DEFINES=-DNDIS_WRAPPER=1 -DNDIS50=1 -DNDIS51=1 -DNDIS50_MINIPORT=1 -DNDIS51_MINIPORT=1
|
||||||
|
|
||||||
C_DEFINES=$(C_DEFINES) -DUNICODE -DNDIS_WRAPPER -DBINARY_COMPATIBLE=1
|
INCLUDES=..\include;..\..\..\..\include;..\..\..\..\include\reactos
|
||||||
|
|
||||||
INCLUDES=..\include;..\..\..\..\include\net;$(BASEDIR)\INC
|
SOURCES= 40gone.c 50gone.c buffer.c cl.c cm.c co.c config.c control.c \
|
||||||
|
efilter.c hardware.c io.c main.c memory.c miniport.c protocol.c \
|
||||||
SOURCES= 40gone.c \
|
string.c stubs.c time.c
|
||||||
50gone.c \
|
|
||||||
buffer.c \
|
|
||||||
cl.c \
|
|
||||||
cm.c \
|
|
||||||
co.c \
|
|
||||||
control.c \
|
|
||||||
hardware.c \
|
|
||||||
io.c \
|
|
||||||
main.c \
|
|
||||||
memory.c \
|
|
||||||
miniport.c \
|
|
||||||
protocol.c \
|
|
||||||
string.c \
|
|
||||||
stubs.c \
|
|
||||||
time.c \
|
|
||||||
RESOURCE.RC
|
|
||||||
|
|
||||||
MSC_WARNING_LEVEL=/W3 /WX
|
MSC_WARNING_LEVEL=/W3 /WX
|
||||||
|
|
||||||
|
DLLDEF=$(O)/ndis.def
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
|
|
||||||
|
|
||||||
__inline ULONG SkipToOffset(
|
__inline ULONG SkipToOffset(
|
||||||
PNDIS_BUFFER Buffer,
|
IN PNDIS_BUFFER Buffer,
|
||||||
UINT Offset,
|
IN UINT Offset,
|
||||||
PUCHAR *Data,
|
IN OUT PUCHAR *Data,
|
||||||
PUINT Size)
|
IN OUT PUINT Size)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Skips Offset bytes into a buffer chain
|
* FUNCTION: Skips Offset bytes into a buffer chain
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -237,7 +237,7 @@ UINT CopyPacketToBufferChain(
|
||||||
if (SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == 0xFFFFFFFF)
|
if (SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == 0xFFFFFFFF)
|
||||||
return 0;
|
return 0;
|
||||||
/* Skip SrcOffset bytes in the source packet */
|
/* Skip SrcOffset bytes in the source packet */
|
||||||
NdisGetFirstBufferFromPacket(SrcPacket, &SrcBuffer, (PVOID)&SrcData, &SrcSize, &Total);
|
NdisGetFirstBufferFromPacket(SrcPacket, &SrcBuffer, (PVOID*)&SrcData, &SrcSize, &Total);
|
||||||
if (SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
|
if (SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
|
||||||
return 0;
|
return 0;
|
||||||
/* Copy the data */
|
/* Copy the data */
|
||||||
|
@ -287,6 +287,7 @@ UINT CopyPacketToBufferChain(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisAdjustBufferLength
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisAdjustBufferLength(
|
NdisAdjustBufferLength(
|
||||||
|
@ -306,6 +307,7 @@ NdisAdjustBufferLength(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NDIS_BUFFER_TO_SPAN_PAGES
|
||||||
ULONG
|
ULONG
|
||||||
EXPORT
|
EXPORT
|
||||||
NDIS_BUFFER_TO_SPAN_PAGES(
|
NDIS_BUFFER_TO_SPAN_PAGES(
|
||||||
|
@ -464,7 +466,7 @@ NdisAllocatePacket(
|
||||||
{
|
{
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
PNDIS_PACKET Temp;
|
PNDIS_PACKET Temp;
|
||||||
PNDIS_PACKET_POOL Pool = (PNDIS_PACKET_POOL)PoolHandle;
|
PNDISI_PACKET_POOL Pool = (PNDISI_PACKET_POOL)PoolHandle;
|
||||||
|
|
||||||
NDIS_DbgPrint(MAX_TRACE, ("Status (0x%X) Packet (0x%X) PoolHandle (0x%X).\n",
|
NDIS_DbgPrint(MAX_TRACE, ("Status (0x%X) Packet (0x%X) PoolHandle (0x%X).\n",
|
||||||
Status, Packet, PoolHandle));
|
Status, Packet, PoolHandle));
|
||||||
|
@ -541,7 +543,7 @@ NdisAllocatePacketPoolEx(
|
||||||
* NDIS 5.0
|
* NDIS 5.0
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
PNDIS_PACKET_POOL Pool;
|
PNDISI_PACKET_POOL Pool;
|
||||||
UINT Size, Length, i;
|
UINT Size, Length, i;
|
||||||
PNDIS_PACKET Packet, NextPacket;
|
PNDIS_PACKET Packet, NextPacket;
|
||||||
|
|
||||||
|
@ -562,7 +564,7 @@ NdisAllocatePacketPoolEx(
|
||||||
}
|
}
|
||||||
|
|
||||||
Length = sizeof(NDIS_PACKET) + ProtocolReservedLength;
|
Length = sizeof(NDIS_PACKET) + ProtocolReservedLength;
|
||||||
Size = sizeof(NDIS_PACKET_POOL) + Length * NumberOfDescriptors;
|
Size = sizeof(NDISI_PACKET_POOL) + Length * NumberOfDescriptors;
|
||||||
|
|
||||||
Pool = ExAllocatePool(NonPagedPool, Size);
|
Pool = ExAllocatePool(NonPagedPool, Size);
|
||||||
if (Pool)
|
if (Pool)
|
||||||
|
@ -598,6 +600,7 @@ NdisAllocatePacketPoolEx(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisBufferLength
|
||||||
ULONG
|
ULONG
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisBufferLength(
|
NdisBufferLength(
|
||||||
|
@ -620,6 +623,7 @@ NdisBufferLength(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisBufferVirtualAddress
|
||||||
PVOID
|
PVOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisBufferVirtualAddress(
|
NdisBufferVirtualAddress(
|
||||||
|
@ -696,12 +700,12 @@ NdisCopyFromPacketToPacket(
|
||||||
*BytesCopied = 0;
|
*BytesCopied = 0;
|
||||||
|
|
||||||
/* Skip DestinationOffset bytes in the destination packet */
|
/* Skip DestinationOffset bytes in the destination packet */
|
||||||
NdisGetFirstBufferFromPacket(Destination, &DstBuffer, (PVOID)&DstData, &DstSize, &Total);
|
NdisGetFirstBufferFromPacket(Destination, &DstBuffer, (PVOID*)&DstData, &DstSize, &Total);
|
||||||
if (SkipToOffset(DstBuffer, DestinationOffset, &DstData, &DstSize) == 0xFFFFFFFF)
|
if (SkipToOffset(DstBuffer, DestinationOffset, &DstData, &DstSize) == 0xFFFFFFFF)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Skip SourceOffset bytes in the source packet */
|
/* Skip SourceOffset bytes in the source packet */
|
||||||
NdisGetFirstBufferFromPacket(Source, &SrcBuffer, (PVOID)&SrcData, &SrcSize, &Total);
|
NdisGetFirstBufferFromPacket(Source, &SrcBuffer, (PVOID*)&SrcData, &SrcSize, &Total);
|
||||||
if (SkipToOffset(SrcBuffer, SourceOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
|
if (SkipToOffset(SrcBuffer, SourceOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -859,6 +863,7 @@ NdisFreePacketPool(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisFreeBuffer
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisFreeBuffer(
|
NdisFreeBuffer(
|
||||||
|
@ -901,16 +906,17 @@ NdisFreePacket(
|
||||||
|
|
||||||
NDIS_DbgPrint(MAX_TRACE, ("Packet (0x%X).\n", Packet));
|
NDIS_DbgPrint(MAX_TRACE, ("Packet (0x%X).\n", Packet));
|
||||||
|
|
||||||
KeAcquireSpinLock(&Packet->Private.Pool->SpinLock.SpinLock, &OldIrql);
|
KeAcquireSpinLock(&((NDISI_PACKET_POOL*)Packet->Private.Pool)->SpinLock.SpinLock, &OldIrql);
|
||||||
Packet->Private.Head = (PNDIS_BUFFER)Packet->Private.Pool->FreeList;
|
Packet->Private.Head = (PNDIS_BUFFER)((NDISI_PACKET_POOL*)Packet->Private.Pool)->FreeList;
|
||||||
Packet->Private.Pool->FreeList = Packet;
|
((NDISI_PACKET_POOL*)Packet->Private.Pool)->FreeList = Packet;
|
||||||
KeReleaseSpinLock(&Packet->Private.Pool->SpinLock.SpinLock, OldIrql);
|
KeReleaseSpinLock(&((NDISI_PACKET_POOL*)Packet->Private.Pool)->SpinLock.SpinLock, OldIrql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisGetBufferPhysicalArraySize
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisGetBufferPhysicalArraySize(
|
NdisGetBufferPhysicalArraySize(
|
||||||
|
@ -933,6 +939,7 @@ NdisGetBufferPhysicalArraySize(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisGetFirstBufferFromPacket
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisGetFirstBufferFromPacket(
|
NdisGetFirstBufferFromPacket(
|
||||||
|
@ -1014,6 +1021,7 @@ NdisPacketPoolUsage(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisQueryBuffer
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisQueryBuffer(
|
NdisQueryBuffer(
|
||||||
|
@ -1039,6 +1047,7 @@ NdisQueryBuffer(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisQueryBufferSafe
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisQueryBufferSafe(
|
NdisQueryBufferSafe(
|
||||||
|
@ -1062,6 +1071,7 @@ NdisQueryBufferSafe(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisQueryBufferOffset
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisQueryBufferOffset(
|
NdisQueryBufferOffset(
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
DDKAPI
|
EXPORT
|
||||||
NdisClAddParty(
|
NdisClAddParty(
|
||||||
IN NDIS_HANDLE NdisVcHandle,
|
IN NDIS_HANDLE NdisVcHandle,
|
||||||
IN NDIS_HANDLE ProtocolPartyContext,
|
IN NDIS_HANDLE ProtocolPartyContext,
|
||||||
|
@ -38,7 +38,7 @@ NdisClAddParty(
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
DDKAPI
|
EXPORT
|
||||||
NdisClCloseAddressFamily(
|
NdisClCloseAddressFamily(
|
||||||
IN NDIS_HANDLE NdisAfHandle)
|
IN NDIS_HANDLE NdisAfHandle)
|
||||||
/*
|
/*
|
||||||
|
@ -58,7 +58,7 @@ NdisClCloseAddressFamily(
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
DDKAPI
|
EXPORT
|
||||||
NdisClCloseCall(
|
NdisClCloseCall(
|
||||||
IN NDIS_HANDLE NdisVcHandle,
|
IN NDIS_HANDLE NdisVcHandle,
|
||||||
IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
|
IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
|
||||||
|
@ -81,7 +81,7 @@ NdisClCloseCall(
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
DDKAPI
|
EXPORT
|
||||||
NdisClDeregisterSap(
|
NdisClDeregisterSap(
|
||||||
IN NDIS_HANDLE NdisSapHandle)
|
IN NDIS_HANDLE NdisSapHandle)
|
||||||
/*
|
/*
|
||||||
|
@ -101,7 +101,7 @@ NdisClDeregisterSap(
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
DDKAPI
|
EXPORT
|
||||||
NdisClDropParty(
|
NdisClDropParty(
|
||||||
IN NDIS_HANDLE NdisPartyHandle,
|
IN NDIS_HANDLE NdisPartyHandle,
|
||||||
IN PVOID Buffer OPTIONAL,
|
IN PVOID Buffer OPTIONAL,
|
||||||
|
@ -123,7 +123,7 @@ NdisClDropParty(
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
DDKAPI
|
EXPORT
|
||||||
NdisClIncomingCallComplete(
|
NdisClIncomingCallComplete(
|
||||||
IN NDIS_STATUS Status,
|
IN NDIS_STATUS Status,
|
||||||
IN NDIS_HANDLE NdisVcHandle,
|
IN NDIS_HANDLE NdisVcHandle,
|
||||||
|
@ -143,7 +143,7 @@ NdisClIncomingCallComplete(
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
DDKAPI
|
EXPORT
|
||||||
NdisClMakeCall(
|
NdisClMakeCall(
|
||||||
IN NDIS_HANDLE NdisVcHandle,
|
IN NDIS_HANDLE NdisVcHandle,
|
||||||
IN OUT PCO_CALL_PARAMETERS CallParameters,
|
IN OUT PCO_CALL_PARAMETERS CallParameters,
|
||||||
|
@ -166,7 +166,7 @@ NdisClMakeCall(
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
DDKAPI
|
EXPORT
|
||||||
NdisClModifyCallQoS(
|
NdisClModifyCallQoS(
|
||||||
IN NDIS_HANDLE NdisVcHandle,
|
IN NDIS_HANDLE NdisVcHandle,
|
||||||
IN PCO_CALL_PARAMETERS CallParameters)
|
IN PCO_CALL_PARAMETERS CallParameters)
|
||||||
|
@ -187,7 +187,7 @@ NdisClModifyCallQoS(
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
DDKAPI
|
EXPORT
|
||||||
NdisClOpenAddressFamily(
|
NdisClOpenAddressFamily(
|
||||||
IN NDIS_HANDLE NdisBindingHandle,
|
IN NDIS_HANDLE NdisBindingHandle,
|
||||||
IN PCO_ADDRESS_FAMILY AddressFamily,
|
IN PCO_ADDRESS_FAMILY AddressFamily,
|
||||||
|
@ -212,7 +212,7 @@ NdisClOpenAddressFamily(
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
DDKAPI
|
EXPORT
|
||||||
NdisClRegisterSap(
|
NdisClRegisterSap(
|
||||||
IN NDIS_HANDLE NdisAfHandle,
|
IN NDIS_HANDLE NdisAfHandle,
|
||||||
IN NDIS_HANDLE ProtocolSapContext,
|
IN NDIS_HANDLE ProtocolSapContext,
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisReinitializePacket
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisReinitializePacket(
|
NdisReinitializePacket(
|
||||||
|
@ -49,6 +50,7 @@ NdisAcquireReadWriteLock(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisAcquireSpinLock
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisAcquireSpinLock(
|
NdisAcquireSpinLock(
|
||||||
|
@ -66,6 +68,7 @@ NdisAcquireSpinLock(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisAllocateSpinLock
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisAllocateSpinLock(
|
NdisAllocateSpinLock(
|
||||||
|
@ -83,6 +86,7 @@ NdisAllocateSpinLock(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisDprAcquireSpinLock
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisDprAcquireSpinLock(
|
NdisDprAcquireSpinLock(
|
||||||
|
@ -101,6 +105,7 @@ NdisDprAcquireSpinLock(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisDprReleaseSpinLock
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisDprReleaseSpinLock(
|
NdisDprReleaseSpinLock(
|
||||||
|
@ -118,6 +123,7 @@ NdisDprReleaseSpinLock(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisFreeSpinLock
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisFreeSpinLock(
|
NdisFreeSpinLock(
|
||||||
|
@ -169,6 +175,7 @@ NdisInitializeEvent(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisReleaseSpinLock
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisReleaseSpinLock(
|
NdisReleaseSpinLock(
|
||||||
|
|
|
@ -10,9 +10,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ndissys.h"
|
#include "ndissys.h"
|
||||||
|
#include "efilter.h"
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
EXPORT
|
NTAPI
|
||||||
EthCreateFilter(
|
EthCreateFilter(
|
||||||
IN UINT MaximumMulticastAddresses,
|
IN UINT MaximumMulticastAddresses,
|
||||||
IN PUCHAR AdapterAddress,
|
IN PUCHAR AdapterAddress,
|
||||||
|
@ -32,15 +33,15 @@ EthCreateFilter(
|
||||||
* shouldn't be problem.
|
* shouldn't be problem.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
PETH_FILTER NewFilter;
|
PETHI_FILTER NewFilter;
|
||||||
|
|
||||||
NewFilter = ExAllocatePool(NonPagedPool, sizeof(ETH_FILTER));
|
NewFilter = ExAllocatePool(NonPagedPool, sizeof(ETHI_FILTER));
|
||||||
if (NewFilter != NULL)
|
if (NewFilter != NULL)
|
||||||
{
|
{
|
||||||
RtlZeroMemory(NewFilter, sizeof(ETH_FILTER));
|
RtlZeroMemory(NewFilter, sizeof(ETHI_FILTER));
|
||||||
NewFilter->MaxMulticastAddresses = MaximumMulticastAddresses;
|
NewFilter->MaxMulticastAddresses = MaximumMulticastAddresses;
|
||||||
RtlCopyMemory(NewFilter->AdapterAddress, AdapterAddress, ETH_LENGTH_OF_ADDRESS);
|
RtlCopyMemory(NewFilter->AdapterAddress, AdapterAddress, ETH_LENGTH_OF_ADDRESS);
|
||||||
*Filter = NewFilter;
|
*Filter = (PETH_FILTER)NewFilter;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -87,7 +88,7 @@ EthFilterDprIndicateReceive(
|
||||||
* in the boot process with Filter NULL. We need to investigate whether
|
* in the boot process with Filter NULL. We need to investigate whether
|
||||||
* this should be handled or not allowed. */
|
* this should be handled or not allowed. */
|
||||||
if( !Filter ) return;
|
if( !Filter ) return;
|
||||||
MiniIndicateData((PLOGICAL_ADAPTER)Filter->Miniport,
|
MiniIndicateData((PLOGICAL_ADAPTER)((PETHI_FILTER)Filter)->Miniport,
|
||||||
MacReceiveContext,
|
MacReceiveContext,
|
||||||
HeaderBuffer,
|
HeaderBuffer,
|
||||||
HeaderBufferSize,
|
HeaderBufferSize,
|
||||||
|
@ -119,7 +120,7 @@ EthFilterDprIndicateReceiveComplete(
|
||||||
|
|
||||||
if( !Filter ) return;
|
if( !Filter ) return;
|
||||||
|
|
||||||
Adapter = (PLOGICAL_ADAPTER)Filter->Miniport;
|
Adapter = (PLOGICAL_ADAPTER)((PETHI_FILTER)Filter)->Miniport;
|
||||||
|
|
||||||
NDIS_DbgPrint(MAX_TRACE, ("acquiring miniport block lock\n"));
|
NDIS_DbgPrint(MAX_TRACE, ("acquiring miniport block lock\n"));
|
||||||
KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);
|
KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);
|
||||||
|
@ -131,7 +132,7 @@ EthFilterDprIndicateReceiveComplete(
|
||||||
AdapterBinding = CONTAINING_RECORD(CurrentEntry, ADAPTER_BINDING, AdapterListEntry);
|
AdapterBinding = CONTAINING_RECORD(CurrentEntry, ADAPTER_BINDING, AdapterListEntry);
|
||||||
|
|
||||||
(*AdapterBinding->ProtocolBinding->Chars.ReceiveCompleteHandler)(
|
(*AdapterBinding->ProtocolBinding->Chars.ReceiveCompleteHandler)(
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.ProtocolBindingContext);
|
AdapterBinding->NdisOpenBlock.ProtocolBindingContext);
|
||||||
|
|
||||||
CurrentEntry = CurrentEntry->Flink;
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <roscfg.h>
|
|
||||||
#include "ndissys.h"
|
#include "ndissys.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,10 @@
|
||||||
* 3 Oct 2003 Vizzini - Formatting and minor bugfixes
|
* 3 Oct 2003 Vizzini - Formatting and minor bugfixes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <roscfg.h>
|
|
||||||
#include "ndissys.h"
|
#include "ndissys.h"
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL HandleDeferredProcessing(
|
VOID NTAPI HandleDeferredProcessing(
|
||||||
IN PKDPC Dpc,
|
IN PKDPC Dpc,
|
||||||
IN PVOID DeferredContext,
|
IN PVOID DeferredContext,
|
||||||
IN PVOID SystemArgument1,
|
IN PVOID SystemArgument1,
|
||||||
|
@ -71,7 +70,7 @@ VOID STDCALL HandleDeferredProcessing(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN STDCALL ServiceRoutine(
|
BOOLEAN NTAPI ServiceRoutine(
|
||||||
IN PKINTERRUPT Interrupt,
|
IN PKINTERRUPT Interrupt,
|
||||||
IN PVOID ServiceContext)
|
IN PVOID ServiceContext)
|
||||||
/*
|
/*
|
||||||
|
@ -125,6 +124,7 @@ NdisCompleteDmaTransfer(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisFlushBuffer
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisFlushBuffer(
|
NdisFlushBuffer(
|
||||||
|
@ -138,6 +138,7 @@ NdisFlushBuffer(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisGetCacheFillSize
|
||||||
ULONG
|
ULONG
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisGetCacheFillSize(
|
NdisGetCacheFillSize(
|
||||||
|
@ -239,7 +240,7 @@ NdisImmediateWritePortUshort(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IO_ALLOCATION_ACTION STDCALL NdisMapRegisterCallback (
|
IO_ALLOCATION_ACTION NTAPI NdisMapRegisterCallback (
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PIRP Irp,
|
IN PIRP Irp,
|
||||||
IN PVOID MapRegisterBase,
|
IN PVOID MapRegisterBase,
|
||||||
|
@ -415,14 +416,14 @@ NdisMAllocateMapRegisters(
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(Adapter->NdisMiniportBlock.MapRegisters, 0, BaseMapRegistersNeeded * sizeof(MAP_REGISTER_ENTRY));
|
memset(Adapter->NdisMiniportBlock.MapRegisters, 0, BaseMapRegistersNeeded * sizeof(MAP_REGISTER_ENTRY));
|
||||||
Adapter->NdisMiniportBlock.BaseMapRegistersNeeded = BaseMapRegistersNeeded;
|
Adapter->NdisMiniportBlock.BaseMapRegistersNeeded = (USHORT)BaseMapRegistersNeeded;
|
||||||
|
|
||||||
while(BaseMapRegistersNeeded)
|
while(BaseMapRegistersNeeded)
|
||||||
{
|
{
|
||||||
NDIS_DbgPrint(MAX_TRACE, ("iterating, basemapregistersneeded = %d\n", BaseMapRegistersNeeded));
|
NDIS_DbgPrint(MAX_TRACE, ("iterating, basemapregistersneeded = %d\n", BaseMapRegistersNeeded));
|
||||||
|
|
||||||
BaseMapRegistersNeeded--;
|
BaseMapRegistersNeeded--;
|
||||||
Adapter->NdisMiniportBlock.CurrentMapRegister = BaseMapRegistersNeeded;
|
Adapter->NdisMiniportBlock.CurrentMapRegister = (USHORT)BaseMapRegistersNeeded;
|
||||||
KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
|
KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
|
||||||
{
|
{
|
||||||
NtStatus = AdapterObject->DmaOperations->AllocateAdapterChannel(
|
NtStatus = AdapterObject->DmaOperations->AllocateAdapterChannel(
|
||||||
|
@ -565,6 +566,7 @@ NdisMCompleteBufferPhysicalMapping(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisMCompleteDmaTransfer
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisMCompleteDmaTransfer(
|
NdisMCompleteDmaTransfer(
|
||||||
|
@ -938,6 +940,7 @@ NdisMRegisterIoPortRange(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisMSetupDmaTransfer
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisMSetupDmaTransfer(
|
NdisMSetupDmaTransfer(
|
||||||
|
|
|
@ -11,20 +11,19 @@
|
||||||
* 3 Oct 2003 Vizzini - formatting and minor bugfixing
|
* 3 Oct 2003 Vizzini - formatting and minor bugfixing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <roscfg.h>
|
|
||||||
#include "ndissys.h"
|
#include "ndissys.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
|
|
||||||
/* See debug.h for debug/trace constants */
|
/* See debug.h for debug/trace constants */
|
||||||
DWORD DebugTraceLevel = MIN_TRACE;
|
ULONG DebugTraceLevel = MIN_TRACE;
|
||||||
//DWORD DebugTraceLevel = DEBUG_ULTRA;
|
//ULONG DebugTraceLevel = DEBUG_ULTRA;
|
||||||
|
|
||||||
#endif /* DBG */
|
#endif /* DBG */
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL MainUnload(
|
VOID NTAPI MainUnload(
|
||||||
PDRIVER_OBJECT DriverObject)
|
PDRIVER_OBJECT DriverObject)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Unloads the driver
|
* FUNCTION: Unloads the driver
|
||||||
|
@ -37,7 +36,7 @@ VOID STDCALL MainUnload(
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
NTAPI
|
||||||
DriverEntry(
|
DriverEntry(
|
||||||
PDRIVER_OBJECT DriverObject,
|
PDRIVER_OBJECT DriverObject,
|
||||||
PUNICODE_STRING RegistryPath)
|
PUNICODE_STRING RegistryPath)
|
||||||
|
@ -71,7 +70,7 @@ DriverEntry(
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
_cdecl
|
||||||
NdisWriteErrorLogEntry(
|
NdisWriteErrorLogEntry(
|
||||||
IN NDIS_HANDLE NdisAdapterHandle,
|
IN NDIS_HANDLE NdisAdapterHandle,
|
||||||
IN NDIS_ERROR_CODE ErrorCode,
|
IN NDIS_ERROR_CODE ErrorCode,
|
||||||
|
|
|
@ -51,6 +51,7 @@ NdisAllocateMemoryWithTag(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisCreateLookaheadBufferFromSharedMemory
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisCreateLookaheadBufferFromSharedMemory(
|
NdisCreateLookaheadBufferFromSharedMemory(
|
||||||
|
@ -65,6 +66,7 @@ NdisCreateLookaheadBufferFromSharedMemory(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisDestroyLookaheadBufferFromSharedMemory
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisDestroyLookaheadBufferFromSharedMemory(
|
NdisDestroyLookaheadBufferFromSharedMemory(
|
||||||
|
@ -241,11 +243,8 @@ NdisMAllocateSharedMemoryAsync(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
NTAPI
|
||||||
NdisMFreeSharedMemoryPassive(
|
NdisMFreeSharedMemoryPassive(
|
||||||
PVOID Context)
|
PVOID Context)
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* 20 Aug 2003 vizzini - DMA support
|
* 20 Aug 2003 vizzini - DMA support
|
||||||
* 3 Oct 2003 vizzini - SendPackets support
|
* 3 Oct 2003 vizzini - SendPackets support
|
||||||
*/
|
*/
|
||||||
#include <roscfg.h>
|
|
||||||
#include "ndissys.h"
|
#include "ndissys.h"
|
||||||
#include "efilter.h"
|
#include "efilter.h"
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ MiniIndicateData(
|
||||||
(MID_TRACE,
|
(MID_TRACE,
|
||||||
("XXX (%x) %x %x %x %x %x %x %x XXX\n",
|
("XXX (%x) %x %x %x %x %x %x %x XXX\n",
|
||||||
*AdapterBinding->ProtocolBinding->Chars.ReceiveHandler,
|
*AdapterBinding->ProtocolBinding->Chars.ReceiveHandler,
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.ProtocolBindingContext,
|
AdapterBinding->NdisOpenBlock.ProtocolBindingContext,
|
||||||
MacReceiveContext,
|
MacReceiveContext,
|
||||||
HeaderBuffer,
|
HeaderBuffer,
|
||||||
HeaderBufferSize,
|
HeaderBufferSize,
|
||||||
|
@ -238,7 +238,7 @@ MiniIndicateData(
|
||||||
|
|
||||||
/* call the receive handler */
|
/* call the receive handler */
|
||||||
(*AdapterBinding->ProtocolBinding->Chars.ReceiveHandler)(
|
(*AdapterBinding->ProtocolBinding->Chars.ReceiveHandler)(
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.ProtocolBindingContext,
|
AdapterBinding->NdisOpenBlock.ProtocolBindingContext,
|
||||||
MacReceiveContext,
|
MacReceiveContext,
|
||||||
HeaderBuffer,
|
HeaderBuffer,
|
||||||
HeaderBufferSize,
|
HeaderBufferSize,
|
||||||
|
@ -258,7 +258,7 @@ MiniIndicateData(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID NTAPI
|
||||||
MiniIndicateReceivePacket(
|
MiniIndicateReceivePacket(
|
||||||
IN NDIS_HANDLE Miniport,
|
IN NDIS_HANDLE Miniport,
|
||||||
IN PPNDIS_PACKET PacketArray,
|
IN PPNDIS_PACKET PacketArray,
|
||||||
|
@ -317,7 +317,7 @@ MiniIndicateReceivePacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID NTAPI
|
||||||
MiniResetComplete(
|
MiniResetComplete(
|
||||||
IN NDIS_HANDLE MiniportAdapterHandle,
|
IN NDIS_HANDLE MiniportAdapterHandle,
|
||||||
IN NDIS_STATUS Status,
|
IN NDIS_STATUS Status,
|
||||||
|
@ -328,7 +328,7 @@ MiniResetComplete(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID NTAPI
|
||||||
MiniRequestComplete(
|
MiniRequestComplete(
|
||||||
IN PADAPTER_BINDING AdapterBinding,
|
IN PADAPTER_BINDING AdapterBinding,
|
||||||
IN PNDIS_REQUEST Request,
|
IN PNDIS_REQUEST Request,
|
||||||
|
@ -338,13 +338,13 @@ MiniRequestComplete(
|
||||||
|
|
||||||
if( AdapterBinding->ProtocolBinding->Chars.RequestCompleteHandler ) {
|
if( AdapterBinding->ProtocolBinding->Chars.RequestCompleteHandler ) {
|
||||||
(*AdapterBinding->ProtocolBinding->Chars.RequestCompleteHandler)(
|
(*AdapterBinding->ProtocolBinding->Chars.RequestCompleteHandler)(
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.ProtocolBindingContext,
|
AdapterBinding->NdisOpenBlock.ProtocolBindingContext,
|
||||||
Request,
|
Request,
|
||||||
Status);
|
Status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID STDCALL
|
VOID NTAPI
|
||||||
MiniSendComplete(
|
MiniSendComplete(
|
||||||
IN NDIS_HANDLE MiniportAdapterHandle,
|
IN NDIS_HANDLE MiniportAdapterHandle,
|
||||||
IN PNDIS_PACKET Packet,
|
IN PNDIS_PACKET Packet,
|
||||||
|
@ -365,13 +365,13 @@ MiniSendComplete(
|
||||||
AdapterBinding = (PADAPTER_BINDING)Packet->Reserved[0];
|
AdapterBinding = (PADAPTER_BINDING)Packet->Reserved[0];
|
||||||
|
|
||||||
(*AdapterBinding->ProtocolBinding->Chars.SendCompleteHandler)(
|
(*AdapterBinding->ProtocolBinding->Chars.SendCompleteHandler)(
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.ProtocolBindingContext,
|
AdapterBinding->NdisOpenBlock.ProtocolBindingContext,
|
||||||
Packet,
|
Packet,
|
||||||
Status);
|
Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID NTAPI
|
||||||
MiniSendResourcesAvailable(
|
MiniSendResourcesAvailable(
|
||||||
IN NDIS_HANDLE MiniportAdapterHandle)
|
IN NDIS_HANDLE MiniportAdapterHandle)
|
||||||
{
|
{
|
||||||
|
@ -379,7 +379,7 @@ MiniSendResourcesAvailable(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID NTAPI
|
||||||
MiniTransferDataComplete(
|
MiniTransferDataComplete(
|
||||||
IN NDIS_HANDLE MiniportAdapterHandle,
|
IN NDIS_HANDLE MiniportAdapterHandle,
|
||||||
IN PNDIS_PACKET Packet,
|
IN PNDIS_PACKET Packet,
|
||||||
|
@ -393,7 +393,7 @@ MiniTransferDataComplete(
|
||||||
AdapterBinding = (PADAPTER_BINDING)Packet->Reserved[0];
|
AdapterBinding = (PADAPTER_BINDING)Packet->Reserved[0];
|
||||||
|
|
||||||
(*AdapterBinding->ProtocolBinding->Chars.SendCompleteHandler)(
|
(*AdapterBinding->ProtocolBinding->Chars.SendCompleteHandler)(
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.ProtocolBindingContext,
|
AdapterBinding->NdisOpenBlock.ProtocolBindingContext,
|
||||||
Packet,
|
Packet,
|
||||||
Status);
|
Status);
|
||||||
}
|
}
|
||||||
|
@ -807,7 +807,7 @@ NdisMQueryInformationComplete(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL MiniportDpc(
|
VOID NTAPI MiniportDpc(
|
||||||
IN PKDPC Dpc,
|
IN PKDPC Dpc,
|
||||||
IN PVOID DeferredContext,
|
IN PVOID DeferredContext,
|
||||||
IN PVOID SystemArgument1,
|
IN PVOID SystemArgument1,
|
||||||
|
@ -971,9 +971,10 @@ NdisMDeregisterAdapterShutdownHandler(
|
||||||
* ARGUMENTS: MiniportHandle: Handle passed into MiniportInitialize
|
* ARGUMENTS: MiniportHandle: Handle passed into MiniportInitialize
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n"));
|
|
||||||
PLOGICAL_ADAPTER Adapter = (PLOGICAL_ADAPTER)MiniportHandle;
|
PLOGICAL_ADAPTER Adapter = (PLOGICAL_ADAPTER)MiniportHandle;
|
||||||
|
|
||||||
|
NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n"));
|
||||||
|
|
||||||
if(Adapter->BugcheckContext->ShutdownHandler)
|
if(Adapter->BugcheckContext->ShutdownHandler)
|
||||||
KeDeregisterBugCheckCallback(Adapter->BugcheckContext->CallbackRecord);
|
KeDeregisterBugCheckCallback(Adapter->BugcheckContext->CallbackRecord);
|
||||||
}
|
}
|
||||||
|
@ -1104,7 +1105,7 @@ NdisInitializeWrapper(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL NdisIBugcheckCallback(
|
VOID NTAPI NdisIBugcheckCallback(
|
||||||
IN PVOID Buffer,
|
IN PVOID Buffer,
|
||||||
IN ULONG Length)
|
IN ULONG Length)
|
||||||
/*
|
/*
|
||||||
|
@ -1261,7 +1262,7 @@ DoQueries(
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
NTAPI
|
||||||
NdisIForwardIrpAndWaitCompletionRoutine(
|
NdisIForwardIrpAndWaitCompletionRoutine(
|
||||||
PDEVICE_OBJECT Fdo,
|
PDEVICE_OBJECT Fdo,
|
||||||
PIRP Irp,
|
PIRP Irp,
|
||||||
|
@ -1277,7 +1278,7 @@ NdisIForwardIrpAndWaitCompletionRoutine(
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
NTAPI
|
||||||
NdisIForwardIrpAndWait(PLOGICAL_ADAPTER Adapter, PIRP Irp)
|
NdisIForwardIrpAndWait(PLOGICAL_ADAPTER Adapter, PIRP Irp)
|
||||||
{
|
{
|
||||||
KEVENT Event;
|
KEVENT Event;
|
||||||
|
@ -1298,7 +1299,7 @@ NdisIForwardIrpAndWait(PLOGICAL_ADAPTER Adapter, PIRP Irp)
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
NTAPI
|
||||||
NdisIPnPStartDevice(
|
NdisIPnPStartDevice(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
PIRP Irp)
|
PIRP Irp)
|
||||||
|
@ -1478,9 +1479,9 @@ NdisIPnPStartDevice(
|
||||||
{
|
{
|
||||||
Success = EthCreateFilter(32, /* FIXME: Query this from miniport. */
|
Success = EthCreateFilter(32, /* FIXME: Query this from miniport. */
|
||||||
Adapter->Address.Type.Medium802_3,
|
Adapter->Address.Type.Medium802_3,
|
||||||
&Adapter->NdisMiniportBlock.FilterDbs.EthDB);
|
&Adapter->NdisMiniportBlock.EthDB);
|
||||||
if (Success)
|
if (Success)
|
||||||
Adapter->NdisMiniportBlock.FilterDbs.EthDB->Miniport = (PNDIS_MINIPORT_BLOCK)Adapter;
|
((PETHI_FILTER)Adapter->NdisMiniportBlock.EthDB)->Miniport = (PNDIS_MINIPORT_BLOCK)Adapter;
|
||||||
else
|
else
|
||||||
NdisStatus = NDIS_STATUS_RESOURCES;
|
NdisStatus = NDIS_STATUS_RESOURCES;
|
||||||
}
|
}
|
||||||
|
@ -1519,7 +1520,7 @@ NdisIPnPStartDevice(
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
NTAPI
|
||||||
NdisIPnPStopDevice(
|
NdisIPnPStopDevice(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
PIRP Irp)
|
PIRP Irp)
|
||||||
|
@ -1571,7 +1572,7 @@ NdisIPnPStopDevice(
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
NTAPI
|
||||||
NdisIDispatchPnp(
|
NdisIDispatchPnp(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
PIRP Irp)
|
PIRP Irp)
|
||||||
|
@ -1616,7 +1617,7 @@ NdisIDispatchPnp(
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
NTAPI
|
||||||
NdisIAddDevice(
|
NdisIAddDevice(
|
||||||
IN PDRIVER_OBJECT DriverObject,
|
IN PDRIVER_OBJECT DriverObject,
|
||||||
IN PDEVICE_OBJECT PhysicalDeviceObject)
|
IN PDEVICE_OBJECT PhysicalDeviceObject)
|
||||||
|
@ -1868,6 +1869,7 @@ NdisMRegisterMiniport(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisMResetComplete
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisMResetComplete(
|
NdisMResetComplete(
|
||||||
|
@ -1882,6 +1884,7 @@ NdisMResetComplete(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisMSendComplete
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisMSendComplete(
|
NdisMSendComplete(
|
||||||
|
@ -1904,6 +1907,7 @@ NdisMSendComplete(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisMSendResourcesAvailable
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisMSendResourcesAvailable(
|
NdisMSendResourcesAvailable(
|
||||||
|
@ -1916,6 +1920,7 @@ NdisMSendResourcesAvailable(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisMTransferDataComplete
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisMTransferDataComplete(
|
NdisMTransferDataComplete(
|
||||||
|
|
|
@ -9,17 +9,10 @@
|
||||||
* CSH 01/08-2000 Created
|
* CSH 01/08-2000 Created
|
||||||
* 09-13-2003 Vizzini Updates for SendPackets support
|
* 09-13-2003 Vizzini Updates for SendPackets support
|
||||||
*/
|
*/
|
||||||
#include <roscfg.h>
|
|
||||||
#include "ndissys.h"
|
#include "ndissys.h"
|
||||||
#include <buffer.h>
|
#include <buffer.h>
|
||||||
|
|
||||||
VOID
|
|
||||||
EXPORT
|
|
||||||
NdisMSendComplete(
|
|
||||||
IN NDIS_HANDLE MiniportAdapterHandle,
|
|
||||||
IN PNDIS_PACKET Packet,
|
|
||||||
IN NDIS_STATUS Status);
|
|
||||||
|
|
||||||
#define SERVICES_KEY L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"
|
#define SERVICES_KEY L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"
|
||||||
#define LINKAGE_KEY L"\\Linkage"
|
#define LINKAGE_KEY L"\\Linkage"
|
||||||
#define PARAMETERS_KEY L"\\Parameters\\"
|
#define PARAMETERS_KEY L"\\Parameters\\"
|
||||||
|
@ -113,7 +106,7 @@ ProIndicatePacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NDIS_STATUS STDCALL
|
NDIS_STATUS NTAPI
|
||||||
ProRequest(
|
ProRequest(
|
||||||
IN NDIS_HANDLE MacBindingHandle,
|
IN NDIS_HANDLE MacBindingHandle,
|
||||||
IN PNDIS_REQUEST NdisRequest)
|
IN PNDIS_REQUEST NdisRequest)
|
||||||
|
@ -188,7 +181,7 @@ ProRequest(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NDIS_STATUS STDCALL
|
NDIS_STATUS NTAPI
|
||||||
ProReset(
|
ProReset(
|
||||||
IN NDIS_HANDLE MacBindingHandle)
|
IN NDIS_HANDLE MacBindingHandle)
|
||||||
{
|
{
|
||||||
|
@ -198,7 +191,7 @@ ProReset(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NDIS_STATUS STDCALL
|
NDIS_STATUS NTAPI
|
||||||
ProSend(
|
ProSend(
|
||||||
IN NDIS_HANDLE MacBindingHandle,
|
IN NDIS_HANDLE MacBindingHandle,
|
||||||
IN PNDIS_PACKET Packet)
|
IN PNDIS_PACKET Packet)
|
||||||
|
@ -391,7 +384,7 @@ ProSend(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID NTAPI
|
||||||
ProSendPackets(
|
ProSendPackets(
|
||||||
IN NDIS_HANDLE NdisBindingHandle,
|
IN NDIS_HANDLE NdisBindingHandle,
|
||||||
IN PPNDIS_PACKET PacketArray,
|
IN PPNDIS_PACKET PacketArray,
|
||||||
|
@ -401,7 +394,7 @@ ProSendPackets(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NDIS_STATUS STDCALL
|
NDIS_STATUS NTAPI
|
||||||
ProTransferData(
|
ProTransferData(
|
||||||
IN NDIS_HANDLE MacBindingHandle,
|
IN NDIS_HANDLE MacBindingHandle,
|
||||||
IN NDIS_HANDLE MacReceiveContext,
|
IN NDIS_HANDLE MacReceiveContext,
|
||||||
|
@ -610,18 +603,18 @@ NdisOpenAdapter(
|
||||||
|
|
||||||
AdapterBinding->ProtocolBinding = Protocol;
|
AdapterBinding->ProtocolBinding = Protocol;
|
||||||
AdapterBinding->Adapter = Adapter;
|
AdapterBinding->Adapter = Adapter;
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.ProtocolBindingContext = ProtocolBindingContext;
|
AdapterBinding->NdisOpenBlock.ProtocolBindingContext = ProtocolBindingContext;
|
||||||
|
|
||||||
/* Set fields required by some NDIS macros */
|
/* Set fields required by some NDIS macros */
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.BindingHandle = (NDIS_HANDLE)AdapterBinding;
|
AdapterBinding->NdisOpenBlock.BindingHandle = (NDIS_HANDLE)AdapterBinding;
|
||||||
|
|
||||||
/* Set handlers (some NDIS macros require these) */
|
/* Set handlers (some NDIS macros require these) */
|
||||||
|
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.RequestHandler = ProRequest;
|
AdapterBinding->NdisOpenBlock.RequestHandler = ProRequest;
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.ResetHandler = ProReset;
|
AdapterBinding->NdisOpenBlock.ResetHandler = ProReset;
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.SendHandler = ProSend;
|
AdapterBinding->NdisOpenBlock.SendHandler = ProSend;
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.SendPacketsHandler = ProSendPackets;
|
AdapterBinding->NdisOpenBlock.SendPacketsHandler = ProSendPackets;
|
||||||
AdapterBinding->NdisOpenBlock.NdisCommonOpenBlock.TransferDataHandler = ProTransferData;
|
AdapterBinding->NdisOpenBlock.TransferDataHandler = ProTransferData;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* XXX this looks fishy */
|
/* XXX this looks fishy */
|
||||||
|
@ -937,6 +930,7 @@ NdisReset(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisSend
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisSend(
|
NdisSend(
|
||||||
|
@ -958,6 +952,7 @@ NdisSend(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisSendPackets
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisSendPackets(
|
NdisSendPackets(
|
||||||
|
@ -972,6 +967,7 @@ NdisSendPackets(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisTransferData
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisTransferData(
|
NdisTransferData(
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisAnsiStringToUnicodeString
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisAnsiStringToUnicodeString(
|
NdisAnsiStringToUnicodeString(
|
||||||
|
@ -74,6 +75,7 @@ NdisEqualString(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisInitAnsiString
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisInitAnsiString(
|
NdisInitAnsiString(
|
||||||
|
@ -127,6 +129,7 @@ NdisInitializeString(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisInitUnicodeString
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisInitUnicodeString(
|
NdisInitUnicodeString(
|
||||||
|
@ -151,6 +154,7 @@ NdisInitUnicodeString(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisUnicodeStringToAnsiString
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisUnicodeStringToAnsiString(
|
NdisUnicodeStringToAnsiString(
|
||||||
|
@ -179,6 +183,7 @@ NdisUnicodeStringToAnsiString(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisUpcaseUnicodeString
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisUpcaseUnicodeString(
|
NdisUpcaseUnicodeString(
|
||||||
|
|
|
@ -117,19 +117,19 @@ NdisMapFile(
|
||||||
typedef struct _NDIS_HANDLE_OBJECT
|
typedef struct _NDIS_HANDLE_OBJECT
|
||||||
{
|
{
|
||||||
HANDLE FileHandle;
|
HANDLE FileHandle;
|
||||||
BOOL Mapped;
|
BOOLEAN Mapped;
|
||||||
ULONG FileLength;
|
ULONG FileLength;
|
||||||
PVOID MapBuffer;
|
PVOID MapBuffer;
|
||||||
} NDIS_HANDLE_OBJECT, *PNDIS_HANDLE_OBJECT;
|
} NDIS_HANDLE_OBJECT, *PNDIS_HANDLE_OBJECT;
|
||||||
|
|
||||||
inline
|
__inline
|
||||||
PNDIS_HANDLE_OBJECT
|
PNDIS_HANDLE_OBJECT
|
||||||
NDIS_HANDLE_TO_POBJECT ( NDIS_HANDLE handle )
|
NDIS_HANDLE_TO_POBJECT ( NDIS_HANDLE handle )
|
||||||
{
|
{
|
||||||
return (PNDIS_HANDLE_OBJECT)handle;
|
return (PNDIS_HANDLE_OBJECT)handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
__inline
|
||||||
NDIS_HANDLE
|
NDIS_HANDLE
|
||||||
NDIS_POBJECT_TO_HANDLE ( PNDIS_HANDLE_OBJECT obj )
|
NDIS_POBJECT_TO_HANDLE ( PNDIS_HANDLE_OBJECT obj )
|
||||||
{
|
{
|
||||||
|
@ -220,6 +220,7 @@ NdisIMRegisterLayeredMiniport(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisMWanIndicateReceive
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisMWanIndicateReceive(
|
NdisMWanIndicateReceive(
|
||||||
|
@ -236,6 +237,7 @@ NdisMWanIndicateReceive(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisMWanIndicateReceiveComplete
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisMWanIndicateReceiveComplete(
|
NdisMWanIndicateReceiveComplete(
|
||||||
|
@ -248,6 +250,7 @@ NdisMWanIndicateReceiveComplete(
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisMWanSendComplete
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisMWanSendComplete(
|
NdisMWanSendComplete(
|
||||||
|
@ -584,6 +587,7 @@ NdisInterlockedIncrement(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisInterlockedPopEntrySList
|
||||||
PSINGLE_LIST_ENTRY
|
PSINGLE_LIST_ENTRY
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisInterlockedPopEntrySList(
|
NdisInterlockedPopEntrySList(
|
||||||
|
@ -603,6 +607,7 @@ NdisInterlockedPopEntrySList(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisInterlockedPushEntrySList
|
||||||
PSINGLE_LIST_ENTRY
|
PSINGLE_LIST_ENTRY
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisInterlockedPushEntrySList(
|
NdisInterlockedPushEntrySList(
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "ndissys.h"
|
#include "ndissys.h"
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID NTAPI
|
||||||
MiniportTimerDpc(
|
MiniportTimerDpc(
|
||||||
PKDPC Dpc,
|
PKDPC Dpc,
|
||||||
PVOID DeferredContext,
|
PVOID DeferredContext,
|
||||||
|
@ -74,6 +74,7 @@ NdisCancelTimer(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisGetCurrentSystemTime
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisGetCurrentSystemTime (
|
NdisGetCurrentSystemTime (
|
||||||
|
@ -214,6 +215,7 @@ NdisMSetPeriodicTimer(
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
#undef NdisMSetTimer
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisMSetTimer(
|
NdisMSetTimer(
|
||||||
|
|
|
@ -387,13 +387,7 @@ typedef struct _NDIS_GUID {
|
||||||
#define NDIS_GUID_UNICODE_STRING 0x00000008
|
#define NDIS_GUID_UNICODE_STRING 0x00000008
|
||||||
#define NDIS_GUID_ARRAY 0x00000010
|
#define NDIS_GUID_ARRAY 0x00000010
|
||||||
|
|
||||||
|
typedef HANDLE PNDIS_PACKET_POOL;
|
||||||
typedef struct _NDIS_PACKET_POOL {
|
|
||||||
NDIS_SPIN_LOCK SpinLock;
|
|
||||||
struct _NDIS_PACKET *FreeList;
|
|
||||||
UINT PacketLength;
|
|
||||||
UCHAR Buffer[1];
|
|
||||||
} NDIS_PACKET_POOL, * PNDIS_PACKET_POOL;
|
|
||||||
|
|
||||||
/* NDIS_PACKET_PRIVATE.Flags constants */
|
/* NDIS_PACKET_PRIVATE.Flags constants */
|
||||||
#define fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO 0x40
|
#define fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO 0x40
|
||||||
|
@ -4349,8 +4343,6 @@ typedef struct _NDIS_ARC_BUF {
|
||||||
|
|
||||||
#endif /* ARCNET */
|
#endif /* ARCNET */
|
||||||
|
|
||||||
#define NDIS_MINIPORT_WORK_QUEUE_SIZE 10
|
|
||||||
|
|
||||||
typedef struct _NDIS_LOG {
|
typedef struct _NDIS_LOG {
|
||||||
PNDIS_MINIPORT_BLOCK Miniport;
|
PNDIS_MINIPORT_BLOCK Miniport;
|
||||||
KSPIN_LOCK LogLock;
|
KSPIN_LOCK LogLock;
|
||||||
|
@ -4362,18 +4354,25 @@ typedef struct _NDIS_LOG {
|
||||||
UCHAR LogBuf[1];
|
UCHAR LogBuf[1];
|
||||||
} NDIS_LOG, *PNDIS_LOG;
|
} NDIS_LOG, *PNDIS_LOG;
|
||||||
|
|
||||||
typedef struct _FILTERDBS {
|
|
||||||
_ANONYMOUS_UNION union {
|
|
||||||
PETH_FILTER EthDB;
|
|
||||||
PNULL_FILTER NullDB;
|
|
||||||
} DUMMYUNIONNAME;
|
|
||||||
PTR_FILTER TrDB;
|
|
||||||
PFDDI_FILTER FddiDB;
|
|
||||||
#if ARCNET
|
#if ARCNET
|
||||||
|
#define FILTERDBS_ARCNET_S \
|
||||||
PARC_FILTER ArcDB;
|
PARC_FILTER ArcDB;
|
||||||
#else /* !ARCNET */
|
#else /* !ARCNET */
|
||||||
|
#define FILTERDBS_ARCNET_S \
|
||||||
PVOID XXXDB;
|
PVOID XXXDB;
|
||||||
#endif /* !ARCNET */
|
#endif /* !ARCNET */
|
||||||
|
|
||||||
|
#define FILTERDBS_S \
|
||||||
|
_ANONYMOUS_UNION union { \
|
||||||
|
PETH_FILTER EthDB; \
|
||||||
|
PNULL_FILTER NullDB; \
|
||||||
|
} DUMMYUNIONNAME; \
|
||||||
|
PTR_FILTER TrDB; \
|
||||||
|
PFDDI_FILTER FddiDB; \
|
||||||
|
FILTERDBS_ARCNET_S
|
||||||
|
|
||||||
|
typedef struct _FILTERDBS {
|
||||||
|
FILTERDBS_S
|
||||||
} FILTERDBS, *PFILTERDBS;
|
} FILTERDBS, *PFILTERDBS;
|
||||||
|
|
||||||
|
|
||||||
|
@ -4414,7 +4413,11 @@ struct _NDIS_MINIPORT_BLOCK {
|
||||||
USHORT CFHangCurrentTick;
|
USHORT CFHangCurrentTick;
|
||||||
NDIS_STATUS ResetStatus;
|
NDIS_STATUS ResetStatus;
|
||||||
NDIS_HANDLE ResetOpen;
|
NDIS_HANDLE ResetOpen;
|
||||||
|
#ifdef __cplusplus
|
||||||
FILTERDBS FilterDbs;
|
FILTERDBS FilterDbs;
|
||||||
|
#else
|
||||||
|
FILTERDBS_S
|
||||||
|
#endif
|
||||||
FILTER_PACKET_INDICATION_HANDLER PacketIndicateHandler;
|
FILTER_PACKET_INDICATION_HANDLER PacketIndicateHandler;
|
||||||
NDIS_M_SEND_COMPLETE_HANDLER SendCompleteHandler;
|
NDIS_M_SEND_COMPLETE_HANDLER SendCompleteHandler;
|
||||||
NDIS_M_SEND_RESOURCES_HANDLER SendResourcesHandler;
|
NDIS_M_SEND_RESOURCES_HANDLER SendResourcesHandler;
|
||||||
|
@ -4576,65 +4579,76 @@ typedef VOID (DDKAPI *SEND_PACKETS_HANDLER)(
|
||||||
IN PPNDIS_PACKET PacketArray,
|
IN PPNDIS_PACKET PacketArray,
|
||||||
IN UINT NumberOfPackets);
|
IN UINT NumberOfPackets);
|
||||||
|
|
||||||
|
#if defined(NDIS_WRAPPER)
|
||||||
|
#define NDIS_COMMON_OPEN_BLOCK_WRAPPER_S \
|
||||||
|
ULONG Flags; \
|
||||||
|
ULONG References; \
|
||||||
|
KSPIN_LOCK SpinLock; \
|
||||||
|
NDIS_HANDLE FilterHandle; \
|
||||||
|
ULONG ProtocolOptions; \
|
||||||
|
USHORT CurrentLookahead; \
|
||||||
|
USHORT ConnectDampTicks; \
|
||||||
|
USHORT DisconnectDampTicks; \
|
||||||
|
W_SEND_HANDLER WSendHandler; \
|
||||||
|
W_TRANSFER_DATA_HANDLER WTransferDataHandler; \
|
||||||
|
W_SEND_PACKETS_HANDLER WSendPacketsHandler; \
|
||||||
|
W_CANCEL_SEND_PACKETS_HANDLER CancelSendPacketsHandler; \
|
||||||
|
ULONG WakeUpEnable; \
|
||||||
|
PKEVENT CloseCompleteEvent; \
|
||||||
|
QUEUED_CLOSE QC; \
|
||||||
|
ULONG AfReferences; \
|
||||||
|
PNDIS_OPEN_BLOCK NextGlobalOpen;
|
||||||
|
#else
|
||||||
|
#define NDIS_COMMON_OPEN_BLOCK_WRAPPER_S
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NDIS_COMMON_OPEN_BLOCK_S \
|
||||||
|
PVOID MacHandle; \
|
||||||
|
NDIS_HANDLE BindingHandle; \
|
||||||
|
PNDIS_MINIPORT_BLOCK MiniportHandle; \
|
||||||
|
PNDIS_PROTOCOL_BLOCK ProtocolHandle; \
|
||||||
|
NDIS_HANDLE ProtocolBindingContext; \
|
||||||
|
PNDIS_OPEN_BLOCK MiniportNextOpen; \
|
||||||
|
PNDIS_OPEN_BLOCK ProtocolNextOpen; \
|
||||||
|
NDIS_HANDLE MiniportAdapterContext; \
|
||||||
|
BOOLEAN Reserved1; \
|
||||||
|
BOOLEAN Reserved2; \
|
||||||
|
BOOLEAN Reserved3; \
|
||||||
|
BOOLEAN Reserved4; \
|
||||||
|
PNDIS_STRING BindDeviceName; \
|
||||||
|
KSPIN_LOCK Reserved5; \
|
||||||
|
PNDIS_STRING RootDeviceName; \
|
||||||
|
_ANONYMOUS_UNION union { \
|
||||||
|
SEND_HANDLER SendHandler; \
|
||||||
|
WAN_SEND_HANDLER WanSendHandler; \
|
||||||
|
} DUMMYUNIONNAME; \
|
||||||
|
TRANSFER_DATA_HANDLER TransferDataHandler; \
|
||||||
|
SEND_COMPLETE_HANDLER SendCompleteHandler; \
|
||||||
|
TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler; \
|
||||||
|
RECEIVE_HANDLER ReceiveHandler; \
|
||||||
|
RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler; \
|
||||||
|
WAN_RECEIVE_HANDLER WanReceiveHandler; \
|
||||||
|
REQUEST_COMPLETE_HANDLER RequestCompleteHandler; \
|
||||||
|
RECEIVE_PACKET_HANDLER ReceivePacketHandler; \
|
||||||
|
SEND_PACKETS_HANDLER SendPacketsHandler; \
|
||||||
|
RESET_HANDLER ResetHandler; \
|
||||||
|
REQUEST_HANDLER RequestHandler; \
|
||||||
|
RESET_COMPLETE_HANDLER ResetCompleteHandler; \
|
||||||
|
STATUS_HANDLER StatusHandler; \
|
||||||
|
STATUS_COMPLETE_HANDLER StatusCompleteHandler; \
|
||||||
|
NDIS_COMMON_OPEN_BLOCK_WRAPPER_S
|
||||||
|
|
||||||
typedef struct _NDIS_COMMON_OPEN_BLOCK {
|
typedef struct _NDIS_COMMON_OPEN_BLOCK {
|
||||||
PVOID MacHandle;
|
NDIS_COMMON_OPEN_BLOCK_S
|
||||||
NDIS_HANDLE BindingHandle;
|
|
||||||
PNDIS_MINIPORT_BLOCK MiniportHandle;
|
|
||||||
PNDIS_PROTOCOL_BLOCK ProtocolHandle;
|
|
||||||
NDIS_HANDLE ProtocolBindingContext;
|
|
||||||
PNDIS_OPEN_BLOCK MiniportNextOpen;
|
|
||||||
PNDIS_OPEN_BLOCK ProtocolNextOpen;
|
|
||||||
NDIS_HANDLE MiniportAdapterContext;
|
|
||||||
BOOLEAN Reserved1;
|
|
||||||
BOOLEAN Reserved2;
|
|
||||||
BOOLEAN Reserved3;
|
|
||||||
BOOLEAN Reserved4;
|
|
||||||
PNDIS_STRING BindDeviceName;
|
|
||||||
KSPIN_LOCK Reserved5;
|
|
||||||
PNDIS_STRING RootDeviceName;
|
|
||||||
_ANONYMOUS_UNION union {
|
|
||||||
SEND_HANDLER SendHandler;
|
|
||||||
WAN_SEND_HANDLER WanSendHandler;
|
|
||||||
} DUMMYUNIONNAME;
|
|
||||||
TRANSFER_DATA_HANDLER TransferDataHandler;
|
|
||||||
SEND_COMPLETE_HANDLER SendCompleteHandler;
|
|
||||||
TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler;
|
|
||||||
RECEIVE_HANDLER ReceiveHandler;
|
|
||||||
RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler;
|
|
||||||
WAN_RECEIVE_HANDLER WanReceiveHandler;
|
|
||||||
REQUEST_COMPLETE_HANDLER RequestCompleteHandler;
|
|
||||||
RECEIVE_PACKET_HANDLER ReceivePacketHandler;
|
|
||||||
SEND_PACKETS_HANDLER SendPacketsHandler;
|
|
||||||
RESET_HANDLER ResetHandler;
|
|
||||||
REQUEST_HANDLER RequestHandler;
|
|
||||||
RESET_COMPLETE_HANDLER ResetCompleteHandler;
|
|
||||||
STATUS_HANDLER StatusHandler;
|
|
||||||
STATUS_COMPLETE_HANDLER StatusCompleteHandler;
|
|
||||||
#if defined(NDIS_WRAPPER)
|
|
||||||
ULONG Flags;
|
|
||||||
ULONG References;
|
|
||||||
KSPIN_LOCK SpinLock;
|
|
||||||
NDIS_HANDLE FilterHandle;
|
|
||||||
ULONG ProtocolOptions;
|
|
||||||
USHORT CurrentLookahead;
|
|
||||||
USHORT ConnectDampTicks;
|
|
||||||
USHORT DisconnectDampTicks;
|
|
||||||
W_SEND_HANDLER WSendHandler;
|
|
||||||
W_TRANSFER_DATA_HANDLER WTransferDataHandler;
|
|
||||||
W_SEND_PACKETS_HANDLER WSendPacketsHandler;
|
|
||||||
W_CANCEL_SEND_PACKETS_HANDLER CancelSendPacketsHandler;
|
|
||||||
ULONG WakeUpEnable;
|
|
||||||
PKEVENT CloseCompleteEvent;
|
|
||||||
QUEUED_CLOSE QC;
|
|
||||||
ULONG AfReferences;
|
|
||||||
PNDIS_OPEN_BLOCK NextGlobalOpen;
|
|
||||||
#endif /* _NDIS_ */
|
|
||||||
} NDIS_COMMON_OPEN_BLOCK;
|
} NDIS_COMMON_OPEN_BLOCK;
|
||||||
|
|
||||||
struct _NDIS_OPEN_BLOCK
|
struct _NDIS_OPEN_BLOCK
|
||||||
{
|
{
|
||||||
|
#ifdef __cplusplus
|
||||||
NDIS_COMMON_OPEN_BLOCK NdisCommonOpenBlock;
|
NDIS_COMMON_OPEN_BLOCK NdisCommonOpenBlock;
|
||||||
|
#else
|
||||||
|
NDIS_COMMON_OPEN_BLOCK_S
|
||||||
|
#endif
|
||||||
#if defined(NDIS_WRAPPER)
|
#if defined(NDIS_WRAPPER)
|
||||||
struct _NDIS_OPEN_CO
|
struct _NDIS_OPEN_CO
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue