mirror of
https://github.com/vishvananda/netlink
synced 2025-01-25 00:46:00 +00:00
921f7441f1
The ip neighbour supports adding of peers statically using commands where the lladdr is an IP address. ip neighbor add 10.0.0.2 lladdr 203.0.113.6 dev tun8 This is used in the case of point-to-multipoint GRE to setup the remote end point of the tunnel Note that link-layer address and neighbor address are both IP addresses Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
24 lines
448 B
Go
24 lines
448 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
|
|
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)
|
|
}
|