diff options
-rw-r--r-- | include/ZeroTierOne.h | 6 | ||||
-rw-r--r-- | node/Node.cpp | 8 | ||||
-rw-r--r-- | node/Node.hpp | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h index 1ed89124..de3c8eda 100644 --- a/include/ZeroTierOne.h +++ b/include/ZeroTierOne.h @@ -607,7 +607,7 @@ typedef int (*ZT1_VirtualNetworkConfigFunction)(ZT1_Node *,uint64_t,enum ZT1_Vir * * This is called whenever the node's status changes in some significant way. */ -typedef void (*ZT1_StatusCallback)(ZT1_Node *,enum ZT1_Event); +typedef void (*ZT1_EventCallback)(ZT1_Node *,enum ZT1_Event); /** * Function to get an object from the data store @@ -683,7 +683,7 @@ typedef void (*ZT1_VirtualNetworkFrameFunction)(ZT1_Node *,uint64_t,uint64_t,uin * @param dataStoreGetFunction Function called to get objects from persistent storage * @param dataStorePutFunction Function called to put objects in persistent storage * @param virtualNetworkConfigFunction Function to be called when virtual LANs are created, deleted, or their config parameters change - * @param statusCallback Function to receive status updates and non-fatal error notices + * @param eventCallback Function to receive status updates and non-fatal error notices * @param overrideRootTopology If not NULL, must contain string-serialize root topology (for testing, default: NULL) * @return OK (0) or error code if a fatal error condition has occurred */ @@ -695,7 +695,7 @@ enum ZT1_ResultCode ZT1_Node_new( ZT1_WirePacketSendFunction wirePacketSendFunction, ZT1_VirtualNetworkFrameFunction virtualNetworkFrameFunction, ZT1_VirtualNetworkConfigFunction virtualNetworkConfigFunction, - ZT1_StatusCallback statusCallback, + ZT1_EventCallback eventCallback, const char *overrideRootTopology = (const char *)0); /** diff --git a/node/Node.cpp b/node/Node.cpp index 236372f2..1f77f727 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -56,7 +56,7 @@ Node::Node( ZT1_WirePacketSendFunction wirePacketSendFunction, ZT1_VirtualNetworkFrameFunction virtualNetworkFrameFunction, ZT1_VirtualNetworkConfigFunction virtualNetworkConfigFunction, - ZT1_StatusCallback statusCallback, + ZT1_EventCallback eventCallback, const char *overrideRootTopology) : RR(new RuntimeEnvironment(this)), _dataStoreGetFunction(dataStoreGetFunction), @@ -64,7 +64,7 @@ Node::Node( _wirePacketSendFunction(wirePacketSendFunction), _virtualNetworkFrameFunction(virtualNetworkFrameFunction), _virtualNetworkConfigFunction(virtualNetworkConfigFunction), - _statusCallback(statusCallback), + _eventCallback(eventCallback), _networks(), _networks_m(), _now(now), @@ -384,12 +384,12 @@ enum ZT1_ResultCode ZT1_Node_new( ZT1_WirePacketSendFunction wirePacketSendFunction, ZT1_VirtualNetworkFrameFunction virtualNetworkFrameFunction, ZT1_VirtualNetworkConfigFunction virtualNetworkConfigFunction, - ZT1_StatusCallback statusCallback, + ZT1_EventCallback eventCallback, const char *overrideRootTopology) { *node = (ZT1_Node *)0; try { - *node = reinterpret_cast<ZT1_Node *>(new ZeroTier::Node(now,dataStoreGetFunction,dataStorePutFunction,wirePacketSendFunction,virtualNetworkFrameFunction,virtualNetworkConfigFunction,statusCallback,overrideRootTopology)); + *node = reinterpret_cast<ZT1_Node *>(new ZeroTier::Node(now,dataStoreGetFunction,dataStorePutFunction,wirePacketSendFunction,virtualNetworkFrameFunction,virtualNetworkConfigFunction,eventCallback,overrideRootTopology)); return ZT1_RESULT_OK; } catch (std::bad_alloc &exc) { return ZT1_RESULT_FATAL_ERROR_OUT_OF_MEMORY; diff --git a/node/Node.hpp b/node/Node.hpp index 2de35fb3..9135b254 100644 --- a/node/Node.hpp +++ b/node/Node.hpp @@ -62,7 +62,7 @@ public: ZT1_WirePacketSendFunction wirePacketSendFunction, ZT1_VirtualNetworkFrameFunction virtualNetworkFrameFunction, ZT1_VirtualNetworkConfigFunction virtualNetworkConfigFunction, - ZT1_StatusCallback statusCallback, + ZT1_EventCallback eventCallback, const char *overrideRootTopology); ~Node(); @@ -171,7 +171,7 @@ public: inline void dataStoreDelete(const char *name) { _dataStorePutFunction(reinterpret_cast<ZT1_Node *>(this),name,(const void *)0,0,0); } std::string dataStoreGet(const char *name); - inline void postEvent(ZT1_Event ev) { _statusCallback(reinterpret_cast<ZT1_Node *>(this),ev); } + inline void postEvent(ZT1_Event ev) { _eventCallback(reinterpret_cast<ZT1_Node *>(this),ev); } inline int configureVirtualNetworkPort(uint64_t nwid,ZT1_VirtualNetworkConfigOperation op,const ZT1_VirtualNetworkConfig *nc) { return _virtualNetworkConfigFunction(reinterpret_cast<ZT1_Node *>(this),nwid,op,nc); } @@ -185,7 +185,7 @@ private: ZT1_WirePacketSendFunction _wirePacketSendFunction; ZT1_VirtualNetworkFrameFunction _virtualNetworkFrameFunction; ZT1_VirtualNetworkConfigFunction _virtualNetworkConfigFunction; - ZT1_StatusCallback _statusCallback; + ZT1_EventCallback _eventCallback; //Dictionary _localConfig; // persisted as local.conf //Mutex _localConfig_m; |