Skip to content

Releases: mikemiles-dev/netflow_parser

v0.7.0

23 Dec 17:22
dbc7c3c

Choose a tag to compare

0.7.0

⚠️ BREAKING CHANGES

This release simplifies the Template TTL API by removing packet-based TTL support. Only time-based TTL is now supported.

  • Simplified TTL API:
    • Removed TtlStrategy enum entirely
    • Removed packet-based TTL (TtlConfig::packet_based())
    • Removed combined TTL (TtlConfig::combined())
    • Simplified TtlConfig to only contain a Duration field
    • New API: TtlConfig::new(duration: Duration)
    • TtlConfig::default() returns 2-hour TTL
  • Removed packet counting from parsers:
    • Removed packet_count field from V9Parser and IPFixParser
    • Templates now expire based on wall-clock time only
  • Updated trait methods:
    • ParserConfig::set_ttl_strategy() renamed to set_ttl_config()
    • Now takes Option<TtlConfig> instead of TtlStrategy
  • Migration guide:
    • TtlConfig::time_based(d)TtlConfig::new(d)
    • TtlConfig::packet_based(n) → Use TtlConfig::new(Duration::from_secs(...)) with appropriate time duration
    • TtlConfig::combined(d, n) → Use TtlConfig::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

22 Dec 04:33
13edb2b

Choose a tag to compare

  • Added Template Time Based / Packet Based TTL for V9/IPFix.
  • Added Builder Pattern for NetflowParser:
    • New NetflowParser::builder() method returns NetflowParserBuilder
    • 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
  • Added Template Cache Introspection API:
    • v9_cache_stats() / ipfix_cache_stats() - Get cache statistics
    • v9_template_ids() / ipfix_template_ids() - List all cached template IDs
    • has_v9_template() / has_ipfix_template() - Check if template exists (non-mutating)
    • clear_v9_templates() / clear_ipfix_templates() - Clear all templates
  • New CacheStats struct for cache statistics
  • Added Debug and Clone derives to Config struct
  • Comprehensive documentation updates with builder pattern examples

v0.6.8

20 Dec 17:06
79436c8

Choose a tag to compare

  • 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

19 Dec 02:18
b869a3b

Choose a tag to compare

  • 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

23 Nov 18:25
7534ec1

Choose a tag to compare

  • 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

22 Nov 16:21
f0fbaac

Choose a tag to compare

  • Several memory and performance optimizations.

v0.6.4

30 Aug 15:11
c168b1b

Choose a tag to compare

  • Removed uneeded DataNumber Parsing for Durations.
  • Renamed methods DurationMicros and DurationNanos into DurationMicrosNTP and DurationNanosNTP.
  • Minor Performance optimizations

v0.6.3

15 Jul 14:28
63796a2

Choose a tag to compare

  • Ipfix dateTimeNanoseconds and dateTimeMicroseconds use the NTP 64 bit time format #15
  • Added NetEvent and ObservationTimeMilliseconds for V9.

v0.6.2

08 Jul 04:07
dd073b5

Choose a tag to compare

  • 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

06 Jul 05:47
2bdad8d

Choose a tag to compare

  • 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.