Documentation ¶
Index ¶
Constants ¶
View Source
const ( AfPacketInput = "af-packet-input" AvfInput = "avf-input" BondProcess = "bond-process" MemifInput = "memif-input" P2pEthernetInput = "p2p-ethernet-input" PgInput = "pg-input" PuntSocketRx = "punt-socket-rx" RdmaInput = "rdma-input" SessionQueue = "session-queue" TuntapRx = "tuntap-rx" VhostUserInput = "vhost-user-input" VirtioInput = "virtio-input" Vmxnet3Input = "vmxnet3-input" // Nodes below might be unavailable if some plugin is disabled. DpdkCryptoInput = "dpdk-crypto-input" DpdkInput = "dpdk-input" HandoffTrace = "handoff-trace" IxgeInput = "ixge-input" MrvlPp2Input = "mrvl-pp2-input" NetmapInput = "netmap-input" )
List of trace-able input nodes.
Variables ¶
View Source
var ( CommonNodes = []string{ AfPacketInput, MemifInput, TuntapRx, VirtioInput, } GenericNodes = []string{ AfPacketInput, AvfInput, BondProcess, MemifInput, P2pEthernetInput, PgInput, PuntSocketRx, RdmaInput, SessionQueue, TuntapRx, VhostUserInput, VirtioInput, Vmxnet3Input, } OptionalNodes = []string{ DpdkCryptoInput, DpdkInput, HandoffTrace, IxgeInput, MrvlPp2Input, NetmapInput, } )
Functions ¶
Types ¶
type Capture ¶
type Capture struct { Name string // Name is a name of node in capture Start time.Duration // Start is the elapsed time since boot Content string // Content contains the captured data }
Capture is a part of traced packet.
func ParseTraceCaptures ¶
ParseTraceCaptures parses a raw packet data from trace output and returns parsed Capture(s) or error if the packet from trace data cannot be parsed.
type Packet ¶
type Packet struct { ID int // ID is a packet number Captures []Capture // Captures is the captured packet data }
Packet is a traced packet.
func ParseTracePackets ¶
ParseResult parses a raw trace output and returns parsed Packet(s) or error if the trace data cannot be parsed.
type Result ¶
type Result struct { TraceTime time.Time // TraceTime is the actual time of trace Packets []Packet // Packets is a list of traced packets RawData string // RawData is the raw trace data before parsing }
Result contains trace results.
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
Tracer manages packet tracing.
func (*Tracer) BeginTrace ¶
BeginTrace clears the trace and starts tracing packets of nodes.
func (*Tracer) SetNumPackets ¶
SetNumPackets sets the number of packets to trace. By default, 5000 packets are traced.
Click to show internal directories.
Click to hide internal directories.