mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Added required definitions for the packet driver to build.
svn path=/trunk/; revision=3135
This commit is contained in:
parent
1c6674aa68
commit
ea7f10019b
2 changed files with 249 additions and 8 deletions
|
@ -1951,14 +1951,10 @@ NdisFreeBuffer(
|
|||
{ \
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* VOID NdisReinitializePacket(
|
||||
* IN OUT PNDIS_PACKET Packet);
|
||||
*/
|
||||
#define NdisReinitializePacketCounts(Packet) \
|
||||
{ \
|
||||
}
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisReinitializePacket(
|
||||
IN OUT PNDIS_PACKET Packet);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -2236,6 +2232,102 @@ NdisUpdateSharedMemory(
|
|||
|
||||
|
||||
|
||||
//
|
||||
// System processor count
|
||||
//
|
||||
|
||||
CCHAR
|
||||
EXPIMP
|
||||
NdisSystemProcessorCount(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisImmediateReadPortUchar(
|
||||
IN NDIS_HANDLE WrapperConfigurationContext,
|
||||
IN ULONG Port,
|
||||
OUT PUCHAR Data
|
||||
);
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisImmediateReadPortUshort(
|
||||
IN NDIS_HANDLE WrapperConfigurationContext,
|
||||
IN ULONG Port,
|
||||
OUT PUSHORT Data
|
||||
);
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisImmediateReadPortUlong(
|
||||
IN NDIS_HANDLE WrapperConfigurationContext,
|
||||
IN ULONG Port,
|
||||
OUT PULONG Data
|
||||
);
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisImmediateWritePortUchar(
|
||||
IN NDIS_HANDLE WrapperConfigurationContext,
|
||||
IN ULONG Port,
|
||||
IN UCHAR Data
|
||||
);
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisImmediateWritePortUshort(
|
||||
IN NDIS_HANDLE WrapperConfigurationContext,
|
||||
IN ULONG Port,
|
||||
IN USHORT Data
|
||||
);
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisImmediateWritePortUlong(
|
||||
IN NDIS_HANDLE WrapperConfigurationContext,
|
||||
IN ULONG Port,
|
||||
IN ULONG Data
|
||||
);
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisImmediateReadSharedMemory(
|
||||
IN NDIS_HANDLE WrapperConfigurationContext,
|
||||
IN ULONG SharedMemoryAddress,
|
||||
IN PUCHAR Buffer,
|
||||
IN ULONG Length
|
||||
);
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisImmediateWriteSharedMemory(
|
||||
IN NDIS_HANDLE WrapperConfigurationContext,
|
||||
IN ULONG SharedMemoryAddress,
|
||||
IN PUCHAR Buffer,
|
||||
IN ULONG Length
|
||||
);
|
||||
|
||||
ULONG
|
||||
EXPIMP
|
||||
NdisImmediateReadPciSlotInformation(
|
||||
IN NDIS_HANDLE WrapperConfigurationContext,
|
||||
IN ULONG SlotNumber,
|
||||
IN ULONG Offset,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Length
|
||||
);
|
||||
|
||||
ULONG
|
||||
EXPIMP
|
||||
NdisImmediateWritePciSlotInformation(
|
||||
IN NDIS_HANDLE WrapperConfigurationContext,
|
||||
IN ULONG SlotNumber,
|
||||
IN ULONG Offset,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Length
|
||||
);
|
||||
|
||||
/* String management routines */
|
||||
|
||||
#if BINARY_COMPATIBLE
|
||||
|
@ -2562,6 +2654,42 @@ NdisWriteErrorLogEntry(
|
|||
KeStallExecutionProcessor(MicroSecondsToStall)
|
||||
|
||||
|
||||
#define NdisZeroMappedMemory(Destination,Length) RtlZeroMemory(Destination,Length)
|
||||
/* moved to ndis/memory.c by robd
|
||||
#define NdisMoveMappedMemory(Destination,Source,Length) RtlCopyMemory(Destination,Source,Length)
|
||||
*/
|
||||
/* moved to ndis/control.c by robd
|
||||
#define NdisReinitializePacket(Packet) \
|
||||
{ \
|
||||
(Packet)->Private.Head = (PNDIS_BUFFER)NULL; \
|
||||
(Packet)->Private.ValidCounts = FALSE; \
|
||||
}
|
||||
*/
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisInitializeEvent(
|
||||
IN PNDIS_EVENT Event
|
||||
);
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisSetEvent(
|
||||
IN PNDIS_EVENT Event
|
||||
);
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisResetEvent(
|
||||
IN PNDIS_EVENT Event
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
EXPIMP
|
||||
NdisWaitEvent(
|
||||
IN PNDIS_EVENT Event,
|
||||
IN UINT msToWait
|
||||
);
|
||||
|
||||
|
||||
/* NDIS helper macros */
|
||||
|
||||
|
@ -2642,6 +2770,81 @@ NdisReadMcaPosInformation(
|
|||
#endif /* NDIS40 */
|
||||
|
||||
|
||||
#if USE_KLOCKS
|
||||
|
||||
#define DISPATCH_LEVEL 2
|
||||
|
||||
#define NdisAllocateSpinLock(_SpinLock) KeInitializeSpinLock(&(_SpinLock)->SpinLock)
|
||||
|
||||
#define NdisFreeSpinLock(_SpinLock)
|
||||
|
||||
#define NdisAcquireSpinLock(_SpinLock) KeAcquireSpinLock(&(_SpinLock)->SpinLock, &(_SpinLock)->OldIrql)
|
||||
|
||||
#define NdisReleaseSpinLock(_SpinLock) KeReleaseSpinLock(&(_SpinLock)->SpinLock,(_SpinLock)->OldIrql)
|
||||
|
||||
#define NdisDprAcquireSpinLock(_SpinLock) \
|
||||
{ \
|
||||
KeAcquireSpinLockAtDpcLevel(&(_SpinLock)->SpinLock); \
|
||||
(_SpinLock)->OldIrql = DISPATCH_LEVEL; \
|
||||
}
|
||||
|
||||
#define NdisDprReleaseSpinLock(_SpinLock) KeReleaseSpinLockFromDpcLevel(&(_SpinLock)->SpinLock)
|
||||
|
||||
#else
|
||||
|
||||
//
|
||||
// Ndis Spin Locks
|
||||
//
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisAllocateSpinLock(
|
||||
IN PNDIS_SPIN_LOCK SpinLock
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisFreeSpinLock(
|
||||
IN PNDIS_SPIN_LOCK SpinLock
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisAcquireSpinLock(
|
||||
IN PNDIS_SPIN_LOCK SpinLock
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisReleaseSpinLock(
|
||||
IN PNDIS_SPIN_LOCK SpinLock
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisDprAcquireSpinLock(
|
||||
IN PNDIS_SPIN_LOCK SpinLock
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisDprReleaseSpinLock(
|
||||
IN PNDIS_SPIN_LOCK SpinLock
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
VOID
|
||||
EXPIMP
|
||||
NdisGetCurrentSystemTime(
|
||||
PLONGLONG pSystemTime
|
||||
);
|
||||
|
||||
|
||||
/* NDIS 5.0 extensions */
|
||||
|
||||
|
|
|
@ -262,6 +262,36 @@ struct in_addr {
|
|||
#define s_lh S_un.S_un_b.s_b3
|
||||
};
|
||||
|
||||
/*
|
||||
Definitions of bits in internet address integers.
|
||||
NOTE: On subnets the decomposition of addresses to host and
|
||||
net parts is done according to subnet mask, not the masks here.
|
||||
*/
|
||||
#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0)
|
||||
#define IN_CLASSA_NET 0xff000000
|
||||
#define IN_CLASSA_NSHIFT 24
|
||||
#define IN_CLASSA_HOST 0x00ffffff
|
||||
#define IN_CLASSA_MAX 128
|
||||
|
||||
#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000)
|
||||
#define IN_CLASSB_NET 0xffff0000
|
||||
#define IN_CLASSB_NSHIFT 16
|
||||
#define IN_CLASSB_HOST 0x0000ffff
|
||||
#define IN_CLASSB_MAX 65536
|
||||
|
||||
#define IN_CLASSC(i) (((long)(i) & 0xe0000000) == 0xc0000000)
|
||||
#define IN_CLASSC_NET 0xffffff00
|
||||
#define IN_CLASSC_NSHIFT 8
|
||||
#define IN_CLASSC_HOST 0x000000ff
|
||||
|
||||
#define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
|
||||
#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */
|
||||
#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */
|
||||
#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */
|
||||
#define IN_MULTICAST(i) IN_CLASSD(i)
|
||||
|
||||
#define ADDR_ANY INADDR_ANY
|
||||
|
||||
|
||||
struct timeval {
|
||||
LONG tv_sec;
|
||||
|
@ -529,6 +559,14 @@ struct servent {
|
|||
CHAR FAR* s_proto;
|
||||
};
|
||||
|
||||
// It is assumed here that a network number fits in 32 bits.
|
||||
struct netent {
|
||||
CHAR FAR* n_name; // official net name
|
||||
CHAR FAR* FAR* n_aliases; // list of alias's
|
||||
SHORT n_addrtype; // network address type id
|
||||
ULONG n_net; // network number
|
||||
};
|
||||
|
||||
|
||||
typedef UINT GROUP;
|
||||
|
||||
|
|
Loading…
Reference in a new issue