diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-08-23 14:38:20 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-08-23 14:38:20 -0700 |
commit | 0ee4d3554a072863caa59ca2b45122996258617e (patch) | |
tree | 41475cbbbd765cc1d9a01e7c3daa74e77a09ebea /node | |
parent | 0a7a33ef8fb8cd3cdf25c48bd221298279e690c2 (diff) | |
download | infinitytier-0ee4d3554a072863caa59ca2b45122996258617e.tar.gz infinitytier-0ee4d3554a072863caa59ca2b45122996258617e.zip |
Stub out USER_MESSAGE.
Diffstat (limited to 'node')
-rw-r--r-- | node/IncomingPacket.cpp | 2 | ||||
-rw-r--r-- | node/Packet.cpp | 1 | ||||
-rw-r--r-- | node/Packet.hpp | 13 |
3 files changed, 15 insertions, 1 deletions
diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp index 0ecc68be..1aecfdb7 100644 --- a/node/IncomingPacket.cpp +++ b/node/IncomingPacket.cpp @@ -109,6 +109,8 @@ bool IncomingPacket::tryDecode(const RuntimeEnvironment *RR) case Packet::VERB_CIRCUIT_TEST: return _doCIRCUIT_TEST(RR,peer); case Packet::VERB_CIRCUIT_TEST_REPORT: return _doCIRCUIT_TEST_REPORT(RR,peer); case Packet::VERB_REQUEST_PROOF_OF_WORK: return _doREQUEST_PROOF_OF_WORK(RR,peer); + case Packet::VERB_USER_MESSAGE: + return true; } } else { RR->sw->requestWhois(sourceAddress); diff --git a/node/Packet.cpp b/node/Packet.cpp index aadee00b..9630e5bb 100644 --- a/node/Packet.cpp +++ b/node/Packet.cpp @@ -47,6 +47,7 @@ const char *Packet::verbString(Verb v) case VERB_CIRCUIT_TEST: return "CIRCUIT_TEST"; case VERB_CIRCUIT_TEST_REPORT: return "CIRCUIT_TEST_REPORT"; case VERB_REQUEST_PROOF_OF_WORK: return "REQUEST_PROOF_OF_WORK"; + case VERB_USER_MESSAGE: return "USER_MESSAGE"; } return "(unknown)"; } diff --git a/node/Packet.hpp b/node/Packet.hpp index fed6aacf..0a5d3fec 100644 --- a/node/Packet.hpp +++ b/node/Packet.hpp @@ -1030,7 +1030,18 @@ public: * * ERROR has no payload. */ - VERB_REQUEST_PROOF_OF_WORK = 0x13 + VERB_REQUEST_PROOF_OF_WORK = 0x13, + + /** + * A message with arbitrary user-definable content: + * <[8] 64-bit arbitrary message type ID> + * [<[...] message payload>] + * + * This can be used to send arbitrary messages over VL1. It generates no + * OK or ERROR and has no special semantics outside of whatever the user + * (via the ZeroTier core API) chooses to give it. + */ + VERB_USER_MESSAGE = 0x14 }; /** |