15 releases (breaking)

0.11.0 Feb 10, 2025
0.10.0 Feb 29, 2024
0.9.0 Mar 15, 2023
0.8.0 Sep 13, 2021
0.1.0 May 8, 2018

#1230 in Parser implementations

Download history 7701/week @ 2024-10-29 4052/week @ 2024-11-05 4896/week @ 2024-11-12 6564/week @ 2024-11-19 6390/week @ 2024-11-26 9695/week @ 2024-12-03 6013/week @ 2024-12-10 5902/week @ 2024-12-17 2078/week @ 2024-12-24 4682/week @ 2024-12-31 7947/week @ 2025-01-07 7287/week @ 2025-01-14 8388/week @ 2025-01-21 7522/week @ 2025-01-28 4824/week @ 2025-02-04 4590/week @ 2025-02-11

26,789 downloads per month
Used in suricata

MIT/Apache

45KB
771 lines

License: MIT Apache License 2.0 Build Status Crates.io Version

SNMP Parser

A SNMP parser, implemented with the nom parser combinator framework.

The goal of this parser is to implement SNMP messages analysis, for example to use rules from a network IDS.

To read a message, different functions must be used depending on the expected message version. The main functions for parsing are parse_snmp_v1, parse_snmp_v2c and parse_snmp_v3. If you don't know the version of the message and want to parse a generic SNMP message, use the parse_snmp_generic_message function.

The code is available on Github and is part of the Rusticata project.

Changes

0.11.0

  • Update asn1-rs to 0.7
  • Update thiserror to 2.0
  • Fix clippy warnings: elided lifetime has a name
  • Use #[from] instead of From impl for asn1 error
  • Re-export Oid and OidParseError
  • Fix renamed lint
  • Implement FromBer for all top-level messages

Thanks: @MattesWhite

0.10.0

  • Update asn1-rs to 0.6

0.9.0

  • Convert to asn1-rs
  • Set MSRV to 1.57

0.8.0

  • Upgrade to nom 7 / der-parser 6

0.7.0

  • Upgrade to nom 6 / der-parser 5

0.6.0

  • Upgrade to der-parser 4

0.5.2

  • Use parse_ber_u32 from der-parser crate

0.5.1

  • Fix parsing: use BER parsing so DER constraints are not applied

0.5.0

  • Upgrade to nom 5 and der-parser 3

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.5–2.3MB
~45K SLoC