interface.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // Copyright 2016 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build darwin || dragonfly || freebsd || netbsd || openbsd
  5. // +build darwin dragonfly freebsd netbsd openbsd
  6. package route
  7. // An InterfaceMessage represents an interface message.
  8. type InterfaceMessage struct {
  9. Version int // message version
  10. Type int // message type
  11. Flags int // interface flags
  12. Index int // interface index
  13. Name string // interface name
  14. Addrs []Addr // addresses
  15. extOff int // offset of header extension
  16. raw []byte // raw message
  17. }
  18. // An InterfaceAddrMessage represents an interface address message.
  19. type InterfaceAddrMessage struct {
  20. Version int // message version
  21. Type int // message type
  22. Flags int // interface flags
  23. Index int // interface index
  24. Addrs []Addr // addresses
  25. raw []byte // raw message
  26. }
  27. // Sys implements the Sys method of Message interface.
  28. func (m *InterfaceAddrMessage) Sys() []Sys { return nil }
  29. // An InterfaceMulticastAddrMessage represents an interface multicast
  30. // address message.
  31. type InterfaceMulticastAddrMessage struct {
  32. Version int // message version
  33. Type int // message type
  34. Flags int // interface flags
  35. Index int // interface index
  36. Addrs []Addr // addresses
  37. raw []byte // raw message
  38. }
  39. // Sys implements the Sys method of Message interface.
  40. func (m *InterfaceMulticastAddrMessage) Sys() []Sys { return nil }
  41. // An InterfaceAnnounceMessage represents an interface announcement
  42. // message.
  43. type InterfaceAnnounceMessage struct {
  44. Version int // message version
  45. Type int // message type
  46. Index int // interface index
  47. Name string // interface name
  48. What int // what type of announcement
  49. raw []byte // raw message
  50. }
  51. // Sys implements the Sys method of Message interface.
  52. func (m *InterfaceAnnounceMessage) Sys() []Sys { return nil }