Comments (9)
This error is generated when WapSNMP does not understand the data type of the object returned by the SNMP Agent (the switch/router/... you're monitoring). This is not the result of the OID starting with .1.3.
The reason almost every OID starts with 1.3 is that this is the space allocated to public, shared OIDs. Everything outside of it is vendor-specific. This usually means that these numbers are temporary, in the sense that after a software upgrade of the router or switch they may not be available anymore. Of course it also means it's where the more interesting stuff is.
from wapsnmp.
I am unsure what to do with this exactly since the OID you provided .1.0.8802 is a table identifier. Tables themselves do not have an object returned, the first instance should be 1.0.8802.1.1.1.1.1.1.0 .
May I ask where you're seeing this, what device/version ? Ideally I'd love a tcpdump of the data that
WapSNMP fails to parse. Alternatively I could probe the device you're having trouble with.
from wapsnmp.
OID would be .1.0.8802.1.1.2.1.5.32962.1.2.3.1.2.2.1 its from a DLINK DGS-1500.
It seems that the OID I "hacked" into MustParseOid gets automatically rewritten to something which starts with 1.3. tcpdump here: http://pastebin.com/LD3VSyXd
Of course the rewritten OID can't be found... Its invalid indeed.
from wapsnmp.
The request which produces this dump:
oid := wapsnmp.MustParseOid(".1.0.8802.1.1.2.1.5.32962.1.2.3.1.2.45.2")
snmp, err := wapsnmp.NewWapSNMP(d.Address, d.Community, d.Version, 2*time.Second, 5)
from wapsnmp.
Any chance you can send me the data dump (the file) that produces the error ? I can't seem to find the oid you mentioned here in the data you pasted.
Just tcpdump -w log.pcap, start the program to generate the error, and get log.pcap to me. ( chr -no spaces- istop -nothing here- hedevriese -at goes here- gmail.com).
from wapsnmp.
Dump should arrive shortly. I can't find the OID either - and I think this is the problem ;). The 1.0.8802 get send as 1.3.8802.
from wapsnmp.
The code which does the "rewrite" of the OID is in oid.go in DecodeOID() lines 70-72:
result := make([]int, 2)
result[0] = 1
result[1] = 3
why is this necessary?
from wapsnmp.
and again on line 99-102:
/* Every o is supposed to start with .1.3, which is encoded as
40 * first_byte + second byte. First_byte is ALWAYS 1, second
byte is always 3, so it's 43, or hex 0x2b */
result = append(result, 0x2b)
from wapsnmp.
If I change
result = append(result, 0x2b)
to
result = append(result, 0x28)
it works as expected. But it breaks all OIDs starting with 1.3 of course. I could write some edge-case patch, but that does not feel like a proper solution...
from wapsnmp.
Related Issues (11)
- Issue with negative Oid values HOT 7
- buffer error? HOT 4
- udp_stub_connection.go and flag.PrintDefaults() HOT 1
- Counter64 Support HOT 2
- type 65 not recognized HOT 1
- EncodeInteger/EncodeUint Issue HOT 4
- Using WSDL files for description methods HOT 1
- License info HOT 2
- Calls to Poll use fixed timeout HOT 4
- Various bugs/issues for discussion HOT 8
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 wapsnmp.