HP rp2450 ACSE/Presentation and ROSE Interface Programmer's Guide - Page 50
Determine Address Handling
View all HP rp2450 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 50 highlights
CAUTION Programming Guide 2. Manage the A/P Environment On the other hand, when the connection indication is received by the other process, it is established as the responder, and can no longer issue a connection request. The AP_ROLE_CURRENT is automatically set to AP_RESPONDER. If you decide to have a process act as a responder or initiator, you can set the AP_ROLE_ALLOWED attribute using the A/P environment call: ap_set_env(fd,AP_ROLE_ALLOWED,val) Programs can be managed by designating the paired programs as Initiator and Responder. See manpages for example programs. Setting AP_ROLE_ALLOWED only affects the ability to send and receive a connection request. Other primitives, such as P_DATA_IND, are not controlled by the AP_ROLE_ALLOWED attribute. The initiator and responder roles must be established before binding the communication endpoint to the local presentation address (in the AP_UNBOUND state). Any change in AP_ROLE_ALLOWED after binding is ignored. Determine Address Handling Before a communication endpoint can be used in an ACSE/Presentation application, a unique presentation address must be assigned (or bound) to it. The presentation address consists of a presentation selector, session selector, transport selector, and a n optional network service access point (NSAP). APRI also supports the binding of the local presentation address without specifying a network address. This allows a single responder to receive association indications for any of the subnetworks configured on an HP OTS/9000 system. To use this feature, when setting the local address through the AP_BIND_PADDR environment attribute, set the n_nsaps field of the ap_paddr_t structure to zero. When this feature is used, no local NSAP information need be provided in the ap_paddr_t structure. Once a communication endpoint has been created by calling ap_open(), and the initiator and responder roles have been established or explicitly assigned using ap_set_env() with the AP_ROLE_ALLOWED primitive, the endpoint is bound to the presentation address using the A/P environment call 50 Chapter 4