Expand description
IPFIX Parser Library
This library provides parsing functionality for IP Flow Information Export (IPFIX) messages as specified in RFC 7011, with the Information Element registry maintained by IANA.
IPFIX is a template-based protocol: Data Records can only be decoded with a
Template that the Exporter sent earlier. The Decoder keeps a Template
cache and should be kept alive for the whole Transport Session (one
Decoder per Exporter / TCP connection / UDP source). Template management
depends on the transport (UDP by default), see DecoderConfig.
§Example
use ipfix_parser::Decoder;
let mut decoder = Decoder::new();
let data = std::fs::read("ipfix.bin").unwrap();
let message = decoder.decode(&data).unwrap();
for record in message.data_records() {
println!("{:?}", record.get("sourceIPv4Address"));
}For a self-contained buffer (Templates and Data Records in the same
buffer), parse_message and parse_messages can be used directly.
Re-exports§
pub use models::DataRecord;pub use models::Field;pub use models::FieldSpecifier;pub use models::FieldValue;pub use models::Message;pub use models::MessageHeader;pub use models::Set;pub use parsers::parse_message;pub use parsers::parse_messages;pub use parsers::Decoder;pub use parsers::DecoderConfig;pub use parsers::ParseError;pub use parsers::Transport;