netflowlegacy

package
v2.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeMessage

func DecodeMessage(payload *bytes.Buffer, packet *PacketNetFlowV5) error

func DecodeMessageVersion

func DecodeMessageVersion(payload *bytes.Buffer, packet *PacketNetFlowV5) error

Types

type DecoderError

type DecoderError struct {
	Err error
}

func (*DecoderError) Error

func (e *DecoderError) Error() string

func (*DecoderError) Unwrap

func (e *DecoderError) Unwrap() error

type IPAddress

type IPAddress uint32 // purely for the formatting purpose

func (*IPAddress) MarshalJSON

func (s *IPAddress) MarshalJSON() ([]byte, error)

type PacketNetFlowV5

type PacketNetFlowV5 struct {
	Version          uint16             `json:"version"`
	Count            uint16             `json:"count"`
	SysUptime        uint32             `json:"sys-uptime"`
	UnixSecs         uint32             `json:"unix-secs"`
	UnixNSecs        uint32             `json:"unix-nsecs"`
	FlowSequence     uint32             `json:"flow-sequence"`
	EngineType       uint8              `json:"engine-type"`
	EngineId         uint8              `json:"engine-id"`
	SamplingInterval uint16             `json:"sampling-interval"`
	Records          []RecordsNetFlowV5 `json:"records"`
}

func (*PacketNetFlowV5) MarshalJSON

func (p *PacketNetFlowV5) MarshalJSON() ([]byte, error)

func (*PacketNetFlowV5) MarshalText

func (p *PacketNetFlowV5) MarshalText() ([]byte, error)

func (PacketNetFlowV5) String

func (p PacketNetFlowV5) String() string

type RecordsNetFlowV5

type RecordsNetFlowV5 struct {
	SrcAddr  IPAddress `json:"src-addr"`
	DstAddr  IPAddress `json:"dst-addr"`
	NextHop  IPAddress `json:"next-hop"`
	Input    uint16    `json:"input"`
	Output   uint16    `json:"output"`
	DPkts    uint32    `json:"dpkts"`
	DOctets  uint32    `json:"doctets"`
	First    uint32    `json:"first"`
	Last     uint32    `json:"last"`
	SrcPort  uint16    `json:"src-port"`
	DstPort  uint16    `json:"dst-port"`
	Pad1     byte      `json:"pad1"`
	TCPFlags uint8     `json:"tcp-flgas"`
	Proto    uint8     `json:"proto"`
	Tos      uint8     `json:"tos"`
	SrcAS    uint16    `json:"src-as"`
	DstAS    uint16    `json:"dst-as"`
	SrcMask  uint8     `json:"src-mask"`
	DstMask  uint8     `json:"dst-mask"`
	Pad2     uint16    `json:"pad2"`
}

func (RecordsNetFlowV5) String

func (r RecordsNetFlowV5) String() string

Jump to

Keyboard shortcuts

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