OSI/AS Programming Manual
Example 2: Presentation Layer and ACSE
Sample Programs
E–58 056783 Tandem Computers Incorporated
 error =
 APS_ASSOC_GETPARAM_( cepi
 , /* conid */
 , /* local-appl */
 , (int *) &remote_appl
 , &connect_result
 , (int *) &session_rqmnts
 , /* release-result */
 , /* abort-reason */
 , /* mode */
 , /* pres-context-list */
 , (int *) &pres_context_result_list
 , /* pres-default-context-name */
 , &pres_default_context_result
 , (int *) &acse_appl_context_name
 , /* acse-local-ae-title */
 , (int *) &acse_remote_ae_title
 , /* acse-local-invocation-ids */
 , (int *) &acse_remote_invocation_ids
 , &acse_result_source
 , &acse_diagnostic
 , /* acse-release-reason */
 , /* acse-abort-source */
 );
 if ( error != ZAPS_ERR_OK )
 display_aps_error( error_assoc_getparam_proc );
 /* */
 /* A real application would check the session-rqmnts, */
 /* pres-context-result-list, and so forth to make sure */
 /* that all is well. */
 /* */
 /* */
 /* Get associate confirm user data. */
 /* */
 retrieve_user_data();
 /* */
 /* Set up data. */
 /* normally, this would be generated by an */
 /* ASN.1 compiler. */
 /* */
 user_data.header.znum_elements = 1;
 user_data.element.ztype = ZAPS_VAL_DATA_TYPE_VALUE;
 user_data.element.zpcid = 1;
 user_data.value[ 0 ] = 0x04; /* octet string */
 user_data.value[ 1 ] = 7; /* length */
 memcpy( &user_data.value[ 2 ]
 , "datareq"
 , 7 ); /* data */
 user_data.element.zlen = 9;
 /* */
 /* Set up the tokens, so they can be given away. */










