OSI/AS Programming Manual

Example 2: Presentation Layer and ACSE
Sample Programs
E–78 056783 Tandem Computers Incorporated
/* 2) Run EXAPSC2A (APPL1) second. */
/* */
/* This program does the following: */
/* 1) Waits for an ACSE associate indication. */
/* 2) Issues an ACSE associate response. */
/* 3) Waits for a P-DATA indication. */
/* 4) Waits for a P-GIVE-TOKENS indication. */
/* 5) Issues a P-DATA request. */
/* 6) Issues an ACSE release request. */
/* 7) Waits for an ACSE release confirm. */
/* */
#include <stdioh> NOLIST
#include <stringh> NOLIST
/* */
/* Source in ZAPSC from the appropriate volume and */
/* subvolume. */
/* */
#include "ZAPSC" NOLIST
/* */
/* APS procedure identification labels. */
/* */
enum { error_assoc_getparam_proc
, error_attach_proc
, error_connectrsp_proc
, error_data_getparam_proc
, error_datareq_proc
, error_discard_proc
, error_event_proc
, error_initialize_proc
, error_releasereq_proc
, error_sync_getparam_proc
, error_status_proc
} ;
/* */
/* User data literals. */
/* */
#define max_user_data 1000
#define timelimit -1
/* */
/* user data template. */
/* */
struct user_data_def
{
zaps_ddl_data_hdr_def header;
zaps_ddl_data_element_hdr_def element;
char value[ max_user_data ];
};
/* */
/* user data element template. */
/* */
struct user_data_element_def