JNI for dns configuration
This commit is contained in:
parent
ed9b09e980
commit
2851a9577c
8 changed files with 283 additions and 2 deletions
|
@ -56,6 +56,7 @@ public final class VirtualNetworkConfig implements Comparable<VirtualNetworkConf
|
|||
private long netconfRevision;
|
||||
private InetSocketAddress[] assignedAddresses;
|
||||
private VirtualNetworkRoute[] routes;
|
||||
private VirtualNetworkDNS dns;
|
||||
|
||||
private VirtualNetworkConfig() {
|
||||
|
||||
|
@ -161,6 +162,7 @@ public final class VirtualNetworkConfig implements Comparable<VirtualNetworkConf
|
|||
this.broadcastEnabled == cfg.broadcastEnabled &&
|
||||
this.portError == cfg.portError &&
|
||||
this.enabled == cfg.enabled &&
|
||||
this.dns.equals(cfg.dns) &&
|
||||
aaEqual && routesEqual;
|
||||
}
|
||||
|
||||
|
@ -278,4 +280,6 @@ public final class VirtualNetworkConfig implements Comparable<VirtualNetworkConf
|
|||
* @return
|
||||
*/
|
||||
public final VirtualNetworkRoute[] routes() { return routes; }
|
||||
|
||||
public final VirtualNetworkDNS dns() { return dns; }
|
||||
}
|
||||
|
|
25
java/src/com/zerotier/sdk/VirtualNetworkDNS.java
Normal file
25
java/src/com/zerotier/sdk/VirtualNetworkDNS.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* ZeroTier One - Network Virtualization Everywhere
|
||||
* Copyright (C) 2011-2020 ZeroTier, Inc. https://www.zerotier.com/
|
||||
*/
|
||||
|
||||
package com.zerotier.sdk;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class VirtualNetworkDNS implements Comparable<VirtualNetworkDNS> {
|
||||
private String domain;
|
||||
private ArrayList<InetSocketAddress> servers;
|
||||
|
||||
public VirtualNetworkDNS() {}
|
||||
|
||||
public boolean equals(VirtualNetworkDNS o) {
|
||||
return domain.equals(o.domain) && servers.equals(o.servers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(VirtualNetworkDNS o) {
|
||||
return domain.compareTo(o.domain);
|
||||
}
|
||||
}
|
|
@ -103,7 +103,6 @@ public final class VirtualNetworkRoute implements Comparable<VirtualNetworkRoute
|
|||
viaEquals = via.toString().equals(other.via.toString());
|
||||
}
|
||||
|
||||
return viaEquals &&
|
||||
viaEquals;
|
||||
return viaEquals && targetEquals;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue