rasn-snmp

Crates.iorasn-snmp
lib.rsrasn-snmp
version
sourcesrc
created_at2021-07-18 19:26:50.344159
updated_at2024-10-18 09:28:40.251615
descriptionData types for handling the Simple Network Management Protocol
homepage
repository
max_upload_size
id424462
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(XAMPPRocky)

documentation

README

Simple Network Management Protocol

rasn-snmp implementation of the protocol data types from IETF RFCs 1157, 1901, 3412, and 3416. This does not provide an implementation of an agent or proxy, but provides the data types needed to build your own agent or proxy implementation.

This library in combination with it's sibling crates rasn, rasn-smi, and rasn-mib allow you to decode, and encode SNMP protocol messages using entirely safe Rust. All of these libraries are also #[no_std] so they support any platform that supports [alloc].

use rasn_snmp::{v2c::Message, v2::Pdus};

let data: &[u8] = &[];

// Decode SNMPv2c message containing a SNMPv2 PDU.
let message: Message<Pdus> = rasn::ber::decode(data).unwrap();

// Handle the request.
match message.data {
    Pdus::GetRequest(request) => {},
    Pdus::GetNextRequest(request) => {},
    Pdus::Response(request) => {},
    // ...
# _ => {}
}
Commit count: 0

cargo fmt