summaryrefslogtreecommitdiff
path: root/node/Packet.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-07-07 16:58:05 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-07-07 16:58:05 -0700
commitdab0fb9e05677bdc6294f196fcf8234892c582c1 (patch)
treeba53dd4b8dfc3c5e52e11a1f554f1d28808d0a47 /node/Packet.hpp
parente14d5d49a1bfe8a82e1bb6d0e6c480e273058ee8 (diff)
downloadinfinitytier-dab0fb9e05677bdc6294f196fcf8234892c582c1.tar.gz
infinitytier-dab0fb9e05677bdc6294f196fcf8234892c582c1.zip
Remote trace: plumbing, replace old TRACE with calls to Trace object.
Diffstat (limited to 'node/Packet.hpp')
-rw-r--r--node/Packet.hpp33
1 files changed, 21 insertions, 12 deletions
diff --git a/node/Packet.hpp b/node/Packet.hpp
index a76d4180..4941e96a 100644
--- a/node/Packet.hpp
+++ b/node/Packet.hpp
@@ -42,12 +42,6 @@
#include "Utils.hpp"
#include "Buffer.hpp"
-//#ifdef ZT_USE_SYSTEM_LZ4
-//#include <lz4.h>
-//#else
-//#include "../ext/lz4/lz4.h"
-//#endif
-
/**
* Protocol version -- incremented only for major changes
*
@@ -969,7 +963,27 @@ public:
* ZeroTier, Inc. itself. We recommend making up random ones for your own
* implementations.
*/
- VERB_USER_MESSAGE = 0x14
+ VERB_USER_MESSAGE = 0x14,
+
+ /**
+ * A trace for remote debugging or diagnostics:
+ * <[8] 64-bit instance ID>
+ * <[2] 16-bit length of Dictionary>
+ * <[...] dictionary containing trace information>
+ *
+ * This message contains a remote trace event. Remote trace events can
+ * be sent to observers configured at the network level for those that
+ * pertain directly to actiity on a network, or to global observers if
+ * locally configured.
+ *
+ * The instance ID is a random 64-bit value generated by each ZeroTier
+ * node on startup. This is helpful in identifying traces from different
+ * members of a cluster.
+ *
+ * The Dictionary serialization format is the same as used for network
+ * configurations. The maximum size of a trace is 10000 bytes.
+ */
+ VERB_REMOTE_TRACE = 0x15
};
/**
@@ -1005,11 +1019,6 @@ public:
ERROR_UNWANTED_MULTICAST = 0x08
};
-#ifdef ZT_TRACE
- static const char *verbString(Verb v);
- static const char *errorString(ErrorCode e);
-#endif
-
template<unsigned int C2>
Packet(const Buffer<C2> &b) :
Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(b)