#asn-1 #network-protocol #snmp #ietf-rfc #pdu #no-std

rasn-snmp

Data types for handling the Simple Network Management Protocol

78 releases

new 0.28.7 Jan 22, 2026
0.28.2 Dec 23, 2025
0.28.1 Nov 19, 2025
0.27.0 Jun 27, 2025
0.3.1 Jul 19, 2021

#4 in #pdu

Download history 186/week @ 2025-10-04 277/week @ 2025-10-11 233/week @ 2025-10-18 71/week @ 2025-10-25 65/week @ 2025-11-01 117/week @ 2025-11-08 137/week @ 2025-11-15 110/week @ 2025-11-22 84/week @ 2025-11-29 88/week @ 2025-12-06 73/week @ 2025-12-13 120/week @ 2025-12-20 163/week @ 2025-12-27 106/week @ 2026-01-03 178/week @ 2026-01-10 156/week @ 2026-01-17

630 downloads per month
Used in 3 crates

MIT/Apache

1MB
25K SLoC

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) => {},
    // ...
# _ => {}
}

Dependencies

~6MB
~117K SLoC