INNER CODE UNIT · Go
filename
deepfence/FlowMeter · cmd/flowmeter.go:33
filename := *filenamePtr
maxNumPackets := *maxNumPacketsPtr
ifLocalIPKnown := *ifLocalIPKnownPtr
localIP := *localIPPtr
logrus.Info("Live Capture: ", ifLiveCapture)
logrus.Info("Target max number packets: ", maxNumPackets)
logrus.Info("Start Main method")
if ifLiveCapture {
// Open device
constants.Handle, constants.Err = pcap.OpenLive(constants.Device, constants.SnapshotLen, constants.Promiscuous, constants.Timeout)
localIP = packetAnalyzer.GetOutboundIP().String()
ifLocalIPKnown = true
logrus.Info("Live capture of packets.")
} else {
// Open file instead of device