Dependency-free basic SNMPv2 client in Rust.
hroi / rust-snmp Goto Github PK
View Code? Open in Web Editor NEWRust SNMP client library
Rust SNMP client library
I'm trying to do a SNMP walk using getnext but I'm not too sure how to make it keep running until it hits end of the sub-tree. Even some pseudo-code will be really helpful.
I get the following errors when I tried to cross-compile for 32-bit arch.
error[E0512]: transmute called with differently sized types: usize (32 bits) to [u8; 8] (64 bits)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/snmp-0.2.1/src/lib.rs:290:42
|
290 | let bytes = unsafe { mem::transmute::<usize, [u8; 8]>(len.to_be()) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ transmuting between 32 bits and 64 bits
error[E0512]: transmute called with differently sized types: [u8; 8] (64 bits) to usize (32 bits)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/snmp-0.2.1/src/lib.rs:726:30
|
726 | o = unsafe { mem::transmute::<[u8; 8], usize>(bytes).to_be()};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ transmuting between 64 bits and 32 bits
error: aborting due to 2 previous errors
error: Could not compile `snmp`.
Please let me know if you need more logs etc.
Currently when I try to access HEX String output like mac addresses I just get some random characters. I think this library identifies it as Octet String,
running 1 test
[43, 6, 1, 4, 1, 131, 4, 11, 3, 4, 1, 1, 1, 6, 2] - OCTET STRING: \�x�P
Also the OIDs I get back in Varbinds look nothing like what's been sent - I'm no expert in SNMP so any input on that would be useful too.
Implement Travis CI or similar for this project to catch compile issues (like in #3).
HI,
Great library so missing in rust.
Any chances to get SNMP SET functionality or I have to write it myself ? :)
Could you please check why when running GET request I get a Value::Integer(15) which is correct I get the same when testing against snmpwalk/snmpget. However when I run GETNEXT request I get a Value::Integer(28)?
I'm porting some code to rust and I have a requirement to get SNMP requests working. Are you intending to maintain this project? I'm happy to help out as well if needed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.