1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! [](./LICENSE-MIT)
//! [](./LICENSE-APACHE)
//! [](https://travis-ci.org/rusticata/snmp-parser)
//! [](https://crates.io/crates/snmp-parser)
//!
//! # SNMP Parser
//!
//! An SNMP parser, implemented with the [nom](https://github.com/Geal/nom)
//! parser combinator framework.
//!
//! It is written in pure Rust, fast, and makes extensive use of zero-copy.
//! It also aims to be panic-free.
//!
//! 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.
//! This crate implements the [`asn1_rs::FromBer`] trait, so to parse a message, use the
//! expected object and call function `from_ber`.
//!
//! For example, to parse a SNMP v1 or v2c message (message structure is the same), use
//! [`SnmpMessage`]`::from_ber(input)`.
//! To parse a SNMP v3 message, use [`SnmpV3Message`]`::from_ber(input)`.
//! If you don't know the version of the message and want to parse a generic SNMP message,
//! use [`SnmpGenericMessage`]`::from_ber(input)`.
//!
//! Other methods of parsing (functions) are provided for compatibility:
//! these functions are [`parse_snmp_v1`](snmp/fn.parse_snmp_v1.html),
//! [`parse_snmp_v2c`](snmp/fn.parse_snmp_v2c.html) and
//! [`parse_snmp_v3`](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`](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.
pub use *;
pub use *;
pub use *;
// re-exports to prevent public dependency on asn1_rs
pub use asn1_rs;
pub use ;