61#define su_data(xprt) ((struct svc_dg_data *)(xprt->xp_p2))
62#define rpc_buffer(xprt) ((xprt)->xp_p1)
65#define MAX(a, b) (((a) > (b)) ? (a) : (b))
90static const char svc_dg_err1[] =
"could not get transport information";
91static const char svc_dg_err2[] =
" transport does not support data transfer";
115 if ((sendsize == 0) || (recvsize == 0)) {
128 su->
su_iosz = ((
MAX(sendsize, recvsize) + 3) / 4) * 4;
237 return (*xdr_args)(&(
su_data(xprt)->su_xdrs), args_ptr);
249 return (*xdr_args)(xdrs, args_ptr);
259 if (xprt->
xp_fd != -1)
287 static struct xp_ops ops;
288 static struct xp_ops2 ops2;
294 if (ops.xp_recv ==
NULL) {
321#define ALLOC(type, size) \
322 (type *) mem_alloc((sizeof (type) * (size)))
324#define MEMZERO(addr, type, size) \
325 (void) memset((void *) (addr), 0, sizeof (type) * (int) (size))
327#define FREE(addr, type, size) \
328 mem_free((addr), (sizeof (type) * (size)))
371#define CACHE_LOC(transp, xid) \
372 (xid % (SPARSENESS * ((struct cl_cache *) \
373 su_data(transp)->su_cache)->uc_size))
382static const char alloc_err[] =
"could not allocate cache ";
453#ifdef RPC_CACHE_DEBUG
464 if (victim !=
NULL) {
467 *vicp !=
NULL && *vicp != victim;
479 if (victim ==
NULL) {
485 if (newbuf ==
NULL) {
496#ifdef RPC_CACHE_DEBUG
501 "cache set for xid= %x prog=%d vers=%d proc=%d for rmtaddr=%s\n",
543#ifdef RPC_CACHE_DEBUG
558#ifdef RPC_CACHE_DEBUG
563 "cache entry found for xid=%x prog=%d vers=%d proc=%d for rmtaddr=%s\n",
565 msg->rm_call.cb_vers,
566 msg->rm_call.cb_proc, uaddr);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define mem_free(ptr, bsize)
INT WSAAPI recvfrom(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags, OUT LPSOCKADDR from, IN OUT INT FAR *fromlen)
INT WSAAPI sendto(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags, IN CONST struct sockaddr *to, IN INT tolen)
void freenetconfigent(struct netconfig *netconfigp)
struct netconfig * getnetconfigent(char *netid) const
#define memcpy(s1, s2, n)
bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg)
u_int __rpc_get_t_size(int af, int proto, int size)
char * taddr2uaddr(const struct netconfig *nconf, const struct netbuf *nbuf)
int __rpc_fd2sockinfo(SOCKET fd, struct __rpc_sockinfo *sip)
bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg)
INT WSAAPI getsockname(IN SOCKET s, OUT LPSOCKADDR name, IN OUT INT FAR *namelen)
void __xprt_set_raddr(SVCXPRT *, const struct sockaddr_storage *)
struct netbuf * __rpc_set_netbuf(struct netbuf *, const void *, size_t)
struct opaque_auth xp_verf
const struct __rpc_svcxprt::xp_ops2 * xp_ops2
const struct __rpc_svcxprt::xp_ops * xp_ops
char su_verfbody[MAX_AUTH_BYTES]
void xprt_register(SVCXPRT *xprt)
void xprt_unregister(SVCXPRT *xprt)
static const char enable_err[]
int svc_dg_enablecache(SVCXPRT *, u_int)
struct cache_node * cache_ptr
static void cache_set(SVCXPRT *, size_t)
static const char svc_dg_err1[]
static const char alloc_err[]
#define FREE(addr, type, size)
static bool_t svc_dg_recv(SVCXPRT *, struct rpc_msg *)
static int cache_get(SVCXPRT *, struct rpc_msg *, char **, size_t *)
static const char svc_dg_str[]
static const char cache_set_err2[]
#define MEMZERO(addr, type, size)
static bool_t svc_dg_freeargs(SVCXPRT *, xdrproc_t, void *)
#define CACHE_LOC(transp, xid)
static bool_t svc_dg_control(SVCXPRT *, const u_int, void *)
static bool_t svc_dg_reply(SVCXPRT *, struct rpc_msg *)
static const char cache_set_err3[]
static const char cache_enable_str[]
static const char svc_dg_err2[]
static const char __no_mem_str[]
static const char cache_set_str[]
#define ALLOC(type, size)
static void svc_dg_ops(SVCXPRT *)
static void svc_dg_destroy(SVCXPRT *)
static bool_t svc_dg_getargs(SVCXPRT *, xdrproc_t, void *)
SVCXPRT * svc_dg_create(int fd, u_int sendsize, u_int recvsize)
static enum xprt_stat svc_dg_stat(SVCXPRT *)
static const char cache_set_err1[]
#define XDR_SETPOS(xdrs, pos)
#define XDR_DESTROY(xdrs)
bool_t(* xdrproc_t)(XDR *,...)
void xdrmem_create(XDR *xdrs, char *addr, u_int size, enum xdr_op op)