Relicense: GPLv3 -> ZeroTier BSL 1.1

This commit is contained in:
Adam Ierymenko 2019-08-23 09:23:39 -07:00
parent 509da3ac34
commit 52a166a71f
No known key found for this signature in database
GPG key ID: 1657198823E52A61
129 changed files with 1094 additions and 3540 deletions

View file

@ -1,28 +1,15 @@
/*
* ZeroTier One - Network Virtualization Everywhere
* Copyright (C) 2011-2019 ZeroTier, Inc. https://www.zerotier.com/
* Copyright (c)2019 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: 2023-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.
*/
/****/
#ifndef ZT_RINGBUFFER_H
#define ZT_RINGBUFFER_H
@ -40,7 +27,7 @@ namespace ZeroTier {
* A circular buffer
*
* For fast handling of continuously-evolving variables (such as path quality metrics).
* Using this, we can maintain longer sliding historical windows for important path
* Using this, we can maintain longer sliding historical windows for important path
* metrics without the need for potentially expensive calls to memcpy/memmove.
*
* Some basic statistical functionality is implemented here in an attempt
@ -73,7 +60,7 @@ public:
return buf + begin;
}
/**
/**
* Adjust buffer index pointer as if we copied data in
* @param n Number of elements to copy in
* @return Number of elements we copied in
@ -96,13 +83,13 @@ public:
return n;
}
/**
* Fast erase, O(1).
/**
* Fast erase, O(1).
* Merely reset the buffer pointer, doesn't erase contents
*/
inline void reset() { consume(count()); }
/**
/**
* adjust buffer index pointer as if we copied data out
* @param n Number of elements we copied from the buffer
* @return Number of elements actually available from the buffer