Use W32API.

svn path=/trunk/; revision=15570
This commit is contained in:
Filip Navara 2005-05-28 11:09:53 +00:00
parent 827234d64e
commit 72742963f5
9 changed files with 10 additions and 29 deletions

View file

@ -7,9 +7,9 @@ TARGET_TYPE = driver
TARGET_NAME = npf
#TARGET_CFLAGS = -DDBG -DWIN_NT_DRIVER -DKQPC_TS -I$(PATH_TO_TOP)/ntoskrnl/include
#TARGET_CFLAGS = -D__USE_W32API -D_TIMEVAL_DEFINED -DDBG -DWIN_NT_DRIVER -DKQPC_TS -I$(PATH_TO_TOP)/ntoskrnl/include
TARGET_CFLAGS = -DDBG -DWIN_NT_DRIVER -DKQPC_TS -DUSE_KLOCKS -I$(PATH_TO_TOP)/ntoskrnl/include -Wall -Werror
TARGET_CFLAGS = -D__USE_W32API -D_TIMEVAL_DEFINED -DDBG -DWIN_NT_DRIVER -DKQPC_TS -DUSE_KLOCKS -I$(PATH_TO_TOP)/ntoskrnl/include -Wall -Werror
TARGET_DDKLIBS = ndis.a

View file

@ -26,7 +26,7 @@
#include "ndis.h"
#else
#include <ddk/ntddk.h>
#include <net/ndis.h>
#include <ddk/ndis.h>
//#define PsGetCurrentProcess() IoGetCurrentProcess()
#ifndef PsGetCurrentThread
#define PsGetCurrentThread() ((PETHREAD) (KeGetCurrentThread()))

View file

@ -26,7 +26,7 @@
#include "ndis.h"
#else
#include <ddk/ntddk.h>
#include <net/ndis.h>
#include <ddk/ndis.h>
#endif
#include "packet.h"

View file

@ -25,7 +25,7 @@
#include "ndis.h"
#else
#include <ddk/ntddk.h>
#include <net/ndis.h>
#include <ddk/ndis.h>
#endif
#include "debug.h"
#include "packet.h"

View file

@ -26,7 +26,7 @@
#include "ndis.h"
#else
#include <ddk/ntddk.h>
#include <net/ndis.h>
#include <ddk/ndis.h>
#endif
#include "ntddpack.h"
@ -114,27 +114,14 @@ DriverEntry(
ProtocolChar.MajorNdisVersion = 3;
#endif
ProtocolChar.MinorNdisVersion = 0;
#ifndef __GNUC__
ProtocolChar.Reserved = 0;
#else
ProtocolChar.u1.Reserved = 0;
#endif
ProtocolChar.OpenAdapterCompleteHandler = NPF_OpenAdapterComplete;
ProtocolChar.CloseAdapterCompleteHandler = NPF_CloseAdapterComplete;
#ifndef __GNUC__
ProtocolChar.SendCompleteHandler = NPF_SendComplete;
ProtocolChar.TransferDataCompleteHandler = NPF_TransferDataComplete;
#else
ProtocolChar.u2.SendCompleteHandler = NPF_SendComplete;
ProtocolChar.u3.TransferDataCompleteHandler = NPF_TransferDataComplete;
#endif
ProtocolChar.ResetCompleteHandler = NPF_ResetComplete;
ProtocolChar.RequestCompleteHandler = NPF_RequestComplete;
#ifndef __GNUC__
ProtocolChar.ReceiveHandler = NPF_tap;
#else
ProtocolChar.u4.ReceiveHandler = NPF_tap;
#endif
ProtocolChar.ReceiveCompleteHandler = NPF_ReceiveComplete;
ProtocolChar.StatusHandler = NPF_Status;
ProtocolChar.StatusCompleteHandler = NPF_StatusComplete;

View file

@ -32,13 +32,9 @@
#define NTKERNEL ///< Forces the compilation of the jitter with kernel calls
#ifdef __GNUC__
struct bpf_insn;
#undef EXIT_SUCCESS
#undef EXIT_FAILURE
#define UNICODE_NULL ((WCHAR)0) // winnt
#include "win_bpf.h"
#include <internal/ps.h>
#endif
#include "jitter.h"
#include "tme.h"

View file

@ -26,10 +26,8 @@
#include <ndis.h>
#else
#include <ddk/ntddk.h>
#include <net/ndis.h>
#include <ddk/ndis.h>
#define NdisMoveMappedMemory(Destination,Source,Length) RtlCopyMemory(Destination,Source,Length)
#define NdisZeroMappedMemory(Destination,Length) RtlZeroMemory(Destination,Length)
#define NdisReinitializePacket(Packet) \
{ \
(Packet)->Private.Head = (PNDIS_BUFFER)NULL; \

View file

@ -47,7 +47,7 @@
typedef UCHAR u_char;
typedef USHORT u_short;
typedef ULONG u_int;
typedef UINT u_int;
typedef LONG bpf_int32;
typedef ULONG bpf_u_int32;
typedef ULONG u_int32;

View file

@ -26,7 +26,7 @@
#include "ndis.h"
#else
#include <ddk/ntddk.h>
#include <net/ndis.h>
#include <ddk/ndis.h>
#define NdisReinitializePacket(Packet) \
{ \
(Packet)->Private.Head = (PNDIS_BUFFER)NULL; \