The SNMP agent allows an embedded system to handle SNMP requests from an SNMP manager and sending TRAP and INFORM messages to managers. It comes with all features typically required by embedded systems: Maximum flexibility, easily portable and low RAM usage. RAM usage has been kept to a minimum by smart buffer handling.
The Simple Network Management Protocol is a standard protocol to manage IP based devices in a network. Typical usage is to monitor counters and status in network switches and other network equipment but can also be used for configuration read/write operations.
The development of SNMP is coordinated by the IETF (Internet Engineering Task Force) with the widely used SNMPv2c inspired from several other sources. The current protocol version supported by the emNet SNMP agent is v1 and v2c. The latest protocol version is v3.
|Application layer||Application layer protocol:|
|Transport layer||Tranport layer protocol:|
|Network layer||Network layer protocol:|
|Link layer||Link layer protocol:|
Ethernet (IEEE 802.3), ...
The SNMP agent is the part that is implemented directly inside a device to fulfill requests like status information and configuration of the device.
The emNet SNMP agent requires a UDP/IP stack. It is optimized for emNet, but any RFC-compliant UDP/IP stack can be used. The shipment includes a Win32 simulation, which uses the standard Winsock API and an implementation which uses the socket API of emNet as well as an implementation which uses the zero-copy API of emNet.
For implementing SNMP in your own product you need to acquire a Private Enterprise Number (PEN) from the IANA. A PEN can be requested free of charge at pen.iana.org/pen/app.
The PEN used in the samples (dec. 46410) is the PEN registered for SEGGER Microcontroller GmbH & Co. KG. This needs to be be changed to your own PEN in your product and the content of the MIB is subject to change in the future.
The ROM usage depends on the compiler options, the compiler version and the used CPU. The memory requirements of the SNMP agent module presented in the tables below have been measured on a Cortex-M4 system. Details about the further configuration can be found in the sections of the specific example.
#define IP_SNMP_AGENT_WORK_BUFFER 64
The following resource usage has been measured on a Cortex-M4 system using the SEGGER compiler with size optimization.
|emNet SNMP Agent||Approximately 6.2 KByte|
The following resource usage shows typical RAM requirements for an SNMPv2c Agent implementation.
Most of the RAM is consumed for building the MIB tree in the application which is not subject of this measurement as it depends upon the application itself.
|emNet SNMP Agent||Approximately 300 bytes|
The SNMP agent implements the relevant parts of the following Request For Comments (RFC).
|[RFC 2578]||Direct Link: Structure of Management Information Version 2 (SMIv2)|
|[RFC 3416]||Direct Link: Version 2 of the Protocol Operations for the Simple Network Management Protocol (SNMP)|
|[RFC 4181]||Direct Link: Guidelines for Authors and Reviewers of MIB Documents|