mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-07 11:50:13 +00:00
Merge branch 'dev' into dev-low-bandwidth
This commit is contained in:
commit
e27c3edaba
@ -62,7 +62,7 @@ jclass JniLookup::findClass(const std::string &name)
|
|||||||
JNIEnv *env = NULL;
|
JNIEnv *env = NULL;
|
||||||
if(m_jvm->GetEnv((void**)&env, JNI_VERSION_1_6) != JNI_OK)
|
if(m_jvm->GetEnv((void**)&env, JNI_VERSION_1_6) != JNI_OK)
|
||||||
{
|
{
|
||||||
LOGE("Error retreiving JNI Environment");
|
LOGE("Error retrieving JNI Environment");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
const char *c = name.c_str();
|
const char *c = name.c_str();
|
||||||
|
@ -296,7 +296,7 @@ jobject newInetAddress(JNIEnv *env, const sockaddr_storage &addr)
|
|||||||
inetAddressClass, "getByAddress", "([B)Ljava/net/InetAddress;");
|
inetAddressClass, "getByAddress", "([B)Ljava/net/InetAddress;");
|
||||||
if(env->ExceptionCheck() || inetAddress_getByAddress == NULL)
|
if(env->ExceptionCheck() || inetAddress_getByAddress == NULL)
|
||||||
{
|
{
|
||||||
LOGE("Erorr finding getByAddress() static method");
|
LOGE("Error finding getByAddress() static method");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ namespace {
|
|||||||
enum ZT_VirtualNetworkConfigOperation operation,
|
enum ZT_VirtualNetworkConfigOperation operation,
|
||||||
const ZT_VirtualNetworkConfig *config)
|
const ZT_VirtualNetworkConfig *config)
|
||||||
{
|
{
|
||||||
LOGV("VritualNetworkConfigFunctionCallback");
|
LOGV("VirtualNetworkConfigFunctionCallback");
|
||||||
JniRef *ref = (JniRef*)userData;
|
JniRef *ref = (JniRef*)userData;
|
||||||
JNIEnv *env = NULL;
|
JNIEnv *env = NULL;
|
||||||
ref->jvm->GetEnv((void**)&env, JNI_VERSION_1_6);
|
ref->jvm->GetEnv((void**)&env, JNI_VERSION_1_6);
|
||||||
@ -1025,7 +1025,7 @@ JNIEXPORT jobject JNICALL Java_com_zerotier_sdk_Node_processWirePacket(
|
|||||||
inetAddressClass, "getAddress", "()[B");
|
inetAddressClass, "getAddress", "()[B");
|
||||||
if(getAddressMethod == NULL)
|
if(getAddressMethod == NULL)
|
||||||
{
|
{
|
||||||
// cant find InetAddress.getAddres()
|
// cant find InetAddress.getAddress()
|
||||||
return createResultObject(env, ZT_RESULT_FATAL_ERROR_INTERNAL);
|
return createResultObject(env, ZT_RESULT_FATAL_ERROR_INTERNAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public class NativeUtils {
|
|||||||
String[] parts = path.split("/");
|
String[] parts = path.split("/");
|
||||||
String filename = (parts.length > 1) ? parts[parts.length - 1] : null;
|
String filename = (parts.length > 1) ? parts[parts.length - 1] : null;
|
||||||
|
|
||||||
// Split filename to prexif and suffix (extension)
|
// Split filename to prefix and suffix (extension)
|
||||||
String prefix = "";
|
String prefix = "";
|
||||||
String suffix = null;
|
String suffix = null;
|
||||||
if (filename != null) {
|
if (filename != null) {
|
||||||
|
@ -84,7 +84,7 @@ public class Node {
|
|||||||
*
|
*
|
||||||
* @param now Current clock in milliseconds
|
* @param now Current clock in milliseconds
|
||||||
* @param getListener User written instance of the {@link DataStoreGetListener} interface called to get objects from persistent storage. This instance must be unique per Node object.
|
* @param getListener User written instance of the {@link DataStoreGetListener} interface called to get objects from persistent storage. This instance must be unique per Node object.
|
||||||
* @param putListener User written intstance of the {@link DataStorePutListener} interface called to put objects in persistent storage. This instance must be unique per Node object.
|
* @param putListener User written instance of the {@link DataStorePutListener} interface called to put objects in persistent storage. This instance must be unique per Node object.
|
||||||
* @param sender
|
* @param sender
|
||||||
* @param eventListener User written instance of the {@link EventListener} interface to receive status updates and non-fatal error notices. This instance must be unique per Node object.
|
* @param eventListener User written instance of the {@link EventListener} interface to receive status updates and non-fatal error notices. This instance must be unique per Node object.
|
||||||
* @param frameListener
|
* @param frameListener
|
||||||
@ -197,7 +197,7 @@ public class Node {
|
|||||||
* Join a network
|
* Join a network
|
||||||
*
|
*
|
||||||
* <p>This may generate calls to the port config callback before it returns,
|
* <p>This may generate calls to the port config callback before it returns,
|
||||||
* or these may be deffered if a netconf is not available yet.</p>
|
* or these may be deferred if a netconf is not available yet.</p>
|
||||||
*
|
*
|
||||||
* <p>If we are already a member of the network, nothing is done and OK is
|
* <p>If we are already a member of the network, nothing is done and OK is
|
||||||
* returned.</p>
|
* returned.</p>
|
||||||
|
@ -38,7 +38,7 @@ public final class NodeStatus {
|
|||||||
/**
|
/**
|
||||||
* 40-bit ZeroTier address of this node
|
* 40-bit ZeroTier address of this node
|
||||||
*/
|
*/
|
||||||
public final long getAddres() {
|
public final long getAddress() {
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,6 +198,11 @@ ifeq ($(CC_MACH),armv6kz)
|
|||||||
override DEFS+=-DZT_NO_TYPE_PUNNING
|
override DEFS+=-DZT_NO_TYPE_PUNNING
|
||||||
ZT_USE_ARM32_NEON_ASM_CRYPTO=1
|
ZT_USE_ARM32_NEON_ASM_CRYPTO=1
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CC_MACH),armv6k)
|
||||||
|
ZT_ARCHITECTURE=3
|
||||||
|
override DEFS+=-DZT_NO_TYPE_PUNNING
|
||||||
|
ZT_USE_ARM32_NEON_ASM_CRYPTO=1
|
||||||
|
endif
|
||||||
ifeq ($(CC_MACH),armv7)
|
ifeq ($(CC_MACH),armv7)
|
||||||
ZT_ARCHITECTURE=3
|
ZT_ARCHITECTURE=3
|
||||||
override DEFS+=-DZT_NO_TYPE_PUNNING
|
override DEFS+=-DZT_NO_TYPE_PUNNING
|
||||||
@ -257,7 +262,7 @@ endif
|
|||||||
|
|
||||||
# Fail if system architecture could not be determined
|
# Fail if system architecture could not be determined
|
||||||
ifeq ($(ZT_ARCHITECTURE),999)
|
ifeq ($(ZT_ARCHITECTURE),999)
|
||||||
ERR=$(error FATAL: architecture could not be determined from $(CC) -dumpmachine: $CC_MACH)
|
ERR=$(error FATAL: architecture could not be determined from $(CC) -dumpmachine: $(CC_MACH))
|
||||||
.PHONY: err
|
.PHONY: err
|
||||||
err: ; $(ERR)
|
err: ; $(ERR)
|
||||||
endif
|
endif
|
||||||
|
@ -428,7 +428,7 @@ void Bond::recordOutgoingPacket(const SharedPtr<Path>& path, uint64_t packetId,
|
|||||||
}
|
}
|
||||||
if (shouldRecord) {
|
if (shouldRecord) {
|
||||||
//_paths[pathIdx].expectingAckAsOf = now;
|
//_paths[pathIdx].expectingAckAsOf = now;
|
||||||
//_paths[pathIdx].totalBytesSentSinceLastAckRecieved += payloadLength;
|
//_paths[pathIdx].totalBytesSentSinceLastAckReceived += payloadLength;
|
||||||
//_paths[pathIdx].unackedBytes += payloadLength;
|
//_paths[pathIdx].unackedBytes += payloadLength;
|
||||||
if (_paths[pathIdx].qosStatsOut.size() < ZT_QOS_MAX_PENDING_RECORDS) {
|
if (_paths[pathIdx].qosStatsOut.size() < ZT_QOS_MAX_PENDING_RECORDS) {
|
||||||
_paths[pathIdx].qosStatsOut[packetId] = now;
|
_paths[pathIdx].qosStatsOut[packetId] = now;
|
||||||
|
@ -517,7 +517,7 @@
|
|||||||
#define ZT_ACK_CUTOFF_LIMIT 128
|
#define ZT_ACK_CUTOFF_LIMIT 128
|
||||||
#define ZT_ACK_DRAINAGE_DIVISOR (1000 / ZT_ACK_CUTOFF_LIMIT)
|
#define ZT_ACK_DRAINAGE_DIVISOR (1000 / ZT_ACK_CUTOFF_LIMIT)
|
||||||
|
|
||||||
#define ZT_BOND_DEFAULT_REFRCTORY_PERIOD 8000
|
#define ZT_BOND_DEFAULT_REFRACTORY_PERIOD 8000
|
||||||
#define ZT_BOND_MAX_REFRACTORY_PERIOD 600000
|
#define ZT_BOND_MAX_REFRACTORY_PERIOD 600000
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
namespace ZeroTier {
|
namespace ZeroTier {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DNS data serealization methods
|
* DNS data serialization methods
|
||||||
*/
|
*/
|
||||||
class DNS {
|
class DNS {
|
||||||
public:
|
public:
|
||||||
|
@ -177,7 +177,7 @@ namespace ZeroTier {
|
|||||||
#define ZT_NETWORKCONFIG_DICT_KEY_CERTIFICATES_OF_OWNERSHIP "COO"
|
#define ZT_NETWORKCONFIG_DICT_KEY_CERTIFICATES_OF_OWNERSHIP "COO"
|
||||||
// dns (binary blobs)
|
// dns (binary blobs)
|
||||||
#define ZT_NETWORKCONFIG_DICT_KEY_DNS "DNS"
|
#define ZT_NETWORKCONFIG_DICT_KEY_DNS "DNS"
|
||||||
// sso enabld
|
// sso enabled
|
||||||
#define ZT_NETWORKCONFIG_DICT_KEY_SSO_ENABLED "ssoe"
|
#define ZT_NETWORKCONFIG_DICT_KEY_SSO_ENABLED "ssoe"
|
||||||
// so version
|
// so version
|
||||||
#define ZT_NETWORKCONFIG_DICT_KEY_SSO_VERSION "ssov"
|
#define ZT_NETWORKCONFIG_DICT_KEY_SSO_VERSION "ssov"
|
||||||
@ -200,7 +200,7 @@ namespace ZeroTier {
|
|||||||
|
|
||||||
// AuthInfo Version
|
// AuthInfo Version
|
||||||
#define ZT_AUTHINFO_DICT_KEY_VERSION "aV"
|
#define ZT_AUTHINFO_DICT_KEY_VERSION "aV"
|
||||||
// authenticaiton URL
|
// authentication URL
|
||||||
#define ZT_AUTHINFO_DICT_KEY_AUTHENTICATION_URL "aU"
|
#define ZT_AUTHINFO_DICT_KEY_AUTHENTICATION_URL "aU"
|
||||||
// issuer URL
|
// issuer URL
|
||||||
#define ZT_AUTHINFO_DICT_KEY_ISSUER_URL "iU"
|
#define ZT_AUTHINFO_DICT_KEY_ISSUER_URL "iU"
|
||||||
@ -659,7 +659,7 @@ public:
|
|||||||
bool ssoEnabled;
|
bool ssoEnabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SSO verison
|
* SSO version
|
||||||
*/
|
*/
|
||||||
uint64_t ssoVersion;
|
uint64_t ssoVersion;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user