Documentation ¶
Overview ¶
Package netflow1 contains decoders for the NetFlow version 1 protocol.
About ¶
The Version 1 (V1) format is the original format supported in the initial NetFlow releases.
Index ¶
Constants ¶
View Source
const ( // Version word in the Packet Header Version uint16 = 0x0001 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FlowRecord ¶
type FlowRecord struct { // SrcAddr is the Source IP address SrcAddr net.IP // 0-3 // DstAddr is the Destination IP address DstAddr net.IP // 4-7 // NextHop is the IP address of next hop router NextHop net.IP // 8-11 // Input is the SNMP index of input interface Input uint16 // 12-13 // Output is the SNMP index of output interface Output uint16 // 14-15 // Packets is the number of packets in the flow Packets uint32 // 16-19 // Octets is the number of bytes in the flow Bytes uint32 // 20-23 // First is the SysUptime at start of flow First uint32 // 24-27 // Last is the SysUptime at end of flow Last uint32 // 28-31 // SrcPort is the TCP/UDP source port number or equivalent SrcPort uint16 // 32-33 // DstPort is the TCP/UDP destination port number or equivalent DstPort uint16 // 34-35 // Pad1 are unused bytes Pad1 uint16 // 36-37 // Protocol number (IP) Protocol uint8 // 38 // ToS is the IP type of service ToS uint8 // 39 // Flags are cumulative OR TCP flags Flags uint8 // 40 // Pad2 are unused bytes Pad2 uint8 // Pad3 are unused bytes Pad3 uint16 // Reservered are reserved (unused) bytes Reserved uint32 }
FlowRecord is a NetFlow v1 Flow Record
func (FlowRecord) SampleInterval ¶
func (f FlowRecord) SampleInterval() int
func (FlowRecord) String ¶
func (r FlowRecord) String() string
type Packet ¶
type Packet struct { Header PacketHeader Records []*FlowRecord }
Packet is a NetFlow v1 packet
Click to show internal directories.
Click to hide internal directories.