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

#include "config.h"
#include "ndmp2.h"
#ifndef NDMOS_OPTION_NO_NDMP2
#define ndmp2_u_quad unsigned long long
extern bool_t xdr_ndmp2_u_quad();

bool_t
xdr__ndmp2_u_quad (XDR *xdrs, _ndmp2_u_quad *objp)
{
	register int32_t *buf;

	 if (!xdr_u_long (xdrs, &objp->high))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->low))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_pval (XDR *xdrs, ndmp2_pval *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, &objp->name, ~0))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->value, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_scsi_device (XDR *xdrs, ndmp2_scsi_device *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, &objp->name, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_device (XDR *xdrs, ndmp2_tape_device *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, &objp->name, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_error (XDR *xdrs, ndmp2_error *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_header_message_type (XDR *xdrs, ndmp2_header_message_type *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_message (XDR *xdrs, ndmp2_message *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_header (XDR *xdrs, ndmp2_header *objp)
{
	register int32_t *buf;

	 if (!xdr_u_long (xdrs, &objp->sequence))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->time_stamp))
		 return FALSE;
	 if (!xdr_ndmp2_header_message_type (xdrs, &objp->message_type))
		 return FALSE;
	 if (!xdr_ndmp2_message (xdrs, &objp->message))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->reply_sequence))
		 return FALSE;
	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_connect_open_request (XDR *xdrs, ndmp2_connect_open_request *objp)
{
	register int32_t *buf;

	 if (!xdr_u_short (xdrs, &objp->protocol_version))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_connect_open_reply (XDR *xdrs, ndmp2_connect_open_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_auth_type (XDR *xdrs, ndmp2_auth_type *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_auth_text (XDR *xdrs, ndmp2_auth_text *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, &objp->auth_id, ~0))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->auth_password, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_auth_md5 (XDR *xdrs, ndmp2_auth_md5 *objp)
{
	register int32_t *buf;

	int i;
	 if (!xdr_string (xdrs, &objp->auth_id, ~0))
		 return FALSE;
	 if (!xdr_opaque (xdrs, objp->auth_digest, 16))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_auth_data (XDR *xdrs, ndmp2_auth_data *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_auth_type (xdrs, &objp->auth_type))
		 return FALSE;
	switch (objp->auth_type) {
	case NDMP2_AUTH_NONE:
		break;
	case NDMP2_AUTH_TEXT:
		 if (!xdr_ndmp2_auth_text (xdrs, &objp->ndmp2_auth_data_u.auth_text))
			 return FALSE;
		break;
	case NDMP2_AUTH_MD5:
		 if (!xdr_ndmp2_auth_md5 (xdrs, &objp->ndmp2_auth_data_u.auth_md5))
			 return FALSE;
		break;
	default:
		return FALSE;
	}
	return TRUE;
}

bool_t
xdr_ndmp2_connect_client_auth_request (XDR *xdrs, ndmp2_connect_client_auth_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_auth_data (xdrs, &objp->auth_data))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_connect_client_auth_reply (XDR *xdrs, ndmp2_connect_client_auth_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_auth_attr (XDR *xdrs, ndmp2_auth_attr *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_auth_type (xdrs, &objp->auth_type))
		 return FALSE;
	switch (objp->auth_type) {
	case NDMP2_AUTH_NONE:
		break;
	case NDMP2_AUTH_TEXT:
		break;
	case NDMP2_AUTH_MD5:
		 if (!xdr_opaque (xdrs, objp->ndmp2_auth_attr_u.challenge, 64))
			 return FALSE;
		break;
	default:
		return FALSE;
	}
	return TRUE;
}

bool_t
xdr_ndmp2_connect_server_auth_request (XDR *xdrs, ndmp2_connect_server_auth_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_auth_attr (xdrs, &objp->client_attr))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_connect_server_auth_reply (XDR *xdrs, ndmp2_connect_server_auth_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_ndmp2_auth_data (xdrs, &objp->auth_result))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_config_get_host_info_reply (XDR *xdrs, ndmp2_config_get_host_info_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->hostname, ~0))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->os_type, ~0))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->os_vers, ~0))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->hostid, ~0))
		 return FALSE;
	 if (!xdr_array (xdrs, (char **)&objp->auth_type.auth_type_val, (u_int *) &objp->auth_type.auth_type_len, ~0,
		sizeof (ndmp2_auth_type), (xdrproc_t) xdr_ndmp2_auth_type))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_config_get_butype_attr_request (XDR *xdrs, ndmp2_config_get_butype_attr_request *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, &objp->name, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_config_get_butype_attr_reply (XDR *xdrs, ndmp2_config_get_butype_attr_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->attrs))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_addr_type (XDR *xdrs, ndmp2_mover_addr_type *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_config_get_mover_type_reply (XDR *xdrs, ndmp2_config_get_mover_type_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_array (xdrs, (char **)&objp->methods.methods_val, (u_int *) &objp->methods.methods_len, ~0,
		sizeof (ndmp2_mover_addr_type), (xdrproc_t) xdr_ndmp2_mover_addr_type))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_config_get_auth_attr_request (XDR *xdrs, ndmp2_config_get_auth_attr_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_auth_type (xdrs, &objp->auth_type))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_config_get_auth_attr_reply (XDR *xdrs, ndmp2_config_get_auth_attr_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_ndmp2_auth_attr (xdrs, &objp->server_attr))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_scsi_open_request (XDR *xdrs, ndmp2_scsi_open_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_scsi_device (xdrs, &objp->device))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_scsi_open_reply (XDR *xdrs, ndmp2_scsi_open_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_scsi_close_reply (XDR *xdrs, ndmp2_scsi_close_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_scsi_get_state_reply (XDR *xdrs, ndmp2_scsi_get_state_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_short (xdrs, &objp->target_controller))
		 return FALSE;
	 if (!xdr_short (xdrs, &objp->target_id))
		 return FALSE;
	 if (!xdr_short (xdrs, &objp->target_lun))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_scsi_set_target_request (XDR *xdrs, ndmp2_scsi_set_target_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_scsi_device (xdrs, &objp->device))
		 return FALSE;
	 if (!xdr_u_short (xdrs, &objp->target_controller))
		 return FALSE;
	 if (!xdr_u_short (xdrs, &objp->target_id))
		 return FALSE;
	 if (!xdr_u_short (xdrs, &objp->target_lun))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_scsi_set_target_reply (XDR *xdrs, ndmp2_scsi_set_target_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_scsi_reset_device_reply (XDR *xdrs, ndmp2_scsi_reset_device_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_scsi_reset_bus_reply (XDR *xdrs, ndmp2_scsi_reset_bus_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_execute_cdb_request (XDR *xdrs, ndmp2_execute_cdb_request *objp)
{
	register int32_t *buf;


	if (xdrs->x_op == XDR_ENCODE) {
		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_long (xdrs, &objp->flags))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->timeout))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->datain_len))
				 return FALSE;

		} else {
		IXDR_PUT_U_LONG(buf, objp->flags);
		IXDR_PUT_U_LONG(buf, objp->timeout);
		IXDR_PUT_U_LONG(buf, objp->datain_len);
		}
		 if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0))
			 return FALSE;
		 if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0))
			 return FALSE;
		return TRUE;
	} else if (xdrs->x_op == XDR_DECODE) {
		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_long (xdrs, &objp->flags))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->timeout))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->datain_len))
				 return FALSE;

		} else {
		objp->flags = IXDR_GET_U_LONG(buf);
		objp->timeout = IXDR_GET_U_LONG(buf);
		objp->datain_len = IXDR_GET_U_LONG(buf);
		}
		 if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0))
			 return FALSE;
		 if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0))
			 return FALSE;
	 return TRUE;
	}

	 if (!xdr_u_long (xdrs, &objp->flags))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->timeout))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->datain_len))
		 return FALSE;
	 if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0))
		 return FALSE;
	 if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_execute_cdb_reply (XDR *xdrs, ndmp2_execute_cdb_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_u_char (xdrs, &objp->status))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->dataout_len))
		 return FALSE;
	 if (!xdr_bytes (xdrs, (char **)&objp->datain.datain_val, (u_int *) &objp->datain.datain_len, ~0))
		 return FALSE;
	 if (!xdr_bytes (xdrs, (char **)&objp->ext_sense.ext_sense_val, (u_int *) &objp->ext_sense.ext_sense_len, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_scsi_execute_cdb_request (XDR *xdrs, ndmp2_scsi_execute_cdb_request *objp)
{
	register int32_t *buf;

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

bool_t
xdr_ndmp2_scsi_execute_cdb_reply (XDR *xdrs, ndmp2_scsi_execute_cdb_reply *objp)
{
	register int32_t *buf;

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

bool_t
xdr_ndmp2_tape_open_mode (XDR *xdrs, ndmp2_tape_open_mode *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_open_request (XDR *xdrs, ndmp2_tape_open_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_tape_device (xdrs, &objp->device))
		 return FALSE;
	 if (!xdr_ndmp2_tape_open_mode (xdrs, &objp->mode))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_open_reply (XDR *xdrs, ndmp2_tape_open_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_close_reply (XDR *xdrs, ndmp2_tape_close_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_get_state_reply (XDR *xdrs, ndmp2_tape_get_state_reply *objp)
{
	register int32_t *buf;


	if (xdrs->x_op == XDR_ENCODE) {
		 if (!xdr_ndmp2_error (xdrs, &objp->error))
			 return FALSE;
		buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_long (xdrs, &objp->flags))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->file_num))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->soft_errors))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->block_size))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->blockno))
				 return FALSE;

		} else {
		IXDR_PUT_U_LONG(buf, objp->flags);
		IXDR_PUT_U_LONG(buf, objp->file_num);
		IXDR_PUT_U_LONG(buf, objp->soft_errors);
		IXDR_PUT_U_LONG(buf, objp->block_size);
		IXDR_PUT_U_LONG(buf, objp->blockno);
		}
		 if (!xdr_ndmp2_u_quad (xdrs, &objp->total_space))
			 return FALSE;
		 if (!xdr_ndmp2_u_quad (xdrs, &objp->space_remain))
			 return FALSE;
		return TRUE;
	} else if (xdrs->x_op == XDR_DECODE) {
		 if (!xdr_ndmp2_error (xdrs, &objp->error))
			 return FALSE;
		buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_long (xdrs, &objp->flags))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->file_num))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->soft_errors))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->block_size))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->blockno))
				 return FALSE;

		} else {
		objp->flags = IXDR_GET_U_LONG(buf);
		objp->file_num = IXDR_GET_U_LONG(buf);
		objp->soft_errors = IXDR_GET_U_LONG(buf);
		objp->block_size = IXDR_GET_U_LONG(buf);
		objp->blockno = IXDR_GET_U_LONG(buf);
		}
		 if (!xdr_ndmp2_u_quad (xdrs, &objp->total_space))
			 return FALSE;
		 if (!xdr_ndmp2_u_quad (xdrs, &objp->space_remain))
			 return FALSE;
	 return TRUE;
	}

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->flags))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->file_num))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->soft_errors))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->block_size))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->blockno))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->total_space))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->space_remain))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_mtio_op (XDR *xdrs, ndmp2_tape_mtio_op *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_mtio_request (XDR *xdrs, ndmp2_tape_mtio_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_tape_mtio_op (xdrs, &objp->tape_op))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->count))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_mtio_reply (XDR *xdrs, ndmp2_tape_mtio_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->resid_count))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_write_request (XDR *xdrs, ndmp2_tape_write_request *objp)
{
	register int32_t *buf;

	 if (!xdr_bytes (xdrs, (char **)&objp->data_out.data_out_val, (u_int *) &objp->data_out.data_out_len, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_write_reply (XDR *xdrs, ndmp2_tape_write_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->count))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_read_request (XDR *xdrs, ndmp2_tape_read_request *objp)
{
	register int32_t *buf;

	 if (!xdr_u_long (xdrs, &objp->count))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_read_reply (XDR *xdrs, ndmp2_tape_read_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_bytes (xdrs, (char **)&objp->data_in.data_in_val, (u_int *) &objp->data_in.data_in_len, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_tape_execute_cdb_request (XDR *xdrs, ndmp2_tape_execute_cdb_request *objp)
{
	register int32_t *buf;

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

bool_t
xdr_ndmp2_tape_execute_cdb_reply (XDR *xdrs, ndmp2_tape_execute_cdb_reply *objp)
{
	register int32_t *buf;

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

bool_t
xdr_ndmp2_mover_state (XDR *xdrs, ndmp2_mover_state *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_pause_reason (XDR *xdrs, ndmp2_mover_pause_reason *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_halt_reason (XDR *xdrs, ndmp2_mover_halt_reason *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_get_state_reply (XDR *xdrs, ndmp2_mover_get_state_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_ndmp2_mover_state (xdrs, &objp->state))
		 return FALSE;
	 if (!xdr_ndmp2_mover_pause_reason (xdrs, &objp->pause_reason))
		 return FALSE;
	 if (!xdr_ndmp2_mover_halt_reason (xdrs, &objp->halt_reason))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->record_size))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->record_num))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->data_written))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->seek_position))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->bytes_left_to_read))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->window_offset))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->window_length))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_mode (XDR *xdrs, ndmp2_mover_mode *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_tcp_addr (XDR *xdrs, ndmp2_mover_tcp_addr *objp)
{
	register int32_t *buf;

	 if (!xdr_u_long (xdrs, &objp->ip_addr))
		 return FALSE;
	 if (!xdr_u_short (xdrs, &objp->port))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_addr (XDR *xdrs, ndmp2_mover_addr *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_mover_addr_type (xdrs, &objp->addr_type))
		 return FALSE;
	switch (objp->addr_type) {
	case NDMP2_ADDR_LOCAL:
		break;
	case NDMP2_ADDR_TCP:
		 if (!xdr_ndmp2_mover_tcp_addr (xdrs, &objp->ndmp2_mover_addr_u.addr))
			 return FALSE;
		break;
	default:
		return FALSE;
	}
	return TRUE;
}

bool_t
xdr_ndmp2_mover_listen_request (XDR *xdrs, ndmp2_mover_listen_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_mover_mode (xdrs, &objp->mode))
		 return FALSE;
	 if (!xdr_ndmp2_mover_addr_type (xdrs, &objp->addr_type))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_listen_reply (XDR *xdrs, ndmp2_mover_listen_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_ndmp2_mover_addr (xdrs, &objp->mover))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_set_record_size_request (XDR *xdrs, ndmp2_mover_set_record_size_request *objp)
{
	register int32_t *buf;

	 if (!xdr_u_long (xdrs, &objp->len))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_set_record_size_reply (XDR *xdrs, ndmp2_mover_set_record_size_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_set_window_request (XDR *xdrs, ndmp2_mover_set_window_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_u_quad (xdrs, &objp->offset))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->length))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_set_window_reply (XDR *xdrs, ndmp2_mover_set_window_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_continue_reply (XDR *xdrs, ndmp2_mover_continue_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_abort_reply (XDR *xdrs, ndmp2_mover_abort_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_stop_reply (XDR *xdrs, ndmp2_mover_stop_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_read_request (XDR *xdrs, ndmp2_mover_read_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_u_quad (xdrs, &objp->offset))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->length))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_read_reply (XDR *xdrs, ndmp2_mover_read_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_mover_close_reply (XDR *xdrs, ndmp2_mover_close_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_operation (XDR *xdrs, ndmp2_data_operation *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_state (XDR *xdrs, ndmp2_data_state *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_halt_reason (XDR *xdrs, ndmp2_data_halt_reason *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_get_state_reply (XDR *xdrs, ndmp2_data_get_state_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_ndmp2_data_operation (xdrs, &objp->operation))
		 return FALSE;
	 if (!xdr_ndmp2_data_state (xdrs, &objp->state))
		 return FALSE;
	 if (!xdr_ndmp2_data_halt_reason (xdrs, &objp->halt_reason))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->bytes_processed))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->est_bytes_remain))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->est_time_remain))
		 return FALSE;
	 if (!xdr_ndmp2_mover_addr (xdrs, &objp->mover))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->read_offset))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->read_length))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_start_backup_request (XDR *xdrs, ndmp2_data_start_backup_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_mover_addr (xdrs, &objp->mover))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->bu_type, ~0))
		 return FALSE;
	 if (!xdr_array (xdrs, (char **)&objp->env.env_val, (u_int *) &objp->env.env_len, ~0,
		sizeof (ndmp2_pval), (xdrproc_t) xdr_ndmp2_pval))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_start_backup_reply (XDR *xdrs, ndmp2_data_start_backup_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_name (XDR *xdrs, ndmp2_name *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, &objp->name, ~0))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->dest, ~0))
		 return FALSE;
	 if (!xdr_u_short (xdrs, &objp->ssid))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->fh_info))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_start_recover_request (XDR *xdrs, ndmp2_data_start_recover_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_mover_addr (xdrs, &objp->mover))
		 return FALSE;
	 if (!xdr_array (xdrs, (char **)&objp->env.env_val, (u_int *) &objp->env.env_len, ~0,
		sizeof (ndmp2_pval), (xdrproc_t) xdr_ndmp2_pval))
		 return FALSE;
	 if (!xdr_array (xdrs, (char **)&objp->nlist.nlist_val, (u_int *) &objp->nlist.nlist_len, ~0,
		sizeof (ndmp2_name), (xdrproc_t) xdr_ndmp2_name))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->bu_type, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_start_recover_reply (XDR *xdrs, ndmp2_data_start_recover_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_start_recover_filehist_request (XDR *xdrs, ndmp2_data_start_recover_filehist_request *objp)
{
	register int32_t *buf;

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

bool_t
xdr_ndmp2_data_start_recover_filehist_reply (XDR *xdrs, ndmp2_data_start_recover_filehist_reply *objp)
{
	register int32_t *buf;

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

bool_t
xdr_ndmp2_data_abort_reply (XDR *xdrs, ndmp2_data_abort_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_stop_reply (XDR *xdrs, ndmp2_data_stop_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_data_get_env_reply (XDR *xdrs, ndmp2_data_get_env_reply *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	 if (!xdr_array (xdrs, (char **)&objp->env.env_val, (u_int *) &objp->env.env_len, ~0,
		sizeof (ndmp2_pval), (xdrproc_t) xdr_ndmp2_pval))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_notify_data_halted_request (XDR *xdrs, ndmp2_notify_data_halted_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_data_halt_reason (xdrs, &objp->reason))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->text_reason, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_connect_reason (XDR *xdrs, ndmp2_connect_reason *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_notify_connected_request (XDR *xdrs, ndmp2_notify_connected_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_connect_reason (xdrs, &objp->reason))
		 return FALSE;
	 if (!xdr_u_short (xdrs, &objp->protocol_version))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->text_reason, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_notify_mover_paused_request (XDR *xdrs, ndmp2_notify_mover_paused_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_mover_pause_reason (xdrs, &objp->reason))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->seek_position))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_notify_mover_halted_request (XDR *xdrs, ndmp2_notify_mover_halted_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_mover_halt_reason (xdrs, &objp->reason))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->text_reason, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_notify_data_read_request (XDR *xdrs, ndmp2_notify_data_read_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_u_quad (xdrs, &objp->offset))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->length))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_log_log_request (XDR *xdrs, ndmp2_log_log_request *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, &objp->entry, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_debug_level (XDR *xdrs, ndmp2_debug_level *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_log_debug_request (XDR *xdrs, ndmp2_log_debug_request *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_debug_level (xdrs, &objp->level))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->message, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_log_file_request (XDR *xdrs, ndmp2_log_file_request *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, &objp->name, ~0))
		 return FALSE;
	 if (!xdr_u_short (xdrs, &objp->ssid))
		 return FALSE;
	 if (!xdr_ndmp2_error (xdrs, &objp->error))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_unix_path (XDR *xdrs, ndmp2_unix_path *objp)
{
	register int32_t *buf;

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

bool_t
xdr_ndmp2_unix_file_type (XDR *xdrs, ndmp2_unix_file_type *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_unix_file_stat (XDR *xdrs, ndmp2_unix_file_stat *objp)
{
	register int32_t *buf;


	if (xdrs->x_op == XDR_ENCODE) {
		 if (!xdr_ndmp2_unix_file_type (xdrs, &objp->ftype))
			 return FALSE;
		buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_long (xdrs, &objp->mtime))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->atime))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->ctime))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->uid))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->gid))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->mode))
				 return FALSE;

		} else {
		IXDR_PUT_U_LONG(buf, objp->mtime);
		IXDR_PUT_U_LONG(buf, objp->atime);
		IXDR_PUT_U_LONG(buf, objp->ctime);
		IXDR_PUT_U_LONG(buf, objp->uid);
		IXDR_PUT_U_LONG(buf, objp->gid);
		IXDR_PUT_U_LONG(buf, objp->mode);
		}
		 if (!xdr_ndmp2_u_quad (xdrs, &objp->size))
			 return FALSE;
		 if (!xdr_ndmp2_u_quad (xdrs, &objp->fh_info))
			 return FALSE;
		return TRUE;
	} else if (xdrs->x_op == XDR_DECODE) {
		 if (!xdr_ndmp2_unix_file_type (xdrs, &objp->ftype))
			 return FALSE;
		buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_long (xdrs, &objp->mtime))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->atime))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->ctime))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->uid))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->gid))
				 return FALSE;
			 if (!xdr_u_long (xdrs, &objp->mode))
				 return FALSE;

		} else {
		objp->mtime = IXDR_GET_U_LONG(buf);
		objp->atime = IXDR_GET_U_LONG(buf);
		objp->ctime = IXDR_GET_U_LONG(buf);
		objp->uid = IXDR_GET_U_LONG(buf);
		objp->gid = IXDR_GET_U_LONG(buf);
		objp->mode = IXDR_GET_U_LONG(buf);
		}
		 if (!xdr_ndmp2_u_quad (xdrs, &objp->size))
			 return FALSE;
		 if (!xdr_ndmp2_u_quad (xdrs, &objp->fh_info))
			 return FALSE;
	 return TRUE;
	}

	 if (!xdr_ndmp2_unix_file_type (xdrs, &objp->ftype))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->mtime))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->atime))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->ctime))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->uid))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->gid))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->mode))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->size))
		 return FALSE;
	 if (!xdr_ndmp2_u_quad (xdrs, &objp->fh_info))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_fh_unix_path (XDR *xdrs, ndmp2_fh_unix_path *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_unix_path (xdrs, &objp->name))
		 return FALSE;
	 if (!xdr_ndmp2_unix_file_stat (xdrs, &objp->fstat))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_fh_add_unix_path_request (XDR *xdrs, ndmp2_fh_add_unix_path_request *objp)
{
	register int32_t *buf;

	 if (!xdr_array (xdrs, (char **)&objp->paths.paths_val, (u_int *) &objp->paths.paths_len, ~0,
		sizeof (ndmp2_fh_unix_path), (xdrproc_t) xdr_ndmp2_fh_unix_path))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_fh_unix_dir (XDR *xdrs, ndmp2_fh_unix_dir *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_unix_path (xdrs, &objp->name))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->node))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->parent))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_fh_add_unix_dir_request (XDR *xdrs, ndmp2_fh_add_unix_dir_request *objp)
{
	register int32_t *buf;

	 if (!xdr_array (xdrs, (char **)&objp->dirs.dirs_val, (u_int *) &objp->dirs.dirs_len, ~0,
		sizeof (ndmp2_fh_unix_dir), (xdrproc_t) xdr_ndmp2_fh_unix_dir))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_fh_unix_node (XDR *xdrs, ndmp2_fh_unix_node *objp)
{
	register int32_t *buf;

	 if (!xdr_ndmp2_unix_file_stat (xdrs, &objp->fstat))
		 return FALSE;
	 if (!xdr_u_long (xdrs, &objp->node))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_ndmp2_fh_add_unix_node_request (XDR *xdrs, ndmp2_fh_add_unix_node_request *objp)
{
	register int32_t *buf;

	 if (!xdr_array (xdrs, (char **)&objp->nodes.nodes_val, (u_int *) &objp->nodes.nodes_len, ~0,
		sizeof (ndmp2_fh_unix_node), (xdrproc_t) xdr_ndmp2_fh_unix_node))
		 return FALSE;
	return TRUE;
}
#endif /* !NDMOS_OPTION_NO_NDMP2 */
