Print this page
4447 rpc_control(3nsl): info should be italic, not bold
4213 Missing spaces in man pages
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3nsl/rpc_control.3nsl
+++ new/usr/src/man/man3nsl/rpc_control.3nsl
1 1 '\" te
2 2 .\" Copyright 1989 AT&T
3 3 .\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved
4 4 .\" 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.
5 5 .\" 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.
6 6 .\" 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]
7 7 .TH RPC_CONTROL 3NSL "Feb 24, 1999"
8 8 .SH NAME
9 9 rpc_control \- library routine for manipulating global RPC attributes for
10 10 client and server applications
11 11 .SH SYNOPSIS
12 12 .LP
13 13 .nf
14 14 \fBbool_t\fR \fBrpc_control\fR(\fBint\fR \fIop\fR, \fBvoid *\fR\fIinfo\fR);
15 15 .fi
16 16
17 17 .SH DESCRIPTION
18 18 .sp
19 19 .LP
20 20 This \fBRPC\fR library routine allows applications to set and modify global
21 21 \fBRPC\fR attributes that apply to clients as well as servers. At present, it
22 22 supports only server side operations. This function allows applications to set
23 23 and modify global attributes that apply to client as well as server functions.
24 24 \fIop\fR indicates the type of operation, and \fIinfo\fR is a pointer to the
25 25 operation specific information. The supported values of \fIop\fR and their
26 26 argument types, and what they do are:
27 27 .sp
28 28 .in +2
29 29 .nf
30 30 RPC_SVC_MTMODE_SET int * set multithread mode
31 31 RPC_SVC_MTMODE_GET int * get multithread mode
32 32 RPC_SVC_THRMAX_SET int * set maximum number of threads
33 33 RPC_SVC_THRMAX_GET int * get maximum number of threads
34 34 RPC_SVC_THRTOTAL_GET int * get number of active threads
35 35 RPC_SVC_THRCREATES_GET int * get number of threads created
36 36 RPC_SVC_THRERRORS_GET int * get number of thread create errors
37 37 RPC_SVC_USE_POLLFD int * set number of file descriptors to unlimited
38 38 RPC_SVC_CONNMAXREC_SET int * set non-blocking max rec size
39 39 RPC_SVC_CONNMAXREC_GET int * get non-blocking max rec size
40 40 .fi
41 41 .in -2
42 42
43 43 .sp
44 44 .LP
45 45 There are three multithread (MT) modes. These are:
46 46 .sp
47 47 .in +2
48 48 .nf
49 49 RPC_SVC_MT_NONE Single threaded mode (default)
50 50 RPC_SVC_MT_AUTO Automatic MT mode
51 51 RPC_SVC_MT_USER User MT mode
52 52 .fi
53 53 .in -2
54 54
55 55 .sp
56 56 .LP
57 57 Unless the application sets the Automatic or User MT modes, it will stay in the
58 58 default (single threaded) mode. See the \fINetwork Interfaces Programmer's
59 59 Guide\fR for the meanings of these modes and programming examples. Once a mode
60 60 is set, it cannot be changed.
61 61 .sp
62 62 .LP
63 63 By default, the maximum number of threads that the server will create at any
64 64 time is 16. This allows the service developer to put a bound on thread
65 65 resources consumed by a server. If a server needs to process more than 16
66 66 client requests concurrently, the maximum number of threads must be set to the
67 67 desired number. This parameter may be set at any time by the server.
68 68 .sp
69 69 .LP
70 70 Set and get operations will succeed even in modes where the operations don't
71 71 apply. For example, you can set the maximum number of threads in any mode,
↓ open down ↓ |
71 lines elided |
↑ open up ↑ |
72 72 even though it makes sense only for the Automatic MT mode. All of the get
73 73 operations except \fBRPC_SVC_MTMODE_GET\fR apply only to the Automatic MT mode,
74 74 so values returned in other modes may be undefined.
75 75 .sp
76 76 .LP
77 77 By default, \fBRPC\fR servers are limited to a maximum of 1024 file descriptors
78 78 or connections due to limitations in the historical interfaces
79 79 \fBsvc_fdset\fR(3NSL) and \fBsvc_getreqset\fR(3NSL). Applications written to
80 80 use the preferred interfaces of \fBsvc_pollfd\fR(3NSL) and
81 81 \fBsvc_getreq_poll\fR(3NSL) can use an unlimited number of file descriptors.
82 -Setting \fBinfo\fR to point to a non-zero integer and \fIop\fR to
82 +Setting \fIinfo\fR to point to a non-zero integer and \fIop\fR to
83 83 \fBRPC_SVC_USE_POLLFD\fR removes the limitation.
84 84 .sp
85 85 .LP
86 86 Connection oriented \fBRPC\fR transports read \fBRPC\fR requests in blocking
87 87 mode by default. Thus, they may be adversely affected by network delays and
88 88 broken clients. \fBRPC_SVC_CONNMAXREC_SET\fR enables non-blocking mode and
89 89 establishes the maximum record size (in bytes) for \fBRPC\fR requests;
90 90 \fBRPC\fR responses are not affected. Buffer space is allocated as needed up to
91 91 the specified maximum, starting at the maximum or \fBRPC_MAXDATASIZE\fR,
92 92 whichever is smaller.
93 93 .sp
94 94 .LP
95 95 The value established by \fBRPC_SVC_CONNMAXREC_SET\fR is used when a connection
96 96 is created, and it remains in effect for that connection until it is closed. To
97 97 change the value for existing connections on a per-connection basis, see
98 98 \fBsvc_control\fR(3NSL).
99 99 .sp
100 100 .LP
101 101 \fBRPC_SVC_CONNMAXREC_GET\fR retrieves the current maximum record size. A zero
102 102 value means that no maximum is in effect, and that the connections are in
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
103 103 blocking mode.
104 104 .sp
105 105 .LP
106 106 \fIinfo\fR is a pointer to an argument of type \fBint\fR. Non-connection RPC
107 107 transports ignore \fBRPC_SVC_CONNMAXREC_SET\fR and
108 108 \fBRPC_SVC_CONNMAXREC_GET\fR.
109 109 .SH RETURN VALUES
110 110 .sp
111 111 .LP
112 112 This routine returns \fBTRUE\fR if the operation was successful and
113 -returns\fBFALSE\fR otherwise.
113 +returns \fBFALSE\fR otherwise.
114 114 .SH ATTRIBUTES
115 115 .sp
116 116 .LP
117 117 See \fBattributes\fR(5) for descriptions of the following attributes:
118 118 .sp
119 119
120 120 .sp
121 121 .TS
122 122 box;
123 123 c | c
124 124 l | l .
125 125 ATTRIBUTE TYPE ATTRIBUTE VALUE
126 126 _
127 127 MT-Level MT-Safe
128 128 .TE
129 129
130 130 .SH SEE ALSO
131 131 .sp
132 132 .LP
133 133 \fBrpcbind\fR(1M), \fBrpc\fR(3NSL), \fBrpc_svc_calls\fR(3NSL),
134 134 \fBattributes\fR(5)
135 135 .sp
136 136 .LP
137 137 \fINetwork Interfaces Programmer's Guide\fR
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX