|
3 | 3 | //! ## Description
|
4 | 4 | //!
|
5 | 5 | //! A Netflow Parser library for Cisco V5, V7, V9, IPFIX written in Rust.
|
6 |
| -//! Supports chaining of multple versions in the same stream. ({v5 packet}, {v7packet}, {v5packet}, {v9packet}, etc.) |
| 6 | +//! Supports chaining of multiple versions in the same stream. ({v5 packet}, {v7 packet}, {v5 packet}, {v9 packet}, etc.) |
7 | 7 | //!
|
8 | 8 | //! ## References
|
9 | 9 | //! See: <https://en.wikipedia.org/wiki/NetFlow>
|
|
50 | 50 | //!
|
51 | 51 | //! ## Netflow Common
|
52 | 52 | //!
|
53 |
| -//! For convenience we have included a `NetflowCommon` and `NetflowCommonFlowSet` structure. |
| 53 | +//! We have included a `NetflowCommon` and `NetflowCommonFlowSet` structure. |
54 | 54 | //! This will allow you to use common fields without unpacking values from specific versions.
|
55 | 55 | //! If the packet flow does not have the matching field it will simply be left as `None`.
|
56 | 56 | //!
|
|
136 | 136 | //!
|
137 | 137 | //! ## V9/IPFix notes:
|
138 | 138 | //!
|
139 |
| -//! Parse the data (`&[u8]` as any other versions. The parser (NetflowParser) holds onto already parsed templates, so you can just send a header/data flowset combo and it will use the cached templates.) To see cached templates simply use the parser for the correct version (v9_parser for v9, ipfix_parser for IPFix.) |
| 139 | +//! Parse the data (`&[u8]` as any other versions. The parser (NetflowParser) holds onto already parsed templates, so you can just send a header/data flowset combo, and it will use the cached templates.) To see cached templates simply use the parser for the correct version (v9_parser for v9, ipfix_parser for IPFix.) |
140 | 140 | //! ```rust
|
141 | 141 | //! use netflow_parser::NetflowParser;
|
142 | 142 | //! let parser = NetflowParser::default();
|
|
150 | 150 | //! * `parse_unknown_fields` - When enabled fields not listed in this library will attempt to be parsed as a Vec of bytes and the field_number listed. When disabled an error is thrown when attempting to parse those fields. Enabled by default.
|
151 | 151 | //!
|
152 | 152 | //! ## Included Examples
|
153 |
| -//! Some examples has been included mainly for those who want to use this parser to read from a Socket and parse netflow. In those cases with V9/IPFix it is best to create a new parser for each router. There are both single threaded and multi-threaded examples in the examples directory. |
| 153 | +//! Examples have been included mainly for those who want to use this parser to read from a Socket and parse netflow. In those cases with V9/IPFix it is best to create a new parser for each router. There are both single threaded and multithreaded examples in the examples directory. |
154 | 154 | //!
|
155 | 155 | //! To run:
|
156 | 156 | //!
|
@@ -265,8 +265,8 @@ pub enum NetflowParseError {
|
265 | 265 | }
|
266 | 266 |
|
267 | 267 | impl NetflowParser {
|
268 |
| - /// Takes a Netflow packet slice and returns a vector of Parsed Netflows. |
269 |
| - /// If we reach some parse error we return what items be have. |
| 268 | + /// Takes a Netflow packet slice and returns a vector of Parsed Netflow. |
| 269 | + /// If we reach some parse error we return what items we have. |
270 | 270 | ///
|
271 | 271 | /// # Examples
|
272 | 272 | ///
|
|
0 commit comments