Documentation ¶
Index ¶
- type IPAddressInfo
- type IPAddressSet
- type InvalidInterfaceError
- type Table
- func (t *Table) Add(hw net.HardwareAddr, addr netip.Addr, ttl time.Duration, ...) bool
- func (t *Table) Contains(hw net.HardwareAddr) bool
- func (t *Table) Filter(hws []net.HardwareAddr, prefixes []netip.Prefix) []*IPAddressInfo
- func (t *Table) PrettyPrint(tabSize int) string
- func (t *Table) Remove(hw net.HardwareAddr)
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPAddressInfo ¶
type IPAddressInfo struct { Address netip.Addr Hw net.HardwareAddr // contains filtered or unexported fields }
func NewIPAddressInfo ¶
func NewIPAddressInfo(hw net.HardwareAddr, addr netip.Addr, ttl time.Duration, onExpiration func(*IPAddressInfo, int)) *IPAddressInfo
func (*IPAddressInfo) Clear ¶
func (i *IPAddressInfo) Clear()
func (*IPAddressInfo) Extend ¶
func (i *IPAddressInfo) Extend(ttl time.Duration)
func (*IPAddressInfo) GetAddress ¶
func (i *IPAddressInfo) GetAddress() netip.Addr
func (*IPAddressInfo) GetExpiration ¶
func (i *IPAddressInfo) GetExpiration() time.Time
func (*IPAddressInfo) IsStillValid ¶
func (i *IPAddressInfo) IsStillValid() bool
type IPAddressSet ¶
type IPAddressSet struct {
// contains filtered or unexported fields
}
func NewIPAddressSet ¶
func NewIPAddressSet() *IPAddressSet
func (*IPAddressSet) Add ¶
func (s *IPAddressSet) Add(hw net.HardwareAddr, addr netip.Addr, ttl time.Duration, onExpiration func(*IPAddressInfo, int)) bool
Add an IPv6 address to the set with a TTL (in seconds).
func (*IPAddressSet) Contains ¶
func (s *IPAddressSet) Contains(addr netip.Addr) bool
Check if an IPv6 address exists in the set and is not expired.
func (*IPAddressSet) PrettyPrint ¶
func (s *IPAddressSet) PrettyPrint(tabSize int) string
func (*IPAddressSet) Remove ¶
func (s *IPAddressSet) Remove(addr netip.Addr)
Remove an IPv6 address from the set.
type InvalidInterfaceError ¶ added in v0.1.2
type InvalidInterfaceError struct {
// contains filtered or unexported fields
}
func (*InvalidInterfaceError) Error ¶ added in v0.1.2
func (e *InvalidInterfaceError) Error() string
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) Add ¶
func (t *Table) Add(hw net.HardwareAddr, addr netip.Addr, ttl time.Duration, onExpiration func(*IPAddressInfo, int)) bool
Add macs address to the set with a TTL (in seconds).
func (*Table) Contains ¶
func (t *Table) Contains(hw net.HardwareAddr) bool
Check if an MAC address exists in the set and is not expired.
func (*Table) Filter ¶
func (t *Table) Filter(hws []net.HardwareAddr, prefixes []netip.Prefix) []*IPAddressInfo
func (*Table) PrettyPrint ¶
func (*Table) Remove ¶
func (t *Table) Remove(hw net.HardwareAddr)
Remove an MACs address from the set.
Click to show internal directories.
Click to hide internal directories.