1 /* 2 * Please do not edit this file. 3 * It was generated using rpcgen. 4 */ 5 6 #include "/home/git3/dehawe/titanic_53/usr/src/head/rpcsvc/nfs_prot.h" 7 8 #ifndef _KERNEL 9 #include <stdlib.h> 10 #endif /* !_KERNEL */ 11 12 #pragma ident "%Z%%M% %I% %E% SMI" 13 14 bool_t 15 xdr_nfsstat(XDR *xdrs, nfsstat *objp) 16 { 17 18 rpc_inline_t *buf; 19 20 if (!xdr_enum(xdrs, (enum_t *)objp)) 21 return (FALSE); 22 return (TRUE); 23 } 24 25 bool_t 26 xdr_ftype(XDR *xdrs, ftype *objp) 27 { 28 29 rpc_inline_t *buf; 30 31 if (!xdr_enum(xdrs, (enum_t *)objp)) 32 return (FALSE); 33 return (TRUE); 34 } 35 36 bool_t 37 xdr_nfs_fh(XDR *xdrs, nfs_fh *objp) 38 { 39 40 rpc_inline_t *buf; 41 42 if (!xdr_opaque(xdrs, objp->data, NFS_FHSIZE)) 43 return (FALSE); 44 return (TRUE); 45 } 46 47 bool_t 48 xdr_nfstime(XDR *xdrs, nfstime *objp) 49 { 50 51 rpc_inline_t *buf; 52 53 if (!xdr_u_int(xdrs, &objp->seconds)) 54 return (FALSE); 55 if (!xdr_u_int(xdrs, &objp->useconds)) 56 return (FALSE); 57 return (TRUE); 58 } 59 60 bool_t 61 xdr_fattr(XDR *xdrs, fattr *objp) 62 { 63 64 rpc_inline_t *buf; 65 66 67 if (xdrs->x_op == XDR_ENCODE) { 68 if (!xdr_ftype(xdrs, &objp->type)) 69 return (FALSE); 70 buf = XDR_INLINE(xdrs, 10 * BYTES_PER_XDR_UNIT); 71 if (buf == NULL) { 72 if (!xdr_u_int(xdrs, &objp->mode)) 73 return (FALSE); 74 if (!xdr_u_int(xdrs, &objp->nlink)) 75 return (FALSE); 76 if (!xdr_u_int(xdrs, &objp->uid)) 77 return (FALSE); 78 if (!xdr_u_int(xdrs, &objp->gid)) 79 return (FALSE); 80 if (!xdr_u_int(xdrs, &objp->size)) 81 return (FALSE); 82 if (!xdr_u_int(xdrs, &objp->blocksize)) 83 return (FALSE); 84 if (!xdr_u_int(xdrs, &objp->rdev)) 85 return (FALSE); 86 if (!xdr_u_int(xdrs, &objp->blocks)) 87 return (FALSE); 88 if (!xdr_u_int(xdrs, &objp->fsid)) 89 return (FALSE); 90 if (!xdr_u_int(xdrs, &objp->fileid)) 91 return (FALSE); 92 } else { 93 #if defined(_LP64) || defined(_KERNEL) 94 IXDR_PUT_U_INT32(buf, objp->mode); 95 IXDR_PUT_U_INT32(buf, objp->nlink); 96 IXDR_PUT_U_INT32(buf, objp->uid); 97 IXDR_PUT_U_INT32(buf, objp->gid); 98 IXDR_PUT_U_INT32(buf, objp->size); 99 IXDR_PUT_U_INT32(buf, objp->blocksize); 100 IXDR_PUT_U_INT32(buf, objp->rdev); 101 IXDR_PUT_U_INT32(buf, objp->blocks); 102 IXDR_PUT_U_INT32(buf, objp->fsid); 103 IXDR_PUT_U_INT32(buf, objp->fileid); 104 #else 105 IXDR_PUT_U_LONG(buf, objp->mode); 106 IXDR_PUT_U_LONG(buf, objp->nlink); 107 IXDR_PUT_U_LONG(buf, objp->uid); 108 IXDR_PUT_U_LONG(buf, objp->gid); 109 IXDR_PUT_U_LONG(buf, objp->size); 110 IXDR_PUT_U_LONG(buf, objp->blocksize); 111 IXDR_PUT_U_LONG(buf, objp->rdev); 112 IXDR_PUT_U_LONG(buf, objp->blocks); 113 IXDR_PUT_U_LONG(buf, objp->fsid); 114 IXDR_PUT_U_LONG(buf, objp->fileid); 115 #endif 116 } 117 if (!xdr_nfstime(xdrs, &objp->atime)) 118 return (FALSE); 119 if (!xdr_nfstime(xdrs, &objp->mtime)) 120 return (FALSE); 121 if (!xdr_nfstime(xdrs, &objp->ctime)) 122 return (FALSE); 123 return (TRUE); 124 } else if (xdrs->x_op == XDR_DECODE) { 125 if (!xdr_ftype(xdrs, &objp->type)) 126 return (FALSE); 127 buf = XDR_INLINE(xdrs, 10 * BYTES_PER_XDR_UNIT); 128 if (buf == NULL) { 129 if (!xdr_u_int(xdrs, &objp->mode)) 130 return (FALSE); 131 if (!xdr_u_int(xdrs, &objp->nlink)) 132 return (FALSE); 133 if (!xdr_u_int(xdrs, &objp->uid)) 134 return (FALSE); 135 if (!xdr_u_int(xdrs, &objp->gid)) 136 return (FALSE); 137 if (!xdr_u_int(xdrs, &objp->size)) 138 return (FALSE); 139 if (!xdr_u_int(xdrs, &objp->blocksize)) 140 return (FALSE); 141 if (!xdr_u_int(xdrs, &objp->rdev)) 142 return (FALSE); 143 if (!xdr_u_int(xdrs, &objp->blocks)) 144 return (FALSE); 145 if (!xdr_u_int(xdrs, &objp->fsid)) 146 return (FALSE); 147 if (!xdr_u_int(xdrs, &objp->fileid)) 148 return (FALSE); 149 } else { 150 #if defined(_LP64) || defined(_KERNEL) 151 objp->mode = IXDR_GET_U_INT32(buf); 152 objp->nlink = IXDR_GET_U_INT32(buf); 153 objp->uid = IXDR_GET_U_INT32(buf); 154 objp->gid = IXDR_GET_U_INT32(buf); 155 objp->size = IXDR_GET_U_INT32(buf); 156 objp->blocksize = IXDR_GET_U_INT32(buf); 157 objp->rdev = IXDR_GET_U_INT32(buf); 158 objp->blocks = IXDR_GET_U_INT32(buf); 159 objp->fsid = IXDR_GET_U_INT32(buf); 160 objp->fileid = IXDR_GET_U_INT32(buf); 161 #else 162 objp->mode = IXDR_GET_U_LONG(buf); 163 objp->nlink = IXDR_GET_U_LONG(buf); 164 objp->uid = IXDR_GET_U_LONG(buf); 165 objp->gid = IXDR_GET_U_LONG(buf); 166 objp->size = IXDR_GET_U_LONG(buf); 167 objp->blocksize = IXDR_GET_U_LONG(buf); 168 objp->rdev = IXDR_GET_U_LONG(buf); 169 objp->blocks = IXDR_GET_U_LONG(buf); 170 objp->fsid = IXDR_GET_U_LONG(buf); 171 objp->fileid = IXDR_GET_U_LONG(buf); 172 #endif 173 } 174 if (!xdr_nfstime(xdrs, &objp->atime)) 175 return (FALSE); 176 if (!xdr_nfstime(xdrs, &objp->mtime)) 177 return (FALSE); 178 if (!xdr_nfstime(xdrs, &objp->ctime)) 179 return (FALSE); 180 return (TRUE); 181 } 182 183 if (!xdr_ftype(xdrs, &objp->type)) 184 return (FALSE); 185 if (!xdr_u_int(xdrs, &objp->mode)) 186 return (FALSE); 187 if (!xdr_u_int(xdrs, &objp->nlink)) 188 return (FALSE); 189 if (!xdr_u_int(xdrs, &objp->uid)) 190 return (FALSE); 191 if (!xdr_u_int(xdrs, &objp->gid)) 192 return (FALSE); 193 if (!xdr_u_int(xdrs, &objp->size)) 194 return (FALSE); 195 if (!xdr_u_int(xdrs, &objp->blocksize)) 196 return (FALSE); 197 if (!xdr_u_int(xdrs, &objp->rdev)) 198 return (FALSE); 199 if (!xdr_u_int(xdrs, &objp->blocks)) 200 return (FALSE); 201 if (!xdr_u_int(xdrs, &objp->fsid)) 202 return (FALSE); 203 if (!xdr_u_int(xdrs, &objp->fileid)) 204 return (FALSE); 205 if (!xdr_nfstime(xdrs, &objp->atime)) 206 return (FALSE); 207 if (!xdr_nfstime(xdrs, &objp->mtime)) 208 return (FALSE); 209 if (!xdr_nfstime(xdrs, &objp->ctime)) 210 return (FALSE); 211 return (TRUE); 212 } 213 214 bool_t 215 xdr_sattr(XDR *xdrs, sattr *objp) 216 { 217 218 rpc_inline_t *buf; 219 220 if (!xdr_u_int(xdrs, &objp->mode)) 221 return (FALSE); 222 if (!xdr_u_int(xdrs, &objp->uid)) 223 return (FALSE); 224 if (!xdr_u_int(xdrs, &objp->gid)) 225 return (FALSE); 226 if (!xdr_u_int(xdrs, &objp->size)) 227 return (FALSE); 228 if (!xdr_nfstime(xdrs, &objp->atime)) 229 return (FALSE); 230 if (!xdr_nfstime(xdrs, &objp->mtime)) 231 return (FALSE); 232 return (TRUE); 233 } 234 235 bool_t 236 xdr_filename(XDR *xdrs, filename *objp) 237 { 238 239 rpc_inline_t *buf; 240 241 if (!xdr_string(xdrs, objp, NFS_MAXNAMLEN)) 242 return (FALSE); 243 return (TRUE); 244 } 245 246 bool_t 247 xdr_nfspath(XDR *xdrs, nfspath *objp) 248 { 249 250 rpc_inline_t *buf; 251 252 if (!xdr_string(xdrs, objp, NFS_MAXPATHLEN)) 253 return (FALSE); 254 return (TRUE); 255 } 256 257 bool_t 258 xdr_attrstat(XDR *xdrs, attrstat *objp) 259 { 260 261 rpc_inline_t *buf; 262 263 if (!xdr_nfsstat(xdrs, &objp->status)) 264 return (FALSE); 265 switch (objp->status) { 266 case NFS_OK: 267 if (!xdr_fattr(xdrs, &objp->attrstat_u.attributes)) 268 return (FALSE); 269 break; 270 } 271 return (TRUE); 272 } 273 274 bool_t 275 xdr_sattrargs(XDR *xdrs, sattrargs *objp) 276 { 277 278 rpc_inline_t *buf; 279 280 if (!xdr_nfs_fh(xdrs, &objp->file)) 281 return (FALSE); 282 if (!xdr_sattr(xdrs, &objp->attributes)) 283 return (FALSE); 284 return (TRUE); 285 } 286 287 bool_t 288 xdr_diropargs(XDR *xdrs, diropargs *objp) 289 { 290 291 rpc_inline_t *buf; 292 293 if (!xdr_nfs_fh(xdrs, &objp->dir)) 294 return (FALSE); 295 if (!xdr_filename(xdrs, &objp->name)) 296 return (FALSE); 297 return (TRUE); 298 } 299 300 bool_t 301 xdr_diropokres(XDR *xdrs, diropokres *objp) 302 { 303 304 rpc_inline_t *buf; 305 306 if (!xdr_nfs_fh(xdrs, &objp->file)) 307 return (FALSE); 308 if (!xdr_fattr(xdrs, &objp->attributes)) 309 return (FALSE); 310 return (TRUE); 311 } 312 313 bool_t 314 xdr_diropres(XDR *xdrs, diropres *objp) 315 { 316 317 rpc_inline_t *buf; 318 319 if (!xdr_nfsstat(xdrs, &objp->status)) 320 return (FALSE); 321 switch (objp->status) { 322 case NFS_OK: 323 if (!xdr_diropokres(xdrs, &objp->diropres_u.diropres)) 324 return (FALSE); 325 break; 326 } 327 return (TRUE); 328 } 329 330 bool_t 331 xdr_readlinkres(XDR *xdrs, readlinkres *objp) 332 { 333 334 rpc_inline_t *buf; 335 336 if (!xdr_nfsstat(xdrs, &objp->status)) 337 return (FALSE); 338 switch (objp->status) { 339 case NFS_OK: 340 if (!xdr_nfspath(xdrs, &objp->readlinkres_u.data)) 341 return (FALSE); 342 break; 343 } 344 return (TRUE); 345 } 346 347 bool_t 348 xdr_readargs(XDR *xdrs, readargs *objp) 349 { 350 351 rpc_inline_t *buf; 352 353 if (!xdr_nfs_fh(xdrs, &objp->file)) 354 return (FALSE); 355 if (!xdr_u_int(xdrs, &objp->offset)) 356 return (FALSE); 357 if (!xdr_u_int(xdrs, &objp->count)) 358 return (FALSE); 359 if (!xdr_u_int(xdrs, &objp->totalcount)) 360 return (FALSE); 361 return (TRUE); 362 } 363 364 bool_t 365 xdr_readokres(XDR *xdrs, readokres *objp) 366 { 367 368 rpc_inline_t *buf; 369 370 if (!xdr_fattr(xdrs, &objp->attributes)) 371 return (FALSE); 372 if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS_MAXDATA)) 373 return (FALSE); 374 return (TRUE); 375 } 376 377 bool_t 378 xdr_readres(XDR *xdrs, readres *objp) 379 { 380 381 rpc_inline_t *buf; 382 383 if (!xdr_nfsstat(xdrs, &objp->status)) 384 return (FALSE); 385 switch (objp->status) { 386 case NFS_OK: 387 if (!xdr_readokres(xdrs, &objp->readres_u.reply)) 388 return (FALSE); 389 break; 390 } 391 return (TRUE); 392 } 393 394 bool_t 395 xdr_writeargs(XDR *xdrs, writeargs *objp) 396 { 397 398 rpc_inline_t *buf; 399 400 if (!xdr_nfs_fh(xdrs, &objp->file)) 401 return (FALSE); 402 if (!xdr_u_int(xdrs, &objp->beginoffset)) 403 return (FALSE); 404 if (!xdr_u_int(xdrs, &objp->offset)) 405 return (FALSE); 406 if (!xdr_u_int(xdrs, &objp->totalcount)) 407 return (FALSE); 408 if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS_MAXDATA)) 409 return (FALSE); 410 return (TRUE); 411 } 412 413 bool_t 414 xdr_createargs(XDR *xdrs, createargs *objp) 415 { 416 417 rpc_inline_t *buf; 418 419 if (!xdr_diropargs(xdrs, &objp->where)) 420 return (FALSE); 421 if (!xdr_sattr(xdrs, &objp->attributes)) 422 return (FALSE); 423 return (TRUE); 424 } 425 426 bool_t 427 xdr_renameargs(XDR *xdrs, renameargs *objp) 428 { 429 430 rpc_inline_t *buf; 431 432 if (!xdr_diropargs(xdrs, &objp->from)) 433 return (FALSE); 434 if (!xdr_diropargs(xdrs, &objp->to)) 435 return (FALSE); 436 return (TRUE); 437 } 438 439 bool_t 440 xdr_linkargs(XDR *xdrs, linkargs *objp) 441 { 442 443 rpc_inline_t *buf; 444 445 if (!xdr_nfs_fh(xdrs, &objp->from)) 446 return (FALSE); 447 if (!xdr_diropargs(xdrs, &objp->to)) 448 return (FALSE); 449 return (TRUE); 450 } 451 452 bool_t 453 xdr_symlinkargs(XDR *xdrs, symlinkargs *objp) 454 { 455 456 rpc_inline_t *buf; 457 458 if (!xdr_diropargs(xdrs, &objp->from)) 459 return (FALSE); 460 if (!xdr_nfspath(xdrs, &objp->to)) 461 return (FALSE); 462 if (!xdr_sattr(xdrs, &objp->attributes)) 463 return (FALSE); 464 return (TRUE); 465 } 466 467 bool_t 468 xdr_nfscookie(XDR *xdrs, nfscookie objp) 469 { 470 471 rpc_inline_t *buf; 472 473 if (!xdr_opaque(xdrs, objp, NFS_COOKIESIZE)) 474 return (FALSE); 475 return (TRUE); 476 } 477 478 bool_t 479 xdr_readdirargs(XDR *xdrs, readdirargs *objp) 480 { 481 482 rpc_inline_t *buf; 483 484 if (!xdr_nfs_fh(xdrs, &objp->dir)) 485 return (FALSE); 486 if (!xdr_nfscookie(xdrs, objp->cookie)) 487 return (FALSE); 488 if (!xdr_u_int(xdrs, &objp->count)) 489 return (FALSE); 490 return (TRUE); 491 } 492 493 bool_t 494 xdr_entry(XDR *xdrs, entry *objp) 495 { 496 497 rpc_inline_t *buf; 498 499 entry *tmp_entry; 500 bool_t more_data = TRUE; 501 bool_t first_objp = TRUE; 502 503 504 if (xdrs->x_op == XDR_DECODE) { 505 506 while (more_data) { 507 508 void bzero(); 509 510 if (!xdr_u_int(xdrs, &objp->fileid)) 511 return (FALSE); 512 if (!xdr_filename(xdrs, &objp->name)) 513 return (FALSE); 514 if (!xdr_nfscookie(xdrs, objp->cookie)) 515 return (FALSE); 516 if (!xdr_bool(xdrs, &more_data)) 517 return (FALSE); 518 519 if (!more_data) { 520 objp->nextentry = NULL; 521 break; 522 } 523 524 if (objp->nextentry == NULL) { 525 objp->nextentry = (entry *) 526 mem_alloc(sizeof (entry)); 527 if (objp->nextentry == NULL) 528 return (FALSE); 529 bzero(objp->nextentry, sizeof (entry)); 530 } 531 objp = objp->nextentry; 532 } 533 534 } else if (xdrs->x_op == XDR_ENCODE) { 535 536 while (more_data) { 537 if (!xdr_u_int(xdrs, &objp->fileid)) 538 return (FALSE); 539 if (!xdr_filename(xdrs, &objp->name)) 540 return (FALSE); 541 if (!xdr_nfscookie(xdrs, objp->cookie)) 542 return (FALSE); 543 objp = objp->nextentry; 544 if (objp == NULL) 545 more_data = FALSE; 546 if (!xdr_bool(xdrs, &more_data)) 547 return (FALSE); 548 } 549 550 } else { 551 552 while (more_data) { 553 if (!xdr_u_int(xdrs, &objp->fileid)) 554 return (FALSE); 555 if (!xdr_filename(xdrs, &objp->name)) 556 return (FALSE); 557 if (!xdr_nfscookie(xdrs, objp->cookie)) 558 return (FALSE); 559 tmp_entry = objp; 560 objp = objp->nextentry; 561 if (objp == NULL) 562 more_data = FALSE; 563 if (!first_objp) 564 mem_free(tmp_entry, sizeof (entry)); 565 else 566 first_objp = FALSE; 567 } 568 569 } 570 return (TRUE); 571 } 572 573 bool_t 574 xdr_dirlist(XDR *xdrs, dirlist *objp) 575 { 576 577 rpc_inline_t *buf; 578 579 if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof (entry), (xdrproc_t)xdr_entry)) 580 return (FALSE); 581 if (!xdr_bool(xdrs, &objp->eof)) 582 return (FALSE); 583 return (TRUE); 584 } 585 586 bool_t 587 xdr_readdirres(XDR *xdrs, readdirres *objp) 588 { 589 590 rpc_inline_t *buf; 591 592 if (!xdr_nfsstat(xdrs, &objp->status)) 593 return (FALSE); 594 switch (objp->status) { 595 case NFS_OK: 596 if (!xdr_dirlist(xdrs, &objp->readdirres_u.reply)) 597 return (FALSE); 598 break; 599 } 600 return (TRUE); 601 } 602 603 bool_t 604 xdr_statfsokres(XDR *xdrs, statfsokres *objp) 605 { 606 607 rpc_inline_t *buf; 608 609 610 if (xdrs->x_op == XDR_ENCODE) { 611 buf = XDR_INLINE(xdrs, 5 * BYTES_PER_XDR_UNIT); 612 if (buf == NULL) { 613 if (!xdr_u_int(xdrs, &objp->tsize)) 614 return (FALSE); 615 if (!xdr_u_int(xdrs, &objp->bsize)) 616 return (FALSE); 617 if (!xdr_u_int(xdrs, &objp->blocks)) 618 return (FALSE); 619 if (!xdr_u_int(xdrs, &objp->bfree)) 620 return (FALSE); 621 if (!xdr_u_int(xdrs, &objp->bavail)) 622 return (FALSE); 623 } else { 624 #if defined(_LP64) || defined(_KERNEL) 625 IXDR_PUT_U_INT32(buf, objp->tsize); 626 IXDR_PUT_U_INT32(buf, objp->bsize); 627 IXDR_PUT_U_INT32(buf, objp->blocks); 628 IXDR_PUT_U_INT32(buf, objp->bfree); 629 IXDR_PUT_U_INT32(buf, objp->bavail); 630 #else 631 IXDR_PUT_U_LONG(buf, objp->tsize); 632 IXDR_PUT_U_LONG(buf, objp->bsize); 633 IXDR_PUT_U_LONG(buf, objp->blocks); 634 IXDR_PUT_U_LONG(buf, objp->bfree); 635 IXDR_PUT_U_LONG(buf, objp->bavail); 636 #endif 637 } 638 return (TRUE); 639 } else if (xdrs->x_op == XDR_DECODE) { 640 buf = XDR_INLINE(xdrs, 5 * BYTES_PER_XDR_UNIT); 641 if (buf == NULL) { 642 if (!xdr_u_int(xdrs, &objp->tsize)) 643 return (FALSE); 644 if (!xdr_u_int(xdrs, &objp->bsize)) 645 return (FALSE); 646 if (!xdr_u_int(xdrs, &objp->blocks)) 647 return (FALSE); 648 if (!xdr_u_int(xdrs, &objp->bfree)) 649 return (FALSE); 650 if (!xdr_u_int(xdrs, &objp->bavail)) 651 return (FALSE); 652 } else { 653 #if defined(_LP64) || defined(_KERNEL) 654 objp->tsize = IXDR_GET_U_INT32(buf); 655 objp->bsize = IXDR_GET_U_INT32(buf); 656 objp->blocks = IXDR_GET_U_INT32(buf); 657 objp->bfree = IXDR_GET_U_INT32(buf); 658 objp->bavail = IXDR_GET_U_INT32(buf); 659 #else 660 objp->tsize = IXDR_GET_U_LONG(buf); 661 objp->bsize = IXDR_GET_U_LONG(buf); 662 objp->blocks = IXDR_GET_U_LONG(buf); 663 objp->bfree = IXDR_GET_U_LONG(buf); 664 objp->bavail = IXDR_GET_U_LONG(buf); 665 #endif 666 } 667 return (TRUE); 668 } 669 670 if (!xdr_u_int(xdrs, &objp->tsize)) 671 return (FALSE); 672 if (!xdr_u_int(xdrs, &objp->bsize)) 673 return (FALSE); 674 if (!xdr_u_int(xdrs, &objp->blocks)) 675 return (FALSE); 676 if (!xdr_u_int(xdrs, &objp->bfree)) 677 return (FALSE); 678 if (!xdr_u_int(xdrs, &objp->bavail)) 679 return (FALSE); 680 return (TRUE); 681 } 682 683 bool_t 684 xdr_statfsres(XDR *xdrs, statfsres *objp) 685 { 686 687 rpc_inline_t *buf; 688 689 if (!xdr_nfsstat(xdrs, &objp->status)) 690 return (FALSE); 691 switch (objp->status) { 692 case NFS_OK: 693 if (!xdr_statfsokres(xdrs, &objp->statfsres_u.reply)) 694 return (FALSE); 695 break; 696 } 697 return (TRUE); 698 } 699 700 bool_t 701 xdr_filename3(XDR *xdrs, filename3 *objp) 702 { 703 704 rpc_inline_t *buf; 705 706 if (!xdr_string(xdrs, objp, ~0)) 707 return (FALSE); 708 return (TRUE); 709 } 710 711 bool_t 712 xdr_nfspath3(XDR *xdrs, nfspath3 *objp) 713 { 714 715 rpc_inline_t *buf; 716 717 if (!xdr_string(xdrs, objp, ~0)) 718 return (FALSE); 719 return (TRUE); 720 } 721 722 bool_t 723 xdr_fileid3(XDR *xdrs, fileid3 *objp) 724 { 725 726 rpc_inline_t *buf; 727 728 if (!xdr_uint64(xdrs, objp)) 729 return (FALSE); 730 return (TRUE); 731 } 732 733 bool_t 734 xdr_cookie3(XDR *xdrs, cookie3 *objp) 735 { 736 737 rpc_inline_t *buf; 738 739 if (!xdr_uint64(xdrs, objp)) 740 return (FALSE); 741 return (TRUE); 742 } 743 744 bool_t 745 xdr_cookieverf3(XDR *xdrs, cookieverf3 objp) 746 { 747 748 rpc_inline_t *buf; 749 750 if (!xdr_opaque(xdrs, objp, NFS3_COOKIEVERFSIZE)) 751 return (FALSE); 752 return (TRUE); 753 } 754 755 bool_t 756 xdr_createverf3(XDR *xdrs, createverf3 objp) 757 { 758 759 rpc_inline_t *buf; 760 761 if (!xdr_opaque(xdrs, objp, NFS3_CREATEVERFSIZE)) 762 return (FALSE); 763 return (TRUE); 764 } 765 766 bool_t 767 xdr_writeverf3(XDR *xdrs, writeverf3 objp) 768 { 769 770 rpc_inline_t *buf; 771 772 if (!xdr_opaque(xdrs, objp, NFS3_WRITEVERFSIZE)) 773 return (FALSE); 774 return (TRUE); 775 } 776 777 bool_t 778 xdr_uid3(XDR *xdrs, uid3 *objp) 779 { 780 781 rpc_inline_t *buf; 782 783 if (!xdr_uint32(xdrs, objp)) 784 return (FALSE); 785 return (TRUE); 786 } 787 788 bool_t 789 xdr_gid3(XDR *xdrs, gid3 *objp) 790 { 791 792 rpc_inline_t *buf; 793 794 if (!xdr_uint32(xdrs, objp)) 795 return (FALSE); 796 return (TRUE); 797 } 798 799 bool_t 800 xdr_size3(XDR *xdrs, size3 *objp) 801 { 802 803 rpc_inline_t *buf; 804 805 if (!xdr_uint64(xdrs, objp)) 806 return (FALSE); 807 return (TRUE); 808 } 809 810 bool_t 811 xdr_offset3(XDR *xdrs, offset3 *objp) 812 { 813 814 rpc_inline_t *buf; 815 816 if (!xdr_uint64(xdrs, objp)) 817 return (FALSE); 818 return (TRUE); 819 } 820 821 bool_t 822 xdr_mode3(XDR *xdrs, mode3 *objp) 823 { 824 825 rpc_inline_t *buf; 826 827 if (!xdr_uint32(xdrs, objp)) 828 return (FALSE); 829 return (TRUE); 830 } 831 832 bool_t 833 xdr_count3(XDR *xdrs, count3 *objp) 834 { 835 836 rpc_inline_t *buf; 837 838 if (!xdr_uint32(xdrs, objp)) 839 return (FALSE); 840 return (TRUE); 841 } 842 843 bool_t 844 xdr_nfsstat3(XDR *xdrs, nfsstat3 *objp) 845 { 846 847 rpc_inline_t *buf; 848 849 if (!xdr_enum(xdrs, (enum_t *)objp)) 850 return (FALSE); 851 return (TRUE); 852 } 853 854 bool_t 855 xdr_ftype3(XDR *xdrs, ftype3 *objp) 856 { 857 858 rpc_inline_t *buf; 859 860 if (!xdr_enum(xdrs, (enum_t *)objp)) 861 return (FALSE); 862 return (TRUE); 863 } 864 865 bool_t 866 xdr_specdata3(XDR *xdrs, specdata3 *objp) 867 { 868 869 rpc_inline_t *buf; 870 871 if (!xdr_uint32(xdrs, &objp->specdata1)) 872 return (FALSE); 873 if (!xdr_uint32(xdrs, &objp->specdata2)) 874 return (FALSE); 875 return (TRUE); 876 } 877 878 bool_t 879 xdr_nfs_fh3(XDR *xdrs, nfs_fh3 *objp) 880 { 881 882 rpc_inline_t *buf; 883 884 if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS3_FHSIZE)) 885 return (FALSE); 886 return (TRUE); 887 } 888 889 bool_t 890 xdr_nfstime3(XDR *xdrs, nfstime3 *objp) 891 { 892 893 rpc_inline_t *buf; 894 895 if (!xdr_uint32(xdrs, &objp->seconds)) 896 return (FALSE); 897 if (!xdr_uint32(xdrs, &objp->nseconds)) 898 return (FALSE); 899 return (TRUE); 900 } 901 902 bool_t 903 xdr_fattr3(XDR *xdrs, fattr3 *objp) 904 { 905 906 rpc_inline_t *buf; 907 908 if (!xdr_ftype3(xdrs, &objp->type)) 909 return (FALSE); 910 if (!xdr_mode3(xdrs, &objp->mode)) 911 return (FALSE); 912 if (!xdr_uint32(xdrs, &objp->nlink)) 913 return (FALSE); 914 if (!xdr_uid3(xdrs, &objp->uid)) 915 return (FALSE); 916 if (!xdr_gid3(xdrs, &objp->gid)) 917 return (FALSE); 918 if (!xdr_size3(xdrs, &objp->size)) 919 return (FALSE); 920 if (!xdr_size3(xdrs, &objp->used)) 921 return (FALSE); 922 if (!xdr_specdata3(xdrs, &objp->rdev)) 923 return (FALSE); 924 if (!xdr_uint64(xdrs, &objp->fsid)) 925 return (FALSE); 926 if (!xdr_fileid3(xdrs, &objp->fileid)) 927 return (FALSE); 928 if (!xdr_nfstime3(xdrs, &objp->atime)) 929 return (FALSE); 930 if (!xdr_nfstime3(xdrs, &objp->mtime)) 931 return (FALSE); 932 if (!xdr_nfstime3(xdrs, &objp->ctime)) 933 return (FALSE); 934 return (TRUE); 935 } 936 937 bool_t 938 xdr_post_op_attr(XDR *xdrs, post_op_attr *objp) 939 { 940 941 rpc_inline_t *buf; 942 943 if (!xdr_bool(xdrs, &objp->attributes_follow)) 944 return (FALSE); 945 switch (objp->attributes_follow) { 946 case TRUE: 947 if (!xdr_fattr3(xdrs, &objp->post_op_attr_u.attributes)) 948 return (FALSE); 949 break; 950 case FALSE: 951 break; 952 default: 953 return (FALSE); 954 } 955 return (TRUE); 956 } 957 958 bool_t 959 xdr_wcc_attr(XDR *xdrs, wcc_attr *objp) 960 { 961 962 rpc_inline_t *buf; 963 964 if (!xdr_size3(xdrs, &objp->size)) 965 return (FALSE); 966 if (!xdr_nfstime3(xdrs, &objp->mtime)) 967 return (FALSE); 968 if (!xdr_nfstime3(xdrs, &objp->ctime)) 969 return (FALSE); 970 return (TRUE); 971 } 972 973 bool_t 974 xdr_pre_op_attr(XDR *xdrs, pre_op_attr *objp) 975 { 976 977 rpc_inline_t *buf; 978 979 if (!xdr_bool(xdrs, &objp->attributes_follow)) 980 return (FALSE); 981 switch (objp->attributes_follow) { 982 case TRUE: 983 if (!xdr_wcc_attr(xdrs, &objp->pre_op_attr_u.attributes)) 984 return (FALSE); 985 break; 986 case FALSE: 987 break; 988 default: 989 return (FALSE); 990 } 991 return (TRUE); 992 } 993 994 bool_t 995 xdr_wcc_data(XDR *xdrs, wcc_data *objp) 996 { 997 998 rpc_inline_t *buf; 999 1000 if (!xdr_pre_op_attr(xdrs, &objp->before)) 1001 return (FALSE); 1002 if (!xdr_post_op_attr(xdrs, &objp->after)) 1003 return (FALSE); 1004 return (TRUE); 1005 } 1006 1007 bool_t 1008 xdr_post_op_fh3(XDR *xdrs, post_op_fh3 *objp) 1009 { 1010 1011 rpc_inline_t *buf; 1012 1013 if (!xdr_bool(xdrs, &objp->handle_follows)) 1014 return (FALSE); 1015 switch (objp->handle_follows) { 1016 case TRUE: 1017 if (!xdr_nfs_fh3(xdrs, &objp->post_op_fh3_u.handle)) 1018 return (FALSE); 1019 break; 1020 case FALSE: 1021 break; 1022 default: 1023 return (FALSE); 1024 } 1025 return (TRUE); 1026 } 1027 1028 bool_t 1029 xdr_time_how(XDR *xdrs, time_how *objp) 1030 { 1031 1032 rpc_inline_t *buf; 1033 1034 if (!xdr_enum(xdrs, (enum_t *)objp)) 1035 return (FALSE); 1036 return (TRUE); 1037 } 1038 1039 bool_t 1040 xdr_set_mode3(XDR *xdrs, set_mode3 *objp) 1041 { 1042 1043 rpc_inline_t *buf; 1044 1045 if (!xdr_bool(xdrs, &objp->set_it)) 1046 return (FALSE); 1047 switch (objp->set_it) { 1048 case TRUE: 1049 if (!xdr_mode3(xdrs, &objp->set_mode3_u.mode)) 1050 return (FALSE); 1051 break; 1052 } 1053 return (TRUE); 1054 } 1055 1056 bool_t 1057 xdr_set_uid3(XDR *xdrs, set_uid3 *objp) 1058 { 1059 1060 rpc_inline_t *buf; 1061 1062 if (!xdr_bool(xdrs, &objp->set_it)) 1063 return (FALSE); 1064 switch (objp->set_it) { 1065 case TRUE: 1066 if (!xdr_uid3(xdrs, &objp->set_uid3_u.uid)) 1067 return (FALSE); 1068 break; 1069 } 1070 return (TRUE); 1071 } 1072 1073 bool_t 1074 xdr_set_gid3(XDR *xdrs, set_gid3 *objp) 1075 { 1076 1077 rpc_inline_t *buf; 1078 1079 if (!xdr_bool(xdrs, &objp->set_it)) 1080 return (FALSE); 1081 switch (objp->set_it) { 1082 case TRUE: 1083 if (!xdr_gid3(xdrs, &objp->set_gid3_u.gid)) 1084 return (FALSE); 1085 break; 1086 } 1087 return (TRUE); 1088 } 1089 1090 bool_t 1091 xdr_set_size3(XDR *xdrs, set_size3 *objp) 1092 { 1093 1094 rpc_inline_t *buf; 1095 1096 if (!xdr_bool(xdrs, &objp->set_it)) 1097 return (FALSE); 1098 switch (objp->set_it) { 1099 case TRUE: 1100 if (!xdr_size3(xdrs, &objp->set_size3_u.size)) 1101 return (FALSE); 1102 break; 1103 } 1104 return (TRUE); 1105 } 1106 1107 bool_t 1108 xdr_set_atime(XDR *xdrs, set_atime *objp) 1109 { 1110 1111 rpc_inline_t *buf; 1112 1113 if (!xdr_time_how(xdrs, &objp->set_it)) 1114 return (FALSE); 1115 switch (objp->set_it) { 1116 case SET_TO_CLIENT_TIME: 1117 if (!xdr_nfstime3(xdrs, &objp->set_atime_u.atime)) 1118 return (FALSE); 1119 break; 1120 } 1121 return (TRUE); 1122 } 1123 1124 bool_t 1125 xdr_set_mtime(XDR *xdrs, set_mtime *objp) 1126 { 1127 1128 rpc_inline_t *buf; 1129 1130 if (!xdr_time_how(xdrs, &objp->set_it)) 1131 return (FALSE); 1132 switch (objp->set_it) { 1133 case SET_TO_CLIENT_TIME: 1134 if (!xdr_nfstime3(xdrs, &objp->set_mtime_u.mtime)) 1135 return (FALSE); 1136 break; 1137 } 1138 return (TRUE); 1139 } 1140 1141 bool_t 1142 xdr_sattr3(XDR *xdrs, sattr3 *objp) 1143 { 1144 1145 rpc_inline_t *buf; 1146 1147 if (!xdr_set_mode3(xdrs, &objp->mode)) 1148 return (FALSE); 1149 if (!xdr_set_uid3(xdrs, &objp->uid)) 1150 return (FALSE); 1151 if (!xdr_set_gid3(xdrs, &objp->gid)) 1152 return (FALSE); 1153 if (!xdr_set_size3(xdrs, &objp->size)) 1154 return (FALSE); 1155 if (!xdr_set_atime(xdrs, &objp->atime)) 1156 return (FALSE); 1157 if (!xdr_set_mtime(xdrs, &objp->mtime)) 1158 return (FALSE); 1159 return (TRUE); 1160 } 1161 1162 bool_t 1163 xdr_diropargs3(XDR *xdrs, diropargs3 *objp) 1164 { 1165 1166 rpc_inline_t *buf; 1167 1168 if (!xdr_nfs_fh3(xdrs, &objp->dir)) 1169 return (FALSE); 1170 if (!xdr_filename3(xdrs, &objp->name)) 1171 return (FALSE); 1172 return (TRUE); 1173 } 1174 1175 bool_t 1176 xdr_GETATTR3args(XDR *xdrs, GETATTR3args *objp) 1177 { 1178 1179 rpc_inline_t *buf; 1180 1181 if (!xdr_nfs_fh3(xdrs, &objp->object)) 1182 return (FALSE); 1183 return (TRUE); 1184 } 1185 1186 bool_t 1187 xdr_GETATTR3resok(XDR *xdrs, GETATTR3resok *objp) 1188 { 1189 1190 rpc_inline_t *buf; 1191 1192 if (!xdr_fattr3(xdrs, &objp->obj_attributes)) 1193 return (FALSE); 1194 return (TRUE); 1195 } 1196 1197 bool_t 1198 xdr_GETATTR3res(XDR *xdrs, GETATTR3res *objp) 1199 { 1200 1201 rpc_inline_t *buf; 1202 1203 if (!xdr_nfsstat3(xdrs, &objp->status)) 1204 return (FALSE); 1205 switch (objp->status) { 1206 case NFS3_OK: 1207 if (!xdr_GETATTR3resok(xdrs, &objp->GETATTR3res_u.resok)) 1208 return (FALSE); 1209 break; 1210 } 1211 return (TRUE); 1212 } 1213 1214 bool_t 1215 xdr_sattrguard3(XDR *xdrs, sattrguard3 *objp) 1216 { 1217 1218 rpc_inline_t *buf; 1219 1220 if (!xdr_bool(xdrs, &objp->check)) 1221 return (FALSE); 1222 switch (objp->check) { 1223 case TRUE: 1224 if (!xdr_nfstime3(xdrs, &objp->sattrguard3_u.obj_ctime)) 1225 return (FALSE); 1226 break; 1227 case FALSE: 1228 break; 1229 default: 1230 return (FALSE); 1231 } 1232 return (TRUE); 1233 } 1234 1235 bool_t 1236 xdr_SETATTR3args(XDR *xdrs, SETATTR3args *objp) 1237 { 1238 1239 rpc_inline_t *buf; 1240 1241 if (!xdr_nfs_fh3(xdrs, &objp->object)) 1242 return (FALSE); 1243 if (!xdr_sattr3(xdrs, &objp->new_attributes)) 1244 return (FALSE); 1245 if (!xdr_sattrguard3(xdrs, &objp->guard)) 1246 return (FALSE); 1247 return (TRUE); 1248 } 1249 1250 bool_t 1251 xdr_SETATTR3resok(XDR *xdrs, SETATTR3resok *objp) 1252 { 1253 1254 rpc_inline_t *buf; 1255 1256 if (!xdr_wcc_data(xdrs, &objp->obj_wcc)) 1257 return (FALSE); 1258 return (TRUE); 1259 } 1260 1261 bool_t 1262 xdr_SETATTR3resfail(XDR *xdrs, SETATTR3resfail *objp) 1263 { 1264 1265 rpc_inline_t *buf; 1266 1267 if (!xdr_wcc_data(xdrs, &objp->obj_wcc)) 1268 return (FALSE); 1269 return (TRUE); 1270 } 1271 1272 bool_t 1273 xdr_SETATTR3res(XDR *xdrs, SETATTR3res *objp) 1274 { 1275 1276 rpc_inline_t *buf; 1277 1278 if (!xdr_nfsstat3(xdrs, &objp->status)) 1279 return (FALSE); 1280 switch (objp->status) { 1281 case NFS3_OK: 1282 if (!xdr_SETATTR3resok(xdrs, &objp->SETATTR3res_u.resok)) 1283 return (FALSE); 1284 break; 1285 default: 1286 if (!xdr_SETATTR3resfail(xdrs, &objp->SETATTR3res_u.resfail)) 1287 return (FALSE); 1288 break; 1289 } 1290 return (TRUE); 1291 } 1292 1293 bool_t 1294 xdr_LOOKUP3args(XDR *xdrs, LOOKUP3args *objp) 1295 { 1296 1297 rpc_inline_t *buf; 1298 1299 if (!xdr_diropargs3(xdrs, &objp->what)) 1300 return (FALSE); 1301 return (TRUE); 1302 } 1303 1304 bool_t 1305 xdr_LOOKUP3resok(XDR *xdrs, LOOKUP3resok *objp) 1306 { 1307 1308 rpc_inline_t *buf; 1309 1310 if (!xdr_nfs_fh3(xdrs, &objp->object)) 1311 return (FALSE); 1312 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 1313 return (FALSE); 1314 if (!xdr_post_op_attr(xdrs, &objp->dir_attributes)) 1315 return (FALSE); 1316 return (TRUE); 1317 } 1318 1319 bool_t 1320 xdr_LOOKUP3resfail(XDR *xdrs, LOOKUP3resfail *objp) 1321 { 1322 1323 rpc_inline_t *buf; 1324 1325 if (!xdr_post_op_attr(xdrs, &objp->dir_attributes)) 1326 return (FALSE); 1327 return (TRUE); 1328 } 1329 1330 bool_t 1331 xdr_LOOKUP3res(XDR *xdrs, LOOKUP3res *objp) 1332 { 1333 1334 rpc_inline_t *buf; 1335 1336 if (!xdr_nfsstat3(xdrs, &objp->status)) 1337 return (FALSE); 1338 switch (objp->status) { 1339 case NFS3_OK: 1340 if (!xdr_LOOKUP3resok(xdrs, &objp->LOOKUP3res_u.resok)) 1341 return (FALSE); 1342 break; 1343 default: 1344 if (!xdr_LOOKUP3resfail(xdrs, &objp->LOOKUP3res_u.resfail)) 1345 return (FALSE); 1346 break; 1347 } 1348 return (TRUE); 1349 } 1350 1351 bool_t 1352 xdr_ACCESS3args(XDR *xdrs, ACCESS3args *objp) 1353 { 1354 1355 rpc_inline_t *buf; 1356 1357 if (!xdr_nfs_fh3(xdrs, &objp->object)) 1358 return (FALSE); 1359 if (!xdr_uint32(xdrs, &objp->access)) 1360 return (FALSE); 1361 return (TRUE); 1362 } 1363 1364 bool_t 1365 xdr_ACCESS3resok(XDR *xdrs, ACCESS3resok *objp) 1366 { 1367 1368 rpc_inline_t *buf; 1369 1370 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 1371 return (FALSE); 1372 if (!xdr_uint32(xdrs, &objp->access)) 1373 return (FALSE); 1374 return (TRUE); 1375 } 1376 1377 bool_t 1378 xdr_ACCESS3resfail(XDR *xdrs, ACCESS3resfail *objp) 1379 { 1380 1381 rpc_inline_t *buf; 1382 1383 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 1384 return (FALSE); 1385 return (TRUE); 1386 } 1387 1388 bool_t 1389 xdr_ACCESS3res(XDR *xdrs, ACCESS3res *objp) 1390 { 1391 1392 rpc_inline_t *buf; 1393 1394 if (!xdr_nfsstat3(xdrs, &objp->status)) 1395 return (FALSE); 1396 switch (objp->status) { 1397 case NFS3_OK: 1398 if (!xdr_ACCESS3resok(xdrs, &objp->ACCESS3res_u.resok)) 1399 return (FALSE); 1400 break; 1401 default: 1402 if (!xdr_ACCESS3resfail(xdrs, &objp->ACCESS3res_u.resfail)) 1403 return (FALSE); 1404 break; 1405 } 1406 return (TRUE); 1407 } 1408 1409 bool_t 1410 xdr_READLINK3args(XDR *xdrs, READLINK3args *objp) 1411 { 1412 1413 rpc_inline_t *buf; 1414 1415 if (!xdr_nfs_fh3(xdrs, &objp->symlink)) 1416 return (FALSE); 1417 return (TRUE); 1418 } 1419 1420 bool_t 1421 xdr_READLINK3resok(XDR *xdrs, READLINK3resok *objp) 1422 { 1423 1424 rpc_inline_t *buf; 1425 1426 if (!xdr_post_op_attr(xdrs, &objp->symlink_attributes)) 1427 return (FALSE); 1428 if (!xdr_nfspath3(xdrs, &objp->data)) 1429 return (FALSE); 1430 return (TRUE); 1431 } 1432 1433 bool_t 1434 xdr_READLINK3resfail(XDR *xdrs, READLINK3resfail *objp) 1435 { 1436 1437 rpc_inline_t *buf; 1438 1439 if (!xdr_post_op_attr(xdrs, &objp->symlink_attributes)) 1440 return (FALSE); 1441 return (TRUE); 1442 } 1443 1444 bool_t 1445 xdr_READLINK3res(XDR *xdrs, READLINK3res *objp) 1446 { 1447 1448 rpc_inline_t *buf; 1449 1450 if (!xdr_nfsstat3(xdrs, &objp->status)) 1451 return (FALSE); 1452 switch (objp->status) { 1453 case NFS3_OK: 1454 if (!xdr_READLINK3resok(xdrs, &objp->READLINK3res_u.resok)) 1455 return (FALSE); 1456 break; 1457 default: 1458 if (!xdr_READLINK3resfail(xdrs, &objp->READLINK3res_u.resfail)) 1459 return (FALSE); 1460 break; 1461 } 1462 return (TRUE); 1463 } 1464 1465 bool_t 1466 xdr_READ3args(XDR *xdrs, READ3args *objp) 1467 { 1468 1469 rpc_inline_t *buf; 1470 1471 if (!xdr_nfs_fh3(xdrs, &objp->file)) 1472 return (FALSE); 1473 if (!xdr_offset3(xdrs, &objp->offset)) 1474 return (FALSE); 1475 if (!xdr_count3(xdrs, &objp->count)) 1476 return (FALSE); 1477 return (TRUE); 1478 } 1479 1480 bool_t 1481 xdr_READ3resok(XDR *xdrs, READ3resok *objp) 1482 { 1483 1484 rpc_inline_t *buf; 1485 1486 if (!xdr_post_op_attr(xdrs, &objp->file_attributes)) 1487 return (FALSE); 1488 if (!xdr_count3(xdrs, &objp->count)) 1489 return (FALSE); 1490 if (!xdr_bool(xdrs, &objp->eof)) 1491 return (FALSE); 1492 if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) 1493 return (FALSE); 1494 return (TRUE); 1495 } 1496 1497 bool_t 1498 xdr_READ3resfail(XDR *xdrs, READ3resfail *objp) 1499 { 1500 1501 rpc_inline_t *buf; 1502 1503 if (!xdr_post_op_attr(xdrs, &objp->file_attributes)) 1504 return (FALSE); 1505 return (TRUE); 1506 } 1507 1508 bool_t 1509 xdr_READ3res(XDR *xdrs, READ3res *objp) 1510 { 1511 1512 rpc_inline_t *buf; 1513 1514 if (!xdr_nfsstat3(xdrs, &objp->status)) 1515 return (FALSE); 1516 switch (objp->status) { 1517 case NFS3_OK: 1518 if (!xdr_READ3resok(xdrs, &objp->READ3res_u.resok)) 1519 return (FALSE); 1520 break; 1521 default: 1522 if (!xdr_READ3resfail(xdrs, &objp->READ3res_u.resfail)) 1523 return (FALSE); 1524 break; 1525 } 1526 return (TRUE); 1527 } 1528 1529 bool_t 1530 xdr_stable_how(XDR *xdrs, stable_how *objp) 1531 { 1532 1533 rpc_inline_t *buf; 1534 1535 if (!xdr_enum(xdrs, (enum_t *)objp)) 1536 return (FALSE); 1537 return (TRUE); 1538 } 1539 1540 bool_t 1541 xdr_WRITE3args(XDR *xdrs, WRITE3args *objp) 1542 { 1543 1544 rpc_inline_t *buf; 1545 1546 if (!xdr_nfs_fh3(xdrs, &objp->file)) 1547 return (FALSE); 1548 if (!xdr_offset3(xdrs, &objp->offset)) 1549 return (FALSE); 1550 if (!xdr_count3(xdrs, &objp->count)) 1551 return (FALSE); 1552 if (!xdr_stable_how(xdrs, &objp->stable)) 1553 return (FALSE); 1554 if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) 1555 return (FALSE); 1556 return (TRUE); 1557 } 1558 1559 bool_t 1560 xdr_WRITE3resok(XDR *xdrs, WRITE3resok *objp) 1561 { 1562 1563 rpc_inline_t *buf; 1564 1565 if (!xdr_wcc_data(xdrs, &objp->file_wcc)) 1566 return (FALSE); 1567 if (!xdr_count3(xdrs, &objp->count)) 1568 return (FALSE); 1569 if (!xdr_stable_how(xdrs, &objp->committed)) 1570 return (FALSE); 1571 if (!xdr_writeverf3(xdrs, objp->verf)) 1572 return (FALSE); 1573 return (TRUE); 1574 } 1575 1576 bool_t 1577 xdr_WRITE3resfail(XDR *xdrs, WRITE3resfail *objp) 1578 { 1579 1580 rpc_inline_t *buf; 1581 1582 if (!xdr_wcc_data(xdrs, &objp->file_wcc)) 1583 return (FALSE); 1584 return (TRUE); 1585 } 1586 1587 bool_t 1588 xdr_WRITE3res(XDR *xdrs, WRITE3res *objp) 1589 { 1590 1591 rpc_inline_t *buf; 1592 1593 if (!xdr_nfsstat3(xdrs, &objp->status)) 1594 return (FALSE); 1595 switch (objp->status) { 1596 case NFS3_OK: 1597 if (!xdr_WRITE3resok(xdrs, &objp->WRITE3res_u.resok)) 1598 return (FALSE); 1599 break; 1600 default: 1601 if (!xdr_WRITE3resfail(xdrs, &objp->WRITE3res_u.resfail)) 1602 return (FALSE); 1603 break; 1604 } 1605 return (TRUE); 1606 } 1607 1608 bool_t 1609 xdr_createmode3(XDR *xdrs, createmode3 *objp) 1610 { 1611 1612 rpc_inline_t *buf; 1613 1614 if (!xdr_enum(xdrs, (enum_t *)objp)) 1615 return (FALSE); 1616 return (TRUE); 1617 } 1618 1619 bool_t 1620 xdr_createhow3(XDR *xdrs, createhow3 *objp) 1621 { 1622 1623 rpc_inline_t *buf; 1624 1625 if (!xdr_createmode3(xdrs, &objp->mode)) 1626 return (FALSE); 1627 switch (objp->mode) { 1628 case UNCHECKED: 1629 case GUARDED: 1630 if (!xdr_sattr3(xdrs, &objp->createhow3_u.obj_attributes)) 1631 return (FALSE); 1632 break; 1633 case EXCLUSIVE: 1634 if (!xdr_createverf3(xdrs, objp->createhow3_u.verf)) 1635 return (FALSE); 1636 break; 1637 default: 1638 return (FALSE); 1639 } 1640 return (TRUE); 1641 } 1642 1643 bool_t 1644 xdr_CREATE3args(XDR *xdrs, CREATE3args *objp) 1645 { 1646 1647 rpc_inline_t *buf; 1648 1649 if (!xdr_diropargs3(xdrs, &objp->where)) 1650 return (FALSE); 1651 if (!xdr_createhow3(xdrs, &objp->how)) 1652 return (FALSE); 1653 return (TRUE); 1654 } 1655 1656 bool_t 1657 xdr_CREATE3resok(XDR *xdrs, CREATE3resok *objp) 1658 { 1659 1660 rpc_inline_t *buf; 1661 1662 if (!xdr_post_op_fh3(xdrs, &objp->obj)) 1663 return (FALSE); 1664 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 1665 return (FALSE); 1666 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 1667 return (FALSE); 1668 return (TRUE); 1669 } 1670 1671 bool_t 1672 xdr_CREATE3resfail(XDR *xdrs, CREATE3resfail *objp) 1673 { 1674 1675 rpc_inline_t *buf; 1676 1677 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 1678 return (FALSE); 1679 return (TRUE); 1680 } 1681 1682 bool_t 1683 xdr_CREATE3res(XDR *xdrs, CREATE3res *objp) 1684 { 1685 1686 rpc_inline_t *buf; 1687 1688 if (!xdr_nfsstat3(xdrs, &objp->status)) 1689 return (FALSE); 1690 switch (objp->status) { 1691 case NFS3_OK: 1692 if (!xdr_CREATE3resok(xdrs, &objp->CREATE3res_u.resok)) 1693 return (FALSE); 1694 break; 1695 default: 1696 if (!xdr_CREATE3resfail(xdrs, &objp->CREATE3res_u.resfail)) 1697 return (FALSE); 1698 break; 1699 } 1700 return (TRUE); 1701 } 1702 1703 bool_t 1704 xdr_MKDIR3args(XDR *xdrs, MKDIR3args *objp) 1705 { 1706 1707 rpc_inline_t *buf; 1708 1709 if (!xdr_diropargs3(xdrs, &objp->where)) 1710 return (FALSE); 1711 if (!xdr_sattr3(xdrs, &objp->attributes)) 1712 return (FALSE); 1713 return (TRUE); 1714 } 1715 1716 bool_t 1717 xdr_MKDIR3resok(XDR *xdrs, MKDIR3resok *objp) 1718 { 1719 1720 rpc_inline_t *buf; 1721 1722 if (!xdr_post_op_fh3(xdrs, &objp->obj)) 1723 return (FALSE); 1724 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 1725 return (FALSE); 1726 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 1727 return (FALSE); 1728 return (TRUE); 1729 } 1730 1731 bool_t 1732 xdr_MKDIR3resfail(XDR *xdrs, MKDIR3resfail *objp) 1733 { 1734 1735 rpc_inline_t *buf; 1736 1737 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 1738 return (FALSE); 1739 return (TRUE); 1740 } 1741 1742 bool_t 1743 xdr_MKDIR3res(XDR *xdrs, MKDIR3res *objp) 1744 { 1745 1746 rpc_inline_t *buf; 1747 1748 if (!xdr_nfsstat3(xdrs, &objp->status)) 1749 return (FALSE); 1750 switch (objp->status) { 1751 case NFS3_OK: 1752 if (!xdr_MKDIR3resok(xdrs, &objp->MKDIR3res_u.resok)) 1753 return (FALSE); 1754 break; 1755 default: 1756 if (!xdr_MKDIR3resfail(xdrs, &objp->MKDIR3res_u.resfail)) 1757 return (FALSE); 1758 break; 1759 } 1760 return (TRUE); 1761 } 1762 1763 bool_t 1764 xdr_symlinkdata3(XDR *xdrs, symlinkdata3 *objp) 1765 { 1766 1767 rpc_inline_t *buf; 1768 1769 if (!xdr_sattr3(xdrs, &objp->symlink_attributes)) 1770 return (FALSE); 1771 if (!xdr_nfspath3(xdrs, &objp->symlink_data)) 1772 return (FALSE); 1773 return (TRUE); 1774 } 1775 1776 bool_t 1777 xdr_SYMLINK3args(XDR *xdrs, SYMLINK3args *objp) 1778 { 1779 1780 rpc_inline_t *buf; 1781 1782 if (!xdr_diropargs3(xdrs, &objp->where)) 1783 return (FALSE); 1784 if (!xdr_symlinkdata3(xdrs, &objp->symlink)) 1785 return (FALSE); 1786 return (TRUE); 1787 } 1788 1789 bool_t 1790 xdr_SYMLINK3resok(XDR *xdrs, SYMLINK3resok *objp) 1791 { 1792 1793 rpc_inline_t *buf; 1794 1795 if (!xdr_post_op_fh3(xdrs, &objp->obj)) 1796 return (FALSE); 1797 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 1798 return (FALSE); 1799 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 1800 return (FALSE); 1801 return (TRUE); 1802 } 1803 1804 bool_t 1805 xdr_SYMLINK3resfail(XDR *xdrs, SYMLINK3resfail *objp) 1806 { 1807 1808 rpc_inline_t *buf; 1809 1810 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 1811 return (FALSE); 1812 return (TRUE); 1813 } 1814 1815 bool_t 1816 xdr_SYMLINK3res(XDR *xdrs, SYMLINK3res *objp) 1817 { 1818 1819 rpc_inline_t *buf; 1820 1821 if (!xdr_nfsstat3(xdrs, &objp->status)) 1822 return (FALSE); 1823 switch (objp->status) { 1824 case NFS3_OK: 1825 if (!xdr_SYMLINK3resok(xdrs, &objp->SYMLINK3res_u.resok)) 1826 return (FALSE); 1827 break; 1828 default: 1829 if (!xdr_SYMLINK3resfail(xdrs, &objp->SYMLINK3res_u.resfail)) 1830 return (FALSE); 1831 break; 1832 } 1833 return (TRUE); 1834 } 1835 1836 bool_t 1837 xdr_devicedata3(XDR *xdrs, devicedata3 *objp) 1838 { 1839 1840 rpc_inline_t *buf; 1841 1842 if (!xdr_sattr3(xdrs, &objp->dev_attributes)) 1843 return (FALSE); 1844 if (!xdr_specdata3(xdrs, &objp->spec)) 1845 return (FALSE); 1846 return (TRUE); 1847 } 1848 1849 bool_t 1850 xdr_mknoddata3(XDR *xdrs, mknoddata3 *objp) 1851 { 1852 1853 rpc_inline_t *buf; 1854 1855 if (!xdr_ftype3(xdrs, &objp->type)) 1856 return (FALSE); 1857 switch (objp->type) { 1858 case NF3CHR: 1859 case NF3BLK: 1860 if (!xdr_devicedata3(xdrs, &objp->mknoddata3_u.device)) 1861 return (FALSE); 1862 break; 1863 case NF3SOCK: 1864 case NF3FIFO: 1865 if (!xdr_sattr3(xdrs, &objp->mknoddata3_u.pipe_attributes)) 1866 return (FALSE); 1867 break; 1868 } 1869 return (TRUE); 1870 } 1871 1872 bool_t 1873 xdr_MKNOD3args(XDR *xdrs, MKNOD3args *objp) 1874 { 1875 1876 rpc_inline_t *buf; 1877 1878 if (!xdr_diropargs3(xdrs, &objp->where)) 1879 return (FALSE); 1880 if (!xdr_mknoddata3(xdrs, &objp->what)) 1881 return (FALSE); 1882 return (TRUE); 1883 } 1884 1885 bool_t 1886 xdr_MKNOD3resok(XDR *xdrs, MKNOD3resok *objp) 1887 { 1888 1889 rpc_inline_t *buf; 1890 1891 if (!xdr_post_op_fh3(xdrs, &objp->obj)) 1892 return (FALSE); 1893 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 1894 return (FALSE); 1895 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 1896 return (FALSE); 1897 return (TRUE); 1898 } 1899 1900 bool_t 1901 xdr_MKNOD3resfail(XDR *xdrs, MKNOD3resfail *objp) 1902 { 1903 1904 rpc_inline_t *buf; 1905 1906 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 1907 return (FALSE); 1908 return (TRUE); 1909 } 1910 1911 bool_t 1912 xdr_MKNOD3res(XDR *xdrs, MKNOD3res *objp) 1913 { 1914 1915 rpc_inline_t *buf; 1916 1917 if (!xdr_nfsstat3(xdrs, &objp->status)) 1918 return (FALSE); 1919 switch (objp->status) { 1920 case NFS3_OK: 1921 if (!xdr_MKNOD3resok(xdrs, &objp->MKNOD3res_u.resok)) 1922 return (FALSE); 1923 break; 1924 default: 1925 if (!xdr_MKNOD3resfail(xdrs, &objp->MKNOD3res_u.resfail)) 1926 return (FALSE); 1927 break; 1928 } 1929 return (TRUE); 1930 } 1931 1932 bool_t 1933 xdr_REMOVE3args(XDR *xdrs, REMOVE3args *objp) 1934 { 1935 1936 rpc_inline_t *buf; 1937 1938 if (!xdr_diropargs3(xdrs, &objp->object)) 1939 return (FALSE); 1940 return (TRUE); 1941 } 1942 1943 bool_t 1944 xdr_REMOVE3resok(XDR *xdrs, REMOVE3resok *objp) 1945 { 1946 1947 rpc_inline_t *buf; 1948 1949 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 1950 return (FALSE); 1951 return (TRUE); 1952 } 1953 1954 bool_t 1955 xdr_REMOVE3resfail(XDR *xdrs, REMOVE3resfail *objp) 1956 { 1957 1958 rpc_inline_t *buf; 1959 1960 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 1961 return (FALSE); 1962 return (TRUE); 1963 } 1964 1965 bool_t 1966 xdr_REMOVE3res(XDR *xdrs, REMOVE3res *objp) 1967 { 1968 1969 rpc_inline_t *buf; 1970 1971 if (!xdr_nfsstat3(xdrs, &objp->status)) 1972 return (FALSE); 1973 switch (objp->status) { 1974 case NFS3_OK: 1975 if (!xdr_REMOVE3resok(xdrs, &objp->REMOVE3res_u.resok)) 1976 return (FALSE); 1977 break; 1978 default: 1979 if (!xdr_REMOVE3resfail(xdrs, &objp->REMOVE3res_u.resfail)) 1980 return (FALSE); 1981 break; 1982 } 1983 return (TRUE); 1984 } 1985 1986 bool_t 1987 xdr_RMDIR3args(XDR *xdrs, RMDIR3args *objp) 1988 { 1989 1990 rpc_inline_t *buf; 1991 1992 if (!xdr_diropargs3(xdrs, &objp->object)) 1993 return (FALSE); 1994 return (TRUE); 1995 } 1996 1997 bool_t 1998 xdr_RMDIR3resok(XDR *xdrs, RMDIR3resok *objp) 1999 { 2000 2001 rpc_inline_t *buf; 2002 2003 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 2004 return (FALSE); 2005 return (TRUE); 2006 } 2007 2008 bool_t 2009 xdr_RMDIR3resfail(XDR *xdrs, RMDIR3resfail *objp) 2010 { 2011 2012 rpc_inline_t *buf; 2013 2014 if (!xdr_wcc_data(xdrs, &objp->dir_wcc)) 2015 return (FALSE); 2016 return (TRUE); 2017 } 2018 2019 bool_t 2020 xdr_RMDIR3res(XDR *xdrs, RMDIR3res *objp) 2021 { 2022 2023 rpc_inline_t *buf; 2024 2025 if (!xdr_nfsstat3(xdrs, &objp->status)) 2026 return (FALSE); 2027 switch (objp->status) { 2028 case NFS3_OK: 2029 if (!xdr_RMDIR3resok(xdrs, &objp->RMDIR3res_u.resok)) 2030 return (FALSE); 2031 break; 2032 default: 2033 if (!xdr_RMDIR3resfail(xdrs, &objp->RMDIR3res_u.resfail)) 2034 return (FALSE); 2035 break; 2036 } 2037 return (TRUE); 2038 } 2039 2040 bool_t 2041 xdr_RENAME3args(XDR *xdrs, RENAME3args *objp) 2042 { 2043 2044 rpc_inline_t *buf; 2045 2046 if (!xdr_diropargs3(xdrs, &objp->from)) 2047 return (FALSE); 2048 if (!xdr_diropargs3(xdrs, &objp->to)) 2049 return (FALSE); 2050 return (TRUE); 2051 } 2052 2053 bool_t 2054 xdr_RENAME3resok(XDR *xdrs, RENAME3resok *objp) 2055 { 2056 2057 rpc_inline_t *buf; 2058 2059 if (!xdr_wcc_data(xdrs, &objp->fromdir_wcc)) 2060 return (FALSE); 2061 if (!xdr_wcc_data(xdrs, &objp->todir_wcc)) 2062 return (FALSE); 2063 return (TRUE); 2064 } 2065 2066 bool_t 2067 xdr_RENAME3resfail(XDR *xdrs, RENAME3resfail *objp) 2068 { 2069 2070 rpc_inline_t *buf; 2071 2072 if (!xdr_wcc_data(xdrs, &objp->fromdir_wcc)) 2073 return (FALSE); 2074 if (!xdr_wcc_data(xdrs, &objp->todir_wcc)) 2075 return (FALSE); 2076 return (TRUE); 2077 } 2078 2079 bool_t 2080 xdr_RENAME3res(XDR *xdrs, RENAME3res *objp) 2081 { 2082 2083 rpc_inline_t *buf; 2084 2085 if (!xdr_nfsstat3(xdrs, &objp->status)) 2086 return (FALSE); 2087 switch (objp->status) { 2088 case NFS3_OK: 2089 if (!xdr_RENAME3resok(xdrs, &objp->RENAME3res_u.resok)) 2090 return (FALSE); 2091 break; 2092 default: 2093 if (!xdr_RENAME3resfail(xdrs, &objp->RENAME3res_u.resfail)) 2094 return (FALSE); 2095 break; 2096 } 2097 return (TRUE); 2098 } 2099 2100 bool_t 2101 xdr_LINK3args(XDR *xdrs, LINK3args *objp) 2102 { 2103 2104 rpc_inline_t *buf; 2105 2106 if (!xdr_nfs_fh3(xdrs, &objp->file)) 2107 return (FALSE); 2108 if (!xdr_diropargs3(xdrs, &objp->link)) 2109 return (FALSE); 2110 return (TRUE); 2111 } 2112 2113 bool_t 2114 xdr_LINK3resok(XDR *xdrs, LINK3resok *objp) 2115 { 2116 2117 rpc_inline_t *buf; 2118 2119 if (!xdr_post_op_attr(xdrs, &objp->file_attributes)) 2120 return (FALSE); 2121 if (!xdr_wcc_data(xdrs, &objp->linkdir_wcc)) 2122 return (FALSE); 2123 return (TRUE); 2124 } 2125 2126 bool_t 2127 xdr_LINK3resfail(XDR *xdrs, LINK3resfail *objp) 2128 { 2129 2130 rpc_inline_t *buf; 2131 2132 if (!xdr_post_op_attr(xdrs, &objp->file_attributes)) 2133 return (FALSE); 2134 if (!xdr_wcc_data(xdrs, &objp->linkdir_wcc)) 2135 return (FALSE); 2136 return (TRUE); 2137 } 2138 2139 bool_t 2140 xdr_LINK3res(XDR *xdrs, LINK3res *objp) 2141 { 2142 2143 rpc_inline_t *buf; 2144 2145 if (!xdr_nfsstat3(xdrs, &objp->status)) 2146 return (FALSE); 2147 switch (objp->status) { 2148 case NFS3_OK: 2149 if (!xdr_LINK3resok(xdrs, &objp->LINK3res_u.resok)) 2150 return (FALSE); 2151 break; 2152 default: 2153 if (!xdr_LINK3resfail(xdrs, &objp->LINK3res_u.resfail)) 2154 return (FALSE); 2155 break; 2156 } 2157 return (TRUE); 2158 } 2159 2160 bool_t 2161 xdr_READDIR3args(XDR *xdrs, READDIR3args *objp) 2162 { 2163 2164 rpc_inline_t *buf; 2165 2166 if (!xdr_nfs_fh3(xdrs, &objp->dir)) 2167 return (FALSE); 2168 if (!xdr_cookie3(xdrs, &objp->cookie)) 2169 return (FALSE); 2170 if (!xdr_cookieverf3(xdrs, objp->cookieverf)) 2171 return (FALSE); 2172 if (!xdr_count3(xdrs, &objp->count)) 2173 return (FALSE); 2174 return (TRUE); 2175 } 2176 2177 bool_t 2178 xdr_entry3(XDR *xdrs, entry3 *objp) 2179 { 2180 2181 rpc_inline_t *buf; 2182 2183 entry3 *tmp_entry3; 2184 bool_t more_data = TRUE; 2185 bool_t first_objp = TRUE; 2186 2187 2188 if (xdrs->x_op == XDR_DECODE) { 2189 2190 while (more_data) { 2191 2192 void bzero(); 2193 2194 if (!xdr_fileid3(xdrs, &objp->fileid)) 2195 return (FALSE); 2196 if (!xdr_filename3(xdrs, &objp->name)) 2197 return (FALSE); 2198 if (!xdr_cookie3(xdrs, &objp->cookie)) 2199 return (FALSE); 2200 if (!xdr_bool(xdrs, &more_data)) 2201 return (FALSE); 2202 2203 if (!more_data) { 2204 objp->nextentry = NULL; 2205 break; 2206 } 2207 2208 if (objp->nextentry == NULL) { 2209 objp->nextentry = (entry3 *) 2210 mem_alloc(sizeof (entry3)); 2211 if (objp->nextentry == NULL) 2212 return (FALSE); 2213 bzero(objp->nextentry, sizeof (entry3)); 2214 } 2215 objp = objp->nextentry; 2216 } 2217 2218 } else if (xdrs->x_op == XDR_ENCODE) { 2219 2220 while (more_data) { 2221 if (!xdr_fileid3(xdrs, &objp->fileid)) 2222 return (FALSE); 2223 if (!xdr_filename3(xdrs, &objp->name)) 2224 return (FALSE); 2225 if (!xdr_cookie3(xdrs, &objp->cookie)) 2226 return (FALSE); 2227 objp = objp->nextentry; 2228 if (objp == NULL) 2229 more_data = FALSE; 2230 if (!xdr_bool(xdrs, &more_data)) 2231 return (FALSE); 2232 } 2233 2234 } else { 2235 2236 while (more_data) { 2237 if (!xdr_fileid3(xdrs, &objp->fileid)) 2238 return (FALSE); 2239 if (!xdr_filename3(xdrs, &objp->name)) 2240 return (FALSE); 2241 if (!xdr_cookie3(xdrs, &objp->cookie)) 2242 return (FALSE); 2243 tmp_entry3 = objp; 2244 objp = objp->nextentry; 2245 if (objp == NULL) 2246 more_data = FALSE; 2247 if (!first_objp) 2248 mem_free(tmp_entry3, sizeof (entry3)); 2249 else 2250 first_objp = FALSE; 2251 } 2252 2253 } 2254 return (TRUE); 2255 } 2256 2257 bool_t 2258 xdr_dirlist3(XDR *xdrs, dirlist3 *objp) 2259 { 2260 2261 rpc_inline_t *buf; 2262 2263 if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof (entry3), (xdrproc_t)xdr_entry3)) 2264 return (FALSE); 2265 if (!xdr_bool(xdrs, &objp->eof)) 2266 return (FALSE); 2267 return (TRUE); 2268 } 2269 2270 bool_t 2271 xdr_READDIR3resok(XDR *xdrs, READDIR3resok *objp) 2272 { 2273 2274 rpc_inline_t *buf; 2275 2276 if (!xdr_post_op_attr(xdrs, &objp->dir_attributes)) 2277 return (FALSE); 2278 if (!xdr_cookieverf3(xdrs, objp->cookieverf)) 2279 return (FALSE); 2280 if (!xdr_dirlist3(xdrs, &objp->reply)) 2281 return (FALSE); 2282 return (TRUE); 2283 } 2284 2285 bool_t 2286 xdr_READDIR3resfail(XDR *xdrs, READDIR3resfail *objp) 2287 { 2288 2289 rpc_inline_t *buf; 2290 2291 if (!xdr_post_op_attr(xdrs, &objp->dir_attributes)) 2292 return (FALSE); 2293 return (TRUE); 2294 } 2295 2296 bool_t 2297 xdr_READDIR3res(XDR *xdrs, READDIR3res *objp) 2298 { 2299 2300 rpc_inline_t *buf; 2301 2302 if (!xdr_nfsstat3(xdrs, &objp->status)) 2303 return (FALSE); 2304 switch (objp->status) { 2305 case NFS3_OK: 2306 if (!xdr_READDIR3resok(xdrs, &objp->READDIR3res_u.resok)) 2307 return (FALSE); 2308 break; 2309 default: 2310 if (!xdr_READDIR3resfail(xdrs, &objp->READDIR3res_u.resfail)) 2311 return (FALSE); 2312 break; 2313 } 2314 return (TRUE); 2315 } 2316 2317 bool_t 2318 xdr_READDIRPLUS3args(XDR *xdrs, READDIRPLUS3args *objp) 2319 { 2320 2321 rpc_inline_t *buf; 2322 2323 if (!xdr_nfs_fh3(xdrs, &objp->dir)) 2324 return (FALSE); 2325 if (!xdr_cookie3(xdrs, &objp->cookie)) 2326 return (FALSE); 2327 if (!xdr_cookieverf3(xdrs, objp->cookieverf)) 2328 return (FALSE); 2329 if (!xdr_count3(xdrs, &objp->dircount)) 2330 return (FALSE); 2331 if (!xdr_count3(xdrs, &objp->maxcount)) 2332 return (FALSE); 2333 return (TRUE); 2334 } 2335 2336 bool_t 2337 xdr_entryplus3(XDR *xdrs, entryplus3 *objp) 2338 { 2339 2340 rpc_inline_t *buf; 2341 2342 entryplus3 *tmp_entryplus3; 2343 bool_t more_data = TRUE; 2344 bool_t first_objp = TRUE; 2345 2346 2347 if (xdrs->x_op == XDR_DECODE) { 2348 2349 while (more_data) { 2350 2351 void bzero(); 2352 2353 if (!xdr_fileid3(xdrs, &objp->fileid)) 2354 return (FALSE); 2355 if (!xdr_filename3(xdrs, &objp->name)) 2356 return (FALSE); 2357 if (!xdr_cookie3(xdrs, &objp->cookie)) 2358 return (FALSE); 2359 if (!xdr_post_op_attr(xdrs, &objp->name_attributes)) 2360 return (FALSE); 2361 if (!xdr_post_op_fh3(xdrs, &objp->name_handle)) 2362 return (FALSE); 2363 if (!xdr_bool(xdrs, &more_data)) 2364 return (FALSE); 2365 2366 if (!more_data) { 2367 objp->nextentry = NULL; 2368 break; 2369 } 2370 2371 if (objp->nextentry == NULL) { 2372 objp->nextentry = (entryplus3 *) 2373 mem_alloc(sizeof (entryplus3)); 2374 if (objp->nextentry == NULL) 2375 return (FALSE); 2376 bzero(objp->nextentry, sizeof (entryplus3)); 2377 } 2378 objp = objp->nextentry; 2379 } 2380 2381 } else if (xdrs->x_op == XDR_ENCODE) { 2382 2383 while (more_data) { 2384 if (!xdr_fileid3(xdrs, &objp->fileid)) 2385 return (FALSE); 2386 if (!xdr_filename3(xdrs, &objp->name)) 2387 return (FALSE); 2388 if (!xdr_cookie3(xdrs, &objp->cookie)) 2389 return (FALSE); 2390 if (!xdr_post_op_attr(xdrs, &objp->name_attributes)) 2391 return (FALSE); 2392 if (!xdr_post_op_fh3(xdrs, &objp->name_handle)) 2393 return (FALSE); 2394 objp = objp->nextentry; 2395 if (objp == NULL) 2396 more_data = FALSE; 2397 if (!xdr_bool(xdrs, &more_data)) 2398 return (FALSE); 2399 } 2400 2401 } else { 2402 2403 while (more_data) { 2404 if (!xdr_fileid3(xdrs, &objp->fileid)) 2405 return (FALSE); 2406 if (!xdr_filename3(xdrs, &objp->name)) 2407 return (FALSE); 2408 if (!xdr_cookie3(xdrs, &objp->cookie)) 2409 return (FALSE); 2410 if (!xdr_post_op_attr(xdrs, &objp->name_attributes)) 2411 return (FALSE); 2412 if (!xdr_post_op_fh3(xdrs, &objp->name_handle)) 2413 return (FALSE); 2414 tmp_entryplus3 = objp; 2415 objp = objp->nextentry; 2416 if (objp == NULL) 2417 more_data = FALSE; 2418 if (!first_objp) 2419 mem_free(tmp_entryplus3, sizeof (entryplus3)); 2420 else 2421 first_objp = FALSE; 2422 } 2423 2424 } 2425 return (TRUE); 2426 } 2427 2428 bool_t 2429 xdr_dirlistplus3(XDR *xdrs, dirlistplus3 *objp) 2430 { 2431 2432 rpc_inline_t *buf; 2433 2434 if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof (entryplus3), (xdrproc_t)xdr_entryplus3)) 2435 return (FALSE); 2436 if (!xdr_bool(xdrs, &objp->eof)) 2437 return (FALSE); 2438 return (TRUE); 2439 } 2440 2441 bool_t 2442 xdr_READDIRPLUS3resok(XDR *xdrs, READDIRPLUS3resok *objp) 2443 { 2444 2445 rpc_inline_t *buf; 2446 2447 if (!xdr_post_op_attr(xdrs, &objp->dir_attributes)) 2448 return (FALSE); 2449 if (!xdr_cookieverf3(xdrs, objp->cookieverf)) 2450 return (FALSE); 2451 if (!xdr_dirlistplus3(xdrs, &objp->reply)) 2452 return (FALSE); 2453 return (TRUE); 2454 } 2455 2456 bool_t 2457 xdr_READDIRPLUS3resfail(XDR *xdrs, READDIRPLUS3resfail *objp) 2458 { 2459 2460 rpc_inline_t *buf; 2461 2462 if (!xdr_post_op_attr(xdrs, &objp->dir_attributes)) 2463 return (FALSE); 2464 return (TRUE); 2465 } 2466 2467 bool_t 2468 xdr_READDIRPLUS3res(XDR *xdrs, READDIRPLUS3res *objp) 2469 { 2470 2471 rpc_inline_t *buf; 2472 2473 if (!xdr_nfsstat3(xdrs, &objp->status)) 2474 return (FALSE); 2475 switch (objp->status) { 2476 case NFS3_OK: 2477 if (!xdr_READDIRPLUS3resok(xdrs, &objp->READDIRPLUS3res_u.resok)) 2478 return (FALSE); 2479 break; 2480 default: 2481 if (!xdr_READDIRPLUS3resfail(xdrs, &objp->READDIRPLUS3res_u.resfail)) 2482 return (FALSE); 2483 break; 2484 } 2485 return (TRUE); 2486 } 2487 2488 bool_t 2489 xdr_FSSTAT3args(XDR *xdrs, FSSTAT3args *objp) 2490 { 2491 2492 rpc_inline_t *buf; 2493 2494 if (!xdr_nfs_fh3(xdrs, &objp->fsroot)) 2495 return (FALSE); 2496 return (TRUE); 2497 } 2498 2499 bool_t 2500 xdr_FSSTAT3resok(XDR *xdrs, FSSTAT3resok *objp) 2501 { 2502 2503 rpc_inline_t *buf; 2504 2505 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 2506 return (FALSE); 2507 if (!xdr_size3(xdrs, &objp->tbytes)) 2508 return (FALSE); 2509 if (!xdr_size3(xdrs, &objp->fbytes)) 2510 return (FALSE); 2511 if (!xdr_size3(xdrs, &objp->abytes)) 2512 return (FALSE); 2513 if (!xdr_size3(xdrs, &objp->tfiles)) 2514 return (FALSE); 2515 if (!xdr_size3(xdrs, &objp->ffiles)) 2516 return (FALSE); 2517 if (!xdr_size3(xdrs, &objp->afiles)) 2518 return (FALSE); 2519 if (!xdr_uint32(xdrs, &objp->invarsec)) 2520 return (FALSE); 2521 return (TRUE); 2522 } 2523 2524 bool_t 2525 xdr_FSSTAT3resfail(XDR *xdrs, FSSTAT3resfail *objp) 2526 { 2527 2528 rpc_inline_t *buf; 2529 2530 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 2531 return (FALSE); 2532 return (TRUE); 2533 } 2534 2535 bool_t 2536 xdr_FSSTAT3res(XDR *xdrs, FSSTAT3res *objp) 2537 { 2538 2539 rpc_inline_t *buf; 2540 2541 if (!xdr_nfsstat3(xdrs, &objp->status)) 2542 return (FALSE); 2543 switch (objp->status) { 2544 case NFS3_OK: 2545 if (!xdr_FSSTAT3resok(xdrs, &objp->FSSTAT3res_u.resok)) 2546 return (FALSE); 2547 break; 2548 default: 2549 if (!xdr_FSSTAT3resfail(xdrs, &objp->FSSTAT3res_u.resfail)) 2550 return (FALSE); 2551 break; 2552 } 2553 return (TRUE); 2554 } 2555 2556 bool_t 2557 xdr_FSINFO3args(XDR *xdrs, FSINFO3args *objp) 2558 { 2559 2560 rpc_inline_t *buf; 2561 2562 if (!xdr_nfs_fh3(xdrs, &objp->fsroot)) 2563 return (FALSE); 2564 return (TRUE); 2565 } 2566 2567 bool_t 2568 xdr_FSINFO3resok(XDR *xdrs, FSINFO3resok *objp) 2569 { 2570 2571 rpc_inline_t *buf; 2572 2573 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 2574 return (FALSE); 2575 if (!xdr_uint32(xdrs, &objp->rtmax)) 2576 return (FALSE); 2577 if (!xdr_uint32(xdrs, &objp->rtpref)) 2578 return (FALSE); 2579 if (!xdr_uint32(xdrs, &objp->rtmult)) 2580 return (FALSE); 2581 if (!xdr_uint32(xdrs, &objp->wtmax)) 2582 return (FALSE); 2583 if (!xdr_uint32(xdrs, &objp->wtpref)) 2584 return (FALSE); 2585 if (!xdr_uint32(xdrs, &objp->wtmult)) 2586 return (FALSE); 2587 if (!xdr_uint32(xdrs, &objp->dtpref)) 2588 return (FALSE); 2589 if (!xdr_size3(xdrs, &objp->maxfilesize)) 2590 return (FALSE); 2591 if (!xdr_nfstime3(xdrs, &objp->time_delta)) 2592 return (FALSE); 2593 if (!xdr_uint32(xdrs, &objp->properties)) 2594 return (FALSE); 2595 return (TRUE); 2596 } 2597 2598 bool_t 2599 xdr_FSINFO3resfail(XDR *xdrs, FSINFO3resfail *objp) 2600 { 2601 2602 rpc_inline_t *buf; 2603 2604 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 2605 return (FALSE); 2606 return (TRUE); 2607 } 2608 2609 bool_t 2610 xdr_FSINFO3res(XDR *xdrs, FSINFO3res *objp) 2611 { 2612 2613 rpc_inline_t *buf; 2614 2615 if (!xdr_nfsstat3(xdrs, &objp->status)) 2616 return (FALSE); 2617 switch (objp->status) { 2618 case NFS3_OK: 2619 if (!xdr_FSINFO3resok(xdrs, &objp->FSINFO3res_u.resok)) 2620 return (FALSE); 2621 break; 2622 default: 2623 if (!xdr_FSINFO3resfail(xdrs, &objp->FSINFO3res_u.resfail)) 2624 return (FALSE); 2625 break; 2626 } 2627 return (TRUE); 2628 } 2629 2630 bool_t 2631 xdr_PATHCONF3args(XDR *xdrs, PATHCONF3args *objp) 2632 { 2633 2634 rpc_inline_t *buf; 2635 2636 if (!xdr_nfs_fh3(xdrs, &objp->object)) 2637 return (FALSE); 2638 return (TRUE); 2639 } 2640 2641 bool_t 2642 xdr_PATHCONF3resok(XDR *xdrs, PATHCONF3resok *objp) 2643 { 2644 2645 rpc_inline_t *buf; 2646 2647 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 2648 return (FALSE); 2649 if (!xdr_uint32(xdrs, &objp->linkmax)) 2650 return (FALSE); 2651 if (!xdr_uint32(xdrs, &objp->name_max)) 2652 return (FALSE); 2653 if (!xdr_bool(xdrs, &objp->no_trunc)) 2654 return (FALSE); 2655 if (!xdr_bool(xdrs, &objp->chown_restricted)) 2656 return (FALSE); 2657 if (!xdr_bool(xdrs, &objp->case_insensitive)) 2658 return (FALSE); 2659 if (!xdr_bool(xdrs, &objp->case_preserving)) 2660 return (FALSE); 2661 return (TRUE); 2662 } 2663 2664 bool_t 2665 xdr_PATHCONF3resfail(XDR *xdrs, PATHCONF3resfail *objp) 2666 { 2667 2668 rpc_inline_t *buf; 2669 2670 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) 2671 return (FALSE); 2672 return (TRUE); 2673 } 2674 2675 bool_t 2676 xdr_PATHCONF3res(XDR *xdrs, PATHCONF3res *objp) 2677 { 2678 2679 rpc_inline_t *buf; 2680 2681 if (!xdr_nfsstat3(xdrs, &objp->status)) 2682 return (FALSE); 2683 switch (objp->status) { 2684 case NFS3_OK: 2685 if (!xdr_PATHCONF3resok(xdrs, &objp->PATHCONF3res_u.resok)) 2686 return (FALSE); 2687 break; 2688 default: 2689 if (!xdr_PATHCONF3resfail(xdrs, &objp->PATHCONF3res_u.resfail)) 2690 return (FALSE); 2691 break; 2692 } 2693 return (TRUE); 2694 } 2695 2696 bool_t 2697 xdr_COMMIT3args(XDR *xdrs, COMMIT3args *objp) 2698 { 2699 2700 rpc_inline_t *buf; 2701 2702 if (!xdr_nfs_fh3(xdrs, &objp->file)) 2703 return (FALSE); 2704 if (!xdr_offset3(xdrs, &objp->offset)) 2705 return (FALSE); 2706 if (!xdr_count3(xdrs, &objp->count)) 2707 return (FALSE); 2708 return (TRUE); 2709 } 2710 2711 bool_t 2712 xdr_COMMIT3resok(XDR *xdrs, COMMIT3resok *objp) 2713 { 2714 2715 rpc_inline_t *buf; 2716 2717 if (!xdr_wcc_data(xdrs, &objp->file_wcc)) 2718 return (FALSE); 2719 if (!xdr_writeverf3(xdrs, objp->verf)) 2720 return (FALSE); 2721 return (TRUE); 2722 } 2723 2724 bool_t 2725 xdr_COMMIT3resfail(XDR *xdrs, COMMIT3resfail *objp) 2726 { 2727 2728 rpc_inline_t *buf; 2729 2730 if (!xdr_wcc_data(xdrs, &objp->file_wcc)) 2731 return (FALSE); 2732 return (TRUE); 2733 } 2734 2735 bool_t 2736 xdr_COMMIT3res(XDR *xdrs, COMMIT3res *objp) 2737 { 2738 2739 rpc_inline_t *buf; 2740 2741 if (!xdr_nfsstat3(xdrs, &objp->status)) 2742 return (FALSE); 2743 switch (objp->status) { 2744 case NFS3_OK: 2745 if (!xdr_COMMIT3resok(xdrs, &objp->COMMIT3res_u.resok)) 2746 return (FALSE); 2747 break; 2748 default: 2749 if (!xdr_COMMIT3resfail(xdrs, &objp->COMMIT3res_u.resfail)) 2750 return (FALSE); 2751 break; 2752 } 2753 return (TRUE); 2754 } 2755