Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_claims.h"
5 :
6 : #include "librpc/ndr/ndr_compression.h"
7 15450 : static enum ndr_err_code ndr_push_CLAIM_TYPE(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum CLAIM_TYPE r)
8 : {
9 15450 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
10 14960 : return NDR_ERR_SUCCESS;
11 : }
12 :
13 2365 : static enum ndr_err_code ndr_pull_CLAIM_TYPE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum CLAIM_TYPE *r)
14 : {
15 83 : uint16_t v;
16 2365 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
17 2365 : *r = v;
18 2365 : return NDR_ERR_SUCCESS;
19 : }
20 :
21 11 : _PUBLIC_ void ndr_print_CLAIM_TYPE(struct ndr_print *ndr, const char *name, enum CLAIM_TYPE r)
22 : {
23 11 : const char *val = NULL;
24 :
25 11 : switch (r) {
26 0 : case CLAIM_TYPE_INT64: val = "CLAIM_TYPE_INT64"; break;
27 4 : case CLAIM_TYPE_UINT64: val = "CLAIM_TYPE_UINT64"; break;
28 4 : case CLAIM_TYPE_STRING: val = "CLAIM_TYPE_STRING"; break;
29 3 : case CLAIM_TYPE_BOOLEAN: val = "CLAIM_TYPE_BOOLEAN"; break;
30 : }
31 11 : ndr_print_enum(ndr, name, "ENUM", val, r);
32 11 : }
33 :
34 3635 : static enum ndr_err_code ndr_push_CLAIMS_SOURCE_TYPE(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum CLAIMS_SOURCE_TYPE r)
35 : {
36 3635 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
37 3570 : return NDR_ERR_SUCCESS;
38 : }
39 :
40 647 : static enum ndr_err_code ndr_pull_CLAIMS_SOURCE_TYPE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum CLAIMS_SOURCE_TYPE *r)
41 : {
42 24 : uint16_t v;
43 647 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
44 647 : *r = v;
45 647 : return NDR_ERR_SUCCESS;
46 : }
47 :
48 3 : _PUBLIC_ void ndr_print_CLAIMS_SOURCE_TYPE(struct ndr_print *ndr, const char *name, enum CLAIMS_SOURCE_TYPE r)
49 : {
50 3 : const char *val = NULL;
51 :
52 3 : switch (r) {
53 3 : case CLAIMS_SOURCE_TYPE_AD: val = "CLAIMS_SOURCE_TYPE_AD"; break;
54 0 : case CLAIMS_SOURCE_TYPE_CERTIFICATE: val = "CLAIMS_SOURCE_TYPE_CERTIFICATE"; break;
55 : }
56 3 : ndr_print_enum(ndr, name, "ENUM", val, r);
57 3 : }
58 :
59 717 : static enum ndr_err_code ndr_push_CLAIMS_COMPRESSION_FORMAT(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum CLAIMS_COMPRESSION_FORMAT r)
60 : {
61 717 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
62 704 : return NDR_ERR_SUCCESS;
63 : }
64 :
65 630 : static enum ndr_err_code ndr_pull_CLAIMS_COMPRESSION_FORMAT(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum CLAIMS_COMPRESSION_FORMAT *r)
66 : {
67 17 : uint16_t v;
68 630 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
69 630 : *r = v;
70 630 : return NDR_ERR_SUCCESS;
71 : }
72 :
73 2 : _PUBLIC_ void ndr_print_CLAIMS_COMPRESSION_FORMAT(struct ndr_print *ndr, const char *name, enum CLAIMS_COMPRESSION_FORMAT r)
74 : {
75 2 : const char *val = NULL;
76 :
77 2 : switch (r) {
78 1 : case CLAIMS_COMPRESSION_FORMAT_NONE: val = "CLAIMS_COMPRESSION_FORMAT_NONE"; break;
79 0 : case CLAIMS_COMPRESSION_FORMAT_LZNT1: val = "CLAIMS_COMPRESSION_FORMAT_LZNT1"; break;
80 0 : case CLAIMS_COMPRESSION_FORMAT_XPRESS: val = "CLAIMS_COMPRESSION_FORMAT_XPRESS"; break;
81 1 : case CLAIMS_COMPRESSION_FORMAT_XPRESS_HUFF: val = "CLAIMS_COMPRESSION_FORMAT_XPRESS_HUFF"; break;
82 : }
83 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
84 2 : }
85 :
86 2460 : static enum ndr_err_code ndr_push_CLAIM_INT64(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIM_INT64 *r)
87 : {
88 10 : uint32_t cntr_values_1;
89 2460 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
90 2460 : if (ndr_flags & NDR_SCALARS) {
91 1230 : NDR_CHECK(ndr_push_align(ndr, 5));
92 1230 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->value_count));
93 1230 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->values));
94 1230 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
95 : }
96 2460 : if (ndr_flags & NDR_BUFFERS) {
97 1230 : if (r->values) {
98 1230 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->value_count));
99 3000 : for (cntr_values_1 = 0; cntr_values_1 < (r->value_count); cntr_values_1++) {
100 1770 : NDR_CHECK(ndr_push_int64(ndr, NDR_SCALARS, r->values[cntr_values_1]));
101 : }
102 : }
103 : }
104 2450 : return NDR_ERR_SUCCESS;
105 : }
106 :
107 106 : static enum ndr_err_code ndr_pull_CLAIM_INT64(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIM_INT64 *r)
108 : {
109 2 : uint32_t _ptr_values;
110 106 : uint32_t size_values_1 = 0;
111 2 : uint32_t cntr_values_1;
112 106 : TALLOC_CTX *_mem_save_values_0 = NULL;
113 106 : TALLOC_CTX *_mem_save_values_1 = NULL;
114 106 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
115 106 : if (ndr_flags & NDR_SCALARS) {
116 53 : NDR_CHECK(ndr_pull_align(ndr, 5));
117 53 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_count));
118 53 : if (r->value_count > 10*1024*1024) {
119 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->value_count), (uint32_t)(0), (uint32_t)(10*1024*1024));
120 : }
121 53 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_values));
122 53 : if (_ptr_values) {
123 53 : NDR_PULL_ALLOC(ndr, r->values);
124 : } else {
125 0 : r->values = NULL;
126 : }
127 53 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
128 : }
129 106 : if (ndr_flags & NDR_BUFFERS) {
130 53 : if (r->values) {
131 53 : _mem_save_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
132 53 : NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
133 53 : NDR_CHECK(ndr_pull_array_size(ndr, &r->values));
134 53 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->values, &size_values_1));
135 53 : NDR_PULL_ALLOC_N(ndr, r->values, size_values_1);
136 53 : _mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
137 53 : NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
138 246 : for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
139 193 : NDR_CHECK(ndr_pull_int64(ndr, NDR_SCALARS, &r->values[cntr_values_1]));
140 : }
141 53 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_1, 0);
142 53 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_0, 0);
143 : }
144 53 : if (r->values) {
145 53 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->values, r->value_count));
146 : }
147 : }
148 104 : return NDR_ERR_SUCCESS;
149 : }
150 :
151 0 : _PUBLIC_ void ndr_print_CLAIM_INT64(struct ndr_print *ndr, const char *name, const struct CLAIM_INT64 *r)
152 : {
153 0 : uint32_t cntr_values_1;
154 0 : ndr_print_struct(ndr, name, "CLAIM_INT64");
155 0 : if (r == NULL) { ndr_print_null(ndr); return; }
156 0 : ndr->depth++;
157 0 : ndr_print_uint32(ndr, "value_count", r->value_count);
158 0 : ndr_print_ptr(ndr, "values", r->values);
159 0 : ndr->depth++;
160 0 : if (r->values) {
161 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "values", (uint32_t)(r->value_count));
162 0 : ndr->depth++;
163 0 : for (cntr_values_1 = 0; cntr_values_1 < (r->value_count); cntr_values_1++) {
164 0 : ndr_print_int64(ndr, "values", r->values[cntr_values_1]);
165 : }
166 0 : ndr->depth--;
167 : }
168 0 : ndr->depth--;
169 0 : ndr->depth--;
170 : }
171 :
172 2590 : static enum ndr_err_code ndr_push_CLAIM_UINT64(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIM_UINT64 *r)
173 : {
174 300 : uint32_t cntr_values_1;
175 2590 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
176 2590 : if (ndr_flags & NDR_SCALARS) {
177 1295 : NDR_CHECK(ndr_push_align(ndr, 5));
178 1295 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->value_count));
179 1295 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->values));
180 1295 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
181 : }
182 2590 : if (ndr_flags & NDR_BUFFERS) {
183 1295 : if (r->values) {
184 1295 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->value_count));
185 1004565 : for (cntr_values_1 = 0; cntr_values_1 < (r->value_count); cntr_values_1++) {
186 1003270 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->values[cntr_values_1]));
187 : }
188 : }
189 : }
190 2290 : return NDR_ERR_SUCCESS;
191 : }
192 :
193 720 : static enum ndr_err_code ndr_pull_CLAIM_UINT64(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIM_UINT64 *r)
194 : {
195 86 : uint32_t _ptr_values;
196 720 : uint32_t size_values_1 = 0;
197 86 : uint32_t cntr_values_1;
198 720 : TALLOC_CTX *_mem_save_values_0 = NULL;
199 720 : TALLOC_CTX *_mem_save_values_1 = NULL;
200 720 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
201 720 : if (ndr_flags & NDR_SCALARS) {
202 360 : NDR_CHECK(ndr_pull_align(ndr, 5));
203 360 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_count));
204 360 : if (r->value_count > 10*1024*1024) {
205 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->value_count), (uint32_t)(0), (uint32_t)(10*1024*1024));
206 : }
207 360 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_values));
208 360 : if (_ptr_values) {
209 360 : NDR_PULL_ALLOC(ndr, r->values);
210 : } else {
211 0 : r->values = NULL;
212 : }
213 360 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
214 : }
215 720 : if (ndr_flags & NDR_BUFFERS) {
216 360 : if (r->values) {
217 360 : _mem_save_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
218 360 : NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
219 360 : NDR_CHECK(ndr_pull_array_size(ndr, &r->values));
220 360 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->values, &size_values_1));
221 360 : NDR_PULL_ALLOC_N(ndr, r->values, size_values_1);
222 360 : _mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
223 360 : NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
224 101454 : for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
225 101094 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->values[cntr_values_1]));
226 : }
227 360 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_1, 0);
228 360 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_0, 0);
229 : }
230 360 : if (r->values) {
231 360 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->values, r->value_count));
232 : }
233 : }
234 634 : return NDR_ERR_SUCCESS;
235 : }
236 :
237 7 : _PUBLIC_ void ndr_print_CLAIM_UINT64(struct ndr_print *ndr, const char *name, const struct CLAIM_UINT64 *r)
238 : {
239 7 : uint32_t cntr_values_1;
240 7 : ndr_print_struct(ndr, name, "CLAIM_UINT64");
241 7 : if (r == NULL) { ndr_print_null(ndr); return; }
242 7 : ndr->depth++;
243 7 : ndr_print_uint32(ndr, "value_count", r->value_count);
244 7 : ndr_print_ptr(ndr, "values", r->values);
245 7 : ndr->depth++;
246 7 : if (r->values) {
247 7 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "values", (uint32_t)(r->value_count));
248 7 : ndr->depth++;
249 26 : for (cntr_values_1 = 0; cntr_values_1 < (r->value_count); cntr_values_1++) {
250 19 : ndr_print_hyper(ndr, "values", r->values[cntr_values_1]);
251 : }
252 7 : ndr->depth--;
253 : }
254 7 : ndr->depth--;
255 7 : ndr->depth--;
256 : }
257 :
258 10360 : static enum ndr_err_code ndr_push_CLAIM_STRING(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIM_STRING *r)
259 : {
260 180 : uint32_t cntr_values_1;
261 10360 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
262 10360 : if (ndr_flags & NDR_SCALARS) {
263 5180 : NDR_CHECK(ndr_push_align(ndr, 5));
264 5180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->value_count));
265 5180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->values));
266 5180 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
267 : }
268 10360 : if (ndr_flags & NDR_BUFFERS) {
269 5180 : if (r->values) {
270 5180 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->value_count));
271 11365 : for (cntr_values_1 = 0; cntr_values_1 < (r->value_count); cntr_values_1++) {
272 6185 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->values[cntr_values_1]));
273 : }
274 11365 : for (cntr_values_1 = 0; cntr_values_1 < (r->value_count); cntr_values_1++) {
275 6185 : if (r->values[cntr_values_1]) {
276 6185 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->values[cntr_values_1], CH_UTF16)));
277 6185 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
278 6185 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->values[cntr_values_1], CH_UTF16)));
279 6185 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->values[cntr_values_1], ndr_charset_length(r->values[cntr_values_1], CH_UTF16), sizeof(uint16_t), CH_UTF16));
280 : }
281 : }
282 : }
283 : }
284 10180 : return NDR_ERR_SUCCESS;
285 : }
286 :
287 3896 : static enum ndr_err_code ndr_pull_CLAIM_STRING(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIM_STRING *r)
288 : {
289 78 : uint32_t _ptr_values;
290 3896 : uint32_t size_values_1 = 0;
291 78 : uint32_t cntr_values_1;
292 3896 : uint32_t size_values_3 = 0;
293 3896 : uint32_t length_values_3 = 0;
294 3896 : TALLOC_CTX *_mem_save_values_0 = NULL;
295 3896 : TALLOC_CTX *_mem_save_values_1 = NULL;
296 3896 : TALLOC_CTX *_mem_save_values_2 = NULL;
297 3896 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
298 3896 : if (ndr_flags & NDR_SCALARS) {
299 1948 : NDR_CHECK(ndr_pull_align(ndr, 5));
300 1948 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_count));
301 1948 : if (r->value_count > 10*1024*1024) {
302 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->value_count), (uint32_t)(0), (uint32_t)(10*1024*1024));
303 : }
304 1948 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_values));
305 1948 : if (_ptr_values) {
306 1948 : NDR_PULL_ALLOC(ndr, r->values);
307 : } else {
308 0 : r->values = NULL;
309 : }
310 1948 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
311 : }
312 3896 : if (ndr_flags & NDR_BUFFERS) {
313 1948 : if (r->values) {
314 1948 : _mem_save_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
315 1948 : NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
316 1948 : NDR_CHECK(ndr_pull_array_size(ndr, &r->values));
317 1948 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->values, &size_values_1));
318 1948 : NDR_PULL_ALLOC_N(ndr, r->values, size_values_1);
319 1948 : _mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
320 1948 : NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
321 4442 : for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
322 2494 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_values));
323 2494 : if (_ptr_values) {
324 2494 : NDR_PULL_ALLOC(ndr, r->values[cntr_values_1]);
325 : } else {
326 0 : r->values[cntr_values_1] = NULL;
327 : }
328 : }
329 4442 : for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
330 2494 : if (r->values[cntr_values_1]) {
331 2494 : _mem_save_values_2 = NDR_PULL_GET_MEM_CTX(ndr);
332 2494 : NDR_PULL_SET_MEM_CTX(ndr, r->values[cntr_values_1], 0);
333 2494 : NDR_CHECK(ndr_pull_array_size(ndr, &r->values[cntr_values_1]));
334 2494 : NDR_CHECK(ndr_pull_array_length(ndr, &r->values[cntr_values_1]));
335 2494 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->values[cntr_values_1], &size_values_3));
336 2494 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->values[cntr_values_1], &length_values_3));
337 2494 : if (length_values_3 > size_values_3) {
338 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_values_3, length_values_3);
339 : }
340 2494 : NDR_CHECK(ndr_check_string_terminator(ndr, length_values_3, sizeof(uint16_t)));
341 2494 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->values[cntr_values_1], length_values_3, sizeof(uint16_t), CH_UTF16));
342 2494 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_2, 0);
343 : }
344 : }
345 1948 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_1, 0);
346 1948 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_0, 0);
347 : }
348 1948 : if (r->values) {
349 1948 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->values, r->value_count));
350 : }
351 4442 : for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
352 102 : }
353 : }
354 3818 : return NDR_ERR_SUCCESS;
355 : }
356 :
357 4 : _PUBLIC_ void ndr_print_CLAIM_STRING(struct ndr_print *ndr, const char *name, const struct CLAIM_STRING *r)
358 : {
359 4 : uint32_t cntr_values_1;
360 4 : ndr_print_struct(ndr, name, "CLAIM_STRING");
361 4 : if (r == NULL) { ndr_print_null(ndr); return; }
362 4 : ndr->depth++;
363 4 : ndr_print_uint32(ndr, "value_count", r->value_count);
364 4 : ndr_print_ptr(ndr, "values", r->values);
365 4 : ndr->depth++;
366 4 : if (r->values) {
367 4 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "values", (uint32_t)(r->value_count));
368 4 : ndr->depth++;
369 17 : for (cntr_values_1 = 0; cntr_values_1 < (r->value_count); cntr_values_1++) {
370 13 : ndr_print_ptr(ndr, "values", r->values[cntr_values_1]);
371 13 : ndr->depth++;
372 13 : if (r->values[cntr_values_1]) {
373 13 : ndr_print_string(ndr, "values", r->values[cntr_values_1]);
374 : }
375 13 : ndr->depth--;
376 : }
377 4 : ndr->depth--;
378 : }
379 4 : ndr->depth--;
380 4 : ndr->depth--;
381 : }
382 :
383 15450 : static enum ndr_err_code ndr_push_CLAIM_ENTRY_VALUES(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union CLAIM_ENTRY_VALUES *r)
384 : {
385 490 : uint32_t level;
386 : {
387 15450 : libndr_flags _flags_save_UNION = ndr->flags;
388 15450 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
389 15450 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
390 15450 : if (ndr_flags & NDR_SCALARS) {
391 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
392 7725 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
393 7725 : NDR_CHECK(ndr_push_union_align(ndr, 5));
394 7970 : NDR_CHECK(ndr_push_CLAIM_TYPE(ndr, NDR_SCALARS, level));
395 7725 : NDR_CHECK(ndr_push_union_align(ndr, 5));
396 7725 : switch (level) {
397 1230 : case CLAIM_TYPE_INT64: {
398 1230 : NDR_CHECK(ndr_push_CLAIM_INT64(ndr, NDR_SCALARS, &r->claim_int64));
399 1225 : break; }
400 :
401 720 : case CLAIM_TYPE_UINT64: {
402 720 : NDR_CHECK(ndr_push_CLAIM_UINT64(ndr, NDR_SCALARS, &r->claim_uint64));
403 630 : break; }
404 :
405 5180 : case CLAIM_TYPE_STRING: {
406 5180 : NDR_CHECK(ndr_push_CLAIM_STRING(ndr, NDR_SCALARS, &r->claim_string));
407 5090 : break; }
408 :
409 575 : case CLAIM_TYPE_BOOLEAN: {
410 575 : NDR_CHECK(ndr_push_CLAIM_UINT64(ndr, NDR_SCALARS, &r->claim_boolean));
411 515 : break; }
412 :
413 20 : default: {
414 20 : break; }
415 :
416 : }
417 : }
418 15450 : if (ndr_flags & NDR_BUFFERS) {
419 7725 : if (!(ndr_flags & NDR_SCALARS)) {
420 : /* We didn't get it above, and the token is not needed after this. */
421 7725 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
422 : }
423 7725 : switch (level) {
424 1230 : case CLAIM_TYPE_INT64:
425 1230 : NDR_CHECK(ndr_push_CLAIM_INT64(ndr, NDR_BUFFERS, &r->claim_int64));
426 1225 : break;
427 :
428 720 : case CLAIM_TYPE_UINT64:
429 720 : NDR_CHECK(ndr_push_CLAIM_UINT64(ndr, NDR_BUFFERS, &r->claim_uint64));
430 630 : break;
431 :
432 5180 : case CLAIM_TYPE_STRING:
433 5180 : NDR_CHECK(ndr_push_CLAIM_STRING(ndr, NDR_BUFFERS, &r->claim_string));
434 5090 : break;
435 :
436 575 : case CLAIM_TYPE_BOOLEAN:
437 575 : NDR_CHECK(ndr_push_CLAIM_UINT64(ndr, NDR_BUFFERS, &r->claim_boolean));
438 515 : break;
439 :
440 20 : default:
441 20 : break;
442 :
443 : }
444 : }
445 15450 : ndr->flags = _flags_save_UNION;
446 : }
447 15450 : return NDR_ERR_SUCCESS;
448 : }
449 :
450 4730 : static enum ndr_err_code ndr_pull_CLAIM_ENTRY_VALUES(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union CLAIM_ENTRY_VALUES *r)
451 : {
452 166 : uint32_t level;
453 166 : uint16_t _level;
454 : {
455 4730 : libndr_flags _flags_save_UNION = ndr->flags;
456 4730 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
457 4730 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
458 4730 : if (ndr_flags & NDR_SCALARS) {
459 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
460 2365 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
461 2365 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
462 2365 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
463 2365 : if (_level != level) {
464 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
465 : }
466 2365 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
467 2365 : switch (level) {
468 53 : case CLAIM_TYPE_INT64: {
469 53 : NDR_CHECK(ndr_pull_CLAIM_INT64(ndr, NDR_SCALARS, &r->claim_int64));
470 52 : break; }
471 :
472 246 : case CLAIM_TYPE_UINT64: {
473 246 : NDR_CHECK(ndr_pull_CLAIM_UINT64(ndr, NDR_SCALARS, &r->claim_uint64));
474 220 : break; }
475 :
476 1948 : case CLAIM_TYPE_STRING: {
477 1948 : NDR_CHECK(ndr_pull_CLAIM_STRING(ndr, NDR_SCALARS, &r->claim_string));
478 1909 : break; }
479 :
480 114 : case CLAIM_TYPE_BOOLEAN: {
481 114 : NDR_CHECK(ndr_pull_CLAIM_UINT64(ndr, NDR_SCALARS, &r->claim_boolean));
482 97 : break; }
483 :
484 4 : default: {
485 4 : break; }
486 :
487 : }
488 : }
489 4730 : if (ndr_flags & NDR_BUFFERS) {
490 2365 : if (!(ndr_flags & NDR_SCALARS)) {
491 : /* We didn't get it above, and the token is not needed after this. */
492 2365 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
493 : }
494 2365 : switch (level) {
495 53 : case CLAIM_TYPE_INT64:
496 53 : NDR_CHECK(ndr_pull_CLAIM_INT64(ndr, NDR_BUFFERS, &r->claim_int64));
497 52 : break;
498 :
499 246 : case CLAIM_TYPE_UINT64:
500 246 : NDR_CHECK(ndr_pull_CLAIM_UINT64(ndr, NDR_BUFFERS, &r->claim_uint64));
501 220 : break;
502 :
503 1948 : case CLAIM_TYPE_STRING:
504 1948 : NDR_CHECK(ndr_pull_CLAIM_STRING(ndr, NDR_BUFFERS, &r->claim_string));
505 1909 : break;
506 :
507 114 : case CLAIM_TYPE_BOOLEAN:
508 114 : NDR_CHECK(ndr_pull_CLAIM_UINT64(ndr, NDR_BUFFERS, &r->claim_boolean));
509 97 : break;
510 :
511 4 : default:
512 4 : break;
513 :
514 : }
515 : }
516 4730 : ndr->flags = _flags_save_UNION;
517 : }
518 4730 : return NDR_ERR_SUCCESS;
519 : }
520 :
521 11 : _PUBLIC_ void ndr_print_CLAIM_ENTRY_VALUES(struct ndr_print *ndr, const char *name, const union CLAIM_ENTRY_VALUES *r)
522 : {
523 11 : uint32_t level;
524 : {
525 11 : libndr_flags _flags_save_UNION = ndr->flags;
526 11 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
527 11 : level = ndr_print_steal_switch_value(ndr, r);
528 11 : ndr_print_union(ndr, name, level, "CLAIM_ENTRY_VALUES");
529 11 : switch (level) {
530 0 : case CLAIM_TYPE_INT64:
531 0 : ndr_print_CLAIM_INT64(ndr, "claim_int64", &r->claim_int64);
532 0 : break;
533 :
534 4 : case CLAIM_TYPE_UINT64:
535 4 : ndr_print_CLAIM_UINT64(ndr, "claim_uint64", &r->claim_uint64);
536 4 : break;
537 :
538 4 : case CLAIM_TYPE_STRING:
539 4 : ndr_print_CLAIM_STRING(ndr, "claim_string", &r->claim_string);
540 4 : break;
541 :
542 3 : case CLAIM_TYPE_BOOLEAN:
543 3 : ndr_print_CLAIM_UINT64(ndr, "claim_boolean", &r->claim_boolean);
544 3 : break;
545 :
546 0 : default:
547 0 : break;
548 :
549 : }
550 11 : ndr->flags = _flags_save_UNION;
551 : }
552 11 : }
553 :
554 15450 : static enum ndr_err_code ndr_push_CLAIM_ENTRY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIM_ENTRY *r)
555 : {
556 15450 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
557 15450 : if (ndr_flags & NDR_SCALARS) {
558 7725 : NDR_CHECK(ndr_push_align(ndr, 5));
559 7725 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->id));
560 7970 : NDR_CHECK(ndr_push_CLAIM_TYPE(ndr, NDR_SCALARS, r->type));
561 7725 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->values, r->type));
562 7725 : NDR_CHECK(ndr_push_CLAIM_ENTRY_VALUES(ndr, NDR_SCALARS, &r->values));
563 7725 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
564 : }
565 15450 : if (ndr_flags & NDR_BUFFERS) {
566 7725 : if (r->id) {
567 7725 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->id, CH_UTF16)));
568 7725 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
569 7725 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->id, CH_UTF16)));
570 7725 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->id, ndr_charset_length(r->id, CH_UTF16), sizeof(uint16_t), CH_UTF16));
571 : }
572 7725 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->values, r->type));
573 7725 : NDR_CHECK(ndr_push_CLAIM_ENTRY_VALUES(ndr, NDR_BUFFERS, &r->values));
574 : }
575 14960 : return NDR_ERR_SUCCESS;
576 : }
577 :
578 4730 : static enum ndr_err_code ndr_pull_CLAIM_ENTRY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIM_ENTRY *r)
579 : {
580 166 : uint32_t _ptr_id;
581 4730 : uint32_t size_id_1 = 0;
582 4730 : uint32_t length_id_1 = 0;
583 4730 : TALLOC_CTX *_mem_save_id_0 = NULL;
584 4730 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
585 4730 : if (ndr_flags & NDR_SCALARS) {
586 2365 : NDR_CHECK(ndr_pull_align(ndr, 5));
587 2365 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id));
588 2365 : if (_ptr_id) {
589 2365 : NDR_PULL_ALLOC(ndr, r->id);
590 : } else {
591 0 : r->id = NULL;
592 : }
593 2448 : NDR_CHECK(ndr_pull_CLAIM_TYPE(ndr, NDR_SCALARS, &r->type));
594 2365 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->values, r->type));
595 2365 : NDR_CHECK(ndr_pull_CLAIM_ENTRY_VALUES(ndr, NDR_SCALARS, &r->values));
596 2365 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
597 : }
598 4730 : if (ndr_flags & NDR_BUFFERS) {
599 2365 : if (r->id) {
600 2365 : _mem_save_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
601 2365 : NDR_PULL_SET_MEM_CTX(ndr, r->id, 0);
602 2365 : NDR_CHECK(ndr_pull_array_size(ndr, &r->id));
603 2365 : NDR_CHECK(ndr_pull_array_length(ndr, &r->id));
604 2365 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->id, &size_id_1));
605 2365 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->id, &length_id_1));
606 2365 : if (length_id_1 > size_id_1) {
607 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_id_1, length_id_1);
608 : }
609 2365 : NDR_CHECK(ndr_check_string_terminator(ndr, length_id_1, sizeof(uint16_t)));
610 2365 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->id, length_id_1, sizeof(uint16_t), CH_UTF16));
611 2365 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_0, 0);
612 : }
613 2365 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->values, r->type));
614 2365 : NDR_CHECK(ndr_pull_CLAIM_ENTRY_VALUES(ndr, NDR_BUFFERS, &r->values));
615 : }
616 4564 : return NDR_ERR_SUCCESS;
617 : }
618 :
619 11 : _PUBLIC_ void ndr_print_CLAIM_ENTRY(struct ndr_print *ndr, const char *name, const struct CLAIM_ENTRY *r)
620 : {
621 11 : ndr_print_struct(ndr, name, "CLAIM_ENTRY");
622 11 : if (r == NULL) { ndr_print_null(ndr); return; }
623 11 : ndr->depth++;
624 11 : ndr_print_ptr(ndr, "id", r->id);
625 11 : ndr->depth++;
626 11 : if (r->id) {
627 11 : ndr_print_string(ndr, "id", r->id);
628 : }
629 11 : ndr->depth--;
630 11 : ndr_print_CLAIM_TYPE(ndr, "type", r->type);
631 11 : ndr_print_set_switch_value(ndr, &r->values, r->type);
632 11 : ndr_print_CLAIM_ENTRY_VALUES(ndr, "values", &r->values);
633 11 : ndr->depth--;
634 : }
635 :
636 7270 : static enum ndr_err_code ndr_push_CLAIMS_ARRAY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIMS_ARRAY *r)
637 : {
638 130 : uint32_t cntr_claim_entries_1;
639 7270 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
640 7270 : if (ndr_flags & NDR_SCALARS) {
641 3635 : NDR_CHECK(ndr_push_align(ndr, 5));
642 3700 : NDR_CHECK(ndr_push_CLAIMS_SOURCE_TYPE(ndr, NDR_SCALARS, r->claims_source_type));
643 3635 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->claims_count));
644 3635 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->claim_entries));
645 3635 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
646 : }
647 7270 : if (ndr_flags & NDR_BUFFERS) {
648 3635 : if (r->claim_entries) {
649 3635 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->claims_count));
650 11360 : for (cntr_claim_entries_1 = 0; cntr_claim_entries_1 < (r->claims_count); cntr_claim_entries_1++) {
651 7725 : NDR_CHECK(ndr_push_CLAIM_ENTRY(ndr, NDR_SCALARS, &r->claim_entries[cntr_claim_entries_1]));
652 : }
653 11360 : for (cntr_claim_entries_1 = 0; cntr_claim_entries_1 < (r->claims_count); cntr_claim_entries_1++) {
654 7725 : NDR_CHECK(ndr_push_CLAIM_ENTRY(ndr, NDR_BUFFERS, &r->claim_entries[cntr_claim_entries_1]));
655 : }
656 : }
657 : }
658 7140 : return NDR_ERR_SUCCESS;
659 : }
660 :
661 1294 : static enum ndr_err_code ndr_pull_CLAIMS_ARRAY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIMS_ARRAY *r)
662 : {
663 48 : uint32_t _ptr_claim_entries;
664 1294 : uint32_t size_claim_entries_1 = 0;
665 48 : uint32_t cntr_claim_entries_1;
666 1294 : TALLOC_CTX *_mem_save_claim_entries_0 = NULL;
667 1294 : TALLOC_CTX *_mem_save_claim_entries_1 = NULL;
668 1294 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
669 1294 : if (ndr_flags & NDR_SCALARS) {
670 647 : NDR_CHECK(ndr_pull_align(ndr, 5));
671 671 : NDR_CHECK(ndr_pull_CLAIMS_SOURCE_TYPE(ndr, NDR_SCALARS, &r->claims_source_type));
672 647 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->claims_count));
673 647 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_claim_entries));
674 647 : if (_ptr_claim_entries) {
675 647 : NDR_PULL_ALLOC(ndr, r->claim_entries);
676 : } else {
677 0 : r->claim_entries = NULL;
678 : }
679 647 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
680 : }
681 1294 : if (ndr_flags & NDR_BUFFERS) {
682 647 : if (r->claim_entries) {
683 647 : _mem_save_claim_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
684 647 : NDR_PULL_SET_MEM_CTX(ndr, r->claim_entries, 0);
685 647 : NDR_CHECK(ndr_pull_array_size(ndr, &r->claim_entries));
686 647 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->claim_entries, &size_claim_entries_1));
687 647 : NDR_PULL_ALLOC_N(ndr, r->claim_entries, size_claim_entries_1);
688 647 : _mem_save_claim_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
689 647 : NDR_PULL_SET_MEM_CTX(ndr, r->claim_entries, 0);
690 3012 : for (cntr_claim_entries_1 = 0; cntr_claim_entries_1 < (size_claim_entries_1); cntr_claim_entries_1++) {
691 2365 : NDR_CHECK(ndr_pull_CLAIM_ENTRY(ndr, NDR_SCALARS, &r->claim_entries[cntr_claim_entries_1]));
692 : }
693 3012 : for (cntr_claim_entries_1 = 0; cntr_claim_entries_1 < (size_claim_entries_1); cntr_claim_entries_1++) {
694 2365 : NDR_CHECK(ndr_pull_CLAIM_ENTRY(ndr, NDR_BUFFERS, &r->claim_entries[cntr_claim_entries_1]));
695 : }
696 647 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_claim_entries_1, 0);
697 647 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_claim_entries_0, 0);
698 : }
699 647 : if (r->claim_entries) {
700 647 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->claim_entries, r->claims_count));
701 : }
702 3012 : for (cntr_claim_entries_1 = 0; cntr_claim_entries_1 < (size_claim_entries_1); cntr_claim_entries_1++) {
703 83 : }
704 : }
705 1246 : return NDR_ERR_SUCCESS;
706 : }
707 :
708 3 : _PUBLIC_ void ndr_print_CLAIMS_ARRAY(struct ndr_print *ndr, const char *name, const struct CLAIMS_ARRAY *r)
709 : {
710 3 : uint32_t cntr_claim_entries_1;
711 3 : ndr_print_struct(ndr, name, "CLAIMS_ARRAY");
712 3 : if (r == NULL) { ndr_print_null(ndr); return; }
713 3 : ndr->depth++;
714 3 : ndr_print_CLAIMS_SOURCE_TYPE(ndr, "claims_source_type", r->claims_source_type);
715 3 : ndr_print_uint32(ndr, "claims_count", r->claims_count);
716 3 : ndr_print_ptr(ndr, "claim_entries", r->claim_entries);
717 3 : ndr->depth++;
718 3 : if (r->claim_entries) {
719 3 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "claim_entries", (uint32_t)(r->claims_count));
720 3 : ndr->depth++;
721 14 : for (cntr_claim_entries_1 = 0; cntr_claim_entries_1 < (r->claims_count); cntr_claim_entries_1++) {
722 11 : ndr_print_CLAIM_ENTRY(ndr, "claim_entries", &r->claim_entries[cntr_claim_entries_1]);
723 : }
724 3 : ndr->depth--;
725 : }
726 3 : ndr->depth--;
727 3 : ndr->depth--;
728 : }
729 :
730 717 : static enum ndr_err_code ndr_push_CLAIMS_SET_METADATA_CTR(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIMS_SET_METADATA_CTR *r)
731 : {
732 717 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
733 717 : if (ndr_flags & NDR_SCALARS) {
734 717 : NDR_CHECK(ndr_push_align(ndr, 5));
735 717 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->metadata));
736 717 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
737 : }
738 717 : if (ndr_flags & NDR_BUFFERS) {
739 717 : if (r->metadata) {
740 717 : NDR_CHECK(ndr_push_CLAIMS_SET_METADATA(ndr, NDR_SCALARS|NDR_BUFFERS, r->metadata));
741 : }
742 : }
743 704 : return NDR_ERR_SUCCESS;
744 : }
745 :
746 630 : static enum ndr_err_code ndr_pull_CLAIMS_SET_METADATA_CTR(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIMS_SET_METADATA_CTR *r)
747 : {
748 17 : uint32_t _ptr_metadata;
749 630 : TALLOC_CTX *_mem_save_metadata_0 = NULL;
750 630 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
751 630 : if (ndr_flags & NDR_SCALARS) {
752 630 : NDR_CHECK(ndr_pull_align(ndr, 5));
753 630 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_metadata));
754 630 : if (_ptr_metadata) {
755 630 : NDR_PULL_ALLOC(ndr, r->metadata);
756 : } else {
757 0 : r->metadata = NULL;
758 : }
759 630 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
760 : }
761 630 : if (ndr_flags & NDR_BUFFERS) {
762 630 : if (r->metadata) {
763 630 : _mem_save_metadata_0 = NDR_PULL_GET_MEM_CTX(ndr);
764 630 : NDR_PULL_SET_MEM_CTX(ndr, r->metadata, 0);
765 630 : NDR_CHECK(ndr_pull_CLAIMS_SET_METADATA(ndr, NDR_SCALARS|NDR_BUFFERS, r->metadata));
766 630 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_metadata_0, 0);
767 : }
768 : }
769 613 : return NDR_ERR_SUCCESS;
770 : }
771 :
772 2 : _PUBLIC_ void ndr_print_CLAIMS_SET_METADATA_CTR(struct ndr_print *ndr, const char *name, const struct CLAIMS_SET_METADATA_CTR *r)
773 : {
774 2 : ndr_print_struct(ndr, name, "CLAIMS_SET_METADATA_CTR");
775 2 : if (r == NULL) { ndr_print_null(ndr); return; }
776 2 : ndr->depth++;
777 2 : ndr_print_ptr(ndr, "metadata", r->metadata);
778 2 : ndr->depth++;
779 2 : if (r->metadata) {
780 2 : ndr_print_CLAIMS_SET_METADATA(ndr, "metadata", r->metadata);
781 : }
782 2 : ndr->depth--;
783 2 : ndr->depth--;
784 : }
785 :
786 3585 : static enum ndr_err_code ndr_push_CLAIMS_SET_CTR(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIMS_SET_CTR *r)
787 : {
788 3585 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
789 3585 : if (ndr_flags & NDR_SCALARS) {
790 3585 : NDR_CHECK(ndr_push_align(ndr, 5));
791 3585 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->claims));
792 3585 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
793 : }
794 3585 : if (ndr_flags & NDR_BUFFERS) {
795 3585 : if (r->claims) {
796 3585 : NDR_CHECK(ndr_push_CLAIMS_SET(ndr, NDR_SCALARS|NDR_BUFFERS, r->claims));
797 : }
798 : }
799 3520 : return NDR_ERR_SUCCESS;
800 : }
801 :
802 631 : static enum ndr_err_code ndr_pull_CLAIMS_SET_CTR(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIMS_SET_CTR *r)
803 : {
804 18 : uint32_t _ptr_claims;
805 631 : TALLOC_CTX *_mem_save_claims_0 = NULL;
806 631 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
807 631 : if (ndr_flags & NDR_SCALARS) {
808 631 : NDR_CHECK(ndr_pull_align(ndr, 5));
809 631 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_claims));
810 631 : if (_ptr_claims) {
811 631 : NDR_PULL_ALLOC(ndr, r->claims);
812 : } else {
813 0 : r->claims = NULL;
814 : }
815 631 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
816 : }
817 631 : if (ndr_flags & NDR_BUFFERS) {
818 631 : if (r->claims) {
819 631 : _mem_save_claims_0 = NDR_PULL_GET_MEM_CTX(ndr);
820 631 : NDR_PULL_SET_MEM_CTX(ndr, r->claims, 0);
821 631 : NDR_CHECK(ndr_pull_CLAIMS_SET(ndr, NDR_SCALARS|NDR_BUFFERS, r->claims));
822 631 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_claims_0, 0);
823 : }
824 : }
825 613 : return NDR_ERR_SUCCESS;
826 : }
827 :
828 3 : _PUBLIC_ void ndr_print_CLAIMS_SET_CTR(struct ndr_print *ndr, const char *name, const struct CLAIMS_SET_CTR *r)
829 : {
830 3 : ndr_print_struct(ndr, name, "CLAIMS_SET_CTR");
831 3 : if (r == NULL) { ndr_print_null(ndr); return; }
832 3 : ndr->depth++;
833 3 : ndr_print_ptr(ndr, "claims", r->claims);
834 3 : ndr->depth++;
835 3 : if (r->claims) {
836 3 : ndr_print_CLAIMS_SET(ndr, "claims", r->claims);
837 : }
838 3 : ndr->depth--;
839 3 : ndr->depth--;
840 : }
841 :
842 3585 : _PUBLIC_ enum ndr_err_code ndr_push_CLAIMS_SET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIMS_SET *r)
843 : {
844 65 : uint32_t cntr_claims_arrays_1;
845 3585 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
846 3585 : if (ndr_flags & NDR_SCALARS) {
847 3585 : NDR_CHECK(ndr_push_align(ndr, 5));
848 3585 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->claims_array_count));
849 3585 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->claims_arrays));
850 3585 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved_type));
851 3585 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved_field_size));
852 3585 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->reserved_field));
853 3585 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
854 : }
855 3585 : if (ndr_flags & NDR_BUFFERS) {
856 3585 : if (r->claims_arrays) {
857 3585 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->claims_array_count));
858 7220 : for (cntr_claims_arrays_1 = 0; cntr_claims_arrays_1 < (r->claims_array_count); cntr_claims_arrays_1++) {
859 3635 : NDR_CHECK(ndr_push_CLAIMS_ARRAY(ndr, NDR_SCALARS, &r->claims_arrays[cntr_claims_arrays_1]));
860 : }
861 7220 : for (cntr_claims_arrays_1 = 0; cntr_claims_arrays_1 < (r->claims_array_count); cntr_claims_arrays_1++) {
862 3635 : NDR_CHECK(ndr_push_CLAIMS_ARRAY(ndr, NDR_BUFFERS, &r->claims_arrays[cntr_claims_arrays_1]));
863 : }
864 : }
865 3585 : if (r->reserved_field) {
866 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->reserved_field_size));
867 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->reserved_field, r->reserved_field_size));
868 : }
869 : }
870 3520 : return NDR_ERR_SUCCESS;
871 : }
872 :
873 637 : _PUBLIC_ enum ndr_err_code ndr_pull_CLAIMS_SET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIMS_SET *r)
874 : {
875 24 : uint32_t _ptr_claims_arrays;
876 637 : uint32_t size_claims_arrays_1 = 0;
877 24 : uint32_t cntr_claims_arrays_1;
878 637 : TALLOC_CTX *_mem_save_claims_arrays_0 = NULL;
879 637 : TALLOC_CTX *_mem_save_claims_arrays_1 = NULL;
880 24 : uint32_t _ptr_reserved_field;
881 637 : uint32_t size_reserved_field_1 = 0;
882 637 : TALLOC_CTX *_mem_save_reserved_field_0 = NULL;
883 637 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
884 637 : if (ndr_flags & NDR_SCALARS) {
885 637 : NDR_CHECK(ndr_pull_align(ndr, 5));
886 637 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->claims_array_count));
887 637 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_claims_arrays));
888 637 : if (_ptr_claims_arrays) {
889 637 : NDR_PULL_ALLOC(ndr, r->claims_arrays);
890 : } else {
891 0 : r->claims_arrays = NULL;
892 : }
893 637 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved_type));
894 637 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved_field_size));
895 637 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_reserved_field));
896 637 : if (_ptr_reserved_field) {
897 0 : NDR_PULL_ALLOC(ndr, r->reserved_field);
898 : } else {
899 637 : r->reserved_field = NULL;
900 : }
901 637 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
902 : }
903 637 : if (ndr_flags & NDR_BUFFERS) {
904 637 : if (r->claims_arrays) {
905 637 : _mem_save_claims_arrays_0 = NDR_PULL_GET_MEM_CTX(ndr);
906 637 : NDR_PULL_SET_MEM_CTX(ndr, r->claims_arrays, 0);
907 637 : NDR_CHECK(ndr_pull_array_size(ndr, &r->claims_arrays));
908 637 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->claims_arrays, &size_claims_arrays_1));
909 637 : NDR_PULL_ALLOC_N(ndr, r->claims_arrays, size_claims_arrays_1);
910 637 : _mem_save_claims_arrays_1 = NDR_PULL_GET_MEM_CTX(ndr);
911 637 : NDR_PULL_SET_MEM_CTX(ndr, r->claims_arrays, 0);
912 1284 : for (cntr_claims_arrays_1 = 0; cntr_claims_arrays_1 < (size_claims_arrays_1); cntr_claims_arrays_1++) {
913 647 : NDR_CHECK(ndr_pull_CLAIMS_ARRAY(ndr, NDR_SCALARS, &r->claims_arrays[cntr_claims_arrays_1]));
914 : }
915 1284 : for (cntr_claims_arrays_1 = 0; cntr_claims_arrays_1 < (size_claims_arrays_1); cntr_claims_arrays_1++) {
916 647 : NDR_CHECK(ndr_pull_CLAIMS_ARRAY(ndr, NDR_BUFFERS, &r->claims_arrays[cntr_claims_arrays_1]));
917 : }
918 637 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_claims_arrays_1, 0);
919 637 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_claims_arrays_0, 0);
920 : }
921 637 : if (r->reserved_field) {
922 0 : _mem_save_reserved_field_0 = NDR_PULL_GET_MEM_CTX(ndr);
923 0 : NDR_PULL_SET_MEM_CTX(ndr, r->reserved_field, 0);
924 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->reserved_field));
925 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->reserved_field, &size_reserved_field_1));
926 0 : NDR_PULL_ALLOC_N(ndr, r->reserved_field, size_reserved_field_1);
927 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->reserved_field, size_reserved_field_1));
928 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reserved_field_0, 0);
929 : }
930 637 : if (r->claims_arrays) {
931 637 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->claims_arrays, r->claims_array_count));
932 : }
933 1284 : for (cntr_claims_arrays_1 = 0; cntr_claims_arrays_1 < (size_claims_arrays_1); cntr_claims_arrays_1++) {
934 24 : }
935 637 : if (r->reserved_field) {
936 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->reserved_field, r->reserved_field_size));
937 : }
938 : }
939 613 : return NDR_ERR_SUCCESS;
940 : }
941 :
942 0 : static void ndr_print_flags_CLAIMS_SET(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct CLAIMS_SET *r)
943 : {
944 0 : ndr_print_CLAIMS_SET(ndr, name, r);
945 0 : }
946 :
947 3 : _PUBLIC_ void ndr_print_CLAIMS_SET(struct ndr_print *ndr, const char *name, const struct CLAIMS_SET *r)
948 : {
949 3 : uint32_t cntr_claims_arrays_1;
950 3 : ndr_print_struct(ndr, name, "CLAIMS_SET");
951 3 : if (r == NULL) { ndr_print_null(ndr); return; }
952 3 : ndr->depth++;
953 3 : ndr_print_uint32(ndr, "claims_array_count", r->claims_array_count);
954 3 : ndr_print_ptr(ndr, "claims_arrays", r->claims_arrays);
955 3 : ndr->depth++;
956 3 : if (r->claims_arrays) {
957 3 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "claims_arrays", (uint32_t)(r->claims_array_count));
958 3 : ndr->depth++;
959 6 : for (cntr_claims_arrays_1 = 0; cntr_claims_arrays_1 < (r->claims_array_count); cntr_claims_arrays_1++) {
960 3 : ndr_print_CLAIMS_ARRAY(ndr, "claims_arrays", &r->claims_arrays[cntr_claims_arrays_1]);
961 : }
962 3 : ndr->depth--;
963 : }
964 3 : ndr->depth--;
965 3 : ndr_print_uint16(ndr, "reserved_type", r->reserved_type);
966 3 : ndr_print_uint32(ndr, "reserved_field_size", r->reserved_field_size);
967 3 : ndr_print_ptr(ndr, "reserved_field", r->reserved_field);
968 3 : ndr->depth++;
969 3 : if (r->reserved_field) {
970 0 : ndr_print_array_uint8(ndr, "reserved_field", r->reserved_field, r->reserved_field_size);
971 : }
972 3 : ndr->depth--;
973 3 : ndr->depth--;
974 : }
975 :
976 3585 : _PUBLIC_ enum ndr_err_code ndr_push_CLAIMS_SET_NDR(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIMS_SET_NDR *r)
977 : {
978 3585 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
979 3585 : if (ndr_flags & NDR_SCALARS) {
980 3585 : NDR_CHECK(ndr_push_align(ndr, 1));
981 : {
982 65 : struct ndr_push *_ndr_claims;
983 3585 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_claims, 0xFFFFFC01, -1));
984 3585 : NDR_CHECK(ndr_push_CLAIMS_SET_CTR(_ndr_claims, NDR_SCALARS|NDR_BUFFERS, &r->claims));
985 3585 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_claims, 0xFFFFFC01, -1));
986 : }
987 3585 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
988 : }
989 3585 : if (ndr_flags & NDR_BUFFERS) {
990 65 : }
991 3585 : return NDR_ERR_SUCCESS;
992 : }
993 :
994 631 : _PUBLIC_ enum ndr_err_code ndr_pull_CLAIMS_SET_NDR(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIMS_SET_NDR *r)
995 : {
996 631 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
997 631 : if (ndr_flags & NDR_SCALARS) {
998 631 : NDR_CHECK(ndr_pull_align(ndr, 1));
999 : {
1000 18 : struct ndr_pull *_ndr_claims;
1001 631 : ssize_t sub_size = -1;
1002 631 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_claims, 0xFFFFFC01, sub_size));
1003 631 : NDR_CHECK(ndr_pull_CLAIMS_SET_CTR(_ndr_claims, NDR_SCALARS|NDR_BUFFERS, &r->claims));
1004 631 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_claims, 0xFFFFFC01, sub_size));
1005 : }
1006 631 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1007 : }
1008 631 : if (ndr_flags & NDR_BUFFERS) {
1009 18 : }
1010 631 : return NDR_ERR_SUCCESS;
1011 : }
1012 :
1013 1 : static void ndr_print_flags_CLAIMS_SET_NDR(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct CLAIMS_SET_NDR *r)
1014 : {
1015 1 : ndr_print_CLAIMS_SET_NDR(ndr, name, r);
1016 1 : }
1017 :
1018 3 : _PUBLIC_ void ndr_print_CLAIMS_SET_NDR(struct ndr_print *ndr, const char *name, const struct CLAIMS_SET_NDR *r)
1019 : {
1020 3 : ndr_print_struct(ndr, name, "CLAIMS_SET_NDR");
1021 3 : if (r == NULL) { ndr_print_null(ndr); return; }
1022 3 : ndr->depth++;
1023 3 : ndr_print_CLAIMS_SET_CTR(ndr, "claims", &r->claims);
1024 3 : ndr->depth--;
1025 : }
1026 :
1027 2151 : _PUBLIC_ size_t ndr_size_CLAIMS_SET_NDR(const struct CLAIMS_SET_NDR *r, libndr_flags flags)
1028 : {
1029 2151 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_CLAIMS_SET_NDR);
1030 : }
1031 :
1032 717 : _PUBLIC_ enum ndr_err_code ndr_push_CLAIMS_SET_METADATA_NDR(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIMS_SET_METADATA_NDR *r)
1033 : {
1034 717 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1035 717 : if (ndr_flags & NDR_SCALARS) {
1036 717 : NDR_CHECK(ndr_push_align(ndr, 1));
1037 : {
1038 13 : struct ndr_push *_ndr_claims;
1039 717 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_claims, 0xFFFFFC01, -1));
1040 717 : NDR_CHECK(ndr_push_CLAIMS_SET_METADATA_CTR(_ndr_claims, NDR_SCALARS|NDR_BUFFERS, &r->claims));
1041 717 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_claims, 0xFFFFFC01, -1));
1042 : }
1043 717 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1044 : }
1045 717 : if (ndr_flags & NDR_BUFFERS) {
1046 13 : }
1047 717 : return NDR_ERR_SUCCESS;
1048 : }
1049 :
1050 630 : _PUBLIC_ enum ndr_err_code ndr_pull_CLAIMS_SET_METADATA_NDR(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIMS_SET_METADATA_NDR *r)
1051 : {
1052 630 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1053 630 : if (ndr_flags & NDR_SCALARS) {
1054 630 : NDR_CHECK(ndr_pull_align(ndr, 1));
1055 : {
1056 17 : struct ndr_pull *_ndr_claims;
1057 630 : ssize_t sub_size = -1;
1058 630 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_claims, 0xFFFFFC01, sub_size));
1059 630 : NDR_CHECK(ndr_pull_CLAIMS_SET_METADATA_CTR(_ndr_claims, NDR_SCALARS|NDR_BUFFERS, &r->claims));
1060 630 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_claims, 0xFFFFFC01, sub_size));
1061 : }
1062 630 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1063 : }
1064 630 : if (ndr_flags & NDR_BUFFERS) {
1065 17 : }
1066 630 : return NDR_ERR_SUCCESS;
1067 : }
1068 :
1069 2 : static void ndr_print_flags_CLAIMS_SET_METADATA_NDR(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct CLAIMS_SET_METADATA_NDR *r)
1070 : {
1071 2 : ndr_print_CLAIMS_SET_METADATA_NDR(ndr, name, r);
1072 2 : }
1073 :
1074 2 : _PUBLIC_ void ndr_print_CLAIMS_SET_METADATA_NDR(struct ndr_print *ndr, const char *name, const struct CLAIMS_SET_METADATA_NDR *r)
1075 : {
1076 2 : ndr_print_struct(ndr, name, "CLAIMS_SET_METADATA_NDR");
1077 2 : if (r == NULL) { ndr_print_null(ndr); return; }
1078 2 : ndr->depth++;
1079 2 : ndr_print_CLAIMS_SET_METADATA_CTR(ndr, "claims", &r->claims);
1080 2 : ndr->depth--;
1081 : }
1082 :
1083 717 : _PUBLIC_ enum ndr_err_code ndr_push_CLAIMS_SET_METADATA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIMS_SET_METADATA *r)
1084 : {
1085 717 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1086 717 : if (ndr_flags & NDR_SCALARS) {
1087 717 : NDR_CHECK(ndr_push_align(ndr, 5));
1088 717 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_claims_compressed_size(r->claims_set, r->compression_format, ndr->flags)));
1089 717 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->claims_set));
1090 730 : NDR_CHECK(ndr_push_CLAIMS_COMPRESSION_FORMAT(ndr, NDR_SCALARS, ndr_claims_actual_wire_compression_alg(r->compression_format, ndr_size_CLAIMS_SET_NDR(r->claims_set, ndr->flags))));
1091 717 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_CLAIMS_SET_NDR(r->claims_set, ndr->flags)));
1092 717 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved_type));
1093 717 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved_field_size));
1094 717 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->reserved_field));
1095 717 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1096 : }
1097 717 : if (ndr_flags & NDR_BUFFERS) {
1098 717 : if (r->claims_set) {
1099 : {
1100 13 : struct ndr_push *_ndr_claims_set;
1101 717 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_claims_set, 4, -1));
1102 : {
1103 13 : struct ndr_push *_ndr_claims_set_compressed;
1104 717 : NDR_CHECK(ndr_push_compression_state_init(_ndr_claims_set, ndr_claims_compression_alg(ndr_claims_actual_wire_compression_alg(r->compression_format, ndr_size_CLAIMS_SET_NDR(r->claims_set, ndr->flags)))));
1105 717 : NDR_CHECK(ndr_push_compression_start(_ndr_claims_set, &_ndr_claims_set_compressed));
1106 717 : NDR_CHECK(ndr_push_CLAIMS_SET_NDR(_ndr_claims_set_compressed, NDR_SCALARS|NDR_BUFFERS, r->claims_set));
1107 717 : NDR_CHECK(ndr_push_compression_end(_ndr_claims_set, _ndr_claims_set_compressed));
1108 717 : TALLOC_FREE(_ndr_claims_set->cstate);
1109 : }
1110 717 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_claims_set, 4, -1));
1111 : }
1112 : }
1113 717 : if (r->reserved_field) {
1114 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->reserved_field_size));
1115 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->reserved_field, r->reserved_field_size));
1116 : }
1117 : }
1118 704 : return NDR_ERR_SUCCESS;
1119 : }
1120 :
1121 630 : _PUBLIC_ enum ndr_err_code ndr_pull_CLAIMS_SET_METADATA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIMS_SET_METADATA *r)
1122 : {
1123 17 : uint32_t _ptr_claims_set;
1124 630 : TALLOC_CTX *_mem_save_claims_set_0 = NULL;
1125 17 : uint32_t _ptr_reserved_field;
1126 630 : uint32_t size_reserved_field_1 = 0;
1127 630 : TALLOC_CTX *_mem_save_reserved_field_0 = NULL;
1128 630 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1129 630 : if (ndr_flags & NDR_SCALARS) {
1130 630 : NDR_CHECK(ndr_pull_align(ndr, 5));
1131 630 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->claims_set_size));
1132 630 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_claims_set));
1133 630 : if (_ptr_claims_set) {
1134 630 : NDR_PULL_ALLOC(ndr, r->claims_set);
1135 : } else {
1136 0 : r->claims_set = NULL;
1137 : }
1138 647 : NDR_CHECK(ndr_pull_CLAIMS_COMPRESSION_FORMAT(ndr, NDR_SCALARS, &r->compression_format));
1139 630 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uncompressed_claims_set_size));
1140 630 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved_type));
1141 630 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved_field_size));
1142 630 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_reserved_field));
1143 630 : if (_ptr_reserved_field) {
1144 0 : NDR_PULL_ALLOC(ndr, r->reserved_field);
1145 : } else {
1146 630 : r->reserved_field = NULL;
1147 : }
1148 630 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1149 : }
1150 630 : if (ndr_flags & NDR_BUFFERS) {
1151 630 : if (r->claims_set) {
1152 630 : _mem_save_claims_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
1153 630 : NDR_PULL_SET_MEM_CTX(ndr, r->claims_set, 0);
1154 : {
1155 17 : struct ndr_pull *_ndr_claims_set;
1156 630 : ssize_t sub_size = -1;
1157 630 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_claims_set, 4, sub_size));
1158 : {
1159 17 : struct ndr_pull *_ndr_claims_set_compressed;
1160 630 : NDR_CHECK(ndr_pull_compression_start(_ndr_claims_set, &_ndr_claims_set_compressed, ndr_claims_compression_alg(r->compression_format), r->uncompressed_claims_set_size, r->claims_set_size));
1161 630 : NDR_CHECK(ndr_pull_CLAIMS_SET_NDR(_ndr_claims_set_compressed, NDR_SCALARS|NDR_BUFFERS, r->claims_set));
1162 630 : NDR_CHECK(ndr_pull_compression_end(_ndr_claims_set, _ndr_claims_set_compressed, ndr_claims_compression_alg(r->compression_format), r->uncompressed_claims_set_size));
1163 : }
1164 630 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_claims_set, 4, sub_size));
1165 : }
1166 630 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_claims_set_0, 0);
1167 : }
1168 630 : if (r->reserved_field) {
1169 0 : _mem_save_reserved_field_0 = NDR_PULL_GET_MEM_CTX(ndr);
1170 0 : NDR_PULL_SET_MEM_CTX(ndr, r->reserved_field, 0);
1171 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->reserved_field));
1172 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->reserved_field, &size_reserved_field_1));
1173 0 : NDR_PULL_ALLOC_N(ndr, r->reserved_field, size_reserved_field_1);
1174 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->reserved_field, size_reserved_field_1));
1175 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reserved_field_0, 0);
1176 : }
1177 630 : if (r->reserved_field) {
1178 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->reserved_field, r->reserved_field_size));
1179 : }
1180 : }
1181 613 : return NDR_ERR_SUCCESS;
1182 : }
1183 :
1184 0 : static void ndr_print_flags_CLAIMS_SET_METADATA(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct CLAIMS_SET_METADATA *r)
1185 : {
1186 0 : ndr_print_CLAIMS_SET_METADATA(ndr, name, r);
1187 0 : }
1188 :
1189 2 : _PUBLIC_ void ndr_print_CLAIMS_SET_METADATA(struct ndr_print *ndr, const char *name, const struct CLAIMS_SET_METADATA *r)
1190 : {
1191 2 : ndr_print_struct(ndr, name, "CLAIMS_SET_METADATA");
1192 2 : if (r == NULL) { ndr_print_null(ndr); return; }
1193 2 : ndr->depth++;
1194 2 : ndr_print_uint32(ndr, "claims_set_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_claims_compressed_size(r->claims_set, r->compression_format, ndr->flags):r->claims_set_size);
1195 2 : ndr_print_ptr(ndr, "claims_set", r->claims_set);
1196 2 : ndr->depth++;
1197 2 : if (r->claims_set) {
1198 2 : ndr_print_CLAIMS_SET_NDR(ndr, "claims_set", r->claims_set);
1199 : }
1200 2 : ndr->depth--;
1201 2 : ndr_print_CLAIMS_COMPRESSION_FORMAT(ndr, "compression_format", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_claims_actual_wire_compression_alg(r->compression_format, ndr_size_CLAIMS_SET_NDR(r->claims_set, ndr->flags)):r->compression_format);
1202 2 : ndr_print_uint32(ndr, "uncompressed_claims_set_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_CLAIMS_SET_NDR(r->claims_set, ndr->flags):r->uncompressed_claims_set_size);
1203 2 : ndr_print_uint16(ndr, "reserved_type", r->reserved_type);
1204 2 : ndr_print_uint32(ndr, "reserved_field_size", r->reserved_field_size);
1205 2 : ndr_print_ptr(ndr, "reserved_field", r->reserved_field);
1206 2 : ndr->depth++;
1207 2 : if (r->reserved_field) {
1208 0 : ndr_print_array_uint8(ndr, "reserved_field", r->reserved_field, r->reserved_field_size);
1209 : }
1210 2 : ndr->depth--;
1211 2 : ndr->depth--;
1212 : }
1213 :
1214 : #ifndef SKIP_NDR_TABLE_claims
1215 : static const struct ndr_interface_public_struct claims_public_structs[] = {
1216 : {
1217 : .name = "CLAIMS_SET",
1218 : .struct_size = sizeof(struct CLAIMS_SET ),
1219 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_CLAIMS_SET,
1220 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_CLAIMS_SET,
1221 : .ndr_print = (ndr_print_function_t) ndr_print_flags_CLAIMS_SET,
1222 : },
1223 : {
1224 : .name = "CLAIMS_SET_NDR",
1225 : .struct_size = sizeof(struct CLAIMS_SET_NDR ),
1226 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_CLAIMS_SET_NDR,
1227 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_CLAIMS_SET_NDR,
1228 : .ndr_print = (ndr_print_function_t) ndr_print_flags_CLAIMS_SET_NDR,
1229 : },
1230 : {
1231 : .name = "CLAIMS_SET_METADATA_NDR",
1232 : .struct_size = sizeof(struct CLAIMS_SET_METADATA_NDR ),
1233 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_CLAIMS_SET_METADATA_NDR,
1234 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_CLAIMS_SET_METADATA_NDR,
1235 : .ndr_print = (ndr_print_function_t) ndr_print_flags_CLAIMS_SET_METADATA_NDR,
1236 : },
1237 : {
1238 : .name = "CLAIMS_SET_METADATA",
1239 : .struct_size = sizeof(struct CLAIMS_SET_METADATA ),
1240 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_CLAIMS_SET_METADATA,
1241 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_CLAIMS_SET_METADATA,
1242 : .ndr_print = (ndr_print_function_t) ndr_print_flags_CLAIMS_SET_METADATA,
1243 : },
1244 : { .name = NULL }
1245 : };
1246 :
1247 : static const struct ndr_interface_call claims_calls[] = {
1248 : { .name = NULL }
1249 : };
1250 :
1251 : static const char * const claims_endpoint_strings[] = {
1252 : "ncacn_np:[\\pipe\\claims]",
1253 : };
1254 :
1255 : static const struct ndr_interface_string_array claims_endpoints = {
1256 : .count = 1,
1257 : .names = claims_endpoint_strings
1258 : };
1259 :
1260 : static const char * const claims_authservice_strings[] = {
1261 : "host",
1262 : };
1263 :
1264 : static const struct ndr_interface_string_array claims_authservices = {
1265 : .count = 1,
1266 : .names = claims_authservice_strings
1267 : };
1268 :
1269 :
1270 : const struct ndr_interface_table ndr_table_claims = {
1271 : .name = "claims",
1272 : .syntax_id = {
1273 : {0xbba9cb76,0xeb0c,0x462c,{0xaa,0x1b},{0x5d,0x8c,0x34,0x41,0x57,0x01}},
1274 : NDR_CLAIMS_VERSION
1275 : },
1276 : .helpstring = NDR_CLAIMS_HELPSTRING,
1277 : .num_calls = 0,
1278 : .calls = claims_calls,
1279 : .num_public_structs = 4,
1280 : .public_structs = claims_public_structs,
1281 : .endpoints = &claims_endpoints,
1282 : .authservices = &claims_authservices
1283 : };
1284 :
1285 : #endif /* SKIP_NDR_TABLE_claims */
|