/* Machine generated file -- Do NOT edit */

#include <afsconfig.h>
#include <afs/param.h>
#include <roken.h>
#include <afs/opr.h>
#ifdef AFS_PTHREAD_ENV
# include <opr/lock.h>
#endif
#include "rmtsys.h"

#include <rx/rx.h>
#include <rx/rx_null.h>
#define RMTSYS_SERVICEID 4 /* shared between client+server */
#define AFSCONF_RMTSYSPORT 7009
#define AFSCONF_RMTSYSSERVICE "afsrmtsys"
#define NIL_PATHP "__FOO__"
int RMTSYS_SetPag(struct rx_connection *z_conn,clientcred * cred,afs_int32 * newpag,afs_int32 * errornumber)
{
	struct rx_call *z_call = rx_NewCall(z_conn);
	static int z_op = 1;
	int z_result;
	XDR z_xdrs;
	xdrrx_create(&z_xdrs, z_call, XDR_ENCODE);

	/* Marshal the arguments */
	if ((!xdr_int(&z_xdrs, &z_op))
	     || (!xdr_clientcred(&z_xdrs, cred))) {
		z_result = RXGEN_CC_MARSHAL;
		goto fail;
	}

	/* Un-marshal the reply arguments */
	z_xdrs.x_op = XDR_DECODE;
	if ((!xdr_afs_int32(&z_xdrs, newpag))
	     || (!xdr_afs_int32(&z_xdrs, errornumber))) {
		z_result = RXGEN_CC_UNMARSHAL;
		goto fail;
	}

	z_result = RXGEN_SUCCESS;
fail:
	z_result = rx_EndCall(z_call, z_result);
	return z_result;
}

int RMTSYS_Pioctl(struct rx_connection *z_conn,clientcred * cred,const char * path,afs_int32 cmd,afs_int32 follow,rmtbulk * InData,rmtbulk * OutData,afs_int32 * errornumber)
{
	struct rx_call *z_call = rx_NewCall(z_conn);
	static int z_op = 2;
	int z_result;
	XDR z_xdrs;
	xdrrx_create(&z_xdrs, z_call, XDR_ENCODE);

	/* Marshal the arguments */
	if ((!xdr_int(&z_xdrs, &z_op))
	     || (!xdr_clientcred(&z_xdrs, cred))
	     || (!xdr_string(&z_xdrs, (char **) &path, 4096))
	     || (!xdr_afs_int32(&z_xdrs, &cmd))
	     || (!xdr_afs_int32(&z_xdrs, &follow))
	     || (!xdr_rmtbulk(&z_xdrs, InData))
	     || (!xdr_rmtbulk(&z_xdrs, OutData))) {
		z_result = RXGEN_CC_MARSHAL;
		goto fail;
	}

	/* Un-marshal the reply arguments */
	z_xdrs.x_op = XDR_DECODE;
	if ((!xdr_rmtbulk(&z_xdrs, OutData))
	     || (!xdr_afs_int32(&z_xdrs, errornumber))) {
		z_result = RXGEN_CC_UNMARSHAL;
		goto fail;
	}

	z_result = RXGEN_SUCCESS;
fail:
	z_result = rx_EndCall(z_call, z_result);
	return z_result;
}

