diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-10-17 16:49:31 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-10-17 16:49:31 -0400 |
| commit | e6eb65be0041bbf38be38219765bda0f92fae978 (patch) | |
| tree | f5b64e18ec49f4b9996ac8f4a9d7ec059c87e154 /node/Network.hpp | |
| parent | dd7758e33ef78a91fd0743a05c0741b71281460b (diff) | |
| download | infinitytier-e6eb65be0041bbf38be38219765bda0f92fae978.tar.gz infinitytier-e6eb65be0041bbf38be38219765bda0f92fae978.zip | |
Netconf support for ARP and NDP caching TTLs.
Diffstat (limited to 'node/Network.hpp')
| -rw-r--r-- | node/Network.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/node/Network.hpp b/node/Network.hpp index 5af16982..e72f9a4e 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -273,6 +273,28 @@ public: } /** + * @return ARP cache TTL in seconds or 0 for no ARP caching + */ + inline unsigned int arpCacheTtl() const + { + const_iterator ttl(find("cARP")); + if (ttl == end()) + return 0; + return Utils::hexStrToUInt(ttl->second.c_str()); + } + + /** + * @return NDP cache TTL in seconds or 0 for no NDP caching + */ + inline unsigned int ndpCacheTtl() const + { + const_iterator ttl(find("cNDP")); + if (ttl == end()) + return 0; + return Utils::hexStrToUInt(ttl->second.c_str()); + } + + /** * @return Multicast rates for this network */ inline MulticastRates multicastRates() const @@ -684,6 +706,8 @@ private: bool _isOpen; bool _emulateArp; bool _emulateNdp; + unsigned int _arpCacheTtl; + unsigned int _ndpCacheTtl; unsigned int _multicastPrefixBits; unsigned int _multicastDepth; |
