ep_complete_rpc(3)

NAME

ep_complete_rpc - completes the receive of an RPC message

SYNOPSIS

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

PARAMETERS

rxd

The receive descriptor associated with the completed message.

handler

A pointer to a function that will be called when the status block and data have been transferred.

arg

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

blk

A status block to return to the sender. The sender's transmit handler can access the block with ep_txd_statusblk(txd).

local

Local data buffer descriptors for optional final data transfer.

remote

Remote data buffer descriptors for optional final data transfer.

nFrags

Vector lengths of optional descriptor vectors local and remote.

DESCRIPTION

Completes the receive of an RPC message, optionally sending a reply in datavec to the message transmitter.

The handler is called when the status block, blk, and optional data have been transferred. It frees the resources associated with datavec. Note that the handler will be called from an interrupt context and consequently has restrictions on what it may do. It may not sleep, access user space or call the scheduler. The handler should have the following type:

typedef void (EP_RXH)(
struct ep_rxd *rxd);

where rxd is a pointer to a receive descriptor associated with the message. The receive descriptor includes the envelope information that contains the source node number.

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

The receive descriptor can be requeued using ep_requeue_receive() or should be freed using ep_complete_receive().

RETURN VALUES

The following values can be returned:

EP_SUCCESS

The reply was successfully queued for delivery.

EP_CONN_RESET

The virtual circuit was dropped after the message was received. No rails were available for completing the RPC

SEE ALSO

ep_complete_receive(3), ep_requeue_receive(3).


© Quadrics Ltd. 1998-2003