Documentation ¶
Overview ¶
Package linuxcalls contains wrappers over Netlink APIs related to Linux VETH interfaces or to Linux interfaces in general.
Index ¶
- func AddInterfaceIP(ifName string, addr *net.IPNet) error
- func AddVethInterface(ifName, peerIfName string) error
- func CompareNamespaces(ns1 *intf.LinuxInterfaces_Interface_Namespace, ...) int
- func DelInterfaceIP(ifName string, addr *net.IPNet) error
- func DelVethInterface(ifName, peerIfName string) error
- func GetDefaultNamespace() *intf.LinuxInterfaces_Interface_Namespace
- func GetInterfaceType(ifName string) (string, error)
- func GetVethPeerName(ifName string) (string, error)
- func InterfaceAdminDown(ifName string) error
- func InterfaceAdminUp(ifName string) error
- func InterfaceExists(ifName string) (bool, error)
- func NamespaceToStr(namespace *intf.LinuxInterfaces_Interface_Namespace) string
- func SetInterfaceMTU(ifName string, mtu int) error
- func SetInterfaceMac(ifName string, macAddress string) error
- func SetInterfaceNamespace(ctx *NamespaceMgmtCtx, ifName string, ...) error
- func SwitchNamespace(ctx *NamespaceMgmtCtx, namespace *intf.LinuxInterfaces_Interface_Namespace) (revert func(), err error)
- type NamespaceMgmtCtx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInterfaceIP ¶
AddInterfaceIP is a mock implementation of the real AddInterfaceIp from ip_linuxcalls.go, doing absolutely nothing.
func AddVethInterface ¶
AddVethInterface is a mock implementation of the real AddVethInterface from veth_linuxcalls.go, doing absolutely nothing.
func CompareNamespaces ¶
func CompareNamespaces(ns1 *intf.LinuxInterfaces_Interface_Namespace, ns2 *intf.LinuxInterfaces_Interface_Namespace) int
CompareNamespaces is a mock implementation of the real CompareNamespaces from ns_linuxcalls.go, doing absolutely nothing.
func DelInterfaceIP ¶
DelInterfaceIP is a mock implementation of the real DelInterfaceIp from ip_linuxcalls.go, doing absolutely nothing.
func DelVethInterface ¶
DelVethInterface is a mock implementation of the real DelVethInterface from veth_linuxcalls.go, doing absolutely nothing.
func GetDefaultNamespace ¶
func GetDefaultNamespace() *intf.LinuxInterfaces_Interface_Namespace
GetDefaultNamespace is a mock implementation of the real GetDefaultNamespace from ns_linuxcalls.go, doing absolutely nothing.
func GetInterfaceType ¶
GetInterfaceType is a mock implementation of the real GetInterfaceType from link_linuxcalls.go, doing absolutely nothing.
func GetVethPeerName ¶
GetVethPeerName is a mock implementation of the real GetVethPeerName from veth_linuxcalls.go, doing absolutely nothing.
func InterfaceAdminDown ¶
InterfaceAdminDown is a mock implementation of the real InterfaceAdminDown from admin_linuxcalls.go, doing absolutely nothing.
func InterfaceAdminUp ¶
InterfaceAdminUp is a mock implementation of the real InterfaceAdminUp from admin_linuxcalls.go, doing absolutely nothing.
func InterfaceExists ¶
InterfaceExists is a mock implementation of the real InterfaceExists from link_linuxcalls.go, doing absolutely nothing.
func NamespaceToStr ¶
func NamespaceToStr(namespace *intf.LinuxInterfaces_Interface_Namespace) string
NamespaceToStr is a mock implementation of the real NamespaceToStr from ns_linuxcalls.go, doing absolutely nothing.
func SetInterfaceMTU ¶
SetInterfaceMTU is a mock implementation of the real SetInterfaceMTU from ip_linuxcalls.go, doing absolutely nothing.
func SetInterfaceMac ¶
SetInterfaceMac is a mock implementation of the real SetInterfaceMac from mac_linuxcalls.go, doing absolutely nothing.
func SetInterfaceNamespace ¶
func SetInterfaceNamespace(ctx *NamespaceMgmtCtx, ifName string, namespace *intf.LinuxInterfaces_Interface_Namespace) error
SetInterfaceNamespace is a mock implementation of the real SetInterfaceNamespace from ns_linuxcalls.go, doing absolutely nothing.
func SwitchNamespace ¶
func SwitchNamespace(ctx *NamespaceMgmtCtx, namespace *intf.LinuxInterfaces_Interface_Namespace) (revert func(), err error)
SwitchNamespace is a mock implementation of the real SwitchNamespace from ns_linuxcalls.go, doing absolutely nothing.
Types ¶
type NamespaceMgmtCtx ¶
type NamespaceMgmtCtx struct { }
NamespaceMgmtCtx is a mock type definition of the real NamespaceMgmtCtx from ns_linuxcalls.go.
func NewNamespaceMgmtCtx ¶
func NewNamespaceMgmtCtx() *NamespaceMgmtCtx
NewNamespaceMgmtCtx is a mock implementation of the real NewNamespaceMgmtCtx from ns_linuxcalls.go, doing absolutely nothing.