Hi there,
in order to write an NetSNMP::Agent instance I need to check whether the OID
received in a request by the agent is part of the OID tree that is handled by
that agent. Also I need to extract the suffix from the registered root, the
suffix being then used as a key in a hash array. So for instance if I register
$Root_OID = new NetSNMP::OID(“.1.3.6.1.4.1.8072.9999.9999”)
then a request for
$Requested_OID = new NetSNMP::OID(“.1.3.6.1.4.1.8072.9999.9999.1.0”)
should be served with suffix = “1.0”.
Now determining that a particular OID is one of the leaves of the root OID is
feasible with numerical OIDs using regular expressions. However as soon as OIDs
are translated to symbolic identifiers it’s over, for instance now that I have
put together a small MIB for my project, I get
print “$Root_OID”-> “netSnmpPlaypen”
print “$Requested_OID” -> “cntNumber.0”
I don’t see in the NetSNMP::OID doc or source code any simple way of checking
that an OID is in the subtree of another OID, or even to forcibly display an
OID in numerical form, which would be a workaround. So my question is: how am I
suppose to code the agent to handle that situation?
Thanks a lot for your help,
Chris
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders