How to - Microsoft® Windows® SNMP implementation

Microsoft SNMP Service (Snmp.exe)

The SNMP service receives the SNMP packets from the network, decodes them, and then dispatches them to the appropriate SNMP subagents. The SNMP service is also called the SNMP Master Agent or the SNMP Extendible Agent. The service is also responsible for intercepting events (traps) from the SNMP subagents and forwarding trap messages to the appropriate management systems.

SNMP Subagents
Also known as SNMP Extension Agents (such as Inetmib1.dll, Hostmib.dll, Lmmib2.dll), subagents are dynamic-link libraries that export a set of entry points. When an SNMP message is received, the SNMP service decodes the content and passes it to the appropriate subagent by calling one of these entry points. After it processes the message, the subagent passes the information back to the SNMP service. In turn, the service forms the data into an SNMP message and sends it back to the management system. The SNMP service and all SNMP subagents depend on the SNMP Utility API.

SNMP Utility API (Snmpapi.dll)
This API provides the functions required by both the agent and manager for processing SNMP messages. The SNMP service uses this library for memory management operations, address- decoding routines, Object Identifier handling routines, and so forth. A set of routines is also provided that helps the SNMP subagents handle and order the SNMP objects. Although it is not necessary to use the Snmpapi.dll, the development of additional SNMP subagents is greatly facilitated by the framework defined by this tool.

WinSNMP API (Wsnmp32.dll) and Management API (Mgmtapi.dll)
These APIs are provided to facilitate the development of SNMP management software applications. The WinSNMP API provides a set of functions for encoding, decoding, sending, and receiving SNMP messages. The Management API is a simple, limited API that is written on top of the WinSNMP and SNMP Utility APIs. It provides a very basic set of functions that can be used to quickly develop basic SNMP management software applications.

SNMP Trap Service (Snmptrap.exe)
The trap service is a separate SNMP component that allows management software applications to receive trap messages sent by SNMP agents. The service receives incoming trap messages from the network and forwards them through the WinSNMP API (Wsnmp32.dll) to the appropriate management system.

SNMP Manager Applications (Snmputil.exe)
This tool, which is provided on the Windows 2000 and XP operating system CD, is meant to be used as an example of a management software application that is built on top of the Management API. You can develop applications by using either the Management API or the WinSNMP API, or both. Alternatively, you can develop a management application directly on top of the Microsoft Windows Sockets API and not use either the Management API or the WinSNMP API. For more information about developing an SNMP management application, see the Microsoft® Windows® 2000 Platform SDK documentation.