Documentation ¶
Overview ¶
Package linuxcalls contains wrappers over Netlink APIs related to Linux VETH interfaces or Linux interfaces in general.
Index ¶
- func AddInterfaceIP(log logging.Logger, ifName string, addr *net.IPNet, ...) error
- func AddVethInterfacePair(ifName, peerIfName string, log logging.Logger, timeLog measure.StopWatchEntry) error
- func DelInterfaceIP(ifName string, addr *net.IPNet, timeLog measure.StopWatchEntry) error
- func DelVethInterfacePair(ifName, peerIfName string, log logging.Logger, timeLog measure.StopWatchEntry) error
- func GetInterfaceType(ifName string, timeLog measure.StopWatchEntry) (string, error)
- func GetVethPeerName(ifName string, timeLog measure.StopWatchEntry) (string, error)
- func InterfaceAdminDown(ifName string, timeLog measure.StopWatchEntry) error
- func InterfaceAdminUp(ifName string, timeLog measure.StopWatchEntry) error
- func InterfaceExists(ifName string, timeLog measure.StopWatchEntry) (bool, error)
- func RenameInterface(ifName string, newName string, timeLog measure.StopWatchEntry) error
- func SetInterfaceMTU(ifName string, mtu int, timeLog measure.StopWatchEntry) error
- func SetInterfaceMac(ifName string, macAddress string, timeLog measure.StopWatchEntry) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInterfaceIP ¶
func AddInterfaceIP(log logging.Logger, ifName string, addr *net.IPNet, timeLog measure.StopWatchEntry) error
AddInterfaceIP calls AddrAdd Netlink API.
func AddVethInterfacePair ¶ added in v1.4.0
func AddVethInterfacePair(ifName, peerIfName string, log logging.Logger, timeLog measure.StopWatchEntry) error
AddVethInterfacePair calls LinkAdd Netlink API for the Netlink.Veth interface type.
func DelInterfaceIP ¶
DelInterfaceIP calls AddrDel Netlink API.
func DelVethInterfacePair ¶ added in v1.4.0
func DelVethInterfacePair(ifName, peerIfName string, log logging.Logger, timeLog measure.StopWatchEntry) error
DelVethInterfacePair calls LinkDel Netlink API for the Netlink.Veth interface type.
func GetInterfaceType ¶
func GetInterfaceType(ifName string, timeLog measure.StopWatchEntry) (string, error)
GetInterfaceType returns the type (string representation) of a given interface.
func GetVethPeerName ¶
func GetVethPeerName(ifName string, timeLog measure.StopWatchEntry) (string, error)
GetVethPeerName return the peer name for a given VETH interface.
func InterfaceAdminDown ¶
func InterfaceAdminDown(ifName string, timeLog measure.StopWatchEntry) error
InterfaceAdminDown calls Netlink API LinkSetDown.
func InterfaceAdminUp ¶
func InterfaceAdminUp(ifName string, timeLog measure.StopWatchEntry) error
InterfaceAdminUp calls Netlink API LinkSetUp.
func InterfaceExists ¶
func InterfaceExists(ifName string, timeLog measure.StopWatchEntry) (bool, error)
InterfaceExists checks if interface with a given name exists.
func RenameInterface ¶ added in v1.4.0
func RenameInterface(ifName string, newName string, timeLog measure.StopWatchEntry) error
RenameInterface changes the name of the interface <ifName> to <newName>.
func SetInterfaceMTU ¶
func SetInterfaceMTU(ifName string, mtu int, timeLog measure.StopWatchEntry) error
SetInterfaceMTU calls LinkSetMTU Netlink API.
func SetInterfaceMac ¶
func SetInterfaceMac(ifName string, macAddress string, timeLog measure.StopWatchEntry) error
SetInterfaceMac calls LinkSetHardwareAddr netlink API.
Types ¶
This section is empty.