1dat_psp_create(3DAT)Direct Access Transport Library Functiondsat_psp_create(3DAT)
2
3
4
6 dat_psp_create - create a persistent Public Service Point
7
9 cc [ flag... ] file... -ldat [ library... ]
10 #include <dat/udat.h>
11
12 DAT_RETURN
13 dat_psp_create(
14 IN DAT_IA_HANDLE ia_handle,
15 IN DAT_CONN_QUAL conn_qual,
16 IN DAT_EVD_HANDLE evd_handle,
17 IN DAT_PSP_FLAGS psp_flags,
18 OUT DAT_PSP_HANDLE *psp_handle
19 )
20
21
23 ia_handle Handle for an instance of DAT IA.
24
25
26 conn_qual Connection Qualifier of the IA on which the Public Ser‐
27 vice Point is listening.
28
29
30 evd_handle Event Dispatcher that provides the Connection Requested
31 Events to the Consumer. The size of the event queue for
32 the Event Dispatcher controls the size of the backlog for
33 the created Public Service Point.
34
35
36 psp_flags Flag that indicates whether the Provider or Consumer cre‐
37 ates an Endpoint per arrived Connection Request. The
38 value of DAT_PSP_PROVIDER indicates that the Consumer
39 wants to get an Endpoint from the Provider; a value of
40 DAT_PSP_CONSUMER means the Consumer does not want the
41 Provider to provide an Endpoint for each arrived Connec‐
42 tion Request.
43
44
45 psp_handle Handle to an opaque Public Service Point.
46
47
49 The dat_psp_create() function creates a persistent Public Service Point
50 that can receive multiple requests for connection and generate multiple
51 Connection Request instances that are delivered through the specified
52 Event Dispatcher in Notification events.
53
54
55 The dat_psp_create() function is blocking. When the Public Service
56 Point is created, DAT_SUCCESS is returned and psp_handle contains a
57 handle to an opaque Public Service Point Object.
58
59
60 There is no explicit backlog for a Public Service Point. Instead, Con‐
61 sumers can control the size of backlog through the queue size of the
62 associated Event Dispatcher.
63
64
65 The psp_flags parameter allows Consumers to request that the Provider
66 create an implicit Endpoint for each incoming Connection Request, or
67 request that the Provider should not create one per Connection Request.
68 If the Provider cannot satisfy the request, the operation shall fail
69 and DAT_MODEL_NOT_SUPPORTED is returned.
70
71
72 All Endpoints created by the Provider have DAT_HANDLE_NULL for the
73 Protection Zone and all Event Dispatchers. The Provider sets up End‐
74 point attributes to match the Active side connection request. The Con‐
75 sumer can change Endpoint parameters. Consumers should change Endpoint
76 parameters, especially PZ and EVD, and are advised to change parameters
77 for local accesses prior to the connection request acceptance with the
78 Endpoint.
79
81 DAT_SUCCESS The operation was successful.
82
83
84 DAT_INSUFFICIENT_RESOURCES The operation failed due to resource lim‐
85 itations.
86
87
88 DAT_INVALID_HANDLE The ia_handle or evd_handle parameter is
89 invalid.
90
91
92 DAT_INVALID_PARAMETER The conn_qual or psp_flags parameter is
93 invalid.
94
95
96 DAT_CONN_QUAL_IN_USE The specified Connection Qualifier was in
97 use.
98
99
100 DAT_MODEL_NOT_SUPPORTED The requested Model was not supported by
101 the Provider.
102
103
105 Two uses of a Public Service Point are as follows:
106
107 Model 1 For this model, the Provider manipulates a pool of Endpoints
108 for a Public Service Point. The Provider can use the same
109 pool for more than one Public Service Point.
110
111 o The DAT Consumer creates a Public Service Point
112 with a flag set to DAT_PSP_PROVIDER.
113
114 o The Public Service Point does the following:
115
116 o Collects native transport information
117 reflecting a received Connection Reques
118
119 o Creates an instance of Connection Reques
120
121 o Creates a Connection Request Notice (event)
122 that includes the Connection Request instance
123 (thatwhich includes, among others, Public
124 Service Point, its Connection Qualifier,
125 Provider-generated Local Endpoint, and infor‐
126 mation about remote Endpoint)
127
128 o Delivers the Connection Request Notice to the
129 Consumer-specified target (CNO) evd_handle
130
131 The Public Service Point is persistent and
132 continues to listen for incoming requests for
133 connection.
134
135 o Upon receiving a connection request, or at some
136 time subsequent to that, the DAT Consumer can
137 modify the provided local Endpoint to match the
138 Connection Request and must either accept() or
139 reject() the pending Connection Request.
140
141 o If accepted, the provided Local Endpoint is now
142 in a "connected" state and is fully usable for
143 this connection, pending only any native trans‐
144 port mandated RTU (ready-to-use) messages. This
145 includes binding it to the IA port if that was
146 not done previously. The Consumer is notified
147 that the Endpoint is in Connected state by a Con‐
148 nection Established Event on the Endpoint con‐
149 nect_evd_handle.
150
151 o If rejected, control of the Local Endpoint point
152 is returned back to the Provider and its ep_han‐
153 dle is no longer usable by the Consumer.
154
155
156 Model 2 For this model, the Consumer manipulates a pool of End‐
157 points. Consumers can use the same pool for more than one
158 Service Point.
159
160 o DAT Consumer creates a Public Service Point with
161 a flag set to DAT_PSP_CONSUMER.
162
163 o Public Service Point:
164
165 o Collects native transport information
166 reflecting a received Connection Request
167
168 o Creates an instance of Connection Request
169
170 o Creates a Connection Request Notice (event)
171 that includes the Connection Request instance
172 (which includes, among others, Public Service
173 Point, its Connection Qualifier, Provider-
174 generated Local Endpoint and information
175 about remote Endpoint)
176
177 o Delivers the Connection Request Notice to the
178 Consumer-specified target (CNO) evd_handle
179
180 The Public Service Point is persistent and
181 continues to listen for incoming requests for
182 connection.
183
184 o The Consumer creates a pool of Endpoints that it
185 uses for accepting Connection Requests. Endpoints
186 can be created and modified at any time prior to
187 accepting a Connection Request with that End‐
188 point.
189
190 o Upon receiving a connection request or at some
191 time subsequent to that, the DAT Consumer can
192 modify its local Endpoint to match the Connection
193 Request and must either accept() or reject() the
194 pending Connection Request.
195
196 o If accepted, the provided Local Endpoint is now
197 in a "connected" state and is fully usable for
198 this connection, pending only any native trans‐
199 port mandated RTU messages. This includes binding
200 it to the IA port if that was not done previ‐
201 ously. The Consumer is notified that the Endpoint
202 is in Connected state by a Connection Established
203 Event on the Endpoint connect_evd_handle.
204
205 o If rejected, the Consumer does not have to pro‐
206 vide any Endpoint for dat_cr_reject(3DAT).
207
208
210 See attributes(5) for descriptions of the following attributes:
211
212
213
214
215 ┌─────────────────────────────┬─────────────────────────────┐
216 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
217 ├─────────────────────────────┼─────────────────────────────┤
218 │Interface Stability │Standard: uDAPL, 1.1, 1.2 │
219 ├─────────────────────────────┼─────────────────────────────┤
220 │MT-Level │Safe │
221 └─────────────────────────────┴─────────────────────────────┘
222
224 dat_cr_reject(3DAT), libdat(3LIB), attributes(5)
225
226
227
228SunOS 5.11 16 Jul 2004 dat_psp_create(3DAT)