Documentation
¶
Index ¶
- Constants
- func Accumulate(r *ebpf.BpfFlowMetrics, src *ebpf.BpfFlowMetrics)
- func AllZerosMetaData(s [networkEventsMaxEventsMD]uint8) bool
- func IP(ia IPAddr) net.IP
- func IntEncodeV4(ia [net.IPv6len]uint8) uint32
- type Direction
- type HumanBytes
- type IPAddr
- type MacAddr
- type PacketRecord
- type RawByte
- type RawRecord
- type Record
Constants ¶
View Source
const ( DirectionIngress = uint8(0) DirectionEgress = uint8(1) )
Values according to field 61 in https://www.iana.org/assignments/ipfix/ipfix.xhtml
View Source
const (
IPv6Type = 0x86DD
)
IPv4Type / IPv6Type value as defined in IEEE 802: https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xhtml
View Source
const MacLen = 6
Variables ¶
This section is empty.
Functions ¶
func Accumulate ¶
func Accumulate(r *ebpf.BpfFlowMetrics, src *ebpf.BpfFlowMetrics)
func AllZerosMetaData ¶
Types ¶
type HumanBytes ¶
type HumanBytes uint64
type IPAddr ¶
IPAddr encodes v4 and v6 IPs with a fixed length. IPv4 addresses are encoded as IPv6 addresses with prefix ::ffff/96 as described in https://datatracker.ietf.org/doc/html/rfc4038#section-4.2 (same behavior as Go's net.IP type)
func IPAddrFromNetIP ¶
IPAddrFromNetIP returns IPAddr from net.IP
func (*IPAddr) MarshalJSON ¶
type MacAddr ¶
func (*MacAddr) MarshalJSON ¶
type PacketRecord ¶
func NewPacketRecord ¶
func NewPacketRecord( stream []byte, len uint32, ts time.Time, ) *PacketRecord
NewPacketRecord contains packet bytes
func ReadRawPacket ¶
func ReadRawPacket(reader io.Reader) (*PacketRecord, error)
ReadRawPacket reads a PacketRecord from a binary source, in LittleEndian order
type Record ¶
type Record struct {
RawRecord
// TODO: redundant field from RecordMetrics. Reorganize structs
TimeFlowStart time.Time
TimeFlowEnd time.Time
DNSLatency time.Duration
Interface string
// Duplicate tells whether this flow has another duplicate so it has to be excluded from
// any metrics' aggregation (e.g. bytes/second rates between two pods).
// The reason for this field is that the same flow can be observed from multiple interfaces,
// so the agent needs to choose only a view of the same flow and mark the others as
// "exclude from aggregation". Otherwise rates, sums, etc... values would be multiplied by the
// number of interfaces this flow is observed from.
Duplicate bool
// AgentIP provides information about the source of the flow (the Agent that traced it)
AgentIP net.IP
// Calculated RTT which is set when record is created by calling NewRecord
TimeFlowRtt time.Duration
DupList []map[string]uint8
NetworkMonitorEventsMD []string
}
Record contains accumulated metrics from a flow
Click to show internal directories.
Click to hide internal directories.