Fix netif IPv6 handling, misc cleanup, license update from GPL-3 to BSL 1.1

This commit is contained in:
Joseph Henry
2020-04-13 23:38:06 -07:00
parent 50960b15b3
commit 51dfa84ba9
24 changed files with 506 additions and 1020 deletions

View File

@@ -1,28 +1,15 @@
/*
* ZeroTier SDK - Network Virtualization Everywhere
* Copyright (C) 2011-2019 ZeroTier, Inc. https://www.zerotier.com/
* Copyright (c)2013-2020 ZeroTier, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file in the project's root directory.
*
* 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.
* Change Date: 2024-01-01
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* --
*
* You can be released from the requirements of the license by purchasing
* a commercial license. Buying such a license is mandatory as soon as you
* develop commercial closed-source software that incorporates or links
* directly against ZeroTier software without disclosing the source code
* of your own application.
* 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
@@ -33,21 +20,32 @@
#ifndef ZEROTIER_CONSTANTS_H
#define ZEROTIER_CONSTANTS_H
#ifdef __cplusplus
extern "C" {
#endif
// Custom errno to prevent conflicts with platform's own errno
extern int zts_errno;
#ifdef __cplusplus
}
#endif
//////////////////////////////////////////////////////////////////////////////
// Control API error codes //
//////////////////////////////////////////////////////////////////////////////
// Everything is ok
// No error.
#define ZTS_ERR_OK 0
// A argument provided by the user application is invalid (e.g. out of range, NULL, etc)
// A argument provided is invalid (e.g. out of range, NULL, etc)
#define ZTS_ERR_INVALID_ARG -1
// The service isn't initialized or is for some reason currently unavailable. Try again.
// The service isn't initialized or is currently unavailable. Try again.
#define ZTS_ERR_SERVICE -2
// For some reason this API operation is not permitted or doesn't make sense at this time.
// This API operation is not permitted or doesn't make sense at this time.
#define ZTS_ERR_INVALID_OP -3
// The call succeeded, but no object or relevant result was available
// The call succeeded, but no object or relevant result was available.
#define ZTS_ERR_NO_RESULT -4
// General internal failure
// General internal failure. Consider filing a bug report.
#define ZTS_ERR_GENERAL -5
/**