|
#define | MBUF_RX |
|
#define | MBUF_TX |
|
#define | RPCIOD_STACK 10000 |
|
#define | RPCIOD_PRIO 100 /* *fallback* priority */ |
|
#define | RPCIOD_QDEPTH 20 |
|
#define | RPCIOD_RETX_CAP_S 3 /* seconds */ |
|
#define | RPCIOD_DEFAULT_TIMEOUT (&_rpc_default_timeout) |
|
#define | RPCIOD_REFRESH 2 |
|
#define | RTEMS_RPC_EVENT |
|
#define | RPCIOD_RX_EVENT RTEMS_EVENT_1 /* Events the RPCIOD is using/waiting for */ |
|
#define | RPCIOD_TX_EVENT RTEMS_EVENT_2 |
|
#define | RPCIOD_KILL_EVENT RTEMS_EVENT_3 /* send to the daemon to kill it */ |
|
#define | LD_XACT_HASH 8 /* ld of the size of the transaction hash table */ |
|
#define | DEBUG_TRACE_XACT (1<<0) |
|
#define | DEBUG_EVENTS (1<<1) |
|
#define | DEBUG_MALLOC (1<<2) |
|
#define | DEBUG_TIMEOUT (1<<3) |
|
#define | DEBUG_PACKLOSS (1<<4) /* This introduces random, artificial packet losses to test retransmission */ |
|
#define | DEBUG_PACKLOSS_FRACT (0xffffffff/10) |
|
#define | DEBUG (0) |
|
#define | RPCIOD_EPOCH_SECS 10000 |
|
#define | ASSERT(arg) assert(arg) |
|
#define | XACT_HASHS (1<<(LD_XACT_HASH)) /* the hash table size derived from the ld */ |
|
#define | XACT_HASH_MSK ((XACT_HASHS)-1) /* mask to extract the hash index from a RPC-XID */ |
|
#define | MU_LOCK(mutex) rtems_recursive_mutex_lock(&(mutex)) |
|
#define | MU_UNLOCK(mutex) rtems_recursive_mutex_unlock(&(mutex)) |
|
#define | MU_CREAT(pmutex) rtems_recursive_mutex_init((pmutex), "RPCl") |
|
#define | MU_DESTROY(mutex) rtems_recursive_mutex_destroy(&(mutex)) |
|
#define | FIRST_ATTEMPT 0x88888888 /* some time that is never reached */ |
|
#define | XID(ibuf) (*(mtod((ibuf), u_long *))) |
|
#define | SENDTO sendto_nocpy |
|
#define | MY_MALLOC malloc |
|
#define | MY_CALLOC calloc |
|
#define | MY_FREE free |
|
#define | _KERNEL |
|
#define | RPCIOD_RXBUFSZ UDPMSGSIZE |
|
|
ssize_t | sendto_nocpy (int s, const void *buf, size_t buflen, int flags, const struct sockaddr *toaddr, int tolen, void *closure, void(*freeproc)(caddr_t, u_int), void(*refproc)(caddr_t, u_int)) |
|
enum clnt_stat | rpcUdpServerCreate (struct sockaddr_in *paddr, rpcprog_t prog, rpcvers_t vers, u_long uid, u_long gid, RpcUdpServer *psrv) |
|
void | rpcUdpServerDestroy (RpcUdpServer s) |
|
int | rpcUdpStats (FILE *f) |
| Dump statistics to a file (stdout if NULL);. More...
|
|
RpcUdpXact | rpcUdpXactCreate (u_long program, u_long version, u_long size) |
|
void | rpcUdpXactDestroy (RpcUdpXact xact) |
|
enum clnt_stat | rpcUdpSend (RpcUdpXact xact, RpcUdpServer srvr, struct timeval *timeout, u_long proc, xdrproc_t xres, caddr_t pres, xdrproc_t xargs, caddr_t pargs,...) |
|
enum clnt_stat | rpcUdpRcv (RpcUdpXact xact) |
| Wait for a transaction to complete.
|
|
void | rpcSetXIDs (uint32_t xid) |
|
int | rpcUdpInit (void) |
|
int | rpcUdpCleanup (void) |
|
enum clnt_stat | rpcUdpClntCreate (struct sockaddr_in *psaddr, rpcprog_t prog, rpcvers_t vers, u_long uid, u_long gid, RpcUdpClnt *pclnt) |
|
enum clnt_stat | rpcUdpClntCall (RpcUdpClnt xact, u_long proc, XdrProcT xargs, CaddrT pargs, XdrProcT xres, CaddrT pres, struct timeval *timeout) |
|
enum clnt_stat | rpcUdpCallRp (struct sockaddr_in *psrvr, u_long prog, u_long vers, u_long proc, XdrProcT xargs, CaddrT pargs, XdrProcT xres, CaddrT pres, u_long uid, u_long gid, struct timeval *timeout) |
|
RpcUdpXactPool | rpcUdpXactPoolCreate (rpcprog_t prog, rpcvers_t version, int xactsize, int poolsize) |
|
void | rpcUdpXactPoolDestroy (RpcUdpXactPool pool) |
|
RpcUdpXact | rpcUdpXactPoolGet (RpcUdpXactPool pool, XactPoolGetMode mode) |
|
void | rpcUdpXactPoolPut (RpcUdpXact xact) |
|
RPC Multiplexor for a Multitasking Environment.
This code funnels arbitrary task's UDP/RPC requests through one socket to arbitrary servers. The replies are gathered and dispatched to the requestors. One task handles all the sending and receiving work including retries. It is up to the requestor, however, to do the XDR encoding of the arguments / decoding of the results (except for the RPC header which is handled by the daemon).