1 /* 2 * Please do not edit this file. 3 * It was generated using ndrgen. 4 */ 5 6 #include <strings.h> 7 #include <smbsrv/ndr.h> 8 #include <smbsrv/ndl/rpcpdu.ndl> 9 10 extern struct ndr_typeinfo ndt__char; 11 extern struct ndr_typeinfo ndt_s_char; 12 extern struct ndr_typeinfo ndt__uchar; 13 extern struct ndr_typeinfo ndt_s_uchar; 14 extern struct ndr_typeinfo ndt__wchar; 15 extern struct ndr_typeinfo ndt_s_wchar; 16 extern struct ndr_typeinfo ndt__short; 17 extern struct ndr_typeinfo ndt_s_short; 18 extern struct ndr_typeinfo ndt__ushort; 19 extern struct ndr_typeinfo ndt_s_ushort; 20 extern struct ndr_typeinfo ndt__long; 21 extern struct ndr_typeinfo ndt_s_long; 22 extern struct ndr_typeinfo ndt__ulong; 23 extern struct ndr_typeinfo ndt_s_ulong; 24 25 26 27 int ndr__ndr_dce_uuid (struct ndr_reference *encl_ref); 28 struct ndr_typeinfo ndt__ndr_dce_uuid = { 29 1, /* NDR version */ 30 3, /* alignment */ 31 NDR_F_STRUCT, /* flags */ 32 ndr__ndr_dce_uuid, /* ndr_func */ 33 16, /* pdu_size_fixed_part */ 34 0, /* pdu_size_variable_part */ 35 16, /* c_size_fixed_part */ 36 0, /* c_size_variable_part */ 37 }; 38 39 40 /* 41 * */ 42 int 43 ndr__ndr_dce_uuid (struct ndr_reference *encl_ref) 44 { 45 struct ndr_dce_uuid *val = (struct ndr_dce_uuid *) encl_ref->datum; 46 struct ndr_reference myref; 47 48 (void) bzero(&myref, sizeof (myref)); 49 myref.enclosing = encl_ref; 50 myref.stream = encl_ref->stream; 51 52 /* do all basic elements first */ 53 NDR_MEMBER (_ulong, time_low, 0UL); 54 NDR_MEMBER (_ushort, time_mid, 4UL); 55 NDR_MEMBER (_ushort, time_hi_and_version, 6UL); 56 NDR_MEMBER (_uchar, clock_seq_hi_and_reserved, 8UL); 57 NDR_MEMBER (_uchar, clock_seq_low, 9UL); 58 59 /* do all constructed elements w/o pointers */ 60 NDR_MEMBER_ARR_WITH_DIMENSION (_uchar, node, 10UL, 61 6); 62 63 /* do members with pointers in order */ 64 65 return 1; 66 } 67 68 69 70 int ndr__ndr_uuid (struct ndr_reference *encl_ref); 71 struct ndr_typeinfo ndt__ndr_uuid = { 72 1, /* NDR version */ 73 3, /* alignment */ 74 NDR_F_STRUCT, /* flags */ 75 ndr__ndr_uuid, /* ndr_func */ 76 16, /* pdu_size_fixed_part */ 77 0, /* pdu_size_variable_part */ 78 16, /* c_size_fixed_part */ 79 0, /* c_size_variable_part */ 80 }; 81 82 83 /* 84 * */ 85 int 86 ndr__ndr_uuid (struct ndr_reference *encl_ref) 87 { 88 struct ndr_uuid *val = (struct ndr_uuid *) encl_ref->datum; 89 struct ndr_reference myref; 90 91 (void) bzero(&myref, sizeof (myref)); 92 myref.enclosing = encl_ref; 93 myref.stream = encl_ref->stream; 94 95 /* do all basic elements first */ 96 NDR_MEMBER (_ulong, data1, 0UL); 97 NDR_MEMBER (_ushort, data2, 4UL); 98 NDR_MEMBER (_ushort, data3, 6UL); 99 100 /* do all constructed elements w/o pointers */ 101 NDR_MEMBER_ARR_WITH_DIMENSION (_uchar, data4, 8UL, 102 8); 103 104 /* do members with pointers in order */ 105 106 return 1; 107 } 108 109 110 111 int ndr__ndr_representation_label (struct ndr_reference *encl_ref); 112 struct ndr_typeinfo ndt__ndr_representation_label = { 113 1, /* NDR version */ 114 0, /* alignment */ 115 NDR_F_STRUCT, /* flags */ 116 ndr__ndr_representation_label, /* ndr_func */ 117 4, /* pdu_size_fixed_part */ 118 0, /* pdu_size_variable_part */ 119 4, /* c_size_fixed_part */ 120 0, /* c_size_variable_part */ 121 }; 122 123 124 /* 125 * */ 126 int 127 ndr__ndr_representation_label (struct ndr_reference *encl_ref) 128 { 129 struct ndr_representation_label *val = (struct ndr_representation_label *) encl_ref->datum; 130 struct ndr_reference myref; 131 132 (void) bzero(&myref, sizeof (myref)); 133 myref.enclosing = encl_ref; 134 myref.stream = encl_ref->stream; 135 136 /* do all basic elements first */ 137 NDR_MEMBER (_uchar, intg_char_rep, 0UL); 138 NDR_MEMBER (_uchar, float_rep, 1UL); 139 140 /* do all constructed elements w/o pointers */ 141 NDR_MEMBER_ARR_WITH_DIMENSION (_uchar, _spare, 2UL, 142 2); 143 144 /* do members with pointers in order */ 145 146 return 1; 147 } 148 149 150 151 int ndr__ndr_p_syntax_id (struct ndr_reference *encl_ref); 152 struct ndr_typeinfo ndt__ndr_p_syntax_id = { 153 1, /* NDR version */ 154 3, /* alignment */ 155 NDR_F_STRUCT, /* flags */ 156 ndr__ndr_p_syntax_id, /* ndr_func */ 157 20, /* pdu_size_fixed_part */ 158 0, /* pdu_size_variable_part */ 159 20, /* c_size_fixed_part */ 160 0, /* c_size_variable_part */ 161 }; 162 163 164 /* 165 * [_no_reorder] 166 */ 167 int 168 ndr__ndr_p_syntax_id (struct ndr_reference *encl_ref) 169 { 170 struct ndr_p_syntax_id *val = (struct ndr_p_syntax_id *) encl_ref->datum; 171 struct ndr_reference myref; 172 173 (void) bzero(&myref, sizeof (myref)); 174 myref.enclosing = encl_ref; 175 myref.stream = encl_ref->stream; 176 177 /* do all members in order */ 178 NDR_MEMBER (_ndr_uuid, if_uuid, 0UL); 179 NDR_MEMBER (_ulong, if_version, 16UL); 180 181 return 1; 182 } 183 184 185 186 int ndr__ndr_common_header (struct ndr_reference *encl_ref); 187 struct ndr_typeinfo ndt__ndr_common_header = { 188 1, /* NDR version */ 189 3, /* alignment */ 190 NDR_F_STRUCT, /* flags */ 191 ndr__ndr_common_header, /* ndr_func */ 192 16, /* pdu_size_fixed_part */ 193 0, /* pdu_size_variable_part */ 194 16, /* c_size_fixed_part */ 195 0, /* c_size_variable_part */ 196 }; 197 198 199 /* 200 * [_no_reorder] 201 */ 202 int 203 ndr__ndr_common_header (struct ndr_reference *encl_ref) 204 { 205 struct ndr_common_header *val = (struct ndr_common_header *) encl_ref->datum; 206 struct ndr_reference myref; 207 208 (void) bzero(&myref, sizeof (myref)); 209 myref.enclosing = encl_ref; 210 myref.stream = encl_ref->stream; 211 212 /* do all members in order */ 213 NDR_MEMBER (_uchar, rpc_vers, 0UL); 214 NDR_MEMBER (_uchar, rpc_vers_minor, 1UL); 215 NDR_MEMBER (_uchar, ptype, 2UL); 216 NDR_MEMBER (_uchar, pfc_flags, 3UL); 217 NDR_MEMBER (_ndr_representation_label, packed_drep, 4UL); 218 NDR_MEMBER (_ushort, frag_length, 8UL); 219 NDR_MEMBER (_ushort, auth_length, 10UL); 220 NDR_MEMBER (_ulong, call_id, 12UL); 221 222 return 1; 223 } 224 225 226 227 int ndr__ndr_serialtype1_hdr (struct ndr_reference *encl_ref); 228 struct ndr_typeinfo ndt__ndr_serialtype1_hdr = { 229 1, /* NDR version */ 230 3, /* alignment */ 231 NDR_F_STRUCT, /* flags */ 232 ndr__ndr_serialtype1_hdr, /* ndr_func */ 233 8, /* pdu_size_fixed_part */ 234 0, /* pdu_size_variable_part */ 235 8, /* c_size_fixed_part */ 236 0, /* c_size_variable_part */ 237 }; 238 239 240 /* 241 * [_no_reorder] 242 */ 243 int 244 ndr__ndr_serialtype1_hdr (struct ndr_reference *encl_ref) 245 { 246 struct ndr_serialtype1_hdr *val = (struct ndr_serialtype1_hdr *) encl_ref->datum; 247 struct ndr_reference myref; 248 249 (void) bzero(&myref, sizeof (myref)); 250 myref.enclosing = encl_ref; 251 myref.stream = encl_ref->stream; 252 253 /* do all members in order */ 254 NDR_MEMBER (_uchar, version, 0UL); 255 NDR_MEMBER (_uchar, endianness, 1UL); 256 NDR_MEMBER (_ushort, hdrlen, 2UL); 257 NDR_MEMBER (_ulong, filler, 4UL); 258 259 return 1; 260 } 261 262 263 264 int ndr__ndr_serialtype1_priv_hdr (struct ndr_reference *encl_ref); 265 struct ndr_typeinfo ndt__ndr_serialtype1_priv_hdr = { 266 1, /* NDR version */ 267 3, /* alignment */ 268 NDR_F_STRUCT, /* flags */ 269 ndr__ndr_serialtype1_priv_hdr, /* ndr_func */ 270 8, /* pdu_size_fixed_part */ 271 0, /* pdu_size_variable_part */ 272 8, /* c_size_fixed_part */ 273 0, /* c_size_variable_part */ 274 }; 275 276 277 /* 278 * [_no_reorder] 279 */ 280 int 281 ndr__ndr_serialtype1_priv_hdr (struct ndr_reference *encl_ref) 282 { 283 struct ndr_serialtype1_priv_hdr *val = (struct ndr_serialtype1_priv_hdr *) encl_ref->datum; 284 struct ndr_reference myref; 285 286 (void) bzero(&myref, sizeof (myref)); 287 myref.enclosing = encl_ref; 288 myref.stream = encl_ref->stream; 289 290 /* do all members in order */ 291 NDR_MEMBER (_ulong, buflen, 0UL); 292 NDR_MEMBER (_ulong, filler, 4UL); 293 294 return 1; 295 } 296 297 298 299 int ndr__ndr_serialtype2_hdr (struct ndr_reference *encl_ref); 300 struct ndr_typeinfo ndt__ndr_serialtype2_hdr = { 301 1, /* NDR version */ 302 3, /* alignment */ 303 NDR_F_STRUCT, /* flags */ 304 ndr__ndr_serialtype2_hdr, /* ndr_func */ 305 64, /* pdu_size_fixed_part */ 306 0, /* pdu_size_variable_part */ 307 64, /* c_size_fixed_part */ 308 0, /* c_size_variable_part */ 309 }; 310 311 312 /* 313 * [_no_reorder] 314 */ 315 int 316 ndr__ndr_serialtype2_hdr (struct ndr_reference *encl_ref) 317 { 318 struct ndr_serialtype2_hdr *val = (struct ndr_serialtype2_hdr *) encl_ref->datum; 319 struct ndr_reference myref; 320 321 (void) bzero(&myref, sizeof (myref)); 322 myref.enclosing = encl_ref; 323 myref.stream = encl_ref->stream; 324 325 /* do all members in order */ 326 NDR_MEMBER (_uchar, version, 0UL); 327 NDR_MEMBER (_uchar, endianness, 1UL); 328 NDR_MEMBER (_ushort, hdrlen, 2UL); 329 NDR_MEMBER (_ulong, endianinfo, 4UL); 330 NDR_MEMBER_ARR_WITH_DIMENSION (_ulong, reserved, 8UL, 331 4); 332 NDR_MEMBER (_ndr_p_syntax_id, transfer_syntax, 24UL); 333 NDR_MEMBER (_ndr_p_syntax_id, interface_id, 44UL); 334 335 return 1; 336 } 337 338 339 340 int ndr__ndr_serialtype2_priv_hdr (struct ndr_reference *encl_ref); 341 struct ndr_typeinfo ndt__ndr_serialtype2_priv_hdr = { 342 1, /* NDR version */ 343 3, /* alignment */ 344 NDR_F_STRUCT, /* flags */ 345 ndr__ndr_serialtype2_priv_hdr, /* ndr_func */ 346 16, /* pdu_size_fixed_part */ 347 0, /* pdu_size_variable_part */ 348 16, /* c_size_fixed_part */ 349 0, /* c_size_variable_part */ 350 }; 351 352 353 /* 354 * [_no_reorder] 355 */ 356 int 357 ndr__ndr_serialtype2_priv_hdr (struct ndr_reference *encl_ref) 358 { 359 struct ndr_serialtype2_priv_hdr *val = (struct ndr_serialtype2_priv_hdr *) encl_ref->datum; 360 struct ndr_reference myref; 361 362 (void) bzero(&myref, sizeof (myref)); 363 myref.enclosing = encl_ref; 364 myref.stream = encl_ref->stream; 365 366 /* do all members in order */ 367 NDR_MEMBER (_ulong, buflen, 0UL); 368 NDR_MEMBER_ARR_WITH_DIMENSION (_ulong, filler, 4UL, 369 3); 370 371 return 1; 372 } 373 374 375 376 int ndr__ndr_pac_hdr (struct ndr_reference *encl_ref); 377 struct ndr_typeinfo ndt__ndr_pac_hdr = { 378 1, /* NDR version */ 379 3, /* alignment */ 380 NDR_F_STRUCT, /* flags */ 381 ndr__ndr_pac_hdr, /* ndr_func */ 382 20, /* pdu_size_fixed_part */ 383 0, /* pdu_size_variable_part */ 384 20, /* c_size_fixed_part */ 385 0, /* c_size_variable_part */ 386 }; 387 388 389 /* 390 * [_no_reorder] 391 */ 392 int 393 ndr__ndr_pac_hdr (struct ndr_reference *encl_ref) 394 { 395 struct ndr_pac_hdr *val = (struct ndr_pac_hdr *) encl_ref->datum; 396 struct ndr_reference myref; 397 398 (void) bzero(&myref, sizeof (myref)); 399 myref.enclosing = encl_ref; 400 myref.stream = encl_ref->stream; 401 402 /* do all members in order */ 403 NDR_MEMBER (_ndr_serialtype1_hdr, common_hdr, 0UL); 404 NDR_MEMBER (_ndr_serialtype1_priv_hdr, priv_hdr, 8UL); 405 NDR_MEMBER (_ulong, ref_pointer, 16UL); 406 407 return 1; 408 } 409 410 411 412 int ndr__ndr_p_cont_elem (struct ndr_reference *encl_ref); 413 struct ndr_typeinfo ndt__ndr_p_cont_elem = { 414 1, /* NDR version */ 415 3, /* alignment */ 416 NDR_F_STRUCT, /* flags */ 417 ndr__ndr_p_cont_elem, /* ndr_func */ 418 44, /* pdu_size_fixed_part */ 419 0, /* pdu_size_variable_part */ 420 44, /* c_size_fixed_part */ 421 0, /* c_size_variable_part */ 422 }; 423 424 425 /* 426 * [_no_reorder] 427 */ 428 int 429 ndr__ndr_p_cont_elem (struct ndr_reference *encl_ref) 430 { 431 struct ndr_p_cont_elem *val = (struct ndr_p_cont_elem *) encl_ref->datum; 432 struct ndr_reference myref; 433 434 (void) bzero(&myref, sizeof (myref)); 435 myref.enclosing = encl_ref; 436 myref.stream = encl_ref->stream; 437 438 /* do all members in order */ 439 NDR_MEMBER (_ushort, p_cont_id, 0UL); 440 NDR_MEMBER (_uchar, n_transfer_syn, 2UL); 441 NDR_MEMBER (_uchar, _reserved, 3UL); 442 NDR_MEMBER (_ndr_p_syntax_id, abstract_syntax, 4UL); 443 NDR_MEMBER_ARR_WITH_DIMENSION (_ndr_p_syntax_id, transfer_syntaxes, 24UL, 444 1); 445 446 return 1; 447 } 448 449 450 451 int ndr__ndr_p_cont_list (struct ndr_reference *encl_ref); 452 struct ndr_typeinfo ndt__ndr_p_cont_list = { 453 1, /* NDR version */ 454 3, /* alignment */ 455 NDR_F_STRUCT, /* flags */ 456 ndr__ndr_p_cont_list, /* ndr_func */ 457 48, /* pdu_size_fixed_part */ 458 0, /* pdu_size_variable_part */ 459 48, /* c_size_fixed_part */ 460 0, /* c_size_variable_part */ 461 }; 462 463 464 /* 465 * [_no_reorder] 466 */ 467 int 468 ndr__ndr_p_cont_list (struct ndr_reference *encl_ref) 469 { 470 struct ndr_p_cont_list *val = (struct ndr_p_cont_list *) encl_ref->datum; 471 struct ndr_reference myref; 472 473 (void) bzero(&myref, sizeof (myref)); 474 myref.enclosing = encl_ref; 475 myref.stream = encl_ref->stream; 476 477 /* do all members in order */ 478 NDR_MEMBER (_uchar, n_context_elem, 0UL); 479 NDR_MEMBER (_uchar, _reserved, 1UL); 480 NDR_MEMBER (_ushort, _reserved2, 2UL); 481 NDR_MEMBER_ARR_WITH_DIMENSION (_ndr_p_cont_elem, p_cont_elem, 4UL, 482 1); 483 484 return 1; 485 } 486 487 488 489 int ndr__ndr_p_result (struct ndr_reference *encl_ref); 490 struct ndr_typeinfo ndt__ndr_p_result = { 491 1, /* NDR version */ 492 3, /* alignment */ 493 NDR_F_STRUCT, /* flags */ 494 ndr__ndr_p_result, /* ndr_func */ 495 24, /* pdu_size_fixed_part */ 496 0, /* pdu_size_variable_part */ 497 24, /* c_size_fixed_part */ 498 0, /* c_size_variable_part */ 499 }; 500 501 502 /* 503 * [_no_reorder] 504 */ 505 int 506 ndr__ndr_p_result (struct ndr_reference *encl_ref) 507 { 508 struct ndr_p_result *val = (struct ndr_p_result *) encl_ref->datum; 509 struct ndr_reference myref; 510 511 (void) bzero(&myref, sizeof (myref)); 512 myref.enclosing = encl_ref; 513 myref.stream = encl_ref->stream; 514 515 /* do all members in order */ 516 NDR_MEMBER (_ushort, result, 0UL); 517 NDR_MEMBER (_ushort, reason, 2UL); 518 NDR_MEMBER (_ndr_p_syntax_id, transfer_syntax, 4UL); 519 520 return 1; 521 } 522 523 524 525 int ndr__ndr_p_result_list (struct ndr_reference *encl_ref); 526 struct ndr_typeinfo ndt__ndr_p_result_list = { 527 1, /* NDR version */ 528 3, /* alignment */ 529 NDR_F_STRUCT, /* flags */ 530 ndr__ndr_p_result_list, /* ndr_func */ 531 28, /* pdu_size_fixed_part */ 532 0, /* pdu_size_variable_part */ 533 28, /* c_size_fixed_part */ 534 0, /* c_size_variable_part */ 535 }; 536 537 538 /* 539 * [_no_reorder] 540 */ 541 int 542 ndr__ndr_p_result_list (struct ndr_reference *encl_ref) 543 { 544 struct ndr_p_result_list *val = (struct ndr_p_result_list *) encl_ref->datum; 545 struct ndr_reference myref; 546 547 (void) bzero(&myref, sizeof (myref)); 548 myref.enclosing = encl_ref; 549 myref.stream = encl_ref->stream; 550 551 /* do all members in order */ 552 NDR_MEMBER (_uchar, n_results, 0UL); 553 NDR_MEMBER (_uchar, reserved, 1UL); 554 NDR_MEMBER (_ushort, reserved2, 2UL); 555 NDR_MEMBER_ARR_WITH_DIMENSION (_ndr_p_result, p_results, 4UL, 556 1); 557 558 return 1; 559 } 560 561 562 563 int ndr__ndr_port_any (struct ndr_reference *encl_ref); 564 struct ndr_typeinfo ndt__ndr_port_any = { 565 1, /* NDR version */ 566 1, /* alignment */ 567 NDR_F_STRUCT, /* flags */ 568 ndr__ndr_port_any, /* ndr_func */ 569 32, /* pdu_size_fixed_part */ 570 0, /* pdu_size_variable_part */ 571 32, /* c_size_fixed_part */ 572 0, /* c_size_variable_part */ 573 }; 574 575 576 /* 577 * [_no_reorder] 578 */ 579 int 580 ndr__ndr_port_any (struct ndr_reference *encl_ref) 581 { 582 struct ndr_port_any *val = (struct ndr_port_any *) encl_ref->datum; 583 struct ndr_reference myref; 584 585 (void) bzero(&myref, sizeof (myref)); 586 myref.enclosing = encl_ref; 587 myref.stream = encl_ref->stream; 588 589 /* do all members in order */ 590 NDR_MEMBER (_ushort, length, 0UL); 591 NDR_MEMBER_ARR_WITH_DIMENSION (_uchar, port_spec, 2UL, 592 30); 593 594 return 1; 595 } 596 597 598 599 int ndr__ndr_alter_context_hdr (struct ndr_reference *encl_ref); 600 struct ndr_typeinfo ndt__ndr_alter_context_hdr = { 601 1, /* NDR version */ 602 3, /* alignment */ 603 NDR_F_STRUCT, /* flags */ 604 ndr__ndr_alter_context_hdr, /* ndr_func */ 605 72, /* pdu_size_fixed_part */ 606 0, /* pdu_size_variable_part */ 607 72, /* c_size_fixed_part */ 608 0, /* c_size_variable_part */ 609 }; 610 611 612 /* 613 * [_no_reorder] 614 */ 615 int 616 ndr__ndr_alter_context_hdr (struct ndr_reference *encl_ref) 617 { 618 struct ndr_alter_context_hdr *val = (struct ndr_alter_context_hdr *) encl_ref->datum; 619 struct ndr_reference myref; 620 621 (void) bzero(&myref, sizeof (myref)); 622 myref.enclosing = encl_ref; 623 myref.stream = encl_ref->stream; 624 625 /* do all members in order */ 626 NDR_MEMBER (_ndr_common_header, common_hdr, 0UL); 627 NDR_MEMBER (_ushort, max_xmit_frag, 16UL); 628 NDR_MEMBER (_ushort, max_recv_frag, 18UL); 629 NDR_MEMBER (_ulong, assoc_group_id, 20UL); 630 NDR_MEMBER (_ndr_p_cont_list, p_context_elem, 24UL); 631 632 return 1; 633 } 634 extern struct ndr_typeinfo ndt__ndr_alter_context_rsp_hdr; 635 636 637 638 int ndr__ndr_bind_hdr (struct ndr_reference *encl_ref); 639 struct ndr_typeinfo ndt__ndr_bind_hdr = { 640 1, /* NDR version */ 641 3, /* alignment */ 642 NDR_F_STRUCT, /* flags */ 643 ndr__ndr_bind_hdr, /* ndr_func */ 644 72, /* pdu_size_fixed_part */ 645 0, /* pdu_size_variable_part */ 646 72, /* c_size_fixed_part */ 647 0, /* c_size_variable_part */ 648 }; 649 650 651 /* 652 * [_no_reorder] 653 */ 654 int 655 ndr__ndr_bind_hdr (struct ndr_reference *encl_ref) 656 { 657 struct ndr_bind_hdr *val = (struct ndr_bind_hdr *) encl_ref->datum; 658 struct ndr_reference myref; 659 660 (void) bzero(&myref, sizeof (myref)); 661 myref.enclosing = encl_ref; 662 myref.stream = encl_ref->stream; 663 664 /* do all members in order */ 665 NDR_MEMBER (_ndr_common_header, common_hdr, 0UL); 666 NDR_MEMBER (_ushort, max_xmit_frag, 16UL); 667 NDR_MEMBER (_ushort, max_recv_frag, 18UL); 668 NDR_MEMBER (_ulong, assoc_group_id, 20UL); 669 NDR_MEMBER (_ndr_p_cont_list, p_context_elem, 24UL); 670 671 return 1; 672 } 673 extern struct ndr_typeinfo ndt__ndr_bind_ack_hdr; 674 675 676 677 int ndr__ndr_request_hdr (struct ndr_reference *encl_ref); 678 struct ndr_typeinfo ndt__ndr_request_hdr = { 679 1, /* NDR version */ 680 3, /* alignment */ 681 NDR_F_STRUCT, /* flags */ 682 ndr__ndr_request_hdr, /* ndr_func */ 683 24, /* pdu_size_fixed_part */ 684 0, /* pdu_size_variable_part */ 685 24, /* c_size_fixed_part */ 686 0, /* c_size_variable_part */ 687 }; 688 689 690 /* 691 * [_no_reorder] 692 */ 693 int 694 ndr__ndr_request_hdr (struct ndr_reference *encl_ref) 695 { 696 struct ndr_request_hdr *val = (struct ndr_request_hdr *) encl_ref->datum; 697 struct ndr_reference myref; 698 699 (void) bzero(&myref, sizeof (myref)); 700 myref.enclosing = encl_ref; 701 myref.stream = encl_ref->stream; 702 703 /* do all members in order */ 704 NDR_MEMBER (_ndr_common_header, common_hdr, 0UL); 705 NDR_MEMBER (_ulong, alloc_hint, 16UL); 706 NDR_MEMBER (_ushort, p_cont_id, 20UL); 707 NDR_MEMBER (_ushort, opnum, 22UL); 708 709 return 1; 710 } 711 712 713 714 int ndr__ndr_request_hdr_with_object (struct ndr_reference *encl_ref); 715 struct ndr_typeinfo ndt__ndr_request_hdr_with_object = { 716 1, /* NDR version */ 717 3, /* alignment */ 718 NDR_F_STRUCT, /* flags */ 719 ndr__ndr_request_hdr_with_object, /* ndr_func */ 720 40, /* pdu_size_fixed_part */ 721 0, /* pdu_size_variable_part */ 722 40, /* c_size_fixed_part */ 723 0, /* c_size_variable_part */ 724 }; 725 726 727 /* 728 * [_no_reorder] 729 */ 730 int 731 ndr__ndr_request_hdr_with_object (struct ndr_reference *encl_ref) 732 { 733 struct ndr_request_hdr_with_object *val = (struct ndr_request_hdr_with_object *) encl_ref->datum; 734 struct ndr_reference myref; 735 736 (void) bzero(&myref, sizeof (myref)); 737 myref.enclosing = encl_ref; 738 myref.stream = encl_ref->stream; 739 740 /* do all members in order */ 741 NDR_MEMBER (_ndr_common_header, common_hdr, 0UL); 742 NDR_MEMBER (_ulong, alloc_hint, 16UL); 743 NDR_MEMBER (_ushort, p_cont_id, 20UL); 744 NDR_MEMBER (_ushort, opnum, 22UL); 745 NDR_MEMBER (_ndr_uuid, object, 24UL); 746 747 return 1; 748 } 749 750 751 752 int ndr__ndr_response_hdr (struct ndr_reference *encl_ref); 753 struct ndr_typeinfo ndt__ndr_response_hdr = { 754 1, /* NDR version */ 755 3, /* alignment */ 756 NDR_F_STRUCT, /* flags */ 757 ndr__ndr_response_hdr, /* ndr_func */ 758 24, /* pdu_size_fixed_part */ 759 0, /* pdu_size_variable_part */ 760 24, /* c_size_fixed_part */ 761 0, /* c_size_variable_part */ 762 }; 763 764 765 /* 766 * [_no_reorder] 767 */ 768 int 769 ndr__ndr_response_hdr (struct ndr_reference *encl_ref) 770 { 771 struct ndr_response_hdr *val = (struct ndr_response_hdr *) encl_ref->datum; 772 struct ndr_reference myref; 773 774 (void) bzero(&myref, sizeof (myref)); 775 myref.enclosing = encl_ref; 776 myref.stream = encl_ref->stream; 777 778 /* do all members in order */ 779 NDR_MEMBER (_ndr_common_header, common_hdr, 0UL); 780 NDR_MEMBER (_ulong, alloc_hint, 16UL); 781 NDR_MEMBER (_ushort, p_cont_id, 20UL); 782 NDR_MEMBER (_uchar, cancel_count, 22UL); 783 NDR_MEMBER (_uchar, reserved, 23UL); 784 785 return 1; 786 } 787 788 789 790 int ndr__ndr_fault_hdr (struct ndr_reference *encl_ref); 791 struct ndr_typeinfo ndt__ndr_fault_hdr = { 792 1, /* NDR version */ 793 3, /* alignment */ 794 NDR_F_STRUCT, /* flags */ 795 ndr__ndr_fault_hdr, /* ndr_func */ 796 32, /* pdu_size_fixed_part */ 797 0, /* pdu_size_variable_part */ 798 32, /* c_size_fixed_part */ 799 0, /* c_size_variable_part */ 800 }; 801 802 803 /* 804 * [_no_reorder] 805 */ 806 int 807 ndr__ndr_fault_hdr (struct ndr_reference *encl_ref) 808 { 809 struct ndr_fault_hdr *val = (struct ndr_fault_hdr *) encl_ref->datum; 810 struct ndr_reference myref; 811 812 (void) bzero(&myref, sizeof (myref)); 813 myref.enclosing = encl_ref; 814 myref.stream = encl_ref->stream; 815 816 /* do all members in order */ 817 NDR_MEMBER (_ndr_common_header, common_hdr, 0UL); 818 NDR_MEMBER (_ulong, alloc_hint, 16UL); 819 NDR_MEMBER (_ushort, p_cont_id, 20UL); 820 NDR_MEMBER (_uchar, cancel_count, 22UL); 821 NDR_MEMBER (_uchar, reserved, 23UL); 822 NDR_MEMBER (_ulong, status, 24UL); 823 NDR_MEMBER_ARR_WITH_DIMENSION (_uchar, reserved2, 28UL, 824 4); 825 826 return 1; 827 } 828 829 830 831 int ndr__ndr_hdr (struct ndr_reference *encl_ref); 832 struct ndr_typeinfo ndt__ndr_hdr = { 833 1, /* NDR version */ 834 3, /* alignment */ 835 NDR_F_INTERFACE, /* flags */ 836 ndr__ndr_hdr, /* ndr_func */ 837 84, /* pdu_size_fixed_part */ 838 0, /* pdu_size_variable_part */ 839 84, /* c_size_fixed_part */ 840 0, /* c_size_variable_part */ 841 }; 842 843 844 /* 845 * [interface(0)] 846 */ 847 int 848 ndr__ndr_hdr (struct ndr_reference *encl_ref) 849 { 850 union ndr_hdr *val = (union ndr_hdr *) encl_ref->datum; 851 struct ndr_reference myref; 852 853 (void) bzero(&myref, sizeof (myref)); 854 myref.enclosing = encl_ref; 855 myref.stream = encl_ref->stream; 856 857 switch (encl_ref->switch_is) { 858 case 999: 859 NDR_PARAMS_MEMBER (_ndr_common_header, common_hdr); 860 break; 861 862 case 11: 863 NDR_PARAMS_MEMBER (_ndr_bind_hdr, bind_hdr); 864 break; 865 866 case 12: 867 NDR_PARAMS_MEMBER (_ndr_bind_ack_hdr, bind_ack_hdr); 868 break; 869 870 case 0: 871 NDR_PARAMS_MEMBER (_ndr_request_hdr, request_hdr); 872 break; 873 874 case 998: 875 NDR_PARAMS_MEMBER (_ndr_request_hdr_with_object, request_hdr_with); 876 break; 877 878 case 2: 879 NDR_PARAMS_MEMBER (_ndr_response_hdr, response_hdr); 880 break; 881 882 case 14: 883 NDR_PARAMS_MEMBER (_ndr_alter_context_hdr, alter_context_hdr); 884 break; 885 886 case 15: 887 NDR_PARAMS_MEMBER (_ndr_alter_context_rsp_hdr, alter_context_rsp_hdr); 888 break; 889 890 case 997: 891 NDR_PARAMS_MEMBER (_ndr_serialtype1_hdr, serialtype1_hdr); 892 break; 893 894 case 996: 895 NDR_PARAMS_MEMBER (_ndr_serialtype2_hdr, serialtype2_hdr); 896 break; 897 898 case 995: 899 NDR_PARAMS_MEMBER (_ndr_pac_hdr, pac_hdr); 900 break; 901 902 case 3: 903 NDR_PARAMS_MEMBER (_ndr_fault_hdr, fault_hdr); 904 break; 905 906 default: 907 NDR_SET_ERROR(encl_ref, NDR_ERR_SWITCH_VALUE_INVALID); 908 return 0; 909 break; 910 } 911 912 913 return 1; 914 } 915