2000-08-02 00:24:26 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS TCP/IP protocol driver
|
|
|
|
* FILE: include/debug.h
|
|
|
|
* PURPOSE: Debugging support macros
|
|
|
|
* DEFINES: DBG - Enable debug output
|
|
|
|
* NASSERT - Disable assertions
|
|
|
|
*/
|
2010-02-26 11:43:19 +00:00
|
|
|
|
|
|
|
#pragma once
|
2000-08-02 00:24:26 +00:00
|
|
|
|
2007-12-26 10:24:31 +00:00
|
|
|
#define MIN_TRACE ((1 << DPFLTR_WARNING_LEVEL))
|
|
|
|
#define MID_TRACE ((1 << DPFLTR_WARNING_LEVEL) | (1 << DPFLTR_TRACE_LEVEL))
|
|
|
|
#define MAX_TRACE ((1 << DPFLTR_WARNING_LEVEL) | (1 << DPFLTR_TRACE_LEVEL) | (1 << DPFLTR_INFO_LEVEL))
|
2000-08-02 00:24:26 +00:00
|
|
|
|
2001-05-01 22:34:01 +00:00
|
|
|
#define DEBUG_CHECK 0x00000100
|
|
|
|
#define DEBUG_MEMORY 0x00000200
|
2004-08-19 21:39:00 +00:00
|
|
|
#define DEBUG_PBUFFER 0x00000400
|
2001-05-01 22:34:01 +00:00
|
|
|
#define DEBUG_IRP 0x00000800
|
2004-12-04 23:29:56 +00:00
|
|
|
#define DEBUG_TCPIF 0x00001000
|
2001-05-01 22:34:01 +00:00
|
|
|
#define DEBUG_ADDRFILE 0x00002000
|
|
|
|
#define DEBUG_DATALINK 0x00004000
|
|
|
|
#define DEBUG_ARP 0x00008000
|
|
|
|
#define DEBUG_IP 0x00010000
|
2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
not __wchar_t*.
* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
(TARGET_GCCLIBS): Add stdc++.
* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
warning.
* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
(DriverEntry): Initialize ListenRequestLookasideList.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
(AfdDispListen): Partial implement.
* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
NewFCB->ListenRequestQueue.
(AfdKillListenRequests): New function.
(AfdClose): Call AfdKillListenRequests.
* drivers/net/afd/afd/routines.c (DumpName): New function.
* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
(TdiBuildNullConnectionInfo): New function.
(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
0-terminated.
(TdiListen): New function.
* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
(AFD_LISTEN_REQUEST): New structure.
(ListenRequestLookasideList): Declare.
(DumpName, TdiListen): Add prototypes.
* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
AnsiAddress.Length and AnsiAddress.MaximumLength.
* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
prototype.
(DISPLAY_TCP_PACKET): Define.
* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
network byte order.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
Initialize AddrFile->Connection.
(DispTdiListen): Implement.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
initialize AddrFile->Connections.
* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
(DisplayIPPacket): Enable.
(DisplayTCPHeader, DisplayTCPPacket): New functions.
* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
(TCPListen, TCPiReceive): New functions.
(TCPReceive): Partial implement.
* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
(WINSOCK_THREAD_BLOCK): Remove Initialized member.
* (WSAINITIALIZED, WSASETINITIALIZED): Update.
* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
(Initialized): New variable.
(DllMain): Don't initialize p->Initialized.
* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
message.
svn path=/trunk/; revision=7232
2003-12-25 14:06:15 +00:00
|
|
|
#define DEBUG_UDP 0x00020000
|
|
|
|
#define DEBUG_TCP 0x00040000
|
|
|
|
#define DEBUG_ICMP 0x00080000
|
|
|
|
#define DEBUG_ROUTER 0x00100000
|
|
|
|
#define DEBUG_RCACHE 0x00200000
|
|
|
|
#define DEBUG_NCACHE 0x00400000
|
|
|
|
#define DEBUG_CPOINT 0x00800000
|
2004-12-01 08:14:15 +00:00
|
|
|
#define DEBUG_LOCK 0x01000000
|
2005-04-22 09:45:17 +00:00
|
|
|
#define DEBUG_INFO 0x02000000
|
2007-12-16 21:00:44 +00:00
|
|
|
#define DEBUG_ULTRA 0x7FFFFFFF
|
2000-08-02 00:24:26 +00:00
|
|
|
|
2009-06-17 12:44:05 +00:00
|
|
|
#if DBG
|
2000-08-02 00:24:26 +00:00
|
|
|
|
2007-12-16 21:00:44 +00:00
|
|
|
#define REMOVE_PARENS(...) __VA_ARGS__
|
2000-08-02 00:24:26 +00:00
|
|
|
#define TI_DbgPrint(_t_, _x_) \
|
2007-12-26 10:24:31 +00:00
|
|
|
DbgPrintEx(DPFLTR_TCPIP_ID, (_t_) | DPFLTR_MASK, "(%s:%d) ", __FILE__, __LINE__), \
|
|
|
|
DbgPrintEx(DPFLTR_TCPIP_ID, (_t_) | DPFLTR_MASK, REMOVE_PARENS _x_)
|
2000-08-02 00:24:26 +00:00
|
|
|
|
|
|
|
#else /* DBG */
|
|
|
|
|
|
|
|
#define TI_DbgPrint(_t_, _x_)
|
|
|
|
|
|
|
|
#endif /* DBG */
|
|
|
|
|
|
|
|
|
|
|
|
#define assert(x) ASSERT(x)
|
|
|
|
#define assert_irql(x) ASSERT_IRQL(x)
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
|
|
|
|
#define UNIMPLEMENTED \
|
|
|
|
TI_DbgPrint(MIN_TRACE, ("The function at %s:%d is unimplemented, \
|
|
|
|
but come back another day.\n", __FILE__, __LINE__));
|
|
|
|
|
|
|
|
#else /* _MSC_VER */
|
|
|
|
|
|
|
|
#define UNIMPLEMENTED \
|
|
|
|
TI_DbgPrint(MIN_TRACE, ("(%s:%d)(%s) is unimplemented, \
|
|
|
|
but come back another day.\n", __FILE__, __LINE__, __FUNCTION__));
|
|
|
|
|
|
|
|
#endif /* _MSC_VER */
|
|
|
|
|
|
|
|
|
|
|
|
#define CHECKPOINT \
|
2001-05-01 22:34:01 +00:00
|
|
|
do { TI_DbgPrint(DEBUG_CHECK, ("(%s:%d)\n", __FILE__, __LINE__)); } while(0);
|
|
|
|
|
|
|
|
#define CP CHECKPOINT
|
2000-08-02 00:24:26 +00:00
|
|
|
|
2004-11-16 18:07:58 +00:00
|
|
|
#define ASSERT_KM_POINTER(_x) \
|
2018-04-23 09:27:49 +00:00
|
|
|
ASSERT(((ULONG_PTR)(_x)) != (ULONG_PTR)0xccccccccccccccccULL); \
|
|
|
|
ASSERT(((PVOID)(_x)) >= MmSystemRangeStart);
|
2004-11-16 18:07:58 +00:00
|
|
|
|
2000-08-02 00:24:26 +00:00
|
|
|
/* EOF */
|