Merge commit 'dc97a43d4a70c8773a619f11b95b07a787f6f5b7' into merges
[unleashed.git] / share / man / man3rsm / rsm_memseg_export_publish.3rsm
blobd26aa1bebb415ea77af4e9ce803a43275084d662
1 '\" te
2 .\"  Copyright (c) 2001 by Sun Microsystems, Inc.  All rights reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH RSM_MEMSEG_EXPORT_PUBLISH 3RSM "Jun 8, 2001"
7 .SH NAME
8 rsm_memseg_export_publish, rsm_memseg_export_unpublish,
9 rsm_memseg_export_republish \- allow or disallow a memory segment to be
10 imported by other nodes
11 .SH SYNOPSIS
12 .LP
13 .nf
14 cc [ \fIflag\fR... ] \fIfile\fR... -lrsm [ \fIlibrary\fR... ]
15 #include <rsmapi.h>
17 \fBint\fR \fBrsm_memseg_export_publish\fR(
18      \fBrsm_memseg_export_handle_t\fR \fImemseg\fR,
19      \fBrsm_memseg_id_t *\fR\fIsegment_id\fR,
20      \fBrsmapi_access_entry_t\fR \fIaccess_list\fR[],
21      \fBuint_t\fR \fIaccess_list_length\fR);
22 .fi
24 .LP
25 .nf
26 \fBint\fR \fBrsm_memseg_export_unpublish\fR(
27      \fBrsm_memseg_export_handle_t\fR \fImemseg\fR);
28 .fi
30 .LP
31 .nf
32 \fBint\fR \fBrsm_memseg_export_republish\fR(
33      \fBrsm_memseg_export_handle_t\fR \fImemseg\fR,
34      \fBrsmapi_access_entry_t\fR \fIaccess_list\fR[],
35      \fBuint_t\fR \fIaccess_list_length\fR);
36 .fi
38 .SH DESCRIPTION
39 .sp
40 .LP
41 The \fBrsm_memseg_export_publish()\fR, \fBrsm_memseg_export_unpublish()\fR, and
42 \fBrsm_memseg_export_republish()\fR functions allow or disallow a memory
43 segment to be imported by other nodes.
44 .sp
45 .LP
46 The rsm_memseg_export_publish(3RSM) function allows the export segment
47 specified by the \fImemseg\fR argument to be imported by other nodes. It also
48 assigns a unique segment identifier to the segment and defines the access
49 control list for the segment. The \fIsegment_id\fR argument is a pointer to an
50 identifier which is unique on the publishing node. It is the responsibility of
51 the application to manage the assignment of unique segment identifiers. The
52 identifier can be optionally initialized to 0, in which case the system will
53 return a unique segment identifier value.  The \fIaccess_list\fR argument is
54 composed of pairs of nodeid and access permissions. For each nodeid specified
55 in the list, the associated read/write permissions are provided by three octal
56 digits for owner, group, and other, as for Solaris file permissions. In the
57 access control each octal digit may have the following values:
58 .sp
59 .ne 2
60 .na
61 \fB2\fR
62 .ad
63 .RS 5n
64 write access
65 .RE
67 .sp
68 .ne 2
69 .na
70 \fB4\fR
71 .ad
72 .RS 5n
73 read only access
74 .RE
76 .sp
77 .ne 2
78 .na
79 \fB6\fR
80 .ad
81 .RS 5n
82 read and write access
83 .RE
85 .sp
86 .LP
87 An access permissions value of 0624 specifies: (1) an importer with the same
88 uid as the exporter has read and write access; (2) an importer with the same
89 gid as the exporter has write access only; and (3) all other importers have
90 read access only. When an access control list is provided, nodes not included
91 in the list will be prevented from importing the segment.  However, if the
92 access list is \fINULL\fR (this will require the length
93 \fIaccess_list_length\fR to be specified as 0 as well), then no nodes will be
94 excluded from importing and the access permissions on all nodes will equal the
95 owner-group-other file creation permissions of the exporting process.
96 Corresponding to the \fIaccess_list\fR argument, the \fIaccess_list_length\fR
97 argument specifies the number of entries in the \fIaccess_list\fR array.
98 .sp
99 .LP
100 The \fBrsm_memseg_export_unpublish()\fR function disallows the export segment
101 specified by \fImemseg\fR from being imported. All the existing import
102 connections are forcibly disconnected.
105 The \fBrsm_memseg_export_republish()\fR function changes the access control
106 list for the exported and published segment. Although the current import
107 connections remain unaffected by this call, new connections are constrained by
108 the new  access list.
109 .SH RETURN VALUES
112 Upon successful completion, these functions return 0. Otherwise, an error value
113 is returned to indicate the error.
114 .SH ERRORS
117 The \fBrsm_memseg_export_publish()\fR, \fBrsm_memseg_export_unpublish()\fR, and
118 \fBrsm_memseg_export_republish()\fR functions can return the following errors:
120 .ne 2
122 \fB\fBRSMERR_BAD_SEG_HNDL\fR \fR
124 .RS 24n
125 Invalid segment handle.
129 .ne 2
131 \fB\fBRSMERR_NOT_CREATOR\fR \fR
133 .RS 24n
134 Not creator of segment.
139 The \fBrsm_memseg_export_publish()\fR and  \fBrsm_memseg_export_republish()\fR
140 functions can return the following errors, with the exception that only
141 \fBrsm_memseg_export_publish()\fR can return the errors related to the segment
142 identifier:
144 .ne 2
146 \fB\fBRSMERR_SEGID_IN_USE\fR \fR
148 .sp .6
149 .RS 4n
150 Segment identifier in use.
154 .ne 2
156 \fB\fBRSMERR_RESERVED_SEGID\fR \fR
158 .sp .6
159 .RS 4n
160 Segment identifier reserved.
164 .ne 2
166 \fB\fBRSMERR_BAD_SEGID\fR \fR
168 .sp .6
169 .RS 4n
170 Invalid segment identifier.
174 .ne 2
176 \fB\fBRSMERR_BAD_ACL\fR \fR
178 .sp .6
179 .RS 4n
180 Invalid access control list.
184 .ne 2
186 \fB\fBRSMERR_SEG_ALREADY_PUBLISHED\fR \fR
188 .sp .6
189 .RS 4n
190 Segment already published.
194 .ne 2
196 \fB\fBRSMERR_INSUFFICIENT_MEM\fR \fR
198 .sp .6
199 .RS 4n
200 Insufficient memory.
204 .ne 2
206 \fB\fBRSMERR_INSUFFICIENT_RESOURCES\fR \fR
208 .sp .6
209 .RS 4n
210 Insufficient resources.
214 .ne 2
216 \fB\fBRSMERR_LOCKS_NOT_SUPPORTED\fR \fR
218 .sp .6
219 .RS 4n
220 Locks not supported.
224 .ne 2
226 \fB\fBRSMERR_BAD_ADDR\fR \fR
228 .sp .6
229 .RS 4n
230 Bad address.
235 The \fBrsm_memseg_export_republish()\fR and \fBrsm_memseg_export_unpublish()\fR
236 functions can return the following errors:
238 .ne 2
240 \fB\fBRSMERR_SEG_NOT_PUBLISHED\fR \fR
242 .RS 29n
243 Segment not published.
247 .ne 2
249 \fB\fBRSMERR_INTERRUPTED\fR\fR
251 .RS 29n
252 The operation was interrupted by a signal.
255 .SH ATTRIBUTES
258 See \fBattributes\fR(5) for descriptions of the following attributes:
263 box;
264 l | l
265 l | l .
266 ATTRIBUTE TYPE  ATTRIBUTE VALUE
268 Interface Stability     Evolving
270 MT-Level        MT-Safe
273 .SH SEE ALSO
276 \fBrsm_memseg_export_create\fR(3RSM), \fBattributes\fR(5)
277 .SH NOTES
280 An attempt to publish a segment might block until sufficient resources become
281 available.