neigh.go 400 B

1234567891011121314151617181920212223
  1. package netlink
  2. import (
  3. "fmt"
  4. "net"
  5. )
  6. // Neigh represents a link layer neighbor from netlink.
  7. type Neigh struct {
  8. LinkIndex int
  9. Family int
  10. State int
  11. Type int
  12. Flags int
  13. IP net.IP
  14. HardwareAddr net.HardwareAddr
  15. }
  16. // String returns $ip/$hwaddr $label
  17. func (neigh *Neigh) String() string {
  18. return fmt.Sprintf("%s %s", neigh.IP, neigh.HardwareAddr)
  19. }