Documentation ¶
Overview ¶
Package connector is responsible for the datapath specific plumbing to connect an endpoint to the network
Index ¶
- Constants
- func DisableRpFilter(sysctl sysctl.Sysctl, ifName string) error
- func Endpoint2IfName(endpointID string) string
- func Endpoint2TempIfName(endpointID string) string
- func IPv4Gateway(addr *models.NodeAddressing) string
- func IPv4Routes(addr *models.NodeAddressing, linkMTU int) ([]route.Route, error)
- func IPv6Gateway(addr *models.NodeAddressing) string
- func IPv6Routes(addr *models.NodeAddressing, linkMTU int) ([]route.Route, error)
- func SetupNetkit(id string, ...) (*netlink.Netkit, netlink.Link, string, error)
- func SetupNetkitRemoteNs(ns *netns.NetNS, srcIfName, dstIfName string) error
- func SetupNetkitWithNames(lxcIfName, peerIfName string, ...) (*netlink.Netkit, netlink.Link, error)
- func SetupVeth(id string, ...) (*netlink.Veth, netlink.Link, string, error)
- func SetupVethRemoteNs(ns *netns.NetNS, srcIfName, dstIfName string) error
- func SetupVethWithNames(lxcIfName, peerIfName string, ...) (*netlink.Veth, netlink.Link, error)
- func SufficientAddressing(addr *models.NodeAddressing) error
Constants ¶
const (
// ContainerInterfacePrefix is the container's internal interface name prefix.
ContainerInterfacePrefix = "cilium"
)
Variables ¶
This section is empty.
Functions ¶
func DisableRpFilter ¶
DisableRpFilter tries to disable rpfilter on specified interface
func Endpoint2IfName ¶
Endpoint2IfName returns the host interface name for the given endpointID.
func Endpoint2TempIfName ¶
Endpoint2TempIfName returns the temporary interface name for the given endpointID.
func IPv4Gateway ¶
func IPv4Gateway(addr *models.NodeAddressing) string
IPv4Gateway returns the IPv4 gateway address for endpoints.
func IPv4Routes ¶
IPv4Routes returns IPv4 routes to be installed in endpoint's networking namespace.
func IPv6Gateway ¶
func IPv6Gateway(addr *models.NodeAddressing) string
IPv6Gateway returns the IPv6 gateway address for endpoints.
func IPv6Routes ¶
IPv6Routes returns IPv6 routes to be installed in endpoint's networking namespace.
func SetupNetkit ¶ added in v1.16.0
func SetupNetkit(id string, mtu, groIPv6MaxSize, gsoIPv6MaxSize, groIPv4MaxSize, gsoIPv4MaxSize int, l2Mode bool, ep *models.EndpointChangeRequest, sysctl sysctl.Sysctl) (*netlink.Netkit, netlink.Link, string, error)
SetupNetkit sets up the net interface, the temporary interface and fills up some endpoint fields such as mac, NodeMac, ifIndex and ifName. Returns a pointer for the created netkit, a pointer for the temporary link, the name of the temporary link and error if something fails.
func SetupNetkitRemoteNs ¶ added in v1.16.0
SetupNetkitRemoteNs renames the netdevice in the target namespace to the provided dstIfName.
func SetupNetkitWithNames ¶ added in v1.16.0
func SetupNetkitWithNames(lxcIfName, peerIfName string, mtu, groIPv6MaxSize, gsoIPv6MaxSize, groIPv4MaxSize, gsoIPv4MaxSize int, l2Mode bool, ep *models.EndpointChangeRequest, sysctl sysctl.Sysctl) (*netlink.Netkit, netlink.Link, error)
SetupNetkitWithNames sets up the net interface, the peer interface and fills up some endpoint fields such as mac, NodeMac, ifIndex and ifName. Returns a pointer for the created netkit, a pointer for the peer link and error if something fails.
func SetupVeth ¶
func SetupVeth(id string, mtu, groIPv6MaxSize, gsoIPv6MaxSize, groIPv4MaxSize, gsoIPv4MaxSize int, ep *models.EndpointChangeRequest, sysctl sysctl.Sysctl) (*netlink.Veth, netlink.Link, string, error)
SetupVeth sets up the net interface, the temporary interface and fills up some endpoint fields such as mac, NodeMac, ifIndex and ifName. Returns a pointer for the created veth, a pointer for the temporary link, the name of the temporary link and error if something fails.
func SetupVethRemoteNs ¶
SetupVethRemoteNs renames the netdevice in the target namespace to the provided dstIfName.
func SetupVethWithNames ¶
func SetupVethWithNames(lxcIfName, peerIfName string, mtu, groIPv6MaxSize, gsoIPv6MaxSize, groIPv4MaxSize, gsoIPv4MaxSize int, ep *models.EndpointChangeRequest, sysctl sysctl.Sysctl) (*netlink.Veth, netlink.Link, error)
SetupVethWithNames sets up the net interface, the peer interface and fills up some endpoint fields such as mac, NodeMac, ifIndex and ifName. Returns a pointer for the created veth, a pointer for the peer link and error if something fails.
func SufficientAddressing ¶
func SufficientAddressing(addr *models.NodeAddressing) error
SufficientAddressing returns an error if the provided NodeAddressing does not provide sufficient information to derive all IPAM required settings.
Types ¶
This section is empty.