most of files: prefix all debug.h define with "LWIP_" to avoid any conflict with others environment defines (these were too "generic").

This commit is contained in:
fbernon
2007-03-30 08:47:04 +00:00
parent 9ec08fa76a
commit 5368a760cf
12 changed files with 224 additions and 225 deletions

View File

@@ -41,25 +41,25 @@
* - 3 severe
*/
#define DBG_LEVEL_OFF 0
#define DBG_LEVEL_WARNING 1 /* bad checksums, dropped packets, ... */
#define DBG_LEVEL_SERIOUS 2 /* memory allocation failures, ... */
#define DBG_LEVEL_SEVERE 3 /* */
#define DBG_MASK_LEVEL 3
#define LWIP_DBG_LEVEL_OFF 0
#define LWIP_DBG_LEVEL_WARNING 1 /* bad checksums, dropped packets, ... */
#define LWIP_DBG_LEVEL_SERIOUS 2 /* memory allocation failures, ... */
#define LWIP_DBG_LEVEL_SEVERE 3 /* */
#define LWIP_DBG_MASK_LEVEL 3
/** flag for LWIP_DEBUGF to enable that debug message */
#define DBG_ON 0x80U
#define LWIP_DBG_ON 0x80U
/** flag for LWIP_DEBUGF to disable that debug message */
#define DBG_OFF 0x00U
#define LWIP_DBG_OFF 0x00U
/** flag for LWIP_DEBUGF indicating a tracing message (to follow program flow) */
#define DBG_TRACE 0x40U
#define LWIP_DBG_TRACE 0x40U
/** flag for LWIP_DEBUGF indicating a state debug message (to follow module states) */
#define DBG_STATE 0x20U
#define LWIP_DBG_STATE 0x20U
/** flag for LWIP_DEBUGF indicating newly added code, not thoroughly tested yet */
#define DBG_FRESH 0x10U
#define LWIP_DBG_FRESH 0x10U
/** flag for LWIP_DEBUGF to halt after printing this debug message */
#define DBG_HALT 0x08U
#define LWIP_DBG_HALT 0x08U
#ifndef LWIP_NOASSERT
# define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)
@@ -69,9 +69,9 @@
#ifdef LWIP_DEBUG
/** print debug message only if debug message type is enabled...
* AND is of correct type AND is at least DBG_LEVEL
* AND is of correct type AND is at least LWIP_DBG_LEVEL
*/
# define LWIP_DEBUGF(debug,x) do { if (((debug) & DBG_ON) && ((debug) & DBG_TYPES_ON) && ((s16_t)((debug) & DBG_MASK_LEVEL) >= DBG_MIN_LEVEL)) { LWIP_PLATFORM_DIAG(x); if ((debug) & DBG_HALT) while(1); } } while(0)
# define LWIP_DEBUGF(debug,x) do { if (((debug) & LWIP_DBG_ON) && ((debug) & LWIP_DBG_TYPES_ON) && ((s16_t)((debug) & LWIP_DBG_MASK_LEVEL) >= LWIP_DBG_MIN_LEVEL)) { LWIP_PLATFORM_DIAG(x); if ((debug) & LWIP_DBG_HALT) while(1); } } while(0)
# define LWIP_ERROR(x) do { LWIP_PLATFORM_DIAG(x); } while(0)
#else /* LWIP_DEBUG */
# define LWIP_DEBUGF(debug,x)
@@ -80,8 +80,3 @@
#endif /* __LWIP_DEBUG_H__ */

View File

@@ -656,131 +656,131 @@ a lot of data that needs to be copied, this should be set high. */
#endif
#ifndef ETHARP_DEBUG
#define ETHARP_DEBUG DBG_OFF
#define ETHARP_DEBUG LWIP_DBG_OFF
#endif
#ifndef NETIF_DEBUG
#define NETIF_DEBUG DBG_OFF
#define NETIF_DEBUG LWIP_DBG_OFF
#endif
#ifndef PBUF_DEBUG
#define PBUF_DEBUG DBG_OFF
#define PBUF_DEBUG LWIP_DBG_OFF
#endif
#ifndef API_LIB_DEBUG
#define API_LIB_DEBUG DBG_OFF
#define API_LIB_DEBUG LWIP_DBG_OFF
#endif
#ifndef API_MSG_DEBUG
#define API_MSG_DEBUG DBG_OFF
#define API_MSG_DEBUG LWIP_DBG_OFF
#endif
#ifndef SOCKETS_DEBUG
#define SOCKETS_DEBUG DBG_OFF
#define SOCKETS_DEBUG LWIP_DBG_OFF
#endif
#ifndef ICMP_DEBUG
#define ICMP_DEBUG DBG_OFF
#define ICMP_DEBUG LWIP_DBG_OFF
#endif
#ifndef INET_DEBUG
#define INET_DEBUG DBG_OFF
#define INET_DEBUG LWIP_DBG_OFF
#endif
#ifndef IP_DEBUG
#define IP_DEBUG DBG_OFF
#define IP_DEBUG LWIP_DBG_OFF
#endif
#ifndef IP_REASS_DEBUG
#define IP_REASS_DEBUG DBG_OFF
#define IP_REASS_DEBUG LWIP_DBG_OFF
#endif
#ifndef RAW_DEBUG
#define RAW_DEBUG DBG_OFF
#define RAW_DEBUG LWIP_DBG_OFF
#endif
#ifndef MEM_DEBUG
#define MEM_DEBUG DBG_OFF
#define MEM_DEBUG LWIP_DBG_OFF
#endif
#ifndef MEMP_DEBUG
#define MEMP_DEBUG DBG_OFF
#define MEMP_DEBUG LWIP_DBG_OFF
#endif
#ifndef SYS_DEBUG
#define SYS_DEBUG DBG_OFF
#define SYS_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCP_DEBUG
#define TCP_DEBUG DBG_OFF
#define TCP_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCP_INPUT_DEBUG
#define TCP_INPUT_DEBUG DBG_OFF
#define TCP_INPUT_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCP_FR_DEBUG
#define TCP_FR_DEBUG DBG_OFF
#define TCP_FR_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCP_RTO_DEBUG
#define TCP_RTO_DEBUG DBG_OFF
#define TCP_RTO_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCP_REXMIT_DEBUG
#define TCP_REXMIT_DEBUG DBG_OFF
#define TCP_REXMIT_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCP_CWND_DEBUG
#define TCP_CWND_DEBUG DBG_OFF
#define TCP_CWND_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCP_WND_DEBUG
#define TCP_WND_DEBUG DBG_OFF
#define TCP_WND_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCP_OUTPUT_DEBUG
#define TCP_OUTPUT_DEBUG DBG_OFF
#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCP_RST_DEBUG
#define TCP_RST_DEBUG DBG_OFF
#define TCP_RST_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCP_QLEN_DEBUG
#define TCP_QLEN_DEBUG DBG_OFF
#define TCP_QLEN_DEBUG LWIP_DBG_OFF
#endif
#ifndef UDP_DEBUG
#define UDP_DEBUG DBG_OFF
#define UDP_DEBUG LWIP_DBG_OFF
#endif
#ifndef TCPIP_DEBUG
#define TCPIP_DEBUG DBG_OFF
#define TCPIP_DEBUG LWIP_DBG_OFF
#endif
#ifndef PPP_DEBUG
#define PPP_DEBUG DBG_OFF
#define PPP_DEBUG LWIP_DBG_OFF
#endif
#ifndef SLIP_DEBUG
#define SLIP_DEBUG DBG_OFF
#define SLIP_DEBUG LWIP_DBG_OFF
#endif
#ifndef DHCP_DEBUG
#define DHCP_DEBUG DBG_OFF
#define DHCP_DEBUG LWIP_DBG_OFF
#endif
#ifndef SNMP_MSG_DEBUG
#define SNMP_MSG_DEBUG DBG_OFF
#define SNMP_MSG_DEBUG LWIP_DBG_OFF
#endif
#ifndef SNMP_MIB_DEBUG
#define SNMP_MIB_DEBUG DBG_OFF
#define SNMP_MIB_DEBUG LWIP_DBG_OFF
#endif
#ifndef DBG_MIN_LEVEL
#define DBG_MIN_LEVEL DBG_LEVEL_OFF
#define DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
#endif
#endif /* __LWIP_OPT_H__ */