NetflowParseError

Type Alias NetflowParseError 

Source
pub type NetflowParseError = NetflowError;
👎Deprecated since 0.8.0: Use NetflowError instead

Aliased Type§

pub enum NetflowParseError {
    Incomplete {
        available: usize,
        context: String,
    },
    UnsupportedVersion {
        version: u16,
        offset: usize,
        sample: Vec<u8>,
    },
    FilteredVersion {
        version: u16,
    },
    MissingTemplate {
        template_id: u16,
        protocol: TemplateProtocol,
        available_templates: Vec<u16>,
        raw_data: Vec<u8>,
    },
    ParseError {
        offset: usize,
        context: String,
        kind: String,
        remaining: Vec<u8>,
    },
    Partial {
        message: String,
    },
}

Variants§

§

Incomplete

Incomplete data - more bytes needed to parse a complete packet.

Contains the number of bytes available and a description of what was expected.

Fields

§available: usize

Number of bytes that were available

§context: String

Description of what was being parsed

§

UnsupportedVersion

Unknown or unsupported NetFlow version encountered.

The version number found in the packet header doesn’t match any known NetFlow version (V5, V7, V9, IPFIX).

Fields

§version: u16

The version number found in the packet

§offset: usize

Offset in bytes where the version was found

§sample: Vec<u8>

Sample of the packet data for debugging

§

FilteredVersion

Version is valid but filtered out by allowed_versions configuration.

The parser was configured to only accept certain versions and this version was explicitly excluded.

Fields

§version: u16

The version number that was filtered

§

MissingTemplate

Template definition is required but not found in cache.

For V9 and IPFIX, data packets reference template IDs that must be learned from template packets. This error occurs when data arrives before (or without) its corresponding template.

Fields

§template_id: u16

The template ID that was not found

§protocol: TemplateProtocol

The protocol (V9 or IPFIX)

§available_templates: Vec<u16>

List of currently cached template IDs for this protocol

§raw_data: Vec<u8>

Raw packet data that couldn’t be parsed

§

ParseError

Parsing error with detailed context.

Generic parsing failure with information about what failed and where.

Fields

§offset: usize

Offset in bytes where the error occurred

§context: String

Description of what was being parsed

§kind: String

The specific error kind

§remaining: Vec<u8>

Sample of remaining data for debugging

§

Partial

Partial parse - some data was parsed but errors occurred.

Used when processing continues despite errors (e.g., some flowsets parsed successfully but others failed).

Fields

§message: String

Description of the partial parse result