mirror of https://github.com/k3s-io/k3s
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
448 B
24 lines
448 B
6 years ago
|
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
|
||
|
LLIPAddr net.IP //Used in the case of NHRP
|
||
|
}
|
||
|
|
||
|
// String returns $ip/$hwaddr $label
|
||
|
func (neigh *Neigh) String() string {
|
||
|
return fmt.Sprintf("%s %s", neigh.IP, neigh.HardwareAddr)
|
||
|
}
|