7139 Sync mDNS with mDNSResponder-625.41.2
[unleashed.git] / usr / src / man / man3rsm / rsm_get_controller.3rsm
blob2e740ffb3a675fb9d6ba40459debc6641f42ab3d
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_GET_CONTROLLER 3RSM "Jun 8, 2001"
7 .SH NAME
8 rsm_get_controller, rsm_get_controller_attr, rsm_release_controller \- get or
9 release a controller handle
10 .SH SYNOPSIS
11 .LP
12 .nf
13 cc [ \fIflag\fR... ] \fIfile\fR... -lrsm [ \fIlibrary\fR... ]
14 #include <rsmapi.h>
16 \fBint\fR \fBrsm_get_controller\fR(\fBchar *\fR\fIname\fR,
17      \fBrsmapi_controller_handle_t *\fR\fIcontroller\fR);
18 .fi
20 .LP
21 .nf
22 \fBint\fR \fBrsm_get_controller_attr\fR(\fBrsmapi_controller_handle_t\fR \fIchdl\fR,
23      \fBrsmapi_controller_attr_t *\fR\fIattr\fR);
24 .fi
26 .LP
27 .nf
28 \fBint\fR \fBrsm_release_controller\fR(\fBrsmapi_controller_handle_t\fR \fIchdl\fR);
29 .fi
31 .SH DESCRIPTION
32 .sp
33 .LP
34 The controller functions provide mechanisms for obtaining access to a
35 controller, determining the characteristics of the controller, and releasing
36 the controller.
37 .sp
38 .LP
39 The  \fBrsm_get_controller()\fR function acquires a controller handle through
40 the \fIcontroller\fR argument.  The \fIname\fR argument is the specific
41 controller instance (for example, "sci0" or "loopback"). This controller handle
42 is used for subsequent RSMAPI calls.
43 .sp
44 .LP
45 The \fBrsm_get_controller_attr()\fR function obtains a controller's attributes
46 through the \fIattr\fR argument. The \fIchdl\fR argument is the controller
47 handle obtained by the   \fBrsm_get_controller()\fR call. The attribute
48 structure is defined in the <\fBrsmapi\fR> header.
49 .sp
50 .LP
51 The  \fBrsm_release_controller()\fR function releases the resources associated
52 with the controller identified by the controller handle \fIchdl\fR, obtained by
53 calling  \fBrsm_get_controller()\fR. Each \fBrsm_release_controller()\fR call
54 must have a corresponding \fBrsm_get_controller()\fR call. It is illegal to
55 access a controller or segments exported or imported using a released
56 controller.
57 .SH RETURN VALUES
58 .sp
59 .LP
60 Upon successful completion, these functions return 0. Otherwise, an error value
61 is returned to indicate the error.
62 .SH ERRORS
63 .sp
64 .LP
65 The \fBrsm_get_controller()\fR, \fBrsm_get_controller_attr()\fR, and
66 \fBrsm_release_controller()\fR functions can return the following errors:
67 .sp
68 .ne 2
69 .na
70 \fB\fBRSMERR_BAD_CTLR_HNDL\fR \fR
71 .ad
72 .RS 25n
73 Invalid controller handle.
74 .RE
76 .sp
77 .LP
78 The \fBrsm_get_controller()\fR and  \fBrsm_get_controller_attr()\fR functions
79 can return the following errors:
80 .sp
81 .ne 2
82 .na
83 \fB\fBRSMERR_BAD_ADDR\fR \fR
84 .ad
85 .RS 20n
86 Bad address.
87 .RE
89 .sp
90 .LP
91 The  \fBrsm_get_controller()\fR function can return the following errors:
92 .sp
93 .ne 2
94 .na
95 \fB\fBRSMERR_CTLR_NOT_PRESENT\fR \fR
96 .ad
97 .sp .6
98 .RS 4n
99 Controller not present.
103 .ne 2
105 \fB\fBRSMERR_INSUFFICIENT_MEM\fR \fR
107 .sp .6
108 .RS 4n
109 Insufficient memory.
113 .ne 2
115 \fB\fBRSMERR_BAD_LIBRARY_VERSION\fR \fR
117 .sp .6
118 .RS 4n
119 Invalid library version.
122 .SH ATTRIBUTES
125 See \fBattributes\fR(5) for descriptions of the following attributes:
130 box;
131 c | c
132 l | l .
133 ATTRIBUTE TYPE  ATTRIBUTE VALUE
135 Interface Stability     Evolving
137 MT-Level        MT-Safe
140 .SH SEE ALSO
143 \fBrsm_memseg_export_create\fR(3RSM), \fBrsm_memseg_import_connect\fR(3RSM),
144 \fBattributes\fR(5)