Added debug trace for incoming eth packets in ethernet_input like suggested in patch #6519

This commit is contained in:
goldsimon 2008-06-19 16:40:59 +00:00
parent 3d8e5003af
commit b94e3a874d

View File

@ -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: