1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 23 /* 24 * Copyright 2015 Nexenta Systems, Inc. All rights reserved. 25 */ 26 27 /* 28 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 29 * Use is subject to license terms. 30 */ 31 32 /* 33 * This file was initially generated using rpcgen. The rpcgen-erated 34 * code used tail recursion to implement linked lists which resulted 35 * in various crashes due to blown stacks. If the NFS4 protocol changes 36 * be sure to either use the NFS4-friendly rpcgen (doesn't use tail 37 * recursion) or do the xdr by hand. 38 * 39 * CAUTION: This file is kept in sync with it's uts counterpart: 40 * 41 * usr/src/uts/common/fs/nfs/nfs4_xdr.c 42 * 43 * However, it is not an exact copy. NEVER copy uts's nfs4_xdr.c 44 * directly over this file. Changes from the uts version must be 45 * integrated by hand into this file. 46 */ 47 48 #include <rpcsvc/nfs4_prot.h> 49 #include <nfs/nfs4.h> 50 #include <malloc.h> 51 52 #define IGNORE_RDWR_DATA 53 54 extern int nfs4_skip_bytes; 55 56 bool_t 57 xdr_nfs_ftype4(register XDR *xdrs, nfs_ftype4 *objp) 58 { 59 60 if (!xdr_enum(xdrs, (enum_t *)objp)) 61 return (FALSE); 62 return (TRUE); 63 } 64 65 bool_t 66 xdr_nfsstat4(register XDR *xdrs, nfsstat4 *objp) 67 { 68 69 if (!xdr_enum(xdrs, (enum_t *)objp)) 70 return (FALSE); 71 return (TRUE); 72 } 73 74 bool_t 75 xdr_bitmap4(register XDR *xdrs, bitmap4 *objp) 76 { 77 78 if (!xdr_array(xdrs, (char **)&objp->bitmap4_val, 79 (uint_t *)&objp->bitmap4_len, ~0, 80 sizeof (uint32_t), (xdrproc_t)xdr_uint32_t)) 81 return (FALSE); 82 return (TRUE); 83 } 84 85 bool_t 86 xdr_offset4(register XDR *xdrs, offset4 *objp) 87 { 88 89 if (!xdr_uint64_t(xdrs, objp)) 90 return (FALSE); 91 return (TRUE); 92 } 93 94 bool_t 95 xdr_count4(register XDR *xdrs, count4 *objp) 96 { 97 98 if (!xdr_uint32_t(xdrs, objp)) 99 return (FALSE); 100 return (TRUE); 101 } 102 103 bool_t 104 xdr_length4(register XDR *xdrs, length4 *objp) 105 { 106 107 if (!xdr_uint64_t(xdrs, objp)) 108 return (FALSE); 109 return (TRUE); 110 } 111 112 bool_t 113 xdr_clientid4(register XDR *xdrs, clientid4 *objp) 114 { 115 116 if (!xdr_uint64_t(xdrs, objp)) 117 return (FALSE); 118 return (TRUE); 119 } 120 121 bool_t 122 xdr_seqid4(register XDR *xdrs, seqid4 *objp) 123 { 124 125 if (!xdr_uint32_t(xdrs, objp)) 126 return (FALSE); 127 return (TRUE); 128 } 129 130 bool_t 131 xdr_utf8string(register XDR *xdrs, utf8string *objp) 132 { 133 134 if (!xdr_bytes(xdrs, (char **)&objp->utf8string_val, 135 (uint_t *)&objp->utf8string_len, NFS4_MAX_UTF8STRING)) 136 return (FALSE); 137 return (TRUE); 138 } 139 140 bool_t 141 xdr_component4(register XDR *xdrs, component4 *objp) 142 { 143 144 if (!xdr_utf8string(xdrs, objp)) 145 return (FALSE); 146 return (TRUE); 147 } 148 149 bool_t 150 xdr_pathname4(register XDR *xdrs, pathname4 *objp) 151 { 152 153 if (!xdr_array(xdrs, (char **)&objp->pathname4_val, 154 (uint_t *)&objp->pathname4_len, NFS4_MAX_PATHNAME4, 155 sizeof (component4), (xdrproc_t)xdr_component4)) 156 return (FALSE); 157 return (TRUE); 158 } 159 160 bool_t 161 xdr_nfs_cookie4(register XDR *xdrs, nfs_cookie4 *objp) 162 { 163 164 if (!xdr_uint64_t(xdrs, objp)) 165 return (FALSE); 166 return (TRUE); 167 } 168 169 bool_t 170 xdr_linktext4(register XDR *xdrs, linktext4 *objp) 171 { 172 173 if (!xdr_bytes(xdrs, (char **)&objp->linktext4_val, 174 (uint_t *)&objp->linktext4_len, NFS4_MAX_LINKTEXT4)) 175 return (FALSE); 176 return (TRUE); 177 } 178 179 bool_t 180 xdr_ascii_REQUIRED4(register XDR *xdrs, ascii_REQUIRED4 *objp) 181 { 182 183 if (!xdr_utf8string(xdrs, objp)) 184 return (FALSE); 185 return (TRUE); 186 } 187 188 bool_t 189 xdr_sec_oid4(register XDR *xdrs, sec_oid4 *objp) 190 { 191 192 if (!xdr_bytes(xdrs, (char **)&objp->sec_oid4_val, 193 (uint_t *)&objp->sec_oid4_len, NFS4_MAX_SECOID4)) 194 return (FALSE); 195 return (TRUE); 196 } 197 198 bool_t 199 xdr_qop4(register XDR *xdrs, qop4 *objp) 200 { 201 202 if (!xdr_uint32_t(xdrs, objp)) 203 return (FALSE); 204 return (TRUE); 205 } 206 207 bool_t 208 xdr_mode4(register XDR *xdrs, mode4 *objp) 209 { 210 211 if (!xdr_uint32_t(xdrs, objp)) 212 return (FALSE); 213 return (TRUE); 214 } 215 216 bool_t 217 xdr_changeid4(register XDR *xdrs, changeid4 *objp) 218 { 219 220 if (!xdr_uint64_t(xdrs, objp)) 221 return (FALSE); 222 return (TRUE); 223 } 224 225 bool_t 226 xdr_verifier4(register XDR *xdrs, verifier4 objp) 227 { 228 229 if (!xdr_opaque(xdrs, objp, NFS4_VERIFIER_SIZE)) 230 return (FALSE); 231 return (TRUE); 232 } 233 234 bool_t 235 xdr_nfstime4(register XDR *xdrs, nfstime4 *objp) 236 { 237 238 if (!xdr_int64_t(xdrs, &objp->seconds)) 239 return (FALSE); 240 if (!xdr_uint32_t(xdrs, &objp->nseconds)) 241 return (FALSE); 242 return (TRUE); 243 } 244 245 bool_t 246 xdr_time_how4(register XDR *xdrs, time_how4 *objp) 247 { 248 249 if (!xdr_enum(xdrs, (enum_t *)objp)) 250 return (FALSE); 251 return (TRUE); 252 } 253 254 bool_t 255 xdr_settime4(register XDR *xdrs, settime4 *objp) 256 { 257 258 if (!xdr_time_how4(xdrs, &objp->set_it)) 259 return (FALSE); 260 switch (objp->set_it) { 261 case SET_TO_CLIENT_TIME4: 262 if (!xdr_nfstime4(xdrs, &objp->settime4_u.time)) 263 return (FALSE); 264 break; 265 } 266 return (TRUE); 267 } 268 269 bool_t 270 xdr_nfs_fh4(register XDR *xdrs, nfs_fh4 *objp) 271 { 272 273 if (!xdr_bytes(xdrs, (char **)&objp->nfs_fh4_val, 274 (uint_t *)&objp->nfs_fh4_len, NFS4_FHSIZE)) 275 return (FALSE); 276 return (TRUE); 277 } 278 279 bool_t 280 xdr_fsid4(register XDR *xdrs, fsid4 *objp) 281 { 282 283 if (!xdr_uint64_t(xdrs, &objp->major)) 284 return (FALSE); 285 if (!xdr_uint64_t(xdrs, &objp->minor)) 286 return (FALSE); 287 return (TRUE); 288 } 289 290 bool_t 291 xdr_fs_location4(register XDR *xdrs, fs_location4 *objp) 292 { 293 294 if (!xdr_array(xdrs, (char **)&objp->server.server_val, 295 (uint_t *)&objp->server.server_len, ~0, 296 sizeof (utf8string), (xdrproc_t)xdr_utf8string)) 297 return (FALSE); 298 if (!xdr_pathname4(xdrs, &objp->rootpath)) 299 return (FALSE); 300 return (TRUE); 301 } 302 303 bool_t 304 xdr_fs_locations4(register XDR *xdrs, fs_locations4 *objp) 305 { 306 307 if (!xdr_pathname4(xdrs, &objp->fs_root)) 308 return (FALSE); 309 if (!xdr_array(xdrs, (char **)&objp->locations.locations_val, 310 (uint_t *)&objp->locations.locations_len, ~0, 311 sizeof (fs_location4), (xdrproc_t)xdr_fs_location4)) 312 return (FALSE); 313 return (TRUE); 314 } 315 316 bool_t 317 xdr_acetype4(register XDR *xdrs, acetype4 *objp) 318 { 319 320 if (!xdr_u_int(xdrs, objp)) 321 return (FALSE); 322 return (TRUE); 323 } 324 325 bool_t 326 xdr_aceflag4(register XDR *xdrs, aceflag4 *objp) 327 { 328 329 if (!xdr_u_int(xdrs, objp)) 330 return (FALSE); 331 return (TRUE); 332 } 333 334 bool_t 335 xdr_acemask4(register XDR *xdrs, acemask4 *objp) 336 { 337 338 if (!xdr_u_int(xdrs, objp)) 339 return (FALSE); 340 return (TRUE); 341 } 342 343 bool_t 344 xdr_nfsace4(register XDR *xdrs, nfsace4 *objp) 345 { 346 if (!xdr_acetype4(xdrs, &objp->type)) 347 return (FALSE); 348 if (!xdr_aceflag4(xdrs, &objp->flag)) 349 return (FALSE); 350 if (!xdr_acemask4(xdrs, &objp->access_mask)) 351 return (FALSE); 352 if (xdrs->x_op == XDR_DECODE) { 353 objp->who.utf8string_val = NULL; 354 objp->who.utf8string_len = 0; 355 } 356 return (xdr_bytes(xdrs, (char **)&objp->who.utf8string_val, 357 (uint_t *)&objp->who.utf8string_len, 358 NFS4_MAX_UTF8STRING)); 359 } 360 361 bool_t 362 xdr_specdata4(register XDR *xdrs, specdata4 *objp) 363 { 364 365 if (!xdr_uint32_t(xdrs, &objp->specdata1)) 366 return (FALSE); 367 if (!xdr_uint32_t(xdrs, &objp->specdata2)) 368 return (FALSE); 369 return (TRUE); 370 } 371 372 bool_t 373 xdr_fattr4_supported_attrs(register XDR *xdrs, fattr4_supported_attrs *objp) 374 { 375 376 if (!xdr_bitmap4(xdrs, objp)) 377 return (FALSE); 378 return (TRUE); 379 } 380 381 bool_t 382 xdr_fattr4_type(register XDR *xdrs, fattr4_type *objp) 383 { 384 385 if (!xdr_nfs_ftype4(xdrs, objp)) 386 return (FALSE); 387 return (TRUE); 388 } 389 390 bool_t 391 xdr_fattr4_fh_expire_type(register XDR *xdrs, fattr4_fh_expire_type *objp) 392 { 393 394 if (!xdr_uint32_t(xdrs, objp)) 395 return (FALSE); 396 return (TRUE); 397 } 398 399 bool_t 400 xdr_fattr4_change(register XDR *xdrs, fattr4_change *objp) 401 { 402 403 if (!xdr_changeid4(xdrs, objp)) 404 return (FALSE); 405 return (TRUE); 406 } 407 408 bool_t 409 xdr_fattr4_size(register XDR *xdrs, fattr4_size *objp) 410 { 411 412 if (!xdr_uint64_t(xdrs, objp)) 413 return (FALSE); 414 return (TRUE); 415 } 416 417 bool_t 418 xdr_fattr4_link_support(register XDR *xdrs, fattr4_link_support *objp) 419 { 420 421 if (!xdr_bool(xdrs, objp)) 422 return (FALSE); 423 return (TRUE); 424 } 425 426 bool_t 427 xdr_fattr4_symlink_support(register XDR *xdrs, fattr4_symlink_support *objp) 428 { 429 430 if (!xdr_bool(xdrs, objp)) 431 return (FALSE); 432 return (TRUE); 433 } 434 435 bool_t 436 xdr_fattr4_named_attr(register XDR *xdrs, fattr4_named_attr *objp) 437 { 438 439 if (!xdr_bool(xdrs, objp)) 440 return (FALSE); 441 return (TRUE); 442 } 443 444 bool_t 445 xdr_fattr4_fsid(register XDR *xdrs, fattr4_fsid *objp) 446 { 447 448 if (!xdr_fsid4(xdrs, objp)) 449 return (FALSE); 450 return (TRUE); 451 } 452 453 bool_t 454 xdr_fattr4_unique_handles(register XDR *xdrs, fattr4_unique_handles *objp) 455 { 456 457 if (!xdr_bool(xdrs, objp)) 458 return (FALSE); 459 return (TRUE); 460 } 461 462 bool_t 463 xdr_fattr4_lease_time(register XDR *xdrs, fattr4_lease_time *objp) 464 { 465 466 if (!xdr_uint32_t(xdrs, objp)) 467 return (FALSE); 468 return (TRUE); 469 } 470 471 bool_t 472 xdr_fattr4_rdattr_error(register XDR *xdrs, fattr4_rdattr_error *objp) 473 { 474 475 if (!xdr_nfsstat4(xdrs, objp)) 476 return (FALSE); 477 return (TRUE); 478 } 479 480 bool_t 481 xdr_fattr4_acl(register XDR *xdrs, fattr4_acl *objp) 482 { 483 484 if (!xdr_array(xdrs, (char **)&objp->fattr4_acl_val, 485 (uint_t *)&objp->fattr4_acl_len, ~0, 486 sizeof (nfsace4), (xdrproc_t)xdr_nfsace4)) 487 return (FALSE); 488 return (TRUE); 489 } 490 491 bool_t 492 xdr_fattr4_aclsupport(register XDR *xdrs, fattr4_aclsupport *objp) 493 { 494 495 if (!xdr_uint32_t(xdrs, objp)) 496 return (FALSE); 497 return (TRUE); 498 } 499 500 bool_t 501 xdr_fattr4_archive(register XDR *xdrs, fattr4_archive *objp) 502 { 503 504 if (!xdr_bool(xdrs, objp)) 505 return (FALSE); 506 return (TRUE); 507 } 508 509 bool_t 510 xdr_fattr4_cansettime(register XDR *xdrs, fattr4_cansettime *objp) 511 { 512 513 if (!xdr_bool(xdrs, objp)) 514 return (FALSE); 515 return (TRUE); 516 } 517 518 bool_t 519 xdr_fattr4_case_insensitive(register XDR *xdrs, fattr4_case_insensitive *objp) 520 { 521 522 if (!xdr_bool(xdrs, objp)) 523 return (FALSE); 524 return (TRUE); 525 } 526 527 bool_t 528 xdr_fattr4_case_preserving(register XDR *xdrs, fattr4_case_preserving *objp) 529 { 530 531 if (!xdr_bool(xdrs, objp)) 532 return (FALSE); 533 return (TRUE); 534 } 535 536 bool_t 537 xdr_fattr4_chown_restricted(register XDR *xdrs, fattr4_chown_restricted *objp) 538 { 539 540 if (!xdr_bool(xdrs, objp)) 541 return (FALSE); 542 return (TRUE); 543 } 544 545 bool_t 546 xdr_fattr4_fileid(register XDR *xdrs, fattr4_fileid *objp) 547 { 548 549 if (!xdr_uint64_t(xdrs, objp)) 550 return (FALSE); 551 return (TRUE); 552 } 553 554 bool_t 555 xdr_fattr4_files_avail(register XDR *xdrs, fattr4_files_avail *objp) 556 { 557 558 if (!xdr_uint64_t(xdrs, objp)) 559 return (FALSE); 560 return (TRUE); 561 } 562 563 bool_t 564 xdr_fattr4_filehandle(register XDR *xdrs, fattr4_filehandle *objp) 565 { 566 567 if (!xdr_nfs_fh4(xdrs, objp)) 568 return (FALSE); 569 return (TRUE); 570 } 571 572 bool_t 573 xdr_fattr4_files_free(register XDR *xdrs, fattr4_files_free *objp) 574 { 575 576 if (!xdr_uint64_t(xdrs, objp)) 577 return (FALSE); 578 return (TRUE); 579 } 580 581 bool_t 582 xdr_fattr4_files_total(register XDR *xdrs, fattr4_files_total *objp) 583 { 584 585 if (!xdr_uint64_t(xdrs, objp)) 586 return (FALSE); 587 return (TRUE); 588 } 589 590 bool_t 591 xdr_fattr4_fs_locations(register XDR *xdrs, fattr4_fs_locations *objp) 592 { 593 594 if (!xdr_fs_locations4(xdrs, objp)) 595 return (FALSE); 596 return (TRUE); 597 } 598 599 bool_t 600 xdr_fattr4_hidden(register XDR *xdrs, fattr4_hidden *objp) 601 { 602 603 if (!xdr_bool(xdrs, objp)) 604 return (FALSE); 605 return (TRUE); 606 } 607 608 bool_t 609 xdr_fattr4_homogeneous(register XDR *xdrs, fattr4_homogeneous *objp) 610 { 611 612 if (!xdr_bool(xdrs, objp)) 613 return (FALSE); 614 return (TRUE); 615 } 616 617 bool_t 618 xdr_fattr4_maxfilesize(register XDR *xdrs, fattr4_maxfilesize *objp) 619 { 620 621 if (!xdr_uint64_t(xdrs, objp)) 622 return (FALSE); 623 return (TRUE); 624 } 625 626 bool_t 627 xdr_fattr4_maxlink(register XDR *xdrs, fattr4_maxlink *objp) 628 { 629 630 if (!xdr_uint32_t(xdrs, objp)) 631 return (FALSE); 632 return (TRUE); 633 } 634 635 bool_t 636 xdr_fattr4_maxname(register XDR *xdrs, fattr4_maxname *objp) 637 { 638 639 if (!xdr_uint32_t(xdrs, objp)) 640 return (FALSE); 641 return (TRUE); 642 } 643 644 bool_t 645 xdr_fattr4_maxread(register XDR *xdrs, fattr4_maxread *objp) 646 { 647 648 if (!xdr_uint64_t(xdrs, objp)) 649 return (FALSE); 650 return (TRUE); 651 } 652 653 bool_t 654 xdr_fattr4_maxwrite(register XDR *xdrs, fattr4_maxwrite *objp) 655 { 656 657 if (!xdr_uint64_t(xdrs, objp)) 658 return (FALSE); 659 return (TRUE); 660 } 661 662 bool_t 663 xdr_fattr4_mimetype(register XDR *xdrs, fattr4_mimetype *objp) 664 { 665 666 if (!xdr_ascii_REQUIRED4(xdrs, objp)) 667 return (FALSE); 668 return (TRUE); 669 } 670 671 bool_t 672 xdr_fattr4_mode(register XDR *xdrs, fattr4_mode *objp) 673 { 674 675 if (!xdr_mode4(xdrs, objp)) 676 return (FALSE); 677 return (TRUE); 678 } 679 680 bool_t 681 xdr_fattr4_mounted_on_fileid(register XDR *xdrs, fattr4_mounted_on_fileid *objp) 682 { 683 684 if (!xdr_uint64_t(xdrs, objp)) 685 return (FALSE); 686 return (TRUE); 687 } 688 689 bool_t 690 xdr_fattr4_no_trunc(register XDR *xdrs, fattr4_no_trunc *objp) 691 { 692 693 if (!xdr_bool(xdrs, objp)) 694 return (FALSE); 695 return (TRUE); 696 } 697 698 bool_t 699 xdr_fattr4_numlinks(register XDR *xdrs, fattr4_numlinks *objp) 700 { 701 702 if (!xdr_uint32_t(xdrs, objp)) 703 return (FALSE); 704 return (TRUE); 705 } 706 707 bool_t 708 xdr_fattr4_owner(register XDR *xdrs, fattr4_owner *objp) 709 { 710 711 if (!xdr_utf8string(xdrs, objp)) 712 return (FALSE); 713 return (TRUE); 714 } 715 716 bool_t 717 xdr_fattr4_owner_group(register XDR *xdrs, fattr4_owner_group *objp) 718 { 719 720 if (!xdr_utf8string(xdrs, objp)) 721 return (FALSE); 722 return (TRUE); 723 } 724 725 bool_t 726 xdr_fattr4_quota_avail_hard(register XDR *xdrs, fattr4_quota_avail_hard *objp) 727 { 728 729 if (!xdr_uint64_t(xdrs, objp)) 730 return (FALSE); 731 return (TRUE); 732 } 733 734 bool_t 735 xdr_fattr4_quota_avail_soft(register XDR *xdrs, fattr4_quota_avail_soft *objp) 736 { 737 738 if (!xdr_uint64_t(xdrs, objp)) 739 return (FALSE); 740 return (TRUE); 741 } 742 743 bool_t 744 xdr_fattr4_quota_used(register XDR *xdrs, fattr4_quota_used *objp) 745 { 746 747 if (!xdr_uint64_t(xdrs, objp)) 748 return (FALSE); 749 return (TRUE); 750 } 751 752 bool_t 753 xdr_fattr4_rawdev(register XDR *xdrs, fattr4_rawdev *objp) 754 { 755 756 if (!xdr_specdata4(xdrs, objp)) 757 return (FALSE); 758 return (TRUE); 759 } 760 761 bool_t 762 xdr_fattr4_space_avail(register XDR *xdrs, fattr4_space_avail *objp) 763 { 764 765 if (!xdr_uint64_t(xdrs, objp)) 766 return (FALSE); 767 return (TRUE); 768 } 769 770 bool_t 771 xdr_fattr4_space_free(register XDR *xdrs, fattr4_space_free *objp) 772 { 773 774 if (!xdr_uint64_t(xdrs, objp)) 775 return (FALSE); 776 return (TRUE); 777 } 778 779 bool_t 780 xdr_fattr4_space_total(register XDR *xdrs, fattr4_space_total *objp) 781 { 782 783 if (!xdr_uint64_t(xdrs, objp)) 784 return (FALSE); 785 return (TRUE); 786 } 787 788 bool_t 789 xdr_fattr4_space_used(register XDR *xdrs, fattr4_space_used *objp) 790 { 791 792 if (!xdr_uint64_t(xdrs, objp)) 793 return (FALSE); 794 return (TRUE); 795 } 796 797 bool_t 798 xdr_fattr4_system(register XDR *xdrs, fattr4_system *objp) 799 { 800 801 if (!xdr_bool(xdrs, objp)) 802 return (FALSE); 803 return (TRUE); 804 } 805 806 bool_t 807 xdr_fattr4_time_access(register XDR *xdrs, fattr4_time_access *objp) 808 { 809 810 if (!xdr_nfstime4(xdrs, objp)) 811 return (FALSE); 812 return (TRUE); 813 } 814 815 bool_t 816 xdr_fattr4_time_access_set(register XDR *xdrs, fattr4_time_access_set *objp) 817 { 818 819 if (!xdr_settime4(xdrs, objp)) 820 return (FALSE); 821 return (TRUE); 822 } 823 824 bool_t 825 xdr_fattr4_time_backup(register XDR *xdrs, fattr4_time_backup *objp) 826 { 827 828 if (!xdr_nfstime4(xdrs, objp)) 829 return (FALSE); 830 return (TRUE); 831 } 832 833 bool_t 834 xdr_fattr4_time_create(register XDR *xdrs, fattr4_time_create *objp) 835 { 836 837 if (!xdr_nfstime4(xdrs, objp)) 838 return (FALSE); 839 return (TRUE); 840 } 841 842 bool_t 843 xdr_fattr4_time_delta(register XDR *xdrs, fattr4_time_delta *objp) 844 { 845 846 if (!xdr_nfstime4(xdrs, objp)) 847 return (FALSE); 848 return (TRUE); 849 } 850 851 bool_t 852 xdr_fattr4_time_metadata(register XDR *xdrs, fattr4_time_metadata *objp) 853 { 854 855 if (!xdr_nfstime4(xdrs, objp)) 856 return (FALSE); 857 return (TRUE); 858 } 859 860 bool_t 861 xdr_fattr4_time_modify(register XDR *xdrs, fattr4_time_modify *objp) 862 { 863 864 if (!xdr_nfstime4(xdrs, objp)) 865 return (FALSE); 866 return (TRUE); 867 } 868 869 bool_t 870 xdr_fattr4_time_modify_set(register XDR *xdrs, fattr4_time_modify_set *objp) 871 { 872 873 if (!xdr_settime4(xdrs, objp)) 874 return (FALSE); 875 return (TRUE); 876 } 877 878 bool_t 879 xdr_attrlist4(register XDR *xdrs, attrlist4 *objp) 880 { 881 882 if (!xdr_bytes(xdrs, (char **)&objp->attrlist4_val, 883 (uint_t *)&objp->attrlist4_len, ~0)) 884 return (FALSE); 885 return (TRUE); 886 } 887 888 bool_t 889 xdr_fattr4(register XDR *xdrs, fattr4 *objp) 890 { 891 892 if (!xdr_bitmap4(xdrs, &objp->attrmask)) 893 return (FALSE); 894 if (!xdr_attrlist4(xdrs, &objp->attr_vals)) 895 return (FALSE); 896 return (TRUE); 897 } 898 899 bool_t 900 xdr_change_info4(register XDR *xdrs, change_info4 *objp) 901 { 902 903 if (!xdr_bool(xdrs, &objp->atomic)) 904 return (FALSE); 905 if (!xdr_changeid4(xdrs, &objp->before)) 906 return (FALSE); 907 if (!xdr_changeid4(xdrs, &objp->after)) 908 return (FALSE); 909 return (TRUE); 910 } 911 912 bool_t 913 xdr_clientaddr4(register XDR *xdrs, clientaddr4 *objp) 914 { 915 916 if (!xdr_string(xdrs, &objp->na_r_netid, ~0)) 917 return (FALSE); 918 if (!xdr_string(xdrs, &objp->na_r_addr, ~0)) 919 return (FALSE); 920 return (TRUE); 921 } 922 923 bool_t 924 xdr_cb_client4(register XDR *xdrs, cb_client4 *objp) 925 { 926 927 if (!xdr_u_int(xdrs, &objp->cb_program)) 928 return (FALSE); 929 if (!xdr_clientaddr4(xdrs, &objp->cb_location)) 930 return (FALSE); 931 return (TRUE); 932 } 933 934 bool_t 935 xdr_stateid4(register XDR *xdrs, stateid4 *objp) 936 { 937 938 if (!xdr_uint32_t(xdrs, &objp->seqid)) 939 return (FALSE); 940 if (!xdr_opaque(xdrs, objp->other, 12)) 941 return (FALSE); 942 return (TRUE); 943 } 944 945 bool_t 946 xdr_nfs_client_id4(register XDR *xdrs, nfs_client_id4 *objp) 947 { 948 949 if (!xdr_verifier4(xdrs, objp->verifier)) 950 return (FALSE); 951 if (!xdr_bytes(xdrs, (char **)&objp->id.id_val, 952 (uint_t *)&objp->id.id_len, NFS4_OPAQUE_LIMIT)) 953 return (FALSE); 954 return (TRUE); 955 } 956 957 bool_t 958 xdr_open_owner4(register XDR *xdrs, open_owner4 *objp) 959 { 960 961 if (!xdr_clientid4(xdrs, &objp->clientid)) 962 return (FALSE); 963 if (!xdr_bytes(xdrs, (char **)&objp->owner.owner_val, 964 (uint_t *)&objp->owner.owner_len, NFS4_OPAQUE_LIMIT)) 965 return (FALSE); 966 return (TRUE); 967 } 968 969 bool_t 970 xdr_lock_owner4(register XDR *xdrs, lock_owner4 *objp) 971 { 972 973 if (!xdr_clientid4(xdrs, &objp->clientid)) 974 return (FALSE); 975 if (!xdr_bytes(xdrs, (char **)&objp->owner.owner_val, 976 (uint_t *)&objp->owner.owner_len, NFS4_OPAQUE_LIMIT)) 977 return (FALSE); 978 return (TRUE); 979 } 980 981 bool_t 982 xdr_nfs_lock_type4(register XDR *xdrs, nfs_lock_type4 *objp) 983 { 984 985 if (!xdr_enum(xdrs, (enum_t *)objp)) 986 return (FALSE); 987 return (TRUE); 988 } 989 990 bool_t 991 xdr_ACCESS4args(register XDR *xdrs, ACCESS4args *objp) 992 { 993 994 if (!xdr_uint32_t(xdrs, &objp->access)) 995 return (FALSE); 996 return (TRUE); 997 } 998 999 bool_t 1000 xdr_ACCESS4resok(register XDR *xdrs, ACCESS4resok *objp) 1001 { 1002 1003 if (!xdr_uint32_t(xdrs, &objp->supported)) 1004 return (FALSE); 1005 if (!xdr_uint32_t(xdrs, &objp->access)) 1006 return (FALSE); 1007 return (TRUE); 1008 } 1009 1010 bool_t 1011 xdr_ACCESS4res(register XDR *xdrs, ACCESS4res *objp) 1012 { 1013 1014 if (!xdr_nfsstat4(xdrs, &objp->status)) 1015 return (FALSE); 1016 switch (objp->status) { 1017 case NFS4_OK: 1018 if (!xdr_ACCESS4resok(xdrs, &objp->ACCESS4res_u.resok4)) 1019 return (FALSE); 1020 break; 1021 } 1022 return (TRUE); 1023 } 1024 1025 bool_t 1026 xdr_CLOSE4args(register XDR *xdrs, CLOSE4args *objp) 1027 { 1028 1029 if (!xdr_seqid4(xdrs, &objp->seqid)) 1030 return (FALSE); 1031 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 1032 return (FALSE); 1033 return (TRUE); 1034 } 1035 1036 bool_t 1037 xdr_CLOSE4res(register XDR *xdrs, CLOSE4res *objp) 1038 { 1039 1040 if (!xdr_nfsstat4(xdrs, &objp->status)) 1041 return (FALSE); 1042 switch (objp->status) { 1043 case NFS4_OK: 1044 if (!xdr_stateid4(xdrs, &objp->CLOSE4res_u.open_stateid)) 1045 return (FALSE); 1046 break; 1047 } 1048 return (TRUE); 1049 } 1050 1051 bool_t 1052 xdr_COMMIT4args(register XDR *xdrs, COMMIT4args *objp) 1053 { 1054 1055 if (!xdr_offset4(xdrs, &objp->offset)) 1056 return (FALSE); 1057 if (!xdr_count4(xdrs, &objp->count)) 1058 return (FALSE); 1059 return (TRUE); 1060 } 1061 1062 bool_t 1063 xdr_COMMIT4resok(register XDR *xdrs, COMMIT4resok *objp) 1064 { 1065 1066 if (!xdr_verifier4(xdrs, objp->writeverf)) 1067 return (FALSE); 1068 return (TRUE); 1069 } 1070 1071 bool_t 1072 xdr_COMMIT4res(register XDR *xdrs, COMMIT4res *objp) 1073 { 1074 1075 if (!xdr_nfsstat4(xdrs, &objp->status)) 1076 return (FALSE); 1077 switch (objp->status) { 1078 case NFS4_OK: 1079 if (!xdr_COMMIT4resok(xdrs, &objp->COMMIT4res_u.resok4)) 1080 return (FALSE); 1081 break; 1082 } 1083 return (TRUE); 1084 } 1085 1086 bool_t 1087 xdr_createtype4(register XDR *xdrs, createtype4 *objp) 1088 { 1089 1090 if (!xdr_nfs_ftype4(xdrs, &objp->type)) 1091 return (FALSE); 1092 switch (objp->type) { 1093 case NF4LNK: 1094 if (!xdr_linktext4(xdrs, &objp->createtype4_u.linkdata)) 1095 return (FALSE); 1096 break; 1097 case NF4BLK: 1098 case NF4CHR: 1099 if (!xdr_specdata4(xdrs, &objp->createtype4_u.devdata)) 1100 return (FALSE); 1101 break; 1102 case NF4SOCK: 1103 case NF4FIFO: 1104 case NF4DIR: 1105 break; 1106 } 1107 return (TRUE); 1108 } 1109 1110 bool_t 1111 xdr_CREATE4args(register XDR *xdrs, CREATE4args *objp) 1112 { 1113 1114 if (!xdr_createtype4(xdrs, &objp->objtype)) 1115 return (FALSE); 1116 if (!xdr_component4(xdrs, &objp->objname)) 1117 return (FALSE); 1118 if (!xdr_fattr4(xdrs, &objp->createattrs)) 1119 return (FALSE); 1120 return (TRUE); 1121 } 1122 1123 bool_t 1124 xdr_CREATE4resok(register XDR *xdrs, CREATE4resok *objp) 1125 { 1126 1127 if (!xdr_change_info4(xdrs, &objp->cinfo)) 1128 return (FALSE); 1129 if (!xdr_bitmap4(xdrs, &objp->attrset)) 1130 return (FALSE); 1131 return (TRUE); 1132 } 1133 1134 bool_t 1135 xdr_CREATE4res(register XDR *xdrs, CREATE4res *objp) 1136 { 1137 1138 if (!xdr_nfsstat4(xdrs, &objp->status)) 1139 return (FALSE); 1140 switch (objp->status) { 1141 case NFS4_OK: 1142 if (!xdr_CREATE4resok(xdrs, &objp->CREATE4res_u.resok4)) 1143 return (FALSE); 1144 break; 1145 } 1146 return (TRUE); 1147 } 1148 1149 bool_t 1150 xdr_DELEGPURGE4args(register XDR *xdrs, DELEGPURGE4args *objp) 1151 { 1152 1153 if (!xdr_clientid4(xdrs, &objp->clientid)) 1154 return (FALSE); 1155 return (TRUE); 1156 } 1157 1158 bool_t 1159 xdr_DELEGPURGE4res(register XDR *xdrs, DELEGPURGE4res *objp) 1160 { 1161 1162 if (!xdr_nfsstat4(xdrs, &objp->status)) 1163 return (FALSE); 1164 return (TRUE); 1165 } 1166 1167 bool_t 1168 xdr_DELEGRETURN4args(register XDR *xdrs, DELEGRETURN4args *objp) 1169 { 1170 1171 if (!xdr_stateid4(xdrs, &objp->deleg_stateid)) 1172 return (FALSE); 1173 return (TRUE); 1174 } 1175 1176 bool_t 1177 xdr_DELEGRETURN4res(register XDR *xdrs, DELEGRETURN4res *objp) 1178 { 1179 1180 if (!xdr_nfsstat4(xdrs, &objp->status)) 1181 return (FALSE); 1182 return (TRUE); 1183 } 1184 1185 bool_t 1186 xdr_GETATTR4args(register XDR *xdrs, GETATTR4args *objp) 1187 { 1188 1189 if (!xdr_bitmap4(xdrs, &objp->attr_request)) 1190 return (FALSE); 1191 return (TRUE); 1192 } 1193 1194 bool_t 1195 xdr_GETATTR4resok(register XDR *xdrs, GETATTR4resok *objp) 1196 { 1197 1198 if (!xdr_fattr4(xdrs, &objp->obj_attributes)) 1199 return (FALSE); 1200 return (TRUE); 1201 } 1202 1203 bool_t 1204 xdr_GETATTR4res(register XDR *xdrs, GETATTR4res *objp) 1205 { 1206 1207 if (!xdr_nfsstat4(xdrs, &objp->status)) 1208 return (FALSE); 1209 switch (objp->status) { 1210 case NFS4_OK: 1211 if (!xdr_GETATTR4resok(xdrs, &objp->GETATTR4res_u.resok4)) 1212 return (FALSE); 1213 break; 1214 } 1215 return (TRUE); 1216 } 1217 1218 bool_t 1219 xdr_GETFH4resok(register XDR *xdrs, GETFH4resok *objp) 1220 { 1221 1222 if (!xdr_nfs_fh4(xdrs, &objp->object)) 1223 return (FALSE); 1224 return (TRUE); 1225 } 1226 1227 bool_t 1228 xdr_GETFH4res(register XDR *xdrs, GETFH4res *objp) 1229 { 1230 1231 if (!xdr_nfsstat4(xdrs, &objp->status)) 1232 return (FALSE); 1233 switch (objp->status) { 1234 case NFS4_OK: 1235 if (!xdr_GETFH4resok(xdrs, &objp->GETFH4res_u.resok4)) 1236 return (FALSE); 1237 break; 1238 } 1239 return (TRUE); 1240 } 1241 1242 bool_t 1243 xdr_LINK4args(register XDR *xdrs, LINK4args *objp) 1244 { 1245 1246 if (!xdr_component4(xdrs, &objp->newname)) 1247 return (FALSE); 1248 return (TRUE); 1249 } 1250 1251 bool_t 1252 xdr_LINK4resok(register XDR *xdrs, LINK4resok *objp) 1253 { 1254 1255 if (!xdr_change_info4(xdrs, &objp->cinfo)) 1256 return (FALSE); 1257 return (TRUE); 1258 } 1259 1260 bool_t 1261 xdr_LINK4res(register XDR *xdrs, LINK4res *objp) 1262 { 1263 1264 if (!xdr_nfsstat4(xdrs, &objp->status)) 1265 return (FALSE); 1266 switch (objp->status) { 1267 case NFS4_OK: 1268 if (!xdr_LINK4resok(xdrs, &objp->LINK4res_u.resok4)) 1269 return (FALSE); 1270 break; 1271 } 1272 return (TRUE); 1273 } 1274 1275 bool_t 1276 xdr_open_to_lock_owner4(register XDR *xdrs, open_to_lock_owner4 *objp) 1277 { 1278 1279 if (!xdr_seqid4(xdrs, &objp->open_seqid)) 1280 return (FALSE); 1281 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 1282 return (FALSE); 1283 if (!xdr_seqid4(xdrs, &objp->lock_seqid)) 1284 return (FALSE); 1285 if (!xdr_lock_owner4(xdrs, &objp->lock_owner)) 1286 return (FALSE); 1287 return (TRUE); 1288 } 1289 1290 bool_t 1291 xdr_exist_lock_owner4(register XDR *xdrs, exist_lock_owner4 *objp) 1292 { 1293 1294 if (!xdr_stateid4(xdrs, &objp->lock_stateid)) 1295 return (FALSE); 1296 if (!xdr_seqid4(xdrs, &objp->lock_seqid)) 1297 return (FALSE); 1298 return (TRUE); 1299 } 1300 1301 bool_t 1302 xdr_locker4(register XDR *xdrs, locker4 *objp) 1303 { 1304 1305 if (!xdr_bool(xdrs, &objp->new_lock_owner)) 1306 return (FALSE); 1307 switch (objp->new_lock_owner) { 1308 case TRUE: 1309 if (!xdr_open_to_lock_owner4(xdrs, &objp->locker4_u.open_owner)) 1310 return (FALSE); 1311 break; 1312 case FALSE: 1313 if (!xdr_exist_lock_owner4(xdrs, &objp->locker4_u.lock_owner)) 1314 return (FALSE); 1315 break; 1316 default: 1317 return (FALSE); 1318 } 1319 return (TRUE); 1320 } 1321 1322 bool_t 1323 xdr_LOCK4args(register XDR *xdrs, LOCK4args *objp) 1324 { 1325 1326 if (!xdr_nfs_lock_type4(xdrs, &objp->locktype)) 1327 return (FALSE); 1328 if (!xdr_bool(xdrs, &objp->reclaim)) 1329 return (FALSE); 1330 if (!xdr_offset4(xdrs, &objp->offset)) 1331 return (FALSE); 1332 if (!xdr_length4(xdrs, &objp->length)) 1333 return (FALSE); 1334 if (!xdr_locker4(xdrs, &objp->locker)) 1335 return (FALSE); 1336 return (TRUE); 1337 } 1338 1339 bool_t 1340 xdr_LOCK4denied(register XDR *xdrs, LOCK4denied *objp) 1341 { 1342 1343 if (!xdr_offset4(xdrs, &objp->offset)) 1344 return (FALSE); 1345 if (!xdr_length4(xdrs, &objp->length)) 1346 return (FALSE); 1347 if (!xdr_nfs_lock_type4(xdrs, &objp->locktype)) 1348 return (FALSE); 1349 if (!xdr_lock_owner4(xdrs, &objp->owner)) 1350 return (FALSE); 1351 return (TRUE); 1352 } 1353 1354 bool_t 1355 xdr_LOCK4resok(register XDR *xdrs, LOCK4resok *objp) 1356 { 1357 1358 if (!xdr_stateid4(xdrs, &objp->lock_stateid)) 1359 return (FALSE); 1360 return (TRUE); 1361 } 1362 1363 bool_t 1364 xdr_LOCK4res(register XDR *xdrs, LOCK4res *objp) 1365 { 1366 1367 if (!xdr_nfsstat4(xdrs, &objp->status)) 1368 return (FALSE); 1369 switch (objp->status) { 1370 case NFS4_OK: 1371 if (!xdr_LOCK4resok(xdrs, &objp->LOCK4res_u.resok4)) 1372 return (FALSE); 1373 break; 1374 case NFS4ERR_DENIED: 1375 if (!xdr_LOCK4denied(xdrs, &objp->LOCK4res_u.denied)) 1376 return (FALSE); 1377 break; 1378 } 1379 return (TRUE); 1380 } 1381 1382 bool_t 1383 xdr_LOCKT4args(register XDR *xdrs, LOCKT4args *objp) 1384 { 1385 1386 if (!xdr_nfs_lock_type4(xdrs, &objp->locktype)) 1387 return (FALSE); 1388 if (!xdr_offset4(xdrs, &objp->offset)) 1389 return (FALSE); 1390 if (!xdr_length4(xdrs, &objp->length)) 1391 return (FALSE); 1392 if (!xdr_lock_owner4(xdrs, &objp->owner)) 1393 return (FALSE); 1394 return (TRUE); 1395 } 1396 1397 bool_t 1398 xdr_LOCKT4res(register XDR *xdrs, LOCKT4res *objp) 1399 { 1400 1401 if (!xdr_nfsstat4(xdrs, &objp->status)) 1402 return (FALSE); 1403 switch (objp->status) { 1404 case NFS4ERR_DENIED: 1405 if (!xdr_LOCK4denied(xdrs, &objp->LOCKT4res_u.denied)) 1406 return (FALSE); 1407 break; 1408 case NFS4_OK: 1409 break; 1410 } 1411 return (TRUE); 1412 } 1413 1414 bool_t 1415 xdr_LOCKU4args(register XDR *xdrs, LOCKU4args *objp) 1416 { 1417 1418 if (!xdr_nfs_lock_type4(xdrs, &objp->locktype)) 1419 return (FALSE); 1420 if (!xdr_seqid4(xdrs, &objp->seqid)) 1421 return (FALSE); 1422 if (!xdr_stateid4(xdrs, &objp->lock_stateid)) 1423 return (FALSE); 1424 if (!xdr_offset4(xdrs, &objp->offset)) 1425 return (FALSE); 1426 if (!xdr_length4(xdrs, &objp->length)) 1427 return (FALSE); 1428 return (TRUE); 1429 } 1430 1431 bool_t 1432 xdr_LOCKU4res(register XDR *xdrs, LOCKU4res *objp) 1433 { 1434 1435 if (!xdr_nfsstat4(xdrs, &objp->status)) 1436 return (FALSE); 1437 switch (objp->status) { 1438 case NFS4_OK: 1439 if (!xdr_stateid4(xdrs, &objp->LOCKU4res_u.lock_stateid)) 1440 return (FALSE); 1441 break; 1442 } 1443 return (TRUE); 1444 } 1445 1446 bool_t 1447 xdr_LOOKUP4args(register XDR *xdrs, LOOKUP4args *objp) 1448 { 1449 1450 if (!xdr_component4(xdrs, &objp->objname)) 1451 return (FALSE); 1452 return (TRUE); 1453 } 1454 1455 bool_t 1456 xdr_LOOKUP4res(register XDR *xdrs, LOOKUP4res *objp) 1457 { 1458 1459 if (!xdr_nfsstat4(xdrs, &objp->status)) 1460 return (FALSE); 1461 return (TRUE); 1462 } 1463 1464 bool_t 1465 xdr_LOOKUPP4res(register XDR *xdrs, LOOKUPP4res *objp) 1466 { 1467 1468 if (!xdr_nfsstat4(xdrs, &objp->status)) 1469 return (FALSE); 1470 return (TRUE); 1471 } 1472 1473 bool_t 1474 xdr_NVERIFY4args(register XDR *xdrs, NVERIFY4args *objp) 1475 { 1476 1477 if (!xdr_fattr4(xdrs, &objp->obj_attributes)) 1478 return (FALSE); 1479 return (TRUE); 1480 } 1481 1482 bool_t 1483 xdr_NVERIFY4res(register XDR *xdrs, NVERIFY4res *objp) 1484 { 1485 1486 if (!xdr_nfsstat4(xdrs, &objp->status)) 1487 return (FALSE); 1488 return (TRUE); 1489 } 1490 1491 bool_t 1492 xdr_createmode4(register XDR *xdrs, createmode4 *objp) 1493 { 1494 1495 if (!xdr_enum(xdrs, (enum_t *)objp)) 1496 return (FALSE); 1497 return (TRUE); 1498 } 1499 1500 bool_t 1501 xdr_createhow4(register XDR *xdrs, createhow4 *objp) 1502 { 1503 1504 if (!xdr_createmode4(xdrs, &objp->mode)) 1505 return (FALSE); 1506 switch (objp->mode) { 1507 case UNCHECKED4: 1508 case GUARDED4: 1509 if (!xdr_fattr4(xdrs, &objp->createhow4_u.createattrs)) 1510 return (FALSE); 1511 break; 1512 case EXCLUSIVE4: 1513 if (!xdr_verifier4(xdrs, objp->createhow4_u.createverf)) 1514 return (FALSE); 1515 break; 1516 default: 1517 return (FALSE); 1518 } 1519 return (TRUE); 1520 } 1521 1522 bool_t 1523 xdr_opentype4(register XDR *xdrs, opentype4 *objp) 1524 { 1525 1526 if (!xdr_enum(xdrs, (enum_t *)objp)) 1527 return (FALSE); 1528 return (TRUE); 1529 } 1530 1531 bool_t 1532 xdr_openflag4(register XDR *xdrs, openflag4 *objp) 1533 { 1534 1535 if (!xdr_opentype4(xdrs, &objp->opentype)) 1536 return (FALSE); 1537 switch (objp->opentype) { 1538 case OPEN4_CREATE: 1539 if (!xdr_createhow4(xdrs, &objp->openflag4_u.how)) 1540 return (FALSE); 1541 break; 1542 } 1543 return (TRUE); 1544 } 1545 1546 bool_t 1547 xdr_limit_by4(register XDR *xdrs, limit_by4 *objp) 1548 { 1549 1550 if (!xdr_enum(xdrs, (enum_t *)objp)) 1551 return (FALSE); 1552 return (TRUE); 1553 } 1554 1555 bool_t 1556 xdr_nfs_modified_limit4(register XDR *xdrs, nfs_modified_limit4 *objp) 1557 { 1558 1559 if (!xdr_uint32_t(xdrs, &objp->num_blocks)) 1560 return (FALSE); 1561 if (!xdr_uint32_t(xdrs, &objp->bytes_per_block)) 1562 return (FALSE); 1563 return (TRUE); 1564 } 1565 1566 bool_t 1567 xdr_nfs_space_limit4(register XDR *xdrs, nfs_space_limit4 *objp) 1568 { 1569 1570 if (!xdr_limit_by4(xdrs, &objp->limitby)) 1571 return (FALSE); 1572 switch (objp->limitby) { 1573 case NFS_LIMIT_SIZE: 1574 if (!xdr_uint64_t(xdrs, &objp->nfs_space_limit4_u.filesize)) 1575 return (FALSE); 1576 break; 1577 case NFS_LIMIT_BLOCKS: 1578 if (!xdr_nfs_modified_limit4(xdrs, &objp->nfs_space_limit4_u. 1579 mod_blocks)) 1580 return (FALSE); 1581 break; 1582 default: 1583 return (FALSE); 1584 } 1585 return (TRUE); 1586 } 1587 1588 bool_t 1589 xdr_open_delegation_type4(register XDR *xdrs, open_delegation_type4 *objp) 1590 { 1591 1592 if (!xdr_enum(xdrs, (enum_t *)objp)) 1593 return (FALSE); 1594 return (TRUE); 1595 } 1596 1597 bool_t 1598 xdr_open_claim_type4(register XDR *xdrs, open_claim_type4 *objp) 1599 { 1600 1601 if (!xdr_enum(xdrs, (enum_t *)objp)) 1602 return (FALSE); 1603 return (TRUE); 1604 } 1605 1606 bool_t 1607 xdr_open_claim_delegate_cur4(register XDR *xdrs, open_claim_delegate_cur4 *objp) 1608 { 1609 1610 if (!xdr_stateid4(xdrs, &objp->delegate_stateid)) 1611 return (FALSE); 1612 if (!xdr_component4(xdrs, &objp->file)) 1613 return (FALSE); 1614 return (TRUE); 1615 } 1616 1617 bool_t 1618 xdr_open_claim4(register XDR *xdrs, open_claim4 *objp) 1619 { 1620 1621 if (!xdr_open_claim_type4(xdrs, &objp->claim)) 1622 return (FALSE); 1623 switch (objp->claim) { 1624 case CLAIM_NULL: 1625 if (!xdr_component4(xdrs, &objp->open_claim4_u.file)) 1626 return (FALSE); 1627 break; 1628 case CLAIM_PREVIOUS: 1629 if (!xdr_open_delegation_type4(xdrs, &objp->open_claim4_u. 1630 delegate_type)) 1631 return (FALSE); 1632 break; 1633 case CLAIM_DELEGATE_CUR: 1634 if (!xdr_open_claim_delegate_cur4(xdrs, &objp->open_claim4_u. 1635 delegate_cur_info)) 1636 return (FALSE); 1637 break; 1638 case CLAIM_DELEGATE_PREV: 1639 if (!xdr_component4(xdrs, &objp->open_claim4_u. 1640 file_delegate_prev)) 1641 return (FALSE); 1642 break; 1643 default: 1644 return (FALSE); 1645 } 1646 return (TRUE); 1647 } 1648 1649 bool_t 1650 xdr_OPEN4args(register XDR *xdrs, OPEN4args *objp) 1651 { 1652 1653 if (!xdr_seqid4(xdrs, &objp->seqid)) 1654 return (FALSE); 1655 if (!xdr_uint32_t(xdrs, &objp->share_access)) 1656 return (FALSE); 1657 if (!xdr_uint32_t(xdrs, &objp->share_deny)) 1658 return (FALSE); 1659 if (!xdr_open_owner4(xdrs, &objp->owner)) 1660 return (FALSE); 1661 if (!xdr_openflag4(xdrs, &objp->openhow)) 1662 return (FALSE); 1663 if (!xdr_open_claim4(xdrs, &objp->claim)) 1664 return (FALSE); 1665 return (TRUE); 1666 } 1667 1668 bool_t 1669 xdr_open_read_delegation4(register XDR *xdrs, open_read_delegation4 *objp) 1670 { 1671 1672 if (!xdr_stateid4(xdrs, &objp->stateid)) 1673 return (FALSE); 1674 if (!xdr_bool(xdrs, &objp->recall)) 1675 return (FALSE); 1676 if (!xdr_nfsace4(xdrs, &objp->permissions)) 1677 return (FALSE); 1678 return (TRUE); 1679 } 1680 1681 bool_t 1682 xdr_open_write_delegation4(register XDR *xdrs, open_write_delegation4 *objp) 1683 { 1684 1685 if (!xdr_stateid4(xdrs, &objp->stateid)) 1686 return (FALSE); 1687 if (!xdr_bool(xdrs, &objp->recall)) 1688 return (FALSE); 1689 if (!xdr_nfs_space_limit4(xdrs, &objp->space_limit)) 1690 return (FALSE); 1691 if (!xdr_nfsace4(xdrs, &objp->permissions)) 1692 return (FALSE); 1693 return (TRUE); 1694 } 1695 1696 bool_t 1697 xdr_open_delegation4(register XDR *xdrs, open_delegation4 *objp) 1698 { 1699 1700 if (!xdr_open_delegation_type4(xdrs, &objp->delegation_type)) 1701 return (FALSE); 1702 switch (objp->delegation_type) { 1703 case OPEN_DELEGATE_NONE: 1704 break; 1705 case OPEN_DELEGATE_READ: 1706 if (!xdr_open_read_delegation4(xdrs, &objp->open_delegation4_u. 1707 read)) 1708 return (FALSE); 1709 break; 1710 case OPEN_DELEGATE_WRITE: 1711 if (!xdr_open_write_delegation4(xdrs, &objp->open_delegation4_u. 1712 write)) 1713 return (FALSE); 1714 break; 1715 default: 1716 return (FALSE); 1717 } 1718 return (TRUE); 1719 } 1720 1721 bool_t 1722 xdr_OPEN4resok(register XDR *xdrs, OPEN4resok *objp) 1723 { 1724 1725 if (!xdr_stateid4(xdrs, &objp->stateid)) 1726 return (FALSE); 1727 if (!xdr_change_info4(xdrs, &objp->cinfo)) 1728 return (FALSE); 1729 if (!xdr_uint32_t(xdrs, &objp->rflags)) 1730 return (FALSE); 1731 if (!xdr_bitmap4(xdrs, &objp->attrset)) 1732 return (FALSE); 1733 if (!xdr_open_delegation4(xdrs, &objp->delegation)) 1734 return (FALSE); 1735 return (TRUE); 1736 } 1737 1738 bool_t 1739 xdr_OPEN4res(register XDR *xdrs, OPEN4res *objp) 1740 { 1741 1742 if (!xdr_nfsstat4(xdrs, &objp->status)) 1743 return (FALSE); 1744 switch (objp->status) { 1745 case NFS4_OK: 1746 if (!xdr_OPEN4resok(xdrs, &objp->OPEN4res_u.resok4)) 1747 return (FALSE); 1748 break; 1749 } 1750 return (TRUE); 1751 } 1752 1753 bool_t 1754 xdr_OPENATTR4args(register XDR *xdrs, OPENATTR4args *objp) 1755 { 1756 1757 if (!xdr_bool(xdrs, &objp->createdir)) 1758 return (FALSE); 1759 return (TRUE); 1760 } 1761 1762 bool_t 1763 xdr_OPENATTR4res(register XDR *xdrs, OPENATTR4res *objp) 1764 { 1765 1766 if (!xdr_nfsstat4(xdrs, &objp->status)) 1767 return (FALSE); 1768 return (TRUE); 1769 } 1770 1771 bool_t 1772 xdr_OPEN_CONFIRM4args(register XDR *xdrs, OPEN_CONFIRM4args *objp) 1773 { 1774 1775 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 1776 return (FALSE); 1777 if (!xdr_seqid4(xdrs, &objp->seqid)) 1778 return (FALSE); 1779 return (TRUE); 1780 } 1781 1782 bool_t 1783 xdr_OPEN_CONFIRM4resok(register XDR *xdrs, OPEN_CONFIRM4resok *objp) 1784 { 1785 1786 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 1787 return (FALSE); 1788 return (TRUE); 1789 } 1790 1791 bool_t 1792 xdr_OPEN_CONFIRM4res(register XDR *xdrs, OPEN_CONFIRM4res *objp) 1793 { 1794 1795 if (!xdr_nfsstat4(xdrs, &objp->status)) 1796 return (FALSE); 1797 switch (objp->status) { 1798 case NFS4_OK: 1799 if (!xdr_OPEN_CONFIRM4resok(xdrs, &objp->OPEN_CONFIRM4res_u. 1800 resok4)) 1801 return (FALSE); 1802 break; 1803 } 1804 return (TRUE); 1805 } 1806 1807 bool_t 1808 xdr_OPEN_DOWNGRADE4args(register XDR *xdrs, OPEN_DOWNGRADE4args *objp) 1809 { 1810 1811 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 1812 return (FALSE); 1813 if (!xdr_seqid4(xdrs, &objp->seqid)) 1814 return (FALSE); 1815 if (!xdr_uint32_t(xdrs, &objp->share_access)) 1816 return (FALSE); 1817 if (!xdr_uint32_t(xdrs, &objp->share_deny)) 1818 return (FALSE); 1819 return (TRUE); 1820 } 1821 1822 bool_t 1823 xdr_OPEN_DOWNGRADE4resok(register XDR *xdrs, OPEN_DOWNGRADE4resok *objp) 1824 { 1825 1826 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 1827 return (FALSE); 1828 return (TRUE); 1829 } 1830 1831 bool_t 1832 xdr_OPEN_DOWNGRADE4res(register XDR *xdrs, OPEN_DOWNGRADE4res *objp) 1833 { 1834 1835 if (!xdr_nfsstat4(xdrs, &objp->status)) 1836 return (FALSE); 1837 switch (objp->status) { 1838 case NFS4_OK: 1839 if (!xdr_OPEN_DOWNGRADE4resok(xdrs, &objp->OPEN_DOWNGRADE4res_u. 1840 resok4)) 1841 return (FALSE); 1842 break; 1843 } 1844 return (TRUE); 1845 } 1846 1847 bool_t 1848 xdr_PUTFH4args(register XDR *xdrs, PUTFH4args *objp) 1849 { 1850 1851 if (!xdr_nfs_fh4(xdrs, &objp->object)) 1852 return (FALSE); 1853 return (TRUE); 1854 } 1855 1856 bool_t 1857 xdr_PUTFH4res(register XDR *xdrs, PUTFH4res *objp) 1858 { 1859 1860 if (!xdr_nfsstat4(xdrs, &objp->status)) 1861 return (FALSE); 1862 return (TRUE); 1863 } 1864 1865 bool_t 1866 xdr_PUTPUBFH4res(register XDR *xdrs, PUTPUBFH4res *objp) 1867 { 1868 1869 if (!xdr_nfsstat4(xdrs, &objp->status)) 1870 return (FALSE); 1871 return (TRUE); 1872 } 1873 1874 bool_t 1875 xdr_PUTROOTFH4res(register XDR *xdrs, PUTROOTFH4res *objp) 1876 { 1877 1878 if (!xdr_nfsstat4(xdrs, &objp->status)) 1879 return (FALSE); 1880 return (TRUE); 1881 } 1882 1883 bool_t 1884 xdr_READ4args(register XDR *xdrs, READ4args *objp) 1885 { 1886 1887 if (!xdr_stateid4(xdrs, &objp->stateid)) 1888 return (FALSE); 1889 if (!xdr_offset4(xdrs, &objp->offset)) 1890 return (FALSE); 1891 if (!xdr_count4(xdrs, &objp->count)) 1892 return (FALSE); 1893 return (TRUE); 1894 } 1895 1896 bool_t 1897 xdr_READ4resok(register XDR *xdrs, READ4resok *objp) 1898 { 1899 1900 if (!xdr_bool(xdrs, &objp->eof)) 1901 return (FALSE); 1902 1903 #ifdef IGNORE_RDWR_DATA 1904 /* 1905 * Try to get length of read, and if that 1906 * fails, default to 0. Don't return FALSE 1907 * because the other read info will not be 1908 * displayed. 1909 */ 1910 objp->data.data_val = NULL; 1911 if (!xdr_u_int(xdrs, &objp->data.data_len)) 1912 objp->data.data_len = 0; 1913 nfs4_skip_bytes = objp->data.data_len; 1914 #else 1915 if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, 1916 (uint_t *)&objp->data.data_len, ~0)) 1917 return (FALSE); 1918 #endif 1919 return (TRUE); 1920 } 1921 1922 bool_t 1923 xdr_READ4res(register XDR *xdrs, READ4res *objp) 1924 { 1925 1926 if (!xdr_nfsstat4(xdrs, &objp->status)) 1927 return (FALSE); 1928 switch (objp->status) { 1929 case NFS4_OK: 1930 if (!xdr_READ4resok(xdrs, &objp->READ4res_u.resok4)) 1931 return (FALSE); 1932 break; 1933 } 1934 return (TRUE); 1935 } 1936 1937 bool_t 1938 xdr_READDIR4args(register XDR *xdrs, READDIR4args *objp) 1939 { 1940 1941 if (!xdr_nfs_cookie4(xdrs, &objp->cookie)) 1942 return (FALSE); 1943 if (!xdr_verifier4(xdrs, objp->cookieverf)) 1944 return (FALSE); 1945 if (!xdr_count4(xdrs, &objp->dircount)) 1946 return (FALSE); 1947 if (!xdr_count4(xdrs, &objp->maxcount)) 1948 return (FALSE); 1949 if (!xdr_bitmap4(xdrs, &objp->attr_request)) 1950 return (FALSE); 1951 return (TRUE); 1952 } 1953 1954 bool_t 1955 xdr_entry4(register XDR *xdrs, entry4 *objp) 1956 { 1957 1958 entry4 *tmp_entry4; 1959 bool_t more_data = TRUE; 1960 bool_t first_objp = TRUE; 1961 1962 while (more_data) { 1963 1964 if (!xdr_nfs_cookie4(xdrs, &objp->cookie)) 1965 return (FALSE); 1966 if (!xdr_component4(xdrs, &objp->name)) 1967 return (FALSE); 1968 if (!xdr_fattr4(xdrs, &objp->attrs)) 1969 return (FALSE); 1970 1971 if (xdrs->x_op == XDR_DECODE) { 1972 1973 void bzero(); 1974 1975 if (!xdr_bool(xdrs, &more_data)) 1976 return (FALSE); 1977 1978 if (!more_data) { 1979 objp->nextentry = NULL; 1980 break; 1981 } 1982 1983 objp->nextentry = (entry4 *)mem_alloc(sizeof (entry4)); 1984 if (objp->nextentry == NULL) 1985 return (FALSE); 1986 bzero(objp->nextentry, sizeof (entry4)); 1987 objp = objp->nextentry; 1988 1989 } else if (xdrs->x_op == XDR_ENCODE) { 1990 objp = objp->nextentry; 1991 if (!objp) 1992 more_data = FALSE; 1993 1994 if (!xdr_bool(xdrs, &more_data)) 1995 return (FALSE); 1996 } else { 1997 tmp_entry4 = objp; 1998 objp = objp->nextentry; 1999 if (!objp) 2000 more_data = FALSE; 2001 if (!xdr_bool(xdrs, &more_data)) 2002 return (FALSE); 2003 if (!first_objp) 2004 mem_free(tmp_entry4, sizeof (entry4)); 2005 else 2006 first_objp = FALSE; 2007 } 2008 } 2009 return (TRUE); 2010 } 2011 2012 bool_t 2013 xdr_dirlist4(register XDR *xdrs, dirlist4 *objp) 2014 { 2015 2016 if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof (entry4), 2017 (xdrproc_t)xdr_entry4)) 2018 return (FALSE); 2019 if (!xdr_bool(xdrs, &objp->eof)) 2020 return (FALSE); 2021 return (TRUE); 2022 } 2023 2024 bool_t 2025 xdr_READDIR4resok(register XDR *xdrs, READDIR4resok *objp) 2026 { 2027 2028 if (!xdr_verifier4(xdrs, objp->cookieverf)) 2029 return (FALSE); 2030 if (!xdr_dirlist4(xdrs, &objp->reply)) 2031 return (FALSE); 2032 return (TRUE); 2033 } 2034 2035 bool_t 2036 xdr_READDIR4res(register XDR *xdrs, READDIR4res *objp) 2037 { 2038 2039 if (!xdr_nfsstat4(xdrs, &objp->status)) 2040 return (FALSE); 2041 switch (objp->status) { 2042 case NFS4_OK: 2043 if (!xdr_READDIR4resok(xdrs, &objp->READDIR4res_u.resok4)) 2044 return (FALSE); 2045 break; 2046 } 2047 return (TRUE); 2048 } 2049 2050 bool_t 2051 xdr_READLINK4resok(register XDR *xdrs, READLINK4resok *objp) 2052 { 2053 2054 if (!xdr_linktext4(xdrs, &objp->link)) 2055 return (FALSE); 2056 return (TRUE); 2057 } 2058 2059 bool_t 2060 xdr_READLINK4res(register XDR *xdrs, READLINK4res *objp) 2061 { 2062 2063 if (!xdr_nfsstat4(xdrs, &objp->status)) 2064 return (FALSE); 2065 switch (objp->status) { 2066 case NFS4_OK: 2067 if (!xdr_READLINK4resok(xdrs, &objp->READLINK4res_u.resok4)) 2068 return (FALSE); 2069 break; 2070 } 2071 return (TRUE); 2072 } 2073 2074 bool_t 2075 xdr_REMOVE4args(register XDR *xdrs, REMOVE4args *objp) 2076 { 2077 2078 if (!xdr_component4(xdrs, &objp->target)) 2079 return (FALSE); 2080 return (TRUE); 2081 } 2082 2083 bool_t 2084 xdr_REMOVE4resok(register XDR *xdrs, REMOVE4resok *objp) 2085 { 2086 2087 if (!xdr_change_info4(xdrs, &objp->cinfo)) 2088 return (FALSE); 2089 return (TRUE); 2090 } 2091 2092 bool_t 2093 xdr_REMOVE4res(register XDR *xdrs, REMOVE4res *objp) 2094 { 2095 2096 if (!xdr_nfsstat4(xdrs, &objp->status)) 2097 return (FALSE); 2098 switch (objp->status) { 2099 case NFS4_OK: 2100 if (!xdr_REMOVE4resok(xdrs, &objp->REMOVE4res_u.resok4)) 2101 return (FALSE); 2102 break; 2103 } 2104 return (TRUE); 2105 } 2106 2107 bool_t 2108 xdr_RENAME4args(register XDR *xdrs, RENAME4args *objp) 2109 { 2110 2111 if (!xdr_component4(xdrs, &objp->oldname)) 2112 return (FALSE); 2113 if (!xdr_component4(xdrs, &objp->newname)) 2114 return (FALSE); 2115 return (TRUE); 2116 } 2117 2118 bool_t 2119 xdr_RENAME4resok(register XDR *xdrs, RENAME4resok *objp) 2120 { 2121 2122 if (!xdr_change_info4(xdrs, &objp->source_cinfo)) 2123 return (FALSE); 2124 if (!xdr_change_info4(xdrs, &objp->target_cinfo)) 2125 return (FALSE); 2126 return (TRUE); 2127 } 2128 2129 bool_t 2130 xdr_RENAME4res(register XDR *xdrs, RENAME4res *objp) 2131 { 2132 2133 if (!xdr_nfsstat4(xdrs, &objp->status)) 2134 return (FALSE); 2135 switch (objp->status) { 2136 case NFS4_OK: 2137 if (!xdr_RENAME4resok(xdrs, &objp->RENAME4res_u.resok4)) 2138 return (FALSE); 2139 break; 2140 } 2141 return (TRUE); 2142 } 2143 2144 bool_t 2145 xdr_RENEW4args(register XDR *xdrs, RENEW4args *objp) 2146 { 2147 2148 if (!xdr_clientid4(xdrs, &objp->clientid)) 2149 return (FALSE); 2150 return (TRUE); 2151 } 2152 2153 bool_t 2154 xdr_RENEW4res(register XDR *xdrs, RENEW4res *objp) 2155 { 2156 2157 if (!xdr_nfsstat4(xdrs, &objp->status)) 2158 return (FALSE); 2159 return (TRUE); 2160 } 2161 2162 bool_t 2163 xdr_RESTOREFH4res(register XDR *xdrs, RESTOREFH4res *objp) 2164 { 2165 2166 if (!xdr_nfsstat4(xdrs, &objp->status)) 2167 return (FALSE); 2168 return (TRUE); 2169 } 2170 2171 bool_t 2172 xdr_SAVEFH4res(register XDR *xdrs, SAVEFH4res *objp) 2173 { 2174 2175 if (!xdr_nfsstat4(xdrs, &objp->status)) 2176 return (FALSE); 2177 return (TRUE); 2178 } 2179 2180 bool_t 2181 xdr_SECINFO4args(register XDR *xdrs, SECINFO4args *objp) 2182 { 2183 2184 if (!xdr_component4(xdrs, &objp->name)) 2185 return (FALSE); 2186 return (TRUE); 2187 } 2188 2189 bool_t 2190 xdr_rpc_gss_svc_t(register XDR *xdrs, rpc_gss_svc_t *objp) 2191 { 2192 2193 if (!xdr_enum(xdrs, (enum_t *)objp)) 2194 return (FALSE); 2195 return (TRUE); 2196 } 2197 2198 bool_t 2199 xdr_rpcsec_gss_info(register XDR *xdrs, rpcsec_gss_info *objp) 2200 { 2201 2202 if (!xdr_sec_oid4(xdrs, &objp->oid)) 2203 return (FALSE); 2204 if (!xdr_qop4(xdrs, &objp->qop)) 2205 return (FALSE); 2206 if (!xdr_rpc_gss_svc_t(xdrs, &objp->service)) 2207 return (FALSE); 2208 return (TRUE); 2209 } 2210 2211 bool_t 2212 xdr_secinfo4(register XDR *xdrs, secinfo4 *objp) 2213 { 2214 2215 if (!xdr_uint32_t(xdrs, &objp->flavor)) 2216 return (FALSE); 2217 switch (objp->flavor) { 2218 case RPCSEC_GSS: 2219 if (!xdr_rpcsec_gss_info(xdrs, &objp->secinfo4_u.flavor_info)) 2220 return (FALSE); 2221 break; 2222 } 2223 return (TRUE); 2224 } 2225 2226 bool_t 2227 xdr_SECINFO4resok(register XDR *xdrs, SECINFO4resok *objp) 2228 { 2229 2230 if (!xdr_array(xdrs, (char **)&objp->SECINFO4resok_val, 2231 (uint_t *)&objp->SECINFO4resok_len, ~0, 2232 sizeof (secinfo4), (xdrproc_t)xdr_secinfo4)) 2233 return (FALSE); 2234 return (TRUE); 2235 } 2236 2237 bool_t 2238 xdr_SECINFO4res(register XDR *xdrs, SECINFO4res *objp) 2239 { 2240 2241 if (!xdr_nfsstat4(xdrs, &objp->status)) 2242 return (FALSE); 2243 switch (objp->status) { 2244 case NFS4_OK: 2245 if (!xdr_SECINFO4resok(xdrs, &objp->SECINFO4res_u.resok4)) 2246 return (FALSE); 2247 break; 2248 } 2249 return (TRUE); 2250 } 2251 2252 bool_t 2253 xdr_SETATTR4args(register XDR *xdrs, SETATTR4args *objp) 2254 { 2255 2256 if (!xdr_stateid4(xdrs, &objp->stateid)) 2257 return (FALSE); 2258 if (!xdr_fattr4(xdrs, &objp->obj_attributes)) 2259 return (FALSE); 2260 return (TRUE); 2261 } 2262 2263 bool_t 2264 xdr_SETATTR4res(register XDR *xdrs, SETATTR4res *objp) 2265 { 2266 2267 if (!xdr_nfsstat4(xdrs, &objp->status)) 2268 return (FALSE); 2269 if (!xdr_bitmap4(xdrs, &objp->attrsset)) 2270 return (FALSE); 2271 return (TRUE); 2272 } 2273 2274 bool_t 2275 xdr_SETCLIENTID4args(register XDR *xdrs, SETCLIENTID4args *objp) 2276 { 2277 2278 if (!xdr_nfs_client_id4(xdrs, &objp->client)) 2279 return (FALSE); 2280 if (!xdr_cb_client4(xdrs, &objp->callback)) 2281 return (FALSE); 2282 if (!xdr_uint32_t(xdrs, &objp->callback_ident)) 2283 return (FALSE); 2284 return (TRUE); 2285 } 2286 2287 bool_t 2288 xdr_SETCLIENTID4resok(register XDR *xdrs, SETCLIENTID4resok *objp) 2289 { 2290 2291 if (!xdr_clientid4(xdrs, &objp->clientid)) 2292 return (FALSE); 2293 if (!xdr_verifier4(xdrs, objp->setclientid_confirm)) 2294 return (FALSE); 2295 return (TRUE); 2296 } 2297 2298 bool_t 2299 xdr_SETCLIENTID4res(register XDR *xdrs, SETCLIENTID4res *objp) 2300 { 2301 2302 if (!xdr_nfsstat4(xdrs, &objp->status)) 2303 return (FALSE); 2304 switch (objp->status) { 2305 case NFS4_OK: 2306 if (!xdr_SETCLIENTID4resok(xdrs, &objp->SETCLIENTID4res_u. 2307 resok4)) 2308 return (FALSE); 2309 break; 2310 case NFS4ERR_CLID_INUSE: 2311 if (!xdr_clientaddr4(xdrs, &objp->SETCLIENTID4res_u. 2312 client_using)) 2313 return (FALSE); 2314 break; 2315 } 2316 return (TRUE); 2317 } 2318 2319 bool_t 2320 xdr_SETCLIENTID_CONFIRM4args(register XDR *xdrs, SETCLIENTID_CONFIRM4args *objp) 2321 { 2322 2323 if (!xdr_clientid4(xdrs, &objp->clientid)) 2324 return (FALSE); 2325 if (!xdr_verifier4(xdrs, objp->setclientid_confirm)) 2326 return (FALSE); 2327 return (TRUE); 2328 } 2329 2330 bool_t 2331 xdr_SETCLIENTID_CONFIRM4res(register XDR *xdrs, SETCLIENTID_CONFIRM4res *objp) 2332 { 2333 2334 if (!xdr_nfsstat4(xdrs, &objp->status)) 2335 return (FALSE); 2336 return (TRUE); 2337 } 2338 2339 bool_t 2340 xdr_VERIFY4args(register XDR *xdrs, VERIFY4args *objp) 2341 { 2342 2343 if (!xdr_fattr4(xdrs, &objp->obj_attributes)) 2344 return (FALSE); 2345 return (TRUE); 2346 } 2347 2348 bool_t 2349 xdr_VERIFY4res(register XDR *xdrs, VERIFY4res *objp) 2350 { 2351 2352 if (!xdr_nfsstat4(xdrs, &objp->status)) 2353 return (FALSE); 2354 return (TRUE); 2355 } 2356 2357 bool_t 2358 xdr_stable_how4(register XDR *xdrs, stable_how4 *objp) 2359 { 2360 2361 if (!xdr_enum(xdrs, (enum_t *)objp)) 2362 return (FALSE); 2363 return (TRUE); 2364 } 2365 2366 bool_t 2367 xdr_WRITE4args(register XDR *xdrs, WRITE4args *objp) 2368 { 2369 2370 if (!xdr_stateid4(xdrs, &objp->stateid)) 2371 return (FALSE); 2372 if (!xdr_offset4(xdrs, &objp->offset)) 2373 return (FALSE); 2374 if (!xdr_stable_how4(xdrs, &objp->stable)) 2375 return (FALSE); 2376 2377 #ifdef IGNORE_RDWR_DATA 2378 /* 2379 * try to get length of write, and if that 2380 * fails, default to 0. Don't return FALSE 2381 * because the other write info will not be 2382 * displayed (write stateid). 2383 */ 2384 objp->data.data_val = NULL; 2385 if (!xdr_u_int(xdrs, &objp->data.data_len)) 2386 objp->data.data_len = 0; 2387 nfs4_skip_bytes = objp->data.data_len; 2388 #else 2389 if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, 2390 (uint_t *)&objp->data.data_len, ~0)) 2391 return (FALSE); 2392 #endif 2393 return (TRUE); 2394 } 2395 2396 bool_t 2397 xdr_WRITE4resok(register XDR *xdrs, WRITE4resok *objp) 2398 { 2399 2400 if (!xdr_count4(xdrs, &objp->count)) 2401 return (FALSE); 2402 if (!xdr_stable_how4(xdrs, &objp->committed)) 2403 return (FALSE); 2404 if (!xdr_verifier4(xdrs, objp->writeverf)) 2405 return (FALSE); 2406 return (TRUE); 2407 } 2408 2409 bool_t 2410 xdr_WRITE4res(register XDR *xdrs, WRITE4res *objp) 2411 { 2412 2413 if (!xdr_nfsstat4(xdrs, &objp->status)) 2414 return (FALSE); 2415 switch (objp->status) { 2416 case NFS4_OK: 2417 if (!xdr_WRITE4resok(xdrs, &objp->WRITE4res_u.resok4)) 2418 return (FALSE); 2419 break; 2420 } 2421 return (TRUE); 2422 } 2423 2424 bool_t 2425 xdr_RELEASE_LOCKOWNER4args(register XDR *xdrs, RELEASE_LOCKOWNER4args *objp) 2426 { 2427 2428 if (!xdr_lock_owner4(xdrs, &objp->lock_owner)) 2429 return (FALSE); 2430 return (TRUE); 2431 } 2432 2433 bool_t 2434 xdr_RELEASE_LOCKOWNER4res(register XDR *xdrs, RELEASE_LOCKOWNER4res *objp) 2435 { 2436 2437 if (!xdr_nfsstat4(xdrs, &objp->status)) 2438 return (FALSE); 2439 return (TRUE); 2440 } 2441 2442 bool_t 2443 xdr_ILLEGAL4res(register XDR *xdrs, ILLEGAL4res *objp) 2444 { 2445 2446 if (!xdr_nfsstat4(xdrs, &objp->status)) 2447 return (FALSE); 2448 return (TRUE); 2449 } 2450 2451 bool_t 2452 xdr_nfs_opnum4(register XDR *xdrs, nfs_opnum4 *objp) 2453 { 2454 2455 if (!xdr_enum(xdrs, (enum_t *)objp)) 2456 return (FALSE); 2457 return (TRUE); 2458 } 2459 2460 bool_t 2461 xdr_nfs_argop4(register XDR *xdrs, nfs_argop4 *objp) 2462 { 2463 nfs4_skip_bytes = 0; 2464 if (!xdr_nfs_opnum4(xdrs, &objp->argop)) 2465 return (FALSE); 2466 switch (objp->argop) { 2467 case OP_ACCESS: 2468 if (!xdr_ACCESS4args(xdrs, &objp->nfs_argop4_u.opaccess)) 2469 return (FALSE); 2470 break; 2471 case OP_CLOSE: 2472 if (!xdr_CLOSE4args(xdrs, &objp->nfs_argop4_u.opclose)) 2473 return (FALSE); 2474 break; 2475 case OP_COMMIT: 2476 if (!xdr_COMMIT4args(xdrs, &objp->nfs_argop4_u.opcommit)) 2477 return (FALSE); 2478 break; 2479 case OP_CREATE: 2480 if (!xdr_CREATE4args(xdrs, &objp->nfs_argop4_u.opcreate)) 2481 return (FALSE); 2482 break; 2483 case OP_DELEGPURGE: 2484 if (!xdr_DELEGPURGE4args(xdrs, &objp->nfs_argop4_u. 2485 opdelegpurge)) 2486 return (FALSE); 2487 break; 2488 case OP_DELEGRETURN: 2489 if (!xdr_DELEGRETURN4args(xdrs, &objp->nfs_argop4_u. 2490 opdelegreturn)) 2491 return (FALSE); 2492 break; 2493 case OP_GETATTR: 2494 if (!xdr_GETATTR4args(xdrs, &objp->nfs_argop4_u. 2495 opgetattr)) 2496 return (FALSE); 2497 break; 2498 case OP_GETFH: 2499 break; 2500 case OP_LINK: 2501 if (!xdr_LINK4args(xdrs, &objp->nfs_argop4_u.oplink)) 2502 return (FALSE); 2503 break; 2504 case OP_LOCK: 2505 if (!xdr_LOCK4args(xdrs, &objp->nfs_argop4_u.oplock)) 2506 return (FALSE); 2507 break; 2508 case OP_LOCKT: 2509 if (!xdr_LOCKT4args(xdrs, &objp->nfs_argop4_u.oplockt)) 2510 return (FALSE); 2511 break; 2512 case OP_LOCKU: 2513 if (!xdr_LOCKU4args(xdrs, &objp->nfs_argop4_u.oplocku)) 2514 return (FALSE); 2515 break; 2516 case OP_LOOKUP: 2517 if (!xdr_LOOKUP4args(xdrs, &objp->nfs_argop4_u.oplookup)) 2518 return (FALSE); 2519 break; 2520 case OP_LOOKUPP: 2521 break; 2522 case OP_NVERIFY: 2523 if (!xdr_NVERIFY4args(xdrs, &objp->nfs_argop4_u.opnverify)) 2524 return (FALSE); 2525 break; 2526 case OP_OPEN: 2527 if (!xdr_OPEN4args(xdrs, &objp->nfs_argop4_u.opopen)) 2528 return (FALSE); 2529 break; 2530 case OP_OPENATTR: 2531 if (!xdr_OPENATTR4args(xdrs, &objp->nfs_argop4_u.opopenattr)) 2532 return (FALSE); 2533 break; 2534 case OP_OPEN_CONFIRM: 2535 if (!xdr_OPEN_CONFIRM4args(xdrs, &objp->nfs_argop4_u. 2536 opopen_confirm)) 2537 return (FALSE); 2538 break; 2539 case OP_OPEN_DOWNGRADE: 2540 if (!xdr_OPEN_DOWNGRADE4args(xdrs, &objp->nfs_argop4_u. 2541 opopen_downgrade)) 2542 return (FALSE); 2543 break; 2544 case OP_PUTFH: 2545 if (!xdr_PUTFH4args(xdrs, &objp->nfs_argop4_u.opputfh)) 2546 return (FALSE); 2547 break; 2548 case OP_PUTPUBFH: 2549 break; 2550 case OP_PUTROOTFH: 2551 break; 2552 case OP_READ: 2553 if (!xdr_READ4args(xdrs, &objp->nfs_argop4_u.opread)) 2554 return (FALSE); 2555 break; 2556 case OP_READDIR: 2557 if (!xdr_READDIR4args(xdrs, &objp->nfs_argop4_u.opreaddir)) 2558 return (FALSE); 2559 break; 2560 case OP_READLINK: 2561 break; 2562 case OP_REMOVE: 2563 if (!xdr_REMOVE4args(xdrs, &objp->nfs_argop4_u.opremove)) 2564 return (FALSE); 2565 break; 2566 case OP_RENAME: 2567 if (!xdr_RENAME4args(xdrs, &objp->nfs_argop4_u.oprename)) 2568 return (FALSE); 2569 break; 2570 case OP_RENEW: 2571 if (!xdr_RENEW4args(xdrs, &objp->nfs_argop4_u.oprenew)) 2572 return (FALSE); 2573 break; 2574 case OP_RESTOREFH: 2575 break; 2576 case OP_SAVEFH: 2577 break; 2578 case OP_SECINFO: 2579 if (!xdr_SECINFO4args(xdrs, &objp->nfs_argop4_u.opsecinfo)) 2580 return (FALSE); 2581 break; 2582 case OP_SETATTR: 2583 if (!xdr_SETATTR4args(xdrs, &objp->nfs_argop4_u.opsetattr)) 2584 return (FALSE); 2585 break; 2586 case OP_SETCLIENTID: 2587 if (!xdr_SETCLIENTID4args(xdrs, &objp->nfs_argop4_u. 2588 opsetclientid)) 2589 return (FALSE); 2590 break; 2591 case OP_SETCLIENTID_CONFIRM: 2592 if (!xdr_SETCLIENTID_CONFIRM4args(xdrs, &objp->nfs_argop4_u. 2593 opsetclientid_confirm)) 2594 return (FALSE); 2595 break; 2596 case OP_VERIFY: 2597 if (!xdr_VERIFY4args(xdrs, &objp->nfs_argop4_u.opverify)) 2598 return (FALSE); 2599 break; 2600 case OP_WRITE: 2601 if (!xdr_WRITE4args(xdrs, &objp->nfs_argop4_u.opwrite)) 2602 return (FALSE); 2603 break; 2604 case OP_RELEASE_LOCKOWNER: 2605 if (!xdr_RELEASE_LOCKOWNER4args(xdrs, 2606 &objp->nfs_argop4_u.oprelease_lockowner)) 2607 return (FALSE); 2608 break; 2609 case OP_ILLEGAL: 2610 break; 2611 default: 2612 return (FALSE); 2613 } 2614 return (TRUE); 2615 } 2616 2617 bool_t 2618 xdr_nfs_resop4(register XDR *xdrs, nfs_resop4 *objp) 2619 { 2620 nfs4_skip_bytes = 0; 2621 if (!xdr_nfs_opnum4(xdrs, &objp->resop)) 2622 return (FALSE); 2623 switch (objp->resop) { 2624 case OP_ACCESS: 2625 if (!xdr_ACCESS4res(xdrs, &objp->nfs_resop4_u.opaccess)) 2626 return (FALSE); 2627 break; 2628 case OP_CLOSE: 2629 if (!xdr_CLOSE4res(xdrs, &objp->nfs_resop4_u.opclose)) 2630 return (FALSE); 2631 break; 2632 case OP_COMMIT: 2633 if (!xdr_COMMIT4res(xdrs, &objp->nfs_resop4_u.opcommit)) 2634 return (FALSE); 2635 break; 2636 case OP_CREATE: 2637 if (!xdr_CREATE4res(xdrs, &objp->nfs_resop4_u.opcreate)) 2638 return (FALSE); 2639 break; 2640 case OP_DELEGPURGE: 2641 if (!xdr_DELEGPURGE4res(xdrs, &objp->nfs_resop4_u.opdelegpurge)) 2642 return (FALSE); 2643 break; 2644 case OP_DELEGRETURN: 2645 if (!xdr_DELEGRETURN4res(xdrs, &objp->nfs_resop4_u. 2646 opdelegreturn)) 2647 return (FALSE); 2648 break; 2649 case OP_GETATTR: 2650 if (!xdr_GETATTR4res(xdrs, &objp->nfs_resop4_u.opgetattr)) 2651 return (FALSE); 2652 break; 2653 case OP_GETFH: 2654 if (!xdr_GETFH4res(xdrs, &objp->nfs_resop4_u.opgetfh)) 2655 return (FALSE); 2656 break; 2657 case OP_LINK: 2658 if (!xdr_LINK4res(xdrs, &objp->nfs_resop4_u.oplink)) 2659 return (FALSE); 2660 break; 2661 case OP_LOCK: 2662 if (!xdr_LOCK4res(xdrs, &objp->nfs_resop4_u.oplock)) 2663 return (FALSE); 2664 break; 2665 case OP_LOCKT: 2666 if (!xdr_LOCKT4res(xdrs, &objp->nfs_resop4_u.oplockt)) 2667 return (FALSE); 2668 break; 2669 case OP_LOCKU: 2670 if (!xdr_LOCKU4res(xdrs, &objp->nfs_resop4_u.oplocku)) 2671 return (FALSE); 2672 break; 2673 case OP_LOOKUP: 2674 if (!xdr_LOOKUP4res(xdrs, &objp->nfs_resop4_u.oplookup)) 2675 return (FALSE); 2676 break; 2677 case OP_LOOKUPP: 2678 if (!xdr_LOOKUPP4res(xdrs, &objp->nfs_resop4_u.oplookupp)) 2679 return (FALSE); 2680 break; 2681 case OP_NVERIFY: 2682 if (!xdr_NVERIFY4res(xdrs, &objp->nfs_resop4_u.opnverify)) 2683 return (FALSE); 2684 break; 2685 case OP_OPEN: 2686 if (!xdr_OPEN4res(xdrs, &objp->nfs_resop4_u.opopen)) 2687 return (FALSE); 2688 break; 2689 case OP_OPENATTR: 2690 if (!xdr_OPENATTR4res(xdrs, &objp->nfs_resop4_u.opopenattr)) 2691 return (FALSE); 2692 break; 2693 case OP_OPEN_CONFIRM: 2694 if (!xdr_OPEN_CONFIRM4res(xdrs, &objp->nfs_resop4_u. 2695 opopen_confirm)) 2696 return (FALSE); 2697 break; 2698 case OP_OPEN_DOWNGRADE: 2699 if (!xdr_OPEN_DOWNGRADE4res(xdrs, &objp->nfs_resop4_u. 2700 opopen_downgrade)) 2701 return (FALSE); 2702 break; 2703 case OP_PUTFH: 2704 if (!xdr_PUTFH4res(xdrs, &objp->nfs_resop4_u.opputfh)) 2705 return (FALSE); 2706 break; 2707 case OP_PUTPUBFH: 2708 if (!xdr_PUTPUBFH4res(xdrs, &objp->nfs_resop4_u.opputpubfh)) 2709 return (FALSE); 2710 break; 2711 case OP_PUTROOTFH: 2712 if (!xdr_PUTROOTFH4res(xdrs, &objp->nfs_resop4_u.opputrootfh)) 2713 return (FALSE); 2714 break; 2715 case OP_READ: 2716 if (!xdr_READ4res(xdrs, &objp->nfs_resop4_u.opread)) 2717 return (FALSE); 2718 break; 2719 case OP_READDIR: 2720 if (!xdr_READDIR4res(xdrs, &objp->nfs_resop4_u.opreaddir)) 2721 return (FALSE); 2722 break; 2723 case OP_READLINK: 2724 if (!xdr_READLINK4res(xdrs, &objp->nfs_resop4_u.opreadlink)) 2725 return (FALSE); 2726 break; 2727 case OP_REMOVE: 2728 if (!xdr_REMOVE4res(xdrs, &objp->nfs_resop4_u.opremove)) 2729 return (FALSE); 2730 break; 2731 case OP_RENAME: 2732 if (!xdr_RENAME4res(xdrs, &objp->nfs_resop4_u.oprename)) 2733 return (FALSE); 2734 break; 2735 case OP_RENEW: 2736 if (!xdr_RENEW4res(xdrs, &objp->nfs_resop4_u.oprenew)) 2737 return (FALSE); 2738 break; 2739 case OP_RESTOREFH: 2740 if (!xdr_RESTOREFH4res(xdrs, &objp->nfs_resop4_u.oprestorefh)) 2741 return (FALSE); 2742 break; 2743 case OP_SAVEFH: 2744 if (!xdr_SAVEFH4res(xdrs, &objp->nfs_resop4_u.opsavefh)) 2745 return (FALSE); 2746 break; 2747 case OP_SECINFO: 2748 if (!xdr_SECINFO4res(xdrs, &objp->nfs_resop4_u.opsecinfo)) 2749 return (FALSE); 2750 break; 2751 case OP_SETATTR: 2752 if (!xdr_SETATTR4res(xdrs, &objp->nfs_resop4_u.opsetattr)) 2753 return (FALSE); 2754 break; 2755 case OP_SETCLIENTID: 2756 if (!xdr_SETCLIENTID4res(xdrs, &objp->nfs_resop4_u. 2757 opsetclientid)) 2758 return (FALSE); 2759 break; 2760 case OP_SETCLIENTID_CONFIRM: 2761 if (!xdr_SETCLIENTID_CONFIRM4res(xdrs, &objp->nfs_resop4_u. 2762 opsetclientid_confirm)) 2763 return (FALSE); 2764 break; 2765 case OP_VERIFY: 2766 if (!xdr_VERIFY4res(xdrs, &objp->nfs_resop4_u.opverify)) 2767 return (FALSE); 2768 break; 2769 case OP_WRITE: 2770 if (!xdr_WRITE4res(xdrs, &objp->nfs_resop4_u.opwrite)) 2771 return (FALSE); 2772 break; 2773 case OP_RELEASE_LOCKOWNER: 2774 if (!xdr_RELEASE_LOCKOWNER4res(xdrs, 2775 &objp->nfs_resop4_u.oprelease_lockowner)) 2776 return (FALSE); 2777 break; 2778 case OP_ILLEGAL: 2779 if (!xdr_ILLEGAL4res(xdrs, &objp->nfs_resop4_u.opillegal)) 2780 return (FALSE); 2781 break; 2782 default: 2783 return (FALSE); 2784 } 2785 return (TRUE); 2786 } 2787 2788 bool_t 2789 xdr_COMPOUND4args(register XDR *xdrs, COMPOUND4args *objp) 2790 { 2791 2792 if (!xdr_utf8string(xdrs, &objp->tag)) 2793 return (FALSE); 2794 if (!xdr_uint32_t(xdrs, &objp->minorversion)) 2795 return (FALSE); 2796 if (!xdr_array(xdrs, (char **)&objp->argarray.argarray_val, 2797 (uint_t *)&objp->argarray.argarray_len, ~0, 2798 sizeof (nfs_argop4), (xdrproc_t)xdr_nfs_argop4)) 2799 return (FALSE); 2800 return (TRUE); 2801 } 2802 2803 bool_t 2804 xdr_COMPOUND4res(register XDR *xdrs, COMPOUND4res *objp) 2805 { 2806 2807 if (!xdr_nfsstat4(xdrs, &objp->status)) 2808 return (FALSE); 2809 if (!xdr_utf8string(xdrs, &objp->tag)) 2810 return (FALSE); 2811 if (!xdr_array(xdrs, (char **)&objp->resarray.resarray_val, 2812 (uint_t *)&objp->resarray.resarray_len, ~0, 2813 sizeof (nfs_resop4), (xdrproc_t)xdr_nfs_resop4)) 2814 return (FALSE); 2815 return (TRUE); 2816 } 2817 2818 bool_t 2819 xdr_CB_GETATTR4args(register XDR *xdrs, CB_GETATTR4args *objp) 2820 { 2821 2822 if (!xdr_nfs_fh4(xdrs, &objp->fh)) 2823 return (FALSE); 2824 if (!xdr_bitmap4(xdrs, &objp->attr_request)) 2825 return (FALSE); 2826 return (TRUE); 2827 } 2828 2829 bool_t 2830 xdr_CB_GETATTR4resok(register XDR *xdrs, CB_GETATTR4resok *objp) 2831 { 2832 2833 if (!xdr_fattr4(xdrs, &objp->obj_attributes)) 2834 return (FALSE); 2835 return (TRUE); 2836 } 2837 2838 bool_t 2839 xdr_CB_GETATTR4res(register XDR *xdrs, CB_GETATTR4res *objp) 2840 { 2841 2842 if (!xdr_nfsstat4(xdrs, &objp->status)) 2843 return (FALSE); 2844 switch (objp->status) { 2845 case NFS4_OK: 2846 if (!xdr_CB_GETATTR4resok(xdrs, &objp->CB_GETATTR4res_u.resok4)) 2847 return (FALSE); 2848 break; 2849 } 2850 return (TRUE); 2851 } 2852 2853 bool_t 2854 xdr_CB_RECALL4args(register XDR *xdrs, CB_RECALL4args *objp) 2855 { 2856 2857 if (!xdr_stateid4(xdrs, &objp->stateid)) 2858 return (FALSE); 2859 if (!xdr_bool(xdrs, &objp->truncate)) 2860 return (FALSE); 2861 if (!xdr_nfs_fh4(xdrs, &objp->fh)) 2862 return (FALSE); 2863 return (TRUE); 2864 } 2865 2866 bool_t 2867 xdr_CB_RECALL4res(register XDR *xdrs, CB_RECALL4res *objp) 2868 { 2869 2870 if (!xdr_nfsstat4(xdrs, &objp->status)) 2871 return (FALSE); 2872 return (TRUE); 2873 } 2874 2875 bool_t 2876 xdr_CB_ILLEGAL4res(register XDR *xdrs, CB_ILLEGAL4res *objp) 2877 { 2878 2879 if (!xdr_nfsstat4(xdrs, &objp->status)) 2880 return (FALSE); 2881 return (TRUE); 2882 } 2883 2884 bool_t 2885 xdr_nfs_cb_opnum4(register XDR *xdrs, nfs_cb_opnum4 *objp) 2886 { 2887 2888 if (!xdr_enum(xdrs, (enum_t *)objp)) 2889 return (FALSE); 2890 return (TRUE); 2891 } 2892 2893 bool_t 2894 xdr_nfs_cb_argop4(register XDR *xdrs, nfs_cb_argop4 *objp) 2895 { 2896 2897 if (!xdr_u_int(xdrs, &objp->argop)) 2898 return (FALSE); 2899 switch (objp->argop) { 2900 case OP_CB_GETATTR: 2901 if (!xdr_CB_GETATTR4args(xdrs, &objp->nfs_cb_argop4_u. 2902 opcbgetattr)) 2903 return (FALSE); 2904 break; 2905 case OP_CB_RECALL: 2906 if (!xdr_CB_RECALL4args(xdrs, &objp->nfs_cb_argop4_u. 2907 opcbrecall)) 2908 return (FALSE); 2909 break; 2910 case OP_CB_ILLEGAL: 2911 break; 2912 default: 2913 return (FALSE); 2914 } 2915 return (TRUE); 2916 } 2917 2918 bool_t 2919 xdr_nfs_cb_resop4(register XDR *xdrs, nfs_cb_resop4 *objp) 2920 { 2921 2922 if (!xdr_u_int(xdrs, &objp->resop)) 2923 return (FALSE); 2924 switch (objp->resop) { 2925 case OP_CB_GETATTR: 2926 if (!xdr_CB_GETATTR4res(xdrs, &objp->nfs_cb_resop4_u. 2927 opcbgetattr)) 2928 return (FALSE); 2929 break; 2930 case OP_CB_RECALL: 2931 if (!xdr_CB_RECALL4res(xdrs, &objp->nfs_cb_resop4_u.opcbrecall)) 2932 return (FALSE); 2933 break; 2934 case OP_CB_ILLEGAL: 2935 if (!xdr_CB_ILLEGAL4res(xdrs, 2936 &objp->nfs_cb_resop4_u.opcbillegal)) 2937 return (FALSE); 2938 break; 2939 default: 2940 return (FALSE); 2941 } 2942 return (TRUE); 2943 } 2944 2945 bool_t 2946 xdr_CB_COMPOUND4args(register XDR *xdrs, CB_COMPOUND4args *objp) 2947 { 2948 2949 if (!xdr_utf8string(xdrs, &objp->tag)) 2950 return (FALSE); 2951 if (!xdr_uint32_t(xdrs, &objp->minorversion)) 2952 return (FALSE); 2953 if (!xdr_uint32_t(xdrs, &objp->callback_ident)) 2954 return (FALSE); 2955 if (!xdr_array(xdrs, (char **)&objp->argarray.argarray_val, 2956 (uint_t *)&objp->argarray.argarray_len, ~0, 2957 sizeof (nfs_cb_argop4), (xdrproc_t)xdr_nfs_cb_argop4)) 2958 return (FALSE); 2959 return (TRUE); 2960 } 2961 2962 bool_t 2963 xdr_CB_COMPOUND4res(register XDR *xdrs, CB_COMPOUND4res *objp) 2964 { 2965 2966 if (!xdr_nfsstat4(xdrs, &objp->status)) 2967 return (FALSE); 2968 if (!xdr_utf8string(xdrs, &objp->tag)) 2969 return (FALSE); 2970 if (!xdr_array(xdrs, (char **)&objp->resarray.resarray_val, 2971 (uint_t *)&objp->resarray.resarray_len, ~0, 2972 sizeof (nfs_cb_resop4), (xdrproc_t)xdr_nfs_cb_resop4)) 2973 return (FALSE); 2974 return (TRUE); 2975 } 2976