Skip to content

fix: Supports V9 Data & Templates for IPFix #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2025
Merged

Conversation

mikemiles-dev
Copy link
Owner

No description provided.

@mikemiles-dev mikemiles-dev requested a review from Copilot April 20, 2025 03:01
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Netflow parsing logic to support V9 Data and Templates for IPFix by renaming constants, adjusting parser types, and updating associated data structures. Key changes include:

  • Renaming and exposing new V9 template and options template constants and types.
  • Modifying parser logic in both the V9 and IPFix modules to handle the new V9 data structures.
  • Updating associated tests, release notes, and common routines to work with the revised types.

Reviewed Changes

Copilot reviewed 5 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/variable_versions/v9.rs Renamed constants and types; updated parsers to reflect V9 changes.
src/variable_versions/ipfix.rs Adjusted IPFix parser logic to support both IPFix and V9 templates.
src/tests.rs Updated test references to use the new IPFix template mappings.
src/netflow_common.rs Corrected enum variant matching for IPFix data handling.
RELEASES.md Documented new support for V9 Templates/Options Templates.
Files not reviewed (11)
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_0_length_fields_ipfix.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_data_cached_template.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_enterprise_bit_in_non_options_template.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_enterprise_bit_template_and_data.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_options_template.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_options_template_with_data.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_scappy_example.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_scappy_example_options_template.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_with_v9_options_template_packet.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_multiple_packets.snap: Language not supported

@mikemiles-dev mikemiles-dev force-pushed the ISSUE_121 branch 2 times, most recently from 8360398 to 9698cae Compare April 20, 2025 04:25
@mikemiles-dev mikemiles-dev requested a review from Copilot April 20, 2025 04:53
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the handling of flowset bodies in the Netflow parsing by using the new enum variant names for V9 and IPFix data and templates.

  • Changed pattern matching to use V9FlowSetBody::V9Data and IPFixFlowSetBody::IPFixData in the main code and tests.
  • Updated import order in tests to reference the newly named variants.
  • Revised the RELEASES.md changelog to document the support for templates.

Reviewed Changes

Copilot reviewed 5 out of 23 changed files in this pull request and generated no comments.

File Description
src/netflow_common.rs Updated variant matching for parsing V9 and IPFix data and templates.
RELEASES.md Updated changelog with new support details for V9 Templates and IPFix.
Files not reviewed (18)
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_0_length_fields_ipfix.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_data_cached_template.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_enterprise_bit_in_non_options_template.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_enterprise_bit_template_and_data.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_options_template.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_options_template_with_data.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_scappy_example.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_scappy_example_options_template.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_ipfix_with_v9_options_template_packet.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_multiple_packets.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_v9.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_v9_data_cached_template.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_v9_ipv6flowlabel.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_v9_many_flows.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_v9_no_data.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_v9_options_template.snap: Language not supported
  • src/snapshots/netflow_parser__tests__base_tests__it_parses_v9_template_and_data_packet.snap: Language not supported

@mikemiles-dev mikemiles-dev force-pushed the ISSUE_121 branch 4 times, most recently from 73cdc8e to 88a9d6b Compare April 21, 2025 14:28
@mikemiles-dev mikemiles-dev merged commit 4ce30b2 into main Apr 21, 2025
1 check passed
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