summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-07-07 08:54:48 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-07-07 08:54:48 -0700
commitc863ff3f02e9d68eb9bea32160d252eaddb7f1f5 (patch)
treefee1fd7b40123e7f9b015f803cc3b523b8e0aa9a /include
parentf398952a6c03574e5947f6dfe5ea0f7b0f0b5224 (diff)
downloadinfinitytier-c863ff3f02e9d68eb9bea32160d252eaddb7f1f5.tar.gz
infinitytier-c863ff3f02e9d68eb9bea32160d252eaddb7f1f5.zip
A bunch of comments and cleanup, including some to yesterday's direct path pushing changes. Move path viability check to one place, and stop trying to use link-local addresses since they are not reliable.
Diffstat (limited to 'include')
-rw-r--r--include/ZeroTierOne.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h
index 4790795e..446bbc77 100644
--- a/include/ZeroTierOne.h
+++ b/include/ZeroTierOne.h
@@ -978,12 +978,19 @@ void ZT1_Node_freeQueryResult(ZT1_Node *node,void *qr);
* Take care that these are never ZeroTier interface addresses, otherwise
* strange things might happen or they simply won't work.
*
+ * This returns a boolean indicating whether or not the address was
+ * accepted. ZeroTier will only communicate over certain address types
+ * and (for IP) address classes. Thus it's safe to just dump your OS's
+ * entire remote IP list (excluding ZeroTier interface IPs) into here
+ * and let ZeroTier determine which addresses it will use.
+ *
* @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
+ * @return Boolean: non-zero if address was accepted and added
*/
-void ZT1_Node_addLocalInterfaceAddress(ZT1_Node *node,const struct sockaddr_storage *addr,int metric,ZT1_LocalInterfaceAddressTrust trust,int reliable);
+int ZT1_Node_addLocalInterfaceAddress(ZT1_Node *node,const struct sockaddr_storage *addr,int metric,ZT1_LocalInterfaceAddressTrust trust,int reliable);
/**
* Clear local interface addresses