utils_freebsd.go 909 B

1234567891011121314151617181920212223
  1. package netutils
  2. import (
  3. "net"
  4. "github.com/docker/libnetwork/types"
  5. )
  6. // ElectInterfaceAddresses looks for an interface on the OS with the specified name
  7. // and returns returns all its IPv4 and IPv6 addresses in CIDR notation.
  8. // If a failure in retrieving the addresses or no IPv4 address is found, an error is returned.
  9. // If the interface does not exist, it chooses from a predefined
  10. // list the first IPv4 address which does not conflict with other
  11. // interfaces on the system.
  12. func ElectInterfaceAddresses(name string) ([]*net.IPNet, []*net.IPNet, error) {
  13. return nil, nil, types.NotImplementedErrorf("not supported on freebsd")
  14. }
  15. // FindAvailableNetwork returns a network from the passed list which does not
  16. // overlap with existing interfaces in the system
  17. func FindAvailableNetwork(list []*net.IPNet) (*net.IPNet, error) {
  18. return nil, types.NotImplementedErrorf("not supported on freebsd")
  19. }