setenv

package module
v0.0.0-...-029e0d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProtocolICMP defines offset in bytes for IPv4 ICMP
	ProtocolICMP = 1
	// ProtocolIPv6ICMP defines offset in bytes for IPv6 ICMP
	ProtocolIPv6ICMP = 58
)

Variables

This section is empty.

Functions

func TestICMP

func TestICMP(sourceNS netns.NsHandle, protocol nftables.TableFamily, saddr, daddr *nftableslib.IPAddr) error

TestICMP tests icmp connectivity between two namespaces, ping is initiated in source namespace and destination namespace is expected to reply with echo reply packets

Types

type P2PTestEnv

type P2PTestEnv interface {
	Cleanup()
	GetNamespace() []netns.NsHandle
	GetIPs() []*nftableslib.IPAddr
}

P2PTestEnv defines methods to interact with an instantiated p2p test environment

func NewP2PTestEnv

func NewP2PTestEnv(version nftables.TableFamily, ip1s, ip2s string) (P2PTestEnv, error)

NewP2PTestEnv sets up two new net namespaces, builds a link between them and assigns ip addresses to each end of the link. It also checks connectivity by using ping.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL