networkutils

package
v1.15.22 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzureDNS  = "168.63.129.16"
	AzureIMDS = "169.254.169.254"
)

known IP's

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkUtils

type NetworkUtils struct {
	// contains filtered or unexported fields
}

func NewNetworkUtils

func NewNetworkUtils(nl netlink.NetlinkInterface, plClient platform.ExecClient) NetworkUtils

func (NetworkUtils) AddSnatRule added in v1.5.17

func (nu NetworkUtils) AddSnatRule(iptablesClient ipTablesClient, match string, ip net.IP) error

This function adds rule which snat to ip passed filtered by match string.

func (NetworkUtils) AllowIPAddresses added in v1.5.17

func (nu NetworkUtils) AllowIPAddresses(iptablesClient ipTablesClient, bridgeName string, skipAddresses []string, action string) error

func (NetworkUtils) AssignIPToInterface

func (nu NetworkUtils) AssignIPToInterface(interfaceName string, ipAddresses []net.IPNet) error

func (NetworkUtils) BlockEgressTrafficFromContainer added in v1.5.17

func (nu NetworkUtils) BlockEgressTrafficFromContainer(iptablesClient ipTablesClient, version, ipAddress, protocol string, port int) error

func (NetworkUtils) BlockIPAddresses added in v1.5.17

func (nu NetworkUtils) BlockIPAddresses(iptablesClient ipTablesClient, bridgeName, action string) error

func (NetworkUtils) CreateEndpoint

func (nu NetworkUtils) CreateEndpoint(hostVethName, containerVethName string, macAddress net.HardwareAddr) error

func (NetworkUtils) DisableRAForInterface

func (nu NetworkUtils) DisableRAForInterface(ifName string) error

func (NetworkUtils) EnableIPV4Forwarding

func (nu NetworkUtils) EnableIPV4Forwarding() error

func (NetworkUtils) EnableIPV6Forwarding

func (nu NetworkUtils) EnableIPV6Forwarding() error

func (NetworkUtils) SetProxyArp

func (nu NetworkUtils) SetProxyArp(ifName string) error

func (NetworkUtils) SetupContainerInterface

func (nu NetworkUtils) SetupContainerInterface(containerVethName, targetIfName string) error

func (NetworkUtils) UpdateIPV6Setting

func (nu NetworkUtils) UpdateIPV6Setting(disable int) error

This functions enables/disables ipv6 setting based on enable parameter passed.

Jump to

Keyboard shortcuts

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