ACSE/Presentation and ROSE Interface Programmer's Guide

Chapter 3 35
Using ACSE/Presentation
Step 2: Establish an Association
Establish Initiator and Responder Roles
Process A and Process B establish initiator and responder roles using the
attribute, AP_ROLE_ALLOWED in a call to ap_set_env(). In this
example, Process A is the initiator, and Process B is the responder. (See
Figure 3-3.)
Figure 3-3 Establish Roles
NOTE The initiator and responder roles must be established before binding the
communication endpoint to the local presentation address while in the
AP_UNBOUND state. Any change in AP_ROLE_ALLOWED after
binding is ignored.
Binding the Endpoints
Process A and Process B must each bind a valid presentation address (p-
selector, s-selector, t-selector, and NSAP) to its endpoint by using the
attribute AP_BIND_PADDR in the ap_set_env() call. (See Figure 3-4.)
For more information on presentation addresses, refer to Chapter 4.
Communication
Communication
Endpoint A
Endpoint B
Process A
Process B
AP Environment A AP Environment B
ap_set_env()
ap_set_env()
Responder
Initiator
AP_ROLE_ALLOWED,initiator
AP_ROLE_ALLOWED,responder