~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/nfsd/xdr.h

Version: ~ [ linux-5.6 ] ~ [ linux-5.5.13 ] ~ [ linux-5.4.28 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.113 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.174 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.217 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.217 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.82 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* XDR types for nfsd. This is mainly a typing exercise. */
  2 
  3 #ifndef LINUX_NFSD_H
  4 #define LINUX_NFSD_H
  5 
  6 #include <linux/vfs.h>
  7 #include "nfsd.h"
  8 #include "nfsfh.h"
  9 
 10 struct nfsd_fhandle {
 11         struct svc_fh           fh;
 12 };
 13 
 14 struct nfsd_sattrargs {
 15         struct svc_fh           fh;
 16         struct iattr            attrs;
 17 };
 18 
 19 struct nfsd_diropargs {
 20         struct svc_fh           fh;
 21         char *                  name;
 22         unsigned int            len;
 23 };
 24 
 25 struct nfsd_readargs {
 26         struct svc_fh           fh;
 27         __u32                   offset;
 28         __u32                   count;
 29         int                     vlen;
 30 };
 31 
 32 struct nfsd_writeargs {
 33         svc_fh                  fh;
 34         __u32                   offset;
 35         int                     len;
 36         int                     vlen;
 37 };
 38 
 39 struct nfsd_createargs {
 40         struct svc_fh           fh;
 41         char *                  name;
 42         unsigned int            len;
 43         struct iattr            attrs;
 44 };
 45 
 46 struct nfsd_renameargs {
 47         struct svc_fh           ffh;
 48         char *                  fname;
 49         unsigned int            flen;
 50         struct svc_fh           tfh;
 51         char *                  tname;
 52         unsigned int            tlen;
 53 };
 54 
 55 struct nfsd_readlinkargs {
 56         struct svc_fh           fh;
 57         char *                  buffer;
 58 };
 59         
 60 struct nfsd_linkargs {
 61         struct svc_fh           ffh;
 62         struct svc_fh           tfh;
 63         char *                  tname;
 64         unsigned int            tlen;
 65 };
 66 
 67 struct nfsd_symlinkargs {
 68         struct svc_fh           ffh;
 69         char *                  fname;
 70         unsigned int            flen;
 71         char *                  tname;
 72         unsigned int            tlen;
 73         struct iattr            attrs;
 74 };
 75 
 76 struct nfsd_readdirargs {
 77         struct svc_fh           fh;
 78         __u32                   cookie;
 79         __u32                   count;
 80         __be32 *                buffer;
 81 };
 82 
 83 struct nfsd_attrstat {
 84         struct svc_fh           fh;
 85         struct kstat            stat;
 86 };
 87 
 88 struct nfsd_diropres  {
 89         struct svc_fh           fh;
 90         struct kstat            stat;
 91 };
 92 
 93 struct nfsd_readlinkres {
 94         int                     len;
 95 };
 96 
 97 struct nfsd_readres {
 98         struct svc_fh           fh;
 99         unsigned long           count;
100         struct kstat            stat;
101 };
102 
103 struct nfsd_readdirres {
104         int                     count;
105 
106         struct readdir_cd       common;
107         __be32 *                buffer;
108         int                     buflen;
109         __be32 *                offset;
110 };
111 
112 struct nfsd_statfsres {
113         struct kstatfs          stats;
114 };
115 
116 /*
117  * Storage requirements for XDR arguments and results.
118  */
119 union nfsd_xdrstore {
120         struct nfsd_sattrargs   sattr;
121         struct nfsd_diropargs   dirop;
122         struct nfsd_readargs    read;
123         struct nfsd_writeargs   write;
124         struct nfsd_createargs  create;
125         struct nfsd_renameargs  rename;
126         struct nfsd_linkargs    link;
127         struct nfsd_symlinkargs symlink;
128         struct nfsd_readdirargs readdir;
129 };
130 
131 #define NFS2_SVC_XDRSIZE        sizeof(union nfsd_xdrstore)
132 
133 
134 int nfssvc_decode_void(struct svc_rqst *, __be32 *, void *);
135 int nfssvc_decode_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
136 int nfssvc_decode_sattrargs(struct svc_rqst *, __be32 *,
137                                 struct nfsd_sattrargs *);
138 int nfssvc_decode_diropargs(struct svc_rqst *, __be32 *,
139                                 struct nfsd_diropargs *);
140 int nfssvc_decode_readargs(struct svc_rqst *, __be32 *,
141                                 struct nfsd_readargs *);
142 int nfssvc_decode_writeargs(struct svc_rqst *, __be32 *,
143                                 struct nfsd_writeargs *);
144 int nfssvc_decode_createargs(struct svc_rqst *, __be32 *,
145                                 struct nfsd_createargs *);
146 int nfssvc_decode_renameargs(struct svc_rqst *, __be32 *,
147                                 struct nfsd_renameargs *);
148 int nfssvc_decode_readlinkargs(struct svc_rqst *, __be32 *,
149                                 struct nfsd_readlinkargs *);
150 int nfssvc_decode_linkargs(struct svc_rqst *, __be32 *,
151                                 struct nfsd_linkargs *);
152 int nfssvc_decode_symlinkargs(struct svc_rqst *, __be32 *,
153                                 struct nfsd_symlinkargs *);
154 int nfssvc_decode_readdirargs(struct svc_rqst *, __be32 *,
155                                 struct nfsd_readdirargs *);
156 int nfssvc_encode_void(struct svc_rqst *, __be32 *, void *);
157 int nfssvc_encode_attrstat(struct svc_rqst *, __be32 *, struct nfsd_attrstat *);
158 int nfssvc_encode_diropres(struct svc_rqst *, __be32 *, struct nfsd_diropres *);
159 int nfssvc_encode_readlinkres(struct svc_rqst *, __be32 *, struct nfsd_readlinkres *);
160 int nfssvc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd_readres *);
161 int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *, struct nfsd_statfsres *);
162 int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *, struct nfsd_readdirres *);
163 
164 int nfssvc_encode_entry(void *, const char *name,
165                         int namlen, loff_t offset, u64 ino, unsigned int);
166 
167 int nfssvc_release_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
168 
169 /* Helper functions for NFSv2 ACL code */
170 __be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp);
171 __be32 *nfs2svc_decode_fh(__be32 *p, struct svc_fh *fhp);
172 
173 #endif /* LINUX_NFSD_H */
174 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp