Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHWAddrNotFound error = errors.New("hardware address not found") ErrIPAddrNotFound error = errors.New("IP address not found") ErrBadHWAddrFormat error = errors.New("Malformed hardware address address") ErrBadIPFormat error = errors.New("Malformed IP address") ErrBadBindingFormat error = errors.New("Malformed Binding Pair") ErrDuplicateFound error = errors.New("Entry already found") )
Functions ¶
This section is empty.
Types ¶
type Binding ¶
type Binding struct { HW net.HardwareAddr IP net.IP }
Binding represents the binding between a MAC and an IP
func ParseBinding ¶
ParseBinding creates a Binding between a MAC and a IP, expressed as strings
func ParseBindingString ¶
ParseBindingString parses a string in the dhcphosts format (man 8 dnsmasq) and returns a Binding
func (Binding) EqualHW ¶
func (b Binding) EqualHW(x net.HardwareAddr) bool
EqualHW returns true if the Binding has the MAC part equal to the argument, false otherwise
Click to show internal directories.
Click to hide internal directories.