Windows NT Extendible Agent

The Windows NT SNMP service (snmp.exe) is an extendible SNMP agent that allows developers to add DLLs to service additional MIBs. The agent itself does not contain instrumentation for any MIBs; instead it is responsible for retrieving SNMP requests for the NT workstation or server and passing these requests on to the appropriate DLL for resolution. The response data is then returned to the agent, who is responsible for returning the request to the management station that made it. By default, four extension agent DLLs are shipped with the SNMP service. These DLLs service the MIB-II, LanMan2, DHCP and WINS MIBs. Developers who are interested in adding additional MIBs can create a DLL using the API documented in the SNMP Programmer's Reference Guide and this paper. The extendible agent is also capable of issuing traps on behalf of any of the agent DLLs.

The extendible agent interfaces to the network via the Winsock DLL (Figure 2). This DLL works over both the IP and IPX transports. This enables the extendible agent to be accessible from both IP and IPX network management consoles. The SNMP agent can be configured to accept requests only from particular IPX or IP addresses. This is done via the Network Control Panel. In addition, the valid communities that this agent will recognize can also be configured there.

The extendible agent determines what agent DLLs to load via registry values located under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP \Parameters\ExtensionAgents key. Once the registry is consulted during service initialization, the extendible agent gets the OID prefix for the MIB that the DLL supports via the SnmpExtensionInit API supplied by the DLL. The extendible agent builds a table of supported MIBs with their corresponding resolution routines and stores it sorted. Once all the DLLs are loaded and the table is initialized, the extendible agent is ready to process SNMP requests.

Although the SNMP extendible agent service is written as a service, it can be run directly as an executable. This comes in handy when attempting to debug extension agent DLLs.