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