callrpc Subroutine

Purpose

Calls the remote procedure on the machine specified by the host parameter.

Library

C Library (libc.a)

Syntax

#include <rpc/rpc.h>

callrpc (host, prognum, versnum, procnum, inproc, in, outproc, out)
char * host;
u_long  prognum,  versnum,  procnum;
xdrproc_t  inproc;
char * in;
xdrproc_t  outproc;
char * out;

Description

The callrpc subroutine calls a remote procedure identified by the prognum parameter, the versnum parameter, and the procnum parameter on the machine pointed to by the host parameter.

This subroutine uses User Datagram Protocol/Internet Protocol (UDP/IP) as a transport to call a remote procedure. No connection will be made if the server is supported by Transmission Control Protocol/Internet Protocol (TCP/IP). This subroutine does not control time outs or authentication.

Parameters

Item Description
host Points to the program name of the remote machine.
prognum Specifies the number of the remote program.
versnum Specifies the version number of the remote program.
procnum Specifies the number of the procedure associated with the remote program being called.
inproc Specifies the name of the XDR procedure that encodes the procedure parameters.
in Specifies the address of the procedure arguments.
outproc Specifies the name of the XDR procedure that decodes the procedure results.
out Specifies the address where results are placed.

Return Values

This subroutine returns a value of enum clnt_stat. Use the clnt_perrno subroutine to translate this failure status into a displayed message.