1 1.5 christos /* NetBSD: nfs.h,v 1.1 1996/05/23 22:49:53 fvdl Exp */ 2 1.1 christos 3 1.1 christos /* 4 1.1 christos * Copyright (c) 1989, 1993 5 1.1 christos * The Regents of the University of California. All rights reserved. 6 1.1 christos * 7 1.1 christos * This code is derived from software contributed to Berkeley by 8 1.1 christos * Rick Macklem at The University of Guelph. 9 1.1 christos * 10 1.1 christos * Redistribution and use in source and binary forms, with or without 11 1.1 christos * modification, are permitted provided that the following conditions 12 1.1 christos * are met: 13 1.1 christos * 1. Redistributions of source code must retain the above copyright 14 1.1 christos * notice, this list of conditions and the following disclaimer. 15 1.1 christos * 2. Redistributions in binary form must reproduce the above copyright 16 1.1 christos * notice, this list of conditions and the following disclaimer in the 17 1.1 christos * documentation and/or other materials provided with the distribution. 18 1.2 christos * 3. Neither the name of the University nor the names of its contributors 19 1.1 christos * may be used to endorse or promote products derived from this software 20 1.1 christos * without specific prior written permission. 21 1.1 christos * 22 1.1 christos * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23 1.1 christos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 1.1 christos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 1.1 christos * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26 1.1 christos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 1.1 christos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 1.1 christos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 1.1 christos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 1.1 christos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 1.1 christos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 1.1 christos * SUCH DAMAGE. 33 1.1 christos * 34 1.1 christos * @(#)nfsproto.h 8.2 (Berkeley) 3/30/95 35 1.1 christos */ 36 1.1 christos 37 1.1 christos /* 38 1.1 christos * nfs definitions as per the Version 2 and 3 specs 39 1.1 christos */ 40 1.1 christos 41 1.1 christos /* 42 1.1 christos * Constants as defined in the Sun NFS Version 2 and 3 specs. 43 1.1 christos * "NFS: Network File System Protocol Specification" RFC1094 44 1.1 christos * and in the "NFS: Network File System Version 3 Protocol 45 1.1 christos * Specification" 46 1.1 christos */ 47 1.1 christos 48 1.1 christos #define NFS_PORT 2049 49 1.1 christos #define NFS_PROG 100003 50 1.1 christos #define NFS_VER2 2 51 1.1 christos #define NFS_VER3 3 52 1.1 christos #define NFS_V2MAXDATA 8192 53 1.1 christos #define NFS_MAXDGRAMDATA 16384 54 1.1 christos #define NFS_MAXDATA 32768 55 1.1 christos #define NFS_MAXPATHLEN 1024 56 1.1 christos #define NFS_MAXNAMLEN 255 57 1.1 christos #define NFS_MAXPKTHDR 404 58 1.1 christos #define NFS_MAXPACKET (NFS_MAXPKTHDR + NFS_MAXDATA) 59 1.1 christos #define NFS_MINPACKET 20 60 1.1 christos #define NFS_FABLKSIZE 512 /* Size in bytes of a block wrt fa_blocks */ 61 1.1 christos 62 1.1 christos /* Stat numbers for rpc returns (version 2 and 3) */ 63 1.1 christos #define NFS_OK 0 64 1.1 christos #define NFSERR_PERM 1 65 1.1 christos #define NFSERR_NOENT 2 66 1.1 christos #define NFSERR_IO 5 67 1.1 christos #define NFSERR_NXIO 6 68 1.1 christos #define NFSERR_ACCES 13 69 1.1 christos #define NFSERR_EXIST 17 70 1.1 christos #define NFSERR_XDEV 18 /* Version 3 only */ 71 1.1 christos #define NFSERR_NODEV 19 72 1.1 christos #define NFSERR_NOTDIR 20 73 1.1 christos #define NFSERR_ISDIR 21 74 1.1 christos #define NFSERR_INVAL 22 /* Version 3 only */ 75 1.1 christos #define NFSERR_FBIG 27 76 1.1 christos #define NFSERR_NOSPC 28 77 1.1 christos #define NFSERR_ROFS 30 78 1.1 christos #define NFSERR_MLINK 31 /* Version 3 only */ 79 1.1 christos #define NFSERR_NAMETOL 63 80 1.1 christos #define NFSERR_NOTEMPTY 66 81 1.1 christos #define NFSERR_DQUOT 69 82 1.1 christos #define NFSERR_STALE 70 83 1.1 christos #define NFSERR_REMOTE 71 /* Version 3 only */ 84 1.1 christos #define NFSERR_WFLUSH 99 /* Version 2 only */ 85 1.1 christos #define NFSERR_BADHANDLE 10001 /* The rest Version 3 only */ 86 1.1 christos #define NFSERR_NOT_SYNC 10002 87 1.1 christos #define NFSERR_BAD_COOKIE 10003 88 1.1 christos #define NFSERR_NOTSUPP 10004 89 1.1 christos #define NFSERR_TOOSMALL 10005 90 1.1 christos #define NFSERR_SERVERFAULT 10006 91 1.1 christos #define NFSERR_BADTYPE 10007 92 1.1 christos #define NFSERR_JUKEBOX 10008 93 1.1 christos #define NFSERR_TRYLATER NFSERR_JUKEBOX 94 1.1 christos #define NFSERR_STALEWRITEVERF 30001 /* Fake return for nfs_commit() */ 95 1.1 christos 96 1.1 christos #define NFSERR_RETVOID 0x20000000 /* Return void, not error */ 97 1.1 christos #define NFSERR_AUTHERR 0x40000000 /* Mark an authentication error */ 98 1.1 christos #define NFSERR_RETERR 0x80000000 /* Mark an error return for V3 */ 99 1.1 christos 100 1.1 christos /* Sizes in bytes of various nfs rpc components */ 101 1.1 christos #define NFSX_UNSIGNED 4 102 1.1 christos 103 1.1 christos /* specific to NFS Version 2 */ 104 1.1 christos #define NFSX_V2FH 32 105 1.1 christos #define NFSX_V2FATTR 68 106 1.1 christos #define NFSX_V2SATTR 32 107 1.1 christos #define NFSX_V2COOKIE 4 108 1.1 christos #define NFSX_V2STATFS 20 109 1.1 christos 110 1.1 christos /* specific to NFS Version 3 */ 111 1.1 christos #if 0 112 1.1 christos #define NFSX_V3FH (sizeof (fhandle_t)) /* size this server uses */ 113 1.1 christos #endif 114 1.1 christos #define NFSX_V3FHMAX 64 /* max. allowed by protocol */ 115 1.1 christos #define NFSX_V3FATTR 84 116 1.1 christos #define NFSX_V3SATTR 60 /* max. all fields filled in */ 117 1.1 christos #define NFSX_V3POSTOPATTR (NFSX_V3FATTR + NFSX_UNSIGNED) 118 1.1 christos #define NFSX_V3WCCDATA (NFSX_V3POSTOPATTR + 8 * NFSX_UNSIGNED) 119 1.5 christos #define NFSX_V3COOKIEVERF 8 120 1.5 christos #define NFSX_V3WRITEVERF 8 121 1.1 christos #define NFSX_V3CREATEVERF 8 122 1.1 christos #define NFSX_V3STATFS 52 123 1.1 christos #define NFSX_V3FSINFO 48 124 1.1 christos #define NFSX_V3PATHCONF 24 125 1.1 christos 126 1.1 christos /* variants for both versions */ 127 1.1 christos #define NFSX_FH(v3) ((v3) ? (NFSX_V3FHMAX + NFSX_UNSIGNED) : \ 128 1.1 christos NFSX_V2FH) 129 1.1 christos #define NFSX_SRVFH(v3) ((v3) ? NFSX_V3FH : NFSX_V2FH) 130 1.1 christos #define NFSX_FATTR(v3) ((v3) ? NFSX_V3FATTR : NFSX_V2FATTR) 131 1.1 christos #define NFSX_PREOPATTR(v3) ((v3) ? (7 * NFSX_UNSIGNED) : 0) 132 1.1 christos #define NFSX_POSTOPATTR(v3) ((v3) ? (NFSX_V3FATTR + NFSX_UNSIGNED) : 0) 133 1.1 christos #define NFSX_POSTOPORFATTR(v3) ((v3) ? (NFSX_V3FATTR + NFSX_UNSIGNED) : \ 134 1.1 christos NFSX_V2FATTR) 135 1.1 christos #define NFSX_WCCDATA(v3) ((v3) ? NFSX_V3WCCDATA : 0) 136 1.1 christos #define NFSX_WCCORFATTR(v3) ((v3) ? NFSX_V3WCCDATA : NFSX_V2FATTR) 137 1.1 christos #define NFSX_COOKIEVERF(v3) ((v3) ? NFSX_V3COOKIEVERF : 0) 138 1.1 christos #define NFSX_WRITEVERF(v3) ((v3) ? NFSX_V3WRITEVERF : 0) 139 1.1 christos #define NFSX_READDIR(v3) ((v3) ? (5 * NFSX_UNSIGNED) : \ 140 1.1 christos (2 * NFSX_UNSIGNED)) 141 1.1 christos #define NFSX_STATFS(v3) ((v3) ? NFSX_V3STATFS : NFSX_V2STATFS) 142 1.1 christos 143 1.1 christos /* nfs rpc procedure numbers (before version mapping) */ 144 1.1 christos #define NFSPROC_NULL 0 145 1.1 christos #define NFSPROC_GETATTR 1 146 1.1 christos #define NFSPROC_SETATTR 2 147 1.1 christos #define NFSPROC_LOOKUP 3 148 1.1 christos #define NFSPROC_ACCESS 4 149 1.1 christos #define NFSPROC_READLINK 5 150 1.1 christos #define NFSPROC_READ 6 151 1.1 christos #define NFSPROC_WRITE 7 152 1.1 christos #define NFSPROC_CREATE 8 153 1.1 christos #define NFSPROC_MKDIR 9 154 1.1 christos #define NFSPROC_SYMLINK 10 155 1.1 christos #define NFSPROC_MKNOD 11 156 1.1 christos #define NFSPROC_REMOVE 12 157 1.1 christos #define NFSPROC_RMDIR 13 158 1.1 christos #define NFSPROC_RENAME 14 159 1.1 christos #define NFSPROC_LINK 15 160 1.1 christos #define NFSPROC_READDIR 16 161 1.1 christos #define NFSPROC_READDIRPLUS 17 162 1.1 christos #define NFSPROC_FSSTAT 18 163 1.1 christos #define NFSPROC_FSINFO 19 164 1.1 christos #define NFSPROC_PATHCONF 20 165 1.1 christos #define NFSPROC_COMMIT 21 166 1.1 christos 167 1.1 christos /* And leasing (nqnfs) procedure numbers (must be last) */ 168 1.1 christos #define NQNFSPROC_GETLEASE 22 169 1.1 christos #define NQNFSPROC_VACATED 23 170 1.1 christos #define NQNFSPROC_EVICTED 24 171 1.1 christos 172 1.1 christos #define NFSPROC_NOOP 25 173 1.1 christos #define NFS_NPROCS 26 174 1.1 christos 175 1.1 christos /* Actual Version 2 procedure numbers */ 176 1.1 christos #define NFSV2PROC_NULL 0 177 1.1 christos #define NFSV2PROC_GETATTR 1 178 1.1 christos #define NFSV2PROC_SETATTR 2 179 1.1 christos #define NFSV2PROC_NOOP 3 180 1.1 christos #define NFSV2PROC_ROOT NFSV2PROC_NOOP /* Obsolete */ 181 1.1 christos #define NFSV2PROC_LOOKUP 4 182 1.1 christos #define NFSV2PROC_READLINK 5 183 1.1 christos #define NFSV2PROC_READ 6 184 1.1 christos #define NFSV2PROC_WRITECACHE NFSV2PROC_NOOP /* Obsolete */ 185 1.1 christos #define NFSV2PROC_WRITE 8 186 1.1 christos #define NFSV2PROC_CREATE 9 187 1.1 christos #define NFSV2PROC_REMOVE 10 188 1.1 christos #define NFSV2PROC_RENAME 11 189 1.1 christos #define NFSV2PROC_LINK 12 190 1.1 christos #define NFSV2PROC_SYMLINK 13 191 1.1 christos #define NFSV2PROC_MKDIR 14 192 1.1 christos #define NFSV2PROC_RMDIR 15 193 1.1 christos #define NFSV2PROC_READDIR 16 194 1.1 christos #define NFSV2PROC_STATFS 17 195 1.1 christos 196 1.1 christos /* 197 1.1 christos * Constants used by the Version 3 protocol for various RPCs 198 1.1 christos */ 199 1.1 christos #define NFSV3SATTRTIME_DONTCHANGE 0 200 1.1 christos #define NFSV3SATTRTIME_TOSERVER 1 201 1.1 christos #define NFSV3SATTRTIME_TOCLIENT 2 202 1.1 christos 203 1.1 christos #define NFSV3ATTRTIME_NMODES 3 204 1.1 christos 205 1.1 christos #define NFSV3ACCESS_READ 0x01 206 1.1 christos #define NFSV3ACCESS_LOOKUP 0x02 207 1.1 christos #define NFSV3ACCESS_MODIFY 0x04 208 1.1 christos #define NFSV3ACCESS_EXTEND 0x08 209 1.1 christos #define NFSV3ACCESS_DELETE 0x10 210 1.1 christos #define NFSV3ACCESS_EXECUTE 0x20 211 1.1 christos #define NFSV3ACCESS_FULL 0x3f 212 1.1 christos 213 1.1 christos #define NFSV3WRITE_UNSTABLE 0 214 1.1 christos #define NFSV3WRITE_DATASYNC 1 215 1.1 christos #define NFSV3WRITE_FILESYNC 2 216 1.1 christos 217 1.1 christos #define NFSV3WRITE_NMODES 3 218 1.1 christos 219 1.1 christos #define NFSV3CREATE_UNCHECKED 0 220 1.1 christos #define NFSV3CREATE_GUARDED 1 221 1.1 christos #define NFSV3CREATE_EXCLUSIVE 2 222 1.1 christos 223 1.1 christos #define NFSV3CREATE_NMODES 3 224 1.1 christos 225 1.1 christos #define NFSV3FSINFO_LINK 0x01 226 1.1 christos #define NFSV3FSINFO_SYMLINK 0x02 227 1.1 christos #define NFSV3FSINFO_HOMOGENEOUS 0x08 228 1.1 christos #define NFSV3FSINFO_CANSETTIME 0x10 229 1.1 christos 230 1.1 christos /* Conversion macros */ 231 1.1 christos #define vtonfsv2_mode(t,m) \ 232 1.1 christos txdr_unsigned(((t) == VFIFO) ? MAKEIMODE(VCHR, (m)) : \ 233 1.1 christos MAKEIMODE((t), (m))) 234 1.1 christos #define vtonfsv3_mode(m) txdr_unsigned((m) & 07777) 235 1.4 christos #define nfstov_mode(a) (fxdr_unsigned(uint16_t, (a))&07777) 236 1.1 christos #define vtonfsv2_type(a) txdr_unsigned(nfsv2_type[((int32_t)(a))]) 237 1.1 christos #define vtonfsv3_type(a) txdr_unsigned(nfsv3_type[((int32_t)(a))]) 238 1.4 christos #define nfsv2tov_type(a) nv2tov_type[fxdr_unsigned(uint32_t,(a))&0x7] 239 1.4 christos #define nfsv3tov_type(a) nv3tov_type[fxdr_unsigned(uint32_t,(a))&0x7] 240 1.1 christos 241 1.1 christos /* File types */ 242 1.1 christos typedef enum { NFNON=0, NFREG=1, NFDIR=2, NFBLK=3, NFCHR=4, NFLNK=5, 243 1.1 christos NFSOCK=6, NFFIFO=7 } nfs_type; 244 1.1 christos 245 1.5 christos /* 246 1.5 christos * Structs for common parts of the rpc's 247 1.5 christos * 248 1.5 christos * NOTE: these structures are not always overlaid directly on the 249 1.5 christos * packet data - sometimes we declare a local variable of that type, 250 1.5 christos * and fill it up with fields extracted using byte pointers - so we 251 1.5 christos * don't use nd_ types for their members. 252 1.5 christos */ 253 1.5 christos 254 1.1 christos /* 255 1.1 christos * File Handle (32 bytes for version 2), variable up to 64 for version 3. 256 1.1 christos * File Handles of up to NFS_SMALLFH in size are stored directly in the 257 1.1 christos * nfs node, whereas larger ones are malloc'd. (This never happens when 258 1.1 christos * NFS_SMALLFH is set to 64.) 259 1.1 christos * NFS_SMALLFH should be in the range of 32 to 64 and be divisible by 4. 260 1.1 christos */ 261 1.1 christos #ifndef NFS_SMALLFH 262 1.1 christos #define NFS_SMALLFH 64 263 1.1 christos #endif 264 1.1 christos union nfsfh { 265 1.1 christos /* fhandle_t fh_generic; */ 266 1.1 christos u_char fh_bytes[NFS_SMALLFH]; 267 1.1 christos }; 268 1.1 christos typedef union nfsfh nfsfh_t; 269 1.1 christos 270 1.1 christos struct nfsv2_time { 271 1.5 christos nd_uint32_t nfsv2_sec; 272 1.5 christos nd_uint32_t nfsv2_usec; 273 1.1 christos }; 274 1.1 christos typedef struct nfsv2_time nfstime2; 275 1.1 christos 276 1.1 christos struct nfsv3_time { 277 1.5 christos nd_uint32_t nfsv3_sec; 278 1.5 christos nd_uint32_t nfsv3_nsec; 279 1.1 christos }; 280 1.1 christos typedef struct nfsv3_time nfstime3; 281 1.1 christos 282 1.1 christos /* 283 1.1 christos * NFS Version 3 special file number. 284 1.1 christos */ 285 1.1 christos struct nfsv3_spec { 286 1.5 christos nd_uint32_t specdata1; 287 1.5 christos nd_uint32_t specdata2; 288 1.1 christos }; 289 1.1 christos typedef struct nfsv3_spec nfsv3spec; 290 1.1 christos 291 1.1 christos /* 292 1.6 christos * File attributes and settable attributes. These structures cover both 293 1.1 christos * NFS version 2 and the version 3 protocol. Note that the union is only 294 1.1 christos * used so that one pointer can refer to both variants. These structures 295 1.1 christos * go out on the wire and must be densely packed, so no quad data types 296 1.1 christos * are used. (all fields are longs or u_longs or structures of same) 297 1.1 christos * NB: You can't do sizeof(struct nfs_fattr), you must use the 298 1.1 christos * NFSX_FATTR(v3) macro. 299 1.1 christos */ 300 1.1 christos struct nfs_fattr { 301 1.5 christos nd_uint32_t fa_type; 302 1.5 christos nd_uint32_t fa_mode; 303 1.5 christos nd_uint32_t fa_nlink; 304 1.5 christos nd_uint32_t fa_uid; 305 1.5 christos nd_uint32_t fa_gid; 306 1.1 christos union { 307 1.1 christos struct { 308 1.5 christos nd_uint32_t nfsv2fa_size; 309 1.5 christos nd_uint32_t nfsv2fa_blocksize; 310 1.5 christos nd_uint32_t nfsv2fa_rdev; 311 1.5 christos nd_uint32_t nfsv2fa_blocks; 312 1.5 christos nd_uint32_t nfsv2fa_fsid; 313 1.5 christos nd_uint32_t nfsv2fa_fileid; 314 1.5 christos nfstime2 nfsv2fa_atime; 315 1.5 christos nfstime2 nfsv2fa_mtime; 316 1.5 christos nfstime2 nfsv2fa_ctime; 317 1.1 christos } fa_nfsv2; 318 1.1 christos struct { 319 1.5 christos nd_uint64_t nfsv3fa_size; 320 1.5 christos nd_uint64_t nfsv3fa_used; 321 1.5 christos nfsv3spec nfsv3fa_rdev; 322 1.5 christos nd_uint64_t nfsv3fa_fsid; 323 1.5 christos nd_uint64_t nfsv3fa_fileid; 324 1.5 christos nfstime3 nfsv3fa_atime; 325 1.5 christos nfstime3 nfsv3fa_mtime; 326 1.5 christos nfstime3 nfsv3fa_ctime; 327 1.1 christos } fa_nfsv3; 328 1.1 christos } fa_un; 329 1.1 christos }; 330 1.1 christos 331 1.1 christos /* and some ugly defines for accessing union components */ 332 1.1 christos #define fa2_size fa_un.fa_nfsv2.nfsv2fa_size 333 1.1 christos #define fa2_blocksize fa_un.fa_nfsv2.nfsv2fa_blocksize 334 1.1 christos #define fa2_rdev fa_un.fa_nfsv2.nfsv2fa_rdev 335 1.1 christos #define fa2_blocks fa_un.fa_nfsv2.nfsv2fa_blocks 336 1.1 christos #define fa2_fsid fa_un.fa_nfsv2.nfsv2fa_fsid 337 1.1 christos #define fa2_fileid fa_un.fa_nfsv2.nfsv2fa_fileid 338 1.1 christos #define fa2_atime fa_un.fa_nfsv2.nfsv2fa_atime 339 1.1 christos #define fa2_mtime fa_un.fa_nfsv2.nfsv2fa_mtime 340 1.1 christos #define fa2_ctime fa_un.fa_nfsv2.nfsv2fa_ctime 341 1.1 christos #define fa3_size fa_un.fa_nfsv3.nfsv3fa_size 342 1.1 christos #define fa3_used fa_un.fa_nfsv3.nfsv3fa_used 343 1.1 christos #define fa3_rdev fa_un.fa_nfsv3.nfsv3fa_rdev 344 1.1 christos #define fa3_fsid fa_un.fa_nfsv3.nfsv3fa_fsid 345 1.1 christos #define fa3_fileid fa_un.fa_nfsv3.nfsv3fa_fileid 346 1.1 christos #define fa3_atime fa_un.fa_nfsv3.nfsv3fa_atime 347 1.1 christos #define fa3_mtime fa_un.fa_nfsv3.nfsv3fa_mtime 348 1.1 christos #define fa3_ctime fa_un.fa_nfsv3.nfsv3fa_ctime 349 1.1 christos 350 1.1 christos struct nfsv2_sattr { 351 1.5 christos nd_uint32_t sa_mode; 352 1.5 christos nd_uint32_t sa_uid; 353 1.5 christos nd_uint32_t sa_gid; 354 1.5 christos nd_uint32_t sa_size; 355 1.5 christos nfstime2 sa_atime; 356 1.5 christos nfstime2 sa_mtime; 357 1.1 christos }; 358 1.1 christos 359 1.1 christos struct nfs_statfs { 360 1.1 christos union { 361 1.1 christos struct { 362 1.5 christos nd_uint32_t nfsv2sf_tsize; 363 1.5 christos nd_uint32_t nfsv2sf_bsize; 364 1.5 christos nd_uint32_t nfsv2sf_blocks; 365 1.5 christos nd_uint32_t nfsv2sf_bfree; 366 1.5 christos nd_uint32_t nfsv2sf_bavail; 367 1.1 christos } sf_nfsv2; 368 1.1 christos struct { 369 1.5 christos nd_uint64_t nfsv3sf_tbytes; 370 1.5 christos nd_uint64_t nfsv3sf_fbytes; 371 1.5 christos nd_uint64_t nfsv3sf_abytes; 372 1.5 christos nd_uint64_t nfsv3sf_tfiles; 373 1.5 christos nd_uint64_t nfsv3sf_ffiles; 374 1.5 christos nd_uint64_t nfsv3sf_afiles; 375 1.5 christos nd_uint32_t nfsv3sf_invarsec; 376 1.1 christos } sf_nfsv3; 377 1.1 christos } sf_un; 378 1.1 christos }; 379 1.1 christos 380 1.1 christos #define sf_tsize sf_un.sf_nfsv2.nfsv2sf_tsize 381 1.1 christos #define sf_bsize sf_un.sf_nfsv2.nfsv2sf_bsize 382 1.1 christos #define sf_blocks sf_un.sf_nfsv2.nfsv2sf_blocks 383 1.1 christos #define sf_bfree sf_un.sf_nfsv2.nfsv2sf_bfree 384 1.1 christos #define sf_bavail sf_un.sf_nfsv2.nfsv2sf_bavail 385 1.1 christos #define sf_tbytes sf_un.sf_nfsv3.nfsv3sf_tbytes 386 1.1 christos #define sf_fbytes sf_un.sf_nfsv3.nfsv3sf_fbytes 387 1.1 christos #define sf_abytes sf_un.sf_nfsv3.nfsv3sf_abytes 388 1.1 christos #define sf_tfiles sf_un.sf_nfsv3.nfsv3sf_tfiles 389 1.1 christos #define sf_ffiles sf_un.sf_nfsv3.nfsv3sf_ffiles 390 1.1 christos #define sf_afiles sf_un.sf_nfsv3.nfsv3sf_afiles 391 1.1 christos #define sf_invarsec sf_un.sf_nfsv3.nfsv3sf_invarsec 392 1.1 christos 393 1.1 christos struct nfsv3_fsinfo { 394 1.5 christos nd_uint32_t fs_rtmax; 395 1.5 christos nd_uint32_t fs_rtpref; 396 1.5 christos nd_uint32_t fs_rtmult; 397 1.5 christos nd_uint32_t fs_wtmax; 398 1.5 christos nd_uint32_t fs_wtpref; 399 1.5 christos nd_uint32_t fs_wtmult; 400 1.5 christos nd_uint32_t fs_dtpref; 401 1.5 christos nd_uint64_t fs_maxfilesize; 402 1.5 christos nfstime3 fs_timedelta; 403 1.5 christos nd_uint32_t fs_properties; 404 1.1 christos }; 405 1.1 christos 406 1.1 christos struct nfsv3_pathconf { 407 1.5 christos nd_uint32_t pc_linkmax; 408 1.5 christos nd_uint32_t pc_namemax; 409 1.5 christos nd_uint32_t pc_notrunc; 410 1.5 christos nd_uint32_t pc_chownrestricted; 411 1.5 christos nd_uint32_t pc_caseinsensitive; 412 1.5 christos nd_uint32_t pc_casepreserving; 413 1.1 christos }; 414