z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Required actions for migrating your SNMP DPI subagent to Version 2.0

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

The following actions are required to migrate SNMP DPI subagent to Version 2.0:

  • Add an mkDPIopen() call and send the created packet to the agent. This opens your DPI connection with the agent. Wait for the response and ensure that the open is accepted. You need to pass a subagent ID (object identifier), which must be a unique ASN.1 OID.

    See The mkDPIopen() function for more information.

  • Change your mkDPIregister() calls and pass the parameters according to the new function prototype. You must also expect a RESPONSE to the REGISTER request.

    See The mkDPIregister() function for more information.

  • Change mkDPIset() and mkDPIlist() calls to the new mkDPIset() call. Basically all mkDPIset() calls are now of the DPI Version 1.1 mkDPIlist() form.

    See The mkDPIset() function for more information.

  • Change mkDPItrap() and mkDPItrape() calls to the new mkDPItrap() call. Basically all mkDPItrap() calls are now of the DPI Version 1.1 mkDPItrape() form.

    See The mkDPItrap() function for more information.

  • Add code to recognize DPI RESPONSE packets, which should be expected as a result of OPEN, REGISTER, and UNREGISTER requests.
  • Add code to expect and handle the DPI UNREGISTER packet from the agent. It might send such packets if an error occurs or if a higher priority subagent registers the same subtree as you have registered.
  • Add code to unregister your subtrees and close the DPI connection when you want to terminate the subagent.

    See The mkDPIunregister() function and The mkDPIclose() function for more information.

  • Change your code to use the new SNMP Version 2 error codes as defined in the snmp_dpi.h include file.
  • When migrating DPI Version 1.1 subagents to DPI Version 2.0, remove the include for manifest.h.
  • Change your code that handles a GET request. It should return a varBind with SNMP_TYPE_noSuchObject value or SNMP_TYPE_noSuchInstance value instead of an error SNMP_ERROR_noSuchName if the object or the instance do not exist. This is not considered an error any more. Therefore, you should return an SNMP_ERROR_noError with an error index of 0.
    Note: A varBind (variable binding) is the group ID, instance ID, type, length, and value that completely describes a variable in the MIB.
  • Change your code that handles a GETNEXT request. It should return a varBind with SNMP_TYPE_endOfMibView value instead of an error SNMP_ERROR_noSuchName if you reach the end of your MIB or subtree. This is not considered an error any more. Therefore, you should return an SNMP_ERROR_noError with an error index of 0.
  • Change your code that handles SET requests to follow the two-phase SET/COMMIT scheme as described in DPI subagent SET processing.

    See the sample handling of SET/COMMIT/UNDO in SNMP DPI: Processing a SET/COMMIT/UNDO request.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014