summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ZeroTierOne.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h
index b6ff69ab..4790795e 100644
--- a/include/ZeroTierOne.h
+++ b/include/ZeroTierOne.h
@@ -629,6 +629,15 @@ typedef struct
} ZT1_PeerList;
/**
+ * Local interface trust levels
+ */
+typedef enum {
+ ZT1_LOCAL_INTERFACE_ADDRESS_TRUST_NORMAL = 0,
+ ZT1_LOCAL_INTERFACE_ADDRESS_TRUST_PRIVACY = 1,
+ ZT1_LOCAL_INTERFACE_ADDRESS_TRUST_ULTIMATE = 2
+} ZT1_LocalInterfaceAddressTrust;
+
+/**
* An instance of a ZeroTier One node (opaque)
*/
typedef void ZT1_Node;
@@ -959,6 +968,29 @@ ZT1_VirtualNetworkList *ZT1_Node_networks(ZT1_Node *node);
void ZT1_Node_freeQueryResult(ZT1_Node *node,void *qr);
/**
+ * Add a local interface address
+ *
+ * Local interface addresses may be added if you want remote peers
+ * with whom you have a trust relatinship (e.g. common network membership)
+ * to receive information about these endpoints as potential endpoints for
+ * direct communication.
+ *
+ * Take care that these are never ZeroTier interface addresses, otherwise
+ * strange things might happen or they simply won't work.
+ *
+ * @param addr Local interface address
+ * @param metric Local interface metric
+ * @param trust How much do you trust the local network under this interface?
+ * @param reliable If nonzero, this interface doesn't link to anything behind a NAT or stateful firewall
+ */
+void ZT1_Node_addLocalInterfaceAddress(ZT1_Node *node,const struct sockaddr_storage *addr,int metric,ZT1_LocalInterfaceAddressTrust trust,int reliable);
+
+/**
+ * Clear local interface addresses
+ */
+void ZT1_Node_clearLocalInterfaceAddresses(ZT1_Node *node);
+
+/**
* Set a network configuration master instance for this node
*
* Normal nodes should not need to use this. This is for nodes with