On 29 December 2011 09:57, Mandar Joshi <[email protected]> wrote:
> I'm writing a MIB module.
> I've registered the OID "{ 1, 3, 6, 1, 4, 1, 8072, 2, 2, 1 }" in my module.
How? What is the code that you have used to register this OID?
> Is it possible for this module to receive all OIDs begining with
> "{ 1, 3, 6, 1, 4, 1, 8072, 2, 2, 1 }"
>
> Eg .1.3.6.1.4.1.8072.2.2.1.5555
> or .1.3.6.1.4.1.8072.2.2.1.1234
Yes, it is.
However your root OID is defined as
NET-SNMP-EXAMPLES-MIB::netSnmpIETFWGTable
So neither of your examples are actually valid.
(All valid instances under this tree will be of the form
.1.3.6.1.4.1.8072.2.2.1.1.{2,3}."string" )
> If I execute the command
> snmpget localhost .1.3.6.1.4.1.8072.2.2.1.5555
> I should be able to read the last part of the OID i.e. 5555 in my module
The point of the MIB helpers is to take care of parsing the OIDs,
extracting the index value(s), and providing them to the MIB handler,
so that you don't need to do this yourself.
If you use one of the mib2c templates, this will take care of much
of the donkey work automatically.
See the FAQ entries for more details.
Dave
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders