mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
A bunch of little warning removal and format fix things.
This commit is contained in:
parent
ec76f6e1d2
commit
7d951783ca
16 changed files with 484 additions and 376 deletions
|
@ -11,8 +11,11 @@
|
|||
*/
|
||||
/****/
|
||||
|
||||
// Note that the actual code in C25519.cpp is in the public domain as per
|
||||
// its original license.
|
||||
/*
|
||||
* The code in C25519.cpp is in the public domain rather than being under
|
||||
* ZeroTier's license. Other than ZeroTier shims it contains public domain
|
||||
* C25519/Ed25519 code by D. J. Bernstein and Matthew Dempsky.
|
||||
*/
|
||||
|
||||
#ifndef ZT_C25519_HPP
|
||||
#define ZT_C25519_HPP
|
||||
|
|
|
@ -24,8 +24,8 @@ extern "C" {
|
|||
// These macros make the idiom of passing buffers to outside code via the API work properly even
|
||||
// if the first address of Buf does not overlap with its data field, since the C++ standard does
|
||||
// not absolutely guarantee this.
|
||||
#define _ZT_PTRTOBUF(p) ((ZeroTier::Buf *)( ((uintptr_t)(p)) - ((uintptr_t)&(((ZeroTier::Buf *)0)->unsafeData[0])) ))
|
||||
#define _ZT_BUFTOPTR(b) ((void *)(&((b)->unsafeData[0])))
|
||||
#define ZT_PTRTOBUF(p) ((ZeroTier::Buf *)( ((uintptr_t)(p)) - ((uintptr_t)&(((ZeroTier::Buf *)0)->unsafeData[0])) ))
|
||||
#define ZT_BUFTOPTR(b) ((void *)(&((b)->unsafeData[0])))
|
||||
|
||||
void *ZT_getBuffer()
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ void *ZT_getBuffer()
|
|||
// When this occurs it's either sent back to the pool with Buf's delete operator or
|
||||
// wrapped in a SharedPtr<> to be passed into the core.
|
||||
try {
|
||||
return _ZT_BUFTOPTR(new ZeroTier::Buf());
|
||||
return ZT_BUFTOPTR(new ZeroTier::Buf());
|
||||
} catch (...) {
|
||||
return nullptr; // can only happen on out of memory condition
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ void *ZT_getBuffer()
|
|||
void ZT_freeBuffer(void *b)
|
||||
{
|
||||
if (b)
|
||||
delete _ZT_PTRTOBUF(b);
|
||||
delete ZT_PTRTOBUF(b);
|
||||
}
|
||||
|
||||
struct p_queryResultBase
|
||||
|
@ -74,7 +74,7 @@ void ZT_version(int *major, int *minor, int *revision, int *build)
|
|||
|
||||
enum ZT_ResultCode ZT_Node_new(ZT_Node **node, void *uptr, void *tptr, const struct ZT_Node_Callbacks *callbacks, int64_t now)
|
||||
{
|
||||
*node = (ZT_Node *)0;
|
||||
*node = nullptr;
|
||||
try {
|
||||
*node = reinterpret_cast<ZT_Node *>(new ZeroTier::Node(uptr, tptr, callbacks, now));
|
||||
return ZT_RESULT_OK;
|
||||
|
@ -107,7 +107,7 @@ enum ZT_ResultCode ZT_Node_processWirePacket(
|
|||
volatile int64_t *nextBackgroundTaskDeadline)
|
||||
{
|
||||
try {
|
||||
ZeroTier::SharedPtr< ZeroTier::Buf > buf((isZtBuffer) ? _ZT_PTRTOBUF(packetData) : new ZeroTier::Buf(packetData, packetLength & ZT_BUF_MEM_MASK));
|
||||
ZeroTier::SharedPtr< ZeroTier::Buf > buf((isZtBuffer) ? ZT_PTRTOBUF(packetData) : new ZeroTier::Buf(packetData, packetLength & ZT_BUF_MEM_MASK));
|
||||
return reinterpret_cast<ZeroTier::Node *>(node)->processWirePacket(tptr, now, localSocket, remoteAddress, buf, packetLength, nextBackgroundTaskDeadline);
|
||||
} catch (std::bad_alloc &exc) {
|
||||
return ZT_RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
||||
|
@ -133,7 +133,7 @@ enum ZT_ResultCode ZT_Node_processVirtualNetworkFrame(
|
|||
volatile int64_t *nextBackgroundTaskDeadline)
|
||||
{
|
||||
try {
|
||||
ZeroTier::SharedPtr< ZeroTier::Buf > buf((isZtBuffer) ? _ZT_PTRTOBUF(frameData) : new ZeroTier::Buf(frameData, frameLength & ZT_BUF_MEM_MASK));
|
||||
ZeroTier::SharedPtr< ZeroTier::Buf > buf((isZtBuffer) ? ZT_PTRTOBUF(frameData) : new ZeroTier::Buf(frameData, frameLength & ZT_BUF_MEM_MASK));
|
||||
return reinterpret_cast<ZeroTier::Node *>(node)->processVirtualNetworkFrame(tptr, now, nwid, sourceMac, destMac, etherType, vlanId, buf, frameLength, nextBackgroundTaskDeadline);
|
||||
} catch (std::bad_alloc &exc) {
|
||||
return ZT_RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
*
|
||||
* @param RR Runtime environment to provide for peer lookup, etc.
|
||||
*/
|
||||
ZT_INLINE Credential::VerifyResult verify(const RuntimeEnvironment *RR,void *tPtr) const noexcept { return _verify(RR,tPtr,*this); }
|
||||
ZT_INLINE Credential::VerifyResult verify(const RuntimeEnvironment *RR,void *tPtr) const noexcept { return s_verify(RR, tPtr, *this); }
|
||||
|
||||
static constexpr int marshalSizeMax() noexcept { return ZT_CAPABILITY_MARSHAL_SIZE_MAX; }
|
||||
int marshal(uint8_t data[ZT_CAPABILITY_MARSHAL_SIZE_MAX],bool forSign = false) const noexcept;
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
|
||||
Certificate &operator=(const ZT_Certificate &cert);
|
||||
|
||||
ZT_INLINE Certificate &operator=(const Certificate &cert)
|
||||
ZT_INLINE Certificate &operator=(const Certificate &cert) noexcept
|
||||
{
|
||||
if (likely(&cert != this)) {
|
||||
const ZT_Certificate *const sup = &cert;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
namespace ZeroTier {
|
||||
|
||||
template<typename CRED>
|
||||
static ZT_INLINE Credential::VerifyResult _credVerify(const RuntimeEnvironment *RR,void *tPtr,CRED credential)
|
||||
static ZT_INLINE Credential::VerifyResult p_credVerify(const RuntimeEnvironment *RR,void *tPtr,CRED credential)
|
||||
{
|
||||
uint8_t tmp[ZT_BUF_MEM_SIZE + 16];
|
||||
|
||||
|
@ -66,12 +66,12 @@ static ZT_INLINE Credential::VerifyResult _credVerify(const RuntimeEnvironment *
|
|||
return Credential::VERIFY_BAD_SIGNATURE;
|
||||
}
|
||||
|
||||
Credential::VerifyResult Credential::_verify(const RuntimeEnvironment *const RR,void *tPtr,const RevocationCredential &credential) const { return _credVerify(RR, tPtr, credential); }
|
||||
Credential::VerifyResult Credential::_verify(const RuntimeEnvironment *const RR,void *tPtr,const TagCredential &credential) const { return _credVerify(RR, tPtr, credential); }
|
||||
Credential::VerifyResult Credential::_verify(const RuntimeEnvironment *const RR,void *tPtr,const CapabilityCredential &credential) const { return _credVerify(RR, tPtr, credential); }
|
||||
Credential::VerifyResult Credential::_verify(const RuntimeEnvironment *const RR,void *tPtr,const OwnershipCredential &credential) const { return _credVerify(RR, tPtr, credential); }
|
||||
Credential::VerifyResult Credential::s_verify(const RuntimeEnvironment *RR, void *tPtr, const RevocationCredential &credential) { return p_credVerify(RR, tPtr, credential); }
|
||||
Credential::VerifyResult Credential::s_verify(const RuntimeEnvironment *RR, void *tPtr, const TagCredential &credential) { return p_credVerify(RR, tPtr, credential); }
|
||||
Credential::VerifyResult Credential::s_verify(const RuntimeEnvironment *RR, void *tPtr, const CapabilityCredential &credential) { return p_credVerify(RR, tPtr, credential); }
|
||||
Credential::VerifyResult Credential::s_verify(const RuntimeEnvironment *RR, void *tPtr, const OwnershipCredential &credential) { return p_credVerify(RR, tPtr, credential); }
|
||||
|
||||
Credential::VerifyResult Credential::_verify(const RuntimeEnvironment *const RR,void *tPtr,const MembershipCredential &credential) const
|
||||
Credential::VerifyResult Credential::s_verify(const RuntimeEnvironment *RR, void *tPtr, const MembershipCredential &credential)
|
||||
{
|
||||
// Sanity check network ID.
|
||||
if ((!credential.m_signedBy) || (credential.m_signedBy != Network::controllerFor(credential.m_networkId)))
|
||||
|
|
|
@ -52,11 +52,11 @@ public:
|
|||
};
|
||||
|
||||
protected:
|
||||
VerifyResult _verify(const RuntimeEnvironment *RR,void *tPtr,const MembershipCredential &credential) const;
|
||||
VerifyResult _verify(const RuntimeEnvironment *RR,void *tPtr,const RevocationCredential &credential) const;
|
||||
VerifyResult _verify(const RuntimeEnvironment *RR,void *tPtr,const TagCredential &credential) const;
|
||||
VerifyResult _verify(const RuntimeEnvironment *RR,void *tPtr,const OwnershipCredential &credential) const;
|
||||
VerifyResult _verify(const RuntimeEnvironment *RR,void *tPtr,const CapabilityCredential &credential) const;
|
||||
static VerifyResult s_verify(const RuntimeEnvironment *RR, void *tPtr, const MembershipCredential &credential);
|
||||
static VerifyResult s_verify(const RuntimeEnvironment *RR, void *tPtr, const RevocationCredential &credential);
|
||||
static VerifyResult s_verify(const RuntimeEnvironment *RR, void *tPtr, const TagCredential &credential);
|
||||
static VerifyResult s_verify(const RuntimeEnvironment *RR, void *tPtr, const OwnershipCredential &credential);
|
||||
static VerifyResult s_verify(const RuntimeEnvironment *RR, void *tPtr, const CapabilityCredential &credential);
|
||||
};
|
||||
|
||||
} // namespace ZeroTier
|
||||
|
|
|
@ -30,14 +30,12 @@ class Identity;
|
|||
* This data structure is used for network configurations, node meta-data,
|
||||
* and other open-definition protocol objects.
|
||||
*
|
||||
* If this seems a little odd, it is. It dates back to the very first alpha
|
||||
* versions of ZeroTier and if it were redesigned today we'd use some kind
|
||||
* of simple or standardized binary encoding. Nevertheless it is efficient
|
||||
* and it works so there is no need to change it and break backward
|
||||
* compatibility.
|
||||
* This is technically a binary encoding, but with delimiters chosen so that
|
||||
* it looks like a series of key=value lines of the keys and values are
|
||||
* human-readable strings.
|
||||
*
|
||||
* Use of the append functions is faster than building and then encoding a
|
||||
* dictionary for creating outbound packets.
|
||||
* The fastest way to build a dictionary to send is to use the append
|
||||
* static functions, not to populate and then encode a Dictionary.
|
||||
*/
|
||||
class Dictionary
|
||||
{
|
||||
|
@ -408,7 +406,7 @@ private:
|
|||
{
|
||||
switch (c) {
|
||||
case 0:
|
||||
out.push_back(92); // backslash
|
||||
out.push_back(92);
|
||||
out.push_back(48);
|
||||
break;
|
||||
case 10:
|
||||
|
|
|
@ -11,10 +11,21 @@
|
|||
*/
|
||||
/****/
|
||||
|
||||
// This is glue code to ease the use of the NIST P-384 elliptic curve.
|
||||
|
||||
// Note that the code inside ECC384.cpp is third party code and
|
||||
// is under the BSD 2-clause license rather than ZeroTier's license.
|
||||
/*
|
||||
* The contents of ECC384.cpp are third party code and are licensed under
|
||||
* the BSD 2-clause license.
|
||||
*
|
||||
* The built-in implementation is easy-ecc by Kenneth MacKay and can be found
|
||||
* here: https://github.com/esxgx/easy-ecc
|
||||
*
|
||||
* Our copy is trimmed down with unused stuff removed and also contains a few
|
||||
* ZeroTier shims to implement these function interfaces. Otherwise it is
|
||||
* unmodified from the original. It's a nice and fairly fast portable
|
||||
* implementation that should build everywhere.
|
||||
*
|
||||
* For FIPS-compliant builds this will eventually link against FIPS-compliant
|
||||
* crypto libraries instead of using the built-in version.
|
||||
*/
|
||||
|
||||
#ifndef ZT_ECC384_HPP
|
||||
#define ZT_ECC384_HPP
|
||||
|
|
183
core/LZ4.cpp
183
core/LZ4.cpp
|
@ -70,7 +70,8 @@ FORCE_INLINE void LZ4_resetStream (LZ4_stream_t* streamPtr);
|
|||
#define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2)
|
||||
#define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) /* required as macro for static allocation */
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
uint32_t hashTable[LZ4_HASH_SIZE_U32];
|
||||
uint32_t currentOffset;
|
||||
uint32_t initCheck;
|
||||
|
@ -79,7 +80,8 @@ typedef struct {
|
|||
uint32_t dictSize;
|
||||
} LZ4_stream_t_internal;
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
const uint8_t *externalDict;
|
||||
size_t extDictSize;
|
||||
const uint8_t *prefixEnd;
|
||||
|
@ -87,13 +89,15 @@ typedef struct {
|
|||
} LZ4_streamDecode_t_internal;
|
||||
|
||||
#define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4)
|
||||
union LZ4_stream_u {
|
||||
union LZ4_stream_u
|
||||
{
|
||||
unsigned long long table[LZ4_STREAMSIZE_U64];
|
||||
LZ4_stream_t_internal internal_donotuse;
|
||||
}; /* previously typedef'd to LZ4_stream_t */
|
||||
|
||||
#define LZ4_STREAMDECODESIZE_U64 4
|
||||
union LZ4_streamDecode_u {
|
||||
union LZ4_streamDecode_u
|
||||
{
|
||||
unsigned long long table[LZ4_STREAMDECODESIZE_U64];
|
||||
LZ4_streamDecode_t_internal internal_donotuse;
|
||||
}; /* previously typedef'd to LZ4_streamDecode_t */
|
||||
|
@ -130,11 +134,21 @@ typedef uintptr_t reg_t;
|
|||
#endif
|
||||
|
||||
#if defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS == 2)
|
||||
FORCE_INLINE U16 LZ4_read16(const void* memPtr) { return *(const U16*) memPtr; }
|
||||
FORCE_INLINE U32 LZ4_read32(const void* memPtr) { return *(const U32*) memPtr; }
|
||||
FORCE_INLINE reg_t LZ4_read_ARCH(const void* memPtr) { return *(const reg_t*) memPtr; }
|
||||
FORCE_INLINE void LZ4_write16(void* memPtr, U16 value) { *(U16*)memPtr = value; }
|
||||
FORCE_INLINE void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; }
|
||||
FORCE_INLINE U16 LZ4_read16(const void *memPtr)
|
||||
{ return *(const U16 *)memPtr; }
|
||||
|
||||
FORCE_INLINE U32 LZ4_read32(const void *memPtr)
|
||||
{ return *(const U32 *)memPtr; }
|
||||
|
||||
FORCE_INLINE reg_t LZ4_read_ARCH(const void *memPtr)
|
||||
{ return *(const reg_t *)memPtr; }
|
||||
|
||||
FORCE_INLINE void LZ4_write16(void *memPtr, U16 value)
|
||||
{ *(U16 *)memPtr = value; }
|
||||
|
||||
FORCE_INLINE void LZ4_write32(void *memPtr, U32 value)
|
||||
{ *(U32 *)memPtr = value; }
|
||||
|
||||
#elif defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS == 1)
|
||||
typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) unalign;
|
||||
FORCE_INLINE U16 LZ4_read16(const void* ptr) { return ((const unalign*)ptr)->u16; }
|
||||
|
@ -196,7 +210,12 @@ FORCE_INLINE void LZ4_wildCopy(void* dstPtr, const void* srcPtr, void* dstEnd)
|
|||
BYTE *d = (BYTE *)dstPtr;
|
||||
const BYTE *s = (const BYTE *)srcPtr;
|
||||
BYTE *const e = (BYTE *)dstEnd;
|
||||
do { LZ4_copy8(d,s); d+=8; s+=8; } while (d<e);
|
||||
do {
|
||||
LZ4_copy8(d, s);
|
||||
d += 8;
|
||||
s += 8;
|
||||
}
|
||||
while (d < e);
|
||||
}
|
||||
|
||||
#define MINMATCH 4
|
||||
|
@ -285,13 +304,23 @@ FORCE_INLINE unsigned LZ4_count(const BYTE* pIn, const BYTE* pMatch, const BYTE*
|
|||
|
||||
while (likely(pIn < pInLimit - (STEPSIZE - 1))) {
|
||||
reg_t const diff = LZ4_read_ARCH(pMatch) ^LZ4_read_ARCH(pIn);
|
||||
if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; }
|
||||
if (!diff) {
|
||||
pIn += STEPSIZE;
|
||||
pMatch += STEPSIZE;
|
||||
continue;
|
||||
}
|
||||
pIn += LZ4_NbCommonBytes(diff);
|
||||
return (unsigned)(pIn - pStart);
|
||||
}
|
||||
|
||||
if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; }
|
||||
if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; }
|
||||
if ((STEPSIZE == 8) && (pIn < (pInLimit - 3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) {
|
||||
pIn += 4;
|
||||
pMatch += 4;
|
||||
}
|
||||
if ((pIn < (pInLimit - 1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) {
|
||||
pIn += 2;
|
||||
pMatch += 2;
|
||||
}
|
||||
if ((pIn < pInLimit) && (*pMatch == *pIn)) pIn++;
|
||||
return (unsigned)(pIn - pStart);
|
||||
}
|
||||
|
@ -299,16 +328,35 @@ FORCE_INLINE unsigned LZ4_count(const BYTE* pIn, const BYTE* pMatch, const BYTE*
|
|||
static const int LZ4_64Klimit = ((64 KB) + (MFLIMIT - 1));
|
||||
static const U32 LZ4_skipTrigger = 6; /* Increase this value ==> compression run slower on incompressible data */
|
||||
|
||||
typedef enum { notLimited = 0, limitedOutput = 1 } limitedOutput_directive;
|
||||
typedef enum { byPtr, byU32, byU16 } tableType_t;
|
||||
typedef enum
|
||||
{
|
||||
notLimited = 0, limitedOutput = 1
|
||||
} limitedOutput_directive;
|
||||
typedef enum
|
||||
{
|
||||
byPtr, byU32, byU16
|
||||
} tableType_t;
|
||||
|
||||
typedef enum { noDict = 0, withPrefix64k, usingExtDict } dict_directive;
|
||||
typedef enum { noDictIssue = 0, dictSmall } dictIssue_directive;
|
||||
typedef enum
|
||||
{
|
||||
noDict = 0, withPrefix64k, usingExtDict
|
||||
} dict_directive;
|
||||
typedef enum
|
||||
{
|
||||
noDictIssue = 0, dictSmall
|
||||
} dictIssue_directive;
|
||||
|
||||
typedef enum { endOnOutputSize = 0, endOnInputSize = 1 } endCondition_directive;
|
||||
typedef enum { full = 0, partial = 1 } earlyEnd_directive;
|
||||
typedef enum
|
||||
{
|
||||
endOnOutputSize = 0, endOnInputSize = 1
|
||||
} endCondition_directive;
|
||||
typedef enum
|
||||
{
|
||||
full = 0, partial = 1
|
||||
} earlyEnd_directive;
|
||||
|
||||
FORCE_INLINE int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); }
|
||||
FORCE_INLINE int LZ4_compressBound(int isize)
|
||||
{ return LZ4_COMPRESSBOUND(isize); }
|
||||
|
||||
FORCE_INLINE U32 LZ4_hash4(U32 sequence, tableType_t const tableType)
|
||||
{
|
||||
|
@ -337,11 +385,22 @@ FORCE_INLINE U32 LZ4_hashPosition(const void* const p, tableType_t const tableTy
|
|||
|
||||
FORCE_INLINE void LZ4_putPositionOnHash(const BYTE *p, U32 h, void *tableBase, tableType_t const tableType, const BYTE *srcBase)
|
||||
{
|
||||
switch (tableType)
|
||||
{
|
||||
case byPtr: { const BYTE** hashTable = (const BYTE**)tableBase; hashTable[h] = p; return; }
|
||||
case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = (U32)(p-srcBase); return; }
|
||||
case byU16: { U16* hashTable = (U16*) tableBase; hashTable[h] = (U16)(p-srcBase); return; }
|
||||
switch (tableType) {
|
||||
case byPtr: {
|
||||
const BYTE **hashTable = (const BYTE **)tableBase;
|
||||
hashTable[h] = p;
|
||||
return;
|
||||
}
|
||||
case byU32: {
|
||||
U32 *hashTable = (U32 *)tableBase;
|
||||
hashTable[h] = (U32)(p - srcBase);
|
||||
return;
|
||||
}
|
||||
case byU16: {
|
||||
U16 *hashTable = (U16 *)tableBase;
|
||||
hashTable[h] = (U16)(p - srcBase);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,9 +412,18 @@ FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t ta
|
|||
|
||||
FORCE_INLINE const BYTE *LZ4_getPositionOnHash(U32 h, void *tableBase, tableType_t tableType, const BYTE *srcBase)
|
||||
{
|
||||
if (tableType == byPtr) { const BYTE** hashTable = (const BYTE**) tableBase; return hashTable[h]; }
|
||||
if (tableType == byU32) { const U32* const hashTable = (U32*) tableBase; return hashTable[h] + srcBase; }
|
||||
{ const U16* const hashTable = (U16*) tableBase; return hashTable[h] + srcBase; } /* default, to ensure a return */
|
||||
if (tableType == byPtr) {
|
||||
const BYTE **hashTable = (const BYTE **)tableBase;
|
||||
return hashTable[h];
|
||||
}
|
||||
if (tableType == byU32) {
|
||||
const U32 *const hashTable = (U32 *)tableBase;
|
||||
return hashTable[h] + srcBase;
|
||||
}
|
||||
{
|
||||
const U16 *const hashTable = (U16 *)tableBase;
|
||||
return hashTable[h] + srcBase;
|
||||
} /* default, to ensure a return */
|
||||
}
|
||||
|
||||
FORCE_INLINE const BYTE *LZ4_getPosition(const BYTE *p, void *tableBase, tableType_t tableType, const BYTE *srcBase)
|
||||
|
@ -395,8 +463,7 @@ FORCE_INLINE int LZ4_compress_generic(
|
|||
|
||||
/* Init conditions */
|
||||
if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported inputSize, too large (or negative) */
|
||||
switch(dict)
|
||||
{
|
||||
switch (dict) {
|
||||
case noDict:
|
||||
default:
|
||||
base = (const BYTE *)source;
|
||||
|
@ -416,7 +483,8 @@ FORCE_INLINE int LZ4_compress_generic(
|
|||
|
||||
/* First Byte */
|
||||
LZ4_putPosition(ip, cctx->hashTable, tableType, base);
|
||||
ip++; forwardH = LZ4_hashPosition(ip, tableType);
|
||||
ip++;
|
||||
forwardH = LZ4_hashPosition(ip, tableType);
|
||||
|
||||
/* Main Loop */
|
||||
for (;;) {
|
||||
|
@ -425,7 +493,8 @@ FORCE_INLINE int LZ4_compress_generic(
|
|||
BYTE *token;
|
||||
|
||||
/* Find a match */
|
||||
{ const BYTE* forwardIp = ip;
|
||||
{
|
||||
const BYTE *forwardIp = ip;
|
||||
unsigned step = 1;
|
||||
unsigned searchMatchNb = acceleration << LZ4_skipTrigger;
|
||||
do {
|
||||
|
@ -444,7 +513,8 @@ FORCE_INLINE int LZ4_compress_generic(
|
|||
} else {
|
||||
refDelta = 0;
|
||||
lowLimit = (const BYTE *)source;
|
||||
} }
|
||||
}
|
||||
}
|
||||
forwardH = LZ4_hashPosition(forwardIp, tableType);
|
||||
LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType, base);
|
||||
|
||||
|
@ -454,10 +524,14 @@ FORCE_INLINE int LZ4_compress_generic(
|
|||
}
|
||||
|
||||
/* Catch up */
|
||||
while (((ip>anchor) & (match+refDelta > lowLimit)) && (unlikely(ip[-1]==match[refDelta-1]))) { ip--; match--; }
|
||||
while (((ip > anchor) & (match + refDelta > lowLimit)) && (unlikely(ip[-1] == match[refDelta - 1]))) {
|
||||
ip--;
|
||||
match--;
|
||||
}
|
||||
|
||||
/* Encode Literals */
|
||||
{ unsigned const litLength = (unsigned)(ip - anchor);
|
||||
{
|
||||
unsigned const litLength = (unsigned)(ip - anchor);
|
||||
token = op++;
|
||||
if ((outputLimited) && /* Check output buffer overflow */
|
||||
(unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength / 255) > olimit)))
|
||||
|
@ -467,8 +541,7 @@ FORCE_INLINE int LZ4_compress_generic(
|
|||
*token = (RUN_MASK << ML_BITS);
|
||||
for (; len >= 255; len -= 255) *op++ = 255;
|
||||
*op++ = (BYTE)len;
|
||||
}
|
||||
else *token = (BYTE)(litLength<<ML_BITS);
|
||||
} else *token = (BYTE)(litLength << ML_BITS);
|
||||
|
||||
/* Copy Literals */
|
||||
LZ4_wildCopy(op, anchor, op + litLength);
|
||||
|
@ -477,10 +550,12 @@ FORCE_INLINE int LZ4_compress_generic(
|
|||
|
||||
_next_match:
|
||||
/* Encode Offset */
|
||||
LZ4_writeLE16(op, (U16)(ip-match)); op+=2;
|
||||
LZ4_writeLE16(op, (U16)(ip - match));
|
||||
op += 2;
|
||||
|
||||
/* Encode MatchLength */
|
||||
{ unsigned matchCode;
|
||||
{
|
||||
unsigned matchCode;
|
||||
|
||||
if ((dict == usingExtDict) && (lowLimit == dictionary)) {
|
||||
const BYTE *limit;
|
||||
|
@ -530,12 +605,16 @@ FORCE_INLINE int LZ4_compress_generic(
|
|||
} else {
|
||||
refDelta = 0;
|
||||
lowLimit = (const BYTE *)source;
|
||||
} }
|
||||
}
|
||||
}
|
||||
LZ4_putPosition(ip, cctx->hashTable, tableType, base);
|
||||
if (((dictIssue == dictSmall) ? (match >= lowRefLimit) : 1)
|
||||
&& (match + MAX_DISTANCE >= ip)
|
||||
&& (LZ4_read32(match+refDelta)==LZ4_read32(ip)) )
|
||||
{ token=op++; *token=0; goto _next_match; }
|
||||
&& (LZ4_read32(match + refDelta) == LZ4_read32(ip))) {
|
||||
token = op++;
|
||||
*token = 0;
|
||||
goto _next_match;
|
||||
}
|
||||
|
||||
/* Prepare next loop */
|
||||
forwardH = LZ4_hashPosition(++ip, tableType);
|
||||
|
@ -543,7 +622,8 @@ FORCE_INLINE int LZ4_compress_generic(
|
|||
|
||||
_last_literals:
|
||||
/* Encode Last Literals */
|
||||
{ size_t const lastRun = (size_t)(iend - anchor);
|
||||
{
|
||||
size_t const lastRun = (size_t)(iend - anchor);
|
||||
if ((outputLimited) && /* Check output buffer overflow */
|
||||
((op - (BYTE *)dest) + lastRun + 1 + ((lastRun + 255 - RUN_MASK) / 255) > (U32)maxOutputSize))
|
||||
return 0;
|
||||
|
@ -646,8 +726,7 @@ FORCE_INLINE int LZ4_decompress_generic(
|
|||
/* copy literals */
|
||||
cpy = op + length;
|
||||
if (((endOnInput) && ((cpy > (partialDecoding ? oexit : oend - MFLIMIT)) || (ip + length > iend - (2 + 1 + LASTLITERALS))))
|
||||
|| ((!endOnInput) && (cpy>oend-WILDCOPYLENGTH)) )
|
||||
{
|
||||
|| ((!endOnInput) && (cpy > oend - WILDCOPYLENGTH))) {
|
||||
if (partialDecoding) {
|
||||
if (cpy > oend) goto _output_error; /* Error : write attempt beyond end of output buffer */
|
||||
if ((endOnInput) && (ip + length > iend)) goto _output_error; /* Error : read attempt beyond end of input buffer */
|
||||
|
@ -661,10 +740,12 @@ FORCE_INLINE int LZ4_decompress_generic(
|
|||
break; /* Necessarily EOF, due to parsing restrictions */
|
||||
}
|
||||
LZ4_wildCopy(op, ip, cpy);
|
||||
ip += length; op = cpy;
|
||||
ip += length;
|
||||
op = cpy;
|
||||
|
||||
/* get offset */
|
||||
offset = LZ4_readLE16(ip); ip+=2;
|
||||
offset = LZ4_readLE16(ip);
|
||||
ip += 2;
|
||||
match = op - offset;
|
||||
if ((checkOffset) && (unlikely(match < lowLimit))) goto _output_error; /* Error : offset outside buffers */
|
||||
LZ4_write32(op, (U32)offset); /* costs ~1%; silence an msan warning when offset==0 */
|
||||
|
@ -703,7 +784,8 @@ FORCE_INLINE int LZ4_decompress_generic(
|
|||
} else {
|
||||
Utils::copy(op, lowPrefix, restSize);
|
||||
op += restSize;
|
||||
} }
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -718,7 +800,10 @@ FORCE_INLINE int LZ4_decompress_generic(
|
|||
match += dec32table[offset];
|
||||
Utils::copy< 4 >(op + 4, match);
|
||||
match -= dec64;
|
||||
} else { LZ4_copy8(op, match); match+=8; }
|
||||
} else {
|
||||
LZ4_copy8(op, match);
|
||||
match += 8;
|
||||
}
|
||||
op += 8;
|
||||
|
||||
if (unlikely(cpy > oend - 12)) {
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
#ifndef ZT_CERTIFICATEOFMEMBERSHIP_HPP
|
||||
#define ZT_CERTIFICATEOFMEMBERSHIP_HPP
|
||||
|
||||
// TODO: redo
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
|
@ -179,7 +177,7 @@ public:
|
|||
* @param RR Runtime environment for looking up peers
|
||||
* @param tPtr Thread pointer to be handed through to any callbacks called as a result of this call
|
||||
*/
|
||||
ZT_INLINE Credential::VerifyResult verify(const RuntimeEnvironment *RR,void *tPtr) const { return _verify(RR,tPtr,*this); }
|
||||
ZT_INLINE Credential::VerifyResult verify(const RuntimeEnvironment *RR,void *tPtr) const { return s_verify(RR, tPtr, *this); }
|
||||
|
||||
// NOTE: right now we use v1 serialization format which works with both ZeroTier 1.x and 2.x. V2 format
|
||||
// will be switched on once 1.x is pretty much dead and out of support.
|
||||
|
|
213
core/OS.hpp
213
core/OS.hpp
|
@ -11,31 +11,43 @@
|
|||
*/
|
||||
/****/
|
||||
|
||||
// This include file uses various macros and other tricks to auto-detect, define, and
|
||||
// canonicalize a bunch of macros and types used throughout the ZeroTier core.
|
||||
|
||||
#ifndef ZT_OS_HPP
|
||||
#define ZT_OS_HPP
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
/* Uncomment this to force a whole lot of debug output. */
|
||||
#define ZT_DEBUG_SPEW
|
||||
|
||||
#if !defined(__GNUC__) && (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) || defined(__INTEL_COMPILER) || defined(__clang__))
|
||||
#define __GNUC__ 3
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x06010000
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4290)
|
||||
#pragma warning(disable : 4996)
|
||||
#pragma warning(disable : 4101)
|
||||
#endif
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
#define __WINDOWS__ 1
|
||||
#endif
|
||||
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#ifdef __UNIX_LIKE__
|
||||
#undef __UNIX_LIKE__
|
||||
#endif
|
||||
#ifdef __BSD__
|
||||
#undef __BSD__
|
||||
#endif
|
||||
|
||||
#include <WinSock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <Windows.h>
|
||||
|
@ -43,68 +55,13 @@
|
|||
#include <shlwapi.h>
|
||||
#include <Shlobj.h>
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef SOCKET
|
||||
#define ZT_SOCKET SOCKET
|
||||
#else
|
||||
#define ZT_SOCKET int
|
||||
#endif
|
||||
#ifdef INVALID_SOCKET
|
||||
#define ZT_INVALID_SOCKET INVALID_SOCKET
|
||||
#else
|
||||
#define ZT_INVALID_SOCKET (-1)
|
||||
#endif
|
||||
#endif /* Microsoft Windows */
|
||||
|
||||
#if !defined(__GNUC__) && (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) || defined(__INTEL_COMPILER) || defined(__clang__))
|
||||
#define __GNUC__ 3
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus > 199711L
|
||||
#include <atomic>
|
||||
#ifndef __CPP11__
|
||||
#define __CPP11__
|
||||
#endif
|
||||
#endif
|
||||
#ifndef __CPP11__
|
||||
// Beyond that defining nullptr, constexpr, and noexcept should allow us to still build on these. So far we've
|
||||
// avoided deeper C++11 features like lambdas in the core until we're 100% sure all the ancient targets are gone.
|
||||
#error TODO: to build on pre-c++11 compilers we will need to make a subset of std::atomic for integers
|
||||
#define nullptr (0)
|
||||
#define constexpr ZT_INLINE
|
||||
#define noexcept throw()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef ZT_DEBUG
|
||||
#ifdef __clang__
|
||||
#define ZT_INLINE __attribute__((always_inline)) inline
|
||||
#else
|
||||
#define ZT_INLINE inline
|
||||
#endif
|
||||
#endif
|
||||
#ifndef restrict
|
||||
#define restrict __restrict__
|
||||
#endif
|
||||
#ifndef likely
|
||||
#define likely(x) __builtin_expect((x),1)
|
||||
#endif
|
||||
#ifndef unlikely
|
||||
#define unlikely(x) __builtin_expect((x),0)
|
||||
#endif
|
||||
#else /* not GCC-like */
|
||||
#ifndef restrict
|
||||
#define restrict
|
||||
#endif
|
||||
#ifndef likely
|
||||
#define likely(x) (x)
|
||||
#endif
|
||||
#ifndef unlikely
|
||||
#define unlikely(x) (x)
|
||||
#endif
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if (defined(__amd64) || defined(__amd64__) || defined(__x86_64) || defined(__x86_64__) || defined(__AMD64) || defined(__AMD64__) || defined(_M_X64))
|
||||
#define ZT_ARCH_X64 1
|
||||
|
@ -112,7 +69,6 @@
|
|||
#include <emmintrin.h>
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
|
||||
#if defined(ZT_ARCH_X64) || defined(i386) || defined(__i386) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(_M_IX86) || defined(__X86__) || defined(_X86_) || defined(__I86__) || defined(__INTEL__) || defined(__386)
|
||||
#define ZT_ARCH_X86 1
|
||||
#endif
|
||||
|
@ -123,7 +79,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(ZT_ARCH_ARM_HAS_NEON))
|
||||
#if defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(ZT_ARCH_ARM_HAS_NEON)
|
||||
#if (defined(__APPLE__) && !defined(__LP64__)) || (defined(__ANDROID__) && defined(__arm__))
|
||||
#ifdef ZT_ARCH_ARM_HAS_NEON
|
||||
#undef ZT_ARCH_ARM_HAS_NEON
|
||||
|
@ -132,30 +88,10 @@
|
|||
#ifndef ZT_ARCH_ARM_HAS_NEON
|
||||
#define ZT_ARCH_ARM_HAS_NEON 1
|
||||
#endif
|
||||
#endif
|
||||
#include <arm_neon.h>
|
||||
/*#include <arm_acle.h>*/
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__SIZEOF_INT128__) || ((defined(ZT_ARCH_X64) || defined(__aarch64__)) && defined(__GNUC__))
|
||||
#ifdef __SIZEOF_INT128__
|
||||
#define ZT_HAVE_UINT128 1
|
||||
typedef unsigned __int128 uint128_t;
|
||||
#else
|
||||
#define ZT_HAVE_UINT128 1
|
||||
typedef unsigned uint128_t __attribute__((mode(TI)));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(linux) || defined(__LINUX__) || defined(__linux)
|
||||
#ifndef __LINUX__
|
||||
#define __LINUX__ 1
|
||||
#endif
|
||||
#ifndef __UNIX_LIKE__
|
||||
#define __UNIX_LIKE__ 1
|
||||
#endif
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <TargetConditionals.h>
|
||||
|
@ -173,6 +109,16 @@ typedef unsigned uint128_t __attribute__((mode(TI)));
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(linux) || defined(__LINUX__) || defined(__linux)
|
||||
#ifndef __LINUX__
|
||||
#define __LINUX__ 1
|
||||
#endif
|
||||
#ifndef __UNIX_LIKE__
|
||||
#define __UNIX_LIKE__ 1
|
||||
#endif
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#ifndef __UNIX_LIKE__
|
||||
#define __UNIX_LIKE__ 1
|
||||
|
@ -196,6 +142,81 @@ typedef unsigned uint128_t __attribute__((mode(TI)));
|
|||
#define ZT_EOL_S "\n"
|
||||
#endif
|
||||
|
||||
#ifdef SOCKET
|
||||
#define ZT_SOCKET SOCKET
|
||||
#else
|
||||
#define ZT_SOCKET int
|
||||
#endif
|
||||
#ifdef INVALID_SOCKET
|
||||
#define ZT_INVALID_SOCKET INVALID_SOCKET
|
||||
#else
|
||||
#define ZT_INVALID_SOCKET (-1)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus > 199711L
|
||||
#include <atomic>
|
||||
#ifndef __CPP11__
|
||||
#define __CPP11__ 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Right now we fail if no C++11. The core could be ported to old C++ compilers
|
||||
* if a shim for <atomic> were included. */
|
||||
#ifndef __CPP11__
|
||||
#error TODO: to build on pre-c++11 compilers we will need to make a subset of std::atomic for integers
|
||||
#define nullptr (0)
|
||||
#define constexpr ZT_INLINE
|
||||
#define noexcept throw()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ZT_INLINE
|
||||
#ifdef ZT_DEBUG
|
||||
#define ZT_INLINE
|
||||
#else
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define ZT_INLINE __attribute__((always_inline)) inline
|
||||
#else
|
||||
#define ZT_INLINE inline
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef restrict
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define restrict __restrict__
|
||||
#else
|
||||
#define restrict
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef likely
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define likely(x) __builtin_expect((x),1)
|
||||
#else
|
||||
#define likely(x) x
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef unlikely
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define unlikely(x) __builtin_expect((x),0)
|
||||
#else
|
||||
#define unlikely(x) x
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__SIZEOF_INT128__) || ((defined(ZT_ARCH_X64) || defined(__aarch64__)) && defined(__GNUC__))
|
||||
#ifdef __SIZEOF_INT128__
|
||||
#define ZT_HAVE_UINT128 1
|
||||
typedef unsigned __int128 uint128_t;
|
||||
#else
|
||||
#define ZT_HAVE_UINT128 1
|
||||
typedef unsigned uint128_t __attribute__((mode(TI)));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(__BYTE_ORDER) && defined(__BYTE_ORDER__)
|
||||
#define __BYTE_ORDER __BYTE_ORDER__
|
||||
#define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
|
||||
|
@ -212,17 +233,9 @@ typedef unsigned uint128_t __attribute__((mode(TI)));
|
|||
#define __BIG_ENDIAN _BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#ifndef ZT_INLINE
|
||||
#ifdef ZT_DEBUG
|
||||
#define ZT_INLINE
|
||||
#else
|
||||
#define ZT_INLINE inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define ZT_DEBUG_SPEW
|
||||
#ifdef ZT_DEBUG_SPEW
|
||||
#define ZT_VA_ARGS(...) , ##__VA_ARGS__
|
||||
|
||||
#ifdef ZT_DEBUG_SPEW
|
||||
#define ZT_SPEW(f,...) fprintf(stderr,"%s:%d(%s): " f ZT_EOL_S,__FILE__,__LINE__,__FUNCTION__ ZT_VA_ARGS(__VA_ARGS__))
|
||||
#else
|
||||
#define ZT_SPEW(f,...)
|
||||
|
|
|
@ -127,7 +127,7 @@ public:
|
|||
* @param tPtr That pointer we pass around
|
||||
* @return Credential verification result: OK, bad signature, or identity needed
|
||||
*/
|
||||
ZT_INLINE Credential::VerifyResult verify(const RuntimeEnvironment *RR,void *tPtr) const { return _verify(RR,tPtr,*this); }
|
||||
ZT_INLINE Credential::VerifyResult verify(const RuntimeEnvironment *RR,void *tPtr) const { return s_verify(RR, tPtr, *this); }
|
||||
|
||||
static constexpr int marshalSizeMax() noexcept { return ZT_CERTIFICATEOFOWNERSHIP_MARSHAL_SIZE_MAX; }
|
||||
int marshal(uint8_t data[ZT_CERTIFICATEOFOWNERSHIP_MARSHAL_SIZE_MAX],bool forSign = false) const noexcept;
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
* @param tPtr Thread pointer to be handed through to any callbacks called as a result of this call
|
||||
*/
|
||||
ZT_INLINE Credential::VerifyResult verify(const RuntimeEnvironment *RR, void *tPtr) const noexcept
|
||||
{ return _verify(RR, tPtr, *this); }
|
||||
{ return s_verify(RR, tPtr, *this); }
|
||||
|
||||
static constexpr int marshalSizeMax() noexcept
|
||||
{ return ZT_REVOCATION_MARSHAL_SIZE_MAX; }
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
* @param tPtr Thread pointer to be handed through to any callbacks called as a result of this call
|
||||
*/
|
||||
ZT_INLINE Credential::VerifyResult verify(const RuntimeEnvironment *RR, void *tPtr) const noexcept
|
||||
{ return _verify(RR, tPtr, *this); }
|
||||
{ return s_verify(RR, tPtr, *this); }
|
||||
|
||||
static constexpr int marshalSizeMax() noexcept
|
||||
{ return ZT_TAG_MARSHAL_SIZE_MAX; }
|
||||
|
|
Loading…
Add table
Reference in a new issue