OSI/AS Programming Manual
Example 1: Session Layer
Sample Programs
056783 Tandem Computers Incorporated E–27
 , (int *) &local_appl_2
 , (int *) &remote_appl_2
 , (int *) &session_rqmnts_2
 , (int *) &conid_2
 , (int *) &user_data_2
 );
 if ( status != ZAPS_VAL_STATUS_OK )
 display_aps_status( cepi_2, error_connectreq_proc );
 /* */
 /* Get OSI address information. */
 /* */
 error =
 APS_ASSOC_GETPARAM_( cepi_2
 , /* conid */
 , (int *) &local_appl
 , (int *) &remote_appl
 , /* connect-result */
 , /* session-rqmnts */
 , /* release-result */
 , /* abort-reason */
 );
 if ( error != ZAPS_ERR_OK )
 display_aps_error( error_assoc_getparam_proc );
 /* */
 /* APPLICATION 1 */
 /* Connect indication */
 /* */
 /* Initialize the user data to a string of the */
 /* character "1." Because this is an application using */
 /* the OSI/AS Session Layer, we don't set the PCID */
 /* field of the user_data structure. This field is */
 /* used only by Presentation and ACSE and is ignored by */
 /* the OSI/AS Session Layer. */
 user_data_1.header.znum_elements = 1;
 user_data_1.element.zlen = num_bytes_to_transfer;
 user_data_1.element.ztype = ZAPS_VAL_DATA_TYPE_VALUE;
 memset( user_data_1.value, '1', num_bytes_to_transfer );
 /* */
 /* Wait for connect indication. */
 /* */
 wait_for_event( cepi_1, ZAPS_VAL_EVT_CONNECT_IND );
 /* */
 /* Get parameters of the connect indication. */
 /* Note that the parameter session_rqmnts_1, the */
 /* service requirements structure, is set and will be */
 /* used for the connect response, thereby accepting the */
 /* service requirements set by application 2. */
 /* */
 error =
 APS_ASSOC_GETPARAM_( cepi_1
 , /* conid */
 , (int *) &local_appl










