Added: trunk/reactos/drivers/net/lan/include/net_lan.h
Added: trunk/reactos/drivers/net/lan/include/net_wh.h
Modified: trunk/reactos/drivers/net/lan/include/precomp.h
Modified: trunk/reactos/drivers/net/lan/lan/lan.c
Modified: trunk/reactos/drivers/net/lan/makefile
Deleted: trunk/reactos/include/net/lan.h
Deleted: trunk/reactos/include/net/wh.h
Modified: trunk/reactos/w32api/include/ddk/ndis.h
--- trunk/reactos/include/net/lan.h 2005-05-25 14:25:19 UTC (rev 15495)
+++ trunk/reactos/drivers/net/lan/include/net_lan.h 2005-05-28 11:30:26 UTC (rev 15573)
@@ -0,0 +1,79 @@
+#ifndef _NET_LAN_H
+
+#include "net_wh.h"
+
+#define FSCTL_LAN_BASE FILE_DEVICE_NETWORK
+#define _LAN_CONTROL_CODE(Function, Method) \
+ CTL_CODE(FSCTL_LAN_BASE, Function, Method, FILE_WRITE_ACCESS)
+
+#define LAN_ENUM_ADAPTERS 0
+#define LAN_BUFFERED_MODE 1
+#define LAN_ADAPTER_INFO 2
+
+#define IOCTL_IF_ENUM_ADAPTERS \
+ _LAN_CONTROL_CODE(LAN_ENUM_ADAPTERS,METHOD_BUFFERED)
+#define IOCTL_IF_BUFFERED_MODE \
+ _LAN_CONTROL_CODE(LAN_BUFFERED_MODE,METHOD_BUFFERED)
+#define IOCTL_IF_ADAPTER_INFO \
+ _LAN_CONTROL_CODE(LAN_ADAPTER_INFO,METHOD_BUFFERED)
+
+typedef struct _LAN_PACKET_HEADER_T {
+ UINT Adapter;
+ UINT AddressType;
+ UINT AddressLen;
+ UINT PacketType;
+ PVOID Mdl;
+} LAN_PACKET_HEADER_T, *PLAN_PACKET_HEADER_T;
+
+typedef struct _LAN_PACKET_HEADER {
+ LAN_PACKET_HEADER_T Fixed;
+ CHAR Address[1];
+} LAN_PACKET_HEADER, *PLAN_PACKET_HEADER;
+
+typedef struct _LAN_ADDRESS {
+ UINT Adapter;
+ UINT Flags;
+ USHORT AddressType;
+ USHORT AddressLen;
+ USHORT HWAddressType;
+ USHORT HWAddressLen;
+ CHAR Address[1];
+} LAN_ADDRESS, *PLAN_ADDRESS;
+
+typedef struct _LAN_ADAPTER_INFO_S {
+ UINT Index;
+ UINT Media;
+ UINT Speed;
+ USHORT AddressLen;
+ USHORT Overhead;
+ USHORT MTU;
+ USHORT RegKeySize;
+} LAN_ADAPTER_INFO_S, *PLAN_ADAPTER_INFO_S;
+
+#define LAN_DATA_PTR(PH) \
+ ((PH)->Address + (PH)->Fixed.AddressLen)
+#define LAN_ALLOC_SIZE(AddrLen,PayloadLen) \
+ (sizeof(LAN_PACKET_HEADER_T) + (AddrLen) + (PayloadLen))
+#define LAN_PAYLOAD_SIZE(PH,Size) \
+ (Size - (PH)->Fixed.AddressLen - sizeof(LAN_PACKET_HEADER_T))
+
+#define LAN_ADDR_SIZE(AddrLen,HWAddrLen) \
+ (sizeof(LAN_ADDRESS) - 1 + (AddrLen) + (HWAddrLen))
+#define LAN_ADDR_PTR(LA) \
+ ((LA)->Address)
+#define LAN_HWADDR_PTR(LA) \
+ ((LA)->Address + (LA)->AddressLen)
+
+#define LAN_EA_INFO_SIZE(NumTypes) \
+ sizeof(FILE_FULL_EA_INFORMATION) + (6 + sizeof(USHORT) * NumTypes)
+#define LAN_FILL_EA_INFO(Ea,NumTypes,Types) \
+ { \
+ RtlCopyMemory( (Ea)->EaName, "TYPES", 6 ); \
+ (Ea)->EaNameLength = 6; \
+ (Ea)->EaValueLength = sizeof(USHORT) * (NumTypes); \
+ RtlCopyMemory( (Ea)->EaName + (Ea)->EaNameLength, \
+ (Types), \
+ sizeof(USHORT) * (NumTypes) ); \
+ }
+
+#endif/*_NET_LAN_H*/
--- trunk/reactos/drivers/net/lan/include/precomp.h 2005-05-28 11:15:08 UTC (rev 15572)
+++ trunk/reactos/drivers/net/lan/include/precomp.h 2005-05-28 11:30:26 UTC (rev 15573)
@@ -8,7 +8,7 @@
#include <roscfg.h>
#include <debug.h>
#include <pseh.h>
-#include "net/lan.h"
+#include "net_lan.h"
#include "lan.h"
#endif/*_LAN_PRECOMP_H*/
--- trunk/reactos/drivers/net/lan/lan/lan.c 2005-05-28 11:15:08 UTC (rev 15572)
+++ trunk/reactos/drivers/net/lan/lan/lan.c 2005-05-28 11:30:26 UTC (rev 15573)
@@ -1208,7 +1208,6 @@
{
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
NTSTATUS Status = STATUS_SUCCESS;
- PFILE_OBJECT FileObject = IrpSp->FileObject;
LA_DbgPrint(MID_TRACE,("LanDispatch: %d\n", IrpSp->MajorFunction));
if( IrpSp->MajorFunction != IRP_MJ_CREATE) {
--- trunk/reactos/drivers/net/lan/makefile 2005-05-28 11:15:08 UTC (rev 15572)
+++ trunk/reactos/drivers/net/lan/makefile 2005-05-28 11:30:26 UTC (rev 15573)
@@ -13,6 +13,7 @@
# -DMEMTRACK
TARGET_CFLAGS = \
-D__USE_W32API \
+ -D_SEH_NO_NATIVE_NLG \
-DNDIS40 \
-DMEMTRACK \
-Wall -Werror \
@@ -20,9 +21,11 @@
-I$(PATH_TO_TOP)/w32api/include \
-I$(PATH_TO_TOP)/include
-TARGET_DDKLIBS = ndis.a \
- $(PATH_TO_TOP)/dk/w32/lib/pseh.a
+TARGET_DDKLIBS = ndis.a
+TARGET_LIBS = \
+ $(PATH_TO_TOP)/dk/w32/lib/libpseh.a
+
TARGET_CLEAN = \
lan/*.o
--- trunk/reactos/include/net/lan.h 2005-05-28 11:15:08 UTC (rev 15572)
+++ trunk/reactos/include/net/lan.h 2005-05-28 11:30:26 UTC (rev 15573)
@@ -1,79 +0,0 @@
-#ifndef _NET_LAN_H
-
-#include "net/wh.h"
-
-#define FSCTL_LAN_BASE FILE_DEVICE_NETWORK
-#define _LAN_CONTROL_CODE(Function, Method) \
- CTL_CODE(FSCTL_LAN_BASE, Function, Method, FILE_WRITE_ACCESS)
-
-#define LAN_ENUM_ADAPTERS 0
-#define LAN_BUFFERED_MODE 1
-#define LAN_ADAPTER_INFO 2
-
-#define IOCTL_IF_ENUM_ADAPTERS \
- _LAN_CONTROL_CODE(LAN_ENUM_ADAPTERS,METHOD_BUFFERED)
-#define IOCTL_IF_BUFFERED_MODE \
- _LAN_CONTROL_CODE(LAN_BUFFERED_MODE,METHOD_BUFFERED)
-#define IOCTL_IF_ADAPTER_INFO \
- _LAN_CONTROL_CODE(LAN_ADAPTER_INFO,METHOD_BUFFERED)
-
-typedef struct _LAN_PACKET_HEADER_T {
- UINT Adapter;
- UINT AddressType;
- UINT AddressLen;
- UINT PacketType;
- PVOID Mdl;
-} LAN_PACKET_HEADER_T, *PLAN_PACKET_HEADER_T;
-
-typedef struct _LAN_PACKET_HEADER {
- LAN_PACKET_HEADER_T Fixed;
- CHAR Address[1];
-} LAN_PACKET_HEADER, *PLAN_PACKET_HEADER;
-
-typedef struct _LAN_ADDRESS {
- UINT Adapter;
- UINT Flags;
- USHORT AddressType;
- USHORT AddressLen;
- USHORT HWAddressType;
- USHORT HWAddressLen;
- CHAR Address[1];
-} LAN_ADDRESS, *PLAN_ADDRESS;
-
-typedef struct _LAN_ADAPTER_INFO_S {
- UINT Index;
- UINT Media;
- UINT Speed;
- USHORT AddressLen;
- USHORT Overhead;
- USHORT MTU;
- USHORT RegKeySize;
-} LAN_ADAPTER_INFO_S, *PLAN_ADAPTER_INFO_S;
-
-#define LAN_DATA_PTR(PH) \
- ((PH)->Address + (PH)->Fixed.AddressLen)
-#define LAN_ALLOC_SIZE(AddrLen,PayloadLen) \
- (sizeof(LAN_PACKET_HEADER_T) + (AddrLen) + (PayloadLen))
-#define LAN_PAYLOAD_SIZE(PH,Size) \
- (Size - (PH)->Fixed.AddressLen - sizeof(LAN_PACKET_HEADER_T))
-
-#define LAN_ADDR_SIZE(AddrLen,HWAddrLen) \
- (sizeof(LAN_ADDRESS) - 1 + (AddrLen) + (HWAddrLen))
-#define LAN_ADDR_PTR(LA) \
- ((LA)->Address)
-#define LAN_HWADDR_PTR(LA) \
- ((LA)->Address + (LA)->AddressLen)
-
-#define LAN_EA_INFO_SIZE(NumTypes) \
- sizeof(FILE_FULL_EA_INFORMATION) + (6 + sizeof(USHORT) * NumTypes)
-#define LAN_FILL_EA_INFO(Ea,NumTypes,Types) \
- { \
- RtlCopyMemory( (Ea)->EaName, "TYPES", 6 ); \
- (Ea)->EaNameLength = 6; \
- (Ea)->EaValueLength = sizeof(USHORT) * (NumTypes); \
- RtlCopyMemory( (Ea)->EaName + (Ea)->EaNameLength, \
- (Types), \
- sizeof(USHORT) * (NumTypes) ); \
- }
-
-#endif/*_NET_LAN_H*/
--- trunk/reactos/include/net/wh.h 2005-05-28 11:15:08 UTC (rev 15572)
+++ trunk/reactos/include/net/wh.h 2005-05-28 11:30:26 UTC (rev 15573)
@@ -1,50 +0,0 @@
-#ifndef _NET_WH_H
-#define _NET_WH_H
-
-#ifdef i386
-
-/* DWORD network to host byte order conversion for i386 */
-#define DN2H(dw) \
- ((((dw) & 0xFF000000L) >> 24) | \
- (((dw) & 0x00FF0000L) >> 8) | \
- (((dw) & 0x0000FF00L) << 8) | \
- (((dw) & 0x000000FFL) << 24))
-
-/* DWORD host to network byte order conversion for i386 */
-#define DH2N(dw) \
- ((((dw) & 0xFF000000L) >> 24) | \
- (((dw) & 0x00FF0000L) >> 8) | \
- (((dw) & 0x0000FF00L) << 8) | \
- (((dw) & 0x000000FFL) << 24))
-
-/* WORD network to host order conversion for i386 */
-#define WN2H(w) \
- ((((w) & 0xFF00) >> 8) | \
- (((w) & 0x00FF) << 8))
-
-/* WORD host to network byte order conversion for i386 */
-#define WH2N(w) \
- ((((w) & 0xFF00) >> 8) | \
- (((w) & 0x00FF) << 8))
-
-#else /* i386 */
-
-/* DWORD network to host byte order conversion for other architectures */
-#define DN2H(dw) \
- (dw)
-
-/* DWORD host to network byte order conversion for other architectures */
-#define DH2N(dw) \
- (dw)
-
-/* WORD network to host order conversion for other architectures */
-#define WN2H(w) \
- (w)
-
-/* WORD host to network byte order conversion for other architectures */
-#define WH2N(w) \
- (w)
-
-#endif /* i386 */
-
-#endif/*_NET_WH_H*/
--- trunk/reactos/w32api/include/ddk/ndis.h 2005-05-28 11:15:08 UTC (rev 15572)
+++ trunk/reactos/w32api/include/ddk/ndis.h 2005-05-28 11:30:26 UTC (rev 15573)
@@ -3066,6 +3066,11 @@
#endif
NDISAPI
+CCHAR
+DDKAPI
+NdisSystemProcessorCount(VOID);
+
+NDISAPI
VOID
DDKAPI
NdisGetCurrentProcessorCpuUsage(
@@ -5169,6 +5174,35 @@
+/* Event functions */
+
+NDISAPI
+VOID
+DDKAPI
+NdisInitializeEvent(
+ IN PNDIS_EVENT Event);
+
+NDISAPI
+VOID
+DDKAPI
+NdisSetEvent(
+ IN PNDIS_EVENT Event);
+
+NDISAPI
+VOID
+DDKAPI
+NdisResetEvent(
+ IN PNDIS_EVENT Event);
+
+NDISAPI
+BOOLEAN
+DDKAPI
+NdisWaitEvent(
+ IN PNDIS_EVENT Event,
+ IN UINT Timeout);
+
+
+
/* NDIS intermediate miniport structures */
typedef VOID (DDKAPI *W_MINIPORT_CALLBACK)(