[This is preliminary documentation and subject to change.]
The Management Information Base (MIB) API is used to query and set the values of MIB variable exported by one of the router managers or any of the routing protocols that the router manager services. These variables do not have to correspond to the variables defined in the SNMP MIB definition. Instead, it is the SNMP Agent's job to convert the variables into a format suitable for interaction with an SNMP Manager. The variables provided by the SNMP Agent must at least cover all the variables defined in the SNMP MIB definition.
The module servicing the MIB call will be a router manager or one of the routing protocols. The call must specify a router manager even if the call will be handled by one of the routing protocols. In such a case, the caller should specify the router manager that corresponds to the protocol family for that routing protocol. For example, if the Open Shortest Path First (OSPF) routing protocol were handling the MIB call, the caller would need to specify the IP Router Manager, since OSPF belongs to the IP protocol family. In each of the MIB functions, the dwTransportId parameter specifies a router manager, and the RoutingPid parameter specifies the routing protocol. The router manager also has a unique RoutingPid, since some of the MIB variables may be handled by the router manager itself.
To query and set variables, the module that services the calls must define a set of data structures. These data structures include structures to use as Object Identifiers and structures that hold the value of the MIB variables being accessed. These data structures are opaque to all but the caller of the MIB function and the module servicing the call.