From 37141eb6b0265693052aeb8e2d38bf6e7fa5176b Mon Sep 17 00:00:00 2001 From: Gene Cumm Date: Fri, 16 Aug 2013 12:38:28 -0400 Subject: [PATCH] undiif: show thread of execution on UNDIIF_ID_DEBUG Signed-off-by: Gene Cumm --- core/lwip/src/netif/undiif.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/lwip/src/netif/undiif.c b/core/lwip/src/netif/undiif.c index ce79896..e62a984 100644 --- a/core/lwip/src/netif/undiif.c +++ b/core/lwip/src/netif/undiif.c @@ -174,7 +174,7 @@ static u8_t undiarp_cached_entry; #define UNDIARP_TRY_HARD 1 #define UNDIARP_FIND_ONLY 2 -#define UNIDIF_ID_STRLEN 244 +#define UNIDIF_ID_STRLEN 300 static inline bool undi_is_ethernet(struct netif *netif) @@ -481,7 +481,9 @@ undi_transmit(struct netif *netif, struct pbuf *pbuf, struct eth_hdr *ethhdr = pbuf->payload; - strpos = snprintf_eth_hdr(str + strpos, UNIDIF_ID_STRLEN - strpos, + strpos += snprintf(str + strpos, UNIDIF_ID_STRLEN - strpos, + "undi xmit thd '%s'\n", current()->name); + strpos += snprintf_eth_hdr(str + strpos, UNIDIF_ID_STRLEN - strpos, "undi", ethhdr, 'x', '0', ""); strpos += snprintf_arp_hdr(str + strpos, UNIDIF_ID_STRLEN - strpos, " arp", ethhdr, 'x', '0', ""); @@ -1465,7 +1467,9 @@ void undiif_input(t_PXENV_UNDI_ISR *isr) char *str = malloc(UNIDIF_ID_STRLEN); int strpos = 0; - strpos = snprintf_eth_hdr(str + strpos, UNIDIF_ID_STRLEN - strpos, + strpos += snprintf(str + strpos, UNIDIF_ID_STRLEN - strpos, + "undi recv thd '%s'\n", current()->name); + strpos += snprintf_eth_hdr(str + strpos, UNIDIF_ID_STRLEN - strpos, "undi", ethhdr, 'r', '0', ""); strpos += snprintf_arp_hdr(str + strpos, UNIDIF_ID_STRLEN - strpos, " arp", ethhdr, 'r', '0', ""); -- 2.7.4