rpc_svc_create.3 (108037) | rpc_svc_create.3 (108087) |
---|---|
1.\" @(#)rpc_svc_create.3n 1.26 93/08/26 SMI; from SVr4 2.\" Copyright 1989 AT&T 3.\" @(#)rpc_svc_create 1.3 89/06/28 SMI; 4.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved. | 1.\" @(#)rpc_svc_create.3n 1.26 93/08/26 SMI; from SVr4 2.\" Copyright 1989 AT&T 3.\" @(#)rpc_svc_create 1.3 89/06/28 SMI; 4.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved. |
5.\" $FreeBSD: head/lib/libc/rpc/rpc_svc_create.3 108037 2002-12-18 12:45:11Z ru $ | 5.\" $FreeBSD: head/lib/libc/rpc/rpc_svc_create.3 108087 2002-12-19 09:40:28Z ru $ |
6.Dd May 3, 1993 7.Dt RPC_SVC_CREATE 3 8.Os 9.Sh NAME 10.Nm rpc_svc_create , 11.Nm svc_control , 12.Nm svc_create , 13.Nm svc_destroy , --- 38 unchanged lines hidden (view full) --- 52.Xr rpc 3 53for the definition of the 54.Vt SVCXPRT 55data structure. 56.Bl -tag -width XXXXX 57.It Fn svc_control 58A function to change or retrieve various information 59about a service object. | 6.Dd May 3, 1993 7.Dt RPC_SVC_CREATE 3 8.Os 9.Sh NAME 10.Nm rpc_svc_create , 11.Nm svc_control , 12.Nm svc_create , 13.Nm svc_destroy , --- 38 unchanged lines hidden (view full) --- 52.Xr rpc 3 53for the definition of the 54.Vt SVCXPRT 55data structure. 56.Bl -tag -width XXXXX 57.It Fn svc_control 58A function to change or retrieve various information 59about a service object. |
60The |
|
60.Fa req | 61.Fa req |
62argument |
|
61indicates the type of operation and 62.Fa info 63is a pointer to the information. 64The supported values of 65.Fa req , 66their argument types, and what they do are: 67.Bl -tag -width SVCGET_XID 68.It Dv SVCGET_VERSQUIET 69If a request is received for a program number 70served by this server but the version number 71is outside the range registered with the server, 72an 73.Dv RPC_PROGVERSMISMATCH 74error will normally 75be returned. | 63indicates the type of operation and 64.Fa info 65is a pointer to the information. 66The supported values of 67.Fa req , 68their argument types, and what they do are: 69.Bl -tag -width SVCGET_XID 70.It Dv SVCGET_VERSQUIET 71If a request is received for a program number 72served by this server but the version number 73is outside the range registered with the server, 74an 75.Dv RPC_PROGVERSMISMATCH 76error will normally 77be returned. |
78The |
|
76.Fa info | 79.Fa info |
80argument |
|
77should be a pointer to an 78integer. 79Upon successful completion of the 80.Dv SVCGET_VERSQUIET 81request, 82.Fa *info 83contains an 84integer which describes the server's current --- 8 unchanged lines hidden (view full) --- 93served by this server but the version number 94is outside the range registered with the server, 95an 96.Dv RPC_PROGVERSMISMATCH 97error will normally 98be returned. 99It is sometimes desirable to 100change this behavior. | 81should be a pointer to an 82integer. 83Upon successful completion of the 84.Dv SVCGET_VERSQUIET 85request, 86.Fa *info 87contains an 88integer which describes the server's current --- 8 unchanged lines hidden (view full) --- 97served by this server but the version number 98is outside the range registered with the server, 99an 100.Dv RPC_PROGVERSMISMATCH 101error will normally 102be returned. 103It is sometimes desirable to 104change this behavior. |
105The |
|
101.Fa info | 106.Fa info |
107argument |
|
102should be a 103pointer to an integer which is either 0 104(indicating normal server behavior - an 105.Dv RPC_PROGVERSMISMATCH 106error will be returned), 107or 1 (indicating that the out of range request 108should be silently ignored). 109.El 110.It Fn svc_create 111The 112.Fn svc_create 113function 114creates server handles for all the transports 115belonging to the class 116.Fa nettype . | 108should be a 109pointer to an integer which is either 0 110(indicating normal server behavior - an 111.Dv RPC_PROGVERSMISMATCH 112error will be returned), 113or 1 (indicating that the out of range request 114should be silently ignored). 115.El 116.It Fn svc_create 117The 118.Fn svc_create 119function 120creates server handles for all the transports 121belonging to the class 122.Fa nettype . |
123The |
|
117.Fa nettype | 124.Fa nettype |
125argument |
|
118defines a class of transports which can be used 119for a particular application. 120The transports are tried in left to right order in 121.Ev NETPATH 122variable or in top to bottom order in the netconfig database. 123If 124.Fa nettype 125is 126.Dv NULL , 127it defaults to 128.Qq netpath . 129.Pp 130The 131.Fn svc_create 132function 133registers itself with the rpcbind 134service (see 135.Xr rpcbind 8 ) . | 126defines a class of transports which can be used 127for a particular application. 128The transports are tried in left to right order in 129.Ev NETPATH 130variable or in top to bottom order in the netconfig database. 131If 132.Fa nettype 133is 134.Dv NULL , 135it defaults to 136.Qq netpath . 137.Pp 138The 139.Fn svc_create 140function 141registers itself with the rpcbind 142service (see 143.Xr rpcbind 8 ) . |
144The |
|
136.Fa dispatch | 145.Fa dispatch |
146function |
|
137is called when there is a remote procedure call for the given 138.Fa prognum 139and 140.Fa versnum ; 141this requires calling 142.Fn svc_run 143(see 144.Fn svc_run --- 17 unchanged lines hidden (view full) --- 162.Fa xprt 163is undefined after calling this routine. 164.It Fn svc_dg_create 165This routine creates a connectionless RPC 166service handle, and returns a pointer to it. 167This routine returns 168.Dv NULL 169if it fails, and an error message is logged. | 147is called when there is a remote procedure call for the given 148.Fa prognum 149and 150.Fa versnum ; 151this requires calling 152.Fn svc_run 153(see 154.Fn svc_run --- 17 unchanged lines hidden (view full) --- 172.Fa xprt 173is undefined after calling this routine. 174.It Fn svc_dg_create 175This routine creates a connectionless RPC 176service handle, and returns a pointer to it. 177This routine returns 178.Dv NULL 179if it fails, and an error message is logged. |
180The |
|
170.Fa sendsz 171and 172.Fa recvsz | 181.Fa sendsz 182and 183.Fa recvsz |
173are parameters used to specify the size of the buffers. | 184arguments 185are arguments used to specify the size of the buffers. |
174If they are 0, suitable defaults are chosen. 175The file descriptor 176.Fa fildes 177should be open and bound. 178The server is not registered with 179.Xr rpcbind 8 . 180.Pp 181Warning: 182since connectionless-based RPC 183messages can only hold limited amount of encoded data, 184this transport cannot be used for procedures 185that take large arguments or return huge results. 186.It Fn svc_fd_create 187This routine creates a service on top of an open and bound file descriptor, 188and returns the handle to it. 189Typically, this descriptor is a connected file descriptor for a 190connection-oriented transport. | 186If they are 0, suitable defaults are chosen. 187The file descriptor 188.Fa fildes 189should be open and bound. 190The server is not registered with 191.Xr rpcbind 8 . 192.Pp 193Warning: 194since connectionless-based RPC 195messages can only hold limited amount of encoded data, 196this transport cannot be used for procedures 197that take large arguments or return huge results. 198.It Fn svc_fd_create 199This routine creates a service on top of an open and bound file descriptor, 200and returns the handle to it. 201Typically, this descriptor is a connected file descriptor for a 202connection-oriented transport. |
203The |
|
191.Fa sendsz 192and 193.Fa recvsz | 204.Fa sendsz 205and 206.Fa recvsz |
207arguments |
|
194indicate sizes for the send and receive buffers. 195If they are 0, reasonable defaults are chosen. 196This routine returns 197.Dv NULL 198if it fails, and an error message is logged. 199.It Fn svc_raw_create 200This routine creates an RPC 201service handle and returns a pointer to it. --- 12 unchanged lines hidden (view full) --- 214if it fails, and an error message is logged. 215.Pp 216Note: 217.Fn svc_run 218should not be called when the raw interface is being used. 219.It Fn svc_tli_create 220This routine creates an RPC 221server handle, and returns a pointer to it. | 208indicate sizes for the send and receive buffers. 209If they are 0, reasonable defaults are chosen. 210This routine returns 211.Dv NULL 212if it fails, and an error message is logged. 213.It Fn svc_raw_create 214This routine creates an RPC 215service handle and returns a pointer to it. --- 12 unchanged lines hidden (view full) --- 228if it fails, and an error message is logged. 229.Pp 230Note: 231.Fn svc_run 232should not be called when the raw interface is being used. 233.It Fn svc_tli_create 234This routine creates an RPC 235server handle, and returns a pointer to it. |
236The |
|
222.Fa fildes | 237.Fa fildes |
238argument |
|
223is the file descriptor on which the service is listening. 224If 225.Fa fildes 226is 227.Dv RPC_ANYFD , 228it opens a file descriptor on the transport specified by 229.Fa netconf . 230If the file descriptor is unbound and --- 21 unchanged lines hidden (view full) --- 252 unsigned int qlen; /* queue length (for listen(2)) */ 253}; 254.Ed 255.Pp 256In the case where the default address is chosen, 257the number of outstanding connect requests is set to 8 258for connection-oriented transports. 259The user may specify the size of the send and receive buffers | 239is the file descriptor on which the service is listening. 240If 241.Fa fildes 242is 243.Dv RPC_ANYFD , 244it opens a file descriptor on the transport specified by 245.Fa netconf . 246If the file descriptor is unbound and --- 21 unchanged lines hidden (view full) --- 268 unsigned int qlen; /* queue length (for listen(2)) */ 269}; 270.Ed 271.Pp 272In the case where the default address is chosen, 273the number of outstanding connect requests is set to 8 274for connection-oriented transports. 275The user may specify the size of the send and receive buffers |
260with the parameters | 276with the arguments |
261.Fa sendsz 262and 263.Fa recvsz ; 264values of 0 choose suitable defaults. 265This routine returns 266.Dv NULL 267if it fails, 268and an error message is logged. 269The server is not registered with the 270.Xr rpcbind 8 271service. 272.It Fn svc_tp_create 273The 274.Fn svc_tp_create 275function 276creates a server handle for the network 277specified by 278.Fa netconf , 279and registers itself with the rpcbind service. | 277.Fa sendsz 278and 279.Fa recvsz ; 280values of 0 choose suitable defaults. 281This routine returns 282.Dv NULL 283if it fails, 284and an error message is logged. 285The server is not registered with the 286.Xr rpcbind 8 287service. 288.It Fn svc_tp_create 289The 290.Fn svc_tp_create 291function 292creates a server handle for the network 293specified by 294.Fa netconf , 295and registers itself with the rpcbind service. |
296The |
|
280.Fa dispatch | 297.Fa dispatch |
298function |
|
281is called when there is a remote procedure call 282for the given 283.Fa prognum 284and 285.Fa versnum ; 286this requires calling 287.Fn svc_run . 288The --- 5 unchanged lines hidden (view full) --- 294is returned and an error message is logged. 295.It Fn svc_vc_create 296This routine creates a connection-oriented RPC 297service and returns a pointer to it. 298This routine returns 299.Dv NULL 300if it fails, and an error message is logged. 301The users may specify the size of the send and receive buffers | 299is called when there is a remote procedure call 300for the given 301.Fa prognum 302and 303.Fa versnum ; 304this requires calling 305.Fn svc_run . 306The --- 5 unchanged lines hidden (view full) --- 312is returned and an error message is logged. 313.It Fn svc_vc_create 314This routine creates a connection-oriented RPC 315service and returns a pointer to it. 316This routine returns 317.Dv NULL 318if it fails, and an error message is logged. 319The users may specify the size of the send and receive buffers |
302with the parameters | 320with the arguments |
303.Fa sendsz 304and 305.Fa recvsz ; 306values of 0 choose suitable defaults. 307The file descriptor 308.Fa fildes 309should be open and bound. 310The server is not registered with the 311.Xr rpcbind 8 312service. 313.El 314.Sh SEE ALSO 315.Xr rpc 3 , 316.Xr rpc_svc_calls 3 , 317.Xr rpc_svc_err 3 , 318.Xr rpc_svc_reg 3 , 319.Xr rpcbind 8 | 321.Fa sendsz 322and 323.Fa recvsz ; 324values of 0 choose suitable defaults. 325The file descriptor 326.Fa fildes 327should be open and bound. 328The server is not registered with the 329.Xr rpcbind 8 330service. 331.El 332.Sh SEE ALSO 333.Xr rpc 3 , 334.Xr rpc_svc_calls 3 , 335.Xr rpc_svc_err 3 , 336.Xr rpc_svc_reg 3 , 337.Xr rpcbind 8 |