summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2014-10-19 12:56:39 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2014-10-19 12:56:39 -0700
commit74f36f5dc0a8e81a53cfeb86c64db4bb9c23fe30 (patch)
tree84bd7a508a5046eaa1e1cf37dfba6941908ff0b0 /include
parent2eeb3dee9e525ef5fd1f3ad2049e4b4cb9cdef0d (diff)
downloadinfinitytier-74f36f5dc0a8e81a53cfeb86c64db4bb9c23fe30.tar.gz
infinitytier-74f36f5dc0a8e81a53cfeb86c64db4bb9c23fe30.zip
Windows build fixes.
Diffstat (limited to 'include')
-rw-r--r--include/ZeroTierOne.h74
1 files changed, 47 insertions, 27 deletions
diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h
index 2474a3a0..0a7c7984 100644
--- a/include/ZeroTierOne.h
+++ b/include/ZeroTierOne.h
@@ -96,6 +96,16 @@ struct ZT1_Node_Status
};
/**
+ * Physical address type
+ */
+enum ZT1_Node_PhysicalAddressType {
+ ZT1_Node_PhysicalAddress_TYPE_NULL = 0, /* none/invalid */
+ ZT1_Node_PhysicalAddress_TYPE_IPV4 = 1, /* 32-bit IPv4 address (and port) */
+ ZT1_Node_PhysicalAddress_TYPE_IPV6 = 2, /* 128-bit IPv6 address (and port) */
+ ZT1_Node_PhysicalAddress_TYPE_ETHERNET = 3 /* 48-bit Ethernet MAC address */
+};
+
+/**
* Physical address result buffer
*/
struct ZT1_Node_PhysicalAddress
@@ -103,12 +113,7 @@ struct ZT1_Node_PhysicalAddress
/**
* Physical address type
*/
- enum {
- ZT1_Node_PhysicalAddress_TYPE_NULL = 0, /* none/invalid */
- ZT1_Node_PhysicalAddress_TYPE_IPV4 = 1, /* 32-bit IPv4 address (and port) */
- ZT1_Node_PhysicalAddress_TYPE_IPV6 = 2, /* 128-bit IPv6 address (and port) */
- ZT1_Node_PhysicalAddress_TYPE_ETHERNET = 3 /* 48-bit Ethernet MAC address */
- } type;
+ enum ZT1_Node_PhysicalAddressType type;
/**
* Address in raw binary form -- length depends on type
@@ -132,6 +137,17 @@ struct ZT1_Node_PhysicalAddress
};
/**
+ * Physical path type
+ */
+enum ZT1_Node_PhysicalPathType { /* These must be numerically the same as type in Path.hpp */
+ ZT1_Node_PhysicalPath_TYPE_NULL = 0, /* none/invalid */
+ ZT1_Node_PhysicalPath_TYPE_UDP = 1, /* UDP association */
+ ZT1_Node_PhysicalPath_TYPE_TCP_OUT = 2, /* outgoing TCP tunnel using pseudo-SSL */
+ ZT1_Node_PhysicalPath_TYPE_TCP_IN = 3, /* incoming TCP tunnel using pseudo-SSL */
+ ZT1_Node_PhysicalPath_TYPE_ETHERNET = 4 /* raw ethernet frames over trusted backplane */
+};
+
+/**
* Network path result buffer
*/
struct ZT1_Node_PhysicalPath
@@ -139,13 +155,7 @@ struct ZT1_Node_PhysicalPath
/**
* Physical path type
*/
- enum { /* These must be numerically the same as type in Path.hpp */
- ZT1_Node_PhysicalPath_TYPE_NULL = 0, /* none/invalid */
- ZT1_Node_PhysicalPath_TYPE_UDP = 1, /* UDP association */
- ZT1_Node_PhysicalPath_TYPE_TCP_OUT = 2, /* outgoing TCP tunnel using pseudo-SSL */
- ZT1_Node_PhysicalPath_TYPE_TCP_IN = 3, /* incoming TCP tunnel using pseudo-SSL */
- ZT1_Node_PhysicalPath_TYPE_ETHERNET = 4 /* raw ethernet frames over trusted backplane */
- } type;
+ enum ZT1_Node_PhysicalPathType type;
/**
* Physical address of endpoint
@@ -179,6 +189,15 @@ struct ZT1_Node_PhysicalPath
};
/**
+ * What trust hierarchy role does this device have?
+ */
+enum ZT1_Node_PeerRole {
+ ZT1_Node_Peer_SUPERNODE = 0, // planetary supernode
+ ZT1_Node_Peer_HUB = 1, // locally federated hub (coming soon)
+ ZT1_Node_Peer_NODE = 2 // ordinary node
+};
+
+/**
* Peer status result buffer
*/
struct ZT1_Node_Peer
@@ -206,11 +225,7 @@ struct ZT1_Node_Peer
/**
* What trust hierarchy role does this device have?
*/
- enum {
- ZT1_Node_Peer_SUPERNODE = 0, // planetary supernode
- ZT1_Node_Peer_HUB = 1, // locally federated hub (coming soon)
- ZT1_Node_Peer_NODE = 2 // ordinary node
- } role;
+ enum ZT1_Node_PeerRole role;
/**
* Array of network paths to peer
@@ -233,6 +248,19 @@ struct ZT1_Node_PeerList
};
/**
+ * Network status code
+ */
+enum ZT1_Node_NetworkStatus {
+ ZT1_Node_Network_INITIALIZING = 0,
+ ZT1_Node_Network_WAITING_FOR_FIRST_AUTOCONF = 1,
+ ZT1_Node_Network_OK = 2,
+ ZT1_Node_Network_ACCESS_DENIED = 3,
+ ZT1_Node_Network_NOT_FOUND = 4,
+ ZT1_Node_Network_INITIALIZATION_FAILED = 5,
+ ZT1_Node_Network_NO_MORE_DEVICES = 6
+};
+
+/**
* Network status result buffer
*/
struct ZT1_Node_Network
@@ -299,15 +327,7 @@ struct ZT1_Node_Network
/**
* Network status code
*/
- enum { /* Must be same as Status in Network.hpp */
- ZT1_Node_Network_INITIALIZING = 0,
- ZT1_Node_Network_WAITING_FOR_FIRST_AUTOCONF = 1,
- ZT1_Node_Network_OK = 2,
- ZT1_Node_Network_ACCESS_DENIED = 3,
- ZT1_Node_Network_NOT_FOUND = 4,
- ZT1_Node_Network_INITIALIZATION_FAILED = 5,
- ZT1_Node_Network_NO_MORE_DEVICES = 6
- } status;
+ enum ZT1_Node_NetworkStatus status;
/**
* True if traffic on network is enabled