Documentation
¶
Index ¶
- Constants
- func Clear(cfg *Config) error
- func ClearVethInterface(interfaceName string, isInternal bool) error
- func GetNsHandle(arg interface{}) netns.NsHandle
- func GetRootNetlinkHandle() (*remoteNetlink.Handle, error)
- func GetTargetNetlinkHandle(ns netns.NsHandle) (*remoteNetlink.Handle, error)
- func Initialize(cfg *Config) error
- func PBR() error
- func SetDefaultRoute2Container(containerPid int, gwIP string, tableNum int) error
- func SetIPaddress2Container(containerPid int, ip string, netmask string, isInternal bool) error
- func SetInterface2Container(containerPid int, interfaceName string, isInternal bool, cfg *Config) error
- func SetRoute2Container(containerPid int, interfaceName string, tableNum int) error
- func SetRouteRule2Container(containerPid int, markNumber int, tableNumber int) error
- func SetVlan(interfaceName string, newVlan int, oldVlan int, cfg *Config) error
- type Config
- type CrioType
- type DockerType
Constants ¶
View Source
const ( DefaultExternalBridgeName = "externalBridge" DefaultInternalBridgeName = "internalBridge" TYPEVETH = "veth" TYPEBRIDGE = "bridge" DefaultInternalContainerInterface = "ethint" DefaultExternalContainerInterface = "ethext" )
ToDo: make this variable later
Variables ¶
This section is empty.
Functions ¶
func ClearVethInterface ¶
func GetNsHandle ¶
func GetRootNetlinkHandle ¶
func GetRootNetlinkHandle() (*remoteNetlink.Handle, error)
func GetTargetNetlinkHandle ¶
func GetTargetNetlinkHandle(ns netns.NsHandle) (*remoteNetlink.Handle, error)
func Initialize ¶
func SetIPaddress2Container ¶
func SetInterface2Container ¶
func SetRoute2Container ¶
func SetRouteRule2Container ¶
Types ¶
type Config ¶
type Config struct { InternalBridgeName string ExternalBridgeName string OriginInternalInterfaceName string OriginExternalInterfaceName string NewInternalInterfaceName string NewExternalInterfaceName string InternalIPCIDR string ExternalIPCIDR string InternalIP string InternalNetmask string ExternalIP string ExternalNetmaks string GatewayIP string }
type DockerType ¶
type DockerType string
Click to show internal directories.
Click to hide internal directories.