Documentation ¶
Index ¶
- Constants
- type NetworkUtils
- func (nu NetworkUtils) AddSnatRule(iptablesClient ipTablesClient, match string, ip net.IP) error
- func (nu NetworkUtils) AllowIPAddresses(iptablesClient ipTablesClient, bridgeName string, skipAddresses []string, ...) error
- func (nu NetworkUtils) AssignIPToInterface(interfaceName string, ipAddresses []net.IPNet) error
- func (nu NetworkUtils) BlockEgressTrafficFromContainer(iptablesClient ipTablesClient, version, ipAddress, protocol string, port int) error
- func (nu NetworkUtils) BlockIPAddresses(iptablesClient ipTablesClient, bridgeName, action string) error
- func (nu NetworkUtils) CreateEndpoint(hostVethName, containerVethName string, macAddress net.HardwareAddr) error
- func (nu NetworkUtils) DisableRAForInterface(ifName string) error
- func (nu NetworkUtils) EnableIPV4Forwarding() error
- func (nu NetworkUtils) EnableIPV6Forwarding() error
- func (nu NetworkUtils) SetProxyArp(ifName string) error
- func (nu NetworkUtils) SetupContainerInterface(containerVethName, targetIfName string) error
- func (nu NetworkUtils) UpdateIPV6Setting(disable int) error
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.
Click to show internal directories.
Click to hide internal directories.