/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include "rex.h"

bool_t
xdr_rexstring (XDR *xdrs, rexstring *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, objp, 1024))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rex_start (XDR *xdrs, rex_start *objp)
{
	register int32_t *buf;


	if (xdrs->x_op == XDR_ENCODE) {
		 if (!xdr_array (xdrs, (char **)&objp->rst_cmd.rst_cmd_val, (u_int *) &objp->rst_cmd.rst_cmd_len, ~0,
			sizeof (rexstring), (xdrproc_t) xdr_rexstring))
			 return FALSE;
		 if (!xdr_rexstring (xdrs, &objp->rst_host))
			 return FALSE;
		 if (!xdr_rexstring (xdrs, &objp->rst_fsname))
			 return FALSE;
		 if (!xdr_rexstring (xdrs, &objp->rst_dirwithin))
			 return FALSE;
		 if (!xdr_array (xdrs, (char **)&objp->rst_env.rst_env_val, (u_int *) &objp->rst_env.rst_env_len, ~0,
			sizeof (rexstring), (xdrproc_t) xdr_rexstring))
			 return FALSE;
		buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_int (xdrs, &objp->rst_port0))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->rst_port1))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->rst_port2))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->rst_flags))
				 return FALSE;
		} else {
			IXDR_PUT_U_LONG(buf, objp->rst_port0);
			IXDR_PUT_U_LONG(buf, objp->rst_port1);
			IXDR_PUT_U_LONG(buf, objp->rst_port2);
			IXDR_PUT_U_LONG(buf, objp->rst_flags);
		}
		return TRUE;
	} else if (xdrs->x_op == XDR_DECODE) {
		 if (!xdr_array (xdrs, (char **)&objp->rst_cmd.rst_cmd_val, (u_int *) &objp->rst_cmd.rst_cmd_len, ~0,
			sizeof (rexstring), (xdrproc_t) xdr_rexstring))
			 return FALSE;
		 if (!xdr_rexstring (xdrs, &objp->rst_host))
			 return FALSE;
		 if (!xdr_rexstring (xdrs, &objp->rst_fsname))
			 return FALSE;
		 if (!xdr_rexstring (xdrs, &objp->rst_dirwithin))
			 return FALSE;
		 if (!xdr_array (xdrs, (char **)&objp->rst_env.rst_env_val, (u_int *) &objp->rst_env.rst_env_len, ~0,
			sizeof (rexstring), (xdrproc_t) xdr_rexstring))
			 return FALSE;
		buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_int (xdrs, &objp->rst_port0))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->rst_port1))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->rst_port2))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->rst_flags))
				 return FALSE;
		} else {
			objp->rst_port0 = IXDR_GET_U_LONG(buf);
			objp->rst_port1 = IXDR_GET_U_LONG(buf);
			objp->rst_port2 = IXDR_GET_U_LONG(buf);
			objp->rst_flags = IXDR_GET_U_LONG(buf);
		}
	 return TRUE;
	}

	 if (!xdr_array (xdrs, (char **)&objp->rst_cmd.rst_cmd_val, (u_int *) &objp->rst_cmd.rst_cmd_len, ~0,
		sizeof (rexstring), (xdrproc_t) xdr_rexstring))
		 return FALSE;
	 if (!xdr_rexstring (xdrs, &objp->rst_host))
		 return FALSE;
	 if (!xdr_rexstring (xdrs, &objp->rst_fsname))
		 return FALSE;
	 if (!xdr_rexstring (xdrs, &objp->rst_dirwithin))
		 return FALSE;
	 if (!xdr_array (xdrs, (char **)&objp->rst_env.rst_env_val, (u_int *) &objp->rst_env.rst_env_len, ~0,
		sizeof (rexstring), (xdrproc_t) xdr_rexstring))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->rst_port0))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->rst_port1))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->rst_port2))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->rst_flags))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rex_result (XDR *xdrs, rex_result *objp)
{
	register int32_t *buf;

	 if (!xdr_int (xdrs, &objp->rlt_stat))
		 return FALSE;
	 if (!xdr_rexstring (xdrs, &objp->rlt_message))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_sgttyb (XDR *xdrs, sgttyb *objp)
{
	register int32_t *buf;

	int i;
	 if (!xdr_u_int (xdrs, &objp->four))
		 return FALSE;
	 if (!xdr_opaque (xdrs, objp->chars, 4))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->flags))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_tchars (XDR *xdrs, tchars *objp)
{
	register int32_t *buf;

	int i;
	 if (!xdr_u_int (xdrs, &objp->six))
		 return FALSE;
	 if (!xdr_opaque (xdrs, objp->chars, 6))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ltchars (XDR *xdrs, ltchars *objp)
{
	register int32_t *buf;

	int i;
	 if (!xdr_u_int (xdrs, &objp->six))
		 return FALSE;
	 if (!xdr_opaque (xdrs, objp->chars, 6))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->mode))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rex_ttysize (XDR *xdrs, rex_ttysize *objp)
{
	register int32_t *buf;

	 if (!xdr_int (xdrs, &objp->ts_lines))
		 return FALSE;
	 if (!xdr_int (xdrs, &objp->ts_cols))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rex_ttymode (XDR *xdrs, rex_ttymode *objp)
{
	register int32_t *buf;

	 if (!xdr_sgttyb (xdrs, &objp->basic))
		 return FALSE;
	 if (!xdr_tchars (xdrs, &objp->more))
		 return FALSE;
	 if (!xdr_ltchars (xdrs, &objp->yetmore))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->andmore))
		 return FALSE;
	return TRUE;
}
