Skip to content

Added V9 fields 225-229 #73

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 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "netflow_parser"
description = "Parser for Netflow Cisco V5, V7, V9, IPFIX"
version = "0.3.5"
version = "0.3.6"
edition = "2021"
author = "[email protected]"
license = "MIT OR Apache-2.0"
Expand Down
3 changes: 3 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.3.6
* Added V9 Post NAT fields 225-228.

# 0.3.5
* 3 Byte Data Numbers now correctly converts back to be_bytes.

Expand Down
1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

| Version | Supported |
| ------- | ------------------ |
| 0.3.6 | :white_check_mark: |
| 0.3.5 | :white_check_mark: |
| 0.3.4 | :white_check_mark: |
| 0.3.3 | :white_check_mark: |
Expand Down
30 changes: 30 additions & 0 deletions src/variable_versions/v9_lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ pub enum V9Field {
Layer2packetSectionOffset = 102,
Layer2packetSectionSize = 103,
Layer2packetSectionData = 104,
IcmpTypeValue = 176,
IcmpCodeValue = 177,
IcmpIpv6TypeValue = 178,
ImpIpv6CodeValue = 179,
PostNATSourceIPv4Address = 225,
PostNATDestinationIPv4Address = 226,
PostNATTSourceTransportPort = 227,
PostNATTDestinationTransportPort = 228,
PostNATSourceIpv6Address = 281,
PostNATDestinationIpv6Address = 282,
Vendor,
Unknown,
}
Expand Down Expand Up @@ -222,6 +232,16 @@ impl From<V9Field> for FieldDataType {
96 => FieldDataType::String,
98 => FieldDataType::UnsignedDataNumber,
99 => FieldDataType::UnsignedDataNumber,
176 => FieldDataType::UnsignedDataNumber,
177 => FieldDataType::UnsignedDataNumber,
178 => FieldDataType::UnsignedDataNumber,
179 => FieldDataType::UnsignedDataNumber,
225 => FieldDataType::Ip4Addr,
226 => FieldDataType::Ip4Addr,
227 => FieldDataType::UnsignedDataNumber,
228 => FieldDataType::UnsignedDataNumber,
281 => FieldDataType::Ip6Addr,
282 => FieldDataType::Ip6Addr,
_ => FieldDataType::Unknown,
}
}
Expand Down Expand Up @@ -332,6 +352,16 @@ impl From<u16> for V9Field {
102 => V9Field::Layer2packetSectionOffset,
103 => V9Field::Layer2packetSectionSize,
104 => V9Field::Layer2packetSectionData,
176 => V9Field::IcmpTypeValue,
177 => V9Field::IcmpCodeValue,
178 => V9Field::IcmpIpv6TypeValue,
179 => V9Field::ImpIpv6CodeValue,
225 => V9Field::PostNATSourceIPv4Address,
226 => V9Field::PostNATDestinationIPv4Address,
227 => V9Field::PostNATTSourceTransportPort,
228 => V9Field::PostNATTDestinationTransportPort,
281 => V9Field::PostNATSourceIpv6Address,
282 => V9Field::PostNATDestinationIpv6Address,
_ => V9Field::Unknown,
}
}
Expand Down
Loading