Remove old NDIS headers.
Deleted: trunk/reactos/include/ndis.h
Deleted: trunk/reactos/include/net/ndis.h
Deleted: trunk/reactos/include/net/ndisoid.h
Deleted: trunk/reactos/include/net/ntddndis.h
_____
Deleted: trunk/reactos/include/ndis.h
--- trunk/reactos/include/ndis.h 2005-05-28 11:10:27 UTC (rev
15571)
+++ trunk/reactos/include/ndis.h 2005-05-28 11:15:08 UTC (rev
15572)
@@ -1 +0,0 @@
-#include "net/ndis.h"
_____
Deleted: trunk/reactos/include/net/ndis.h
--- trunk/reactos/include/net/ndis.h 2005-05-28 11:10:27 UTC (rev
15571)
+++ trunk/reactos/include/net/ndis.h 2005-05-28 11:15:08 UTC (rev
15572)
@@ -1,5697 +0,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS NDIS library
- * FILE: include/net/ndis.h
- * PURPOSE: Structures used by NDIS drivers
- * DEFINES: i386 - Target platform is i386
- * NDIS_WRAPPER - Define only for NDIS wrapper
library
- * NDIS_MINIPORT_DRIVER - Define only for NDIS miniport
drivers
- * NDIS40 - Use NDIS 4.0 structures by
default
- * NDIS50 - Use NDIS 5.0 structures by
default
- * NDIS_WDM - Include wdm.h (currently just
pulls in ntddk.h)
- *
- * NOTES: If NDIS_WDM is not defined, ntddk.h is included instead
- *
- * I have removed the following standard flag, used for building
binary-compatible
- * drivers for windows 98 and windows me:
- *
- * BINARY_COMPATIBLE - 0 = Use macros for some features
- * - 1 = Use imports for features not
available
- *
- * rationale: you're never going to use *this* ndis.h to build a
driver for win9x. You'll
- * use the MS ddk. This assumption drammatically simplifies ndis.h.
- *
- * There have been lots of instances of stdcall/cdecl mismatches,
particularly in the
- * callback routines. I have now nailed them all to STDCALL, which is
what they ought to
- * be. If you cross-check with the ndis.h from the MS DDK, you'll note
that the compiler
- * is set to a default calling conveition of stdcall with the /Gz
command-line switch.
- * There are only a few functions that should actually be cdecl:
- * - DbgPrint()
- * - DbgPrintReturnControlC()
- * - NdisWriteErrorLogEntry()
- *
- * All other functions declared in ndis.h should be stdcall.
- *
- * TODO:
- * - finish sanitizing NDIS40 and NDIS50; think about NDIS51
- * - make sure everything is stdcall
- */
-
-#ifndef __NDIS_H
-#define __NDIS_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#pragma pack(push,4)
-
-#include "ntddk.h"
-#include "ntddndis.h"
-#include <ddk/netpnp.h>
-
-#ifdef NDIS50
-#undef NDIS40
-#define NDIS40
-#endif
-
-#ifndef UNALIGNED
-#define UNALIGNED
-#endif
-
-#ifndef FASTCALL
-#define FASTCALL __attribute__((fastcall))
-#endif
-
-/* The NDIS library exports functions. NDIS miniport drivers import
functions */
-#ifdef NDIS_WRAPPER
-
-#ifdef _MSC_VER
-#define DDKAPI __declspec(dllexport)
-#else
-#define DDKAPI STDCALL /* MS ndis.h is 100% stdcall due to compiler
flag /Gz */
-#endif
-
-#else /* NDIS_WRAPPER */
-
-#ifdef _MSC_VER
-#define DDKAPI __declspec(dllimport)
-#else
-#define DDKAPI STDCALL
-#endif
-
-#endif /* NDIS_WRAPPER */
-
-/* support NDIS_WDM and MAC drivers */
-#if defined (NDIS_WDM)
-#include <wdm.h>
-#else
-#include <ntddk.h>
-#endif
-
-/* Assert stuff */
-#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 )
-#define PAGED_CODE() if (KeGetCurrentIrql() > APC_LEVEL)
ASSERT(0);
-
-#else
-#define ASSERT( exp )
-#define ASSERTMSG( msg, exp )
-#define PAGED_CODE()
-#endif /* DBG */
-
-/* Base types */
-
-#define IN
-#define OUT
-#define OPTIONAL
-
-typedef CONST CHAR *PCSTR;
-
-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 _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;
-
-ULONG CDECL DbgPrint(
- PCH Format,
- ...);
-
-
-/* Core kernel functions */
-
-VOID
-STDCALL
-KeStallExecutionProcessor(
- ULONG MicroSeconds);
-
-
-#include <ddk/netevent.h>
-#include "ndisoid.h"
-#include "ntddndis.h"
-
-
-#if !defined(_MSC_VER)
-#ifndef GUID_DEFINED
-#define GUID_DEFINED
-typedef struct _GUID {
- ULONG Data1;
- USHORT Data2;
- USHORT Data3;
- UCHAR Data4[8];
-} GUID;
-#endif /* _GUID_DEFINED */
-#endif /* _MSC_VER */
-
-
-/* NDIS base types */
-
-typedef struct _NDIS_SPIN_LOCK {
- KSPIN_LOCK SpinLock;
- KIRQL OldIrql;
-} NDIS_SPIN_LOCK, * PNDIS_SPIN_LOCK;
-
-typedef struct _NDIS_EVENT {
- KEVENT Event;
-} NDIS_EVENT, *PNDIS_EVENT;
-
-typedef PVOID NDIS_HANDLE, *PNDIS_HANDLE;
-typedef int NDIS_STATUS, *PNDIS_STATUS;
-
-typedef UNICODE_STRING NDIS_STRING, *PNDIS_STRING;
-
-typedef MDL NDIS_BUFFER, *PNDIS_BUFFER;
-
-/* NDIS_STATUS constants */
-#define NDIS_STATUS_SUCCESS
((NDIS_STATUS)STATUS_SUCCESS)
-#define NDIS_STATUS_PENDING
((NDIS_STATUS)STATUS_PENDING)
-#define NDIS_STATUS_NOT_RECOGNIZED
((NDIS_STATUS)0x00010001L)
-#define NDIS_STATUS_NOT_COPIED
((NDIS_STATUS)0x00010002L)
-#define NDIS_STATUS_NOT_ACCEPTED
((NDIS_STATUS)0x00010003L)
-#define NDIS_STATUS_CALL_ACTIVE
((NDIS_STATUS)0x00010007L)
-#define NDIS_STATUS_ONLINE
((NDIS_STATUS)0x40010003L)
-#define NDIS_STATUS_RESET_START
((NDIS_STATUS)0x40010004L)
-#define NDIS_STATUS_RESET_END
((NDIS_STATUS)0x40010005L)
-#define NDIS_STATUS_RING_STATUS
((NDIS_STATUS)0x40010006L)
-#define NDIS_STATUS_CLOSED
((NDIS_STATUS)0x40010007L)
-#define NDIS_STATUS_WAN_LINE_UP
((NDIS_STATUS)0x40010008L)
-#define NDIS_STATUS_WAN_LINE_DOWN
((NDIS_STATUS)0x40010009L)
-#define NDIS_STATUS_WAN_FRAGMENT
((NDIS_STATUS)0x4001000AL)
-#define NDIS_STATUS_MEDIA_CONNECT
((NDIS_STATUS)0x4001000BL)
-#define NDIS_STATUS_MEDIA_DISCONNECT
((NDIS_STATUS)0x4001000CL)
-#define NDIS_STATUS_HARDWARE_LINE_UP
((NDIS_STATUS)0x4001000DL)
-#define NDIS_STATUS_HARDWARE_LINE_DOWN
((NDIS_STATUS)0x4001000EL)
-#define NDIS_STATUS_INTERFACE_UP
((NDIS_STATUS)0x4001000FL)
-#define NDIS_STATUS_INTERFACE_DOWN
((NDIS_STATUS)0x40010010L)
-#define NDIS_STATUS_MEDIA_BUSY
((NDIS_STATUS)0x40010011L)
-#define NDIS_STATUS_WW_INDICATION
((NDIS_STATUS)0x40010012L)
-#define NDIS_STATUS_TAPI_INDICATION
((NDIS_STATUS)0x40010080L)
-
-#define NDIS_STATUS_NOT_RESETTABLE
((NDIS_STATUS)0x80010001L)
-#define NDIS_STATUS_SOFT_ERRORS
((NDIS_STATUS)0x80010003L)
-#define NDIS_STATUS_HARD_ERRORS
((NDIS_STATUS)0x80010004L)
-#define NDIS_STATUS_BUFFER_OVERFLOW
((NDIS_STATUS)STATUS_BUFFER_OVERFLOW)
-
-#define NDIS_STATUS_FAILURE
((NDIS_STATUS)STATUS_UNSUCCESSFUL)
-#define NDIS_STATUS_RESOURCES
((NDIS_STATUS)STATUS_INSUFFICIENT_RESOURCES)
-#define NDIS_STATUS_CLOSING
((NDIS_STATUS)0xC0010002L)
-#define NDIS_STATUS_BAD_VERSION
((NDIS_STATUS)0xC0010004L)
-#define NDIS_STATUS_BAD_CHARACTERISTICS
((NDIS_STATUS)0xC0010005L)
-#define NDIS_STATUS_ADAPTER_NOT_FOUND
((NDIS_STATUS)0xC0010006L)
-#define NDIS_STATUS_OPEN_FAILED
((NDIS_STATUS)0xC0010007L)
-#define NDIS_STATUS_DEVICE_FAILED
((NDIS_STATUS)0xC0010008L)
-#define NDIS_STATUS_MULTICAST_FULL
((NDIS_STATUS)0xC0010009L)
-#define NDIS_STATUS_MULTICAST_EXISTS
((NDIS_STATUS)0xC001000AL)
-#define NDIS_STATUS_MULTICAST_NOT_FOUND
((NDIS_STATUS)0xC001000BL)
-#define NDIS_STATUS_REQUEST_ABORTED
((NDIS_STATUS)0xC001000CL)
-#define NDIS_STATUS_RESET_IN_PROGRESS
((NDIS_STATUS)0xC001000DL)
-#define NDIS_STATUS_CLOSING_INDICATING
((NDIS_STATUS)0xC001000EL)
-#define NDIS_STATUS_NOT_SUPPORTED
((NDIS_STATUS)STATUS_NOT_SUPPORTED)
-#define NDIS_STATUS_INVALID_PACKET
((NDIS_STATUS)0xC001000FL)
-#define NDIS_STATUS_OPEN_LIST_FULL
((NDIS_STATUS)0xC0010010L)
-#define NDIS_STATUS_ADAPTER_NOT_READY
((NDIS_STATUS)0xC0010011L)
-#define NDIS_STATUS_ADAPTER_NOT_OPEN
((NDIS_STATUS)0xC0010012L)
-#define NDIS_STATUS_NOT_INDICATING
((NDIS_STATUS)0xC0010013L)
-#define NDIS_STATUS_INVALID_LENGTH
((NDIS_STATUS)0xC0010014L)
-#define NDIS_STATUS_INVALID_DATA
((NDIS_STATUS)0xC0010015L)
-#define NDIS_STATUS_BUFFER_TOO_SHORT
((NDIS_STATUS)0xC0010016L)
-#define NDIS_STATUS_INVALID_OID
((NDIS_STATUS)0xC0010017L)
-#define NDIS_STATUS_ADAPTER_REMOVED
((NDIS_STATUS)0xC0010018L)
-#define NDIS_STATUS_UNSUPPORTED_MEDIA
((NDIS_STATUS)0xC0010019L)
-#define NDIS_STATUS_GROUP_ADDRESS_IN_USE
((NDIS_STATUS)0xC001001AL)
-#define NDIS_STATUS_FILE_NOT_FOUND
((NDIS_STATUS)0xC001001BL)
-#define NDIS_STATUS_ERROR_READING_FILE
((NDIS_STATUS)0xC001001CL)
-#define NDIS_STATUS_ALREADY_MAPPED
((NDIS_STATUS)0xC001001DL)
-#define NDIS_STATUS_RESOURCE_CONFLICT
((NDIS_STATUS)0xC001001EL)
-#define NDIS_STATUS_NO_CABLE
((NDIS_STATUS)0xC001001FL)
-
-#define NDIS_STATUS_INVALID_SAP
((NDIS_STATUS)0xC0010020L)
-#define NDIS_STATUS_SAP_IN_USE
((NDIS_STATUS)0xC0010021L)
-#define NDIS_STATUS_INVALID_ADDRESS
((NDIS_STATUS)0xC0010022L)
-#define NDIS_STATUS_VC_NOT_ACTIVATED
((NDIS_STATUS)0xC0010023L)
-#define NDIS_STATUS_DEST_OUT_OF_ORDER
((NDIS_STATUS)0xC0010024L)
-#define NDIS_STATUS_VC_NOT_AVAILABLE
((NDIS_STATUS)0xC0010025L)
-#define NDIS_STATUS_CELLRATE_NOT_AVAILABLE
((NDIS_STATUS)0xC0010026L)
-#define NDIS_STATUS_INCOMPATABLE_QOS
((NDIS_STATUS)0xC0010027L)
-#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED
((NDIS_STATUS)0xC0010028L)
-#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION
((NDIS_STATUS)0xC0010029L)
-
-#define NDIS_STATUS_TOKEN_RING_OPEN_ERROR
((NDIS_STATUS)0xC0011000L)
-
-
-/* NDIS error codes for error logging */
-
-#define NDIS_ERROR_CODE ULONG
-
-#define NDIS_ERROR_CODE_RESOURCE_CONFLICT
EVENT_NDIS_RESOURCE_CONFLICT
-#define NDIS_ERROR_CODE_OUT_OF_RESOURCES
EVENT_NDIS_OUT_OF_RESOURCE
-#define NDIS_ERROR_CODE_HARDWARE_FAILURE
EVENT_NDIS_HARDWARE_FAILURE
-#define NDIS_ERROR_CODE_ADAPTER_NOT_FOUND
EVENT_NDIS_ADAPTER_NOT_FOUND
-#define NDIS_ERROR_CODE_INTERRUPT_CONNECT
EVENT_NDIS_INTERRUPT_CONNECT
-#define NDIS_ERROR_CODE_DRIVER_FAILURE
EVENT_NDIS_DRIVER_FAILURE
-#define NDIS_ERROR_CODE_BAD_VERSION
EVENT_NDIS_BAD_VERSION
-#define NDIS_ERROR_CODE_TIMEOUT
EVENT_NDIS_TIMEOUT
-#define NDIS_ERROR_CODE_NETWORK_ADDRESS
EVENT_NDIS_NETWORK_ADDRESS
-#define NDIS_ERROR_CODE_UNSUPPORTED_CONFIGURATION
EVENT_NDIS_UNSUPPORTED_CONFIGURATION
-#define NDIS_ERROR_CODE_INVALID_VALUE_FROM_ADAPTER
EVENT_NDIS_INVALID_VALUE_FROM_ADAPTER
-#define NDIS_ERROR_CODE_MISSING_CONFIGURATION_PARAMETER
EVENT_NDIS_MISSING_CONFIGURATION_PARAMETER
-#define NDIS_ERROR_CODE_BAD_IO_BASE_ADDRESS
EVENT_NDIS_BAD_IO_BASE_ADDRESS
-#define NDIS_ERROR_CODE_RECEIVE_SPACE_SMALL
EVENT_NDIS_RECEIVE_SPACE_SMALL
-#define NDIS_ERROR_CODE_ADAPTER_DISABLED
EVENT_NDIS_ADAPTER_DISABLED
-
-
-/* Memory allocation flags. Used by Ndis[Allocate|Free]Memory */
-#define NDIS_MEMORY_CONTIGUOUS 0x00000001
-#define NDIS_MEMORY_NONCACHED 0x00000002
-
-/* NIC attribute flags. Used by NdisMSetAttributes(Ex) */
-#define NDIS_ATTRIBUTE_IGNORE_PACKET_TIMEOUT 0x00000001
-#define NDIS_ATTRIBUTE_IGNORE_REQUEST_TIMEOUT 0x00000002
-#define NDIS_ATTRIBUTE_IGNORE_TOKEN_RING_ERRORS 0x00000004
-#define NDIS_ATTRIBUTE_BUS_MASTER 0x00000008
-#define NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER 0x00000010
-#define NDIS_ATTRIBUTE_DESERIALIZE 0x00000020
-
-
-#define MAXIMUM_PROCESSORS 32
-
-/* Lock */
-
-typedef union _NDIS_RW_LOCK_REFCOUNT {
- UINT RefCount;
- UCHAR cacheLine[16];
-} NDIS_RW_LOCK_REFCOUNT;
-
-typedef struct _NDIS_RW_LOCK {
- union {
- struct {
- KSPIN_LOCK SpinLock;
- PVOID Context;
- } s;
- UCHAR Reserved[16];
- } u;
-
- NDIS_RW_LOCK_REFCOUNT RefCount[MAXIMUM_PROCESSORS];
-} NDIS_RW_LOCK, *PNDIS_RW_LOCK;
-
-typedef struct _LOCK_STATE {
- USHORT LockState;
- KIRQL OldIrql;
-} LOCK_STATE, *PLOCK_STATE;
-
-
-
-/* Timer */
-
-typedef VOID
-(*PNDIS_TIMER_FUNCTION)(
- IN PVOID SystemSpecific1,
- IN PVOID FunctionContext,
- IN PVOID SystemSpecific2,
- IN PVOID SystemSpecific3);
-
-typedef struct _NDIS_TIMER {
- KTIMER Timer;
- KDPC Dpc;
-} NDIS_TIMER, *PNDIS_TIMER;
-
-VOID
-DDKAPI
-NdisInitializeTimer(
- IN OUT PNDIS_TIMER Timer,
- IN PNDIS_TIMER_FUNCTION TimerFunction,
- IN PVOID FunctionContext);
-
-VOID
-DDKAPI
-NdisSetTimer(
- IN PNDIS_TIMER Timer,
- IN UINT MillisecondsToDelay);
-
-/* Hardware */
-
-typedef CM_MCA_POS_DATA NDIS_MCA_POS_DATA, *PNDIS_MCA_POS_DATA;
-typedef CM_EISA_SLOT_INFORMATION NDIS_EISA_SLOT_INFORMATION,
*PNDIS_EISA_SLOT_INFORMATION;
-typedef CM_EISA_FUNCTION_INFORMATION NDIS_EISA_FUNCTION_INFORMATION,
*PNDIS_EISA_FUNCTION_INFORMATION;
-typedef CM_PARTIAL_RESOURCE_LIST NDIS_RESOURCE_LIST,
*PNDIS_RESOURCE_LIST;
-
-/* Hardware status codes (OID_GEN_HARDWARE_STATUS) */
-typedef enum _NDIS_HARDWARE_STATUS {
- NdisHardwareStatusReady,
- NdisHardwareStatusInitializing,
- NdisHardwareStatusReset,
- NdisHardwareStatusClosing,
- NdisHardwareStatusNotReady
-} NDIS_HARDWARE_STATUS, *PNDIS_HARDWARE_STATUS;
-
-/* OID_GEN_GET_TIME_CAPS */
-typedef struct _GEN_GET_TIME_CAPS {
- ULONG Flags;
- ULONG ClockPrecision;
-} GEN_GET_TIME_CAPS, *PGEN_GET_TIME_CAPS;
-
-/* Flag bits */
-#define READABLE_LOCAL_CLOCK 0x00000001
-#define CLOCK_NETWORK_DERIVED 0x00000002
-#define CLOCK_PRECISION 0x00000004
-#define RECEIVE_TIME_INDICATION_CAPABLE 0x00000008
-#define TIMED_SEND_CAPABLE 0x00000010
-#define TIME_STAMP_CAPABLE 0x00000020
-
-/* OID_GEN_GET_NETCARD_TIME */
-typedef struct _GEN_GET_NETCARD_TIME {
- ULONGLONG ReadTime;
-} GEN_GET_NETCARD_TIME, *PGEN_GET_NETCARD_TIME;
-
-/* NDIS driver medium (OID_GEN_MEDIA_SUPPORTED / OID_GEN_MEDIA_IN_USE)
*/
-typedef enum _NDIS_MEDIUM {
- NdisMedium802_3,
- NdisMedium802_5,
- NdisMediumFddi,
- NdisMediumWan,
- NdisMediumLocalTalk,
- NdisMediumDix, /* Defined for convenience, not a real
medium */
- NdisMediumArcnetRaw,
- NdisMediumArcnet878_2,
- NdisMediumAtm,
- NdisMediumWirelessWan,
- NdisMediumIrda,
- NdisMediumBpc,
- NdisMediumCoWan,
- NdisMedium1394,
- NdisMediumMax
-} NDIS_MEDIUM, *PNDIS_MEDIUM;
-
-/* NDIS packet filter bits (OID_GEN_CURRENT_PACKET_FILTER) */
-#define NDIS_PACKET_TYPE_DIRECTED 0x00000001
-#define NDIS_PACKET_TYPE_MULTICAST 0x00000002
-#define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004
-#define NDIS_PACKET_TYPE_BROADCAST 0x00000008
-#define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010
-#define NDIS_PACKET_TYPE_PROMISCUOUS 0x00000020
-#define NDIS_PACKET_TYPE_SMT 0x00000040
-#define NDIS_PACKET_TYPE_ALL_LOCAL 0x00000080
-#define NDIS_PACKET_TYPE_GROUP 0x00001000
-#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00002000
-#define NDIS_PACKET_TYPE_FUNCTIONAL 0x00004000
-#define NDIS_PACKET_TYPE_MAC_FRAME 0x00008000
-
-/* NDIS protocol option bits (OID_GEN_PROTOCOL_OPTIONS) */
-#define NDIS_PROT_OPTION_ESTIMATED_LENGTH 0x00000001
-#define NDIS_PROT_OPTION_NO_LOOPBACK 0x00000002
-#define NDIS_PROT_OPTION_NO_RSVD_ON_RCVPKT 0x00000004
-
-/* NDIS MAC option bits (OID_GEN_MAC_OPTIONS) */
-#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001
-#define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002
-#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004
-#define NDIS_MAC_OPTION_NO_LOOPBACK 0x00000008
-#define NDIS_MAC_OPTION_FULL_DUPLEX 0x00000010
-#define NDIS_MAC_OPTION_EOTX_INDICATION 0x00000020
-#define NDIS_MAC_OPTION_8021P_PRIORITY 0x00000040
-#define NDIS_MAC_OPTION_RESERVED 0x80000000
-
-/* State of the LAN media (OID_GEN_MEDIA_CONNECT_STATUS) */
-typedef enum _NDIS_MEDIA_STATE {
- NdisMediaStateConnected,
- NdisMediaStateDisconnected
-} NDIS_MEDIA_STATE, *PNDIS_MEDIA_STATE;
-
-/* OID_GEN_SUPPORTED_GUIDS */
-typedef struct _NDIS_GUID {
- GUID Guid;
- union {
- NDIS_OID Oid;
- NDIS_STATUS Status;
- } u;
- ULONG Size;
- ULONG Flags;
-} NDIS_GUID, *PNDIS_GUID;
-
-#define NDIS_GUID_TO_OID 0x00000001
-#define NDIS_GUID_TO_STATUS 0x00000002
-#define NDIS_GUID_ANSI_STRING 0x00000004
-#define NDIS_GUID_UNICODE_STRING 0x00000008
-#define NDIS_GUID_ARRAY 0x00000010
-
-
-typedef struct _NDIS_PACKET_POOL {
- NDIS_SPIN_LOCK SpinLock;
- struct _NDIS_PACKET *FreeList;
- UINT PacketLength;
- UCHAR Buffer[1];
-} NDIS_PACKET_POOL, * PNDIS_PACKET_POOL;
-
-typedef struct _NDIS_PACKET_PRIVATE {
- UINT PhysicalCount;
- UINT TotalLength;
- PNDIS_BUFFER Head;
- PNDIS_BUFFER Tail;
- PNDIS_PACKET_POOL Pool;
- UINT Count;
- ULONG Flags; /* See fPACKET_xxx bits
below */
- BOOLEAN ValidCounts;
- UCHAR NdisPacketFlags;
- USHORT NdisPacketOobOffset;
-} NDIS_PACKET_PRIVATE, * PNDIS_PACKET_PRIVATE;
-
-#define fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO 0x40
-#define fPACKET_ALLOCATED_BY_NDIS 0x80
-
-typedef struct _NDIS_PACKET {
- NDIS_PACKET_PRIVATE Private;
- union {
- struct {
- UCHAR MiniportReserved[2*sizeof(PVOID)];
- UCHAR WrapperReserved[2*sizeof(PVOID)];
- } s1;
- struct {
- UCHAR MiniportReservedEx[3*sizeof(PVOID)];
- UCHAR WrapperReservedEx[sizeof(PVOID)];
- } s2;
- struct {
- UCHAR MacReserved[4*sizeof(PVOID)];
- } s3;
- } u;
- ULONG_PTR Reserved[2];
- UCHAR ProtocolReserved[1];
-} NDIS_PACKET, *PNDIS_PACKET, **PPNDIS_PACKET;
-
-typedef struct _NDIS_PACKET_OOB_DATA {
- union {
- ULONGLONG TimeToSend;
- ULONGLONG TimeSent;
- } u;
- ULONGLONG TimeReceived;
- UINT HeaderSize;
- UINT SizeMediaSpecificInfo;
- PVOID MediaSpecificInformation;
- NDIS_STATUS Status;
-} NDIS_PACKET_OOB_DATA, *PNDIS_PACKET_OOB_DATA;
-
-typedef struct _NDIS_PM_PACKET_PATTERN {
- ULONG Priority;
- ULONG Reserved;
- ULONG MaskSize;
- ULONG PatternOffset;
- ULONG PatternSize;
- ULONG PatternFlags;
-} NDIS_PM_PACKET_PATTERN, *PNDIS_PM_PACKET_PATTERN;
-
-
-/* Request types used by NdisRequest */
-typedef enum _NDIS_REQUEST_TYPE {
- NdisRequestQueryInformation,
- NdisRequestSetInformation,
- NdisRequestQueryStatistics,
- NdisRequestOpen,
- NdisRequestClose,
- NdisRequestSend,
- NdisRequestTransferData,
- NdisRequestReset,
- NdisRequestGeneric1,
- NdisRequestGeneric2,
- NdisRequestGeneric3,
- NdisRequestGeneric4
-} NDIS_REQUEST_TYPE, *PNDIS_REQUEST_TYPE;
-
-typedef struct _NDIS_REQUEST {
- UCHAR MacReserved[16];
- NDIS_REQUEST_TYPE RequestType;
- union _DATA {
- struct QUERY_INFORMATION {
- NDIS_OID Oid;
- PVOID InformationBuffer;
- UINT InformationBufferLength;
- UINT BytesWritten;
- UINT BytesNeeded;
- } QUERY_INFORMATION;
- struct SET_INFORMATION {
- NDIS_OID Oid;
- PVOID InformationBuffer;
- UINT InformationBufferLength;
- UINT BytesRead;
- UINT BytesNeeded;
- } SET_INFORMATION;
- } DATA;
-#ifdef NDIS50
- UCHAR NdisReserved[36];
- union {
- UCHAR CallMgrReserved[8];
- UCHAR ProtocolReserved[8];
- };
- UCHAR MiniportReserved[8];
-#endif
-} NDIS_REQUEST, *PNDIS_REQUEST;
-
-
-
-/* Wide Area Networks definitions */
-
-typedef struct _NDIS_WAN_PACKET {
- LIST_ENTRY WanPacketQueue;
- PUCHAR CurrentBuffer;
- ULONG CurrentLength;
- PUCHAR StartBuffer;
- PUCHAR EndBuffer;
- PVOID ProtocolReserved1;
- PVOID ProtocolReserved2;
- PVOID ProtocolReserved3;
- PVOID ProtocolReserved4;
- PVOID MacReserved1;
- PVOID MacReserved2;
- PVOID MacReserved3;
- PVOID MacReserved4;
-} NDIS_WAN_PACKET, *PNDIS_WAN_PACKET;
-
-
-
-/* DMA channel information */
-
-typedef struct _NDIS_DMA_DESCRIPTION {
- BOOLEAN DemandMode;
- BOOLEAN AutoInitialize;
- BOOLEAN DmaChannelSpecified;
- DMA_WIDTH DmaWidth;
- DMA_SPEED DmaSpeed;
- ULONG DmaPort;
- ULONG DmaChannel;
-} NDIS_DMA_DESCRIPTION, *PNDIS_DMA_DESCRIPTION;
-
-typedef struct _NDIS_DMA_BLOCK {
- PVOID MapRegisterBase;
- KEVENT AllocationEvent;
- PADAPTER_OBJECT SystemAdapterObject;
- BOOLEAN InProgress;
-} NDIS_DMA_BLOCK, *PNDIS_DMA_BLOCK;
-
-#define NDIS_DMA_24BITS 0
-#define NDIS_DMA_32BITS 1
-#define NDIS_DMA_64BITS 2
-
-/* Possible hardware architecture */
-typedef enum _NDIS_INTERFACE_TYPE {
- NdisInterfaceInternal = Internal,
- NdisInterfaceIsa = Isa,
- NdisInterfaceEisa = Eisa,
- NdisInterfaceMca = MicroChannel,
- NdisInterfaceTurboChannel = TurboChannel,
- NdisInterfacePci = PCIBus,
- NdisInterfacePcMcia = PCMCIABus
-} NDIS_INTERFACE_TYPE, *PNDIS_INTERFACE_TYPE;
-
-#define NdisInterruptLevelSensitive LevelSensitive
-#define NdisInterruptLatched Latched
-typedef KINTERRUPT_MODE NDIS_INTERRUPT_MODE, *PNDIS_INTERRUPT_MODE;
-
-typedef enum _NDIS_PROCESSOR_TYPE {
- NdisProcessorX86,
- NdisProcessorMips,
- NdisProcessorAlpha,
- NdisProcessorPpc
-} NDIS_PROCESSOR_TYPE, *PNDIS_PROCESSOR_TYPE;
-
-typedef enum _NDIS_ENVIRONMENT_TYPE {
- NdisEnvironmentWindows,
- NdisEnvironmentWindowsNt
-} NDIS_ENVIRONMENT_TYPE, *PNDIS_ENVIRONMENT_TYPE;
-
-typedef enum _NDIS_PARAMETER_TYPE {
- NdisParameterInteger,
- NdisParameterHexInteger,
- NdisParameterString,
- NdisParameterMultiString,
- NdisParameterBinary
-} NDIS_PARAMETER_TYPE, *PNDIS_PARAMETER_TYPE;
-
-typedef struct {
- USHORT Length;
- PVOID Buffer;
-} BINARY_DATA;
-
-typedef struct _NDIS_CONFIGURATION_PARAMETER {
- NDIS_PARAMETER_TYPE ParameterType;
- union {
- ULONG IntegerData;
- NDIS_STRING StringData;
- BINARY_DATA BinaryData;
- } ParameterData;
-} NDIS_CONFIGURATION_PARAMETER, *PNDIS_CONFIGURATION_PARAMETER;
-
-
-typedef PHYSICAL_ADDRESS NDIS_PHYSICAL_ADDRESS,
*PNDIS_PHYSICAL_ADDRESS;
-
-typedef struct _NDIS_PHYSICAL_ADDRESS_UNIT {
- NDIS_PHYSICAL_ADDRESS PhysicalAddress;
- UINT Length;
-} NDIS_PHYSICAL_ADDRESS_UNIT, *PNDIS_PHYSICAL_ADDRESS_UNIT;
-
-
-typedef VOID
-(STDCALL *ADAPTER_SHUTDOWN_HANDLER)(
- IN PVOID ShutdownContext);
-
-
-
-//#ifdef NDIS_WRAPPER
-
-typedef struct _OID_LIST OID_LIST, *POID_LIST;
-
-/* PnP state */
-
-typedef enum _NDIS_PNP_DEVICE_STATE {
- NdisPnPDeviceAdded,
- NdisPnPDeviceStarted,
- NdisPnPDeviceQueryStopped,
- NdisPnPDeviceStopped,
- NdisPnPDeviceQueryRemoved,
- NdisPnPDeviceRemoved,
- NdisPnPDeviceSurpriseRemoved
-} NDIS_PNP_DEVICE_STATE;
-
-#define NDIS_DEVICE_NOT_STOPPABLE 0x00000001
-#define NDIS_DEVICE_NOT_REMOVEABLE 0x00000002
-#define NDIS_DEVICE_NOT_SUSPENDABLE 0x00000004
-#define NDIS_DEVICE_DISABLE_PM 0x00000008
-#define NDIS_DEVICE_DISABLE_WAKE_UP 0x00000010
-#define NDIS_DEVICE_DISABLE_WAKE_ON_RECONNECT 0x00000020
-
-//#endif /* NDIS_WRAPPER */
-
-
-typedef struct _ATM_ADDRESS ATM_ADDRESS, *PATM_ADDRESS;
-
-
-/* OID_GEN_NETWORK_LAYER_ADDRESSES */
-typedef struct _NETWORK_ADDRESS {
- USHORT AddressLength;
- USHORT AddressType;
- UCHAR Address[1];
-} NETWORK_ADDRESS, *PNETWORK_ADDRESS;
-
-typedef struct _NETWORK_ADDRESS_LIST {
- LONG AddressCount;
- USHORT AddressType;
- NETWORK_ADDRESS Address[1];
-} NETWORK_ADDRESS_LIST, *PNETWORK_ADDRESS_LIST;
-
-/* Protocol types supported by NDIS */
-#define NDIS_PROTOCOL_ID_DEFAULT 0x00
-#define NDIS_PROTOCOL_ID_TCP_IP 0x02
-#define NDIS_PROTOCOL_ID_IPX 0x06
-#define NDIS_PROTOCOL_ID_NBF 0x07
-#define NDIS_PROTOCOL_ID_MAX 0x0F
-#define NDIS_PROTOCOL_ID_MASK 0x0F
-
-
-/* OID_GEN_TRANSPORT_HEADER_OFFSET */
-typedef struct _TRANSPORT_HEADER_OFFSET {
- USHORT ProtocolType;
- USHORT HeaderOffset;
-} TRANSPORT_HEADER_OFFSET, *PTRANSPORT_HEADER_OFFSET;
-
-
-/* OID_GEN_CO_LINK_SPEED / OID_GEN_CO_MINIMUM_LINK_SPEED */
-typedef struct _NDIS_CO_LINK_SPEED {
- ULONG Outbound;
- ULONG Inbound;
-} NDIS_CO_LINK_SPEED, *PNDIS_CO_LINK_SPEED;
-
-
-typedef enum _NDIS_AF {
- CO_ADDRESS_FAMILY_Q2931 = 1,
- CO_ADDRESS_FAMILY_SPANS,
-} NDIS_AF, *PNDIS_AF;
-
-typedef struct {
- NDIS_AF AddressFamily;
- ULONG MajorVersion;
- ULONG MinorVersion;
-} CO_ADDRESS_FAMILY, *PCO_ADDRESS_FAMILY;
-
-typedef enum {
- BestEffortService,
- PredictiveService,
- GuaranteedService
-} GUARANTEE;
-
-typedef struct _CO_FLOW_PARAMETERS {
- ULONG TokenRate; /* In Bytes/sec */
- ULONG TokenBucketSize; /* In Bytes */
- ULONG PeakBandwidth; /* In Bytes/sec */
- ULONG Latency; /* In microseconds */
- ULONG DelayVariation; /* In microseconds */
- GUARANTEE LevelOfGuarantee; /* Guaranteed, Predictive or
Best Effort */
- ULONG CostOfCall; /* Reserved for future use, */
- /* must be set to 0 now */
- ULONG NetworkAvailability; /* read-only: 1 if accessible,
0 if not */
- ULONG MaxSduSize; /* In Bytes */
-} CO_FLOW_PARAMETERS, *PCO_FLOW_PARAMETERS;
-
-typedef struct _CO_SPECIFIC_PARAMETERS {
- ULONG ParamType;
- ULONG Length;
- UCHAR Parameters[1];
-} CO_SPECIFIC_PARAMETERS, *PCO_SPECIFIC_PARAMETERS;
-
-typedef struct _CO_CALL_MANAGER_PARAMETERS {
- CO_FLOW_PARAMETERS Transmit;
- CO_FLOW_PARAMETERS Receive;
- CO_SPECIFIC_PARAMETERS CallMgrSpecific;
-} CO_CALL_MANAGER_PARAMETERS, *PCO_CALL_MANAGER_PARAMETERS;
-
-/* CO_MEDIA_PARAMETERS.Flags constants */
-#define RECEIVE_TIME_INDICATION 0x00000001
-#define USE_TIME_STAMPS 0x00000002
-#define TRANSMIT_VC 0x00000004
-#define RECEIVE_VC 0x00000008
-#define INDICATE_ERRED_PACKETS 0x00000010
-#define INDICATE_END_OF_TX 0x00000020
-#define RESERVE_RESOURCES_VC 0x00000040
-#define ROUND_DOWN_FLOW 0x00000080
-#define ROUND_UP_FLOW 0x00000100
-
-typedef struct _CO_MEDIA_PARAMETERS {
- ULONG Flags;
- ULONG ReceivePriority;
- ULONG ReceiveSizeHint;
- CO_SPECIFIC_PARAMETERS MediaSpecific;
-} CO_MEDIA_PARAMETERS, *PCO_MEDIA_PARAMETERS;
-
-typedef struct _CO_CALL_PARAMETERS {
- ULONG Flags;
- PCO_CALL_MANAGER_PARAMETERS CallMgrParameters;
- PCO_MEDIA_PARAMETERS MediaParameters;
-} CO_CALL_PARAMETERS, *PCO_CALL_PARAMETERS;
-
-typedef struct _CO_SAP {
- ULONG SapType;
- ULONG SapLength;
- UCHAR Sap[1];
-} CO_SAP, *PCO_SAP;
-
-typedef struct _NDIS_IPSEC_PACKET_INFO {
- union {
- struct {
- NDIS_HANDLE OffloadHandle;
- NDIS_HANDLE NextOffloadHandle;
- } Transmit;
- struct {
- ULONG SA_DELETE_REQ:1;
- ULONG CRYPTO_DONE:1;
- ULONG NEXT_CRYPTO_DONE:1;
- ULONG CryptoStatus;
- } Receive;
- } u;
-} NDIS_IPSEC_PACKET_INFO, *PNDIS_IPSEC_PACKET_INFO;
-
-
-#if 0
-
-/* Plug and play and power management */
-
-/* PnP and PM event codes */
-typedef enum _NET_PNP_EVENT_CODE {
- NetEventSetPower,
- NetEventQueryPower,
- NetEventQueryRemoveDevice,
- NetEventCancelRemoveDevice,
- NetEventReconfigure,
- NetEventBindList,
- NetEventBindsComplete,
- NetEventPnPCapabilities,
- NetEventMaximum
-} NET_PNP_EVENT_CODE, *PNET_PNP_EVENT_CODE;
-
-/* Networking PnP event indication structure */
-typedef struct _NET_PNP_EVENT {
- /* Event code */
- NET_PNP_EVENT_CODE NetEvent;
- /* Event specific data */
- PVOID Buffer;
- /* Length of event specific data */
- ULONG BufferLength;
-
- /* Reserved areas */
- ULONG_PTR NdisReserved[4];
- ULONG_PTR TransportReserved[4];
- ULONG_PTR TdiReserved[4];
- ULONG_PTR TdiClientReserved[4];
-} NET_PNP_EVENT, *PNET_PNP_EVENT;
-
-/* Device power state structure */
-typedef enum _NET_DEVICE_POWER_STATE {
- NetDeviceStateUnspecified = 0,
- NetDeviceStateD0,
- NetDeviceStateD1,
- NetDeviceStateD2,
- NetDeviceStateD3,
- NetDeviceStateMaximum
-} NET_DEVICE_POWER_STATE, *PNET_DEVICE_POWER_STATE;
-
-#endif
-
-/* Call Manager */
-
-typedef NDIS_STATUS STDCALL_FUNC (*CO_CREATE_VC_HANDLER)(
- IN NDIS_HANDLE ProtocolAfContext,
- IN NDIS_HANDLE NdisVcHandle,
- OUT PNDIS_HANDLE ProtocolVcContext);
-
-typedef NDIS_STATUS STDCALL_FUNC (*CO_DELETE_VC_HANDLER)(
- IN NDIS_HANDLE ProtocolVcContext);
-
-typedef NDIS_STATUS STDCALL_FUNC (*CO_REQUEST_HANDLER)(
- IN NDIS_HANDLE ProtocolAfContext,
- IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
- IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
- IN OUT PNDIS_REQUEST NdisRequest);
-
-typedef VOID STDCALL_FUNC (*CO_REQUEST_COMPLETE_HANDLER)(
- IN NDIS_STATUS Status,
- IN NDIS_HANDLE ProtocolAfContext OPTIONAL,
- IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
- IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
- IN PNDIS_REQUEST NdisRequest);
-
-
[truncated at 1000 lines; 5238 more skipped]