Class ZeroTierNative

java.lang.Object
com.zerotier.sockets.ZeroTierNative

public class ZeroTierNative
extends java.lang.Object
Class that exposes the low-level C socket interface provided by libzt. This can be used instead of the higher-level ZeroTierSocket API.
  • Field Details

    • ZTS_EVENT_NODE_UP

      public static int ZTS_EVENT_NODE_UP
      Node has been initialized This is the first event generated; and is always sent. It may occur before node's constructor returns.
    • ZTS_EVENT_NODE_ONLINE

      public static int ZTS_EVENT_NODE_ONLINE
      Node is online -- at least one upstream node appears reachable
    • ZTS_EVENT_NODE_OFFLINE

      public static int ZTS_EVENT_NODE_OFFLINE
      Node is offline -- network does not seem to be reachable by any available strategy
    • ZTS_EVENT_NODE_DOWN

      public static int ZTS_EVENT_NODE_DOWN
      Node is shutting down This is generated within Node's destructor when it is being shut down. It's done for convenience; since cleaning up other state in the event handler may appear more idiomatic.
    • ZTS_EVENT_NODE_FATAL_ERROR

      public static int ZTS_EVENT_NODE_FATAL_ERROR
      A fatal error has occurred. One possible reason is: Your identity has collided with another node's ZeroTier address This happens if two different public keys both hash (via the algorithm in Identity::generate()) to the same 40-bit ZeroTier address. This is something you should "never" see; where "never" is defined as once per 2^39 new node initializations / identity creations. If you do see it; you're going to see it very soon after a node is first initialized. This is reported as an event rather than a return code since it's detected asynchronously via error messages from authoritative nodes. If this occurs; you must shut down and delete the node; delete the identity.secret record/file from the data store; and restart to generate a new identity. If you don't do this; you will not be able to communicate with other nodes. We'd automate this process; but we don't think silently deleting private keys or changing our address without telling the calling code is good form. It violates the principle of least surprise. You can technically get away with not handling this; but we recommend doing so in a mature reliable application. Besides; handling this condition is a good way to make sure it never arises. It's like how umbrellas prevent rain and smoke detectors prevent fires. They do; right? Meta-data: none
    • ZTS_EVENT_NETWORK_NOT_FOUND

      public static int ZTS_EVENT_NETWORK_NOT_FOUND
      Network ID does not correspond to a known network
    • ZTS_EVENT_NETWORK_CLIENT_TOO_OLD

      public static int ZTS_EVENT_NETWORK_CLIENT_TOO_OLD
      The version of ZeroTier inside libzt is too old
    • ZTS_EVENT_NETWORK_REQ_CONFIG

      public static int ZTS_EVENT_NETWORK_REQ_CONFIG
      The configuration for a network has been requested (no action needed)
    • ZTS_EVENT_NETWORK_OK

      public static int ZTS_EVENT_NETWORK_OK
      The node joined the network successfully (no action needed)
    • ZTS_EVENT_NETWORK_ACCESS_DENIED

      public static int ZTS_EVENT_NETWORK_ACCESS_DENIED
      The node is not allowed to join the network (you must authorize node)
    • ZTS_EVENT_NETWORK_READY_IP4

      public static int ZTS_EVENT_NETWORK_READY_IP4
      The node has received an IPv4 address from the network controller
    • ZTS_EVENT_NETWORK_READY_IP6

      public static int ZTS_EVENT_NETWORK_READY_IP6
      The node has received an IPv6 address from the network controller
    • ZTS_EVENT_NETWORK_READY_IP4_IP6

      public static int ZTS_EVENT_NETWORK_READY_IP4_IP6
      Deprecated
    • ZTS_EVENT_NETWORK_DOWN

      public static int ZTS_EVENT_NETWORK_DOWN
      Network controller is unreachable
    • ZTS_EVENT_NETWORK_UPDATE

      public static int ZTS_EVENT_NETWORK_UPDATE
      Network change received from controller
    • ZTS_EVENT_STACK_UP

      public static int ZTS_EVENT_STACK_UP
      TCP/IP stack (lwIP) is up (for debug purposes)
    • ZTS_EVENT_STACK_DOWN

      public static int ZTS_EVENT_STACK_DOWN
      TCP/IP stack (lwIP) id down (for debug purposes)
    • ZTS_EVENT_NETIF_UP

      public static int ZTS_EVENT_NETIF_UP
      lwIP netif up (for debug purposes)
    • ZTS_EVENT_NETIF_DOWN

      public static int ZTS_EVENT_NETIF_DOWN
      lwIP netif down (for debug purposes)
    • ZTS_EVENT_NETIF_REMOVED

      public static int ZTS_EVENT_NETIF_REMOVED
      lwIP netif removed (for debug purposes)
    • ZTS_EVENT_PEER_DIRECT

      public static int ZTS_EVENT_PEER_DIRECT
      A direct P2P path to peer is known
    • ZTS_EVENT_PEER_RELAY

      public static int ZTS_EVENT_PEER_RELAY
      A direct P2P path to peer is NOT known. Traffic is now relayed
    • ZTS_EVENT_PEER_UNREACHABLE

      public static int ZTS_EVENT_PEER_UNREACHABLE
      A peer is unreachable. Check NAT/Firewall settings
    • ZTS_EVENT_PEER_PATH_DISCOVERED

      public static int ZTS_EVENT_PEER_PATH_DISCOVERED
      A new path to a peer was discovered
    • ZTS_EVENT_PEER_PATH_DEAD

      public static int ZTS_EVENT_PEER_PATH_DEAD
      A known path to a peer is now considered dead
    • ZTS_EVENT_ROUTE_ADDED

      public static int ZTS_EVENT_ROUTE_ADDED
      A new managed network route was added
    • ZTS_EVENT_ROUTE_REMOVED

      public static int ZTS_EVENT_ROUTE_REMOVED
      A managed network route was removed
    • ZTS_EVENT_ADDR_ADDED_IP4

      public static int ZTS_EVENT_ADDR_ADDED_IP4
      A new managed IPv4 address was assigned to this peer
    • ZTS_EVENT_ADDR_REMOVED_IP4

      public static int ZTS_EVENT_ADDR_REMOVED_IP4
      A managed IPv4 address assignment was removed from this peer
    • ZTS_EVENT_ADDR_ADDED_IP6

      public static int ZTS_EVENT_ADDR_ADDED_IP6
      A new managed IPv4 address was assigned to this peer
    • ZTS_EVENT_ADDR_REMOVED_IP6

      public static int ZTS_EVENT_ADDR_REMOVED_IP6
      A managed IPv6 address assignment was removed from this peer
    • ZTS_EVENT_STORE_IDENTITY_SECRET

      public static int ZTS_EVENT_STORE_IDENTITY_SECRET
      The node's secret key (identity)
    • ZTS_EVENT_STORE_IDENTITY_PUBLIC

      public static int ZTS_EVENT_STORE_IDENTITY_PUBLIC
      The node's public key (identity)
    • ZTS_EVENT_STORE_PLANET

      public static int ZTS_EVENT_STORE_PLANET
      The node has received an updated planet config
    • ZTS_EVENT_STORE_PEER

      public static int ZTS_EVENT_STORE_PEER
      New reachability hints and peer configuration
    • ZTS_EVENT_STORE_NETWORK

      public static int ZTS_EVENT_STORE_NETWORK
      New network config
    • ZTS_SOCK_STREAM

      public static int ZTS_SOCK_STREAM
      Stream socket
    • ZTS_SOCK_DGRAM

      public static int ZTS_SOCK_DGRAM
      Datagram socket
    • ZTS_SOCK_RAW

      public static int ZTS_SOCK_RAW
    • ZTS_AF_INET

      public static int ZTS_AF_INET
      IPv4 address family
    • ZTS_AF_INET6

      public static int ZTS_AF_INET6
      IPv6 address family
    • ZTS_PF_INET

      public static int ZTS_PF_INET
    • ZTS_PF_INET6

      public static int ZTS_PF_INET6
    • ZTS_IPPROTO_IP

      public static int ZTS_IPPROTO_IP
    • ZTS_IPPROTO_ICMP

      public static int ZTS_IPPROTO_ICMP
    • ZTS_IPPROTO_TCP

      public static int ZTS_IPPROTO_TCP
    • ZTS_IPPROTO_UDP

      public static int ZTS_IPPROTO_UDP
    • ZTS_IPPROTO_IPV6

      public static int ZTS_IPPROTO_IPV6
    • ZTS_IPPROTO_ICMPV6

      public static int ZTS_IPPROTO_ICMPV6
    • ZTS_IPPROTO_UDPLITE

      public static int ZTS_IPPROTO_UDPLITE
    • ZTS_IPPROTO_RAW

      public static int ZTS_IPPROTO_RAW
    • ZTS_MSG_PEEK

      public static int ZTS_MSG_PEEK
    • ZTS_MSG_WAITALL

      public static int ZTS_MSG_WAITALL
    • ZTS_MSG_OOB

      public static int ZTS_MSG_OOB
    • ZTS_MSG_DONTWAIT

      public static int ZTS_MSG_DONTWAIT
    • ZTS_MSG_MORE

      public static int ZTS_MSG_MORE
    • ZTS_F_GETFL

      public static int ZTS_F_GETFL
    • ZTS_F_SETFL

      public static int ZTS_F_SETFL
    • ZTS_O_NONBLOCK

      public static int ZTS_O_NONBLOCK
    • ZTS_O_NDELAY

      public static int ZTS_O_NDELAY
    • ZTS_SHUT_RD

      public static int ZTS_SHUT_RD
    • ZTS_SHUT_WR

      public static int ZTS_SHUT_WR
    • ZTS_SHUT_RDWR

      public static int ZTS_SHUT_RDWR
    • ZTS_FIONREAD

      public static int ZTS_FIONREAD
    • ZTS_FIONBIO

      public static int ZTS_FIONBIO
    • ZTS_SOL_SOCKET

      public static int ZTS_SOL_SOCKET
    • ZTS_SO_REUSEADDR

      public static int ZTS_SO_REUSEADDR
    • ZTS_SO_KEEPALIVE

      public static int ZTS_SO_KEEPALIVE
    • ZTS_SO_BROADCAST

      public static int ZTS_SO_BROADCAST
    • ZTS_SO_DEBUG

      public static int ZTS_SO_DEBUG
    • ZTS_SO_ACCEPTCONN

      public static int ZTS_SO_ACCEPTCONN
    • ZTS_SO_DONTROUTE

      public static int ZTS_SO_DONTROUTE
    • ZTS_SO_USELOOPBACK

      public static int ZTS_SO_USELOOPBACK
    • ZTS_SO_LINGER

      public static int ZTS_SO_LINGER
    • ZTS_SO_DONTLINGER

      public static int ZTS_SO_DONTLINGER
    • ZTS_SO_OOBINLINE

      public static int ZTS_SO_OOBINLINE
    • ZTS_SO_REUSEPORT

      public static int ZTS_SO_REUSEPORT
    • ZTS_SO_SNDBUF

      public static int ZTS_SO_SNDBUF
    • ZTS_SO_RCVBUF

      public static int ZTS_SO_RCVBUF
    • ZTS_SO_SNDLOWAT

      public static int ZTS_SO_SNDLOWAT
    • ZTS_SO_RCVLOWAT

      public static int ZTS_SO_RCVLOWAT
    • ZTS_SO_SNDTIMEO

      public static int ZTS_SO_SNDTIMEO
    • ZTS_SO_RCVTIMEO

      public static int ZTS_SO_RCVTIMEO
    • ZTS_SO_ERROR

      public static int ZTS_SO_ERROR
    • ZTS_SO_TYPE

      public static int ZTS_SO_TYPE
    • ZTS_SO_CONTIMEO

      public static int ZTS_SO_CONTIMEO
    • ZTS_SO_NO_CHECK

      public static int ZTS_SO_NO_CHECK
    • ZTS_IP_TOS

      public static int ZTS_IP_TOS
    • ZTS_IP_TTL

      public static int ZTS_IP_TTL
    • ZTS_TCP_NODELAY

      public static int ZTS_TCP_NODELAY
    • ZTS_TCP_KEEPALIVE

      public static int ZTS_TCP_KEEPALIVE
    • ZTS_TCP_KEEPIDLE

      public static int ZTS_TCP_KEEPIDLE
    • ZTS_TCP_KEEPINTVL

      public static int ZTS_TCP_KEEPINTVL
    • ZTS_TCP_KEEPCNT

      public static int ZTS_TCP_KEEPCNT
    • ZTS_ERR_OK

      public static int ZTS_ERR_OK
      (0) No error
    • ZTS_ERR_SOCKET

      public static int ZTS_ERR_SOCKET
      (-1) Socket error, see zts_errno
    • ZTS_ERR_SERVICE

      public static int ZTS_ERR_SERVICE
      (-2) You probably did something at the wrong time
    • ZTS_ERR_ARG

      public static int ZTS_ERR_ARG
      (-3) Invalid argument
    • ZTS_ERR_RESULT

      public static int ZTS_ERR_RESULT
      (-4) No result (not necessarily an error)
    • ZTS_ERR_GENERAL

      public static int ZTS_ERR_GENERAL
      (-5) Consider filing a bug report
    • ZTS_EPERM

      public static int ZTS_EPERM
      Operation not permitted (`zts_errno` value)
    • ZTS_ENOENT

      public static int ZTS_ENOENT
      No such file or directory
    • ZTS_ESRCH

      public static int ZTS_ESRCH
      No such process
    • ZTS_EINTR

      public static int ZTS_EINTR
      Interrupted system call
    • ZTS_EIO

      public static int ZTS_EIO
      I/O error
    • ZTS_ENXIO

      public static int ZTS_ENXIO
      No such device or address
    • ZTS_EBADF

      public static int ZTS_EBADF
      Bad file number
    • ZTS_EAGAIN

      public static int ZTS_EAGAIN
      Try again
    • ZTS_EWOULDBLOCK

      public static int ZTS_EWOULDBLOCK
      Operation would block
    • ZTS_ENOMEM

      public static int ZTS_ENOMEM
      Out of memory
    • ZTS_EACCES

      public static int ZTS_EACCES
      Permission denied
    • ZTS_EFAULT

      public static int ZTS_EFAULT
      Bad address
    • ZTS_EBUSY

      public static int ZTS_EBUSY
      Device or resource busy
    • ZTS_EEXIST

      public static int ZTS_EEXIST
      File exists
    • ZTS_ENODEV

      public static int ZTS_ENODEV
      No such device
    • ZTS_EINVAL

      public static int ZTS_EINVAL
      Invalid argument
    • ZTS_ENFILE

      public static int ZTS_ENFILE
      File table overflow
    • ZTS_EMFILE

      public static int ZTS_EMFILE
      Too many open files
    • ZTS_ENOSYS

      public static int ZTS_ENOSYS
      Function not implemented
    • ZTS_ENOTSOCK

      public static int ZTS_ENOTSOCK
      Socket operation on non-socket
    • ZTS_EDESTADDRREQ

      public static int ZTS_EDESTADDRREQ
      Destination address required
    • ZTS_EMSGSIZE

      public static int ZTS_EMSGSIZE
      Message too long
    • ZTS_EPROTOTYPE

      public static int ZTS_EPROTOTYPE
      Protocol wrong type for socket
    • ZTS_ENOPROTOOPT

      public static int ZTS_ENOPROTOOPT
      Protocol not available
    • ZTS_EPROTONOSUPPORT

      public static int ZTS_EPROTONOSUPPORT
      Protocol not supported
    • ZTS_ESOCKTNOSUPPORT

      public static int ZTS_ESOCKTNOSUPPORT
      Socket type not supported
    • ZTS_EOPNOTSUPP

      public static int ZTS_EOPNOTSUPP
      Operation not supported on transport endpoint
    • ZTS_EPFNOSUPPORT

      public static int ZTS_EPFNOSUPPORT
      Protocol family not supported
    • ZTS_EAFNOSUPPORT

      public static int ZTS_EAFNOSUPPORT
      Address family not supported by protocol
    • ZTS_EADDRINUSE

      public static int ZTS_EADDRINUSE
      Address already in use
    • ZTS_EADDRNOTAVAIL

      public static int ZTS_EADDRNOTAVAIL
      Cannot assign requested address
    • ZTS_ENETDOWN

      public static int ZTS_ENETDOWN
      Network is down
    • ZTS_ENETUNREACH

      public static int ZTS_ENETUNREACH
      Network is unreachable
    • ZTS_ECONNABORTED

      public static int ZTS_ECONNABORTED
      Software caused connection abort
    • ZTS_ECONNRESET

      public static int ZTS_ECONNRESET
      Connection reset by peer
    • ZTS_ENOBUFS

      public static int ZTS_ENOBUFS
      No buffer space available
    • ZTS_EISCONN

      public static int ZTS_EISCONN
      Transport endpoint is already connected
    • ZTS_ENOTCONN

      public static int ZTS_ENOTCONN
      Transport endpoint is not connected
    • ZTS_ETIMEDOUT

      public static int ZTS_ETIMEDOUT
      Connection timed out
    • ZTS_EHOSTUNREACH

      public static int ZTS_EHOSTUNREACH
      No route to host
    • ZTS_EALREADY

      public static int ZTS_EALREADY
      Operation already in progress
    • ZTS_EINPROGRESS

      public static int ZTS_EINPROGRESS
      Operation now in progress
    • ZTS_MAC_ADDRSTRLEN

      public static int ZTS_MAC_ADDRSTRLEN
      Length of human-readable MAC address string
    • ZTS_INET_ADDRSTRLEN

      public static int ZTS_INET_ADDRSTRLEN
      Max length of human-readable IPv4 string
    • ZTS_INET6_ADDRSTRLEN

      public static int ZTS_INET6_ADDRSTRLEN
      Max length of human-readable IPv6 string
    • ZTS_IP_MAX_STR_LEN

      public static int ZTS_IP_MAX_STR_LEN
      Maximum (and required) length of string buffers used to receive string-format IP addresses from the API. This is set to `ZTS_INET6_ADDRSTRLEN` to handle all cases: `ZTS_AF_INET` and `ZTS_AF_INET6`
    • ZTS_STORE_DATA_LEN

      public static int ZTS_STORE_DATA_LEN
      Required buffer length to safely receive data store items
    • ZTS_MAX_NETWORK_SHORT_NAME_LENGTH

      public static int ZTS_MAX_NETWORK_SHORT_NAME_LENGTH
      Maximum length of network short name
    • ZTS_MAX_NETWORK_ROUTES

      public static int ZTS_MAX_NETWORK_ROUTES
      Maximum number of pushed routes on a network
    • ZTS_MAX_ASSIGNED_ADDRESSES

      public static int ZTS_MAX_ASSIGNED_ADDRESSES
      Maximum number of statically assigned IP addresses per network endpoint using ZT address management (not DHCP)
    • ZTS_MAX_PEER_NETWORK_PATHS

      public static int ZTS_MAX_PEER_NETWORK_PATHS
      Maximum number of direct network paths to a given peer
    • ZTS_MAX_MULTICAST_SUBSCRIPTIONS

      public static int ZTS_MAX_MULTICAST_SUBSCRIPTIONS
      Maximum number of multicast groups a device / network interface can be subscribed to at once
    • ZTS_ID_STR_BUF_LEN

      public static int ZTS_ID_STR_BUF_LEN
      The length of a human-friendly identity key pair string
  • Constructor Details

    • ZeroTierNative

      public ZeroTierNative()
  • Method Details

    • zts_init

      public static int zts_init()
    • zts_init_from_storage

      public static int zts_init_from_storage​(java.lang.String path)
    • zts_init_set_event_handler

      public static int zts_init_set_event_handler​(ZeroTierEventListener callbackClass)
    • zts_init_set_port

      public static int zts_init_set_port​(short port)
    • zts_init_blacklist_if

      public static int zts_init_blacklist_if​(java.lang.String prefix, int len)
    • zts_init_allow_net_cache

      public static int zts_init_allow_net_cache​(int allowed)
    • zts_init_allow_peer_cache

      public static int zts_init_allow_peer_cache​(int allowed)
    • zts_init_allow_roots_cache

      public static int zts_init_allow_roots_cache​(int allowed)
    • zts_init_allow_id_cache

      public static int zts_init_allow_id_cache​(int allowed)
    • zts_addr_is_assigned

      public static int zts_addr_is_assigned​(long net_id, int family)
    • zts_addr_get_str

      public static java.lang.String zts_addr_get_str​(long net_id, int family)
    • zts_addr_compute_rfc4193_str

      public static int zts_addr_compute_rfc4193_str​(long net_id, long node_id, java.lang.String dst, int len)
    • zts_addr_compute_6plane_str

      public static int zts_addr_compute_6plane_str​(long net_id, long node_id, java.lang.String dst, int len)
    • zts_net_compute_adhoc_id

      public static long zts_net_compute_adhoc_id​(short start_port, short end_port)
    • zts_net_join

      public static int zts_net_join​(long net_id)
    • zts_net_leave

      public static int zts_net_leave​(long net_id)
    • zts_net_transport_is_ready

      public static int zts_net_transport_is_ready​(long net_id)
    • zts_net_get_mac

      public static long zts_net_get_mac​(long net_id)
    • zts_net_get_mac_str

      public static java.lang.String zts_net_get_mac_str​(long net_id)
    • zts_net_get_broadcast

      public static int zts_net_get_broadcast​(long net_id)
    • zts_net_get_mtu

      public static int zts_net_get_mtu​(long net_id)
    • zts_net_get_name

      public static int zts_net_get_name​(long net_id, java.lang.String dst, int len)
    • zts_net_get_status

      public static int zts_net_get_status​(long net_id)
    • zts_net_get_type

      public static int zts_net_get_type​(long net_id)
    • zts_route_is_assigned

      public static int zts_route_is_assigned​(long net_id, int family)
    • zts_node_start

      public static int zts_node_start()
    • zts_node_is_online

      public static int zts_node_is_online()
    • zts_node_get_id

      public static long zts_node_get_id()
    • zts_node_get_port

      public static int zts_node_get_port()
    • zts_node_stop

      public static int zts_node_stop()
    • zts_node_free

      public static int zts_node_free()
    • zts_moon_orbit

      public static int zts_moon_orbit​(long moon_roots_id, long moon_seed)
    • zts_moon_deorbit

      public static int zts_moon_deorbit​(long moon_roots_id)
    • zts_connect

      public static int zts_connect​(int fd, java.lang.String ipstr, int port, int timeout_ms)
    • zts_bind

      public static int zts_bind​(int fd, java.lang.String ipstr, int port)
    • zts_set_no_delay

      public static int zts_set_no_delay​(int fd, int enabled)
    • zts_get_no_delay

      public static int zts_get_no_delay​(int fd)
    • zts_set_linger

      public static int zts_set_linger​(int fd, int enabled, int value)
    • zts_get_linger_enabled

      public static int zts_get_linger_enabled​(int fd)
    • zts_get_linger_value

      public static int zts_get_linger_value​(int fd)
    • zts_get_pending_data_size

      public static int zts_get_pending_data_size​(int fd)
    • zts_set_reuse_addr

      public static int zts_set_reuse_addr​(int fd, int enabled)
    • zts_get_reuse_addr

      public static int zts_get_reuse_addr​(int fd)
    • zts_set_recv_timeout

      public static int zts_set_recv_timeout​(int fd, int seconds, int microseconds)
    • zts_get_recv_timeout

      public static int zts_get_recv_timeout​(int fd)
    • zts_set_send_timeout

      public static int zts_set_send_timeout​(int fd, int seconds, int microseconds)
    • zts_get_send_timeout

      public static int zts_get_send_timeout​(int fd)
    • zts_set_send_buf_size

      public static int zts_set_send_buf_size​(int fd, int size)
    • zts_get_send_buf_size

      public static int zts_get_send_buf_size​(int fd)
    • zts_set_recv_buf_size

      public static int zts_set_recv_buf_size​(int fd, int size)
    • zts_get_recv_buf_size

      public static int zts_get_recv_buf_size​(int fd)
    • zts_set_ttl

      public static int zts_set_ttl​(int fd, int ttl)
    • zts_get_ttl

      public static int zts_get_ttl​(int fd)
    • zts_set_blocking

      public static int zts_set_blocking​(int fd, int enabled)
    • zts_get_blocking

      public static int zts_get_blocking​(int fd)
    • zts_set_keepalive

      public static int zts_set_keepalive​(int fd, int enabled)
    • zts_get_keepalive

      public static int zts_get_keepalive​(int fd)
    • zts_core_lock_obtain

      public static int zts_core_lock_obtain()
    • zts_core_lock_release

      public static int zts_core_lock_release()
    • zts_core_query_addr_count

      public static int zts_core_query_addr_count​(long net_id)
    • zts_core_query_addr

      public static int zts_core_query_addr​(long net_id, int idx, java.lang.String addr, int len)
    • zts_core_query_route_count

      public static int zts_core_query_route_count​(long net_id)
    • zts_core_query_path_count

      public static int zts_core_query_path_count​(long peer_id)
    • zts_core_query_path

      public static int zts_core_query_path​(long peer_id, int idx, java.lang.String dst, int len)
    • zts_core_query_mc_count

      public static int zts_core_query_mc_count​(long net_id)
    • zts_util_delay

      public static void zts_util_delay​(long milliseconds)
    • zts_bsd_socket

      public static int zts_bsd_socket​(int family, int type, int protocol)
    • zts_bsd_listen

      public static int zts_bsd_listen​(int fd, int backlog)
    • zts_bsd_accept

      public static int zts_bsd_accept​(int fd, com.zerotier.sockets.ZeroTierSocketAddress addr)
    • zts_bsd_read

      public static int zts_bsd_read​(int fd, byte[] buf)
    • zts_bsd_read_offset

      public static int zts_bsd_read_offset​(int fd, byte[] buf, int offset, int len)
    • zts_bsd_read_length

      public static int zts_bsd_read_length​(int fd, byte[] buf, int len)
    • zts_bsd_recv

      public static int zts_bsd_recv​(int fd, byte[] buf, int flags)
    • zts_bsd_recvfrom

      public static int zts_bsd_recvfrom​(int fd, byte[] buf, int flags, com.zerotier.sockets.ZeroTierSocketAddress addr)
    • zts_bsd_write

      public static int zts_bsd_write​(int fd, byte[] buf)
    • zts_bsd_write_byte

      public static int zts_bsd_write_byte​(int fd, byte b)
    • zts_bsd_write_offset

      public static int zts_bsd_write_offset​(int fd, byte[] buf, int offset, int len)
    • zts_bsd_sendto

      public static int zts_bsd_sendto​(int fd, byte[] buf, int flags, com.zerotier.sockets.ZeroTierSocketAddress addr)
    • zts_bsd_send

      public static int zts_bsd_send​(int fd, byte[] buf, int flags)
    • zts_bsd_shutdown

      public static int zts_bsd_shutdown​(int fd, int how)
    • zts_bsd_close

      public static int zts_bsd_close​(int fd)
    • zts_bsd_getsockname

      public static boolean zts_bsd_getsockname​(int fd, com.zerotier.sockets.ZeroTierSocketAddress addr)
    • zts_bsd_getpeername

      public static int zts_bsd_getpeername​(int fd, com.zerotier.sockets.ZeroTierSocketAddress addr)
    • zts_bsd_fcntl

      public static int zts_bsd_fcntl​(int sock, int cmd, int flag)
    • zts_bsd_select

      public static int zts_bsd_select​(int nfds, com.zerotier.sockets.ZeroTierFileDescriptorSet readfds, com.zerotier.sockets.ZeroTierFileDescriptorSet writefds, com.zerotier.sockets.ZeroTierFileDescriptorSet exceptfds, int timeout_sec, int timeout_usec)