mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +00:00
49 lines
1.2 KiB
Go
49 lines
1.2 KiB
Go
package systemops
|
|
|
|
import (
|
|
"errors"
|
|
"net"
|
|
"net/netip"
|
|
|
|
"github.com/netbirdio/netbird/client/internal/statemanager"
|
|
)
|
|
|
|
var ErrRouteNotSupported = errors.New("route operations not supported on js")
|
|
|
|
func (r *SysOps) addToRouteTable(prefix netip.Prefix, nexthop Nexthop) error {
|
|
return ErrRouteNotSupported
|
|
}
|
|
|
|
func (r *SysOps) removeFromRouteTable(prefix netip.Prefix, nexthop Nexthop) error {
|
|
return ErrRouteNotSupported
|
|
}
|
|
|
|
func GetRoutesFromTable() ([]netip.Prefix, error) {
|
|
return []netip.Prefix{}, nil
|
|
}
|
|
|
|
func hasSeparateRouting() ([]netip.Prefix, error) {
|
|
return []netip.Prefix{}, nil
|
|
}
|
|
|
|
// GetDetailedRoutesFromTable returns empty routes for WASM.
|
|
func GetDetailedRoutesFromTable() ([]DetailedRoute, error) {
|
|
return []DetailedRoute{}, nil
|
|
}
|
|
|
|
func (r *SysOps) AddVPNRoute(prefix netip.Prefix, intf *net.Interface) error {
|
|
return ErrRouteNotSupported
|
|
}
|
|
|
|
func (r *SysOps) RemoveVPNRoute(prefix netip.Prefix, intf *net.Interface) error {
|
|
return ErrRouteNotSupported
|
|
}
|
|
|
|
func (r *SysOps) SetupRouting(initAddresses []net.IP, stateManager *statemanager.Manager, _ bool) error {
|
|
return nil
|
|
}
|
|
|
|
func (r *SysOps) CleanupRouting(stateManager *statemanager.Manager, _ bool) error {
|
|
return nil
|
|
}
|