Enable configuration of multicast algorithm parameters in netconf

This commit is contained in:
Adam Ierymenko 2014-09-04 14:25:07 -07:00
parent 6df9546742
commit 93f9b4392d
4 changed files with 27 additions and 9 deletions

View file

@ -158,6 +158,8 @@ public:
inline void fromString(const char *s)
{
char tmp[8];
for(int i=0;i<6;++i)
tmp[i] = (char)0;
Utils::unhex(s,tmp,6);
setTo(tmp,6);
}

View file

@ -124,13 +124,11 @@ public:
{
char hex[17];
unsigned int hexlen = 0;
while ((*s)&&(*s != '/')&&(hexlen < sizeof(hex) - 1))
while ((*s)&&(*s != '/')&&(hexlen < (sizeof(hex) - 1)))
hex[hexlen++] = *s;
hex[hexlen] = (char)0;
_mac.fromString(hex);
if (*s == '/')
_adi = (uint32_t)Utils::hexStrToULong(++s);
else _adi = 0;
_adi = (*s == '/') ? (uint32_t)Utils::hexStrToULong(s + 1) : (uint32_t)0;
}
/**