Documentation ¶
Index ¶
- Variables
- func Add(ctx context.Context, ifaceName string, addr netip.Prefix) error
- func EnableIPForwarding() error
- func GetDefaultGateway(ctx context.Context) (netip.Addr, error)
- func Remove(ctx context.Context, ifaceName string, addr netip.Prefix) error
- func SetDefaultIPv4Gateway(ctx context.Context, gateway netip.Addr) error
- func SetDefaultIPv6Gateway(ctx context.Context, gateway netip.Addr) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRouteExists = errors.New("route already exists")
Functions ¶
func GetDefaultGateway ¶
GetDefaultGateway returns the default gateway of the current system.
func SetDefaultIPv4Gateway ¶
SetDefaultIPv4Gateway sets the default IPv4 gateway for the current system.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.