Comments (6)
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.
I'll have to look at the code in detail...
- Nathan Owens [email protected] [2014-07-16 07:27:57 -0700]:
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.
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.
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.
This was merged, I think we can close this unless @tehnerd has any other comments?
from gosnmp.
sounds good for me. thank you
from gosnmp.
Related Issues (20)
- multiple device concurrent polling fails unless you create your own snmp object HOT 2
- Question: Use on Windows HOT 1
- VULNERABILITY [CWE-347] CVE-2020-9283] golang.org/x/crypto Improper Signature Verification HOT 1
- Sometimes a previous privacy passphrase is reused instead of the specified one
- usmStatsUnknownUserNames as terminating error? HOT 3
- Chinese coding is garbled HOT 2
- How to configure read/write community? HOT 1
- marshal: marshalPDU: unable to marshal varbind list: unable to marshal OID: Value out of range HOT 2
- Should cancelling a context interrupt an ongoing operation?
- out of bounds error when parsing AuthNoPriv packet HOT 4
- msgMaxSize to be supported in SNMP v3 bulkwalk requests
- V3 feat needed: Load keys manually if the passphrases are not allowed be saved locally HOT 1
- Connect function in gosnmp always returns nil even if the credentials are not valid HOT 1
- Panic in unmarshalV3Header
- Compatibility with GoSNMPServer HOT 7
- `net-snmp` based validation testing HOT 5
- Request ID size too large
- Not handling `0` values correctly for `OpaqueDouble` or `OpaqueFloat`
- Using SnmpDecodePacket for Encrypted/Authenticated Packets in GoSNMP HOT 5
- Retry netConnect() on resolution failure HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gosnmp.