VxWorks Reference Manual : Libraries

rpcLib

NAME

rpcLib - Remote Procedure Call (RPC) support library

ROUTINES

rpcInit( ) - initialize the RPC package
rpcTaskInit( ) - initialize a task's access to the RPC package

DESCRIPTION

This library supports Sun Microsystems' Remote Procedure Call (RPC) facility. RPC provides facilities for implementing distributed client/server-based architectures. The underlying communication mechanism can be completely hidden, permitting applications to be written without any reference to network sockets. The package is structured such that lower-level routines can optionally be accessed, allowing greater control of the communication protocols.

For more information and a tutorial on RPC, see Sun Microsystems' Remote Procedure Call Programming Guide. For an example of RPC usage, see /target/unsupported/demo/sprites.

The RPC facility is enabled when the configuration macro INCLUDE_RPC is defined.

VxWorks supports Network File System (NFS), which is built on top of RPC. If NFS is configured into the VxWorks system, RPC is automatically included as well.

IMPLEMENTATION

A task must call rpcTaskInit( ) before making any calls to other routines in the RPC library. This routine creates task-specific data structures required by RPC. These task-specific data structures are automatically deleted when the task exits.

Because each task has its own RPC context, RPC-related objects (such as SVCXPRTs and CLIENTs) cannot be shared among tasks; objects created by one task cannot be passed to another for use. Such additional objects must be explicitly deleted (for example, using task deletion hooks).

INCLUDE FILES

rpc.h

SEE ALSO

rpcLib, nfsLib, nfsDrv, Sun Microsystems' Remote Procedure Call Programming Guide


Libraries : Routines

rpcInit( )

NAME

rpcInit( ) - initialize the RPC package

SYNOPSIS


STATUS rpcInit (void)

DESCRIPTION

This routine must be called before any task can use the RPC facility; it spawns the portmap daemon. It is called automatically if the configuration macro INCLUDE_RPC is defined.

RETURNS

OK, or ERROR if the portmap daemon cannot be spawned.

SEE ALSO

rpcLib


Libraries : Routines

rpcTaskInit( )

NAME

rpcTaskInit( ) - initialize a task's access to the RPC package

SYNOPSIS


STATUS rpcTaskInit (void)

DESCRIPTION

This routine must be called by a task before it makes any calls to other routines in the RPC package.

RETURNS

OK, or ERROR if there is insufficient memory or the routine is unable to add a task delete hook.

SEE ALSO

rpcLib