OSI/AS Programming Manual
Example 2: Presentation Layer and ACSE
Sample Programs
056783 Tandem Computers Incorporated E–59
/* */
give_tokens.zdata =
ZAPS_VAL_TOKEN_GIVE;
give_tokens.zrelease =
ZAPS_VAL_TOKEN_NOVALUE;
give_tokens.u_zmajorsync.zmajorsync =
ZAPS_VAL_TOKEN_NOVALUE;
give_tokens.zminorsync =
ZAPS_VAL_TOKEN_NOVALUE;
/* */
/* Issue P-DATA request, including the P-GIVE-TOKENS */
/* by using basic concatenation. */
/* */
printf( "APPL1: data request (w/ give tokens) ->\n" );
status = APS_DATA_REQ_( cepi
, (int *) &user_data
, /* tag */
, /* data-operation */
, (int *) &give_tokens
);
if ( status != ZAPS_VAL_STATUS_OK )
display_aps_status( error_datareq_proc );
/* */
/* Wait for P-DATA indication. */
/* */
wait_for_event( ZAPS_VAL_EVT_DATA_IND );
/* */
/* Get P-DATA indication user data. */
/* */
retrieve_user_data();
/* */
/* wait for ACSE release indication. */
/* */
wait_for_event( ZAPS_VAL_EVT_RELEASE_IND );
/* */
/* Get the ACSE release reason of the release indication*/
/* */
error =
APS_ASSOC_GETPARAM_( cepi
, /* conid */
, /* local-appl */
, /* remote-appl */
, /* connect-result */
, /* session-rqmnts */
, /* release-result */
, /* abort-reason */
, /* mode */
, /* pres-context-list */
, /* pres-context-result-list */
, /* pres-default-context-name */
, /* pres-default-context-result */