Adam Ierymenko b824ea7bcf Add buffer life cycle stuff to API for fewer memcpys. 5 anni fa
..
AES.cpp dcb3d49d35 Cleanup, Address refactoring, tweak V1 identity generation a bit. 6 anni fa
AES.hpp c5bd21a23e various optimization 6 anni fa
Address.hpp dcb3d49d35 Cleanup, Address refactoring, tweak V1 identity generation a bit. 6 anni fa
Buf.cpp 547f39bb49 Fixes for Buf, unit test 6 anni fa
Buf.hpp b824ea7bcf Add buffer life cycle stuff to API for fewer memcpys. 5 anni fa
C25519.cpp df99f5e3f3 More crypto benchmarks 6 anni fa
C25519.hpp 51f0882849 comments 5 anni fa
CMakeLists.txt 13e86fdb6c lalala build fixes 6 anni fa
Capability.cpp e236d6f743 More minor refactoring 6 anni fa
Capability.hpp e236d6f743 More minor refactoring 6 anni fa
CertificateOfMembership.cpp a8db4a8d2d Minor future proofing and cleanup in CertificateOfMembership, improve comments in a few places. 5 anni fa
CertificateOfMembership.hpp a8db4a8d2d Minor future proofing and cleanup in CertificateOfMembership, improve comments in a few places. 5 anni fa
CertificateOfOwnership.cpp c6ce6b46ce build fixes 6 anni fa
CertificateOfOwnership.hpp c6ce6b46ce build fixes 6 anni fa
Constants.hpp c6a7b5774c MIMC52 6 anni fa
Credential.cpp 55b0555aa0 A bunch more build fixes. 6 anni fa
Credential.hpp c6ce6b46ce build fixes 6 anni fa
Defragmenter.hpp b87e8d8e41 readability++ 6 anni fa
Dictionary.cpp cdc6c42375 Take Dictionary behind the barn... 6 anni fa
Dictionary.hpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
ECC384.cpp 1d885cf810 Build fixes, put uint128_t detection in one place. 6 anni fa
ECC384.hpp eef70e198b Version 2.x notice updates and other boring stuff. 6 anni fa
Endpoint.cpp 8e4d7c56d8 Stub out a protocol field in Endpoint INETADDR types for future use. 6 anni fa
Endpoint.hpp 8e4d7c56d8 Stub out a protocol field in Endpoint INETADDR types for future use. 6 anni fa
Expect.hpp de1b54821e Starting to (re)write unit tests. 6 anni fa
FCV.hpp a8db4a8d2d Minor future proofing and cleanup in CertificateOfMembership, improve comments in a few places. 5 anni fa
Fingerprint.hpp b96ea5ae03 Fingerprint string conversion, API stuff 5 anni fa
Hashtable.hpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
Identity.cpp b96ea5ae03 Fingerprint string conversion, API stuff 5 anni fa
Identity.hpp b96ea5ae03 Fingerprint string conversion, API stuff 5 anni fa
InetAddress.cpp c3b5c45fea Fix InetAddress sizing by delving into crazy C++ weeds, fix Peer compile issues. 6 anni fa
InetAddress.hpp c3b5c45fea Fix InetAddress sizing by delving into crazy C++ weeds, fix Peer compile issues. 6 anni fa
LZ4.cpp e5c7366e71 Yet more minor refactoring and redesign Meter to be more thread-safe. 6 anni fa
LZ4.hpp e5c7366e71 Yet more minor refactoring and redesign Meter to be more thread-safe. 6 anni fa
Locator.cpp 9ad8dd3700 Add Peer method for getting preferred cipher, various cleanup in VL1 6 anni fa
Locator.hpp 9ad8dd3700 Add Peer method for getting preferred cipher, various cleanup in VL1 6 anni fa
MAC.hpp 27ab88db1e little stuff 6 anni fa
MIMC52.cpp ca33eaf28d FPU trick seems to always be faster 6 anni fa
MIMC52.hpp c6a7b5774c MIMC52 6 anni fa
Membership.cpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
Membership.hpp 55b0555aa0 A bunch more build fixes. 6 anni fa
Meter.hpp c6ce6b46ce build fixes 6 anni fa
MulticastGroup.hpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
Mutex.hpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
Network.cpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
Network.hpp 4a9266feef Comment out not-yet-refactored code in Network 6 anni fa
NetworkConfig.cpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
NetworkConfig.hpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
NetworkController.hpp df346a6df6 Work in progress... clean up memcpy and create an annotation for that, lots more porting to new Buf/Protocol code, etc. 6 anni fa
Node.cpp b824ea7bcf Add buffer life cycle stuff to API for fewer memcpys. 5 anni fa
Node.hpp b824ea7bcf Add buffer life cycle stuff to API for fewer memcpys. 5 anni fa
OS.hpp c6a7b5774c MIMC52 6 anni fa
Path.cpp 0589964f99 Yet more cleanup, and add meters to paths. 6 anni fa
Path.hpp c6ce6b46ce build fixes 6 anni fa
Peer.cpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
Peer.hpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
Poly1305.cpp 87890565f3 It builds, and basic stuff and crypto passes tests. 6 anni fa
Poly1305.hpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
Protocol.cpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
Protocol.hpp a58f11e601 Tweak protocol getPacketId(), unit tests for defragmenter, AES fix. 6 anni fa
README.md c6ce6b46ce build fixes 6 anni fa
Revocation.cpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
Revocation.hpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
RuntimeEnvironment.hpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
SHA512.cpp ed8271530f cleanup 6 anni fa
SHA512.hpp 8c8a3c58ec Various little things... 6 anni fa
Salsa20.cpp 08e06f9b8f More refactoring and a bunch of AES goodness. 6 anni fa
Salsa20.hpp 5d0c6db19c Crypto fixes and benchmarks. 6 anni fa
ScopedPtr.hpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
SelfAwareness.cpp c6ce6b46ce build fixes 6 anni fa
SelfAwareness.hpp 7d11522768 Just about everything refactored for new Protocol/Buf code except Switch. 6 anni fa
SharedPtr.hpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
Tag.cpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
Tag.hpp f21ecb3762 Yet more major and very nit-picky refactoring for performance, etc. Also use std::atomic<> now with a TODO to implement a shim if we ever do need to build this on a pre-c++11 compiler. 6 anni fa
Tests.cpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
Tests.h a8db4a8d2d Minor future proofing and cleanup in CertificateOfMembership, improve comments in a few places. 5 anni fa
Topology.cpp 1b71b6d01a hash() -> fingerprint() 6 anni fa
Topology.hpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
Trace.cpp fbd3e10488 cleanup 5 anni fa
Trace.hpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
TriviallyCopyable.hpp c3b5c45fea Fix InetAddress sizing by delving into crazy C++ weeds, fix Peer compile issues. 6 anni fa
Utils.cpp dcb3d49d35 Cleanup, Address refactoring, tweak V1 identity generation a bit. 6 anni fa
Utils.hpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
VL1.cpp 416068f68e Regularize use of fingerprint concept across code. 5 anni fa
VL1.hpp 9ad8dd3700 Add Peer method for getting preferred cipher, various cleanup in VL1 6 anni fa
VL2.cpp e236d6f743 More minor refactoring 6 anni fa
VL2.hpp e236d6f743 More minor refactoring 6 anni fa

README.md

ZeroTier Network Hypervisor 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.
  • 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.