summaryrefslogtreecommitdiff
path: root/node/NetworkConfigRequestMetaData.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/NetworkConfigRequestMetaData.hpp')
-rw-r--r--node/NetworkConfigRequestMetaData.hpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/node/NetworkConfigRequestMetaData.hpp b/node/NetworkConfigRequestMetaData.hpp
index 3756d0d8..6c6f2543 100644
--- a/node/NetworkConfigRequestMetaData.hpp
+++ b/node/NetworkConfigRequestMetaData.hpp
@@ -29,11 +29,6 @@
#include "../version.h"
-#ifdef ZT_SUPPORT_OLD_STYLE_NETCONF
-#include <string>
-#include "Dictionary.hpp"
-#endif
-
namespace ZeroTier {
/**
@@ -42,7 +37,20 @@ namespace ZeroTier {
class NetworkConfigRequestMetaData
{
public:
- NetworkConfigRequestMetaData()
+ NetworkConfigRequestMetaData() :
+ buildId(0),
+ flags(0),
+ vendor(ZT_VENDOR_ZEROTIER),
+ platform(ZT_PLATFORM_UNSPECIFIED),
+ architecture(ZT_ARCHITECTURE_UNSPECIFIED),
+ majorVersion(ZEROTIER_ONE_VERSION_MAJOR),
+ minorVersion(ZEROTIER_ONE_VERSION_MINOR),
+ revision(ZEROTIER_ONE_VERSION_REVISION)
+ {
+ memset(auth,0,sizeof(auth));
+ }
+
+ NetworkConfigRequestMetaData(bool foo)
{
memset(this,0,sizeof(NetworkConfigRequestMetaData));
}
@@ -67,7 +75,7 @@ public:
b.append((uint16_t)minorVersion);
b.append((uint16_t)revision);
- unsigned int tl = (unsigned int)strlen(_auth);
+ unsigned int tl = (unsigned int)strlen(auth);
if (tl > 255) tl = 255; // sanity check
b.append((uint8_t)tl);
b.append((const void *)auth,tl);
@@ -108,6 +116,11 @@ public:
return (p - startAt);
}
+ inline void clear()
+ {
+ memset(this,0,sizeof(NetworkConfigRequestMetaData));
+ }
+
/**
* Build ID (currently unused, must be 0)
*/