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.
Click to show internal directories.
Click to hide internal directories.