GithubHelp home page GithubHelp logo

rust-snmp's Introduction

RUST-SNMP

Dependency-free basic SNMPv2 client in Rust.

Documentation Build Status

rust-snmp's People

Contributors

hroi avatar svedrin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rust-snmp's Issues

Advice/example on how to do snmp walk

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.

Cannot compile for 32-bit

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.

How to handle HEX-STRING?

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.

CI

Implement Travis CI or similar for this project to catch compile issues (like in #3).

SNMP SET functionality

HI,
Great library so missing in rust.
Any chances to get SNMP SET functionality or I have to write it myself ? :)

Are you planning to maintain this project?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.