Lines Matching defs:xdrs

119 xdr_time_t(XDR *xdrs, time_t *tp)
123 switch (xdrs->x_op) {
137 return (XDR_PUTINT32(xdrs, &i));
140 if (!XDR_GETINT32(xdrs, &i))
155 xdr_int(XDR *xdrs, int *ip)
157 switch (xdrs->x_op) {
159 return (XDR_PUTINT32(xdrs, ip));
161 return (XDR_GETINT32(xdrs, ip));
172 xdr_u_int(XDR *xdrs, uint_t *up)
174 switch (xdrs->x_op) {
176 return (XDR_PUTINT32(xdrs, (int *)up));
178 return (XDR_GETINT32(xdrs, (int *)up));
191 xdr_long(XDR *xdrs, long *lp)
195 switch (xdrs->x_op) {
202 return (XDR_PUTINT32(xdrs, &i));
204 if (!XDR_GETINT32(xdrs, &i))
219 xdr_u_long(XDR *xdrs, ulong_t *ulp)
223 switch (xdrs->x_op) {
230 return (XDR_PUTINT32(xdrs, (int32_t *)&ui));
232 if (!XDR_GETINT32(xdrs, (int32_t *)&ui))
246 xdr_short(XDR *xdrs, short *sp)
250 switch (xdrs->x_op) {
253 return (XDR_PUTINT32(xdrs, &l));
255 if (!XDR_GETINT32(xdrs, &l))
269 xdr_u_short(XDR *xdrs, ushort_t *usp)
273 switch (xdrs->x_op) {
276 return (XDR_PUTINT32(xdrs, (int *)&i));
278 if (!XDR_GETINT32(xdrs, (int *)&i))
293 xdr_char(XDR *xdrs, char *cp)
297 switch (xdrs->x_op) {
300 return (XDR_PUTINT32(xdrs, &i));
302 if (!XDR_GETINT32(xdrs, &i))
316 xdr_u_char(XDR *xdrs, uchar_t *cp)
320 switch (xdrs->x_op) {
323 return (XDR_PUTINT32(xdrs, &i));
325 if (!XDR_GETINT32(xdrs, &i))
339 xdr_bool(XDR *xdrs, bool_t *bp)
343 switch (xdrs->x_op) {
346 return (XDR_PUTINT32(xdrs, &i));
348 if (!XDR_GETINT32(xdrs, &i))
362 xdr_enum(XDR *xdrs, enum_t *ep)
371 return (xdr_int(xdrs, (int *)ep));
380 xdr_opaque(XDR *xdrs, caddr_t cp, const uint_t cnt)
398 switch (xdrs->x_op) {
400 if (!XDR_GETBYTES(xdrs, cp, cnt))
404 return (XDR_GETBYTES(xdrs, crud, rndup));
406 if (!XDR_PUTBYTES(xdrs, cp, cnt))
410 return (XDR_PUTBYTES(xdrs, (caddr_t)&xdr_zero[0], rndup));
426 xdr_bytes(XDR *xdrs, char **cpp, uint_t *sizep, const uint_t maxsize)
437 if (!xdr_u_int(xdrs, sizep))
440 if ((nodesize > maxsize) && (xdrs->x_op != XDR_FREE))
446 switch (xdrs->x_op) {
458 return (xdr_opaque(xdrs, sp, nodesize));
473 xdr_netobj(XDR *xdrs, struct netobj *np)
475 return (xdr_bytes(xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ));
490 xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
498 if (!xdr_enum(xdrs, dscmp))
508 return ((*(choices->proc))(xdrs, unp, LASTUNSIGNED));
515 (*dfault)(xdrs, unp, LASTUNSIGNED));
534 xdr_string(XDR *xdrs, char **cpp, const uint_t maxsize)
543 switch (xdrs->x_op) {
557 if (!xdr_u_int(xdrs, &size))
565 switch (xdrs->x_op) {
569 if (!xdr_opaque(xdrs, sp, size))
597 if (!xdr_opaque(xdrs, &sp[bytesread], block)) {
608 return (xdr_opaque(xdrs, sp, size));
618 xdr_hyper(XDR *xdrs, longlong_t *hp)
620 if (xdrs->x_op == XDR_ENCODE) {
622 if (XDR_PUTINT32(xdrs, (int *)hp) == TRUE)
624 return (XDR_PUTINT32(xdrs, (int *)((char *)hp +
628 if (XDR_PUTINT32(xdrs, (int *)((char *)hp +
630 return (XDR_PUTINT32(xdrs, (int32_t *)hp));
635 if (xdrs->x_op == XDR_DECODE) {
637 if (XDR_GETINT32(xdrs, (int *)hp) == FALSE ||
639 (XDR_GETINT32(xdrs, (int *)((char *)hp +
644 if ((XDR_GETINT32(xdrs, (int *)((char *)hp +
646 (XDR_GETINT32(xdrs, (int *)hp) == FALSE))
655 xdr_u_hyper(XDR *xdrs, u_longlong_t *hp)
657 return (xdr_hyper(xdrs, (longlong_t *)hp));
661 xdr_longlong_t(XDR *xdrs, longlong_t *hp)
663 return (xdr_hyper(xdrs, hp));
667 xdr_u_longlong_t(XDR *xdrs, u_longlong_t *hp)
669 return (xdr_hyper(xdrs, (longlong_t *)hp));
677 xdr_wrapstring(XDR *xdrs, char **cpp)
679 return (xdr_string(xdrs, cpp, LASTUNSIGNED));