As the first step, a DPI subagent must open a "connection" with the agent. To do so, it must send a DPI OPEN packet in which these parameters must be specified:
The agent may have an absolute maximum timeout value which will be used if the subagent asks for too large a timeout value. A value of zero can be used to indicate that the agent's own default timeout value should be used. A subagent is advised to use a reasonably short interval of a few seconds or so. If a specific sub-tree needs a (much) longer time, a specific REGISTER can be done for that sub-tree with a longer timeout value.
If your platform is EBCDIC based, using the native character set of EBCDIC makes it easy to recognize the string representations of the fields, such as the group ID and instance ID. At the same time, the agent will translate the value from ASCII NVT to EBCDIC and vice versa for objects that it knows from a compiled MIB to have a textual convention of DisplayString. This fact cannot be determined from the SNMP PDU encoding because in the PDU the object is only known to be an OCTET_STRING.
If your subagent runs on an ASCII based platform and the agent runs on an EBCDIC based platform (or the other way around), you can specify that you want to use the ASCII character set. The agent and subagent programmer knows how to handle the string-based data in this situation.
Note: Not all agents need to support other than native character set selections. See Character Set Selection for more information on character set usage.
For example: "1.3.5.1.2.3.4.5"
For example: "DPI sample subagent Version 2.0"
Once a subagent has sent a DPI OPEN packet to an agent, it should expect a DPI RESPONSE packet that informs the subagent about the result of the request. The packet ID of the RESPONSE packet should be the same as that of the OPEN request to which the RESPONSE packet is the response. See DPI RESPONSE Error Codes for a list of valid codes that may be expected.
If you receive an error RESPONSE on the OPEN packet, you will also receive a DPI CLOSE packet with an SNMP_CLOSE_openError code. In this situation, the agent closes the "connection".
If the OPEN is accepted, the next step is to REGISTER one or more MIB sub-trees.
Related Information