More work in netconf cleanup.
This commit is contained in:
parent
9f107dbd4e
commit
b10871cedc
6 changed files with 146 additions and 33 deletions
12
node/MAC.hpp
12
node/MAC.hpp
|
@ -135,17 +135,9 @@ public:
|
|||
* @param s String hex representation (with or without :'s)
|
||||
* @return True if string decoded into a full-length MAC
|
||||
*/
|
||||
inline bool fromString(const char *s)
|
||||
inline void fromString(const char *s)
|
||||
{
|
||||
std::string b(Utils::unhex(s));
|
||||
if (b.length() == 6) {
|
||||
for(unsigned int i=0;i<6;++i)
|
||||
data[i] = (unsigned char)b[i];
|
||||
return true;
|
||||
}
|
||||
for(unsigned int i=0;i<6;++i)
|
||||
data[i] = 0;
|
||||
return false;
|
||||
Utils::unhex(s,data,6);
|
||||
}
|
||||
|
||||
inline std::string toString() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue