package interfaces

import "github.com/insomniacslk/dhcp/interfaces"

Index

Functions

func BindToInterface

func BindToInterface(fd int, ifname string) error

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

func GetLoopbackInterfaces() ([]net.Interface, error)

GetLoopbackInterfaces returns a list of loopback interfaces.

func GetNonLoopbackInterfaces

func GetNonLoopbackInterfaces() ([]net.Interface, error)

GetNonLoopbackInterfaces returns a list of non-loopback interfaces.

Types

type InterfaceMatcher

type InterfaceMatcher func(net.Interface) bool

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.