netflowV5

package
v0.0.0-...-630933f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryRecordV5

type BinaryRecordV5 struct {
	Ipv4SrcAddrInt uint32 `json:"-" codec:"-"`
	Ipv4DstAddrInt uint32 `json:"-" codec:"-"`
	Ipv4NextHopInt uint32 `json:"-" codec:"-"`

	RecordBaseV5
}

type HeaderV5

type HeaderV5 struct {
	Version          uint16 `json:"version" codec:"version"`
	FlowRecords      uint16 `json:"flow_records" codec:"flow_records"`
	Uptime           uint32 `json:"uptime" codec:"uptime"`
	UnixSec          uint32 `json:"unix_sec" codec:"unix_sec"`
	UnixNsec         uint32 `json:"unix_nsec" codec:"unix_nsec"`
	FlowSeqNum       uint32 `json:"flow_seq_num" codec:"flow_seq_num"`
	EngineType       uint8  `json:"engine_type" codec:"engine_type"`
	EngineId         uint8  `json:"engine_id" codec:"engine_id"`
	SamplingInterval uint16 `json:"sampling_interval" codec:"sampling_interval"`
}

type NetFlowV5

type NetFlowV5 struct {
	HeaderV5
	BinaryRecordV5

	Host              string `json:"host" codec:"host"`
	SamplingAlgorithm uint8  `json:"sampling_algorithm" codec:"sampling_algorithm"`
	Ipv4SrcAddr       string `json:"ipv4_src_addr" codec:"ipv4_src_addr"`
	Ipv4DstAddr       string `json:"ipv4_dst_addr" codec:"ipv4_dst_addr"`
	Ipv4NextHop       string `json:"ipv4_next_hop" codec:"ipv4_next_hop"`
}

func (*NetFlowV5) DecodeNetFlowV5

func (this *NetFlowV5) DecodeNetFlowV5(header *HeaderV5, binRecord *BinaryRecordV5, ip string) NetFlowV5

func (*NetFlowV5) IntToIPv4Addr

func (this *NetFlowV5) IntToIPv4Addr(intAddr uint32) net.IP

func (*NetFlowV5) PayLoadToNetFlowV5

func (this *NetFlowV5) PayLoadToNetFlowV5(data []byte, host string) []string

func (this *NetFlowV5) PayLoadToNetFlowV5(data []byte, host string) []NetFlowV5 {

type RecordBaseV5

type RecordBaseV5 struct {
	InputSnmp     uint16 `json:"input_snmp" codec:"input_snmp"`
	OutputSnmp    uint16 `json:"output_snmp" codec:"output_snmp"`
	InPkts        uint32 `json:"in_pkts" codec:"in_pkts"`
	InBytes       uint32 `json:"in_bytes" codec:"in_bytes"`
	FirstSwitched uint32 `json:"first_switched" codec:"first_switched"`
	LastSwitched  uint32 `json:"last_switched" codec:"last_switched"`
	L4SrcPort     uint16 `json:"l4_src_port" codec:"l4_src_port"`
	L4DstPort     uint16 `json:"l4_dst_port" codec:"l4_dst_port"`

	TcpFlags uint8  `json:"tcp_flags" codec:"tcp_flags"`
	Protocol uint8  `json:"protocol" codec:"protocol"`
	SrcTos   uint8  `json:"src_tos" codec:"src_tos"`
	SrcAs    uint16 `json:"src_as" codec:"src_as"`
	DstAs    uint16 `json:"dst_as" codec:"dst_as"`
	SrcMask  uint8  `json:"src_mask" codec:"src_mask"`
	DstMask  uint8  `json:"dst_mask" codec:"dst_mask"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL