path.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c)2019 ZeroTier, Inc.
  3. *
  4. * Use of this software is governed by the Business Source License included
  5. * in the LICENSE.TXT file in the project's root directory.
  6. *
  7. * Change Date: 2023-01-01
  8. *
  9. * On the date above, in accordance with the Business Source License, use
  10. * of this software will be governed by version 2.0 of the Apache License.
  11. */
  12. /****/
  13. package zerotier
  14. import "net"
  15. // Path is a path to another peer on the network
  16. type Path struct {
  17. IP net.IP `json:"ip"`
  18. Port int `json:"port"`
  19. LastSend int64 `json:"lastSend"`
  20. LastReceive int64 `json:"lastReceive"`
  21. TrustedPathID uint64 `json:"trustedPathID"`
  22. Latency float32 `json:"latency"`
  23. PacketDelayVariance float32 `json:"packetDelayVariance"`
  24. ThroughputDisturbCoeff float32 `json:"throughputDisturbCoeff"`
  25. PacketErrorRatio float32 `json:"packetErrorRatio"`
  26. PacketLossRatio float32 `json:"packetLossRatio"`
  27. Stability float32 `json:"stability"`
  28. Throughput uint64 `json:"throughput"`
  29. MaxThroughput uint64 `json:"maxThroughput"`
  30. Allocation float32 `json:"allocation"`
  31. }