handle_unspecified.go 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. // +build !linux
  2. package netlink
  3. import (
  4. "net"
  5. "time"
  6. "github.com/vishvananda/netns"
  7. )
  8. type Handle struct{}
  9. func NewHandle(nlFamilies ...int) (*Handle, error) {
  10. return nil, ErrNotImplemented
  11. }
  12. func NewHandleAt(ns netns.NsHandle, nlFamilies ...int) (*Handle, error) {
  13. return nil, ErrNotImplemented
  14. }
  15. func NewHandleAtFrom(newNs, curNs netns.NsHandle) (*Handle, error) {
  16. return nil, ErrNotImplemented
  17. }
  18. func (h *Handle) Delete() {}
  19. func (h *Handle) SupportsNetlinkFamily(nlFamily int) bool {
  20. return false
  21. }
  22. func (h *Handle) SetSocketTimeout(to time.Duration) error {
  23. return ErrNotImplemented
  24. }
  25. func (h *Handle) SetPromiscOn(link Link) error {
  26. return ErrNotImplemented
  27. }
  28. func (h *Handle) SetPromiscOff(link Link) error {
  29. return ErrNotImplemented
  30. }
  31. func (h *Handle) LinkSetUp(link Link) error {
  32. return ErrNotImplemented
  33. }
  34. func (h *Handle) LinkSetDown(link Link) error {
  35. return ErrNotImplemented
  36. }
  37. func (h *Handle) LinkSetMTU(link Link, mtu int) error {
  38. return ErrNotImplemented
  39. }
  40. func (h *Handle) LinkSetName(link Link, name string) error {
  41. return ErrNotImplemented
  42. }
  43. func (h *Handle) LinkSetAlias(link Link, name string) error {
  44. return ErrNotImplemented
  45. }
  46. func (h *Handle) LinkSetHardwareAddr(link Link, hwaddr net.HardwareAddr) error {
  47. return ErrNotImplemented
  48. }
  49. func (h *Handle) LinkSetVfHardwareAddr(link Link, vf int, hwaddr net.HardwareAddr) error {
  50. return ErrNotImplemented
  51. }
  52. func (h *Handle) LinkSetVfVlan(link Link, vf, vlan int) error {
  53. return ErrNotImplemented
  54. }
  55. func (h *Handle) LinkSetVfTxRate(link Link, vf, rate int) error {
  56. return ErrNotImplemented
  57. }
  58. func (h *Handle) LinkSetMaster(link Link, master *Bridge) error {
  59. return ErrNotImplemented
  60. }
  61. func (h *Handle) LinkSetNoMaster(link Link) error {
  62. return ErrNotImplemented
  63. }
  64. func (h *Handle) LinkSetMasterByIndex(link Link, masterIndex int) error {
  65. return ErrNotImplemented
  66. }
  67. func (h *Handle) LinkSetNsPid(link Link, nspid int) error {
  68. return ErrNotImplemented
  69. }
  70. func (h *Handle) LinkSetNsFd(link Link, fd int) error {
  71. return ErrNotImplemented
  72. }
  73. func (h *Handle) LinkAdd(link Link) error {
  74. return ErrNotImplemented
  75. }
  76. func (h *Handle) LinkDel(link Link) error {
  77. return ErrNotImplemented
  78. }
  79. func (h *Handle) LinkByName(name string) (Link, error) {
  80. return nil, ErrNotImplemented
  81. }
  82. func (h *Handle) LinkByAlias(alias string) (Link, error) {
  83. return nil, ErrNotImplemented
  84. }
  85. func (h *Handle) LinkByIndex(index int) (Link, error) {
  86. return nil, ErrNotImplemented
  87. }
  88. func (h *Handle) LinkList() ([]Link, error) {
  89. return nil, ErrNotImplemented
  90. }
  91. func (h *Handle) LinkSetHairpin(link Link, mode bool) error {
  92. return ErrNotImplemented
  93. }
  94. func (h *Handle) LinkSetGuard(link Link, mode bool) error {
  95. return ErrNotImplemented
  96. }
  97. func (h *Handle) LinkSetFastLeave(link Link, mode bool) error {
  98. return ErrNotImplemented
  99. }
  100. func (h *Handle) LinkSetLearning(link Link, mode bool) error {
  101. return ErrNotImplemented
  102. }
  103. func (h *Handle) LinkSetRootBlock(link Link, mode bool) error {
  104. return ErrNotImplemented
  105. }
  106. func (h *Handle) LinkSetFlood(link Link, mode bool) error {
  107. return ErrNotImplemented
  108. }
  109. func (h *Handle) setProtinfoAttr(link Link, mode bool, attr int) error {
  110. return ErrNotImplemented
  111. }
  112. func (h *Handle) AddrAdd(link Link, addr *Addr) error {
  113. return ErrNotImplemented
  114. }
  115. func (h *Handle) AddrDel(link Link, addr *Addr) error {
  116. return ErrNotImplemented
  117. }
  118. func (h *Handle) AddrList(link Link, family int) ([]Addr, error) {
  119. return nil, ErrNotImplemented
  120. }
  121. func (h *Handle) ClassDel(class Class) error {
  122. return ErrNotImplemented
  123. }
  124. func (h *Handle) ClassChange(class Class) error {
  125. return ErrNotImplemented
  126. }
  127. func (h *Handle) ClassReplace(class Class) error {
  128. return ErrNotImplemented
  129. }
  130. func (h *Handle) ClassAdd(class Class) error {
  131. return ErrNotImplemented
  132. }
  133. func (h *Handle) ClassList(link Link, parent uint32) ([]Class, error) {
  134. return nil, ErrNotImplemented
  135. }
  136. func (h *Handle) FilterDel(filter Filter) error {
  137. return ErrNotImplemented
  138. }
  139. func (h *Handle) FilterAdd(filter Filter) error {
  140. return ErrNotImplemented
  141. }
  142. func (h *Handle) FilterList(link Link, parent uint32) ([]Filter, error) {
  143. return nil, ErrNotImplemented
  144. }
  145. func (h *Handle) NeighAdd(neigh *Neigh) error {
  146. return ErrNotImplemented
  147. }
  148. func (h *Handle) NeighSet(neigh *Neigh) error {
  149. return ErrNotImplemented
  150. }
  151. func (h *Handle) NeighAppend(neigh *Neigh) error {
  152. return ErrNotImplemented
  153. }
  154. func (h *Handle) NeighDel(neigh *Neigh) error {
  155. return ErrNotImplemented
  156. }
  157. func (h *Handle) NeighList(linkIndex, family int) ([]Neigh, error) {
  158. return nil, ErrNotImplemented
  159. }
  160. func (h *Handle) NeighProxyList(linkIndex, family int) ([]Neigh, error) {
  161. return nil, ErrNotImplemented
  162. }