VirtualNetworkConfig.java 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * ZeroTier One - Network Virtualization Everywhere
  3. * Copyright (C) 2011-2015 ZeroTier, Inc.
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. * --
  19. *
  20. * ZeroTier may be used and distributed under the terms of the GPLv3, which
  21. * are available at: http://www.gnu.org/licenses/gpl-3.0.html
  22. *
  23. * If you would like to embed ZeroTier into a commercial application or
  24. * redistribute it in a modified binary form, please contact ZeroTier Networks
  25. * LLC. Start here: http://www.zerotier.com/
  26. */
  27. package com.zerotierone.sdk;
  28. import java.lang.String;
  29. import java.util.ArrayList;
  30. import java.net.InetAddress;
  31. public class VirtualNetworkConfig {
  32. public static final int MAX_MULTICAST_SUBSCRIPTIONS = 4096;
  33. public static final int ZT1_MAX_ZT_ASSIGNED_ADDRESSES = 16;
  34. private long nwid;
  35. private long mac;
  36. private String name;
  37. private VirtualNetworkStatus status;
  38. private VirtualNetworkType type;
  39. private int mtu;
  40. private boolean dhcp;
  41. private boolean bridge;
  42. private boolean broadcastEnabled;
  43. private boolean portError;
  44. private boolean enabled;
  45. private long netconfRevision;
  46. private int multicastSubscriptionCount;
  47. private ArrayList<MulticastGroup> multicastSubscriptions;
  48. private ArrayList<InetAddress> assignedAddresses;
  49. private VirtualNetworkConfig() {
  50. }
  51. public final long networkId() {
  52. return nwid;
  53. }
  54. public final long macAddress() {
  55. return mac;
  56. }
  57. public final String name() {
  58. return name;
  59. }
  60. public final VirtualNetworkStatus networkStatus() {
  61. return status;
  62. }
  63. public final VirtualNetworkType networkType() {
  64. return type;
  65. }
  66. public final int mtu() {
  67. return mtu;
  68. }
  69. public final boolean isDhcpAvailable() {
  70. return dhcp;
  71. }
  72. public final boolean isBridgeEnabled() {
  73. return bridge;
  74. }
  75. public final boolean broadcastEnabled() {
  76. return broadcastEnabled;
  77. }
  78. public final boolean portError() {
  79. return portError;
  80. }
  81. public final boolean isEnabled() {
  82. return enabled;
  83. }
  84. public final long netconfRevision() {
  85. return netconfRevision;
  86. }
  87. public final ArrayList<MulticastGroup> multicastSubscriptions() {
  88. return multicastSubscriptions;
  89. }
  90. public final ArrayList<InetAddress> assignedAddresses() {
  91. return assignedAddresses;
  92. }
  93. }