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 ¶
increase仅对dMac, dIp有效
func GetPktCount ¶
func StartProfiler ¶
func StartProfiler()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.