ReactOS  0.4.15-dev-425-gc40b086
pmap_rmt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rmtcallargs
 
struct  rmtcallres
 

Functions

__BEGIN_DECLS bool_t xdr_rmtcall_args (XDR *, struct rmtcallargs *)
 
bool_t xdr_rmtcallres (XDR *, struct rmtcallres *)
 

Function Documentation

◆ xdr_rmtcall_args()

__BEGIN_DECLS bool_t xdr_rmtcall_args ( XDR ,
struct rmtcallargs  
)

Definition at line 119 of file pmap_rmt.c.

122 {
123  u_int lenposition, argposition, position;
124 
125  assert(xdrs != NULL);
126  assert(cap != NULL);
127 
128  if (xdr_u_long(xdrs, &(cap->prog)) &&
129  xdr_u_long(xdrs, &(cap->vers)) &&
130  xdr_u_long(xdrs, &(cap->proc))) {
131  lenposition = XDR_GETPOS(xdrs);
132  if (! xdr_u_long(xdrs, &(cap->arglen)))
133  return (FALSE);
134  argposition = XDR_GETPOS(xdrs);
135  if (! (*(cap->xdr_args))(xdrs, cap->args_ptr))
136  return (FALSE);
137  position = XDR_GETPOS(xdrs);
138  cap->arglen = (u_long)position - (u_long)argposition;
139  XDR_SETPOS(xdrs, lenposition);
140  if (! xdr_u_long(xdrs, &(cap->arglen)))
141  return (FALSE);
142  XDR_SETPOS(xdrs, position);
143  return (TRUE);
144  }
145  return (FALSE);
146 }
#define TRUE
Definition: types.h:120
#define XDR_GETPOS(xdrs)
Definition: xdr.h:199
unsigned long u_long
Definition: linux.h:269
#define assert(x)
Definition: debug.h:53
GLenum cap
Definition: glext.h:9639
smooth NULL
Definition: ftsmooth.c:416
bool_t xdr_u_long(XDR *xdrs, u_long *ulp)
Definition: xdr.c:186
#define XDR_SETPOS(xdrs, pos)
Definition: xdr.h:204
UINT32 u_int
Definition: types.h:82

Referenced by rpc_broadcast_exp().

◆ xdr_rmtcallres()

bool_t xdr_rmtcallres ( XDR ,
struct rmtcallres  
)

Definition at line 153 of file pmap_rmt.c.

156 {
157  caddr_t port_ptr;
158 
159  assert(xdrs != NULL);
160  assert(crp != NULL);
161 
162  port_ptr = (caddr_t)(void *)crp->port_ptr;
163  if (xdr_reference(xdrs, &port_ptr, sizeof (u_long),
164  (xdrproc_t)xdr_u_long) && xdr_u_long(xdrs, &crp->resultslen)) {
165  crp->port_ptr = (u_long *)(void *)port_ptr;
166  return ((*(crp->xdr_results))(xdrs, crp->results_ptr));
167  }
168  return (FALSE);
169 }
unsigned long u_long
Definition: linux.h:269
bool_t xdr_reference(XDR *xdrs, caddr_t *pp, u_int size, xdrproc_t proc)
Definition: xdr_reference.c:62
#define assert(x)
Definition: debug.h:53
char * caddr_t
Definition: rosdhcp.h:36
bool_t(* xdrproc_t)(XDR *,...)
Definition: xdr.h:144
smooth NULL
Definition: ftsmooth.c:416
bool_t xdr_u_long(XDR *xdrs, u_long *ulp)
Definition: xdr.c:186
#define caddr_t
Definition: ftp.c:24

Referenced by rpc_broadcast_exp().