Copyright (c) 2001 by Sun Microsystems, Inc. All rights reserved.
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.
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.
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]
cc [ flag... ] file... -lrsm [ library... ] #include <rsmapi.h> int rsm_memseg_import_connect( rsmapi_controller_handle_t controller, rsm_node_id_t nodeid, rsm_memseg_id_t segment_id, rsm_permission_t perm, rsm_memseg_import_handle_t *memseg);
int rsm_memseg_import_disconnect( rsm_memseg_import_handle_t memseg);
The rsm_memseg_import_connect() function provides a means of creating an import segment called memseg and establishing a logical connection with an export segment identified by the segment_id on the node specified by node_id. The controller specified by controller must have a physical connection with the controller (see rsm_get_interconnect_topology(3RSM)) used while exporting the segment identified by segment_id on node specified by node_id. The perm argument specifies the mode of access that the importer is requesting for this connection. In the connection process, the mode of access and the importers userid and groupid are compared with the access permissions specified by the exporter. If the request mode is not valid, the connection request is denied. The perm argument is limited to the following octal values: 0400
read mode
write mode
The rsm_memseg_import_disconnect() function breaks the logical connection between the import segment and the exported segment and deallocates the resources associated with the import segment handle memseg.
Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error.
The rsm_memseg_import_connect() and rsm_memseg_import_disconnect() functions can return the following errors: RSMERR_BAD_SEG_HNDL
Invalid segment handle.
The rsm_memseg_import_connect() function can return the following errors: RSMERR_BAD_CTLR_HNDL
Invalid controller handle.
Controller not present.
Permission denied.
Insufficient memory.
Insufficient resources.
Segment not published to node.
Segment not published at all.
Bad address.
Remote not not reachable.
Connection interrupted.
The rsm_memseg_import_disconnect() function can return the following errors: RSMERR_SEG_STILL_MAPPED
Segment still mapped, need to unmap before disconnect.
Poll file descriptor in use.
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Evolving |
MT-Level MT-Safe |
rsm_memseg_import_map (3RSM), attributes (7)