stabilityCommon

package
v0.9.3-0...-e3c37e7 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ModifyPacket is used to set src and dst MAC addresses for outgoing packets.
	ModifyPacket = []interface{}{modifyPacket0, modifyPacket1}
)

Functions

func InitCommonState

func InitCommonState(configFile, target string)

InitCommonState initializes src and dst MAC addesses to be set in outgoing packets.

func ShouldBeSkipped

func ShouldBeSkipped(pkt *packet.Packet) bool

ShouldBeSkipped return true for packets which are not expected to receive by test. Return false only for expected IPv4 UDP packets.

func ShouldBeSkippedAllExcept

func ShouldBeSkippedAllExcept(pkt *packet.Packet, ipVersion uint, protocol ProtocolType) bool

ShouldBeSkippedAllExcept return false for packets with given ip version and protocol type and true for all other. Specify 0 ip version to accept both 4 and 6.

Types

type ProtocolType

type ProtocolType uint

ProtocolType used to determine which protocols should not be skipped.

const (
	// constants for different protocol types.
	TypeUdpTcpIcmp ProtocolType = iota
	TypeUdpTcp
	TypeTcp
	TypeUdp
	TypeIcmp
)

Jump to

Keyboard shortcuts

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