buglwIP - A Lightweight TCP/IP stack - Bugs: bug #56925, Functions to obtain effective...


You are not allowed to post comments on this tracker with your current authentication level.

bug #56925: Functions to obtain effective reachability (ARP or NDP) status of an IP address

Submitter:  Simon Arlott <s_a>
Submitted:  Fri 20 Sep 2019 06:34:40 PM UTC
Category:  ARP Severity:  3 - Normal
Item Group:  Feature Request Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  2.1.1

Fri 10 Jan 2020 09:25:28 PM UTC, comment #2: 

Do you know any portable/standard function to do this? If not, I'm afraid I'll close this as invalid (and then, feel free to send a patch implementing it, but we currently don't have the development resources to implement such a request).

Simon Goldschmidt <goldsimon>
Group administrator
Fri 20 Sep 2019 09:09:57 PM UTC, comment #1: 

This is what I'm currently doing to check reachability:

(Ignore the IPv6 "have_address" check, I know it's not strictly correct.)

For IPv4, I'm retrying ARP requests more frequently than lwIP would.

For IPv6, the call to nd6_get_next_hop_addr_or_queue() will be returning an error when it tries to queue the packet because the buffer is NULL.

A simple reachability check function would avoid these problems.

Simon Arlott <s_a>
Fri 20 Sep 2019 06:34:40 PM UTC, original submission:  

With etharp_find_addr() I can make sure there is a known ARP entry for an IPv4 address before trying to send packets. It's not perfect because it's necessary to check the IPv4 gateway if the destination is in another network.

There is no direct equivalent for IPv6; nd6_get_next_hop_addr_or_queue() expects a packet to be queued.

I'd like a function that indicates whether or not a packet could be immediately sent to a specified IP address without doing ARP or NDP queries. If it can't then it should perform the required ARP or NDP queries and return a response indicating that they are in progress. If the destination is outside the network then the router reachability should automatically be tested instead.

The purpose of this is to be able to queue an arbitrary quantity of information until ARP or NDP is successful, instead of sending UDP packets and relying on the lwIP queue to keep all of them until ARP or NDP is completed (because the queue size may not be large enough for this).

Simon Arlott <s_a>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by s_a (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-10 goldsimon StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-ec27.
    Corresponding source code