Netconf support for ARP and NDP caching TTLs.

This commit is contained in:
Adam Ierymenko 2013-10-17 16:49:31 -04:00
parent dd7758e33e
commit e6eb65be00
3 changed files with 39 additions and 1 deletions

View file

@ -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;