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 $
18 .Nd library routines for registering servers
24 .Fn rpc_reg "rpcprog_t prognum" "rpcvers_t versnum" "rpcproc_t procnum" "char *(*procname)()" "xdrproc_t inproc" "xdrproc_t outproc" "char *nettype"
26 .Fn svc_reg "SVCXPRT *xprt" "const rpcprog_t prognum" "const rpcvers_t versnum" "void (*dispatch)(struct svc_req *, SVCXPRT *)" "const struct netconfig *netconf"
28 .Fn svc_unreg "const rpcprog_t prognum" "const rpcvers_t versnum"
30 .Fn svc_auth_reg "int cred_flavor" "enum auth_stat (*handler)(struct svc_req *, struct rpc_msg *)"
32 .Fn xprt_register "SVCXPRT *xprt"
34 .Fn xprt_unregister "SVCXPRT *xprt"
36 These routines are a part of the RPC
37 library which allows the RPC
38 servers to register themselves with rpcbind
41 and associate the given program and version
42 number with the dispatch function.
43 When the RPC server receives a RPC request, the library invokes the
44 dispatch routine with the appropriate arguments.
48 for the definition of the
61 If a request arrives for program
68 is called with a pointer to its argument(s);
70 should return a pointer to its static result(s);
72 is the XDR function used to decode the arguments while
74 is the XDR function used to encode the results.
75 Procedures are registered on all available transports of the class
79 This routine returns 0 if the registration succeeded,
86 with the service dispatch procedure,
92 the service is not registered with the
98 then a mapping of the triple
99 .Bq Fa prognum , versnum , netconf->nc_netid
102 is established with the local rpcbind
107 routine returns 1 if it succeeds,
110 Remove from the rpcbind
111 service, all mappings of the triple
112 .Bq Fa prognum , versnum , No all-transports
114 and all mappings within the RPC service package
116 .Bq Fa prognum , versnum
117 to dispatch routines.
119 Registers the service authentication routine
121 with the dispatch mechanism so that it can be
122 invoked to authenticate RPC requests received
123 with authentication type
125 This interface allows developers to add new authentication
126 types to their RPC applications without needing to modify
128 Service implementors usually do not need this routine.
130 Typical service application would call
132 after registering the service and prior to calling
134 When needed to process an RPC credential of type
138 procedure will be called with two arguments,
139 .Fa "struct svc_req *rqst"
141 .Fa "struct rpc_msg *msg" ,
142 and is expected to return a valid
145 There is no provision to change or delete an authentication handler
150 routine returns 0 if the registration is successful,
153 already has an authentication handler registered for it,
156 After RPC service transport handle
158 is created, it is registered with the RPC
160 This routine modifies the global variable
163 .Xr rpc_svc_calls 3 ) .
164 Service implementors usually do not need this routine.
165 .It Fn xprt_unregister
166 Before an RPC service transport handle
168 is destroyed, it unregisters itself with the
170 This routine modifies the global variable
173 .Xr rpc_svc_calls 3 ) .
174 Service implementors usually do not need this routine.
180 .Xr rpc_svc_calls 3 ,
181 .Xr rpc_svc_create 3 ,