1 .\" @(#)rpc_svc_reg.3n 1.32 93/08/31 SMI; from SVr4
2 .\" Copyright 1989 AT&T
3 .\" @(#)rpc_svc_call 1.6 89/07/20 SMI;
4 .\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
5 .\" $NetBSD: rpc_svc_reg.3,v 1.1 2000/06/02 23:11:14 fvdl Exp $
6 .\" $FreeBSD: src/lib/libc/rpc/rpc_svc_reg.3,v 1.5 2002/12/19 09:40:23 ru Exp $
18 .Nd library routines for registering servers
22 .Fn rpc_reg "rpcprog_t prognum" "rpcvers_t versnum" "rpcproc_t procnum" "char *(*procname)()" "xdrproc_t inproc" "xdrproc_t outproc" "char *nettype"
24 .Fn svc_reg "SVCXPRT *xprt" "const rpcprog_t prognum" "const rpcvers_t versnum" "void (*dispatch)(struct svc_req *, SVCXPRT *)" "const struct netconfig *netconf"
26 .Fn svc_unreg "const rpcprog_t prognum" "const rpcvers_t versnum"
28 .Fn svc_auth_reg "int cred_flavor" "enum auth_stat (*handler)(struct svc_req *, struct rpc_msg *)"
30 .Fn xprt_register "SVCXPRT *xprt"
32 .Fn xprt_unregister "SVCXPRT *xprt"
34 These routines are a part of the RPC
35 library which allows the RPC
36 servers to register themselves with rpcbind
39 and associate the given program and version
40 number with the dispatch function.
41 When the RPC server receives a RPC request, the library invokes the
42 dispatch routine with the appropriate arguments.
46 for the definition of the
59 If a request arrives for program
66 is called with a pointer to its argument(s);
68 should return a pointer to its static result(s);
70 is the XDR function used to decode the arguments while
72 is the XDR function used to encode the results.
73 Procedures are registered on all available transports of the class
77 This routine returns 0 if the registration succeeded,
84 with the service dispatch procedure,
90 the service is not registered with the
96 then a mapping of the triple
97 .Bq Fa prognum , versnum , netconf->nc_netid
100 is established with the local rpcbind
105 routine returns 1 if it succeeds,
108 Remove from the rpcbind
109 service, all mappings of the triple
110 .Bq Fa prognum , versnum , No all-transports
112 and all mappings within the RPC service package
114 .Bq Fa prognum , versnum
115 to dispatch routines.
117 Registers the service authentication routine
119 with the dispatch mechanism so that it can be
120 invoked to authenticate RPC requests received
121 with authentication type
123 This interface allows developers to add new authentication
124 types to their RPC applications without needing to modify
126 Service implementors usually do not need this routine.
128 Typical service application would call
130 after registering the service and prior to calling
132 When needed to process an RPC credential of type
136 procedure will be called with two arguments,
137 .Fa "struct svc_req *rqst"
139 .Fa "struct rpc_msg *msg" ,
140 and is expected to return a valid
143 There is no provision to change or delete an authentication handler
148 routine returns 0 if the registration is successful,
151 already has an authentication handler registered for it,
154 After RPC service transport handle
156 is created, it is registered with the RPC
158 This routine modifies the global variable
161 .Xr rpc_svc_calls 3 ) .
162 Service implementors usually do not need this routine.
163 .It Fn xprt_unregister
164 Before an RPC service transport handle
166 is destroyed, it unregisters itself with the
168 This routine modifies the global variable
171 .Xr rpc_svc_calls 3 ) .
172 Service implementors usually do not need this routine.
175 These functions are part of libtirpc.
180 .Xr rpc_svc_calls 3 ,
181 .Xr rpc_svc_create 3 ,