OSI/AS Programming Manual
Example 1: Session Layer
Sample Programs
E–18 056783 Tandem Computers Incorporated
C Version
#pragma INSPECT, SYMBOLS
#pragma PAGE "OSI/AS Sample Program 1"
/* */
/* File: EXAPSC1 */
/* */
/* OSI/AS Sample Program 1 */
/* */
/* This sample program establishes a wait-mode Session */
/* Layer connection between two Tandem OSI/AS */
/* applications, sends 100 bytes of data, and releases */
/* the connection. All primitives that can send data */
/* also send 100 bytes of data. To run this program, you */
/* must have an OSI/AS subsystem configured with an OSI */
/* manager process named $OMGR and two applications named */
/* APPL1 and APPL2. You can configure either session */
/* version 1 or session version 2. */
/* */
/* Program variables ending with 1 indicate Application */
/* 1. */
/* Program variables ending with 2 indicate Application */
/* 2. */
#include <stdioh> NOLIST
#include <stringh> NOLIST
/* */
/* This program assumes that the ZAPSC file is in this */
/* program's subvolume unless you ASSIGN it to be */
/* elsewhere. */
/* */
#include "ZAPSC" NOLIST
/* */
/* APS procedure identification labels. */
/* */
enum { error_assoc_getparam_proc
, error_attach_proc
, error_connectreq_proc
, error_connectrsp_proc
, error_data_getparam_proc
, error_datareq_proc
, error_discard_proc
, error_event_proc
, error_initialize_proc
, error_releasereq_proc
, error_releasersp_proc
, error_status_proc
} ;
/* */
/* User data literals. */
/* */
#define max_user_data 30000