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.10 2013/03/04 17:29:03 christos Exp $
17 .Nd library routines for registering servers
23 .Fn rpc_reg "const rpcprog_t prognum" "const rpcvers_t versnum" "const rpcproc_t procnum" "const char *(*procname)()" "const xdrproc_t inproc" "const xdrproc_t outproc" "const char *nettype"
25 .Fn svc_reg "const SVCXPRT *xprt" "const rpcprog_t prognum" "const rpcvers_t versnum" "const void (*dispatch(struct svc_req *, SVCXPRT *)" "const struct netconfig *netconf"
27 .Fn svc_unreg "const rpcprog_t prognum" "const rpcvers_t versnum"
29 .Fn svc_auth_reg "const int cred_flavor" "const enum auth_stat (*handler(struct svc_req *, struct rpc_msg *))"
31 .Fn xprt_register "const SVCXPRT *xprt"
33 .Fn xprt_unregister "const SVCXPRT *xprt"
35 These routines are a part of the RPC
36 library which allows the RPC
37 servers to register themselves with rpcbind
40 and associate the given program and version
41 number with the dispatch function.
42 When the RPC server receives a RPC request, the library invokes the
43 dispatch routine with the appropriate arguments.
47 for the definition of the
61 If a request arrives for program
68 is called with a pointer to its parameter(s);
70 should return a pointer to its static result(s);
72 is the XDR function used to decode the parameters 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,
87 with the service dispatch procedure,
93 the service is not registered with the
99 then a mapping of the triple
103 .Fa netconf-\*[Gt]nc_netid ]
105 .Fa xprt-\*[Gt]xp_ltaddr
106 is established with the local rpcbind
111 routine returns 1 if it succeeds,
115 Remove from the rpcbind
116 service, all mappings of the triple
122 and all mappings within the RPC service package
127 to dispatch routines.
130 Registers the service authentication routine
132 with the dispatch mechanism so that it can be
133 invoked to authenticate RPC requests received
134 with authentication type
136 This interface allows developers to add new authentication
137 types to their RPC applications without needing to modify
139 Service implementors usually do not need this routine.
141 Typical service application would call
143 after registering the service and prior to calling
145 When needed to process an RPC credential of type
149 procedure will be called with two parameters
150 .Fa "struct svc_req *rqst" ,
152 .Fa "struct rpc_msg * msg" ,
153 and is expected to return a valid
156 There is no provision to change or delete an authentication handler
161 routine returns 0 if the registration is successful,
164 already has an authentication handler registered for it,
168 After RPC service transport handle
170 is created, it is registered with the RPC
172 This routine modifies the global variable
175 .Xr rpc_svc_calls 3 ) .
176 Service implementors usually do not need this routine.
178 .It Fn xprt_unregister
179 Before an RPC service transport handle
181 is destroyed, it unregisters itself with the
183 This routine modifies the global variable
186 .Xr rpc_svc_calls 3 ) .
187 Service implementors usually do not need this routine.
192 .Xr rpc_svc_calls 3 ,
193 .Xr rpc_svc_create 3 ,