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