snmp: Simple Network Management Protocol |
Top Previous Next |
Simple Network Management Protocol (SNMP) is an Internet Standard protocol for collecting and organizing information about managed devices on IP networks, and for modifying that information to change device behavior.
The manager can read and, when permitted, write to variables of managed devices. The managed devices can send asynchronous notifications, called traps, to managing applications. Traps can contain variables with information about the event.
With an SNMP capable RTCU device, the application of the managed device can publish internal variables through SNMP. These variables can be read and possibly written to by the managing application.
The various variable types supported can be deduced from the offered variable read/write functions below.
All variables and traps are represented by an Object Identifier (OID). Here the OID's must be used in a numerical dotted notation. For example: "1.3.6.1.2.1.1.5". We only support OIDs in this notation, no OID translation is supported.
SNMP version 1, 2c and 3 are supported.
SNMP v3 security:Both the USM (User-based Security Model) and TSM (Transport Security Model) methods are supported.
The USM method uses Users for identification and privacy. A user is identified by username, and contains all the necessary parameters. (see the snmpUser structure)
The TSM method uses TLS/DTLS for identification and privacy. The TLS/DTLS are based on certificates for security. (see certificates for more information) Important: The certificates must not be password protected.
When working with traps, each managed device must be identified; this is done with two lists, a list of users for managed devices using the USM method, and a list of certificates for managed devices using the TSM method. Both of the lists are persistent and will not be lost when the device is reset. The lists are managed by the cert and user functions listed below.
The SNMP functionality offered here, can be divided into eight sections as:
Session handling
|
Connect to a SNMP service. |
||
Disconnect from a SNMP service. |
Read a double floating point value. |
||
Read a floating point value. |
||
Read an integer value. |
||
Read an IP address value. |
||
Read an OID value. |
||
Read a string value. |
||
Read a timetick value. |
Write a double floating point value. |
||
Write a floating point value. |
||
Write an integer value. |
||
Write an IP address value. |
||
Write an OID value. |
||
Write a string value. |
||
Write a timetick value. |
Start the publishing agent. |
||
Stop the publishing agent. |
||
Publish a double-precision floating-point type variable. |
||
Publish a single-precision floating-point type variable. |
||
Publish an integer type variable. |
||
Publish an IP-address type variable. |
||
Publish an OID type variable. |
||
Publish a string type variable. |
||
Publish a timeticks type variable. |
||
Remove published variables from the register. |
Receiving traps
The following functions and structures are used to manage trap reception and handling.
Start listening for traps on an IP port. |
||
Stop listening for traps on all IP ports. |
||
Register a trap to the event handler. |
||
Unregister a trap from the event handler. |
Establish the basic trap. |
||
Free resources from an establish trap. |
||
Add variables to an established trap. |
||
Send a trap to a connected manager application. |
Security handling
The following functions and structures are used to manage security for SNMP version 3.
Configure TSM security. |
||
Get the name of a certificate. |
||
Set the name of a certificate. |
||
Structure with USM user information. |
||
Get a USM user profile for the trap handler. |
||
Set a USM user profile for the trap handler. |
||
Get a USM user profile for the publishing agent. |
||
Set a USM user profile for the publishing agent. |
Wait for incoming trap events or optional timeout. |
||
Get the next variable of a received SNMP event. |
||
Structure to receive SNMP variables. |
•10 simultaneous connections.
•It is only possible to have an RTCU device run as either a manager or a client (publishing agent).
•It is possible to listen on 4 IP ports simultaneously.
•There is a limit of 50 individual OIDs that can be published at a time.
•30 trap OIDs to listen for can be registered at a time.
•The maximum size of a trap is 10 kB.
•10 traps for sending can be established at a time.
•Each trap for sending can have at most 10 variables.
•The NX32L compilation mode is required. (See Project Settings in the RTCU IDE)