I am using imxrt1170 board with SDK 2.10.1 for testing TCP communication. I need to read the network interface details from my task. Similar to the linux api getifaddrs. I found that the stack keeps the network details in netif structure but couldn't find an API to get the same. Kindly please help.
@danielchen thank u so much for the quick response.
If I call struct netif * netif_get_by_index(u8_t idex) from my task the execution gets aborted at sys_assert. Same is the case with netif_find. Exception occurs from LWIP_ASSERT_CORE_LOCKED();
I can use below APIs
unsigned int
lwip_if_nametoindex(const char *ifname)
char *
lwip_if_indextoname(unsigned int ifindex, char *ifname)
Hi
Please refer to LwIP API
struct netif * netif_get_by_index(u8_t idex)
struct netif* netif_find(const char *name)
Please refer to below link for more details
https://www.nongnu.org/lwip/2_1_x/group__netif.html
Regards
Daniel