diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-01-11 10:17:44 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-01-11 10:17:44 -0800 |
| commit | b3e3d4cacca37a4850e4e1a91fb8c42a5b13cb26 (patch) | |
| tree | 0fbeba94f3021f8d55ada20c5ed8d193f574d70f /node/InetAddress.hpp | |
| parent | ba2a89c760f9bfa4936f3cf89155aafd047af917 (diff) | |
| download | infinitytier-b3e3d4cacca37a4850e4e1a91fb8c42a5b13cb26.tar.gz infinitytier-b3e3d4cacca37a4850e4e1a91fb8c42a5b13cb26.zip | |
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.
Diffstat (limited to 'node/InetAddress.hpp')
| -rw-r--r-- | node/InetAddress.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/node/InetAddress.hpp b/node/InetAddress.hpp index 2573e694..201271f7 100644 --- a/node/InetAddress.hpp +++ b/node/InetAddress.hpp @@ -326,6 +326,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 */ inline bool isV4() const throw() { return (ss_family == AF_INET); } |
