1package netlink
2
3import (
4	"fmt"
5	"net"
6)
7
8// Neigh represents a link layer neighbor from netlink.
9type Neigh struct {
10	LinkIndex    int
11	Family       int
12	State        int
13	Type         int
14	Flags        int
15	IP           net.IP
16	HardwareAddr net.HardwareAddr
17	LLIPAddr     net.IP //Used in the case of NHRP
18	Vlan         int
19	VNI          int
20	MasterIndex  int
21}
22
23// String returns $ip/$hwaddr $label
24func (neigh *Neigh) String() string {
25	return fmt.Sprintf("%s %s", neigh.IP, neigh.HardwareAddr)
26}
27
28// NeighUpdate is sent when a neighbor changes - type is RTM_NEWNEIGH or RTM_DELNEIGH.
29type NeighUpdate struct {
30	Type uint16
31	Neigh
32}
33