Documentation ¶
Index ¶
- Constants
- func NetNsDoStub(f func(h ns.NetNS) error) error
- type Common
- type Container
- type Host
- type LinkOperations
- func (s *LinkOperations) DeleteLinkByName(deviceName string) error
- func (s *LinkOperations) DisableIPv6(deviceName string) error
- func (s *LinkOperations) EnableIPv4Forwarding() error
- func (s *LinkOperations) EnableReversePathFiltering(deviceName string) error
- func (s *LinkOperations) RenameLink(oldName, newName string) error
- func (s *LinkOperations) RouteAddAll(routes []*types.Route, sourceIP net.IP) error
- func (s *LinkOperations) SetPointToPointAddress(link netlink.Link, localIPAddr, peerIPAddr net.IP) error
- func (s *LinkOperations) StaticNeighborNoARP(link netlink.Link, destIP net.IP, hwAddr net.HardwareAddr) error
- type VethPairCreator
Constants ¶
View Source
const MAX_ATTEMPTS = 10
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Common ¶
type Common struct { NetlinkAdapter netlinkAdapter LinkOperations linkOperations Logger lager.Logger }
Common bevavior used by both the host-side and container-side Setup functions
func (*Common) BasicSetup ¶
func (s *Common) BasicSetup(deviceName string, local, peer config.DualAddress) error
BasicSetup configures a veth device for point-to-point communication with its peer. It is meant to be called by either Host.Setup or Container.Setup
type Container ¶
type Container struct { Common common LinkOperations linkOperations Logger lager.Logger }
type LinkOperations ¶
type LinkOperations struct { SysctlAdapter sysctlAdapter NetlinkAdapter netlinkAdapter Logger lager.Logger }
LinkOperations exposes mid-level link setup operations. They encapsulate low-level netlink and sysctl commands.
func (*LinkOperations) DeleteLinkByName ¶
func (s *LinkOperations) DeleteLinkByName(deviceName string) error
func (*LinkOperations) DisableIPv6 ¶
func (s *LinkOperations) DisableIPv6(deviceName string) error
func (*LinkOperations) EnableIPv4Forwarding ¶
func (s *LinkOperations) EnableIPv4Forwarding() error
func (*LinkOperations) EnableReversePathFiltering ¶
func (s *LinkOperations) EnableReversePathFiltering(deviceName string) error
func (*LinkOperations) RenameLink ¶
func (s *LinkOperations) RenameLink(oldName, newName string) error
func (*LinkOperations) RouteAddAll ¶
func (*LinkOperations) SetPointToPointAddress ¶
func (*LinkOperations) StaticNeighborNoARP ¶
func (s *LinkOperations) StaticNeighborNoARP(link netlink.Link, destIP net.IP, hwAddr net.HardwareAddr) error
StaticNeighborNoARP disables ARP on the link and installs a single permanent neighbor rule that resolves the given destIP to the given hardware address
type VethPairCreator ¶
type VethPairCreator struct { NetlinkAdapter netlinkAdapter Logger lager.Logger }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.