summaryrefslogtreecommitdiff
path: root/libc/inet/rpc/pmap_rmt.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-07 02:42:58 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-07 02:42:58 +0000
commit746d0019f275acc0d3752b54e8ae1930a2f5fa3c (patch)
tree1e6f3a5437edfaffb778c1d7ef0f8b4fe93adf4f /libc/inet/rpc/pmap_rmt.c
parent21237865a7b9e4898516678382a98163a9248592 (diff)
No more *xdr* jump relocations
Diffstat (limited to 'libc/inet/rpc/pmap_rmt.c')
-rw-r--r--libc/inet/rpc/pmap_rmt.c69
1 files changed, 37 insertions, 32 deletions
diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c
index d612bec4d..8a42d78ee 100644
--- a/libc/inet/rpc/pmap_rmt.c
+++ b/libc/inet/rpc/pmap_rmt.c
@@ -41,6 +41,10 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
#define authunix_create_default __authunix_create_default
#define xdrmem_create __xdrmem_create
+#define xdr_callmsg __xdr_callmsg
+#define xdr_replymsg __xdr_replymsg
+#define xdr_reference __xdr_reference
+#define xdr_u_long __xdr_u_long
#define inet_makeaddr __inet_makeaddr
#define clntudp_create __clntudp_create
@@ -69,6 +73,37 @@ extern u_long _create_xid (void) attribute_hidden;
static const struct timeval timeout = {3, 0};
/*
+ * XDR remote call arguments
+ * written for XDR_ENCODE direction only
+ */
+bool_t attribute_hidden
+__xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
+{
+ u_int lenposition, argposition, position;
+
+ if (xdr_u_long (xdrs, &(cap->prog)) &&
+ xdr_u_long (xdrs, &(cap->vers)) &&
+ xdr_u_long (xdrs, &(cap->proc)))
+ {
+ lenposition = XDR_GETPOS (xdrs);
+ if (!xdr_u_long (xdrs, &(cap->arglen)))
+ return FALSE;
+ argposition = XDR_GETPOS (xdrs);
+ if (!(*(cap->xdr_args)) (xdrs, cap->args_ptr))
+ return FALSE;
+ position = XDR_GETPOS (xdrs);
+ cap->arglen = (u_long) position - (u_long) argposition;
+ XDR_SETPOS (xdrs, lenposition);
+ if (!xdr_u_long (xdrs, &(cap->arglen)))
+ return FALSE;
+ XDR_SETPOS (xdrs, position);
+ return TRUE;
+ }
+ return FALSE;
+}
+strong_alias(__xdr_rmtcall_args,xdr_rmtcall_args)
+
+/*
* pmapper remote-call-service interface.
* This routine is used to call the pmapper remote call service
* which will look up a service program in the port maps, and then
@@ -102,7 +137,7 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
r.port_ptr = port_ptr;
r.results_ptr = resp;
r.xdr_results = xdrres;
- stat = CLNT_CALL (client, PMAPPROC_CALLIT, (xdrproc_t)xdr_rmtcall_args,
+ stat = CLNT_CALL (client, PMAPPROC_CALLIT, (xdrproc_t)__xdr_rmtcall_args,
(caddr_t)&a, (xdrproc_t)xdr_rmtcallres,
(caddr_t)&r, tout);
CLNT_DESTROY (client);
@@ -118,36 +153,6 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
/*
- * XDR remote call arguments
- * written for XDR_ENCODE direction only
- */
-bool_t
-xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
-{
- u_int lenposition, argposition, position;
-
- if (xdr_u_long (xdrs, &(cap->prog)) &&
- xdr_u_long (xdrs, &(cap->vers)) &&
- xdr_u_long (xdrs, &(cap->proc)))
- {
- lenposition = XDR_GETPOS (xdrs);
- if (!xdr_u_long (xdrs, &(cap->arglen)))
- return FALSE;
- argposition = XDR_GETPOS (xdrs);
- if (!(*(cap->xdr_args)) (xdrs, cap->args_ptr))
- return FALSE;
- position = XDR_GETPOS (xdrs);
- cap->arglen = (u_long) position - (u_long) argposition;
- XDR_SETPOS (xdrs, lenposition);
- if (!xdr_u_long (xdrs, &(cap->arglen)))
- return FALSE;
- XDR_SETPOS (xdrs, position);
- return TRUE;
- }
- return FALSE;
-}
-
-/*
* XDR remote call results
* written for XDR_DECODE direction only
*/
@@ -307,7 +312,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
r.xdr_results = xresults;
r.results_ptr = resultsp;
xdrmem_create (xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE);
- if ((!xdr_callmsg (xdrs, &msg)) || (!xdr_rmtcall_args (xdrs, &a)))
+ if ((!xdr_callmsg (xdrs, &msg)) || (!__xdr_rmtcall_args (xdrs, &a)))
{
stat = RPC_CANTENCODEARGS;
goto done_broad;