The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef LINUX_NFSD_H |
| 13 | #define LINUX_NFSD_H |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 14 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 15 | #include <linux/fs.h> |
| 16 | #include <linux/vfs.h> |
| 17 | #include <linux/nfs.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 18 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 19 | struct nfsd_fhandle { |
| 20 | struct svc_fh fh; |
| 21 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 22 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 23 | struct nfsd_sattrargs { |
| 24 | struct svc_fh fh; |
| 25 | struct iattr attrs; |
| 26 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 27 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 28 | struct nfsd_diropargs { |
| 29 | struct svc_fh fh; |
| 30 | char * name; |
| 31 | int len; |
| 32 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 33 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 34 | struct nfsd_readargs { |
| 35 | struct svc_fh fh; |
| 36 | __u32 offset; |
| 37 | __u32 count; |
| 38 | struct kvec vec[RPCSVC_MAXPAGES]; |
| 39 | int vlen; |
| 40 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 41 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 42 | struct nfsd_writeargs { |
| 43 | svc_fh fh; |
| 44 | __u32 offset; |
| 45 | int len; |
| 46 | struct kvec vec[RPCSVC_MAXPAGES]; |
| 47 | int vlen; |
| 48 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 49 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 50 | struct nfsd_createargs { |
| 51 | struct svc_fh fh; |
| 52 | char * name; |
| 53 | int len; |
| 54 | struct iattr attrs; |
| 55 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 56 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 57 | struct nfsd_renameargs { |
| 58 | struct svc_fh ffh; |
| 59 | char * fname; |
| 60 | int flen; |
| 61 | struct svc_fh tfh; |
| 62 | char * tname; |
| 63 | int tlen; |
| 64 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 65 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 66 | struct nfsd_readlinkargs { |
| 67 | struct svc_fh fh; |
| 68 | char * buffer; |
| 69 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 70 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 71 | struct nfsd_linkargs { |
| 72 | struct svc_fh ffh; |
| 73 | struct svc_fh tfh; |
| 74 | char * tname; |
| 75 | int tlen; |
| 76 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 77 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 78 | struct nfsd_symlinkargs { |
| 79 | struct svc_fh ffh; |
| 80 | char * fname; |
| 81 | int flen; |
| 82 | char * tname; |
| 83 | int tlen; |
| 84 | struct iattr attrs; |
| 85 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 86 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 87 | struct nfsd_readdirargs { |
| 88 | struct svc_fh fh; |
| 89 | __u32 cookie; |
| 90 | __u32 count; |
| 91 | u32 * buffer; |
| 92 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 93 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 94 | struct nfsd_attrstat { |
| 95 | struct svc_fh fh; |
| 96 | struct kstat stat; |
| 97 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 98 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 99 | struct nfsd_diropres { |
| 100 | struct svc_fh fh; |
| 101 | struct kstat stat; |
| 102 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 103 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 104 | struct nfsd_readlinkres { |
| 105 | int len; |
| 106 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 107 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 108 | struct nfsd_readres { |
| 109 | struct svc_fh fh; |
| 110 | unsigned long count; |
| 111 | struct kstat stat; |
| 112 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 113 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 114 | struct nfsd_readdirres { |
| 115 | int count; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 116 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 117 | struct readdir_cd common; |
| 118 | u32 * buffer; |
| 119 | int buflen; |
| 120 | u32 * offset; |
| 121 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 122 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 123 | struct nfsd_statfsres { |
| 124 | struct kstatfs stats; |
| 125 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 126 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 127 | union nfsd_xdrstore { |
| 128 | struct nfsd_sattrargs sattr; |
| 129 | struct nfsd_diropargs dirop; |
| 130 | struct nfsd_readargs read; |
| 131 | struct nfsd_writeargs write; |
| 132 | struct nfsd_createargs create; |
| 133 | struct nfsd_renameargs rename; |
| 134 | struct nfsd_linkargs link; |
| 135 | struct nfsd_symlinkargs symlink; |
| 136 | struct nfsd_readdirargs readdir; |
| 137 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 138 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 139 | #define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 140 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 141 | #endif |