mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-29 15:43:52 +00:00
Add new verb names, and fix some Mac compiler flags.
This commit is contained in:
parent
789046ca57
commit
0d0039674f
@ -58,8 +58,8 @@ ifeq ($(ZT_DEBUG),1)
|
||||
# C25519 in particular is almost UNUSABLE in heavy testing without it.
|
||||
ext/lz4/lz4.o node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CFLAGS = -Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
|
||||
else
|
||||
CFLAGS?=-O3 -fstack-protector
|
||||
CFLAGS+=$(ARCH_FLAGS) -Wall -flto -fPIE -fvectorize -pthread -mmacosx-version-min=10.7 -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
|
||||
CFLAGS?=-Ofast -fstack-protector
|
||||
CFLAGS+=$(ARCH_FLAGS) -Wall -flto -fPIE -pthread -mmacosx-version-min=10.7 -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
|
||||
STRIP=strip
|
||||
endif
|
||||
|
||||
|
@ -31,6 +31,8 @@ namespace ZeroTier {
|
||||
|
||||
const unsigned char Packet::ZERO_KEY[32] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
|
||||
#ifdef ZT_TRACE
|
||||
|
||||
const char *Packet::verbString(Verb v)
|
||||
throw()
|
||||
{
|
||||
@ -52,6 +54,8 @@ const char *Packet::verbString(Verb v)
|
||||
case VERB_MULTICAST_FRAME: return "MULTICAST_FRAME";
|
||||
case VERB_SET_EPHEMERAL_KEY: return "SET_EPHEMERAL_KEY";
|
||||
case VERB_PUSH_DIRECT_PATHS: return "PUSH_DIRECT_PATHS";
|
||||
case VERB_CIRCUIT_TEST: return "CIRCUIT_TEST";
|
||||
case VERB_CIRCUIT_TEST_REPORT: return "CIRCUIT_TEST_REPORT";
|
||||
}
|
||||
return "(unknown)";
|
||||
}
|
||||
@ -73,6 +77,8 @@ const char *Packet::errorString(ErrorCode e)
|
||||
return "(unknown)";
|
||||
}
|
||||
|
||||
#endif // ZT_TRACE
|
||||
|
||||
void Packet::armor(const void *key,bool encryptPayload)
|
||||
{
|
||||
unsigned char mangledKey[32];
|
||||
|
@ -1105,19 +1105,12 @@ public:
|
||||
ERROR_UNWANTED_MULTICAST = 8
|
||||
};
|
||||
|
||||
/**
|
||||
* @param v Verb
|
||||
* @return String representation (e.g. HELLO, OK)
|
||||
*/
|
||||
#ifdef ZT_TRACE
|
||||
static const char *verbString(Verb v)
|
||||
throw();
|
||||
|
||||
/**
|
||||
* @param e Error code
|
||||
* @return String error name
|
||||
*/
|
||||
static const char *errorString(ErrorCode e)
|
||||
throw();
|
||||
#endif
|
||||
|
||||
template<unsigned int C2>
|
||||
Packet(const Buffer<C2> &b) :
|
||||
|
Loading…
x
Reference in New Issue
Block a user