cmd

package
v0.0.0-...-8d187f3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const PKT_CNT_INFINITE = 0

Variables

View Source
var DstIp = flag.String("dstIp", "", "source MAC")
View Source
var DstMac = flag.String("dstMac", "", "source MAC")
View Source
var EnableProfile = flag.Bool("p", true, "if enable Profile")
View Source
var FrameNum = flag.Uint("n", 1024, "Specify the sum of umem blocks, must be power of 2, default is 1024")
View Source
var Ifname = flag.String("i", "", "Specify interface name")
View Source
var LogLevel = flag.String("l", "Info", "specify log level(ingore case)"+
	"[CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG], default is INFO")
View Source
var PayloadLen = flag.Uint("L", 0, "Specify packet payload length, default is 0, packet total length = payload + 42(udp) or 54(tcp)")
View Source
var PktCount = flag.Int("c", 0, "specify receive or send packet count, default 0 stand for forever")
View Source
var Proto = flag.String("P", "udp", "Specify ip protocol(udp or tcp), default is udp")
View Source
var SrcIp = flag.String("srcIp", "", "source MAC")
View Source
var SrcMac = flag.String("srcMac", "", "source MAC")
View Source
var StatsInterval = flag.Int("s", 0, "Specify stats interval, unit: second")

Functions

func GeneratePacket

func GeneratePacket(sMac, dMac, sIp, dIp string, increase int) []byte

increase仅对dMac, dIp有效

func GetPktCount

func GetPktCount(count int) int

func StartProfiler

func StartProfiler()

Types

This section is empty.

Jump to

Keyboard shortcuts

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