From aee742e7675dfc125f31fbe00fafeda53c532b05 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 10 Apr 2014 16:30:15 -0700 Subject: More toward GitHub issue #56 --- node/Packet.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'node/Packet.hpp') diff --git a/node/Packet.hpp b/node/Packet.hpp index e2af0f76..ade44bf5 100644 --- a/node/Packet.hpp +++ b/node/Packet.hpp @@ -136,6 +136,12 @@ */ #define ZT_PROTO_MIN_FRAGMENT_LENGTH ZT_PACKET_FRAGMENT_IDX_PAYLOAD +/** + * Length of LAN beacon packets + */ +#define ZT_PROTO_BEACON_LENGTH 13 +#define ZT_PROTO_BEACON_IDX_ADDRESS 8 + // Size of bloom filter used in multicast propagation graph exploration #define ZT_PROTO_VERB_MULTICAST_FRAME_BLOOM_FILTER_SIZE_BITS 512 #define ZT_PROTO_VERB_MULTICAST_FRAME_BLOOM_FILTER_SIZE_BYTES 64 @@ -250,6 +256,16 @@ namespace ZeroTier { * * For unencrypted packets, MAC is computed on plaintext. Only HELLO is ever * sent in the clear, as it's the "here is my public key" message. + * + * Beacon format and beacon packets: + * <[8] 8 random bytes> + * <[5] sender ZT address> + * + * A beacon is a 13-byte packet containing only the address of the sender. + * Receiving peers may or may not respond to beacons with a HELLO or other + * message to initiate direct communication. + * + * Beacons may be used for direct LAN announcement or NAT traversal. */ class Packet : public Buffer { -- cgit v1.2.3