2 * linux/inxlude/linux/nfsd/xdr.h
4 * XDR types for nfsd. This is mainly a typing exercise.
11 #include <linux/vfs.h>
12 #include <linux/nfs.h>
18 struct nfsd_sattrargs
{
23 struct nfsd_diropargs
{
29 struct nfsd_readargs
{
33 struct kvec vec
[RPCSVC_MAXPAGES
];
37 struct nfsd_writeargs
{
41 struct kvec vec
[RPCSVC_MAXPAGES
];
45 struct nfsd_createargs
{
52 struct nfsd_renameargs
{
61 struct nfsd_readlinkargs
{
66 struct nfsd_linkargs
{
73 struct nfsd_symlinkargs
{
82 struct nfsd_readdirargs
{
89 struct nfsd_attrstat
{
93 struct nfsd_diropres
{
97 struct nfsd_readlinkres
{
101 struct nfsd_readres
{
106 struct nfsd_readdirres
{
109 struct readdir_cd common
;
115 struct nfsd_statfsres
{
116 struct kstatfs stats
;
120 * Storage requirements for XDR arguments and results.
122 union nfsd_xdrstore
{
123 struct nfsd_sattrargs sattr
;
124 struct nfsd_diropargs dirop
;
125 struct nfsd_readargs read
;
126 struct nfsd_writeargs write
;
127 struct nfsd_createargs create
;
128 struct nfsd_renameargs rename
;
129 struct nfsd_linkargs link
;
130 struct nfsd_symlinkargs symlink
;
131 struct nfsd_readdirargs readdir
;
134 #define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore)
137 int nfssvc_decode_void(struct svc_rqst
*, u32
*, void *);
138 int nfssvc_decode_fhandle(struct svc_rqst
*, u32
*, struct nfsd_fhandle
*);
139 int nfssvc_decode_sattrargs(struct svc_rqst
*, u32
*,
140 struct nfsd_sattrargs
*);
141 int nfssvc_decode_diropargs(struct svc_rqst
*, u32
*,
142 struct nfsd_diropargs
*);
143 int nfssvc_decode_readargs(struct svc_rqst
*, u32
*,
144 struct nfsd_readargs
*);
145 int nfssvc_decode_writeargs(struct svc_rqst
*, u32
*,
146 struct nfsd_writeargs
*);
147 int nfssvc_decode_createargs(struct svc_rqst
*, u32
*,
148 struct nfsd_createargs
*);
149 int nfssvc_decode_renameargs(struct svc_rqst
*, u32
*,
150 struct nfsd_renameargs
*);
151 int nfssvc_decode_readlinkargs(struct svc_rqst
*, u32
*,
152 struct nfsd_readlinkargs
*);
153 int nfssvc_decode_linkargs(struct svc_rqst
*, u32
*,
154 struct nfsd_linkargs
*);
155 int nfssvc_decode_symlinkargs(struct svc_rqst
*, u32
*,
156 struct nfsd_symlinkargs
*);
157 int nfssvc_decode_readdirargs(struct svc_rqst
*, u32
*,
158 struct nfsd_readdirargs
*);
159 int nfssvc_encode_void(struct svc_rqst
*, u32
*, void *);
160 int nfssvc_encode_attrstat(struct svc_rqst
*, u32
*, struct nfsd_attrstat
*);
161 int nfssvc_encode_diropres(struct svc_rqst
*, u32
*, struct nfsd_diropres
*);
162 int nfssvc_encode_readlinkres(struct svc_rqst
*, u32
*, struct nfsd_readlinkres
*);
163 int nfssvc_encode_readres(struct svc_rqst
*, u32
*, struct nfsd_readres
*);
164 int nfssvc_encode_statfsres(struct svc_rqst
*, u32
*, struct nfsd_statfsres
*);
165 int nfssvc_encode_readdirres(struct svc_rqst
*, u32
*, struct nfsd_readdirres
*);
167 int nfssvc_encode_entry(struct readdir_cd
*, const char *name
,
168 int namlen
, loff_t offset
, ino_t ino
, unsigned int);
170 int nfssvc_release_fhandle(struct svc_rqst
*, u32
*, struct nfsd_fhandle
*);
172 /* Helper functions for NFSv2 ACL code */
173 u32
*nfs2svc_encode_fattr(struct svc_rqst
*rqstp
, u32
*p
, struct svc_fh
*fhp
);
174 u32
*nfs2svc_decode_fh(u32
*p
, struct svc_fh
*fhp
);
176 #endif /* LINUX_NFSD_H */