HP 800 ACSE/Presentation and ROSE Interface Programmer's Guide - Page 50

Determine Address Handling

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

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109

50
Chapter 4
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.
CAUTION
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