OSI/AS Programming Manual

Example 1: Session Layer
Sample Programs
E–22 056783 Tandem Computers Incorporated
case error_connectrsp_proc:
proc_name = "APS_ASSOC_CONNECTRSP_";
break;
case error_datareq_proc:
proc_name = "APS_DATA_REQ_";
break;
case error_discard_proc:
proc_name = "APS_DISCARD_";
break;
case error_event_proc:
proc_name = "APS_EVENT_RECEIVE_";
break;
case error_releasereq_proc:
proc_name = "APS_ASSOC_RELEASEREQ_";
break;
case error_releasersp_proc:
proc_name = "APS_ASSOC_RELEASERSP_";
break;
}; /* case error_proc */
printf(
"%s status: %d, event: %d, err: %d, errSub: %d, svcId: %d\n"
, proc_name, status, event_code
, error_code, error_subcode, service_id );
/* */
/* A real application would take appropriate action. */
/* */
DEBUG();
} /* proc display_aps_status */
#pragma PAGE
/*--------------------------------------------------------*/
/* */
/* retrieve user data from the API. */
/* */
/*--------------------------------------------------------*/
void retrieve_user_data( cepi )
int cepi; /* i : cepi for data */
{
/* */
/* user_data is large enough to hold all of the data. */
/* Real applications might call this procedure several */
/* times using next_position and more_data. */
/* */
start_position = 0; /* start at the beginning */
error = APS_DATA_GETPARAM_( cepi