Lines Matching refs:xdrs
104 xdr_int(XDR *xdrs, int *ip) in xdr_int() argument
106 if (xdrs->x_op == XDR_ENCODE) in xdr_int()
107 return (XDR_PUTINT32(xdrs, ip)); in xdr_int()
109 if (xdrs->x_op == XDR_DECODE) in xdr_int()
110 return (XDR_GETINT32(xdrs, ip)); in xdr_int()
112 if (xdrs->x_op == XDR_FREE) in xdr_int()
127 xdr_u_int(XDR *xdrs, uint_t *up) in xdr_u_int() argument
129 if (xdrs->x_op == XDR_ENCODE) in xdr_u_int()
130 return (XDR_PUTINT32(xdrs, (int32_t *)up)); in xdr_u_int()
132 if (xdrs->x_op == XDR_DECODE) in xdr_u_int()
133 return (XDR_GETINT32(xdrs, (int32_t *)up)); in xdr_u_int()
135 if (xdrs->x_op == XDR_FREE) in xdr_u_int()
149 xdr_long(XDR *xdrs, long *ip) in xdr_long() argument
151 return (xdr_int(xdrs, (int *)ip)); in xdr_long()
155 xdr_u_long(XDR *xdrs, unsigned long *up) in xdr_u_long() argument
157 return (xdr_u_int(xdrs, (uint_t *)up)); in xdr_u_long()
166 xdr_longlong_t(XDR *xdrs, longlong_t *hp) in xdr_longlong_t() argument
168 if (xdrs->x_op == XDR_ENCODE) { in xdr_longlong_t()
170 if (XDR_PUTINT32(xdrs, (int32_t *)((char *)hp + in xdr_longlong_t()
172 return (XDR_PUTINT32(xdrs, (int32_t *)hp)); in xdr_longlong_t()
175 if (XDR_PUTINT32(xdrs, (int32_t *)hp) == TRUE) { in xdr_longlong_t()
176 return (XDR_PUTINT32(xdrs, (int32_t *)((char *)hp + in xdr_longlong_t()
183 if (xdrs->x_op == XDR_DECODE) { in xdr_longlong_t()
185 if (XDR_GETINT32(xdrs, (int32_t *)((char *)hp + in xdr_longlong_t()
187 return (XDR_GETINT32(xdrs, (int32_t *)hp)); in xdr_longlong_t()
190 if (XDR_GETINT32(xdrs, (int32_t *)hp) == TRUE) { in xdr_longlong_t()
191 return (XDR_GETINT32(xdrs, (int32_t *)((char *)hp + in xdr_longlong_t()
204 xdr_u_longlong_t(XDR *xdrs, u_longlong_t *hp) in xdr_u_longlong_t() argument
207 if (xdrs->x_op == XDR_ENCODE) { in xdr_u_longlong_t()
209 if (XDR_PUTINT32(xdrs, (int32_t *)((char *)hp + in xdr_u_longlong_t()
211 return (XDR_PUTINT32(xdrs, (int32_t *)hp)); in xdr_u_longlong_t()
214 if (XDR_PUTINT32(xdrs, (int32_t *)hp) == TRUE) { in xdr_u_longlong_t()
215 return (XDR_PUTINT32(xdrs, (int32_t *)((char *)hp + in xdr_u_longlong_t()
222 if (xdrs->x_op == XDR_DECODE) { in xdr_u_longlong_t()
224 if (XDR_GETINT32(xdrs, (int32_t *)((char *)hp + in xdr_u_longlong_t()
226 return (XDR_GETINT32(xdrs, (int32_t *)hp)); in xdr_u_longlong_t()
229 if (XDR_GETINT32(xdrs, (int32_t *)hp) == TRUE) { in xdr_u_longlong_t()
230 return (XDR_GETINT32(xdrs, (int32_t *)((char *)hp + in xdr_u_longlong_t()
243 xdr_short(XDR *xdrs, short *sp) in xdr_short() argument
247 switch (xdrs->x_op) { in xdr_short()
251 return (XDR_PUTINT32(xdrs, &l)); in xdr_short()
254 if (!XDR_GETINT32(xdrs, &l)) in xdr_short()
269 xdr_u_short(XDR *xdrs, ushort_t *usp) in xdr_u_short() argument
273 switch (xdrs->x_op) { in xdr_u_short()
277 return (XDR_PUTINT32(xdrs, (int32_t *)&l)); in xdr_u_short()
280 if (!XDR_GETINT32(xdrs, (int32_t *)&l)) { in xdr_u_short()
297 xdr_char(XDR *xdrs, char *cp) in xdr_char() argument
302 if (!xdr_int(xdrs, &i)) { in xdr_char()
313 xdr_u_char(XDR *xdrs, uchar_t *cp) in xdr_u_char() argument
317 switch (xdrs->x_op) { in xdr_u_char()
320 return (XDR_PUTINT32(xdrs, &i)); in xdr_u_char()
322 if (!XDR_GETINT32(xdrs, &i)) in xdr_u_char()
341 xdr_bool(XDR *xdrs, bool_t *bp) in xdr_bool() argument
345 switch (xdrs->x_op) { in xdr_bool()
349 return (XDR_PUTINT32(xdrs, &i32b)); in xdr_bool()
352 if (!XDR_GETINT32(xdrs, &i32b)) { in xdr_bool()
377 xdr_enum(XDR *xdrs, enum_t *ep) in xdr_enum() argument
384 return (xdr_int(xdrs, (int32_t *)ep)); in xdr_enum()
386 return (xdr_short(xdrs, (short *)ep)); in xdr_enum()
391 (void) (xdr_short(xdrs, (short *)ep)); in xdr_enum()
392 return (xdr_int(xdrs, (int32_t *)ep)); in xdr_enum()
407 xdr_opaque(XDR *xdrs, caddr_t cp, const uint_t cnt) in xdr_opaque() argument
425 if (xdrs->x_op == XDR_DECODE) { in xdr_opaque()
426 if (!XDR_GETBYTES(xdrs, cp, cnt)) { in xdr_opaque()
431 return (XDR_GETBYTES(xdrs, (caddr_t)crud, rndup)); in xdr_opaque()
434 if (xdrs->x_op == XDR_ENCODE) { in xdr_opaque()
435 if (!XDR_PUTBYTES(xdrs, cp, cnt)) { in xdr_opaque()
440 return (XDR_PUTBYTES(xdrs, xdr_zero, rndup)); in xdr_opaque()
443 if (xdrs->x_op == XDR_FREE) in xdr_opaque()
460 xdr_bytes(XDR *xdrs, char **cpp, uint_t *sizep, const uint_t maxsize) in xdr_bytes() argument
468 if (!xdr_u_int(xdrs, sizep)) { in xdr_bytes()
472 if ((nodesize > maxsize) && (xdrs->x_op != XDR_FREE)) { in xdr_bytes()
479 switch (xdrs->x_op) { in xdr_bytes()
488 return (xdr_opaque(xdrs, sp, nodesize)); in xdr_bytes()
504 xdr_netobj(XDR *xdrs, struct netobj *np) in xdr_netobj() argument
506 return (xdr_bytes(xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ)); in xdr_netobj()
521 xdr_union(XDR *xdrs, enum_t *dscmp, char *unp, in xdr_union() argument
529 if (!xdr_enum(xdrs, dscmp)) { in xdr_union()
540 return ((*(choices->proc))(xdrs, unp, LASTUNSIGNED)); in xdr_union()
547 (*dfault)(xdrs, unp, LASTUNSIGNED)); in xdr_union()
566 xdr_string(XDR *xdrs, char **cpp, const uint_t maxsize) in xdr_string() argument
575 switch (xdrs->x_op) { in xdr_string()
586 if (!xdr_u_int(xdrs, &size)) { in xdr_string()
597 switch (xdrs->x_op) { in xdr_string()
604 if (!xdr_opaque(xdrs, sp, size)) { in xdr_string()
623 return (xdr_opaque(xdrs, sp, size)); in xdr_string()
644 xdr_vector(XDR *xdrs, char *basep, const uint_t nelem, in xdr_vector() argument
652 if (!(*xdr_elem)(xdrs, elptr, LASTUNSIGNED)) in xdr_vector()
664 xdr_wrapstring(XDR *xdrs, char **cpp) in xdr_wrapstring() argument
666 if (xdr_string(xdrs, cpp, LASTUNSIGNED)) in xdr_wrapstring()