Author: cgutman
Date: Sun Nov 22 00:53:43 2009
New Revision: 44266
URL:
http://svn.reactos.org/svn/reactos?rev=44266&view=rev
Log:
- Remove memtrack and use tags instead (ExAllocatePoolWithTag/ExFreePoolWithTag)
- Cleanup DriverEntry
- Remove DEFINE_TAG
- Remove checkpoints in TiCreateFileObject
Added:
trunk/reactos/drivers/network/tcpip/include/tags.h (with props)
Removed:
trunk/reactos/drivers/network/tcpip/include/irp.h
trunk/reactos/drivers/network/tcpip/include/memtrack.h
trunk/reactos/drivers/network/tcpip/tcpip/irp.c
trunk/reactos/lib/drivers/ip/network/memtrack.c
trunk/reactos/lib/drivers/oskittcp/include/memtrack.h
Modified:
trunk/reactos/drivers/network/tcpip/datalink/lan.c
trunk/reactos/drivers/network/tcpip/include/address.h
trunk/reactos/drivers/network/tcpip/include/debug.h
trunk/reactos/drivers/network/tcpip/include/dispatch.h
trunk/reactos/drivers/network/tcpip/include/ip.h
trunk/reactos/drivers/network/tcpip/include/neighbor.h
trunk/reactos/drivers/network/tcpip/include/precomp.h
trunk/reactos/drivers/network/tcpip/include/routines.h
trunk/reactos/drivers/network/tcpip/include/titypes.h
trunk/reactos/drivers/network/tcpip/tcpip.rbuild
trunk/reactos/drivers/network/tcpip/tcpip/buffer.c
trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c
trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c
trunk/reactos/drivers/network/tcpip/tcpip/iinfo.c
trunk/reactos/drivers/network/tcpip/tcpip/main.c
trunk/reactos/drivers/network/tcpip/tcpip/ninfo.c
trunk/reactos/lib/drivers/ip/ip.rbuild
trunk/reactos/lib/drivers/ip/network/address.c
trunk/reactos/lib/drivers/ip/network/ip.c
trunk/reactos/lib/drivers/ip/network/neighbor.c
trunk/reactos/lib/drivers/ip/network/ports.c
trunk/reactos/lib/drivers/ip/network/receive.c
trunk/reactos/lib/drivers/ip/network/router.c
trunk/reactos/lib/drivers/ip/network/routines.c
trunk/reactos/lib/drivers/ip/network/transmit.c
trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c
trunk/reactos/lib/drivers/ip/transport/tcp/accept.c
trunk/reactos/lib/drivers/ip/transport/tcp/event.c
trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c
Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/data…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -108,7 +108,7 @@
* Adapter = Pointer to LAN_ADAPTER structure to free
*/
{
- exFreePool(Adapter);
+ ExFreePoolWithTag(Adapter, LAN_ADAPTER_TAG);
}
@@ -249,7 +249,7 @@
Adapter = WorkItem->Adapter;
BytesTransferred = WorkItem->BytesTransferred;
- exFreePool(WorkItem);
+ ExFreePoolWithTag(WorkItem, WQ_CONTEXT_TAG);
IPInitializePacket(&IPPacket, 0);
@@ -300,7 +300,8 @@
PNDIS_PACKET Packet,
NDIS_STATUS Status,
UINT BytesTransferred) {
- PLAN_WQ_ITEM WQItem = exAllocatePool(NonPagedPool, sizeof(LAN_WQ_ITEM));
+ PLAN_WQ_ITEM WQItem = ExAllocatePoolWithTag(NonPagedPool, sizeof(LAN_WQ_ITEM),
+ WQ_CONTEXT_TAG);
PLAN_ADAPTER Adapter = (PLAN_ADAPTER)BindingContext;
TI_DbgPrint(DEBUG_DATALINK,("called\n"));
@@ -312,7 +313,7 @@
WQItem->BytesTransferred = BytesTransferred;
if (!ChewCreate( LanReceiveWorker, WQItem ))
- exFreePool(WQItem);
+ ExFreePoolWithTag(WQItem, WQ_CONTEXT_TAG);
}
VOID NTAPI ProtocolTransferDataComplete(
@@ -768,9 +769,9 @@
BOOLEAN Deallocate) {
NTSTATUS Status;
UNICODE_STRING Ustr = *ResultFirst;
- PWSTR new_string = ExAllocatePoolWithTag
+ PWSTR new_string = ExAllocatePool
(PagedPool,
- (ResultFirst->Length + Second->Length + sizeof(WCHAR)), TAG_STRING);
+ (ResultFirst->Length + Second->Length + sizeof(WCHAR)));
if( !new_string ) {
return STATUS_NO_MEMORY;
}
@@ -1087,7 +1088,7 @@
TI_DbgPrint(DEBUG_DATALINK, ("Called.\n"));
- IF = exAllocatePool(NonPagedPool, sizeof(LAN_ADAPTER));
+ IF = ExAllocatePoolWithTag(NonPagedPool, sizeof(LAN_ADAPTER), LAN_ADAPTER_TAG);
if (!IF) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
return NDIS_STATUS_RESOURCES;
@@ -1125,7 +1126,7 @@
KeWaitForSingleObject(&IF->Event, UserRequest, KernelMode, FALSE, NULL);
else if (NdisStatus != NDIS_STATUS_SUCCESS) {
TI_DbgPrint(DEBUG_DATALINK,("denying adapter %wZ\n", AdapterName));
- exFreePool(IF);
+ ExFreePoolWithTag(IF, LAN_ADAPTER_TAG);
return NdisStatus;
}
@@ -1150,7 +1151,7 @@
default:
/* Unsupported media */
TI_DbgPrint(MIN_TRACE, ("Unsupported media.\n"));
- exFreePool(IF);
+ ExFreePoolWithTag(IF, LAN_ADAPTER_TAG);
return NDIS_STATUS_NOT_SUPPORTED;
}
@@ -1162,7 +1163,7 @@
sizeof(UINT));
if (NdisStatus != NDIS_STATUS_SUCCESS) {
TI_DbgPrint(DEBUG_DATALINK,("denying adapter %wZ (NDISCall)\n",
AdapterName));
- exFreePool(IF);
+ ExFreePoolWithTag(IF, LAN_ADAPTER_TAG);
return NdisStatus;
}
@@ -1174,7 +1175,7 @@
sizeof(UINT));
if (NdisStatus != NDIS_STATUS_SUCCESS) {
TI_DbgPrint(MIN_TRACE, ("Query for maximum packet size failed.\n"));
- exFreePool(IF);
+ ExFreePoolWithTag(IF, LAN_ADAPTER_TAG);
return NdisStatus;
}
@@ -1197,7 +1198,7 @@
IF->HWAddressLength);
if (NdisStatus != NDIS_STATUS_SUCCESS) {
TI_DbgPrint(MIN_TRACE, ("Query for current hardware address
failed.\n"));
- exFreePool(IF);
+ ExFreePoolWithTag(IF, LAN_ADAPTER_TAG);
return NdisStatus;
}
@@ -1209,7 +1210,7 @@
sizeof(UINT));
if (NdisStatus != NDIS_STATUS_SUCCESS) {
TI_DbgPrint(MIN_TRACE, ("Query for maximum link speed failed.\n"));
- exFreePool(IF);
+ ExFreePoolWithTag(IF, LAN_ADAPTER_TAG);
return NdisStatus;
}
@@ -1219,7 +1220,7 @@
/* Bind adapter to IP layer */
if( !BindAdapter(IF, RegistryPath) ) {
TI_DbgPrint(DEBUG_DATALINK,("denying adapter %wZ (BindAdapter)\n",
AdapterName));
- exFreePool(IF);
+ ExFreePoolWithTag(IF, LAN_ADAPTER_TAG);
return NDIS_STATUS_NOT_ACCEPTED;
}
Modified: trunk/reactos/drivers/network/tcpip/include/address.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/address.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/address.h [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -15,7 +15,6 @@
*/
#define AddrInitIPv4(IPAddress, RawAddress) \
{ \
- INIT_TAG((IPAddress), '4VPI'); \
(IPAddress)->Type = IP_ADDRESS_V4; \
(IPAddress)->Address.IPv4Address = (RawAddress); \
}
Modified: trunk/reactos/drivers/network/tcpip/include/debug.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/debug.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/debug.h [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -71,8 +71,6 @@
#define CP CHECKPOINT
-#include <memtrack.h>
-
#define ASSERT_KM_POINTER(_x) \
ASSERT(((PVOID)_x) != (PVOID)0xcccccccc); \
ASSERT(((PVOID)_x) >= (PVOID)0x80000000);
Modified: trunk/reactos/drivers/network/tcpip/include/dispatch.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/dispatch.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/dispatch.h [iso-8859-1] Sun Nov 22
00:53:43 2009
@@ -72,6 +72,8 @@
VOID DispDoDisconnect(
PVOID Data);
+NTSTATUS IRPFinish( PIRP Irp, NTSTATUS Status );
+
#endif /* __DISPATCH_H */
/* EOF */
Modified: trunk/reactos/drivers/network/tcpip/include/ip.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/ip.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/ip.h [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -21,7 +21,6 @@
/* IP style address */
typedef struct IP_ADDRESS {
- DEFINE_TAG
UCHAR Type; /* Type of IP address */
union {
IPv4_RAW_ADDRESS IPv4Address;/* IPv4 address (in network byte order) */
@@ -76,7 +75,6 @@
/* Structure for an IP packet */
typedef struct _IP_PACKET {
- DEFINE_TAG
OBJECT_FREE_ROUTINE Free; /* Routine used to free resources for the object
*/
UCHAR Type; /* Type of IP packet (see IP_ADDRESS_xx above)
*/
UCHAR Flags; /* Flags for packet (see IP_PACKET_FLAG_xx
below)*/
@@ -150,7 +148,6 @@
/* Information about an IP interface */
typedef struct _IP_INTERFACE {
- DEFINE_TAG
LIST_ENTRY ListEntry; /* Entry on list */
OBJECT_FREE_ROUTINE Free; /* Routine used to free resources used by the object
*/
KSPIN_LOCK Lock; /* Spin lock for this object */
Removed: trunk/reactos/drivers/network/tcpip/include/irp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/irp.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/irp.h (removed)
@@ -1,13 +1,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS TCP/IP protocol driver
- * FILE: include/irp.h
- * PURPOSE: IRP routines
- */
-#ifndef __IRP_H
-#define __IRP_H
-
-VOID IRPRemember( PIRP Irp, PCHAR File, UINT Line );
-NTSTATUS IRPFinish( PIRP Irp, NTSTATUS Status );
-
-#endif/*__IRP_H*/
Removed: trunk/reactos/drivers/network/tcpip/include/memtrack.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/memtrack.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/memtrack.h (removed)
@@ -1,79 +1,0 @@
-#ifndef MEMTRACK_H
-#define MEMTRACK_H
-
-#include <pool.h>
-
-#ifndef FOURCC
-#define FOURCC(a,b,c,d) (((a)<<24)|((b)<<16)|((c)<<8)|(d))
-#endif
-
-#define FBSD_MALLOC FOURCC('d','s','b','f')
-#define EXALLOC_TAG FOURCC('E','x','A','l')
-#define IRP_TAG FOURCC('P','I','R','P')
-#define NPLOOK_TAG FOURCC('N','P','L','A')
-
-#define AllocatePacketWithBuffer(x,y,z)
AllocatePacketWithBufferX(x,y,z,__FILE__,__LINE__)
-#define FreeNdisPacket(x) FreeNdisPacketX(x,__FILE__,__LINE__)
-
-#if DBG
-#define MTMARK() TrackDumpFL(__FILE__, __LINE__)
-#define exAllocatePool(x,y) ExAllocatePoolX(x,y,__FILE__,__LINE__)
-#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolX(x,y,__FILE__,__LINE__)
-#define exFreePool(x) ExFreePoolX(x,__FILE__,__LINE__)
-#define exAllocateFromNPagedLookasideList(x)
ExAllocateFromNPagedLookasideListX(x,__FILE__,__LINE__)
-#define exFreeToNPagedLookasideList(x,y)
ExFreeToNPagedLookasideListX(x,y,__FILE__,__LINE__)
-
-typedef struct _ALLOCATION_TRACKER {
- LIST_ENTRY Entry;
- ULONG Tag;
- PVOID Thing;
- PCHAR FileName;
- ULONG LineNo;
-} ALLOCATION_TRACKER, *PALLOCATION_TRACKER;
-
-VOID TrackingInit();
-VOID TrackWithTag( ULONG Tag, PVOID Thing, PCHAR File, ULONG Line );
-#define Track(Tag,Thing) TrackWithTag(Tag,Thing,__FILE__,__LINE__)
-VOID UntrackFL( PCHAR File, ULONG Line, PVOID Thing, ULONG Tag );
-#define Untrack(Thing) UntrackFL(__FILE__,__LINE__,Thing)
-VOID TrackDumpFL( PCHAR File, ULONG Line );
-#define TrackDump() TrackDumpFL(__FILE__,__LINE__)
-
-static __inline PVOID ExAllocateFromNPagedLookasideListX( PNPAGED_LOOKASIDE_LIST List,
PCHAR File, ULONG Line ) {
- PVOID Out = ExAllocateFromNPagedLookasideList( List );
- if( Out ) TrackWithTag( NPLOOK_TAG, Out, File, Line );
- return Out;
-}
-
-static __inline VOID ExFreeToNPagedLookasideListX( PNPAGED_LOOKASIDE_LIST List, PVOID
Thing, PCHAR File, ULONG Line ) {
- UntrackFL(File, Line, Thing, NPLOOK_TAG);
- ExFreeToNPagedLookasideList( List, Thing );
-}
-
-static __inline PVOID ExAllocatePoolX( POOL_TYPE type, SIZE_T size, PCHAR File, ULONG
Line ) {
- PVOID Out = ExAllocatePool( type, size );
- if( Out ) TrackWithTag( EXALLOC_TAG, Out, File, Line );
- return Out;
-}
-
-static __inline VOID ExFreePoolX( PVOID Data, PCHAR File, ULONG Line ) {
- UntrackFL(File, Line, Data, EXALLOC_TAG);
- ExFreePool( Data );
-}
-
-#else
-#define MTMARK()
-#define Track(x,y)
-#define TrackingInit()
-#define TrackDump()
-#define Untrack(x)
-#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolWithTag(x,y,z)
-#define exAllocatePool(x,y) ExAllocatePool(x,y)
-#define exFreePool(x) ExFreePool(x)
-#define exAllocateFromNPagedLookasideList(x) ExAllocateFromNPagedLookasideList(x)
-#define exFreeToNPagedLookasideList(x,y) ExFreeToNPagedLookasideList(x,y)
-#define TrackWithTag(w,x,y,z)
-#define UntrackFL(w,x,y,z)
-#endif
-
-#endif/*MEMMTRAC_H*/
Modified: trunk/reactos/drivers/network/tcpip/include/neighbor.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/neighbor.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/neighbor.h [iso-8859-1] Sun Nov 22
00:53:43 2009
@@ -27,7 +27,6 @@
/* Information about a neighbor */
typedef struct NEIGHBOR_CACHE_ENTRY {
- DEFINE_TAG
struct NEIGHBOR_CACHE_ENTRY *Next; /* Pointer to next entry */
UCHAR State; /* State of NCE */
UINT EventTimer; /* Ticks since last event */
Modified: trunk/reactos/drivers/network/tcpip/include/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/precomp.h [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -1,6 +1,7 @@
#include <limits.h>
#include <ntddk.h>
#include <ntifs.h>
+#include <tags.h>
#include <tdi.h>
#include <tdistat.h>
#include <tcpip.h>
@@ -23,13 +24,11 @@
#include <udp.h>
#include <tcp.h>
#include <arp.h>
-#include <irp.h>
#include <tilists.h>
#include <dispatch.h>
#include <fileobjs.h>
#include <lock.h>
#include <wait.h>
-#include <memtrack.h>
#include <oskittcp.h>
#include <interface.h>
#include <ports.h>
Modified: trunk/reactos/drivers/network/tcpip/include/routines.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/routines.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/routines.h [iso-8859-1] Sun Nov 22
00:53:43 2009
@@ -49,9 +49,10 @@
PNDIS_PACKET Packet,
UINT Size);
-NDIS_STATUS AllocatePacketWithBufferX( PNDIS_PACKET *NdisPacket,
- PCHAR Data, UINT Len,
- PCHAR File, UINT Line );
+NDIS_STATUS AllocatePacketWithBuffer( PNDIS_PACKET *NdisPacket,
+ PCHAR Data, UINT Len );
+
+VOID FreeNdisPacket( PNDIS_PACKET Packet );
void GetDataPtr( PNDIS_PACKET Packet,
UINT Offset,
Added: trunk/reactos/drivers/network/tcpip/include/tags.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/tags.h (added)
+++ trunk/reactos/drivers/network/tcpip/include/tags.h [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -1,0 +1,39 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS TCP/IP protocol driver
+ * FILE: include/tags.h
+ * PURPOSE: Memory tags
+ */
+#ifndef __TAGS_H
+#define __TAGS_H
+
+#define CONN_ENDPT_TAG 'pEnC'
+#define ADDR_FILE_TAG 'FrdA'
+#define CONTROL_CHANNEL_TAG 'CnoC'
+#define TRANS_CONTEXT_TAG 'noCT'
+#define TDI_ENTITY_TAG 'EidT'
+#define DATAGRAM_SEND_TAG 'StaD'
+#define DATAGRAM_RECV_TAG 'RtaD'
+#define QUERY_CONTEXT_TAG 'noCQ'
+#define IP_ADDRESS_TAG 'dAPI'
+#define IP_INTERFACE_TAG 'FIPI'
+#define DATAGRAM_REASSEMBLY_TAG 'RDPI'
+#define DATAGRAM_FRAGMENT_TAG 'GFPI'
+#define DATAGRAM_HOLE_TAG 'LHPI'
+#define OSKITTCP_CONTEXT_TAG 'TKSO'
+#define NEIGHBOR_PACKET_TAG 'kPbN'
+#define NCE_TAG ' ECN'
+#define PORT_SET_TAG 'teSP'
+#define PACKET_BUFFER_TAG 'fuBP'
+#define FRAGMENT_DATA_TAG 'taDF'
+#define FIB_TAG ' BIF'
+#define IFC_TAG ' CFI'
+#define TDI_BUCKET_TAG 'BidT'
+#define FBSD_TAG 'DSBF'
+#define OSK_OTHER_TAG 'OKSO'
+#define OSK_LARGE_TAG 'LKSO'
+#define OSK_SMALL_TAG 'SKSO'
+#define LAN_ADAPTER_TAG ' NAL'
+#define WQ_CONTEXT_TAG 'noCW'
+
+#endif
Propchange: trunk/reactos/drivers/network/tcpip/include/tags.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/drivers/network/tcpip/include/titypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/titypes.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/titypes.h [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -9,10 +9,6 @@
#if DBG
-
-#define DEFINE_TAG ULONG Tag;
-#define INIT_TAG(_Object, _Tag) \
- ((_Object)->Tag = (_Tag))
#define DEBUG_REFCHECK(Object) { \
if ((Object)->RefCount <= 0) { \
@@ -64,9 +60,6 @@
#else /* DBG */
-#define DEFINE_TAG
-#define INIT_TAG(Object, Tag)
-
/*
* VOID ReferenceObject(
* PVOID Object)
@@ -149,7 +142,6 @@
/* Transport address file context structure. The FileObject->FsContext2
field holds a pointer to this structure */
typedef struct _ADDRESS_FILE {
- DEFINE_TAG
LIST_ENTRY ListEntry; /* Entry on list */
KSPIN_LOCK Lock; /* Spin lock to manipulate this structure */
OBJECT_FREE_ROUTINE Free; /* Routine to use to free resources for the
object */
Modified: trunk/reactos/drivers/network/tcpip/tcpip.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip.rbuild [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip.rbuild [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -28,7 +28,6 @@
<file>fileobjs.c</file>
<file>iinfo.c</file>
<file>info.c</file>
- <file>irp.c</file>
<file>lock.c</file>
<file>main.c</file>
<file>ninfo.c</file>
Modified: trunk/reactos/drivers/network/tcpip/tcpip/buffer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/buffer.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/buffer.c [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -318,13 +318,16 @@
PCHAR NewBuf;
if( Copy ) {
- NewBuf = exAllocatePool( NonPagedPool, Length );
+ NewBuf = ExAllocatePoolWithTag( NonPagedPool, Length, PACKET_BUFFER_TAG );
if( !NewBuf ) return NDIS_STATUS_RESOURCES;
RtlCopyMemory( NewBuf, Data, Length );
} else NewBuf = Data;
NdisAllocateBuffer( &Status, &Buffer, GlobalBufferPool, NewBuf, Length );
- if( Status != NDIS_STATUS_SUCCESS ) return Status;
+ if( Status != NDIS_STATUS_SUCCESS ) {
+ if (Copy) ExFreePoolWithTag(NewBuf, PACKET_BUFFER_TAG);
+ return Status;
+ }
NdisChainBufferAtFront( Packet, Buffer );
@@ -342,33 +345,30 @@
SkipToOffset( Buffer, Offset, DataOut, Size );
}
-NDIS_STATUS AllocatePacketWithBufferX( PNDIS_PACKET *NdisPacket,
- PCHAR Data, UINT Len,
- PCHAR File, UINT Line ) {
+NDIS_STATUS AllocatePacketWithBuffer( PNDIS_PACKET *NdisPacket,
+ PCHAR Data, UINT Len ) {
PNDIS_PACKET Packet;
PNDIS_BUFFER Buffer;
NDIS_STATUS Status;
PCHAR NewData;
- NewData = exAllocatePool( NonPagedPool, Len );
+ NewData = ExAllocatePoolWithTag( NonPagedPool, Len, PACKET_BUFFER_TAG );
if( !NewData ) return NDIS_STATUS_RESOURCES;
if( Data ) RtlCopyMemory(NewData, Data, Len);
NdisAllocatePacket( &Status, &Packet, GlobalPacketPool );
if( Status != NDIS_STATUS_SUCCESS ) {
- exFreePool( NewData );
+ ExFreePoolWithTag( NewData, PACKET_BUFFER_TAG );
return Status;
}
- TrackWithTag(NDIS_PACKET_TAG, Packet, File, Line);
NdisAllocateBuffer( &Status, &Buffer, GlobalBufferPool, NewData, Len );
if( Status != NDIS_STATUS_SUCCESS ) {
- exFreePool( NewData );
+ ExFreePoolWithTag( NewData, PACKET_BUFFER_TAG );
FreeNdisPacket( Packet );
return Status;
}
- TrackWithTag(NDIS_BUFFER_TAG, Buffer, File, Line);
NdisChainBufferAtFront( Packet, Buffer );
*NdisPacket = Packet;
@@ -377,10 +377,8 @@
}
-VOID FreeNdisPacketX
-( PNDIS_PACKET Packet,
- PCHAR File,
- UINT Line )
+VOID FreeNdisPacket
+( PNDIS_PACKET Packet )
/*
* FUNCTION: Frees an NDIS packet
* ARGUMENTS:
@@ -400,13 +398,11 @@
NdisGetNextBuffer(Buffer, &NextBuffer);
NdisQueryBuffer(Buffer, &Data, &Length);
TI_DbgPrint(DEBUG_PBUFFER, ("Freeing ndis buffer (0x%X)\n", Buffer));
- UntrackFL(File,Line,Buffer,NDIS_BUFFER_TAG);
NdisFreeBuffer(Buffer);
TI_DbgPrint(DEBUG_PBUFFER, ("Freeing exal buffer (0x%X)\n", Data));
- exFreePool(Data);
+ ExFreePoolWithTag(Data, PACKET_BUFFER_TAG);
}
/* Finally free the NDIS packet discriptor */
- UntrackFL(File,Line,Packet,NDIS_PACKET_TAG);
NdisFreePacket(Packet);
}
Modified: trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -11,6 +11,25 @@
#include "precomp.h"
#include <pseh/pseh2.h>
+
+
+NTSTATUS IRPFinish( PIRP Irp, NTSTATUS Status ) {
+ KIRQL OldIrql;
+
+ Irp->IoStatus.Status = Status;
+
+ if( Status == STATUS_PENDING )
+ IoMarkIrpPending( Irp );
+ else {
+ IoAcquireCancelSpinLock(&OldIrql);
+ (void)IoSetCancelRoutine( Irp, NULL );
+ IoReleaseCancelSpinLock(OldIrql);
+
+ IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
+ }
+
+ return Status;
+}
NTSTATUS DispPrepareIrpForCancel(
PTRANSPORT_CONTEXT Context,
@@ -1253,7 +1272,7 @@
QueryContext->Irp->IoStatus.Information = ByteCount;
QueryContext->Irp->IoStatus.Status = Status;
- exFreePool(QueryContext);
+ ExFreePoolWithTag(QueryContext, QUERY_CONTEXT_TAG);
}
@@ -1316,7 +1335,7 @@
IrpSp->Parameters.DeviceIoControl.Type3InputBuffer;
OutputBuffer = Irp->UserBuffer;
- QueryContext = exAllocatePool(NonPagedPool, sizeof(TI_QUERY_CONTEXT));
+ QueryContext = ExAllocatePoolWithTag(NonPagedPool, sizeof(TI_QUERY_CONTEXT),
QUERY_CONTEXT_TAG);
if (QueryContext) {
_SEH2_TRY {
InputMdl = IoAllocateMdl(InputBuffer,
@@ -1379,7 +1398,7 @@
IoFreeMdl(OutputMdl);
}
- exFreePool(QueryContext);
+ ExFreePoolWithTag(QueryContext, QUERY_CONTEXT_TAG);
} else
Status = STATUS_INSUFFICIENT_RESOURCES;
} else if( InputBufferLength ==
@@ -1392,7 +1411,7 @@
Size = 0;
- QueryContext = exAllocatePool(NonPagedPool, sizeof(TI_QUERY_CONTEXT));
+ QueryContext = ExAllocatePoolWithTag(NonPagedPool, sizeof(TI_QUERY_CONTEXT),
QUERY_CONTEXT_TAG);
if (!QueryContext) return STATUS_INSUFFICIENT_RESOURCES;
_SEH2_TRY {
@@ -1412,7 +1431,7 @@
if( !NT_SUCCESS(Status) || !InputMdl ) {
if( InputMdl ) IoFreeMdl( InputMdl );
- exFreePool(QueryContext);
+ ExFreePoolWithTag(QueryContext, QUERY_CONTEXT_TAG);
return Status;
}
Modified: trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -153,7 +153,7 @@
* Object = Pointer to address file object to free
*/
{
- exFreePool(Object);
+ ExFreePoolWithTag(Object, ADDR_FILE_TAG);
}
@@ -165,7 +165,7 @@
* Object = Pointer to address file object to free
*/
{
- exFreePool(Object);
+ ExFreePoolWithTag(Object, CONTROL_CHANNEL_TAG);
}
@@ -189,7 +189,8 @@
TI_DbgPrint(MID_TRACE, ("Called (Proto %d).\n", Protocol));
- AddrFile = exAllocatePool(NonPagedPool, sizeof(ADDRESS_FILE));
+ AddrFile = ExAllocatePoolWithTag(NonPagedPool, sizeof(ADDRESS_FILE),
+ ADDR_FILE_TAG);
if (!AddrFile) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
return STATUS_INSUFFICIENT_RESOURCES;
@@ -212,7 +213,7 @@
if (!AddrIsUnspecified(&AddrFile->Address) &&
!AddrLocateInterface(&AddrFile->Address)) {
- exFreePool(AddrFile);
+ ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG);
TI_DbgPrint(MIN_TRACE, ("Non-local address given (0x%X).\n",
A2S(&AddrFile->Address)));
return STATUS_INVALID_PARAMETER;
}
@@ -230,7 +231,7 @@
AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
AddrFile->Port == 0xffff)
{
- exFreePool(AddrFile);
+ ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG);
return STATUS_INVALID_PARAMETER;
}
@@ -248,7 +249,7 @@
AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
AddrFile->Port == 0xffff)
{
- exFreePool(AddrFile);
+ ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG);
return STATUS_INVALID_PARAMETER;
}
@@ -346,7 +347,7 @@
while ((CurrentEntry = ExInterlockedRemoveHeadList(&AddrFile->ReceiveQueue,
&AddrFile->Lock))) {
ReceiveRequest = CONTAINING_RECORD(CurrentEntry, DATAGRAM_RECEIVE_REQUEST,
ListEntry);
(*ReceiveRequest->Complete)(ReceiveRequest->Context, STATUS_CANCELLED, 0);
- /* exFreePool(ReceiveRequest); FIXME: WTF? */
+ /* ExFreePoolWithTag(ReceiveRequest, DATAGRAM_RECV_TAG); FIXME: WTF? */
}
TI_DbgPrint(DEBUG_ADDRFILE, ("Aborting send requests on address file at
(0x%X).\n", AddrFile));
@@ -355,7 +356,7 @@
while ((CurrentEntry = ExInterlockedRemoveHeadList(&AddrFile->ReceiveQueue,
&AddrFile->Lock))) {
SendRequest = CONTAINING_RECORD(CurrentEntry, DATAGRAM_SEND_REQUEST, ListEntry);
(*SendRequest->Complete)(SendRequest->Context, STATUS_CANCELLED, 0);
- exFreePool(SendRequest);
+ ExFreePoolWithTag(SendRequest, DATAGRAM_SEND_TAG);
}
/* Protocol specific handling */
@@ -454,7 +455,8 @@
PCONTROL_CHANNEL ControlChannel;
TI_DbgPrint(MID_TRACE, ("Called.\n"));
- ControlChannel = exAllocatePool(NonPagedPool, sizeof(*ControlChannel));
+ ControlChannel = ExAllocatePoolWithTag(NonPagedPool, sizeof(*ControlChannel),
+ CONTROL_CHANNEL_TAG);
if (!ControlChannel) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
@@ -494,7 +496,7 @@
PCONTROL_CHANNEL ControlChannel = Request->Handle.ControlChannel;
NTSTATUS Status = STATUS_SUCCESS;
- exFreePool(ControlChannel);
+ ExFreePoolWithTag(ControlChannel, CONTROL_CHANNEL_TAG);
Request->Handle.ControlChannel = NULL;
return Status;
Modified: trunk/reactos/drivers/network/tcpip/tcpip/iinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/iinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/iinfo.c [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -32,7 +32,7 @@
Interface, IF, ID.tei_entity, ID.tei_instance));
OutData =
- (PIFENTRY)exAllocatePool( NonPagedPool,
+ (PIFENTRY)ExAllocatePool( NonPagedPool,
sizeof(IFENTRY) + MAX_IFDESCR_LEN );
if( !OutData ) return TDI_NO_RESOURCES; /* Out of memory */
@@ -99,7 +99,7 @@
ID.tei_entity, ID.tei_instance, Size));
Status = InfoCopyOut( (PCHAR)OutData, Size, Buffer, BufferSize );
- exFreePool( OutData );
+ ExFreePool( OutData );
TI_DbgPrint(DEBUG_INFO,("Returning %x\n", Status));
@@ -117,14 +117,14 @@
if (MemSize != 0)
{
- ArpEntries = exAllocatePoolWithTag( NonPagedPool, MemSize,
FOURCC('A','R','P','t') );
+ ArpEntries = ExAllocatePool( NonPagedPool, MemSize );
if( !ArpEntries ) return STATUS_NO_MEMORY;
NBCopyNeighbors( Interface, ArpEntries );
Status = InfoCopyOut( (PVOID)ArpEntries, MemSize, Buffer, BufferSize );
- exFreePool( ArpEntries );
+ ExFreePool( ArpEntries );
}
else
{
Removed: trunk/reactos/drivers/network/tcpip/tcpip/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/irp.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/irp.c (removed)
@@ -1,37 +1,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS TCP/IP protocol driver
- * FILE: tcpip/dispatch.h
- * PURPOSE: TDI dispatch routines
- * PROGRAMMERS: arty
- * REVISIONS:
- * CSH 01/08-2000 Created
- * TODO: Validate device object in all dispatch routines
- */
-
-#include "precomp.h"
-
-VOID IRPRemember( PIRP Irp, PCHAR File, UINT Line ) {
- TrackWithTag( IRP_TAG, Irp, File, Line );
-}
-
-NTSTATUS IRPFinish( PIRP Irp, NTSTATUS Status ) {
- KIRQL OldIrql;
-
- UntrackFL( __FILE__, __LINE__, Irp, IRP_TAG );
-
- Irp->IoStatus.Status = Status;
-
- if( Status == STATUS_PENDING )
- IoMarkIrpPending( Irp );
- else {
- IoAcquireCancelSpinLock(&OldIrql);
- (void)IoSetCancelRoutine( Irp, NULL );
- IoReleaseCancelSpinLock(OldIrql);
-
- IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
- }
-
- return Status;
-}
-
Modified: trunk/reactos/drivers/network/tcpip/tcpip/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/main.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/main.c [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -119,30 +119,25 @@
TI_DbgPrint(DEBUG_IRP, ("Called. DeviceObject is at (0x%X), IRP is at
(0x%X).\n", DeviceObject, Irp));
EaInfo = Irp->AssociatedIrp.SystemBuffer;
-CP
+
/* Parameter check */
/* No EA information means that we're opening for SET/QUERY_INFORMATION
* style calls. */
-#if 0
- if (!EaInfo) {
- TI_DbgPrint(MIN_TRACE, ("No EA information in IRP.\n"));
- return STATUS_INVALID_PARAMETER;
- }
-#endif
-CP
+
/* Allocate resources here. We release them again if something failed */
- Context = exAllocatePool(NonPagedPool, sizeof(TRANSPORT_CONTEXT));
+ Context = ExAllocatePoolWithTag(NonPagedPool, sizeof(TRANSPORT_CONTEXT),
+ TRANS_CONTEXT_TAG);
if (!Context) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
return STATUS_INSUFFICIENT_RESOURCES;
}
-CP
+
Context->CancelIrps = FALSE;
-CP
+
IrpSp = IoGetCurrentIrpStackLocation(Irp);
IrpSp->FileObject->FsContext = Context;
Request.RequestContext = Irp;
-CP
+
/* Branch to the right handler */
if (EaInfo &&
(EaInfo->EaNameLength == TDI_TRANSPORT_ADDRESS_LENGTH) &&
@@ -150,7 +145,7 @@
(&EaInfo->EaName, TdiTransportAddress,
TDI_TRANSPORT_ADDRESS_LENGTH) == TDI_TRANSPORT_ADDRESS_LENGTH)) {
/* This is a request to open an address */
-CP
+
/* XXX This should probably be done in IoCreateFile() */
/* Parameter checks */
@@ -169,10 +164,10 @@
TI_DbgPrint(MIN_TRACE, ("AddressType: %\n",
Address->Address[0].AddressType));
}
- exFreePool(Context);
+ ExFreePoolWithTag(Context, TRANS_CONTEXT_TAG);
return STATUS_INVALID_PARAMETER;
}
-CP
+
/* Open address file object */
/* Protocol depends on device object so find the protocol */
@@ -186,21 +181,21 @@
Status = TiGetProtocolNumber(&IrpSp->FileObject->FileName,
&Protocol);
if (!NT_SUCCESS(Status)) {
TI_DbgPrint(MIN_TRACE, ("Raw IP protocol number is invalid.\n"));
- exFreePool(Context);
+ ExFreePoolWithTag(Context, TRANS_CONTEXT_TAG);
return STATUS_INVALID_PARAMETER;
}
} else {
TI_DbgPrint(MIN_TRACE, ("Invalid device object at (0x%X).\n",
DeviceObject));
- exFreePool(Context);
+ ExFreePoolWithTag(Context, TRANS_CONTEXT_TAG);
return STATUS_INVALID_PARAMETER;
}
-CP
+
Status = FileOpenAddress(&Request, Address, Protocol, NULL);
if (NT_SUCCESS(Status)) {
IrpSp->FileObject->FsContext2 = (PVOID)TDI_TRANSPORT_ADDRESS_FILE;
Context->Handle.AddressHandle = Request.Handle.AddressHandle;
}
-CP
+
} else if (EaInfo &&
(EaInfo->EaNameLength == TDI_CONNECTION_CONTEXT_LENGTH) &&
(RtlCompareMemory
@@ -208,12 +203,12 @@
TDI_CONNECTION_CONTEXT_LENGTH) ==
TDI_CONNECTION_CONTEXT_LENGTH)) {
/* This is a request to open a connection endpoint */
-CP
+
/* Parameter checks */
if (EaInfo->EaValueLength < sizeof(PVOID)) {
TI_DbgPrint(MIN_TRACE, ("Parameters are invalid.\n"));
- exFreePool(Context);
+ ExFreePoolWithTag(Context, TRANS_CONTEXT_TAG);
return STATUS_INVALID_PARAMETER;
}
@@ -221,7 +216,7 @@
if (DeviceObject != TCPDeviceObject) {
TI_DbgPrint(MIN_TRACE, ("Bad device object.\n"));
- exFreePool(Context);
+ ExFreePoolWithTag(Context, TRANS_CONTEXT_TAG);
return STATUS_INVALID_PARAMETER;
}
@@ -244,7 +239,7 @@
}
if (!NT_SUCCESS(Status))
- exFreePool(Context);
+ ExFreePoolWithTag(Context, TRANS_CONTEXT_TAG);
TI_DbgPrint(DEBUG_IRP, ("Leaving. Status = (0x%X).\n", Status));
@@ -323,8 +318,6 @@
PIO_STACK_LOCATION IrpSp;
NTSTATUS Status;
- IRPRemember(Irp, __FILE__, __LINE__);
-
// DbgPrint("Called. DeviceObject is at (0x%X), IRP is at (0x%X).\n",
DeviceObject, Irp);
IrpSp = IoGetCurrentIrpStackLocation(Irp);
@@ -367,8 +360,6 @@
BOOLEAN Complete = TRUE;
PIO_STACK_LOCATION IrpSp;
- IRPRemember(Irp, __FILE__, __LINE__);
-
IrpSp = IoGetCurrentIrpStackLocation(Irp);
TI_DbgPrint(DEBUG_IRP, ("Called. DeviceObject is at (0x%X), IRP is at (0x%X) MN
(%d).\n",
@@ -470,8 +461,6 @@
{
NTSTATUS Status;
PIO_STACK_LOCATION IrpSp;
-
- IRPRemember(Irp, __FILE__, __LINE__);
IrpSp = IoGetCurrentIrpStackLocation(Irp);
@@ -541,8 +530,6 @@
}
TcpipReleaseSpinLock(&AddressFileListLock, OldIrql);
#endif
- ChewShutdown();
-
/* Cancel timer */
KeCancelTimer(&IPTimer);
@@ -580,11 +567,13 @@
if (RawIPDeviceObject)
IoDeleteDevice(RawIPDeviceObject);
- if (IPDeviceObject)
- IoDeleteDevice(IPDeviceObject);
+ if (IPDeviceObject) {
+ ChewShutdown();
+ IoDeleteDevice(IPDeviceObject);
+ }
if (EntityList)
- exFreePool(EntityList);
+ ExFreePoolWithTag(EntityList, TDI_ENTITY_TAG);
TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
}
@@ -635,17 +624,22 @@
TI_DbgPrint(MAX_TRACE, ("Called.\n"));
- TrackingInit();
-
/* TdiInitialize() ? */
/* FIXME: Create symbolic links in Win32 namespace */
+
+ /* Initialize our periodic timer and its associated DPC object. When the
+ timer expires, the IPTimeout deferred procedure call (DPC) is queued */
+ ExInitializeWorkItem( &IpWorkItem, IPTimeout, NULL );
+ KeInitializeDpc(&IPTimeoutDpc, IPTimeoutDpcFn, NULL);
+ KeInitializeTimer(&IPTimer);
/* Create IP device object */
Status = IoCreateDevice(DriverObject, 0, &strIpDeviceName,
FILE_DEVICE_NETWORK, 0, FALSE, &IPDeviceObject);
if (!NT_SUCCESS(Status)) {
TI_DbgPrint(MIN_TRACE, ("Failed to create IP device object. Status
(0x%X).\n", Status));
+ TiUnload(DriverObject);
return Status;
}
@@ -656,8 +650,7 @@
FILE_DEVICE_NETWORK, 0, FALSE, &RawIPDeviceObject);
if (!NT_SUCCESS(Status)) {
TI_DbgPrint(MIN_TRACE, ("Failed to create RawIP device object. Status
(0x%X).\n", Status));
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
+ TiUnload(DriverObject);
return Status;
}
@@ -666,9 +659,7 @@
FILE_DEVICE_NETWORK, 0, FALSE, &UDPDeviceObject);
if (!NT_SUCCESS(Status)) {
TI_DbgPrint(MIN_TRACE, ("Failed to create UDP device object. Status
(0x%X).\n", Status));
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
+ TiUnload(DriverObject);
return Status;
}
@@ -677,23 +668,18 @@
FILE_DEVICE_NETWORK, 0, FALSE, &TCPDeviceObject);
if (!NT_SUCCESS(Status)) {
TI_DbgPrint(MIN_TRACE, ("Failed to create TCP device object. Status
(0x%X).\n", Status));
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
- IoDeleteDevice(UDPDeviceObject);
+ TiUnload(DriverObject);
return Status;
}
/* Setup network layer and transport layer entities */
KeInitializeSpinLock(&EntityListLock);
- EntityList = exAllocatePool(NonPagedPool, sizeof(TDIEntityID) * MAX_TDI_ENTITIES );
+ EntityList = ExAllocatePoolWithTag(NonPagedPool,
+ sizeof(TDIEntityID) * MAX_TDI_ENTITIES,
+ TDI_ENTITY_TAG );
if (!EntityList) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
- IoDeleteDevice(UDPDeviceObject);
- IoDeleteDevice(TCPDeviceObject);
+ TiUnload(DriverObject);
return STATUS_INSUFFICIENT_RESOURCES;
}
@@ -703,25 +689,14 @@
/* Allocate NDIS packet descriptors */
NdisAllocatePacketPool(&NdisStatus, &GlobalPacketPool, 100,
sizeof(PACKET_CONTEXT));
if (NdisStatus != NDIS_STATUS_SUCCESS) {
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
- IoDeleteDevice(UDPDeviceObject);
- IoDeleteDevice(TCPDeviceObject);
- exFreePool(EntityList);
+ TiUnload(DriverObject);
return STATUS_INSUFFICIENT_RESOURCES;
}
/* Allocate NDIS buffer descriptors */
NdisAllocateBufferPool(&NdisStatus, &GlobalBufferPool, 100);
if (NdisStatus != NDIS_STATUS_SUCCESS) {
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
- IoDeleteDevice(UDPDeviceObject);
- IoDeleteDevice(TCPDeviceObject);
- exFreePool(EntityList);
- NdisFreePacketPool(GlobalPacketPool);
+ TiUnload(DriverObject);
return STATUS_INSUFFICIENT_RESOURCES;
}
@@ -743,64 +718,26 @@
/* Initialize transport level protocol subsystems */
Status = RawIPStartup();
if( !NT_SUCCESS(Status) ) {
- IPShutdown();
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
- IoDeleteDevice(UDPDeviceObject);
- IoDeleteDevice(TCPDeviceObject);
- exFreePool(EntityList);
- NdisFreePacketPool(GlobalPacketPool);
- NdisFreeBufferPool(GlobalBufferPool);
- return Status;
+ TiUnload(DriverObject);
+ return Status;
}
Status = UDPStartup();
if( !NT_SUCCESS(Status) ) {
- RawIPShutdown();
- IPShutdown();
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
- IoDeleteDevice(UDPDeviceObject);
- IoDeleteDevice(TCPDeviceObject);
- exFreePool(EntityList);
- NdisFreePacketPool(GlobalPacketPool);
- NdisFreeBufferPool(GlobalBufferPool);
- return Status;
+ TiUnload(DriverObject);
+ return Status;
}
Status = TCPStartup();
if( !NT_SUCCESS(Status) ) {
- UDPShutdown();
- RawIPShutdown();
- IPShutdown();
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
- IoDeleteDevice(UDPDeviceObject);
- IoDeleteDevice(TCPDeviceObject);
- exFreePool(EntityList);
- NdisFreePacketPool(GlobalPacketPool);
- NdisFreeBufferPool(GlobalBufferPool);
- return Status;
+ TiUnload(DriverObject);
+ return Status;
}
Status = ICMPStartup();
if( !NT_SUCCESS(Status) ) {
- TCPShutdown();
- UDPShutdown();
- RawIPShutdown();
- IPShutdown();
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
- IoDeleteDevice(UDPDeviceObject);
- IoDeleteDevice(TCPDeviceObject);
- exFreePool(EntityList);
- NdisFreePacketPool(GlobalPacketPool);
- NdisFreeBufferPool(GlobalBufferPool);
- return Status;
+ TiUnload(DriverObject);
+ return Status;
}
/* Use direct I/O */
@@ -817,33 +754,11 @@
DriverObject->DriverUnload = TiUnload;
- /* Initialize our periodic timer and its associated DPC object. When the
- timer expires, the IPTimeout deferred procedure call (DPC) is queued */
- ExInitializeWorkItem( &IpWorkItem, IPTimeout, NULL );
- KeInitializeDpc(&IPTimeoutDpc, IPTimeoutDpcFn, NULL);
- KeInitializeTimer(&IPTimer);
-
- /* Start the periodic timer with an initial and periodic
- relative expiration time of IP_TIMEOUT milliseconds */
- DueTime.QuadPart = -(LONGLONG)IP_TIMEOUT * 10000;
- KeSetTimerEx(&IPTimer, DueTime, IP_TIMEOUT, &IPTimeoutDpc);
-
/* Open loopback adapter */
Status = LoopRegisterAdapter(NULL, NULL);
if (!NT_SUCCESS(Status)) {
TI_DbgPrint(MIN_TRACE, ("Failed to create loopback adapter. Status
(0x%X).\n", Status));
- TCPShutdown();
- UDPShutdown();
- RawIPShutdown();
- IPShutdown();
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
- IoDeleteDevice(UDPDeviceObject);
- IoDeleteDevice(TCPDeviceObject);
- exFreePool(EntityList);
- NdisFreePacketPool(GlobalPacketPool);
- NdisFreeBufferPool(GlobalBufferPool);
+ TiUnload(DriverObject);
return Status;
}
@@ -860,24 +775,17 @@
NULL,
0,
NULL);
- TCPShutdown();
- UDPShutdown();
- RawIPShutdown();
- IPShutdown();
- ChewShutdown();
- IoDeleteDevice(IPDeviceObject);
- IoDeleteDevice(RawIPDeviceObject);
- IoDeleteDevice(UDPDeviceObject);
- IoDeleteDevice(TCPDeviceObject);
- exFreePool(EntityList);
- NdisFreePacketPool(GlobalPacketPool);
- NdisFreeBufferPool(GlobalBufferPool);
- return Status;
- }
+ TiUnload(DriverObject);
+ return Status;
+ }
+
+ /* Start the periodic timer with an initial and periodic
+ relative expiration time of IP_TIMEOUT milliseconds */
+ DueTime.QuadPart = -(LONGLONG)IP_TIMEOUT * 10000;
+ KeSetTimerEx(&IPTimer, DueTime, IP_TIMEOUT, &IPTimeoutDpc);
return STATUS_SUCCESS;
}
-
VOID NTAPI
IPAddInterface(
Modified: trunk/reactos/drivers/network/tcpip/tcpip/ninfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/ninfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/ninfo.c [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -22,9 +22,9 @@
UINT RtCount = CountFIBs(IF);
UINT Size = sizeof( IPROUTE_ENTRY ) * RtCount;
PFIB_ENTRY RCache =
- exAllocatePool( NonPagedPool, sizeof( FIB_ENTRY ) * RtCount ),
+ ExAllocatePool( NonPagedPool, sizeof( FIB_ENTRY ) * RtCount ),
RCacheCur = RCache;
- PIPROUTE_ENTRY RouteEntries = exAllocatePool( NonPagedPool, Size ),
+ PIPROUTE_ENTRY RouteEntries = ExAllocatePool( NonPagedPool, Size ),
RtCurrent = RouteEntries;
UINT i;
@@ -32,8 +32,8 @@
RtCount, RCache));
if( !RCache || !RouteEntries ) {
- if( RCache ) exFreePool( RCache );
- if( RouteEntries ) exFreePool( RouteEntries );
+ if( RCache ) ExFreePool( RCache );
+ if( RouteEntries ) ExFreePool( RouteEntries );
return TDI_NO_RESOURCES;
}
@@ -83,8 +83,8 @@
Status = InfoCopyOut( (PCHAR)RouteEntries, Size, Buffer, BufferSize );
- exFreePool( RouteEntries );
- exFreePool( RCache );
+ ExFreePool( RouteEntries );
+ ExFreePool( RCache );
TI_DbgPrint(DEBUG_INFO, ("Returning %08x\n", Status));
@@ -118,7 +118,7 @@
return TDI_INVALID_PARAMETER;
}
- IPEntry = exAllocatePool(NonPagedPool, sizeof(IPADDR_ENTRY));
+ IPEntry = ExAllocatePool(NonPagedPool, sizeof(IPADDR_ENTRY));
if (!IPEntry)
{
TcpipReleaseSpinLock(&EntityListLock, OldIrql);
@@ -143,7 +143,7 @@
InfoCopyOut((PCHAR)IPEntry, sizeof(IPADDR_ENTRY),
Buffer, BufferSize);
- exFreePool(IPEntry);
+ ExFreePool(IPEntry);
return TDI_SUCCESS;
}
Modified: trunk/reactos/lib/drivers/ip/ip.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/ip.rbuild?r…
==============================================================================
--- trunk/reactos/lib/drivers/ip/ip.rbuild [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/ip.rbuild [iso-8859-1] Sun Nov 22 00:53:43 2009
@@ -17,7 +17,6 @@
<file>interface.c</file>
<file>ip.c</file>
<file>loopback.c</file>
- <file>memtrack.c</file>
<file>neighbor.c</file>
<file>ports.c</file>
<file>receive.c</file>
Modified: trunk/reactos/lib/drivers/ip/network/address.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/add…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/address.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/address.c [iso-8859-1] Sun Nov 22 00:53:43 2009
@@ -106,7 +106,7 @@
* Nothing
*/
{
- exFreePool(Object);
+ ExFreePoolWithTag(Object, IP_ADDRESS_TAG);
}
Modified: trunk/reactos/lib/drivers/ip/network/ip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/ip.…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] Sun Nov 22 00:53:43 2009
@@ -39,7 +39,7 @@
* Object = Pointer to an interface structure
*/
{
- exFreePool(Object);
+ ExFreePoolWithTag(Object, IP_INTERFACE_TAG);
}
PIP_PACKET IPInitializePacket(
@@ -55,8 +55,6 @@
{
/* FIXME: Is this needed? */
RtlZeroMemory(IPPacket, sizeof(IP_PACKET));
-
- INIT_TAG(IPPacket, 'TKPI');
IPPacket->Free = DontFreePacket;
IPPacket->Type = Type;
@@ -139,13 +137,12 @@
}
#endif
- IF = exAllocatePool(NonPagedPool, sizeof(IP_INTERFACE));
+ IF = ExAllocatePoolWithTag(NonPagedPool, sizeof(IP_INTERFACE),
+ IP_INTERFACE_TAG);
if (!IF) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
return NULL;
}
-
- INIT_TAG(IF, 'ECAF');
RtlZeroMemory(IF, sizeof(IP_INTERFACE));
@@ -165,10 +162,11 @@
TcpipInitializeSpinLock(&IF->Lock);
- IF->TCPContext = exAllocatePool
- ( NonPagedPool, sizeof(OSK_IFADDR) + 2 * sizeof( struct sockaddr_in ) );
+ IF->TCPContext = ExAllocatePoolWithTag
+ ( NonPagedPool, sizeof(OSK_IFADDR) + 2 * sizeof( struct sockaddr_in ),
+ OSKITTCP_CONTEXT_TAG );
if (!IF->TCPContext) {
- exFreePool(IF);
+ ExFreePoolWithTag(IF, IP_INTERFACE_TAG);
return NULL;
}
@@ -194,8 +192,8 @@
RemoveTDIInterfaceEntity( IF );
#endif
- exFreePool(IF->TCPContext);
- exFreePool(IF);
+ ExFreePoolWithTag(IF->TCPContext, OSKITTCP_CONTEXT_TAG);
+ ExFreePoolWithTag(IF, IP_INTERFACE_TAG);
}
VOID IPAddInterfaceRoute( PIP_INTERFACE IF ) {
@@ -361,7 +359,7 @@
NULL, /* Free routine */
0, /* Flags */
sizeof(IPDATAGRAM_REASSEMBLY), /* Size of each entry */
- 'RDPI', /* Tag */
+ DATAGRAM_REASSEMBLY_TAG, /* Tag */
0); /* Depth */
ExInitializeNPagedLookasideList(
@@ -370,7 +368,7 @@
NULL, /* Free routine */
0, /* Flags */
sizeof(IP_FRAGMENT), /* Size of each entry */
- 'GFPI', /* Tag */
+ DATAGRAM_FRAGMENT_TAG, /* Tag */
0); /* Depth */
ExInitializeNPagedLookasideList(
@@ -379,7 +377,7 @@
NULL, /* Free routine */
0, /* Flags */
sizeof(IPDATAGRAM_HOLE), /* Size of each entry */
- 'LHPI', /* Tag */
+ DATAGRAM_HOLE_TAG, /* Tag */
0); /* Depth */
/* Start routing subsystem */
Removed: trunk/reactos/lib/drivers/ip/network/memtrack.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/mem…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/memtrack.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/memtrack.c (removed)
@@ -1,153 +1,0 @@
-#define MEMTRACK_NO_POOL
-#include "precomp.h"
-
-
-#if DBG
-#define TRACK_TAG 'KCrT'
-
-static LIST_ENTRY AllocatedObjectsList;
-static KSPIN_LOCK AllocatedObjectsLock;
-static NPAGED_LOOKASIDE_LIST AllocatedObjectsLookasideList;
-
-VOID TrackingInit() {
- TcpipInitializeSpinLock( &AllocatedObjectsLock );
- InitializeListHead( &AllocatedObjectsList );
- ExInitializeNPagedLookasideList(&AllocatedObjectsLookasideList,
- NULL,
- NULL,
- 0,
- sizeof(ALLOCATION_TRACKER),
- TRACK_TAG,
- 0 );
-}
-
-VOID ShowTrackedThing( PCHAR What, PALLOCATION_TRACKER Thing, BOOLEAN ForceShow ) {
-
- if (ForceShow)
- {
- DbgPrint("[%s] Thing %08x %c%c%c%c (%s:%d)\n",
- What,
- Thing->Thing,
- ((PCHAR)&Thing->Tag)[3],
- ((PCHAR)&Thing->Tag)[2],
- ((PCHAR)&Thing->Tag)[1],
- ((PCHAR)&Thing->Tag)[0],
- Thing->FileName,
- Thing->LineNo);
- }
- else
- {
- TI_DbgPrint(MAX_TRACE,
- ("[%s] Thing %08x %c%c%c%c (%s:%d)\n",
- What,
- Thing->Thing,
- ((PCHAR)&Thing->Tag)[3],
- ((PCHAR)&Thing->Tag)[2],
- ((PCHAR)&Thing->Tag)[1],
- ((PCHAR)&Thing->Tag)[0],
- Thing->FileName,
- Thing->LineNo));
- }
-}
-
-VOID TrackWithTag( ULONG Tag, PVOID Thing, PCHAR FileName, ULONG LineNo ) {
- PALLOCATION_TRACKER TrackedThing =
- ExAllocateFromNPagedLookasideList( &AllocatedObjectsLookasideList );
-
- KIRQL OldIrql;
- PLIST_ENTRY Entry;
- PALLOCATION_TRACKER ThingInList;
-
- if (!TrackedThing) return;
-
- TrackedThing->Tag = Tag;
- TrackedThing->Thing = Thing;
- TrackedThing->FileName = FileName;
- TrackedThing->LineNo = LineNo;
-
- ShowTrackedThing( "Alloc", TrackedThing, FALSE );
-
- TcpipAcquireSpinLock( &AllocatedObjectsLock, &OldIrql );
- Entry = AllocatedObjectsList.Flink;
- while( Entry != &AllocatedObjectsList ) {
- ThingInList = CONTAINING_RECORD(Entry, ALLOCATION_TRACKER, Entry);
- if( ThingInList->Thing == Thing ) {
- RemoveEntryList(Entry);
-
- ShowTrackedThing( "Double Alloc (Item in list)", ThingInList, TRUE
);
- ShowTrackedThing( "Double Alloc (Item not in list)", TrackedThing,
TRUE );
-
- ExFreeToNPagedLookasideList( &AllocatedObjectsLookasideList,
- ThingInList );
-
- break;
- }
- Entry = Entry->Flink;
- }
-
- InsertHeadList( &AllocatedObjectsList, &TrackedThing->Entry );
-
- TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql );
-}
-
-VOID UntrackFL( PCHAR File, ULONG Line, PVOID Thing, ULONG Tag ) {
- KIRQL OldIrql;
- PLIST_ENTRY Entry;
- PALLOCATION_TRACKER ThingInList;
-
- TcpipAcquireSpinLock( &AllocatedObjectsLock, &OldIrql );
- Entry = AllocatedObjectsList.Flink;
- while( Entry != &AllocatedObjectsList ) {
- ThingInList = CONTAINING_RECORD(Entry, ALLOCATION_TRACKER, Entry);
- if( ThingInList->Thing == Thing ) {
- RemoveEntryList(Entry);
-
- ShowTrackedThing( "Free ", ThingInList, FALSE );
-
- if ( ThingInList->Tag != Tag ) {
- DbgPrint("UNTRACK: TAG DOES NOT MATCH (%x)\n", Thing);
- ShowTrackedThing("Tag Mismatch (Item in list)", ThingInList,
TRUE);
- ASSERT( FALSE );
- }
-
- ExFreeToNPagedLookasideList( &AllocatedObjectsLookasideList,
- ThingInList );
-
- TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql );
-
- return;
- }
- Entry = Entry->Flink;
- }
- TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql );
-
- DbgPrint("[Double Free] Thing %08x %c%c%c%c (%s:%d)\n",
- Thing,
- ((PCHAR)&Tag)[3],
- ((PCHAR)&Tag)[2],
- ((PCHAR)&Tag)[1],
- ((PCHAR)&Tag)[0],
- File,
- Line);
-
- ASSERT( FALSE );
-}
-
-VOID TrackDumpFL( PCHAR File, ULONG Line ) {
- KIRQL OldIrql;
- PLIST_ENTRY Entry;
- PALLOCATION_TRACKER Thing;
-
- TI_DbgPrint(MAX_TRACE,("Dump: %s:%d\n", File, Line));
-
- TcpipAcquireSpinLock( &AllocatedObjectsLock, &OldIrql );
- Entry = AllocatedObjectsList.Flink;
- while( Entry != &AllocatedObjectsList ) {
- Thing = CONTAINING_RECORD(Entry, ALLOCATION_TRACKER, Entry);
- ShowTrackedThing( "Dump ", Thing, FALSE );
- Entry = Entry->Flink;
- }
- TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql );
-}
-
-#endif /* DBG */
Modified: trunk/reactos/lib/drivers/ip/network/neighbor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/nei…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/neighbor.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/neighbor.c [iso-8859-1] Sun Nov 22 00:53:43 2009
@@ -21,7 +21,7 @@
ASSERT_KM_POINTER(Packet->Complete);
Packet->Complete( Packet->Context, Packet->Packet, Status );
TI_DbgPrint(MID_TRACE, ("Completed\n"));
- exFreePool( Packet );
+ ExFreePoolWithTag( Packet, NEIGHBOR_PACKET_TAG );
TI_DbgPrint(MID_TRACE, ("Freed\n"));
}
@@ -84,7 +84,7 @@
Packet->Packet,
ErrorCode );
- exFreePool( Packet );
+ ExFreePoolWithTag( Packet, NEIGHBOR_PACKET_TAG );
}
}
@@ -128,7 +128,7 @@
*PrevNCE = NCE->Next;
NBFlushPacketQueue(NCE, NDIS_STATUS_REQUEST_ABORTED);
- exFreePool(NCE);
+ ExFreePoolWithTag(NCE, NCE_TAG);
continue;
}
@@ -179,7 +179,7 @@
/* Flush wait queue */
NBFlushPacketQueue( CurNCE, NDIS_STATUS_NOT_ACCEPTED );
- exFreePool(CurNCE);
+ ExFreePoolWithTag(CurNCE, NCE_TAG);
CurNCE = NextNCE;
}
@@ -241,15 +241,14 @@
"LinkAddress (0x%X) LinkAddressLength (%d) State (0x%X)\n",
Interface, Address, LinkAddress, LinkAddressLength, State));
- NCE = exAllocatePool
- (NonPagedPool, sizeof(NEIGHBOR_CACHE_ENTRY) + LinkAddressLength);
+ NCE = ExAllocatePoolWithTag
+ (NonPagedPool, sizeof(NEIGHBOR_CACHE_ENTRY) + LinkAddressLength,
+ NCE_TAG);
if (NCE == NULL)
{
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
return NULL;
}
-
- INIT_TAG(NCE, ' ECN');
NCE->Interface = Interface;
NCE->Address = *Address;
@@ -452,7 +451,8 @@
(DEBUG_NCACHE,
("Called. NCE (0x%X) NdisPacket (0x%X).\n", NCE, NdisPacket));
- Packet = exAllocatePool( NonPagedPool, sizeof(NEIGHBOR_PACKET) );
+ Packet = ExAllocatePoolWithTag( NonPagedPool, sizeof(NEIGHBOR_PACKET),
+ NEIGHBOR_PACKET_TAG );
if( !Packet ) return FALSE;
/* FIXME: Should we limit the number of queued packets? */
@@ -514,7 +514,7 @@
*PrevNCE = CurNCE->Next;
NBFlushPacketQueue( CurNCE, NDIS_STATUS_REQUEST_ABORTED );
- exFreePool(CurNCE);
+ ExFreePoolWithTag(CurNCE, NCE_TAG);
break;
}
Modified: trunk/reactos/lib/drivers/ip/network/ports.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/por…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/ports.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/ports.c [iso-8859-1] Sun Nov 22 00:53:43 2009
@@ -17,7 +17,8 @@
PortSet->PortsToOversee = PortsToManage;
PortSet->ProtoBitBuffer =
- exAllocatePool( NonPagedPool, (PortSet->PortsToOversee + 7) / 8 );
+ ExAllocatePoolWithTag( NonPagedPool, (PortSet->PortsToOversee + 7) / 8,
+ PORT_SET_TAG );
if(!PortSet->ProtoBitBuffer) return STATUS_INSUFFICIENT_RESOURCES;
RtlInitializeBitMap( &PortSet->ProtoBitmap,
PortSet->ProtoBitBuffer,
@@ -28,7 +29,7 @@
}
VOID PortsShutdown( PPORT_SET PortSet ) {
- exFreePool( PortSet->ProtoBitBuffer );
+ ExFreePoolWithTag( PortSet->ProtoBitBuffer, PORT_SET_TAG );
}
VOID DeallocatePort( PPORT_SET PortSet, ULONG Port ) {
Modified: trunk/reactos/lib/drivers/ip/network/receive.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/rec…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/receive.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/receive.c [iso-8859-1] Sun Nov 22 00:53:43 2009
@@ -35,7 +35,7 @@
TI_DbgPrint(DEBUG_IP, ("Called. First (%d) Last (%d).\n", First, Last));
- Hole = exAllocateFromNPagedLookasideList(&IPHoleList);
+ Hole = ExAllocateFromNPagedLookasideList(&IPHoleList);
if (!Hole) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
return NULL;
@@ -76,7 +76,7 @@
TI_DbgPrint(DEBUG_IP, ("Freeing hole descriptor at (0x%X).\n", CurrentH));
/* And free the hole descriptor */
- exFreeToNPagedLookasideList(&IPHoleList, CurrentH);
+ ExFreeToNPagedLookasideList(&IPHoleList, CurrentH);
CurrentEntry = NextEntry;
}
@@ -92,18 +92,18 @@
TI_DbgPrint(DEBUG_IP, ("Freeing fragment data at (0x%X).\n",
CurrentF->Data));
/* Free the fragment data buffer */
- exFreePool(CurrentF->Data);
+ ExFreePoolWithTag(CurrentF->Data, FRAGMENT_DATA_TAG);
TI_DbgPrint(DEBUG_IP, ("Freeing fragment at (0x%X).\n", CurrentF));
/* And free the fragment descriptor */
- exFreeToNPagedLookasideList(&IPFragmentList, CurrentF);
+ ExFreeToNPagedLookasideList(&IPFragmentList, CurrentF);
CurrentEntry = NextEntry;
}
TI_DbgPrint(DEBUG_IP, ("Freeing IPDR data at (0x%X).\n", IPDR));
- exFreeToNPagedLookasideList(&IPDRList, IPDR);
+ ExFreeToNPagedLookasideList(&IPDRList, IPDR);
}
@@ -205,7 +205,7 @@
RtlCopyMemory(&IPPacket->DstAddr, &IPDR->DstAddr, sizeof(IP_ADDRESS));
/* Allocate space for full IP datagram */
- IPPacket->Header = exAllocatePool(NonPagedPool, IPPacket->TotalSize);
+ IPPacket->Header = ExAllocatePoolWithTag(NonPagedPool, IPPacket->TotalSize,
PACKET_BUFFER_TAG);
if (!IPPacket->Header) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
(*IPPacket->Free)(IPPacket);
@@ -297,7 +297,7 @@
TI_DbgPrint(DEBUG_IP, ("Starting new assembly.\n"));
/* We don't have a reassembly structure, create one */
- IPDR = exAllocateFromNPagedLookasideList(&IPDRList);
+ IPDR = ExAllocateFromNPagedLookasideList(&IPDRList);
if (!IPDR)
/* We don't have the resources to process this packet, discard it */
return;
@@ -308,7 +308,7 @@
Hole = CreateHoleDescriptor(0, 65536);
if (!Hole) {
/* We don't have the resources to process this packet, discard it */
- exFreeToNPagedLookasideList(&IPDRList, IPDR);
+ ExFreeToNPagedLookasideList(&IPDRList, IPDR);
return;
}
AddrInitIPv4(&IPDR->SrcAddr, IPv4Header->SrcAddr);
@@ -361,7 +361,7 @@
NewHole = CreateHoleDescriptor(Hole->First, FragFirst - 1);
if (!NewHole) {
/* We don't have the resources to process this packet, discard it */
- exFreeToNPagedLookasideList(&IPHoleList, Hole);
+ ExFreeToNPagedLookasideList(&IPHoleList, Hole);
Cleanup(&IPDR->Lock, OldIrql, IPDR);
return;
}
@@ -374,7 +374,7 @@
NewHole = CreateHoleDescriptor(FragLast + 1, Hole->Last);
if (!NewHole) {
/* We don't have the resources to process this packet, discard it */
- exFreeToNPagedLookasideList(&IPHoleList, Hole);
+ ExFreeToNPagedLookasideList(&IPHoleList, Hole);
Cleanup(&IPDR->Lock, OldIrql, IPDR);
return;
}
@@ -383,7 +383,7 @@
InsertTailList(&IPDR->HoleListHead, &NewHole->ListEntry);
}
- exFreeToNPagedLookasideList(&IPHoleList, Hole);
+ ExFreeToNPagedLookasideList(&IPHoleList, Hole);
/* If this is the first fragment, save the IP header */
if (FragFirst == 0) {
@@ -397,7 +397,7 @@
/* Create a buffer, copy the data into it and put it
in the fragment list */
- Fragment = exAllocateFromNPagedLookasideList(&IPFragmentList);
+ Fragment = ExAllocateFromNPagedLookasideList(&IPFragmentList);
if (!Fragment) {
/* We don't have the resources to process this packet, discard it */
Cleanup(&IPDR->Lock, OldIrql, IPDR);
@@ -407,10 +407,10 @@
TI_DbgPrint(DEBUG_IP, ("Fragment descriptor allocated at (0x%X).\n",
Fragment));
Fragment->Size = IPPacket->TotalSize - IPPacket->HeaderSize;
- Fragment->Data = exAllocatePool(NonPagedPool, Fragment->Size);
+ Fragment->Data = ExAllocatePoolWithTag(NonPagedPool, Fragment->Size,
FRAGMENT_DATA_TAG);
if (!Fragment->Data) {
/* We don't have the resources to process this packet, discard it */
- exFreeToNPagedLookasideList(&IPFragmentList, Fragment);
+ ExFreeToNPagedLookasideList(&IPFragmentList, Fragment);
Cleanup(&IPDR->Lock, OldIrql, IPDR);
return;
}
@@ -465,7 +465,7 @@
IF->Stats.InBytes += Datagram.TotalSize;
/* We're done with this datagram */
- exFreePool(Datagram.Header);
+ ExFreePoolWithTag(Datagram.Header, PACKET_BUFFER_TAG);
TI_DbgPrint(MAX_TRACE, ("Freeing datagram at (0x%X).\n", Datagram));
(*Datagram.Free)(&Datagram);
} else
Modified: trunk/reactos/lib/drivers/ip/network/router.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/rou…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/router.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/router.c [iso-8859-1] Sun Nov 22 00:53:43 2009
@@ -51,7 +51,7 @@
* Object = Pointer to an forward information base structure
*/
{
- exFreePool(Object);
+ ExFreePoolWithTag(Object, FIB_TAG);
}
@@ -217,13 +217,11 @@
A2S(Netmask),
A2S(&Router->Address)));
- FIBE = exAllocatePool(NonPagedPool, sizeof(FIB_ENTRY));
+ FIBE = ExAllocatePoolWithTag(NonPagedPool, sizeof(FIB_ENTRY), FIB_TAG);
if (!FIBE) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
return NULL;
}
-
- INIT_TAG(Router, 'TUOR');
RtlCopyMemory( &FIBE->NetworkAddress, NetworkAddress,
sizeof(FIBE->NetworkAddress) );
Modified: trunk/reactos/lib/drivers/ip/network/routines.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/rou…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/routines.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/routines.c [iso-8859-1] Sun Nov 22 00:53:43 2009
@@ -115,11 +115,11 @@
if (IPPacket->NdisPacket) {
NdisQueryPacket(IPPacket->NdisPacket, NULL, NULL, NULL, &Length);
- Buffer = exAllocatePool(NonPagedPool, Length);
+ Buffer = ExAllocatePool(NonPagedPool, Length);
if (Buffer) {
Length = CopyPacketToBuffer(Buffer, IPPacket->NdisPacket, 0, Length);
DisplayTCPHeader(Buffer, Length);
- exFreePool(Buffer);
+ ExFreePool(Buffer);
}
} else {
Buffer = IPPacket->Header;
Modified: trunk/reactos/lib/drivers/ip/network/transmit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/tra…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/transmit.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/transmit.c [iso-8859-1] Sun Nov 22 00:53:43 2009
@@ -42,7 +42,7 @@
{
FreeNdisPacket(IFC->NdisPacket);
IFC->Complete(IFC->Context, IFC->Datagram, Status);
- exFreePool(IFC);
+ ExFreePoolWithTag(IFC, IFC_TAG);
}
} else {
TI_DbgPrint(MAX_TRACE, ("Calling completion handler.\n"));
@@ -50,7 +50,7 @@
/* There are no more fragments to transmit, so call completion handler */
FreeNdisPacket(IFC->NdisPacket);
IFC->Complete(IFC->Context, IFC->Datagram, NdisStatus);
- exFreePool(IFC);
+ ExFreePoolWithTag(IFC, IFC_TAG);
}
}
@@ -178,7 +178,7 @@
TI_DbgPrint(MAX_TRACE, ("Fragment buffer is %d bytes\n", BufferSize));
- IFC = exAllocatePool(NonPagedPool, sizeof(IPFRAGMENT_CONTEXT));
+ IFC = ExAllocatePoolWithTag(NonPagedPool, sizeof(IPFRAGMENT_CONTEXT), IFC_TAG);
if (IFC == NULL)
return STATUS_INSUFFICIENT_RESOURCES;
@@ -187,7 +187,7 @@
( &IFC->NdisPacket, NULL, BufferSize );
if( !NT_SUCCESS(NdisStatus) ) {
- exFreePool( IFC );
+ ExFreePoolWithTag( IFC, IFC_TAG );
return NdisStatus;
}
@@ -215,14 +215,14 @@
if (!PrepareNextFragment(IFC)) {
FreeNdisPacket(IFC->NdisPacket);
- exFreePool(IFC);
+ ExFreePoolWithTag(IFC, IFC_TAG);
return NDIS_STATUS_FAILURE;
}
if (!NT_SUCCESS((NdisStatus = IPSendFragment(IFC->NdisPacket, NCE, IFC))))
{
FreeNdisPacket(IFC->NdisPacket);
- exFreePool(IFC);
+ ExFreePoolWithTag(IFC, IFC_TAG);
}
return NdisStatus;
Modified: trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/d…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] Sun Nov 22
00:53:43 2009
@@ -35,7 +35,7 @@
if (ReceiveRequest->Irp == Irp)
{
RemoveEntryList(&ReceiveRequest->ListEntry);
- exFreePool(ReceiveRequest);
+ ExFreePoolWithTag(ReceiveRequest, DATAGRAM_RECV_TAG);
break;
}
}
@@ -197,7 +197,7 @@
(PDATAGRAM_RECEIVE_REQUEST)Context;
TI_DbgPrint(MAX_TRACE,("Called (%08x:%08x)\n", Status, Count));
ReceiveRequest->UserComplete( ReceiveRequest->UserContext, Status, Count );
- exFreePool( ReceiveRequest );
+ ExFreePoolWithTag( ReceiveRequest, DATAGRAM_RECV_TAG );
TI_DbgPrint(MAX_TRACE,("Done\n"));
}
@@ -236,7 +236,8 @@
KeAcquireSpinLock(&AddrFile->Lock, &OldIrql);
- ReceiveRequest = exAllocatePool(NonPagedPool, sizeof(DATAGRAM_RECEIVE_REQUEST));
+ ReceiveRequest = ExAllocatePoolWithTag(NonPagedPool,
sizeof(DATAGRAM_RECEIVE_REQUEST),
+ DATAGRAM_RECV_TAG);
if (ReceiveRequest)
{
/* Initialize a receive request */
@@ -250,7 +251,7 @@
&ReceiveRequest->RemotePort);
if (!NT_SUCCESS(Status))
{
- exFreePool(ReceiveRequest);
+ ExFreePoolWithTag(ReceiveRequest, DATAGRAM_RECV_TAG);
KeReleaseSpinLock(&AddrFile->Lock, OldIrql);
return Status;
}
Modified: trunk/reactos/lib/drivers/ip/transport/tcp/accept.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/tcp/accept.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/tcp/accept.c [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -118,7 +118,7 @@
if( Bucket->AssociatedEndpoint == Connection ) {
RemoveEntryList( &Bucket->Entry );
- exFreePool( Bucket );
+ ExFreePoolWithTag( Bucket, TDI_BUCKET_TAG );
break;
}
@@ -148,7 +148,8 @@
KeReleaseSpinLock(&Listener->Lock, OldIrql);
if( Status == STATUS_PENDING ) {
- Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) );
+ Bucket = ExAllocatePoolWithTag( NonPagedPool, sizeof(*Bucket),
+ TDI_BUCKET_TAG );
if( Bucket ) {
Bucket->AssociatedEndpoint = Connection;
Modified: trunk/reactos/lib/drivers/ip/transport/tcp/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -126,8 +126,6 @@
#define SIGNATURE_LARGE 'LLLL'
#define SIGNATURE_SMALL 'SSSS'
#define SIGNATURE_OTHER 'OOOO'
-#define TCP_TAG ' PCT'
-
static NPAGED_LOOKASIDE_LIST LargeLookasideList;
static NPAGED_LOOKASIDE_LIST SmallLookasideList;
@@ -139,14 +137,14 @@
NULL,
0,
LARGE_SIZE + sizeof( ULONG ),
- TCP_TAG,
+ OSK_LARGE_TAG,
0 );
ExInitializeNPagedLookasideList( &SmallLookasideList,
NULL,
NULL,
0,
SMALL_SIZE + sizeof( ULONG ),
- TCP_TAG,
+ OSK_SMALL_TAG,
0 );
return STATUS_SUCCESS;
@@ -216,13 +214,13 @@
v = ExAllocateFromNPagedLookasideList( &LargeLookasideList );
Signature = SIGNATURE_LARGE;
} else {
- v = ExAllocatePool( NonPagedPool, Bytes + sizeof(ULONG) );
+ v = ExAllocatePoolWithTag( NonPagedPool, Bytes + sizeof(ULONG),
+ OSK_OTHER_TAG );
Signature = SIGNATURE_OTHER;
}
if( v ) {
*((ULONG *) v) = Signature;
v = (void *)((char *) v + sizeof(ULONG));
- TrackWithTag( FOURCC('f','b','s','d'), v,
(PCHAR)File, Line );
}
return v;
@@ -232,7 +230,6 @@
void *data, OSK_PCHAR File, OSK_UINT Line ) {
ULONG Signature;
- UntrackFL( (PCHAR)File, Line, data,
FOURCC('f','b','s','d') );
data = (void *)((char *) data - sizeof(ULONG));
Signature = *((ULONG *) data);
if ( SIGNATURE_SMALL == Signature ) {
@@ -240,7 +237,7 @@
} else if ( SIGNATURE_LARGE == Signature ) {
ExFreeToNPagedLookasideList( &LargeLookasideList, data );
} else if ( SIGNATURE_OTHER == Signature ) {
- ExFreePool( data );
+ ExFreePoolWithTag( data, OSK_OTHER_TAG );
} else {
ASSERT( FALSE );
}
Modified: trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Sun Nov 22 00:53:43
2009
@@ -33,7 +33,7 @@
Complete(Bucket->Request.RequestContext, Bucket->Status,
Bucket->Information);
- exFreePool(Bucket);
+ ExFreePoolWithTag(Bucket, TDI_BUCKET_TAG);
}
if (!Connection->SocketContext)
@@ -315,7 +315,8 @@
PCONNECTION_ENDPOINT TCPAllocateConnectionEndpoint( PVOID ClientContext ) {
PCONNECTION_ENDPOINT Connection =
- exAllocatePool(NonPagedPool, sizeof(CONNECTION_ENDPOINT));
+ ExAllocatePoolWithTag(NonPagedPool, sizeof(CONNECTION_ENDPOINT),
+ CONN_ENDPT_TAG);
if (!Connection)
return Connection;
@@ -351,7 +352,7 @@
RemoveEntryList(&Connection->ListEntry);
TcpipReleaseSpinLock(&ConnectionEndpointListLock, OldIrql);
- exFreePool( Connection );
+ ExFreePoolWithTag( Connection, CONN_ENDPT_TAG );
}
NTSTATUS TCPSocket( PCONNECTION_ENDPOINT Connection,
@@ -667,7 +668,7 @@
if (Status == STATUS_PENDING)
{
- Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) );
+ Bucket = ExAllocatePoolWithTag( NonPagedPool, sizeof(*Bucket), TDI_BUCKET_TAG
);
if( !Bucket )
{
return STATUS_NO_MEMORY;
@@ -776,7 +777,7 @@
/* Keep this request around ... there was no data yet */
if( Status == STATUS_PENDING ) {
/* Freed in TCPSocketState */
- Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) );
+ Bucket = ExAllocatePoolWithTag( NonPagedPool, sizeof(*Bucket), TDI_BUCKET_TAG );
if( !Bucket ) {
TI_DbgPrint(DEBUG_TCP,("Failed to allocate bucket\n"));
return STATUS_NO_MEMORY;
@@ -835,7 +836,7 @@
/* Keep this request around ... there was no data yet */
if( Status == STATUS_PENDING ) {
/* Freed in TCPSocketState */
- Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) );
+ Bucket = ExAllocatePoolWithTag( NonPagedPool, sizeof(*Bucket), TDI_BUCKET_TAG );
if( !Bucket ) {
TI_DbgPrint(DEBUG_TCP,("Failed to allocate bucket\n"));
return STATUS_NO_MEMORY;
@@ -927,7 +928,7 @@
if( Bucket->Request.RequestContext == Irp )
{
RemoveEntryList( &Bucket->Entry );
- exFreePool( Bucket );
+ ExFreePoolWithTag( Bucket, TDI_BUCKET_TAG );
break;
}
}
Removed: trunk/reactos/lib/drivers/oskittcp/include/memtrack.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/inclu…
==============================================================================
--- trunk/reactos/lib/drivers/oskittcp/include/memtrack.h [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/oskittcp/include/memtrack.h (removed)
@@ -1,80 +1,0 @@
-#ifndef MEMTRACK_H
-#define MEMTRACK_H
-
-#ifndef FOURCC
-#define FOURCC(a,b,c,d) (((a)<<24)|((b)<<16)|((c)<<8)|(d))
-#endif
-
-#define FBSD_MALLOC FOURCC('d','s','b','f')
-#define EXALLOC_TAG FOURCC('E','x','A','l')
-
-#if DBG
-#define MTMARK() TrackDumpFL(__FILE__, __LINE__)
-#define NdisAllocateBuffer(x,y,z,a,b) { \
- NdisAllocateBuffer(x,y,z,a,b); \
- if( *x == NDIS_STATUS_SUCCESS ) { \
- Track(NDIS_BUFFER_TAG, *y); \
- } \
-}
-#define NdisAllocatePacket(x,y,z) { \
- NdisAllocatePacket(x,y,z); \
- if( *x == NDIS_STATUS_SUCCESS ) { \
- Track(NDIS_PACKET_TAG, *y); \
- } \
-}
-#define FreeNdisPacket(x) { TI_DbgPrint(MID_TRACE,("Deleting Packet %x\n", x));
FreeNdisPacketX(x); }
-#define NdisFreePacket(x) { Untrack(x); NdisFreePacket(x); }
-#define NdisFreeBuffer(x) { Untrack(x); NdisFreeBuffer(x); }
-#define exAllocatePool(x,y) ExAllocatePoolX(x,y,__FILE__,__LINE__)
-#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolX(x,y,__FILE__,__LINE__)
-#define exFreePool(x) ExFreePoolX(x,__FILE__,__LINE__)
-
-extern LIST_ENTRY AllocatedObjectsHead;
-extern KSPIN_LOCK AllocatedObjectsLock;
-
-typedef struct _ALLOCATION_TRACKER {
- LIST_ENTRY Entry;
- DWORD Tag;
- PVOID Thing;
- PCHAR FileName;
- DWORD LineNo;
-} ALLOCATION_TRACKER, *PALLOCATION_TRACKER;
-
-VOID TrackingInit();
-VOID TrackWithTag( DWORD Tag, PVOID Thing, PCHAR File, DWORD Line );
-#define Track(Tag,Thing) TrackWithTag(Tag,Thing,__FILE__,__LINE__)
-VOID UntrackFL( PCHAR File, DWORD Line, PVOID Thing );
-#define Untrack(Thing) UntrackFL(__FILE__,__LINE__,Thing)
-VOID TrackDumpFL( PCHAR File, DWORD Line );
-#define TrackDump() TrackDumpFL(__FILE__,__LINE__)
-VOID TrackTag( DWORD Tag );
-
-static __inline PVOID ExAllocatePoolX( POOL_TYPE type, SIZE_T size, PCHAR File, ULONG
Line ) {
- PVOID Out = ExAllocatePool( type, size );
- if( Out ) TrackWithTag( EXALLOC_TAG, Out, File, Line );
- return Out;
-}
-static __inline VOID ExFreePoolX( PVOID Data, PCHAR File, ULONG Line ) {
- UntrackFL(File, Line, Data);
- ExFreePool(Data);
-}
-
-#define MEMTRACK_MAX_TAGS_TO_TRACK 64
-#else
-#define MTMARK()
-#define Track(x,y)
-#define TrackingInit()
-#define TrackDump()
-#define Untrack(x)
-#define TrackTag(x)
-#define FreeNdisPacket FreeNdisPacketX
-#define exFreePool(x) ExFreePool(x)
-#define exAllocatePool(x,y) ExAllocatePool(x,y)
-#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolWithTag(x,y,z)
-#define exAllocateFromNPagedLookasideList(x) ExAllocateFromNPagedLookasideList(x)
-#define exFreeToNPagedLookasideList(x,y) ExFreeToNPagedLookasideList(x,y)
-#define TrackWithTag(w,x,y,z)
-#define UntrackFL(w,x,y,z)
-#endif
-
-#endif/*MEMMTRAC_H*/