summaryrefslogtreecommitdiff
path: root/java/src/com/zerotierone/sdk/VirtualNetworkConfig.java
diff options
context:
space:
mode:
authorGrant Limberg <glimberg@gmail.com>2015-04-25 17:29:07 -0700
committerGrant Limberg <glimberg@gmail.com>2015-04-25 17:29:07 -0700
commit56f8160af8e89e6981a5f67d23c307dcd1ef0f2a (patch)
treec70de0772d6d76bdbcc01eb2b88c104cb68f918d /java/src/com/zerotierone/sdk/VirtualNetworkConfig.java
parent0d4283a3fa5b08bd730f26ab7680fd5680ad03b3 (diff)
downloadinfinitytier-56f8160af8e89e6981a5f67d23c307dcd1ef0f2a.tar.gz
infinitytier-56f8160af8e89e6981a5f67d23c307dcd1ef0f2a.zip
generate javadocs for the Java SDK
Diffstat (limited to 'java/src/com/zerotierone/sdk/VirtualNetworkConfig.java')
-rw-r--r--java/src/com/zerotierone/sdk/VirtualNetworkConfig.java65
1 files changed, 62 insertions, 3 deletions
diff --git a/java/src/com/zerotierone/sdk/VirtualNetworkConfig.java b/java/src/com/zerotierone/sdk/VirtualNetworkConfig.java
index 5e06b55f..037fd802 100644
--- a/java/src/com/zerotierone/sdk/VirtualNetworkConfig.java
+++ b/java/src/com/zerotierone/sdk/VirtualNetworkConfig.java
@@ -31,7 +31,7 @@ import java.lang.String;
import java.util.ArrayList;
import java.net.InetAddress;
-public class VirtualNetworkConfig {
+public final class VirtualNetworkConfig {
public static final int MAX_MULTICAST_SUBSCRIPTIONS = 4096;
public static final int ZT1_MAX_ZT_ASSIGNED_ADDRESSES = 16;
@@ -44,7 +44,7 @@ public class VirtualNetworkConfig {
private boolean dhcp;
private boolean bridge;
private boolean broadcastEnabled;
- private boolean portError;
+ private int portError;
private boolean enabled;
private long netconfRevision;
private ArrayList<MulticastGroup> multicastSubscriptions;
@@ -54,57 +54,116 @@ public class VirtualNetworkConfig {
}
+ /**
+ * 64-bit ZeroTier network ID
+ */
public final long networkId() {
return nwid;
}
+
+ /**
+ * Ethernet MAC (40 bits) that should be assigned to port
+ */
public final long macAddress() {
return mac;
}
+ /**
+ * Network name (from network configuration master)
+ */
public final String name() {
return name;
}
+ /**
+ * Network configuration request status
+ */
public final VirtualNetworkStatus networkStatus() {
return status;
}
+ /**
+ * Network type
+ */
public final VirtualNetworkType networkType() {
return type;
}
+ /**
+ * Maximum interface MTU
+ */
public final int mtu() {
return mtu;
}
+ /**
+ * If the network this port belongs to indicates DHCP availability
+ *
+ * <p>This is a suggestion. The underlying implementation is free to ignore it
+ * for security or other reasons. This is simply a netconf parameter that
+ * means 'DHCP is available on this network.'</p>
+ */
public final boolean isDhcpAvailable() {
return dhcp;
}
+ /**
+ * If this port is allowed to bridge to other networks
+ *
+ * <p>This is informational. If this is false, bridged packets will simply
+ * be dropped and bridging won't work.</p>
+ */
public final boolean isBridgeEnabled() {
return bridge;
}
+ /**
+ * If true, this network supports and allows broadcast (ff:ff:ff:ff:ff:ff) traffic
+ */
public final boolean broadcastEnabled() {
return broadcastEnabled;
}
- public final boolean portError() {
+ /**
+ * If the network is in PORT_ERROR state, this is the error most recently returned by the port config callback
+ */
+ public final int portError() {
return portError;
}
+ /**
+ * Is this network enabled? If not, all frames to/from are dropped.
+ */
public final boolean isEnabled() {
return enabled;
}
+ /**
+ * Network config revision as reported by netconf master
+ *
+ * <p>If this is zero, it means we're still waiting for our netconf.</p>
+ */
public final long netconfRevision() {
return netconfRevision;
}
+ /**
+ * Multicast group subscriptions
+ */
public final ArrayList<MulticastGroup> multicastSubscriptions() {
return multicastSubscriptions;
}
+ /**
+ * ZeroTier-assigned addresses (in {@link java.net.InetAddress} objects)
+ *
+ * For IP, the port number of the sockaddr_XX structure contains the number
+ * of bits in the address netmask. Only the IP address and port are used.
+ * Other fields like interface number can be ignored.
+ *
+ * This is only used for ZeroTier-managed address assignments sent by the
+ * virtual network's configuration master.
+ */
public final ArrayList<InetAddress> assignedAddresses() {
return assignedAddresses;
}