z/OS Communications Server: CMIP Services and Topology Agent Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


MIBSendCmipRequest—CMIP request function

z/OS Communications Server: CMIP Services and Topology Agent Guide
SC27-3646-00

Purpose

Use this function when an application program or object is sending a CMIP request.

The MIBSendCmipRequest function queues a request to CMIP services. Use the MIBSendCmipRequest function for CMIP requests instead of the MIBSendRequest function, to allow consistent manipulation of messages.

Declarations

The following declarations indicate the order of the parameters for this function.
typedef int MIBSendCmipRequest_t(
               int,                 /* link identifier - input       */
               unsigned int,        /* argument type - input         */
               const char *,        /* argument - input              */
               const void *,        /* local identifier - input      */
               const char *,        /* source - input                */
               unsigned int,        /* destination type - input      */
               const char *,        /* destination - input           */
               unsigned int *);     /* returned invoke identifier -
                                         output                      */

Parameters

link identifier
Specifies the link identifier returned by the MIBConnect function.
argument type
This should be the CMIP operation value of the operation being requested.

The operation values are given in ACYIDCMS.

argument
This null-terminated string contains the bulk of the request. The ASN.1 type is determined by the CMIP operation value of the request, and is found in the ANY DEFINED BY table for the operation value in ACYIDCMS.
local identifier
Pointer to the local identifier of the object that generated this request. The same local identifier appears in a subsequent response.
source
The distinguished name of the originator of the request. This can be used to override the source of the message. This is used to resolve any appearance of the MIB variable distinguished name. Specify NULL if you do not choose to specify a value.
destination type
This specifies the type of destination data that is being proved in the destination argument. The valid values are DS_NOT_PROVIDED, DS_FULL_DN, DS_ASSOC_HANDLE, and DS_AE_TITLE.

If this field is set to DS_NOT_PROVIDED, then the stack uses the object name in the CMIP parameter as the destination object name.

destination
This specifies the destination of a CMIP string. Specify NULL if the destination type parameter is DS_NOT_PROVIDED. Otherwise, specify the pointer to a distinguished name, association handle, or application entity title.
returned invoke identifier
Specifies the invoke identifier. The invoke identifier is used to correlate this request with a response that arrives subsequently.

Return codes

0
The function was successful.
MB_ERR_ALLOC
An error occurred allocating storage. If MB_ERR_ALLOC is received by the application program from an API function and there is a corresponding REQS record in the VIT with a nonzero return code, the LPBUF pool is not large enough and should be increased.
MB_ERR_INVALID_ARGUMENT
The argument parameter was not provided.
MB_ERR_INVALID_ARGUMENT_TYPE
An incorrect argument type parameter was provided.
MB_ERR_CMIP_SERVICES_INACTIVE
CMIP services is inactive.

If using common storage area storage, the read queue exit routine stops functioning.

If using data space storage, messages are not put on the data space.

MB_WARN_DATA_SPACE_FULL
If using a data space and the data space is out of storage, this warning is returned to remind the application program that no messages will be returned to this application program. This message will still be routed to CMIP services.
MB_ERR_INVALID_DEST
The value of the destination parameter is inconsistent with the value of the destination type parameter. This return code is returned if, for example, destination type is DS_ASSOC_HANDLE, but destination is NULL.
MB_ERR_INVALID_DEST_TYPE
An incorrect destination type parameter was passed.
MB_WARN_EXIT_FAILURE
If using common storage area storage and the application program has indicated that it has had an unrecoverable error when returning to the read queue exit routine, this warning is returned to remind the application program that no messages will be returned to the application program. This message will still be routed to CMIP services.
MB_ERR_INVALID_LINK_ID
The value specified on the link identifier parameter does not refer to a valid connection.
MB_ERR_INVALID_INVOKE_ID
The invoke identifier parameter was not provided.
MB_ERR_LOCAL_ID_MISSING
A local identifier was not provided.
MB_ERR_INVALID_MAX_INVOKE_IDS
The value specified for the maximum outstanding requests parameter is not valid.
MB_ERR_MSG_MISSING
The message parameter was not provided.
MB_ERR_TRANSMIT
An apparent error occurred. Either there is a logic error in VTAM®, or the MIBDisconnect function has been issued, but it has not completed.
MB_ERR_VTAM_INACTIVE
VTAM is inactive.

Example of function in an application program

The following example shows how the MIBSendCmipRequest function can be coded in an application program.
char CMIP_StringArgument ??(512??);
int LinkId;
int rc;
LocalId_t *MyObjectId;
unsigned int InvokeId;
 
rc = APIs.MIBSendCmipRequest(LinkId, /* handle returned by
                                        MIBConnect                    */
                             3,      /* operation value is GET        */
                             CMIP_StringArgument,
                             &MyObjectId,
                             NULL,
                             DS_NOT_PROVIDED,
                             NULL,
                             &InvokeId);

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014