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

#ifndef	_RXGEN_RMTSYS_
#define	_RXGEN_RMTSYS_

#ifdef	KERNEL
/* The following 'ifndefs' are not a good solution to the vendor's omission of surrounding all system includes with 'ifndef's since it requires that this file is included after the system includes...*/
#include <afsconfig.h>
#include "afs/param.h"
#ifdef	UKERNEL
#include "afs/sysincludes.h"
#include "rx/xdr.h"
#include "rx/rx.h"
#else	/* UKERNEL */
#include "h/types.h"
#ifndef	SOCK_DGRAM  /* XXXXX */
#include "h/socket.h"
#endif
#ifndef	DTYPE_SOCKET  /* XXXXX */
#ifndef AFS_LINUX_ENV
#include "h/file.h"
#endif
#endif
#ifndef	S_IFMT  /* XXXXX */
#include "h/stat.h"
#endif
#if defined (AFS_OBSD_ENV) && !defined (MLEN)
#include "sys/mbuf.h"
#endif
#ifndef	IPPROTO_UDP /* XXXXX */
#include "netinet/in.h"
#endif
#ifndef	DST_USA  /* XXXXX */
#include "h/time.h"
#endif
#ifndef	XDR_GETLONG /* XXXXX */
#ifdef AFS_LINUX_ENV
#ifndef quad_t
#define quad_t __quad_t
#define u_quad_t __u_quad_t
#endif
#endif
#include "rx/xdr.h"
#endif /* XDR_GETLONG */
#endif   /* UKERNEL */
#include "afs/rxgen_consts.h"
#include "afs_osi.h"
#include "rx/rx.h"
#else	/* KERNEL */
#include <afs/param.h>
#include <afs/stds.h>
#include <sys/types.h>
#include <rx/xdr.h>
#include <rx/rx.h>
#include <afs/rxgen_consts.h>
#endif	/* KERNEL */

#ifdef AFS_NT40_ENV
#ifndef AFS_RXGEN_EXPORT
#define AFS_RXGEN_EXPORT __declspec(dllimport)
#endif /* AFS_RXGEN_EXPORT */
#else /* AFS_NT40_ENV */
#define AFS_RXGEN_EXPORT
#endif /* AFS_NT40_ENV */

#define RMTSYS_STATINDEX 10
#define RMTSYS_MAXPATHLEN 4096
#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__"

struct clientcred {
	afs_int32 uid;
	afs_int32 group0;
	afs_int32 group1;
};
typedef struct clientcred clientcred;
bool_t xdr_clientcred(XDR *xdrs, clientcred *objp);

#define MAXBUFFERLEN 16384

typedef struct rmtbulk {
	u_int rmtbulk_len;
	char *rmtbulk_val;
} rmtbulk;
bool_t xdr_rmtbulk(XDR *xdrs, rmtbulk *objp);


extern int RMTSYS_SetPag(
	/*IN */ struct rx_connection *z_conn,
	/*IN 0*/ clientcred * cred,
	/*OUT*/ afs_int32 * newpag,
	/*OUT*/ afs_int32 * errornumber);

extern afs_int32 SRMTSYS_SetPag(
	/*IN */ struct rx_call *z_call,
	/*IN 3*/ clientcred * cred,
	/*OUT*/ afs_int32 * newpag,
	/*OUT*/ afs_int32 * errornumber);

extern int RMTSYS_Pioctl(
	/*IN */ struct rx_connection *z_conn,
	/*IN 0*/ clientcred * cred,
	/*IN 0*/ const char * path,
	/*IN 0*/ afs_int32 cmd,
	/*IN 0*/ afs_int32 follow,
	/*IN 0*/ rmtbulk * InData,
	/*I/O*/ rmtbulk * OutData,
	/*OUT*/ afs_int32 * errornumber);

extern afs_int32 SRMTSYS_Pioctl(
	/*IN */ struct rx_call *z_call,
	/*IN 3*/ clientcred * cred,
	/*IN 3*/ char * path,
	/*IN 3*/ afs_int32 cmd,
	/*IN 3*/ afs_int32 follow,
	/*IN 3*/ rmtbulk * InData,
	/*I/O*/ rmtbulk * OutData,
	/*OUT*/ afs_int32 * errornumber);

extern int RMTSYS_ExecuteRequest(struct rx_call *);
extern char * RMTSYS_TranslateOpCode(int op);
extern struct RMTSYS_stats *RMTSYS_OpCodeStats(int op);

/* Opcode-related useful stats for package: RMTSYS_ */
#define RMTSYS_LOWEST_OPCODE   1
#define RMTSYS_HIGHEST_OPCODE     2
#define RMTSYS_NUMBER_OPCODES     2

#define opcode_RMTSYS_SetPag 	((afs_uint64)((10LL << 32) + RMTSYS_OpCodeIndex(1)))
#define opcode_RMTSYS_Pioctl 	((afs_uint64)((10LL << 32) + RMTSYS_OpCodeIndex(2)))
#endif	/* _RXGEN_RMTSYS_ */
