mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-13 14:34:35 +03:00
arpdb: imp docs
This commit is contained in:
parent
2738383303
commit
355136e6e2
@ -77,11 +77,13 @@ func newNeighbor(host, ipStr, macStr string) (n *Neighbor, err error) {
|
||||
|
||||
ip, err := netip.ParseAddr(ipStr)
|
||||
if err != nil {
|
||||
// Don't wrap the error, as it will get annotated.
|
||||
return nil, err
|
||||
}
|
||||
|
||||
mac, err := net.ParseMAC(macStr)
|
||||
if err != nil {
|
||||
// Don't wrap the error, as it will get annotated.
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -155,6 +157,8 @@ func (ns *neighs) reset(with []Neighbor) {
|
||||
// parseNeighsFunc parses the text from sc as if it'd be an output of some
|
||||
// ARP-related command. lenHint is a hint for the size of the allocated slice
|
||||
// of Neighbors.
|
||||
//
|
||||
// TODO(s.chzhen): Return []*Neighbor instead.
|
||||
type parseNeighsFunc func(logger *slog.Logger, sc *bufio.Scanner, lenHint int) (ns []Neighbor)
|
||||
|
||||
// cmdARPDB is the implementation of the [Interface] that uses command line to
|
||||
|
Loading…
Reference in New Issue
Block a user