lwip-devel
[Top][All Lists]
Advanced

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

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


From: Kieran Mansley
Subject: Re: [lwip-devel] LWIP_DEBUG in the ethernet_input function
Date: Tue, 25 Aug 2009 13:56:20 +0100

On Tue, 2009-08-25 at 14:21 +0200, Martin Velek wrote:
> 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?

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





reply via email to

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