summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-07-14 13:03:16 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-07-14 13:03:16 -0700
commit4ecc0c59cafac54ff2d32e97b130f83b7481da2e (patch)
tree4c1c9ad5ef6ba38163103501a3b770a51ff57d18 /include
parent0655a1fcbe3aaae3ed5dee94ebe05edf10823b07 (diff)
downloadinfinitytier-4ecc0c59cafac54ff2d32e97b130f83b7481da2e.tar.gz
infinitytier-4ecc0c59cafac54ff2d32e97b130f83b7481da2e.zip
Plumbing through of remote trace into controller code.
Diffstat (limited to 'include')
-rw-r--r--include/ZeroTierOne.h45
1 files changed, 44 insertions, 1 deletions
diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h
index e4c39fbc..14ddc7fe 100644
--- a/include/ZeroTierOne.h
+++ b/include/ZeroTierOne.h
@@ -470,10 +470,53 @@ enum ZT_Event
*
* Meta-data: ZT_UserMessage structure
*/
- ZT_EVENT_USER_MESSAGE = 6
+ ZT_EVENT_USER_MESSAGE = 6,
+
+ /**
+ * Remote trace received
+ *
+ * These are generated when a VERB_REMOTE_TRACE is received. Note
+ * that any node can fling one of these at us. It is your responsibility
+ * to filter and determine if it's worth paying attention to. If it's
+ * not just drop it. Most nodes that are not active controllers ignore
+ * these, and controllers only save them if they pertain to networks
+ * with remote tracing enabled.
+ *
+ * Meta-data: ZT_RemoteTrace structure
+ */
+ ZT_EVENT_REMOTE_TRACE = 7
};
/**
+ * Payload of REMOTE_TRACE event
+ */
+typedef struct
+{
+ /**
+ * ZeroTier address of sender
+ */
+ uint64_t origin;
+
+ /**
+ * Null-terminated Dictionary containing key/value pairs sent by origin
+ *
+ * This *should* be a dictionary, but the implementation only checks
+ * that it is a valid non-empty C-style null-terminated string. Be very
+ * careful to use a well-tested parser to parse this as it represents
+ * data received from a potentially un-trusted peer on the network.
+ * Invalid payloads should be dropped.
+ *
+ * The contents of data[] may be modified.
+ */
+ char *data;
+
+ /**
+ * Length of dict[] in bytes, including terminating null
+ */
+ unsigned int len;
+} ZT_RemoteTrace;
+
+/**
* User message used with ZT_EVENT_USER_MESSAGE
*
* These are direct VL1 P2P messages for application use. Encryption and