Re: [go-nuts] Announcing GoSNMP: a native Golang SNMP Client

Showing 1-4 of 4 messages
Re: [go-nuts] Announcing GoSNMP: a native Golang SNMP Client techabc 8/13/12 9:05 AM
nice!
It's near to develop EMS/NMS use golang. Hope GUI toolkit come out.

2012/8/12  <alo...@gmail.com>:
> Hello,
>
> This is my first post to the go-nuts group. I've seen couple of requests for
> an SNMP client for Go before, so posting here as well for anyone interested.
>
> The code and example are available at: https://github.com/alouca/gosnmp
>
> It currently implements GetRequest almost fully, with SetRequest and Walk
> coming the next few days.
>
> Thanks,
> Andreas
>
Re: [go-nuts] Announcing GoSNMP: a native Golang SNMP Client John Beisley 8/26/12 2:23 AM
Your library looks good, and is much better than my efforts to update
an older SNMP library to more data types.

One problem it suffers from, however, is that it cannot parse the full
range of SNMP packets (or at least not those supplied by my home
router). The trouble it's running into is that encoding/asn1 in the Go
standard library was written to support cryptographic needs, which
places restrictions on the BER encoding that is allowed to be parsed
(the DER unique encoding requirements). Specifically it disallows
superfluous leading zeros in length fields, I get this error in
particular:

Unable to decode packet: ASN.1 structure error: superfluous leading
zeros in length

Which can be traced back to http://golang.org/src/pkg/encoding/asn1/asn1.go#L402

I'm not sure what to do about this. It would be nice to be able to use
encoding/asn1 to parse non-DER compliant ASN1 data, but obviously to
do so would require an API change in encoding/asn1 in order to support
both the DER and non-DER compliance modes.
Re: Announcing GoSNMP: a native Golang SNMP Client Sonia Hamilton 12/7/12 3:50 AM
In the spirit of "announce early and announce often" :-) I'm pleased to announce soniah/gosnmp, a rewrite of alouca/gosnmp. Many thanks to Andreas for starting the GoSnmp project.

Features:
  • it works (mostly... see BER/DER)
  • re-implemented to use golang/asn1 (ie with DER not BER)
  • cleaner code, better doco and examples (well this is subjective...)
  • multiple decoders to make usage convenient eg decode to Interface{}, to string, to int64
  • ongoing development - I need GoSnmp for a large project I'm working on :-)

I'm aware of the difference between DER & BER - I used to DER to "get the project out the door" ie 95% accuracy is better than none at all, and I'll work on BER problems as they arise...

Comments/pull requests welcome.

--

Sonia Hamilton  http://www.snowfrog.net http://github.com/soniah/gosnmp

On Sunday, 26 August 2012 21:59:13 UTC+10, alo...@gmail.com wrote:
Hello all,

Apologies for the late reply, I was on holiday. Thanks for your interest in the library.

I'll post a fix regarding the network timeouts the next couple of days, as well as update the examples accordingly. Thanks for pointing that out.

I was thinking of abandoning encoding/asn1 completely, and moving to a hand-written parser to handle packing/unpacking the packet, but was going to this later as with asn1 it was faster to get something out. Anyway for parts of the process I do that anyway (with some code shared between gosnmp and asn1).

Is it possible get me a .pcap trace of the SNMP packet given back from your router so I can see the raw data?

Thanks,
Andreas

On Sunday, August 12, 2012 1:01:09 PM UTC+3, alo...@gmail.com wrote:
Hello,

This is my first post to the go-nuts group. I've seen couple of requests for an SNMP client for Go before, so posting here as well for anyone interested.

The code and example are available at: https://github.com/alouca/gosnmp

It currently implements GetRequest almost fully, with SetRequest and Walk coming the next few days.

Thanks,
Andreas

Re: Announcing GoSNMP: a native Golang SNMP Client Sonia Hamilton 2/4/13 9:46 PM
A note for future readers: I've annoted soniah/gosnmp as defunct - use soniah/gsnmpgo instead. Sonia.