OSI/AS Programming Manual

Connection Endpoint Identifier (CEPI)
APS Procedures Programming Concepts
2–20 056783 Tandem Computers Incorporated
Connection Endpoint
Identifier (CEPI)
The connection endpoint identifier, or CEPI, identifies your OSI/AS connection or
connection attempt. It is normally an integer in the range -10 through -32767;
exceptions to this range are described below. You use the CEPI in APS procedure calls
as you would use the file number in file-system calls. The CEPI is created by OSI/AS
when you initiate a connection, using either the APS_ASSOC_ATTACH_ or the
APS_ASSOC_CONNECTREQ_ procedure. At this stage, you receive a CEPI as
output. You specify this CEPI in all subsequent procedure calls for this connection.
The CEPI exists until you call APS_DISCARD_.
The API uses the CEPI to refer to context information that it keeps about the
connection. This information includes the name of the TAPS subdevice created for the
connection, the state of the connection, information about outstanding events, and
other status and error information.
If the APS_ASSOC_ATTACH_ or APS_ASSOC_CONNECTREQ_ procedure fails,
OSI/AS returns a value of -1 in place of the CEPI. In this case, call APS_STATUS_
with a
cepi
value of -1 to obtain details of the error.
OSI/AS also uses a -1 value to store error information if you omit the CEPI parameter
from a procedure call where CEPI is mandatory.
For details on the attach and connect operations, see “Establishing a Connection,” later
in this section.
Note The CEPI and the session connection identifier are not the same; you use them in different contexts. The
CEPI identifies a connection to OSI/AS. Once the connection is established, you must use the CEPI in
every APS procedure call. The session connection identifier identifies a connection to the remote
application. You use the session connection identifier in only a small number of procedure calls, and it is
always optional. Its DDL name is ZAPS-DDL-L5-CONID. See Appendix A for information about ZAPS-
DDL-L5-CONID.
Dynamic and Static
Subdevices
Each CEPI acquired by your application maps into a TAPS process entity called a
subdevice. In much the same way that a CEPI serves as a connection point between
your application and the OSI/AS subsystem, a subdevice serves as the connection
point between a TAPS process and the lower layers of the Tandem OSI/AS
environment.
A subdevice is created by OSI/AS when you initiate a connection, using either the
APS_ASSOC_ATTACH_ or the APS_ASSOC_CONNECTREQ_ procedure.
A subdevice is a named entity. You can name it yourself (by including a
subdevice-
name
in the APS_ASSOC_ATTACH_ or APS_ASSOC_CONNECTREQ_ call) or you
can let OSI/AS name it for you (by omitting the
subdevice-name
). In either case,
you retrieve the fully qualified subdevice name by calling APS_STATUS_ immediately
upon completion of the APS_ASSOC_ATTACH_ or APS_ASSOC_CONNECTREQ_
call.
There are two types of subdevices: dynamic and static. They are created in the same
way; what differentiates them is how and when they are deleted.