Before you use the SNMP APIs, you should read
the Simple Network Management Protocol (SNMP) Support book . It describes how to configure AS/400 to use SNMP. It also
discusses
SNMP agents, subagents, managers, and management information
base (MIBs).
For information about using the SNMP APIs,
see "Using the SNMP Subagent DPI API"
in the book Simple Network Management Protocol (SNMP) Support
.
You can get more information about SNMP and Distributed Protocol Interface (DPI) from Requests for Comment (RFC) on the Internet. A file called ways_to_get_rfcs has details about obtaining RFCs. To receive these details send an EMAIL message as follows:
To: rfc-info@ISI.EDU Subject: gettingrfcs help: ways_to_get_rfcsDPI is described in RFC 1592, "Simple Network Management Protocol Distributed Protocol Interface," Version 2.0.
The SNMP APIs include the SNMP subagent APIs and the SNMP manager APIs. This document contains information about the SNMP subagent APIs. See Simple Network Management Protocol (SNMP) Manager APIs for information about the SNMP manager APIs.
The term Distributed Protocol Interface (DPI) packet is used throughout this chapter. The DPI is an extension to SNMP agents that permit users to dynamically add, delete, or replace management variables in the local MIB without requiring recompilation of the SNMP agent.
Figure 1-1. SNMP Subagent Functions
| Operation | Description |
|---|---|
| connectSNMP() | Establish connection with SNMP agent |
| debugDPI() | Set DPI packet trace |
| disconnectSNMP() | End connection with SNMP agent |
| DPI_PACKET_LEN() | Get length of DPI packet |
| fDPIparse() | Free storage from DPI packet parse |
| fDPIset() | Free storage from DPI set packet |
| mkDPIAreYouThere() | Make a DPI AreYouThere packet |
| mkDPIclose() | Make a DPI close packet |
| mkDPIopen() | Make a DPI open packet |
| mkDPIregister() | Make a DPI register packet |
| mkDPIresponse() | Make a DPI response packet |
| mkDPIset() | Make a DPI set packet |
| mkDPItrap() | Make a DPI trap packet |
| mkDPIunregister() | Make a DPI unregister packet |
| pDPIpacket() | Parse a DPI packet |
| receiveDPIpacket() | Receive a DPI packet from the SNMP agent |
| sendDPIpacket() | Send a DPI packet to the SNMP agent |
| waitDPIpacket() | Wait for a DPI packet |
Note: These functions use header (include) files from the library QSYSINC, which is optionally installable. Make sure QSYSINC is installed on your system before using any of the functions. All of the SNMP subagent APIs use header file qtossapi.h. You can see this source in source file H, member name QTOSSAPI, in the QSYSINC library.
The figure below shows typical DPI API call sequences that are used to accomplish the following SNMP subagent functions:
A loop around mkDPIset() represents building a packet with multiple varbinds.
DPI API Call Sequences--Example
![]() |
|
Top
| UNIX-Type APIs APIs by category |
| [Information Center Home Page | Feedback ] | [Legal | AS/400 Glossary] |