Adam Ierymenko daf8a66ced More correct and efficient to initialize member relationship push stuff lazily when member is learned. 9 lat temu
..
Address.hpp b9dba97fdb Bunch more refactoring for an even more compact NetworkConfig representation, especially rules. 9 lat temu
Array.hpp 4e4fd51117 boring doc stuff 10 lat temu
AtomicCounter.hpp 4931e44998 Implement "weak pointer" behavior on Topology Path canonicalization hash table. 9 lat temu
Buffer.hpp 529515d1d1 Changes to how new-style binary network configs are detected, and a new-style binary serialized meta-data representation. 9 lat temu
C25519.cpp 38433e85bf More little stuff in crypto code. 11 lat temu
C25519.hpp 4e4fd51117 boring doc stuff 10 lat temu
Capability.cpp 98152d974a More cleanup and removal of DeferredPackets, will do the latter in a more elegant way. 9 lat temu
Capability.hpp 74afef8eb1 Think through and refine a few things in rules, especially edge case TEE and REDIRECT behavior and semantics. 9 lat temu
CertificateOfMembership.cpp 56febbf2ba . 9 lat temu
CertificateOfMembership.hpp 32fa061700 Compute credential TTL et al. 9 lat temu
Cluster.cpp f2d2df2b11 Cluster build fix. 9 lat temu
Cluster.hpp a963810e02 Tweak a few cluster params for higher perf / lower initial setup latency. 10 lat temu
Constants.hpp 1908aa55f5 Refactor MULTICAST_LIKE pushing to eliminate redundant and unnecessary pushes and simplify code. 9 lat temu
Dictionary.hpp 7036831203 Sign Dictionary in doNETWORK_CONFIG_REQUEST. 9 lat temu
Hashtable.hpp 8a2e8bd585 Rework how paths are set as remote cluster preferred. The code is now clearer and cluster preference indications are now very sticky as they should be. 9 lat temu
Identity.cpp ecc1324bb0 Rules engine work: capability based security model with tags and capabilities, and some cleanup across other places. 9 lat temu
Identity.hpp 7036831203 Sign Dictionary in doNETWORK_CONFIG_REQUEST. 9 lat temu
IncomingPacket.cpp c7a4da3dd3 Turns out we do not need to pass network to receive(). 9 lat temu
IncomingPacket.hpp a3bdae9735 Work in progress: Path canonicalization refactor. 9 lat temu
InetAddress.cpp b08ca49580 More controller work -- it builds! 9 lat temu
InetAddress.hpp bd15262e54 Bunch of rule JSON stuff. 9 lat temu
MAC.hpp 4e4fd51117 boring doc stuff 10 lat temu
Membership.cpp daf8a66ced More correct and efficient to initialize member relationship push stuff lazily when member is learned. 9 lat temu
Membership.hpp daf8a66ced More correct and efficient to initialize member relationship push stuff lazily when member is learned. 9 lat temu
MulticastGroup.hpp dbf3e6c3c9 Dead code removal. 9 lat temu
Multicaster.cpp 0dfc08b317 Tidy up a few minor protocol things, improve documentation in Packet.hpp. 9 lat temu
Multicaster.hpp 00fd9c3a15 It builds... almost ready to test some rules engine stuff. 9 lat temu
Mutex.hpp 4e4fd51117 boring doc stuff 10 lat temu
Network.cpp daf8a66ced More correct and efficient to initialize member relationship push stuff lazily when member is learned. 9 lat temu
Network.hpp daf8a66ced More correct and efficient to initialize member relationship push stuff lazily when member is learned. 9 lat temu
NetworkConfig.cpp c9ee8612e4 Credential TTL (tags/capabilities) should be credential time max delta, since we could get pushed one that is newer. 9 lat temu
NetworkConfig.hpp c9ee8612e4 Credential TTL (tags/capabilities) should be credential time max delta, since we could get pushed one that is newer. 9 lat temu
NetworkController.hpp 2ba9343607 Encode and decode of tags and capabilities in NetworkConfig. 9 lat temu
Node.cpp 1908aa55f5 Refactor MULTICAST_LIKE pushing to eliminate redundant and unnecessary pushes and simplify code. 9 lat temu
Node.hpp ccea3d04d6 Push NETWORK_CONFIG_REFRESH on POSTs to /member/... in controller. 9 lat temu
NonCopyable.hpp 4e4fd51117 boring doc stuff 10 lat temu
OutboundMulticast.cpp 74afef8eb1 Think through and refine a few things in rules, especially edge case TEE and REDIRECT behavior and semantics. 9 lat temu
OutboundMulticast.hpp 37d139177d Integrate Filter into OutboundMulticast properly. 9 lat temu
Packet.cpp 0ee4d3554a Stub out USER_MESSAGE. 9 lat temu
Packet.hpp 74afef8eb1 Think through and refine a few things in rules, especially edge case TEE and REDIRECT behavior and semantics. 9 lat temu
Path.cpp a3bdae9735 Work in progress: Path canonicalization refactor. 9 lat temu
Path.hpp a7d988745b Use ECHO instead of HELLO where possible. 9 lat temu
Peer.cpp c7a4da3dd3 Turns out we do not need to pass network to receive(). 9 lat temu
Peer.hpp c7a4da3dd3 Turns out we do not need to pass network to receive(). 9 lat temu
Poly1305.cpp c952fbbd8d Only enable 128-bit Poly1305 on X86_64 right now. Has compilation issues on ARM, but the 64-bit version should be fine. 10 lat temu
Poly1305.hpp 4e4fd51117 boring doc stuff 10 lat temu
README.md 6d8de214eb Docs and controller API version 9 lat temu
RuntimeEnvironment.hpp 98152d974a More cleanup and removal of DeferredPackets, will do the latter in a more elegant way. 9 lat temu
SHA512.cpp 4e4fd51117 boring doc stuff 10 lat temu
SHA512.hpp 4e4fd51117 boring doc stuff 10 lat temu
Salsa20.cpp 0c498556d5 Unroll Salsa20 fully for a little more speed (non-SSE now almost as fast as SSE) 10 lat temu
Salsa20.hpp 719233617c Add uint16_t key to Hashtable, and make Salsa20 zero its keyspace on destruction. 10 lat temu
SelfAwareness.cpp b5c86b6ba4 Bunch more path refactoring. Peers no longer forget paths, but do not normally use expired paths. Expired paths might still be tried if nothing else is reachable. 9 lat temu
SelfAwareness.hpp b5c86b6ba4 Bunch more path refactoring. Peers no longer forget paths, but do not normally use expired paths. Expired paths might still be tried if nothing else is reachable. 9 lat temu
SharedPtr.hpp 4931e44998 Implement "weak pointer" behavior on Topology Path canonicalization hash table. 9 lat temu
Switch.cpp b5c86b6ba4 Bunch more path refactoring. Peers no longer forget paths, but do not normally use expired paths. Expired paths might still be tried if nothing else is reachable. 9 lat temu
Switch.hpp e1310a764a More cleanup and removal of cruft due to obsolete network-specific relays (will be replaced with federation stuff). 9 lat temu
Tag.cpp 56febbf2ba . 9 lat temu
Tag.hpp 9a3c652a51 Get rid of expiration in Capability and Tag and move this to NetworkConfig so it can be set network-wide and reset if needed. Also add NetworkConfig field for this and centralize checking of credential time validity. 9 lat temu
Topology.cpp b5c86b6ba4 Bunch more path refactoring. Peers no longer forget paths, but do not normally use expired paths. Expired paths might still be tried if nothing else is reachable. 9 lat temu
Topology.hpp a3bdae9735 Work in progress: Path canonicalization refactor. 9 lat temu
Utils.cpp d7f2287ce9 More tweaks to path behavior. 9 lat temu
Utils.hpp e09c1a1c11 Big refactor mostly builds. We now have a uniform backward compatible netconf. 9 lat temu
World.hpp ecc1324bb0 Rules engine work: capability based security model with tags and capabilities, and some cleanup across other places. 9 lat temu

README.md

ZeroTier Virtual Switch Core

This directory contains the real ZeroTier: a completely OS-independent global virtual Ethernet switch engine. This is where the magic happens.

Give it wire packets and it gives you Ethernet packets, and vice versa. The core contains absolutely no actual I/O, port configuration, or other OS-specific code (except Utils::getSecureRandom()). It provides a simple C API via /include/ZeroTierOne.h. It's designed to be small and maximally portable for future use on small embedded and special purpose systems.

Code in here follows these guidelines:

  • Keep it minimal, especially in terms of code footprint and memory use.
  • There should be no OS-dependent code here unless absolutely necessary (e.g. getSecureRandom).
  • If it's not part of the core virtual Ethernet switch it does not belong here.
  • No C++11 or C++14 since older and embedded compilers don't support it yet and this should be maximally portable.
  • Minimize the use of complex C++ features since at some point we might end up "minus-minus'ing" this code if doing so proves necessary to port to tiny embedded systems.