How can I print the ARP table of my ESP32C6 device? I have been doing some research and I have seen that with the function "etharp_for_each_entry" it is possible to get the ARP table but for ESP-IDF 5.1.1 version this function is not available.
Thank you!
Print ARP table in ESP-IDF 5.1.1 version
Re: Print ARP table in ESP-IDF 5.1.1 version
You can use the etharp_get_entry() function. Something like this:
Code: Select all
struct eth_addr *ethaddr;
struct netif *netif;
struct eth_addr *ea;
for( int i=0;i<ARP_TABLE_SIZE;i++ ) {
int ret = etharp_get_entry(i,&ipaddr,&netif,&ea);
if( ret ) {
// print contents of IP (ipaddress->addr), interface (netif->num), mac (6 bytes)
}
}
Who is online
Users browsing this forum: Gaston1980 and 160 guests