From b94e3a874dec3518c6d48d3f1f8ff43ade6f001b Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 19 Jun 2008 16:40:59 +0000 Subject: [PATCH] Added debug trace for incoming eth packets in ethernet_input like suggested in patch #6519 --- src/netif/etharp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/netif/etharp.c b/src/netif/etharp.c index 710200c0..f5a6473d 100644 --- a/src/netif/etharp.c +++ b/src/netif/etharp.c @@ -1130,7 +1130,14 @@ ethernet_input(struct pbuf *p, struct netif *netif) /* points to packet payload, which starts with an Ethernet header */ ethhdr = p->payload; - + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, + ("ethernet_input: dest:%02x:%02x:%02x:%02x:%02x:%02x, src:%02x:%02x:%02x:%02x:%02x:%02x, type:%2hx\n", + (unsigned)ethhdr->dest.addr[0], (unsigned)ethhdr->dest.addr[1], (unsigned)ethhdr->dest.addr[2], + (unsigned)ethhdr->dest.addr[3], (unsigned)ethhdr->dest.addr[4], (unsigned)ethhdr->dest.addr[5], + (unsigned)ethhdr->src.addr[0], (unsigned)ethhdr->src.addr[1], (unsigned)ethhdr->src.addr[2], + (unsigned)ethhdr->src.addr[3], (unsigned)ethhdr->src.addr[4], (unsigned)ethhdr->src.addr[5], + (unsigned)htons(ethhdr->type))); + switch (htons(ethhdr->type)) { /* IP packet? */ case ETHTYPE_IP: