Giter VIP home page Giter VIP logo

Comments (6)

virtuallynathan avatar virtuallynathan commented on May 16, 2024

Hey @tehnerd,

I think these were set by the original author as sensible defaults, they can of course be changed. If you, and the community at large feel these aren't actually sensible, then I suppose it makes sense to change them. Thoughts @soniah & @codedance?

from gosnmp.

soniah avatar soniah commented on May 16, 2024

I'll have to look at the code in detail...

Hey @tehnerd,

I think these were set by the original author as sensible defaults, they can of course be changed. If you, and the community at large feel these aren't actually sensible, then I suppose it makes sense to change them. Thoughts @soniah & @codedance?

from gosnmp.

codedance avatar codedance commented on May 16, 2024

The defaults are there to support the Walk* methods.

I agree that MaxRepetitions should be configurable. I'll change this issue status to "enhancement" and submit a pull request for review.

Regarding OID: You can of course supply your own base OID (and the API encourages this). The default base is there to simply make it easier to not misuse! e.g.

mysnmp.Walk(".1")  // Walk from a very higher level

mysnmp.Walk("1.3.6.1.2.1") // Walk a specific table - e.g.  RFC 1213 system table

mysnmp.Walk("")  // Walk ???? - OK, let's default to the default public space as this should work on every standards compliant device.  Better than throwing a panic :-)

The design is analogous to net-snmp... from the man page:

If no OID argument is present, snmpwalk will search the subtree rooted at SNMPv2-SMI::mib-2

from gosnmp.

codedance avatar codedance commented on May 16, 2024

I've created a pull request of Sonia's master under #18 that should address requirements and close this issue. It's a low risk change but does hit public API surface so a review would be good.

Are we happy with the names?

As an aside:
My only other thinking would be to nest them at a deeper level such as

GoSNMP.Walk.MaxRepetitions
GoSNMP.Walk.NonRepeaters

but I feel the extra code complexity would offset any public surface area gain.

from gosnmp.

virtuallynathan avatar virtuallynathan commented on May 16, 2024

This was merged, I think we can close this unless @tehnerd has any other comments?

from gosnmp.

tehnerd avatar tehnerd commented on May 16, 2024

sounds good for me. thank you

from gosnmp.

Related Issues (20)

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.