diff options
Diffstat (limited to 'node/Address.hpp')
-rw-r--r-- | node/Address.hpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/node/Address.hpp b/node/Address.hpp index 4a5883b0..41977af2 100644 --- a/node/Address.hpp +++ b/node/Address.hpp @@ -1,6 +1,6 @@ /* * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2016 ZeroTier, Inc. https://www.zerotier.com/ + * Copyright (C) 2011-2018 ZeroTier, Inc. https://www.zerotier.com/ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,6 +14,14 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * -- + * + * You can be released from the requirements of the license by purchasing + * a commercial license. Buying such a license is mandatory as soon as you + * develop commercial closed-source software that incorporates or links + * directly against ZeroTier software without disclosing the source code + * of your own application. */ #ifndef ZT_ADDRESS_HPP @@ -133,20 +141,9 @@ public: /** * @return Hexadecimal string */ - inline std::string toString() const - { - char buf[16]; - Utils::snprintf(buf,sizeof(buf),"%.10llx",(unsigned long long)_a); - return std::string(buf); - }; - - /** - * @param buf Buffer to fill - * @param len Length of buffer - */ - inline void toString(char *buf,unsigned int len) const + inline char *toString(char buf[11]) const { - Utils::snprintf(buf,len,"%.10llx",(unsigned long long)_a); + return Utils::hex10(_a,buf); } /** |