| 1 | /* copied from rfc 1813 */ |
| 2 | |
| 3 | const NFS3_FHSIZE = 64; /* Maximum bytes in a V3 file handle */ |
| 4 | const NFS3_WRITEVERFSIZE = 8; |
| 5 | const NFS3_CREATEVERFSIZE = 8; |
| 6 | const NFS3_COOKIEVERFSIZE = 8; |
| 7 | |
| 8 | typedef opaque cookieverf3[NFS3_COOKIEVERFSIZE]; |
| 9 | |
| 10 | typedef unsigned hyper uint64; |
| 11 | typedef uint64 cookie3; |
| 12 | |
| 13 | struct nfs_fh3 { |
| 14 | opaque data<NFS3_FHSIZE>; |
| 15 | }; |
| 16 | |
| 17 | typedef string filename3<>; |
| 18 | |
| 19 | struct diropargs3 { |
| 20 | nfs_fh3 dir; |
| 21 | filename3 name; |
| 22 | }; |
| 23 | |
| 24 | enum ftype3 { |
| 25 | NF3REG = 1, |
| 26 | NF3DIR = 2, |
| 27 | NF3BLK = 3, |
| 28 | NF3CHR = 4, |
| 29 | NF3LNK = 5, |
| 30 | NF3SOCK = 6, |
| 31 | NF3FIFO = 7 |
| 32 | }; |
| 33 | |
| 34 | typedef unsigned long uint32; |
| 35 | |
| 36 | typedef long int32; |
| 37 | |
| 38 | typedef uint32 mode3; |
| 39 | |
| 40 | typedef uint32 uid3; |
| 41 | |
| 42 | typedef uint32 gid3; |
| 43 | |
| 44 | typedef uint64 size3; |
| 45 | |
| 46 | typedef uint64 fileid3; |
| 47 | |
| 48 | struct specdata3 { |
| 49 | uint32 specdata1; |
| 50 | uint32 specdata2; |
| 51 | }; |
| 52 | |
| 53 | struct nfstime3 { |
| 54 | uint32 seconds; |
| 55 | uint32 nseconds; |
| 56 | }; |
| 57 | |
| 58 | struct fattr3 { |
| 59 | ftype3 type; |
| 60 | mode3 mode; |
| 61 | uint32 nlink; |
| 62 | uid3 uid; |
| 63 | gid3 gid; |
| 64 | size3 size; |
| 65 | size3 used; |
| 66 | specdata3 rdev; |
| 67 | uint64 fsid; |
| 68 | fileid3 fileid; |
| 69 | nfstime3 atime; |
| 70 | nfstime3 mtime; |
| 71 | nfstime3 ctime; |
| 72 | }; |
| 73 | |
| 74 | union post_op_attr switch (bool attributes_follow) { |
| 75 | case TRUE: |
| 76 | fattr3 attributes; |
| 77 | case FALSE: |
| 78 | void; |
| 79 | }; |
| 80 | |
| 81 | |
| 82 | enum nfsstat3 { |
| 83 | NFS3_OK = 0, |
| 84 | NFS3ERR_PERM = 1, |
| 85 | NFS3ERR_NOENT = 2, |
| 86 | NFS3ERR_IO = 5, |
| 87 | NFS3ERR_NXIO = 6, |
| 88 | NFS3ERR_ACCES = 13, |
| 89 | NFS3ERR_EXIST = 17, |
| 90 | NFS3ERR_XDEV = 18, |
| 91 | NFS3ERR_NODEV = 19, |
| 92 | NFS3ERR_NOTDIR = 20, |
| 93 | NFS3ERR_ISDIR = 21, |
| 94 | NFS3ERR_INVAL = 22, |
| 95 | NFS3ERR_FBIG = 27, |
| 96 | NFS3ERR_NOSPC = 28, |
| 97 | NFS3ERR_ROFS = 30, |
| 98 | NFS3ERR_MLINK = 31, |
| 99 | NFS3ERR_NAMETOOLONG = 63, |
| 100 | NFS3ERR_NOTEMPTY = 66, |
| 101 | NFS3ERR_DQUOT = 69, |
| 102 | NFS3ERR_STALE = 70, |
| 103 | NFS3ERR_REMOTE = 71, |
| 104 | NFS3ERR_BADHANDLE = 10001, |
| 105 | NFS3ERR_NOT_SYNC = 10002, |
| 106 | NFS3ERR_BAD_COOKIE = 10003, |
| 107 | NFS3ERR_NOTSUPP = 10004, |
| 108 | NFS3ERR_TOOSMALL = 10005, |
| 109 | NFS3ERR_SERVERFAULT = 10006, |
| 110 | NFS3ERR_BADTYPE = 10007, |
| 111 | NFS3ERR_JUKEBOX = 10008 |
| 112 | }; |
| 113 | |
| 114 | enum stable_how { |
| 115 | UNSTABLE = 0, |
| 116 | DATA_SYNC = 1, |
| 117 | FILE_SYNC = 2 |
| 118 | }; |
| 119 | |
| 120 | typedef uint64 offset3; |
| 121 | |
| 122 | typedef uint32 count3; |
| 123 | |
| 124 | struct wcc_attr { |
| 125 | size3 size; |
| 126 | nfstime3 mtime; |
| 127 | nfstime3 ctime; |
| 128 | }; |
| 129 | |
| 130 | union pre_op_attr switch (bool attributes_follow) { |
| 131 | case TRUE: |
| 132 | wcc_attr attributes; |
| 133 | case FALSE: |
| 134 | void; |
| 135 | }; |
| 136 | |
| 137 | struct wcc_data { |
| 138 | pre_op_attr before; |
| 139 | post_op_attr after; |
| 140 | }; |
| 141 | |
| 142 | struct WRITE3args { |
| 143 | nfs_fh3 file; |
| 144 | offset3 offset; |
| 145 | count3 count; |
| 146 | stable_how stable; |
| 147 | opaque data<>; |
| 148 | }; |
| 149 | |
| 150 | typedef opaque writeverf3[NFS3_WRITEVERFSIZE]; |
| 151 | |
| 152 | struct WRITE3resok { |
| 153 | wcc_data file_wcc; |
| 154 | count3 count; |
| 155 | stable_how committed; |
| 156 | writeverf3 verf; |
| 157 | }; |
| 158 | |
| 159 | struct WRITE3resfail { |
| 160 | wcc_data file_wcc; |
| 161 | }; |
| 162 | |
| 163 | union WRITE3res switch (nfsstat3 status) { |
| 164 | case NFS3_OK: |
| 165 | WRITE3resok resok; |
| 166 | default: |
| 167 | WRITE3resfail resfail; |
| 168 | }; |
| 169 | |
| 170 | struct LOOKUP3args { |
| 171 | diropargs3 what; |
| 172 | }; |
| 173 | |
| 174 | struct LOOKUP3resok { |
| 175 | nfs_fh3 object; |
| 176 | post_op_attr obj_attributes; |
| 177 | post_op_attr dir_attributes; |
| 178 | }; |
| 179 | |
| 180 | struct LOOKUP3resfail { |
| 181 | post_op_attr dir_attributes; |
| 182 | }; |
| 183 | |
| 184 | |
| 185 | |
| 186 | union LOOKUP3res switch (nfsstat3 status) { |
| 187 | case NFS3_OK: |
| 188 | LOOKUP3resok resok; |
| 189 | default: |
| 190 | LOOKUP3resfail resfail; |
| 191 | }; |
| 192 | |
| 193 | struct COMMIT3args { |
| 194 | nfs_fh3 file; |
| 195 | offset3 offset; |
| 196 | count3 count; |
| 197 | }; |
| 198 | |
| 199 | struct COMMIT3resok { |
| 200 | wcc_data file_wcc; |
| 201 | writeverf3 verf; |
| 202 | }; |
| 203 | |
| 204 | struct COMMIT3resfail { |
| 205 | wcc_data file_wcc; |
| 206 | }; |
| 207 | |
| 208 | union COMMIT3res switch (nfsstat3 status) { |
| 209 | case NFS3_OK: |
| 210 | COMMIT3resok resok; |
| 211 | default: |
| 212 | COMMIT3resfail resfail; |
| 213 | }; |
| 214 | |
| 215 | const ACCESS3_READ = 0x0001; |
| 216 | const ACCESS3_LOOKUP = 0x0002; |
| 217 | const ACCESS3_MODIFY = 0x0004; |
| 218 | const ACCESS3_EXTEND = 0x0008; |
| 219 | const ACCESS3_DELETE = 0x0010; |
| 220 | const ACCESS3_EXECUTE = 0x0020; |
| 221 | |
| 222 | struct ACCESS3args { |
| 223 | nfs_fh3 object; |
| 224 | uint32 access; |
| 225 | }; |
| 226 | |
| 227 | struct ACCESS3resok { |
| 228 | post_op_attr obj_attributes; |
| 229 | uint32 access; |
| 230 | }; |
| 231 | |
| 232 | struct ACCESS3resfail { |
| 233 | post_op_attr obj_attributes; |
| 234 | }; |
| 235 | |
| 236 | union ACCESS3res switch (nfsstat3 status) { |
| 237 | case NFS3_OK: |
| 238 | ACCESS3resok resok; |
| 239 | default: |
| 240 | ACCESS3resfail resfail; |
| 241 | }; |
| 242 | |
| 243 | struct GETATTR3args { |
| 244 | nfs_fh3 object; |
| 245 | }; |
| 246 | |
| 247 | struct GETATTR3resok { |
| 248 | fattr3 obj_attributes; |
| 249 | }; |
| 250 | |
| 251 | union GETATTR3res switch (nfsstat3 status) { |
| 252 | case NFS3_OK: |
| 253 | GETATTR3resok resok; |
| 254 | default: |
| 255 | void; |
| 256 | }; |
| 257 | |
| 258 | |
| 259 | |
| 260 | enum time_how { |
| 261 | DONT_CHANGE = 0, |
| 262 | SET_TO_SERVER_TIME = 1, |
| 263 | SET_TO_CLIENT_TIME = 2 |
| 264 | }; |
| 265 | |
| 266 | union set_mode3 switch (bool set_it) { |
| 267 | case TRUE: |
| 268 | mode3 mode; |
| 269 | default: |
| 270 | void; |
| 271 | }; |
| 272 | |
| 273 | union set_uid3 switch (bool set_it) { |
| 274 | case TRUE: |
| 275 | uid3 uid; |
| 276 | default: |
| 277 | void; |
| 278 | }; |
| 279 | |
| 280 | union set_gid3 switch (bool set_it) { |
| 281 | case TRUE: |
| 282 | gid3 gid; |
| 283 | default: |
| 284 | void; |
| 285 | }; |
| 286 | |
| 287 | union set_size3 switch (bool set_it) { |
| 288 | case TRUE: |
| 289 | size3 size; |
| 290 | default: |
| 291 | void; |
| 292 | }; |
| 293 | |
| 294 | union set_atime switch (time_how set_it) { |
| 295 | case SET_TO_CLIENT_TIME: |
| 296 | nfstime3 atime; |
| 297 | default: |
| 298 | void; |
| 299 | }; |
| 300 | |
| 301 | union set_mtime switch (time_how set_it) { |
| 302 | case SET_TO_CLIENT_TIME: |
| 303 | nfstime3 mtime; |
| 304 | default: |
| 305 | void; |
| 306 | }; |
| 307 | |
| 308 | struct sattr3 { |
| 309 | set_mode3 mode; |
| 310 | set_uid3 uid; |
| 311 | set_gid3 gid; |
| 312 | set_size3 size; |
| 313 | set_atime atime; |
| 314 | set_mtime mtime; |
| 315 | }; |
| 316 | |
| 317 | enum createmode3 { |
| 318 | UNCHECKED = 0, |
| 319 | GUARDED = 1, |
| 320 | EXCLUSIVE = 2 |
| 321 | }; |
| 322 | |
| 323 | |
| 324 | typedef opaque createverf3[NFS3_CREATEVERFSIZE]; |
| 325 | |
| 326 | union createhow3 switch (createmode3 mode) { |
| 327 | case UNCHECKED: |
| 328 | case GUARDED: |
| 329 | sattr3 obj_attributes; |
| 330 | case EXCLUSIVE: |
| 331 | createverf3 verf; |
| 332 | }; |
| 333 | |
| 334 | struct CREATE3args { |
| 335 | diropargs3 where; |
| 336 | createhow3 how; |
| 337 | }; |
| 338 | |
| 339 | union post_op_fh3 switch (bool handle_follows) { |
| 340 | case TRUE: |
| 341 | nfs_fh3 handle; |
| 342 | case FALSE: |
| 343 | void; |
| 344 | }; |
| 345 | |
| 346 | struct CREATE3resok { |
| 347 | post_op_fh3 obj; |
| 348 | post_op_attr obj_attributes; |
| 349 | wcc_data dir_wcc; |
| 350 | }; |
| 351 | |
| 352 | struct CREATE3resfail { |
| 353 | wcc_data dir_wcc; |
| 354 | }; |
| 355 | |
| 356 | union CREATE3res switch (nfsstat3 status) { |
| 357 | case NFS3_OK: |
| 358 | CREATE3resok resok; |
| 359 | default: |
| 360 | CREATE3resfail resfail; |
| 361 | }; |
| 362 | |
| 363 | struct REMOVE3args { |
| 364 | diropargs3 object; |
| 365 | }; |
| 366 | |
| 367 | struct REMOVE3resok { |
| 368 | wcc_data dir_wcc; |
| 369 | }; |
| 370 | |
| 371 | struct REMOVE3resfail { |
| 372 | wcc_data dir_wcc; |
| 373 | }; |
| 374 | |
| 375 | union REMOVE3res switch (nfsstat3 status) { |
| 376 | case NFS3_OK: |
| 377 | REMOVE3resok resok; |
| 378 | default: |
| 379 | REMOVE3resfail resfail; |
| 380 | }; |
| 381 | |
| 382 | struct READ3args { |
| 383 | nfs_fh3 file; |
| 384 | offset3 offset; |
| 385 | count3 count; |
| 386 | }; |
| 387 | |
| 388 | struct READ3resok { |
| 389 | post_op_attr file_attributes; |
| 390 | count3 count; |
| 391 | bool eof; |
| 392 | opaque data<>; |
| 393 | }; |
| 394 | |
| 395 | struct READ3resfail { |
| 396 | post_op_attr file_attributes; |
| 397 | }; |
| 398 | |
| 399 | union READ3res switch (nfsstat3 status) { |
| 400 | case NFS3_OK: |
| 401 | READ3resok resok; |
| 402 | default: |
| 403 | READ3resfail resfail; |
| 404 | }; |
| 405 | |
| 406 | |
| 407 | const FSF3_LINK = 0x0001; |
| 408 | const FSF3_SYMLINK = 0x0002; |
| 409 | const FSF3_HOMOGENEOUS = 0x0008; |
| 410 | const FSF3_CANSETTIME = 0x0010; |
| 411 | |
| 412 | struct FSINFO3args { |
| 413 | nfs_fh3 fsroot; |
| 414 | }; |
| 415 | |
| 416 | struct FSINFO3resok { |
| 417 | post_op_attr obj_attributes; |
| 418 | uint32 rtmax; |
| 419 | uint32 rtpref; |
| 420 | uint32 rtmult; |
| 421 | uint32 wtmax; |
| 422 | uint32 wtpref; |
| 423 | uint32 wtmult; |
| 424 | uint32 dtpref; |
| 425 | size3 maxfilesize; |
| 426 | nfstime3 time_delta; |
| 427 | uint32 properties; |
| 428 | }; |
| 429 | |
| 430 | struct FSINFO3resfail { |
| 431 | post_op_attr obj_attributes; |
| 432 | }; |
| 433 | |
| 434 | union FSINFO3res switch (nfsstat3 status) { |
| 435 | case NFS3_OK: |
| 436 | FSINFO3resok resok; |
| 437 | default: |
| 438 | FSINFO3resfail resfail; |
| 439 | }; |
| 440 | |
| 441 | |
| 442 | struct FSSTAT3args { |
| 443 | nfs_fh3 fsroot; |
| 444 | }; |
| 445 | |
| 446 | struct FSSTAT3resok { |
| 447 | post_op_attr obj_attributes; |
| 448 | size3 tbytes; |
| 449 | size3 fbytes; |
| 450 | size3 abytes; |
| 451 | size3 tfiles; |
| 452 | size3 ffiles; |
| 453 | size3 afiles; |
| 454 | uint32 invarsec; |
| 455 | }; |
| 456 | |
| 457 | struct FSSTAT3resfail { |
| 458 | post_op_attr obj_attributes; |
| 459 | }; |
| 460 | |
| 461 | union FSSTAT3res switch (nfsstat3 status) { |
| 462 | case NFS3_OK: |
| 463 | FSSTAT3resok resok; |
| 464 | default: |
| 465 | FSSTAT3resfail resfail; |
| 466 | }; |
| 467 | |
| 468 | struct PATHCONF3args { |
| 469 | nfs_fh3 object; |
| 470 | }; |
| 471 | |
| 472 | struct PATHCONF3resok { |
| 473 | post_op_attr obj_attributes; |
| 474 | uint32 linkmax; |
| 475 | uint32 name_max; |
| 476 | bool no_trunc; |
| 477 | bool chown_restricted; |
| 478 | bool case_insensitive; |
| 479 | bool case_preserving; |
| 480 | }; |
| 481 | |
| 482 | struct PATHCONF3resfail { |
| 483 | post_op_attr obj_attributes; |
| 484 | }; |
| 485 | |
| 486 | union PATHCONF3res switch (nfsstat3 status) { |
| 487 | case NFS3_OK: |
| 488 | PATHCONF3resok resok; |
| 489 | default: |
| 490 | PATHCONF3resfail resfail; |
| 491 | }; |
| 492 | |
| 493 | typedef string nfspath3<>; |
| 494 | |
| 495 | struct symlinkdata3 { |
| 496 | sattr3 symlink_attributes; |
| 497 | nfspath3 symlink_data; |
| 498 | }; |
| 499 | |
| 500 | struct SYMLINK3args { |
| 501 | diropargs3 where; |
| 502 | symlinkdata3 symlink; |
| 503 | }; |
| 504 | |
| 505 | struct SYMLINK3resok { |
| 506 | post_op_fh3 obj; |
| 507 | post_op_attr obj_attributes; |
| 508 | wcc_data dir_wcc; |
| 509 | }; |
| 510 | |
| 511 | struct SYMLINK3resfail { |
| 512 | wcc_data dir_wcc; |
| 513 | }; |
| 514 | |
| 515 | union SYMLINK3res switch (nfsstat3 status) { |
| 516 | case NFS3_OK: |
| 517 | SYMLINK3resok resok; |
| 518 | default: |
| 519 | SYMLINK3resfail resfail; |
| 520 | }; |
| 521 | |
| 522 | |
| 523 | struct READLINK3args { |
| 524 | nfs_fh3 symlink; |
| 525 | }; |
| 526 | |
| 527 | struct READLINK3resok { |
| 528 | post_op_attr symlink_attributes; |
| 529 | nfspath3 data; |
| 530 | }; |
| 531 | |
| 532 | struct READLINK3resfail { |
| 533 | post_op_attr symlink_attributes; |
| 534 | }; |
| 535 | |
| 536 | union READLINK3res switch (nfsstat3 status) { |
| 537 | case NFS3_OK: |
| 538 | READLINK3resok resok; |
| 539 | default: |
| 540 | READLINK3resfail resfail; |
| 541 | }; |
| 542 | |
| 543 | |
| 544 | struct devicedata3 { |
| 545 | sattr3 dev_attributes; |
| 546 | specdata3 spec; |
| 547 | }; |
| 548 | |
| 549 | union mknoddata3 switch (ftype3 type) { |
| 550 | case NF3CHR: |
| 551 | case NF3BLK: |
| 552 | devicedata3 device; |
| 553 | case NF3SOCK: |
| 554 | case NF3FIFO: |
| 555 | sattr3 pipe_attributes; |
| 556 | default: |
| 557 | void; |
| 558 | }; |
| 559 | |
| 560 | struct MKNOD3args { |
| 561 | diropargs3 where; |
| 562 | mknoddata3 what; |
| 563 | }; |
| 564 | |
| 565 | struct MKNOD3resok { |
| 566 | post_op_fh3 obj; |
| 567 | post_op_attr obj_attributes; |
| 568 | wcc_data dir_wcc; |
| 569 | }; |
| 570 | |
| 571 | struct MKNOD3resfail { |
| 572 | wcc_data dir_wcc; |
| 573 | }; |
| 574 | |
| 575 | union MKNOD3res switch (nfsstat3 status) { |
| 576 | case NFS3_OK: |
| 577 | MKNOD3resok resok; |
| 578 | default: |
| 579 | MKNOD3resfail resfail; |
| 580 | }; |
| 581 | |
| 582 | |
| 583 | struct MKDIR3args { |
| 584 | diropargs3 where; |
| 585 | sattr3 attributes; |
| 586 | }; |
| 587 | |
| 588 | struct MKDIR3resok { |
| 589 | post_op_fh3 obj; |
| 590 | post_op_attr obj_attributes; |
| 591 | wcc_data dir_wcc; |
| 592 | }; |
| 593 | |
| 594 | struct MKDIR3resfail { |
| 595 | wcc_data dir_wcc; |
| 596 | }; |
| 597 | |
| 598 | union MKDIR3res switch (nfsstat3 status) { |
| 599 | case NFS3_OK: |
| 600 | MKDIR3resok resok; |
| 601 | default: |
| 602 | MKDIR3resfail resfail; |
| 603 | }; |
| 604 | |
| 605 | struct RMDIR3args { |
| 606 | diropargs3 object; |
| 607 | }; |
| 608 | |
| 609 | struct RMDIR3resok { |
| 610 | wcc_data dir_wcc; |
| 611 | }; |
| 612 | |
| 613 | struct RMDIR3resfail { |
| 614 | wcc_data dir_wcc; |
| 615 | }; |
| 616 | |
| 617 | union RMDIR3res switch (nfsstat3 status) { |
| 618 | case NFS3_OK: |
| 619 | RMDIR3resok resok; |
| 620 | default: |
| 621 | RMDIR3resfail resfail; |
| 622 | }; |
| 623 | |
| 624 | struct RENAME3args { |
| 625 | diropargs3 from; |
| 626 | diropargs3 to; |
| 627 | }; |
| 628 | |
| 629 | struct RENAME3resok { |
| 630 | wcc_data fromdir_wcc; |
| 631 | wcc_data todir_wcc; |
| 632 | }; |
| 633 | |
| 634 | struct RENAME3resfail { |
| 635 | wcc_data fromdir_wcc; |
| 636 | wcc_data todir_wcc; |
| 637 | }; |
| 638 | |
| 639 | union RENAME3res switch (nfsstat3 status) { |
| 640 | case NFS3_OK: |
| 641 | RENAME3resok resok; |
| 642 | default: |
| 643 | RENAME3resfail resfail; |
| 644 | }; |
| 645 | |
| 646 | struct READDIRPLUS3args { |
| 647 | nfs_fh3 dir; |
| 648 | cookie3 cookie; |
| 649 | cookieverf3 cookieverf; |
| 650 | count3 dircount; |
| 651 | count3 maxcount; |
| 652 | }; |
| 653 | |
| 654 | struct entryplus3 { |
| 655 | fileid3 fileid; |
| 656 | filename3 name; |
| 657 | cookie3 cookie; |
| 658 | post_op_attr name_attributes; |
| 659 | post_op_fh3 name_handle; |
| 660 | entryplus3 *nextentry; |
| 661 | }; |
| 662 | |
| 663 | struct dirlistplus3 { |
| 664 | entryplus3 *entries; |
| 665 | bool eof; |
| 666 | }; |
| 667 | |
| 668 | struct READDIRPLUS3resok { |
| 669 | post_op_attr dir_attributes; |
| 670 | cookieverf3 cookieverf; |
| 671 | dirlistplus3 reply; |
| 672 | }; |
| 673 | |
| 674 | |
| 675 | struct READDIRPLUS3resfail { |
| 676 | post_op_attr dir_attributes; |
| 677 | }; |
| 678 | |
| 679 | union READDIRPLUS3res switch (nfsstat3 status) { |
| 680 | case NFS3_OK: |
| 681 | READDIRPLUS3resok resok; |
| 682 | default: |
| 683 | READDIRPLUS3resfail resfail; |
| 684 | }; |
| 685 | |
| 686 | struct READDIR3args { |
| 687 | nfs_fh3 dir; |
| 688 | cookie3 cookie; |
| 689 | cookieverf3 cookieverf; |
| 690 | count3 count; |
| 691 | }; |
| 692 | |
| 693 | |
| 694 | struct entry3 { |
| 695 | fileid3 fileid; |
| 696 | filename3 name; |
| 697 | cookie3 cookie; |
| 698 | entry3 *nextentry; |
| 699 | }; |
| 700 | |
| 701 | struct dirlist3 { |
| 702 | entry3 *entries; |
| 703 | bool eof; |
| 704 | }; |
| 705 | |
| 706 | struct READDIR3resok { |
| 707 | post_op_attr dir_attributes; |
| 708 | cookieverf3 cookieverf; |
| 709 | dirlist3 reply; |
| 710 | }; |
| 711 | |
| 712 | struct READDIR3resfail { |
| 713 | post_op_attr dir_attributes; |
| 714 | }; |
| 715 | |
| 716 | union READDIR3res switch (nfsstat3 status) { |
| 717 | case NFS3_OK: |
| 718 | READDIR3resok resok; |
| 719 | default: |
| 720 | READDIR3resfail resfail; |
| 721 | }; |
| 722 | |
| 723 | struct LINK3args { |
| 724 | nfs_fh3 file; |
| 725 | diropargs3 link; |
| 726 | }; |
| 727 | |
| 728 | struct LINK3resok { |
| 729 | post_op_attr file_attributes; |
| 730 | wcc_data linkdir_wcc; |
| 731 | }; |
| 732 | |
| 733 | struct LINK3resfail { |
| 734 | post_op_attr file_attributes; |
| 735 | wcc_data linkdir_wcc; |
| 736 | }; |
| 737 | |
| 738 | union LINK3res switch (nfsstat3 status) { |
| 739 | case NFS3_OK: |
| 740 | LINK3resok resok; |
| 741 | default: |
| 742 | LINK3resfail resfail; |
| 743 | }; |
| 744 | |
| 745 | union sattrguard3 switch (bool check) { |
| 746 | case TRUE: |
| 747 | nfstime3 obj_ctime; |
| 748 | case FALSE: |
| 749 | void; |
| 750 | }; |
| 751 | |
| 752 | struct SETATTR3args { |
| 753 | nfs_fh3 object; |
| 754 | sattr3 new_attributes; |
| 755 | sattrguard3 guard; |
| 756 | }; |
| 757 | |
| 758 | struct SETATTR3resok { |
| 759 | wcc_data obj_wcc; |
| 760 | }; |
| 761 | |
| 762 | struct SETATTR3resfail { |
| 763 | wcc_data obj_wcc; |
| 764 | }; |
| 765 | |
| 766 | union SETATTR3res switch (nfsstat3 status) { |
| 767 | case NFS3_OK: |
| 768 | SETATTR3resok resok; |
| 769 | default: |
| 770 | SETATTR3resfail resfail; |
| 771 | }; |
| 772 | |
| 773 | program NFS_PROGRAM { |
| 774 | version NFS_V3 { |
| 775 | void |
| 776 | NFS3_NULL(void) = 0; |
| 777 | |
| 778 | GETATTR3res |
| 779 | NFS3_GETATTR(GETATTR3args) = 1; |
| 780 | |
| 781 | SETATTR3res |
| 782 | NFS3_SETATTR(SETATTR3args) = 2; |
| 783 | |
| 784 | LOOKUP3res |
| 785 | NFS3_LOOKUP(LOOKUP3args) = 3; |
| 786 | |
| 787 | ACCESS3res |
| 788 | NFS3_ACCESS(ACCESS3args) = 4; |
| 789 | |
| 790 | READLINK3res |
| 791 | NFS3_READLINK(READLINK3args) = 5; |
| 792 | |
| 793 | READ3res |
| 794 | NFS3_READ(READ3args) = 6; |
| 795 | |
| 796 | WRITE3res |
| 797 | NFS3_WRITE(WRITE3args) = 7; |
| 798 | |
| 799 | CREATE3res |
| 800 | NFS3_CREATE(CREATE3args) = 8; |
| 801 | |
| 802 | MKDIR3res |
| 803 | NFS3_MKDIR(MKDIR3args) = 9; |
| 804 | |
| 805 | SYMLINK3res |
| 806 | NFS3_SYMLINK(SYMLINK3args) = 10; |
| 807 | |
| 808 | /* MKNOD3res NFSPROC3_MKNOD(MKNOD3args) = 11;*/ |
| 809 | |
| 810 | REMOVE3res |
| 811 | NFS3_REMOVE(REMOVE3args) = 12; |
| 812 | |
| 813 | RMDIR3res |
| 814 | NFS3_RMDIR(RMDIR3args) = 13; |
| 815 | |
| 816 | RENAME3res |
| 817 | NFS3_RENAME(RENAME3args) = 14; |
| 818 | |
| 819 | LINK3res |
| 820 | NFS3_LINK(LINK3args) = 15; |
| 821 | |
| 822 | READDIR3res |
| 823 | NFS3_READDIR(READDIR3args) = 16; |
| 824 | |
| 825 | READDIRPLUS3res |
| 826 | NFS3_READDIRPLUS(READDIRPLUS3args) = 17; |
| 827 | |
| 828 | FSSTAT3res |
| 829 | NFS3_FSSTAT(FSSTAT3args) = 18; |
| 830 | |
| 831 | FSINFO3res |
| 832 | NFS3_FSINFO(FSINFO3args) = 19; |
| 833 | |
| 834 | PATHCONF3res |
| 835 | NFS3_PATHCONF(PATHCONF3args) = 20; |
| 836 | |
| 837 | COMMIT3res |
| 838 | NFS3_COMMIT(COMMIT3args) = 21; |
| 839 | } = 3; |
| 840 | } = 100003; |