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

#ifndef _ADMPROTO_H_RPCGEN
#define _ADMPROTO_H_RPCGEN

#define RPCGEN_VERSION	199506

#include <rpc/rpc.h>


enum cfsstat {
	CFS_OK = 0,
	CFSERR_PERM = 1,
	CFSERR_IFULL = 2,
	CFSERR_NOINS = 3,
	CFSERR_EXIST = 4,
	CFSERR_NODIR = 5,
	CFSERR_BADKEY = 6,
	CFSERR_BADNAME = 7
};
typedef enum cfsstat cfsstat;

enum ciphers {
	CFS_STD_DES = 0,
	CFS_THREE_DES = 1,
	CFS_IDEA = 2,
	CFS_BLOWFISH = 3,
	CFS_SKIPJACK = 4,
	CFS_MACGUFFIN = 5,
	CFS_SAFER_SK128 = 6,
	CFS_TRUE_THREE_DES = 7
};
typedef enum ciphers ciphers;
#define CFS_MAXCOMP 255
#define CFS_MAXNAME 1024

struct cfs_adm_deskey {
	long pl;
	u_char primary[8];
	u_char secondary[8];
};
typedef struct cfs_adm_deskey cfs_adm_deskey;

struct cfs_adm_3deskey {
	long pl;
	u_char primary1[8];
	u_char primary2[8];
	u_char secondary1[8];
	u_char secondary2[8];
};
typedef struct cfs_adm_3deskey cfs_adm_3deskey;

struct cfs_adm_t3deskey {
	long pl;
	u_char primary1[8];
	u_char primary2[8];
	u_char primary3[8];
	u_char secondary1[8];
	u_char secondary2[8];
	u_char secondary3[8];
};
typedef struct cfs_adm_t3deskey cfs_adm_t3deskey;

struct cfs_adm_blowkey {
	long pl;
	u_char primary[16];
	u_char secondary[16];
};
typedef struct cfs_adm_blowkey cfs_adm_blowkey;

struct cfs_adm_mcgkey {
	long pl;
	u_char primary[16];
	u_char secondary[16];
};
typedef struct cfs_adm_mcgkey cfs_adm_mcgkey;

struct cfs_adm_saferkey {
	long pl;
	u_char primary[16];
	u_char secondary[16];
};
typedef struct cfs_adm_saferkey cfs_adm_saferkey;

struct cfs_admkey {
	ciphers cipher;
	union {
		cfs_adm_deskey deskey;
		cfs_adm_3deskey des3key;
		cfs_adm_blowkey blowkey;
		cfs_adm_mcgkey mcgkey;
		cfs_adm_saferkey saferkey;
		cfs_adm_t3deskey tdes3key;
	} cfs_admkey_u;
};
typedef struct cfs_admkey cfs_admkey;

struct cfs_attachargs {
	char *dirname;
	char *name;
	cfs_admkey key;
	int uid;
	int highsec;
	bool_t anon;
	int expire;
	int idle;
	int smsize;
};
typedef struct cfs_attachargs cfs_attachargs;

struct cfs_detachargs {
	char *name;
	int uid;
};
typedef struct cfs_detachargs cfs_detachargs;

#ifdef __cplusplus
extern "C" {
#endif
bool_t xdr_cfsstat(XDR *, cfsstat *);
bool_t xdr_ciphers(XDR *, ciphers *);
bool_t xdr_cfs_adm_deskey(XDR *, cfs_adm_deskey *);
bool_t xdr_cfs_adm_3deskey(XDR *, cfs_adm_3deskey *);
bool_t xdr_cfs_adm_t3deskey(XDR *, cfs_adm_t3deskey *);
bool_t xdr_cfs_adm_blowkey(XDR *, cfs_adm_blowkey *);
bool_t xdr_cfs_adm_mcgkey(XDR *, cfs_adm_mcgkey *);
bool_t xdr_cfs_adm_saferkey(XDR *, cfs_adm_saferkey *);
bool_t xdr_cfs_admkey(XDR *, cfs_admkey *);
bool_t xdr_cfs_attachargs(XDR *, cfs_attachargs *);
bool_t xdr_cfs_detachargs(XDR *, cfs_detachargs *);
#ifdef __cplusplus
};
#endif

#define ADM_PROGRAM 0x41234567
#define ADM_VERSION 2
#define ADMPROC_NULL 0
#define ADMPROC_ATTACH 1
#define ADMPROC_DETACH 2

#ifdef __cplusplus
extern "C" {
#endif
void *admproc_null_2(void *, CLIENT *);
void *admproc_null_2_svc(void *, struct svc_req *);
cfsstat *admproc_attach_2(cfs_attachargs *, CLIENT *);
cfsstat *admproc_attach_2_svc(cfs_attachargs *, struct svc_req *);
cfsstat *admproc_detach_2(cfs_detachargs *, CLIENT *);
cfsstat *admproc_detach_2_svc(cfs_detachargs *, struct svc_req *);
#ifdef __cplusplus
};
#endif

#endif /* !_ADMPROTO_H_RPCGEN */
