undiif: show thread of execution on UNDIIF_ID_DEBUG
authorGene Cumm <gene.cumm@gmail.com>
Fri, 16 Aug 2013 16:38:28 +0000 (12:38 -0400)
committerGene Cumm <gene.cumm@gmail.com>
Mon, 23 Sep 2013 21:25:32 +0000 (17:25 -0400)
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
core/lwip/src/netif/undiif.c

index ce79896..e62a984 100644 (file)
@@ -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', "");