github.com/searKing/golang/go@v1.2.117/net/addr/local_ip.go (about)

     1  // Copyright 2020 The searKing Author. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package addr
     6  
     7  import (
     8  	"net"
     9  	"time"
    10  
    11  	net_ "github.com/searKing/golang/go/net"
    12  )
    13  
    14  // Deprecated: Use net_.ScoreAddr instead.
    15  func ScoreAddr(iface net.Interface, addr net.Addr) (int, net.IP) {
    16  	return net_.ScoreAddr(iface, addr)
    17  }
    18  
    19  // Deprecated: Use net_.ExpectInterfaceNameFilter instead.
    20  func ExpectInterfaceNameFilter(names ...string) func(iface net.Interface) bool {
    21  	return net_.ExpectInterfaceNameFilter(names...)
    22  }
    23  
    24  // Deprecated: Use net_.ExceptInterfaceNameFilter instead.
    25  func ExceptInterfaceNameFilter(names ...string) func(iface net.Interface) bool {
    26  	return net_.ExceptInterfaceNameFilter(names...)
    27  }
    28  
    29  // Deprecated: Use net_.RoutedInterfaceNameFilter instead.
    30  func RoutedInterfaceNameFilter() func(iface net.Interface) bool {
    31  	return net_.RoutedInterfaceNameFilter()
    32  }
    33  
    34  // Deprecated: Use net_.ListenIP instead.
    35  func ListenIP(filters ...func(iface net.Interface) bool) (net.IP, error) {
    36  	return net_.ListenIP(filters...)
    37  }
    38  
    39  // Deprecated: Use net_.ListenMac instead.
    40  func ListenMac(filters ...func(iface net.Interface) bool) (net.HardwareAddr, error) {
    41  	return net_.ListenMac(filters...)
    42  }
    43  
    44  // Deprecated: Use net_.ListenAddr instead.
    45  func ListenAddr(filters ...func(iface net.Interface) bool) (net.HardwareAddr, net.IP, error) {
    46  	return net_.ListenAddr(filters...)
    47  }
    48  
    49  // Deprecated: Use net_.DialIP instead.
    50  func DialIP(network, address string, timeout time.Duration) (net.IP, error) {
    51  	return net_.DialIP(network, address, timeout)
    52  }
    53  
    54  // Deprecated: Use net_.ServeIP instead.
    55  func ServeIP(networks, addresses []string, timeout time.Duration) (net.IP, error) {
    56  	return net_.ServeIP(networks, addresses, timeout)
    57  }