MIB variable format

MIB variables are values that can be set in CMIP services by an object, and then referred to later in a string. These values can be specified as MIB variables by the application program in any string. CMIP services substitutes the actual values.

MIB variables are denoted with an ampersand (&) as the first character of the variable name. The API checks to make sure that the type of the MIB variable and the type of the type reference are compatible.

CMIP services includes a set of predefined MIB variables that can be used in any string, by any object:
&DN
Represents the distinguished name of the originator of a string that is passed to the API. The API uses its knowledge of the source of the string to provide the appropriate distinguished name. The name can be used by an object that is registered with CMIP services to identify itself when it sends a string. The API supplies the distinguished name that corresponds to the local identifier provided on the request.
&IID
Represents the invoke identifier of the current string. This can be used in a response or when initiating a request. On requests, this MIB variable allows the sender of a string to build the string without knowing the invoke identifier. For all requests, the invoke identifier is not required because the MIB functions assign the invoke identifier after they receive the string. Therefore the API can fill in the value for the invoke identifier once it has been assigned.
&GTM
Represents the current time in Generalized time format. For more information, see Time types.
yyyy/mm/dd-hh:mm:ss.0
&UTM
Represents the current time in Universal time format. For more information, see Time types.
yyyy/mm/dd-hh:mm:ss.0
&OC
Represents the managed object class of the originator of the string. This variable allows the application program to use generic strings in responding to requests, without having to customize them for each object class it supports. In any response from an unregistered object or when allomorphism is being exercised, this variable cannot be used.
The following example shows how to use these MIB variables:
    Arg =
      "(managedObjectClass &OC,                                     "
      " managedObjectInstance (distinguishedName &DN),              "
      " currentTime &GTM,                                           "
      " attributeList ((attributeId 2.9.3.2.7.5,                    "
      "                 (distinguishedName                          "
      "                  (((attributeType 1.3.18.0.2.4.6,           "
      "                     attributeValue MYNETID),                "
      "                    (attributeType 2.9.3.2.7.4,              "
      "                     attributeValue (name \"MYCPNAME\")))))),"
      "                (attributeId 2.9.3.2.7.35, enabled)          "
      "               )                                             "
      ")                                                            ";
 
    rc = MIBSendCmipResponse(LinkId,
                             OldInvokeId,
                             1,          /* last in chain */
                             1,          /* success       */
                             3,          /* GET response  */
                             Arg,
                             LocalId_ptr,
                             NULL,
                             OldAssocHandle,
                             NULL);

CMIP Services substitutes the appropriate values for the variables &OC, &DN, and &GTM.

Note: The many extra spaces in the response string will be ignored by CMIP services, though they will lead to extra processing overhead.