mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 13:24:09 -07:00
Rest -> MPL except controller.
This commit is contained in:
parent
9aff094b6f
commit
f6d52dd96c
57 changed files with 2411 additions and 2371 deletions
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This defines the external C API for ZeroTier's core network virtualization
|
* This defines the external C API for ZeroTier's core network virtualization
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "Arp.hpp"
|
#include "Arp.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_ARP_HPP
|
#ifndef ZT_ARP_HPP
|
||||||
#define ZT_ARP_HPP
|
#define ZT_ARP_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "BSDEthernetTap.hpp"
|
#include "BSDEthernetTap.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_BSDETHERNETTAP_HPP
|
#ifndef ZT_BSDETHERNETTAP_HPP
|
||||||
#define ZT_BSDETHERNETTAP_HPP
|
#define ZT_BSDETHERNETTAP_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2013-2020 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_BINDER_HPP
|
#ifndef ZT_BINDER_HPP
|
||||||
#define ZT_BINDER_HPP
|
#define ZT_BINDER_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_BLOCKINGQUEUE_HPP
|
#ifndef ZT_BLOCKINGQUEUE_HPP
|
||||||
#define ZT_BLOCKINGQUEUE_HPP
|
#define ZT_BLOCKINGQUEUE_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "EthernetTap.hpp"
|
#include "EthernetTap.hpp"
|
||||||
|
|
||||||
|
@ -20,9 +15,9 @@
|
||||||
|
|
||||||
#ifdef ZT_SDK
|
#ifdef ZT_SDK
|
||||||
|
|
||||||
#include "../nonfree/controller/EmbeddedNetworkController.hpp"
|
|
||||||
#include "../include/VirtualTap.hpp"
|
#include "../include/VirtualTap.hpp"
|
||||||
#include "../node/Node.hpp"
|
#include "../node/Node.hpp"
|
||||||
|
#include "../nonfree/controller/EmbeddedNetworkController.hpp"
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_ETHERNETTAP_HPP
|
#ifndef ZT_ETHERNETTAP_HPP
|
||||||
#define ZT_ETHERNETTAP_HPP
|
#define ZT_ETHERNETTAP_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "ExtOsdep.hpp"
|
#include "ExtOsdep.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_EXTOSDEP_HPP
|
#ifndef ZT_EXTOSDEP_HPP
|
||||||
#define ZT_EXTOSDEP_HPP
|
#define ZT_EXTOSDEP_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "Http.hpp"
|
#include "Http.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_HTTP_HPP
|
#ifndef ZT_HTTP_HPP
|
||||||
#define ZT_HTTP_HPP
|
#define ZT_HTTP_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic ignored "-Wrestrict"
|
#pragma GCC diagnostic ignored "-Wrestrict"
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_LINUXETHERNETTAP_HPP
|
#ifndef ZT_LINUXETHERNETTAP_HPP
|
||||||
#define ZT_LINUXETHERNETTAP_HPP
|
#define ZT_LINUXETHERNETTAP_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
#include "../node/Constants.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_LINUX_NETLINK_HPP
|
#ifndef ZT_LINUX_NETLINK_HPP
|
||||||
#define ZT_LINUX_NETLINK_HPP
|
#define ZT_LINUX_NETLINK_HPP
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* (c) ZeroTier, Inc.
|
||||||
|
* https://www.zerotier.com/
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MAC_DNS_HELPER
|
#ifndef MAC_DNS_HELPER
|
||||||
#define MAC_DNS_HELPER
|
#define MAC_DNS_HELPER
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* (c) ZeroTier, Inc.
|
||||||
|
* https://www.zerotier.com/
|
||||||
|
*/
|
||||||
|
|
||||||
#include "MacDNSHelper.hpp"
|
#include "MacDNSHelper.hpp"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
#include "../node/Constants.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_OSXETHERNETTAP_HPP
|
#ifndef ZT_OSXETHERNETTAP_HPP
|
||||||
#define ZT_OSXETHERNETTAP_HPP
|
#define ZT_OSXETHERNETTAP_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This creates a pair of feth devices with the lower numbered device
|
* This creates a pair of feth devices with the lower numbered device
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_MACETHERNETTAPAGENT_H
|
#ifndef ZT_MACETHERNETTAPAGENT_H
|
||||||
#define ZT_MACETHERNETTAPAGENT_H
|
#define ZT_MACETHERNETTAPAGENT_H
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "MacDNSHelper.hpp"
|
#include "MacDNSHelper.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_MacKextEthernetTap_HPP
|
#ifndef ZT_MacKextEthernetTap_HPP
|
||||||
#define ZT_MacKextEthernetTap_HPP
|
#define ZT_MacKextEthernetTap_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
#include "../node/Constants.hpp"
|
||||||
#include "../osdep/OSUtils.hpp"
|
#include "../osdep/OSUtils.hpp"
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_MANAGEDROUTE_HPP
|
#ifndef ZT_MANAGEDROUTE_HPP
|
||||||
#define ZT_MANAGEDROUTE_HPP
|
#define ZT_MANAGEDROUTE_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "NeighborDiscovery.hpp"
|
#include "NeighborDiscovery.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_NEIGHBORDISCOVERY_HPP
|
#ifndef ZT_NEIGHBORDISCOVERY_HPP
|
||||||
#define ZT_NEIGHBORDISCOVERY_HPP
|
#define ZT_NEIGHBORDISCOVERY_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "NetBSDEthernetTap.hpp"
|
#include "NetBSDEthernetTap.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_NetBSDEthernetTap_HPP
|
#ifndef ZT_NetBSDEthernetTap_HPP
|
||||||
#define ZT_NetBSDEthernetTap_HPP
|
#define ZT_NetBSDEthernetTap_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2013-2020 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
#include "../node/Constants.hpp"
|
||||||
#include "../node/Utils.hpp"
|
#include "../node/Utils.hpp"
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2013-2020 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_OSUTILS_HPP
|
#ifndef ZT_OSUTILS_HPP
|
||||||
#define ZT_OSUTILS_HPP
|
#define ZT_OSUTILS_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2013-2020 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_PHY_HPP
|
#ifndef ZT_PHY_HPP
|
||||||
#define ZT_PHY_HPP
|
#define ZT_PHY_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifdef ZT_USE_MINIUPNPC
|
#ifdef ZT_USE_MINIUPNPC
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifdef ZT_USE_MINIUPNPC
|
#ifdef ZT_USE_MINIUPNPC
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_THREAD_HPP
|
#ifndef ZT_THREAD_HPP
|
||||||
#define ZT_THREAD_HPP
|
#define ZT_THREAD_HPP
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* (c) ZeroTier, Inc.
|
||||||
|
* https://www.zerotier.com/
|
||||||
|
*/
|
||||||
|
|
||||||
#include "WinDNSHelper.hpp"
|
#include "WinDNSHelper.hpp"
|
||||||
|
|
||||||
#include <WbemIdl.h>
|
#include <WbemIdl.h>
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* (c) ZeroTier, Inc.
|
||||||
|
* https://www.zerotier.com/
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef WIN_DNS_HELPER_H_
|
#ifndef WIN_DNS_HELPER_H_
|
||||||
#define WIN_DNS_HELPER_H_
|
#define WIN_DNS_HELPER_H_
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* (c) ZeroTier, Inc.
|
||||||
|
* https://www.zerotier.com/
|
||||||
|
*/
|
||||||
|
|
||||||
#include "WinFWHelper.hpp"
|
#include "WinFWHelper.hpp"
|
||||||
|
|
||||||
namespace ZeroTier {
|
namespace ZeroTier {
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* (c) ZeroTier, Inc.
|
||||||
|
* https://www.zerotier.com/
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef WIN_FW_HELPER_H_
|
#ifndef WIN_FW_HELPER_H_
|
||||||
#define WIN_FW_HELPER_H_
|
#define WIN_FW_HELPER_H_
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "WindowsEthernetTap.hpp"
|
#include "WindowsEthernetTap.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_WINDOWSETHERNETTAP_HPP
|
#ifndef ZT_WINDOWSETHERNETTAP_HPP
|
||||||
#define ZT_WINDOWSETHERNETTAP_HPP
|
#define ZT_WINDOWSETHERNETTAP_HPP
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,13 +1,9 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2021 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#![allow(clippy::uninlined_format_args, clippy::missing_safety_doc)]
|
#![allow(clippy::uninlined_format_args, clippy::missing_safety_doc)]
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2023 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pub mod ext;
|
pub mod ext;
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2022 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2021 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use std::ffi::{CStr, CString};
|
use std::ffi::{CStr, CString};
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2021 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#![allow(
|
#![allow(
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2013-2020 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_ONESERVICE_HPP
|
#ifndef ZT_ONESERVICE_HPP
|
||||||
#define ZT_ONESERVICE_HPP
|
#define ZT_ONESERVICE_HPP
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
#include "../node/Constants.hpp"
|
||||||
#include "../version.h"
|
#include "../version.h"
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#ifndef ZT_SOFTWAREUPDATER_HPP
|
#ifndef ZT_SOFTWAREUPDATER_HPP
|
||||||
#define ZT_SOFTWAREUPDATER_HPP
|
#define ZT_SOFTWAREUPDATER_HPP
|
||||||
|
|
|
@ -1,19 +1,9 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* Copyright (C) 2011-2016 ZeroTier, Inc. https://www.zerotier.com/
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* (c) ZeroTier, Inc.
|
||||||
* it under the terms of the GNU General Public License as published by
|
* https://www.zerotier.com/
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// HACK! Will eventually use epoll() or something in Phy<> instead of select().
|
// HACK! Will eventually use epoll() or something in Phy<> instead of select().
|
||||||
|
|
|
@ -1,34 +1,28 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#pragma region Includes
|
#pragma region Includes
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
|
||||||
#include <winsock2.h>
|
|
||||||
#include <windows.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "ZeroTierOneService.h"
|
#include "ZeroTierOneService.h"
|
||||||
|
|
||||||
#include "../../version.h"
|
|
||||||
#include "../../include/ZeroTierOne.h"
|
#include "../../include/ZeroTierOne.h"
|
||||||
|
|
||||||
#include "../../node/Constants.hpp"
|
#include "../../node/Constants.hpp"
|
||||||
#include "../../node/Utils.hpp"
|
#include "../../node/Utils.hpp"
|
||||||
#include "../../osdep/OSUtils.hpp"
|
#include "../../osdep/OSUtils.hpp"
|
||||||
#include "../../service/OneService.hpp"
|
#include "../../service/OneService.hpp"
|
||||||
|
#include "../../version.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <windows.h>
|
||||||
|
#include <winsock2.h>
|
||||||
|
|
||||||
#pragma endregion // Includes
|
#pragma endregion // Includes
|
||||||
|
|
||||||
|
@ -37,9 +31,7 @@ FILE *SVCDBGfile = (FILE *)0;
|
||||||
ZeroTier::Mutex SVCDBGfile_m;
|
ZeroTier::Mutex SVCDBGfile_m;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ZeroTierOneService::ZeroTierOneService() :
|
ZeroTierOneService::ZeroTierOneService() : CServiceBase(ZT_SERVICE_NAME, TRUE, TRUE, FALSE), _service((ZeroTier::OneService*)0)
|
||||||
CServiceBase(ZT_SERVICE_NAME,TRUE,TRUE,FALSE),
|
|
||||||
_service((ZeroTier::OneService *)0)
|
|
||||||
{
|
{
|
||||||
#ifdef ZT_DEBUG_SERVICE
|
#ifdef ZT_DEBUG_SERVICE
|
||||||
SVCDBGfile_m.lock();
|
SVCDBGfile_m.lock();
|
||||||
|
@ -65,8 +57,7 @@ ZeroTierOneService::~ZeroTierOneService(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZeroTierOneService::threadMain()
|
void ZeroTierOneService::threadMain() throw()
|
||||||
throw()
|
|
||||||
{
|
{
|
||||||
ZT_SVCDBG("ZeroTierOneService::threadMain()\r\n");
|
ZT_SVCDBG("ZeroTierOneService::threadMain()\r\n");
|
||||||
|
|
||||||
|
@ -85,7 +76,8 @@ restart_node:
|
||||||
err.append(" (restarting in 5 seconds)");
|
err.append(" (restarting in 5 seconds)");
|
||||||
WriteEventLogEntry(const_cast<PSTR>(err.c_str()), EVENTLOG_ERROR_TYPE);
|
WriteEventLogEntry(const_cast<PSTR>(err.c_str()), EVENTLOG_ERROR_TYPE);
|
||||||
Sleep(5000);
|
Sleep(5000);
|
||||||
} goto restart_node;
|
}
|
||||||
|
goto restart_node;
|
||||||
|
|
||||||
case ZeroTier::OneService::ONE_IDENTITY_COLLISION: {
|
case ZeroTier::OneService::ONE_IDENTITY_COLLISION: {
|
||||||
std::string homeDir(ZeroTier::OneService::platformDefaultHomePath());
|
std::string homeDir(ZeroTier::OneService::platformDefaultHomePath());
|
||||||
|
@ -98,12 +90,14 @@ restart_node:
|
||||||
ZeroTier::OSUtils::rm((homeDir + ZT_PATH_SEPARATOR_S + "identity.secret").c_str());
|
ZeroTier::OSUtils::rm((homeDir + ZT_PATH_SEPARATOR_S + "identity.secret").c_str());
|
||||||
ZeroTier::OSUtils::rm((homeDir + ZT_PATH_SEPARATOR_S + "identity.public").c_str());
|
ZeroTier::OSUtils::rm((homeDir + ZT_PATH_SEPARATOR_S + "identity.public").c_str());
|
||||||
}
|
}
|
||||||
} goto restart_node;
|
}
|
||||||
|
goto restart_node;
|
||||||
|
|
||||||
default: // normal termination
|
default: // normal termination
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch ( ... ) {
|
}
|
||||||
|
catch (...) {
|
||||||
// sanity check, shouldn't happen since Node::run() should catch all its own errors
|
// sanity check, shouldn't happen since Node::run() should catch all its own errors
|
||||||
// could also happen if we're out of memory though!
|
// could also happen if we're out of memory though!
|
||||||
WriteEventLogEntry("unexpected exception (out of memory?) (trying again in 5 seconds)", EVENTLOG_ERROR_TYPE);
|
WriteEventLogEntry("unexpected exception (out of memory?) (trying again in 5 seconds)", EVENTLOG_ERROR_TYPE);
|
||||||
|
@ -124,13 +118,15 @@ void ZeroTierOneService::OnStart(DWORD dwArgc, PSTR *lpszArgv)
|
||||||
|
|
||||||
if ((dwArgc > 1) && (lpszArgv[1]) && (strlen(lpszArgv[1]) > 0)) {
|
if ((dwArgc > 1) && (lpszArgv[1]) && (strlen(lpszArgv[1]) > 0)) {
|
||||||
this->_path = lpszArgv[1];
|
this->_path = lpszArgv[1];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
this->_path = ZeroTier::OneService::platformDefaultHomePath();
|
this->_path = ZeroTier::OneService::platformDefaultHomePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_thread = ZeroTier::Thread::start(this);
|
_thread = ZeroTier::Thread::start(this);
|
||||||
} catch ( ... ) {
|
}
|
||||||
|
catch (...) {
|
||||||
throw (DWORD)ERROR_EXCEPTION_IN_SERVICE;
|
throw (DWORD)ERROR_EXCEPTION_IN_SERVICE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,22 @@
|
||||||
/*
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* Copyright (c)2019 ZeroTier, Inc.
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* Use of this software is governed by the Business Source License included
|
* (c) ZeroTier, Inc.
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* https://www.zerotier.com/
|
||||||
*
|
|
||||||
* Change Date: 2026-01-01
|
|
||||||
*
|
|
||||||
* On the date above, in accordance with the Business Source License, use
|
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
|
||||||
*/
|
*/
|
||||||
/****/
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "ServiceBase.h"
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "../../node/Mutex.hpp"
|
#include "../../node/Mutex.hpp"
|
||||||
#include "../../osdep/Thread.hpp"
|
#include "../../osdep/Thread.hpp"
|
||||||
#include "../../service/OneService.hpp"
|
#include "../../service/OneService.hpp"
|
||||||
|
#include "ServiceBase.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
// Uncomment to make debugging Windows services suck slightly less hard.
|
// Uncomment to make debugging Windows services suck slightly less hard.
|
||||||
// #define ZT_DEBUG_SERVICE "C:\\ZeroTierOneServiceDebugLog.txt"
|
// #define ZT_DEBUG_SERVICE "C:\\ZeroTierOneServiceDebugLog.txt"
|
||||||
|
@ -31,9 +24,17 @@
|
||||||
#ifdef ZT_DEBUG_SERVICE
|
#ifdef ZT_DEBUG_SERVICE
|
||||||
extern FILE* SVCDBGfile;
|
extern FILE* SVCDBGfile;
|
||||||
extern ZeroTier::Mutex SVCDBGfile_m;
|
extern ZeroTier::Mutex SVCDBGfile_m;
|
||||||
#define ZT_SVCDBG(f,...) { SVCDBGfile_m.lock(); fprintf(SVCDBGfile,f,##__VA_ARGS__); fflush(SVCDBGfile); SVCDBGfile_m.unlock(); }
|
#define ZT_SVCDBG(f, ...) \
|
||||||
|
{ \
|
||||||
|
SVCDBGfile_m.lock(); \
|
||||||
|
fprintf(SVCDBGfile, f, ##__VA_ARGS__); \
|
||||||
|
fflush(SVCDBGfile); \
|
||||||
|
SVCDBGfile_m.unlock(); \
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#define ZT_SVCDBG(f,...) {}
|
#define ZT_SVCDBG(f, ...) \
|
||||||
|
{ \
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ZT_SERVICE_NAME "ZeroTierOneService"
|
#define ZT_SERVICE_NAME "ZeroTierOneService"
|
||||||
|
@ -44,8 +45,7 @@ extern ZeroTier::Mutex SVCDBGfile_m;
|
||||||
#define ZT_SERVICE_ACCOUNT NULL
|
#define ZT_SERVICE_ACCOUNT NULL
|
||||||
#define ZT_SERVICE_PASSWORD NULL
|
#define ZT_SERVICE_PASSWORD NULL
|
||||||
|
|
||||||
class ZeroTierOneService : public CServiceBase
|
class ZeroTierOneService : public CServiceBase {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
ZeroTierOneService();
|
ZeroTierOneService();
|
||||||
virtual ~ZeroTierOneService(void);
|
virtual ~ZeroTierOneService(void);
|
||||||
|
@ -53,8 +53,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Thread main method; do not call elsewhere
|
* Thread main method; do not call elsewhere
|
||||||
*/
|
*/
|
||||||
void threadMain()
|
void threadMain() throw();
|
||||||
throw();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnStart(DWORD dwArgc, PSTR* pszArgv);
|
virtual void OnStart(DWORD dwArgc, PSTR* pszArgv);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue