https://github.com/rusticata/snmp-parser
SNMP parser written in rust with nom
https://github.com/rusticata/snmp-parser
Last synced: 25 days ago
JSON representation
SNMP parser written in rust with nom
- Host: GitHub
- URL: https://github.com/rusticata/snmp-parser
- Owner: rusticata
- License: other
- Created: 2016-10-09T19:38:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-29T08:53:35.000Z (about 1 year ago)
- Last Synced: 2024-04-24T07:37:43.411Z (about 1 year ago)
- Language: Rust
- Size: 136 KB
- Stars: 41
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-snmp - snmp-parser - SNMP parser written in rust with nom parser combinator framework. (Libraries / Rust)
README
[](./LICENSE-MIT)
[](./LICENSE-APACHE)
[](https://travis-ci.org/rusticata/snmp-parser)
[](https://crates.io/crates/snmp-parser)# SNMP Parser
A SNMP parser, implemented with the [nom](https://github.com/Geal/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`](https://docs.rs/snmp-parser/latest/snmp_parser/snmp/fn.parse_snmp_v1.html),
[`parse_snmp_v2c`](https://docs.rs/snmp-parser/latest/snmp_parser/snmp/fn.parse_snmp_v2c.html) and
[`parse_snmp_v3`](https://docs.rs/snmp-parser/latest/snmp_parser/snmpv3/fn.parse_snmp_v3.html).
If you don't know the version of the message and want to parse a generic SNMP message,
use the [`parse_snmp_generic_message`](https://docs.rs/snmp-parser/latest/snmp_parser/fn.parse_snmp_generic_message.html) function.The code is available on [Github](https://github.com/rusticata/snmp-parser)
and is part of the [Rusticata](https://github.com/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 messagesThanks: @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
* Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)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.