options

package
v0.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package options abstract setting common networking sys flags on the selected namespaces

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(link string, option ...Option) error

Set link options

func SetIPv6AcceptRA

func SetIPv6AcceptRA(f RouterAdvertisements) error

SetIPv6AcceptRA enables or disables forwarding for ipv6

func SetIPv6Forwarding

func SetIPv6Forwarding(f bool) error

SetIPv6Forwarding enables or disables forwarding for ipv6

func SetIPv6LearnDefaultRouteInRA

func SetIPv6LearnDefaultRouteInRA(f bool) error

SetIPv6LearnDefaultRouteInRA Learn default router in Router Advertisement.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option interface

func AcceptRA

func AcceptRA(f RouterAdvertisements) Option

AcceptRA enables or disables forwarding for ipv6

func IPv6Disable

func IPv6Disable(f bool) Option

IPv6Disable disabled Ipv6 on interface

func LearnDefaultRouteInRA

func LearnDefaultRouteInRA(f bool) Option

LearnDefaultRouteInRA Learn default router in Router Advertisement.

func ProxyArp

func ProxyArp(f bool) Option

ProxyArp sets proxy arp on interface

type RouterAdvertisements

type RouterAdvertisements int

RouterAdvertisements flag

const (
	//RAOff Do not accept Router Advertisements
	RAOff RouterAdvertisements = iota
	//RAAcceptIfForwardingIsDisabled Accept Router Advertisements if forwarding is disabled
	RAAcceptIfForwardingIsDisabled
	//RAAcceptIfForwardingIsEnabled Overrule forwarding behaviour. Accept Router Advertisements even if forwarding is enabled.
	RAAcceptIfForwardingIsEnabled
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL