summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-02 17:54:56 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-02 17:54:56 -0700
commita69e1876f10266e5578be0a469ae7498f705fe96 (patch)
tree0a1e7e3a0b88ce21ca12ea2f0ccd1ebbfacdab51 /include
parent5f51653f9c1f0de3091cb2df0ed25fc28e865aa4 (diff)
downloadinfinitytier-a69e1876f10266e5578be0a469ae7498f705fe96.tar.gz
infinitytier-a69e1876f10266e5578be0a469ae7498f705fe96.zip
The concept of link desperation (escalating to less desirable transports) simplifies a ton of stuff. Loads of spaghetti logic can die since we no longer have to make these decisions down in the core.
Diffstat (limited to 'include')
-rw-r--r--include/ZeroTierOne.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h
index f7e95296..90f92b4a 100644
--- a/include/ZeroTierOne.h
+++ b/include/ZeroTierOne.h
@@ -144,19 +144,17 @@ enum ZT1_ResultCode
enum ZT1_NodeStatusCode
{
/**
- * Node is online
+ * Node is offline -- nothing is reachable
*/
- ZT1_NODE_STATUS_ONLINE = 1,
+ ZT1_NODE_STATUS_OFFLINE = 0,
/**
- * Node is offline -- nothing is reachable
+ * Node is online -- at least one upstream is reachable
*/
- ZT1_NODE_STATUS_OFFLINE = 2,
+ ZT1_NODE_STATUS_ONLINE = 1,
/**
- * The desperation level has changed
- *
- * 'extra' will point to an int containing the new level.
+ * Link desperation level has changed
*/
ZT1_NODE_STATUS_DESPERATION_CHANGE = 3
};
@@ -407,12 +405,12 @@ typedef struct
} ZT1_PeerPhysicalPath;
/**
- * What trust hierarchy role does this device have?
+ * What trust hierarchy role does this peer have?
*/
enum ZT1_PeerRole {
- ZT1_PEER_ROLE_SUPERNODE = 0, // planetary supernode
+ ZT1_PEER_ROLE_NODE = 0 // ordinary node
ZT1_PEER_ROLE_HUB = 1, // locally federated hub
- ZT1_PEER_ROLE_NODE = 2 // ordinary node
+ ZT1_PEER_ROLE_SUPERNODE = 2, // planetary supernode
};
/**