SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from PCLinuxOS lib64tirpc-devel-1.0.1-1pclos2017.x86_64.rpm

RPC_SVC_CALLS

Section: C Library Functions (3)
Index
BSD mandoc
 

NAME

svc_dg_enablecache svc_exit svc_fdset svc_freeargs svc_getargs svc_getreq_common svc_getreq_poll svc_getreqset svc_getrpccaller svc_pollset svc_run svc_sendreply - library routines for RPC servers 

SYNOPSIS

In rpc/rpc.hFt intFn svc_dg_enablecache SVCXPRT *xprt const unsigned cache_sizeFt voidFn svc_exit voidFt bool_tFn svc_freeargs const SVCXPRT *xprt const xdrproc_t inproc caddr_t inFt bool_tFn svc_getargs const SVCXPRT *xprt const xdrproc_t inproc caddr_t inFt voidFn svc_getreq_common const int fdFt voidFn svc_getreq_poll struct pollfd *pfdp const int pollretvalFt voidFn svc_getreqset fd_set * rdfdsFt struct netbuf *Fn svc_getrpccaller const SVCXPRT *xprtFt struct cmsgcred *Fn __svc_getcallercreds const SVCXPRT *xprtVt struct pollfd svc_pollset[FD_SETSIZE];Ft voidFn svc_run voidFt bool_tFn svc_sendreply SVCXPRT *xprt xdrproc_t outproc char *out 

DESCRIPTION

These routines are part of theRPClibrary which allows C language programs to make procedurecalls on other machines across the network.

These routines are associated with the server side of theRPC mechanism.Some of them are called by the server side dispatch function,while others(such asFn svc_run )are called when the server is initiated. 

Routines

Seerpc(3)for the definition of theVt SVCXPRTdata structure.

Fn svc_dg_enablecache
This function allocates a duplicate request cache for theservice endpointFa xprt ,large enough to holdFa cache_sizeentries.Once enabled, there is no way to disable caching.This routine returns 0 if space necessary for a cache of the given sizewas successfully allocated, and 1 otherwise.
Fn svc_exit
This function, when called by any of the RPC server procedure orotherwise, causesFn svc_runto return.

As currently implemented,Fn svc_exitzeroes thesvc_fdsetglobal variable.If RPC server activity is to be resumed,services must be reregistered with the RPC libraryeither through one of therpc_svc_create3functions, or usingFn xprt_register .TheFn svc_exitfunctionhas global scope and ends all RPC server activity.

Vt fd_set Va svc_fdset
A global variable reflecting theRPC server's read file descriptor bit mask; it is suitable as an argumentto theselect(2)system call.This is only of interestif service implementors do not callFn svc_run ,but rather do their own asynchronous event processing.This variable is read-only (do not pass its address toselect(2)!),yet it may change after calls toFn svc_getreqsetor any creation routines.
Fn svc_freeargs
A function macro that frees any data allocated by theRPC/XDR system when it decoded the arguments to a service procedureusingFn svc_getargs .This routine returnsTRUEif the results were successfullyfreed, andFALSEotherwise.
Fn svc_getargs
A function macro that decodes the arguments of anRPC request associated with the RPCservice transport handleFa xprt .TheFa inargumentis the address where the arguments will be placed;Fa inprocis the XDRroutine used to decode the arguments.This routine returnsTRUEif decoding succeeds, andFALSEotherwise.
Fn svc_getreq_common
This routine is called to handle a request on the givenfile descriptor.
Fn svc_getreq_poll
This routine is only of interest if a service implementordoes not callFn svc_run ,but instead implements custom asynchronous event processing.It is called whenpoll(2)has determined that an RPC request has arrived on some RPCfile descriptors;Fa pollretvalis the return value frompoll(2)andFa pfdpis the array ofVt pollfdstructures on which thepoll(2)was done.It is assumed to be an array large enough tocontain the maximal number of descriptors allowed.
Fn svc_getreqset
This routine is only of interest if a service implementordoes not callFn svc_run ,but instead implements custom asynchronous event processing.It is called whenpoll(2)has determined that an RPCrequest has arrived on some RPC file descriptors;Fa rdfdsis the resultant read file descriptor bit mask.The routine returns when all file descriptorsassociated with the value ofFa rdfdshave been serviced.
Fn svc_getrpccaller
The approved way of getting the network address of the callerof a procedure associated with theRPC service transport handleFa xprt .
Fn __svc_getcallercreds
Warning this macro is specific toFx and thus not portable.This macro returns a pointer to aVt cmsgcredstructure, defined inIn sys/socket.h ,identifying the calling client.This only works if the client iscalling the server over anAF_LOCALsocket.
Vt struct pollfd Va svc_pollset[FD_SETSIZE] ;
svc_pollset
is an array ofVt pollfdstructures derived fromsvc_fdset[] It is suitable as an argument to thepoll(2)system call.The derivation ofsvc_pollsetfromsvc_fdsetis made in the current implementation inFn svc_run .Service implementors who do not callFn svc_runand who wish to use this array must perform this derivation themselves.
Fn svc_run
This routine never returns.It waits for RPCrequests to arrive, and calls the appropriate serviceprocedure usingFn svc_getreq_pollwhen one arrives.This procedure is usually waiting for thepoll(2)system call to return.
Fn svc_sendreply
Called by an RPC service's dispatch routine to send the results of aremote procedure call.TheFa xprtargumentis the request's associated transport handle;Fa outprocis the XDRroutine which is used to encode the results; andFa outis the address of the results.This routine returnsTRUEif it succeeds,FALSEotherwise.

 

AVAILABILITY

These functions are part of libtirpc. 

SEE ALSO

poll(2),select(2),rpc(3),rpc_svc_create3,rpc_svc_err3,rpc_svc_reg3


 

Index

NAME
SYNOPSIS
DESCRIPTION
Routines
AVAILABILITY
SEE ALSO

This document was created byman2html,using the manual pages.