lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] netif->hwaddr_len of loopback interface is not ETH_HWAD


From: goldsimon
Subject: Re: [lwip-users] netif->hwaddr_len of loopback interface is not ETH_HWADDR_LEN
Date: Mon, 06 Jul 2020 19:38:52 +0200
User-agent: K-9 Mail for Android


Am 6. Juli 2020 19:09:51 MESZ schrieb "Laurenz Altenm├╝ller" 
<lwip-users@laure.nz>:
>Hi,
>
>I want to unit test some embedded firmware on native host arch by 
>building it against the lwip unix port (latest master). Right now I
>want 
>to add a fake IP and MAC to the ARP table with 
>`etharp_add_static_entry()` so that the tested function can find it
>when 
>it uses `etharp_query()` and then `etharp_find_addr()` in its 
>implementation. For all this I'm using the netif I get from 
>`netif_get_loopif()`.
>
>Unfortunately I hit the assert in etharp.c:1139 ("netif->hwaddr_len
>must 
>be the same as ETH_HWADDR_LEN for etharp!"). Using the debugger I can 
>confirm that `netif->hwaddr_len` of my loopback netif is 0.
>
>Should I even be able to use the loopback interface for ARP things?

No, the loopif is not meant to work with ARP. Our own unit tests use a 
dedicated tiny test netif for such tests.

Regards,
Simon

> Am
>I 
>just missing some initialization? (In my test's `setUp()` I call 
>`sys_init(); mem_init(); netif_init(); test_netif=netif_get_loopif();`)
>
>Cheers
>Laurenz
>
>
>_______________________________________________
>lwip-users mailing list
>lwip-users@nongnu.org
>https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

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