mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-06 21:11:43 -07:00
Added ant build script. Requires NDK_BUILD_LOC environment variable pointing to the ndk-build script
fixed compile erros in Node and VirutalNetworkConfig Signed-off-by: Grant Limberg <glimberg@gmail.com>
This commit is contained in:
parent
667a103a6a
commit
407e2fc7de
4 changed files with 120 additions and 14 deletions
|
@ -44,7 +44,7 @@ public class Node {
|
|||
*
|
||||
* -1 if the node has already been closed
|
||||
*/
|
||||
private final long nodeId;
|
||||
private long nodeId;
|
||||
|
||||
private final DataStoreGetListener getListener;
|
||||
private final DataStorePutListener putListener;
|
||||
|
@ -68,7 +68,7 @@ public class Node {
|
|||
this.configListener = configListener;
|
||||
|
||||
ResultCode rc = node_init(now);
|
||||
if(rc.getValue() != ResultCode.RESULT_OK)
|
||||
if(rc != ResultCode.RESULT_OK)
|
||||
{
|
||||
// TODO: Throw Exception
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ public class Node {
|
|||
long[] nextBackgroundTaskDeadline) {
|
||||
return processVirtualNetworkFrame(
|
||||
nodeId, now, nwid, sourceMac, destMac, etherType, vlanId,
|
||||
frameData, frameLength, nextBackgroundTaskDeadline);
|
||||
frameData, nextBackgroundTaskDeadline);
|
||||
}
|
||||
|
||||
public ResultCode processWirePacket(
|
||||
|
@ -111,7 +111,7 @@ public class Node {
|
|||
nextBackgroundTaskDeadline);
|
||||
}
|
||||
|
||||
public ResultCode processBackgroundTasks(long now, long nextBackgroundTaskDeadline) {
|
||||
public ResultCode processBackgroundTasks(long now, long[] nextBackgroundTaskDeadline) {
|
||||
return processBackgroundTasks(nodeId, now, nextBackgroundTaskDeadline);
|
||||
}
|
||||
|
||||
|
@ -159,14 +159,14 @@ public class Node {
|
|||
|
||||
// TODO: ZT1_Node_peers
|
||||
|
||||
public VirtualNetworkConfig networkConfig() {
|
||||
return networkConfig(nodeId);
|
||||
public VirtualNetworkConfig networkConfig(long nwid) {
|
||||
return networkConfig(nodeId, nwid);
|
||||
}
|
||||
|
||||
// TODO: ZT1_Node_networks
|
||||
|
||||
public Version version() {
|
||||
return version(nodeId);
|
||||
public Version getVersion() {
|
||||
return version();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,7 +29,7 @@ package com.zerotierone.sdk;
|
|||
|
||||
import java.lang.String;
|
||||
import java.util.ArrayList;
|
||||
import java.net.InetAddresss;
|
||||
import java.net.InetAddress;
|
||||
|
||||
public class VirtualNetworkConfig {
|
||||
public static final int MAX_MULTICAST_SUBSCRIPTIONS = 4096;
|
||||
|
@ -41,13 +41,72 @@ public class VirtualNetworkConfig {
|
|||
private VirtualNetworkStatus status;
|
||||
private VirtualNetworkType type;
|
||||
private int mtu;
|
||||
private int dhcp;
|
||||
private int bridge;
|
||||
private int broadcastEnabled;
|
||||
private int portError;
|
||||
private boolean dhcp;
|
||||
private boolean bridge;
|
||||
private boolean broadcastEnabled;
|
||||
private boolean portError;
|
||||
private boolean enabled;
|
||||
private long netconfRevision;
|
||||
private int multicastSubscriptionCount;
|
||||
private ArrayList<MulticastGroup> multicastSubscriptions;
|
||||
private ArrayList<InetAddress> assignedAddresses;
|
||||
}
|
||||
|
||||
private VirtualNetworkConfig() {
|
||||
|
||||
}
|
||||
|
||||
public final long networkId() {
|
||||
return nwid;
|
||||
}
|
||||
public final long macAddress() {
|
||||
return mac;
|
||||
}
|
||||
|
||||
public final String name() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public final VirtualNetworkStatus networkStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final VirtualNetworkType networkType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public final int mtu() {
|
||||
return mtu;
|
||||
}
|
||||
|
||||
public final boolean isDhcpAvailable() {
|
||||
return dhcp;
|
||||
}
|
||||
|
||||
public final boolean isBridgeEnabled() {
|
||||
return bridge;
|
||||
}
|
||||
|
||||
public final boolean broadcastEnabled() {
|
||||
return broadcastEnabled;
|
||||
}
|
||||
|
||||
public final boolean portError() {
|
||||
return portError;
|
||||
}
|
||||
|
||||
public final boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public final long netconfRevision() {
|
||||
return netconfRevision;
|
||||
}
|
||||
|
||||
public final ArrayList<MulticastGroup> multicastSubscriptions() {
|
||||
return multicastSubscriptions;
|
||||
}
|
||||
|
||||
public final ArrayList<InetAddress> assignedAddresses() {
|
||||
return assignedAddresses;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue