link

package
v0.59.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIOCETHTOOL     = 0x8946     // linux/sockios.h
	ETHTOOL_GTXCSUM = 0x00000016 // linux/ethtool.h
	ETHTOOL_STXCSUM = 0x00000017 // linux/ethtool.h
	IFNAMSIZ        = 16         // linux/if.h
)
View Source
const StaticMasqueradeBridgeMAC = "02:00:00:00:00:00"

Variables

This section is empty.

Functions

func EthtoolTXOff added in v0.45.0

func EthtoolTXOff(name string) error

Disable TX checksum offload on specified interface

func FilterPodNetworkRoutes added in v0.45.0

func FilterPodNetworkRoutes(routes []netlink.Route, nic *cache.DHCPConfig) (filteredRoutes []netlink.Route)

FilterPodNetworkRoutes filters out irrelevant routes

func GenerateMasqueradeGatewayAndVmIPAddrs

func GenerateMasqueradeGatewayAndVmIPAddrs(vmiSpecNetwork *v1.Network, protocol iptables.Protocol) (*netlink.Addr, *netlink.Addr, error)

func GenerateNewBridgedVmiInterfaceName

func GenerateNewBridgedVmiInterfaceName(originalPodInterfaceName string) string

func GenerateTapDeviceName

func GenerateTapDeviceName(podInterfaceName string) string

func GetFakeBridgeIP

func GetFakeBridgeIP(vmiSpecIfaces []v1.Interface, vmiSpecIface *v1.Interface) string

func IsReserved added in v0.45.0

func IsReserved(mac string) bool

func RetrieveMacAddressFromVMISpecIface

func RetrieveMacAddressFromVMISpecIface(vmiSpecIface *v1.Interface) (*net.HardwareAddr, error)

Types

type EthtoolValue added in v0.45.0

type EthtoolValue struct {
	Cmd  uint32
	Data uint32
}

linux/ethtool.h 'struct ethtool_value'

type IFReqData added in v0.45.0

type IFReqData struct {
	Name [IFNAMSIZ]byte
	Data uintptr
}

linux/if.h 'struct ifreq'

Jump to

Keyboard shortcuts

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