|
@@ -628,6 +628,15 @@ typedef struct
|
|
|
unsigned long peerCount;
|
|
|
} 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)
|
|
|
*/
|
|
@@ -958,6 +967,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
|
|
|
*
|