ep_rpc_put(3)

NAME

ep_rpc_put, ep_rpc_get - transfer additional data for an RPC

SYNOPSIS

#include <elan3/epcomms.h>
     
EP_STATUS ep_rpc_put(
EP_RXD *rxd, EP_RXH *handler, void *arg, EP_NMD *local, EP_NMD *remote, int nFrags);
EP_STATUS ep_rpc_get(
EP_RXD *rxd, EP_RXH *handler, void *arg, EP_NMD *remote, EP_NMD *local, int nFrags);

PARAMETERS

rxd

The receive descriptor associated with the received message.

handler

A pointer to a callback handler function that will be called when the data has been transferred.

arg

A parameter that will be passed on to the handler function.

local

Local buffers to be used for the data transfer.

remote

Remote buffers to be used for the data transfer.

nFrags

The number of elements in the vectors local and remote.

DESCRIPTION

ep_rpc_put() and ep_rpc_get transfer data for an RPC which has been received and has not been completed yet. The RPC server transfers data to or from the node that instigated the RPC. The pair of NMD vectors local and remote determine the location of network memory data buffers to be transferred and in general will be calculated from information sent in the RPC request message.

The order of remote and local depends on the direction of the flow of data. In both ep_rpc_put() and ep_rpc_get() the parameters are ordered so that the source for the transfer comes first and the destination comes second.

The pair of vectors local and remote must be of equal length. Additionally, each pair of NMD elements must correspondingly match in length.

The remote address is generally passed over to the server in the RPC payload or message, and should have been loaded previously into the RPC client's network memory address space by the sender.

In the absence of error, an RPC transaction is carried out from start to finish on the same rail. Consequently, all data buffers used during the RPC only need to be loaded onto the same rail as the initial RPC request message. Only in circumstances of rail failover would buffer mappings require loading onto other rails, and this process is automatically handled as part of the multi-rail failover protocol.

The handler is called when the data has been transferred. Note that the handler function will be called from an interrupt context, and consequently has restrictions on what it may do. The handler may not sleep, access user space or call the scheduler.

The fields in the receive descriptor can be accessed using the receive descriptor operations, such as ep_rxd_payload(3).

RETURN VALUES

ep_rpc_put() and ep_rpc_get are non-blocking and return immediately. The following values can be returned:

EP_CONN_RESET

The virtual circuit was dropped after the message was received. No rails were available to complete the request.

EP_SUCCESS

The reply was successfully queued for delivery.

When the data has been transferred the callback handler is invoked.

SEE ALSO

ep_complete_rpc(3).


© Quadrics Ltd. 1998-2003