[Top][All Lists]

[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" 
>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
>to add a fake IP and MAC to the ARP table with 
>`etharp_add_static_entry()` so that the tested function can find it
>it uses `etharp_query()` and then `etharp_find_addr()` in its 
>implementation. For all this I'm using the netif I get from 
>Unfortunately I hit the assert in etharp.c:1139 ("netif->hwaddr_len
>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.


> Am
>just missing some initialization? (In my test's `setUp()` I call 
>`sys_init(); mem_init(); netif_init(); test_netif=netif_get_loopif();`)
>lwip-users mailing list

reply via email to

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