RPC::ONC - Perl interface to ONC RPC
use RPC::ONC; # Create a client of the NFS service. $clnt = &RPC::ONC::Client::clnt_create('foo.bar.com', NFS_PROGRAM, NFS_VERSION, 'netpath'); # Set the timeout to 3 seconds. $clnt->clnt_control(CLSET_TIMEOUT, pack('LL', 3, 0));
The RPC::ONC module provides access to some of the ONC RPC routines for making and receiving remote procedure calls, as well as functions to access members of RPC-related structures. It's intended to be used with 'perlrpcgen', which generates Perl XS stubs for RPC clients and servers.
Most of these routines work the same as their C equivalents and are thus not described in detail.
Not all of the ONC RPC calls are provided in this alpha version--I've been filling them in more or less as needed. Let me know if there's one you really need.
Number of the error that just occurred.
Message corresponding to error that just occurred.
RPC::ONC::Client wraps CLIENT *.
If the call fails, clnt_create will set RPC::ONC::errno and RPC::ONC::errstr and croak.
The info argument should be packed as an appropriate structure for the operation.
Takes an RPC::ONC::Client object and an RPC::ONC::Auth object and assigns the cl_auth field of the first to the second.
RPC::ONC::Auth wraps AUTH *.
RPC::ONC::svc_req wraps struct svc_req *.
Returns the rq_prog field.
Returns the rq_vers field.
Returns the rq_proc field.
Returns the rq_cred field as an RPC::ONC::opaque_auth object.
Returns the rq_clntcred field as an RPC::ONC::authsys_parms object. Will croak if the credentials are not the right flavor.
Returns the rq_clntcred field as an RPC::ONC::authdes_cred object. Will croak if the credentials are not the right flavor.
Returns the oa_flavor field.
Returns the aup_time field.
Returns the aup_machname field.
Returns the aup_uid field.
Returns the aup_gid field.
Returns the aup_gids field as an array.
RPC::ONC::Svcxprt wraps struct svcxprt *.
Returns a sockaddr_in * which you can unpack to get the IP address of the caller.
Jake Donham <firstname.lastname@example.org>
Thanks to Organic Online <http://www.organic.com/> for letting me hack at work.