pub type NetflowParseError = NetflowError;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
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
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.
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
protocol: TemplateProtocolThe protocol (V9 or IPFIX)
ParseError
Parsing error with detailed context.
Generic parsing failure with information about what failed and where.
Fields
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).