Clean nd6 debug output (use uip-debug instead of local code)
This commit is contained in:
parent
f4b804ed9f
commit
286cf002bc
@ -76,16 +76,7 @@
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
||||
#include <stdio.h>
|
||||
#define PRINTF(...) printf(__VA_ARGS__)
|
||||
#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15])
|
||||
#define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",lladdr->addr[0], lladdr->addr[1], lladdr->addr[2], lladdr->addr[3],lladdr->addr[4], lladdr->addr[5])
|
||||
#else
|
||||
#define PRINTF(...)
|
||||
#define PRINT6ADDR(addr)
|
||||
#define PRINTLLADDR(addr)
|
||||
#endif
|
||||
#include "net/uip-debug.h"
|
||||
|
||||
#if UIP_LOGGING
|
||||
#include <stdio.h>
|
||||
@ -154,11 +145,11 @@ create_llao(uint8_t *llao, uint8_t type) {
|
||||
void
|
||||
uip_nd6_ns_input(void)
|
||||
{
|
||||
PRINTF("Received NS from");
|
||||
PRINTF("Received NS from ");
|
||||
PRINT6ADDR(&UIP_IP_BUF->srcipaddr);
|
||||
PRINTF("to");
|
||||
PRINTF(" to ");
|
||||
PRINT6ADDR(&UIP_IP_BUF->destipaddr);
|
||||
PRINTF("with target address");
|
||||
PRINTF(" with target address");
|
||||
PRINT6ADDR((uip_ipaddr_t *) (&UIP_ND6_NS_BUF->tgtipaddr));
|
||||
PRINTF("\n");
|
||||
UIP_STAT(++uip_stat.nd6.recv);
|
||||
@ -313,11 +304,11 @@ create_na:
|
||||
UIP_IPH_LEN + UIP_ICMPH_LEN + UIP_ND6_NA_LEN + UIP_ND6_OPT_LLAO_LEN;
|
||||
|
||||
UIP_STAT(++uip_stat.nd6.sent);
|
||||
PRINTF("Sending NA to");
|
||||
PRINTF("Sending NA to ");
|
||||
PRINT6ADDR(&UIP_IP_BUF->destipaddr);
|
||||
PRINTF("from");
|
||||
PRINTF(" from ");
|
||||
PRINT6ADDR(&UIP_IP_BUF->srcipaddr);
|
||||
PRINTF("with target address");
|
||||
PRINTF(" with target address ");
|
||||
PRINT6ADDR(&UIP_ND6_NA_BUF->tgtipaddr);
|
||||
PRINTF("\n");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user