interfaces_other.go 474 B

12345678910111213141516171819
  1. // Copyright (C) 2025 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at https://mozilla.org/MPL/2.0/.
  6. //go:build !android
  7. package netutil
  8. import "net"
  9. func Interfaces() ([]net.Interface, error) {
  10. return net.Interfaces()
  11. }
  12. func InterfaceAddrsByInterface(intf *net.Interface) ([]net.Addr, error) {
  13. return intf.Addrs()
  14. }