From e6eb65be0041bbf38be38219765bda0f92fae978 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 17 Oct 2013 16:49:31 -0400 Subject: Netconf support for ARP and NDP caching TTLs. --- node/Network.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'node/Network.hpp') diff --git a/node/Network.hpp b/node/Network.hpp index 5af16982..e72f9a4e 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -272,6 +272,28 @@ public: else return (e->second == "1"); } + /** + * @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 */ @@ -684,6 +706,8 @@ private: bool _isOpen; bool _emulateArp; bool _emulateNdp; + unsigned int _arpCacheTtl; + unsigned int _ndpCacheTtl; unsigned int _multicastPrefixBits; unsigned int _multicastDepth; -- cgit v1.2.3