route.go 746 B

12345678910111213141516171819202122232425262728
  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. // Route represents a route in a host's routing table
  16. type Route struct {
  17. // Target for this route
  18. Target net.IPNet
  19. // Via is how to reach this target (null/empty if the target IP range is local to this virtual LAN)
  20. Via net.IP
  21. // Metric is an interface metric that can affect route priority (behavior can be OS-specific)
  22. Metric int
  23. }