lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Suggestion re ARP


From: Leon Woestenberg
Subject: Re: [lwip-devel] Suggestion re ARP
Date: Fri, 30 Apr 2004 00:13:24 +0200
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

Hello Florian,

Zschocke, Florian wrote:

Leon Woestenberg wrote on Thursday, April 29, 2004 10:52 AM:


That´s true. But I am talking about inbound *IP* traffic
accepted by the local host (running lwIP). In this case, should
inbound packets result in their source address being add to the
ARP cache?


Maybe I misinterpreted you saying that the algorithm is "protocol agnostic".
>
My fault. It is not, as you quoted below. Sorry for the confusion.

The algorithm described in RFC 826 does only act on ARP packets. Quote:
"When an address resolution packet is received, the receiving Ethernet
module gives the packet to the Address Resolution module which goes through
an algorithm similar to the following."

So any ARP cache updates are done only when an ARP packet was received.
Normal IP traffic does not affect the ARP cache.


I remember I have added this to lwIP because lwIP would always lose at
least one packet when replying to a new host, because there was no
packet queueing on unresolved ARP entries.

As currently, the outgoing packet queue is still under development
(stable, but lacking support for >1 packet) I will leave it this way.

After it is finished, I can remove etharp_ip_input() AND always enable
packet queueing. I am not sure if this is what all users want though?

BTW, I have to decide on a way to balance the amount of packets on
queue, and a heuristic to throw them away after ARP timer ticks.
RFC on that one...

Regards,

Leon.


/**
 * Updates the ARP table using the given IP packet.
 *
 * Uses the incoming IP packet's source address to update the
 * ARP cache for the local network. The function does not alter
 * or free the packet. This function must be called before the
 * packet p is passed to the IP layer.
 *
* @param netif The lwIP network interface on which the IP packet pbuf arrived.
 * @param pbuf The IP packet that arrived on netif.
 *
 * @return NULL
 *
 * @see pbuf_free()
 */
struct pbuf *
etharp_ip_input(struct netif *netif, struct pbuf *p)




reply via email to

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