mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-03-10 22:44:21 +00:00
build fixes.
This commit is contained in:
parent
f4fd2d4971
commit
5f351f2f6b
@ -75,7 +75,7 @@ Node::Node(
|
|||||||
RR->prng = new CMWC4096();
|
RR->prng = new CMWC4096();
|
||||||
RR->sw = new Switch(RR);
|
RR->sw = new Switch(RR);
|
||||||
RR->mc = new Multicaster(RR);
|
RR->mc = new Multicaster(RR);
|
||||||
RR->antiRec = new AntiRecursion(RR);
|
RR->antiRec = new AntiRecursion();
|
||||||
RR->topology = new Topology(RR);
|
RR->topology = new Topology(RR);
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
delete RR->topology;
|
delete RR->topology;
|
||||||
@ -125,7 +125,7 @@ ZT1_ResultCode Node::processVirtualNetworkFrame(
|
|||||||
_now = now;
|
_now = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZT1_Resultcode Node::processNothing(uint64_t now,uint64_t *nextCallDeadline)
|
ZT1_ResultCode Node::processNothing(uint64_t now,uint64_t *nextCallDeadline)
|
||||||
{
|
{
|
||||||
_now = now;
|
_now = now;
|
||||||
}
|
}
|
||||||
@ -149,11 +149,11 @@ ZT1_ResultCode Node::leave(uint64_t nwid)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ZT1_ResultCode Node::multicastSubscribe(ZT1_Node *node,uint64_t nwid,uint64_t multicastGroup,unsigned long multicastAdi)
|
ZT1_ResultCode Node::multicastSubscribe(uint64_t nwid,uint64_t multicastGroup,unsigned long multicastAdi)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ZT1_ResultCode Node::multicastUnsubscribe(ZT1_Node *node,uint64_t nwid,uint64_t multicastGroup,unsigned long multicastAdi)
|
ZT1_ResultCode Node::multicastUnsubscribe(uint64_t nwid,uint64_t multicastGroup,unsigned long multicastAdi)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,20 +273,20 @@ enum ZT1_ResultCode ZT1_Node_processVirtualNetworkFrame(
|
|||||||
try {
|
try {
|
||||||
return reinterpret_cast<ZeroTier::Node *>(node)->processVirtualNetworkFrame(now,nwid,sourceMac,destMac,etherType,vlanId,frameData,frameLength,nextCallDeadline);
|
return reinterpret_cast<ZeroTier::Node *>(node)->processVirtualNetworkFrame(now,nwid,sourceMac,destMac,etherType,vlanId,frameData,frameLength,nextCallDeadline);
|
||||||
} catch (std::bad_alloc &exc) {
|
} catch (std::bad_alloc &exc) {
|
||||||
return ZT1_RESULT_ERROR_OUT_OF_MEMORY;
|
return ZT1_RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
return ZT1_RESULT_ERROR_INTERNAL;
|
return ZT1_RESULT_FATAL_ERROR_INTERNAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ZT1_Resultcode ZT1_Node_processNothing(ZT1_Node *node,uint64_t now,uint64_t *nextCallDeadline)
|
enum ZT1_ResultCode ZT1_Node_processNothing(ZT1_Node *node,uint64_t now,uint64_t *nextCallDeadline)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return reinterpret_cast<ZeroTier::Node *>(node)->processNothing(now,nextCallDeadline);
|
return reinterpret_cast<ZeroTier::Node *>(node)->processNothing(now,nextCallDeadline);
|
||||||
} catch (std::bad_alloc &exc) {
|
} catch (std::bad_alloc &exc) {
|
||||||
return ZT1_RESULT_ERROR_OUT_OF_MEMORY;
|
return ZT1_RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
return ZT1_RESULT_ERROR_INTERNAL;
|
return ZT1_RESULT_FATAL_ERROR_INTERNAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,9 +295,9 @@ enum ZT1_ResultCode ZT1_Node_join(ZT1_Node *node,uint64_t nwid)
|
|||||||
try {
|
try {
|
||||||
return reinterpret_cast<ZeroTier::Node *>(node)->join(nwid);
|
return reinterpret_cast<ZeroTier::Node *>(node)->join(nwid);
|
||||||
} catch (std::bad_alloc &exc) {
|
} catch (std::bad_alloc &exc) {
|
||||||
return ZT1_RESULT_ERROR_OUT_OF_MEMORY;
|
return ZT1_RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
return ZT1_RESULT_ERROR_INTERNAL;
|
return ZT1_RESULT_FATAL_ERROR_INTERNAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,9 +306,9 @@ enum ZT1_ResultCode ZT1_Node_leave(ZT1_Node *node,uint64_t nwid)
|
|||||||
try {
|
try {
|
||||||
return reinterpret_cast<ZeroTier::Node *>(node)->leave(nwid);
|
return reinterpret_cast<ZeroTier::Node *>(node)->leave(nwid);
|
||||||
} catch (std::bad_alloc &exc) {
|
} catch (std::bad_alloc &exc) {
|
||||||
return ZT1_RESULT_ERROR_OUT_OF_MEMORY;
|
return ZT1_RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
return ZT1_RESULT_ERROR_INTERNAL;
|
return ZT1_RESULT_FATAL_ERROR_INTERNAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,9 +317,9 @@ enum ZT1_ResultCode ZT1_Node_multicastSubscribe(ZT1_Node *node,uint64_t nwid,uin
|
|||||||
try {
|
try {
|
||||||
return reinterpret_cast<ZeroTier::Node *>(node)->multicastSubscribe(nwid,multicastGroup,multicastAdi);
|
return reinterpret_cast<ZeroTier::Node *>(node)->multicastSubscribe(nwid,multicastGroup,multicastAdi);
|
||||||
} catch (std::bad_alloc &exc) {
|
} catch (std::bad_alloc &exc) {
|
||||||
return ZT1_RESULT_ERROR_OUT_OF_MEMORY;
|
return ZT1_RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
return ZT1_RESULT_ERROR_INTERNAL;
|
return ZT1_RESULT_FATAL_ERROR_INTERNAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,9 +328,9 @@ enum ZT1_ResultCode ZT1_Node_multicastUnsubscribe(ZT1_Node *node,uint64_t nwid,u
|
|||||||
try {
|
try {
|
||||||
return reinterpret_cast<ZeroTier::Node *>(node)->multicastUnsubscribe(nwid,multicastGroup,multicastAdi);
|
return reinterpret_cast<ZeroTier::Node *>(node)->multicastUnsubscribe(nwid,multicastGroup,multicastAdi);
|
||||||
} catch (std::bad_alloc &exc) {
|
} catch (std::bad_alloc &exc) {
|
||||||
return ZT1_RESULT_ERROR_OUT_OF_MEMORY;
|
return ZT1_RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
return ZT1_RESULT_ERROR_INTERNAL;
|
return ZT1_RESULT_FATAL_ERROR_INTERNAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,12 +388,12 @@ void ZT1_version(int *major,int *minor,int *revision,unsigned long *featureFlags
|
|||||||
if (minor) *minor = ZEROTIER_ONE_VERSION_MINOR;
|
if (minor) *minor = ZEROTIER_ONE_VERSION_MINOR;
|
||||||
if (revision) *revision = ZEROTIER_ONE_VERSION_REVISION;
|
if (revision) *revision = ZEROTIER_ONE_VERSION_REVISION;
|
||||||
if (featureFlags) {
|
if (featureFlags) {
|
||||||
*featureFlags =
|
*featureFlags = (
|
||||||
ZT1_FEATURE_FLAG_THREAD_SAFE |
|
ZT1_FEATURE_FLAG_THREAD_SAFE
|
||||||
#ifdef ZT_OFFICIAL_BUILD
|
#ifdef ZT_OFFICIAL_BUILD
|
||||||
ZT1_FEATURE_FLAG_OFFICIAL
|
| ZT1_FEATURE_FLAG_OFFICIAL
|
||||||
#endif
|
#endif
|
||||||
;
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,8 +88,8 @@ public:
|
|||||||
ZT1_ResultCode processNothing(uint64_t now,uint64_t *nextCallDeadline);
|
ZT1_ResultCode processNothing(uint64_t now,uint64_t *nextCallDeadline);
|
||||||
ZT1_ResultCode join(uint64_t nwid);
|
ZT1_ResultCode join(uint64_t nwid);
|
||||||
ZT1_ResultCode leave(uint64_t nwid);
|
ZT1_ResultCode leave(uint64_t nwid);
|
||||||
ZT1_ResultCode multicastSubscribe(ZT1_Node *node,uint64_t nwid,uint64_t multicastGroup,unsigned long multicastAdi = 0);
|
ZT1_ResultCode multicastSubscribe(uint64_t nwid,uint64_t multicastGroup,unsigned long multicastAdi);
|
||||||
ZT1_ResultCode multicastUnsubscribe(ZT1_Node *node,uint64_t nwid,uint64_t multicastGroup,unsigned long multicastAdi = 0);
|
ZT1_ResultCode multicastUnsubscribe(uint64_t nwid,uint64_t multicastGroup,unsigned long multicastAdi);
|
||||||
void status(ZT1_NodeStatus *status);
|
void status(ZT1_NodeStatus *status);
|
||||||
ZT1_PeerList *peers();
|
ZT1_PeerList *peers();
|
||||||
ZT1_VirtualNetworkConfig *networkConfig(uint64_t nwid);
|
ZT1_VirtualNetworkConfig *networkConfig(uint64_t nwid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user