-
Notifications
You must be signed in to change notification settings - Fork 0
A rust library to allow linking to net-snmp
License
Firstyear/rs_net_snmp
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
rs_net_snmp is a rust binding to libnetsnmp. At the moment is is capable of connecting to version 1 and 2c snmp servers to query oids. The library is design to mask many of the complexities of the libnetsnmp into useful functions with pure rust types. ``` let mut rssnmp: NetSNMP = NetSNMP::new(); rssnmp.set_version(SNMPVersion::VERSION_2c).unwrap(); rssnmp.set_community("public").unwrap(); rssnmp.set_transport("tcp6:localhost").unwrap(); rssnmp.open_session().unwrap(); println!("SNMPv2-MIB::sysName.0 = {:?}", rssnmp.get_oid("SNMPv2-MIB::sysName.0").unwrap() ); rssnmp.destroy(); ``` This library provides a number of rust commands that interact with this library: * rsnmpdemo Is an implementation of the above example. * rsnmpget Is intentded to be a "parallel" to snmpget * rsnmpmonitor Takes a toml file of oids to monitor, and returns their status. Intended for use with cron.
About
A rust library to allow linking to net-snmp
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published