SnmpExtensionMonitor callback function
[SNMP is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use Windows Remote Management, which is the Microsoft implementation of WS-Man.]
The Microsoft SNMP service calls the SnmpExtensionMonitor function to provide the SNMP extension agent with a view to the service's internal counters and parameters. This function is an element of the SNMP Extension Agent API.
The SnmpExtensionMonitor function is optional. Extension agents should implement the function if they are interested in a view of the SNMP service's internal management objects, as defined in RFC 1213, "Management Information Base for Network Management of TCP/IP-based internets: MIB-II."
- pAgentMgmtData [in]
Pointer to an array of AsnAny objects (structures). The number of objects, and the type and description of each object, are in accordance with RFC 1213. For more information, see the following Remarks section.
Unless an unexpected error occurs while the SNMP extension agent is processing the value of the pAgentMgmtData parameter, the extension agent should return TRUE. If the extension agent returns FALSE, the SNMP service does not load the extension agent, and the service stops directing SNMP requests to the extension agent.
If the extension agent exports the SnmpExtensionMonitor function, the SNMP service calls the function during initialization of the extension agent, immediately after the service calls the SnmpExtensionInit and the SnmpExtensionInitEx functions.
The SNMP service dynamically updates the SNMP counters (for example, the snmpInPkts and the snmpOutNoSuchNames counters) in the array pointed to by the pAgentMgmtData parameter. In order to be able to read these values while the SNMP service is running, the extension agent must store the pointer to pAgentMgmtData.
Note that an SNMP extension agent should not update the memory pointed to by the pAgentMgmtData parameter. This is because the values of the SNMP service's internal counters would no longer be valid, and the behavior of the SNMP service could become unpredictable. As long as the extension agent does not alter it, the memory pointed to by pAgentMgmtData is valid while the SNMP service is running.
Minimum supported client
|Windows 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|
- Simple Network Management Protocol (SNMP) Overview
- SNMP Functions