From a69e1876f10266e5578be0a469ae7498f705fe96 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 2 Apr 2015 17:54:56 -0700 Subject: 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. --- include/ZeroTierOne.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'include') 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 }; /** -- cgit v1.2.3