Releases: mikemiles-dev/netflow_parser
Releases · mikemiles-dev/netflow_parser
v0.7.0
0.7.0
This release simplifies the Template TTL API by removing packet-based TTL support. Only time-based TTL is now supported.
- Simplified TTL API:
- Removed
TtlStrategyenum entirely - Removed packet-based TTL (
TtlConfig::packet_based()) - Removed combined TTL (
TtlConfig::combined()) - Simplified
TtlConfigto only contain aDurationfield - New API:
TtlConfig::new(duration: Duration) TtlConfig::default()returns 2-hour TTL
- Removed
- Removed packet counting from parsers:
- Removed
packet_countfield fromV9ParserandIPFixParser - Templates now expire based on wall-clock time only
- Removed
- Updated trait methods:
ParserConfig::set_ttl_strategy()renamed toset_ttl_config()- Now takes
Option<TtlConfig>instead ofTtlStrategy
- Migration guide:
TtlConfig::time_based(d)→TtlConfig::new(d)TtlConfig::packet_based(n)→ UseTtlConfig::new(Duration::from_secs(...))with appropriate time durationTtlConfig::combined(d, n)→ UseTtlConfig::new(d)(time component only)TtlConfig::default_time_based()→TtlConfig::default()
- Rationale: Packet-based TTL using a global packet counter didn't correlate well with template staleness. Time-based TTL better reflects actual template expiration patterns as exporters typically refresh templates on time intervals.
v0.6.9
- Added Template Time Based / Packet Based TTL for V9/IPFix.
- Added Builder Pattern for NetflowParser:
- New
NetflowParser::builder()method returnsNetflowParserBuilder - Ergonomic configuration with chainable methods:
with_cache_size()/with_v9_cache_size()/with_ipfix_cache_size()with_ttl()/with_v9_ttl()/with_ipfix_ttl()with_allowed_versions()/with_max_error_sample_size()build()- Constructs configured parser
- New
- Added Template Cache Introspection API:
v9_cache_stats()/ipfix_cache_stats()- Get cache statisticsv9_template_ids()/ipfix_template_ids()- List all cached template IDshas_v9_template()/has_ipfix_template()- Check if template exists (non-mutating)clear_v9_templates()/clear_ipfix_templates()- Clear all templates
- New
CacheStatsstruct for cache statistics - Added
DebugandClonederives toConfigstruct - Comprehensive documentation updates with builder pattern examples
v0.6.8
- Added LRU-based template caching for V9Parser and IPFixParser to prevent memory exhaustion
- Default template cache size: 1000 templates per parser (configurable)
- New V9Parser::try_new(cache_size) and IPFixParser::try_new(cache_size) constructors for custom cache sizes
- Added V9ParserError and IPFixParserError error types for proper error handling
- Template cache is automatically evicted using LRU policy when limit is reached
- Provides protection against DoS attacks via template flooding
- Removed PartialEq, Clone, and Serialize derives from parser structs (due to LruCache)
v0.6.7
- Optimized NetflowCommon conversion with single-pass field lookups (reduced O(n*m) to O(n))
- Added V5/V7/DataNumber capacity pre-allocation
- Faster string processing in hot paths
- Fixed integer overflow in V9 options template field counting
- Fixed unbounded buffer reads in IPFIX variable-length fields
- Fixed memory exhaustion vulnerability in error handling
- Enhanced validation for malformed packets
- Improved IPFIX error handling - parse errors now properly propagate
- Added thread safety documentation and performance tuning guide
- Fixed V9/IPFIX padding handling:
- Fixed missing padding export for V9 Data FlowSets
** Added padding fields to IPFIX Data and OptionsData structures
** Auto-calculate padding for manually created packets (when padding field is empty)
** Preserve original padding for parsed packets (byte-perfect round-trips)
** Added examples/manual_ipfix_creation.rs demonstrating manual packet creation
v0.6.6
- Added configurable field mappings for V9 and IPFIX in NetflowCommon.
- New V9FieldMappingConfig and IPFixFieldMappingConfig structs allow customizing which fields map to NetflowCommonFlowSet.
- New methods NetflowCommon::from_v9_with_config() and NetflowCommon::from_ipfix_with_config() for custom field extraction.
- Each field mapping supports a primary field and an optional fallback (e.g., prefer IPv6, fall back to IPv4).
- Default configurations maintain backward compatibility with existing behavior.
- Netflow Common is now a feature.
v0.6.5
- Several memory and performance optimizations.
v0.6.4
- Removed uneeded DataNumber Parsing for Durations.
- Renamed methods DurationMicros and DurationNanos into DurationMicrosNTP and DurationNanosNTP.
- Minor Performance optimizations
v0.6.3
v0.6.2
- IPFix supports multiple V9 Options templates.
- Found casting issues that could result in dataloss in the DataNumbers module.
- Fixed incorrect datatypes for DataNumbers.
- Added Reverse Information Element PEN fields.
v0.6.1
- V9 Fields also now a Vec instead of BTreeMap.
- IPFix Templates are now HashMap instead of BTreeMap.
- Faster Data Parsing for V9/IPFix by removing inefficient contains_key lookup.
- Fixed issue with certain ipfix lookup fields.