Fixed compile issues with network code
authorCasper Hornstrup <chorns@users.sourceforge.net>
Wed, 2 Aug 2000 20:39:49 +0000 (20:39 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Wed, 2 Aug 2000 20:39:49 +0000 (20:39 +0000)
svn path=/trunk/; revision=1284

reactos/drivers/net/ndis/Makefile
reactos/drivers/net/ndis/ndis/stubs.c
reactos/drivers/net/tcpip/tcpip/Copy of info.c [deleted file]
reactos/include/ddk/exfuncs.h
reactos/include/net/miniport.h
reactos/include/net/ndis.h
reactos/include/net/ndisoid.h
reactos/include/net/netevent.h
reactos/include/net/tdi.h
reactos/include/net/tdiinfo.h
reactos/include/net/tdikrnl.h

index bbe7a43..a731195 100644 (file)
@@ -1,84 +1,64 @@
-# $Id: Makefile,v 1.2 2000/03/08 22:37:01 ea Exp $
-#
-# NDIS.SYS build spec
-#
+# NDIS.SYS - NDIS library
 
 
-TARGETNAME=
+TARGETNAME=ndis
 
 
-BASE_CFLAGS = -I../../../include
+BASE_CFLAGS = -I./include -I../../../include -DNDIS_WRAPPER -DBINARY_COMPATIBLE=1
 
 
-OBJECTS_ARC = arc/stubs.o
-OBJECTS_ETH = eth/stubs.o
-OBJECTS_FDDI = fddi/stubs.o
-OBJECTS_NDIS = ndis/stubs.o
-OBJECTS_TR = tr/stubs.o
+RESOURCE_OBJECT = $(TARGETNAME).coff
+NDIS_OBJECTS    = ndis/main.o ndis/40gone.o ndis/50gone.o ndis/buffer.o ndis/cl.o \
+                  ndis/cm.o ndis/co.o ndis/control.o ndis/hardware.o \
+                  ndis/io.o ndis/memory.o ndis/miniport.o \
+                                 ndis/protocol.o ndis/string.o ndis/stubs.o ndis/time.o
 
 
-OBJECTS_MISC = misc/dllmain.o misc/driver.o misc/stubs.o \
-       misc/$(TARGETNAME).coff
+all: objects $(TARGETNAME).sys
 
 
-OBJECTS = $(OBJECTS_ARC) $(OBJECTS_ETH) $(OBJECTS_FDDI) $(OBJECTS_NDIS)  \
-          $(OBJECTS_TR)
-
-all: $(TARGETNAME).sys
+objects:
+       mkdir objects
 
 $(TARGETNAME).coff: $(TARGETNAME).rc ../../../include/reactos/resource.h
 
 
 $(TARGETNAME).coff: $(TARGETNAME).rc ../../../include/reactos/resource.h
 
+OBJECTS = $(NDIS_OBJECTS) $(RESOURCE_OBJECT) ../../../ntoskrnl/ntoskrnl.a
+
+
 ifeq ($(DOSCLI),yes)
 ifeq ($(DOSCLI),yes)
-CLEAN_FILES = arc\*.o eth\*.o fddi\*.o ndis\*.o tr\*.o \
-              misc\*.o misc\*.coff $(TARGETNAME).o $(TARGETNAME).a \
+CLEAN_FILES = *.o objects\*.o ndis\*.o $(TARGETNAME).coff $(TARGETNAME).o $(TARGETNAME).a \
               junk.tmp base.tmp temp.exp $(TARGETNAME).sys $(TARGETNAME).sym
 else
               junk.tmp base.tmp temp.exp $(TARGETNAME).sys $(TARGETNAME).sym
 else
-CLEAN_FILES = arc/*.o eth/*.o fddi/*.o ndis/*.o tr/*.o \
-              misc/*.o misc/*.coff $(TARGETNAME).o $(TARGETNAME).a \
+CLEAN_FILES = *.o objects/*.o ndis/*.o $(TARGETNAME).coff $(TARGETNAME).o $(TARGETNAME).a \
               junk.tmp base.tmp temp.exp $(TARGETNAME).sys $(TARGETNAME).sym
 endif
 
               junk.tmp base.tmp temp.exp $(TARGETNAME).sys $(TARGETNAME).sym
 endif
 
-$(TARGETNAME).sys: $(OBJECTS) misc/$(TARGETNAME).def
-       $(LD) -r $(OBJECTS) -o $(TARGETNAME).o
+$(TARGETNAME).sys: $(OBJECTS)
        $(DLLTOOL) \
                --dllname $(TARGETNAME).sys \
        $(DLLTOOL) \
                --dllname $(TARGETNAME).sys \
-               --def misc/$(TARGETNAME).def \
-               --output-lib $(TARGETNAME).a \
-               --kill-at
+               --def $(TARGETNAME).def \
+               --kill-at \
+               --output-lib $(TARGETNAME).a
        $(CC) \
        $(CC) \
-               --subsystem=native \
                -mdll \
                -mdll \
-               --dll \
-               -e _DriverEntry@8 \
-               -o junk.tmp \
-               -Wl,--image-base,0x0 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,--defsym,_end=end \
+               -specs=../../svc_specs \
+               -Wl,-e,_DriverEntry@8 \
+               -Wl,--base-file,base.tmp \
+               -Wl,--defsym,_end=end  \
                -Wl,--defsym,_edata=__data_end__ \
                -Wl,--defsym,_etext=etext \
                -Wl,--defsym,_edata=__data_end__ \
                -Wl,--defsym,_etext=etext \
-               -Wl,--base-file,base.tmp $(TARGETNAME).o \
-               -specs=../../../specs \
-               ../../../ntoskrnl/ntoskrnl.a
+        $(OBJECTS) \
+        -o junk.tmp
        - $(RM) junk.tmp
        $(DLLTOOL) \
        - $(RM) junk.tmp
        $(DLLTOOL) \
-               --dllname $(TARGETNAME).sys \
-               --base-file base.tmp \
-               --output-exp temp.exp \
-               --def misc/$(TARGETNAME).edf \
-               --kill-at
+        --dllname $(TARGETNAME).sys \
+        --base-file base.tmp \
+        --output-exp temp.exp \
+        --def $(TARGETNAME).edf
        - $(RM) base.tmp
        $(CC) \
        - $(RM) base.tmp
        $(CC) \
-               --subsystem=native \
                -mdll \
                -mdll \
-               --dll \
-               -e _DllMain@8 \
-               -o $(TARGETNAME).sys \
-               $(TARGETNAME).o \
-               ../../../ntoskrnl/ntoskrnl.a \
-               -Wl,--image-base,0x0 \
-               -Wl,--file-alignment,0x1000 \
-               -Wl,--section-alignment,0x1000 \
-               -Wl,--defsym,_end=end \
-               -Wl,--defsym,_edata=__data_end__ \
-               -Wl,--defsym,_etext=etext \
+               -specs=../../svc_specs \
+               -Wl,--image-base,0x10000 \
+               -Wl,-e,_DriverEntry@8 \
                -Wl,temp.exp \
                -Wl,temp.exp \
-               -specs=../../../specs
+        $(OBJECTS) \
+        -o $(TARGETNAME).sys
        - $(RM) temp.exp
        $(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
 
        - $(RM) temp.exp
        $(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
 
@@ -107,8 +87,7 @@ else
        $(CP) $(TARGETNAME).sys ../../$(DIST_DIR)/drivers/$(TARGETNAME).sys
 endif
 
        $(CP) $(TARGETNAME).sys ../../$(DIST_DIR)/drivers/$(TARGETNAME).sys
 endif
 
-#WITH_DEBUGGING = yes
+#WITH_DEBUGGING      = yes
 #WIN32_LEAN_AND_MEAN = yes
 #WARNINGS_ARE_ERRORS = yes
 include ../../../rules.mak
 #WIN32_LEAN_AND_MEAN = yes
 #WARNINGS_ARE_ERRORS = yes
 include ../../../rules.mak
-
index 52e434f..8a56921 100644 (file)
-/* $Id: stubs.c,v 1.3 2000/01/16 18:32:34 ea Exp $
- *
- * services/net/ndis/ndis/stubs.c
- *
- * NOTE: remove the stub from this file, if you 
- * implement the function.
- *
- */
-#include <ntos.h>
-
-ULONG
-STDCALL
-NDIS_BUFFER_TO_SPAN_PAGES(
-       IN      PNDIS_BUFFER    Buffer
-       )
-{
-       return 0;
-}
-
-
-VOID
-STDCALL
-NdisAcquireSpinLock (
-       IN      PNDIS_SPIN_LOCK SpinLock
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisAdjustBufferLength (
-       IN      PNDIS_BUFFER    Buffer,
-       IN      UINT            Length
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisAllocateBuffer (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PNDIS_BUFFER    * Buffer,
-       IN      NDIS_HANDLE     PoolHandle,
-       IN      PVOID           VirtualAddress,
-       IN      UINT            Length
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisAllocateBufferPool (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PNDIS_HANDLE    PoolHandle,
-       IN      UINT            NumberOfDescriptors
-       )
-{
-}
-
-
-NDIS_STATUS
-STDCALL
-NdisAllocateMemory (
-       OUT     PVOID                   * VirtualAddress,
-       IN      UINT                    Length,
-       IN      UINT                    MemoryFlags,
-       IN      NDIS_PHYSICAL_ADDRESS   HighestAcceptableAddress
-       )
-{
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
-
-
-VOID
-STDCALL
-NdisAllocatePacket (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PNDIS_PACKET    * Packet,
-       IN      NDIS_HANDLE     PoolHandle
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisAllocatePacketPool (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PNDIS_HANDLE    PoolHandle,
-       IN      UINT            NumberOfDescriptors,
-       IN      UINT            ProtocolReservedLength
-        )
-{
-}
-
-
-VOID
-STDCALL
-NdisAllocateSpinLock (
-       IN      PNDIS_SPIN_LOCK SpinLock
-       )
-{
-}
-
-
-NDIS_STATUS
-STDCALL
-NdisAnsiStringToUnicodeString (
-       IN OUT  PNDIS_STRING            DestinationString,
-        IN     PNDIS_ANSI_STRING       SourceString
-       )
-{
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
-
-
-VOID
-STDCALL
-NdisChainBufferAtBack (
-       IN OUT  PNDIS_PACKET    Packet,
-       IN OUT  PNDIS_BUFFER    Buffer
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisChainBufferAtFront (
-       IN OUT  PNDIS_PACKET    Packet,
-       IN OUT  PNDIS_BUFFER    Buffer
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisCloseConfiguration (
-       IN      NDIS_HANDLE     ConfigurationHandle
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisCloseFile (
-       IN      NDIS_HANDLE     FileHandle
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisCopyBuffer (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PNDIS_BUFFER    * Buffer,
-       IN      NDIS_HANDLE     PoolHandle,
-       IN      PVOID           MemoryDescriptor,
-       IN      UINT            Offset,
-       IN      UINT            Length
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisCopyFromPacketToPacket (
-       IN      PNDIS_PACKET    Destination,
-       IN      UINT            DestinationOffset,
-       IN      UINT            BytesToCopy,
-       IN      PNDIS_PACKET    Source,
-       IN      UINT            SourceOffset,
-       OUT     PUINT           BytesCopied
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisCreateLookaheadBufferFromSharedMemory (
-       IN      PVOID   pSharedMemory,
-       IN      UINT    LookaheadLength,
-       OUT     PVOID   * pLookaheadBuffer
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisDestroyLookaheadBufferFromSharedMemory (
-       IN      PVOID   pLookaheadBuffer
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisDprAcquireSpinLock (
-       IN      PNDIS_SPIN_LOCK SpinLock
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisDprAllocatePacket (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PNDIS_PACKET    * Packet,
-       IN      NDIS_HANDLE     PoolHandle
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisDprFreePacket (
-       IN      PNDIS_PACKET    Packet
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisDprReleaseSpinLock (
-       IN      PNDIS_SPIN_LOCK SpinLock
-       )
-{
-}
-
-
-BOOLEAN
-STDCALL
-NdisEqualString (
-       IN      PNDIS_STRING    String1,
-       IN      PNDIS_STRING    String2,
-       IN      BOOLEAN         CaseInsensitive
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisFlushBuffer (
-       IN      PNDIS_BUFFER    Buffer,
-       IN      BOOLEAN         WriteToDevice
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisFreeBuffer(
-       IN      PNDIS_BUFFER    Buffer
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisFreeBufferPool (
-       IN      NDIS_HANDLE     PoolHandle
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisFreeMemory (
-       IN      PVOID   VirtualAddress,
-       IN      UINT    Length,
-       IN      UINT    MemoryFlags
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisFreePacket (
-       IN      PNDIS_PACKET    Packet
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisFreePacketPool (
-       IN      NDIS_HANDLE     PoolHandle
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisFreeSpinLock (
-       IN      PNDIS_SPIN_LOCK SpinLock
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisFreeString (
-       IN      NDIS_STRING     String
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisGetBufferPhysicalArraySize (
-       IN      PNDIS_BUFFER    Buffer,
-       OUT     PUINT           ArraySize
-       )
-{
-}
-
-
-ULONG
-STDCALL
-NdisGetCacheFillSize (
-       VOID
-       )
-{
-       return 0;
-}
-
-
-VOID
-STDCALL
-NdisGetCurrentProcessorCpuUsage (
-       IN OUT  PULONG  pCpuUsage
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisGetCurrentSystemTime (
-       IN OUT  PLONGLONG       pSystemTime
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisGetFirstBufferFromPacket (
-       IN      PNDIS_PACKET    _Packet,
-       OUT     PNDIS_BUFFER    * _FirstBuffer,
-       OUT     PVOID           * _FirstBufferVA,
-       OUT     PUINT           _FirstBufferLength,
-       OUT     PUINT           _TotalBufferLength
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisGetNextBuffer (
-       IN      PNDIS_BUFFER    CurrentBuffer,
-       OUT     PNDIS_BUFFER    * NextBuffer
-       )
-{
-}
-
-
-UINT
-STDCALL
-NdisGetPacketFlags (
-       IN      PNDIS_PACKET    Packet
-       )
-{
-}
-
-
-ULONG
-STDCALL
-NdisGetPhysicalAddressHigh (
-       IN      NDIS_PHYSICAL_ADDRESS   PhysicalAddress
-       )
-{
-       return 0;
-}
-
-
-ULONG
-STDCALL
-NdisGetPhysicalAddressLow (
-       IN      NDIS_PHYSICAL_ADDRESS   PhysicalAddress
-       )
-{
-       retrun 0;
-}
-
-
-NDIS_STATUS
-STDCALL
-NdisIMDeInitializeDeviceInstance (
-       IN      NDIS_HANDLE     NdisMiniportHandle
-       )
-{
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
-
-
-NDIS_STATUS
-STDCALL
-NdisIMInitializeDeviceInstance (
-       IN      NDIS_HANDLE     DriverHandle,
-       IN      PNDIS_STRING    DeviceInstance
-       )
-{
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
-
-
-ULONG
-STDCALL
-NdisImmediateReadPciSlotInformation (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           SlotNumber,
-       IN      ULONG           Offset,
-       IN      PVOID           Buffer,
-       IN      ULONG           Length
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisImmediateReadPortUchar (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           Port,
-       OUT     PUCHAR          Data
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisImmediateReadPortUlong (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           Port,
-       OUT     PULONG          Data
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisImmediateReadPortUshort (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           Port,
-       OUT     PUSHORT         Data
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisImmediateReadSharedMemory (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           SharedMemoryAddress,
-       OUT     PUCHAR          Buffer,
-       IN      ULONG           Length
-       )
-{
-}
-
-
-ULONG 
-STDCALL
-NdisImmediateWritePciSlotInformation (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           SlotNumber,
-       IN      ULONG           Offset,
-       IN      PVOID           Buffer,
-       IN      ULONG           Length
-       )
-{
-       return 0;
-}
-
-
-VOID
-STDCALL
-NdisImmediateWritePortUchar (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           Port,
-       IN      UCHAR           Data
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisImmediateWritePortUlong (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           Port,
-       IN      ULONG           Data
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisImmediateWritePortUshort (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           Port,
-       IN      USHORT          Data
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisImmediateWriteSharedMemory (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           SharedMemoryAddress,
-       IN      PUCHAR          Buffer,
-       IN      ULONG           Length
-       )
-{
-}
-
-
-NDIS_STATUS
-STDCALL
-NdisIMQueueMiniportCallback (
-       IN      NDIS_HANDLE             MiniportAdapterHandle,
-       IN      W_MINIPORT_CALLBACK     CallbackRoutine,
-       IN      PVOID                   CallbackContext
-       )
-{
-}
-
-
-NDIS_STATUS
-STDCALL
-NdisIMRegisterLayeredMiniport (
-       IN      NDIS_HANDLE                     NdisWrapperHandle,
-       IN      PNDIS_MINIPORT_CHARACTERISTICS  MiniportCharacteristics,
-       IN      UINT                            CharacteristicsLength,
-       OUT     PNDIS_HANDLE                    DriverHandle
-       )
-{
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
-
-
-VOID
-STDCALL
-NdisIMRevertBack (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      NDIS_HANDLE     SwitchHandle
-       )
-{
-}
-
-
-BOOLEAN
-STDCALL
-NdisIMSwitchToMiniport (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       OUT     PNDIS_HANDLE    SwitchHandle
-       )
-{
-       return FALSE;
-}
-
-
-VOID
-STDCALL
-NdisInitAnsiString (
-       IN      OUT PNDIS_ANSI_STRING   DestinationString,
-       IN      PCSTR                   SourceString
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisInitializeEvent (
-       IN      PNDIS_EVENT     Event
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisInitializeListHead (
-       IN      PLIST_ENTRY     ListHead
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisInitializeString (
-       IN      OUT PNDIS_STRING        DestinationString,
-       IN      PUCHAR                  SourceString
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisInitUnicodeString (
-       IN OUT  PNDIS_STRING    DestinationString,
-       IN      PCWSTR          SourceString
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisInterlockedAddUlong (
-       IN      PULONG          Addend,
-       IN      ULONG           Increment,
-       IN      PNDIS_SPIN_LOCK SpinLock
-       )
-{
-}
-
-
-PLIST_ENTRY
-STDCALL
-NdisInterlockedInsertHeadList (
-       IN      PLIST_ENTRY     ListHead,
-       IN      PLIST_ENTRY     ListEntry,
-       IN      PNDIS_SPIN_LOCK SpinLock
-       )
-{
-       return NULL;
-}
-
-
-PLIST_ENTRY
-STDCALL
-NdisInterlockedInsertTailList(
-       IN      PLIST_ENTRY     ListHead,
-       IN      PLIST_ENTRY     ListEntry,
-       IN      PNDIS_SPIN_LOCK SpinLock
-       )
-{
-       return NULL;
-}
-
-
-PLIST_ENTRY
-STDCALL
-NdisInterlockedRemoveHeadList (
-       IN      PLIST_ENTRY     ListHead,
-       IN      PNDIS_SPIN_LOCK SpinLock
-       )
-{
-       return NULL;
-}
-
-
-NDIS_STATUS
-STDCALL
-NdisMAllocateMapRegisters (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      UINT            DmaChannel,
-       IN      BOOLEAN         Dma32BitAddresses,
-       IN      ULONG           PhysicalMapRegistersNeeded,
-       IN      ULONG           MaximumPhysicalMapping
-       )
-{
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
-
-
-VOID
-STDCALL
-NdisMAllocateSharedMemory (
-       IN      NDIS_HANDLE             MiniportAdapterHandle,
-       IN      ULONG                   Length,
-       IN      BOOLEAN                 Cached,
-       OUT     PVOID                   * VirtualAddress,
-       OUT     PNDIS_PHYSICAL_ADDRESS  PhysicalAddress
-       )
-{
-}
-
-
-NDIS_STATUS
-STDCALL
-NdisMAllocateSharedMemoryAsync (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      ULONG           Length,
-       IN      BOOLEAN         Cached,
-       IN      PVOID           Context
-       )
-{
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
-
-
-VOID
-STDCALL
-NdisMapFile (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PVOID           * MappedBuffer,
-       IN      NDIS_HANDLE     FileHandle
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisMArcIndicateReceive (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      PUCHAR          HeaderBuffer,
-       IN      PUCHAR          DataBuffer,
-       IN      UINT            Length
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisMArcIndicateReceiveComplete (
-       IN      NDIS_HANDLE     MiniportAdapterHandle
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisMCancelTimer (
-       IN      PNDIS_MINIPORT_TIMER    Timer,
-       OUT     PBOOLEAN                TimerCancelled
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisMCloseLog (
-       IN      NDIS_HANDLE     LogHandle
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisMCompleteBufferPhysicalMapping (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      PNDIS_BUFFER    Buffer,
-       IN      ULONG           PhysicalMapRegister
-       )
-{
-}
-
-
-VOID
-STDCALL
-NdisMCompleteDmaTransfer (
-       OUT     PNDIS_STATUS    Status,
-       IN      PNDIS_HANDLE    MiniportDmaHandle,
-       IN      PNDIS_BUFFER    Buffer,
-       IN      ULONG           Offset,
-       IN      ULONG           Length,
-       IN      BOOLEAN         WriteToDevice
-       )
-{
-}
-
-
-NDIS_STATUS
-STDCALL
-NdisMCreateLog (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      UINT            Size,
-       OUT     PNDIS_HANDLE    LogHandle
-       )
-{
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS NDIS library
+ * FILE:        ndis/stubs.c
+ * PURPOSE:     Stubs
+ * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
+ * REVISIONS:
+ *   CSH 01/08-2000 Created
+ */
+#include <ndissys.h>
 
 
 VOID
 
 
 VOID
-STDCALL
-NdisMDeregisterAdapterShutdownHandler (
-       IN      NDIS_HANDLE     MiniportHandle
-       )
+EXPORT
+NdisCompleteBindAdapter(
+    IN  NDIS_HANDLE BindAdapterContext,
+    IN  NDIS_STATUS Status,
+    IN  NDIS_STATUS OpenStatus)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMDeregisterDmaChannel (
-       IN      PNDIS_HANDLE    MiniportDmaHandle
-       )
+EXPORT
+NdisCompleteQueryStatistics(
+    IN  NDIS_HANDLE     NdisAdapterHandle,
+    IN  PNDIS_REQUEST   NdisRequest,
+    IN  NDIS_STATUS     Status)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMDeregisterInterrupt (
-       IN      PNDIS_MINIPORT_INTERRUPT        Interrupt
-       )
+EXPORT
+NdisCompleteUnbindAdapter(
+    IN  NDIS_HANDLE UnbindAdapterContext,
+    IN  NDIS_STATUS Status)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMDeregisterIoPortRange (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      UINT            InitialPort,
-       IN      UINT            NumberOfPorts,
-       IN      PVOID           PortOffset
-       )
+EXPORT
+NdisInitializeListHead(
+    IN  PLIST_ENTRY ListHead)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMEthIndicateReceive (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      NDIS_HANDLE     MiniportReceiveContext,
-       IN      PVOID           HeaderBuffer,
-       IN      UINT            HeaderBufferSize,
-       IN      PVOID           LookaheadBuffer,
-       IN      UINT            LookaheadBufferSize,
-       IN      UINT            PacketSize
-       )
+EXPORT
+NdisInterlockedAddUlong (
+    IN  PULONG          Addend,
+    IN  ULONG           Increment,
+    IN  PNDIS_SPIN_LOCK SpinLock)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisMEthIndicateReceiveComplete (
-       IN      NDIS_HANDLE     MiniportAdapterHandle
-       )
+PLIST_ENTRY
+EXPORT
+NdisInterlockedInsertHeadList(
+    IN  PLIST_ENTRY     ListHead,
+    IN  PLIST_ENTRY     ListEntry,
+    IN  PNDIS_SPIN_LOCK SpinLock)
 {
 {
-}
-
+    UNIMPLEMENTED
 
 
-VOID
-STDCALL
-NdisMFddiIndicateReceive (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      NDIS_HANDLE     MiniportReceiveContext,
-       IN      PVOID           HeaderBuffer,
-       IN      UINT            HeaderBufferSize,
-       IN      PVOID           LookaheadBuffer,
-       IN      UINT            LookaheadBufferSize,
-       IN      UINT            PacketSize
-       )
-{
+       return NULL;
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisMFddiIndicateReceiveComplete (
-       IN      NDIS_HANDLE     MiniportAdapterHandle
-       )
+PLIST_ENTRY
+EXPORT
+NdisInterlockedInsertTailList(
+    IN  PLIST_ENTRY     ListHead,
+    IN  PLIST_ENTRY     ListEntry,
+    IN  PNDIS_SPIN_LOCK SpinLock)
 {
 {
-}
-
+    UNIMPLEMENTED
 
 
-VOID
-STDCALL
-NdisMFlushLog (
-       IN      NDIS_HANDLE     LogHandle
-       )
-{
+       return NULL;
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisMFreeMapRegisters (
-       IN      NDIS_HANDLE     MiniportAdapterHandle
-       )
+PLIST_ENTRY
+EXPORT
+NdisInterlockedRemoveHeadList(
+    IN  PLIST_ENTRY     ListHead,
+    IN  PNDIS_SPIN_LOCK SpinLock)
 {
 {
+    UNIMPLEMENTED
+
+       return NULL;
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMFreeSharedMemory (
-       IN      NDIS_HANDLE             MiniportAdapterHandle,
-       IN      ULONG                   Length,
-       IN      BOOLEAN                 Cached,
-       IN      PVOID                   VirtualAddress,
-       IN      NDIS_PHYSICAL_ADDRESS   PhysicalAddress
-       )
+EXPORT
+NdisMArcIndicateReceive(
+    IN  NDIS_HANDLE MiniportAdapterHandle,
+    IN  PUCHAR      HeaderBuffer,
+    IN  PUCHAR      DataBuffer,
+    IN  UINT        Length)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMIndicateStatus (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      NDIS_STATUS     GeneralStatus,
-       IN      PVOID           StatusBuffer,
-       IN      UINT            StatusBufferSize
-       )
+EXPORT
+NdisMArcIndicateReceiveComplete(
+    IN  NDIS_HANDLE MiniportAdapterHandle)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMIndicateStatusComplete (
-       IN      NDIS_HANDLE     MiniportAdapterHandle
-       )
+EXPORT
+NdisMCompleteBufferPhysicalMapping(
+    IN  NDIS_HANDLE     MiniportAdapterHandle,
+    IN  PNDIS_BUFFER    Buffer,
+    IN  ULONG           PhysicalMapRegister)
 {
 }
 
 
 VOID
 {
 }
 
 
 VOID
-STDCALL
-NdisMInitializeTimer (
-       IN OUT  PNDIS_MINIPORT_TIMER    Timer,
-       IN      NDIS_HANDLE             MiniportAdapterHandle,
-       IN      PNDIS_TIMER_FUNCTION    TimerFunction,
-       IN      PVOID                   FunctionContext
-       )
+EXPORT
+NdisMEthIndicateReceive (
+    IN  NDIS_HANDLE MiniportAdapterHandle,
+    IN  NDIS_HANDLE MiniportReceiveContext,
+    IN  PVOID       HeaderBuffer,
+    IN  UINT        HeaderBufferSize,
+    IN  PVOID       LookaheadBuffer,
+    IN  UINT        LookaheadBufferSize,
+    IN  UINT        PacketSize)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMInitializeWrapper (
-       OUT     PNDIS_HANDLE    NdisWrapperHandle,
-       IN      PVOID           SystemSpecific1,
-       IN      PVOID           SystemSpecific2,
-       IN      PVOID           SystemSpecific3
-       )
+EXPORT
+NdisMEthIndicateReceiveComplete(
+    IN  NDIS_HANDLE MiniportAdapterHandle)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-NDIS_STATUS
-STDCALL
-NdisMMapIoSpace (
-       OUT     PVOID                   * VirtualAddress,
-       IN      NDIS_HANDLE             MiniportAdapterHandle,
-       IN      NDIS_PHYSICAL_ADDRESS   PhysicalAddress,
-       IN      UINT                    Length
-       )
+VOID
+EXPORT
+NdisMFddiIndicateReceive(
+    IN  NDIS_HANDLE MiniportAdapterHandle,
+    IN  NDIS_HANDLE MiniportReceiveContext,
+    IN  PVOID       HeaderBuffer,
+    IN  UINT        HeaderBufferSize,
+    IN  PVOID       LookaheadBuffer,
+    IN  UINT        LookaheadBufferSize,
+    IN  UINT        PacketSize)
 {
 {
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMoveFromMappedMemory (
-       OUT     PVOID   Destination,
-       IN      PVOID   Source,
-       IN      ULONG   Length
-       )
+EXPORT
+NdisMFddiIndicateReceiveComplete(
+    IN  NDIS_HANDLE MiniportAdapterHandle)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMoveMappedMemory (
-       OUT     PVOID   Destination,
-       IN      PVOID   Source,
-       IN      ULONG   Length
-       )
+EXPORT
+NdisMStartBufferPhysicalMapping(
+    IN  NDIS_HANDLE                 MiniportAdapterHandle,
+    IN  PNDIS_BUFFER                Buffer,
+    IN  ULONG                       PhysicalMapRegister,
+    IN  BOOLEAN                     WriteToDevice,
+    OUT PNDIS_PHYSICAL_ADDRESS_UNIT    PhysicalAddressArray,
+    OUT PUINT                       ArraySize)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMoveMemory (
-       OUT     PVOID   Destination,
-       IN      PVOID   Source,
-       IN      ULONG   Length
-       )
+EXPORT
+NdisMTrIndicateReceive(
+    IN  NDIS_HANDLE MiniportAdapterHandle,
+    IN  NDIS_HANDLE MiniportReceiveContext,
+    IN  PVOID       HeaderBuffer,
+    IN  UINT        HeaderBufferSize,
+    IN  PVOID       LookaheadBuffer,
+    IN  UINT        LookaheadBufferSize,
+    IN  UINT        PacketSize)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMoveToMappedMemory (
-       OUT     PVOID   Destination,
-       IN      PVOID   Source,
-       IN      ULONG   Length
-       )
+EXPORT
+NdisMTrIndicateReceiveComplete(
+    IN  NDIS_HANDLE  MiniportAdapterHandle)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-NDIS_STATUS
-STDCALL
-NdisMPciAssignResources (
-       IN      NDIS_HANDLE             MiniportHandle,
-       IN      ULONG                   SlotNumber,
-       OUT     PNDIS_RESOURCE_LIST     * AssignedResources
-       )
+VOID
+EXPORT
+NdisMapFile(
+    OUT PNDIS_STATUS    Status,
+    OUT PVOID           * MappedBuffer,
+    IN  NDIS_HANDLE     FileHandle)
 {
 {
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMQueryAdapterResources (
-       OUT     PNDIS_STATUS            Status,
-       IN      NDIS_HANDLE             WrapperConfigurationContext,
-       OUT     PNDIS_RESOURCE_LIST     ResourceList,
-       IN OUT  PUINT                   BufferSize
-       )
+EXPORT
+NdisWriteConfiguration(
+    OUT PNDIS_STATUS                    Status,
+    IN  NDIS_HANDLE                     WrapperConfigurationContext,
+    IN  PNDIS_STRING                    Keyword,
+    IN  PNDIS_CONFIGURATION_PARAMETER   * ParameterValue)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMQueryInformationComplete (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      NDIS_STATUS     Status
-       )
+EXPORT
+NdisWriteErrorLogEntry(
+    IN  NDIS_HANDLE     NdisAdapterHandle,
+    IN  NDIS_ERROR_CODE ErrorCode,
+    IN  ULONG           NumberOfErrorValues,
+ /* IN  ULONG */        ...)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-ULONG
-STDCALL
-NdisMReadDmaCounter (
-       IN      NDIS_HANDLE     MiniportDmaHandle
-       )
+VOID
+EXPORT
+NdisCloseConfiguration(
+    IN  NDIS_HANDLE ConfigurationHandle)
 {
 {
-       return 0;
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMRegisterAdapterShutdownHandler (
-       IN      NDIS_HANDLE                     MiniportHandle,
-       IN      PVOID                           ShutdownContext,
-       IN      ADAPTER_SHUTDOWN_HANDLER        ShutdownHandler
-       )
+EXPORT
+NdisCloseFile(
+    IN  NDIS_HANDLE FileHandle)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 NDIS_STATUS
 }
 
 
 NDIS_STATUS
-STDCALL
-NdisMRegisterDmaChannel (
-       OUT     PNDIS_HANDLE            MiniportDmaHandle,
-       IN      NDIS_HANDLE             MiniportAdapterHandle,
-       IN      UINT                    DmaChannel,
-       IN      BOOLEAN                 Dma32BitAddresses,
-       IN      PNDIS_DMA_DESCRIPTION   DmaDescription,
-       IN      ULONG                   MaximumLength
-       )
+EXPORT
+NdisIMDeInitializeDeviceInstance(
+    IN  NDIS_HANDLE NdisMiniportHandle)
 {
 {
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
-
+    UNIMPLEMENTED
 
 
-NDIS_STATUS
-STDCALL
-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
-       )
-{
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
+       return NDIS_STATUS_FAILURE;
 }
 
 
 NDIS_STATUS
 }
 
 
 NDIS_STATUS
-STDCALL
-NdisMRegisterIoPortRange (
-       OUT     PVOID           * PortOffset,
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      UINT            InitialPort,
-       IN      UINT            NumberOfPorts
-       )
+EXPORT
+NdisIMInitializeDeviceInstance(
+    IN  NDIS_HANDLE     DriverHandle,
+    IN  PNDIS_STRING    DeviceInstance)
 {
 {
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
+    UNIMPLEMENTED
+
+       return NDIS_STATUS_FAILURE;
 }
 
 
 NDIS_STATUS
 }
 
 
 NDIS_STATUS
-STDCALL
-NdisMRegisterMiniport (
-       IN      NDIS_HANDLE                     NdisWrapperHandle,
-       IN      PNDIS_MINIPORT_CHARACTERISTICS  MiniportCharacteristics,
-       IN      UINT                            CharacteristicsLength
-       )
+EXPORT
+NdisIMRegisterLayeredMiniport(
+    IN  NDIS_HANDLE                     NdisWrapperHandle,
+    IN  PNDIS_MINIPORT_CHARACTERISTICS  MiniportCharacteristics,
+    IN  UINT                            CharacteristicsLength,
+    OUT PNDIS_HANDLE                    DriverHandle)
 {
 {
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
+    UNIMPLEMENTED
 
 
-
-VOID
-STDCALL
-NdisMResetComplete (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      NDIS_STATUS     Status,
-       IN      BOOLEAN         AddressingReset
-       )
-{
+       return NDIS_STATUS_FAILURE;
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMSendComplete (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      PNDIS_PACKET    Packet,
-       IN      NDIS_STATUS     Status
-       )
+EXPORT
+NdisMWanIndicateReceive(
+    OUT PNDIS_STATUS    Status,
+    IN  NDIS_HANDLE     MiniportAdapterHandle,
+    IN  NDIS_HANDLE     NdisLinkContext,
+    IN  PUCHAR          PacketBuffer,
+    IN  UINT            PacketSize)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMSendResourcesAvailable (
-       IN      NDIS_HANDLE     MiniportAdapterHandle
-       )
+EXPORT
+NdisMWanIndicateReceiveComplete(
+    IN  NDIS_HANDLE MiniportAdapterHandle)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMSetAttributes (
-       IN      NDIS_HANDLE             MiniportAdapterHandle,
-       IN      NDIS_HANDLE             MiniportAdapterContext,
-       IN      BOOLEAN                 BusMaster,
-       IN      NDIS_INTERFACE_TYPE     AdapterType
-       )
+EXPORT
+NdisMWanSendComplete(
+    IN  NDIS_HANDLE         MiniportAdapterHandle,
+    IN  PNDIS_WAN_PACKET    Packet,
+    IN  NDIS_STATUS         Status)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMSetAttributesEx (
-       IN      NDIS_HANDLE             MiniportAdapterHandle,
-       IN      NDIS_HANDLE             MiniportAdapterContext,
-       IN      UINT                    CheckForHangTimeInSeconds       OPTIONAL,
-       IN      ULONG                   AttributeFlags,
-       IN      NDIS_INTERFACE_TYPE     AdapterType
-       )
+EXPORT
+NdisOpenConfiguration(
+    OUT PNDIS_STATUS    Status,
+    OUT PNDIS_HANDLE    ConfigurationHandle,
+    IN  NDIS_HANDLE     WrapperConfigurationContext)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisMSetInformationComplete (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      NDIS_STATUS     Status
-       )
-{
-}
+/*
+NdisOpenConfigurationKeyByIndex
+NdisOpenConfigurationKeyByName
+*/
 
 
 VOID
 
 
 VOID
-STDCALL
-NdisMSetPeriodicTimer (
-       IN      PNDIS_MINIPORT_TIMER    Timer,
-       IN      UINT                    MillisecondsPeriod
-       )
+EXPORT
+NdisOpenFile(
+    OUT PNDIS_STATUS            Status,
+    OUT PNDIS_HANDLE            FileHandle,
+    OUT PUINT                   FileLength,
+    IN  PNDIS_STRING            FileName,
+    IN  NDIS_PHYSICAL_ADDRESS   HighestAcceptableAddress)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
+/*
+NdisOpenGlobalConfiguration
+*/
+
 VOID
 VOID
-STDCALL
-NdisMSetTimer (
-       IN      PNDIS_MINIPORT_TIMER    Timer,
-       IN      UINT                    MillisecondsToDelay
-       )
+EXPORT
+NdisOpenProtocolConfiguration(
+    OUT PNDIS_STATUS    Status,
+    OUT PNDIS_HANDLE    ConfigurationHandle,
+    IN  PNDIS_STRING    ProtocolSection)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMSetupDmaTransfer (
-       OUT     PNDIS_STATUS    Status,
-       IN      PNDIS_HANDLE    MiniportDmaHandle,
-       IN      PNDIS_BUFFER    Buffer,
-       IN      ULONG           Offset,
-       IN      ULONG           Length,
-       IN      BOOLEAN         WriteToDevice
-       )
+EXPORT
+NdisReadConfiguration(
+    OUT PNDIS_STATUS                    Status,
+    OUT PNDIS_CONFIGURATION_PARAMETER   * ParameterValue,
+    IN  NDIS_HANDLE                     ConfigurationHandle,
+    IN  PNDIS_STRING                    Keyword,
+    IN  NDIS_PARAMETER_TYPE             ParameterType)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMSleep (
-       IN      ULONG   MicrosecondsToSleep
-       )
+EXPORT
+NdisReadNetworkAddress(
+    OUT PNDIS_STATUS    Status,
+    OUT PVOID           * NetworkAddress,
+    OUT PUINT           NetworkAddressLength,
+    IN  NDIS_HANDLE     ConfigurationHandle)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
+#if 0
 VOID
 VOID
-STDCALL
-NdisMStartBufferPhysicalMapping (
-       IN      NDIS_HANDLE                     MiniportAdapterHandle,
-       IN      PNDIS_BUFFER                    Buffer,
-       IN      ULONG                           PhysicalMapRegister,
-       IN      BOOLEAN                         WriteToDevice,
-       OUT     PNDIS_PHYSICAL_ADDRESS_UNIT     PhysicalAddressArray,
-       OUT     PUINT                           ArraySize
-       )
+EXPORT
+NdisRegisterTdiCallBack(
+    IN  TDI_REGISTER_CALLBACK   RegsterCallback)
 {
 {
+    UNIMPLEMENTED
 }
 }
+#endif
 
 
 
 
-BOOLEAN
-STDCALL
-NdisMSynchronizeWithInterrupt (
-       IN      PNDIS_MINIPORT_INTERRUPT        Interrupt,
-       IN      PVOID                           SynchronizeFunction,
-       IN      PVOID                           SynchronizeContext
-       )
-{
-}
+/*
+NdisScheduleWorkItem
+*/
 
 
 
 
+#if 0
 VOID
 VOID
-STDCALL
-NdisMTrIndicateReceive (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      NDIS_HANDLE     MiniportReceiveContext,
-       IN      PVOID           HeaderBuffer,
-       IN      UINT            HeaderBufferSize,
-       IN      PVOID           LookaheadBuffer,
-       IN      UINT            LookaheadBufferSize,
-        IN     UINT            PacketSize
-       )
+EXPORT
+NdisSetProtocolFilter(
+    OUT PNDIS_STATUS            Status,
+    IN  NDIS_HANDLE             NdisBindingHandle,
+    IN  RECEIVE_HANDLER         ReceiveHandler,
+    IN  RECEIVE_PACKET_HANDLER  ReceivePacketHandler,
+    IN  NDIS_MEDIUM             Medium,
+    IN  UINT                    Offset,
+    IN  UINT                    Size,
+    IN  PUCHAR                  Pattern)
 {
 {
+    UNIMPLEMENTED
 }
 }
+#endif
 
 
 
 
-VOID
-STDCALL
-NdisMTrIndicateReceiveComplete (
-       IN      NDIS_HANDLE     MiniportAdapterHandle
-       )
+CCHAR
+EXPORT
+NdisSystemProcessorCount(
+    VOID)
 {
 {
+       return (CCHAR)1;
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMTransferDataComplete (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      PNDIS_PACKET    Packet,
-       IN      NDIS_STATUS     Status,
-       IN      UINT            BytesTransferred
-       )
+EXPORT
+NdisUnmapFile(
+    IN  NDIS_HANDLE FileHandle)
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisMUnmapIoSpace (
-       IN      NDIS_HANDLE     MiniportAdapterHandle,
-       IN      PVOID           VirtualAddress,
-       IN      UINT            Length
-       )
-{
-}
+/*
+NdisUpcaseUnicodeString
+NdisUpdateSharedMemory@4
+*/
 
 
 
 
-VOID
-STDCALL
-NdisMUpdateSharedMemory (
-       IN      NDIS_HANDLE             MiniportAdapterHandle,
-       IN      ULONG                   Length,
-       IN      PVOID                   VirtualAddress,
-       IN      NDIS_PHYSICAL_ADDRESS   PhysicalAddress
-       )
-{
-}
+/*
+NdisWriteEventLogEntry
+*/
 
 
 
 
-NDIS_STATUS
-STDCALL
-NdisMWriteLogData (
-       IN      NDIS_HANDLE     LogHandle,
-       IN      PVOID           LogBuffer,
-       IN      UINT            LogBufferSize
-       )
-{
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
 
 
+/* NDIS 5.0 extensions */
 
 VOID
 
 VOID
-STDCALL
-NdisMapFile (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PVOID           * MappedBuffer,
-       IN      NDIS_HANDLE     FileHandle
-       )
+EXPORT
+NdisCompletePnPEvent(
+    IN  NDIS_STATUS     Status,
+    IN  NDIS_HANDLE     NdisBindingHandle,
+    IN  PNET_PNP_EVENT  NetPnPEvent)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisMapIoSpace (
-       OUT     PNDIS_STATUS            Status,
-       OUT     PVOID                   * VirtualAddress,
-       IN      NDIS_HANDLE             NdisAdapterHandle,
-       IN      NDIS_PHYSICAL_ADDRESS   PhysicalAddress,
-       IN      UINT                    Length
-       )
+EXPORT
+NdisConvertStringToAtmAddress(
+    OUT PNDIS_STATUS    Status,
+    IN  PNDIS_STRING    String,
+    OUT PATM_ADDRESS    AtmAddress)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-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
-       )
+EXPORT
+NdisGetCurrentProcessorCounts(
+    OUT PULONG  pIdleCount,
+    OUT PULONG  pKernelAndUser,
+    OUT PULONG  pIndex)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisOpenConfiguration (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PNDIS_HANDLE    ConfigurationHandle,
-       IN      NDIS_HANDLE     WrapperConfigurationContext
-       )
+EXPORT
+NdisGetDriverHandle(
+    IN  PNDIS_HANDLE    NdisBindingHandle,
+    OUT PNDIS_HANDLE    NdisDriverHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
+PNDIS_PACKET
+EXPORT
+NdisGetReceivedPacket(
+    IN  PNDIS_HANDLE    NdisBindingHandle,
+    IN  PNDIS_HANDLE    MacContext)
 /*
 /*
-NdisOpenConfigurationKeyByIndex
-NdisOpenConfigurationKeyByName
-*/
-
-
-VOID
-STDCALL
-NdisOpenFile (
-       OUT     PNDIS_STATUS            Status,
-       OUT     PNDIS_HANDLE            FileHandle,
-       OUT     PUINT                   FileLength,
-       IN      PNDIS_STRING            FileName,
-       IN      NDIS_PHYSICAL_ADDRESS   HighestAcceptableAddress
-       )
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-}
+    UNIMPLEMENTED
 
 
+    return NULL;
+}
 
 
-/*
-NdisOpenGlobalConfiguration
-*/
 
 VOID
 
 VOID
-STDCALL
-NdisOpenProtocolConfiguration (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PNDIS_HANDLE    ConfigurationHandle,
-       IN      PNDIS_STRING    ProtocolSection
-       )
+EXPORT
+NdisGetSystemUptime(
+    OUT PULONG  pSystemUpTime)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisOverrideBusNumber (
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      NDIS_HANDLE     MiniportAdapterHandle           OPTIONAL,
-       IN      ULONG           BusNumber
-       )
+EXPORT
+NdisInitializeReadWriteLock(
+    IN  PNDIS_RW_LOCK   Lock)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-NDIS_STATUS
-STDCALL
-NdisPciAssignResources (
-       IN      NDIS_HANDLE     NdisMacHandle,
-       IN      NDIS_HANDLE     NdisWrapperHandle,
-       IN      NDIS_HANDLE     WrapperConfigurationContext,
-       IN      ULONG           SlotNumber,
-       OUT PNDIS_RESOURCE_LIST * AssignedResources
-       )
+LONG
+EXPORT
+NdisInterlockedDecrement(
+    IN  PLONG   Addend)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
+    UNIMPLEMENTED
+
+    return 0;
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisQueryBuffer (
-       IN      PNDIS_BUFFER    Buffer,
-       OUT     PVOID           * VirtualAddress        OPTIONAL,
-       OUT     PUINT           Length
-       )
+LONG
+EXPORT
+NdisInterlockedIncrement(
+    IN  PLONG   Addend)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
+
+    return 0;
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisQueryBufferOffset (
-       IN      PNDIS_BUFFER    Buffer,
-       OUT     PUINT           Offset,
-       OUT     PUINT           Length
-       )
+PSINGLE_LIST_ENTRY 
+EXPORT
+NdisInterlockedPopEntrySList(
+    IN  PSLIST_HEADER   ListHead,
+    IN  PKSPIN_LOCK     Lock)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
+
+    return NULL;
 }
 
 
 }
 
 
-NDIS_STATUS
-STDCALL
-NdisQueryMapRegisterCount (
-       IN      NDIS_INTERFACE_TYPE     BusType,
-       OUT     PUINT                   MapRegisterCount
-       )
+PSINGLE_LIST_ENTRY 
+EXPORT
+NdisInterlockedPushEntrySList(
+    IN  PSLIST_HEADER       ListHead,
+    IN  PSINGLE_LIST_ENTRY  ListEntry,
+    IN  PKSPIN_LOCK         Lock)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
+    UNIMPLEMENTED
+
+    return NULL;
 }
 
 
 NDIS_STATUS
 }
 
 
 NDIS_STATUS
-STDCALL
-NdisQueryReceiveInformation (
-       IN      NDIS_HANDLE     NdisBindingHandle,
-       IN      NDIS_HANDLE     MacContext,
-       OUT     PLONGLONG       TimeSent                OPTIONAL,
-       OUT     PLONGLONG       TimeReceived            OPTIONAL,
-       IN      PUCHAR          Buffer,
-       IN      UINT            BufferSize,
-       OUT     PUINT           SizeNeeded
-       )
+EXPORT
+NdisMDeregisterDevice(
+    IN  NDIS_HANDLE NdisDeviceHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
-
+    UNIMPLEMENTED
 
 
-VOID
-STDCALL
-NdisReadBindingInformation (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PNDIS_STRING    * Binding,
-       IN      NDIS_HANDLE     ConfigurationHandle
-       )
-{
+    return NDIS_STATUS_FAILURE;
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisReadConfiguration (
-       OUT     PNDIS_STATUS                    Status,
-       OUT     PNDIS_CONFIGURATION_PARAMETER   * ParameterValue,
-       IN      NDIS_HANDLE                     ConfigurationHandle,
-       IN      PNDIS_STRING                    Keyword,
-       IN      NDIS_PARAMETER_TYPE             ParameterType
-       )
+EXPORT
+NdisMGetDeviceProperty(
+    IN      NDIS_HANDLE         MiniportAdapterHandle,
+    IN OUT  PDEVICE_OBJECT      *PhysicalDeviceObject           OPTIONAL,
+    IN OUT  PDEVICE_OBJECT      *FunctionalDeviceObject         OPTIONAL,
+    IN OUT  PDEVICE_OBJECT      *NextDeviceObject               OPTIONAL,
+    IN OUT  PCM_RESOURCE_LIST   *AllocatedResources             OPTIONAL,
+    IN OUT  PCM_RESOURCE_LIST   *AllocatedResourcesTranslated   OPTIONAL)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisReadEisaSlotInformation (
-       OUT     PNDIS_STATUS                    Status,
-       IN      NDIS_HANDLE                     WrapperConfigurationContext,
-       OUT     PUINT                           SlotNumber,
-       OUT     PNDIS_EISA_FUNCTION_INFORMATION EisaData
-       )
+NDIS_STATUS
+EXPORT
+NdisMInitializeScatterGatherDma(
+    IN  NDIS_HANDLE MiniportAdapterHandle,
+    IN  BOOLEAN     Dma64BitAddresses,
+    IN  ULONG       MaximumPhysicalMapping)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-}
-
+    UNIMPLEMENTED
 
 
-VOID
-STDCALL
-NdisReadEisaSlotInformationEx (
-       OUT     PNDIS_STATUS                    Status,
-       IN      NDIS_HANDLE                     WrapperConfigurationContext,
-       OUT     PUINT                           SlotNumber,
-       OUT     PNDIS_EISA_FUNCTION_INFORMATION * EisaData,
-       OUT     PUINT                           NumberOfFunctions
-       )
-{
+    return NDIS_STATUS_FAILURE;
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisReadMcaPosInformation (
-       OUT     PNDIS_STATUS            Status,
-       IN      NDIS_HANDLE             WrapperConfigurationContext,
-       IN      PUINT                   ChannelNumber,
-       OUT     PNDIS_MCA_POS_DATA      McaData
-       )
+NDIS_STATUS
+EXPORT
+NdisMPromoteMiniport(
+    IN  NDIS_HANDLE MiniportAdapterHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-}
-
+    UNIMPLEMENTED
 
 
-VOID
-STDCALL
-NdisReadNetworkAddress (
-       OUT     PNDIS_STATUS    Status,
-       OUT     PVOID           * NetworkAddress,
-       OUT     PUINT           NetworkAddressLength,
-       IN      NDIS_HANDLE     ConfigurationHandle
-       )
-{
+    return NDIS_STATUS_FAILURE;
 }
 
 
 }
 
 
-ULONG
-STDCALL
-NdisReadPciSlotInformation (
-       IN      NDIS_HANDLE     NdisAdapterHandle,
-       IN      ULONG           SlotNumber,
-       IN      ULONG           Offset,
-       IN      PVOID           Buffer,
-       IN      ULONG           Length
-       )
+NDIS_STATUS
+EXPORT
+NdisMQueryAdapterInstanceName(
+    OUT PNDIS_STRING    AdapterInstanceName,
+    IN  NDIS_HANDLE     MiniportAdapterHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-       return 0;
+    UNIMPLEMENTED
+
+    return NDIS_STATUS_FAILURE;
 }
 
 
 NDIS_STATUS
 }
 
 
 NDIS_STATUS
-STDCALL
-NdisRegisterAdapter(
-       OUT PNDIS_HANDLE                        NdisAdapterHandle,
-       IN      NDIS_HANDLE                             NdisMacHandle,
-       IN      NDIS_HANDLE                             MacAdapterContext,
-       IN      NDIS_HANDLE                             WrapperConfigurationContext,
-       IN      PNDIS_STRING                    AdapterName,
-       IN      PVOID                                   AdapterInformation
-       )
+EXPORT
+NdisMRegisterDevice(
+    IN  NDIS_HANDLE         NdisWrapperHandle,
+    IN  PNDIS_STRING        DeviceName,
+    IN  PNDIS_STRING        SymbolicName,
+    IN  PDRIVER_DISPATCH    MajorFunctions[],
+    OUT PDEVICE_OBJECT      *pDeviceObject,
+    OUT NDIS_HANDLE         *NdisDeviceHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
-}
+    UNIMPLEMENTED
 
 
-
-VOID
-STDCALL
-NdisRegisterAdapterShutdownHandler (
-       IN      NDIS_HANDLE                     NdisAdapterHandle,
-       IN      PVOID                           ShutdownContext,
-       IN      ADAPTER_SHUTDOWN_HANDLER        ShutdownHandler
-       )
-{
+    return NDIS_STATUS_FAILURE;
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-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
-       )
+EXPORT
+NdisMRegisterUnloadHandler(
+    IN  NDIS_HANDLE     NdisWrapperHandle,
+    IN  PDRIVER_UNLOAD  UnloadHandler)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisRegisterProtocol (
-       OUT     PNDIS_STATUS                    Status,
-       OUT     PNDIS_HANDLE                    NdisProtocolHandle,
-       IN      PNDIS_PROTOCOL_CHARACTERISTICS  ProtocolCharacteristics,
-       IN      UINT                            CharacteristicsLength
-       )
+NDIS_STATUS
+EXPORT
+NdisMRemoveMiniport(
+    IN  NDIS_HANDLE MiniportAdapterHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-}
+    UNIMPLEMENTED
 
 
-
-VOID
-STDCALL
-NdisRegisterTdiCallBack (
-       IN      TDI_REGISTER_CALLBACK   RegsterCallback
-       )
-{
+    return NDIS_STATUS_FAILURE;
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisReleaseAdapterResources (
-       IN      NDIS_HANDLE     NdisAdapterHandle
-       )
+NDIS_STATUS
+EXPORT
+NdisMSetMiniportSecondary(
+    IN  NDIS_HANDLE MiniportAdapterHandle,
+    IN  NDIS_HANDLE PrimaryMiniportAdapterHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-}
+    UNIMPLEMENTED
 
 
-
-VOID
-STDCALL
-NdisReleaseSpinLock (
-       IN      PNDIS_SPIN_LOCK SpinLock
-       )
-{
+    return NDIS_STATUS_FAILURE;
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisRemoveInterrupt(
-       IN      PNDIS_INTERRUPT Interrupt
-       )
+EXPORT
+NdisOpenConfigurationKeyByIndex(
+    OUT PNDIS_STATUS    Status,
+    IN  NDIS_HANDLE     ConfigurationHandle,
+    IN  ULONG           Index,
+    OUT PNDIS_STRING    KeyName,
+    OUT PNDIS_HANDLE    KeyHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-NdisRequest (
-       OUT     PNDIS_STATUS    Status,
-       IN      NDIS_HANDLE     NdisBindingHandle,
-       IN      PNDIS_REQUEST   NdisRequest
-       )
+EXPORT
+NdisOpenConfigurationKeyByName(
+    OUT PNDIS_STATUS    Status,
+    IN  NDIS_HANDLE     ConfigurationHandle,
+    IN  PNDIS_STRING    SubKeyName,
+    OUT PNDIS_HANDLE    SubKeyHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-VOID
-NdisReset(
-       OUT     PNDIS_STATUS    Status,
-       IN      NDIS_HANDLE     NdisBindingHandle
-       )
+NDIS_STATUS
+EXPORT
+NdisQueryAdapterInstanceName(
+    OUT PNDIS_STRING    AdapterInstanceName,
+    IN  NDIS_HANDLE     NdisBindingHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-}
+    UNIMPLEMENTED
 
 
-
-VOID
-STDCALL
-NdisResetEvent (
-       IN      PNDIS_EVENT     Event
-       )
-{
+    return NDIS_STATUS_FAILURE;
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisReturnPackets (
-       IN      PNDIS_PACKET    * PacketsToReturn,
-       IN      UINT            NumberOfPackets
-       )
-{
-}
-
+EXPORT
+NdisQueryBufferSafe(
+    IN  PNDIS_BUFFER    Buffer,
+    OUT PVOID           *VirtualAddress OPTIONAL,
+    OUT PUINT           Length,
+    IN  UINT            Priority)
 /*
 /*
-NdisScheduleWorkItem
-*/
-
-VOID
-NdisSend(
-       OUT     PNDIS_STATUS    Status,
-       IN      NDIS_HANDLE     NdisBindingHandle,
-       IN      PNDIS_PACKET    Packet
-       )
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-VOID
-NdisSendPackets(
-       IN      NDIS_HANDLE     NdisBindingHandle,
-       IN      PPNDIS_PACKET   PacketArray,
-       IN      UINT            NumberOfPackets
-       )
+ULONG
+EXPORT
+NdisReadPcmciaAttributeMemory(
+    IN  NDIS_HANDLE NdisAdapterHandle,
+    IN  ULONG       Offset,
+    IN  PVOID       Buffer,
+    IN  ULONG       Length)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-}
+    UNIMPLEMENTED
 
 
-
-VOID
-STDCALL
-NdisSetEvent (
-       IN      PNDIS_EVENT     Event
-       )
-{
+    return 0;
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisSetProtocolFilter (
-       OUT     PNDIS_STATUS            Status,
-       IN      NDIS_HANDLE             NdisBindingHandle,
-       IN      RECEIVE_HANDLER         ReceiveHandler,
-       IN      RECEIVE_PACKET_HANDLER  ReceivePacketHandler,
-       IN      NDIS_MEDIUM             Medium,
-       IN      UINT                    Offset,
-       IN      UINT                    Size,
-       IN      PUCHAR                  Pattern
-       )
+EXPORT
+NdisReleaseReadWriteLock(
+    IN  PNDIS_RW_LOCK   Lock,
+    IN  PLOCK_STATE     LockState)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisSetTimer (
-       IN      PNDIS_TIMER     Timer,
-       IN      UINT            MillisecondsToDelay
-       )
+NDIS_STATUS
+EXPORT
+NdisWriteEventLogEntry(
+    IN  PVOID       LogHandle,
+    IN  NDIS_STATUS EventCode,
+    IN  ULONG       UniqueEventValue,
+    IN  USHORT      NumStrings,
+    IN  PVOID       StringsList OPTIONAL,
+    IN  ULONG       DataSize,
+    IN  PVOID       Data        OPTIONAL)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-}
+    UNIMPLEMENTED
 
 
-
-VOID
-STDCALL
-NdisSetupDmaTransfer (
-       OUT     PNDIS_STATUS    Status,
-       IN      PNDIS_HANDLE    NdisDmaHandle,
-       IN      PNDIS_BUFFER    Buffer,
-       IN      ULONG           Offset,
-       IN      ULONG           Length,
-       IN      BOOLEAN         WriteToDevice
-       )
-{
+    return NDIS_STATUS_FAILURE;
 }
 
 
 }
 
 
-CCHAR
-STDCALL
-NdisSystemProcessorCount(
-       VOID
-       )
+ULONG
+EXPORT
+NdisWritePcmciaAttributeMemory(
+    IN  NDIS_HANDLE NdisAdapterHandle,
+    IN  ULONG       Offset,
+    IN  PVOID       Buffer,
+    IN  ULONG       Length)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-       return (CCHAR) 1; /* ? */
-}
-
+    UNIMPLEMENTED
 
 
-VOID
-STDCALL
-NdisTerminateWrapper (
-       IN      NDIS_HANDLE     NdisWrapperHandle,
-       IN      PVOID           SystemSpecific
-       )
-{
+    return 0;
 }
 
 
 }
 
 
+/* NDIS 5.0 extensions for intermediate drivers */
+
 VOID
 VOID
-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
-       )
+EXPORT
+NdisIMAssociateMiniport(
+    IN  NDIS_HANDLE DriverHandle,
+    IN  NDIS_HANDLE ProtocolHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisUnchainBufferAtBack (
-       IN OUT  PNDIS_PACKET    Packet,
-       OUT     PNDIS_BUFFER    * Buffer
-       )
+NDIS_STATUS 
+EXPORT
+NdisIMCancelInitializeDeviceInstance(
+    IN  NDIS_HANDLE     DriverHandle,
+    IN  PNDIS_STRING    DeviceInstance)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
+
+    return NDIS_STATUS_FAILURE;
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisUnchainBufferAtFront (
-       IN OUT  PNDIS_PACKET    Packet,
-        OUT    PNDIS_BUFFER    * Buffer
-       )
+EXPORT
+NdisIMCopySendCompletePerPacketInfo(
+    IN  PNDIS_PACKET    DstPacket,
+    IN  PNDIS_PACKET    SrcPacket)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
-NDIS_STATUS
-STDCALL
-NdisUnicodeStringToAnsiString (
-       IN      OUT PNDIS_ANSI_STRING   DestinationString,
-       IN      PNDIS_STRING            SourceString
-        )
+VOID
+EXPORT
+NdisIMCopySendPerPacketInfo(
+    IN  PNDIS_PACKET    DstPacket,
+    IN  PNDIS_PACKET    SrcPacket)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-       return (NDIS_STATUS) STATUS_NOT_IMPLEMENTED;
+    UNIMPLEMENTED
 }
 
 
 VOID
 }
 
 
 VOID
-STDCALL
-NdisUnmapFile (
-       IN      NDIS_HANDLE     FileHandle
-        )
+EXPORT
+NdisIMDeregisterLayeredMiniport(
+    IN  NDIS_HANDLE DriverHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
 }
 
 
 }
 
 
+NDIS_HANDLE
+EXPORT
+NdisIMGetBindingContext(
+    IN  NDIS_HANDLE NdisBindingHandle)
 /*
 /*
-NdisUpcaseUnicodeString
-NdisUpdateSharedMemory@4
-*/
-
-
-BOOLEAN
-STDCALL
-NdisWaitEvent (
-       IN      PNDIS_EVENT     Event,
-       IN      UINT            MsToWait
-       )
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-       return FALSE;
-}
+    UNIMPLEMENTED
 
 
-
-VOID
-STDCALL
-NdisWriteConfiguration (
-       OUT     PNDIS_STATUS                    Status,
-       IN      NDIS_HANDLE                     WrapperConfigurationContext,
-       IN      PNDIS_STRING                    Keyword,
-       IN      PNDIS_CONFIGURATION_PARAMETER   * ParameterValue
-       )
-{
+    return (NDIS_HANDLE)NULL;
 }
 
 
 }
 
 
-VOID
-STDCALL
-NdisWriteErrorLogEntry (
-       IN      NDIS_HANDLE     NdisAdapterHandle,
-       IN      NDIS_ERROR_CODE ErrorCode,
-       IN      ULONG           NumberOfErrorValues,
-       IN      ULONG           ...
-       )
+NDIS_HANDLE
+EXPORT
+NdisIMGetDeviceContext(
+    IN  NDIS_HANDLE MiniportAdapterHandle)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
+    UNIMPLEMENTED
+
+    return (NDIS_HANDLE)NULL;
 }
 
 
 }
 
 
+NDIS_STATUS
+EXPORT
+NdisIMInitializeDeviceInstanceEx(
+    IN  NDIS_HANDLE     DriverHandle,
+    IN  PNDIS_STRING    DriverInstance,
+    IN  NDIS_HANDLE     DeviceContext   OPTIONAL)
 /*
 /*
-NdisWriteEventLogEntry
-*/
-
-
-ULONG
-STDCALL
-NdisWritePciSlotInformation (
-       IN      NDIS_HANDLE     NdisAdapterHandle,
-       IN      ULONG           SlotNumber,
-       IN      ULONG           Offset,
-       IN      PVOID           Buffer,
-       IN      ULONG           Length
-       )
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ *    NDIS 5.0
+ */
 {
 {
-       return 0;
-}
+    UNIMPLEMENTED
 
 
+    return NDIS_STATUS_FAILURE;
+}
 
 /* EOF */
 
 /* EOF */
diff --git a/reactos/drivers/net/tcpip/tcpip/Copy of info.c b/reactos/drivers/net/tcpip/tcpip/Copy of info.c
deleted file mode 100644 (file)
index c5fbdc3..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS TCP/IP protocol driver
- * FILE:        tcpip/info.c
- * PURPOSE:     TDI query and set information routines
- * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
- * REVISIONS:
- *   CSH 01/07-2000 Created
- */
-#include <tcpip.h>
-#include <routines.h>
-#include <info.h>
-
-
-TDI_STATUS IPTdiQueryInformationEx(
-    PTDI_REQUEST Request,
-    TDIObjectID *ID,
-    PNDIS_BUFFER Buffer,
-    PUINT BufferSize,
-    PVOID Context)
-/*
- * FUNCTION: Returns extended information about network layer
- * ARGUMENTS:
- *     Request    = Pointer to TDI request structure for the request
- *     ID         = TDI object ID
- *     Buffer     = Pointer to buffer with data to use. 
- *     BufferSize = Pointer to buffer with size of Buffer. On return
- *                  this is filled with number of bytes returned
- *     Context    = Pointer to context buffer
- * RETURNS:
- *     Status of operation
- */
-{
-    IPADDR_ENTRY IpAddress;
-    IPSNMP_INFO SnmpInfo;
-    PADDRESS_ENTRY ADE;
-    PIP_INTERFACE IF;
-    ULONG Temp;
-    UINT Count;
-    ULONG Entity;
-    KIRQL OldIrql;
-    UINT BufSize = *BufferSize;
-
-    /* Make return parameters consistent every time */
-    *BufferSize = 0;
-
-    Entity = ID->toi_entity.tei_entity;
-    if (Entity != CL_NL_ENTITY) {
-        /* We can't handle this entity */
-        return TDI_INVALID_PARAMETER;
-    }
-
-    if (ID->toi_entity.tei_instance != TL_INSTANCE)
-        /* We only support a single instance */
-        return TDI_INVALID_REQUEST;
-    if (ID->toi_class == INFO_CLASS_GENERIC) {
-        if (ID->toi_type == INFO_TYPE_PROVIDER && 
-            ID->toi_id == ENTITY_TYPE_ID) {
-
-            if (BufSize < sizeof(ULONG))
-                return TDI_BUFFER_TOO_SMALL;
-            Temp = CL_NL_IP;
-
-            Count = CopyBufferToBufferChain(Buffer, 0, (PUCHAR)&Temp, sizeof(ULONG));
-
-            return TDI_SUCCESS;
-        }
-        return TDI_INVALID_PARAMETER;
-    }
-
-    if (ID->toi_class == INFO_CLASS_PROTOCOL) {
-        if (ID->toi_type != INFO_TYPE_PROVIDER)
-            return TDI_INVALID_PARAMETER;
-
-        switch (ID->toi_id) {
-        case IP_MIB_ADDRTABLE_ENTRY_ID:
-            Temp = 0;
-
-            KeAcquireSpinLock(&InterfaceLock, &OldIrql);
-/*
-    /* Search the interface list */
-    CurrentIFEntry = InterfaceListHead.Flink;
-    while (CurrentIFEntry != &InterfaceListHead) {
-           CurrentIF = CONTAINING_RECORD(CurrentIFEntry, IP_INTERFACE, ListEntry);
-        if (CurrentIF != Loopback) {
-            /* Search the address entry list and return the first appropriate ADE found */
-            CurrentADEEntry = CurrentIF->ADEListHead.Flink;
-            while (CurrentADEEntry != &CurrentIF->ADEListHead) {
-                   CurrentADE = CONTAINING_RECORD(CurrentADEEntry, ADDRESS_ENTRY, ListEntry);
-                if (CurrentADE->Type == AddressType)
-                    ReferenceAddress(CurrentADE->Address);
-                    KeReleaseSpinLock(&InterfaceListLock, OldIrql);
-                    return CurrentADE;
-                }
-                CurrentADEEntry = CurrentADEEntry->Flink;
-        } else
-            LoopbackIsRegistered = TRUE;
-        CurrentIFEntry = CurrentIFEntry->Flink;
-    }
-
-
-            */
-            for (IF = InterfaceList; IF != NULL; IF = IF->Next) {
-                if (Temp + sizeof(IPADDR_ENTRY) > BufSize) {
-                    KeReleaseSpinLock(&InterfaceLock, OldIrql);
-                    return TDI_BUFFER_TOO_SMALL;
-                }
-
-                IpAddress.Addr      = 0;
-                IpAddress.BcastAddr = 0;
-                IpAddress.Mask      = 0;
-                /* Locate the diffrent addresses and put them the right place */
-                for (ADE = IF->ADE; ADE != NULL; ADE = ADE->Next) {
-                    switch (ADE->Type) {
-                    case ADE_UNICAST  : IpAddress.Addr      = ADE->Address->Address.IPv4Address;
-                    case ADE_MULTICAST: IpAddress.BcastAddr = ADE->Address->Address.IPv4Address;
-                    case ADE_ADDRMASK : IpAddress.Mask      = ADE->Address->Address.IPv4Address;
-                    }
-                }
-                /* Pack the address information into IPADDR_ENTRY structure */
-                IpAddress.Index     = 0;
-                IpAddress.ReasmSize = 0;
-                IpAddress.Context   = 0;
-                IpAddress.Pad       = 0;
-
-                Count = CopyBufferToBufferChain(Buffer, Temp, (PUCHAR)&IpAddress, sizeof(IPADDR_ENTRY));
-
-                Temp += sizeof(IPADDR_ENTRY);
-            }
-            KeReleaseSpinLock(&InterfaceLock, OldIrql);
-            return TDI_SUCCESS;
-
-        case IP_MIB_STATS_ID:
-            if (BufSize < sizeof(IPSNMP_INFO))
-                return TDI_BUFFER_TOO_SMALL;
-
-            RtlZeroMemory(&SnmpInfo, sizeof(IPSNMP_INFO));
-
-            /* Count number of addresses */
-            Count = 0;
-            KeAcquireSpinLock(&InterfaceLock, &OldIrql);
-            for (IF = InterfaceList; IF != NULL; IF = IF->Next)
-                Count++;
-            KeReleaseSpinLock(&InterfaceLock, OldIrql);
-
-            SnmpInfo.NumAddr = Count;
-
-            Count = CopyBufferToBufferChain(Buffer, 0, (PUCHAR)&SnmpInfo, sizeof(IPSNMP_INFO));
-
-            return TDI_SUCCESS;
-
-        default:
-            /* We can't handle this ID */
-            return TDI_INVALID_PARAMETER;
-        }
-    }
-
-    return TDI_INVALID_PARAMETER;
-}
-
-
-TDI_STATUS InfoTdiQueryInformationEx(
-    PTDI_REQUEST Request,
-    TDIObjectID *ID,
-    PNDIS_BUFFER Buffer,
-    PUINT BufferSize,
-    PVOID Context)
-/*
- * FUNCTION: Returns extended information
- * ARGUMENTS:
- *     Request    = Pointer to TDI request structure for the request
- *     ID         = TDI object ID
- *     Buffer     = Pointer to buffer with data to use
- *     BufferSize = Pointer to buffer with size of Buffer. On return
- *                  this is filled with number of bytes returned
- *     Context    = Pointer to context buffer
- * RETURNS:
- *     Status of operation
- */
-{
-    PADDRESS_FILE AddrFile;
-    PADDRESS_ENTRY ADE;
-    ADDRESS_INFO Info;
-    KIRQL OldIrql;
-    UINT Entity;
-    UINT Count;
-    UINT Size;
-    ULONG Temp;
-    UINT Offset = 0;
-    UINT BufSize = *BufferSize;
-
-    /* Check wether it is a query for a list of entities */
-    Entity = ID->toi_entity.tei_entity;
-    if (Entity == GENERIC_ENTITY) {
-        if (ID->toi_class  != INFO_CLASS_GENERIC ||
-            ID->toi_type != INFO_TYPE_PROVIDER ||
-            ID->toi_id != ENTITY_LIST_ID)
-            return TDI_INVALID_PARAMETER;
-
-        *BufferSize = 0;
-
-        Size = EntityCount * sizeof(TDIEntityID);
-        if (BufSize < Size)
-            /* The buffer is too small to contain requested data */
-            return TDI_BUFFER_TOO_SMALL;
-
-        /* Return entity list */
-        Count = CopyBufferToBufferChain(Buffer, 0, (PUCHAR)EntityList, Size);
-
-        *BufferSize = Size;
-
-        return TDI_SUCCESS;
-    }
-
-    if ((Entity != CL_TL_ENTITY) && (Entity != CO_TL_ENTITY)) {
-        /* We can't handle this entity, pass it on */
-        return IPTdiQueryInformationEx(
-            Request, ID, Buffer, BufferSize, Context);
-    }
-
-    /* Make return parameters consistent every time */
-    *BufferSize = 0;
-
-    if (ID->toi_entity.tei_instance != TL_INSTANCE)
-        /* We only support a single instance */
-        return TDI_INVALID_REQUEST;
-
-    if (ID->toi_class == INFO_CLASS_GENERIC) {
-
-        if (ID->toi_type != INFO_TYPE_PROVIDER ||
-            ID->toi_id != ENTITY_TYPE_ID)
-            return TDI_INVALID_PARAMETER;
-
-        if (BufSize < sizeof(ULONG))
-            return TDI_BUFFER_TOO_SMALL;
-
-        if (Entity == CL_TL_ENTITY)
-            Temp = CL_TL_UDP;
-        else if (Entity == CO_TL_ENTITY)
-            Temp = CO_TL_TCP;
-        else
-            return TDI_INVALID_PARAMETER;
-
-        Count = CopyBufferToBufferChain(Buffer, 0, (PUCHAR)&Temp, sizeof(ULONG));
-
-        return TDI_SUCCESS;
-    }
-
-    if (ID->toi_class == INFO_CLASS_PROTOCOL) {
-
-        if (ID->toi_type != INFO_TYPE_PROVIDER)
-            return TDI_INVALID_PARAMETER;
-
-        switch (ID->toi_id) {
-        case UDP_MIB_STAT_ID:
-            if (Entity != CL_TL_ENTITY)
-                return TDI_INVALID_PARAMETER;
-
-            if (BufSize < sizeof(UDPStats))
-                return TDI_BUFFER_TOO_SMALL;
-
-            Count = CopyBufferToBufferChain(Buffer, 0, (PUCHAR)&UDPStats, sizeof(UDP_STATISTICS));
-
-            return TDI_SUCCESS;
-
-        case UDP_MIB_TABLE_ID:
-            if (Entity != CL_TL_ENTITY)
-                return TDI_INVALID_PARAMETER;
-
-            Offset = 0;
-
-            KeAcquireSpinLock(&AddressFileLock, &OldIrql);
-
-            for (AddrFile = AddressFileList;
-                AddrFile->Next != NULL;
-                AddrFile = AddrFile->Next) {
-
-                if (Offset + sizeof(ADDRESS_INFO) > BufSize) {
-                    KeReleaseSpinLock(&AddressFileLock, OldIrql);
-                    *BufferSize = Offset;
-                    return TDI_BUFFER_OVERFLOW;
-                }
-
-                for (ADE = AddrFile->ADE; ADE != NULL; ADE = ADE->Next) {
-                    /* We only care about IPv4 unicast address */
-                    if ((ADE->Type == ADE_UNICAST) &&
-                        (ADE->Address->Type == IP_ADDRESS_V4))
-                        Info.LocalAddress = ADE->Address->Address.IPv4Address;
-                }
-
-                Info.LocalPort = AddrFile->Port;
-
-                Count = CopyBufferToBufferChain(Buffer, Offset, (PUCHAR)&Info, sizeof(ADDRESS_INFO));
-
-                Offset += Count;
-            }
-
-            KeReleaseSpinLock(&AddressFileLock, OldIrql);
-
-            *BufferSize = Offset;
-
-            return STATUS_SUCCESS;
-
-        default:
-            /* We can't handle this ID */
-            return TDI_INVALID_PARAMETER;
-        }
-    }
-
-    return TDI_INVALID_PARAMETER;
-}
-
-
-TDI_STATUS InfoTdiSetInformationEx(
-    PTDI_REQUEST Request,
-    TDIObjectID *ID,
-    PVOID Buffer,
-    UINT BufferSize)
-/*
- * FUNCTION: Sets extended information
- * ARGUMENTS:
- *     Request    = Pointer to TDI request structure for the request
- *     ID         = Pointer to TDI object ID
- *     Buffer     = Pointer to buffer with data to use
- *     BufferSize = Size of Buffer
- * RETURNS:
- *     Status of operation
- */
-{
-    /* FIXME: Set extended information */
-
-    return TDI_INVALID_REQUEST;
-}
-
-/* EOF */
index ed640bc..49d6cd7 100644 (file)
@@ -379,12 +379,12 @@ ExInitializeResourceLite (
  *     Routine = Routine to be called by the worker thread
  *     Context = Parameter to be passed to the callback
  */
  *     Routine = Routine to be called by the worker thread
  *     Context = Parameter to be passed to the callback
  */
-#define ExInitializeWorkItem(Item, Routine, Context) \
+#define ExInitializeWorkItem(Item, WorkerRoutine, RoutineContext) \
        ASSERT_IRQL(DISPATCH_LEVEL); \
        ASSERT_IRQL(DISPATCH_LEVEL); \
-       (Item)->Routine = (Routine); \
-       (Item)->Context = (Context); \
-       (Item)->List.Flink = NULL; \
-       (Item)->List.Blink = NULL;
+       (Item)->Routine = (WorkerRoutine); \
+       (Item)->Context = (RoutineContext); \
+       (Item)->Entry.Flink = NULL; \
+       (Item)->Entry.Blink = NULL;
 
 NTSTATUS
 STDCALL
 
 NTSTATUS
 STDCALL
index 4db5711..533a8ff 100644 (file)
-/*\r
- * COPYRIGHT:   See COPYING in the top level directory\r
- * PROJECT:     ReactOS NDIS library\r
- * FILE:        include/net/miniport.h\r
- * PURPOSE:     Type definitions available only to NDIS miniport drivers\r
- */\r
-#ifndef __MINIPORT_H\r
-#define __MINIPORT_H\r
-\r
-#ifdef _MSC_VER\r
-#include <ntstatus.h>\r
-#else /* _MSC_VER */\r
-#include <ddk/status.h>\r
-#endif /* _MSC_VER */\r
-\r
-/* Base types */\r
-\r
-#define IN\r
-#define OUT\r
-#define OPTIONAL\r
-\r
-#define ANYSIZE_ARRAY   1\r
-\r
-#define CONST const\r
-\r
-#ifdef _MSC_VER\r
-\r
-#ifdef i386\r
-#define STDCALL _stdcall\r
-#define CDECL   _cdecl\r
-#else /* i386 */\r
-#define STDCALL\r
-#define CDECL\r
-#endif /* i386 */\r
-\r
-#else /* _MSC_VER */\r
-\r
-#ifdef i386\r
-#define STDCALL __attribute__ ((stdcall))\r
-#define CDECL   __attribute__ ((cdecl))\r
-#else /* i386 */\r
-#define STDCALL\r
-#define CDECL\r
-#endif /* i386 */\r
-\r
-#endif /* _MSC_VER */\r
-\r
-typedef void VOID, *PVOID;\r
-typedef char CHAR, *PCHAR;\r
-typedef unsigned char UCHAR, *PUCHAR;\r
-typedef short SHORT, *PSHORT;\r
-typedef unsigned short USHORT, *PUSHORT;\r
-typedef long LONG,*PLONG;\r
-typedef unsigned long ULONG,*PULONG;\r
-typedef double DOUBLE, *PDOUBLE;\r
-typedef struct _QUAD {\r
-    double  DoNotUseThisField;\r
-} QUAD,*PQUAD;\r
-typedef QUAD UQUAD, *PUQUAD;\r
-typedef signed int INT, *PINT;\r
-typedef unsigned int UINT, *PUINT;\r
-typedef double LONGLONG, *PLONGLONG;\r
-typedef double ULONGLONG, *PULONGLONG;\r
-\r
-typedef UCHAR BOOLEAN, *PBOOLEAN;\r
-typedef ULONG DWORD, *PDWORD;\r
-\r
-/* Cardinal types */\r
-typedef CHAR CCHAR, *PCCHAR;\r
-typedef SHORT CSHORT, *PCSHORT;\r
-typedef ULONG CLONG, *PCLONG;\r
-\r
-/* UNICODE (wide character) types */\r
-#ifndef __cplusplus\r
-typedef short unsigned int wchar_t;\r
-#endif /* __cplusplus */\r
-typedef wchar_t WCHAR;\r
-typedef WCHAR *PWCHAR;\r
-typedef WCHAR *LPWCH, *PWCH;\r
-typedef CONST WCHAR *LPCWCH, *PCWCH;\r
-typedef WCHAR *NWPSTR;\r
-typedef WCHAR *LPWSTR, *PWSTR;\r
-typedef CONST WCHAR *LPCWSTR, *PCWSTR;\r
-\r
-/* ANSI (multi-byte character) types */\r
-typedef CHAR *LPCH, *PCH;\r
-typedef CONST CHAR *LPCCH, *PCCH;\r
-typedef CHAR *NPSTR;\r
-typedef CHAR *LPSTR, *PSTR;\r
-typedef CONST CHAR *LPCSTR, *PCSTR;\r
-\r
-/* Neutral ANSI/UNICODE types */\r
-#ifdef UNICODE\r
-\r
-typedef WCHAR TCHAR, *PTCHAR;\r
-typedef WCHAR TUCHAR, *PTUCHAR;\r
-\r
-typedef LPWSTR LPTCH, PTCH;\r
-typedef LPWSTR PTSTR, LPTSTR;\r
-typedef LPCWSTR LPCTSTR;\r
-typedef LPWSTR LP;\r
-#define _TEXT(string) L##string\r
-#define _T(string) L##string\r
-\r
-#else /* UNICODE */\r
-\r
-typedef CHAR TCHAR, *PTCHAR;\r
-typedef UCHAR TUCHAR, *PTUCHAR;\r
-\r
-typedef LPSTR LPTCH, PTCH;\r
-typedef LPSTR PTSTR, LPTSTR;\r
-typedef LPCSTR LPCTSTR;\r
-#define _TEXT(string) string\r
-#define _T(string) string\r
-\r
-#endif /* UNICODE */\r
-\r
-#define TEXT(string) __TEXT(string)\r
-\r
-\r
-typedef union _LARGE_INTEGER {\r
-    struct {\r
-        ULONG LowPart;\r
-        LONG HighPart;\r
-    };\r
-    struct {\r
-        ULONG LowPart;\r
-        LONG HighPart;\r
-    } u;\r
-    LONGLONG QuadPart;\r
-} LARGE_INTEGER;\r
-\r
-typedef LARGE_INTEGER *PLARGE_INTEGER;\r
-\r
-typedef union _ULARGE_INTEGER {\r
-    struct {\r
-        ULONG LowPart;\r
-        ULONG HighPart;\r
-    };\r
-    struct {\r
-        ULONG LowPart;\r
-        ULONG HighPart;\r
-    } u;\r
-    ULONGLONG QuadPart;\r
-} ULARGE_INTEGER;\r
-\r
-typedef ULARGE_INTEGER *PULARGE_INTEGER;\r
-\r
-\r
-typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;\r
-\r
-\r
-\r
-/* NT status type and macros for checking status */\r
-typedef LONG NTSTATUS;\r
-typedef NTSTATUS *PNTSTATUS;\r
-\r
-#ifdef _MSC_VER\r
-#define NT_SUCCESS(Status)      ((ULONG)(Status) >= 0)\r
-#endif /* _MSC_VER */\r
-#define NT_INFORMATION(Status)  ((ULONG)(Status) >> 30 == 1)\r
-#define NT_WARNING(Status)      ((ULONG)(Status) >> 30 == 2)\r
-#define NT_ERROR(Status)        ((ULONG)(Status) >> 30 == 3)\r
-\r
-#define APPLICATION_ERROR_MASK       0x20000000\r
-#define ERROR_SEVERITY_SUCCESS       0x00000000\r
-#define ERROR_SEVERITY_INFORMATIONAL 0x40000000\r
-#define ERROR_SEVERITY_WARNING       0x80000000\r
-#define ERROR_SEVERITY_ERROR         0xC0000000\r
-\r
-\r
-\r
-/* Basic constants */\r
-\r
-#define FALSE   0\r
-#define TRUE    1\r
-\r
-#define NULL    ((PVOID)0)\r
-\r
-\r
-\r
-/* Counted strings */\r
-\r
-typedef struct _STRING\r
-{\r
-    USHORT  Length;\r
-    USHORT  MaximumLength;\r
-    PCHAR   Buffer;\r
-} STRING, *PSTRING;\r
-\r
-typedef STRING ANSI_STRING, *PANSI_STRING;\r
-typedef STRING OEM_STRING, *POEM_STRING;\r
-\r
-#define ANSI_NULL   ((CHAR)0)\r
-\r
-typedef struct _CSTRING\r
-{\r
-    USHORT      Length;\r
-    USHORT      MaximumLength;\r
-    CONST CHAR  *Buffer;\r
-} CSTRING, *PCSTRING;\r
-\r
-typedef CSTRING CANSI_STRING, *PCANSI_STRING;\r
-\r
-\r
-typedef struct _UNICODE_STRING\r
-{\r
-    USHORT  Length;\r
-    USHORT  MaximumLength;\r
-    PWSTR   Buffer;\r
-} UNICODE_STRING, *PUNICODE_STRING;\r
-\r
-typedef struct _CUNICODE_STRING\r
-{\r
-    USHORT      Length;\r
-    USHORT      MaximumLength;\r
-    CONST PWSTR Buffer;\r
-} CUNICODE_STRING, *PCUNICODE_STRING;\r
-\r
-#define UNICODE_NULL    ((WCHAR)0)\r
-\r
-\r
-\r
-/* Linked lists */\r
-\r
-typedef struct _LIST_ENTRY\r
-{\r
-    struct _LIST_ENTRY *Flink;\r
-    struct _LIST_ENTRY *Blink;\r
-} LIST_ENTRY, *PLIST_ENTRY;\r
-\r
-typedef struct _SINGLE_LIST_ENTRY\r
-{\r
-    struct _SINGLE_LIST_ENTRY *Next;\r
-} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;\r
-\r
-\r
-/*\r
- * VOID InitializeListHead(\r
- *     PLIST_ENTRY ListHead);\r
- */\r
-#define InitializeListHead(ListHead) \\r
-{                                    \\r
-    (ListHead)->Flink = (ListHead);  \\r
-    (ListHead)->Blink = (ListHead);  \\r
-}\r
-\r
-\r
-/*\r
- * VOID InsertHeadList(\r
- *     LIST_ENTRY ListHead,\r
- *     PLIST_ENTRY Entry);\r
- */\r
-#define InsertHeadList(ListHead, ListEntry) \\r
-{                                           \\r
-    PLIST_ENTRY OldFlink;                   \\r
-    OldFlink           = (ListHead)->Flink; \\r
-    (ListEntry)->Flink = OldFlink;          \\r
-    (ListEntry)->Blink = (ListHead);        \\r
-    OldFlink->Blink    = (ListEntry);       \\r
-    (ListHead)->Flink  = (ListEntry);       \\r
-}\r
-\r
-\r
-/*\r
- * VOID InsertTailList(\r
- *     PLIST_ENTRY ListHead,\r
- *        PLIST_ENTRY Entry);\r
- */\r
-#define InsertTailList(ListHead, ListEntry) \\r
-{                                           \\r
-    PLIST_ENTRY OldBlink;                   \\r
-       OldBlink           = (ListHead)->Blink; \\r
-       (ListEntry)->Flink = (ListHead);        \\r
-       (ListEntry)->Blink = OldBlink;          \\r
-       OldBlink->Flink    = (ListEntry);       \\r
-       (ListHead)->Blink  = (ListEntry);       \\r
-}\r
-\r
-/*\r
- * BOOLEAN IsListEmpty(\r
- *     PLIST_ENTRY ListHead);\r
- */\r
-#define IsListEmpty(ListHead) \\r
-    ((ListHead)->Flink == (ListHead))\r
-\r
-\r
-/*\r
- * PSINGLE_LIST_ENTRY PopEntryList(\r
- *     PSINGLE_LIST_ENTRY ListHead);\r
- */\r
-#define PopEntryList(ListHead)               \\r
-    (ListHead)->Next;                        \\r
-{                                            \\r
-    PSINGLE_LIST_ENTRY FirstEntry;           \\r
-                                             \\r
-    FirstEntry = (ListHead)->Next;           \\r
-    if (FirstEntry != NULL)                  \\r
-    {                                        \\r
-        (ListHead)->Next = FirstEntry->Next; \\r
-    }                                        \\r
-}\r
-\r
-\r
-/*\r
- * VOID PushEntryList(\r
- *     PSINGLE_LIST_ENTRY ListHead,\r
- *     PSINGLE_LIST_ENTRY Entry);\r
- */\r
-#define PushEntryList(ListHead, Entry)   \\r
-    (Entry)->Next    = (ListHead)->Next; \\r
-    (ListHead)->Next = (Entry)\r
-\r
-\r
-/*\r
- * VOID RemoveEntryList(\r
- *     PLIST_ENTRY Entry);\r
- */\r
-#define RemoveEntryList(ListEntry)        \\r
-{                                         \\r
-    PLIST_ENTRY OldFlink;                 \\r
-    PLIST_ENTRY OldBlink;                 \\r
-    OldFlink        = (ListEntry)->Flink; \\r
-    OldBlink        = (ListEntry)->Blink; \\r
-    OldFlink->Blink = OldBlink;           \\r
-    OldBlink->Flink = OldFlink;           \\r
-}\r
-\r
-\r
-/*\r
- * PLIST_ENTRY RemoveHeadList(\r
- *     PLIST_ENTRY ListHead);\r
- */\r
-#define RemoveHeadList(ListHead)       \\r
-       (ListHead)->Flink;                 \\r
-{                                      \\r
-    RemoveEntryList((ListHead)->Flink) \\r
-}\r
-\r
-\r
-/*\r
- * PLIST_ENTRY RemoveTailList(\r
- *     PLIST_ENTRY ListHead);\r
- */\r
-#define RemoveTailList(ListHead)       \\r
-    (ListHead)->Blink;                 \\r
-{                                      \\r
-    RemoveEntryList((ListHead)->Blink) \\r
-}\r
-\r
-\r
-/* Hardware */\r
-\r
-typedef UCHAR KIRQL, *PKIRQL;\r
-\r
-typedef struct _KSPIN_LOCK\r
-{\r
-    ULONG    Lock;\r
-} KSPIN_LOCK, *PKSPIN_LOCK;\r
-\r
-\r
-typedef struct _ADAPTER_OBJECT  *PADAPTER_OBJECT;\r
-typedef struct _DEVICE_OBJECT   *PDEVICE_OBJECT;\r
-typedef struct _DRIVER_OBJECT   *PDRIVER_OBJECT;\r
-typedef struct _FILE_OBJECT     *PFILE_OBJECT;\r
-\r
-typedef struct _KINTERRUPT      *PKINTERRUPT;\r
-\r
-\r
-/* Memory Descriptor List */\r
-typedef struct _MDL {\r
-    struct _MDL *Next;\r
-    CSHORT Size;\r
-    CSHORT MdlFlags;\r
-    struct _EPROCESS *Process;\r
-    PVOID MappedSystemVa;\r
-    PVOID StartVa;\r
-    ULONG ByteCount;\r
-    ULONG ByteOffset;\r
-} MDL, *PMDL;\r
-\r
-#define MDL_MAPPED_TO_SYSTEM_VA     0x0001\r
-#define MDL_PAGES_LOCKED            0x0002\r
-#define MDL_SOURCE_IS_NONPAGED_POOL 0x0004\r
-#define MDL_ALLOCATED_FIXED_SIZE    0x0008\r
-#define MDL_PARTIAL                 0x0010\r
-#define MDL_PARTIAL_HAS_BEEN_MAPPED 0x0020\r
-#define MDL_IO_PAGE_READ            0x0040\r
-#define MDL_WRITE_OPERATION         0x0080\r
-#define MDL_PARENT_MAPPED_SYSTEM_VA 0x0100\r
-#define MDL_LOCK_HELD               0x0200\r
-#define MDL_PHYSICAL_VIEW           0x0400\r
-#define MDL_IO_SPACE                0x0800\r
-#define MDL_NETWORK_HEADER          0x1000\r
-#define MDL_MAPPING_CAN_FAIL        0x2000\r
-#define MDL_ALLOCATED_MUST_SUCCEED  0x4000\r
-\r
-\r
-#define MDL_MAPPING_FLAGS (MDL_MAPPED_TO_SYSTEM_VA     | \\r
-                           MDL_PAGES_LOCKED            | \\r
-                           MDL_SOURCE_IS_NONPAGED_POOL | \\r
-                           MDL_PARTIAL_HAS_BEEN_MAPPED | \\r
-                           MDL_PARENT_MAPPED_SYSTEM_VA | \\r
-                           MDL_LOCK_HELD               | \\r
-                           MDL_SYSTEM_VA               | \\r
-                           MDL_IO_SPACE )\r
-\r
-\r
-typedef struct _DISPATCHER_HEADER\r
-{\r
-    UCHAR       Type;\r
-    UCHAR       Absolute;\r
-    UCHAR       Size;\r
-    UCHAR       Inserted;\r
-    LONG        SignalState;\r
-    LIST_ENTRY  WaitListHead;\r
-} DISPATCHER_HEADER;\r
-\r
-typedef struct _KEVENT\r
-{\r
-    DISPATCHER_HEADER   Header;\r
-} KEVENT, *PKEVENT;\r
-\r
-\r
-typedef struct _KTIMER\r
-{\r
-    DISPATCHER_HEADER   Header;\r
-    ULARGE_INTEGER      DueTime;\r
-    LIST_ENTRY          TimerListEntry;\r
-    struct _KDPC        *Dpc;\r
-    LONG                Period;\r
-} KTIMER, *PKTIMER;\r
-\r
-\r
-typedef enum _KDPC_IMPORTANCE\r
-{\r
-    LowImportance,\r
-    MediumImportance,\r
-    HighImportance\r
-} KDPC_IMPORTANCE;\r
-\r
-/* Forward declaration */\r
-struct _KDPC;\r
-\r
-typedef VOID (*PKDEFERRED_ROUTINE)(\r
-    IN  struct _KDPC    *Dpc,\r
-    IN  PVOID           DeferredContext,\r
-    IN  PVOID           SystemArgument1,\r
-    IN  PVOID           SystemArgument2);\r
-\r
-/* Deferred Procedure Call */\r
-\r
-typedef struct _KDPC {\r
-    CSHORT              Type;\r
-    UCHAR               Number;\r
-    UCHAR               Importance;\r
-    LIST_ENTRY          DpcListEntry;\r
-    PKDEFERRED_ROUTINE  DeferredRoutine;\r
-    PVOID               DeferredContext;\r
-    PVOID               SystemArgument1;\r
-    PVOID               SystemArgument2;\r
-    PULONG              Lock;\r
-} KDPC, *PKDPC;\r
-\r
-\r
-typedef enum _INTERFACE_TYPE\r
-{\r
-    InterfaceTypeUndefined = -1,\r
-    Internal,\r
-    Isa,\r
-    Eisa,\r
-    MicroChannel,\r
-    TurboChannel,\r
-    PCIBus,\r
-    VMEBus,\r
-    NuBus,\r
-    PCMCIABus,\r
-    CBus,\r
-    MPIBus,\r
-    MPSABus,\r
-    ProcessorInternal,\r
-    InternalPowerBus,\r
-    PNPISABus,\r
-    MaximumInterfaceType\r
-} INTERFACE_TYPE, *PINTERFACE_TYPE;\r
-\r
-\r
-typedef enum _DMA_WIDTH\r
-{\r
-    Width8Bits,\r
-    Width16Bits,\r
-    Width32Bits,\r
-    MaximumDmaWidth\r
-} DMA_WIDTH, *PDMA_WIDTH;\r
-\r
-typedef enum _DMA_SPEED\r
-{\r
-    Compatible,\r
-    TypeA,\r
-    TypeB,\r
-    TypeC,\r
-    TypeF,\r
-    MaximumDmaSpeed\r
-} DMA_SPEED, *PDMA_SPEED;\r
-\r
-\r
-typedef enum _KINTERRUPT_MODE\r
-{\r
-    LevelSensitive,\r
-    Latched\r
-} KINTERRUPT_MODE;\r
-\r
-\r
-typedef struct _DMA_CONFIGURATION_BYTE0\r
-{\r
-    UCHAR   Channel:3;\r
-    UCHAR   Reserved:3;\r
-    UCHAR   Shared:1;\r
-    UCHAR   MoreEntries:1;\r
-} DMA_CONFIGURATION_BYTE0;\r
-\r
-typedef struct _DMA_CONFIGURATION_BYTE1\r
-{\r
-    UCHAR   Reserved0:2;\r
-    UCHAR   TransferSize:2;\r
-    UCHAR   Timing:2;\r
-    UCHAR   Reserved1:2;\r
-} DMA_CONFIGURATION_BYTE1;\r
-\r
-\r
-typedef struct _CM_MCA_POS_DATA\r
-{\r
-    USHORT  AdapterId;\r
-    UCHAR   PosData1;\r
-    UCHAR   PosData2;\r
-    UCHAR   PosData3;\r
-    UCHAR   PosData4;\r
-} CM_MCA_POS_DATA, *PCM_MCA_POS_DATA;\r
-\r
-typedef struct _EISA_MEMORY_TYPE\r
-{\r
-    UCHAR   ReadWrite:1;\r
-    UCHAR   Cached:1;\r
-    UCHAR   Reserved0:1;\r
-    UCHAR   Type:2;\r
-    UCHAR   Shared:1;\r
-    UCHAR   Reserved1:1;\r
-    UCHAR   MoreEntries:1;\r
-} EISA_MEMORY_TYPE, *PEISA_MEMORY_TYPE;\r
-\r
-typedef struct _EISA_MEMORY_CONFIGURATION\r
-{\r
-    EISA_MEMORY_TYPE    ConfigurationByte;\r
-    UCHAR   DataSize;\r
-    USHORT  AddressLowWord;\r
-    UCHAR   AddressHighByte;\r
-    USHORT  MemorySize;\r
-} EISA_MEMORY_CONFIGURATION, *PEISA_MEMORY_CONFIGURATION;\r
-\r
-\r
-typedef struct _EISA_IRQ_DESCRIPTOR\r
-{\r
-    UCHAR   Interrupt:4;\r
-    UCHAR   Reserved:1;\r
-    UCHAR   LevelTriggered:1;\r
-    UCHAR   Shared:1;\r
-    UCHAR   MoreEntries:1;\r
-} EISA_IRQ_DESCRIPTOR, *PEISA_IRQ_DESCRIPTOR;\r
-\r
-typedef struct _EISA_IRQ_CONFIGURATION\r
-{\r
-    EISA_IRQ_DESCRIPTOR ConfigurationByte;\r
-    UCHAR   Reserved;\r
-} EISA_IRQ_CONFIGURATION, *PEISA_IRQ_CONFIGURATION;\r
-\r
-typedef struct _EISA_DMA_CONFIGURATION\r
-{\r
-    DMA_CONFIGURATION_BYTE0 ConfigurationByte0;\r
-    DMA_CONFIGURATION_BYTE1 ConfigurationByte1;\r
-} EISA_DMA_CONFIGURATION, *PEISA_DMA_CONFIGURATION;\r
-\r
-\r
-typedef struct _EISA_PORT_DESCRIPTOR\r
-{\r
-    UCHAR   NumberPorts:5;\r
-    UCHAR   Reserved:1;\r
-    UCHAR   Shared:1;\r
-    UCHAR   MoreEntries:1;\r
-} EISA_PORT_DESCRIPTOR, *PEISA_PORT_DESCRIPTOR;\r
-\r
-typedef struct _EISA_PORT_CONFIGURATION\r
-{\r
-    EISA_PORT_DESCRIPTOR    Configuration;\r
-    USHORT  PortAddress;\r
-} EISA_PORT_CONFIGURATION, *PEISA_PORT_CONFIGURATION;\r
-\r
-typedef struct _CM_EISA_SLOT_INFORMATION\r
-{\r
-    UCHAR   ReturnCode;\r
-    UCHAR   ReturnFlags;\r
-    UCHAR   MajorRevision;\r
-    UCHAR   MinorRevision;\r
-    USHORT  Checksum;\r
-    UCHAR   NumberFunctions;\r
-    UCHAR   FunctionInformation;\r
-    ULONG   CompressedId;\r
-} CM_EISA_SLOT_INFORMATION, *PCM_EISA_SLOT_INFORMATION;\r
-\r
-typedef struct _CM_EISA_FUNCTION_INFORMATION\r
-{\r
-    ULONG   CompressedId;\r
-    UCHAR   IdSlotFlags1;\r
-    UCHAR   IdSlotFlags2;\r
-    UCHAR   MinorRevision;\r
-    UCHAR   MajorRevision;\r
-    UCHAR   Selections[26];\r
-    UCHAR   FunctionFlags;\r
-    UCHAR   TypeString[80];\r
-    EISA_MEMORY_CONFIGURATION   EisaMemory[9];\r
-    EISA_IRQ_CONFIGURATION      EisaIrq[7];\r
-    EISA_DMA_CONFIGURATION      EisaDma[4];\r
-    EISA_PORT_CONFIGURATION     EisaPort[20];\r
-    UCHAR   InitializationData[60];\r
-} CM_EISA_FUNCTION_INFORMATION, *PCM_EISA_FUNCTION_INFORMATION;\r
-\r
-\r
-typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR\r
-{\r
-    UCHAR   Type;\r
-    UCHAR   ShareDisposition;\r
-    USHORT  Flags;\r
-    union {\r
-        struct {\r
-            PHYSICAL_ADDRESS    Start;\r
-            ULONG               Length;\r
-        } Generic;\r
-\r
-        struct {\r
-            PHYSICAL_ADDRESS    Start;\r
-            ULONG               Length;\r
-        } Port;\r
-\r
-        struct {\r
-            ULONG   Level;\r
-            ULONG   Vector;\r
-            ULONG   Affinity;\r
-        } Interrupt;\r
-\r
-        struct {\r
-            PHYSICAL_ADDRESS    Start;\r
-            ULONG               Length;\r
-        } Memory;\r
-\r
-        struct {\r
-            ULONG   Channel;\r
-            ULONG   Port;\r
-            ULONG   Reserved1;\r
-        } Dma;\r
-\r
-        struct {\r
-            ULONG   Data[3];\r
-        } DevicePrivate;\r
-\r
-        struct {\r
-            ULONG   Start;\r
-            ULONG   Length;\r
-            ULONG   Reserved;\r
-        } BusNumber;\r
-\r
-        struct {\r
-            ULONG   DataSize;\r
-            ULONG   Reserved1;\r
-            ULONG   Reserved2;\r
-        } DeviceSpecificData;\r
-    } u;\r
-} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;\r
-\r
-typedef struct _CM_PARTIAL_RESOURCE_LIST\r
-{\r
-    USHORT  Version;\r
-    USHORT  Revision;\r
-    ULONG   Count;\r
-    CM_PARTIAL_RESOURCE_DESCRIPTOR  PartialDescriptors[1];\r
-} CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;\r
-\r
-typedef struct _CM_FULL_RESOURCE_DESCRIPTOR\r
-{\r
-    INTERFACE_TYPE  InterfaceType;\r
-    ULONG           BusNumber;\r
-    CM_PARTIAL_RESOURCE_LIST    PartialResourceList;\r
-} CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;\r
-\r
-typedef struct _CM_RESOURCE_LIST\r
-{\r
-    ULONG   Count;\r
-    CM_FULL_RESOURCE_DESCRIPTOR List[1];\r
-} CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;\r
-\r
-\r
-\r
-/* Operating System services */\r
-\r
-/* Debugging */\r
-\r
-ULONG CDECL DbgPrint(\r
-    PCH Format,\r
-    ...);\r
-\r
-#ifdef DBG\r
-\r
-VOID\r
-STDCALL\r
-RtlAssert(\r
-    PVOID   FailedAssertion,\r
-    PVOID   FileName,\r
-    ULONG   LineNumber,\r
-    PCHAR   Message);\r
-\r
-#define ASSERT(exp) \\r
-    if (!(exp)) \\r
-        RtlAssert(#exp, __FILE__, __LINE__, NULL)\r
-\r
-#define ASSERTMSG(msg, exp) \\r
-    if (!(exp)) \\r
-        RtlAssert(#exp, __FILE__, __LINE__, msg)\r
-\r
-#else /* DBG */\r
-\r
-#define ASSERT(exp)\r
-#define ASSERTMSG(msg, exp)\r
-\r
-#endif /* DBG */\r
-\r
-\r
-/* Runtime library */\r
-\r
-#define RtlEqualMemory(Destination,Source,Length)   (!memcmp((Destination), (Source), (Length)))\r
-#define RtlMoveMemory(Destination,Source,Length)    memmove((Destination), (Source), (Length))\r
-#define RtlCopyMemory(Destination,Source,Length)    memcpy((Destination), (Source), (Length))\r
-#define RtlFillMemory(Destination,Length,Fill)      memset((Destination), (Fill),(Length))\r
-#define RtlZeroMemory(Destination,Length)           memset((Destination), 0, (Length))\r
-\r
-\r
-/* Core kernel functions */\r
-\r
-VOID\r
-STDCALL\r
-KeStallExecutionProcessor(\r
-    ULONG   MicroSeconds);\r
-\r
-\r
-/* I/O functions */\r
-\r
-VOID\r
-STDCALL\r
-READ_PORT_BUFFER_UCHAR(\r
-    PUCHAR  Port,\r
-    PUCHAR  Value,\r
-    ULONG   Count);\r
-\r
-VOID\r
-STDCALL\r
-READ_PORT_BUFFER_ULONG(\r
-    PULONG  Port,\r
-    PULONG  Value,\r
-    ULONG   Count);\r
-\r
-VOID\r
-STDCALL\r
-READ_PORT_BUFFER_USHORT(\r
-    PUSHORT Port,\r
-    PUSHORT Value,\r
-    ULONG   Count);\r
-\r
-UCHAR\r
-STDCALL\r
-READ_PORT_UCHAR(\r
-    PUCHAR  Port);\r
-\r
-ULONG\r
-STDCALL\r
-READ_PORT_ULONG(\r
-    PULONG  Port);\r
-\r
-USHORT\r
-STDCALL\r
-READ_PORT_USHORT(\r
-    PUSHORT Port);\r
-\r
-VOID\r
-STDCALL\r
-WRITE_PORT_BUFFER_UCHAR(\r
-    PUCHAR  Port,\r
-    PUCHAR  Value,\r
-    ULONG   Count);\r
-\r
-VOID\r
-STDCALL\r
-WRITE_PORT_BUFFER_ULONG(\r
-    PULONG  Port,\r
-    PULONG  Value,\r
-    ULONG   Count);\r
-\r
-VOID\r
-STDCALL\r
-WRITE_PORT_BUFFER_USHORT(\r
-    PUSHORT Port,\r
-    PUSHORT Value,\r
-    ULONG   Count);\r
-\r
-VOID\r
-STDCALL\r
-WRITE_PORT_UCHAR(\r
-    PUCHAR  Port,\r
-    UCHAR   Value);\r
-\r
-VOID\r
-STDCALL\r
-WRITE_PORT_ULONG(\r
-    PULONG  Port,\r
-    ULONG   Value);\r
-\r
-VOID\r
-STDCALL\r
-WRITE_PORT_USHORT(\r
-    PUSHORT Port,\r
-    USHORT  Value);\r
-\r
-VOID\r
-STDCALL\r
-WRITE_REGISTER_UCHAR(\r
-    PUCHAR  Register,\r
-    UCHAR   Value);\r
-\r
-VOID\r
-STDCALL\r
-WRITE_REGISTER_ULONG(\r
-    PULONG  Register,\r
-    ULONG   Value);\r
-\r
-VOID\r
-STDCALL\r
-WRITE_REGISTER_USHORT(\r
-    PUSHORT Register,\r
-    USHORT  Value);\r
-\r
-#endif /* __MINIPORT_H */\r
-\r
-/* EOF */\r
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS NDIS library
+ * FILE:        include/net/miniport.h
+ * PURPOSE:     Type definitions available only to NDIS miniport drivers
+ */
+#ifndef __MINIPORT_H
+#define __MINIPORT_H
+
+#ifdef _MSC_VER
+#include <ntstatus.h>
+#else /* _MSC_VER */
+#include <ddk/status.h>
+#endif /* _MSC_VER */
+
+/* Base types */
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+#define ANYSIZE_ARRAY   1
+
+#define CONST const
+
+#ifdef _MSC_VER
+
+#ifdef i386
+#define STDCALL _stdcall
+#define CDECL   _cdecl
+#else /* i386 */
+#define STDCALL
+#define CDECL
+#endif /* i386 */
+
+#else /* _MSC_VER */
+
+#ifdef i386
+#define STDCALL __attribute__ ((stdcall))
+#define CDECL   __attribute__ ((cdecl))
+#else /* i386 */
+#define STDCALL
+#define CDECL
+#endif /* i386 */
+
+#endif /* _MSC_VER */
+
+typedef void VOID, *PVOID;
+typedef char CHAR, *PCHAR;
+typedef unsigned char UCHAR, *PUCHAR;
+typedef short SHORT, *PSHORT;
+typedef unsigned short USHORT, *PUSHORT;
+typedef long LONG,*PLONG;
+typedef unsigned long ULONG,*PULONG;
+typedef double DOUBLE, *PDOUBLE;
+typedef struct _QUAD {
+    double  DoNotUseThisField;
+} QUAD,*PQUAD;
+typedef QUAD UQUAD, *PUQUAD;
+typedef signed int INT, *PINT;
+typedef unsigned int UINT, *PUINT;
+typedef double LONGLONG, *PLONGLONG;
+typedef double ULONGLONG, *PULONGLONG;
+
+typedef UCHAR BOOLEAN, *PBOOLEAN;
+typedef ULONG DWORD, *PDWORD;
+
+/* Cardinal types */
+typedef CHAR CCHAR, *PCCHAR;
+typedef SHORT CSHORT, *PCSHORT;
+typedef ULONG CLONG, *PCLONG;
+
+/* UNICODE (wide character) types */
+#ifndef __cplusplus
+typedef short unsigned int wchar_t;
+#endif /* __cplusplus */
+typedef wchar_t WCHAR;
+typedef WCHAR *PWCHAR;
+typedef WCHAR *LPWCH, *PWCH;
+typedef CONST WCHAR *LPCWCH, *PCWCH;
+typedef WCHAR *NWPSTR;
+typedef WCHAR *LPWSTR, *PWSTR;
+typedef CONST WCHAR *LPCWSTR, *PCWSTR;
+
+/* ANSI (multi-byte character) types */
+typedef CHAR *LPCH, *PCH;
+typedef CONST CHAR *LPCCH, *PCCH;
+typedef CHAR *NPSTR;
+typedef CHAR *LPSTR, *PSTR;
+typedef CONST CHAR *LPCSTR, *PCSTR;
+
+/* Neutral ANSI/UNICODE types */
+#ifdef UNICODE
+
+typedef WCHAR TCHAR, *PTCHAR;
+typedef WCHAR TUCHAR, *PTUCHAR;
+
+typedef LPWSTR LPTCH, PTCH;
+typedef LPWSTR PTSTR, LPTSTR;
+typedef LPCWSTR LPCTSTR;
+typedef LPWSTR LP;
+#define _TEXT(string) L##string
+#define _T(string) L##string
+
+#else /* UNICODE */
+
+typedef CHAR TCHAR, *PTCHAR;
+typedef UCHAR TUCHAR, *PTUCHAR;
+
+typedef LPSTR LPTCH, PTCH;
+typedef LPSTR PTSTR, LPTSTR;
+typedef LPCSTR LPCTSTR;
+#define _TEXT(string) string
+#define _T(string) string
+
+#endif /* UNICODE */
+
+#define TEXT(string) __TEXT(string)
+
+
+typedef union _LARGE_INTEGER {
+    struct {
+        ULONG LowPart;
+        LONG HighPart;
+    };
+    struct {
+        ULONG LowPart;
+        LONG HighPart;
+    } u;
+    LONGLONG QuadPart;
+} LARGE_INTEGER;
+
+typedef LARGE_INTEGER *PLARGE_INTEGER;
+
+typedef union _ULARGE_INTEGER {
+    struct {
+        ULONG LowPart;
+        ULONG HighPart;
+    };
+    struct {
+        ULONG LowPart;
+        ULONG HighPart;
+    } u;
+    ULONGLONG QuadPart;
+} ULARGE_INTEGER;
+
+typedef ULARGE_INTEGER *PULARGE_INTEGER;
+
+
+typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
+
+
+
+/* NT status type and macros for checking status */
+typedef LONG NTSTATUS;
+typedef NTSTATUS *PNTSTATUS;
+
+#ifdef _MSC_VER
+#define NT_SUCCESS(Status)      ((ULONG)(Status) >= 0)
+#endif /* _MSC_VER */
+#define NT_INFORMATION(Status)  ((ULONG)(Status) >> 30 == 1)
+#define NT_WARNING(Status)      ((ULONG)(Status) >> 30 == 2)
+#define NT_ERROR(Status)        ((ULONG)(Status) >> 30 == 3)
+
+#define APPLICATION_ERROR_MASK       0x20000000
+#define ERROR_SEVERITY_SUCCESS       0x00000000
+#define ERROR_SEVERITY_INFORMATIONAL 0x40000000
+#define ERROR_SEVERITY_WARNING       0x80000000
+#define ERROR_SEVERITY_ERROR         0xC0000000
+
+
+
+/* Basic constants */
+
+#define FALSE   0
+#define TRUE    1
+
+#define NULL    ((PVOID)0)
+
+
+
+/* Counted strings */
+
+typedef struct _STRING
+{
+    USHORT  Length;
+    USHORT  MaximumLength;
+    PCHAR   Buffer;
+} STRING, *PSTRING;
+
+typedef STRING ANSI_STRING, *PANSI_STRING;
+typedef STRING OEM_STRING, *POEM_STRING;
+
+#define ANSI_NULL   ((CHAR)0)
+
+typedef struct _CSTRING
+{
+    USHORT      Length;
+    USHORT      MaximumLength;
+    CONST CHAR  *Buffer;
+} CSTRING, *PCSTRING;
+
+typedef CSTRING CANSI_STRING, *PCANSI_STRING;
+
+
+typedef struct _UNICODE_STRING
+{
+    USHORT  Length;
+    USHORT  MaximumLength;
+    PWSTR   Buffer;
+} UNICODE_STRING, *PUNICODE_STRING;
+
+typedef struct _CUNICODE_STRING
+{
+    USHORT      Length;
+    USHORT      MaximumLength;
+    CONST PWSTR Buffer;
+} CUNICODE_STRING, *PCUNICODE_STRING;
+
+#define UNICODE_NULL    ((WCHAR)0)
+
+
+
+/* Linked lists */
+
+typedef struct _LIST_ENTRY
+{
+    struct _LIST_ENTRY *Flink;
+    struct _LIST_ENTRY *Blink;
+} LIST_ENTRY, *PLIST_ENTRY;
+
+typedef struct _SINGLE_LIST_ENTRY
+{
+    struct _SINGLE_LIST_ENTRY *Next;
+} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
+
+
+/*
+ * VOID InitializeListHead(
+ *     PLIST_ENTRY ListHead);
+ */
+#define InitializeListHead(ListHead) \
+{                                    \
+    (ListHead)->Flink = (ListHead);  \
+    (ListHead)->Blink = (ListHead);  \
+}
+
+
+/*
+ * VOID InsertHeadList(
+ *     LIST_ENTRY ListHead,
+ *     PLIST_ENTRY Entry);
+ */
+#define InsertHeadList(ListHead, ListEntry) \
+{                                           \
+    PLIST_ENTRY OldFlink;                   \
+    OldFlink           = (ListHead)->Flink; \
+    (ListEntry)->Flink = OldFlink;          \
+    (ListEntry)->Blink = (ListHead);        \
+    OldFlink->Blink    = (ListEntry);       \
+    (ListHead)->Flink  = (ListEntry);       \
+}
+
+
+/*
+ * VOID InsertTailList(
+ *     PLIST_ENTRY ListHead,
+ *        PLIST_ENTRY Entry);
+ */
+#define InsertTailList(ListHead, ListEntry) \
+{                                           \
+    PLIST_ENTRY OldBlink;                   \
+       OldBlink           = (ListHead)->Blink; \
+       (ListEntry)->Flink = (ListHead);        \
+       (ListEntry)->Blink = OldBlink;          \
+       OldBlink->Flink    = (ListEntry);       \
+       (ListHead)->Blink  = (ListEntry);       \
+}
+
+/*
+ * BOOLEAN IsListEmpty(
+ *     PLIST_ENTRY ListHead);
+ */
+#define IsListEmpty(ListHead) \
+    ((ListHead)->Flink == (ListHead))
+
+
+/*
+ * PSINGLE_LIST_ENTRY PopEntryList(
+ *     PSINGLE_LIST_ENTRY ListHead);
+ */
+#define PopEntryList(ListHead)               \
+    (ListHead)->Next;                        \
+{                                            \
+    PSINGLE_LIST_ENTRY FirstEntry;           \
+                                             \
+    FirstEntry = (ListHead)->Next;           \
+    if (FirstEntry != NULL)                  \
+    {                                        \
+        (ListHead)->Next = FirstEntry->Next; \
+    }                                        \
+}
+
+
+/*
+ * VOID PushEntryList(
+ *     PSINGLE_LIST_ENTRY ListHead,
+ *     PSINGLE_LIST_ENTRY Entry);
+ */
+#define PushEntryList(ListHead, Entry)   \
+    (Entry)->Next    = (ListHead)->Next; \
+    (ListHead)->Next = (Entry)
+
+
+/*
+ * VOID RemoveEntryList(
+ *     PLIST_ENTRY Entry);
+ */
+#define RemoveEntryList(ListEntry)        \
+{                                         \
+    PLIST_ENTRY OldFlink;                 \
+    PLIST_ENTRY OldBlink;                 \
+    OldFlink        = (ListEntry)->Flink; \
+    OldBlink        = (ListEntry)->Blink; \
+    OldFlink->Blink = OldBlink;           \
+    OldBlink->Flink = OldFlink;           \
+}
+
+
+/*
+ * PLIST_ENTRY RemoveHeadList(
+ *     PLIST_ENTRY ListHead);
+ */
+#define RemoveHeadList(ListHead)       \
+       (ListHead)->Flink;                 \
+{                                      \
+    RemoveEntryList((ListHead)->Flink) \
+}
+
+
+/*
+ * PLIST_ENTRY RemoveTailList(
+ *     PLIST_ENTRY ListHead);
+ */
+#define RemoveTailList(ListHead)       \
+    (ListHead)->Blink;                 \
+{                                      \
+    RemoveEntryList((ListHead)->Blink) \
+}
+
+
+/* Hardware */
+
+typedef UCHAR KIRQL, *PKIRQL;
+
+typedef struct _KSPIN_LOCK
+{
+    ULONG    Lock;
+} KSPIN_LOCK, *PKSPIN_LOCK;
+
+
+typedef struct _ADAPTER_OBJECT  *PADAPTER_OBJECT;
+typedef struct _DEVICE_OBJECT   *PDEVICE_OBJECT;
+typedef struct _DRIVER_OBJECT   *PDRIVER_OBJECT;
+typedef struct _FILE_OBJECT     *PFILE_OBJECT;
+
+typedef struct _KINTERRUPT      *PKINTERRUPT;
+
+
+/* Memory Descriptor List */
+typedef struct _MDL {
+    struct _MDL *Next;
+    CSHORT Size;
+    CSHORT MdlFlags;
+    struct _EPROCESS *Process;
+    PVOID MappedSystemVa;
+    PVOID StartVa;
+    ULONG ByteCount;
+    ULONG ByteOffset;
+} MDL, *PMDL;
+
+#define MDL_MAPPED_TO_SYSTEM_VA     0x0001
+#define MDL_PAGES_LOCKED            0x0002
+#define MDL_SOURCE_IS_NONPAGED_POOL 0x0004
+#define MDL_ALLOCATED_FIXED_SIZE    0x0008
+#define MDL_PARTIAL                 0x0010
+#define MDL_PARTIAL_HAS_BEEN_MAPPED 0x0020
+#define MDL_IO_PAGE_READ            0x0040
+#define MDL_WRITE_OPERATION         0x0080
+#define MDL_PARENT_MAPPED_SYSTEM_VA 0x0100
+#define MDL_LOCK_HELD               0x0200
+#define MDL_PHYSICAL_VIEW           0x0400
+#define MDL_IO_SPACE                0x0800
+#define MDL_NETWORK_HEADER          0x1000
+#define MDL_MAPPING_CAN_FAIL        0x2000
+#define MDL_ALLOCATED_MUST_SUCCEED  0x4000
+
+
+#define MDL_MAPPING_FLAGS (MDL_MAPPED_TO_SYSTEM_VA     | \
+                           MDL_PAGES_LOCKED            | \
+                           MDL_SOURCE_IS_NONPAGED_POOL | \
+                           MDL_PARTIAL_HAS_BEEN_MAPPED | \
+                           MDL_PARENT_MAPPED_SYSTEM_VA | \
+                           MDL_LOCK_HELD               | \
+                           MDL_SYSTEM_VA               | \
+                           MDL_IO_SPACE )
+
+
+typedef struct _DISPATCHER_HEADER
+{
+    UCHAR       Type;
+    UCHAR       Absolute;
+    UCHAR       Size;
+    UCHAR       Inserted;
+    LONG        SignalState;
+    LIST_ENTRY  WaitListHead;
+} DISPATCHER_HEADER;
+
+typedef struct _KEVENT
+{
+    DISPATCHER_HEADER   Header;
+} KEVENT, *PKEVENT;
+
+
+typedef struct _KTIMER
+{
+    DISPATCHER_HEADER   Header;
+    ULARGE_INTEGER      DueTime;
+    LIST_ENTRY          TimerListEntry;
+    struct _KDPC        *Dpc;
+    LONG                Period;
+} KTIMER, *PKTIMER;
+
+
+typedef enum _KDPC_IMPORTANCE
+{
+    LowImportance,
+    MediumImportance,
+    HighImportance
+} KDPC_IMPORTANCE;
+
+/* Forward declaration */
+struct _KDPC;
+
+typedef VOID (*PKDEFERRED_ROUTINE)(
+    IN  struct _KDPC    *Dpc,
+    IN  PVOID           DeferredContext,
+    IN  PVOID           SystemArgument1,
+    IN  PVOID           SystemArgument2);
+
+/* Deferred Procedure Call */
+
+typedef struct _KDPC {
+    CSHORT              Type;
+    UCHAR               Number;
+    UCHAR               Importance;
+    LIST_ENTRY          DpcListEntry;
+    PKDEFERRED_ROUTINE  DeferredRoutine;
+    PVOID               DeferredContext;
+    PVOID               SystemArgument1;
+    PVOID               SystemArgument2;
+    PULONG              Lock;
+} KDPC, *PKDPC;
+
+
+typedef enum _INTERFACE_TYPE
+{
+    InterfaceTypeUndefined = -1,
+    Internal,
+    Isa,
+    Eisa,
+    MicroChannel,
+    TurboChannel,
+    PCIBus,
+    VMEBus,
+    NuBus,
+    PCMCIABus,
+    CBus,
+    MPIBus,
+    MPSABus,
+    ProcessorInternal,
+    InternalPowerBus,
+    PNPISABus,
+    MaximumInterfaceType
+} INTERFACE_TYPE, *PINTERFACE_TYPE;
+
+
+typedef enum _DMA_WIDTH
+{
+    Width8Bits,
+    Width16Bits,
+    Width32Bits,
+    MaximumDmaWidth
+} DMA_WIDTH, *PDMA_WIDTH;
+
+typedef enum _DMA_SPEED
+{
+    Compatible,
+    TypeA,
+    TypeB,
+    TypeC,
+    TypeF,
+    MaximumDmaSpeed
+} DMA_SPEED, *PDMA_SPEED;
+
+
+typedef enum _KINTERRUPT_MODE
+{
+    LevelSensitive,
+    Latched
+} KINTERRUPT_MODE;
+
+
+typedef struct _DMA_CONFIGURATION_BYTE0
+{
+    UCHAR   Channel:3;
+    UCHAR   Reserved:3;
+    UCHAR   Shared:1;
+    UCHAR   MoreEntries:1;
+} DMA_CONFIGURATION_BYTE0;
+
+typedef struct _DMA_CONFIGURATION_BYTE1
+{
+    UCHAR   Reserved0:2;
+    UCHAR   TransferSize:2;
+    UCHAR   Timing:2;
+    UCHAR   Reserved1:2;
+} DMA_CONFIGURATION_BYTE1;
+
+
+typedef struct _CM_MCA_POS_DATA
+{
+    USHORT  AdapterId;
+    UCHAR   PosData1;
+    UCHAR   PosData2;
+    UCHAR   PosData3;
+    UCHAR   PosData4;
+} CM_MCA_POS_DATA, *PCM_MCA_POS_DATA;
+
+typedef struct _EISA_MEMORY_TYPE
+{
+    UCHAR   ReadWrite:1;
+    UCHAR   Cached:1;
+    UCHAR   Reserved0:1;
+    UCHAR   Type:2;
+    UCHAR   Shared:1;
+    UCHAR   Reserved1:1;
+    UCHAR   MoreEntries:1;
+} EISA_MEMORY_TYPE, *PEISA_MEMORY_TYPE;
+
+typedef struct _EISA_MEMORY_CONFIGURATION
+{
+    EISA_MEMORY_TYPE    ConfigurationByte;
+    UCHAR   DataSize;
+    USHORT  AddressLowWord;
+    UCHAR   AddressHighByte;
+    USHORT  MemorySize;
+} EISA_MEMORY_CONFIGURATION, *PEISA_MEMORY_CONFIGURATION;
+
+
+typedef struct _EISA_IRQ_DESCRIPTOR
+{
+    UCHAR   Interrupt:4;
+    UCHAR   Reserved:1;
+    UCHAR   LevelTriggered:1;
+    UCHAR   Shared:1;
+    UCHAR   MoreEntries:1;
+} EISA_IRQ_DESCRIPTOR, *PEISA_IRQ_DESCRIPTOR;
+
+typedef struct _EISA_IRQ_CONFIGURATION
+{
+    EISA_IRQ_DESCRIPTOR ConfigurationByte;
+    UCHAR   Reserved;
+} EISA_IRQ_CONFIGURATION, *PEISA_IRQ_CONFIGURATION;
+
+typedef struct _EISA_DMA_CONFIGURATION
+{
+    DMA_CONFIGURATION_BYTE0 ConfigurationByte0;
+    DMA_CONFIGURATION_BYTE1 ConfigurationByte1;
+} EISA_DMA_CONFIGURATION, *PEISA_DMA_CONFIGURATION;
+
+
+typedef struct _EISA_PORT_DESCRIPTOR
+{
+    UCHAR   NumberPorts:5;
+    UCHAR   Reserved:1;
+    UCHAR   Shared:1;
+    UCHAR   MoreEntries:1;
+} EISA_PORT_DESCRIPTOR, *PEISA_PORT_DESCRIPTOR;
+
+typedef struct _EISA_PORT_CONFIGURATION
+{
+    EISA_PORT_DESCRIPTOR    Configuration;
+    USHORT  PortAddress;
+} EISA_PORT_CONFIGURATION, *PEISA_PORT_CONFIGURATION;
+
+typedef struct _CM_EISA_SLOT_INFORMATION
+{
+    UCHAR   ReturnCode;
+    UCHAR   ReturnFlags;
+    UCHAR   MajorRevision;
+    UCHAR   MinorRevision;
+    USHORT  Checksum;
+    UCHAR   NumberFunctions;
+    UCHAR   FunctionInformation;
+    ULONG   CompressedId;
+} CM_EISA_SLOT_INFORMATION, *PCM_EISA_SLOT_INFORMATION;
+
+typedef struct _CM_EISA_FUNCTION_INFORMATION
+{
+    ULONG   CompressedId;
+    UCHAR   IdSlotFlags1;
+    UCHAR   IdSlotFlags2;
+    UCHAR   MinorRevision;
+    UCHAR   MajorRevision;
+    UCHAR   Selections[26];
+    UCHAR   FunctionFlags;
+    UCHAR   TypeString[80];
+    EISA_MEMORY_CONFIGURATION   EisaMemory[9];
+    EISA_IRQ_CONFIGURATION      EisaIrq[7];
+    EISA_DMA_CONFIGURATION      EisaDma[4];
+    EISA_PORT_CONFIGURATION     EisaPort[20];
+    UCHAR   InitializationData[60];
+} CM_EISA_FUNCTION_INFORMATION, *PCM_EISA_FUNCTION_INFORMATION;
+
+
+typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR
+{
+    UCHAR   Type;
+    UCHAR   ShareDisposition;
+    USHORT  Flags;
+    union {
+        struct {
+            PHYSICAL_ADDRESS    Start;
+            ULONG               Length;
+        } Generic;
+
+        struct {
+            PHYSICAL_ADDRESS    Start;
+            ULONG               Length;
+        } Port;
+
+        struct {
+            ULONG   Level;
+            ULONG   Vector;
+            ULONG   Affinity;
+        } Interrupt;
+
+        struct {
+            PHYSICAL_ADDRESS    Start;
+            ULONG               Length;
+        } Memory;
+
+        struct {
+            ULONG   Channel;
+            ULONG   Port;
+            ULONG   Reserved1;
+        } Dma;
+
+        struct {
+            ULONG   Data[3];
+        } DevicePrivate;
+
+        struct {
+            ULONG   Start;
+            ULONG   Length;
+            ULONG   Reserved;
+        } BusNumber;
+
+        struct {
+            ULONG   DataSize;
+            ULONG   Reserved1;
+            ULONG   Reserved2;
+        } DeviceSpecificData;
+    } u;
+} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
+
+typedef struct _CM_PARTIAL_RESOURCE_LIST
+{
+    USHORT  Version;
+    USHORT  Revision;
+    ULONG   Count;
+    CM_PARTIAL_RESOURCE_DESCRIPTOR  PartialDescriptors[1];
+} CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
+
+typedef struct _CM_FULL_RESOURCE_DESCRIPTOR
+{
+    INTERFACE_TYPE  InterfaceType;
+    ULONG           BusNumber;
+    CM_PARTIAL_RESOURCE_LIST    PartialResourceList;
+} CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
+
+typedef struct _CM_RESOURCE_LIST
+{
+    ULONG   Count;
+    CM_FULL_RESOURCE_DESCRIPTOR List[1];
+} CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
+
+
+
+/* Operating System services */
+
+/* Debugging */
+
+ULONG CDECL DbgPrint(
+    PCH Format,
+    ...);
+
+#ifdef DBG
+
+VOID
+STDCALL
+RtlAssert(
+    PVOID   FailedAssertion,
+    PVOID   FileName,
+    ULONG   LineNumber,
+    PCHAR   Message);
+
+#define ASSERT(exp) \
+    if (!(exp)) \
+        RtlAssert(#exp, __FILE__, __LINE__, NULL)
+
+#define ASSERTMSG(msg, exp) \
+    if (!(exp)) \
+        RtlAssert(#exp, __FILE__, __LINE__, msg)
+
+#else /* DBG */
+
+#define ASSERT(exp)
+#define ASSERTMSG(msg, exp)
+
+#endif /* DBG */
+
+
+/* Runtime library */
+
+#define RtlEqualMemory(Destination,Source,Length)   (!memcmp((Destination), (Source), (Length)))
+#define RtlMoveMemory(Destination,Source,Length)    memmove((Destination), (Source), (Length))
+#define RtlCopyMemory(Destination,Source,Length)    memcpy((Destination), (Source), (Length))
+#define RtlFillMemory(Destination,Length,Fill)      memset((Destination), (Fill),(Length))
+#define RtlZeroMemory(Destination,Length)           memset((Destination), 0, (Length))
+
+
+/* Core kernel functions */
+
+VOID
+STDCALL
+KeStallExecutionProcessor(
+    ULONG   MicroSeconds);
+
+
+/* I/O functions */
+
+VOID
+STDCALL
+READ_PORT_BUFFER_UCHAR(
+    PUCHAR  Port,
+    PUCHAR  Value,
+    ULONG   Count);
+
+VOID
+STDCALL
+READ_PORT_BUFFER_ULONG(
+    PULONG  Port,
+    PULONG  Value,
+    ULONG   Count);
+
+VOID
+STDCALL
+READ_PORT_BUFFER_USHORT(
+    PUSHORT Port,
+    PUSHORT Value,
+    ULONG   Count);
+
+UCHAR
+STDCALL
+READ_PORT_UCHAR(
+    PUCHAR  Port);
+
+ULONG
+STDCALL
+READ_PORT_ULONG(
+    PULONG  Port);
+
+USHORT
+STDCALL
+READ_PORT_USHORT(
+    PUSHORT Port);
+
+VOID
+STDCALL
+WRITE_PORT_BUFFER_UCHAR(
+    PUCHAR  Port,
+    PUCHAR  Value,
+    ULONG   Count);
+
+VOID
+STDCALL
+WRITE_PORT_BUFFER_ULONG(
+    PULONG  Port,
+    PULONG  Value,
+    ULONG   Count);
+
+VOID
+STDCALL
+WRITE_PORT_BUFFER_USHORT(
+    PUSHORT Port,
+    PUSHORT Value,
+    ULONG   Count);
+
+VOID
+STDCALL
+WRITE_PORT_UCHAR(
+    PUCHAR  Port,
+    UCHAR   Value);
+
+VOID
+STDCALL
+WRITE_PORT_ULONG(
+    PULONG  Port,
+    ULONG   Value);
+
+VOID
+STDCALL
+WRITE_PORT_USHORT(
+    PUSHORT Port,
+    USHORT  Value);
+
+VOID
+STDCALL
+WRITE_REGISTER_UCHAR(
+    PUCHAR  Register,
+    UCHAR   Value);
+
+VOID
+STDCALL
+WRITE_REGISTER_ULONG(
+    PULONG  Register,
+    ULONG   Value);
+
+VOID
+STDCALL
+WRITE_REGISTER_USHORT(
+    PUSHORT Register,
+    USHORT  Value);
+
+#endif /* __MINIPORT_H */
+
+/* EOF */
index 703d608..6398809 100644 (file)
-/*\r
- * COPYRIGHT:   See COPYING in the top level directory\r
- * PROJECT:     ReactOS NDIS library\r
- * FILE:        include/net/ndis.h\r
- * PURPOSE:     Structures used by NDIS drivers\r
- * DEFINES:     i386                 - Target platform is i386\r
- *              NDIS_WRAPPER         - Define only for NDIS wrapper library\r
- *              NDIS_MINIPORT_DRIVER - Define only for NDIS miniport drivers\r
- *              BINARY_COMPATIBLE    - 0 = Use macros for some features\r
- *                                   - 1 = Use imports for features not available\r
- *              NDIS40               - Use NDIS 4.0 structures by default\r
- *              NDIS50               - Use NDIS 5.0 structures by default\r
- */\r
-#ifndef __NDIS_H\r
-#define __NDIS_H\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif /* __cplusplus */\r
-\r
-#ifdef NDIS50\r
-#undef NDIS40\r
-#define NDIS40\r
-#endif\r
-\r
-\r
-/* Windows 9x compatibillity for miniports on x86 platform */\r
-#ifndef BINARY_COMPATIBLE\r
-#if defined(NDIS_MINIPORT_DRIVER) && defined(i386)\r
-#define BINARY_COMPATIBLE 1\r
-#else\r
-#define BINARY_COMPATIBLE 0\r
-#endif\r
-#endif\r
-\r
-#define UNALIGNED\r
-\r
-\r
-/* The NDIS library export functions. NDIS miniport drivers import functions */\r
-#ifdef NDIS_WRAPPER\r
-\r
-#ifdef _MSC_VER\r
-#define EXPIMP __declspec(dllexport)\r
-#else\r
-#define EXPIMP STDCALL\r
-#endif\r
-\r
-#else /* NDIS_WRAPPER */\r
-\r
-#ifdef _MSC_VER\r
-#define EXPIMP __declspec(dllimport)\r
-#else\r
-#define EXPIMP STDCALL\r
-#endif\r
-\r
-#endif /* NDIS_WRAPPER */\r
-\r
-\r
-\r
-#ifdef NDIS_MINIPORT_DRIVER\r
-\r
-#include "miniport.h"\r
-\r
-#else /* NDIS_MINIPORT_DRIVER */\r
-\r
-#ifdef _MSC_VER\r
-#include <ntddk.h>\r
-\r
-typedef ULONG ULONG_PTR, *PULONG_PTR;\r
-\r
-#else /* _MSC_VER */\r
-#include <ddk/ntddk.h>\r
-\r
-/* FIXME: Missed some definitions in there */\r
-\r
-typedef struct _DMA_CONFIGURATION_BYTE0\r
-{\r
-    UCHAR   Channel:3;\r
-    UCHAR   Reserved:3;\r
-    UCHAR   Shared:1;\r
-    UCHAR   MoreEntries:1;\r
-} DMA_CONFIGURATION_BYTE0;\r
-\r
-typedef struct _DMA_CONFIGURATION_BYTE1\r
-{\r
-    UCHAR   Reserved0:2;\r
-    UCHAR   TransferSize:2;\r
-    UCHAR   Timing:2;\r
-    UCHAR   Reserved1:2;\r
-} DMA_CONFIGURATION_BYTE1;\r
-\r
-\r
-typedef struct _CM_MCA_POS_DATA\r
-{\r
-    USHORT  AdapterId;\r
-    UCHAR   PosData1;\r
-    UCHAR   PosData2;\r
-    UCHAR   PosData3;\r
-    UCHAR   PosData4;\r
-} CM_MCA_POS_DATA, *PCM_MCA_POS_DATA;\r
-\r
-typedef struct _EISA_MEMORY_TYPE\r
-{\r
-    UCHAR   ReadWrite:1;\r
-    UCHAR   Cached:1;\r
-    UCHAR   Reserved0:1;\r
-    UCHAR   Type:2;\r
-    UCHAR   Shared:1;\r
-    UCHAR   Reserved1:1;\r
-    UCHAR   MoreEntries:1;\r
-} EISA_MEMORY_TYPE, *PEISA_MEMORY_TYPE;\r
-\r
-typedef struct _EISA_MEMORY_CONFIGURATION\r
-{\r
-    EISA_MEMORY_TYPE    ConfigurationByte;\r
-    UCHAR   DataSize;\r
-    USHORT  AddressLowWord;\r
-    UCHAR   AddressHighByte;\r
-    USHORT  MemorySize;\r
-} EISA_MEMORY_CONFIGURATION, *PEISA_MEMORY_CONFIGURATION;\r
-\r
-\r
-typedef struct _EISA_IRQ_DESCRIPTOR\r
-{\r
-    UCHAR   Interrupt:4;\r
-    UCHAR   Reserved:1;\r
-    UCHAR   LevelTriggered:1;\r
-    UCHAR   Shared:1;\r
-    UCHAR   MoreEntries:1;\r
-} EISA_IRQ_DESCRIPTOR, *PEISA_IRQ_DESCRIPTOR;\r
-\r
-typedef struct _EISA_IRQ_CONFIGURATION\r
-{\r
-    EISA_IRQ_DESCRIPTOR ConfigurationByte;\r
-    UCHAR   Reserved;\r
-} EISA_IRQ_CONFIGURATION, *PEISA_IRQ_CONFIGURATION;\r
-\r
-typedef struct _EISA_DMA_CONFIGURATION\r
-{\r
-    DMA_CONFIGURATION_BYTE0 ConfigurationByte0;\r
-    DMA_CONFIGURATION_BYTE1 ConfigurationByte1;\r
-} EISA_DMA_CONFIGURATION, *PEISA_DMA_CONFIGURATION;\r
-\r
-\r
-typedef struct _EISA_PORT_DESCRIPTOR\r
-{\r
-    UCHAR   NumberPorts:5;\r
-    UCHAR   Reserved:1;\r
-    UCHAR   Shared:1;\r
-    UCHAR   MoreEntries:1;\r
-} EISA_PORT_DESCRIPTOR, *PEISA_PORT_DESCRIPTOR;\r
-\r
-typedef struct _EISA_PORT_CONFIGURATION\r
-{\r
-    EISA_PORT_DESCRIPTOR    Configuration;\r
-    USHORT  PortAddress;\r
-} EISA_PORT_CONFIGURATION, *PEISA_PORT_CONFIGURATION;\r
-\r
-typedef struct _CM_EISA_SLOT_INFORMATION\r
-{\r
-    UCHAR   ReturnCode;\r
-    UCHAR   ReturnFlags;\r
-    UCHAR   MajorRevision;\r
-    UCHAR   MinorRevision;\r
-    USHORT  Checksum;\r
-    UCHAR   NumberFunctions;\r
-    UCHAR   FunctionInformation;\r
-    ULONG   CompressedId;\r
-} CM_EISA_SLOT_INFORMATION, *PCM_EISA_SLOT_INFORMATION;\r
-\r
-typedef struct _CM_EISA_FUNCTION_INFORMATION\r
-{\r
-    ULONG   CompressedId;\r
-    UCHAR   IdSlotFlags1;\r
-    UCHAR   IdSlotFlags2;\r
-    UCHAR   MinorRevision;\r
-    UCHAR   MajorRevision;\r
-    UCHAR   Selections[26];\r
-    UCHAR   FunctionFlags;\r
-    UCHAR   TypeString[80];\r
-    EISA_MEMORY_CONFIGURATION   EisaMemory[9];\r
-    EISA_IRQ_CONFIGURATION      EisaIrq[7];\r
-    EISA_DMA_CONFIGURATION      EisaDma[4];\r
-    EISA_PORT_CONFIGURATION     EisaPort[20];\r
-    UCHAR   InitializationData[60];\r
-} CM_EISA_FUNCTION_INFORMATION, *PCM_EISA_FUNCTION_INFORMATION;\r
-\r
-#endif /* _MSC_VER */\r
-\r
-/* FIXME: Missed some definitions in there */\r
-\r
-typedef CONST CHAR *PCSTR;\r
-\r
-/* Could be defined in tdi.h */\r
-#ifndef __TDI_H\r
-typedef signed int INT, *PINT;\r
-#endif /* __TDI_H */\r
-\r
-#endif /* NDIS_MINIPORT_DRIVER */\r
-\r
-#include "netevent.h"\r
-#include "ndisoid.h"\r
-\r
-\r
-\r
-/* More types */\r
-\r
-typedef ULONG ULONG_PTR, *PULONG_PTR;\r
-\r
-\r
-#if defined(NDIS_MINIPORT_DRIVER) || !defined(_MSC_VER)\r
-\r
-typedef struct _GUID {\r
-    ULONG   Data1;\r
-    USHORT  Data2;\r
-    USHORT  Data3;\r
-    UCHAR   Data4[8];\r
-} GUID;\r
-\r
-#endif /* NDIS_MINIPORT_DRIVER || _MSC_VER */\r
-\r
-\r
-/* NDIS base types */\r
-\r
-typedef struct _NDIS_SPIN_LOCK\r
-{\r
-    KSPIN_LOCK  SpinLock;\r
-    KIRQL       OldIrql;\r
-} NDIS_SPIN_LOCK, * PNDIS_SPIN_LOCK;\r
-\r
-typedef struct _NDIS_EVENT\r
-{\r
-    KEVENT  Event;\r
-} NDIS_EVENT, *PNDIS_EVENT;\r
-\r
-typedef PVOID NDIS_HANDLE, *PNDIS_HANDLE;\r
-typedef int NDIS_STATUS, *PNDIS_STATUS;\r
-\r
-typedef UNICODE_STRING NDIS_STRING, *PNDIS_STRING;\r
-\r
-typedef PCSTR NDIS_ANSI_STRING, *PNDIS_ANSI_STRING;\r
-\r
-typedef MDL NDIS_BUFFER, *PNDIS_BUFFER;\r
-\r
-/* NDIS_STATUS constants */\r
-#define NDIS_STATUS_SUCCESS                     ((NDIS_STATUS)STATUS_SUCCESS)\r
-#define NDIS_STATUS_PENDING                     ((NDIS_STATUS)STATUS_PENDING)\r
-#define NDIS_STATUS_NOT_RECOGNIZED              ((NDIS_STATUS)0x00010001L)\r
-#define NDIS_STATUS_NOT_COPIED                  ((NDIS_STATUS)0x00010002L)\r
-#define NDIS_STATUS_NOT_ACCEPTED                ((NDIS_STATUS)0x00010003L)\r
-#define NDIS_STATUS_CALL_ACTIVE                 ((NDIS_STATUS)0x00010007L)\r
-\r
-#define NDIS_STATUS_ONLINE                      ((NDIS_STATUS)0x40010003L)\r
-#define NDIS_STATUS_RESET_START                 ((NDIS_STATUS)0x40010004L)\r
-#define NDIS_STATUS_RESET_END                   ((NDIS_STATUS)0x40010005L)\r
-#define NDIS_STATUS_RING_STATUS                 ((NDIS_STATUS)0x40010006L)\r
-#define NDIS_STATUS_CLOSED                      ((NDIS_STATUS)0x40010007L)\r
-#define NDIS_STATUS_WAN_LINE_UP                 ((NDIS_STATUS)0x40010008L)\r
-#define NDIS_STATUS_WAN_LINE_DOWN               ((NDIS_STATUS)0x40010009L)\r
-#define NDIS_STATUS_WAN_FRAGMENT                ((NDIS_STATUS)0x4001000AL)\r
-#define        NDIS_STATUS_MEDIA_CONNECT               ((NDIS_STATUS)0x4001000BL)\r
-#define        NDIS_STATUS_MEDIA_DISCONNECT            ((NDIS_STATUS)0x4001000CL)\r
-#define NDIS_STATUS_HARDWARE_LINE_UP            ((NDIS_STATUS)0x4001000DL)\r
-#define NDIS_STATUS_HARDWARE_LINE_DOWN          ((NDIS_STATUS)0x4001000EL)\r
-#define NDIS_STATUS_INTERFACE_UP                ((NDIS_STATUS)0x4001000FL)\r
-#define NDIS_STATUS_INTERFACE_DOWN              ((NDIS_STATUS)0x40010010L)\r
-#define NDIS_STATUS_MEDIA_BUSY                  ((NDIS_STATUS)0x40010011L)\r
-#define        NDIS_STATUS_WW_INDICATION               ((NDIS_STATUS)0x40010012L)\r
-#define NDIS_STATUS_TAPI_INDICATION             ((NDIS_STATUS)0x40010080L)\r
-\r
-#define NDIS_STATUS_NOT_RESETTABLE              ((NDIS_STATUS)0x80010001L)\r
-#define NDIS_STATUS_SOFT_ERRORS                        ((NDIS_STATUS)0x80010003L)\r
-#define NDIS_STATUS_HARD_ERRORS                 ((NDIS_STATUS)0x80010004L)\r
-#define NDIS_STATUS_BUFFER_OVERFLOW                ((NDIS_STATUS)STATUS_BUFFER_OVERFLOW)\r
-\r
-#define NDIS_STATUS_FAILURE                        ((NDIS_STATUS)STATUS_UNSUCCESSFUL)\r
-#define NDIS_STATUS_RESOURCES                   ((NDIS_STATUS)STATUS_INSUFFICIENT_RESOURCES)\r
-#define NDIS_STATUS_CLOSING                        ((NDIS_STATUS)0xC0010002L)\r
-#define NDIS_STATUS_BAD_VERSION                        ((NDIS_STATUS)0xC0010004L)\r
-#define NDIS_STATUS_BAD_CHARACTERISTICS         ((NDIS_STATUS)0xC0010005L)\r
-#define NDIS_STATUS_ADAPTER_NOT_FOUND           ((NDIS_STATUS)0xC0010006L)\r
-#define NDIS_STATUS_OPEN_FAILED                        ((NDIS_STATUS)0xC0010007L)\r
-#define NDIS_STATUS_DEVICE_FAILED               ((NDIS_STATUS)0xC0010008L)\r
-#define NDIS_STATUS_MULTICAST_FULL              ((NDIS_STATUS)0xC0010009L)\r
-#define NDIS_STATUS_MULTICAST_EXISTS            ((NDIS_STATUS)0xC001000AL)\r
-#define NDIS_STATUS_MULTICAST_NOT_FOUND                ((NDIS_STATUS)0xC001000BL)\r
-#define NDIS_STATUS_REQUEST_ABORTED                ((NDIS_STATUS)0xC001000CL)\r
-#define NDIS_STATUS_RESET_IN_PROGRESS           ((NDIS_STATUS)0xC001000DL)\r
-#define NDIS_STATUS_CLOSING_INDICATING          ((NDIS_STATUS)0xC001000EL)\r
-#define NDIS_STATUS_NOT_SUPPORTED               ((NDIS_STATUS)STATUS_NOT_SUPPORTED)\r
-#define NDIS_STATUS_INVALID_PACKET              ((NDIS_STATUS)0xC001000FL)\r
-#define NDIS_STATUS_OPEN_LIST_FULL              ((NDIS_STATUS)0xC0010010L)\r
-#define NDIS_STATUS_ADAPTER_NOT_READY           ((NDIS_STATUS)0xC0010011L)\r
-#define NDIS_STATUS_ADAPTER_NOT_OPEN            ((NDIS_STATUS)0xC0010012L)\r
-#define NDIS_STATUS_NOT_INDICATING              ((NDIS_STATUS)0xC0010013L)\r
-#define NDIS_STATUS_INVALID_LENGTH              ((NDIS_STATUS)0xC0010014L)\r
-#define NDIS_STATUS_INVALID_DATA                ((NDIS_STATUS)0xC0010015L)\r
-#define NDIS_STATUS_BUFFER_TOO_SHORT            ((NDIS_STATUS)0xC0010016L)\r
-#define NDIS_STATUS_INVALID_OID                        ((NDIS_STATUS)0xC0010017L)\r
-#define NDIS_STATUS_ADAPTER_REMOVED                ((NDIS_STATUS)0xC0010018L)\r
-#define NDIS_STATUS_UNSUPPORTED_MEDIA           ((NDIS_STATUS)0xC0010019L)\r
-#define NDIS_STATUS_GROUP_ADDRESS_IN_USE        ((NDIS_STATUS)0xC001001AL)\r
-#define NDIS_STATUS_FILE_NOT_FOUND              ((NDIS_STATUS)0xC001001BL)\r
-#define NDIS_STATUS_ERROR_READING_FILE          ((NDIS_STATUS)0xC001001CL)\r
-#define NDIS_STATUS_ALREADY_MAPPED              ((NDIS_STATUS)0xC001001DL)\r
-#define NDIS_STATUS_RESOURCE_CONFLICT           ((NDIS_STATUS)0xC001001EL)\r
-#define NDIS_STATUS_NO_CABLE                    ((NDIS_STATUS)0xC001001FL)\r
-\r
-#define NDIS_STATUS_INVALID_SAP                        ((NDIS_STATUS)0xC0010020L)\r
-#define NDIS_STATUS_SAP_IN_USE                  ((NDIS_STATUS)0xC0010021L)\r
-#define NDIS_STATUS_INVALID_ADDRESS             ((NDIS_STATUS)0xC0010022L)\r
-#define NDIS_STATUS_VC_NOT_ACTIVATED            ((NDIS_STATUS)0xC0010023L)\r
-#define NDIS_STATUS_DEST_OUT_OF_ORDER           ((NDIS_STATUS)0xC0010024L)\r
-#define NDIS_STATUS_VC_NOT_AVAILABLE            ((NDIS_STATUS)0xC0010025L)\r
-#define NDIS_STATUS_CELLRATE_NOT_AVAILABLE      ((NDIS_STATUS)0xC0010026L)\r
-#define NDIS_STATUS_INCOMPATABLE_QOS            ((NDIS_STATUS)0xC0010027L)\r
-#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED      ((NDIS_STATUS)0xC0010028L)\r
-#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION     ((NDIS_STATUS)0xC0010029L)\r
-\r
-#define NDIS_STATUS_TOKEN_RING_OPEN_ERROR       ((NDIS_STATUS)0xC0011000L)\r
-\r
-\r
-/* NDIS error codes for error logging */\r
-\r
-#define NDIS_ERROR_CODE ULONG\r
-\r
-#define NDIS_ERROR_CODE_RESOURCE_CONFLICT                      EVENT_NDIS_RESOURCE_CONFLICT\r
-#define NDIS_ERROR_CODE_OUT_OF_RESOURCES                       EVENT_NDIS_OUT_OF_RESOURCE\r
-#define NDIS_ERROR_CODE_HARDWARE_FAILURE                       EVENT_NDIS_HARDWARE_FAILURE\r
-#define NDIS_ERROR_CODE_ADAPTER_NOT_FOUND                      EVENT_NDIS_ADAPTER_NOT_FOUND\r
-#define NDIS_ERROR_CODE_INTERRUPT_CONNECT                      EVENT_NDIS_INTERRUPT_CONNECT\r
-#define NDIS_ERROR_CODE_DRIVER_FAILURE                         EVENT_NDIS_DRIVER_FAILURE\r
-#define NDIS_ERROR_CODE_BAD_VERSION                                    EVENT_NDIS_BAD_VERSION\r
-#define NDIS_ERROR_CODE_TIMEOUT                                                EVENT_NDIS_TIMEOUT\r
-#define NDIS_ERROR_CODE_NETWORK_ADDRESS                                EVENT_NDIS_NETWORK_ADDRESS\r
-#define NDIS_ERROR_CODE_UNSUPPORTED_CONFIGURATION      EVENT_NDIS_UNSUPPORTED_CONFIGURATION\r
-#define NDIS_ERROR_CODE_INVALID_VALUE_FROM_ADAPTER     EVENT_NDIS_INVALID_VALUE_FROM_ADAPTER\r
-#define NDIS_ERROR_CODE_MISSING_CONFIGURATION_PARAMETER        EVENT_NDIS_MISSING_CONFIGURATION_PARAMETER\r
-#define NDIS_ERROR_CODE_BAD_IO_BASE_ADDRESS                    EVENT_NDIS_BAD_IO_BASE_ADDRESS\r
-#define NDIS_ERROR_CODE_RECEIVE_SPACE_SMALL                    EVENT_NDIS_RECEIVE_SPACE_SMALL\r
-#define NDIS_ERROR_CODE_ADAPTER_DISABLED                       EVENT_NDIS_ADAPTER_DISABLED\r
-\r
-\r
-/* Memory allocation flags. Used by Ndis(Allocate|Free)Memory */\r
-#define NDIS_MEMORY_CONTIGUOUS  0x00000001\r
-#define NDIS_MEMORY_NONCACHED   0x00000002\r
-\r
-/* NIC attribute flags. Used by NdisMSetAttributes(Ex) */\r
-#define        NDIS_ATTRIBUTE_IGNORE_PACKET_TIMEOUT    0x00000001\r
-#define NDIS_ATTRIBUTE_IGNORE_REQUEST_TIMEOUT   0x00000002\r
-#define NDIS_ATTRIBUTE_IGNORE_TOKEN_RING_ERRORS 0x00000004\r
-#define NDIS_ATTRIBUTE_BUS_MASTER               0x00000008\r
-#define NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER      0x00000010\r
-\r
-\r
-\r
-#define        MAXIMUM_PROCESSORS  32\r
-\r
-\r
-\r
-/* Lock */\r
-\r
-typedef union _NDIS_RW_LOCK_REFCOUNT\r
-{\r
-    UINT    RefCount;\r
-    UCHAR   cacheLine[16];\r
-} NDIS_RW_LOCK_REFCOUNT;\r
-\r
-typedef struct _NDIS_RW_LOCK\r
-{\r
-    union\r
-    {\r
-        struct\r
-        {\r
-            KSPIN_LOCK          SpinLock;\r
-            PVOID               Context;\r
-        };\r
-        UCHAR                   Reserved[16];\r
-        };\r
-\r
-    NDIS_RW_LOCK_REFCOUNT       RefCount[MAXIMUM_PROCESSORS];\r
-} NDIS_RW_LOCK, *PNDIS_RW_LOCK;\r
-\r
-typedef struct _LOCK_STATE\r
-{\r
-    USHORT  LockState;\r
-    KIRQL   OldIrql;\r
-} LOCK_STATE, *PLOCK_STATE;\r
-\r
-\r
-\r
-/* Timer */\r
-\r
-typedef VOID (*PNDIS_TIMER_FUNCTION)(\r
-    IN  PVOID   SystemSpecific1,\r
-    IN  PVOID   FunctionContext,\r
-    IN  PVOID   SystemSpecific2,\r
-    IN  PVOID   SystemSpecific3);\r
-\r
-typedef struct _NDIS_TIMER\r
-{\r
-    KTIMER  Timer;\r
-    KDPC    Dpc;\r
-} NDIS_TIMER, *PNDIS_TIMER;\r
-\r
-\r
-\r
-/* Hardware */\r
-\r
-typedef CM_MCA_POS_DATA NDIS_MCA_POS_DATA, *PNDIS_MCA_POS_DATA;\r
-typedef CM_EISA_SLOT_INFORMATION NDIS_EISA_SLOT_INFORMATION, *PNDIS_EISA_SLOT_INFORMATION;\r
-typedef CM_EISA_FUNCTION_INFORMATION NDIS_EISA_FUNCTION_INFORMATION, *PNDIS_EISA_FUNCTION_INFORMATION;\r
-typedef CM_PARTIAL_RESOURCE_LIST NDIS_RESOURCE_LIST, *PNDIS_RESOURCE_LIST;\r
-\r
-/* Hardware status codes (OID_GEN_HARDWARE_STATUS) */\r
-typedef enum _NDIS_HARDWARE_STATUS\r
-{\r
-    NdisHardwareStatusReady,\r
-    NdisHardwareStatusInitializing,\r
-    NdisHardwareStatusReset,\r
-    NdisHardwareStatusClosing,\r
-    NdisHardwareStatusNotReady\r
-} NDIS_HARDWARE_STATUS, *PNDIS_HARDWARE_STATUS;\r
-\r
-/* OID_GEN_GET_TIME_CAPS */\r
-typedef struct _GEN_GET_TIME_CAPS\r
-{\r
-    ULONG                       Flags;\r
-    ULONG                       ClockPrecision;\r
-} GEN_GET_TIME_CAPS, *PGEN_GET_TIME_CAPS;\r
-\r
-/* Flag bits */\r
-#define        READABLE_LOCAL_CLOCK                    0x00000001\r
-#define        CLOCK_NETWORK_DERIVED                   0x00000002\r
-#define        CLOCK_PRECISION                         0x00000004\r
-#define        RECEIVE_TIME_INDICATION_CAPABLE         0x00000008\r
-#define        TIMED_SEND_CAPABLE                      0x00000010\r
-#define        TIME_STAMP_CAPABLE                      0x00000020\r
-\r
-/* OID_GEN_GET_NETCARD_TIME */\r
-typedef struct _GEN_GET_NETCARD_TIME\r
-{\r
-    ULONGLONG   ReadTime;\r
-} GEN_GET_NETCARD_TIME, *PGEN_GET_NETCARD_TIME;\r
-\r
-/* NDIS driver medium (OID_GEN_MEDIA_SUPPORTED / OID_GEN_MEDIA_IN_USE) */\r
-typedef enum _NDIS_MEDIUM\r
-{\r
-    NdisMedium802_3,\r
-    NdisMedium802_5,\r
-    NdisMediumFddi,\r
-    NdisMediumWan,\r
-    NdisMediumLocalTalk,\r
-    NdisMediumDix,              /* Defined for convenience, not a real medium */\r
-    NdisMediumArcnetRaw,\r
-    NdisMediumArcnet878_2,\r
-    NdisMediumAtm,\r
-    NdisMediumWirelessWan,\r
-    NdisMediumIrda,\r
-    NdisMediumBpc,\r
-    NdisMediumCoWan,\r
-    NdisMedium1394,\r
-    NdisMediumMax\r
-} NDIS_MEDIUM, *PNDIS_MEDIUM;\r
-\r
-/* NDIS packet filter bits (OID_GEN_CURRENT_PACKET_FILTER) */\r
-#define NDIS_PACKET_TYPE_DIRECTED               0x00000001\r
-#define NDIS_PACKET_TYPE_MULTICAST              0x00000002\r
-#define NDIS_PACKET_TYPE_ALL_MULTICAST          0x00000004\r
-#define NDIS_PACKET_TYPE_BROADCAST              0x00000008\r
-#define NDIS_PACKET_TYPE_SOURCE_ROUTING         0x00000010\r
-#define NDIS_PACKET_TYPE_PROMISCUOUS            0x00000020\r
-#define NDIS_PACKET_TYPE_SMT                    0x00000040\r
-#define NDIS_PACKET_TYPE_ALL_LOCAL              0x00000080\r
-#define NDIS_PACKET_TYPE_GROUP                  0x00001000\r
-#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL         0x00002000\r
-#define NDIS_PACKET_TYPE_FUNCTIONAL             0x00004000\r
-#define NDIS_PACKET_TYPE_MAC_FRAME              0x00008000\r
-\r
-/* NDIS protocol option bits (OID_GEN_PROTOCOL_OPTIONS) */\r
-#define NDIS_PROT_OPTION_ESTIMATED_LENGTH       0x00000001\r
-#define NDIS_PROT_OPTION_NO_LOOPBACK            0x00000002\r
-#define NDIS_PROT_OPTION_NO_RSVD_ON_RCVPKT      0x00000004\r
-\r
-/* NDIS MAC option bits (OID_GEN_MAC_OPTIONS) */\r
-#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA     0x00000001\r
-#define NDIS_MAC_OPTION_RECEIVE_SERIALIZED      0x00000002\r
-#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND      0x00000004\r
-#define NDIS_MAC_OPTION_NO_LOOPBACK             0x00000008\r
-#define NDIS_MAC_OPTION_FULL_DUPLEX             0x00000010\r
-#define        NDIS_MAC_OPTION_EOTX_INDICATION         0x00000020\r
-#define        NDIS_MAC_OPTION_8021P_PRIORITY          0x00000040\r
-#define NDIS_MAC_OPTION_RESERVED                0x80000000\r
-\r
-/* State of the LAN media (OID_GEN_MEDIA_CONNECT_STATUS) */\r
-typedef enum _NDIS_MEDIA_STATE\r
-{\r
-    NdisMediaStateConnected,\r
-    NdisMediaStateDisconnected\r
-} NDIS_MEDIA_STATE, *PNDIS_MEDIA_STATE;\r
-\r
-/* OID_GEN_SUPPORTED_GUIDS */\r
-typedef struct _NDIS_GUID\r
-{\r
-    GUID            Guid;\r
-    union\r
-    {\r
-        NDIS_OID    Oid;\r
-        NDIS_STATUS Status;\r
-    };\r
-    ULONG           Size;\r
-    ULONG           Flags;\r
-} NDIS_GUID, *PNDIS_GUID;\r
-\r
-#define        NDIS_GUID_TO_OID            0x00000001\r
-#define        NDIS_GUID_TO_STATUS         0x00000002\r
-#define        NDIS_GUID_ANSI_STRING       0x00000004\r
-#define        NDIS_GUID_UNICODE_STRING    0x00000008\r
-#define        NDIS_GUID_ARRAY             0x00000010\r
-\r
-\r
-\r
-typedef struct _NDIS_PACKET_POOL\r
-{\r
-    NDIS_SPIN_LOCK      SpinLock;\r
-    struct _NDIS_PACKET *FreeList;\r
-    UINT                PacketLength;\r
-    UCHAR               Buffer[1];\r
-} NDIS_PACKET_POOL, * PNDIS_PACKET_POOL;\r
-\r
-typedef struct _NDIS_PACKET_PRIVATE\r
-{\r
-    UINT                PhysicalCount;\r
-    UINT                TotalLength;\r
-    PNDIS_BUFFER        Head;\r
-    PNDIS_BUFFER        Tail;\r
-    PNDIS_PACKET_POOL   Pool;\r
-    UINT                Count;\r
-    ULONG               Flags;                  /* See fPACKET_xxx bits below */\r
-    BOOLEAN                ValidCounts;\r
-    UCHAR               NdisPacketFlags;\r
-    USHORT              NdisPacketOobOffset;\r
-} NDIS_PACKET_PRIVATE, * PNDIS_PACKET_PRIVATE;\r
-\r
-#define fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO    0x40\r
-#define fPACKET_ALLOCATED_BY_NDIS               0x80\r
-\r
-typedef struct _NDIS_PACKET {\r
-    NDIS_PACKET_PRIVATE  Private;\r
-    union {\r
-        struct {\r
-             UCHAR       MiniportReserved[2*sizeof(PVOID)];\r
-             UCHAR       WrapperReserved[2*sizeof(PVOID)];\r
-        };\r
-        struct {\r
-             UCHAR       MiniportReservedEx[3*sizeof(PVOID)];\r
-             UCHAR       WrapperReservedEx[sizeof(PVOID)];\r
-        };\r
-        struct {\r
-             UCHAR       MacReserved[4*sizeof(PVOID)];\r
-        };\r
-    };\r
-    ULONG_PTR            Reserved[2];\r
-    UCHAR                ProtocolReserved[1];\r
-} NDIS_PACKET, *PNDIS_PACKET, **PPNDIS_PACKET;\r
-\r
-typedef struct _NDIS_PACKET_OOB_DATA {\r
-    union {\r
-        ULONGLONG  TimeToSend;\r
-        ULONGLONG  TimeSent;\r
-    };\r
-    ULONGLONG      TimeReceived;\r
-    UINT           HeaderSize;\r
-    UINT           SizeMediaSpecificInfo;\r
-    PVOID          MediaSpecificInformation;\r
-    NDIS_STATUS    Status;\r
-} NDIS_PACKET_OOB_DATA, *PNDIS_PACKET_OOB_DATA;\r
-\r
-typedef struct _NDIS_PM_PACKET_PATTERN\r
-{\r
-    ULONG  Priority;\r
-    ULONG  Reserved;\r
-    ULONG  MaskSize;\r
-    ULONG  PatternOffset;\r
-    ULONG  PatternSize;\r
-    ULONG  PatternFlags;\r
-} NDIS_PM_PACKET_PATTERN,  *PNDIS_PM_PACKET_PATTERN;\r
-\r
-\r
-/* Request types used by NdisRequest */\r
-typedef enum _NDIS_REQUEST_TYPE\r
-{\r
-    NdisRequestQueryInformation,\r
-    NdisRequestSetInformation,\r
-    NdisRequestQueryStatistics,\r
-    NdisRequestOpen,\r
-    NdisRequestClose,\r
-    NdisRequestSend,\r
-    NdisRequestTransferData,\r
-    NdisRequestReset,\r
-    NdisRequestGeneric1,\r
-    NdisRequestGeneric2,\r
-    NdisRequestGeneric3,\r
-    NdisRequestGeneric4\r
-} NDIS_REQUEST_TYPE, *PNDIS_REQUEST_TYPE;\r
-\r
-typedef struct _NDIS_REQUEST {\r
-    UCHAR             MacReserved[16];\r
-    NDIS_REQUEST_TYPE RequestType;\r
-    union _DATA {\r
-        struct QUERY_INFORMATION {\r
-            NDIS_OID  Oid;\r
-            PVOID     InformationBuffer;\r
-            UINT      InformationBufferLength;\r
-            UINT      BytesWritten;\r
-            UINT      BytesNeeded;\r
-        } QUERY_INFORMATION;\r
-        struct SET_INFORMATION {\r
-            NDIS_OID  Oid;\r
-            PVOID     InformationBuffer;\r
-            UINT      InformationBufferLength;\r
-            UINT      BytesRead;\r
-            UINT      BytesNeeded;\r
-        } SET_INFORMATION;\r
-   } DATA;\r
-} NDIS_REQUEST, *PNDIS_REQUEST;\r
-\r
-\r
-\r
-/* Wide Area Networks definitions */\r
-\r
-typedef struct _NDIS_WAN_PACKET\r
-{\r
-    LIST_ENTRY  WanPacketQueue;\r
-    PUCHAR      CurrentBuffer;\r
-    ULONG       CurrentLength;\r
-    PUCHAR      StartBuffer;\r
-    PUCHAR      EndBuffer;\r
-    PVOID       ProtocolReserved1;\r
-    PVOID       ProtocolReserved2;\r
-    PVOID       ProtocolReserved3;\r
-    PVOID       ProtocolReserved4;\r
-    PVOID       MacReserved1;\r
-    PVOID       MacReserved2;\r
-    PVOID       MacReserved3;\r
-    PVOID       MacReserved4;\r
-} NDIS_WAN_PACKET, *PNDIS_WAN_PACKET;\r
-\r
-\r
-\r
-/* DMA channel information */\r
-\r
-typedef struct _NDIS_DMA_DESCRIPTION\r
-{\r
-    BOOLEAN     DemandMode;\r
-    BOOLEAN     AutoInitialize;\r
-    BOOLEAN     DmaChannelSpecified;\r
-    DMA_WIDTH   DmaWidth;\r
-    DMA_SPEED   DmaSpeed;\r
-    ULONG       DmaPort;\r
-    ULONG       DmaChannel;\r
-} NDIS_DMA_DESCRIPTION, *PNDIS_DMA_DESCRIPTION;\r
-\r
-typedef struct _NDIS_DMA_BLOCK\r
-{\r
-    PVOID           MapRegisterBase;\r
-    KEVENT          AllocationEvent;\r
-    PADAPTER_OBJECT SystemAdapterObject;\r
-    BOOLEAN         InProgress;\r
-} NDIS_DMA_BLOCK, *PNDIS_DMA_BLOCK;\r
-\r
-\r
-/* Possible hardware architecture */\r
-typedef enum _NDIS_INTERFACE_TYPE\r
-{\r
-       NdisInterfaceInternal       = Internal,\r
-       NdisInterfaceIsa            = Isa,\r
-       NdisInterfaceEisa           = Eisa,\r
-       NdisInterfaceMca            = MicroChannel,\r
-       NdisInterfaceTurboChannel   = TurboChannel,\r
-       NdisInterfacePci            = PCIBus,\r
-       NdisInterfacePcMcia         = PCMCIABus\r
-} NDIS_INTERFACE_TYPE, *PNDIS_INTERFACE_TYPE;\r
-\r
-#define NdisInterruptLatched        Latched\r
-#define NdisInterruptLevelSensitive LevelSensitive\r
-typedef KINTERRUPT_MODE NDIS_INTERRUPT_MODE, *PNDIS_INTERRUPT_MODE;\r
-\r
-\r
-typedef enum _NDIS_PARAMETER_TYPE\r
-{\r
-    NdisParameterInteger,\r
-    NdisParameterHexInteger,\r
-    NdisParameterString,\r
-    NdisParameterMultiString\r
-} NDIS_PARAMETER_TYPE, *PNDIS_PARAMETER_TYPE;\r
-\r
-typedef struct _NDIS_CONFIGURATION_PARAMETER\r
-{\r
-    NDIS_PARAMETER_TYPE ParameterType;\r
-    union\r
-    {\r
-        ULONG IntegerData;\r
-        NDIS_STRING StringData;\r
-    } ParameterData;\r
-} NDIS_CONFIGURATION_PARAMETER, *PNDIS_CONFIGURATION_PARAMETER;\r
-\r
-\r
-typedef PHYSICAL_ADDRESS NDIS_PHYSICAL_ADDRESS, *PNDIS_PHYSICAL_ADDRESS;\r
-\r
-typedef struct _NDIS_PHYSICAL_ADDRESS_UNIT\r
-{\r
-       NDIS_PHYSICAL_ADDRESS           PhysicalAddress;\r
-       UINT                                            Length;\r
-} NDIS_PHYSICAL_ADDRESS_UNIT, *PNDIS_PHYSICAL_ADDRESS_UNIT;\r
-\r
-\r
-typedef VOID (*ADAPTER_SHUTDOWN_HANDLER)(\r
-    IN  PVOID   ShutdownContext);\r
-\r
-\r
-\r
-#if defined(NDIS_WRAPPER) || !defined(NDIS_MINIPORT_DRIVER)\r
-\r
-/* Structures available only to full MAC drivers */\r
-\r
-typedef BOOLEAN (*PNDIS_INTERRUPT_SERVICE)(\r
-    IN  PVOID   InterruptContext);\r
-\r
-typedef VOID (*PNDIS_DEFERRED_PROCESSING)(\r
-    IN  PVOID   SystemSpecific1,\r
-    IN  PVOID   InterruptContext,\r
-    IN  PVOID   SystemSpecific2,\r
-    IN  PVOID   SystemSpecific3);\r
-\r
-\r
-typedef struct _NDIS_INTERRUPT\r
-{\r
-    PKINTERRUPT                 InterruptObject;\r
-    KSPIN_LOCK                  DpcCountLock;\r
-    PNDIS_INTERRUPT_SERVICE     MacIsr;\r
-    PNDIS_DEFERRED_PROCESSING   MacDpc;\r
-    KDPC                        InterruptDpc;\r
-    PVOID                       InterruptContext;\r
-    UCHAR                       DpcCount;\r
-    BOOLEAN                     Removing;\r
-    /* Used to tell when all DPCs for the adapter are completed */\r
-    KEVENT                                             DpcsCompletedEvent;\r
-} NDIS_INTERRUPT, *PNDIS_INTERRUPT;\r
-\r
-\r
-/* NDIS adapter information */\r
-\r
-typedef NDIS_STATUS (*PNDIS_ACTIVATE_CALLBACK)(\r
-    IN  NDIS_HANDLE NdisAdatperHandle,\r
-    IN  NDIS_HANDLE MacAdapterContext,\r
-    IN  ULONG       DmaChannel);\r
-\r
-typedef struct _NDIS_PORT_DESCRIPTOR\r
-{\r
-    ULONG   InitialPort;\r
-    ULONG   NumberOfPorts;\r
-    PVOID * PortOffset;\r
-} NDIS_PORT_DESCRIPTOR, *PNDIS_PORT_DESCRIPTOR;\r
-\r
-typedef struct _NDIS_ADAPTER_INFORMATION\r
-{\r
-    ULONG                   DmaChannel;\r
-    BOOLEAN                    Master;\r
-    BOOLEAN                    Dma32BitAddresses;\r
-    PNDIS_ACTIVATE_CALLBACK ActivateCallback;\r
-    NDIS_INTERFACE_TYPE     AdapterType;\r
-    ULONG                   PhysicalMapRegistersNeeded;\r
-    ULONG                   MaximumPhysicalMapping;\r
-    ULONG                   NumberOfPortDescriptors;\r
-    NDIS_PORT_DESCRIPTOR    PortDescriptors[1];\r
-} NDIS_ADAPTER_INFORMATION, *PNDIS_ADAPTER_INFORMATION;\r
-\r
-\r
-/* Prototypes for NDIS_MAC_CHARACTERISTICS */\r
-\r
-typedef NDIS_STATUS (*OPEN_ADAPTER_HANDLER)(\r
-    OUT PNDIS_STATUS    OpenErrorStatus,\r
-    OUT NDIS_HANDLE *   MacBindingHandle,\r
-    OUT PUINT           SelectedMediumIndex,\r
-    IN  PNDIS_MEDIUM    MediumArray,\r
-    IN  UINT            MediumArraySize,\r
-    IN  NDIS_HANDLE     NdisBindingContext,\r
-    IN  NDIS_HANDLE     MacAdapterContext,\r
-    IN  UINT            OpenOptions,\r
-    IN  PSTRING         AddressingInformation OPTIONAL);\r
-\r
-typedef NDIS_STATUS (*CLOSE_ADAPTER_HANDLER)(\r
-    IN  NDIS_HANDLE MacBindingHandle);\r
-\r
-typedef NDIS_STATUS (*SEND_HANDLER)(\r
-    IN  NDIS_HANDLE     MacBindingHandle,\r
-    IN  PNDIS_PACKET    Packet);\r
-\r
-typedef NDIS_STATUS (*WAN_SEND_HANDLER)(\r
-    IN  NDIS_HANDLE         MacBindingHandle,\r
-    IN  PNDIS_WAN_PACKET    Packet);\r
-\r
-typedef NDIS_STATUS (*TRANSFER_DATA_HANDLER)(\r
-    IN  NDIS_HANDLE     MacBindingHandle,\r
-    IN  NDIS_HANDLE     MacReceiveContext,\r
-    IN  UINT            ByteOffset,\r
-    IN  UINT            BytesToTransfer,\r
-    OUT PNDIS_PACKET    Packet,\r
-    OUT PUINT           BytesTransferred);\r
-\r
-typedef NDIS_STATUS (*WAN_TRANSFER_DATA_HANDLER)(\r
-    VOID);\r
-\r
-typedef NDIS_STATUS (*RESET_HANDLER)(\r
-    IN  NDIS_HANDLE MacBindingHandle);\r
-\r
-typedef NDIS_STATUS (*REQUEST_HANDLER)(\r
-    IN  NDIS_HANDLE     MacBindingHandle,\r
-    IN  PNDIS_REQUEST   NdisRequest);\r
-\r
-typedef NDIS_STATUS (*QUERY_GLOBAL_STATISTICS_HANDLER)(\r
-    IN  NDIS_HANDLE     MacAdapterContext,\r
-    IN  PNDIS_REQUEST   NdisRequest);\r
-\r
-typedef VOID (*UNLOAD_MAC_HANDLER)(\r
-    IN  NDIS_HANDLE MacMacContext);\r
-\r
-typedef NDIS_STATUS (*ADD_ADAPTER_HANDLER)(\r
-    IN  NDIS_HANDLE     MacMacContext,\r
-    IN  NDIS_HANDLE     WrapperConfigurationContext,\r
-    IN  PNDIS_STRING    AdapterName);\r
-\r
-typedef VOID (*REMOVE_ADAPTER_HANDLER)(\r
-    IN  NDIS_HANDLE MacAdapterContext);\r
-\r
-typedef struct _NDIS_MAC_CHARACTERISTICS\r
-{\r
-    UCHAR                           MajorNdisVersion;\r
-    UCHAR                           MinorNdisVersion;\r
-    UINT                            Reserved;\r
-    OPEN_ADAPTER_HANDLER            OpenAdapterHandler;\r
-    CLOSE_ADAPTER_HANDLER           CloseAdapterHandler;\r
-    SEND_HANDLER                    SendHandler;\r
-    TRANSFER_DATA_HANDLER           TransferDataHandler;\r
-    RESET_HANDLER                   ResetHandler;\r
-    REQUEST_HANDLER                 RequestHandler;\r
-    QUERY_GLOBAL_STATISTICS_HANDLER QueryGlobalStatisticsHandler;\r
-    UNLOAD_MAC_HANDLER              UnloadMacHandler;\r
-    ADD_ADAPTER_HANDLER             AddAdapterHandler;\r
-    REMOVE_ADAPTER_HANDLER          RemoveAdapterHandler;\r
-    NDIS_STRING                     Name;\r
-} NDIS_MAC_CHARACTERISTICS, *PNDIS_MAC_CHARACTERISTICS;\r
-\r
-typedef        NDIS_MAC_CHARACTERISTICS        NDIS_WAN_MAC_CHARACTERISTICS;\r
-typedef        NDIS_WAN_MAC_CHARACTERISTICS    *PNDIS_WAN_MAC_CHARACTERISTICS;\r
-\r
-\r
-\r
-/* Functions available only to full MAC drivers */\r
-\r
-VOID\r
-EXPIMP\r
-NdisAllocateSharedMemory(\r
-    IN  NDIS_HANDLE             NdisAdapterHandle,\r
-    IN  ULONG                   Length,\r
-    IN  BOOLEAN                 Cached,\r
-    OUT PVOID                   *VirtualAddress,\r
-    OUT PNDIS_PHYSICAL_ADDRESS  PhysicalAddress);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCompleteCloseAdapter(\r
-    IN  NDIS_HANDLE NdisBindingContext,\r
-    IN  NDIS_STATUS Status);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCompleteOpenAdapter(\r
-    IN  NDIS_HANDLE NdisBindingContext,\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_STATUS OpenErrorStatus);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisDeregisterAdapter(\r
-    IN  NDIS_HANDLE NdisAdapterHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisDeregisterAdapterShutdownHandler(\r
-    IN  NDIS_HANDLE NdisAdapterHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisFreeSharedMemory(\r
-    IN  NDIS_HANDLE             NdisAdapterHandle,\r
-    IN  ULONG                   Length,\r
-    IN  BOOLEAN                 Cached,\r
-    IN  PVOID                   VirtualAddress,\r
-    IN  NDIS_PHYSICAL_ADDRESS   PhysicalAddress);\r
-\r
-VOID\r
-EXPIMP\r
-NdisInitializeInterrupt(\r
-    OUT     PNDIS_STATUS                Status,\r
-    IN OUT  PNDIS_INTERRUPT             Interrupt,\r
-    IN      NDIS_HANDLE                 NdisAdapterHandle,\r
-    IN      PNDIS_INTERRUPT_SERVICE     InterruptServiceRoutine,\r
-    IN      PVOID                       InterruptContext,\r
-    IN      PNDIS_DEFERRED_PROCESSING   DeferredProcessingRoutine,\r
-    IN      UINT                        InterruptVector,\r
-    IN      UINT                        InterruptLevel,\r
-    IN      BOOLEAN                     SharedInterrupt,\r
-    IN      NDIS_INTERRUPT_MODE         InterruptMode);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMapIoSpace(\r
-    OUT PNDIS_STATUS            Status,\r
-    OUT PVOID                   *VirtualAddress,\r
-    IN  NDIS_HANDLE             NdisAdapterHandle,\r
-    IN  NDIS_PHYSICAL_ADDRESS   PhysicalAddress,\r
-    IN  UINT                    Length);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisRegisterAdapter(\r
-    OUT PNDIS_HANDLE    NdisAdapterHandle,\r
-    IN  NDIS_HANDLE     NdisMacHandle,\r
-    IN  NDIS_HANDLE     MacAdapterContext,\r
-    IN  NDIS_HANDLE     WrapperConfigurationContext,\r
-    IN  PNDIS_STRING    AdapterName,\r
-    IN  PVOID           AdapterInformation);\r
-\r
-VOID\r
-EXPIMP\r
-NdisRegisterAdapterShutdownHandler(\r
-    IN  NDIS_HANDLE                 NdisAdapterHandle,\r
-    IN  PVOID                       ShutdownContext,\r
-    IN  ADAPTER_SHUTDOWN_HANDLER    ShutdownHandler);\r
-\r
-VOID\r
-EXPIMP\r
-NdisRegisterMac(\r
-    OUT PNDIS_STATUS                Status,\r
-    OUT PNDIS_HANDLE                NdisMacHandle,\r
-    IN  NDIS_HANDLE                 NdisWrapperHandle,\r
-    IN  NDIS_HANDLE                 MacMacContext,\r
-    IN  PNDIS_MAC_CHARACTERISTICS   MacCharacteristics,\r
-    IN  UINT                        CharacteristicsLength);\r
-\r
-VOID\r
-EXPIMP\r
-NdisReleaseAdapterResources(\r
-    IN  NDIS_HANDLE NdisAdapterHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisRemoveInterrupt(\r
-    IN  PNDIS_INTERRUPT Interrupt);\r
-\r
-#endif /* NDIS_WRAPPER || !NDIS_MINIPORT_DRIVER */\r
-\r
-\r
-\r
-#ifdef NDIS50\r
-\r
-typedef struct _ATM_ADDRESS ATM_ADDRESS, *PATM_ADDRESS;\r
-\r
-\r
-/* OID_GEN_NETWORK_LAYER_ADDRESSES */\r
-typedef struct _NETWORK_ADDRESS\r
-{\r
-    USHORT  AddressLength; \r
-    USHORT  AddressType; \r
-    UCHAR   Address[1]; \r
-} NETWORK_ADDRESS, *PNETWORK_ADDRESS;\r
-\r
-typedef struct _NETWORK_ADDRESS_LIST \r
-{\r
-    LONG    AddressCount; \r
-    USHORT  AddressType; \r
-    NETWORK_ADDRESS Address[1]; \r
-} NETWORK_ADDRESS_LIST, *PNETWORK_ADDRESS_LIST;\r
-\r
-/* Protocol types supported by NDIS */\r
-#define        NDIS_PROTOCOL_ID_DEFAULT        0x00\r
-#define        NDIS_PROTOCOL_ID_TCP_IP         0x02\r
-#define        NDIS_PROTOCOL_ID_IPX            0x06\r
-#define        NDIS_PROTOCOL_ID_NBF            0x07\r
-#define        NDIS_PROTOCOL_ID_MAX            0x0F\r
-#define        NDIS_PROTOCOL_ID_MASK           0x0F\r
-\r
-/* OID_GEN_TRANSPORT_HEADER_OFFSET */\r
-typedef struct _TRANSPORT_HEADER_OFFSET\r
-{\r
-    USHORT  ProtocolType; \r
-    USHORT  HeaderOffset; \r
-} TRANSPORT_HEADER_OFFSET, *PTRANSPORT_HEADER_OFFSET;\r
-\r
-\r
-/* OID_GEN_CO_LINK_SPEED / OID_GEN_CO_MINIMUM_LINK_SPEED */\r
-typedef struct _NDIS_CO_LINK_SPEED\r
-{\r
-    ULONG   Outbound;\r
-    ULONG   Inbound;\r
-} NDIS_CO_LINK_SPEED, *PNDIS_CO_LINK_SPEED;\r
-\r
-\r
-typedef enum _NDIS_AF\r
-{\r
-    CO_ADDRESS_FAMILY_Q2931 = 1,\r
-    CO_ADDRESS_FAMILY_SPANS,\r
-} NDIS_AF, *PNDIS_AF;\r
-\r
-typedef struct\r
-{\r
-    NDIS_AF  AddressFamily;\r
-    ULONG    MajorVersion;\r
-    ULONG    MinorVersion;\r
-} CO_ADDRESS_FAMILY, *PCO_ADDRESS_FAMILY;\r
-\r
-typedef enum\r
-{\r
-    BestEffortService,\r
-    PredictiveService,\r
-    GuaranteedService\r
-} GUARANTEE;\r
-\r
-typedef struct _CO_FLOW_PARAMETERS\r
-{\r
-    ULONG       TokenRate;              /* In Bytes/sec */\r
-    ULONG       TokenBucketSize;        /* In Bytes */\r
-    ULONG       PeakBandwidth;          /* In Bytes/sec */\r
-    ULONG       Latency;                /* In microseconds */\r
-    ULONG       DelayVariation;         /* In microseconds */\r
-    GUARANTEE   LevelOfGuarantee;       /* Guaranteed, Predictive or Best Effort */\r
-    ULONG       CostOfCall;             /* Reserved for future use, */\r
-                                        /* must be set to 0 now */\r
-    ULONG       NetworkAvailability;    /* read-only: 1 if accessible, 0 if not */\r
-    ULONG       MaxSduSize;             /* In Bytes */\r
-} CO_FLOW_PARAMETERS, *PCO_FLOW_PARAMETERS;\r
-\r
-typedef struct _CO_SPECIFIC_PARAMETERS\r
-{\r
-    ULONG   ParamType;\r
-    ULONG   Length;\r
-    UCHAR   Parameters[1];\r
-} CO_SPECIFIC_PARAMETERS, *PCO_SPECIFIC_PARAMETERS;\r
-\r
-typedef struct _CO_CALL_MANAGER_PARAMETERS {\r
-    CO_FLOW_PARAMETERS      Transmit;\r
-    CO_FLOW_PARAMETERS      Receive;\r
-    CO_SPECIFIC_PARAMETERS  CallMgrSpecific;\r
-} CO_CALL_MANAGER_PARAMETERS, *PCO_CALL_MANAGER_PARAMETERS;\r
-\r
-typedef struct _CO_MEDIA_PARAMETERS\r
-{\r
-    ULONG                       Flags;\r
-    ULONG                       ReceivePriority;\r
-    ULONG                       ReceiveSizeHint;\r
-    CO_SPECIFIC_PARAMETERS      MediaSpecific;\r
-} CO_MEDIA_PARAMETERS, *PCO_MEDIA_PARAMETERS;\r
-\r
-/* Definitions for the flags in CO_MEDIA_PARAMETERS */\r
-#define RECEIVE_TIME_INDICATION         0x00000001\r
-#define USE_TIME_STAMPS                 0x00000002\r
-#define TRANSMIT_VC                        0x00000004\r
-#define RECEIVE_VC                      0x00000008\r
-#define INDICATE_ERRED_PACKETS          0x00000010\r
-#define INDICATE_END_OF_TX              0x00000020\r
-#define RESERVE_RESOURCES_VC            0x00000040\r
-#define        ROUND_DOWN_FLOW                 0x00000080\r
-#define        ROUND_UP_FLOW                   0x00000100\r
-\r
-typedef struct _CO_CALL_PARAMETERS\r
-{\r
-    ULONG                           Flags;\r
-    PCO_CALL_MANAGER_PARAMETERS     CallMgrParameters;\r
-    PCO_MEDIA_PARAMETERS            MediaParameters;\r
-} CO_CALL_PARAMETERS, *PCO_CALL_PARAMETERS;\r
-\r
-typedef struct _CO_SAP {\r
-    ULONG   SapType;\r
-    ULONG   SapLength;\r
-    UCHAR   Sap[1];\r
-} CO_SAP, *PCO_SAP;\r
-\r
-typedef struct _NDIS_IPSEC_PACKET_INFO\r
-{\r
-    union\r
-    {\r
-        struct\r
-        {\r
-            NDIS_HANDLE    OffloadHandle;\r
-            NDIS_HANDLE    NextOffloadHandle;\r
-        } Transmit;\r
\r
-        struct\r
-        {\r
-            ULONG    SA_DELETE_REQ:1;\r
-            ULONG    CRYPTO_DONE:1;\r
-            ULONG    NEXT_CRYPTO_DONE:1;\r
-            ULONG    CryptoStatus;\r
-        } Receive;\r
-    };\r
-} NDIS_IPSEC_PACKET_INFO, *PNDIS_IPSEC_PACKET_INFO;\r
-\r
-\r
-/* Plug and play and power management */\r
-\r
-/* PnP and PM event codes */\r
-typedef enum _NET_PNP_EVENT_CODE\r
-{\r
-    NetEventSetPower,\r
-    NetEventQueryPower,\r
-    NetEventQueryRemoveDevice,\r
-    NetEventCancelRemoveDevice,\r
-    NetEventReconfigure,\r
-    NetEventBindList,\r
-    NetEventBindsComplete,\r
-    NetEventPnPCapabilities,\r
-    NetEventMaximum\r
-} NET_PNP_EVENT_CODE, *PNET_PNP_EVENT_CODE;\r
-\r
-/* Networking PnP event indication structure */\r
-typedef struct _NET_PNP_EVENT\r
-{\r
-    /* Event code */\r
-    NET_PNP_EVENT_CODE  NetEvent;\r
-    /* Event specific data */\r
-    PVOID               Buffer;\r
-    /* Length of event specific data */\r
-    ULONG               BufferLength;\r
-\r
-    /* Reserved areas */\r
-       ULONG_PTR           NdisReserved[4];\r
-       ULONG_PTR           TransportReserved[4];\r
-       ULONG_PTR           TdiReserved[4];\r
-       ULONG_PTR           TdiClientReserved[4];\r
-} NET_PNP_EVENT, *PNET_PNP_EVENT;\r
-\r
-/* Device power state structure */\r
-typedef enum _NET_DEVICE_POWER_STATE\r
-{\r
-    NetDeviceStateUnspecified = 0,\r
-    NetDeviceStateD0,\r
-    NetDeviceStateD1,\r
-    NetDeviceStateD2,\r
-    NetDeviceStateD3,\r
-    NetDeviceStateMaximum\r
-} NET_DEVICE_POWER_STATE, *PNET_DEVICE_POWER_STATE;\r
-\r
-\r
-\r
-/* Call Manager */\r
-\r
-typedef NDIS_STATUS (*CO_CREATE_VC_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolAfContext,\r
-    IN  NDIS_HANDLE     NdisVcHandle,\r
-    OUT PNDIS_HANDLE    ProtocolVcContext);\r
-\r
-typedef NDIS_STATUS (*CO_DELETE_VC_HANDLER)(\r
-    IN  NDIS_HANDLE ProtocolVcContext);\r
-\r
-typedef NDIS_STATUS (*CO_REQUEST_HANDLER)(\r
-    IN  NDIS_HANDLE         ProtocolAfContext,\r
-    IN  NDIS_HANDLE         ProtocolVcContext       OPTIONAL,\r
-    IN  NDIS_HANDLE            ProtocolPartyContext    OPTIONAL,\r
-    IN  OUT PNDIS_REQUEST   NdisRequest);\r
-\r
-typedef VOID (*CO_REQUEST_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS     Status,\r
-    IN  NDIS_HANDLE     ProtocolAfContext       OPTIONAL,\r
-    IN  NDIS_HANDLE     ProtocolVcContext       OPTIONAL,\r
-    IN  NDIS_HANDLE     ProtocolPartyContext    OPTIONAL,\r
-    IN  PNDIS_REQUEST   NdisRequest);\r
-\r
-\r
-typedef NDIS_STATUS (*CM_OPEN_AF_HANDLER)(\r
-       IN      NDIS_HANDLE                             CallMgrBindingContext,\r
-       IN      PCO_ADDRESS_FAMILY              AddressFamily,\r
-       IN      NDIS_HANDLE                             NdisAfHandle,\r
-       OUT     PNDIS_HANDLE                    CallMgrAfContext\r
-       );\r
-\r
-typedef\r
-NDIS_STATUS\r
-(*CM_CLOSE_AF_HANDLER)(\r
-       IN      NDIS_HANDLE                             CallMgrAfContext\r
-       );\r
-\r
-typedef\r
-NDIS_STATUS\r
-(*CM_REG_SAP_HANDLER)(\r
-       IN      NDIS_HANDLE                             CallMgrAfContext,\r
-       IN      PCO_SAP                                 Sap,\r
-       IN      NDIS_HANDLE                             NdisSapHandle,\r
-       OUT     PNDIS_HANDLE                    CallMgrSapContext\r
-       );\r
-\r
-typedef\r
-NDIS_STATUS\r
-(*CM_DEREG_SAP_HANDLER)(\r
-       IN      NDIS_HANDLE                             CallMgrSapContext\r
-       );\r
-\r
-typedef\r
-NDIS_STATUS\r
-(*CM_MAKE_CALL_HANDLER)(\r
-       IN      NDIS_HANDLE                             CallMgrVcContext,\r
-       IN OUT PCO_CALL_PARAMETERS      CallParameters,\r
-       IN      NDIS_HANDLE                             NdisPartyHandle         OPTIONAL,\r
-       OUT     PNDIS_HANDLE                    CallMgrPartyContext OPTIONAL\r
-       );\r
-\r
-typedef\r
-NDIS_STATUS\r
-(*CM_CLOSE_CALL_HANDLER)(\r
-       IN      NDIS_HANDLE                             CallMgrVcContext,\r
-       IN      NDIS_HANDLE                             CallMgrPartyContext     OPTIONAL,\r
-       IN      PVOID                                   CloseData                       OPTIONAL,\r
-       IN      UINT                                    Size                            OPTIONAL\r
-       );\r
-\r
-typedef\r
-VOID\r
-(*CM_INCOMING_CALL_COMPLETE_HANDLER)(\r
-       IN      NDIS_STATUS                             Status,\r
-       IN      NDIS_HANDLE                             CallMgrVcContext,\r
-       IN      PCO_CALL_PARAMETERS             CallParameters\r
-       );\r
-\r
-typedef\r
-NDIS_STATUS\r
-(*CM_ADD_PARTY_HANDLER)(\r
-       IN      NDIS_HANDLE                             CallMgrVcContext,\r
-       IN OUT PCO_CALL_PARAMETERS      CallParameters,\r
-       IN      NDIS_HANDLE                             NdisPartyHandle,\r
-       OUT     PNDIS_HANDLE                    CallMgrPartyContext\r
-       );\r
-\r
-typedef\r
-NDIS_STATUS\r
-(*CM_DROP_PARTY_HANDLER)(\r
-       IN      NDIS_HANDLE                             CallMgrPartyContext,\r
-       IN      PVOID                                   CloseData       OPTIONAL,\r
-       IN      UINT                                    Size            OPTIONAL\r
-       );\r
-\r
-typedef\r
-VOID\r
-(*CM_ACTIVATE_VC_COMPLETE_HANDLER)(\r
-       IN      NDIS_STATUS                             Status,\r
-       IN      NDIS_HANDLE                             CallMgrVcContext,\r
-       IN      PCO_CALL_PARAMETERS             CallParameters\r
-       );\r
-\r
-typedef\r
-VOID\r
-(*CM_DEACTIVATE_VC_COMPLETE_HANDLER)(\r
-       IN      NDIS_STATUS                             Status,\r
-       IN      NDIS_HANDLE                             CallMgrVcContext\r
-       );\r
-\r
-typedef\r
-NDIS_STATUS\r
-(*CM_MODIFY_CALL_QOS_HANDLER)(\r
-       IN      NDIS_HANDLE                             CallMgrVcContext,\r
-       IN      PCO_CALL_PARAMETERS             CallParameters\r
-       );\r
-\r
-typedef struct _NDIS_CALL_MANAGER_CHARACTERISTICS\r
-{\r
-    UCHAR   MajorVersion;\r
-    UCHAR   MinorVersion;\r
-\r
-    USHORT  Filler;\r
-    UINT    Reserved;\r
-\r
-    CO_CREATE_VC_HANDLER                CmCreateVcHandler;\r
-    CO_DELETE_VC_HANDLER                CmDeleteVcHandler;\r
-    CM_OPEN_AF_HANDLER                  CmOpenAfHandler;\r
-    CM_CLOSE_AF_HANDLER                        CmCloseAfHandler;\r
-    CM_REG_SAP_HANDLER                  CmRegisterSapHandler;\r
-    CM_DEREG_SAP_HANDLER                CmDeregisterSapHandler;\r
-    CM_MAKE_CALL_HANDLER                CmMakeCallHandler;\r
-    CM_CLOSE_CALL_HANDLER               CmCloseCallHandler;\r
-    CM_INCOMING_CALL_COMPLETE_HANDLER   CmIncomingCallCompleteHandler;\r
-    CM_ADD_PARTY_HANDLER                CmAddPartyHandler;\r
-    CM_DROP_PARTY_HANDLER               CmDropPartyHandler;\r
-    CM_ACTIVATE_VC_COMPLETE_HANDLER     CmActivateVcCompleteHandler;\r
-    CM_DEACTIVATE_VC_COMPLETE_HANDLER   CmDeactivateVcCompleteHandler;\r
-    CM_MODIFY_CALL_QOS_HANDLER          CmModifyCallQoSHandler;\r
-    CO_REQUEST_HANDLER                  CmRequestHandler;\r
-    CO_REQUEST_COMPLETE_HANDLER         CmRequestCompleteHandler;\r
-} NDIS_CALL_MANAGER_CHARACTERISTICS, *PNDIS_CALL_MANAGER_CHARACTERISTICS;\r
-\r
-\r
-\r
-/* Call Manager clients */\r
-\r
-typedef VOID (*CL_OPEN_AF_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE ProtocolAfContext,\r
-    IN  NDIS_HANDLE NdisAfHandle);\r
-\r
-typedef VOID (*CL_CLOSE_AF_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE ProtocolAfContext);\r
-\r
-typedef VOID (*CL_REG_SAP_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE ProtocolSapContext,\r
-    IN  PCO_SAP     Sap,\r
-    IN  NDIS_HANDLE NdisSapHandle);\r
-\r
-typedef VOID (*CL_DEREG_SAP_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE ProtocolSapContext);\r
-\r
-typedef VOID (*CL_MAKE_CALL_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS         Status,\r
-    IN  NDIS_HANDLE         ProtocolVcContext,\r
-    IN  NDIS_HANDLE         NdisPartyHandle     OPTIONAL,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-typedef VOID (*CL_MODIFY_CALL_QOS_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS         Status,\r
-    IN  NDIS_HANDLE         ProtocolVcContext,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-typedef VOID (*CL_CLOSE_CALL_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE ProtocolVcContext,\r
-    IN  NDIS_HANDLE ProtocolPartyContext    OPTIONAL);\r
-\r
-typedef VOID (*CL_ADD_PARTY_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS         Status,\r
-    IN  NDIS_HANDLE         ProtocolPartyContext,\r
-    IN  NDIS_HANDLE         NdisPartyHandle,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-typedef VOID (*CL_DROP_PARTY_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE ProtocolPartyContext);\r
-\r
-typedef NDIS_STATUS (*CL_INCOMING_CALL_HANDLER)(\r
-    IN  NDIS_HANDLE             ProtocolSapContext,\r
-    IN  NDIS_HANDLE             ProtocolVcContext,\r
-    IN  OUT PCO_CALL_PARAMETERS CallParameters);\r
-\r
-typedef VOID (*CL_INCOMING_CALL_QOS_CHANGE_HANDLER)(\r
-    IN  NDIS_HANDLE         ProtocolVcContext,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-typedef VOID (*CL_INCOMING_CLOSE_CALL_HANDLER)(\r
-    IN  NDIS_STATUS CloseStatus,\r
-    IN  NDIS_HANDLE ProtocolVcContext,\r
-    IN  PVOID       CloseData   OPTIONAL,\r
-    IN  UINT        Size        OPTIONAL);\r
-\r
-typedef VOID (*CL_INCOMING_DROP_PARTY_HANDLER)(\r
-    IN  NDIS_STATUS DropStatus,\r
-    IN  NDIS_HANDLE ProtocolPartyContext,\r
-    IN  PVOID       CloseData   OPTIONAL,\r
-    IN  UINT        Size        OPTIONAL);\r
-\r
-typedef VOID (*CL_CALL_CONNECTED_HANDLER)(\r
-    IN  NDIS_HANDLE ProtocolVcContext);\r
-\r
-\r
-typedef struct _NDIS_CLIENT_CHARACTERISTICS\r
-{\r
-    UCHAR   MajorVersion;\r
-    UCHAR   MinorVersion;\r
-\r
-    USHORT  Filler;\r
-    UINT    Reserved;\r
-\r
-    CO_CREATE_VC_HANDLER                ClCreateVcHandler;\r
-    CO_DELETE_VC_HANDLER                ClDeleteVcHandler;\r
-    CO_REQUEST_HANDLER                  ClRequestHandler;\r
-    CO_REQUEST_COMPLETE_HANDLER         ClRequestCompleteHandler;\r
-    CL_OPEN_AF_COMPLETE_HANDLER         ClOpenAfCompleteHandler;\r
-    CL_CLOSE_AF_COMPLETE_HANDLER        ClCloseAfCompleteHandler;\r
-    CL_REG_SAP_COMPLETE_HANDLER         ClRegisterSapCompleteHandler;\r
-    CL_DEREG_SAP_COMPLETE_HANDLER       ClDeregisterSapCompleteHandler;\r
-    CL_MAKE_CALL_COMPLETE_HANDLER       ClMakeCallCompleteHandler;\r
-    CL_MODIFY_CALL_QOS_COMPLETE_HANDLER        ClModifyCallQoSCompleteHandler;\r
-    CL_CLOSE_CALL_COMPLETE_HANDLER      ClCloseCallCompleteHandler;\r
-    CL_ADD_PARTY_COMPLETE_HANDLER       ClAddPartyCompleteHandler;\r
-    CL_DROP_PARTY_COMPLETE_HANDLER      ClDropPartyCompleteHandler;\r
-    CL_INCOMING_CALL_HANDLER            ClIncomingCallHandler;\r
-    CL_INCOMING_CALL_QOS_CHANGE_HANDLER ClIncomingCallQoSChangeHandler;\r
-    CL_INCOMING_CLOSE_CALL_HANDLER      ClIncomingCloseCallHandler;\r
-    CL_INCOMING_DROP_PARTY_HANDLER      ClIncomingDropPartyHandler;\r
-    CL_CALL_CONNECTED_HANDLER           ClCallConnectedHandler;\r
-} NDIS_CLIENT_CHARACTERISTICS, *PNDIS_CLIENT_CHARACTERISTICS;\r
-\r
-#endif /* NDIS50 */\r
-\r
-\r
-\r
-/* NDIS protocol structures */\r
-\r
-/* Prototypes for NDIS 3.0 protocol characteristics */\r
-\r
-typedef VOID (*OPEN_ADAPTER_COMPLETE_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  NDIS_STATUS     Status,\r
-    IN  NDIS_STATUS     OpenErrorStatus);\r
-\r
-typedef VOID (*CLOSE_ADAPTER_COMPLETE_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  NDIS_STATUS     Status);\r
-\r
-typedef VOID (*RESET_COMPLETE_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  NDIS_STATUS     Status);\r
-\r
-typedef VOID (*REQUEST_COMPLETE_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  PNDIS_REQUEST   NdisRequest,\r
-    IN  NDIS_STATUS     Status);\r
-\r
-typedef VOID (*STATUS_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  NDIS_STATUS     GeneralStatus,\r
-    IN  PVOID           StatusBuffer,\r
-    IN  UINT            StatusBufferSize);\r
-\r
-typedef VOID (*STATUS_COMPLETE_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext);\r
-\r
-typedef VOID (*SEND_COMPLETE_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  PNDIS_PACKET    Packet,\r
-    IN  NDIS_STATUS     Status);\r
-\r
-typedef VOID (*WAN_SEND_COMPLETE_HANDLER)(\r
-    IN  NDIS_HANDLE         ProtocolBindingContext,\r
-    IN  PNDIS_WAN_PACKET    Packet,\r
-    IN  NDIS_STATUS         Status);\r
-\r
-typedef VOID (*TRANSFER_DATA_COMPLETE_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  PNDIS_PACKET    Packet,\r
-    IN  NDIS_STATUS     Status,\r
-    IN  UINT            BytesTransferred);\r
-\r
-typedef VOID (*WAN_TRANSFER_DATA_COMPLETE_HANDLER)(\r
-    VOID);\r
-\r
-typedef NDIS_STATUS (*RECEIVE_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  NDIS_HANDLE     MacReceiveContext,\r
-    IN  PVOID           HeaderBuffer,\r
-    IN  UINT            HeaderBufferSize,\r
-    IN  PVOID           LookAheadBuffer,\r
-    IN  UINT            LookaheadBufferSize,\r
-    IN  UINT            PacketSize);\r
-\r
-typedef NDIS_STATUS (*WAN_RECEIVE_HANDLER)(\r
-    IN  NDIS_HANDLE     NdisLinkHandle,\r
-    IN  PUCHAR          Packet,\r
-    IN  ULONG           PacketSize);\r
-\r
-typedef VOID (*RECEIVE_COMPLETE_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext);\r
-\r
-\r
-/* Protocol characteristics for NDIS 3.0 protocols */\r
-typedef struct _NDIS30_PROTOCOL_CHARACTERISTICS\r
-{\r
-    UCHAR                           MajorNdisVersion;\r
-    UCHAR                           MinorNdisVersion;\r
-    union\r
-    {\r
-        UINT                        Reserved;\r
-        UINT                        Flags;\r
-    };\r
-    OPEN_ADAPTER_COMPLETE_HANDLER   OpenAdapterCompleteHandler;\r
-    CLOSE_ADAPTER_COMPLETE_HANDLER  CloseAdapterCompleteHandler;\r
-    union\r
-    {\r
-        SEND_COMPLETE_HANDLER       SendCompleteHandler;\r
-        WAN_SEND_COMPLETE_HANDLER   WanSendCompleteHandler;\r
-    };\r
-    union\r
-    {\r
-        TRANSFER_DATA_COMPLETE_HANDLER      TransferDataCompleteHandler;\r
-        WAN_TRANSFER_DATA_COMPLETE_HANDLER  WanTransferDataCompleteHandler;\r
-       };\r
-\r
-    RESET_COMPLETE_HANDLER          ResetCompleteHandler;\r
-    REQUEST_COMPLETE_HANDLER        RequestCompleteHandler;\r
-    union\r
-    {\r
-        RECEIVE_HANDLER                    ReceiveHandler;\r
-        WAN_RECEIVE_HANDLER         WanReceiveHandler;\r
-    };\r
-    RECEIVE_COMPLETE_HANDLER        ReceiveCompleteHandler;\r
-    STATUS_HANDLER                  StatusHandler;\r
-    STATUS_COMPLETE_HANDLER            StatusCompleteHandler;\r
-    NDIS_STRING                            Name;\r
-} NDIS30_PROTOCOL_CHARACTERISTICS;\r
-\r
-\r
-/* Prototypes for NDIS 4.0 protocol characteristics */\r
-\r
-typedef INT (*RECEIVE_PACKET_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  PNDIS_PACKET    Packet);\r
-\r
-typedef VOID (*BIND_HANDLER)(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     BindContext,\r
-    IN  PNDIS_STRING    DeviceName,\r
-    IN  PVOID           SystemSpecific1,\r
-    IN  PVOID           SystemSpecific2);\r
-\r
-typedef VOID (*UNBIND_HANDLER)(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  NDIS_HANDLE     UnbindContext);\r
-\r
-typedef VOID (*TRANSLATE_HANDLER)(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    OUT PNET_PNP_ID     IdList,\r
-    IN  ULONG           IdListLength,\r
-    OUT PULONG          BytesReturned);\r
-\r
-typedef VOID (*UNLOAD_PROTOCOL_HANDLER)(\r
-    VOID);\r
-\r
-\r
-/* Protocol characteristics for NDIS 4.0 protocols */\r
-\r
-typedef struct _NDIS40_PROTOCOL_CHARACTERISTICS\r
-{\r
-    NDIS30_PROTOCOL_CHARACTERISTICS;\r
-\r
-    RECEIVE_PACKET_HANDLER  ReceivePacketHandler;\r
-    BIND_HANDLER            BindAdapterHandler;\r
-    UNBIND_HANDLER          UnbindAdapterHandler;\r
-    TRANSLATE_HANDLER       TranslateHandler;\r
-    UNLOAD_PROTOCOL_HANDLER UnloadHandler;\r
-} NDIS40_PROTOCOL_CHARACTERISTICS;\r
-\r
-\r
-\r
-/* Prototypes for NDIS 5.0 protocol characteristics */\r
-\r
-#ifdef NDIS50\r
-\r
-typedef VOID (*CO_SEND_COMPLETE_HANDLER)(\r
-    IN  NDIS_STATUS     Status,\r
-    IN  NDIS_HANDLE     ProtocolVcContext,\r
-    IN  PNDIS_PACKET    Packet);\r
-\r
-typedef VOID (*CO_STATUS_HANDLER)(\r
-    IN  NDIS_HANDLE ProtocolBindingContext,\r
-    IN  NDIS_HANDLE ProtocolVcContext   OPTIONAL,\r
-    IN  NDIS_STATUS GeneralStatus,\r
-    IN  PVOID       StatusBuffer,\r
-    IN  UINT        StatusBufferSize);\r
-\r
-typedef UINT (*CO_RECEIVE_PACKET_HANDLER)(\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  NDIS_HANDLE     ProtocolVcContext,\r
-    IN  PNDIS_PACKET    Packet);\r
-\r
-typedef VOID (*CO_AF_REGISTER_NOTIFY_HANDLER)(\r
-    IN  NDIS_HANDLE         ProtocolBindingContext,\r
-    IN  PCO_ADDRESS_FAMILY  AddressFamily);\r
-\r
-\r
-typedef struct _NDIS50_PROTOCOL_CHARACTERISTICS\r
-{\r
-    NDIS40_PROTOCOL_CHARACTERISTICS;\r
-\r
-    PVOID                           ReservedHandlers[4];\r
-\r
-    CO_SEND_COMPLETE_HANDLER        CoSendCompleteHandler;\r
-    CO_STATUS_HANDLER               CoStatusHandler;\r
-    CO_RECEIVE_PACKET_HANDLER       CoReceivePacketHandler;\r
-    CO_AF_REGISTER_NOTIFY_HANDLER   CoAfRegisterNotifyHandler;\r
-} NDIS50_PROTOCOL_CHARACTERISTICS;\r
-\r
-#endif /* NDIS50 */\r
-\r
-\r
-#ifndef NDIS50\r
-#ifndef NDIS40\r
-typedef struct _NDIS30_PROTOCOL_CHARACTERISTICS NDIS_PROTOCOL_CHARACTERISTICS;\r
-#else /* NDIS40 */\r
-typedef struct _NDIS40_PROTOCOL_CHARACTERISTICS NDIS_PROTOCOL_CHARACTERISTICS;\r
-#endif /* NDIS40 */\r
-#else /* NDIS50 */\r
-typedef struct _NDIS50_PROTOCOL_CHARACTERISTICS NDIS_PROTOCOL_CHARACTERISTICS;\r
-#endif /* NDIS50 */\r
-\r
-typedef NDIS_PROTOCOL_CHARACTERISTICS *PNDIS_PROTOCOL_CHARACTERISTICS;\r
-\r
-\r
-\r
-/* Buffer management routines */\r
-\r
-VOID\r
-EXPIMP\r
-NdisAllocateBuffer(\r
-    OUT PNDIS_STATUS    Status,\r
-    OUT PNDIS_BUFFER    *Buffer,\r
-    IN  NDIS_HANDLE     PoolHandle,\r
-    IN  PVOID           VirtualAddress,\r
-    IN  UINT            Length);\r
-\r
-VOID\r
-EXPIMP\r
-NdisAllocateBufferPool(\r
-    OUT PNDIS_STATUS    Status,\r
-    OUT PNDIS_HANDLE    PoolHandle,\r
-    IN  UINT            NumberOfDescriptors);\r
-\r
-VOID\r
-EXPIMP\r
-NdisAllocatePacket(\r
-    OUT PNDIS_STATUS    Status,\r
-    OUT PNDIS_PACKET    *Packet,\r
-    IN  NDIS_HANDLE     PoolHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisAllocatePacketPool(\r
-    OUT PNDIS_STATUS    Status,\r
-    OUT PNDIS_HANDLE    PoolHandle,\r
-    IN  UINT            NumberOfDescriptors,\r
-    IN  UINT            ProtocolReservedLength);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCopyBuffer(\r
-    OUT PNDIS_STATUS    Status,\r
-    OUT PNDIS_BUFFER    *Buffer,\r
-    IN  NDIS_HANDLE     PoolHandle,\r
-    IN  PVOID           MemoryDescriptor,\r
-    IN  UINT            Offset,\r
-    IN  UINT            Length);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCopyFromPacketToPacket(\r
-    IN  PNDIS_PACKET    Destination,\r
-    IN  UINT            DestinationOffset,\r
-    IN  UINT            BytesToCopy,\r
-    IN  PNDIS_PACKET    Source,\r
-    IN  UINT            SourceOffset,\r
-    OUT PUINT           BytesCopied);\r
-\r
-VOID\r
-EXPIMP\r
-NdisDprAllocatePacket(\r
-    OUT PNDIS_STATUS    Status,\r
-    OUT PNDIS_PACKET    *Packet,\r
-    IN  NDIS_HANDLE     PoolHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisDprAllocatePacketNonInterlocked(\r
-    OUT PNDIS_STATUS    Status,\r
-    OUT PNDIS_PACKET    *Packet,\r
-    IN NDIS_HANDLE      PoolHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisDprFreePacket(\r
-    IN  PNDIS_PACKET    Packet);\r
-\r
-VOID\r
-EXPIMP\r
-NdisDprFreePacketNonInterlocked(\r
-    IN  PNDIS_PACKET    Packet);\r
-\r
-VOID\r
-EXPIMP\r
-NdisFreeBufferPool(\r
-    IN  NDIS_HANDLE PoolHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisFreePacket(\r
-    IN   PNDIS_PACKET   Packet);\r
-\r
-VOID\r
-EXPIMP\r
-NdisFreePacketPool(\r
-    IN  NDIS_HANDLE PoolHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisReturnPackets(\r
-    IN  PNDIS_PACKET    *PacketsToReturn,\r
-    IN  UINT            NumberOfPackets);\r
-\r
-VOID\r
-EXPIMP\r
-NdisUnchainBufferAtBack(\r
-    IN OUT  PNDIS_PACKET    Packet,\r
-    OUT     PNDIS_BUFFER    *Buffer);\r
-\r
-VOID\r
-EXPIMP\r
-NdisUnchainBufferAtFront(\r
-    IN OUT  PNDIS_PACKET    Packet,\r
-    OUT     PNDIS_BUFFER    *Buffer);\r
-\r
-#if BINARY_COMPATIBLE\r
-\r
-VOID\r
-EXPIMP\r
-NdisAdjustBufferLength(\r
-    IN PNDIS_BUFFER Buffer,\r
-    IN UINT         Length);\r
-\r
-ULONG\r
-EXPIMP\r
-NDIS_BUFFER_TO_SPAN_PAGES(\r
-    IN PNDIS_BUFFER  Buffer);\r
-\r
-VOID\r
-EXPIMP\r
-NdisFreeBuffer(\r
-    IN  PNDIS_BUFFER    Buffer);\r
-\r
-VOID\r
-EXPIMP\r
-NdisGetBufferPhysicalArraySize(\r
-    IN  PNDIS_BUFFER    Buffer,\r
-    OUT PUINT           ArraySize);\r
-\r
-VOID\r
-EXPIMP\r
-NdisGetFirstBufferFromPacket(\r
-    IN  PNDIS_PACKET    _Packet,\r
-    OUT PNDIS_BUFFER    *_FirstBuffer,\r
-    OUT PVOID           *_FirstBufferVA,\r
-    OUT PUINT           _FirstBufferLength,\r
-    OUT PUINT           _TotalBufferLength);\r
-\r
-VOID\r
-EXPIMP\r
-NdisQueryBuffer(\r
-    IN  PNDIS_BUFFER    Buffer,\r
-    OUT PVOID           *VirtualAddress OPTIONAL,\r
-    OUT PUINT           Length);\r
-\r
-VOID\r
-EXPIMP\r
-NdisQueryBufferOffset(\r
-    IN  PNDIS_BUFFER    Buffer,\r
-    OUT PUINT           Offset,\r
-    OUT PUINT           Length);\r
-\r
-#else /* BINARY_COMPATIBLE */\r
-\r
-/*\r
- * PVOID NdisAdjustBufferLength(\r
- *     IN  PNDIS_BUFFER    Buffer,\r
- *     IN  UINT            Length);\r
- */\r
-#define NdisAdjustBufferLength(Buffer,  \\r
-                               Length)  \\r
-{                                       \\r
-    (Buffer)->ByteCount = (Length);     \\r
-}\r
-\r
-\r
-/*\r
- * ULONG NDIS_BUFFER_TO_SPAN_PAGES(\r
- *     IN  PNDIS_BUFFER    Buffer);\r
- */\r
-#define NDIS_BUFFER_TO_SPAN_PAGES(Buffer)   \\r
-(                                           \\r
-    MmGetMdlByteCount(Buffer) == 0 ?        \\r
-        1 :                                 \\r
-        ADDRESS_AND_SIZE_TO_SPAN_PAGES(     \\r
-            MmGetMdlVirtualAddress(Buffer), \\r
-            MmGetMdlByteCount(Buffer))      \\r
-)\r
-\r
-\r
-#if 0\r
-\r
-/*\r
- * VOID NdisFreeBuffer(\r
- *     IN  PNDIS_BUFFER    Buffer);\r
- */\r
-#define NdisFreeBuffer(Buffer)  \\r
-{                               \\r
-    IoFreeMdl(Buffer) /* ??? */ \\r
-}\r
-\r
-#else\r
-\r
-VOID\r
-EXPIMP\r
-NdisFreeBuffer(\r
-    IN  PNDIS_BUFFER    Buffer);\r
-\r
-#endif\r
-\r
-\r
-/*\r
- * VOID NdisGetBufferPhysicalArraySize(\r
- *     IN  PNDIS_BUFFER    Buffer,\r
- *     OUT PUINT           ArraySize);\r
- */\r
-#define NdisGetBufferPhysicalArraySize(Buffer,      \\r
-                                       ArraySize)   \\r
-{                                                   \\r
-}\r
-\r
-\r
-/*\r
- * VOID NdisGetFirstBufferFromPacket(\r
- *     IN  PNDIS_PACKET    _Packet,\r
- *     OUT PNDIS_BUFFER    * _FirstBuffer,\r
- *     OUT PVOID           * _FirstBufferVA,\r
- *     OUT PUINT           _FirstBufferLength,\r
- *     OUT PUINT           _TotalBufferLength)\r
- */\r
-#define        NdisGetFirstBufferFromPacket(Packet,                \\r
-                                     FirstBuffer,           \\r
-                                     FirstBufferVA,         \\r
-                                     FirstBufferLength,     \\r
-                                     TotalBufferLength)     \\r
-{                                                           \\r
-    PNDIS_BUFFER _Buffer;                                   \\r
-                                                            \\r
-    _Buffer              = (Packet)->Private.Head;          \\r
-    *(FirstBuffer)       = _Buffer;                         \\r
-    *(FirstBufferVA)     = MmGetMdlVirtualAddress(_Buffer); \\r
-    if (_Buffer != NULL) {                                  \\r
-        *(FirstBufferLength) = MmGetMdlByteCount(_Buffer);  \\r
-        _Buffer = _Buffer->Next;                            \\r
-    } else                                                  \\r
-        *(FirstBufferLength) = 0;                           \\r
-    *(TotalBufferLength) = *(FirstBufferLength);            \\r
-    while (_Buffer != NULL) {                               \\r
-        *(TotalBufferLength) += MmGetMdlByteCount(_Buffer); \\r
-        _Buffer = _Buffer->Next;                            \\r
-    }                                                       \\r
-}\r
-\r
-/*\r
- * VOID NdisQueryBuffer(\r
- *     IN  PNDIS_BUFFER    Buffer,\r
- *     OUT PVOID           *VirtualAddress OPTIONAL,\r
- *     OUT PUINT           Length)\r
- */\r
-#define NdisQueryBuffer(Buffer,                                         \\r
-                        VirtualAddress,                                 \\r
-                        Length)                                         \\r
-{                                                                       \\r
-       if (VirtualAddress != NULL)                                         \\r
-               *(PVOID*)(VirtualAddress) = MmGetSystemAddressForMdl(Buffer);   \\r
-                                                                        \\r
-       *(Length) = MmGetMdlByteCount(Buffer);                              \\r
-}\r
-\r
-\r
-/*\r
- * VOID NdisQueryBufferOffset(\r
- *     IN  PNDIS_BUFFER    Buffer,\r
- *     OUT PUINT           Offset,\r
- *     OUT PUINT           Length);\r
- */\r
-#define NdisQueryBufferOffset(Buffer,               \\r
-                              Offset,               \\r
-                              Length)               \\r
-{                                                   \\r
-    *(PUINT)(Offset) = MmGetMdlByteOffset(Buffer);  \\r
-    *(PUINT)(Length) = MmGetMdlByteCount(Buffer);   \\r
-}\r
-\r
-#endif /* BINARY_COMPATIBLE */\r
-\r
-\r
-/*\r
- * PVOID NDIS_BUFFER_LINKAGE(\r
- *     IN  PNDIS_BUFFER    Buffer);\r
- */\r
-#define NDIS_BUFFER_LINKAGE(Buffer) \\r
-{                                   \\r
-    (Buffer)->Next;                 \\r
-}\r
-\r
-\r
-/*\r
- * VOID NdisChainBufferAtBack(\r
- *     IN OUT  PNDIS_PACKET    Packet,\r
- *     IN OUT  PNDIS_BUFFER    Buffer)\r
- */\r
-#define NdisChainBufferAtBack(Packet,               \\r
-                              Buffer)               \\r
-{                                                   \\r
-       PNDIS_BUFFER NdisBuffer = (Buffer);             \\r
-                                                    \\r
-    while (NdisBuffer->Next != NULL)                \\r
-        NdisBuffer = NdisBuffer->Next;              \\r
-                                                    \\r
-    NdisBuffer->Next = NULL;                        \\r
-                                                    \\r
-    if ((Packet)->Private.Head != NULL)             \\r
-        (Packet)->Private.Tail->Next = (Buffer);    \\r
-    else                                            \\r
-        (Packet)->Private.Head = (Buffer);          \\r
-                                                    \\r
-       (Packet)->Private.Tail        = NdisBuffer;     \\r
-       (Packet)->Private.ValidCounts = FALSE;          \\r
-}\r
-\r
-\r
-/*\r
- * VOID NdisChainBufferAtFront(\r
- *     IN OUT  PNDIS_PACKET    Packet,\r
- *     IN OUT  PNDIS_BUFFER    Buffer)\r
- */\r
-#define NdisChainBufferAtFront(Packet,          \\r
-                               Buffer)          \\r
-{                                               \\r
-       PNDIS_BUFFER _NdisBuffer = (Buffer);        \\r
-                                                \\r
-    while (_NdisBuffer->Next != NULL)           \\r
-        _NdisBuffer = _NdisBuffer->Next;        \\r
-                                                \\r
-    if ((Packet)->Private.Head == NULL)         \\r
-        (Packet)->Private.Tail = _NdisBuffer;   \\r
-                                                \\r
-       _NdisBuffer->Next = (Packet)->Private.Head; \\r
-       (Packet)->Private.Head        = (Buffer);   \\r
-       (Packet)->Private.ValidCounts = FALSE;      \\r
-}\r
-\r
-\r
-/*\r
- * VOID NdisGetNextBuffer(\r
- *     IN  PNDIS_BUFFER    CurrentBuffer,\r
- *     OUT PNDIS_BUFFER    * NextBuffer)\r
- */\r
-#define NdisGetNextBuffer(CurrentBuffer,    \\r
-                          NextBuffer)       \\r
-{                                           \\r
-    *(NextBuffer) = (CurrentBuffer)->Next;  \\r
-}\r
-\r
-\r
-/*\r
- * UINT NdisGetPacketFlags(\r
- *     IN  PNDIS_PACKET    Packet); \r
- */\r
-#define NdisGetPacketFlags(Packet)  \\r
-{                                   \\r
-    (Packet)->Private.Flags;        \\r
-}\r
-\r
-\r
-/*\r
- * UINT NDIS_GET_PACKET_HEADER_SIZE(\r
- *     IN  PNDIS_PACKET    Packet);\r
- */\r
-#define NDIS_GET_PACKET_HEADER_SIZE(Packet) \\r
-{                                           \\r
-}\r
-\r
-\r
-/*\r
- * VOID NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO(\r
- *     IN  PNDIS_PACKET    Packet,\r
- *     IN  PPVOID          pMediaSpecificInfo,\r
- *     IN  PUINT           pSizeMediaSpecificInfo);\r
- */\r
-#define NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO(Packet,                 \\r
-                                            pMediaSpecificInfo,     \\r
-                                            pSizeMediaSpecificInfo) \\r
-{                                                                   \\r
-}\r
-\r
-\r
-/*\r
- * VOID NDIS_STATUS NDIS_GET_PACKET_STATUS(\r
- *     IN  PNDIS_PACKET    Packet);\r
- */\r
-#define NDIS_GET_PACKET_STATUS (Packet) \\r
-{                                       \\r
-}\r
-\r
-\r
-/*\r
- * ULONGLONG NDIS_GET_PACKET_TIME_RECEIVED(\r
- *     IN  PNDIS_PACKET    Packet);\r
- */\r
-#define NDIS_GET_PACKET_TIME_RECEIVED(Packet)   \\r
-{                                               \\r
-}\r
-\r
-\r
-/*\r
- * ULONGLONG NDIS_GET_PACKET_TIME_SENT(\r
- *     IN  PNDIS_PACKET    Packet);\r
- */\r
-#define NDIS_GET_PACKET_TIME_SENT(Packet)   \\r
-{                                           \\r
-}\r
-\r
-\r
-/*\r
- * ULONGLONG NDIS_GET_PACKET_TIME_TO_SEND(\r
- *     IN  PNDIS_PACKET    Packet);\r
- */\r
-#define NDIS_GET_PACKET_TIME_TO_SEND(Packet)    \\r
-{                                               \\r
-}\r
-\r
-\r
-/*\r
- * PNDIS_PACKET_OOB_DATA NDIS_OOB_DATA_FROM_PACKET(\r
- *     IN  PNDIS_PACKET    _Packet);\r
- */\r
-#define NDIS_OOB_DATA_FROM_PACKET(_Packet)  \\r
-{                                           \\r
-}\r
-\r
\r
-/*\r
- * VOID NdisQueryPacket(\r
- *     IN  PNDIS_PACKET    Packet,\r
- *     OUT PUINT           PhysicalBufferCount OPTIONAL,\r
- *     OUT PUINT           BufferCount         OPTIONAL,\r
- *     OUT PNDIS_BUFFER    *FirstBuffer        OPTIONAL,\r
- *     OUT PUINT           TotalPacketLength   OPTIONAL);\r
- */\r
-#define NdisQueryPacket(Packet,                                                 \\r
-                        PhysicalBufferCount,                                    \\r
-                        BufferCount,                                            \\r
-                        FirstBuffer,                                            \\r
-                        TotalPacketLength)                                      \\r
-{                                                                               \\r
-    if ((FirstBuffer) != NULL)                                                  \\r
-        *(FirstBuffer) = (Packet)->Private.Head;                                \\r
-    if ((TotalPacketLength) || (BufferCount) || (PhysicalBufferCount)) {        \\r
-        if (!(Packet)->Private.ValidCounts) {                                   \\r
-            UINT _Offset;                                                       \\r
-            UINT _PacketLength;                                                 \\r
-            PNDIS_BUFFER _NdisBuffer;                                           \\r
-            UINT _PhysicalBufferCount = 0;                                      \\r
-            UINT _TotalPacketLength   = 0;                                      \\r
-            UINT _Count               = 0;                                      \\r
-                                                                                \\r
-            for (_NdisBuffer = (Packet)->Private.Head;                          \\r
-                _NdisBuffer != (PNDIS_BUFFER)NULL;                              \\r
-                _NdisBuffer = _NdisBuffer->Next) {                              \\r
-                _PhysicalBufferCount += NDIS_BUFFER_TO_SPAN_PAGES(_NdisBuffer); \\r
-                NdisQueryBufferOffset(_NdisBuffer, &_Offset, &_PacketLength);   \\r
-                _TotalPacketLength += _PacketLength;                            \\r
-                _Count++;                                                       \\r
-            }                                                                   \\r
-            (Packet)->Private.PhysicalCount = _PhysicalBufferCount;             \\r
-            (Packet)->Private.TotalLength   = _TotalPacketLength;               \\r
-            (Packet)->Private.Count         = _Count;                           \\r
-            (Packet)->Private.ValidCounts   = TRUE;                             \\r
-               }                                                                       \\r
-                                                                                \\r
-        if (PhysicalBufferCount)                                                \\r
-            *(PUINT)(PhysicalBufferCount) = (Packet)->Private.PhysicalCount;    \\r
-                                                                                \\r
-        if (BufferCount)                                                        \\r
-            *(PUINT)(BufferCount) = (Packet)->Private.Count;                    \\r
-                                                                                \\r
-        if (TotalPacketLength)                                                  \\r
-            *(PUINT)(TotalPacketLength) = (Packet)->Private.TotalLength;        \\r
-    }                                                                           \\r
-}\r
-\r
-/*\r
- * VOID NdisRecalculatePacketCounts(\r
- *     IN OUT  PNDIS_PACKET    Packet);\r
- */\r
-#define NdisRecalculatePacketCounts(Packet) \\r
-{                                           \\r
-}\r
-\r
-\r
-/*\r
- * VOID NdisReinitializePacket(\r
- *     IN OUT  PNDIS_PACKET    Packet);\r
- */\r
-#define NdisReinitializePacketCounts(Packet)    \\r
-{                                               \\r
-}\r
-\r
-\r
-/*\r
- * VOID NdisSetPacketFlags(\r
- *     IN  PNDIS_PACKET    Packet,\r
- *     IN  UINT            Flags); \r
- */\r
-#define NdisSetPacketFlags(Packet, Flags)   \\r
-    (Packet)->Private.Flags = (Flags);\r
-\r
-\r
-/*\r
- * NDIS_SET_PACKET_HEADER_SIZE(\r
- *     IN  PNDIS_PACKET    Packet,\r
- *     IN  UINT            HdrSize);\r
- */\r
-#define NDIS_SET_PACKET_HEADER_SIZE(Packet,     \\r
-                                    HdrSize)    \\r
-{                                               \\r
-}\r
-\r
-\r
-/*\r
- * NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO(\r
- *     IN  PNDIS_PACKET    Packet,\r
- *     IN  PVOID           MediaSpecificInfo,\r
- *     IN  UINT            SizeMediaSpecificInfo);\r
- */\r
-#define NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO(Packet,                 \\r
-                                            MediaSpecificInfo,      \\r
-                                            SizeMediaSpecificInfo)  \\r
-{                                                                   \\r
-}\r
-\r
-\r
-/*\r
- * NDIS_SET_PACKET_STATUS(\r
- *     IN  PNDIS_PACKET    Packet,\r
- *     IN  NDIS_STATUS     Status);\r
- */\r
-#define NDIS_SET_PACKET_STATUS(Packet,  \\r
-                               Status)  \\r
-{                                       \\r
-}\r
-\r
-\r
-/*\r
- * NDIS_SET_PACKET_TIME_RECEIVED(\r
- *     IN  PNDIS_PACKET    Packet,\r
- *     IN  ULONGLONG       TimeReceived);\r
- */\r
-#define NDIS_SET_PACKET_TIME_RECEIVED(Packet)       \\r
-                                      TimeReceived) \\r
-{                                                   \\r
-}\r
-\r
-\r
-/*\r
- * NDIS_SET_PACKET_TIME_SENT(\r
- *     IN  PNDIS_PACKET    Packet,\r
- *     IN  ULONGLONG       TimeSent);\r
- */\r
-#define NDIS_SET_PACKET_TIME_SENT(Packet,   \\r
-                                  TimeSent) \\r
-{                                           \\r
-}\r
-\r
-\r
-/*\r
- *\r
- * NDIS_SET_PACKET_TIME_TO_SEND(\r
- *     IN  PNDIS_PACKET    Packet,\r
- *     IN  ULONGLONG       TimeToSend);\r
- */\r
-#define NDIS_SET_PACKET_TIME_TO_SEND(Packet,        \\r
-                                     TimeToSend)    \\r
-{                                                   \\r
-}\r
-\r
-\r
-/*\r
- * VOID NdisSetSendFlags(\r
- *   IN  PNDIS_PACKET    Packet,\r
- *   IN  UINT            Flags);\r
- */\r
-#define NdisSetSendFlags(Packet, Flags)(    \\r
-    NdisSetPacketFlags((Packet), (Flags)))\r
-\r
-\r
-\r
-/* Memory management routines */\r
-\r
-VOID\r
-EXPIMP\r
-NdisCreateLookaheadBufferFromSharedMemory(\r
-    IN  PVOID   pSharedMemory,\r
-    IN  UINT    LookaheadLength,\r
-    OUT PVOID   *pLookaheadBuffer);\r
-\r
-VOID\r
-EXPIMP\r
-NdisDestroyLookaheadBufferFromSharedMemory(\r
-    IN  PVOID   pLookaheadBuffer);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMoveFromMappedMemory(\r
-    OUT PVOID   Destination,\r
-    IN  PVOID   Source,\r
-    IN  ULONG   Length);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMoveMappedMemory(\r
-    OUT PVOID   Destination,\r
-    IN  PVOID   Source,\r
-    IN  ULONG   Length);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMoveToMappedMemory(\r
-    OUT PVOID   Destination,\r
-    IN  PVOID   Source,\r
-    IN  ULONG   Length);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMUpdateSharedMemory(\r
-    IN  NDIS_HANDLE             MiniportAdapterHandle,\r
-    IN  ULONG                   Length,\r
-    IN  PVOID                   VirtualAddress,\r
-    IN  NDIS_PHYSICAL_ADDRESS   PhysicalAddress);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisAllocateMemory(\r
-    OUT PVOID                   *VirtualAddress,\r
-    IN  UINT                    Length,\r
-    IN  UINT                    MemoryFlags,\r
-    IN  NDIS_PHYSICAL_ADDRESS   HighestAcceptableAddress);\r
-\r
-VOID\r
-EXPIMP\r
-NdisFreeMemory(\r
-    IN  PVOID   VirtualAddress,\r
-    IN  UINT    Length,\r
-    IN  UINT    MemoryFlags);\r
-\r
-VOID\r
-EXPIMP\r
-NdisImmediateReadSharedMemory(\r
-    IN  NDIS_HANDLE WrapperConfigurationContext,\r
-    IN  ULONG       SharedMemoryAddress,\r
-    OUT PUCHAR      Buffer,\r
-    IN  ULONG       Length);\r
-\r
-VOID\r
-EXPIMP\r
-NdisImmediateWriteSharedMemory(\r
-    IN  NDIS_HANDLE WrapperConfigurationContext,\r
-    IN  ULONG       SharedMemoryAddress,\r
-    IN  PUCHAR      Buffer,\r
-    IN  ULONG       Length);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMAllocateSharedMemory(\r
-    IN NDIS_HANDLE             MiniportAdapterHandle,\r
-    IN ULONG                   Length,\r
-    IN BOOLEAN                 Cached,\r
-    OUT        PVOID                   *VirtualAddress,\r
-    OUT        PNDIS_PHYSICAL_ADDRESS  PhysicalAddress);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMAllocateSharedMemoryAsync(\r
-    IN  NDIS_HANDLE MiniportAdapterHandle,\r
-    IN  ULONG       Length,\r
-    IN  BOOLEAN     Cached,\r
-    IN  PVOID       Context);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMFreeSharedMemory(\r
-    IN  NDIS_HANDLE             MiniportAdapterHandle,\r
-    IN  ULONG                   Length,\r
-    IN  BOOLEAN                 Cached,\r
-    IN  PVOID                   VirtualAddress,\r
-    IN  NDIS_PHYSICAL_ADDRESS   PhysicalAddress);\r
-\r
-VOID\r
-EXPIMP\r
-NdisUpdateSharedMemory(\r
-    IN  NDIS_HANDLE             NdisAdapterHandle,\r
-    IN  ULONG                   Length,\r
-    IN  PVOID                   VirtualAddress,\r
-    IN  NDIS_PHYSICAL_ADDRESS   PhysicalAddress);\r
-\r
-\r
-/*\r
- * ULONG NdisGetPhysicalAddressHigh(\r
- *     IN  NDIS_PHYSICAL_ADDRESS   PhysicalAddress);\r
- */\r
-#define NdisGetPhysicalAddressHigh(PhysicalAddress) \\r
-    ((PhysicalAddress).HighPart)\r
-\r
-/*\r
- * VOID NdisSetPhysicalAddressHigh(\r
- *     IN   NDIS_PHYSICAL_ADDRESS   PhysicalAddress,\r
- *     IN   ULONG                   Value);\r
- */\r
-#define NdisSetPhysicalAddressHigh(PhysicalAddress, Value)  \\r
-    ((PhysicalAddress).HighPart) = (Value)\r
-\r
-/*\r
- * ULONG NdisGetPhysicalAddressLow(\r
- *     IN   NDIS_PHYSICAL_ADDRESS   PhysicalAddress);\r
- */\r
-#define NdisGetPhysicalAddressLow(PhysicalAddress)  \\r
-    ((PhysicalAddress).LowPart)\r
-\r
-\r
-/*\r
- * VOID NdisSetPhysicalAddressLow(\r
- *     IN  NDIS_PHYSICAL_ADDRESS   PhysicalAddress,\r
- *     IN  ULONG                   Value);\r
- */\r
-#define NdisSetPhysicalAddressLow(PhysicalAddress, Value)   \\r
-    ((PhysicalAddress).LowPart) = (Value)\r
-\r
-/*\r
- * VOID NDIS_PHYSICAL_ADDRESS_CONST(\r
- *     IN  ULONG   Low,\r
- *     IN  LONG    High); \r
- */\r
-#define NDIS_PHYSICAL_ADDRESS_CONST(Low, High)  \\r
-    { {(ULONG)(Low), (LONG)(High)} }\r
-\r
-\r
-/*\r
- * VOID NdisMoveMemory(\r
- *     OUT PVOID   Destination,\r
- *     IN  PVOID   Source,\r
- *     IN  ULONG   Length);\r
- */\r
-#define NdisMoveMemory(Destination, Source, Length) \\r
-    RtlCopyMemory(Destination, Source, Length)\r
-\r
-\r
-/*\r
- * VOID NdisRetrieveUlong(\r
- *     IN  PULONG  DestinationAddress,\r
- *     IN  PULONG  SourceAddress);\r
- */\r
-#define NdisRetrieveUlong(DestinationAddress, SourceAddress)    \\r
-    RtlRetrieveUlong(DestinationAddress, SourceAddress)\r
-\r
-\r
-/*\r
- * VOID NdisStoreUlong(\r
- *     IN  PULONG  DestinationAddress,\r
- *     IN  ULONG   Value); \r
- */\r
-#define NdisStoreUlong(DestinationAddress, Value)   \\r
-    RtlStoreUlong(DestinationAddress, Value)\r
-\r
-\r
-/*\r
- * VOID NdisZeroMemory(\r
- *     IN PVOID    Destination,\r
- *     IN ULONG    Length)\r
- */\r
-#define NdisZeroMemory(Destination, Length) \\r
-    RtlZeroMemory(Destination, Length)\r
-\r
-\r
-\r
-/* String management routines */\r
-\r
-#if BINARY_COMPATIBLE\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisAnsiStringToUnicodeString(\r
-    IN OUT  PNDIS_STRING        DestinationString,\r
-    IN      PNDIS_ANSI_STRING   SourceString);\r
-\r
-BOOLEAN\r
-EXPIMP\r
-NdisEqualString(\r
-    IN  PNDIS_STRING    String1,\r
-    IN  PNDIS_STRING    String2,\r
-    IN  BOOLEAN         CaseInsensitive);\r
-\r
-VOID\r
-EXPIMP\r
-NdisInitAnsiString(\r
-    IN OUT  PNDIS_ANSI_STRING   DestinationString,\r
-    IN      PCSTR               SourceString);\r
-\r
-VOID\r
-EXPIMP\r
-NdisInitUnicodeString(\r
-    IN OUT  PNDIS_STRING    DestinationString,\r
-    IN      PCWSTR          SourceString);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisUnicodeStringToAnsiString(\r
-    IN OUT  PNDIS_ANSI_STRING   DestinationString,\r
-    IN      PNDIS_STRING        SourceString);\r
-\r
-#else /* BINARY_COMPATIBLE */\r
-\r
-/*\r
- * NDIS_STATUS NdisAnsiStringToUnicodeString(\r
- *     IN OUT  PNDIS_STRING        DestinationString,\r
- *     IN      PNDIS_ANSI_STRING   SourceString);\r
- */\r
-#define        NdisAnsiStringToUnicodeString(DestinationString,    \\r
-                                      SourceString)         \\r
-    RtlAnsiStringToUnicodeString((DestinationString), (SourceString), FALSE)\r
-\r
-/*\r
- * BOOLEAN NdisEqualString(\r
- *     IN  PNDIS_STRING    String1,\r
- *     IN  PNDIS_STRING    String2,\r
- *     IN  BOOLEAN         CaseInsensitive)\r
- */\r
-#define NdisEqualString(String1,            \\r
-                        String2,            \\r
-                        CaseInsensitive)    \\r
-    RtlEqualUnicodeString((String1), (String2), (CaseInsensitive))\r
-\r
-/*\r
- * VOID NdisInitAnsiString(\r
- *     IN OUT  PNDIS_ANSI_STRING   DestinationString,\r
- *     IN      PCSTR               SourceString)\r
- */\r
-#define        NdisInitAnsiString(DestinationString,   \\r
-                           SourceString)        \\r
-    RtlInitString((DestinationString), (SourceString))\r
-\r
-/*\r
- * VOID NdisInitUnicodeString(\r
- *     IN OUT  PNDIS_STRING    DestinationString,\r
- *     IN      PCWSTR          SourceString)\r
- */\r
-#define        NdisInitUnicodeString(DestinationString,    \\r
-                              SourceString)         \\r
-    RtlInitUnicodeString((DestinationString), (SourceString))\r
-\r
-/*\r
- * NDIS_STATUS NdisUnicodeStringToAnsiString(\r
- *     IN OUT  PNDIS_ANSI_STRING   DestinationString,\r
- *     IN      PNDIS_STRING        SourceString)\r
- */\r
-#define        NdisUnicodeStringToAnsiString(DestinationString,    \\r
-                                      SourceString)         \\r
-    RtlUnicodeStringToAnsiString((DestinationString), (SourceString), FALSE)\r
-\r
-#endif /* BINARY_COMPATIBLE */\r
-\r
-#define NdisFreeString(_s)  NdisFreeMemory((s).Buffer, (s).MaximumLength, 0)\r
-#define NdisPrintString(_s) DbgPrint("%ls", (s).Buffer)\r
-\r
-\r
-\r
-/* I/O routines */\r
-\r
-/*\r
- * VOID NdisRawReadPortBufferUchar(\r
- *     IN  ULONG   Port,\r
- *     OUT PUCHAR  Buffer,\r
- *     IN  ULONG   Length);\r
- */\r
-#define NdisRawReadPortBufferUchar(Port, Buffer, Length)    \\r
-    READ_PORT_BUFFER_UCHAR((PUCHAR)(Port), (PUCHAR)(Buffer), (Length))\r
-\r
-/*\r
- * VOID NdisRawReadPortBufferUlong(\r
- *     IN  ULONG   Port,\r
- *     OUT PULONG  Buffer,\r
- *     IN  ULONG   Length);\r
- */\r
-#define NdisRawReadPortBufferUlong(Port, Buffer, Length)  \\r
-    READ_PORT_BUFFER_ULONG((PULONG)(Port), (PULONG)(Buffer), (Length))\r
-\r
-/*\r
- * VOID NdisRawReadPortBufferUshort(\r
- *     IN  ULONG   Port,\r
- *     OUT PUSHORT Buffer,\r
- *     IN  ULONG   Length);\r
- */\r
-#define NdisRawReadPortBufferUshort(Port, Buffer, Length)   \\r
-    READ_PORT_BUFFER_USHORT((PUSHORT)(Port), (PUSHORT)(Buffer), (Length))\r
-\r
-\r
-/*\r
- * VOID NdisRawReadPortUchar(\r
- *     IN  ULONG   Port,\r
- *     OUT PUCHAR  Data);\r
- */\r
-#define NdisRawReadPortUchar(Port, Data)    \\r
-    *(Data) = READ_PORT_UCHAR((PUCHAR)(Port))\r
-\r
-/*\r
- * VOID NdisRawReadPortUlong(\r
- *     IN  ULONG   Port,\r
- *     OUT PULONG  Data);\r
- */\r
-#define NdisRawReadPortUlong(Port, Data)    \\r
-    *(Data) = READ_PORT_ULONG((PULONG)(Port))\r
-\r
-/*\r
- * VOID NdisRawReadPortUshort(\r
- *     IN  ULONG   Port,\r
- *     OUT PUSHORT Data);\r
- */\r
-#define NdisRawReadPortUshort(Port, Data)   \\r
-    *(Data) = READ_PORT_USHORT((PUSHORT)(Port))\r
-\r
-\r
-/*\r
- * VOID NdisRawWritePortBufferUchar(\r
- *     IN  ULONG   Port,\r
- *     IN  PUCHAR  Buffer,\r
- *     IN  ULONG   Length);\r
- */\r
-#define NdisRawWritePortBufferUchar(Port, Buffer, Length) \\r
-    WRITE_PORT_BUFFER_UCHAR((PUCHAR)(Port), (PUCHAR)(Buffer), (Length))\r
-\r
-/*\r
- * VOID NdisRawWritePortBufferUlong(\r
- *     IN  ULONG   Port,\r
- *     IN  PULONG  Buffer,\r
- *     IN  ULONG   Length);\r
- */\r
-#define NdisRawWritePortBufferUlong(Port, Buffer, Length)   \\r
-    WRITE_PORT_BUFFER_ULONG((PULONG)(Port), (PULONG)(Buffer), (Length))\r
-\r
-/*\r
- * VOID NdisRawWritePortBufferUshort(\r
- *     IN  ULONG   Port,\r
- *     IN  PUSHORT Buffer,\r
- *     IN  ULONG   Length);\r
- */\r
-#define NdisRawWritePortBufferUshort(Port, Buffer, Length)  \\r
-    WRITE_PORT_BUFFER_USHORT((PUSHORT)(Port), (PUSHORT)(Buffer), (Length))\r
-\r
-\r
-/*\r
- * VOID NdisRawWritePortUchar(\r
- *     IN  ULONG   Port,\r
- *     IN  UCHAR   Data);\r
- */\r
-#define NdisRawWritePortUchar(Port, Data)   \\r
-    WRITE_PORT_UCHAR((PUCHAR)(Port), (UCHAR)(Data))\r
-\r
-/*\r
- * VOID NdisRawWritePortUlong(\r
- *     IN  ULONG   Port,\r
- *     IN  ULONG   Data);\r
- */\r
-#define NdisRawWritePortUlong(Port, Data)   \\r
-    WRITE_PORT_ULONG((PULONG)(Port), (ULONG)(Data))\r
-\r
-/*\r
- * VOID NdisRawWritePortUshort(\r
- *     IN  ULONG   Port,\r
- *     IN  USHORT  Data);\r
- */\r
-#define NdisRawWritePortUshort(Port, Data) \\r
-    WRITE_PORT_USHORT((PUSHORT)(Port), (USHORT)(Data))\r
-\r
-\r
-/*\r
- * VOID NdisReadRegisterUchar(\r
- *     IN  PUCHAR  Register,\r
- *     OUT PUCHAR  Data);\r
- */\r
-#define NdisReadRegisterUchar(Register, Data)   \\r
-    *((PUCHAR)(Data)) = *(Register)\r
-\r
-/*\r
- * VOID NdisReadRegisterUlong(\r
- *     IN  PULONG  Register,\r
- *     OUT PULONG  Data);\r
- */\r
-#define NdisReadRegisterUlong(Register, Data)   \\r
-    *((PULONG)(Data)) = *(Register)\r
-\r
-/*\r
- * VOID NdisReadRegisterUshort(\r
- *     IN  PUSHORT Register,\r
- *     OUT PUSHORT Data);\r
- */\r
-#define NdisReadRegisterUshort(Register, Data)  \\r
-    *((PUSHORT)(Data)) = *(Register)\r
-\r
-\r
-/*\r
- * VOID NdisReadRegisterUchar(\r
- *     IN  PUCHAR  Register,\r
- *     IN  UCHAR   Data);\r
- */\r
-#define NdisWriteRegisterUchar(Register, Data)  \\r
-    WRITE_REGISTER_UCHAR((Register), (Data))\r
-\r
-/*\r
- * VOID NdisReadRegisterUlong(\r
- *     IN  PULONG  Register,\r
- *     IN  ULONG   Data);\r
- */\r
-#define NdisWriteRegisterUlong(Register, Data)  \\r
-       WRITE_REGISTER_ULONG((Register), (Data))\r
-\r
-/*\r
- * VOID NdisReadRegisterUshort(\r
- *     IN  PUSHORT Register,\r
- *     IN  USHORT  Data);\r
- */\r
-#define NdisWriteRegisterUshort(Register, Data) \\r
-    WRITE_REGISTER_USHORT((Register), (Data))\r
-\r
-\r
-\r
-VOID\r
-EXPIMP\r
-NdisCloseAdapter(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     NdisBindingHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCloseConfiguration(\r
-    IN  NDIS_HANDLE ConfigurationHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCompleteBindAdapter(\r
-    IN  NDIS_HANDLE BindAdapterContext,\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_STATUS OpenStatus);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCompleteUnbindAdapter(\r
-    IN  NDIS_HANDLE UnbindAdapterContext,\r
-    IN  NDIS_STATUS Status);\r
-\r
-VOID\r
-EXPIMP\r
-NdisDeregisterProtocol(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     NdisProtocolHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisInitializeListHead(\r
-    IN  PLIST_ENTRY ListHead);\r
-\r
-VOID\r
-EXPIMP\r
-NdisInterlockedAddUlong(\r
-    IN  PULONG          Addend,\r
-    IN  ULONG           Increment,\r
-    IN  PNDIS_SPIN_LOCK SpinLock);\r
-\r
-PLIST_ENTRY\r
-EXPIMP\r
-NdisInterlockedInsertHeadList(\r
-    IN  PLIST_ENTRY     ListHead,\r
-    IN  PLIST_ENTRY     ListEntry,\r
-    IN  PNDIS_SPIN_LOCK SpinLock);\r
-\r
-PLIST_ENTRY\r
-EXPIMP\r
-NdisInterlockedInsertTailList(\r
-    IN  PLIST_ENTRY     ListHead,\r
-    IN  PLIST_ENTRY     ListEntry,\r
-    IN  PNDIS_SPIN_LOCK SpinLock); \r
-\r
-PLIST_ENTRY\r
-EXPIMP\r
-NdisInterlockedRemoveHeadList(\r
-    IN  PLIST_ENTRY     ListHead,\r
-    IN  PNDIS_SPIN_LOCK SpinLock); \r
-\r
-VOID\r
-EXPIMP\r
-NdisOpenAdapter(\r
-    OUT PNDIS_STATUS    Status,\r
-    OUT PNDIS_STATUS    OpenErrorStatus,\r
-    OUT PNDIS_HANDLE    NdisBindingHandle,\r
-    OUT PUINT           SelectedMediumIndex,\r
-    IN  PNDIS_MEDIUM    MediumArray,\r
-    IN  UINT            MediumArraySize,\r
-    IN  NDIS_HANDLE     NdisProtocolHandle,\r
-    IN  NDIS_HANDLE     ProtocolBindingContext,\r
-    IN  PNDIS_STRING    AdapterName,\r
-    IN  UINT            OpenOptions,\r
-    IN  PSTRING         AddressingInformation);\r
-\r
-VOID\r
-EXPIMP\r
-NdisOpenProtocolConfiguration(\r
-    OUT PNDIS_STATUS    Status,\r
-    OUT PNDIS_HANDLE    ConfigurationHandle,\r
-    IN  PNDIS_STRING    ProtocolSection);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisQueryReceiveInformation(\r
-    IN  NDIS_HANDLE NdisBindingHandle,\r
-    IN  NDIS_HANDLE MacContext,\r
-    OUT PLONGLONG   TimeSent            OPTIONAL,\r
-    OUT PLONGLONG   TimeReceived        OPTIONAL,\r
-    IN  PUCHAR      Buffer,\r
-    IN  UINT        BufferSize,\r
-    OUT PUINT       SizeNeeded);\r
-\r
-VOID\r
-EXPIMP\r
-NdisReadConfiguration(\r
-    OUT PNDIS_STATUS                    Status,\r
-    OUT PNDIS_CONFIGURATION_PARAMETER   *ParameterValue,\r
-    IN  NDIS_HANDLE                     ConfigurationHandle,\r
-    IN  PNDIS_STRING                    Keyword,\r
-    IN  NDIS_PARAMETER_TYPE             ParameterType);\r
-\r
-VOID\r
-EXPIMP\r
-NdisRegisterProtocol(\r
-    OUT PNDIS_STATUS                    Status,\r
-    OUT PNDIS_HANDLE                    NdisProtocolHandle,\r
-    IN  PNDIS_PROTOCOL_CHARACTERISTICS  ProtocolCharacteristics,\r
-    IN  UINT                            CharacteristicsLength);\r
-\r
-VOID\r
-EXPIMP\r
-NdisRequest(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     NdisBindingHandle,\r
-    IN  PNDIS_REQUEST   NdisRequest);\r
-\r
-VOID\r
-EXPIMP\r
-NdisReset(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     NdisBindingHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisReturnPackets(\r
-    IN  PNDIS_PACKET    *PacketsToReturn,\r
-    IN  UINT            NumberOfPackets);\r
-\r
-VOID\r
-EXPIMP\r
-NdisSend(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     NdisBindingHandle,\r
-    IN  PNDIS_PACKET    Packet);\r
-\r
-VOID\r
-EXPIMP\r
-NdisSendPackets(\r
-    IN  NDIS_HANDLE     NdisBindingHandle,\r
-    IN  PPNDIS_PACKET   PacketArray,\r
-    IN  UINT            NumberOfPackets);\r
-\r
-VOID\r
-EXPIMP\r
-NdisTransferData(\r
-    OUT PNDIS_STATUS        Status,\r
-    IN  NDIS_HANDLE         NdisBindingHandle,\r
-    IN  NDIS_HANDLE         MacReceiveContext,\r
-    IN  UINT                ByteOffset,\r
-    IN  UINT                BytesToTransfer,\r
-    IN  OUT PNDIS_PACKET    Packet,\r
-    OUT PUINT               BytesTransferred);\r
-\r
-VOID\r
-EXPIMP\r
-NdisWriteConfiguration(\r
-    OUT PNDIS_STATUS                    Status,\r
-    IN  NDIS_HANDLE                     WrapperConfigurationContext,\r
-    IN  PNDIS_STRING                    Keyword,\r
-    IN  PNDIS_CONFIGURATION_PARAMETER   *ParameterValue);\r
-\r
-/*\r
-VOID\r
-EXPIMP\r
-NdisWriteErrorLogEntry(\r
-    IN  NDIS_HANDLE     NdisAdapterHandle,\r
-    IN  NDIS_ERROR_CODE ErrorCode,\r
-    IN  ULONG           NumberOfErrorValues,\r
-    IN  ULONG           ...);\r
-*/\r
-\r
-\r
-\r
-/*\r
- * VOID NdisStallExecution(\r
- *     IN  UINT    MicrosecondsToStall)\r
- */\r
-#define NdisStallExecution(MicroSecondsToStall)     \\r
-    KeStallExecutionProcessor(MicroSecondsToStall)\r
-\r
-\r
-\r
-/* NDIS helper macros */\r
-\r
-/*\r
- * NDIS_INIT_FUNCTION(FunctionName)\r
- */\r
-#define NDIS_INIT_FUNCTION(FunctionName)    \\r
-    alloc_text(init, FunctionName)\r
-\r
-/*\r
- * NDIS_PAGABLE_FUNCTION(FunctionName) \r
- */\r
-#define NDIS_PAGABLE_FUNCTION(FunctionName) \\r
-    alloc_text(page, FunctionName)\r
-\r
-\r
-\r
-/* NDIS 4.0 extensions */\r
-\r
-#ifdef NDIS40\r
-\r
-VOID\r
-EXPIMP\r
-NdisMFreeSharedMemory(\r
-    IN  NDIS_HANDLE             MiniportAdapterHandle,\r
-    IN  ULONG                   Length,\r
-    IN  BOOLEAN                 Cached,\r
-    IN  PVOID                   VirtualAddress,\r
-    IN  NDIS_PHYSICAL_ADDRESS   PhysicalAddress);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMWanIndicateReceive(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     MiniportAdapterHandle,\r
-    IN  NDIS_HANDLE     NdisLinkContext,\r
-    IN  PUCHAR          PacketBuffer,\r
-    IN  UINT            PacketSize);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMWanIndicateReceiveComplete(\r
-    IN  NDIS_HANDLE MiniportAdapterHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMWanSendComplete(\r
-    IN  NDIS_HANDLE         MiniportAdapterHandle,\r
-    IN  PNDIS_WAN_PACKET    Packet,\r
-    IN  NDIS_STATUS         Status);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisPciAssignResources(\r
-    IN  NDIS_HANDLE         NdisMacHandle,\r
-    IN  NDIS_HANDLE         NdisWrapperHandle,\r
-    IN  NDIS_HANDLE         WrapperConfigurationContext,\r
-    IN  ULONG               SlotNumber,\r
-    OUT PNDIS_RESOURCE_LIST *AssignedResources);\r
-\r
-VOID\r
-EXPIMP\r
-NdisReadEisaSlotInformationEx(\r
-    OUT PNDIS_STATUS                    Status,\r
-    IN  NDIS_HANDLE                     WrapperConfigurationContext,\r
-    OUT PUINT                           SlotNumber,\r
-    OUT PNDIS_EISA_FUNCTION_INFORMATION *EisaData,\r
-    OUT PUINT                           NumberOfFunctions);\r
-\r
-VOID\r
-EXPIMP\r
-NdisReadMcaPosInformation(\r
-    OUT PNDIS_STATUS        Status,\r
-    IN  NDIS_HANDLE         WrapperConfigurationContext,\r
-    IN  PUINT               ChannelNumber,\r
-    OUT PNDIS_MCA_POS_DATA  McaData);\r
-\r
-#endif /* NDIS40 */\r
-\r
-\r
-\r
-/* NDIS 5.0 extensions */\r
-\r
-#ifdef NDIS50\r
-\r
-VOID\r
-EXPIMP\r
-NdisAcquireReadWriteLock(\r
-    IN  PNDIS_RW_LOCK   Lock,\r
-    IN  BOOLEAN         fWrite,\r
-    IN  PLOCK_STATE     LockState);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisAllocateMemoryWithTag(\r
-    OUT PVOID   *VirtualAddress,\r
-    IN  UINT    Length,\r
-    IN  ULONG   Tag);\r
-\r
-VOID\r
-EXPIMP\r
-NdisAllocatePacketPoolEx(\r
-    OUT PNDIS_STATUS    Status,\r
-    OUT PNDIS_HANDLE    PoolHandle,\r
-    IN  UINT            NumberOfDescriptors,\r
-    IN  UINT            NumberOfOverflowDescriptors,\r
-    IN  UINT            ProtocolReservedLength);\r
-\r
-ULONG\r
-EXPIMP\r
-NdisBufferLength(\r
-    IN  PNDIS_BUFFER    Buffer);\r
-\r
-PVOID\r
-EXPIMP\r
-NdisBufferVirtualAddress(\r
-    IN  PNDIS_BUFFER    Buffer);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCompletePnPEvent(\r
-    IN  NDIS_STATUS     Status,\r
-    IN  NDIS_HANDLE     NdisBindingHandle,\r
-    IN  PNET_PNP_EVENT  NetPnPEvent);\r
-\r
-VOID\r
-EXPIMP\r
-NdisConvertStringToAtmAddress(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  PNDIS_STRING    String,\r
-    OUT PATM_ADDRESS    AtmAddress);\r
-\r
-VOID\r
-EXPIMP\r
-NdisGetCurrentProcessorCounts(\r
-    OUT PULONG  pIdleCount,\r
-    OUT PULONG  pKernelAndUser,\r
-    OUT PULONG  pIndex);\r
-\r
-VOID\r
-EXPIMP\r
-NdisGetDriverHandle(\r
-    IN  PNDIS_HANDLE    NdisBindingHandle,\r
-    OUT PNDIS_HANDLE    NdisDriverHandle);\r
-\r
-PNDIS_PACKET\r
-EXPIMP\r
-NdisGetReceivedPacket(\r
-    IN  PNDIS_HANDLE    NdisBindingHandle,\r
-    IN  PNDIS_HANDLE    MacContext);\r
-\r
-VOID\r
-EXPIMP\r
-NdisGetSystemUptime(\r
-    OUT PULONG  pSystemUpTime);\r
-\r
-VOID\r
-EXPIMP\r
-NdisInitializeReadWriteLock(\r
-    IN  PNDIS_RW_LOCK   Lock);\r
-\r
-LONG\r
-EXPIMP\r
-NdisInterlockedDecrement(\r
-    IN  PLONG   Addend);\r
-\r
-LONG\r
-EXPIMP\r
-NdisInterlockedIncrement(\r
-    IN  PLONG   Addend);\r
-\r
-PSINGLE_LIST_ENTRY\r
-EXPIMP\r
-NdisInterlockedPopEntrySList(\r
-    IN  PSLIST_HEADER   ListHead,\r
-    IN  PKSPIN_LOCK     Lock);\r
-\r
-PSINGLE_LIST_ENTRY\r
-EXPIMP\r
-NdisInterlockedPushEntrySList(\r
-    IN  PSLIST_HEADER       ListHead,\r
-    IN  PSINGLE_LIST_ENTRY  ListEntry,\r
-    IN  PKSPIN_LOCK         Lock);\r
-\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMDeregisterDevice(\r
-    IN  NDIS_HANDLE NdisDeviceHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMGetDeviceProperty(\r
-    IN      NDIS_HANDLE         MiniportAdapterHandle,\r
-    IN OUT  PDEVICE_OBJECT      *PhysicalDeviceObject           OPTIONAL,\r
-    IN OUT  PDEVICE_OBJECT      *FunctionalDeviceObject         OPTIONAL,\r
-    IN OUT  PDEVICE_OBJECT      *NextDeviceObject               OPTIONAL,\r
-    IN OUT  PCM_RESOURCE_LIST   *AllocatedResources             OPTIONAL,\r
-    IN OUT  PCM_RESOURCE_LIST   *AllocatedResourcesTranslated   OPTIONAL);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMInitializeScatterGatherDma(\r
-    IN  NDIS_HANDLE MiniportAdapterHandle,\r
-    IN  BOOLEAN     Dma64BitAddresses,\r
-    IN  ULONG       MaximumPhysicalMapping);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMPromoteMiniport(\r
-    IN  NDIS_HANDLE MiniportAdapterHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMQueryAdapterInstanceName(\r
-    OUT PNDIS_STRING    AdapterInstanceName,\r
-    IN  NDIS_HANDLE     MiniportAdapterHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMRegisterDevice(\r
-    IN  NDIS_HANDLE         NdisWrapperHandle,\r
-    IN  PNDIS_STRING        DeviceName,\r
-    IN  PNDIS_STRING        SymbolicName,\r
-    IN  PDRIVER_DISPATCH    MajorFunctions[],\r
-    OUT PDEVICE_OBJECT      *pDeviceObject,\r
-    OUT NDIS_HANDLE         *NdisDeviceHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMRegisterUnloadHandler(\r
-    IN  NDIS_HANDLE     NdisWrapperHandle,\r
-    IN  PDRIVER_UNLOAD  UnloadHandler);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMRemoveMiniport(\r
-    IN  NDIS_HANDLE MiniportAdapterHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMSetMiniportSecondary(\r
-    IN  NDIS_HANDLE MiniportAdapterHandle,\r
-    IN  NDIS_HANDLE PrimaryMiniportAdapterHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisOpenConfigurationKeyByIndex(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     ConfigurationHandle,\r
-    IN  ULONG           Index,\r
-    OUT PNDIS_STRING    KeyName,\r
-    OUT PNDIS_HANDLE    KeyHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisOpenConfigurationKeyByName(\r
-    OUT PNDIS_STATUS    Status,\r
-    IN  NDIS_HANDLE     ConfigurationHandle,\r
-    IN  PNDIS_STRING    SubKeyName,\r
-    OUT PNDIS_HANDLE    SubKeyHandle);\r
-\r
-UINT\r
-EXPIMP\r
-NdisPacketPoolUsage(\r
-    IN  NDIS_HANDLE PoolHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisQueryAdapterInstanceName(\r
-    OUT PNDIS_STRING    AdapterInstanceName,\r
-    IN  NDIS_HANDLE     NdisBindingHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisQueryBufferSafe(\r
-    IN  PNDIS_BUFFER    Buffer,\r
-    OUT PVOID           *VirtualAddress OPTIONAL,\r
-    OUT PUINT           Length,\r
-    IN  UINT            Priority);\r
-\r
-ULONG\r
-EXPIMP\r
-NdisReadPcmciaAttributeMemory(\r
-    IN  NDIS_HANDLE NdisAdapterHandle,\r
-    IN  ULONG       Offset,\r
-    IN  PVOID       Buffer,\r
-    IN  ULONG       Length);\r
-\r
-VOID\r
-EXPIMP\r
-NdisReleaseReadWriteLock(\r
-    IN  PNDIS_RW_LOCK   Lock,\r
-    IN  PLOCK_STATE     LockState);\r
-\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisWriteEventLogEntry(\r
-    IN  PVOID       LogHandle,\r
-    IN  NDIS_STATUS EventCode,\r
-    IN  ULONG       UniqueEventValue,\r
-    IN  USHORT      NumStrings,\r
-    IN  PVOID       StringsList OPTIONAL,\r
-    IN  ULONG       DataSize,\r
-    IN  PVOID       Data        OPTIONAL);\r
-\r
-ULONG\r
-EXPIMP\r
-NdisWritePcmciaAttributeMemory(\r
-    IN  NDIS_HANDLE NdisAdapterHandle,\r
-    IN  ULONG       Offset,\r
-    IN  PVOID       Buffer,\r
-    IN  ULONG       Length);\r
-\r
-\r
-/* Connectionless services */\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisClAddParty(\r
-    IN      NDIS_HANDLE         NdisVcHandle,\r
-    IN      NDIS_HANDLE         ProtocolPartyContext,\r
-    IN OUT  PCO_CALL_PARAMETERS CallParameters,\r
-    OUT     PNDIS_HANDLE        NdisPartyHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisClCloseAddressFamily(\r
-    IN  NDIS_HANDLE NdisAfHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisClCloseCall(\r
-    IN  NDIS_HANDLE NdisVcHandle,\r
-    IN  NDIS_HANDLE NdisPartyHandle OPTIONAL,\r
-    IN  PVOID       Buffer          OPTIONAL,\r
-    IN  UINT        Size);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisClDeregisterSap(\r
-    IN  NDIS_HANDLE NdisSapHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisClDropParty(\r
-    IN  NDIS_HANDLE NdisPartyHandle,\r
-    IN  PVOID       Buffer  OPTIONAL,\r
-    IN  UINT        Size);\r
-\r
-VOID\r
-EXPIMP\r
-NdisClIncomingCallComplete(\r
-    IN  NDIS_STATUS         Status,\r
-    IN  NDIS_HANDLE         NdisVcHandle,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisClMakeCall(\r
-    IN      NDIS_HANDLE         NdisVcHandle,\r
-    IN OUT  PCO_CALL_PARAMETERS CallParameters,\r
-    IN      NDIS_HANDLE         ProtocolPartyContext    OPTIONAL,\r
-    OUT     PNDIS_HANDLE        NdisPartyHandle         OPTIONAL);\r
-\r
-NDIS_STATUS \r
-EXPIMP\r
-NdisClModifyCallQoS(\r
-    IN  NDIS_HANDLE         NdisVcHandle,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisClOpenAddressFamily(\r
-    IN  NDIS_HANDLE                     NdisBindingHandle,\r
-    IN  PCO_ADDRESS_FAMILY              AddressFamily,\r
-    IN  NDIS_HANDLE                     ProtocolAfContext,\r
-    IN  PNDIS_CLIENT_CHARACTERISTICS    ClCharacteristics,\r
-    IN  UINT                            SizeOfClCharacteristics,\r
-    OUT PNDIS_HANDLE                    NdisAfHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisClRegisterSap(\r
-    IN  NDIS_HANDLE     NdisAfHandle,\r
-    IN  NDIS_HANDLE     ProtocolSapContext,\r
-    IN  PCO_SAP         Sap,\r
-    OUT PNDIS_HANDLE    NdisSapHandle);\r
-\r
-\r
-/* Call Manager services */\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisCmActivateVc(\r
-    IN      NDIS_HANDLE         NdisVcHandle,\r
-    IN OUT  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmAddPartyComplete(\r
-    IN  NDIS_STATUS         Status,\r
-    IN  NDIS_HANDLE         NdisPartyHandle,\r
-    IN  NDIS_HANDLE         CallMgrPartyContext OPTIONAL,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmCloseAddressFamilyComplete(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE NdisAfHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmCloseCallComplete(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE NdisVcHandle,\r
-    IN  NDIS_HANDLE NdisPartyHandle OPTIONAL);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisCmDeactivateVc(\r
-    IN  NDIS_HANDLE NdisVcHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmDeregisterSapComplete(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE NdisSapHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmDispatchCallConnected(\r
-    IN  NDIS_HANDLE NdisVcHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisCmDispatchIncomingCall(\r
-    IN  NDIS_HANDLE         NdisSapHandle,\r
-    IN  NDIS_HANDLE         NdisVcHandle,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmDispatchIncomingCallQoSChange(\r
-    IN  NDIS_HANDLE         NdisVcHandle,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmDispatchIncomingCloseCall(\r
-    IN  NDIS_STATUS CloseStatus,\r
-    IN  NDIS_HANDLE NdisVcHandle,\r
-    IN  PVOID       Buffer  OPTIONAL,\r
-    IN  UINT        Size);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmDispatchIncomingDropParty(\r
-    IN  NDIS_STATUS DropStatus,\r
-    IN  NDIS_HANDLE NdisPartyHandle,\r
-    IN  PVOID       Buffer  OPTIONAL,\r
-    IN  UINT        Size);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmDropPartyComplete(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE NdisPartyHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmMakeCallComplete(\r
-    IN  NDIS_STATUS         Status,\r
-    IN  NDIS_HANDLE         NdisVcHandle,\r
-    IN  NDIS_HANDLE         NdisPartyHandle     OPTIONAL,\r
-    IN  NDIS_HANDLE         CallMgrPartyContext OPTIONAL,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmModifyCallQoSComplete(\r
-    IN  NDIS_STATUS         Status,\r
-    IN  NDIS_HANDLE         NdisVcHandle,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmOpenAddressFamilyComplete(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE NdisAfHandle,\r
-    IN  NDIS_HANDLE CallMgrAfContext);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisCmRegisterAddressFamily(\r
-    IN  NDIS_HANDLE                         NdisBindingHandle,\r
-    IN  PCO_ADDRESS_FAMILY                  AddressFamily,\r
-    IN  PNDIS_CALL_MANAGER_CHARACTERISTICS  CmCharacteristics,\r
-    IN  UINT                                SizeOfCmCharacteristics);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCmRegisterSapComplete(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE NdisSapHandle,\r
-    IN  NDIS_HANDLE CallMgrSapContext);\r
-\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMCmActivateVc(\r
-    IN  NDIS_HANDLE         NdisVcHandle,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMCmCreateVc(\r
-    IN  NDIS_HANDLE     MiniportAdapterHandle,\r
-    IN  NDIS_HANDLE     NdisAfHandle,\r
-    IN  NDIS_HANDLE     MiniportVcContext,\r
-    OUT PNDIS_HANDLE    NdisVcHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMCmDeactivateVc(\r
-    IN  NDIS_HANDLE NdisVcHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMCmDeleteVc(\r
-    IN  NDIS_HANDLE NdisVcHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMCmRegisterAddressFamily(\r
-    IN  NDIS_HANDLE                         MiniportAdapterHandle,\r
-    IN  PCO_ADDRESS_FAMILY                  AddressFamily,\r
-    IN  PNDIS_CALL_MANAGER_CHARACTERISTICS  CmCharacteristics,\r
-    IN  UINT                                SizeOfCmCharacteristics);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisMCmRequest(\r
-    IN      NDIS_HANDLE     NdisAfHandle,\r
-    IN      NDIS_HANDLE     NdisVcHandle    OPTIONAL,\r
-    IN      NDIS_HANDLE     NdisPartyHandle OPTIONAL,\r
-    IN OUT  PNDIS_REQUEST   NdisRequest);\r
-\r
-\r
-/* Connection-oriented services */\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisCoCreateVc(\r
-    IN  NDIS_HANDLE         NdisBindingHandle,\r
-    IN  NDIS_HANDLE         NdisAfHandle  OPTIONAL,\r
-    IN  NDIS_HANDLE         ProtocolVcContext,\r
-    IN  OUT PNDIS_HANDLE    NdisVcHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisCoDeleteVc(\r
-    IN  NDIS_HANDLE NdisVcHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisCoRequest(\r
-    IN      NDIS_HANDLE     NdisBindingHandle,\r
-    IN      NDIS_HANDLE     NdisAfHandle    OPTIONAL,\r
-    IN      NDIS_HANDLE     NdisVcHandle    OPTIONAL,\r
-    IN      NDIS_HANDLE     NdisPartyHandle OPTIONAL,\r
-    IN OUT  PNDIS_REQUEST   NdisRequest);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCoRequestComplete(\r
-    IN  NDIS_STATUS     Status,\r
-    IN  NDIS_HANDLE     NdisAfHandle,\r
-    IN  NDIS_HANDLE     NdisVcHandle    OPTIONAL,\r
-    IN  NDIS_HANDLE     NdisPartyHandle OPTIONAL,\r
-    IN  PNDIS_REQUEST   NdisRequest);\r
-\r
-VOID\r
-EXPIMP\r
-NdisCoSendPackets(\r
-    IN  NDIS_HANDLE     NdisVcHandle,\r
-    IN  PPNDIS_PACKET   PacketArray,\r
-    IN  UINT            NumberOfPackets);\r
-\r
-\r
-VOID\r
-EXPIMP\r
-NdisMCoActivateVcComplete(\r
-    IN  NDIS_STATUS         Status,\r
-    IN  NDIS_HANDLE         NdisVcHandle,\r
-    IN  PCO_CALL_PARAMETERS CallParameters);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMCoDeactivateVcComplete(\r
-    IN  NDIS_STATUS Status,\r
-    IN  NDIS_HANDLE NdisVcHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMCoIndicateReceivePacket(\r
-    IN  NDIS_HANDLE     NdisVcHandle,\r
-    IN  PPNDIS_PACKET   PacketArray,\r
-    IN  UINT            NumberOfPackets);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMCoIndicateStatus(\r
-    IN  NDIS_HANDLE MiniportAdapterHandle,\r
-    IN  NDIS_HANDLE NdisVcHandle    OPTIONAL,\r
-    IN  NDIS_STATUS GeneralStatus,\r
-    IN  PVOID       StatusBuffer    OPTIONAL,\r
-    IN  ULONG       StatusBufferSize);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMCoReceiveComplete(\r
-    IN  NDIS_HANDLE MiniportAdapterHandle);\r
-\r
-VOID\r
-EXPIMP\r
-NdisMCoRequestComplete(\r
-    IN  NDIS_STATUS     Status,\r
-    IN  NDIS_HANDLE     MiniportAdapterHandle,\r
-    IN  PNDIS_REQUEST   Request);\r
-\r
-VOID \r
-EXPIMP\r
-NdisMCoSendComplete(\r
-    IN  NDIS_STATUS     Status,\r
-    IN  NDIS_HANDLE     NdisVcHandle,\r
-    IN  PNDIS_PACKET    Packet);\r
-\r
-\r
-/* NDIS 5.0 extensions for intermediate drivers */\r
-\r
-VOID\r
-EXPIMP\r
-NdisIMAssociateMiniport(\r
-    IN  NDIS_HANDLE DriverHandle,\r
-    IN  NDIS_HANDLE ProtocolHandle);\r
-\r
-NDIS_STATUS \r
-EXPIMP\r
-NdisIMCancelInitializeDeviceInstance(\r
-    IN  NDIS_HANDLE     DriverHandle,\r
-    IN  PNDIS_STRING    DeviceInstance);\r
-\r
-VOID\r
-EXPIMP\r
-NdisIMCopySendCompletePerPacketInfo(\r
-    IN  PNDIS_PACKET    DstPacket,\r
-    IN  PNDIS_PACKET    SrcPacket);\r
-\r
-VOID\r
-EXPIMP\r
-NdisIMCopySendPerPacketInfo(\r
-    IN  PNDIS_PACKET    DstPacket,\r
-    IN  PNDIS_PACKET    SrcPacket);\r
-\r
-VOID\r
-EXPIMP\r
-NdisIMDeregisterLayeredMiniport(\r
-    IN  NDIS_HANDLE DriverHandle);\r
-\r
-NDIS_HANDLE\r
-EXPIMP\r
-NdisIMGetBindingContext(\r
-    IN  NDIS_HANDLE NdisBindingHandle);\r
-\r
-NDIS_HANDLE\r
-EXPIMP\r
-NdisIMGetDeviceContext(\r
-    IN  NDIS_HANDLE MiniportAdapterHandle);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-NdisIMInitializeDeviceInstanceEx(\r
-    IN  NDIS_HANDLE     DriverHandle,\r
-    IN  PNDIS_STRING    DriverInstance,\r
-    IN  NDIS_HANDLE     DeviceContext   OPTIONAL);\r
-\r
-#endif /* NDIS50 */\r
-\r
-\r
-\r
-/* NDIS structures available only to miniport drivers */\r
-\r
-#if defined(NDIS_WRAPPER) || defined(NDIS_MINIPORT_DRIVER)\r
-\r
-/* Obsolete technology specific defines */\r
-\r
-#define DECLARE_UNKNOWN_STRUCT(BaseName) \\r
-    typedef struct _##BaseName BaseName, *P##BaseName;\r
-\r
-#define DECLARE_UNKNOWN_PROTOTYPE(Name) \\r
-    typedef VOID (*##Name)(VOID);\r
-\r
-\r
-/* ARCnet */\r
-\r
-DECLARE_UNKNOWN_STRUCT(ARC_FILTER)\r
-\r
-\r
-VOID\r
-EXPIMP\r
-ArcFilterDprIndicateReceive(\r
-    IN  PARC_FILTER Filter,\r
-    IN  PUCHAR      pRawHeader,\r
-    IN  PUCHAR      pData,\r
-    IN  UINT        Length);\r
-\r
-VOID\r
-EXPIMP\r
-ArcFilterDprIndicateReceiveComplete(\r
-    IN  PARC_FILTER Filter);\r
-\r
-\r
-/* Ethernet */\r
-\r
-#define ETH_LENGTH_OF_ADDRESS   6\r
-\r
-DECLARE_UNKNOWN_STRUCT(ETH_FILTER)\r
-\r
-DECLARE_UNKNOWN_PROTOTYPE(ETH_ADDRESS_CHANGE)\r
-DECLARE_UNKNOWN_PROTOTYPE(ETH_FILTER_CHANGE)\r
-DECLARE_UNKNOWN_PROTOTYPE(ETH_DEFERRED_CLOSE)\r
-\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-EthChangeFilterAddresses(\r
-    IN  PETH_FILTER     Filter,\r
-    IN  NDIS_HANDLE     NdisFilterHandle,\r
-    IN  PNDIS_REQUEST   NdisRequest,\r
-    IN  UINT            AddressCount,\r
-    IN  CHAR            Addresses[] [ETH_LENGTH_OF_ADDRESS],\r
-    IN  BOOLEAN         Set);\r
-\r
-BOOLEAN\r
-EXPIMP\r
-EthCreateFilter(\r
-    IN  UINT                MaximumMulticastAddresses,\r
-    IN  ETH_ADDRESS_CHANGE  AddressChangeAction,\r
-    IN  ETH_FILTER_CHANGE   FilterChangeAction,\r
-    IN  ETH_DEFERRED_CLOSE  CloseAction,\r
-    IN  PUCHAR              AdapterAddress,\r
-    IN  PNDIS_SPIN_LOCK     Lock,\r
-    OUT PETH_FILTER         *Filter);\r
-\r
-VOID\r
-EXPIMP\r
-EthDeleteFilter(\r
-    IN  PETH_FILTER Filter);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-EthDeleteFilterOpenAdapter(\r
-    IN  PETH_FILTER    Filter,\r
-    IN  NDIS_HANDLE    NdisFilterHandle,\r
-    IN  PNDIS_REQUEST  NdisRequest);\r
-\r
-NDIS_STATUS\r
-EXPIMP\r
-EthFilterAdjust(\r
-    IN  PETH_FILTER     Filter,\r
-    IN  NDIS_HANDLE     NdisFilterHandle,\r
-    IN  PNDIS_REQUEST   NdisRequest,\r
-    IN  UINT            FilterClasses,\r
-    IN  BOOLEAN         Set);\r
-\r
-VOID\r
-EXPIMP\r
-EthFilterIndicateReceive(\r
-    IN PETH_FILTER Filter,\r
-    IN NDIS_HANDLE MacReceiveContext,\r
-    IN PCHAR       Address,\r
-    IN PVOID       HeaderBuffer,\r
-    IN UINT        HeaderBufferSize,\r
-    IN PVOID       LookaheadBuffer,\r
-    IN UINT        LookaheadBufferSize,\r
-    IN UINT        PacketSize);