Merge commit 'c5bab7026b8e0ac44b25ee08507ea360f177d844' into merges
[unleashed.git] / share / man / man3rsm / rsm_memseg_import_connect.3rsm
blob7caee2b7d6e49254a3dbdea701bb5c7ef6e31237
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_IMPORT_CONNECT 3RSM "Nov 26, 2017"
7 .SH NAME
8 rsm_memseg_import_connect, rsm_memseg_import_disconnect \- create or break
9 logical connection between import and export segments
10 .SH SYNOPSIS
11 .LP
12 .nf
13 cc [ \fIflag\fR... ] \fIfile\fR... -lrsm [ \fIlibrary\fR... ]
14 #include <rsmapi.h>
16 \fBint\fR \fBrsm_memseg_import_connect\fR(
17      \fBrsmapi_controller_handle_t\fR \fIcontroller\fR,
18      \fBrsm_node_id_t\fR \fInodeid\fR, \fBrsm_memseg_id_t\fR \fIsegment_id\fR,
19      \fBrsm_permission_t\fR \fIperm\fR, \fBrsm_memseg_import_handle_t *\fR\fImemseg\fR);
20 .fi
22 .LP
23 .nf
24 \fBint\fR \fBrsm_memseg_import_disconnect\fR(
25      \fBrsm_memseg_import_handle_t\fR \fImemseg\fR);
26 .fi
28 .SH DESCRIPTION
29 .LP
30 The \fBrsm_memseg_import_connect()\fR function provides a means of creating an
31 import segment called \fImemseg\fR and establishing a logical connection with
32 an export segment identified by the \fIsegment_id\fR on the node specified by
33 \fInode_id\fR. The controller specified by \fIcontroller\fR must have a
34 physical connection with the controller (see
35 \fBrsm_get_interconnect_topology\fR(3RSM)) used while exporting the segment
36 identified by \fIsegment_id\fR on node specified by \fInode_id\fR. The
37 \fIperm\fR argument specifies the mode of access that the importer is
38 requesting for this connection. In the connection process, the mode of access
39 and the importers userid and groupid are compared with the access permissions
40 specified by the exporter. If the request mode is not valid, the connection
41 request is denied. The \fIperm\fR argument is limited to the following octal
42 values:
43 .sp
44 .ne 2
45 .na
46 \fB0400\fR
47 .ad
48 .RS 8n
49 read mode
50 .RE
52 .sp
53 .ne 2
54 .na
55 \fB0200\fR
56 .ad
57 .RS 8n
58 write mode
59 .RE
61 .sp
62 .ne 2
63 .na
64 \fB0600\fR
65 .ad
66 .RS 8n
67 read/write mode
68 .RE
70 .sp
71 .LP
72 The \fBrsm_memseg_import_disconnect()\fR function breaks the logical connection
73 between the import segment and the exported segment and deallocates the
74 resources associated with the import segment handle \fImemseg\fR.
75 .SH RETURN VALUES
76 .LP
77 Upon successful completion, these functions return 0. Otherwise, an error value
78 is returned to indicate the error.
79 .SH ERRORS
80 .LP
81 The \fBrsm_memseg_import_connect()\fR and \fBrsm_memseg_import_disconnect()\fR
82 functions can return the following errors:
83 .sp
84 .ne 2
85 .na
86 \fB\fBRSMERR_BAD_SEG_HNDL\fR \fR
87 .ad
88 .RS 24n
89 Invalid segment handle.
90 .RE
92 .sp
93 .LP
94 The  \fBrsm_memseg_import_connect()\fR function can return the following
95 errors:
96 .sp
97 .ne 2
98 .na
99 \fB\fBRSMERR_BAD_CTLR_HNDL\fR \fR
101 .sp .6
102 .RS 4n
103 Invalid controller handle.
107 .ne 2
109 \fB\fBRSMERR_CTLR_NOT_PRESENT\fR \fR
111 .sp .6
112 .RS 4n
113 Controller not present.
117 .ne 2
119 \fB\fBRSMERR_PERM_DENIED\fR \fR
121 .sp .6
122 .RS 4n
123 Permission denied.
127 .ne 2
129 \fB\fBRSMERR_INSUFFICIENT_MEM\fR \fR
131 .sp .6
132 .RS 4n
133 Insufficient memory.
137 .ne 2
139 \fB\fBRSMERR_INSUFFICIENT_RESOURCES\fR \fR
141 .sp .6
142 .RS 4n
143 Insufficient resources.
147 .ne 2
149 \fB\fBRSMERR_SEG_NOT_PUBLISHED_TO_NODE\fR \fR
151 .sp .6
152 .RS 4n
153 Segment not published to node.
157 .ne 2
159 \fB\fBRSMERR_SEG_NOT_PUBLISHED\fR \fR
161 .sp .6
162 .RS 4n
163 Segment not published at all.
167 .ne 2
169 \fB\fBRSMERR_BAD_ADDR\fR \fR
171 .sp .6
172 .RS 4n
173 Bad address.
177 .ne 2
179 \fB\fBRSMERR_REMOTE_NODE_UNREACHABLE\fR \fR
181 .sp .6
182 .RS 4n
183 Remote not not reachable.
187 .ne 2
189 \fB\fBRSMERR_INTERRUPTED\fR \fR
191 .sp .6
192 .RS 4n
193 Connection interrupted.
198 The \fBrsm_memseg_import_disconnect()\fR function can return the following
199 errors:
201 .ne 2
203 \fB\fBRSMERR_SEG_STILL_MAPPED\fR \fR
205 .RS 28n
206 Segment still mapped, need to unmap before disconnect.
210 .ne 2
212 \fB\fBRSMERR_POLLFD_IN_USE\fR \fR
214 .RS 28n
215 Poll file descriptor in use.
218 .SH ATTRIBUTES
220 See \fBattributes\fR(5) for descriptions of the following attributes:
225 box;
226 c | c
227 l | l .
228 ATTRIBUTE TYPE  ATTRIBUTE VALUE
230 Interface Stability     Evolving
232 MT-Level        MT-Safe
235 .SH SEE ALSO
237 \fBrsm_memseg_import_map\fR(3RSM), \fBattributes\fR(5)