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