lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] ARP during UDP transfers


From: Kieran Mansley
Subject: Re: [lwip-users] ARP during UDP transfers
Date: Tue, 29 Mar 2011 16:24:40 +0100

On Tue, 2011-03-29 at 08:14 -0700, Roger Cover wrote:
> Greetings List,
> 
> After researching the source code for a while I have determined that
> lwIP will queue one UDP packet when the ARP table entry for its
> destination times out, and then drop subsequent UDP packets until the
> ARP reply is processed (I have ARP_QUEUEING set to 1). My question is:
> what is the appropriate method for my application to detect that this
> has happened so it can ensure that no UDP packets are dropped in the
> stack? I would prefer to have my application suspend its UDP
> transmissions while the ARP traffic is being resolved.

I don't think there is an easy way to detect this.  UDP is an inherently
unreliable protocol and provides no API to monitor loss.  ARP status is
entirely hidden from the application as there is no guarantee that your
application will be running on an Ethernet network.

You could go some way to avoiding the ARP interrupting your
transmissions by making sure there is a valid entry for the destination
before you try and send to it, e.g. by sending a ping and waiting for a
response.  You would need to do this periodically in the absence of
traffic from your application as ARP entries will time out.

Kieran




reply via email to

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