4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
24 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 #pragma ident "%Z%%M% %I% %E% SMI"
31 * These functions are documented in the SVID as being part of libnsl.
32 * They are also defined as macros in various RPC header files. To
33 * ensure that these interfaces exist as functions, we've created this
34 * (we hope unused) file.
39 #include <sys/types.h>
52 #undef svc_getrpccaller
58 extern int __svc_versquiet_get();
59 extern void __svc_versquiet_off();
60 extern void __svc_versquiet_on();
63 auth_destroy(AUTH
*auth
)
65 ((*((auth
)->ah_ops
->ah_destroy
))(auth
));
69 clnt_call(CLIENT
*cl
, uint32_t proc
, xdrproc_t xargs
, caddr_t argsp
,
70 xdrproc_t xres
, caddr_t resp
, struct timeval timeout
)
72 return ((*(cl
)->cl_ops
->cl_call
)(cl
, proc
, xargs
, argsp
, xres
, resp
,
77 clnt_send(CLIENT
*cl
, uint32_t proc
, xdrproc_t xargs
, caddr_t argsp
)
79 return ((*(cl
)->cl_ops
->cl_send
)(cl
, proc
, xargs
, argsp
));
83 clnt_control(CLIENT
*cl
, uint_t rq
, char *in
)
85 return ((*(cl
)->cl_ops
->cl_control
)(cl
, rq
, in
));
89 clnt_destroy(CLIENT
*cl
)
91 ((*(cl
)->cl_ops
->cl_destroy
)(cl
));
95 clnt_freeres(CLIENT
*cl
, xdrproc_t xres
, caddr_t resp
)
97 return ((*(cl
)->cl_ops
->cl_freeres
)(cl
, xres
, resp
));
101 clnt_geterr(CLIENT
*cl
, struct rpc_err
*errp
)
103 (*(cl
)->cl_ops
->cl_geterr
)(cl
, errp
);
107 svc_control(SVCXPRT
*xprt
, const uint_t rq
, void *in
)
110 case SVCGET_VERSQUIET
:
111 *((int *)in
) = __svc_versquiet_get(xprt
);
113 case SVCSET_VERSQUIET
:
114 if (*((int *)in
) == 0)
115 __svc_versquiet_off(xprt
);
117 __svc_versquiet_on(xprt
);
120 return ((*(xprt
)->xp_ops
->xp_control
)(xprt
, rq
, in
));
125 svc_destroy(SVCXPRT
*xprt
)
127 (*(xprt
)->xp_ops
->xp_destroy
)(xprt
);
131 svc_freeargs(SVCXPRT
*xprt
, xdrproc_t xargs
, char *argsp
)
133 return ((*(xprt
)->xp_ops
->xp_freeargs
)(xprt
, xargs
, argsp
));
137 svc_getargs(SVCXPRT
*xprt
, xdrproc_t xargs
, char *argsp
)
139 return ((*(xprt
)->xp_ops
->xp_getargs
)(xprt
, xargs
, argsp
));
143 svc_getrpccaller(SVCXPRT
*xprt
)
145 return (&(xprt
)->xp_rtaddr
);
149 xdr_destroy(XDR
*xdrs
)
151 (*(xdrs
)->x_ops
->x_destroy
)(xdrs
);
155 xdr_getpos(XDR
*xdrs
)
157 return ((*(xdrs
)->x_ops
->x_getpostn
)(xdrs
));
161 xdr_inline(XDR
*xdrs
, int len
)
163 return ((*(xdrs
)->x_ops
->x_inline
)(xdrs
, len
));
167 xdr_setpos(XDR
*xdrs
, uint_t pos
)
169 return ((*(xdrs
)->x_ops
->x_setpostn
)(xdrs
, pos
));