interface.go 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. // +build darwin dragonfly freebsd netbsd openbsd
  5. package route
  6. // An InterfaceMessage represents an interface message.
  7. type InterfaceMessage struct {
  8. Version int // message version
  9. Type int // message type
  10. Flags int // interface flags
  11. Index int // interface index
  12. Name string // interface name
  13. Addrs []Addr // addresses
  14. extOff int // offset of header extension
  15. raw []byte // raw message
  16. }
  17. // An InterfaceAddrMessage represents an interface address message.
  18. type InterfaceAddrMessage struct {
  19. Version int // message version
  20. Type int // message type
  21. Flags int // interface flags
  22. Index int // interface index
  23. Addrs []Addr // addresses
  24. raw []byte // raw message
  25. }
  26. // Sys implements the Sys method of Message interface.
  27. func (m *InterfaceAddrMessage) Sys() []Sys { return nil }
  28. // An InterfaceMulticastAddrMessage represents an interface multicast
  29. // address message.
  30. type InterfaceMulticastAddrMessage struct {
  31. Version int // message version
  32. Type int // message type
  33. Flags int // interface flags
  34. Index int // interface index
  35. Addrs []Addr // addresses
  36. raw []byte // raw message
  37. }
  38. // Sys implements the Sys method of Message interface.
  39. func (m *InterfaceMulticastAddrMessage) Sys() []Sys { return nil }
  40. // An InterfaceAnnounceMessage represents an interface announcement
  41. // message.
  42. type InterfaceAnnounceMessage struct {
  43. Version int // message version
  44. Type int // message type
  45. Index int // interface index
  46. Name string // interface name
  47. What int // what type of announcement
  48. raw []byte // raw message
  49. }
  50. // Sys implements the Sys method of Message interface.
  51. func (m *InterfaceAnnounceMessage) Sys() []Sys { return nil }