mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Expose world ID and world timestamp in ZT_NodeStatus
This commit is contained in:
parent
71348f3ebb
commit
70d8e3ad94
2 changed files with 12 additions and 0 deletions
|
@ -275,6 +275,16 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
uint64_t address;
|
uint64_t address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Current world ID
|
||||||
|
*/
|
||||||
|
uint64_t worldId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Current world revision/timestamp
|
||||||
|
*/
|
||||||
|
uint64_t worldTimestamp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Public identity in string-serialized form (safe to send to others)
|
* Public identity in string-serialized form (safe to send to others)
|
||||||
*
|
*
|
||||||
|
|
|
@ -345,6 +345,8 @@ uint64_t Node::address() const
|
||||||
void Node::status(ZT_NodeStatus *status) const
|
void Node::status(ZT_NodeStatus *status) const
|
||||||
{
|
{
|
||||||
status->address = RR->identity.address().toInt();
|
status->address = RR->identity.address().toInt();
|
||||||
|
status->worldId = RR->topology->worldId();
|
||||||
|
status->worldTimestamp = RR->topology->worldTimestamp();
|
||||||
status->publicIdentity = RR->publicIdentityStr.c_str();
|
status->publicIdentity = RR->publicIdentityStr.c_str();
|
||||||
status->secretIdentity = RR->secretIdentityStr.c_str();
|
status->secretIdentity = RR->secretIdentityStr.c_str();
|
||||||
status->online = _online ? 1 : 0;
|
status->online = _online ? 1 : 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue