- Stephen Rothwell: APM updates
[davej-history.git] / include / linux / nfsd / xdr.h
blob4bb4f668bf7c3f2d70c683daf8e4f5ab64bb5019
1 /*
2 * linux/inxlude/linux/nfsd/xdr.h
4 * XDR types for nfsd. This is mainly a typing exercise.
5 */
7 #ifndef LINUX_NFSD_H
8 #define LINUX_NFSD_H
10 #include <linux/fs.h>
11 #include <linux/nfs.h>
13 struct nfsd_fhandle {
14 struct svc_fh fh;
17 struct nfsd_sattrargs {
18 struct svc_fh fh;
19 struct iattr attrs;
22 struct nfsd_diropargs {
23 struct svc_fh fh;
24 char * name;
25 int len;
28 struct nfsd_readargs {
29 struct svc_fh fh;
30 __u32 offset;
31 __u32 count;
32 __u32 totalsize;
35 struct nfsd_writeargs {
36 svc_fh fh;
37 __u32 beginoffset;
38 __u32 offset;
39 __u32 totalcount;
40 __u8 * data;
41 int len;
44 struct nfsd_createargs {
45 struct svc_fh fh;
46 char * name;
47 int len;
48 struct iattr attrs;
51 struct nfsd_renameargs {
52 struct svc_fh ffh;
53 char * fname;
54 int flen;
55 struct svc_fh tfh;
56 char * tname;
57 int tlen;
60 struct nfsd_linkargs {
61 struct svc_fh ffh;
62 struct svc_fh tfh;
63 char * tname;
64 int tlen;
67 struct nfsd_symlinkargs {
68 struct svc_fh ffh;
69 char * fname;
70 int flen;
71 char * tname;
72 int tlen;
73 struct iattr attrs;
76 struct nfsd_readdirargs {
77 struct svc_fh fh;
78 __u32 cookie;
79 __u32 count;
82 struct nfsd_attrstat {
83 struct svc_fh fh;
86 struct nfsd_diropres {
87 struct svc_fh fh;
90 struct nfsd_readlinkres {
91 int len;
94 struct nfsd_readres {
95 struct svc_fh fh;
96 unsigned long count;
99 struct nfsd_readdirres {
100 int count;
103 struct nfsd_statfsres {
104 struct statfs stats;
108 * Storage requirements for XDR arguments and results.
110 union nfsd_xdrstore {
111 struct nfsd_sattrargs sattr;
112 struct nfsd_diropargs dirop;
113 struct nfsd_readargs read;
114 struct nfsd_writeargs write;
115 struct nfsd_createargs create;
116 struct nfsd_renameargs rename;
117 struct nfsd_linkargs link;
118 struct nfsd_symlinkargs symlink;
119 struct nfsd_readdirargs readdir;
122 #define NFSSVC_XDRSIZE sizeof(union nfsd_xdrstore)
125 int nfssvc_decode_void(struct svc_rqst *, u32 *, void *);
126 int nfssvc_decode_fhandle(struct svc_rqst *, u32 *, struct svc_fh *);
127 int nfssvc_decode_sattrargs(struct svc_rqst *, u32 *,
128 struct nfsd_sattrargs *);
129 int nfssvc_decode_diropargs(struct svc_rqst *, u32 *,
130 struct nfsd_diropargs *);
131 int nfssvc_decode_readargs(struct svc_rqst *, u32 *,
132 struct nfsd_readargs *);
133 int nfssvc_decode_writeargs(struct svc_rqst *, u32 *,
134 struct nfsd_writeargs *);
135 int nfssvc_decode_createargs(struct svc_rqst *, u32 *,
136 struct nfsd_createargs *);
137 int nfssvc_decode_renameargs(struct svc_rqst *, u32 *,
138 struct nfsd_renameargs *);
139 int nfssvc_decode_linkargs(struct svc_rqst *, u32 *,
140 struct nfsd_linkargs *);
141 int nfssvc_decode_symlinkargs(struct svc_rqst *, u32 *,
142 struct nfsd_symlinkargs *);
143 int nfssvc_decode_readdirargs(struct svc_rqst *, u32 *,
144 struct nfsd_readdirargs *);
145 int nfssvc_encode_void(struct svc_rqst *, u32 *, void *);
146 int nfssvc_encode_attrstat(struct svc_rqst *, u32 *, struct nfsd_attrstat *);
147 int nfssvc_encode_diropres(struct svc_rqst *, u32 *, struct nfsd_diropres *);
148 int nfssvc_encode_readlinkres(struct svc_rqst *, u32 *, struct nfsd_readlinkres *);
149 int nfssvc_encode_readres(struct svc_rqst *, u32 *, struct nfsd_readres *);
150 int nfssvc_encode_statfsres(struct svc_rqst *, u32 *, struct nfsd_statfsres *);
151 int nfssvc_encode_readdirres(struct svc_rqst *, u32 *, struct nfsd_readdirres *);
153 int nfssvc_encode_entry(struct readdir_cd *, const char *name,
154 int namlen, off_t offset, ino_t ino, unsigned int);
156 int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
158 #endif /* LINUX_NFSD_H */