mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
f2614f2107
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
22 lines
400 B
Go
22 lines
400 B
Go
package netlink
|
|
|
|
import (
|
|
"fmt"
|
|
"net"
|
|
)
|
|
|
|
// Neigh represents a link layer neighbor from netlink.
|
|
type Neigh struct {
|
|
LinkIndex int
|
|
Family int
|
|
State int
|
|
Type int
|
|
Flags int
|
|
IP net.IP
|
|
HardwareAddr net.HardwareAddr
|
|
}
|
|
|
|
// String returns $ip/$hwaddr $label
|
|
func (neigh *Neigh) String() string {
|
|
return fmt.Sprintf("%s %s", neigh.IP, neigh.HardwareAddr)
|
|
}
|