/*
	$Id: mount3-spec 419 2006-11-10 18:41:55Z ajw $

	XDR Specification for the MOUNT V3 protocol.
	See RFC 1813 for more details.

	StrongEd$Mode=C
*/

const MOUNT_RPC_PROGRAM = 100005;
const MOUNT_RPC_VERSION = 3;


const MNTPATHLEN = 1024;  /* Maximum bytes in a path name */
const MNTNAMLEN  = 255;   /* Maximum bytes in a name */
const FHSIZE3    = 64;    /* Maximum bytes in a V3 file handle */

struct nfs_fhm3 {
   opaque       data<FHSIZE3>;
};

/*typedef opaque fhandle3<FHSIZE3>;*/
typedef opaque dirpath3<MNTPATHLEN>;
typedef opaque name3<MNTNAMLEN>;

enum mountstat3 {
   MNT3_OK = 0,                 /* no error */
   MNT3ERR_PERM = 1,            /* Not owner */
   MNT3ERR_NOENT = 2,           /* No such file or directory */
   MNT3ERR_IO = 5,              /* I/O error */
   MNT3ERR_ACCES = 13,          /* Permission denied */
   MNT3ERR_NOTDIR = 20,         /* Not a directory */
   MNT3ERR_INVAL = 22,          /* Invalid argument */
   MNT3ERR_NAMETOOLONG = 63,    /* Filename too long */
   MNT3ERR_NOTSUPP = 10004,     /* Operation not supported */
   MNT3ERR_SERVERFAULT = 10006  /* A failure on the server */
};


void MOUNTPROC3_NULL(void) = 0;

struct mountres3_ok {
        nfs_fhm3 fhandle;
        unsigned auth_flavours<>;
};

union mountres3 switch (mountstat3 status) {
case MNT3_OK:
     mountres3_ok mountinfo;
default:
     void;
};

struct mountargs3 {
        dirpath3 dirpath;
};

mountres3 MOUNTPROC3_MNT(mountargs3) = 1;


struct *mountlist3 {
        name3 hostname;
        dirpath3 directory;
        mountlist3 *next;
};

struct mountlist32 {
        mountlist3 *list;
};

mountlist32 MOUNTPROC3_DUMP(void) = 2;


void MOUNTPROC3_UMNT(mountargs3) = 3;

void MOUNTPROC3_UMNTALL(void) = 4;


struct *groups3 {
        name3 grname;
        groups3 *next;
};

struct *exportlist3 {
        dirpath3 filesys;
        groups3 *groups;
        exportlist3 *next;
};

struct exportlist32 {
	exportlist3 *list;
};

exportlist32 MOUNTPROC3_EXPORT(void) = 5;



