Skip to content

v1.0.0: Session separation, UDP support, aware UTC + NTP Era 1, repeated IEs, typing & fuzzing - #36

Draft
britram wants to merge 2 commits into
v0.10.0from
v1.0.0
Draft

britram wants to merge 2 commits into
v0.10.0from
v1.0.0

Conversation

@britram

@britram britram commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Summary

Stacked on #34 (v0.10.0) — marked Draft until v0.10.0 is merged and tagged. Once #34 merges into master, GitHub will automatically retarget this PR to master (or retarget via gh pr edit --base master).

What's in v1.0.0

  • Session State Separation (ipfix.session.Session) — Fixes Separate session state handling #13, UDP IPFIX Collector not Working #27, Template caching #31:
    • Decouples template tables, UDP template lifetimes (RFC 7011 §8.3), and per-ODID sequence numbers from MessageBuffer.
    • MessageBuffer(session=...) creates a default internal Session when omitted and keeps .templates, .sequences, and .setlist accessible for backwards compatibility.
  • UDP Collector, Exporter & CLI Support — Fixes Add UDP support to ipfix.writer.MessageStreamWriter #22, UDP support in command-line tool(s) #6:
    • ipfix.reader.DatagramReader with per-peer Session isolation and configurable template lifetime (default 1800s).
    • ipfix.writer.DatagramWriter with UDP-safe default MTU (1400B) and automatic RFC 7011 §10.3.6 periodic template refresh.
    • ipfix2csv --collect udp using DatagramReader.
  • Collector-Side Sequence Verification — Fixes Complete sequence number support #5:
    • Session.check_sequence() verifies received message header sequence numbers against expected counts and invokes optional sequence_gap_hook on gaps/reordering (non-fatal by default for UDP).
  • Timezone-Aware UTC datetime Returns & NTP Era 1 (2036) Rollover (Breaking):
    • All decoded dateTime* IEs, get_export_time(), datetime IE.parse(), and v9pdu.TimeAdapter now return timezone-aware UTC datetime objects (tzinfo=datetime.UTC).
    • dateTimeMicroseconds / dateTimeNanoseconds handle RFC 5905 NTP Era 1 rollover (Feb 7, 2036).
  • Repeated IEs in a Single Template — Fixes Do something reasonable for multiple IEs in a template #10:
    • decode_namedict_from() returns a list of values for repeated IE names (unique names stay scalar); encode_namedict_to() and packplan_for_ielist() / tuple_iterator() handle multiplicity in order.
  • PEP 484 Typing (ipfix/py.typed), Hypothesis Fuzz Tests & Migration Guide:
    • Added ipfix/py.typed, type annotations, and tests/test_fuzz.py (600 Hypothesis cases fuzzing IPFIX and NetFlow v9 decoders).
    • Added a "Migrating from 0.x to 1.0" section to README.md and CHANGES.txt.

Verification

  • pytest (with filterwarnings = ["error"], --doctest-modules, and Hypothesis fuzz tests): 46 passed, 0 warnings, 92% coverage.
  • ruff check ipfix tests scripts: all checks passed.

Fixes #5, #6, #10, #13, #22, #27, #31

@britram
britram added this pull request to stack #37 November 21, 2026 19:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant