lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Using ARP to get MAC address


From: Kieran Mansley
Subject: Re: [lwip-users] Using ARP to get MAC address
Date: Sat, 18 Feb 2012 13:59:14 +0000

On 17 Feb 2012, at 09:43, Tomas Daujotas wrote:

> Seems like find_entry() doesn't give any results at all... Well,
> actually, it returns 0.
> 
> Strange, I've placed print out just after the find_entry() beginning:
>  for (i = 0; i < ARP_TABLE_SIZE; i++)  printf("ARP Table: i=%d \t
> state=%d \t ip=0x%08X \n",i,arp_table[i].state,arp_table[i].ipaddr);
> 
> And it succesfully prints me the required result in the first place
> after the first ARP reception, state becomes 1 and arp_table[i].ipaddr
> gives a required result. So table is updated. I need to get MAC
> somewhere now.

If find_entry() is returning 0 (i.e. it has a row for that IP addr at index 0) 
but etharp_find_addr() is returning -1 that must mean that the arp_table.state 
for that row is not ETHARP_STATE_STABLE.  What is it?  That will show you the 
problem.

Kieran


reply via email to

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