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 (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #include "nfs4_prot.h" 27 28 #ifndef _KERNEL 29 #include <stdlib.h> 30 #endif /* !_KERNEL */ 31 32 #ifndef _AUTH_SYS_DEFINE_FOR_NFSv41 33 #define _AUTH_SYS_DEFINE_FOR_NFSv41 34 #include <rpc/auth_sys.h> 35 typedef struct authsys_parms authsys_parms; 36 #endif /* _AUTH_SYS_DEFINE_FOR_NFSv41 */ 37 38 #define IGNORE_RDWR_DATA 39 40 extern int nfs4_skip_bytes; 41 42 bool_t 43 xdr_nfs_ftype4(XDR *xdrs, nfs_ftype4 *objp) 44 { 45 46 rpc_inline_t *buf; 47 48 if (!xdr_enum(xdrs, (enum_t *)objp)) 49 return (FALSE); 50 return (TRUE); 51 } 52 53 bool_t 54 xdr_nfsstat4(XDR *xdrs, nfsstat4 *objp) 55 { 56 57 rpc_inline_t *buf; 58 59 if (!xdr_enum(xdrs, (enum_t *)objp)) 60 return (FALSE); 61 return (TRUE); 62 } 63 64 bool_t 65 xdr_attrlist4(XDR *xdrs, attrlist4 *objp) 66 { 67 68 rpc_inline_t *buf; 69 70 if (!xdr_bytes(xdrs, (char **)&objp->attrlist4_val, 71 (uint_t *)&objp->attrlist4_len, ~0)) 72 return (FALSE); 73 return (TRUE); 74 } 75 76 bool_t 77 xdr_bitmap4(XDR *xdrs, bitmap4 *objp) 78 { 79 80 rpc_inline_t *buf; 81 82 if (!xdr_array(xdrs, (char **)&objp->bitmap4_val, 83 (uint_t *)&objp->bitmap4_len, ~0, 84 sizeof (uint32_t), (xdrproc_t)xdr_uint32_t)) 85 return (FALSE); 86 return (TRUE); 87 } 88 89 bool_t 90 xdr_changeid4(XDR *xdrs, changeid4 *objp) 91 { 92 93 rpc_inline_t *buf; 94 95 if (!xdr_uint64_t(xdrs, objp)) 96 return (FALSE); 97 return (TRUE); 98 } 99 100 bool_t 101 xdr_clientid4(XDR *xdrs, clientid4 *objp) 102 { 103 104 rpc_inline_t *buf; 105 106 if (!xdr_uint64_t(xdrs, objp)) 107 return (FALSE); 108 return (TRUE); 109 } 110 111 bool_t 112 xdr_count4(XDR *xdrs, count4 *objp) 113 { 114 115 rpc_inline_t *buf; 116 117 if (!xdr_uint32_t(xdrs, objp)) 118 return (FALSE); 119 return (TRUE); 120 } 121 122 bool_t 123 xdr_length4(XDR *xdrs, length4 *objp) 124 { 125 126 rpc_inline_t *buf; 127 128 if (!xdr_uint64_t(xdrs, objp)) 129 return (FALSE); 130 return (TRUE); 131 } 132 133 bool_t 134 xdr_mode4(XDR *xdrs, mode4 *objp) 135 { 136 137 rpc_inline_t *buf; 138 139 if (!xdr_uint32_t(xdrs, objp)) 140 return (FALSE); 141 return (TRUE); 142 } 143 144 bool_t 145 xdr_nfs_cookie4(XDR *xdrs, nfs_cookie4 *objp) 146 { 147 148 rpc_inline_t *buf; 149 150 if (!xdr_uint64_t(xdrs, objp)) 151 return (FALSE); 152 return (TRUE); 153 } 154 155 bool_t 156 xdr_nfs_fh4(XDR *xdrs, nfs_fh4 *objp) 157 { 158 159 rpc_inline_t *buf; 160 161 if (!xdr_bytes(xdrs, (char **)&objp->nfs_fh4_val, 162 (uint_t *)&objp->nfs_fh4_len, NFS4_FHSIZE)) 163 return (FALSE); 164 return (TRUE); 165 } 166 167 bool_t 168 xdr_offset4(XDR *xdrs, offset4 *objp) 169 { 170 171 rpc_inline_t *buf; 172 173 if (!xdr_uint64_t(xdrs, objp)) 174 return (FALSE); 175 return (TRUE); 176 } 177 178 bool_t 179 xdr_qop4(XDR *xdrs, qop4 *objp) 180 { 181 182 rpc_inline_t *buf; 183 184 if (!xdr_uint32_t(xdrs, objp)) 185 return (FALSE); 186 return (TRUE); 187 } 188 189 bool_t 190 xdr_sec_oid4(XDR *xdrs, sec_oid4 *objp) 191 { 192 193 rpc_inline_t *buf; 194 195 if (!xdr_bytes(xdrs, (char **)&objp->sec_oid4_val, 196 (uint_t *)&objp->sec_oid4_len, ~0)) 197 return (FALSE); 198 return (TRUE); 199 } 200 201 bool_t 202 xdr_sequenceid4(XDR *xdrs, sequenceid4 *objp) 203 { 204 205 rpc_inline_t *buf; 206 207 if (!xdr_uint32_t(xdrs, objp)) 208 return (FALSE); 209 return (TRUE); 210 } 211 212 bool_t 213 xdr_seqid4(XDR *xdrs, seqid4 *objp) 214 { 215 216 rpc_inline_t *buf; 217 218 if (!xdr_uint32_t(xdrs, objp)) 219 return (FALSE); 220 return (TRUE); 221 } 222 223 bool_t 224 xdr_sessionid4(XDR *xdrs, sessionid4 objp) 225 { 226 227 rpc_inline_t *buf; 228 229 if (!xdr_opaque(xdrs, objp, NFS4_SESSIONID_SIZE)) 230 return (FALSE); 231 return (TRUE); 232 } 233 234 bool_t 235 xdr_slotid4(XDR *xdrs, slotid4 *objp) 236 { 237 238 rpc_inline_t *buf; 239 240 if (!xdr_uint32_t(xdrs, objp)) 241 return (FALSE); 242 return (TRUE); 243 } 244 245 bool_t 246 xdr_utf8string(XDR *xdrs, utf8string *objp) 247 { 248 249 rpc_inline_t *buf; 250 251 if (!xdr_bytes(xdrs, (char **)&objp->utf8string_val, 252 (uint_t *)&objp->utf8string_len, ~0)) 253 return (FALSE); 254 return (TRUE); 255 } 256 257 bool_t 258 xdr_utf8str_cis(XDR *xdrs, utf8str_cis *objp) 259 { 260 261 rpc_inline_t *buf; 262 263 if (!xdr_utf8string(xdrs, objp)) 264 return (FALSE); 265 return (TRUE); 266 } 267 268 bool_t 269 xdr_utf8str_cs(XDR *xdrs, utf8str_cs *objp) 270 { 271 272 rpc_inline_t *buf; 273 274 if (!xdr_utf8string(xdrs, objp)) 275 return (FALSE); 276 return (TRUE); 277 } 278 279 bool_t 280 xdr_utf8str_mixed(XDR *xdrs, utf8str_mixed *objp) 281 { 282 283 rpc_inline_t *buf; 284 285 if (!xdr_utf8string(xdrs, objp)) 286 return (FALSE); 287 return (TRUE); 288 } 289 290 bool_t 291 xdr_component4(XDR *xdrs, component4 *objp) 292 { 293 294 rpc_inline_t *buf; 295 296 if (!xdr_utf8str_cs(xdrs, objp)) 297 return (FALSE); 298 return (TRUE); 299 } 300 301 bool_t 302 xdr_linktext4(XDR *xdrs, linktext4 *objp) 303 { 304 305 rpc_inline_t *buf; 306 307 if (!xdr_utf8str_cs(xdrs, objp)) 308 return (FALSE); 309 return (TRUE); 310 } 311 312 bool_t 313 xdr_pathname4(XDR *xdrs, pathname4 *objp) 314 { 315 316 rpc_inline_t *buf; 317 318 if (!xdr_array(xdrs, (char **)&objp->pathname4_val, 319 (uint_t *)&objp->pathname4_len, ~0, 320 sizeof (component4), (xdrproc_t)xdr_component4)) 321 return (FALSE); 322 return (TRUE); 323 } 324 325 bool_t 326 xdr_verifier4(XDR *xdrs, verifier4 objp) 327 { 328 329 rpc_inline_t *buf; 330 331 if (!xdr_opaque(xdrs, objp, NFS4_VERIFIER_SIZE)) 332 return (FALSE); 333 return (TRUE); 334 } 335 336 bool_t 337 xdr_nfstime4(XDR *xdrs, nfstime4 *objp) 338 { 339 340 rpc_inline_t *buf; 341 342 if (!xdr_int64_t(xdrs, &objp->seconds)) 343 return (FALSE); 344 if (!xdr_uint32_t(xdrs, &objp->nseconds)) 345 return (FALSE); 346 return (TRUE); 347 } 348 349 bool_t 350 xdr_time_how4(XDR *xdrs, time_how4 *objp) 351 { 352 353 rpc_inline_t *buf; 354 355 if (!xdr_enum(xdrs, (enum_t *)objp)) 356 return (FALSE); 357 return (TRUE); 358 } 359 360 bool_t 361 xdr_settime4(XDR *xdrs, settime4 *objp) 362 { 363 364 rpc_inline_t *buf; 365 366 if (!xdr_time_how4(xdrs, &objp->set_it)) 367 return (FALSE); 368 switch (objp->set_it) { 369 case SET_TO_CLIENT_TIME4: 370 if (!xdr_nfstime4(xdrs, &objp->settime4_u.time)) 371 return (FALSE); 372 break; 373 } 374 return (TRUE); 375 } 376 377 bool_t 378 xdr_nfs_lease4(XDR *xdrs, nfs_lease4 *objp) 379 { 380 381 rpc_inline_t *buf; 382 383 if (!xdr_uint32_t(xdrs, objp)) 384 return (FALSE); 385 return (TRUE); 386 } 387 388 bool_t 389 xdr_fsid4(XDR *xdrs, fsid4 *objp) 390 { 391 392 rpc_inline_t *buf; 393 394 if (!xdr_uint64_t(xdrs, &objp->major)) 395 return (FALSE); 396 if (!xdr_uint64_t(xdrs, &objp->minor)) 397 return (FALSE); 398 return (TRUE); 399 } 400 401 bool_t 402 xdr_change_policy4(XDR *xdrs, change_policy4 *objp) 403 { 404 405 rpc_inline_t *buf; 406 407 if (!xdr_uint64_t(xdrs, &objp->cp_major)) 408 return (FALSE); 409 if (!xdr_uint64_t(xdrs, &objp->cp_minor)) 410 return (FALSE); 411 return (TRUE); 412 } 413 414 bool_t 415 xdr_fs_location4(XDR *xdrs, fs_location4 *objp) 416 { 417 418 rpc_inline_t *buf; 419 420 if (!xdr_array(xdrs, (char **)&objp->server.server_val, 421 (uint_t *)&objp->server.server_len, ~0, 422 sizeof (utf8str_cis), (xdrproc_t)xdr_utf8str_cis)) 423 return (FALSE); 424 if (!xdr_pathname4(xdrs, &objp->rootpath)) 425 return (FALSE); 426 return (TRUE); 427 } 428 429 bool_t 430 xdr_fs_locations4(XDR *xdrs, fs_locations4 *objp) 431 { 432 433 rpc_inline_t *buf; 434 435 if (!xdr_pathname4(xdrs, &objp->fs_root)) 436 return (FALSE); 437 if (!xdr_array(xdrs, (char **)&objp->locations.locations_val, 438 (uint_t *)&objp->locations.locations_len, ~0, 439 sizeof (fs_location4), (xdrproc_t)xdr_fs_location4)) 440 return (FALSE); 441 return (TRUE); 442 } 443 444 bool_t 445 xdr_acetype4(XDR *xdrs, acetype4 *objp) 446 { 447 448 rpc_inline_t *buf; 449 450 if (!xdr_uint32_t(xdrs, objp)) 451 return (FALSE); 452 return (TRUE); 453 } 454 455 bool_t 456 xdr_aceflag4(XDR *xdrs, aceflag4 *objp) 457 { 458 459 rpc_inline_t *buf; 460 461 if (!xdr_uint32_t(xdrs, objp)) 462 return (FALSE); 463 return (TRUE); 464 } 465 466 bool_t 467 xdr_acemask4(XDR *xdrs, acemask4 *objp) 468 { 469 470 rpc_inline_t *buf; 471 472 if (!xdr_uint32_t(xdrs, objp)) 473 return (FALSE); 474 return (TRUE); 475 } 476 477 bool_t 478 xdr_nfsace4(XDR *xdrs, nfsace4 *objp) 479 { 480 481 rpc_inline_t *buf; 482 483 if (!xdr_acetype4(xdrs, &objp->type)) 484 return (FALSE); 485 if (!xdr_aceflag4(xdrs, &objp->flag)) 486 return (FALSE); 487 if (!xdr_acemask4(xdrs, &objp->access_mask)) 488 return (FALSE); 489 if (!xdr_utf8str_mixed(xdrs, &objp->who)) 490 return (FALSE); 491 return (TRUE); 492 } 493 494 bool_t 495 xdr_aclflag4(XDR *xdrs, aclflag4 *objp) 496 { 497 498 rpc_inline_t *buf; 499 500 if (!xdr_uint32_t(xdrs, objp)) 501 return (FALSE); 502 return (TRUE); 503 } 504 505 bool_t 506 xdr_nfsacl41(XDR *xdrs, nfsacl41 *objp) 507 { 508 509 rpc_inline_t *buf; 510 511 if (!xdr_aclflag4(xdrs, &objp->na41_flag)) 512 return (FALSE); 513 if (!xdr_array(xdrs, (char **)&objp->na41_aces.na41_aces_val, 514 (uint_t *)&objp->na41_aces.na41_aces_len, ~0, 515 sizeof (nfsace4), (xdrproc_t)xdr_nfsace4)) 516 return (FALSE); 517 return (TRUE); 518 } 519 520 bool_t 521 xdr_mode_masked4(XDR *xdrs, mode_masked4 *objp) 522 { 523 524 rpc_inline_t *buf; 525 526 if (!xdr_mode4(xdrs, &objp->mm_value_to_set)) 527 return (FALSE); 528 if (!xdr_mode4(xdrs, &objp->mm_mask_bits)) 529 return (FALSE); 530 return (TRUE); 531 } 532 533 bool_t 534 xdr_specdata4(XDR *xdrs, specdata4 *objp) 535 { 536 537 rpc_inline_t *buf; 538 539 if (!xdr_uint32_t(xdrs, &objp->specdata1)) 540 return (FALSE); 541 if (!xdr_uint32_t(xdrs, &objp->specdata2)) 542 return (FALSE); 543 return (TRUE); 544 } 545 546 bool_t 547 xdr_netaddr4(XDR *xdrs, netaddr4 *objp) 548 { 549 550 rpc_inline_t *buf; 551 552 if (!xdr_string(xdrs, &objp->na_r_netid, ~0)) 553 return (FALSE); 554 if (!xdr_string(xdrs, &objp->na_r_addr, ~0)) 555 return (FALSE); 556 return (TRUE); 557 } 558 559 bool_t 560 xdr_nfs_impl_id4(XDR *xdrs, nfs_impl_id4 *objp) 561 { 562 563 rpc_inline_t *buf; 564 565 if (!xdr_utf8str_cis(xdrs, &objp->nii_domain)) 566 return (FALSE); 567 if (!xdr_utf8str_cs(xdrs, &objp->nii_name)) 568 return (FALSE); 569 if (!xdr_nfstime4(xdrs, &objp->nii_date)) 570 return (FALSE); 571 return (TRUE); 572 } 573 574 bool_t 575 xdr_stateid4(XDR *xdrs, stateid4 *objp) 576 { 577 578 rpc_inline_t *buf; 579 580 if (!xdr_uint32_t(xdrs, &objp->seqid)) 581 return (FALSE); 582 if (!xdr_opaque(xdrs, objp->other, 12)) 583 return (FALSE); 584 return (TRUE); 585 } 586 587 bool_t 588 xdr_layouttype4(XDR *xdrs, layouttype4 *objp) 589 { 590 591 rpc_inline_t *buf; 592 593 if (!xdr_enum(xdrs, (enum_t *)objp)) 594 return (FALSE); 595 return (TRUE); 596 } 597 598 bool_t 599 xdr_layout_content4(XDR *xdrs, layout_content4 *objp) 600 { 601 602 rpc_inline_t *buf; 603 604 if (!xdr_layouttype4(xdrs, &objp->loc_type)) 605 return (FALSE); 606 if (!xdr_bytes(xdrs, (char **)&objp->loc_body.loc_body_val, 607 (uint_t *)&objp->loc_body.loc_body_len, ~0)) 608 return (FALSE); 609 return (TRUE); 610 } 611 /* 612 * LAYOUT4_OSD2_OBJECTS loc_body description 613 * is in a separate .x file 614 */ 615 616 /* 617 * LAYOUT4_BLOCK_VOLUME loc_body description 618 * is in a separate .x file 619 */ 620 621 bool_t 622 xdr_layouthint4(XDR *xdrs, layouthint4 *objp) 623 { 624 625 rpc_inline_t *buf; 626 627 if (!xdr_layouttype4(xdrs, &objp->loh_type)) 628 return (FALSE); 629 if (!xdr_bytes(xdrs, (char **)&objp->loh_body.loh_body_val, 630 (uint_t *)&objp->loh_body.loh_body_len, ~0)) 631 return (FALSE); 632 return (TRUE); 633 } 634 635 bool_t 636 xdr_layoutiomode4(XDR *xdrs, layoutiomode4 *objp) 637 { 638 639 rpc_inline_t *buf; 640 641 if (!xdr_enum(xdrs, (enum_t *)objp)) 642 return (FALSE); 643 return (TRUE); 644 } 645 646 bool_t 647 xdr_layout4(XDR *xdrs, layout4 *objp) 648 { 649 650 rpc_inline_t *buf; 651 652 if (!xdr_offset4(xdrs, &objp->lo_offset)) 653 return (FALSE); 654 if (!xdr_length4(xdrs, &objp->lo_length)) 655 return (FALSE); 656 if (!xdr_layoutiomode4(xdrs, &objp->lo_iomode)) 657 return (FALSE); 658 if (!xdr_layout_content4(xdrs, &objp->lo_content)) 659 return (FALSE); 660 return (TRUE); 661 } 662 663 bool_t 664 xdr_deviceid4(XDR *xdrs, deviceid4 objp) 665 { 666 667 rpc_inline_t *buf; 668 669 if (!xdr_opaque(xdrs, objp, NFS4_DEVICEID4_SIZE)) 670 return (FALSE); 671 return (TRUE); 672 } 673 674 bool_t 675 xdr_device_addr4(XDR *xdrs, device_addr4 *objp) 676 { 677 678 rpc_inline_t *buf; 679 680 if (!xdr_layouttype4(xdrs, &objp->da_layout_type)) 681 return (FALSE); 682 if (!xdr_bytes(xdrs, (char **)&objp->da_addr_body.da_addr_body_val, 683 (uint_t *)&objp->da_addr_body.da_addr_body_len, ~0)) 684 return (FALSE); 685 return (TRUE); 686 } 687 688 bool_t 689 xdr_layoutupdate4(XDR *xdrs, layoutupdate4 *objp) 690 { 691 692 rpc_inline_t *buf; 693 694 if (!xdr_layouttype4(xdrs, &objp->lou_type)) 695 return (FALSE); 696 if (!xdr_bytes(xdrs, (char **)&objp->lou_body.lou_body_val, 697 (uint_t *)&objp->lou_body.lou_body_len, ~0)) 698 return (FALSE); 699 return (TRUE); 700 } 701 702 703 704 bool_t 705 xdr_layoutreturn_type4(XDR *xdrs, layoutreturn_type4 *objp) 706 { 707 708 rpc_inline_t *buf; 709 710 if (!xdr_enum(xdrs, (enum_t *)objp)) 711 return (FALSE); 712 return (TRUE); 713 } 714 /* layouttype4 specific data */ 715 716 bool_t 717 xdr_layoutreturn_file4(XDR *xdrs, layoutreturn_file4 *objp) 718 { 719 720 rpc_inline_t *buf; 721 722 if (!xdr_offset4(xdrs, &objp->lrf_offset)) 723 return (FALSE); 724 if (!xdr_length4(xdrs, &objp->lrf_length)) 725 return (FALSE); 726 if (!xdr_stateid4(xdrs, &objp->lrf_stateid)) 727 return (FALSE); 728 if (!xdr_bytes(xdrs, (char **)&objp->lrf_body.lrf_body_val, 729 (uint_t *)&objp->lrf_body.lrf_body_len, ~0)) 730 return (FALSE); 731 return (TRUE); 732 } 733 734 bool_t 735 xdr_layoutreturn4(XDR *xdrs, layoutreturn4 *objp) 736 { 737 738 rpc_inline_t *buf; 739 740 if (!xdr_layoutreturn_type4(xdrs, &objp->lr_returntype)) 741 return (FALSE); 742 switch (objp->lr_returntype) { 743 case LAYOUTRETURN4_FILE: 744 if (!xdr_layoutreturn_file4(xdrs, 745 &objp->layoutreturn4_u.lr_layout)) 746 return (FALSE); 747 break; 748 } 749 return (TRUE); 750 } 751 752 753 bool_t 754 xdr_fs4_status_type(XDR *xdrs, fs4_status_type *objp) 755 { 756 757 rpc_inline_t *buf; 758 759 if (!xdr_enum(xdrs, (enum_t *)objp)) 760 return (FALSE); 761 return (TRUE); 762 } 763 764 bool_t 765 xdr_fs4_status(XDR *xdrs, fs4_status *objp) 766 { 767 768 rpc_inline_t *buf; 769 770 if (!xdr_bool(xdrs, &objp->fss_absent)) 771 return (FALSE); 772 if (!xdr_fs4_status_type(xdrs, &objp->fss_type)) 773 return (FALSE); 774 if (!xdr_utf8str_cs(xdrs, &objp->fss_source)) 775 return (FALSE); 776 if (!xdr_utf8str_cs(xdrs, &objp->fss_current)) 777 return (FALSE); 778 if (!xdr_int32_t(xdrs, &objp->fss_age)) 779 return (FALSE); 780 if (!xdr_nfstime4(xdrs, &objp->fss_version)) 781 return (FALSE); 782 return (TRUE); 783 } 784 785 bool_t 786 xdr_threshold4_read_size(XDR *xdrs, threshold4_read_size *objp) 787 { 788 789 rpc_inline_t *buf; 790 791 if (!xdr_length4(xdrs, objp)) 792 return (FALSE); 793 return (TRUE); 794 } 795 796 bool_t 797 xdr_threshold4_write_size(XDR *xdrs, threshold4_write_size *objp) 798 { 799 800 rpc_inline_t *buf; 801 802 if (!xdr_length4(xdrs, objp)) 803 return (FALSE); 804 return (TRUE); 805 } 806 807 bool_t 808 xdr_threshold4_read_iosize(XDR *xdrs, threshold4_read_iosize *objp) 809 { 810 811 rpc_inline_t *buf; 812 813 if (!xdr_length4(xdrs, objp)) 814 return (FALSE); 815 return (TRUE); 816 } 817 818 bool_t 819 xdr_threshold4_write_iosize(XDR *xdrs, threshold4_write_iosize *objp) 820 { 821 822 rpc_inline_t *buf; 823 824 if (!xdr_length4(xdrs, objp)) 825 return (FALSE); 826 return (TRUE); 827 } 828 829 bool_t 830 xdr_threshold_item4(XDR *xdrs, threshold_item4 *objp) 831 { 832 833 rpc_inline_t *buf; 834 835 if (!xdr_layouttype4(xdrs, &objp->thi_layout_type)) 836 return (FALSE); 837 if (!xdr_bitmap4(xdrs, &objp->thi_hintset)) 838 return (FALSE); 839 if (!xdr_bytes(xdrs, (char **)&objp->thi_hintlist.thi_hintlist_val, 840 (uint_t *)&objp->thi_hintlist.thi_hintlist_len, ~0)) 841 return (FALSE); 842 return (TRUE); 843 } 844 845 bool_t 846 xdr_mdsthreshold4(XDR *xdrs, mdsthreshold4 *objp) 847 { 848 849 rpc_inline_t *buf; 850 851 if (!xdr_array(xdrs, (char **)&objp->mth_hints.mth_hints_val, 852 (uint_t *)&objp->mth_hints.mth_hints_len, ~0, 853 sizeof (threshold_item4), (xdrproc_t)xdr_threshold_item4)) 854 return (FALSE); 855 return (TRUE); 856 } 857 858 bool_t 859 xdr_retention_get4(XDR *xdrs, retention_get4 *objp) 860 { 861 862 rpc_inline_t *buf; 863 864 if (!xdr_uint64_t(xdrs, &objp->rg_duration)) 865 return (FALSE); 866 if (!xdr_array(xdrs, (char **)&objp->rg_begin_time.rg_begin_time_val, 867 (uint_t *)&objp->rg_begin_time.rg_begin_time_len, 1, 868 sizeof (nfstime4), (xdrproc_t)xdr_nfstime4)) 869 return (FALSE); 870 return (TRUE); 871 } 872 873 bool_t 874 xdr_retention_set4(XDR *xdrs, retention_set4 *objp) 875 { 876 877 rpc_inline_t *buf; 878 879 if (!xdr_bool(xdrs, &objp->rs_enable)) 880 return (FALSE); 881 if (!xdr_array(xdrs, (char **)&objp->rs_duration.rs_duration_val, 882 (uint_t *)&objp->rs_duration.rs_duration_len, 1, 883 sizeof (uint64_t), (xdrproc_t)xdr_uint64_t)) 884 return (FALSE); 885 return (TRUE); 886 } 887 888 bool_t 889 xdr_fs_charset_cap4(XDR *xdrs, fs_charset_cap4 *objp) 890 { 891 892 rpc_inline_t *buf; 893 894 if (!xdr_uint32_t(xdrs, objp)) 895 return (FALSE); 896 return (TRUE); 897 } 898 899 bool_t 900 xdr_fattr4_supported_attrs(XDR *xdrs, fattr4_supported_attrs *objp) 901 { 902 903 rpc_inline_t *buf; 904 905 if (!xdr_bitmap4(xdrs, objp)) 906 return (FALSE); 907 return (TRUE); 908 } 909 910 bool_t 911 xdr_fattr4_suppattr_exclcreat(XDR *xdrs, fattr4_suppattr_exclcreat *objp) 912 { 913 914 rpc_inline_t *buf; 915 916 if (!xdr_bitmap4(xdrs, objp)) 917 return (FALSE); 918 return (TRUE); 919 } 920 921 bool_t 922 xdr_fattr4_type(XDR *xdrs, fattr4_type *objp) 923 { 924 925 rpc_inline_t *buf; 926 927 if (!xdr_nfs_ftype4(xdrs, objp)) 928 return (FALSE); 929 return (TRUE); 930 } 931 932 bool_t 933 xdr_fattr4_fh_expire_type(XDR *xdrs, fattr4_fh_expire_type *objp) 934 { 935 936 rpc_inline_t *buf; 937 938 if (!xdr_uint32_t(xdrs, objp)) 939 return (FALSE); 940 return (TRUE); 941 } 942 943 bool_t 944 xdr_fattr4_change(XDR *xdrs, fattr4_change *objp) 945 { 946 947 rpc_inline_t *buf; 948 949 if (!xdr_changeid4(xdrs, objp)) 950 return (FALSE); 951 return (TRUE); 952 } 953 954 bool_t 955 xdr_fattr4_size(XDR *xdrs, fattr4_size *objp) 956 { 957 958 rpc_inline_t *buf; 959 960 if (!xdr_uint64_t(xdrs, objp)) 961 return (FALSE); 962 return (TRUE); 963 } 964 965 bool_t 966 xdr_fattr4_link_support(XDR *xdrs, fattr4_link_support *objp) 967 { 968 969 rpc_inline_t *buf; 970 971 if (!xdr_bool(xdrs, objp)) 972 return (FALSE); 973 return (TRUE); 974 } 975 976 bool_t 977 xdr_fattr4_symlink_support(XDR *xdrs, fattr4_symlink_support *objp) 978 { 979 980 rpc_inline_t *buf; 981 982 if (!xdr_bool(xdrs, objp)) 983 return (FALSE); 984 return (TRUE); 985 } 986 987 bool_t 988 xdr_fattr4_named_attr(XDR *xdrs, fattr4_named_attr *objp) 989 { 990 991 rpc_inline_t *buf; 992 993 if (!xdr_bool(xdrs, objp)) 994 return (FALSE); 995 return (TRUE); 996 } 997 998 bool_t 999 xdr_fattr4_fsid(XDR *xdrs, fattr4_fsid *objp) 1000 { 1001 1002 rpc_inline_t *buf; 1003 1004 if (!xdr_fsid4(xdrs, objp)) 1005 return (FALSE); 1006 return (TRUE); 1007 } 1008 1009 bool_t 1010 xdr_fattr4_unique_handles(XDR *xdrs, fattr4_unique_handles *objp) 1011 { 1012 1013 rpc_inline_t *buf; 1014 1015 if (!xdr_bool(xdrs, objp)) 1016 return (FALSE); 1017 return (TRUE); 1018 } 1019 1020 bool_t 1021 xdr_fattr4_lease_time(XDR *xdrs, fattr4_lease_time *objp) 1022 { 1023 1024 rpc_inline_t *buf; 1025 1026 if (!xdr_nfs_lease4(xdrs, objp)) 1027 return (FALSE); 1028 return (TRUE); 1029 } 1030 1031 bool_t 1032 xdr_fattr4_rdattr_error(XDR *xdrs, fattr4_rdattr_error *objp) 1033 { 1034 1035 rpc_inline_t *buf; 1036 1037 if (!xdr_nfsstat4(xdrs, objp)) 1038 return (FALSE); 1039 return (TRUE); 1040 } 1041 1042 bool_t 1043 xdr_fattr4_acl(XDR *xdrs, fattr4_acl *objp) 1044 { 1045 1046 rpc_inline_t *buf; 1047 1048 if (!xdr_array(xdrs, (char **)&objp->fattr4_acl_val, 1049 (uint_t *)&objp->fattr4_acl_len, ~0, 1050 sizeof (nfsace4), (xdrproc_t)xdr_nfsace4)) 1051 return (FALSE); 1052 return (TRUE); 1053 } 1054 1055 bool_t 1056 xdr_fattr4_aclsupport(XDR *xdrs, fattr4_aclsupport *objp) 1057 { 1058 1059 rpc_inline_t *buf; 1060 1061 if (!xdr_uint32_t(xdrs, objp)) 1062 return (FALSE); 1063 return (TRUE); 1064 } 1065 1066 bool_t 1067 xdr_fattr4_archive(XDR *xdrs, fattr4_archive *objp) 1068 { 1069 1070 rpc_inline_t *buf; 1071 1072 if (!xdr_bool(xdrs, objp)) 1073 return (FALSE); 1074 return (TRUE); 1075 } 1076 1077 bool_t 1078 xdr_fattr4_cansettime(XDR *xdrs, fattr4_cansettime *objp) 1079 { 1080 1081 rpc_inline_t *buf; 1082 1083 if (!xdr_bool(xdrs, objp)) 1084 return (FALSE); 1085 return (TRUE); 1086 } 1087 1088 bool_t 1089 xdr_fattr4_case_insensitive(XDR *xdrs, fattr4_case_insensitive *objp) 1090 { 1091 1092 rpc_inline_t *buf; 1093 1094 if (!xdr_bool(xdrs, objp)) 1095 return (FALSE); 1096 return (TRUE); 1097 } 1098 1099 bool_t 1100 xdr_fattr4_case_preserving(XDR *xdrs, fattr4_case_preserving *objp) 1101 { 1102 1103 rpc_inline_t *buf; 1104 1105 if (!xdr_bool(xdrs, objp)) 1106 return (FALSE); 1107 return (TRUE); 1108 } 1109 1110 bool_t 1111 xdr_fattr4_chown_restricted(XDR *xdrs, fattr4_chown_restricted *objp) 1112 { 1113 1114 rpc_inline_t *buf; 1115 1116 if (!xdr_bool(xdrs, objp)) 1117 return (FALSE); 1118 return (TRUE); 1119 } 1120 1121 bool_t 1122 xdr_fattr4_fileid(XDR *xdrs, fattr4_fileid *objp) 1123 { 1124 1125 rpc_inline_t *buf; 1126 1127 if (!xdr_uint64_t(xdrs, objp)) 1128 return (FALSE); 1129 return (TRUE); 1130 } 1131 1132 bool_t 1133 xdr_fattr4_files_avail(XDR *xdrs, fattr4_files_avail *objp) 1134 { 1135 1136 rpc_inline_t *buf; 1137 1138 if (!xdr_uint64_t(xdrs, objp)) 1139 return (FALSE); 1140 return (TRUE); 1141 } 1142 1143 bool_t 1144 xdr_fattr4_filehandle(XDR *xdrs, fattr4_filehandle *objp) 1145 { 1146 1147 rpc_inline_t *buf; 1148 1149 if (!xdr_nfs_fh4(xdrs, objp)) 1150 return (FALSE); 1151 return (TRUE); 1152 } 1153 1154 bool_t 1155 xdr_fattr4_files_free(XDR *xdrs, fattr4_files_free *objp) 1156 { 1157 1158 rpc_inline_t *buf; 1159 1160 if (!xdr_uint64_t(xdrs, objp)) 1161 return (FALSE); 1162 return (TRUE); 1163 } 1164 1165 bool_t 1166 xdr_fattr4_files_total(XDR *xdrs, fattr4_files_total *objp) 1167 { 1168 1169 rpc_inline_t *buf; 1170 1171 if (!xdr_uint64_t(xdrs, objp)) 1172 return (FALSE); 1173 return (TRUE); 1174 } 1175 1176 bool_t 1177 xdr_fattr4_fs_locations(XDR *xdrs, fattr4_fs_locations *objp) 1178 { 1179 1180 rpc_inline_t *buf; 1181 1182 if (!xdr_fs_locations4(xdrs, objp)) 1183 return (FALSE); 1184 return (TRUE); 1185 } 1186 1187 bool_t 1188 xdr_fattr4_hidden(XDR *xdrs, fattr4_hidden *objp) 1189 { 1190 1191 rpc_inline_t *buf; 1192 1193 if (!xdr_bool(xdrs, objp)) 1194 return (FALSE); 1195 return (TRUE); 1196 } 1197 1198 bool_t 1199 xdr_fattr4_homogeneous(XDR *xdrs, fattr4_homogeneous *objp) 1200 { 1201 1202 rpc_inline_t *buf; 1203 1204 if (!xdr_bool(xdrs, objp)) 1205 return (FALSE); 1206 return (TRUE); 1207 } 1208 1209 bool_t 1210 xdr_fattr4_maxfilesize(XDR *xdrs, fattr4_maxfilesize *objp) 1211 { 1212 1213 rpc_inline_t *buf; 1214 1215 if (!xdr_uint64_t(xdrs, objp)) 1216 return (FALSE); 1217 return (TRUE); 1218 } 1219 1220 bool_t 1221 xdr_fattr4_maxlink(XDR *xdrs, fattr4_maxlink *objp) 1222 { 1223 1224 rpc_inline_t *buf; 1225 1226 if (!xdr_uint32_t(xdrs, objp)) 1227 return (FALSE); 1228 return (TRUE); 1229 } 1230 1231 bool_t 1232 xdr_fattr4_maxname(XDR *xdrs, fattr4_maxname *objp) 1233 { 1234 1235 rpc_inline_t *buf; 1236 1237 if (!xdr_uint32_t(xdrs, objp)) 1238 return (FALSE); 1239 return (TRUE); 1240 } 1241 1242 bool_t 1243 xdr_fattr4_maxread(XDR *xdrs, fattr4_maxread *objp) 1244 { 1245 1246 rpc_inline_t *buf; 1247 1248 if (!xdr_uint64_t(xdrs, objp)) 1249 return (FALSE); 1250 return (TRUE); 1251 } 1252 1253 bool_t 1254 xdr_fattr4_maxwrite(XDR *xdrs, fattr4_maxwrite *objp) 1255 { 1256 1257 rpc_inline_t *buf; 1258 1259 if (!xdr_uint64_t(xdrs, objp)) 1260 return (FALSE); 1261 return (TRUE); 1262 } 1263 1264 bool_t 1265 xdr_fattr4_mimetype(XDR *xdrs, fattr4_mimetype *objp) 1266 { 1267 1268 rpc_inline_t *buf; 1269 1270 if (!xdr_utf8str_cs(xdrs, objp)) 1271 return (FALSE); 1272 return (TRUE); 1273 } 1274 1275 bool_t 1276 xdr_fattr4_mode(XDR *xdrs, fattr4_mode *objp) 1277 { 1278 1279 rpc_inline_t *buf; 1280 1281 if (!xdr_mode4(xdrs, objp)) 1282 return (FALSE); 1283 return (TRUE); 1284 } 1285 1286 bool_t 1287 xdr_fattr4_mode_set_masked(XDR *xdrs, fattr4_mode_set_masked *objp) 1288 { 1289 1290 rpc_inline_t *buf; 1291 1292 if (!xdr_mode_masked4(xdrs, objp)) 1293 return (FALSE); 1294 return (TRUE); 1295 } 1296 1297 bool_t 1298 xdr_fattr4_mounted_on_fileid(XDR *xdrs, fattr4_mounted_on_fileid *objp) 1299 { 1300 1301 rpc_inline_t *buf; 1302 1303 if (!xdr_uint64_t(xdrs, objp)) 1304 return (FALSE); 1305 return (TRUE); 1306 } 1307 1308 bool_t 1309 xdr_fattr4_no_trunc(XDR *xdrs, fattr4_no_trunc *objp) 1310 { 1311 1312 rpc_inline_t *buf; 1313 1314 if (!xdr_bool(xdrs, objp)) 1315 return (FALSE); 1316 return (TRUE); 1317 } 1318 1319 bool_t 1320 xdr_fattr4_numlinks(XDR *xdrs, fattr4_numlinks *objp) 1321 { 1322 1323 rpc_inline_t *buf; 1324 1325 if (!xdr_uint32_t(xdrs, objp)) 1326 return (FALSE); 1327 return (TRUE); 1328 } 1329 1330 bool_t 1331 xdr_fattr4_owner(XDR *xdrs, fattr4_owner *objp) 1332 { 1333 1334 rpc_inline_t *buf; 1335 1336 if (!xdr_utf8str_mixed(xdrs, objp)) 1337 return (FALSE); 1338 return (TRUE); 1339 } 1340 1341 bool_t 1342 xdr_fattr4_owner_group(XDR *xdrs, fattr4_owner_group *objp) 1343 { 1344 1345 rpc_inline_t *buf; 1346 1347 if (!xdr_utf8str_mixed(xdrs, objp)) 1348 return (FALSE); 1349 return (TRUE); 1350 } 1351 1352 bool_t 1353 xdr_fattr4_quota_avail_hard(XDR *xdrs, fattr4_quota_avail_hard *objp) 1354 { 1355 1356 rpc_inline_t *buf; 1357 1358 if (!xdr_uint64_t(xdrs, objp)) 1359 return (FALSE); 1360 return (TRUE); 1361 } 1362 1363 bool_t 1364 xdr_fattr4_quota_avail_soft(XDR *xdrs, fattr4_quota_avail_soft *objp) 1365 { 1366 1367 rpc_inline_t *buf; 1368 1369 if (!xdr_uint64_t(xdrs, objp)) 1370 return (FALSE); 1371 return (TRUE); 1372 } 1373 1374 bool_t 1375 xdr_fattr4_quota_used(XDR *xdrs, fattr4_quota_used *objp) 1376 { 1377 1378 rpc_inline_t *buf; 1379 1380 if (!xdr_uint64_t(xdrs, objp)) 1381 return (FALSE); 1382 return (TRUE); 1383 } 1384 1385 bool_t 1386 xdr_fattr4_rawdev(XDR *xdrs, fattr4_rawdev *objp) 1387 { 1388 1389 rpc_inline_t *buf; 1390 1391 if (!xdr_specdata4(xdrs, objp)) 1392 return (FALSE); 1393 return (TRUE); 1394 } 1395 1396 bool_t 1397 xdr_fattr4_space_avail(XDR *xdrs, fattr4_space_avail *objp) 1398 { 1399 1400 rpc_inline_t *buf; 1401 1402 if (!xdr_uint64_t(xdrs, objp)) 1403 return (FALSE); 1404 return (TRUE); 1405 } 1406 1407 bool_t 1408 xdr_fattr4_space_free(XDR *xdrs, fattr4_space_free *objp) 1409 { 1410 1411 rpc_inline_t *buf; 1412 1413 if (!xdr_uint64_t(xdrs, objp)) 1414 return (FALSE); 1415 return (TRUE); 1416 } 1417 1418 bool_t 1419 xdr_fattr4_space_total(XDR *xdrs, fattr4_space_total *objp) 1420 { 1421 1422 rpc_inline_t *buf; 1423 1424 if (!xdr_uint64_t(xdrs, objp)) 1425 return (FALSE); 1426 return (TRUE); 1427 } 1428 1429 bool_t 1430 xdr_fattr4_space_used(XDR *xdrs, fattr4_space_used *objp) 1431 { 1432 1433 rpc_inline_t *buf; 1434 1435 if (!xdr_uint64_t(xdrs, objp)) 1436 return (FALSE); 1437 return (TRUE); 1438 } 1439 1440 bool_t 1441 xdr_fattr4_system(XDR *xdrs, fattr4_system *objp) 1442 { 1443 1444 rpc_inline_t *buf; 1445 1446 if (!xdr_bool(xdrs, objp)) 1447 return (FALSE); 1448 return (TRUE); 1449 } 1450 1451 bool_t 1452 xdr_fattr4_time_access(XDR *xdrs, fattr4_time_access *objp) 1453 { 1454 1455 rpc_inline_t *buf; 1456 1457 if (!xdr_nfstime4(xdrs, objp)) 1458 return (FALSE); 1459 return (TRUE); 1460 } 1461 1462 bool_t 1463 xdr_fattr4_time_access_set(XDR *xdrs, fattr4_time_access_set *objp) 1464 { 1465 1466 rpc_inline_t *buf; 1467 1468 if (!xdr_settime4(xdrs, objp)) 1469 return (FALSE); 1470 return (TRUE); 1471 } 1472 1473 bool_t 1474 xdr_fattr4_time_backup(XDR *xdrs, fattr4_time_backup *objp) 1475 { 1476 1477 rpc_inline_t *buf; 1478 1479 if (!xdr_nfstime4(xdrs, objp)) 1480 return (FALSE); 1481 return (TRUE); 1482 } 1483 1484 bool_t 1485 xdr_fattr4_time_create(XDR *xdrs, fattr4_time_create *objp) 1486 { 1487 1488 rpc_inline_t *buf; 1489 1490 if (!xdr_nfstime4(xdrs, objp)) 1491 return (FALSE); 1492 return (TRUE); 1493 } 1494 1495 bool_t 1496 xdr_fattr4_time_delta(XDR *xdrs, fattr4_time_delta *objp) 1497 { 1498 1499 rpc_inline_t *buf; 1500 1501 if (!xdr_nfstime4(xdrs, objp)) 1502 return (FALSE); 1503 return (TRUE); 1504 } 1505 1506 bool_t 1507 xdr_fattr4_time_metadata(XDR *xdrs, fattr4_time_metadata *objp) 1508 { 1509 1510 rpc_inline_t *buf; 1511 1512 if (!xdr_nfstime4(xdrs, objp)) 1513 return (FALSE); 1514 return (TRUE); 1515 } 1516 1517 bool_t 1518 xdr_fattr4_time_modify(XDR *xdrs, fattr4_time_modify *objp) 1519 { 1520 1521 rpc_inline_t *buf; 1522 1523 if (!xdr_nfstime4(xdrs, objp)) 1524 return (FALSE); 1525 return (TRUE); 1526 } 1527 1528 bool_t 1529 xdr_fattr4_time_modify_set(XDR *xdrs, fattr4_time_modify_set *objp) 1530 { 1531 1532 rpc_inline_t *buf; 1533 1534 if (!xdr_settime4(xdrs, objp)) 1535 return (FALSE); 1536 return (TRUE); 1537 } 1538 1539 bool_t 1540 xdr_fattr4_dir_notif_delay(XDR *xdrs, fattr4_dir_notif_delay *objp) 1541 { 1542 1543 rpc_inline_t *buf; 1544 1545 if (!xdr_nfstime4(xdrs, objp)) 1546 return (FALSE); 1547 return (TRUE); 1548 } 1549 1550 bool_t 1551 xdr_fattr4_dirent_notif_delay(XDR *xdrs, fattr4_dirent_notif_delay *objp) 1552 { 1553 1554 rpc_inline_t *buf; 1555 1556 if (!xdr_nfstime4(xdrs, objp)) 1557 return (FALSE); 1558 return (TRUE); 1559 } 1560 1561 bool_t 1562 xdr_fattr4_absent(XDR *xdrs, fattr4_absent *objp) 1563 { 1564 1565 rpc_inline_t *buf; 1566 1567 if (!xdr_bool(xdrs, objp)) 1568 return (FALSE); 1569 return (TRUE); 1570 } 1571 1572 bool_t 1573 xdr_fattr4_fs_layout_types(XDR *xdrs, fattr4_fs_layout_types *objp) 1574 { 1575 1576 rpc_inline_t *buf; 1577 1578 if (!xdr_array(xdrs, (char **)&objp->fattr4_fs_layout_types_val, 1579 (uint_t *)&objp->fattr4_fs_layout_types_len, ~0, 1580 sizeof (layouttype4), (xdrproc_t)xdr_layouttype4)) 1581 return (FALSE); 1582 return (TRUE); 1583 } 1584 1585 bool_t 1586 xdr_fattr4_fs_status(XDR *xdrs, fattr4_fs_status *objp) 1587 { 1588 1589 rpc_inline_t *buf; 1590 1591 if (!xdr_fs4_status(xdrs, objp)) 1592 return (FALSE); 1593 return (TRUE); 1594 } 1595 1596 bool_t 1597 xdr_fattr4_fs_charset_cap4(XDR *xdrs, fattr4_fs_charset_cap4 *objp) 1598 { 1599 1600 rpc_inline_t *buf; 1601 1602 if (!xdr_fs_charset_cap4(xdrs, objp)) 1603 return (FALSE); 1604 return (TRUE); 1605 } 1606 1607 bool_t 1608 xdr_fattr4_layout_alignment(XDR *xdrs, fattr4_layout_alignment *objp) 1609 { 1610 1611 rpc_inline_t *buf; 1612 1613 if (!xdr_uint32_t(xdrs, objp)) 1614 return (FALSE); 1615 return (TRUE); 1616 } 1617 1618 bool_t 1619 xdr_fattr4_layout_blksize(XDR *xdrs, fattr4_layout_blksize *objp) 1620 { 1621 1622 rpc_inline_t *buf; 1623 1624 if (!xdr_uint32_t(xdrs, objp)) 1625 return (FALSE); 1626 return (TRUE); 1627 } 1628 1629 bool_t 1630 xdr_fattr4_layout_hint(XDR *xdrs, fattr4_layout_hint *objp) 1631 { 1632 1633 rpc_inline_t *buf; 1634 1635 if (!xdr_layouthint4(xdrs, objp)) 1636 return (FALSE); 1637 return (TRUE); 1638 } 1639 1640 bool_t 1641 xdr_fattr4_layout_types(XDR *xdrs, fattr4_layout_types *objp) 1642 { 1643 1644 rpc_inline_t *buf; 1645 1646 if (!xdr_array(xdrs, (char **)&objp->fattr4_layout_types_val, 1647 (uint_t *)&objp->fattr4_layout_types_len, ~0, 1648 sizeof (layouttype4), (xdrproc_t)xdr_layouttype4)) 1649 return (FALSE); 1650 return (TRUE); 1651 } 1652 1653 bool_t 1654 xdr_fattr4_mdsthreshold(XDR *xdrs, fattr4_mdsthreshold *objp) 1655 { 1656 1657 rpc_inline_t *buf; 1658 1659 if (!xdr_mdsthreshold4(xdrs, objp)) 1660 return (FALSE); 1661 return (TRUE); 1662 } 1663 1664 bool_t 1665 xdr_fattr4_retention_get(XDR *xdrs, fattr4_retention_get *objp) 1666 { 1667 1668 rpc_inline_t *buf; 1669 1670 if (!xdr_retention_get4(xdrs, objp)) 1671 return (FALSE); 1672 return (TRUE); 1673 } 1674 1675 bool_t 1676 xdr_fattr4_retention_set(XDR *xdrs, fattr4_retention_set *objp) 1677 { 1678 1679 rpc_inline_t *buf; 1680 1681 if (!xdr_retention_set4(xdrs, objp)) 1682 return (FALSE); 1683 return (TRUE); 1684 } 1685 1686 bool_t 1687 xdr_fattr4_retentevt_get(XDR *xdrs, fattr4_retentevt_get *objp) 1688 { 1689 1690 rpc_inline_t *buf; 1691 1692 if (!xdr_retention_get4(xdrs, objp)) 1693 return (FALSE); 1694 return (TRUE); 1695 } 1696 1697 bool_t 1698 xdr_fattr4_retentevt_set(XDR *xdrs, fattr4_retentevt_set *objp) 1699 { 1700 1701 rpc_inline_t *buf; 1702 1703 if (!xdr_retention_set4(xdrs, objp)) 1704 return (FALSE); 1705 return (TRUE); 1706 } 1707 1708 bool_t 1709 xdr_fattr4_retention_hold(XDR *xdrs, fattr4_retention_hold *objp) 1710 { 1711 1712 rpc_inline_t *buf; 1713 1714 if (!xdr_uint64_t(xdrs, objp)) 1715 return (FALSE); 1716 return (TRUE); 1717 } 1718 1719 bool_t 1720 xdr_fattr4_dacl(XDR *xdrs, fattr4_dacl *objp) 1721 { 1722 1723 rpc_inline_t *buf; 1724 1725 if (!xdr_nfsacl41(xdrs, objp)) 1726 return (FALSE); 1727 return (TRUE); 1728 } 1729 1730 bool_t 1731 xdr_fattr4_sacl(XDR *xdrs, fattr4_sacl *objp) 1732 { 1733 1734 rpc_inline_t *buf; 1735 1736 if (!xdr_nfsacl41(xdrs, objp)) 1737 return (FALSE); 1738 return (TRUE); 1739 } 1740 1741 bool_t 1742 xdr_fattr4(XDR *xdrs, fattr4 *objp) 1743 { 1744 1745 rpc_inline_t *buf; 1746 1747 if (!xdr_bitmap4(xdrs, &objp->attrmask)) 1748 return (FALSE); 1749 if (!xdr_attrlist4(xdrs, &objp->attr_vals)) 1750 return (FALSE); 1751 return (TRUE); 1752 } 1753 1754 bool_t 1755 xdr_change_info4(XDR *xdrs, change_info4 *objp) 1756 { 1757 1758 rpc_inline_t *buf; 1759 1760 if (!xdr_bool(xdrs, &objp->atomic)) 1761 return (FALSE); 1762 if (!xdr_changeid4(xdrs, &objp->before)) 1763 return (FALSE); 1764 if (!xdr_changeid4(xdrs, &objp->after)) 1765 return (FALSE); 1766 return (TRUE); 1767 } 1768 1769 bool_t 1770 xdr_clientaddr4(XDR *xdrs, clientaddr4 *objp) 1771 { 1772 1773 rpc_inline_t *buf; 1774 1775 if (!xdr_netaddr4(xdrs, objp)) 1776 return (FALSE); 1777 return (TRUE); 1778 } 1779 1780 bool_t 1781 xdr_cb_client4(XDR *xdrs, cb_client4 *objp) 1782 { 1783 1784 rpc_inline_t *buf; 1785 1786 if (!xdr_uint32_t(xdrs, &objp->cb_program)) 1787 return (FALSE); 1788 if (!xdr_netaddr4(xdrs, &objp->cb_location)) 1789 return (FALSE); 1790 return (TRUE); 1791 } 1792 1793 bool_t 1794 xdr_nfs_client_id4(XDR *xdrs, nfs_client_id4 *objp) 1795 { 1796 1797 rpc_inline_t *buf; 1798 1799 if (!xdr_verifier4(xdrs, objp->verifier)) 1800 return (FALSE); 1801 if (!xdr_bytes(xdrs, (char **)&objp->id.id_val, 1802 (uint_t *)&objp->id.id_len, NFS4_OPAQUE_LIMIT)) 1803 return (FALSE); 1804 return (TRUE); 1805 } 1806 1807 bool_t 1808 xdr_client_owner4(XDR *xdrs, client_owner4 *objp) 1809 { 1810 1811 rpc_inline_t *buf; 1812 1813 if (!xdr_verifier4(xdrs, objp->co_verifier)) 1814 return (FALSE); 1815 if (!xdr_bytes(xdrs, (char **)&objp->co_ownerid.co_ownerid_val, 1816 (uint_t *)&objp->co_ownerid.co_ownerid_len, NFS4_OPAQUE_LIMIT)) 1817 return (FALSE); 1818 return (TRUE); 1819 } 1820 1821 bool_t 1822 xdr_server_owner4(XDR *xdrs, server_owner4 *objp) 1823 { 1824 1825 rpc_inline_t *buf; 1826 1827 if (!xdr_uint64_t(xdrs, &objp->so_minor_id)) 1828 return (FALSE); 1829 if (!xdr_bytes(xdrs, (char **)&objp->so_major_id.so_major_id_val, 1830 (uint_t *)&objp->so_major_id.so_major_id_len, NFS4_OPAQUE_LIMIT)) 1831 return (FALSE); 1832 return (TRUE); 1833 } 1834 1835 bool_t 1836 xdr_state_owner4(XDR *xdrs, state_owner4 *objp) 1837 { 1838 1839 rpc_inline_t *buf; 1840 1841 if (!xdr_clientid4(xdrs, &objp->clientid)) 1842 return (FALSE); 1843 if (!xdr_bytes(xdrs, (char **)&objp->owner.owner_val, 1844 (uint_t *)&objp->owner.owner_len, NFS4_OPAQUE_LIMIT)) 1845 return (FALSE); 1846 return (TRUE); 1847 } 1848 1849 bool_t 1850 xdr_open_owner4(XDR *xdrs, open_owner4 *objp) 1851 { 1852 1853 rpc_inline_t *buf; 1854 1855 if (!xdr_state_owner4(xdrs, objp)) 1856 return (FALSE); 1857 return (TRUE); 1858 } 1859 1860 bool_t 1861 xdr_lock_owner4(XDR *xdrs, lock_owner4 *objp) 1862 { 1863 1864 rpc_inline_t *buf; 1865 1866 if (!xdr_state_owner4(xdrs, objp)) 1867 return (FALSE); 1868 return (TRUE); 1869 } 1870 1871 bool_t 1872 xdr_nfs_lock_type4(XDR *xdrs, nfs_lock_type4 *objp) 1873 { 1874 1875 rpc_inline_t *buf; 1876 1877 if (!xdr_enum(xdrs, (enum_t *)objp)) 1878 return (FALSE); 1879 return (TRUE); 1880 } 1881 1882 /* Input for computing subkeys */ 1883 1884 bool_t 1885 xdr_ssv_subkey4(XDR *xdrs, ssv_subkey4 *objp) 1886 { 1887 1888 rpc_inline_t *buf; 1889 1890 if (!xdr_enum(xdrs, (enum_t *)objp)) 1891 return (FALSE); 1892 return (TRUE); 1893 } 1894 1895 1896 /* Input for computing smt_hmac */ 1897 1898 bool_t 1899 xdr_ssv_mic_plain_tkn4(XDR *xdrs, ssv_mic_plain_tkn4 *objp) 1900 { 1901 1902 rpc_inline_t *buf; 1903 1904 if (!xdr_uint32_t(xdrs, &objp->smpt_ssv_seq)) 1905 return (FALSE); 1906 if (!xdr_bytes(xdrs, 1907 (char **)&objp->smpt_orig_plain.smpt_orig_plain_val, 1908 (uint_t *)&objp->smpt_orig_plain.smpt_orig_plain_len, ~0)) 1909 return (FALSE); 1910 return (TRUE); 1911 } 1912 1913 1914 /* SSV GSS PerMsgToken token */ 1915 1916 bool_t 1917 xdr_ssv_mic_tkn4(XDR *xdrs, ssv_mic_tkn4 *objp) 1918 { 1919 1920 rpc_inline_t *buf; 1921 1922 if (!xdr_uint32_t(xdrs, &objp->smt_ssv_seq)) 1923 return (FALSE); 1924 if (!xdr_bytes(xdrs, (char **)&objp->smt_hmac.smt_hmac_val, 1925 (uint_t *)&objp->smt_hmac.smt_hmac_len, ~0)) 1926 return (FALSE); 1927 return (TRUE); 1928 } 1929 1930 1931 /* Input for computing ssct_encr_data and ssct_hmac */ 1932 1933 bool_t 1934 xdr_ssv_seal_plain_tkn4(XDR *xdrs, ssv_seal_plain_tkn4 *objp) 1935 { 1936 1937 rpc_inline_t *buf; 1938 1939 if (!xdr_bytes(xdrs, 1940 (char **)&objp->sspt_confounder.sspt_confounder_val, 1941 (uint_t *)&objp->sspt_confounder.sspt_confounder_len, ~0)) 1942 return (FALSE); 1943 if (!xdr_uint32_t(xdrs, &objp->sspt_ssv_seq)) 1944 return (FALSE); 1945 if (!xdr_bytes(xdrs, 1946 (char **)&objp->sspt_orig_plain.sspt_orig_plain_val, 1947 (uint_t *)&objp->sspt_orig_plain.sspt_orig_plain_len, ~0)) 1948 return (FALSE); 1949 if (!xdr_bytes(xdrs, (char **)&objp->sspt_pad.sspt_pad_val, 1950 (uint_t *)&objp->sspt_pad.sspt_pad_len, ~0)) 1951 return (FALSE); 1952 return (TRUE); 1953 } 1954 1955 1956 /* SSV GSS SealedMessage token */ 1957 1958 bool_t 1959 xdr_ssv_seal_cipher_tkn4(XDR *xdrs, ssv_seal_cipher_tkn4 *objp) 1960 { 1961 1962 rpc_inline_t *buf; 1963 1964 if (!xdr_uint32_t(xdrs, &objp->ssct_ssv_seq)) 1965 return (FALSE); 1966 if (!xdr_bytes(xdrs, (char **)&objp->ssct_iv.ssct_iv_val, 1967 (uint_t *)&objp->ssct_iv.ssct_iv_len, ~0)) 1968 return (FALSE); 1969 if (!xdr_bytes(xdrs, 1970 (char **)&objp->ssct_encr_data.ssct_encr_data_val, 1971 (uint_t *)&objp->ssct_encr_data.ssct_encr_data_len, ~0)) 1972 return (FALSE); 1973 if (!xdr_bytes(xdrs, (char **)&objp->ssct_hmac.ssct_hmac_val, 1974 (uint_t *)&objp->ssct_hmac.ssct_hmac_len, ~0)) 1975 return (FALSE); 1976 return (TRUE); 1977 } 1978 1979 1980 bool_t 1981 xdr_fs_locations_server4(XDR *xdrs, fs_locations_server4 *objp) 1982 { 1983 1984 rpc_inline_t *buf; 1985 1986 if (!xdr_int32_t(xdrs, &objp->fls_currency)) 1987 return (FALSE); 1988 if (!xdr_bytes(xdrs, (char **)&objp->fls_info.fls_info_val, 1989 (uint_t *)&objp->fls_info.fls_info_len, ~0)) 1990 return (FALSE); 1991 if (!xdr_utf8str_cis(xdrs, &objp->fls_server)) 1992 return (FALSE); 1993 return (TRUE); 1994 } 1995 1996 bool_t 1997 xdr_fs_locations_item4(XDR *xdrs, fs_locations_item4 *objp) 1998 { 1999 2000 rpc_inline_t *buf; 2001 2002 if (!xdr_array(xdrs, (char **)&objp->fli_entries.fli_entries_val, 2003 (uint_t *)&objp->fli_entries.fli_entries_len, ~0, 2004 sizeof (fs_locations_server4), (xdrproc_t)xdr_fs_locations_server4)) 2005 return (FALSE); 2006 if (!xdr_pathname4(xdrs, &objp->fli_rootpath)) 2007 return (FALSE); 2008 return (TRUE); 2009 } 2010 2011 bool_t 2012 xdr_fs_locations_info4(XDR *xdrs, fs_locations_info4 *objp) 2013 { 2014 2015 rpc_inline_t *buf; 2016 2017 if (!xdr_uint32_t(xdrs, &objp->fli_flags)) 2018 return (FALSE); 2019 if (!xdr_int32_t(xdrs, &objp->fli_valid_for)) 2020 return (FALSE); 2021 if (!xdr_pathname4(xdrs, &objp->fli_fs_root)) 2022 return (FALSE); 2023 if (!xdr_array(xdrs, (char **)&objp->fli_items.fli_items_val, 2024 (uint_t *)&objp->fli_items.fli_items_len, ~0, 2025 sizeof (fs_locations_item4), (xdrproc_t)xdr_fs_locations_item4)) 2026 return (FALSE); 2027 return (TRUE); 2028 } 2029 2030 bool_t 2031 xdr_fattr4_fs_locations_info(XDR *xdrs, fattr4_fs_locations_info *objp) 2032 { 2033 2034 rpc_inline_t *buf; 2035 2036 if (!xdr_fs_locations_info4(xdrs, objp)) 2037 return (FALSE); 2038 return (TRUE); 2039 } 2040 2041 bool_t 2042 xdr_nfl_util4(XDR *xdrs, nfl_util4 *objp) 2043 { 2044 2045 rpc_inline_t *buf; 2046 2047 if (!xdr_uint32_t(xdrs, objp)) 2048 return (FALSE); 2049 return (TRUE); 2050 } 2051 2052 2053 bool_t 2054 xdr_filelayout_hint_care4(XDR *xdrs, filelayout_hint_care4 *objp) 2055 { 2056 2057 rpc_inline_t *buf; 2058 2059 if (!xdr_enum(xdrs, (enum_t *)objp)) 2060 return (FALSE); 2061 return (TRUE); 2062 } 2063 2064 /* Encoded in the loh_body field of type layouthint4: */ 2065 2066 2067 bool_t 2068 xdr_nfsv4_1_file_layouthint4(XDR *xdrs, nfsv4_1_file_layouthint4 *objp) 2069 { 2070 2071 rpc_inline_t *buf; 2072 2073 if (!xdr_uint32_t(xdrs, &objp->nflh_care)) 2074 return (FALSE); 2075 if (!xdr_nfl_util4(xdrs, &objp->nflh_util)) 2076 return (FALSE); 2077 if (!xdr_count4(xdrs, &objp->nflh_stripe_count)) 2078 return (FALSE); 2079 return (TRUE); 2080 } 2081 2082 2083 2084 bool_t 2085 xdr_multipath_list4(XDR *xdrs, multipath_list4 *objp) 2086 { 2087 2088 rpc_inline_t *buf; 2089 2090 if (!xdr_array(xdrs, (char **)&objp->multipath_list4_val, 2091 (uint_t *)&objp->multipath_list4_len, ~0, 2092 sizeof (netaddr4), (xdrproc_t)xdr_netaddr4)) 2093 return (FALSE); 2094 return (TRUE); 2095 } 2096 2097 /* Encoded in the da_addr_body field of type device_addr4: */ 2098 2099 bool_t 2100 xdr_nfsv4_1_file_layout_ds_addr4(XDR *xdrs, nfsv4_1_file_layout_ds_addr4 *objp) 2101 { 2102 2103 rpc_inline_t *buf; 2104 2105 if (!xdr_array(xdrs, 2106 (char **)&objp->nflda_stripe_indices.nflda_stripe_indices_val, 2107 (uint_t *)&objp->nflda_stripe_indices.nflda_stripe_indices_len, ~0, 2108 sizeof (uint32_t), (xdrproc_t)xdr_uint32_t)) 2109 return (FALSE); 2110 if (!xdr_array(xdrs, 2111 (char **)&objp->nflda_multipath_ds_list. 2112 nflda_multipath_ds_list_val, 2113 (uint_t *)&objp->nflda_multipath_ds_list. 2114 nflda_multipath_ds_list_len, ~0, 2115 sizeof (multipath_list4), (xdrproc_t)xdr_multipath_list4)) 2116 return (FALSE); 2117 return (TRUE); 2118 } 2119 2120 2121 /* Encoded in the loc_body field of type layout_content4: */ 2122 2123 bool_t 2124 xdr_nfsv4_1_file_layout4(XDR *xdrs, nfsv4_1_file_layout4 *objp) 2125 { 2126 2127 rpc_inline_t *buf; 2128 2129 if (!xdr_deviceid4(xdrs, objp->nfl_deviceid)) 2130 return (FALSE); 2131 if (!xdr_nfl_util4(xdrs, &objp->nfl_util)) 2132 return (FALSE); 2133 if (!xdr_uint32_t(xdrs, &objp->nfl_first_stripe_index)) 2134 return (FALSE); 2135 if (!xdr_offset4(xdrs, &objp->nfl_pattern_offset)) 2136 return (FALSE); 2137 if (!xdr_array(xdrs, (char **)&objp->nfl_fh_list.nfl_fh_list_val, 2138 (uint_t *)&objp->nfl_fh_list.nfl_fh_list_len, ~0, 2139 sizeof (nfs_fh4), (xdrproc_t)xdr_nfs_fh4)) 2140 return (FALSE); 2141 return (TRUE); 2142 } 2143 2144 /* 2145 * Encoded in the lou_body field of type layoutupdate4: 2146 * Nothing. lou_body is a zero length array of octets. 2147 */ 2148 2149 2150 bool_t 2151 xdr_ACCESS4args(XDR *xdrs, ACCESS4args *objp) 2152 { 2153 2154 rpc_inline_t *buf; 2155 2156 if (!xdr_uint32_t(xdrs, &objp->access)) 2157 return (FALSE); 2158 return (TRUE); 2159 } 2160 2161 bool_t 2162 xdr_ACCESS4resok(XDR *xdrs, ACCESS4resok *objp) 2163 { 2164 2165 rpc_inline_t *buf; 2166 2167 if (!xdr_uint32_t(xdrs, &objp->supported)) 2168 return (FALSE); 2169 if (!xdr_uint32_t(xdrs, &objp->access)) 2170 return (FALSE); 2171 return (TRUE); 2172 } 2173 2174 bool_t 2175 xdr_ACCESS4res(XDR *xdrs, ACCESS4res *objp) 2176 { 2177 2178 rpc_inline_t *buf; 2179 2180 if (!xdr_nfsstat4(xdrs, &objp->status)) 2181 return (FALSE); 2182 switch (objp->status) { 2183 case NFS4_OK: 2184 if (!xdr_ACCESS4resok(xdrs, &objp->ACCESS4res_u.resok4)) 2185 return (FALSE); 2186 break; 2187 } 2188 return (TRUE); 2189 } 2190 2191 bool_t 2192 xdr_CLOSE4args(XDR *xdrs, CLOSE4args *objp) 2193 { 2194 2195 rpc_inline_t *buf; 2196 2197 if (!xdr_seqid4(xdrs, &objp->seqid)) 2198 return (FALSE); 2199 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 2200 return (FALSE); 2201 return (TRUE); 2202 } 2203 2204 bool_t 2205 xdr_CLOSE4res(XDR *xdrs, CLOSE4res *objp) 2206 { 2207 2208 rpc_inline_t *buf; 2209 2210 if (!xdr_nfsstat4(xdrs, &objp->status)) 2211 return (FALSE); 2212 switch (objp->status) { 2213 case NFS4_OK: 2214 if (!xdr_stateid4(xdrs, &objp->CLOSE4res_u.open_stateid)) 2215 return (FALSE); 2216 break; 2217 } 2218 return (TRUE); 2219 } 2220 2221 bool_t 2222 xdr_COMMIT4args(XDR *xdrs, COMMIT4args *objp) 2223 { 2224 2225 rpc_inline_t *buf; 2226 2227 if (!xdr_offset4(xdrs, &objp->offset)) 2228 return (FALSE); 2229 if (!xdr_count4(xdrs, &objp->count)) 2230 return (FALSE); 2231 return (TRUE); 2232 } 2233 2234 bool_t 2235 xdr_COMMIT4resok(XDR *xdrs, COMMIT4resok *objp) 2236 { 2237 2238 rpc_inline_t *buf; 2239 2240 if (!xdr_verifier4(xdrs, objp->writeverf)) 2241 return (FALSE); 2242 return (TRUE); 2243 } 2244 2245 bool_t 2246 xdr_COMMIT4res(XDR *xdrs, COMMIT4res *objp) 2247 { 2248 2249 rpc_inline_t *buf; 2250 2251 if (!xdr_nfsstat4(xdrs, &objp->status)) 2252 return (FALSE); 2253 switch (objp->status) { 2254 case NFS4_OK: 2255 if (!xdr_COMMIT4resok(xdrs, &objp->COMMIT4res_u.resok4)) 2256 return (FALSE); 2257 break; 2258 } 2259 return (TRUE); 2260 } 2261 2262 bool_t 2263 xdr_createtype4(XDR *xdrs, createtype4 *objp) 2264 { 2265 2266 rpc_inline_t *buf; 2267 2268 if (!xdr_nfs_ftype4(xdrs, &objp->type)) 2269 return (FALSE); 2270 switch (objp->type) { 2271 case NF4LNK: 2272 if (!xdr_linktext4(xdrs, &objp->createtype4_u.linkdata)) 2273 return (FALSE); 2274 break; 2275 case NF4BLK: 2276 case NF4CHR: 2277 if (!xdr_specdata4(xdrs, &objp->createtype4_u.devdata)) 2278 return (FALSE); 2279 break; 2280 case NF4SOCK: 2281 case NF4FIFO: 2282 case NF4DIR: 2283 break; 2284 } 2285 return (TRUE); 2286 } 2287 2288 bool_t 2289 xdr_CREATE4args(XDR *xdrs, CREATE4args *objp) 2290 { 2291 2292 rpc_inline_t *buf; 2293 2294 if (!xdr_createtype4(xdrs, &objp->objtype)) 2295 return (FALSE); 2296 if (!xdr_component4(xdrs, &objp->objname)) 2297 return (FALSE); 2298 if (!xdr_fattr4(xdrs, &objp->createattrs)) 2299 return (FALSE); 2300 return (TRUE); 2301 } 2302 2303 bool_t 2304 xdr_CREATE4resok(XDR *xdrs, CREATE4resok *objp) 2305 { 2306 2307 rpc_inline_t *buf; 2308 2309 if (!xdr_change_info4(xdrs, &objp->cinfo)) 2310 return (FALSE); 2311 if (!xdr_bitmap4(xdrs, &objp->attrset)) 2312 return (FALSE); 2313 return (TRUE); 2314 } 2315 2316 bool_t 2317 xdr_CREATE4res(XDR *xdrs, CREATE4res *objp) 2318 { 2319 2320 rpc_inline_t *buf; 2321 2322 if (!xdr_nfsstat4(xdrs, &objp->status)) 2323 return (FALSE); 2324 switch (objp->status) { 2325 case NFS4_OK: 2326 if (!xdr_CREATE4resok(xdrs, &objp->CREATE4res_u.resok4)) 2327 return (FALSE); 2328 break; 2329 } 2330 return (TRUE); 2331 } 2332 2333 bool_t 2334 xdr_DELEGPURGE4args(XDR *xdrs, DELEGPURGE4args *objp) 2335 { 2336 2337 rpc_inline_t *buf; 2338 2339 if (!xdr_clientid4(xdrs, &objp->clientid)) 2340 return (FALSE); 2341 return (TRUE); 2342 } 2343 2344 bool_t 2345 xdr_DELEGPURGE4res(XDR *xdrs, DELEGPURGE4res *objp) 2346 { 2347 2348 rpc_inline_t *buf; 2349 2350 if (!xdr_nfsstat4(xdrs, &objp->status)) 2351 return (FALSE); 2352 return (TRUE); 2353 } 2354 2355 bool_t 2356 xdr_DELEGRETURN4args(XDR *xdrs, DELEGRETURN4args *objp) 2357 { 2358 2359 rpc_inline_t *buf; 2360 2361 if (!xdr_stateid4(xdrs, &objp->deleg_stateid)) 2362 return (FALSE); 2363 return (TRUE); 2364 } 2365 2366 bool_t 2367 xdr_DELEGRETURN4res(XDR *xdrs, DELEGRETURN4res *objp) 2368 { 2369 2370 rpc_inline_t *buf; 2371 2372 if (!xdr_nfsstat4(xdrs, &objp->status)) 2373 return (FALSE); 2374 return (TRUE); 2375 } 2376 2377 bool_t 2378 xdr_GETATTR4args(XDR *xdrs, GETATTR4args *objp) 2379 { 2380 2381 rpc_inline_t *buf; 2382 2383 if (!xdr_bitmap4(xdrs, &objp->attr_request)) 2384 return (FALSE); 2385 return (TRUE); 2386 } 2387 2388 bool_t 2389 xdr_GETATTR4resok(XDR *xdrs, GETATTR4resok *objp) 2390 { 2391 2392 rpc_inline_t *buf; 2393 2394 if (!xdr_fattr4(xdrs, &objp->obj_attributes)) 2395 return (FALSE); 2396 return (TRUE); 2397 } 2398 2399 bool_t 2400 xdr_GETATTR4res(XDR *xdrs, GETATTR4res *objp) 2401 { 2402 2403 rpc_inline_t *buf; 2404 2405 if (!xdr_nfsstat4(xdrs, &objp->status)) 2406 return (FALSE); 2407 switch (objp->status) { 2408 case NFS4_OK: 2409 if (!xdr_GETATTR4resok(xdrs, &objp->GETATTR4res_u.resok4)) 2410 return (FALSE); 2411 break; 2412 } 2413 return (TRUE); 2414 } 2415 2416 bool_t 2417 xdr_GETFH4resok(XDR *xdrs, GETFH4resok *objp) 2418 { 2419 2420 rpc_inline_t *buf; 2421 2422 if (!xdr_nfs_fh4(xdrs, &objp->object)) 2423 return (FALSE); 2424 return (TRUE); 2425 } 2426 2427 bool_t 2428 xdr_GETFH4res(XDR *xdrs, GETFH4res *objp) 2429 { 2430 2431 rpc_inline_t *buf; 2432 2433 if (!xdr_nfsstat4(xdrs, &objp->status)) 2434 return (FALSE); 2435 switch (objp->status) { 2436 case NFS4_OK: 2437 if (!xdr_GETFH4resok(xdrs, &objp->GETFH4res_u.resok4)) 2438 return (FALSE); 2439 break; 2440 } 2441 return (TRUE); 2442 } 2443 2444 bool_t 2445 xdr_LINK4args(XDR *xdrs, LINK4args *objp) 2446 { 2447 2448 rpc_inline_t *buf; 2449 2450 if (!xdr_component4(xdrs, &objp->newname)) 2451 return (FALSE); 2452 return (TRUE); 2453 } 2454 2455 bool_t 2456 xdr_LINK4resok(XDR *xdrs, LINK4resok *objp) 2457 { 2458 2459 rpc_inline_t *buf; 2460 2461 if (!xdr_change_info4(xdrs, &objp->cinfo)) 2462 return (FALSE); 2463 return (TRUE); 2464 } 2465 2466 bool_t 2467 xdr_LINK4res(XDR *xdrs, LINK4res *objp) 2468 { 2469 2470 rpc_inline_t *buf; 2471 2472 if (!xdr_nfsstat4(xdrs, &objp->status)) 2473 return (FALSE); 2474 switch (objp->status) { 2475 case NFS4_OK: 2476 if (!xdr_LINK4resok(xdrs, &objp->LINK4res_u.resok4)) 2477 return (FALSE); 2478 break; 2479 } 2480 return (TRUE); 2481 } 2482 2483 bool_t 2484 xdr_open_to_lock_owner4(XDR *xdrs, open_to_lock_owner4 *objp) 2485 { 2486 2487 rpc_inline_t *buf; 2488 2489 if (!xdr_seqid4(xdrs, &objp->open_seqid)) 2490 return (FALSE); 2491 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 2492 return (FALSE); 2493 if (!xdr_seqid4(xdrs, &objp->lock_seqid)) 2494 return (FALSE); 2495 if (!xdr_lock_owner4(xdrs, &objp->lock_owner)) 2496 return (FALSE); 2497 return (TRUE); 2498 } 2499 2500 bool_t 2501 xdr_exist_lock_owner4(XDR *xdrs, exist_lock_owner4 *objp) 2502 { 2503 2504 rpc_inline_t *buf; 2505 2506 if (!xdr_stateid4(xdrs, &objp->lock_stateid)) 2507 return (FALSE); 2508 if (!xdr_seqid4(xdrs, &objp->lock_seqid)) 2509 return (FALSE); 2510 return (TRUE); 2511 } 2512 2513 bool_t 2514 xdr_locker4(XDR *xdrs, locker4 *objp) 2515 { 2516 2517 rpc_inline_t *buf; 2518 2519 if (!xdr_bool(xdrs, &objp->new_lock_owner)) 2520 return (FALSE); 2521 switch (objp->new_lock_owner) { 2522 case TRUE: 2523 if (!xdr_open_to_lock_owner4(xdrs, &objp->locker4_u.open_owner)) 2524 return (FALSE); 2525 break; 2526 case FALSE: 2527 if (!xdr_exist_lock_owner4(xdrs, &objp->locker4_u.lock_owner)) 2528 return (FALSE); 2529 break; 2530 default: 2531 return (FALSE); 2532 } 2533 return (TRUE); 2534 } 2535 2536 bool_t 2537 xdr_LOCK4args(XDR *xdrs, LOCK4args *objp) 2538 { 2539 2540 rpc_inline_t *buf; 2541 2542 if (!xdr_nfs_lock_type4(xdrs, &objp->locktype)) 2543 return (FALSE); 2544 if (!xdr_bool(xdrs, &objp->reclaim)) 2545 return (FALSE); 2546 if (!xdr_offset4(xdrs, &objp->offset)) 2547 return (FALSE); 2548 if (!xdr_length4(xdrs, &objp->length)) 2549 return (FALSE); 2550 if (!xdr_locker4(xdrs, &objp->locker)) 2551 return (FALSE); 2552 return (TRUE); 2553 } 2554 2555 bool_t 2556 xdr_LOCK4denied(XDR *xdrs, LOCK4denied *objp) 2557 { 2558 2559 rpc_inline_t *buf; 2560 2561 if (!xdr_offset4(xdrs, &objp->offset)) 2562 return (FALSE); 2563 if (!xdr_length4(xdrs, &objp->length)) 2564 return (FALSE); 2565 if (!xdr_nfs_lock_type4(xdrs, &objp->locktype)) 2566 return (FALSE); 2567 if (!xdr_lock_owner4(xdrs, &objp->owner)) 2568 return (FALSE); 2569 return (TRUE); 2570 } 2571 2572 bool_t 2573 xdr_LOCK4resok(XDR *xdrs, LOCK4resok *objp) 2574 { 2575 2576 rpc_inline_t *buf; 2577 2578 if (!xdr_stateid4(xdrs, &objp->lock_stateid)) 2579 return (FALSE); 2580 return (TRUE); 2581 } 2582 2583 bool_t 2584 xdr_LOCK4res(XDR *xdrs, LOCK4res *objp) 2585 { 2586 2587 rpc_inline_t *buf; 2588 2589 if (!xdr_nfsstat4(xdrs, &objp->status)) 2590 return (FALSE); 2591 switch (objp->status) { 2592 case NFS4_OK: 2593 if (!xdr_LOCK4resok(xdrs, &objp->LOCK4res_u.resok4)) 2594 return (FALSE); 2595 break; 2596 case NFS4ERR_DENIED: 2597 if (!xdr_LOCK4denied(xdrs, &objp->LOCK4res_u.denied)) 2598 return (FALSE); 2599 break; 2600 } 2601 return (TRUE); 2602 } 2603 2604 bool_t 2605 xdr_LOCKT4args(XDR *xdrs, LOCKT4args *objp) 2606 { 2607 2608 rpc_inline_t *buf; 2609 2610 if (!xdr_nfs_lock_type4(xdrs, &objp->locktype)) 2611 return (FALSE); 2612 if (!xdr_offset4(xdrs, &objp->offset)) 2613 return (FALSE); 2614 if (!xdr_length4(xdrs, &objp->length)) 2615 return (FALSE); 2616 if (!xdr_lock_owner4(xdrs, &objp->owner)) 2617 return (FALSE); 2618 return (TRUE); 2619 } 2620 2621 bool_t 2622 xdr_LOCKT4res(XDR *xdrs, LOCKT4res *objp) 2623 { 2624 2625 rpc_inline_t *buf; 2626 2627 if (!xdr_nfsstat4(xdrs, &objp->status)) 2628 return (FALSE); 2629 switch (objp->status) { 2630 case NFS4ERR_DENIED: 2631 if (!xdr_LOCK4denied(xdrs, &objp->LOCKT4res_u.denied)) 2632 return (FALSE); 2633 break; 2634 case NFS4_OK: 2635 break; 2636 } 2637 return (TRUE); 2638 } 2639 2640 bool_t 2641 xdr_LOCKU4args(XDR *xdrs, LOCKU4args *objp) 2642 { 2643 2644 rpc_inline_t *buf; 2645 2646 if (!xdr_nfs_lock_type4(xdrs, &objp->locktype)) 2647 return (FALSE); 2648 if (!xdr_seqid4(xdrs, &objp->seqid)) 2649 return (FALSE); 2650 if (!xdr_stateid4(xdrs, &objp->lock_stateid)) 2651 return (FALSE); 2652 if (!xdr_offset4(xdrs, &objp->offset)) 2653 return (FALSE); 2654 if (!xdr_length4(xdrs, &objp->length)) 2655 return (FALSE); 2656 return (TRUE); 2657 } 2658 2659 bool_t 2660 xdr_LOCKU4res(XDR *xdrs, LOCKU4res *objp) 2661 { 2662 2663 rpc_inline_t *buf; 2664 2665 if (!xdr_nfsstat4(xdrs, &objp->status)) 2666 return (FALSE); 2667 switch (objp->status) { 2668 case NFS4_OK: 2669 if (!xdr_stateid4(xdrs, &objp->LOCKU4res_u.lock_stateid)) 2670 return (FALSE); 2671 break; 2672 } 2673 return (TRUE); 2674 } 2675 2676 bool_t 2677 xdr_LOOKUP4args(XDR *xdrs, LOOKUP4args *objp) 2678 { 2679 2680 rpc_inline_t *buf; 2681 2682 if (!xdr_component4(xdrs, &objp->objname)) 2683 return (FALSE); 2684 return (TRUE); 2685 } 2686 2687 bool_t 2688 xdr_LOOKUP4res(XDR *xdrs, LOOKUP4res *objp) 2689 { 2690 2691 rpc_inline_t *buf; 2692 2693 if (!xdr_nfsstat4(xdrs, &objp->status)) 2694 return (FALSE); 2695 return (TRUE); 2696 } 2697 2698 bool_t 2699 xdr_LOOKUPP4res(XDR *xdrs, LOOKUPP4res *objp) 2700 { 2701 2702 rpc_inline_t *buf; 2703 2704 if (!xdr_nfsstat4(xdrs, &objp->status)) 2705 return (FALSE); 2706 return (TRUE); 2707 } 2708 2709 bool_t 2710 xdr_NVERIFY4args(XDR *xdrs, NVERIFY4args *objp) 2711 { 2712 2713 rpc_inline_t *buf; 2714 2715 if (!xdr_fattr4(xdrs, &objp->obj_attributes)) 2716 return (FALSE); 2717 return (TRUE); 2718 } 2719 2720 bool_t 2721 xdr_NVERIFY4res(XDR *xdrs, NVERIFY4res *objp) 2722 { 2723 2724 rpc_inline_t *buf; 2725 2726 if (!xdr_nfsstat4(xdrs, &objp->status)) 2727 return (FALSE); 2728 return (TRUE); 2729 } 2730 2731 bool_t 2732 xdr_createmode4(XDR *xdrs, createmode4 *objp) 2733 { 2734 2735 rpc_inline_t *buf; 2736 2737 if (!xdr_enum(xdrs, (enum_t *)objp)) 2738 return (FALSE); 2739 return (TRUE); 2740 } 2741 2742 bool_t 2743 xdr_creatverfattr(XDR *xdrs, creatverfattr *objp) 2744 { 2745 2746 rpc_inline_t *buf; 2747 2748 if (!xdr_verifier4(xdrs, objp->cva_verf)) 2749 return (FALSE); 2750 if (!xdr_fattr4(xdrs, &objp->cva_attrs)) 2751 return (FALSE); 2752 return (TRUE); 2753 } 2754 2755 bool_t 2756 xdr_createhow4(XDR *xdrs, createhow4 *objp) 2757 { 2758 2759 rpc_inline_t *buf; 2760 2761 if (!xdr_createmode4(xdrs, &objp->mode)) 2762 return (FALSE); 2763 switch (objp->mode) { 2764 case UNCHECKED4: 2765 case GUARDED4: 2766 if (!xdr_fattr4(xdrs, &objp->createhow4_u.createattrs)) 2767 return (FALSE); 2768 break; 2769 case EXCLUSIVE4: 2770 if (!xdr_verifier4(xdrs, objp->createhow4_u.createverf)) 2771 return (FALSE); 2772 break; 2773 case EXCLUSIVE4_1: 2774 if (!xdr_creatverfattr(xdrs, &objp->createhow4_u.ch_createboth)) 2775 return (FALSE); 2776 break; 2777 default: 2778 return (FALSE); 2779 } 2780 return (TRUE); 2781 } 2782 2783 bool_t 2784 xdr_opentype4(XDR *xdrs, opentype4 *objp) 2785 { 2786 2787 rpc_inline_t *buf; 2788 2789 if (!xdr_enum(xdrs, (enum_t *)objp)) 2790 return (FALSE); 2791 return (TRUE); 2792 } 2793 2794 bool_t 2795 xdr_openflag4(XDR *xdrs, openflag4 *objp) 2796 { 2797 2798 rpc_inline_t *buf; 2799 2800 if (!xdr_opentype4(xdrs, &objp->opentype)) 2801 return (FALSE); 2802 switch (objp->opentype) { 2803 case OPEN4_CREATE: 2804 if (!xdr_createhow4(xdrs, &objp->openflag4_u.how)) 2805 return (FALSE); 2806 break; 2807 } 2808 return (TRUE); 2809 } 2810 2811 bool_t 2812 xdr_limit_by4(XDR *xdrs, limit_by4 *objp) 2813 { 2814 2815 rpc_inline_t *buf; 2816 2817 if (!xdr_enum(xdrs, (enum_t *)objp)) 2818 return (FALSE); 2819 return (TRUE); 2820 } 2821 2822 bool_t 2823 xdr_nfs_modified_limit4(XDR *xdrs, nfs_modified_limit4 *objp) 2824 { 2825 2826 rpc_inline_t *buf; 2827 2828 if (!xdr_uint32_t(xdrs, &objp->num_blocks)) 2829 return (FALSE); 2830 if (!xdr_uint32_t(xdrs, &objp->bytes_per_block)) 2831 return (FALSE); 2832 return (TRUE); 2833 } 2834 2835 bool_t 2836 xdr_nfs_space_limit4(XDR *xdrs, nfs_space_limit4 *objp) 2837 { 2838 2839 rpc_inline_t *buf; 2840 2841 if (!xdr_limit_by4(xdrs, &objp->limitby)) 2842 return (FALSE); 2843 switch (objp->limitby) { 2844 case NFS_LIMIT_SIZE: 2845 if (!xdr_uint64_t(xdrs, &objp->nfs_space_limit4_u.filesize)) 2846 return (FALSE); 2847 break; 2848 case NFS_LIMIT_BLOCKS: 2849 if (!xdr_nfs_modified_limit4(xdrs, 2850 &objp->nfs_space_limit4_u.mod_blocks)) 2851 return (FALSE); 2852 break; 2853 default: 2854 return (FALSE); 2855 } 2856 return (TRUE); 2857 } 2858 2859 bool_t 2860 xdr_open_delegation_type4(XDR *xdrs, open_delegation_type4 *objp) 2861 { 2862 2863 rpc_inline_t *buf; 2864 2865 if (!xdr_enum(xdrs, (enum_t *)objp)) 2866 return (FALSE); 2867 return (TRUE); 2868 } 2869 2870 bool_t 2871 xdr_open_claim_type4(XDR *xdrs, open_claim_type4 *objp) 2872 { 2873 2874 rpc_inline_t *buf; 2875 2876 if (!xdr_enum(xdrs, (enum_t *)objp)) 2877 return (FALSE); 2878 return (TRUE); 2879 } 2880 2881 bool_t 2882 xdr_open_claim_delegate_cur4(XDR *xdrs, open_claim_delegate_cur4 *objp) 2883 { 2884 2885 rpc_inline_t *buf; 2886 2887 if (!xdr_stateid4(xdrs, &objp->delegate_stateid)) 2888 return (FALSE); 2889 if (!xdr_component4(xdrs, &objp->file)) 2890 return (FALSE); 2891 return (TRUE); 2892 } 2893 2894 bool_t 2895 xdr_open_claim4(XDR *xdrs, open_claim4 *objp) 2896 { 2897 2898 rpc_inline_t *buf; 2899 2900 if (!xdr_open_claim_type4(xdrs, &objp->claim)) 2901 return (FALSE); 2902 switch (objp->claim) { 2903 case CLAIM_NULL: 2904 if (!xdr_component4(xdrs, 2905 &objp->open_claim4_u.file)) 2906 return (FALSE); 2907 break; 2908 case CLAIM_PREVIOUS: 2909 if (!xdr_open_delegation_type4(xdrs, 2910 &objp->open_claim4_u.delegate_type)) 2911 return (FALSE); 2912 break; 2913 case CLAIM_DELEGATE_CUR: 2914 if (!xdr_open_claim_delegate_cur4(xdrs, 2915 &objp->open_claim4_u.delegate_cur_info)) 2916 return (FALSE); 2917 break; 2918 case CLAIM_DELEGATE_PREV: 2919 if (!xdr_component4(xdrs, 2920 &objp->open_claim4_u.file_delegate_prev)) 2921 return (FALSE); 2922 break; 2923 case CLAIM_FH: 2924 break; 2925 case CLAIM_DELEG_PREV_FH: 2926 break; 2927 case CLAIM_DELEG_CUR_FH: 2928 if (!xdr_stateid4(xdrs, 2929 &objp->open_claim4_u.oc_delegate_stateid)) 2930 return (FALSE); 2931 break; 2932 default: 2933 return (FALSE); 2934 } 2935 return (TRUE); 2936 } 2937 2938 bool_t 2939 xdr_OPEN4args(XDR *xdrs, OPEN4args *objp) 2940 { 2941 2942 rpc_inline_t *buf; 2943 2944 if (!xdr_seqid4(xdrs, &objp->seqid)) 2945 return (FALSE); 2946 if (!xdr_uint32_t(xdrs, &objp->share_access)) 2947 return (FALSE); 2948 if (!xdr_uint32_t(xdrs, &objp->share_deny)) 2949 return (FALSE); 2950 if (!xdr_open_owner4(xdrs, &objp->owner)) 2951 return (FALSE); 2952 if (!xdr_openflag4(xdrs, &objp->openhow)) 2953 return (FALSE); 2954 if (!xdr_open_claim4(xdrs, &objp->claim)) 2955 return (FALSE); 2956 return (TRUE); 2957 } 2958 2959 bool_t 2960 xdr_open_read_delegation4(XDR *xdrs, open_read_delegation4 *objp) 2961 { 2962 2963 rpc_inline_t *buf; 2964 2965 if (!xdr_stateid4(xdrs, &objp->stateid)) 2966 return (FALSE); 2967 if (!xdr_bool(xdrs, &objp->recall)) 2968 return (FALSE); 2969 if (!xdr_nfsace4(xdrs, &objp->permissions)) 2970 return (FALSE); 2971 return (TRUE); 2972 } 2973 2974 bool_t 2975 xdr_open_write_delegation4(XDR *xdrs, open_write_delegation4 *objp) 2976 { 2977 2978 rpc_inline_t *buf; 2979 2980 if (!xdr_stateid4(xdrs, &objp->stateid)) 2981 return (FALSE); 2982 if (!xdr_bool(xdrs, &objp->recall)) 2983 return (FALSE); 2984 if (!xdr_nfs_space_limit4(xdrs, &objp->space_limit)) 2985 return (FALSE); 2986 if (!xdr_nfsace4(xdrs, &objp->permissions)) 2987 return (FALSE); 2988 return (TRUE); 2989 } 2990 2991 bool_t 2992 xdr_why_no_delegation4(XDR *xdrs, why_no_delegation4 *objp) 2993 { 2994 2995 rpc_inline_t *buf; 2996 2997 if (!xdr_enum(xdrs, (enum_t *)objp)) 2998 return (FALSE); 2999 return (TRUE); 3000 } 3001 3002 bool_t 3003 xdr_open_none_delegation4(XDR *xdrs, open_none_delegation4 *objp) 3004 { 3005 3006 rpc_inline_t *buf; 3007 3008 if (!xdr_why_no_delegation4(xdrs, &objp->ond_why)) 3009 return (FALSE); 3010 switch (objp->ond_why) { 3011 case WND4_CONTENTION: 3012 if (!xdr_bool(xdrs, 3013 &objp->open_none_delegation4_u.ond_server_will_push_deleg)) 3014 return (FALSE); 3015 break; 3016 case WND4_RESOURCE: 3017 if (!xdr_bool(xdrs, 3018 &objp->open_none_delegation4_u. 3019 ond_server_will_signal_avail)) 3020 return (FALSE); 3021 break; 3022 } 3023 return (TRUE); 3024 } 3025 3026 bool_t 3027 xdr_open_delegation4(XDR *xdrs, open_delegation4 *objp) 3028 { 3029 3030 rpc_inline_t *buf; 3031 3032 if (!xdr_open_delegation_type4(xdrs, &objp->delegation_type)) 3033 return (FALSE); 3034 switch (objp->delegation_type) { 3035 case OPEN_DELEGATE_NONE: 3036 break; 3037 case OPEN_DELEGATE_READ: 3038 if (!xdr_open_read_delegation4(xdrs, 3039 &objp->open_delegation4_u.read)) 3040 return (FALSE); 3041 break; 3042 case OPEN_DELEGATE_WRITE: 3043 if (!xdr_open_write_delegation4(xdrs, 3044 &objp->open_delegation4_u.write)) 3045 return (FALSE); 3046 break; 3047 case OPEN_DELEGATE_NONE_EXT: 3048 if (!xdr_open_none_delegation4(xdrs, 3049 &objp->open_delegation4_u.od_whynone)) 3050 return (FALSE); 3051 break; 3052 default: 3053 return (FALSE); 3054 } 3055 return (TRUE); 3056 } 3057 3058 bool_t 3059 xdr_OPEN4resok(XDR *xdrs, OPEN4resok *objp) 3060 { 3061 3062 rpc_inline_t *buf; 3063 3064 if (!xdr_stateid4(xdrs, &objp->stateid)) 3065 return (FALSE); 3066 if (!xdr_change_info4(xdrs, &objp->cinfo)) 3067 return (FALSE); 3068 if (!xdr_uint32_t(xdrs, &objp->rflags)) 3069 return (FALSE); 3070 if (!xdr_bitmap4(xdrs, &objp->attrset)) 3071 return (FALSE); 3072 if (!xdr_open_delegation4(xdrs, &objp->delegation)) 3073 return (FALSE); 3074 return (TRUE); 3075 } 3076 3077 bool_t 3078 xdr_OPEN4res(XDR *xdrs, OPEN4res *objp) 3079 { 3080 3081 rpc_inline_t *buf; 3082 3083 if (!xdr_nfsstat4(xdrs, &objp->status)) 3084 return (FALSE); 3085 switch (objp->status) { 3086 case NFS4_OK: 3087 if (!xdr_OPEN4resok(xdrs, &objp->OPEN4res_u.resok4)) 3088 return (FALSE); 3089 break; 3090 } 3091 return (TRUE); 3092 } 3093 3094 bool_t 3095 xdr_OPENATTR4args(XDR *xdrs, OPENATTR4args *objp) 3096 { 3097 3098 rpc_inline_t *buf; 3099 3100 if (!xdr_bool(xdrs, &objp->createdir)) 3101 return (FALSE); 3102 return (TRUE); 3103 } 3104 3105 bool_t 3106 xdr_OPENATTR4res(XDR *xdrs, OPENATTR4res *objp) 3107 { 3108 3109 rpc_inline_t *buf; 3110 3111 if (!xdr_nfsstat4(xdrs, &objp->status)) 3112 return (FALSE); 3113 return (TRUE); 3114 } 3115 3116 bool_t 3117 xdr_OPEN_CONFIRM4args(XDR *xdrs, OPEN_CONFIRM4args *objp) 3118 { 3119 3120 rpc_inline_t *buf; 3121 3122 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 3123 return (FALSE); 3124 if (!xdr_seqid4(xdrs, &objp->seqid)) 3125 return (FALSE); 3126 return (TRUE); 3127 } 3128 3129 bool_t 3130 xdr_OPEN_CONFIRM4resok(XDR *xdrs, OPEN_CONFIRM4resok *objp) 3131 { 3132 3133 rpc_inline_t *buf; 3134 3135 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 3136 return (FALSE); 3137 return (TRUE); 3138 } 3139 3140 bool_t 3141 xdr_OPEN_CONFIRM4res(XDR *xdrs, OPEN_CONFIRM4res *objp) 3142 { 3143 3144 rpc_inline_t *buf; 3145 3146 if (!xdr_nfsstat4(xdrs, &objp->status)) 3147 return (FALSE); 3148 switch (objp->status) { 3149 case NFS4_OK: 3150 if (!xdr_OPEN_CONFIRM4resok(xdrs, 3151 &objp->OPEN_CONFIRM4res_u.resok4)) 3152 return (FALSE); 3153 break; 3154 } 3155 return (TRUE); 3156 } 3157 3158 bool_t 3159 xdr_OPEN_DOWNGRADE4args(XDR *xdrs, OPEN_DOWNGRADE4args *objp) 3160 { 3161 3162 rpc_inline_t *buf; 3163 3164 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 3165 return (FALSE); 3166 if (!xdr_seqid4(xdrs, &objp->seqid)) 3167 return (FALSE); 3168 if (!xdr_uint32_t(xdrs, &objp->share_access)) 3169 return (FALSE); 3170 if (!xdr_uint32_t(xdrs, &objp->share_deny)) 3171 return (FALSE); 3172 return (TRUE); 3173 } 3174 3175 bool_t 3176 xdr_OPEN_DOWNGRADE4resok(XDR *xdrs, OPEN_DOWNGRADE4resok *objp) 3177 { 3178 3179 rpc_inline_t *buf; 3180 3181 if (!xdr_stateid4(xdrs, &objp->open_stateid)) 3182 return (FALSE); 3183 return (TRUE); 3184 } 3185 3186 bool_t 3187 xdr_OPEN_DOWNGRADE4res(XDR *xdrs, OPEN_DOWNGRADE4res *objp) 3188 { 3189 3190 rpc_inline_t *buf; 3191 3192 if (!xdr_nfsstat4(xdrs, &objp->status)) 3193 return (FALSE); 3194 switch (objp->status) { 3195 case NFS4_OK: 3196 if (!xdr_OPEN_DOWNGRADE4resok(xdrs, 3197 &objp->OPEN_DOWNGRADE4res_u.resok4)) 3198 return (FALSE); 3199 break; 3200 } 3201 return (TRUE); 3202 } 3203 3204 bool_t 3205 xdr_PUTFH4args(XDR *xdrs, PUTFH4args *objp) 3206 { 3207 3208 rpc_inline_t *buf; 3209 3210 if (!xdr_nfs_fh4(xdrs, &objp->object)) 3211 return (FALSE); 3212 return (TRUE); 3213 } 3214 3215 bool_t 3216 xdr_PUTFH4res(XDR *xdrs, PUTFH4res *objp) 3217 { 3218 3219 rpc_inline_t *buf; 3220 3221 if (!xdr_nfsstat4(xdrs, &objp->status)) 3222 return (FALSE); 3223 return (TRUE); 3224 } 3225 3226 bool_t 3227 xdr_PUTPUBFH4res(XDR *xdrs, PUTPUBFH4res *objp) 3228 { 3229 3230 rpc_inline_t *buf; 3231 3232 if (!xdr_nfsstat4(xdrs, &objp->status)) 3233 return (FALSE); 3234 return (TRUE); 3235 } 3236 3237 bool_t 3238 xdr_PUTROOTFH4res(XDR *xdrs, PUTROOTFH4res *objp) 3239 { 3240 3241 rpc_inline_t *buf; 3242 3243 if (!xdr_nfsstat4(xdrs, &objp->status)) 3244 return (FALSE); 3245 return (TRUE); 3246 } 3247 3248 bool_t 3249 xdr_READ4args(XDR *xdrs, READ4args *objp) 3250 { 3251 3252 rpc_inline_t *buf; 3253 3254 if (!xdr_stateid4(xdrs, &objp->stateid)) 3255 return (FALSE); 3256 if (!xdr_offset4(xdrs, &objp->offset)) 3257 return (FALSE); 3258 if (!xdr_count4(xdrs, &objp->count)) 3259 return (FALSE); 3260 return (TRUE); 3261 } 3262 3263 bool_t 3264 xdr_READ4resok(XDR *xdrs, READ4resok *objp) 3265 { 3266 3267 rpc_inline_t *buf; 3268 3269 if (!xdr_bool(xdrs, &objp->eof)) 3270 3271 #ifdef IGNORE_RDWR_DATA 3272 /* 3273 * Try to get length of read, and if that 3274 * fails, default to 0. Don't return FALSE 3275 * because the other read info will not be 3276 * displayed. 3277 */ 3278 objp->data.data_val = NULL; 3279 if (!xdr_u_int(xdrs, &objp->data.data_len)) 3280 objp->data.data_len = 0; 3281 nfs4_skip_bytes = objp->data.data_len; 3282 #else 3283 if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, 3284 (uint_t *)&objp->data.data_len, ~0)) 3285 return (FALSE); 3286 #endif 3287 return (TRUE); 3288 } 3289 3290 bool_t 3291 xdr_READ4res(XDR *xdrs, READ4res *objp) 3292 { 3293 3294 rpc_inline_t *buf; 3295 3296 if (!xdr_nfsstat4(xdrs, &objp->status)) 3297 return (FALSE); 3298 switch (objp->status) { 3299 case NFS4_OK: 3300 if (!xdr_READ4resok(xdrs, &objp->READ4res_u.resok4)) 3301 return (FALSE); 3302 break; 3303 } 3304 return (TRUE); 3305 } 3306 3307 bool_t 3308 xdr_READDIR4args(XDR *xdrs, READDIR4args *objp) 3309 { 3310 3311 rpc_inline_t *buf; 3312 3313 if (!xdr_nfs_cookie4(xdrs, &objp->cookie)) 3314 return (FALSE); 3315 if (!xdr_verifier4(xdrs, objp->cookieverf)) 3316 return (FALSE); 3317 if (!xdr_count4(xdrs, &objp->dircount)) 3318 return (FALSE); 3319 if (!xdr_count4(xdrs, &objp->maxcount)) 3320 return (FALSE); 3321 if (!xdr_bitmap4(xdrs, &objp->attr_request)) 3322 return (FALSE); 3323 return (TRUE); 3324 } 3325 3326 bool_t 3327 xdr_entry4(XDR *xdrs, entry4 *objp) 3328 { 3329 3330 rpc_inline_t *buf; 3331 3332 entry4 *tmp_entry4; 3333 bool_t more_data = TRUE; 3334 bool_t first_objp = TRUE; 3335 3336 3337 if (xdrs->x_op == XDR_DECODE) { 3338 3339 while (more_data) { 3340 3341 void bzero(); 3342 3343 if (!xdr_nfs_cookie4(xdrs, &objp->cookie)) 3344 return (FALSE); 3345 if (!xdr_component4(xdrs, &objp->name)) 3346 return (FALSE); 3347 if (!xdr_fattr4(xdrs, &objp->attrs)) 3348 return (FALSE); 3349 if (!xdr_bool(xdrs, &more_data)) 3350 return (FALSE); 3351 3352 if (!more_data) { 3353 objp->nextentry = NULL; 3354 break; 3355 } 3356 3357 if (objp->nextentry == NULL) { 3358 objp->nextentry = (entry4 *) 3359 mem_alloc(sizeof (entry4)); 3360 if (objp->nextentry == NULL) 3361 return (FALSE); 3362 bzero(objp->nextentry, sizeof (entry4)); 3363 } 3364 objp = objp->nextentry; 3365 } 3366 3367 } else if (xdrs->x_op == XDR_ENCODE) { 3368 3369 while (more_data) { 3370 if (!xdr_nfs_cookie4(xdrs, &objp->cookie)) 3371 return (FALSE); 3372 if (!xdr_component4(xdrs, &objp->name)) 3373 return (FALSE); 3374 if (!xdr_fattr4(xdrs, &objp->attrs)) 3375 return (FALSE); 3376 objp = objp->nextentry; 3377 if (objp == NULL) 3378 more_data = FALSE; 3379 if (!xdr_bool(xdrs, &more_data)) 3380 return (FALSE); 3381 } 3382 3383 } else { 3384 3385 while (more_data) { 3386 if (!xdr_nfs_cookie4(xdrs, &objp->cookie)) 3387 return (FALSE); 3388 if (!xdr_component4(xdrs, &objp->name)) 3389 return (FALSE); 3390 if (!xdr_fattr4(xdrs, &objp->attrs)) 3391 return (FALSE); 3392 tmp_entry4 = objp; 3393 objp = objp->nextentry; 3394 if (objp == NULL) 3395 more_data = FALSE; 3396 if (!first_objp) 3397 mem_free(tmp_entry4, sizeof (entry4)); 3398 else 3399 first_objp = FALSE; 3400 } 3401 3402 } 3403 return (TRUE); 3404 } 3405 3406 bool_t 3407 xdr_dirlist4(XDR *xdrs, dirlist4 *objp) 3408 { 3409 3410 rpc_inline_t *buf; 3411 3412 if (!xdr_pointer(xdrs, (char **)&objp->entries, 3413 sizeof (entry4), (xdrproc_t)xdr_entry4)) 3414 return (FALSE); 3415 if (!xdr_bool(xdrs, &objp->eof)) 3416 return (FALSE); 3417 return (TRUE); 3418 } 3419 3420 bool_t 3421 xdr_READDIR4resok(XDR *xdrs, READDIR4resok *objp) 3422 { 3423 3424 rpc_inline_t *buf; 3425 3426 if (!xdr_verifier4(xdrs, objp->cookieverf)) 3427 return (FALSE); 3428 if (!xdr_dirlist4(xdrs, &objp->reply)) 3429 return (FALSE); 3430 return (TRUE); 3431 } 3432 3433 bool_t 3434 xdr_READDIR4res(XDR *xdrs, READDIR4res *objp) 3435 { 3436 3437 rpc_inline_t *buf; 3438 3439 if (!xdr_nfsstat4(xdrs, &objp->status)) 3440 return (FALSE); 3441 switch (objp->status) { 3442 case NFS4_OK: 3443 if (!xdr_READDIR4resok(xdrs, &objp->READDIR4res_u.resok4)) 3444 return (FALSE); 3445 break; 3446 } 3447 return (TRUE); 3448 } 3449 3450 bool_t 3451 xdr_READLINK4resok(XDR *xdrs, READLINK4resok *objp) 3452 { 3453 3454 rpc_inline_t *buf; 3455 3456 if (!xdr_linktext4(xdrs, &objp->link)) 3457 return (FALSE); 3458 return (TRUE); 3459 } 3460 3461 bool_t 3462 xdr_READLINK4res(XDR *xdrs, READLINK4res *objp) 3463 { 3464 3465 rpc_inline_t *buf; 3466 3467 if (!xdr_nfsstat4(xdrs, &objp->status)) 3468 return (FALSE); 3469 switch (objp->status) { 3470 case NFS4_OK: 3471 if (!xdr_READLINK4resok(xdrs, &objp->READLINK4res_u.resok4)) 3472 return (FALSE); 3473 break; 3474 } 3475 return (TRUE); 3476 } 3477 3478 bool_t 3479 xdr_REMOVE4args(XDR *xdrs, REMOVE4args *objp) 3480 { 3481 3482 rpc_inline_t *buf; 3483 3484 if (!xdr_component4(xdrs, &objp->target)) 3485 return (FALSE); 3486 return (TRUE); 3487 } 3488 3489 bool_t 3490 xdr_REMOVE4resok(XDR *xdrs, REMOVE4resok *objp) 3491 { 3492 3493 rpc_inline_t *buf; 3494 3495 if (!xdr_change_info4(xdrs, &objp->cinfo)) 3496 return (FALSE); 3497 return (TRUE); 3498 } 3499 3500 bool_t 3501 xdr_REMOVE4res(XDR *xdrs, REMOVE4res *objp) 3502 { 3503 3504 rpc_inline_t *buf; 3505 3506 if (!xdr_nfsstat4(xdrs, &objp->status)) 3507 return (FALSE); 3508 switch (objp->status) { 3509 case NFS4_OK: 3510 if (!xdr_REMOVE4resok(xdrs, &objp->REMOVE4res_u.resok4)) 3511 return (FALSE); 3512 break; 3513 } 3514 return (TRUE); 3515 } 3516 3517 bool_t 3518 xdr_RENAME4args(XDR *xdrs, RENAME4args *objp) 3519 { 3520 3521 rpc_inline_t *buf; 3522 3523 if (!xdr_component4(xdrs, &objp->oldname)) 3524 return (FALSE); 3525 if (!xdr_component4(xdrs, &objp->newname)) 3526 return (FALSE); 3527 return (TRUE); 3528 } 3529 3530 bool_t 3531 xdr_RENAME4resok(XDR *xdrs, RENAME4resok *objp) 3532 { 3533 3534 rpc_inline_t *buf; 3535 3536 if (!xdr_change_info4(xdrs, &objp->source_cinfo)) 3537 return (FALSE); 3538 if (!xdr_change_info4(xdrs, &objp->target_cinfo)) 3539 return (FALSE); 3540 return (TRUE); 3541 } 3542 3543 bool_t 3544 xdr_RENAME4res(XDR *xdrs, RENAME4res *objp) 3545 { 3546 3547 rpc_inline_t *buf; 3548 3549 if (!xdr_nfsstat4(xdrs, &objp->status)) 3550 return (FALSE); 3551 switch (objp->status) { 3552 case NFS4_OK: 3553 if (!xdr_RENAME4resok(xdrs, &objp->RENAME4res_u.resok4)) 3554 return (FALSE); 3555 break; 3556 } 3557 return (TRUE); 3558 } 3559 3560 bool_t 3561 xdr_RENEW4args(XDR *xdrs, RENEW4args *objp) 3562 { 3563 3564 rpc_inline_t *buf; 3565 3566 if (!xdr_clientid4(xdrs, &objp->clientid)) 3567 return (FALSE); 3568 return (TRUE); 3569 } 3570 3571 bool_t 3572 xdr_RENEW4res(XDR *xdrs, RENEW4res *objp) 3573 { 3574 3575 rpc_inline_t *buf; 3576 3577 if (!xdr_nfsstat4(xdrs, &objp->status)) 3578 return (FALSE); 3579 return (TRUE); 3580 } 3581 3582 bool_t 3583 xdr_RESTOREFH4res(XDR *xdrs, RESTOREFH4res *objp) 3584 { 3585 3586 rpc_inline_t *buf; 3587 3588 if (!xdr_nfsstat4(xdrs, &objp->status)) 3589 return (FALSE); 3590 return (TRUE); 3591 } 3592 3593 bool_t 3594 xdr_SAVEFH4res(XDR *xdrs, SAVEFH4res *objp) 3595 { 3596 3597 rpc_inline_t *buf; 3598 3599 if (!xdr_nfsstat4(xdrs, &objp->status)) 3600 return (FALSE); 3601 return (TRUE); 3602 } 3603 3604 bool_t 3605 xdr_SECINFO4args(XDR *xdrs, SECINFO4args *objp) 3606 { 3607 3608 rpc_inline_t *buf; 3609 3610 if (!xdr_component4(xdrs, &objp->name)) 3611 return (FALSE); 3612 return (TRUE); 3613 } 3614 3615 bool_t 3616 xdr_rpc_gss_svc_t(XDR *xdrs, rpc_gss_svc_t *objp) 3617 { 3618 3619 rpc_inline_t *buf; 3620 3621 if (!xdr_enum(xdrs, (enum_t *)objp)) 3622 return (FALSE); 3623 return (TRUE); 3624 } 3625 3626 bool_t 3627 xdr_rpcsec_gss_info(XDR *xdrs, rpcsec_gss_info *objp) 3628 { 3629 3630 rpc_inline_t *buf; 3631 3632 if (!xdr_sec_oid4(xdrs, &objp->oid)) 3633 return (FALSE); 3634 if (!xdr_qop4(xdrs, &objp->qop)) 3635 return (FALSE); 3636 if (!xdr_rpc_gss_svc_t(xdrs, &objp->service)) 3637 return (FALSE); 3638 return (TRUE); 3639 } 3640 3641 bool_t 3642 xdr_secinfo4(XDR *xdrs, secinfo4 *objp) 3643 { 3644 3645 rpc_inline_t *buf; 3646 3647 if (!xdr_uint32_t(xdrs, &objp->flavor)) 3648 return (FALSE); 3649 switch (objp->flavor) { 3650 case RPCSEC_GSS: 3651 if (!xdr_rpcsec_gss_info(xdrs, &objp->secinfo4_u.flavor_info)) 3652 return (FALSE); 3653 break; 3654 } 3655 return (TRUE); 3656 } 3657 3658 bool_t 3659 xdr_SECINFO4resok(XDR *xdrs, SECINFO4resok *objp) 3660 { 3661 3662 rpc_inline_t *buf; 3663 3664 if (!xdr_array(xdrs, (char **)&objp->SECINFO4resok_val, 3665 (uint_t *)&objp->SECINFO4resok_len, ~0, 3666 sizeof (secinfo4), (xdrproc_t)xdr_secinfo4)) 3667 return (FALSE); 3668 return (TRUE); 3669 } 3670 3671 bool_t 3672 xdr_SECINFO4res(XDR *xdrs, SECINFO4res *objp) 3673 { 3674 3675 rpc_inline_t *buf; 3676 3677 if (!xdr_nfsstat4(xdrs, &objp->status)) 3678 return (FALSE); 3679 switch (objp->status) { 3680 case NFS4_OK: 3681 if (!xdr_SECINFO4resok(xdrs, &objp->SECINFO4res_u.resok4)) 3682 return (FALSE); 3683 break; 3684 } 3685 return (TRUE); 3686 } 3687 3688 bool_t 3689 xdr_SETATTR4args(XDR *xdrs, SETATTR4args *objp) 3690 { 3691 3692 rpc_inline_t *buf; 3693 3694 if (!xdr_stateid4(xdrs, &objp->stateid)) 3695 return (FALSE); 3696 if (!xdr_fattr4(xdrs, &objp->obj_attributes)) 3697 return (FALSE); 3698 return (TRUE); 3699 } 3700 3701 bool_t 3702 xdr_SETATTR4res(XDR *xdrs, SETATTR4res *objp) 3703 { 3704 3705 rpc_inline_t *buf; 3706 3707 if (!xdr_nfsstat4(xdrs, &objp->status)) 3708 return (FALSE); 3709 if (!xdr_bitmap4(xdrs, &objp->attrsset)) 3710 return (FALSE); 3711 return (TRUE); 3712 } 3713 3714 bool_t 3715 xdr_SETCLIENTID4args(XDR *xdrs, SETCLIENTID4args *objp) 3716 { 3717 3718 rpc_inline_t *buf; 3719 3720 if (!xdr_nfs_client_id4(xdrs, &objp->client)) 3721 return (FALSE); 3722 if (!xdr_cb_client4(xdrs, &objp->callback)) 3723 return (FALSE); 3724 if (!xdr_uint32_t(xdrs, &objp->callback_ident)) 3725 return (FALSE); 3726 return (TRUE); 3727 } 3728 3729 bool_t 3730 xdr_SETCLIENTID4resok(XDR *xdrs, SETCLIENTID4resok *objp) 3731 { 3732 3733 rpc_inline_t *buf; 3734 3735 if (!xdr_clientid4(xdrs, &objp->clientid)) 3736 return (FALSE); 3737 if (!xdr_verifier4(xdrs, objp->setclientid_confirm)) 3738 return (FALSE); 3739 return (TRUE); 3740 } 3741 3742 bool_t 3743 xdr_SETCLIENTID4res(XDR *xdrs, SETCLIENTID4res *objp) 3744 { 3745 3746 rpc_inline_t *buf; 3747 3748 if (!xdr_nfsstat4(xdrs, &objp->status)) 3749 return (FALSE); 3750 switch (objp->status) { 3751 case NFS4_OK: 3752 if (!xdr_SETCLIENTID4resok(xdrs, 3753 &objp->SETCLIENTID4res_u.resok4)) 3754 return (FALSE); 3755 break; 3756 case NFS4ERR_CLID_INUSE: 3757 if (!xdr_clientaddr4(xdrs, 3758 &objp->SETCLIENTID4res_u.client_using)) 3759 return (FALSE); 3760 break; 3761 } 3762 return (TRUE); 3763 } 3764 3765 bool_t 3766 xdr_SETCLIENTID_CONFIRM4args(XDR *xdrs, SETCLIENTID_CONFIRM4args *objp) 3767 { 3768 3769 rpc_inline_t *buf; 3770 3771 if (!xdr_clientid4(xdrs, &objp->clientid)) 3772 return (FALSE); 3773 if (!xdr_verifier4(xdrs, objp->setclientid_confirm)) 3774 return (FALSE); 3775 return (TRUE); 3776 } 3777 3778 bool_t 3779 xdr_SETCLIENTID_CONFIRM4res(XDR *xdrs, SETCLIENTID_CONFIRM4res *objp) 3780 { 3781 3782 rpc_inline_t *buf; 3783 3784 if (!xdr_nfsstat4(xdrs, &objp->status)) 3785 return (FALSE); 3786 return (TRUE); 3787 } 3788 3789 bool_t 3790 xdr_VERIFY4args(XDR *xdrs, VERIFY4args *objp) 3791 { 3792 3793 rpc_inline_t *buf; 3794 3795 if (!xdr_fattr4(xdrs, &objp->obj_attributes)) 3796 return (FALSE); 3797 return (TRUE); 3798 } 3799 3800 bool_t 3801 xdr_VERIFY4res(XDR *xdrs, VERIFY4res *objp) 3802 { 3803 3804 rpc_inline_t *buf; 3805 3806 if (!xdr_nfsstat4(xdrs, &objp->status)) 3807 return (FALSE); 3808 return (TRUE); 3809 } 3810 3811 bool_t 3812 xdr_stable_how4(XDR *xdrs, stable_how4 *objp) 3813 { 3814 3815 rpc_inline_t *buf; 3816 3817 if (!xdr_enum(xdrs, (enum_t *)objp)) 3818 return (FALSE); 3819 return (TRUE); 3820 } 3821 3822 bool_t 3823 xdr_WRITE4args(XDR *xdrs, WRITE4args *objp) 3824 { 3825 3826 rpc_inline_t *buf; 3827 3828 if (!xdr_stateid4(xdrs, &objp->stateid)) 3829 return (FALSE); 3830 if (!xdr_offset4(xdrs, &objp->offset)) 3831 return (FALSE); 3832 if (!xdr_stable_how4(xdrs, &objp->stable)) 3833 3834 #ifdef IGNORE_RDWR_DATA 3835 /* 3836 * try to get length of write, and if that 3837 * fails, default to 0. Don't return FALSE 3838 * because the other write info will not be 3839 * displayed (write stateid). 3840 */ 3841 objp->data.data_val = NULL; 3842 if (!xdr_u_int(xdrs, &objp->data.data_len)) 3843 objp->data.data_len = 0; 3844 nfs4_skip_bytes = objp->data.data_len; 3845 #else 3846 if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, 3847 (uint_t *)&objp->data.data_len, ~0)) 3848 return (FALSE); 3849 #endif 3850 return (TRUE); 3851 } 3852 3853 bool_t 3854 xdr_WRITE4resok(XDR *xdrs, WRITE4resok *objp) 3855 { 3856 3857 rpc_inline_t *buf; 3858 3859 if (!xdr_count4(xdrs, &objp->count)) 3860 return (FALSE); 3861 if (!xdr_stable_how4(xdrs, &objp->committed)) 3862 return (FALSE); 3863 if (!xdr_verifier4(xdrs, objp->writeverf)) 3864 return (FALSE); 3865 return (TRUE); 3866 } 3867 3868 bool_t 3869 xdr_WRITE4res(XDR *xdrs, WRITE4res *objp) 3870 { 3871 3872 rpc_inline_t *buf; 3873 3874 if (!xdr_nfsstat4(xdrs, &objp->status)) 3875 return (FALSE); 3876 switch (objp->status) { 3877 case NFS4_OK: 3878 if (!xdr_WRITE4resok(xdrs, &objp->WRITE4res_u.resok4)) 3879 return (FALSE); 3880 break; 3881 } 3882 return (TRUE); 3883 } 3884 3885 bool_t 3886 xdr_RELEASE_LOCKOWNER4args(XDR *xdrs, RELEASE_LOCKOWNER4args *objp) 3887 { 3888 3889 rpc_inline_t *buf; 3890 3891 if (!xdr_lock_owner4(xdrs, &objp->lock_owner)) 3892 return (FALSE); 3893 return (TRUE); 3894 } 3895 3896 bool_t 3897 xdr_RELEASE_LOCKOWNER4res(XDR *xdrs, RELEASE_LOCKOWNER4res *objp) 3898 { 3899 3900 rpc_inline_t *buf; 3901 3902 if (!xdr_nfsstat4(xdrs, &objp->status)) 3903 return (FALSE); 3904 return (TRUE); 3905 } 3906 3907 bool_t 3908 xdr_ILLEGAL4res(XDR *xdrs, ILLEGAL4res *objp) 3909 { 3910 3911 rpc_inline_t *buf; 3912 3913 if (!xdr_nfsstat4(xdrs, &objp->status)) 3914 return (FALSE); 3915 return (TRUE); 3916 } 3917 3918 bool_t 3919 xdr_gsshandle4_t(XDR *xdrs, gsshandle4_t *objp) 3920 { 3921 3922 rpc_inline_t *buf; 3923 3924 if (!xdr_bytes(xdrs, (char **)&objp->gsshandle4_t_val, 3925 (uint_t *)&objp->gsshandle4_t_len, ~0)) 3926 return (FALSE); 3927 return (TRUE); 3928 } 3929 3930 bool_t 3931 xdr_gss_cb_handles4(XDR *xdrs, gss_cb_handles4 *objp) 3932 { 3933 3934 rpc_inline_t *buf; 3935 3936 if (!xdr_rpc_gss_svc_t(xdrs, &objp->gcbp_service)) 3937 return (FALSE); 3938 if (!xdr_gsshandle4_t(xdrs, &objp->gcbp_handle_from_server)) 3939 return (FALSE); 3940 if (!xdr_gsshandle4_t(xdrs, &objp->gcbp_handle_from_client)) 3941 return (FALSE); 3942 return (TRUE); 3943 } 3944 3945 bool_t 3946 xdr_callback_sec_parms4(XDR *xdrs, callback_sec_parms4 *objp) 3947 { 3948 3949 rpc_inline_t *buf; 3950 3951 if (!xdr_uint32_t(xdrs, &objp->cb_secflavor)) 3952 return (FALSE); 3953 switch (objp->cb_secflavor) { 3954 case AUTH_NONE: 3955 break; 3956 case AUTH_SYS: 3957 if (!xdr_authsys_parms(xdrs, 3958 &objp->callback_sec_parms4_u.cbsp_sys_cred)) 3959 return (FALSE); 3960 break; 3961 case RPCSEC_GSS: 3962 if (!xdr_gss_cb_handles4(xdrs, 3963 &objp->callback_sec_parms4_u.cbsp_gss_handles)) 3964 return (FALSE); 3965 break; 3966 default: 3967 return (FALSE); 3968 } 3969 return (TRUE); 3970 } 3971 3972 bool_t 3973 xdr_BACKCHANNEL_CTL4args(XDR *xdrs, BACKCHANNEL_CTL4args *objp) 3974 { 3975 3976 rpc_inline_t *buf; 3977 3978 if (!xdr_uint32_t(xdrs, &objp->bca_cb_program)) 3979 return (FALSE); 3980 if (!xdr_array(xdrs, (char **)&objp->bca_sec_parms.bca_sec_parms_val, 3981 (uint_t *)&objp->bca_sec_parms.bca_sec_parms_len, ~0, 3982 sizeof (callback_sec_parms4), (xdrproc_t)xdr_callback_sec_parms4)) 3983 return (FALSE); 3984 return (TRUE); 3985 } 3986 3987 bool_t 3988 xdr_BACKCHANNEL_CTL4res(XDR *xdrs, BACKCHANNEL_CTL4res *objp) 3989 { 3990 3991 rpc_inline_t *buf; 3992 3993 if (!xdr_nfsstat4(xdrs, &objp->bcr_status)) 3994 return (FALSE); 3995 return (TRUE); 3996 } 3997 3998 bool_t 3999 xdr_channel_dir_from_client4(XDR *xdrs, channel_dir_from_client4 *objp) 4000 { 4001 4002 rpc_inline_t *buf; 4003 4004 if (!xdr_enum(xdrs, (enum_t *)objp)) 4005 return (FALSE); 4006 return (TRUE); 4007 } 4008 4009 bool_t 4010 xdr_BIND_CONN_TO_SESSION4args(XDR *xdrs, BIND_CONN_TO_SESSION4args *objp) 4011 { 4012 4013 rpc_inline_t *buf; 4014 4015 if (!xdr_sessionid4(xdrs, objp->bctsa_sessid)) 4016 return (FALSE); 4017 if (!xdr_channel_dir_from_client4(xdrs, &objp->bctsa_dir)) 4018 return (FALSE); 4019 if (!xdr_bool(xdrs, &objp->bctsa_use_conn_in_rdma_mode)) 4020 return (FALSE); 4021 return (TRUE); 4022 } 4023 4024 bool_t 4025 xdr_channel_dir_from_server4(XDR *xdrs, channel_dir_from_server4 *objp) 4026 { 4027 4028 rpc_inline_t *buf; 4029 4030 if (!xdr_enum(xdrs, (enum_t *)objp)) 4031 return (FALSE); 4032 return (TRUE); 4033 } 4034 4035 bool_t 4036 xdr_BIND_CONN_TO_SESSION4resok(XDR *xdrs, BIND_CONN_TO_SESSION4resok *objp) 4037 { 4038 4039 rpc_inline_t *buf; 4040 4041 if (!xdr_sessionid4(xdrs, objp->bctsr_sessid)) 4042 return (FALSE); 4043 if (!xdr_channel_dir_from_server4(xdrs, &objp->bctsr_dir)) 4044 return (FALSE); 4045 if (!xdr_bool(xdrs, &objp->bctsr_use_conn_in_rdma_mode)) 4046 return (FALSE); 4047 return (TRUE); 4048 } 4049 4050 bool_t 4051 xdr_BIND_CONN_TO_SESSION4res(XDR *xdrs, BIND_CONN_TO_SESSION4res *objp) 4052 { 4053 4054 rpc_inline_t *buf; 4055 4056 if (!xdr_nfsstat4(xdrs, &objp->bctsr_status)) 4057 return (FALSE); 4058 switch (objp->bctsr_status) { 4059 case NFS4_OK: 4060 if (!xdr_BIND_CONN_TO_SESSION4resok(xdrs, 4061 &objp->BIND_CONN_TO_SESSION4res_u.bctsr_resok4)) 4062 return (FALSE); 4063 break; 4064 } 4065 return (TRUE); 4066 } 4067 4068 bool_t 4069 xdr_state_protect_ops4(XDR *xdrs, state_protect_ops4 *objp) 4070 { 4071 4072 rpc_inline_t *buf; 4073 4074 if (!xdr_bitmap4(xdrs, &objp->spo_must_enforce)) 4075 return (FALSE); 4076 if (!xdr_bitmap4(xdrs, &objp->spo_must_allow)) 4077 return (FALSE); 4078 return (TRUE); 4079 } 4080 4081 bool_t 4082 xdr_ssv_sp_parms4(XDR *xdrs, ssv_sp_parms4 *objp) 4083 { 4084 4085 rpc_inline_t *buf; 4086 4087 if (!xdr_state_protect_ops4(xdrs, &objp->ssp_ops)) 4088 return (FALSE); 4089 if (!xdr_array(xdrs, 4090 (char **)&objp->ssp_hash_algs.ssp_hash_algs_val, 4091 (uint_t *)&objp->ssp_hash_algs.ssp_hash_algs_len, ~0, 4092 sizeof (sec_oid4), (xdrproc_t)xdr_sec_oid4)) 4093 return (FALSE); 4094 if (!xdr_array(xdrs, 4095 (char **)&objp->ssp_encr_algs.ssp_encr_algs_val, 4096 (uint_t *)&objp->ssp_encr_algs.ssp_encr_algs_len, ~0, 4097 sizeof (sec_oid4), (xdrproc_t)xdr_sec_oid4)) 4098 return (FALSE); 4099 if (!xdr_uint32_t(xdrs, &objp->ssp_window)) 4100 return (FALSE); 4101 if (!xdr_uint32_t(xdrs, &objp->ssp_num_gss_handles)) 4102 return (FALSE); 4103 return (TRUE); 4104 } 4105 4106 bool_t 4107 xdr_state_protect_how4(XDR *xdrs, state_protect_how4 *objp) 4108 { 4109 4110 rpc_inline_t *buf; 4111 4112 if (!xdr_enum(xdrs, (enum_t *)objp)) 4113 return (FALSE); 4114 return (TRUE); 4115 } 4116 4117 bool_t 4118 xdr_state_protect4_a(XDR *xdrs, state_protect4_a *objp) 4119 { 4120 4121 rpc_inline_t *buf; 4122 4123 if (!xdr_state_protect_how4(xdrs, &objp->spa_how)) 4124 return (FALSE); 4125 switch (objp->spa_how) { 4126 case SP4_NONE: 4127 break; 4128 case SP4_MACH_CRED: 4129 if (!xdr_state_protect_ops4(xdrs, 4130 &objp->state_protect4_a_u.spa_mach_ops)) 4131 return (FALSE); 4132 break; 4133 case SP4_SSV: 4134 if (!xdr_ssv_sp_parms4(xdrs, 4135 &objp->state_protect4_a_u.spa_ssv_parms)) 4136 return (FALSE); 4137 break; 4138 default: 4139 return (FALSE); 4140 } 4141 return (TRUE); 4142 } 4143 4144 bool_t 4145 xdr_EXCHANGE_ID4args(XDR *xdrs, EXCHANGE_ID4args *objp) 4146 { 4147 4148 rpc_inline_t *buf; 4149 4150 if (!xdr_client_owner4(xdrs, &objp->eia_clientowner)) 4151 return (FALSE); 4152 if (!xdr_uint32_t(xdrs, &objp->eia_flags)) 4153 return (FALSE); 4154 if (!xdr_state_protect4_a(xdrs, &objp->eia_state_protect)) 4155 return (FALSE); 4156 if (!xdr_array(xdrs, 4157 (char **)&objp->eia_client_impl_id.eia_client_impl_id_val, 4158 (uint_t *)&objp->eia_client_impl_id.eia_client_impl_id_len, 1, 4159 sizeof (nfs_impl_id4), (xdrproc_t)xdr_nfs_impl_id4)) 4160 return (FALSE); 4161 return (TRUE); 4162 } 4163 4164 bool_t 4165 xdr_ssv_prot_info4(XDR *xdrs, ssv_prot_info4 *objp) 4166 { 4167 4168 rpc_inline_t *buf; 4169 4170 if (!xdr_state_protect_ops4(xdrs, &objp->spi_ops)) 4171 return (FALSE); 4172 if (!xdr_uint32_t(xdrs, &objp->spi_hash_alg)) 4173 return (FALSE); 4174 if (!xdr_uint32_t(xdrs, &objp->spi_encr_alg)) 4175 return (FALSE); 4176 if (!xdr_uint32_t(xdrs, &objp->spi_ssv_len)) 4177 return (FALSE); 4178 if (!xdr_uint32_t(xdrs, &objp->spi_window)) 4179 return (FALSE); 4180 if (!xdr_array(xdrs, (char **)&objp->spi_handles.spi_handles_val, 4181 (uint_t *)&objp->spi_handles.spi_handles_len, ~0, 4182 sizeof (gsshandle4_t), (xdrproc_t)xdr_gsshandle4_t)) 4183 return (FALSE); 4184 return (TRUE); 4185 } 4186 4187 bool_t 4188 xdr_state_protect4_r(XDR *xdrs, state_protect4_r *objp) 4189 { 4190 4191 rpc_inline_t *buf; 4192 4193 if (!xdr_state_protect_how4(xdrs, &objp->spr_how)) 4194 return (FALSE); 4195 switch (objp->spr_how) { 4196 case SP4_NONE: 4197 break; 4198 case SP4_MACH_CRED: 4199 if (!xdr_state_protect_ops4(xdrs, 4200 &objp->state_protect4_r_u.spr_mach_ops)) 4201 return (FALSE); 4202 break; 4203 case SP4_SSV: 4204 if (!xdr_ssv_prot_info4(xdrs, 4205 &objp->state_protect4_r_u.spr_ssv_info)) 4206 return (FALSE); 4207 break; 4208 default: 4209 return (FALSE); 4210 } 4211 return (TRUE); 4212 } 4213 4214 bool_t 4215 xdr_EXCHANGE_ID4resok(XDR *xdrs, EXCHANGE_ID4resok *objp) 4216 { 4217 4218 rpc_inline_t *buf; 4219 4220 if (!xdr_clientid4(xdrs, &objp->eir_clientid)) 4221 return (FALSE); 4222 if (!xdr_sequenceid4(xdrs, &objp->eir_sequenceid)) 4223 return (FALSE); 4224 if (!xdr_uint32_t(xdrs, &objp->eir_flags)) 4225 return (FALSE); 4226 if (!xdr_state_protect4_r(xdrs, &objp->eir_state_protect)) 4227 return (FALSE); 4228 if (!xdr_server_owner4(xdrs, &objp->eir_server_owner)) 4229 return (FALSE); 4230 if (!xdr_bytes(xdrs, 4231 (char **)&objp->eir_server_scope.eir_server_scope_val, 4232 (uint_t *)&objp->eir_server_scope.eir_server_scope_len, 4233 NFS4_OPAQUE_LIMIT)) 4234 return (FALSE); 4235 if (!xdr_array(xdrs, 4236 (char **)&objp->eir_server_impl_id.eir_server_impl_id_val, 4237 (uint_t *)&objp->eir_server_impl_id.eir_server_impl_id_len, 1, 4238 sizeof (nfs_impl_id4), (xdrproc_t)xdr_nfs_impl_id4)) 4239 return (FALSE); 4240 return (TRUE); 4241 } 4242 4243 bool_t 4244 xdr_EXCHANGE_ID4res(XDR *xdrs, EXCHANGE_ID4res *objp) 4245 { 4246 4247 rpc_inline_t *buf; 4248 4249 if (!xdr_nfsstat4(xdrs, &objp->eir_status)) 4250 return (FALSE); 4251 switch (objp->eir_status) { 4252 case NFS4_OK: 4253 if (!xdr_EXCHANGE_ID4resok(xdrs, 4254 &objp->EXCHANGE_ID4res_u.eir_resok4)) 4255 return (FALSE); 4256 break; 4257 } 4258 return (TRUE); 4259 } 4260 4261 bool_t 4262 xdr_channel_attrs4(XDR *xdrs, channel_attrs4 *objp) 4263 { 4264 4265 rpc_inline_t *buf; 4266 4267 if (!xdr_count4(xdrs, &objp->ca_headerpadsize)) 4268 return (FALSE); 4269 if (!xdr_count4(xdrs, &objp->ca_maxrequestsize)) 4270 return (FALSE); 4271 if (!xdr_count4(xdrs, &objp->ca_maxresponsesize)) 4272 return (FALSE); 4273 if (!xdr_count4(xdrs, &objp->ca_maxresponsesize_cached)) 4274 return (FALSE); 4275 if (!xdr_count4(xdrs, &objp->ca_maxoperations)) 4276 return (FALSE); 4277 if (!xdr_count4(xdrs, &objp->ca_maxrequests)) 4278 return (FALSE); 4279 if (!xdr_array(xdrs, (char **)&objp->ca_rdma_ird.ca_rdma_ird_val, 4280 (uint_t *)&objp->ca_rdma_ird.ca_rdma_ird_len, 1, 4281 sizeof (uint32_t), (xdrproc_t)xdr_uint32_t)) 4282 return (FALSE); 4283 return (TRUE); 4284 } 4285 4286 bool_t 4287 xdr_CREATE_SESSION4args(XDR *xdrs, CREATE_SESSION4args *objp) 4288 { 4289 4290 rpc_inline_t *buf; 4291 4292 if (!xdr_clientid4(xdrs, &objp->csa_clientid)) 4293 return (FALSE); 4294 if (!xdr_sequenceid4(xdrs, &objp->csa_sequence)) 4295 return (FALSE); 4296 if (!xdr_uint32_t(xdrs, &objp->csa_flags)) 4297 return (FALSE); 4298 if (!xdr_channel_attrs4(xdrs, &objp->csa_fore_chan_attrs)) 4299 return (FALSE); 4300 if (!xdr_channel_attrs4(xdrs, &objp->csa_back_chan_attrs)) 4301 return (FALSE); 4302 if (!xdr_uint32_t(xdrs, &objp->csa_cb_program)) 4303 return (FALSE); 4304 if (!xdr_array(xdrs, (char **)&objp->csa_sec_parms.csa_sec_parms_val, 4305 (uint_t *)&objp->csa_sec_parms.csa_sec_parms_len, ~0, 4306 sizeof (callback_sec_parms4), (xdrproc_t)xdr_callback_sec_parms4)) 4307 return (FALSE); 4308 return (TRUE); 4309 } 4310 4311 bool_t 4312 xdr_CREATE_SESSION4resok(XDR *xdrs, CREATE_SESSION4resok *objp) 4313 { 4314 4315 rpc_inline_t *buf; 4316 4317 if (!xdr_sessionid4(xdrs, objp->csr_sessionid)) 4318 return (FALSE); 4319 if (!xdr_sequenceid4(xdrs, &objp->csr_sequence)) 4320 return (FALSE); 4321 if (!xdr_uint32_t(xdrs, &objp->csr_flags)) 4322 return (FALSE); 4323 if (!xdr_channel_attrs4(xdrs, &objp->csr_fore_chan_attrs)) 4324 return (FALSE); 4325 if (!xdr_channel_attrs4(xdrs, &objp->csr_back_chan_attrs)) 4326 return (FALSE); 4327 return (TRUE); 4328 } 4329 4330 bool_t 4331 xdr_CREATE_SESSION4res(XDR *xdrs, CREATE_SESSION4res *objp) 4332 { 4333 4334 rpc_inline_t *buf; 4335 4336 if (!xdr_nfsstat4(xdrs, &objp->csr_status)) 4337 return (FALSE); 4338 switch (objp->csr_status) { 4339 case NFS4_OK: 4340 if (!xdr_CREATE_SESSION4resok(xdrs, 4341 &objp->CREATE_SESSION4res_u.csr_resok4)) 4342 return (FALSE); 4343 break; 4344 } 4345 return (TRUE); 4346 } 4347 4348 bool_t 4349 xdr_DESTROY_SESSION4args(XDR *xdrs, DESTROY_SESSION4args *objp) 4350 { 4351 4352 rpc_inline_t *buf; 4353 4354 if (!xdr_sessionid4(xdrs, objp->dsa_sessionid)) 4355 return (FALSE); 4356 return (TRUE); 4357 } 4358 4359 bool_t 4360 xdr_DESTROY_SESSION4res(XDR *xdrs, DESTROY_SESSION4res *objp) 4361 { 4362 4363 rpc_inline_t *buf; 4364 4365 if (!xdr_nfsstat4(xdrs, &objp->dsr_status)) 4366 return (FALSE); 4367 return (TRUE); 4368 } 4369 4370 bool_t 4371 xdr_FREE_STATEID4args(XDR *xdrs, FREE_STATEID4args *objp) 4372 { 4373 4374 rpc_inline_t *buf; 4375 4376 if (!xdr_stateid4(xdrs, &objp->fsa_stateid)) 4377 return (FALSE); 4378 return (TRUE); 4379 } 4380 4381 bool_t 4382 xdr_FREE_STATEID4res(XDR *xdrs, FREE_STATEID4res *objp) 4383 { 4384 4385 rpc_inline_t *buf; 4386 4387 if (!xdr_nfsstat4(xdrs, &objp->fsr_status)) 4388 return (FALSE); 4389 return (TRUE); 4390 } 4391 4392 bool_t 4393 xdr_attr_notice4(XDR *xdrs, attr_notice4 *objp) 4394 { 4395 4396 rpc_inline_t *buf; 4397 4398 if (!xdr_nfstime4(xdrs, objp)) 4399 return (FALSE); 4400 return (TRUE); 4401 } 4402 4403 bool_t 4404 xdr_GET_DIR_DELEGATION4args(XDR *xdrs, GET_DIR_DELEGATION4args *objp) 4405 { 4406 4407 rpc_inline_t *buf; 4408 4409 if (!xdr_bool(xdrs, &objp->gdda_signal_deleg_avail)) 4410 return (FALSE); 4411 if (!xdr_bitmap4(xdrs, &objp->gdda_notification_types)) 4412 return (FALSE); 4413 if (!xdr_attr_notice4(xdrs, &objp->gdda_child_attr_delay)) 4414 return (FALSE); 4415 if (!xdr_attr_notice4(xdrs, &objp->gdda_dir_attr_delay)) 4416 return (FALSE); 4417 if (!xdr_bitmap4(xdrs, &objp->gdda_child_attributes)) 4418 return (FALSE); 4419 if (!xdr_bitmap4(xdrs, &objp->gdda_dir_attributes)) 4420 return (FALSE); 4421 return (TRUE); 4422 } 4423 4424 bool_t 4425 xdr_GET_DIR_DELEGATION4resok(XDR *xdrs, GET_DIR_DELEGATION4resok *objp) 4426 { 4427 4428 rpc_inline_t *buf; 4429 4430 if (!xdr_verifier4(xdrs, objp->gddr_cookieverf)) 4431 return (FALSE); 4432 if (!xdr_stateid4(xdrs, &objp->gddr_stateid)) 4433 return (FALSE); 4434 if (!xdr_bitmap4(xdrs, &objp->gddr_notification)) 4435 return (FALSE); 4436 if (!xdr_bitmap4(xdrs, &objp->gddr_child_attributes)) 4437 return (FALSE); 4438 if (!xdr_bitmap4(xdrs, &objp->gddr_dir_attributes)) 4439 return (FALSE); 4440 return (TRUE); 4441 } 4442 4443 bool_t 4444 xdr_gddrnf4_status(XDR *xdrs, gddrnf4_status *objp) 4445 { 4446 4447 rpc_inline_t *buf; 4448 4449 if (!xdr_enum(xdrs, (enum_t *)objp)) 4450 return (FALSE); 4451 return (TRUE); 4452 } 4453 4454 bool_t 4455 xdr_GET_DIR_DELEGATION4res_non_fatal(XDR *xdrs, 4456 GET_DIR_DELEGATION4res_non_fatal *objp) 4457 { 4458 4459 rpc_inline_t *buf; 4460 4461 if (!xdr_gddrnf4_status(xdrs, &objp->gddrnf_status)) 4462 return (FALSE); 4463 switch (objp->gddrnf_status) { 4464 case GDD4_OK: 4465 if (!xdr_GET_DIR_DELEGATION4resok(xdrs, 4466 &objp->GET_DIR_DELEGATION4res_non_fatal_u.gddrnf_resok4)) 4467 return (FALSE); 4468 break; 4469 case GDD4_UNAVAIL: 4470 if (!xdr_bool(xdrs, 4471 &objp->GET_DIR_DELEGATION4res_non_fatal_u. 4472 gddrnf_will_signal_deleg_avail)) 4473 return (FALSE); 4474 break; 4475 default: 4476 return (FALSE); 4477 } 4478 return (TRUE); 4479 } 4480 4481 bool_t 4482 xdr_GET_DIR_DELEGATION4res(XDR *xdrs, GET_DIR_DELEGATION4res *objp) 4483 { 4484 4485 rpc_inline_t *buf; 4486 4487 if (!xdr_nfsstat4(xdrs, &objp->gddr_status)) 4488 return (FALSE); 4489 switch (objp->gddr_status) { 4490 case NFS4_OK: 4491 if (!xdr_GET_DIR_DELEGATION4res_non_fatal(xdrs, 4492 &objp->GET_DIR_DELEGATION4res_u.gddr_res_non_fatal4)) 4493 return (FALSE); 4494 break; 4495 } 4496 return (TRUE); 4497 } 4498 4499 bool_t 4500 xdr_GETDEVICEINFO4args(XDR *xdrs, GETDEVICEINFO4args *objp) 4501 { 4502 4503 rpc_inline_t *buf; 4504 4505 if (!xdr_deviceid4(xdrs, objp->gdia_device_id)) 4506 return (FALSE); 4507 if (!xdr_layouttype4(xdrs, &objp->gdia_layout_type)) 4508 return (FALSE); 4509 if (!xdr_count4(xdrs, &objp->gdia_maxcount)) 4510 return (FALSE); 4511 if (!xdr_bitmap4(xdrs, &objp->gdia_notify_types)) 4512 return (FALSE); 4513 return (TRUE); 4514 } 4515 4516 bool_t 4517 xdr_GETDEVICEINFO4resok(XDR *xdrs, GETDEVICEINFO4resok *objp) 4518 { 4519 4520 rpc_inline_t *buf; 4521 4522 if (!xdr_device_addr4(xdrs, &objp->gdir_device_addr)) 4523 return (FALSE); 4524 if (!xdr_bitmap4(xdrs, &objp->gdir_notification)) 4525 return (FALSE); 4526 return (TRUE); 4527 } 4528 4529 bool_t 4530 xdr_GETDEVICEINFO4res(XDR *xdrs, GETDEVICEINFO4res *objp) 4531 { 4532 4533 rpc_inline_t *buf; 4534 4535 if (!xdr_nfsstat4(xdrs, &objp->gdir_status)) 4536 return (FALSE); 4537 switch (objp->gdir_status) { 4538 case NFS4_OK: 4539 if (!xdr_GETDEVICEINFO4resok(xdrs, 4540 &objp->GETDEVICEINFO4res_u.gdir_resok4)) 4541 return (FALSE); 4542 break; 4543 case NFS4ERR_TOOSMALL: 4544 if (!xdr_count4(xdrs, &objp->GETDEVICEINFO4res_u.gdir_mincount)) 4545 return (FALSE); 4546 break; 4547 } 4548 return (TRUE); 4549 } 4550 4551 bool_t 4552 xdr_GETDEVICELIST4args(XDR *xdrs, GETDEVICELIST4args *objp) 4553 { 4554 4555 rpc_inline_t *buf; 4556 4557 if (!xdr_layouttype4(xdrs, &objp->gdla_layout_type)) 4558 return (FALSE); 4559 if (!xdr_count4(xdrs, &objp->gdla_maxdevices)) 4560 return (FALSE); 4561 if (!xdr_nfs_cookie4(xdrs, &objp->gdla_cookie)) 4562 return (FALSE); 4563 if (!xdr_verifier4(xdrs, objp->gdla_cookieverf)) 4564 return (FALSE); 4565 return (TRUE); 4566 } 4567 4568 bool_t 4569 xdr_GETDEVICELIST4resok(XDR *xdrs, GETDEVICELIST4resok *objp) 4570 { 4571 4572 rpc_inline_t *buf; 4573 4574 if (!xdr_nfs_cookie4(xdrs, &objp->gdlr_cookie)) 4575 return (FALSE); 4576 if (!xdr_verifier4(xdrs, objp->gdlr_cookieverf)) 4577 return (FALSE); 4578 if (!xdr_array(xdrs, 4579 (char **)&objp->gdlr_deviceid_list.gdlr_deviceid_list_val, 4580 (uint_t *)&objp->gdlr_deviceid_list.gdlr_deviceid_list_len, ~0, 4581 sizeof (deviceid4), (xdrproc_t)xdr_deviceid4)) 4582 return (FALSE); 4583 if (!xdr_bool(xdrs, &objp->gdlr_eof)) 4584 return (FALSE); 4585 return (TRUE); 4586 } 4587 4588 bool_t 4589 xdr_GETDEVICELIST4res(XDR *xdrs, GETDEVICELIST4res *objp) 4590 { 4591 4592 rpc_inline_t *buf; 4593 4594 if (!xdr_nfsstat4(xdrs, &objp->gdlr_status)) 4595 return (FALSE); 4596 switch (objp->gdlr_status) { 4597 case NFS4_OK: 4598 if (!xdr_GETDEVICELIST4resok(xdrs, 4599 &objp->GETDEVICELIST4res_u.gdlr_resok4)) 4600 return (FALSE); 4601 break; 4602 } 4603 return (TRUE); 4604 } 4605 4606 bool_t 4607 xdr_newtime4(XDR *xdrs, newtime4 *objp) 4608 { 4609 4610 rpc_inline_t *buf; 4611 4612 if (!xdr_bool(xdrs, &objp->nt_timechanged)) 4613 return (FALSE); 4614 switch (objp->nt_timechanged) { 4615 case TRUE: 4616 if (!xdr_nfstime4(xdrs, &objp->newtime4_u.nt_time)) 4617 return (FALSE); 4618 break; 4619 case FALSE: 4620 break; 4621 default: 4622 return (FALSE); 4623 } 4624 return (TRUE); 4625 } 4626 4627 bool_t 4628 xdr_newoffset4(XDR *xdrs, newoffset4 *objp) 4629 { 4630 4631 rpc_inline_t *buf; 4632 4633 if (!xdr_bool(xdrs, &objp->no_newoffset)) 4634 return (FALSE); 4635 switch (objp->no_newoffset) { 4636 case TRUE: 4637 if (!xdr_offset4(xdrs, &objp->newoffset4_u.no_offset)) 4638 return (FALSE); 4639 break; 4640 case FALSE: 4641 break; 4642 default: 4643 return (FALSE); 4644 } 4645 return (TRUE); 4646 } 4647 4648 bool_t 4649 xdr_LAYOUTCOMMIT4args(XDR *xdrs, LAYOUTCOMMIT4args *objp) 4650 { 4651 4652 rpc_inline_t *buf; 4653 4654 if (!xdr_offset4(xdrs, &objp->loca_offset)) 4655 return (FALSE); 4656 if (!xdr_length4(xdrs, &objp->loca_length)) 4657 return (FALSE); 4658 if (!xdr_bool(xdrs, &objp->loca_reclaim)) 4659 return (FALSE); 4660 if (!xdr_stateid4(xdrs, &objp->loca_stateid)) 4661 return (FALSE); 4662 if (!xdr_newoffset4(xdrs, &objp->loca_last_write_offset)) 4663 return (FALSE); 4664 if (!xdr_newtime4(xdrs, &objp->loca_time_modify)) 4665 return (FALSE); 4666 if (!xdr_layoutupdate4(xdrs, &objp->loca_layoutupdate)) 4667 return (FALSE); 4668 return (TRUE); 4669 } 4670 4671 bool_t 4672 xdr_newsize4(XDR *xdrs, newsize4 *objp) 4673 { 4674 4675 rpc_inline_t *buf; 4676 4677 if (!xdr_bool(xdrs, &objp->ns_sizechanged)) 4678 return (FALSE); 4679 switch (objp->ns_sizechanged) { 4680 case TRUE: 4681 if (!xdr_length4(xdrs, &objp->newsize4_u.ns_size)) 4682 return (FALSE); 4683 break; 4684 case FALSE: 4685 break; 4686 default: 4687 return (FALSE); 4688 } 4689 return (TRUE); 4690 } 4691 4692 bool_t 4693 xdr_LAYOUTCOMMIT4resok(XDR *xdrs, LAYOUTCOMMIT4resok *objp) 4694 { 4695 4696 rpc_inline_t *buf; 4697 4698 if (!xdr_newsize4(xdrs, &objp->locr_newsize)) 4699 return (FALSE); 4700 return (TRUE); 4701 } 4702 4703 bool_t 4704 xdr_LAYOUTCOMMIT4res(XDR *xdrs, LAYOUTCOMMIT4res *objp) 4705 { 4706 4707 rpc_inline_t *buf; 4708 4709 if (!xdr_nfsstat4(xdrs, &objp->locr_status)) 4710 return (FALSE); 4711 switch (objp->locr_status) { 4712 case NFS4_OK: 4713 if (!xdr_LAYOUTCOMMIT4resok(xdrs, 4714 &objp->LAYOUTCOMMIT4res_u.locr_resok4)) 4715 return (FALSE); 4716 break; 4717 } 4718 return (TRUE); 4719 } 4720 4721 bool_t 4722 xdr_LAYOUTGET4args(XDR *xdrs, LAYOUTGET4args *objp) 4723 { 4724 4725 rpc_inline_t *buf; 4726 4727 if (!xdr_bool(xdrs, &objp->loga_signal_layout_avail)) 4728 return (FALSE); 4729 if (!xdr_layouttype4(xdrs, &objp->loga_layout_type)) 4730 return (FALSE); 4731 if (!xdr_layoutiomode4(xdrs, &objp->loga_iomode)) 4732 return (FALSE); 4733 if (!xdr_offset4(xdrs, &objp->loga_offset)) 4734 return (FALSE); 4735 if (!xdr_length4(xdrs, &objp->loga_length)) 4736 return (FALSE); 4737 if (!xdr_length4(xdrs, &objp->loga_minlength)) 4738 return (FALSE); 4739 if (!xdr_stateid4(xdrs, &objp->loga_stateid)) 4740 return (FALSE); 4741 if (!xdr_count4(xdrs, &objp->loga_maxcount)) 4742 return (FALSE); 4743 return (TRUE); 4744 } 4745 4746 bool_t 4747 xdr_LAYOUTGET4resok(XDR *xdrs, LAYOUTGET4resok *objp) 4748 { 4749 4750 rpc_inline_t *buf; 4751 4752 if (!xdr_bool(xdrs, &objp->logr_return_on_close)) 4753 return (FALSE); 4754 if (!xdr_stateid4(xdrs, &objp->logr_stateid)) 4755 return (FALSE); 4756 if (!xdr_array(xdrs, (char **)&objp->logr_layout.logr_layout_val, 4757 (uint_t *)&objp->logr_layout.logr_layout_len, ~0, 4758 sizeof (layout4), (xdrproc_t)xdr_layout4)) 4759 return (FALSE); 4760 return (TRUE); 4761 } 4762 4763 bool_t 4764 xdr_LAYOUTGET4res(XDR *xdrs, LAYOUTGET4res *objp) 4765 { 4766 4767 rpc_inline_t *buf; 4768 4769 if (!xdr_nfsstat4(xdrs, &objp->logr_status)) 4770 return (FALSE); 4771 switch (objp->logr_status) { 4772 case NFS4_OK: 4773 if (!xdr_LAYOUTGET4resok(xdrs, 4774 &objp->LAYOUTGET4res_u.logr_resok4)) 4775 return (FALSE); 4776 break; 4777 case NFS4ERR_LAYOUTTRYLATER: 4778 if (!xdr_bool(xdrs, 4779 &objp->LAYOUTGET4res_u.logr_will_signal_layout_avail)) 4780 return (FALSE); 4781 break; 4782 } 4783 return (TRUE); 4784 } 4785 4786 bool_t 4787 xdr_LAYOUTRETURN4args(XDR *xdrs, LAYOUTRETURN4args *objp) 4788 { 4789 4790 rpc_inline_t *buf; 4791 4792 if (!xdr_bool(xdrs, &objp->lora_reclaim)) 4793 return (FALSE); 4794 if (!xdr_layouttype4(xdrs, &objp->lora_layout_type)) 4795 return (FALSE); 4796 if (!xdr_layoutiomode4(xdrs, &objp->lora_iomode)) 4797 return (FALSE); 4798 if (!xdr_layoutreturn4(xdrs, &objp->lora_layoutreturn)) 4799 return (FALSE); 4800 return (TRUE); 4801 } 4802 4803 bool_t 4804 xdr_layoutreturn_stateid(XDR *xdrs, layoutreturn_stateid *objp) 4805 { 4806 4807 rpc_inline_t *buf; 4808 4809 if (!xdr_bool(xdrs, &objp->lrs_present)) 4810 return (FALSE); 4811 switch (objp->lrs_present) { 4812 case TRUE: 4813 if (!xdr_stateid4(xdrs, 4814 &objp->layoutreturn_stateid_u.lrs_stateid)) 4815 return (FALSE); 4816 break; 4817 case FALSE: 4818 break; 4819 default: 4820 return (FALSE); 4821 } 4822 return (TRUE); 4823 } 4824 4825 bool_t 4826 xdr_LAYOUTRETURN4res(XDR *xdrs, LAYOUTRETURN4res *objp) 4827 { 4828 4829 rpc_inline_t *buf; 4830 4831 if (!xdr_nfsstat4(xdrs, &objp->lorr_status)) 4832 return (FALSE); 4833 switch (objp->lorr_status) { 4834 case NFS4_OK: 4835 if (!xdr_layoutreturn_stateid(xdrs, 4836 &objp->LAYOUTRETURN4res_u.lorr_stateid)) 4837 return (FALSE); 4838 break; 4839 } 4840 return (TRUE); 4841 } 4842 4843 bool_t 4844 xdr_secinfo_style4(XDR *xdrs, secinfo_style4 *objp) 4845 { 4846 4847 rpc_inline_t *buf; 4848 4849 if (!xdr_enum(xdrs, (enum_t *)objp)) 4850 return (FALSE); 4851 return (TRUE); 4852 } 4853 4854 bool_t 4855 xdr_SECINFO_NO_NAME4args(XDR *xdrs, SECINFO_NO_NAME4args *objp) 4856 { 4857 4858 rpc_inline_t *buf; 4859 4860 if (!xdr_secinfo_style4(xdrs, objp)) 4861 return (FALSE); 4862 return (TRUE); 4863 } 4864 4865 bool_t 4866 xdr_SECINFO_NO_NAME4res(XDR *xdrs, SECINFO_NO_NAME4res *objp) 4867 { 4868 4869 rpc_inline_t *buf; 4870 4871 if (!xdr_SECINFO4res(xdrs, objp)) 4872 return (FALSE); 4873 return (TRUE); 4874 } 4875 4876 bool_t 4877 xdr_SEQUENCE4args(XDR *xdrs, SEQUENCE4args *objp) 4878 { 4879 4880 rpc_inline_t *buf; 4881 4882 if (!xdr_sessionid4(xdrs, objp->sa_sessionid)) 4883 return (FALSE); 4884 if (!xdr_sequenceid4(xdrs, &objp->sa_sequenceid)) 4885 return (FALSE); 4886 if (!xdr_slotid4(xdrs, &objp->sa_slotid)) 4887 return (FALSE); 4888 if (!xdr_slotid4(xdrs, &objp->sa_highest_slotid)) 4889 return (FALSE); 4890 if (!xdr_bool(xdrs, &objp->sa_cachethis)) 4891 return (FALSE); 4892 return (TRUE); 4893 } 4894 4895 bool_t 4896 xdr_SEQUENCE4resok(XDR *xdrs, SEQUENCE4resok *objp) 4897 { 4898 4899 rpc_inline_t *buf; 4900 4901 if (!xdr_sessionid4(xdrs, objp->sr_sessionid)) 4902 return (FALSE); 4903 if (!xdr_sequenceid4(xdrs, &objp->sr_sequenceid)) 4904 return (FALSE); 4905 if (!xdr_slotid4(xdrs, &objp->sr_slotid)) 4906 return (FALSE); 4907 if (!xdr_slotid4(xdrs, &objp->sr_highest_slotid)) 4908 return (FALSE); 4909 if (!xdr_slotid4(xdrs, &objp->sr_target_highest_slotid)) 4910 return (FALSE); 4911 if (!xdr_uint32_t(xdrs, &objp->sr_status_flags)) 4912 return (FALSE); 4913 return (TRUE); 4914 } 4915 4916 bool_t 4917 xdr_SEQUENCE4res(XDR *xdrs, SEQUENCE4res *objp) 4918 { 4919 4920 rpc_inline_t *buf; 4921 4922 if (!xdr_nfsstat4(xdrs, &objp->sr_status)) 4923 return (FALSE); 4924 switch (objp->sr_status) { 4925 case NFS4_OK: 4926 if (!xdr_SEQUENCE4resok(xdrs, &objp->SEQUENCE4res_u.sr_resok4)) 4927 return (FALSE); 4928 break; 4929 } 4930 return (TRUE); 4931 } 4932 4933 bool_t 4934 xdr_ssa_digest_input4(XDR *xdrs, ssa_digest_input4 *objp) 4935 { 4936 4937 rpc_inline_t *buf; 4938 4939 if (!xdr_SEQUENCE4args(xdrs, &objp->sdi_seqargs)) 4940 return (FALSE); 4941 return (TRUE); 4942 } 4943 4944 bool_t 4945 xdr_SET_SSV4args(XDR *xdrs, SET_SSV4args *objp) 4946 { 4947 4948 rpc_inline_t *buf; 4949 4950 if (!xdr_bytes(xdrs, (char **)&objp->ssa_ssv.ssa_ssv_val, 4951 (uint_t *)&objp->ssa_ssv.ssa_ssv_len, ~0)) 4952 return (FALSE); 4953 if (!xdr_bytes(xdrs, (char **)&objp->ssa_digest.ssa_digest_val, 4954 (uint_t *)&objp->ssa_digest.ssa_digest_len, ~0)) 4955 return (FALSE); 4956 return (TRUE); 4957 } 4958 4959 bool_t 4960 xdr_ssr_digest_input4(XDR *xdrs, ssr_digest_input4 *objp) 4961 { 4962 4963 rpc_inline_t *buf; 4964 4965 if (!xdr_SEQUENCE4res(xdrs, &objp->sdi_seqres)) 4966 return (FALSE); 4967 return (TRUE); 4968 } 4969 4970 bool_t 4971 xdr_SET_SSV4resok(XDR *xdrs, SET_SSV4resok *objp) 4972 { 4973 4974 rpc_inline_t *buf; 4975 4976 if (!xdr_bytes(xdrs, (char **)&objp->ssr_digest.ssr_digest_val, 4977 (uint_t *)&objp->ssr_digest.ssr_digest_len, ~0)) 4978 return (FALSE); 4979 return (TRUE); 4980 } 4981 4982 bool_t 4983 xdr_SET_SSV4res(XDR *xdrs, SET_SSV4res *objp) 4984 { 4985 4986 rpc_inline_t *buf; 4987 4988 if (!xdr_nfsstat4(xdrs, &objp->ssr_status)) 4989 return (FALSE); 4990 switch (objp->ssr_status) { 4991 case NFS4_OK: 4992 if (!xdr_SET_SSV4resok(xdrs, &objp->SET_SSV4res_u.ssr_resok4)) 4993 return (FALSE); 4994 break; 4995 } 4996 return (TRUE); 4997 } 4998 4999 bool_t 5000 xdr_TEST_STATEID4args(XDR *xdrs, TEST_STATEID4args *objp) 5001 { 5002 5003 rpc_inline_t *buf; 5004 5005 if (!xdr_array(xdrs, (char **)&objp->ts_stateids.ts_stateids_val, 5006 (uint_t *)&objp->ts_stateids.ts_stateids_len, ~0, 5007 sizeof (stateid4), (xdrproc_t)xdr_stateid4)) 5008 return (FALSE); 5009 return (TRUE); 5010 } 5011 5012 bool_t 5013 xdr_TEST_STATEID4resok(XDR *xdrs, TEST_STATEID4resok *objp) 5014 { 5015 5016 rpc_inline_t *buf; 5017 5018 if (!xdr_array(xdrs, 5019 (char **)&objp->tsr_status_codes.tsr_status_codes_val, 5020 (uint_t *)&objp->tsr_status_codes.tsr_status_codes_len, ~0, 5021 sizeof (nfsstat4), (xdrproc_t)xdr_nfsstat4)) 5022 return (FALSE); 5023 return (TRUE); 5024 } 5025 5026 bool_t 5027 xdr_TEST_STATEID4res(XDR *xdrs, TEST_STATEID4res *objp) 5028 { 5029 5030 rpc_inline_t *buf; 5031 5032 if (!xdr_nfsstat4(xdrs, &objp->tsr_status)) 5033 return (FALSE); 5034 switch (objp->tsr_status) { 5035 case NFS4_OK: 5036 if (!xdr_TEST_STATEID4resok(xdrs, 5037 &objp->TEST_STATEID4res_u.tsr_resok4)) 5038 return (FALSE); 5039 break; 5040 } 5041 return (TRUE); 5042 } 5043 5044 bool_t 5045 xdr_deleg_claim4(XDR *xdrs, deleg_claim4 *objp) 5046 { 5047 5048 rpc_inline_t *buf; 5049 5050 if (!xdr_open_claim_type4(xdrs, &objp->dc_claim)) 5051 return (FALSE); 5052 switch (objp->dc_claim) { 5053 case CLAIM_FH: 5054 break; 5055 case CLAIM_DELEG_PREV_FH: 5056 break; 5057 case CLAIM_PREVIOUS: 5058 if (!xdr_open_delegation_type4(xdrs, 5059 &objp->deleg_claim4_u.dc_delegate_type)) 5060 return (FALSE); 5061 break; 5062 default: 5063 return (FALSE); 5064 } 5065 return (TRUE); 5066 } 5067 5068 bool_t 5069 xdr_WANT_DELEGATION4args(XDR *xdrs, WANT_DELEGATION4args *objp) 5070 { 5071 5072 rpc_inline_t *buf; 5073 5074 if (!xdr_uint32_t(xdrs, &objp->wda_want)) 5075 return (FALSE); 5076 if (!xdr_deleg_claim4(xdrs, &objp->wda_claim)) 5077 return (FALSE); 5078 return (TRUE); 5079 } 5080 5081 bool_t 5082 xdr_WANT_DELEGATION4res(XDR *xdrs, WANT_DELEGATION4res *objp) 5083 { 5084 5085 rpc_inline_t *buf; 5086 5087 if (!xdr_nfsstat4(xdrs, &objp->wdr_status)) 5088 return (FALSE); 5089 switch (objp->wdr_status) { 5090 case NFS4_OK: 5091 if (!xdr_open_delegation4(xdrs, 5092 &objp->WANT_DELEGATION4res_u.wdr_resok4)) 5093 return (FALSE); 5094 break; 5095 } 5096 return (TRUE); 5097 } 5098 5099 bool_t 5100 xdr_DESTROY_CLIENTID4args(XDR *xdrs, DESTROY_CLIENTID4args *objp) 5101 { 5102 5103 rpc_inline_t *buf; 5104 5105 if (!xdr_clientid4(xdrs, &objp->dca_clientid)) 5106 return (FALSE); 5107 return (TRUE); 5108 } 5109 5110 bool_t 5111 xdr_DESTROY_CLIENTID4res(XDR *xdrs, DESTROY_CLIENTID4res *objp) 5112 { 5113 5114 rpc_inline_t *buf; 5115 5116 if (!xdr_nfsstat4(xdrs, &objp->dcr_status)) 5117 return (FALSE); 5118 return (TRUE); 5119 } 5120 5121 bool_t 5122 xdr_RECLAIM_COMPLETE4args(XDR *xdrs, RECLAIM_COMPLETE4args *objp) 5123 { 5124 5125 rpc_inline_t *buf; 5126 5127 if (!xdr_bool(xdrs, &objp->rca_one_fs)) 5128 return (FALSE); 5129 return (TRUE); 5130 } 5131 5132 bool_t 5133 xdr_RECLAIM_COMPLETE4res(XDR *xdrs, RECLAIM_COMPLETE4res *objp) 5134 { 5135 5136 rpc_inline_t *buf; 5137 5138 if (!xdr_nfsstat4(xdrs, &objp->rcr_status)) 5139 return (FALSE); 5140 return (TRUE); 5141 } 5142 5143 /* new operations for NFSv4.1 */ 5144 5145 5146 bool_t 5147 xdr_nfs_opnum4(XDR *xdrs, nfs_opnum4 *objp) 5148 { 5149 5150 rpc_inline_t *buf; 5151 5152 if (!xdr_enum(xdrs, (enum_t *)objp)) 5153 return (FALSE); 5154 return (TRUE); 5155 } 5156 5157 bool_t 5158 xdr_nfs_argop4(XDR *xdrs, nfs_argop4 *objp) 5159 { 5160 nfs4_skip_bytes = 0; 5161 5162 if (!xdr_nfs_opnum4(xdrs, &objp->argop)) 5163 return (FALSE); 5164 switch (objp->argop) { 5165 case OP_ACCESS: 5166 if (!xdr_ACCESS4args(xdrs, &objp->nfs_argop4_u.opaccess)) 5167 return (FALSE); 5168 break; 5169 case OP_CLOSE: 5170 if (!xdr_CLOSE4args(xdrs, &objp->nfs_argop4_u.opclose)) 5171 return (FALSE); 5172 break; 5173 case OP_COMMIT: 5174 if (!xdr_COMMIT4args(xdrs, &objp->nfs_argop4_u.opcommit)) 5175 return (FALSE); 5176 break; 5177 case OP_CREATE: 5178 if (!xdr_CREATE4args(xdrs, &objp->nfs_argop4_u.opcreate)) 5179 return (FALSE); 5180 break; 5181 case OP_DELEGPURGE: 5182 if (!xdr_DELEGPURGE4args(xdrs, 5183 &objp->nfs_argop4_u.opdelegpurge)) 5184 return (FALSE); 5185 break; 5186 case OP_DELEGRETURN: 5187 if (!xdr_DELEGRETURN4args(xdrs, 5188 &objp->nfs_argop4_u.opdelegreturn)) 5189 return (FALSE); 5190 break; 5191 case OP_GETATTR: 5192 if (!xdr_GETATTR4args(xdrs, &objp->nfs_argop4_u.opgetattr)) 5193 return (FALSE); 5194 break; 5195 case OP_GETFH: 5196 break; 5197 case OP_LINK: 5198 if (!xdr_LINK4args(xdrs, &objp->nfs_argop4_u.oplink)) 5199 return (FALSE); 5200 break; 5201 case OP_LOCK: 5202 if (!xdr_LOCK4args(xdrs, &objp->nfs_argop4_u.oplock)) 5203 return (FALSE); 5204 break; 5205 case OP_LOCKT: 5206 if (!xdr_LOCKT4args(xdrs, &objp->nfs_argop4_u.oplockt)) 5207 return (FALSE); 5208 break; 5209 case OP_LOCKU: 5210 if (!xdr_LOCKU4args(xdrs, &objp->nfs_argop4_u.oplocku)) 5211 return (FALSE); 5212 break; 5213 case OP_LOOKUP: 5214 if (!xdr_LOOKUP4args(xdrs, &objp->nfs_argop4_u.oplookup)) 5215 return (FALSE); 5216 break; 5217 case OP_LOOKUPP: 5218 break; 5219 case OP_NVERIFY: 5220 if (!xdr_NVERIFY4args(xdrs, 5221 &objp->nfs_argop4_u.opnverify)) 5222 return (FALSE); 5223 break; 5224 case OP_OPEN: 5225 if (!xdr_OPEN4args(xdrs, &objp->nfs_argop4_u.opopen)) 5226 return (FALSE); 5227 break; 5228 case OP_OPENATTR: 5229 if (!xdr_OPENATTR4args(xdrs, 5230 &objp->nfs_argop4_u.opopenattr)) 5231 return (FALSE); 5232 break; 5233 case OP_OPEN_CONFIRM: 5234 if (!xdr_OPEN_CONFIRM4args(xdrs, 5235 &objp->nfs_argop4_u.opopen_confirm)) 5236 return (FALSE); 5237 break; 5238 case OP_OPEN_DOWNGRADE: 5239 if (!xdr_OPEN_DOWNGRADE4args(xdrs, 5240 &objp->nfs_argop4_u.opopen_downgrade)) 5241 return (FALSE); 5242 break; 5243 case OP_PUTFH: 5244 if (!xdr_PUTFH4args(xdrs, &objp->nfs_argop4_u.opputfh)) 5245 return (FALSE); 5246 break; 5247 case OP_PUTPUBFH: 5248 break; 5249 case OP_PUTROOTFH: 5250 break; 5251 case OP_READ: 5252 if (!xdr_READ4args(xdrs, &objp->nfs_argop4_u.opread)) 5253 return (FALSE); 5254 break; 5255 case OP_READDIR: 5256 if (!xdr_READDIR4args(xdrs, 5257 &objp->nfs_argop4_u.opreaddir)) 5258 return (FALSE); 5259 break; 5260 case OP_READLINK: 5261 break; 5262 case OP_REMOVE: 5263 if (!xdr_REMOVE4args(xdrs, &objp->nfs_argop4_u.opremove)) 5264 return (FALSE); 5265 break; 5266 case OP_RENAME: 5267 if (!xdr_RENAME4args(xdrs, &objp->nfs_argop4_u.oprename)) 5268 return (FALSE); 5269 break; 5270 case OP_RENEW: 5271 if (!xdr_RENEW4args(xdrs, &objp->nfs_argop4_u.oprenew)) 5272 return (FALSE); 5273 break; 5274 case OP_RESTOREFH: 5275 break; 5276 case OP_SAVEFH: 5277 break; 5278 case OP_SECINFO: 5279 if (!xdr_SECINFO4args(xdrs, 5280 &objp->nfs_argop4_u.opsecinfo)) 5281 return (FALSE); 5282 break; 5283 case OP_SETATTR: 5284 if (!xdr_SETATTR4args(xdrs, 5285 &objp->nfs_argop4_u.opsetattr)) 5286 return (FALSE); 5287 break; 5288 case OP_SETCLIENTID: 5289 if (!xdr_SETCLIENTID4args(xdrs, 5290 &objp->nfs_argop4_u.opsetclientid)) 5291 return (FALSE); 5292 break; 5293 case OP_SETCLIENTID_CONFIRM: 5294 if (!xdr_SETCLIENTID_CONFIRM4args(xdrs, 5295 &objp->nfs_argop4_u.opsetclientid_confirm)) 5296 return (FALSE); 5297 break; 5298 case OP_VERIFY: 5299 if (!xdr_VERIFY4args(xdrs, &objp->nfs_argop4_u.opverify)) 5300 return (FALSE); 5301 break; 5302 case OP_WRITE: 5303 if (!xdr_WRITE4args(xdrs, &objp->nfs_argop4_u.opwrite)) 5304 return (FALSE); 5305 break; 5306 case OP_RELEASE_LOCKOWNER: 5307 if (!xdr_RELEASE_LOCKOWNER4args(xdrs, 5308 &objp->nfs_argop4_u.oprelease_lockowner)) 5309 return (FALSE); 5310 break; 5311 case OP_BACKCHANNEL_CTL: 5312 if (!xdr_BACKCHANNEL_CTL4args(xdrs, 5313 &objp->nfs_argop4_u.opbackchannel_ctl)) 5314 return (FALSE); 5315 break; 5316 case OP_BIND_CONN_TO_SESSION: 5317 if (!xdr_BIND_CONN_TO_SESSION4args(xdrs, 5318 &objp->nfs_argop4_u.opbind_conn_to_session)) 5319 return (FALSE); 5320 break; 5321 case OP_EXCHANGE_ID: 5322 if (!xdr_EXCHANGE_ID4args(xdrs, 5323 &objp->nfs_argop4_u.opexchange_id)) 5324 return (FALSE); 5325 break; 5326 case OP_CREATE_SESSION: 5327 if (!xdr_CREATE_SESSION4args(xdrs, 5328 &objp->nfs_argop4_u.opcreate_session)) 5329 return (FALSE); 5330 break; 5331 case OP_DESTROY_SESSION: 5332 if (!xdr_DESTROY_SESSION4args(xdrs, 5333 &objp->nfs_argop4_u.opdestroy_session)) 5334 return (FALSE); 5335 break; 5336 case OP_FREE_STATEID: 5337 if (!xdr_FREE_STATEID4args(xdrs, 5338 &objp->nfs_argop4_u.opfree_stateid)) 5339 return (FALSE); 5340 break; 5341 case OP_GET_DIR_DELEGATION: 5342 if (!xdr_GET_DIR_DELEGATION4args(xdrs, 5343 &objp->nfs_argop4_u.opget_dir_delegation)) 5344 return (FALSE); 5345 break; 5346 case OP_GETDEVICEINFO: 5347 if (!xdr_GETDEVICEINFO4args(xdrs, 5348 &objp->nfs_argop4_u.opgetdeviceinfo)) 5349 return (FALSE); 5350 break; 5351 case OP_GETDEVICELIST: 5352 if (!xdr_GETDEVICELIST4args(xdrs, 5353 &objp->nfs_argop4_u.opgetdevicelist)) 5354 return (FALSE); 5355 break; 5356 case OP_LAYOUTCOMMIT: 5357 if (!xdr_LAYOUTCOMMIT4args(xdrs, 5358 &objp->nfs_argop4_u.oplayoutcommit)) 5359 return (FALSE); 5360 break; 5361 case OP_LAYOUTGET: 5362 if (!xdr_LAYOUTGET4args(xdrs, 5363 &objp->nfs_argop4_u.oplayoutget)) 5364 return (FALSE); 5365 break; 5366 case OP_LAYOUTRETURN: 5367 if (!xdr_LAYOUTRETURN4args(xdrs, 5368 &objp->nfs_argop4_u.oplayoutreturn)) 5369 return (FALSE); 5370 break; 5371 case OP_SECINFO_NO_NAME: 5372 if (!xdr_SECINFO_NO_NAME4args(xdrs, 5373 &objp->nfs_argop4_u.opsecinfo_no_name)) 5374 return (FALSE); 5375 break; 5376 case OP_SEQUENCE: 5377 if (!xdr_SEQUENCE4args(xdrs, 5378 &objp->nfs_argop4_u.opsequence)) 5379 return (FALSE); 5380 break; 5381 case OP_SET_SSV: 5382 if (!xdr_SET_SSV4args(xdrs, 5383 &objp->nfs_argop4_u.opset_ssv)) 5384 return (FALSE); 5385 break; 5386 case OP_TEST_STATEID: 5387 if (!xdr_TEST_STATEID4args(xdrs, 5388 &objp->nfs_argop4_u.optest_stateid)) 5389 return (FALSE); 5390 break; 5391 case OP_WANT_DELEGATION: 5392 if (!xdr_WANT_DELEGATION4args(xdrs, 5393 &objp->nfs_argop4_u.opwant_delegation)) 5394 return (FALSE); 5395 break; 5396 case OP_DESTROY_CLIENTID: 5397 if (!xdr_DESTROY_CLIENTID4args(xdrs, 5398 &objp->nfs_argop4_u.opdestroy_clientid)) 5399 return (FALSE); 5400 break; 5401 case OP_RECLAIM_COMPLETE: 5402 if (!xdr_RECLAIM_COMPLETE4args(xdrs, 5403 &objp->nfs_argop4_u.opreclaim_complete)) 5404 return (FALSE); 5405 break; 5406 case OP_ILLEGAL: 5407 break; 5408 default: 5409 return (FALSE); 5410 } 5411 return (TRUE); 5412 } 5413 5414 bool_t 5415 xdr_nfs_resop4(XDR *xdrs, nfs_resop4 *objp) 5416 { 5417 nfs4_skip_bytes = 0; 5418 5419 if (!xdr_nfs_opnum4(xdrs, &objp->resop)) 5420 return (FALSE); 5421 switch (objp->resop) { 5422 case OP_ACCESS: 5423 if (!xdr_ACCESS4res(xdrs, &objp->nfs_resop4_u.opaccess)) 5424 return (FALSE); 5425 break; 5426 case OP_CLOSE: 5427 if (!xdr_CLOSE4res(xdrs, &objp->nfs_resop4_u.opclose)) 5428 return (FALSE); 5429 break; 5430 case OP_COMMIT: 5431 if (!xdr_COMMIT4res(xdrs, &objp->nfs_resop4_u.opcommit)) 5432 return (FALSE); 5433 break; 5434 case OP_CREATE: 5435 if (!xdr_CREATE4res(xdrs, &objp->nfs_resop4_u.opcreate)) 5436 return (FALSE); 5437 break; 5438 case OP_DELEGPURGE: 5439 if (!xdr_DELEGPURGE4res(xdrs, 5440 &objp->nfs_resop4_u.opdelegpurge)) 5441 return (FALSE); 5442 break; 5443 case OP_DELEGRETURN: 5444 if (!xdr_DELEGRETURN4res(xdrs, 5445 &objp->nfs_resop4_u.opdelegreturn)) 5446 return (FALSE); 5447 break; 5448 case OP_GETATTR: 5449 if (!xdr_GETATTR4res(xdrs, &objp->nfs_resop4_u.opgetattr)) 5450 return (FALSE); 5451 break; 5452 case OP_GETFH: 5453 if (!xdr_GETFH4res(xdrs, &objp->nfs_resop4_u.opgetfh)) 5454 return (FALSE); 5455 break; 5456 case OP_LINK: 5457 if (!xdr_LINK4res(xdrs, &objp->nfs_resop4_u.oplink)) 5458 return (FALSE); 5459 break; 5460 case OP_LOCK: 5461 if (!xdr_LOCK4res(xdrs, &objp->nfs_resop4_u.oplock)) 5462 return (FALSE); 5463 break; 5464 case OP_LOCKT: 5465 if (!xdr_LOCKT4res(xdrs, &objp->nfs_resop4_u.oplockt)) 5466 return (FALSE); 5467 break; 5468 case OP_LOCKU: 5469 if (!xdr_LOCKU4res(xdrs, &objp->nfs_resop4_u.oplocku)) 5470 return (FALSE); 5471 break; 5472 case OP_LOOKUP: 5473 if (!xdr_LOOKUP4res(xdrs, &objp->nfs_resop4_u.oplookup)) 5474 return (FALSE); 5475 break; 5476 case OP_LOOKUPP: 5477 if (!xdr_LOOKUPP4res(xdrs, 5478 &objp->nfs_resop4_u.oplookupp)) 5479 return (FALSE); 5480 break; 5481 case OP_NVERIFY: 5482 if (!xdr_NVERIFY4res(xdrs, 5483 &objp->nfs_resop4_u.opnverify)) 5484 return (FALSE); 5485 break; 5486 case OP_OPEN: 5487 if (!xdr_OPEN4res(xdrs, &objp->nfs_resop4_u.opopen)) 5488 return (FALSE); 5489 break; 5490 case OP_OPENATTR: 5491 if (!xdr_OPENATTR4res(xdrs, 5492 &objp->nfs_resop4_u.opopenattr)) 5493 return (FALSE); 5494 break; 5495 case OP_OPEN_CONFIRM: 5496 if (!xdr_OPEN_CONFIRM4res(xdrs, 5497 &objp->nfs_resop4_u.opopen_confirm)) 5498 return (FALSE); 5499 break; 5500 case OP_OPEN_DOWNGRADE: 5501 if (!xdr_OPEN_DOWNGRADE4res(xdrs, 5502 &objp->nfs_resop4_u.opopen_downgrade)) 5503 return (FALSE); 5504 break; 5505 case OP_PUTFH: 5506 if (!xdr_PUTFH4res(xdrs, &objp->nfs_resop4_u.opputfh)) 5507 return (FALSE); 5508 break; 5509 case OP_PUTPUBFH: 5510 if (!xdr_PUTPUBFH4res(xdrs, 5511 &objp->nfs_resop4_u.opputpubfh)) 5512 return (FALSE); 5513 break; 5514 case OP_PUTROOTFH: 5515 if (!xdr_PUTROOTFH4res(xdrs, 5516 &objp->nfs_resop4_u.opputrootfh)) 5517 return (FALSE); 5518 break; 5519 case OP_READ: 5520 if (!xdr_READ4res(xdrs, &objp->nfs_resop4_u.opread)) 5521 return (FALSE); 5522 break; 5523 case OP_READDIR: 5524 if (!xdr_READDIR4res(xdrs, 5525 &objp->nfs_resop4_u.opreaddir)) 5526 return (FALSE); 5527 break; 5528 case OP_READLINK: 5529 if (!xdr_READLINK4res(xdrs, 5530 &objp->nfs_resop4_u.opreadlink)) 5531 return (FALSE); 5532 break; 5533 case OP_REMOVE: 5534 if (!xdr_REMOVE4res(xdrs, &objp->nfs_resop4_u.opremove)) 5535 return (FALSE); 5536 break; 5537 case OP_RENAME: 5538 if (!xdr_RENAME4res(xdrs, &objp->nfs_resop4_u.oprename)) 5539 return (FALSE); 5540 break; 5541 case OP_RENEW: 5542 if (!xdr_RENEW4res(xdrs, &objp->nfs_resop4_u.oprenew)) 5543 return (FALSE); 5544 break; 5545 case OP_RESTOREFH: 5546 if (!xdr_RESTOREFH4res(xdrs, 5547 &objp->nfs_resop4_u.oprestorefh)) 5548 return (FALSE); 5549 break; 5550 case OP_SAVEFH: 5551 if (!xdr_SAVEFH4res(xdrs, &objp->nfs_resop4_u.opsavefh)) 5552 return (FALSE); 5553 break; 5554 case OP_SECINFO: 5555 if (!xdr_SECINFO4res(xdrs, 5556 &objp->nfs_resop4_u.opsecinfo)) 5557 return (FALSE); 5558 break; 5559 case OP_SETATTR: 5560 if (!xdr_SETATTR4res(xdrs, 5561 &objp->nfs_resop4_u.opsetattr)) 5562 return (FALSE); 5563 break; 5564 case OP_SETCLIENTID: 5565 if (!xdr_SETCLIENTID4res(xdrs, 5566 &objp->nfs_resop4_u.opsetclientid)) 5567 return (FALSE); 5568 break; 5569 case OP_SETCLIENTID_CONFIRM: 5570 if (!xdr_SETCLIENTID_CONFIRM4res(xdrs, 5571 &objp->nfs_resop4_u.opsetclientid_confirm)) 5572 return (FALSE); 5573 break; 5574 case OP_VERIFY: 5575 if (!xdr_VERIFY4res(xdrs, &objp->nfs_resop4_u.opverify)) 5576 return (FALSE); 5577 break; 5578 case OP_WRITE: 5579 if (!xdr_WRITE4res(xdrs, &objp->nfs_resop4_u.opwrite)) 5580 return (FALSE); 5581 break; 5582 case OP_RELEASE_LOCKOWNER: 5583 if (!xdr_RELEASE_LOCKOWNER4res(xdrs, 5584 &objp->nfs_resop4_u.oprelease_lockowner)) 5585 return (FALSE); 5586 break; 5587 case OP_BACKCHANNEL_CTL: 5588 if (!xdr_BACKCHANNEL_CTL4res(xdrs, 5589 &objp->nfs_resop4_u.opbackchannel_ctl)) 5590 return (FALSE); 5591 break; 5592 case OP_BIND_CONN_TO_SESSION: 5593 if (!xdr_BIND_CONN_TO_SESSION4res(xdrs, 5594 &objp->nfs_resop4_u.opbind_conn_to_session)) 5595 return (FALSE); 5596 break; 5597 case OP_EXCHANGE_ID: 5598 if (!xdr_EXCHANGE_ID4res(xdrs, 5599 &objp->nfs_resop4_u.opexchange_id)) 5600 return (FALSE); 5601 break; 5602 case OP_CREATE_SESSION: 5603 if (!xdr_CREATE_SESSION4res(xdrs, 5604 &objp->nfs_resop4_u.opcreate_session)) 5605 return (FALSE); 5606 break; 5607 case OP_DESTROY_SESSION: 5608 if (!xdr_DESTROY_SESSION4res(xdrs, 5609 &objp->nfs_resop4_u.opdestroy_session)) 5610 return (FALSE); 5611 break; 5612 case OP_FREE_STATEID: 5613 if (!xdr_FREE_STATEID4res(xdrs, 5614 &objp->nfs_resop4_u.opfree_stateid)) 5615 return (FALSE); 5616 break; 5617 case OP_GET_DIR_DELEGATION: 5618 if (!xdr_GET_DIR_DELEGATION4res(xdrs, 5619 &objp->nfs_resop4_u.opget_dir_delegation)) 5620 return (FALSE); 5621 break; 5622 case OP_GETDEVICEINFO: 5623 if (!xdr_GETDEVICEINFO4res(xdrs, 5624 &objp->nfs_resop4_u.opgetdeviceinfo)) 5625 return (FALSE); 5626 break; 5627 case OP_GETDEVICELIST: 5628 if (!xdr_GETDEVICELIST4res(xdrs, 5629 &objp->nfs_resop4_u.opgetdevicelist)) 5630 return (FALSE); 5631 break; 5632 case OP_LAYOUTCOMMIT: 5633 if (!xdr_LAYOUTCOMMIT4res(xdrs, 5634 &objp->nfs_resop4_u.oplayoutcommit)) 5635 return (FALSE); 5636 break; 5637 case OP_LAYOUTGET: 5638 if (!xdr_LAYOUTGET4res(xdrs, 5639 &objp->nfs_resop4_u.oplayoutget)) 5640 return (FALSE); 5641 break; 5642 case OP_LAYOUTRETURN: 5643 if (!xdr_LAYOUTRETURN4res(xdrs, 5644 &objp->nfs_resop4_u.oplayoutreturn)) 5645 return (FALSE); 5646 break; 5647 case OP_SECINFO_NO_NAME: 5648 if (!xdr_SECINFO_NO_NAME4res(xdrs, 5649 &objp->nfs_resop4_u.opsecinfo_no_name)) 5650 return (FALSE); 5651 break; 5652 case OP_SEQUENCE: 5653 if (!xdr_SEQUENCE4res(xdrs, 5654 &objp->nfs_resop4_u.opsequence)) 5655 return (FALSE); 5656 break; 5657 case OP_SET_SSV: 5658 if (!xdr_SET_SSV4res(xdrs, 5659 &objp->nfs_resop4_u.opset_ssv)) 5660 return (FALSE); 5661 break; 5662 case OP_TEST_STATEID: 5663 if (!xdr_TEST_STATEID4res(xdrs, 5664 &objp->nfs_resop4_u.optest_stateid)) 5665 return (FALSE); 5666 break; 5667 case OP_WANT_DELEGATION: 5668 if (!xdr_WANT_DELEGATION4res(xdrs, 5669 &objp->nfs_resop4_u.opwant_delegation)) 5670 return (FALSE); 5671 break; 5672 case OP_DESTROY_CLIENTID: 5673 if (!xdr_DESTROY_CLIENTID4res(xdrs, 5674 &objp->nfs_resop4_u.opdestroy_clientid)) 5675 return (FALSE); 5676 break; 5677 case OP_RECLAIM_COMPLETE: 5678 if (!xdr_RECLAIM_COMPLETE4res(xdrs, 5679 &objp->nfs_resop4_u.opreclaim_complete)) 5680 return (FALSE); 5681 break; 5682 case OP_ILLEGAL: 5683 if (!xdr_ILLEGAL4res(xdrs, 5684 &objp->nfs_resop4_u.opillegal)) 5685 return (FALSE); 5686 break; 5687 default: 5688 return (FALSE); 5689 } 5690 return (TRUE); 5691 } 5692 5693 bool_t 5694 xdr_COMPOUND4args(XDR *xdrs, COMPOUND4args *objp) 5695 { 5696 5697 rpc_inline_t *buf; 5698 5699 if (!xdr_utf8str_cs(xdrs, &objp->tag)) 5700 return (FALSE); 5701 if (!xdr_uint32_t(xdrs, &objp->minorversion)) 5702 return (FALSE); 5703 if (!xdr_array(xdrs, (char **)&objp->argarray.argarray_val, 5704 (uint_t *)&objp->argarray.argarray_len, ~0, 5705 sizeof (nfs_argop4), (xdrproc_t)xdr_nfs_argop4)) 5706 return (FALSE); 5707 return (TRUE); 5708 } 5709 5710 bool_t 5711 xdr_COMPOUND4res(XDR *xdrs, COMPOUND4res *objp) 5712 { 5713 5714 rpc_inline_t *buf; 5715 5716 if (!xdr_nfsstat4(xdrs, &objp->status)) 5717 return (FALSE); 5718 if (!xdr_utf8str_cs(xdrs, &objp->tag)) 5719 return (FALSE); 5720 if (!xdr_array(xdrs, (char **)&objp->resarray.resarray_val, 5721 (uint_t *)&objp->resarray.resarray_len, ~0, 5722 sizeof (nfs_resop4), (xdrproc_t)xdr_nfs_resop4)) 5723 return (FALSE); 5724 return (TRUE); 5725 } 5726 5727 bool_t 5728 xdr_CB_GETATTR4args(XDR *xdrs, CB_GETATTR4args *objp) 5729 { 5730 5731 rpc_inline_t *buf; 5732 5733 if (!xdr_nfs_fh4(xdrs, &objp->fh)) 5734 return (FALSE); 5735 if (!xdr_bitmap4(xdrs, &objp->attr_request)) 5736 return (FALSE); 5737 return (TRUE); 5738 } 5739 5740 bool_t 5741 xdr_CB_GETATTR4resok(XDR *xdrs, CB_GETATTR4resok *objp) 5742 { 5743 5744 rpc_inline_t *buf; 5745 5746 if (!xdr_fattr4(xdrs, &objp->obj_attributes)) 5747 return (FALSE); 5748 return (TRUE); 5749 } 5750 5751 bool_t 5752 xdr_CB_GETATTR4res(XDR *xdrs, CB_GETATTR4res *objp) 5753 { 5754 5755 rpc_inline_t *buf; 5756 5757 if (!xdr_nfsstat4(xdrs, &objp->status)) 5758 return (FALSE); 5759 switch (objp->status) { 5760 case NFS4_OK: 5761 if (!xdr_CB_GETATTR4resok(xdrs, &objp->CB_GETATTR4res_u.resok4)) 5762 return (FALSE); 5763 break; 5764 } 5765 return (TRUE); 5766 } 5767 5768 bool_t 5769 xdr_CB_RECALL4args(XDR *xdrs, CB_RECALL4args *objp) 5770 { 5771 5772 rpc_inline_t *buf; 5773 5774 if (!xdr_stateid4(xdrs, &objp->stateid)) 5775 return (FALSE); 5776 if (!xdr_bool(xdrs, &objp->truncate)) 5777 return (FALSE); 5778 if (!xdr_nfs_fh4(xdrs, &objp->fh)) 5779 return (FALSE); 5780 return (TRUE); 5781 } 5782 5783 bool_t 5784 xdr_CB_RECALL4res(XDR *xdrs, CB_RECALL4res *objp) 5785 { 5786 5787 rpc_inline_t *buf; 5788 5789 if (!xdr_nfsstat4(xdrs, &objp->status)) 5790 return (FALSE); 5791 return (TRUE); 5792 } 5793 5794 bool_t 5795 xdr_CB_ILLEGAL4res(XDR *xdrs, CB_ILLEGAL4res *objp) 5796 { 5797 5798 rpc_inline_t *buf; 5799 5800 if (!xdr_nfsstat4(xdrs, &objp->status)) 5801 return (FALSE); 5802 return (TRUE); 5803 } 5804 5805 bool_t 5806 xdr_layoutrecall_type4(XDR *xdrs, layoutrecall_type4 *objp) 5807 { 5808 5809 rpc_inline_t *buf; 5810 5811 if (!xdr_enum(xdrs, (enum_t *)objp)) 5812 return (FALSE); 5813 return (TRUE); 5814 } 5815 5816 bool_t 5817 xdr_layoutrecall_file4(XDR *xdrs, layoutrecall_file4 *objp) 5818 { 5819 5820 rpc_inline_t *buf; 5821 5822 if (!xdr_nfs_fh4(xdrs, &objp->lor_fh)) 5823 return (FALSE); 5824 if (!xdr_offset4(xdrs, &objp->lor_offset)) 5825 return (FALSE); 5826 if (!xdr_length4(xdrs, &objp->lor_length)) 5827 return (FALSE); 5828 if (!xdr_stateid4(xdrs, &objp->lor_stateid)) 5829 return (FALSE); 5830 return (TRUE); 5831 } 5832 5833 bool_t 5834 xdr_layoutrecall4(XDR *xdrs, layoutrecall4 *objp) 5835 { 5836 5837 rpc_inline_t *buf; 5838 5839 if (!xdr_layoutrecall_type4(xdrs, &objp->lor_recalltype)) 5840 return (FALSE); 5841 switch (objp->lor_recalltype) { 5842 case LAYOUTRECALL4_FILE: 5843 if (!xdr_layoutrecall_file4(xdrs, 5844 &objp->layoutrecall4_u.lor_layout)) 5845 return (FALSE); 5846 break; 5847 case LAYOUTRECALL4_FSID: 5848 if (!xdr_fsid4(xdrs, &objp->layoutrecall4_u.lor_fsid)) 5849 return (FALSE); 5850 break; 5851 case LAYOUTRECALL4_ALL: 5852 break; 5853 default: 5854 return (FALSE); 5855 } 5856 return (TRUE); 5857 } 5858 5859 bool_t 5860 xdr_CB_LAYOUTRECALL4args(XDR *xdrs, CB_LAYOUTRECALL4args *objp) 5861 { 5862 5863 rpc_inline_t *buf; 5864 5865 if (!xdr_layouttype4(xdrs, &objp->clora_type)) 5866 return (FALSE); 5867 if (!xdr_layoutiomode4(xdrs, &objp->clora_iomode)) 5868 return (FALSE); 5869 if (!xdr_bool(xdrs, &objp->clora_changed)) 5870 return (FALSE); 5871 if (!xdr_layoutrecall4(xdrs, &objp->clora_recall)) 5872 return (FALSE); 5873 return (TRUE); 5874 } 5875 5876 bool_t 5877 xdr_CB_LAYOUTRECALL4res(XDR *xdrs, CB_LAYOUTRECALL4res *objp) 5878 { 5879 5880 rpc_inline_t *buf; 5881 5882 if (!xdr_nfsstat4(xdrs, &objp->clorr_status)) 5883 return (FALSE); 5884 return (TRUE); 5885 } 5886 5887 bool_t 5888 xdr_notify_type4(XDR *xdrs, notify_type4 *objp) 5889 { 5890 5891 rpc_inline_t *buf; 5892 5893 if (!xdr_enum(xdrs, (enum_t *)objp)) 5894 return (FALSE); 5895 return (TRUE); 5896 } 5897 5898 bool_t 5899 xdr_notify_entry4(XDR *xdrs, notify_entry4 *objp) 5900 { 5901 5902 rpc_inline_t *buf; 5903 5904 if (!xdr_component4(xdrs, &objp->ne_file)) 5905 return (FALSE); 5906 if (!xdr_fattr4(xdrs, &objp->ne_attrs)) 5907 return (FALSE); 5908 return (TRUE); 5909 } 5910 5911 bool_t 5912 xdr_prev_entry4(XDR *xdrs, prev_entry4 *objp) 5913 { 5914 5915 rpc_inline_t *buf; 5916 5917 if (!xdr_notify_entry4(xdrs, &objp->pe_prev_entry)) 5918 return (FALSE); 5919 if (!xdr_nfs_cookie4(xdrs, &objp->pe_prev_entry_cookie)) 5920 return (FALSE); 5921 return (TRUE); 5922 } 5923 5924 bool_t 5925 xdr_notify_remove4(XDR *xdrs, notify_remove4 *objp) 5926 { 5927 5928 rpc_inline_t *buf; 5929 5930 if (!xdr_notify_entry4(xdrs, &objp->nrm_old_entry)) 5931 return (FALSE); 5932 if (!xdr_nfs_cookie4(xdrs, &objp->nrm_old_entry_cookie)) 5933 return (FALSE); 5934 return (TRUE); 5935 } 5936 5937 bool_t 5938 xdr_notify_add4(XDR *xdrs, notify_add4 *objp) 5939 { 5940 5941 rpc_inline_t *buf; 5942 5943 if (!xdr_array(xdrs, (char **)&objp->nad_old_entry.nad_old_entry_val, 5944 (uint_t *)&objp->nad_old_entry.nad_old_entry_len, 1, 5945 sizeof (notify_remove4), (xdrproc_t)xdr_notify_remove4)) 5946 return (FALSE); 5947 if (!xdr_notify_entry4(xdrs, &objp->nad_new_entry)) 5948 return (FALSE); 5949 if (!xdr_array(xdrs, 5950 (char **)&objp->nad_new_entry_cookie.nad_new_entry_cookie_val, 5951 (uint_t *)&objp->nad_new_entry_cookie.nad_new_entry_cookie_len, 1, 5952 sizeof (nfs_cookie4), (xdrproc_t)xdr_nfs_cookie4)) 5953 return (FALSE); 5954 if (!xdr_array(xdrs, (char **)&objp->nad_prev_entry.nad_prev_entry_val, 5955 (uint_t *)&objp->nad_prev_entry.nad_prev_entry_len, 1, 5956 sizeof (prev_entry4), (xdrproc_t)xdr_prev_entry4)) 5957 return (FALSE); 5958 if (!xdr_bool(xdrs, &objp->nad_last_entry)) 5959 return (FALSE); 5960 return (TRUE); 5961 } 5962 5963 bool_t 5964 xdr_notify_attr4(XDR *xdrs, notify_attr4 *objp) 5965 { 5966 5967 rpc_inline_t *buf; 5968 5969 if (!xdr_notify_entry4(xdrs, &objp->na_changed_entry)) 5970 return (FALSE); 5971 return (TRUE); 5972 } 5973 5974 bool_t 5975 xdr_notify_rename4(XDR *xdrs, notify_rename4 *objp) 5976 { 5977 5978 rpc_inline_t *buf; 5979 5980 if (!xdr_notify_remove4(xdrs, &objp->nrn_old_entry)) 5981 return (FALSE); 5982 if (!xdr_notify_add4(xdrs, &objp->nrn_new_entry)) 5983 return (FALSE); 5984 return (TRUE); 5985 } 5986 5987 bool_t 5988 xdr_notify_verifier4(XDR *xdrs, notify_verifier4 *objp) 5989 { 5990 5991 rpc_inline_t *buf; 5992 5993 if (!xdr_verifier4(xdrs, objp->nv_old_cookieverf)) 5994 return (FALSE); 5995 if (!xdr_verifier4(xdrs, objp->nv_new_cookieverf)) 5996 return (FALSE); 5997 return (TRUE); 5998 } 5999 6000 bool_t 6001 xdr_notifylist4(XDR *xdrs, notifylist4 *objp) 6002 { 6003 6004 rpc_inline_t *buf; 6005 6006 if (!xdr_bytes(xdrs, (char **)&objp->notifylist4_val, 6007 (uint_t *)&objp->notifylist4_len, ~0)) 6008 return (FALSE); 6009 return (TRUE); 6010 } 6011 6012 bool_t 6013 xdr_notify4(XDR *xdrs, notify4 *objp) 6014 { 6015 6016 rpc_inline_t *buf; 6017 6018 if (!xdr_bitmap4(xdrs, &objp->notify_mask)) 6019 return (FALSE); 6020 if (!xdr_notifylist4(xdrs, &objp->notify_vals)) 6021 return (FALSE); 6022 return (TRUE); 6023 } 6024 6025 bool_t 6026 xdr_CB_NOTIFY4args(XDR *xdrs, CB_NOTIFY4args *objp) 6027 { 6028 6029 rpc_inline_t *buf; 6030 6031 if (!xdr_stateid4(xdrs, &objp->cna_stateid)) 6032 return (FALSE); 6033 if (!xdr_nfs_fh4(xdrs, &objp->cna_fh)) 6034 return (FALSE); 6035 if (!xdr_array(xdrs, (char **)&objp->cna_changes.cna_changes_val, 6036 (uint_t *)&objp->cna_changes.cna_changes_len, ~0, 6037 sizeof (notify4), (xdrproc_t)xdr_notify4)) 6038 return (FALSE); 6039 return (TRUE); 6040 } 6041 6042 bool_t 6043 xdr_CB_NOTIFY4res(XDR *xdrs, CB_NOTIFY4res *objp) 6044 { 6045 6046 rpc_inline_t *buf; 6047 6048 if (!xdr_nfsstat4(xdrs, &objp->cnr_status)) 6049 return (FALSE); 6050 return (TRUE); 6051 } 6052 6053 bool_t 6054 xdr_CB_PUSH_DELEG4args(XDR *xdrs, CB_PUSH_DELEG4args *objp) 6055 { 6056 6057 rpc_inline_t *buf; 6058 6059 if (!xdr_nfs_fh4(xdrs, &objp->cpda_fh)) 6060 return (FALSE); 6061 if (!xdr_open_delegation4(xdrs, &objp->cpda_delegation)) 6062 return (FALSE); 6063 return (TRUE); 6064 } 6065 6066 bool_t 6067 xdr_CB_PUSH_DELEG4res(XDR *xdrs, CB_PUSH_DELEG4res *objp) 6068 { 6069 6070 rpc_inline_t *buf; 6071 6072 if (!xdr_nfsstat4(xdrs, &objp->cpdr_status)) 6073 return (FALSE); 6074 return (TRUE); 6075 } 6076 6077 bool_t 6078 xdr_CB_RECALL_ANY4args(XDR *xdrs, CB_RECALL_ANY4args *objp) 6079 { 6080 6081 rpc_inline_t *buf; 6082 6083 if (!xdr_uint32_t(xdrs, &objp->craa_objects_to_keep)) 6084 return (FALSE); 6085 if (!xdr_bitmap4(xdrs, &objp->craa_type_mask)) 6086 return (FALSE); 6087 return (TRUE); 6088 } 6089 6090 bool_t 6091 xdr_CB_RECALL_ANY4res(XDR *xdrs, CB_RECALL_ANY4res *objp) 6092 { 6093 6094 rpc_inline_t *buf; 6095 6096 if (!xdr_nfsstat4(xdrs, &objp->crar_status)) 6097 return (FALSE); 6098 return (TRUE); 6099 } 6100 6101 bool_t 6102 xdr_CB_RECALLABLE_OBJ_AVAIL4args(XDR *xdrs, CB_RECALLABLE_OBJ_AVAIL4args *objp) 6103 { 6104 6105 rpc_inline_t *buf; 6106 6107 if (!xdr_CB_RECALL_ANY4args(xdrs, objp)) 6108 return (FALSE); 6109 return (TRUE); 6110 } 6111 6112 bool_t 6113 xdr_CB_RECALLABLE_OBJ_AVAIL4res(XDR *xdrs, CB_RECALLABLE_OBJ_AVAIL4res *objp) 6114 { 6115 6116 rpc_inline_t *buf; 6117 6118 if (!xdr_nfsstat4(xdrs, &objp->croa_status)) 6119 return (FALSE); 6120 return (TRUE); 6121 } 6122 6123 bool_t 6124 xdr_CB_RECALL_SLOT4args(XDR *xdrs, CB_RECALL_SLOT4args *objp) 6125 { 6126 6127 rpc_inline_t *buf; 6128 6129 if (!xdr_slotid4(xdrs, &objp->rsa_target_highest_slotid)) 6130 return (FALSE); 6131 return (TRUE); 6132 } 6133 6134 bool_t 6135 xdr_CB_RECALL_SLOT4res(XDR *xdrs, CB_RECALL_SLOT4res *objp) 6136 { 6137 6138 rpc_inline_t *buf; 6139 6140 if (!xdr_nfsstat4(xdrs, &objp->rsr_status)) 6141 return (FALSE); 6142 return (TRUE); 6143 } 6144 6145 bool_t 6146 xdr_referring_call4(XDR *xdrs, referring_call4 *objp) 6147 { 6148 6149 rpc_inline_t *buf; 6150 6151 if (!xdr_sequenceid4(xdrs, &objp->rc_sequenceid)) 6152 return (FALSE); 6153 if (!xdr_slotid4(xdrs, &objp->rc_slotid)) 6154 return (FALSE); 6155 return (TRUE); 6156 } 6157 6158 bool_t 6159 xdr_referring_call_list4(XDR *xdrs, referring_call_list4 *objp) 6160 { 6161 6162 rpc_inline_t *buf; 6163 6164 if (!xdr_sessionid4(xdrs, objp->rcl_sessionid)) 6165 return (FALSE); 6166 if (!xdr_array(xdrs, 6167 (char **)&objp->rcl_referring_calls.rcl_referring_calls_val, 6168 (uint_t *)&objp->rcl_referring_calls.rcl_referring_calls_len, ~0, 6169 sizeof (referring_call4), (xdrproc_t)xdr_referring_call4)) 6170 return (FALSE); 6171 return (TRUE); 6172 } 6173 6174 bool_t 6175 xdr_CB_SEQUENCE4args(XDR *xdrs, CB_SEQUENCE4args *objp) 6176 { 6177 6178 rpc_inline_t *buf; 6179 6180 if (!xdr_sessionid4(xdrs, objp->csa_sessionid)) 6181 return (FALSE); 6182 if (!xdr_sequenceid4(xdrs, &objp->csa_sequenceid)) 6183 return (FALSE); 6184 if (!xdr_slotid4(xdrs, &objp->csa_slotid)) 6185 return (FALSE); 6186 if (!xdr_slotid4(xdrs, &objp->csa_highest_slotid)) 6187 return (FALSE); 6188 if (!xdr_bool(xdrs, &objp->csa_cachethis)) 6189 return (FALSE); 6190 if (!xdr_array(xdrs, 6191 (char **)&objp->csa_referring_call_lists. 6192 csa_referring_call_lists_val, 6193 (uint_t *)&objp->csa_referring_call_lists. 6194 csa_referring_call_lists_len, 6195 ~0, 6196 sizeof (referring_call_list4), (xdrproc_t)xdr_referring_call_list4)) 6197 return (FALSE); 6198 return (TRUE); 6199 } 6200 6201 bool_t 6202 xdr_CB_SEQUENCE4resok(XDR *xdrs, CB_SEQUENCE4resok *objp) 6203 { 6204 6205 rpc_inline_t *buf; 6206 6207 if (!xdr_sessionid4(xdrs, objp->csr_sessionid)) 6208 return (FALSE); 6209 if (!xdr_sequenceid4(xdrs, &objp->csr_sequenceid)) 6210 return (FALSE); 6211 if (!xdr_slotid4(xdrs, &objp->csr_slotid)) 6212 return (FALSE); 6213 if (!xdr_slotid4(xdrs, &objp->csr_highest_slotid)) 6214 return (FALSE); 6215 if (!xdr_slotid4(xdrs, &objp->csr_target_highest_slotid)) 6216 return (FALSE); 6217 return (TRUE); 6218 } 6219 6220 bool_t 6221 xdr_CB_SEQUENCE4res(XDR *xdrs, CB_SEQUENCE4res *objp) 6222 { 6223 6224 rpc_inline_t *buf; 6225 6226 if (!xdr_nfsstat4(xdrs, &objp->csr_status)) 6227 return (FALSE); 6228 switch (objp->csr_status) { 6229 case NFS4_OK: 6230 if (!xdr_CB_SEQUENCE4resok(xdrs, 6231 &objp->CB_SEQUENCE4res_u.csr_resok4)) 6232 return (FALSE); 6233 break; 6234 } 6235 return (TRUE); 6236 } 6237 6238 bool_t 6239 xdr_CB_WANTS_CANCELLED4args(XDR *xdrs, CB_WANTS_CANCELLED4args *objp) 6240 { 6241 6242 rpc_inline_t *buf; 6243 6244 if (!xdr_bool(xdrs, &objp->cwca_contended_wants_cancelled)) 6245 return (FALSE); 6246 if (!xdr_bool(xdrs, &objp->cwca_resourced_wants_cancelled)) 6247 return (FALSE); 6248 return (TRUE); 6249 } 6250 6251 bool_t 6252 xdr_CB_WANTS_CANCELLED4res(XDR *xdrs, CB_WANTS_CANCELLED4res *objp) 6253 { 6254 6255 rpc_inline_t *buf; 6256 6257 if (!xdr_nfsstat4(xdrs, &objp->cwcr_status)) 6258 return (FALSE); 6259 return (TRUE); 6260 } 6261 6262 bool_t 6263 xdr_CB_NOTIFY_LOCK4args(XDR *xdrs, CB_NOTIFY_LOCK4args *objp) 6264 { 6265 6266 rpc_inline_t *buf; 6267 6268 if (!xdr_nfs_fh4(xdrs, &objp->cnla_fh)) 6269 return (FALSE); 6270 if (!xdr_lock_owner4(xdrs, &objp->cnla_lock_owner)) 6271 return (FALSE); 6272 return (TRUE); 6273 } 6274 6275 bool_t 6276 xdr_CB_NOTIFY_LOCK4res(XDR *xdrs, CB_NOTIFY_LOCK4res *objp) 6277 { 6278 6279 rpc_inline_t *buf; 6280 6281 if (!xdr_nfsstat4(xdrs, &objp->cnlr_status)) 6282 return (FALSE); 6283 return (TRUE); 6284 } 6285 6286 bool_t 6287 xdr_notify_deviceid_type4(XDR *xdrs, notify_deviceid_type4 *objp) 6288 { 6289 6290 rpc_inline_t *buf; 6291 6292 if (!xdr_enum(xdrs, (enum_t *)objp)) 6293 return (FALSE); 6294 return (TRUE); 6295 } 6296 6297 bool_t 6298 xdr_notify_deviceid_delete4(XDR *xdrs, notify_deviceid_delete4 *objp) 6299 { 6300 6301 rpc_inline_t *buf; 6302 6303 if (!xdr_layouttype4(xdrs, &objp->ndd_layouttype)) 6304 return (FALSE); 6305 if (!xdr_deviceid4(xdrs, objp->ndd_deviceid)) 6306 return (FALSE); 6307 return (TRUE); 6308 } 6309 6310 bool_t 6311 xdr_notify_deviceid_change4(XDR *xdrs, notify_deviceid_change4 *objp) 6312 { 6313 6314 rpc_inline_t *buf; 6315 6316 if (!xdr_layouttype4(xdrs, &objp->ndc_layouttype)) 6317 return (FALSE); 6318 if (!xdr_deviceid4(xdrs, objp->ndc_deviceid)) 6319 return (FALSE); 6320 if (!xdr_bool(xdrs, &objp->ndc_immediate)) 6321 return (FALSE); 6322 return (TRUE); 6323 } 6324 6325 bool_t 6326 xdr_CB_NOTIFY_DEVICEID4args(XDR *xdrs, CB_NOTIFY_DEVICEID4args *objp) 6327 { 6328 6329 rpc_inline_t *buf; 6330 6331 if (!xdr_array(xdrs, (char **)&objp->cnda_changes.cnda_changes_val, 6332 (uint_t *)&objp->cnda_changes.cnda_changes_len, ~0, 6333 sizeof (notify4), (xdrproc_t)xdr_notify4)) 6334 return (FALSE); 6335 return (TRUE); 6336 } 6337 6338 bool_t 6339 xdr_CB_NOTIFY_DEVICEID4res(XDR *xdrs, CB_NOTIFY_DEVICEID4res *objp) 6340 { 6341 6342 rpc_inline_t *buf; 6343 6344 if (!xdr_nfsstat4(xdrs, &objp->cndr_status)) 6345 return (FALSE); 6346 return (TRUE); 6347 } 6348 6349 /* Callback operations new to NFSv4.1 */ 6350 6351 bool_t 6352 xdr_nfs_cb_opnum4(XDR *xdrs, nfs_cb_opnum4 *objp) 6353 { 6354 6355 rpc_inline_t *buf; 6356 6357 if (!xdr_enum(xdrs, (enum_t *)objp)) 6358 return (FALSE); 6359 return (TRUE); 6360 } 6361 6362 bool_t 6363 xdr_nfs_cb_argop4(XDR *xdrs, nfs_cb_argop4 *objp) 6364 { 6365 6366 rpc_inline_t *buf; 6367 6368 if (!xdr_u_int(xdrs, &objp->argop)) 6369 return (FALSE); 6370 switch (objp->argop) { 6371 case OP_CB_GETATTR: 6372 if (!xdr_CB_GETATTR4args(xdrs, 6373 &objp->nfs_cb_argop4_u.opcbgetattr)) 6374 return (FALSE); 6375 break; 6376 case OP_CB_RECALL: 6377 if (!xdr_CB_RECALL4args(xdrs, 6378 &objp->nfs_cb_argop4_u.opcbrecall)) 6379 return (FALSE); 6380 break; 6381 case OP_CB_LAYOUTRECALL: 6382 if (!xdr_CB_LAYOUTRECALL4args(xdrs, 6383 &objp->nfs_cb_argop4_u.opcblayoutrecall)) 6384 return (FALSE); 6385 break; 6386 case OP_CB_NOTIFY: 6387 if (!xdr_CB_NOTIFY4args(xdrs, 6388 &objp->nfs_cb_argop4_u.opcbnotify)) 6389 return (FALSE); 6390 break; 6391 case OP_CB_PUSH_DELEG: 6392 if (!xdr_CB_PUSH_DELEG4args(xdrs, 6393 &objp->nfs_cb_argop4_u.opcbpush_deleg)) 6394 return (FALSE); 6395 break; 6396 case OP_CB_RECALL_ANY: 6397 if (!xdr_CB_RECALL_ANY4args(xdrs, 6398 &objp->nfs_cb_argop4_u.opcbrecall_any)) 6399 return (FALSE); 6400 break; 6401 case OP_CB_RECALLABLE_OBJ_AVAIL: 6402 if (!xdr_CB_RECALLABLE_OBJ_AVAIL4args(xdrs, 6403 &objp->nfs_cb_argop4_u.opcbrecallable_obj_avail)) 6404 return (FALSE); 6405 break; 6406 case OP_CB_RECALL_SLOT: 6407 if (!xdr_CB_RECALL_SLOT4args(xdrs, 6408 &objp->nfs_cb_argop4_u.opcbrecall_slot)) 6409 return (FALSE); 6410 break; 6411 case OP_CB_SEQUENCE: 6412 if (!xdr_CB_SEQUENCE4args(xdrs, 6413 &objp->nfs_cb_argop4_u.opcbsequence)) 6414 return (FALSE); 6415 break; 6416 case OP_CB_WANTS_CANCELLED: 6417 if (!xdr_CB_WANTS_CANCELLED4args(xdrs, 6418 &objp->nfs_cb_argop4_u.opcbwants_cancelled)) 6419 return (FALSE); 6420 break; 6421 case OP_CB_NOTIFY_LOCK: 6422 if (!xdr_CB_NOTIFY_LOCK4args(xdrs, 6423 &objp->nfs_cb_argop4_u.opcbnotify_lock)) 6424 return (FALSE); 6425 break; 6426 case OP_CB_NOTIFY_DEVICEID: 6427 if (!xdr_CB_NOTIFY_DEVICEID4args(xdrs, 6428 &objp->nfs_cb_argop4_u.opcbnotify_deviceid)) 6429 return (FALSE); 6430 break; 6431 case OP_CB_ILLEGAL: 6432 break; 6433 default: 6434 return (FALSE); 6435 } 6436 return (TRUE); 6437 } 6438 6439 bool_t 6440 xdr_nfs_cb_resop4(XDR *xdrs, nfs_cb_resop4 *objp) 6441 { 6442 6443 rpc_inline_t *buf; 6444 6445 if (!xdr_u_int(xdrs, &objp->resop)) 6446 return (FALSE); 6447 switch (objp->resop) { 6448 case OP_CB_GETATTR: 6449 if (!xdr_CB_GETATTR4res(xdrs, 6450 &objp->nfs_cb_resop4_u.opcbgetattr)) 6451 return (FALSE); 6452 break; 6453 case OP_CB_RECALL: 6454 if (!xdr_CB_RECALL4res(xdrs, 6455 &objp->nfs_cb_resop4_u.opcbrecall)) 6456 return (FALSE); 6457 break; 6458 case OP_CB_LAYOUTRECALL: 6459 if (!xdr_CB_LAYOUTRECALL4res(xdrs, 6460 &objp->nfs_cb_resop4_u.opcblayoutrecall)) 6461 return (FALSE); 6462 break; 6463 case OP_CB_NOTIFY: 6464 if (!xdr_CB_NOTIFY4res(xdrs, 6465 &objp->nfs_cb_resop4_u.opcbnotify)) 6466 return (FALSE); 6467 break; 6468 case OP_CB_PUSH_DELEG: 6469 if (!xdr_CB_PUSH_DELEG4res(xdrs, 6470 &objp->nfs_cb_resop4_u.opcbpush_deleg)) 6471 return (FALSE); 6472 break; 6473 case OP_CB_RECALL_ANY: 6474 if (!xdr_CB_RECALL_ANY4res(xdrs, 6475 &objp->nfs_cb_resop4_u.opcbrecall_any)) 6476 return (FALSE); 6477 break; 6478 case OP_CB_RECALLABLE_OBJ_AVAIL: 6479 if (!xdr_CB_RECALLABLE_OBJ_AVAIL4res(xdrs, 6480 &objp->nfs_cb_resop4_u.opcbrecallable_obj_avail)) 6481 return (FALSE); 6482 break; 6483 case OP_CB_RECALL_SLOT: 6484 if (!xdr_CB_RECALL_SLOT4res(xdrs, 6485 &objp->nfs_cb_resop4_u.opcbrecall_slot)) 6486 return (FALSE); 6487 break; 6488 case OP_CB_SEQUENCE: 6489 if (!xdr_CB_SEQUENCE4res(xdrs, 6490 &objp->nfs_cb_resop4_u.opcbsequence)) 6491 return (FALSE); 6492 break; 6493 case OP_CB_WANTS_CANCELLED: 6494 if (!xdr_CB_WANTS_CANCELLED4res(xdrs, 6495 &objp->nfs_cb_resop4_u.opcbwants_cancelled)) 6496 return (FALSE); 6497 break; 6498 case OP_CB_NOTIFY_LOCK: 6499 if (!xdr_CB_NOTIFY_LOCK4res(xdrs, 6500 &objp->nfs_cb_resop4_u.opcbnotify_lock)) 6501 return (FALSE); 6502 break; 6503 case OP_CB_NOTIFY_DEVICEID: 6504 if (!xdr_CB_NOTIFY_DEVICEID4res(xdrs, 6505 &objp->nfs_cb_resop4_u.opcbnotify_deviceid)) 6506 return (FALSE); 6507 break; 6508 case OP_CB_ILLEGAL: 6509 if (!xdr_CB_ILLEGAL4res(xdrs, 6510 &objp->nfs_cb_resop4_u.opcbillegal)) 6511 return (FALSE); 6512 break; 6513 default: 6514 return (FALSE); 6515 } 6516 return (TRUE); 6517 } 6518 6519 bool_t 6520 xdr_CB_COMPOUND4args(XDR *xdrs, CB_COMPOUND4args *objp) 6521 { 6522 6523 rpc_inline_t *buf; 6524 6525 if (!xdr_utf8str_cs(xdrs, &objp->tag)) 6526 return (FALSE); 6527 if (!xdr_uint32_t(xdrs, &objp->minorversion)) 6528 return (FALSE); 6529 if (!xdr_uint32_t(xdrs, &objp->callback_ident)) 6530 return (FALSE); 6531 if (!xdr_array(xdrs, (char **)&objp->argarray.argarray_val, 6532 (uint_t *)&objp->argarray.argarray_len, ~0, 6533 sizeof (nfs_cb_argop4), (xdrproc_t)xdr_nfs_cb_argop4)) 6534 return (FALSE); 6535 return (TRUE); 6536 } 6537 6538 bool_t 6539 xdr_CB_COMPOUND4res(XDR *xdrs, CB_COMPOUND4res *objp) 6540 { 6541 6542 rpc_inline_t *buf; 6543 6544 if (!xdr_nfsstat4(xdrs, &objp->status)) 6545 return (FALSE); 6546 if (!xdr_utf8str_cs(xdrs, &objp->tag)) 6547 return (FALSE); 6548 if (!xdr_array(xdrs, (char **)&objp->resarray.resarray_val, 6549 (uint_t *)&objp->resarray.resarray_len, ~0, 6550 sizeof (nfs_cb_resop4), (xdrproc_t)xdr_nfs_cb_resop4)) 6551 return (FALSE); 6552 return (TRUE); 6553 } 6554