Extension-Agent Architecture

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

The most current extension-agent architecture uses the MIB-II extension agent and a fictitious Lanmgr-2 extension agent.

The master agent begins its initialization process by opening the SNMP\Parameters\ExtensionAgents subkey under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and enumerating the extension agents that are registered. Each value under this subkey represents another registry key in which an extension agent has stored settings. The following registry key example shows the settings for the subkey of an extension agent.

1 : REG_SZ : SOFTWARE\Microsoft\LANManagerMib2Agent\CurrentVersion
2 : REG_SZ : SOFTWARE\Microsoft\RFC1156Agent\CurrentVersion

Where SOFTWARE\Microsoft\LANManagerMib2Agent\CurrentVersion contains only the following.

Pathname : REG_EXPAND_SZ : lmmib2.dll
Windows CE does not support the expansion of SystemRoot – 
the only thing needed in the registry value is the name of the DLL – this differs from NT

SOFTWARE\Microsoft\RFC1156Agent\CurrentVersion contains only the following.

Pathname : REG_EXPAND_SZ : inetmib1.dll

The master agent requires the name of the library in order to load the extension-agent DLL through the LoadLibrary function.

The five Extension API functions are implemented in extension-agent DLLs and called by the SNMP service. Each extension-agent DLL uses only the Extension API to communicate with the SNMP service. An extension-agent DLL requires no active thread of execution, but you can create one if you need it. Each extension-agent DLL must export the following three entry points:

  • SnmpExtensionInit

  • SnmpExtensionQuery

  • SnmpExtensionTrap

    Note

    The ExtensionInitEx, ExtensionQueryEx, and ExtensionClose functions are optional.

See Also

Concepts

About SnmpExtensionInit
About SnmpExtensionQuery
About SnmpExtensionTrap
SNMP Extension Agent