From b3e3d4cacca37a4850e4e1a91fb8c42a5b13cb26 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 11 Jan 2016 10:17:44 -0800 Subject: Instead of using binary packet comparison, add a callback to the API to explicitly check whether paths should be used. Check in with this callback (if present) when learning new paths or sending initial packets. --- node/InetAddress.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'node/InetAddress.hpp') diff --git a/node/InetAddress.hpp b/node/InetAddress.hpp index 2573e694..201271f7 100644 --- a/node/InetAddress.hpp +++ b/node/InetAddress.hpp @@ -325,6 +325,14 @@ struct InetAddress : public sockaddr_storage */ InetAddress network() const; + /** + * Test whether this IP/netmask contains this address + * + * @param addr Address to check + * @return True if this IP/netmask (route) contains this address + */ + bool containsAddress(const InetAddress &addr) const; + /** * @return True if this is an IPv4 address */ -- cgit v1.2.3