How to read/parse the mib files using the Agent++ library

I need to read/parse the MIB files placed in a directory, use the parsed objects, and perform operations like traversing the MIB tree to find the lexicographic successor for a given OID. As seen in API docs, the constructor Mib (const NS_SNMP OctetStr &) takes a path for MIBs. I tried giving the path as the directory where my MIB files are present, but this doesn’t seem to read the MIB files.
So, does the constructor [Mib (const NS_SNMP OctetStr &)] has the provision to read the .mib files? If not, is there a way with which I could parse the .mib files and then traverse the mib tree accordingly using the Agent++ library?

Hi Nihal,

The Mib constructor with path parameter stores the values within the Mib instance as BER encoded stream to the file at the given location and reads back the values on the next restart.

It does not parse MIB specifications.

If you want to use MIB specifications in your agent, you can use AgenPro to generate C++ objects from the MIB module specification(s) at compile time.