Documentation ¶
Index ¶
- Constants
- func AddSnatRule(match string, ip net.IP) error
- func AllowIPAddresses(bridgeName string, skipAddresses []string, action string) error
- func BlockIPAddresses(bridgeName, action string) error
- type NetworkUtils
- func (nu NetworkUtils) AssignIPToInterface(interfaceName string, ipAddresses []net.IPNet) error
- func (nu NetworkUtils) CreateEndpoint(hostVethName, containerVethName string) error
- func (nu NetworkUtils) DisableRAForInterface(ifName string) error
- func (nu NetworkUtils) EnableIPForwarding(ifName string) error
- func (nu NetworkUtils) EnableIPV6Forwarding() 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 ¶
func AddSnatRule ¶
This fucntion adds rule which snat to ip passed filtered by match string.
func AllowIPAddresses ¶
func BlockIPAddresses ¶
Types ¶
type NetworkUtils ¶
type NetworkUtils struct {
// contains filtered or unexported fields
}
func NewNetworkUtils ¶
func NewNetworkUtils(nl netlink.NetlinkInterface, plClient platform.ExecClient) NetworkUtils
func (NetworkUtils) AssignIPToInterface ¶
func (nu NetworkUtils) AssignIPToInterface(interfaceName string, ipAddresses []net.IPNet) error
func (NetworkUtils) CreateEndpoint ¶
func (nu NetworkUtils) CreateEndpoint(hostVethName, containerVethName string) error
func (NetworkUtils) DisableRAForInterface ¶
func (nu NetworkUtils) DisableRAForInterface(ifName string) error
func (NetworkUtils) EnableIPForwarding ¶
func (nu NetworkUtils) EnableIPForwarding(ifName string) error
This fucntion enables ip forwarding in VM and allow forwarding packets from the interface
func (NetworkUtils) EnableIPV6Forwarding ¶
func (nu NetworkUtils) EnableIPV6Forwarding() 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.