lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] Re: LWIP_DEBUG in the ethernet_input function


From: Martin Velek
Subject: [lwip-devel] Re: LWIP_DEBUG in the ethernet_input function
Date: Tue, 25 Aug 2009 16:26:16 +0200

Hi Kieran,

U8_F and S8_F was only an example. The correct implementation would be
 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE,
    ("ethernet_input:
dest:%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F",
src:%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F",
type:%04"X16_F"\n".....

I wanted to point on a bug(issue) in etharp.c function in new release
LWIP 1.3.1. I do not know how to set it in a bugtracker on lwip pages.

Martin

>U8_F and S8_F would not render the MAC address properly in hexadecimal.
>Can you try replacing %02x with %hhx instead and see if that helps?
>Perhaps we can add a printf format (similar to U8_F, how about X8_F?)
>that the port could define to be whatever works with their system.

>Kieran


2009/8/25 Martin Velek <address@hidden>:
> Hello,
>
> in a file lwip-1.3.1\src\netif\etharp.c is in the function
> ethernet_input debug information with:
>
>  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)));
>
> I am using non-standard sprintf implementation and this "harcoded"
> string gives me errors. Could you replace it with
> U8_F, S8_F,..... as defined in cc.h?
>
> Thank you.
>
> Regards,
> Martin Velek
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]