github.com/sagernet/netlink@v0.0.0-20240612041022-b9a21c07ac6a/handle_unspecified.go (about)

     1  //go:build !linux
     2  // +build !linux
     3  
     4  package netlink
     5  
     6  import (
     7  	"net"
     8  	"time"
     9  
    10  	"github.com/vishvananda/netns"
    11  )
    12  
    13  type Handle struct{}
    14  
    15  func NewHandle(nlFamilies ...int) (*Handle, error) {
    16  	return nil, ErrNotImplemented
    17  }
    18  
    19  func NewHandleAt(ns netns.NsHandle, nlFamilies ...int) (*Handle, error) {
    20  	return nil, ErrNotImplemented
    21  }
    22  
    23  func NewHandleAtFrom(newNs, curNs netns.NsHandle) (*Handle, error) {
    24  	return nil, ErrNotImplemented
    25  }
    26  
    27  func (h *Handle) Close() {}
    28  
    29  func (h *Handle) Delete() {}
    30  
    31  func (h *Handle) SupportsNetlinkFamily(nlFamily int) bool {
    32  	return false
    33  }
    34  
    35  func (h *Handle) SetSocketTimeout(to time.Duration) error {
    36  	return ErrNotImplemented
    37  }
    38  
    39  func (h *Handle) SetPromiscOn(link Link) error {
    40  	return ErrNotImplemented
    41  }
    42  
    43  func (h *Handle) SetPromiscOff(link Link) error {
    44  	return ErrNotImplemented
    45  }
    46  
    47  func (h *Handle) LinkSetUp(link Link) error {
    48  	return ErrNotImplemented
    49  }
    50  
    51  func (h *Handle) LinkSetDown(link Link) error {
    52  	return ErrNotImplemented
    53  }
    54  
    55  func (h *Handle) LinkSetMTU(link Link, mtu int) error {
    56  	return ErrNotImplemented
    57  }
    58  
    59  func (h *Handle) LinkSetName(link Link, name string) error {
    60  	return ErrNotImplemented
    61  }
    62  
    63  func (h *Handle) LinkSetAlias(link Link, name string) error {
    64  	return ErrNotImplemented
    65  }
    66  
    67  func (h *Handle) LinkSetHardwareAddr(link Link, hwaddr net.HardwareAddr) error {
    68  	return ErrNotImplemented
    69  }
    70  
    71  func (h *Handle) LinkSetVfHardwareAddr(link Link, vf int, hwaddr net.HardwareAddr) error {
    72  	return ErrNotImplemented
    73  }
    74  
    75  func (h *Handle) LinkSetVfVlan(link Link, vf, vlan int) error {
    76  	return ErrNotImplemented
    77  }
    78  
    79  func (h *Handle) LinkSetVfVlanQos(link Link, vf, vlan, qos int) error {
    80  	return ErrNotImplemented
    81  }
    82  
    83  func (h *Handle) LinkSetVfTxRate(link Link, vf, rate int) error {
    84  	return ErrNotImplemented
    85  }
    86  
    87  func (h *Handle) LinkSetVfRate(link Link, vf, minRate, maxRate int) error {
    88  	return ErrNotImplemented
    89  }
    90  
    91  func (h *Handle) LinkSetMaster(link Link, master Link) error {
    92  	return ErrNotImplemented
    93  }
    94  
    95  func (h *Handle) LinkSetNoMaster(link Link) error {
    96  	return ErrNotImplemented
    97  }
    98  
    99  func (h *Handle) LinkSetMasterByIndex(link Link, masterIndex int) error {
   100  	return ErrNotImplemented
   101  }
   102  
   103  func (h *Handle) LinkSetNsPid(link Link, nspid int) error {
   104  	return ErrNotImplemented
   105  }
   106  
   107  func (h *Handle) LinkSetNsFd(link Link, fd int) error {
   108  	return ErrNotImplemented
   109  }
   110  
   111  func (h *Handle) LinkAdd(link Link) error {
   112  	return ErrNotImplemented
   113  }
   114  
   115  func (h *Handle) LinkDel(link Link) error {
   116  	return ErrNotImplemented
   117  }
   118  
   119  func (h *Handle) LinkByName(name string) (Link, error) {
   120  	return nil, ErrNotImplemented
   121  }
   122  
   123  func (h *Handle) LinkByAlias(alias string) (Link, error) {
   124  	return nil, ErrNotImplemented
   125  }
   126  
   127  func (h *Handle) LinkByIndex(index int) (Link, error) {
   128  	return nil, ErrNotImplemented
   129  }
   130  
   131  func (h *Handle) LinkList() ([]Link, error) {
   132  	return nil, ErrNotImplemented
   133  }
   134  
   135  func (h *Handle) LinkSetHairpin(link Link, mode bool) error {
   136  	return ErrNotImplemented
   137  }
   138  
   139  func (h *Handle) LinkSetGuard(link Link, mode bool) error {
   140  	return ErrNotImplemented
   141  }
   142  
   143  func (h *Handle) LinkSetFastLeave(link Link, mode bool) error {
   144  	return ErrNotImplemented
   145  }
   146  
   147  func (h *Handle) LinkSetLearning(link Link, mode bool) error {
   148  	return ErrNotImplemented
   149  }
   150  
   151  func (h *Handle) LinkSetRootBlock(link Link, mode bool) error {
   152  	return ErrNotImplemented
   153  }
   154  
   155  func (h *Handle) LinkSetFlood(link Link, mode bool) error {
   156  	return ErrNotImplemented
   157  }
   158  
   159  func (h *Handle) LinkSetTxQLen(link Link, qlen int) error {
   160  	return ErrNotImplemented
   161  }
   162  
   163  func (h *Handle) LinkSetGroup(link Link, group int) error {
   164  	return ErrNotImplemented
   165  }
   166  
   167  func (h *Handle) LinkSetGSOMaxSize(link Link, maxSize int) error {
   168  	return ErrNotImplemented
   169  }
   170  
   171  func (h *Handle) LinkSetGROMaxSize(link Link, maxSize int) error {
   172  	return ErrNotImplemented
   173  }
   174  
   175  func (h *Handle) setProtinfoAttr(link Link, mode bool, attr int) error {
   176  	return ErrNotImplemented
   177  }
   178  
   179  func (h *Handle) AddrAdd(link Link, addr *Addr) error {
   180  	return ErrNotImplemented
   181  }
   182  
   183  func (h *Handle) AddrDel(link Link, addr *Addr) error {
   184  	return ErrNotImplemented
   185  }
   186  
   187  func (h *Handle) AddrList(link Link, family int) ([]Addr, error) {
   188  	return nil, ErrNotImplemented
   189  }
   190  
   191  func (h *Handle) ClassDel(class Class) error {
   192  	return ErrNotImplemented
   193  }
   194  
   195  func (h *Handle) ClassChange(class Class) error {
   196  	return ErrNotImplemented
   197  }
   198  
   199  func (h *Handle) ClassReplace(class Class) error {
   200  	return ErrNotImplemented
   201  }
   202  
   203  func (h *Handle) ClassAdd(class Class) error {
   204  	return ErrNotImplemented
   205  }
   206  
   207  func (h *Handle) ClassList(link Link, parent uint32) ([]Class, error) {
   208  	return nil, ErrNotImplemented
   209  }
   210  
   211  func (h *Handle) FilterDel(filter Filter) error {
   212  	return ErrNotImplemented
   213  }
   214  
   215  func (h *Handle) FilterAdd(filter Filter) error {
   216  	return ErrNotImplemented
   217  }
   218  
   219  func (h *Handle) FilterList(link Link, parent uint32) ([]Filter, error) {
   220  	return nil, ErrNotImplemented
   221  }
   222  
   223  func (h *Handle) NeighAdd(neigh *Neigh) error {
   224  	return ErrNotImplemented
   225  }
   226  
   227  func (h *Handle) NeighSet(neigh *Neigh) error {
   228  	return ErrNotImplemented
   229  }
   230  
   231  func (h *Handle) NeighAppend(neigh *Neigh) error {
   232  	return ErrNotImplemented
   233  }
   234  
   235  func (h *Handle) NeighDel(neigh *Neigh) error {
   236  	return ErrNotImplemented
   237  }
   238  
   239  func (h *Handle) NeighList(linkIndex, family int) ([]Neigh, error) {
   240  	return nil, ErrNotImplemented
   241  }
   242  
   243  func (h *Handle) NeighProxyList(linkIndex, family int) ([]Neigh, error) {
   244  	return nil, ErrNotImplemented
   245  }
   246  
   247  func (h *Handle) RouteAdd(route *Route) error {
   248  	return ErrNotImplemented
   249  }
   250  
   251  func (h *Handle) RouteAppend(route *Route) error {
   252  	return ErrNotImplemented
   253  }
   254  
   255  func (h *Handle) RouteDel(route *Route) error {
   256  	return ErrNotImplemented
   257  }
   258  
   259  func (h *Handle) RouteGet(destination net.IP) ([]Route, error) {
   260  	return nil, ErrNotImplemented
   261  }
   262  
   263  func (h *Handle) RouteList(link Link, family int) ([]Route, error) {
   264  	return nil, ErrNotImplemented
   265  }
   266  
   267  func (h *Handle) RouteListFiltered(family int, filter *Route, filterMask uint64) ([]Route, error) {
   268  	return nil, ErrNotImplemented
   269  }
   270  
   271  func (h *Handle) RouteReplace(route *Route) error {
   272  	return ErrNotImplemented
   273  }
   274  
   275  func (h *Handle) RuleAdd(rule *Rule) error {
   276  	return ErrNotImplemented
   277  }
   278  
   279  func (h *Handle) RuleDel(rule *Rule) error {
   280  	return ErrNotImplemented
   281  }
   282  
   283  func (h *Handle) RuleList(family int) ([]Rule, error) {
   284  	return nil, ErrNotImplemented
   285  }