Changed DEBUGF to LWIP_DEBUGF

This commit is contained in:
kieranm
2003-06-10 10:45:29 +00:00
parent c699921ff0
commit 8014551908
25 changed files with 568 additions and 557 deletions

View File

@@ -119,7 +119,7 @@ extern const struct ip_addr ip_addr_broadcast;
#define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))
#define ip_addr_debug_print(ipaddr) DEBUGF(LWIP_DEBUG, ("%d.%d.%d.%d", \
#define ip_addr_debug_print(ipaddr) LWIP_DEBUGF(LWIP_DEBUG, ("%d.%d.%d.%d", \
(u8_t)(ntohl((ipaddr)->addr) >> 24) & 0xff, \
(u8_t)(ntohl((ipaddr)->addr) >> 16) & 0xff, \
(u8_t)(ntohl((ipaddr)->addr) >> 8) & 0xff, \

View File

@@ -47,30 +47,34 @@
#define DBG_LEVEL_SEVERE 3 /* */
#define DBG_MASK_LEVEL 3
/** flag for DEBUGF to enable that debug message */
/** flag for LWIP_DEBUGF to enable that debug message */
#define DBG_ON 0x80U
/** flag for DEBUGF to disable that debug message */
/** flag for LWIP_DEBUGF to disable that debug message */
#define DBG_OFF 0x00U
/** flag for DEBUGF indicating a tracing message (to follow program flow) */
/** flag for LWIP_DEBUGF indicating a tracing message (to follow program flow) */
#define DBG_TRACE 0x40U
/** flag for DEBUGF indicating a state debug message (to follow module states) */
/** flag for LWIP_DEBUGF indicating a state debug message (to follow module states) */
#define DBG_STATE 0x20U
/** flag for DEBUGF indicating newly added code, not thoroughly tested yet */
/** flag for LWIP_DEBUGF indicating newly added code, not thoroughly tested yet */
#define DBG_FRESH 0x10U
/** flag for DEBUGF to halt after printing this debug message */
/** flag for LWIP_DEBUGF to halt after printing this debug message */
#define DBG_HALT 0x08U
#ifdef LWIP_DEBUG
# ifndef LWIP_NOASSERT
# define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)
# else
# define LWIP_ASSERT(x,y)
# endif
/** print debug message only if debug message type is enabled...
* AND is of correct type AND is at least DBG_LEVEL
*/
# define DEBUGF(debug,x) do { if (((debug) & DBG_ON) && ((debug) & DBG_TYPES_ON) && (((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) & DBG_ON) && ((debug) & DBG_TYPES_ON) && (((debug) & DBG_MASK_LEVEL) >= DBG_MIN_LEVEL)) { LWIP_PLATFORM_DIAG(x); if ((debug) & DBG_HALT) while(1); } } while(0)
# define LWIP_ERROR(x) do { LWIP_PLATFORM_DIAG(x); } while(0)
#else /* LWIP_DEBUG */
# define LWIP_ASSERT(x,y)
# define DEBUGF(debug,x)
# define LWIP_DEBUGF(debug,x)
# define LWIP_ERROR(x)
#endif /* LWIP_DEBUG */

View File

@@ -435,7 +435,7 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */
with a PCB list or removes a PCB from a list, respectively. */
#if 0
#define TCP_REG(pcbs, npcb) do {\
DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %d\n", npcb, npcb->local_port)); \
LWIP_DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %d\n", npcb, npcb->local_port)); \
for(tcp_tmp_pcb = *pcbs; \
tcp_tmp_pcb != NULL; \
tcp_tmp_pcb = tcp_tmp_pcb->next) { \
@@ -450,7 +450,7 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */
} while(0)
#define TCP_RMV(pcbs, npcb) do { \
LWIP_ASSERT("TCP_RMV: pcbs != NULL", *pcbs != NULL); \
DEBUGF(TCP_DEBUG, ("TCP_RMV: removing %p from %p\n", npcb, *pcbs)); \
LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removing %p from %p\n", npcb, *pcbs)); \
if(*pcbs == npcb) { \
*pcbs = (*pcbs)->next; \
} else for(tcp_tmp_pcb = *pcbs; tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \
@@ -461,7 +461,7 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */
} \
npcb->next = NULL; \
LWIP_ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \
DEBUGF(TCP_DEBUG, ("TCP_RMV: removed %p from %p\n", npcb, *pcbs)); \
LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removed %p from %p\n", npcb, *pcbs)); \
} while(0)
#else /* LWIP_DEBUG */