package interfaces
import "github.com/insomniacslk/dhcp/interfaces"
Index ¶
- func BindToInterface(fd int, ifname string) error
- func GetInterfacesFunc(matcher InterfaceMatcher) ([]net.Interface, error)
- func GetLoopbackInterfaces() ([]net.Interface, error)
- func GetNonLoopbackInterfaces() ([]net.Interface, error)
- type InterfaceMatcher
Functions ¶
func BindToInterface ¶
func GetInterfacesFunc ¶
func GetInterfacesFunc(matcher InterfaceMatcher) ([]net.Interface, error)
GetInterfacesFunc loops through the available network interfaces, and returns a list of interfaces for which the passed InterfaceMatcher function returns true.
func GetLoopbackInterfaces ¶
GetLoopbackInterfaces returns a list of loopback interfaces.
func GetNonLoopbackInterfaces ¶
GetNonLoopbackInterfaces returns a list of non-loopback interfaces.
Types ¶
type InterfaceMatcher ¶
InterfaceMatcher is a function type used to match the interfaces we want. See GetInterfacesFunc below for usage.
Source Files ¶
bindtodevice_linux.go interfaces.go
- Version
- v0.0.0-20250109001534-8abf58130905 (latest)
- Published
- Jan 9, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 2 months ago –
Tools for package owners.