Lines Matching defs:outer_ref
291 ndr_ref_t *outer_ref;
350 outer_ref = ndr_enter_outer_queue(top_ref);
351 if (!outer_ref)
362 outer_ref->inner_flags = top_ref->inner_flags;
363 outer_ref->outer_flags = 0;
364 outer_ref->datum = top_ref->datum;
367 if (!ndr_outer_align(outer_ref))
371 outer_ref->pdu_offset = nds->pdu_scan_offset;
373 rc = ndr_outer_grow(outer_ref, n_fixed);
377 outer_ref->pdu_end_offset = outer_ref->pdu_offset + n_fixed;
380 nds->outer_current = outer_ref;
382 nds->pdu_scan_offset = outer_ref->pdu_end_offset;
385 rc = ndr_inner(outer_ref);
389 nds->pdu_scan_offset = outer_ref->pdu_end_offset;
400 ndr_ref_t *outer_ref;
403 outer_ref = (ndr_ref_t *)NDS_MALLOC(nds, sizeof (*outer_ref), arg_ref);
404 if (!outer_ref) {
409 *outer_ref = *arg_ref;
412 outer_ref->outer_flags = arg_ref->inner_flags & NDR_F_PARAMS_MASK;
413 outer_ref->inner_flags = 0;
414 outer_ref->enclosing = nds->outer_current;
415 outer_ref->backptr = 0;
416 outer_ref->datum = 0;
420 outer_ref->next = *nds->outer_queue_tailp;
421 *nds->outer_queue_tailp = outer_ref;
422 nds->outer_queue_tailp = &outer_ref->next;
423 return (outer_ref);
581 ndr_outer(ndr_ref_t *outer_ref)
583 ndr_stream_t *nds = outer_ref->stream;
584 ndr_typeinfo_t *ti = outer_ref->ti;
591 params = outer_ref->outer_flags & NDR_F_PARAMS_MASK;
593 NDR_TATTLE(outer_ref, "--OUTER--");
596 if (!ndr_outer_align(outer_ref))
600 outer_ref->pdu_offset = nds->pdu_scan_offset;
604 NDR_SET_ERROR(outer_ref, error);
611 return (ndr_outer_string(outer_ref));
613 return (ndr_outer_conformant_construct(outer_ref));
615 return (ndr_outer_fixed(outer_ref));
629 return (ndr_outer_conformant_array(outer_ref));
631 return (ndr_outer_fixed_array(outer_ref));
644 NDR_SET_ERROR(outer_ref, error);
649 ndr_outer_fixed(ndr_ref_t *outer_ref)
651 ndr_stream_t *nds = outer_ref->stream;
652 ndr_typeinfo_t *ti = outer_ref->ti;
666 params = outer_ref->outer_flags & NDR_F_PARAMS_MASK;
687 rc = ndr_outer_grow(outer_ref, n_pdu_total);
693 valp = outer_ref->datum;
695 NDR_SET_ERROR(outer_ref, NDR_ERR_OUTER_PARAMS_BAD);
698 if (outer_ref->backptr)
699 assert(valp == *outer_ref->backptr);
703 valp = NDS_MALLOC(nds, n_alloc, outer_ref);
705 NDR_SET_ERROR(outer_ref, NDR_ERR_MALLOC_FAILED);
708 if (outer_ref->backptr)
709 *outer_ref->backptr = valp;
710 outer_ref->datum = valp;
714 NDR_SET_ERROR(outer_ref, NDR_ERR_M_OP_INVALID);
720 myref.enclosing = outer_ref;
721 myref.ti = outer_ref->ti;
722 myref.datum = outer_ref->datum;
727 myref.pdu_offset = outer_ref->pdu_offset;
728 outer_ref->pdu_end_offset = outer_ref->pdu_offset + n_pdu_total;
734 nds->pdu_scan_offset = outer_ref->pdu_end_offset;
739 ndr_outer_fixed_array(ndr_ref_t *outer_ref)
741 ndr_stream_t *nds = outer_ref->stream;
742 ndr_typeinfo_t *ti = outer_ref->ti;
756 params = outer_ref->outer_flags & NDR_F_PARAMS_MASK;
765 n_fixed = ti->pdu_size_fixed_part * outer_ref->dimension_is;
777 rc = ndr_outer_grow(outer_ref, n_pdu_total);
783 valp = outer_ref->datum;
785 NDR_SET_ERROR(outer_ref, NDR_ERR_OUTER_PARAMS_BAD);
788 if (outer_ref->backptr)
789 assert(valp == *outer_ref->backptr);
793 valp = NDS_MALLOC(nds, n_alloc, outer_ref);
795 NDR_SET_ERROR(outer_ref, NDR_ERR_MALLOC_FAILED);
798 if (outer_ref->backptr)
799 *outer_ref->backptr = valp;
800 outer_ref->datum = valp;
804 NDR_SET_ERROR(outer_ref, NDR_ERR_M_OP_INVALID);
810 myref.enclosing = outer_ref;
811 myref.ti = outer_ref->ti;
812 myref.datum = outer_ref->datum;
816 myref.dimension_is = outer_ref->dimension_is;
818 myref.pdu_offset = outer_ref->pdu_offset;
819 outer_ref->pdu_end_offset = outer_ref->pdu_offset + n_pdu_total;
825 nds->pdu_scan_offset = outer_ref->pdu_end_offset;
830 ndr_outer_conformant_array(ndr_ref_t *outer_ref)
832 ndr_stream_t *nds = outer_ref->stream;
833 ndr_typeinfo_t *ti = outer_ref->ti;
849 params = outer_ref->outer_flags & NDR_F_PARAMS_MASK;
862 n_variable = ti->pdu_size_fixed_part * outer_ref->size_is;
870 rc = ndr_outer_grow(outer_ref, n_pdu_total);
876 size_is = outer_ref->size_is;
877 rc = ndr_outer_poke_sizing(outer_ref, 0, &size_is);
881 valp = outer_ref->datum;
883 NDR_SET_ERROR(outer_ref, NDR_ERR_OUTER_PARAMS_BAD);
886 if (outer_ref->backptr)
887 assert(valp == *outer_ref->backptr);
893 size_is = outer_ref->size_is;
897 rc = ndr_outer_peek_sizing(outer_ref, 0, &size_is);
901 if (size_is != outer_ref->size_is) {
902 NDR_SET_ERROR(outer_ref,
911 valp = NDS_MALLOC(nds, n_alloc, outer_ref);
913 NDR_SET_ERROR(outer_ref, NDR_ERR_MALLOC_FAILED);
918 if (outer_ref->backptr)
919 *outer_ref->backptr = valp;
920 outer_ref->datum = valp;
924 NDR_SET_ERROR(outer_ref, NDR_ERR_M_OP_INVALID);
928 outer_ref->pdu_end_offset = outer_ref->pdu_offset + n_pdu_total;
929 outer_ref->type_flags = NDR_F_NONE;
930 outer_ref->inner_flags = NDR_F_NONE;
935 myref.enclosing = outer_ref;
936 myref.ti = outer_ref->ti;
937 myref.datum = outer_ref->datum;
941 myref.size_is = outer_ref->size_is;
944 myref.dimension_is = outer_ref->size_is; /* convenient */
946 myref.pdu_offset = outer_ref->pdu_offset + n_ptr_offset;
953 nds->pdu_scan_offset = outer_ref->pdu_end_offset;
958 ndr_outer_conformant_construct(ndr_ref_t *outer_ref)
960 ndr_stream_t *nds = outer_ref->stream;
961 ndr_typeinfo_t *ti = outer_ref->ti;
976 params = outer_ref->outer_flags & NDR_F_PARAMS_MASK;
997 rc = ndr_outer_grow(outer_ref, n_pdu_total);
1009 rc = ndr_outer_poke_sizing(outer_ref, 0, &size_is);
1013 valp = outer_ref->datum;
1015 NDR_SET_ERROR(outer_ref, NDR_ERR_OUTER_PARAMS_BAD);
1018 if (outer_ref->backptr)
1019 assert(valp == *outer_ref->backptr);
1029 rc = ndr_outer_peek_sizing(outer_ref, 0, &size_is);
1038 rc = ndr_outer_grow(outer_ref, n_pdu_total);
1042 outer_ref->size_is = size_is; /* verified later */
1044 valp = NDS_MALLOC(nds, n_alloc, outer_ref);
1046 NDR_SET_ERROR(outer_ref, NDR_ERR_MALLOC_FAILED);
1049 if (outer_ref->backptr)
1050 *outer_ref->backptr = valp;
1051 outer_ref->datum = valp;
1055 NDR_SET_ERROR(outer_ref, NDR_ERR_M_OP_INVALID);
1059 outer_ref->pdu_end_offset = outer_ref->pdu_offset + n_pdu_total;
1060 outer_ref->type_flags = NDR_F_SIZE_IS; /* indicate pending */
1061 outer_ref->inner_flags = NDR_F_NONE; /* indicate pending */
1065 myref.enclosing = outer_ref;
1066 myref.ti = outer_ref->ti;
1067 myref.datum = outer_ref->datum;
1071 myref.size_is = outer_ref->size_is;
1073 myref.pdu_offset = outer_ref->pdu_offset + 4;
1079 nds->pdu_scan_offset = outer_ref->pdu_end_offset;
1081 if (outer_ref->inner_flags != NDR_F_SIZE_IS) {
1093 ndr_ref_t *outer_ref = nds->outer_current;
1094 ndr_typeinfo_t *ti = outer_ref->ti;
1105 if (outer_ref->type_flags != NDR_F_SIZE_IS) {
1110 if (outer_ref->inner_flags & NDR_F_SIZE_IS) {
1121 rc = ndr_outer_grow(outer_ref, n_pdu_total);
1131 rc = ndr_outer_poke_sizing(outer_ref, 0, &size_is);
1142 if (size_is != outer_ref->size_is) {
1149 NDR_SET_ERROR(outer_ref, NDR_ERR_M_OP_INVALID);
1153 outer_ref->inner_flags |= NDR_F_SIZE_IS;
1154 outer_ref->size_is = ref->size_is;
1159 ndr_outer_string(ndr_ref_t *outer_ref)
1161 ndr_stream_t *nds = outer_ref->stream;
1162 ndr_typeinfo_t *ti = outer_ref->ti;
1181 params = outer_ref->outer_flags & NDR_F_PARAMS_MASK;
1192 if (!ndr_outer_grow(outer_ref, n_hdr))
1197 valp = outer_ref->datum;
1199 NDR_SET_ERROR(outer_ref, NDR_ERR_OUTER_PARAMS_BAD);
1203 if (outer_ref->backptr)
1204 assert(valp == *outer_ref->backptr);
1218 NDR_SET_ERROR(outer_ref, NDR_ERR_STRLEN);
1222 valp = outer_ref->datum;
1236 NDR_SET_ERROR(outer_ref, NDR_ERR_STRLEN);
1249 if (!ndr_outer_poke_sizing(outer_ref, 0, &size_is) ||
1250 !ndr_outer_poke_sizing(outer_ref, 4, &first_is) ||
1251 !ndr_outer_poke_sizing(outer_ref, 8, &length_is))
1256 if (!ndr_outer_peek_sizing(outer_ref, 0, &size_is) ||
1257 !ndr_outer_peek_sizing(outer_ref, 4, &first_is) ||
1258 !ndr_outer_peek_sizing(outer_ref, 8, &length_is))
1277 NDR_SET_ERROR(outer_ref, NDR_ERR_STRING_SIZING);
1293 valp = NDS_MALLOC(nds, n_alloc, outer_ref);
1295 NDR_SET_ERROR(outer_ref, NDR_ERR_MALLOC_FAILED);
1301 if (outer_ref->backptr)
1302 *outer_ref->backptr = valp;
1303 outer_ref->datum = valp;
1307 NDR_SET_ERROR(outer_ref, NDR_ERR_M_OP_INVALID);
1328 rc = ndr_outer_grow(outer_ref, n_pdu_total);
1335 myref.enclosing = outer_ref;
1336 myref.ti = outer_ref->ti;
1337 myref.datum = outer_ref->datum;
1349 myref.pdu_offset = outer_ref->pdu_offset + 12;
1355 nds->pdu_scan_offset = outer_ref->pdu_end_offset;
1365 nds->pdu_scan_offset = outer_ref->pdu_end_offset;
1370 ndr_outer_peek_sizing(ndr_ref_t *outer_ref, unsigned offset,
1373 ndr_stream_t *nds = outer_ref->stream;
1377 pdu_offset = outer_ref->pdu_offset + offset;
1382 NDR_SET_ERROR(outer_ref, NDR_ERR_BOUNDS_CHECK);
1388 NDR_SET_ERROR(outer_ref, NDR_ERR_UNIMPLEMENTED);
1393 nds->swap, outer_ref);
1397 NDR_SET_ERROR(outer_ref, NDR_ERR_M_OP_INVALID);
1405 ndr_outer_poke_sizing(ndr_ref_t *outer_ref, unsigned offset,
1408 ndr_stream_t *nds = outer_ref->stream;
1412 pdu_offset = outer_ref->pdu_offset + offset;
1417 NDR_SET_ERROR(outer_ref, NDR_ERR_BOUNDS_CHECK);
1424 nds->swap, outer_ref);
1428 NDR_SET_ERROR(outer_ref, NDR_ERR_UNIMPLEMENTED);
1432 NDR_SET_ERROR(outer_ref, NDR_ERR_M_OP_INVALID);
1445 ndr_outer_align(ndr_ref_t *outer_ref)
1447 ndr_stream_t *nds = outer_ref->stream;
1452 if (outer_ref->packed_alignment && outer_ref->ti != &ndt_s_wchar) {
1453 align = outer_ref->ti->alignment;
1462 if (!ndr_outer_grow(outer_ref, n_pad))
1467 rc = NDS_PAD_PDU(nds, nds->pdu_scan_offset, n_pad, outer_ref);
1469 NDR_SET_ERROR(outer_ref, NDR_ERR_PAD_FAILED);
1478 NDR_SET_ERROR(outer_ref, NDR_ERR_M_OP_INVALID);
1487 ndr_outer_grow(ndr_ref_t *outer_ref, unsigned n_total)
1489 ndr_stream_t *nds = outer_ref->stream;
1503 rc = NDS_GROW_PDU(nds, pdu_want_size, outer_ref);
1505 NDR_SET_ERROR(outer_ref, NDR_ERR_GROW_FAILED);
1513 NDR_SET_ERROR(outer_ref, NDR_ERR_UNDERFLOW);
1517 NDR_SET_ERROR(outer_ref, NDR_ERR_M_OP_INVALID);
1524 outer_ref->pdu_end_offset = pdu_want_size;
1630 ndr_ref_t *outer_ref;
1637 outer_ref = ndr_enter_outer_queue(arg_ref);
1638 if (!outer_ref)
1645 outer_ref->outer_flags = arg_ref->inner_flags & NDR_F_PARAMS_MASK;
1646 if ((outer_ref->outer_flags & NDR_F_SIZE_IS) == 0)
1647 outer_ref->outer_flags &= ~NDR_F_IS_POINTER;
1649 outer_ref->outer_flags |= NDR_F_BACKPTR;
1650 if (outer_ref->outer_flags & NDR_F_SIZE_IS) {
1651 outer_ref->outer_flags |= NDR_F_ARRAY+NDR_F_CONFORMANT;
1655 outer_ref->backptr = valpp;
1659 outer_ref->datum = *valpp;
1669 outer_ref->datum = 0;
1682 ndr_ref_t *outer_ref;
1684 outer_ref = ndr_enter_outer_queue(arg_ref);
1685 if (!outer_ref)
1692 outer_ref->outer_flags = arg_ref->inner_flags & NDR_F_PARAMS_MASK;
1693 if ((outer_ref->outer_flags & NDR_F_SIZE_IS) == 0)
1694 outer_ref->outer_flags &= ~NDR_F_IS_REFERENCE;
1696 outer_ref->outer_flags |= NDR_F_BACKPTR;
1697 if (outer_ref->outer_flags & NDR_F_SIZE_IS) {
1698 outer_ref->outer_flags |= NDR_F_ARRAY+NDR_F_CONFORMANT;
1702 outer_ref->backptr = valpp;
1706 outer_ref->datum = *valpp;
1716 outer_ref->datum = 0;