Documentation
¶
Overview ¶
Package utils provides decoding helpers shared across flow decoders.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryDecoder ¶
BinaryDecoder decodes multiple values from the buffer using big-endian encoding.
func BinaryRead ¶ added in v2.1.0
func BinaryRead(payload BytesBuffer, order binary.ByteOrder, data any) error
BinaryRead decodes a single value from the buffer using the supplied byte order.
Types ¶
type BytesBuffer ¶ added in v2.1.0
BytesBuffer is a minimal buffer interface for decoding helpers.
type IPAddress ¶ added in v2.1.1
type IPAddress []byte
IPAddress is a byte slice rendered as an IP address in JSON.
func (IPAddress) MarshalJSON ¶ added in v2.1.1
MarshalJSON formats the IP address as a JSON string.
type MacAddress ¶ added in v2.1.1
type MacAddress []byte
MacAddress is a byte slice rendered as a MAC address in JSON.
func (*MacAddress) MarshalJSON ¶ added in v2.1.1
func (s *MacAddress) MarshalJSON() ([]byte, error)
MarshalJSON formats the MAC address as a JSON string.
Click to show internal directories.
Click to hide internal directories.