Adam Ierymenko b87e8d8e41 readability++ 5 лет назад
..
AES.cpp a58f11e601 Tweak protocol getPacketId(), unit tests for defragmenter, AES fix. 5 лет назад
AES.hpp 5275a34b0b more refactoring 5 лет назад
Address.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. 5 лет назад
Buf.cpp 547f39bb49 Fixes for Buf, unit test 5 лет назад
Buf.hpp 547f39bb49 Fixes for Buf, unit test 5 лет назад
C25519.cpp df99f5e3f3 More crypto benchmarks 5 лет назад
C25519.hpp eef70e198b Version 2.x notice updates and other boring stuff. 6 лет назад
CMakeLists.txt 55b0555aa0 A bunch more build fixes. 5 лет назад
Capability.cpp e236d6f743 More minor refactoring 5 лет назад
Capability.hpp e236d6f743 More minor refactoring 5 лет назад
CertificateOfMembership.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. 5 лет назад
CertificateOfMembership.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. 5 лет назад
CertificateOfOwnership.cpp c6ce6b46ce build fixes 5 лет назад
CertificateOfOwnership.hpp c6ce6b46ce build fixes 5 лет назад
Constants.hpp 0589964f99 Yet more cleanup, and add meters to paths. 5 лет назад
Credential.cpp 55b0555aa0 A bunch more build fixes. 5 лет назад
Credential.hpp c6ce6b46ce build fixes 5 лет назад
Defragmenter.hpp b87e8d8e41 readability++ 5 лет назад
Dictionary.cpp cdc6c42375 Take Dictionary behind the barn... 6 лет назад
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. 5 лет назад
ECC384.cpp 1d885cf810 Build fixes, put uint128_t detection in one place. 5 лет назад
ECC384.hpp eef70e198b Version 2.x notice updates and other boring stuff. 6 лет назад
Endpoint.cpp 1e0a930d23 Create a container for identity hashes, replace some "volatile" hacky junk with std::atomic, clean up some security checks, rename raw data in Buf to unsafeData to permit search for unsafe. 5 лет назад
Endpoint.hpp c6ce6b46ce build fixes 5 лет назад
Expect.hpp de1b54821e Starting to (re)write unit tests. 5 лет назад
FCV.hpp 87890565f3 It builds, and basic stuff and crypto passes tests. 5 лет назад
Hash.hpp c6ce6b46ce build fixes 5 лет назад
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. 5 лет назад
Identity.cpp f109f2e612 Identity v1 hash tweak 5 лет назад
Identity.hpp de1b54821e Starting to (re)write unit tests. 5 лет назад
InetAddress.cpp c3b5c45fea Fix InetAddress sizing by delving into crazy C++ weeds, fix Peer compile issues. 5 лет назад
InetAddress.hpp c3b5c45fea Fix InetAddress sizing by delving into crazy C++ weeds, fix Peer compile issues. 5 лет назад
LZ4.cpp e5c7366e71 Yet more minor refactoring and redesign Meter to be more thread-safe. 5 лет назад
LZ4.hpp e5c7366e71 Yet more minor refactoring and redesign Meter to be more thread-safe. 5 лет назад
Locator.cpp 9ad8dd3700 Add Peer method for getting preferred cipher, various cleanup in VL1 5 лет назад
Locator.hpp 9ad8dd3700 Add Peer method for getting preferred cipher, various cleanup in VL1 5 лет назад
MAC.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. 5 лет назад
Membership.cpp 55b0555aa0 A bunch more build fixes. 5 лет назад
Membership.hpp 55b0555aa0 A bunch more build fixes. 5 лет назад
Meter.hpp c6ce6b46ce build fixes 5 лет назад
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. 5 лет назад
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. 5 лет назад
Network.cpp 4a9266feef Comment out not-yet-refactored code in Network 5 лет назад
Network.hpp 4a9266feef Comment out not-yet-refactored code in Network 5 лет назад
NetworkConfig.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. 5 лет назад
NetworkConfig.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. 5 лет назад
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 лет назад
Node.cpp 55b0555aa0 A bunch more build fixes. 5 лет назад
Node.hpp 55b0555aa0 A bunch more build fixes. 5 лет назад
OS.hpp 87890565f3 It builds, and basic stuff and crypto passes tests. 5 лет назад
Path.cpp 0589964f99 Yet more cleanup, and add meters to paths. 5 лет назад
Path.hpp c6ce6b46ce build fixes 5 лет назад
Peer.cpp c6ce6b46ce build fixes 5 лет назад
Peer.hpp c6ce6b46ce build fixes 5 лет назад
Poly1305.cpp 87890565f3 It builds, and basic stuff and crypto passes tests. 5 лет назад
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. 5 лет назад
Protocol.cpp a58f11e601 Tweak protocol getPacketId(), unit tests for defragmenter, AES fix. 5 лет назад
Protocol.hpp a58f11e601 Tweak protocol getPacketId(), unit tests for defragmenter, AES fix. 5 лет назад
README.md c6ce6b46ce build fixes 5 лет назад
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. 5 лет назад
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. 5 лет назад
RuntimeEnvironment.hpp 3448e6fc76 Yet MORE refactoring, including moving expected-reply-to out of Node and into its own class for cleanliness. 5 лет назад
SHA512.cpp 8c8a3c58ec Various little things... 5 лет назад
SHA512.hpp 8c8a3c58ec Various little things... 5 лет назад
Salsa20.cpp 08e06f9b8f More refactoring and a bunch of AES goodness. 5 лет назад
Salsa20.hpp 5d0c6db19c Crypto fixes and benchmarks. 5 лет назад
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. 5 лет назад
SelfAwareness.cpp c6ce6b46ce build fixes 5 лет назад
SelfAwareness.hpp 7d11522768 Just about everything refactored for new Protocol/Buf code except Switch. 6 лет назад
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. 5 лет назад
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. 5 лет назад
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. 5 лет назад
Tests.cpp a58f11e601 Tweak protocol getPacketId(), unit tests for defragmenter, AES fix. 5 лет назад
Tests.h a58f11e601 Tweak protocol getPacketId(), unit tests for defragmenter, AES fix. 5 лет назад
Topology.cpp 55b0555aa0 A bunch more build fixes. 5 лет назад
Topology.hpp 55b0555aa0 A bunch more build fixes. 5 лет назад
Trace.cpp 1e0a930d23 Create a container for identity hashes, replace some "volatile" hacky junk with std::atomic, clean up some security checks, rename raw data in Buf to unsafeData to permit search for unsafe. 5 лет назад
Trace.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. 5 лет назад
TriviallyCopyable.hpp c3b5c45fea Fix InetAddress sizing by delving into crazy C++ weeds, fix Peer compile issues. 5 лет назад
Utils.cpp 87890565f3 It builds, and basic stuff and crypto passes tests. 5 лет назад
Utils.hpp 87890565f3 It builds, and basic stuff and crypto passes tests. 5 лет назад
VL1.cpp c6ce6b46ce build fixes 5 лет назад
VL1.hpp 9ad8dd3700 Add Peer method for getting preferred cipher, various cleanup in VL1 5 лет назад
VL2.cpp e236d6f743 More minor refactoring 5 лет назад
VL2.hpp e236d6f743 More minor refactoring 5 лет назад

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.