Documentation ¶
Index ¶
- Constants
- func DiscoverByNetwork(handler driver.NetworkHandler, networks []v1.Network, ...) (netlink.Link, error)
- func FilterPodNetworkRoutes(routes []netlink.Route, nic *cache.DHCPConfig) (filteredRoutes []netlink.Route)
- func GenerateBridgeName(podInterfaceName string) string
- func GenerateMasqueradeGatewayAndVmIPAddrs(vmiSpecNetwork *v1.Network, ipVersion netdriver.IPVersion) (*netlink.Addr, *netlink.Addr, error)
- func GenerateNewBridgedVmiInterfaceName(originalPodInterfaceName string) string
- func GenerateTapDeviceName(podInterfaceName string) string
- func GetFakeBridgeIP(vmiSpecIfaces []v1.Interface, vmiSpecIface *v1.Interface) string
- func IsReserved(mac string) bool
- func RetrieveMacAddressFromVMISpecIface(vmiSpecIface *v1.Interface) (*net.HardwareAddr, error)
Constants ¶
View Source
const StaticMasqueradeBridgeMAC = "02:00:00:00:00:00"
Variables ¶
This section is empty.
Functions ¶
func DiscoverByNetwork ¶ added in v1.0.0
func DiscoverByNetwork(handler driver.NetworkHandler, networks []v1.Network, subjectNetwork v1.Network) (netlink.Link, error)
DiscoverByNetwork return the pod interface link of the given network name. If link not found, it will try to get the link using the pod interface's ordinal name (net1, net2,...) based on the subject network position in the given networks slice. If no link is found, a nil link will be returned.
func FilterPodNetworkRoutes ¶ added in v0.45.0
func FilterPodNetworkRoutes(routes []netlink.Route, nic *cache.DHCPConfig) (filteredRoutes []netlink.Route)
FilterPodNetworkRoutes filters out irrelevant routes
func GenerateBridgeName ¶ added in v1.0.0
func GenerateTapDeviceName ¶
func GetFakeBridgeIP ¶
func IsReserved ¶ added in v0.45.0
func RetrieveMacAddressFromVMISpecIface ¶
func RetrieveMacAddressFromVMISpecIface(vmiSpecIface *v1.Interface) (*net.HardwareAddr, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.