snmptools
Unsafe Rust functions, based directly on net-snmp library for those, which are not Rust-native yet.
Methods:
- Converts SNMP OIDs to MIB names and vice-versa
Required crate features:
-
static (default) - compiles the binary with libnetsnmp.so dep or compile static lib inside (a bit faster)
-
dynamic - loads libnetsnmp.so dynamically (more cross-platform)
Example
Prepare the system
apt-get install libsnmp-dev snmp-mibs-downloader
use ;
init.unwrap;
let snmp_oid = from.unwrap;
let name = get_name.unwrap;
assert_eq!;
let snmp_oid2 = get_oid.unwrap;
assert_eq!;