root/include/linux/nfs.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_NFS_H
   2 #define _LINUX_NFS_H
   3 
   4 #define RPC_VERSION 2
   5 
   6 #define NFS_PORT 2049
   7 #define NFS_MAXDATA 8192
   8 #define NFS_MAXPATHLEN 1024
   9 #define NFS_MAXNAMLEN 255
  10 #define NFS_MAXGROUPS 16
  11 #define NFS_FHSIZE 32
  12 #define NFS_COOKIESIZE 4
  13 #define NFS_FIFO_DEV -1
  14 #define NFSMODE_FMT 0170000
  15 #define NFSMODE_DIR 0040000
  16 #define NFSMODE_CHR 0020000
  17 #define NFSMODE_BLK 0060000
  18 #define NFSMODE_REG 0100000
  19 #define NFSMODE_LNK 0120000
  20 #define NFSMODE_SOCK 0140000
  21 #define NFSMODE_FIFO 0010000
  22 
  23 enum rpc_auth_flavor {
  24         RPC_AUTH_NULL = 0,
  25         RPC_AUTH_UNIX = 1,
  26         RPC_AUTH_SHORT = 2,
  27 };
  28 
  29 enum rpc_msg_type {
  30         RPC_CALL = 0,
  31         RPC_REPLY = 1,
  32 };
  33 
  34 enum rpc_reply_stat {
  35         RPC_MSG_ACCEPTED = 0,
  36         RPC_MSG_DENIED,
  37 };
  38 
  39 enum rpc_accept_stat {
  40         RPC_SUCCESS = 0,
  41         RPC_PROG_UNAVAIL = 1,
  42         RPC_PROG_MISMATCH = 2,
  43         RPC_PROC_UNAVAIL = 3,
  44         RPC_GARBAGE_ARGS = 4,
  45 };
  46 
  47 enum rpc_reject_stat {
  48         RPC_MISMATCH = 0,
  49         RPC_AUTH_ERROR = 1,
  50 };
  51 
  52 enum rpc_auth_stat {
  53         RPC_AUTH_BADCRED = 1,
  54         RPC_AUTH_REJECTEDCRED = 2,
  55         RPC_AUTH_BADVERF = 3,
  56         RPC_AUTH_REJECTEDVERF = 4,
  57         RPC_AUTH_TOOWEAK = 5,
  58 };
  59         
  60 enum nfs_stat {
  61         NFS_OK = 0,
  62         NFSERR_PERM = 1,
  63         NFSERR_NOENT = 2,
  64         NFSERR_IO = 5,
  65         NFSERR_NXIO = 6,
  66         NFSERR_ACCES = 13,
  67         NFSERR_EXIST = 17,
  68         NFSERR_NODEV = 19,
  69         NFSERR_NOTDIR = 20,
  70         NFSERR_ISDIR = 21,
  71         NFSERR_FBIG = 27,
  72         NFSERR_NOSPC = 28,
  73         NFSERR_ROFS = 30,
  74         NFSERR_NAMETOOLONG = 63,
  75         NFSERR_NOTEMPTY = 66,
  76         NFSERR_DQUOT = 69,
  77         NFSERR_STALE = 70,
  78         NFSERR_WFLUSH = 99,
  79 };
  80 
  81 enum nfs_ftype {
  82         NFNON = 0,
  83         NFREG = 1,
  84         NFDIR = 2,
  85         NFBLK = 3,
  86         NFCHR = 4,
  87         NFLNK = 5,
  88         NFSOCK = 6,
  89         NFBAD = 7,
  90         NFFIFO = 8,
  91 };
  92 
  93 #define NFS_PROGRAM             100003
  94 #define NFS_VERSION             2
  95 #define NFSPROC_NULL            0
  96 #define NFSPROC_GETATTR         1
  97 #define NFSPROC_SETATTR         2
  98 #define NFSPROC_ROOT            3
  99 #define NFSPROC_LOOKUP          4
 100 #define NFSPROC_READLINK        5
 101 #define NFSPROC_READ            6
 102 #define NFSPROC_WRITECACHE      7
 103 #define NFSPROC_WRITE           8
 104 #define NFSPROC_CREATE          9
 105 #define NFSPROC_REMOVE          10
 106 #define NFSPROC_RENAME          11
 107 #define NFSPROC_LINK            12
 108 #define NFSPROC_SYMLINK         13
 109 #define NFSPROC_MKDIR           14
 110 #define NFSPROC_RMDIR           15
 111 #define NFSPROC_READDIR         16
 112 #define NFSPROC_STATFS          17
 113 
 114 struct nfs_fh {
 115         char data[NFS_FHSIZE];
 116 };
 117 
 118 struct nfs_time {
 119         u_int seconds;
 120         u_int useconds;
 121 };
 122 
 123 struct nfs_fattr {
 124         enum nfs_ftype type;
 125         u_int mode;
 126         u_int nlink;
 127         u_int uid;
 128         u_int gid;
 129         u_int size;
 130         u_int blocksize;
 131         u_int rdev;
 132         u_int blocks;
 133         u_int fsid;
 134         u_int fileid;
 135         struct nfs_time atime;
 136         struct nfs_time mtime;
 137         struct nfs_time ctime;
 138 };
 139 
 140 struct nfs_sattr {
 141         u_int mode;
 142         u_int uid;
 143         u_int gid;
 144         u_int size;
 145         struct nfs_time atime;
 146         struct nfs_time mtime;
 147 };
 148 
 149 struct nfs_entry {
 150         u_int fileid;
 151         char *name;
 152         int cookie;
 153         int eof;
 154 };
 155 
 156 struct nfs_fsinfo {
 157         u_int tsize;
 158         u_int bsize;
 159         u_int blocks;
 160         u_int bfree;
 161         u_int bavail;
 162 };
 163 
 164 #endif

/* [previous][next][first][last][top][bottom][index][help] */