Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_drsblobs.h"
5 :
6 : #include "librpc/gen_ndr/ndr_drsuapi.h"
7 : #include "librpc/gen_ndr/ndr_misc.h"
8 : #include "librpc/gen_ndr/ndr_samr.h"
9 : #include "librpc/gen_ndr/ndr_lsa.h"
10 : #include "librpc/gen_ndr/ndr_security.h"
11 20916374 : _PUBLIC_ enum ndr_err_code ndr_push_replPropertyMetaData1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct replPropertyMetaData1 *r)
12 : {
13 20916374 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14 20916374 : if (ndr_flags & NDR_SCALARS) {
15 20916374 : NDR_CHECK(ndr_push_align(ndr, 8));
16 20916374 : NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
17 20916374 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
18 20916374 : NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_change_time));
19 20916374 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
20 20916374 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
21 20916374 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
22 20916374 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
23 : }
24 20916374 : if (ndr_flags & NDR_BUFFERS) {
25 1864586 : }
26 20916374 : return NDR_ERR_SUCCESS;
27 : }
28 :
29 63955364 : _PUBLIC_ enum ndr_err_code ndr_pull_replPropertyMetaData1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct replPropertyMetaData1 *r)
30 : {
31 63955364 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
32 63955364 : if (ndr_flags & NDR_SCALARS) {
33 63955364 : NDR_CHECK(ndr_pull_align(ndr, 8));
34 63955364 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
35 63955364 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
36 63955364 : NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_change_time));
37 63955364 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
38 63955364 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
39 63955364 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
40 63955364 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
41 : }
42 63955364 : if (ndr_flags & NDR_BUFFERS) {
43 3324130 : }
44 63955364 : return NDR_ERR_SUCCESS;
45 : }
46 :
47 0 : static void ndr_print_flags_replPropertyMetaData1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct replPropertyMetaData1 *r)
48 : {
49 0 : ndr_print_replPropertyMetaData1(ndr, name, r);
50 0 : }
51 :
52 7156 : _PUBLIC_ void ndr_print_replPropertyMetaData1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaData1 *r)
53 : {
54 7156 : ndr_print_struct(ndr, name, "replPropertyMetaData1");
55 7156 : if (r == NULL) { ndr_print_null(ndr); return; }
56 7156 : ndr->depth++;
57 7156 : ndr_print_drsuapi_DsAttributeId(ndr, "attid", r->attid);
58 7156 : ndr_print_uint32(ndr, "version", r->version);
59 7156 : ndr_print_NTTIME_1sec(ndr, "originating_change_time", r->originating_change_time);
60 7156 : ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
61 7156 : ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
62 7156 : ndr_print_hyper(ndr, "local_usn", r->local_usn);
63 7156 : ndr->depth--;
64 : }
65 :
66 1311821 : static enum ndr_err_code ndr_push_replPropertyMetaDataCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct replPropertyMetaDataCtr1 *r)
67 : {
68 115647 : uint32_t cntr_array_0;
69 1311821 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
70 1311821 : if (ndr_flags & NDR_SCALARS) {
71 1311821 : NDR_CHECK(ndr_push_align(ndr, 8));
72 1311821 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
73 1311821 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
74 22213105 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
75 20901284 : NDR_CHECK(ndr_push_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
76 : }
77 1311821 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
78 : }
79 1311821 : if (ndr_flags & NDR_BUFFERS) {
80 115647 : }
81 1311821 : return NDR_ERR_SUCCESS;
82 : }
83 :
84 3806667 : static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct replPropertyMetaDataCtr1 *r)
85 : {
86 3806667 : uint32_t size_array_0 = 0;
87 198644 : uint32_t cntr_array_0;
88 3806667 : TALLOC_CTX *_mem_save_array_0 = NULL;
89 3806667 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
90 3806667 : if (ndr_flags & NDR_SCALARS) {
91 3806667 : NDR_CHECK(ndr_pull_align(ndr, 8));
92 3806667 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
93 3806667 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
94 3806667 : size_array_0 = r->count;
95 3806667 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
96 3806667 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
97 3806667 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
98 67761526 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
99 63954859 : NDR_CHECK(ndr_pull_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
100 : }
101 3806667 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
102 3806667 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
103 : }
104 3806667 : if (ndr_flags & NDR_BUFFERS) {
105 198644 : }
106 3806667 : return NDR_ERR_SUCCESS;
107 : }
108 :
109 300 : _PUBLIC_ void ndr_print_replPropertyMetaDataCtr1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataCtr1 *r)
110 : {
111 0 : uint32_t cntr_array_0;
112 300 : ndr_print_struct(ndr, name, "replPropertyMetaDataCtr1");
113 300 : if (r == NULL) { ndr_print_null(ndr); return; }
114 300 : ndr->depth++;
115 300 : ndr_print_uint32(ndr, "count", r->count);
116 300 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
117 300 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
118 300 : ndr->depth++;
119 7456 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
120 7156 : ndr_print_replPropertyMetaData1(ndr, "array", &r->array[cntr_array_0]);
121 : }
122 300 : ndr->depth--;
123 300 : ndr->depth--;
124 : }
125 :
126 1311821 : static enum ndr_err_code ndr_push_replPropertyMetaDataCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union replPropertyMetaDataCtr *r)
127 : {
128 115647 : uint32_t level;
129 1311821 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
130 1311821 : if (ndr_flags & NDR_SCALARS) {
131 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
132 1311821 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
133 1311821 : NDR_CHECK(ndr_push_union_align(ndr, 8));
134 1311821 : switch (level) {
135 1311821 : case 1: {
136 1311821 : NDR_CHECK(ndr_push_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
137 1196174 : break; }
138 :
139 0 : default:
140 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
141 : }
142 : }
143 1311821 : if (ndr_flags & NDR_BUFFERS) {
144 0 : if (!(ndr_flags & NDR_SCALARS)) {
145 : /* We didn't get it above, and the token is not needed after this. */
146 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
147 : }
148 0 : switch (level) {
149 0 : case 1:
150 0 : break;
151 :
152 0 : default:
153 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
154 : }
155 : }
156 1196174 : return NDR_ERR_SUCCESS;
157 : }
158 :
159 3806667 : static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union replPropertyMetaDataCtr *r)
160 : {
161 198644 : uint32_t level;
162 3806667 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
163 3806667 : if (ndr_flags & NDR_SCALARS) {
164 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
165 3806667 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
166 3806667 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
167 3806667 : switch (level) {
168 3806667 : case 1: {
169 3806667 : NDR_CHECK(ndr_pull_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
170 3608023 : break; }
171 :
172 0 : default:
173 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
174 : }
175 : }
176 3806667 : if (ndr_flags & NDR_BUFFERS) {
177 0 : if (!(ndr_flags & NDR_SCALARS)) {
178 : /* We didn't get it above, and the token is not needed after this. */
179 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
180 : }
181 0 : switch (level) {
182 0 : case 1:
183 0 : break;
184 :
185 0 : default:
186 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
187 : }
188 : }
189 3608023 : return NDR_ERR_SUCCESS;
190 : }
191 :
192 300 : _PUBLIC_ void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r)
193 : {
194 0 : uint32_t level;
195 300 : level = ndr_print_steal_switch_value(ndr, r);
196 300 : ndr_print_union(ndr, name, level, "replPropertyMetaDataCtr");
197 300 : switch (level) {
198 300 : case 1:
199 300 : ndr_print_replPropertyMetaDataCtr1(ndr, "ctr1", &r->ctr1);
200 300 : break;
201 :
202 0 : default:
203 0 : ndr_print_bad_level(ndr, name, level);
204 : }
205 300 : }
206 :
207 1311821 : _PUBLIC_ enum ndr_err_code ndr_push_replPropertyMetaDataBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct replPropertyMetaDataBlob *r)
208 : {
209 1311821 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
210 1311821 : if (ndr_flags & NDR_SCALARS) {
211 1311821 : NDR_CHECK(ndr_push_align(ndr, 8));
212 1311821 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
213 1311821 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
214 1311821 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
215 1311821 : NDR_CHECK(ndr_push_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
216 1311821 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
217 : }
218 1311821 : if (ndr_flags & NDR_BUFFERS) {
219 115647 : }
220 1311821 : return NDR_ERR_SUCCESS;
221 : }
222 :
223 3806667 : _PUBLIC_ enum ndr_err_code ndr_pull_replPropertyMetaDataBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct replPropertyMetaDataBlob *r)
224 : {
225 3806667 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
226 3806667 : if (ndr_flags & NDR_SCALARS) {
227 3806667 : NDR_CHECK(ndr_pull_align(ndr, 8));
228 3806667 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
229 3806667 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
230 3806667 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
231 3806667 : NDR_CHECK(ndr_pull_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
232 3806667 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
233 : }
234 3806667 : if (ndr_flags & NDR_BUFFERS) {
235 198644 : }
236 3806667 : return NDR_ERR_SUCCESS;
237 : }
238 :
239 0 : static void ndr_print_flags_replPropertyMetaDataBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct replPropertyMetaDataBlob *r)
240 : {
241 0 : ndr_print_replPropertyMetaDataBlob(ndr, name, r);
242 0 : }
243 :
244 300 : _PUBLIC_ void ndr_print_replPropertyMetaDataBlob(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataBlob *r)
245 : {
246 300 : ndr_print_struct(ndr, name, "replPropertyMetaDataBlob");
247 300 : if (r == NULL) { ndr_print_null(ndr); return; }
248 300 : ndr->depth++;
249 300 : ndr_print_uint32(ndr, "version", r->version);
250 300 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
251 300 : ndr_print_set_switch_value(ndr, &r->ctr, r->version);
252 300 : ndr_print_replPropertyMetaDataCtr(ndr, "ctr", &r->ctr);
253 300 : ndr->depth--;
254 : }
255 :
256 2076 : static enum ndr_err_code ndr_push_replUpToDateVectorCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct replUpToDateVectorCtr1 *r)
257 : {
258 0 : uint32_t cntr_cursors_0;
259 2076 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
260 2076 : if (ndr_flags & NDR_SCALARS) {
261 2076 : NDR_CHECK(ndr_push_align(ndr, 8));
262 2076 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
263 2076 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
264 4152 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
265 2076 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
266 : }
267 2076 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
268 : }
269 2076 : if (ndr_flags & NDR_BUFFERS) {
270 0 : }
271 2076 : return NDR_ERR_SUCCESS;
272 : }
273 :
274 142 : static enum ndr_err_code ndr_pull_replUpToDateVectorCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct replUpToDateVectorCtr1 *r)
275 : {
276 142 : uint32_t size_cursors_0 = 0;
277 0 : uint32_t cntr_cursors_0;
278 142 : TALLOC_CTX *_mem_save_cursors_0 = NULL;
279 142 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
280 142 : if (ndr_flags & NDR_SCALARS) {
281 142 : NDR_CHECK(ndr_pull_align(ndr, 8));
282 142 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
283 142 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
284 142 : size_cursors_0 = r->count;
285 142 : NDR_PULL_ALLOC_N(ndr, r->cursors, size_cursors_0);
286 142 : _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
287 142 : NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
288 284 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (size_cursors_0); cntr_cursors_0++) {
289 142 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
290 : }
291 142 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
292 142 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
293 : }
294 142 : if (ndr_flags & NDR_BUFFERS) {
295 0 : }
296 142 : return NDR_ERR_SUCCESS;
297 : }
298 :
299 0 : _PUBLIC_ void ndr_print_replUpToDateVectorCtr1(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr1 *r)
300 : {
301 0 : uint32_t cntr_cursors_0;
302 0 : ndr_print_struct(ndr, name, "replUpToDateVectorCtr1");
303 0 : if (r == NULL) { ndr_print_null(ndr); return; }
304 0 : ndr->depth++;
305 0 : ndr_print_uint32(ndr, "count", r->count);
306 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
307 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "cursors", (uint32_t)(r->count));
308 0 : ndr->depth++;
309 0 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
310 0 : ndr_print_drsuapi_DsReplicaCursor(ndr, "cursors", &r->cursors[cntr_cursors_0]);
311 : }
312 0 : ndr->depth--;
313 0 : ndr->depth--;
314 : }
315 :
316 3734 : static enum ndr_err_code ndr_push_replUpToDateVectorCtr2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct replUpToDateVectorCtr2 *r)
317 : {
318 0 : uint32_t cntr_cursors_0;
319 3734 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
320 3734 : if (ndr_flags & NDR_SCALARS) {
321 3734 : NDR_CHECK(ndr_push_align(ndr, 8));
322 3734 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
323 3734 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
324 7273 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
325 3539 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
326 : }
327 3734 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
328 : }
329 3734 : if (ndr_flags & NDR_BUFFERS) {
330 0 : }
331 3734 : return NDR_ERR_SUCCESS;
332 : }
333 :
334 14104 : static enum ndr_err_code ndr_pull_replUpToDateVectorCtr2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct replUpToDateVectorCtr2 *r)
335 : {
336 14104 : uint32_t size_cursors_0 = 0;
337 0 : uint32_t cntr_cursors_0;
338 14104 : TALLOC_CTX *_mem_save_cursors_0 = NULL;
339 14104 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
340 14104 : if (ndr_flags & NDR_SCALARS) {
341 14104 : NDR_CHECK(ndr_pull_align(ndr, 8));
342 14104 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
343 14104 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
344 14104 : size_cursors_0 = r->count;
345 14104 : NDR_PULL_ALLOC_N(ndr, r->cursors, size_cursors_0);
346 14104 : _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
347 14104 : NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
348 29604 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (size_cursors_0); cntr_cursors_0++) {
349 15500 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
350 : }
351 14104 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
352 14104 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
353 : }
354 14104 : if (ndr_flags & NDR_BUFFERS) {
355 0 : }
356 14104 : return NDR_ERR_SUCCESS;
357 : }
358 :
359 0 : _PUBLIC_ void ndr_print_replUpToDateVectorCtr2(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr2 *r)
360 : {
361 0 : uint32_t cntr_cursors_0;
362 0 : ndr_print_struct(ndr, name, "replUpToDateVectorCtr2");
363 0 : if (r == NULL) { ndr_print_null(ndr); return; }
364 0 : ndr->depth++;
365 0 : ndr_print_uint32(ndr, "count", r->count);
366 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
367 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "cursors", (uint32_t)(r->count));
368 0 : ndr->depth++;
369 0 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
370 0 : ndr_print_drsuapi_DsReplicaCursor2(ndr, "cursors", &r->cursors[cntr_cursors_0]);
371 : }
372 0 : ndr->depth--;
373 0 : ndr->depth--;
374 : }
375 :
376 5810 : static enum ndr_err_code ndr_push_replUpToDateVectorCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union replUpToDateVectorCtr *r)
377 : {
378 0 : uint32_t level;
379 5810 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
380 5810 : if (ndr_flags & NDR_SCALARS) {
381 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
382 5810 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
383 5810 : NDR_CHECK(ndr_push_union_align(ndr, 8));
384 5810 : switch (level) {
385 2076 : case 1: {
386 2076 : NDR_CHECK(ndr_push_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
387 2076 : break; }
388 :
389 3734 : case 2: {
390 3734 : NDR_CHECK(ndr_push_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
391 3734 : break; }
392 :
393 0 : default:
394 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
395 : }
396 : }
397 5810 : if (ndr_flags & NDR_BUFFERS) {
398 0 : if (!(ndr_flags & NDR_SCALARS)) {
399 : /* We didn't get it above, and the token is not needed after this. */
400 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
401 : }
402 0 : switch (level) {
403 0 : case 1:
404 0 : break;
405 :
406 0 : case 2:
407 0 : break;
408 :
409 0 : default:
410 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
411 : }
412 : }
413 5810 : return NDR_ERR_SUCCESS;
414 : }
415 :
416 14246 : static enum ndr_err_code ndr_pull_replUpToDateVectorCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union replUpToDateVectorCtr *r)
417 : {
418 0 : uint32_t level;
419 14246 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
420 14246 : if (ndr_flags & NDR_SCALARS) {
421 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
422 14246 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
423 14246 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
424 14246 : switch (level) {
425 142 : case 1: {
426 142 : NDR_CHECK(ndr_pull_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
427 142 : break; }
428 :
429 14104 : case 2: {
430 14104 : NDR_CHECK(ndr_pull_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
431 14104 : break; }
432 :
433 0 : default:
434 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
435 : }
436 : }
437 14246 : if (ndr_flags & NDR_BUFFERS) {
438 0 : if (!(ndr_flags & NDR_SCALARS)) {
439 : /* We didn't get it above, and the token is not needed after this. */
440 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
441 : }
442 0 : switch (level) {
443 0 : case 1:
444 0 : break;
445 :
446 0 : case 2:
447 0 : break;
448 :
449 0 : default:
450 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
451 : }
452 : }
453 14246 : return NDR_ERR_SUCCESS;
454 : }
455 :
456 0 : _PUBLIC_ void ndr_print_replUpToDateVectorCtr(struct ndr_print *ndr, const char *name, const union replUpToDateVectorCtr *r)
457 : {
458 0 : uint32_t level;
459 0 : level = ndr_print_steal_switch_value(ndr, r);
460 0 : ndr_print_union(ndr, name, level, "replUpToDateVectorCtr");
461 0 : switch (level) {
462 0 : case 1:
463 0 : ndr_print_replUpToDateVectorCtr1(ndr, "ctr1", &r->ctr1);
464 0 : break;
465 :
466 0 : case 2:
467 0 : ndr_print_replUpToDateVectorCtr2(ndr, "ctr2", &r->ctr2);
468 0 : break;
469 :
470 0 : default:
471 0 : ndr_print_bad_level(ndr, name, level);
472 : }
473 0 : }
474 :
475 5810 : _PUBLIC_ enum ndr_err_code ndr_push_replUpToDateVectorBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct replUpToDateVectorBlob *r)
476 : {
477 5810 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
478 5810 : if (ndr_flags & NDR_SCALARS) {
479 5810 : NDR_CHECK(ndr_push_align(ndr, 8));
480 5810 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
481 5810 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
482 5810 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
483 5810 : NDR_CHECK(ndr_push_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
484 5810 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
485 : }
486 5810 : if (ndr_flags & NDR_BUFFERS) {
487 0 : }
488 5810 : return NDR_ERR_SUCCESS;
489 : }
490 :
491 14246 : _PUBLIC_ enum ndr_err_code ndr_pull_replUpToDateVectorBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct replUpToDateVectorBlob *r)
492 : {
493 14246 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
494 14246 : if (ndr_flags & NDR_SCALARS) {
495 14246 : NDR_CHECK(ndr_pull_align(ndr, 8));
496 14246 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
497 14246 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
498 14246 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
499 14246 : NDR_CHECK(ndr_pull_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
500 14246 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
501 : }
502 14246 : if (ndr_flags & NDR_BUFFERS) {
503 0 : }
504 14246 : return NDR_ERR_SUCCESS;
505 : }
506 :
507 0 : static void ndr_print_flags_replUpToDateVectorBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct replUpToDateVectorBlob *r)
508 : {
509 0 : ndr_print_replUpToDateVectorBlob(ndr, name, r);
510 0 : }
511 :
512 0 : _PUBLIC_ void ndr_print_replUpToDateVectorBlob(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorBlob *r)
513 : {
514 0 : ndr_print_struct(ndr, name, "replUpToDateVectorBlob");
515 0 : if (r == NULL) { ndr_print_null(ndr); return; }
516 0 : ndr->depth++;
517 0 : ndr_print_uint32(ndr, "version", r->version);
518 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
519 0 : ndr_print_set_switch_value(ndr, &r->ctr, r->version);
520 0 : ndr_print_replUpToDateVectorCtr(ndr, "ctr", &r->ctr);
521 0 : ndr->depth--;
522 : }
523 :
524 79524 : _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1OtherInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct repsFromTo1OtherInfo *r)
525 : {
526 79524 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
527 79524 : if (ndr_flags & NDR_SCALARS) {
528 79524 : NDR_CHECK(ndr_push_align(ndr, 4));
529 79524 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->dns_name) + 1));
530 79524 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, strlen(r->dns_name) + 1, sizeof(uint8_t), CH_DOS));
531 79524 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
532 : }
533 79524 : if (ndr_flags & NDR_BUFFERS) {
534 150 : }
535 79524 : return NDR_ERR_SUCCESS;
536 : }
537 :
538 65408 : _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1OtherInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct repsFromTo1OtherInfo *r)
539 : {
540 65408 : uint32_t size_dns_name_0 = 0;
541 65408 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
542 65408 : if (ndr_flags & NDR_SCALARS) {
543 65408 : NDR_CHECK(ndr_pull_align(ndr, 4));
544 65408 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__dns_name_size));
545 65408 : size_dns_name_0 = r->__dns_name_size;
546 65408 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, size_dns_name_0, sizeof(uint8_t), CH_DOS));
547 65408 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
548 : }
549 65408 : if (ndr_flags & NDR_BUFFERS) {
550 25 : }
551 65408 : return NDR_ERR_SUCCESS;
552 : }
553 :
554 0 : static void ndr_print_flags_repsFromTo1OtherInfo(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct repsFromTo1OtherInfo *r)
555 : {
556 0 : ndr_print_repsFromTo1OtherInfo(ndr, name, r);
557 0 : }
558 :
559 0 : _PUBLIC_ void ndr_print_repsFromTo1OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo1OtherInfo *r)
560 : {
561 0 : ndr_print_struct(ndr, name, "repsFromTo1OtherInfo");
562 0 : if (r == NULL) { ndr_print_null(ndr); return; }
563 0 : ndr->depth++;
564 0 : ndr_print_uint32(ndr, "__dns_name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->dns_name) + 1:r->__dns_name_size);
565 0 : ndr_print_string(ndr, "dns_name", r->dns_name);
566 0 : ndr->depth--;
567 : }
568 :
569 53016 : _PUBLIC_ size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, libndr_flags flags)
570 : {
571 53016 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1OtherInfo);
572 : }
573 :
574 79524 : _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct repsFromTo1 *r)
575 : {
576 : {
577 79524 : libndr_flags _flags_save_STRUCT = ndr->flags;
578 79524 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
579 79524 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
580 79524 : if (ndr_flags & NDR_SCALARS) {
581 53016 : NDR_CHECK(ndr_push_align(ndr, 8));
582 53016 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1(r, ndr->flags) + 8));
583 53016 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
584 53016 : NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_success));
585 53016 : NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_attempt));
586 53016 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
587 53016 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->other_info));
588 53016 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->flags)));
589 53016 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
590 53016 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
591 53016 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
592 53016 : NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
593 53016 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
594 53016 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
595 53016 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid));
596 53016 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
597 : }
598 79524 : if (ndr_flags & NDR_BUFFERS) {
599 53016 : if (r->other_info) {
600 53016 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->other_info));
601 53016 : NDR_CHECK(ndr_push_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
602 53016 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->other_info));
603 : }
604 : }
605 79524 : ndr->flags = _flags_save_STRUCT;
606 : }
607 79524 : return NDR_ERR_SUCCESS;
608 : }
609 :
610 130816 : _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct repsFromTo1 *r)
611 : {
612 50 : uint32_t _ptr_other_info;
613 130816 : TALLOC_CTX *_mem_save_other_info_0 = NULL;
614 130816 : uint32_t size_schedule_0 = 0;
615 : {
616 130816 : libndr_flags _flags_save_STRUCT = ndr->flags;
617 130816 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
618 130816 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
619 130816 : if (ndr_flags & NDR_SCALARS) {
620 65408 : NDR_CHECK(ndr_pull_align(ndr, 8));
621 65408 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blobsize));
622 65408 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
623 65408 : NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_success));
624 65408 : NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_attempt));
625 65408 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
626 65408 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_info));
627 65408 : if (_ptr_other_info) {
628 65408 : NDR_PULL_ALLOC(ndr, r->other_info);
629 65408 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->other_info, _ptr_other_info));
630 : } else {
631 0 : r->other_info = NULL;
632 : }
633 65408 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->other_info_length));
634 65408 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
635 65408 : size_schedule_0 = 84;
636 65408 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
637 65408 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
638 65408 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
639 65408 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
640 65408 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
641 65408 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid));
642 65408 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
643 : }
644 130816 : if (ndr_flags & NDR_BUFFERS) {
645 65408 : if (r->other_info) {
646 25 : uint32_t _relative_save_offset;
647 65408 : _relative_save_offset = ndr->offset;
648 65408 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->other_info));
649 65408 : _mem_save_other_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
650 65408 : NDR_PULL_SET_MEM_CTX(ndr, r->other_info, 0);
651 65408 : NDR_CHECK(ndr_pull_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
652 65408 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_info_0, 0);
653 65408 : if (ndr->offset > ndr->relative_highest_offset) {
654 65408 : ndr->relative_highest_offset = ndr->offset;
655 : }
656 65408 : ndr->offset = _relative_save_offset;
657 : }
658 : }
659 130816 : ndr->flags = _flags_save_STRUCT;
660 : }
661 130816 : return NDR_ERR_SUCCESS;
662 : }
663 :
664 0 : static void ndr_print_flags_repsFromTo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct repsFromTo1 *r)
665 : {
666 0 : ndr_print_repsFromTo1(ndr, name, r);
667 0 : }
668 :
669 0 : _PUBLIC_ void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, const struct repsFromTo1 *r)
670 : {
671 0 : ndr_print_struct(ndr, name, "repsFromTo1");
672 0 : if (r == NULL) { ndr_print_null(ndr); return; }
673 : {
674 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
675 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
676 0 : ndr->depth++;
677 0 : ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1(r, ndr->flags) + 8:r->blobsize);
678 0 : ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
679 0 : ndr_print_NTTIME_1sec(ndr, "last_success", r->last_success);
680 0 : ndr_print_NTTIME_1sec(ndr, "last_attempt", r->last_attempt);
681 0 : ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
682 0 : ndr_print_ptr(ndr, "other_info", r->other_info);
683 0 : ndr->depth++;
684 0 : if (r->other_info) {
685 0 : ndr_print_repsFromTo1OtherInfo(ndr, "other_info", r->other_info);
686 : }
687 0 : ndr->depth--;
688 0 : ndr_print_uint32(ndr, "other_info_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->flags):r->other_info_length);
689 0 : ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
690 0 : ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
691 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
692 0 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
693 0 : ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
694 0 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
695 0 : ndr_print_GUID(ndr, "transport_guid", &r->transport_guid);
696 0 : ndr->depth--;
697 0 : ndr->flags = _flags_save_STRUCT;
698 : }
699 : }
700 :
701 53016 : _PUBLIC_ size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, libndr_flags flags)
702 : {
703 53016 : flags |= LIBNDR_PRINT_ARRAY_HEX;
704 53016 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1);
705 : }
706 :
707 2 : _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo2OtherInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct repsFromTo2OtherInfo *r)
708 : {
709 2 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
710 2 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
711 2 : if (ndr_flags & NDR_SCALARS) {
712 2 : NDR_CHECK(ndr_push_align(ndr, 8));
713 2 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
714 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo2OtherInfo(r, ndr->flags)));
715 : {
716 2 : libndr_flags _flags_save_string = ndr->flags;
717 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
718 2 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dns_name1));
719 2 : ndr->flags = _flags_save_string;
720 : }
721 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
722 : {
723 2 : libndr_flags _flags_save_string = ndr->flags;
724 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
725 2 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dns_name2));
726 2 : ndr->flags = _flags_save_string;
727 : }
728 2 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown2));
729 2 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
730 : }
731 2 : if (ndr_flags & NDR_BUFFERS) {
732 2 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
733 : {
734 2 : libndr_flags _flags_save_string = ndr->flags;
735 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
736 2 : if (r->dns_name1) {
737 2 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->dns_name1));
738 2 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dns_name1));
739 2 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->dns_name1));
740 : }
741 2 : ndr->flags = _flags_save_string;
742 : }
743 : {
744 2 : libndr_flags _flags_save_string = ndr->flags;
745 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
746 2 : if (r->dns_name2) {
747 2 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->dns_name2));
748 2 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dns_name2));
749 2 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->dns_name2));
750 : }
751 2 : ndr->flags = _flags_save_string;
752 : }
753 : }
754 2 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
755 2 : return NDR_ERR_SUCCESS;
756 : }
757 :
758 1 : _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo2OtherInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct repsFromTo2OtherInfo *r)
759 : {
760 1 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
761 1 : uint32_t _ptr_dns_name1;
762 1 : TALLOC_CTX *_mem_save_dns_name1_0 = NULL;
763 1 : uint32_t _ptr_dns_name2;
764 1 : TALLOC_CTX *_mem_save_dns_name2_0 = NULL;
765 1 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
766 1 : if (ndr_flags & NDR_SCALARS) {
767 1 : NDR_CHECK(ndr_pull_align(ndr, 8));
768 1 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
769 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
770 : {
771 1 : libndr_flags _flags_save_string = ndr->flags;
772 1 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
773 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name1));
774 1 : if (_ptr_dns_name1) {
775 1 : NDR_PULL_ALLOC(ndr, r->dns_name1);
776 1 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dns_name1, _ptr_dns_name1));
777 : } else {
778 0 : r->dns_name1 = NULL;
779 : }
780 1 : ndr->flags = _flags_save_string;
781 : }
782 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
783 : {
784 1 : libndr_flags _flags_save_string = ndr->flags;
785 1 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
786 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name2));
787 1 : if (_ptr_dns_name2) {
788 1 : NDR_PULL_ALLOC(ndr, r->dns_name2);
789 1 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dns_name2, _ptr_dns_name2));
790 : } else {
791 0 : r->dns_name2 = NULL;
792 : }
793 1 : ndr->flags = _flags_save_string;
794 : }
795 1 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown2));
796 1 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
797 : }
798 1 : if (ndr_flags & NDR_BUFFERS) {
799 1 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
800 : {
801 1 : libndr_flags _flags_save_string = ndr->flags;
802 1 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
803 1 : if (r->dns_name1) {
804 1 : uint32_t _relative_save_offset;
805 1 : _relative_save_offset = ndr->offset;
806 1 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dns_name1));
807 1 : _mem_save_dns_name1_0 = NDR_PULL_GET_MEM_CTX(ndr);
808 1 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_name1, 0);
809 1 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dns_name1));
810 1 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name1_0, 0);
811 1 : if (ndr->offset > ndr->relative_highest_offset) {
812 1 : ndr->relative_highest_offset = ndr->offset;
813 : }
814 1 : ndr->offset = _relative_save_offset;
815 : }
816 1 : ndr->flags = _flags_save_string;
817 : }
818 : {
819 1 : libndr_flags _flags_save_string = ndr->flags;
820 1 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
821 1 : if (r->dns_name2) {
822 1 : uint32_t _relative_save_offset;
823 1 : _relative_save_offset = ndr->offset;
824 1 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dns_name2));
825 1 : _mem_save_dns_name2_0 = NDR_PULL_GET_MEM_CTX(ndr);
826 1 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_name2, 0);
827 1 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dns_name2));
828 1 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name2_0, 0);
829 1 : if (ndr->offset > ndr->relative_highest_offset) {
830 1 : ndr->relative_highest_offset = ndr->offset;
831 : }
832 1 : ndr->offset = _relative_save_offset;
833 : }
834 1 : ndr->flags = _flags_save_string;
835 : }
836 : }
837 1 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
838 1 : return NDR_ERR_SUCCESS;
839 : }
840 :
841 0 : static void ndr_print_flags_repsFromTo2OtherInfo(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct repsFromTo2OtherInfo *r)
842 : {
843 0 : ndr_print_repsFromTo2OtherInfo(ndr, name, r);
844 0 : }
845 :
846 0 : _PUBLIC_ void ndr_print_repsFromTo2OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo2OtherInfo *r)
847 : {
848 0 : ndr_print_struct(ndr, name, "repsFromTo2OtherInfo");
849 0 : if (r == NULL) { ndr_print_null(ndr); return; }
850 0 : ndr->depth++;
851 0 : ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo2OtherInfo(r, ndr->flags):r->__ndr_size);
852 : {
853 0 : libndr_flags _flags_save_string = ndr->flags;
854 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
855 0 : ndr_print_ptr(ndr, "dns_name1", r->dns_name1);
856 0 : ndr->depth++;
857 0 : if (r->dns_name1) {
858 0 : ndr_print_string(ndr, "dns_name1", r->dns_name1);
859 : }
860 0 : ndr->depth--;
861 0 : ndr->flags = _flags_save_string;
862 : }
863 0 : ndr_print_uint32(ndr, "unknown1", r->unknown1);
864 : {
865 0 : libndr_flags _flags_save_string = ndr->flags;
866 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
867 0 : ndr_print_ptr(ndr, "dns_name2", r->dns_name2);
868 0 : ndr->depth++;
869 0 : if (r->dns_name2) {
870 0 : ndr_print_string(ndr, "dns_name2", r->dns_name2);
871 : }
872 0 : ndr->depth--;
873 0 : ndr->flags = _flags_save_string;
874 : }
875 0 : ndr_print_hyper(ndr, "unknown2", r->unknown2);
876 0 : ndr->depth--;
877 : }
878 :
879 2 : _PUBLIC_ size_t ndr_size_repsFromTo2OtherInfo(const struct repsFromTo2OtherInfo *r, libndr_flags flags)
880 : {
881 2 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo2OtherInfo);
882 : }
883 :
884 0 : _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct repsFromTo2 *r)
885 : {
886 : {
887 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
888 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
889 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
890 0 : if (ndr_flags & NDR_SCALARS) {
891 0 : NDR_CHECK(ndr_push_align(ndr, 8));
892 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo2(r, ndr->flags) + 8));
893 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
894 0 : NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_success));
895 0 : NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_attempt));
896 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
897 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->other_info));
898 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo2OtherInfo(r->other_info, ndr->flags)));
899 0 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
900 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
901 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
902 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
903 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
904 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
905 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid));
906 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown1));
907 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
908 : }
909 0 : if (ndr_flags & NDR_BUFFERS) {
910 0 : if (r->other_info) {
911 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->other_info));
912 0 : NDR_CHECK(ndr_push_repsFromTo2OtherInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->other_info));
913 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->other_info));
914 : }
915 : }
916 0 : ndr->flags = _flags_save_STRUCT;
917 : }
918 0 : return NDR_ERR_SUCCESS;
919 : }
920 :
921 0 : _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct repsFromTo2 *r)
922 : {
923 0 : uint32_t _ptr_other_info;
924 0 : TALLOC_CTX *_mem_save_other_info_0 = NULL;
925 0 : uint32_t size_schedule_0 = 0;
926 : {
927 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
928 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
929 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
930 0 : if (ndr_flags & NDR_SCALARS) {
931 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
932 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blobsize));
933 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
934 0 : NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_success));
935 0 : NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_attempt));
936 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
937 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_info));
938 0 : if (_ptr_other_info) {
939 0 : NDR_PULL_ALLOC(ndr, r->other_info);
940 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->other_info, _ptr_other_info));
941 : } else {
942 0 : r->other_info = NULL;
943 : }
944 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->other_info_length));
945 0 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
946 0 : size_schedule_0 = 84;
947 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
948 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
949 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
950 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
951 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
952 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid));
953 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown1));
954 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
955 : }
956 0 : if (ndr_flags & NDR_BUFFERS) {
957 0 : if (r->other_info) {
958 0 : uint32_t _relative_save_offset;
959 0 : _relative_save_offset = ndr->offset;
960 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->other_info));
961 0 : _mem_save_other_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
962 0 : NDR_PULL_SET_MEM_CTX(ndr, r->other_info, 0);
963 0 : NDR_CHECK(ndr_pull_repsFromTo2OtherInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->other_info));
964 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_info_0, 0);
965 0 : if (ndr->offset > ndr->relative_highest_offset) {
966 0 : ndr->relative_highest_offset = ndr->offset;
967 : }
968 0 : ndr->offset = _relative_save_offset;
969 : }
970 : }
971 0 : ndr->flags = _flags_save_STRUCT;
972 : }
973 0 : return NDR_ERR_SUCCESS;
974 : }
975 :
976 0 : static void ndr_print_flags_repsFromTo2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct repsFromTo2 *r)
977 : {
978 0 : ndr_print_repsFromTo2(ndr, name, r);
979 0 : }
980 :
981 0 : _PUBLIC_ void ndr_print_repsFromTo2(struct ndr_print *ndr, const char *name, const struct repsFromTo2 *r)
982 : {
983 0 : ndr_print_struct(ndr, name, "repsFromTo2");
984 0 : if (r == NULL) { ndr_print_null(ndr); return; }
985 : {
986 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
987 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
988 0 : ndr->depth++;
989 0 : ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo2(r, ndr->flags) + 8:r->blobsize);
990 0 : ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
991 0 : ndr_print_NTTIME_1sec(ndr, "last_success", r->last_success);
992 0 : ndr_print_NTTIME_1sec(ndr, "last_attempt", r->last_attempt);
993 0 : ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
994 0 : ndr_print_ptr(ndr, "other_info", r->other_info);
995 0 : ndr->depth++;
996 0 : if (r->other_info) {
997 0 : ndr_print_repsFromTo2OtherInfo(ndr, "other_info", r->other_info);
998 : }
999 0 : ndr->depth--;
1000 0 : ndr_print_uint32(ndr, "other_info_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo2OtherInfo(r->other_info, ndr->flags):r->other_info_length);
1001 0 : ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
1002 0 : ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
1003 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
1004 0 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
1005 0 : ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
1006 0 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
1007 0 : ndr_print_GUID(ndr, "transport_guid", &r->transport_guid);
1008 0 : ndr_print_hyper(ndr, "unknown1", r->unknown1);
1009 0 : ndr->depth--;
1010 0 : ndr->flags = _flags_save_STRUCT;
1011 : }
1012 : }
1013 :
1014 0 : _PUBLIC_ size_t ndr_size_repsFromTo2(const struct repsFromTo2 *r, libndr_flags flags)
1015 : {
1016 0 : flags |= LIBNDR_PRINT_ARRAY_HEX;
1017 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo2);
1018 : }
1019 :
1020 53016 : static enum ndr_err_code ndr_push_repsFromTo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union repsFromTo *r)
1021 : {
1022 100 : uint32_t level;
1023 53016 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1024 53016 : if (ndr_flags & NDR_SCALARS) {
1025 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1026 26508 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1027 26508 : NDR_CHECK(ndr_push_union_align(ndr, 8));
1028 26508 : switch (level) {
1029 26508 : case 1: {
1030 26508 : NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
1031 26458 : break; }
1032 :
1033 0 : case 2: {
1034 0 : NDR_CHECK(ndr_push_repsFromTo2(ndr, NDR_SCALARS, &r->ctr2));
1035 0 : break; }
1036 :
1037 0 : default:
1038 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
1039 : }
1040 : }
1041 53016 : if (ndr_flags & NDR_BUFFERS) {
1042 26508 : if (!(ndr_flags & NDR_SCALARS)) {
1043 : /* We didn't get it above, and the token is not needed after this. */
1044 26508 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1045 : }
1046 26508 : switch (level) {
1047 26508 : case 1:
1048 26508 : NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
1049 26458 : break;
1050 :
1051 0 : case 2:
1052 0 : NDR_CHECK(ndr_push_repsFromTo2(ndr, NDR_BUFFERS, &r->ctr2));
1053 0 : break;
1054 :
1055 0 : default:
1056 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
1057 : }
1058 : }
1059 52916 : return NDR_ERR_SUCCESS;
1060 : }
1061 :
1062 130816 : static enum ndr_err_code ndr_pull_repsFromTo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union repsFromTo *r)
1063 : {
1064 50 : uint32_t level;
1065 130816 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1066 130816 : if (ndr_flags & NDR_SCALARS) {
1067 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1068 65408 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1069 65408 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
1070 65408 : switch (level) {
1071 65408 : case 1: {
1072 65408 : NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
1073 65383 : break; }
1074 :
1075 0 : case 2: {
1076 0 : NDR_CHECK(ndr_pull_repsFromTo2(ndr, NDR_SCALARS, &r->ctr2));
1077 0 : break; }
1078 :
1079 0 : default:
1080 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
1081 : }
1082 : }
1083 130816 : if (ndr_flags & NDR_BUFFERS) {
1084 65408 : if (!(ndr_flags & NDR_SCALARS)) {
1085 : /* We didn't get it above, and the token is not needed after this. */
1086 65408 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1087 : }
1088 65408 : switch (level) {
1089 65408 : case 1:
1090 65408 : NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
1091 65383 : break;
1092 :
1093 0 : case 2:
1094 0 : NDR_CHECK(ndr_pull_repsFromTo2(ndr, NDR_BUFFERS, &r->ctr2));
1095 0 : break;
1096 :
1097 0 : default:
1098 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
1099 : }
1100 : }
1101 130766 : return NDR_ERR_SUCCESS;
1102 : }
1103 :
1104 0 : _PUBLIC_ void ndr_print_repsFromTo(struct ndr_print *ndr, const char *name, const union repsFromTo *r)
1105 : {
1106 0 : uint32_t level;
1107 0 : level = ndr_print_steal_switch_value(ndr, r);
1108 0 : ndr_print_union(ndr, name, level, "repsFromTo");
1109 0 : switch (level) {
1110 0 : case 1:
1111 0 : ndr_print_repsFromTo1(ndr, "ctr1", &r->ctr1);
1112 0 : break;
1113 :
1114 0 : case 2:
1115 0 : ndr_print_repsFromTo2(ndr, "ctr2", &r->ctr2);
1116 0 : break;
1117 :
1118 0 : default:
1119 0 : ndr_print_bad_level(ndr, name, level);
1120 : }
1121 0 : }
1122 :
1123 26508 : _PUBLIC_ enum ndr_err_code ndr_push_repsFromToBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct repsFromToBlob *r)
1124 : {
1125 26508 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1126 26508 : if (ndr_flags & NDR_SCALARS) {
1127 26508 : NDR_CHECK(ndr_push_align(ndr, 8));
1128 26508 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
1129 26508 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1130 26508 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
1131 26508 : NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
1132 26508 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1133 : }
1134 26508 : if (ndr_flags & NDR_BUFFERS) {
1135 26508 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
1136 26508 : NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
1137 : }
1138 26458 : return NDR_ERR_SUCCESS;
1139 : }
1140 :
1141 65408 : _PUBLIC_ enum ndr_err_code ndr_pull_repsFromToBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct repsFromToBlob *r)
1142 : {
1143 65408 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1144 65408 : if (ndr_flags & NDR_SCALARS) {
1145 65408 : NDR_CHECK(ndr_pull_align(ndr, 8));
1146 65408 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1147 65408 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1148 65408 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1149 65408 : NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
1150 65408 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1151 : }
1152 65408 : if (ndr_flags & NDR_BUFFERS) {
1153 65408 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1154 65408 : NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
1155 : }
1156 65383 : return NDR_ERR_SUCCESS;
1157 : }
1158 :
1159 0 : static void ndr_print_flags_repsFromToBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct repsFromToBlob *r)
1160 : {
1161 0 : ndr_print_repsFromToBlob(ndr, name, r);
1162 0 : }
1163 :
1164 0 : _PUBLIC_ void ndr_print_repsFromToBlob(struct ndr_print *ndr, const char *name, const struct repsFromToBlob *r)
1165 : {
1166 0 : ndr_print_struct(ndr, name, "repsFromToBlob");
1167 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1168 0 : ndr->depth++;
1169 0 : ndr_print_uint32(ndr, "version", r->version);
1170 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
1171 0 : ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1172 0 : ndr_print_repsFromTo(ndr, "ctr", &r->ctr);
1173 0 : ndr->depth--;
1174 : }
1175 :
1176 18 : _PUBLIC_ enum ndr_err_code ndr_push_scheduleHeader(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct scheduleHeader *r)
1177 : {
1178 18 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1179 18 : if (ndr_flags & NDR_SCALARS) {
1180 18 : NDR_CHECK(ndr_push_align(ndr, 4));
1181 18 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1182 18 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->offset));
1183 18 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1184 : }
1185 18 : if (ndr_flags & NDR_BUFFERS) {
1186 7 : }
1187 18 : return NDR_ERR_SUCCESS;
1188 : }
1189 :
1190 1776 : _PUBLIC_ enum ndr_err_code ndr_pull_scheduleHeader(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct scheduleHeader *r)
1191 : {
1192 1776 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1193 1776 : if (ndr_flags & NDR_SCALARS) {
1194 1776 : NDR_CHECK(ndr_pull_align(ndr, 4));
1195 1776 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
1196 1776 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->offset));
1197 1776 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1198 : }
1199 1776 : if (ndr_flags & NDR_BUFFERS) {
1200 72 : }
1201 1776 : return NDR_ERR_SUCCESS;
1202 : }
1203 :
1204 0 : static void ndr_print_flags_scheduleHeader(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct scheduleHeader *r)
1205 : {
1206 0 : ndr_print_scheduleHeader(ndr, name, r);
1207 0 : }
1208 :
1209 0 : _PUBLIC_ void ndr_print_scheduleHeader(struct ndr_print *ndr, const char *name, const struct scheduleHeader *r)
1210 : {
1211 0 : ndr_print_struct(ndr, name, "scheduleHeader");
1212 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1213 0 : ndr->depth++;
1214 0 : ndr_print_uint32(ndr, "type", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->type);
1215 0 : ndr_print_uint32(ndr, "offset", r->offset);
1216 0 : ndr->depth--;
1217 : }
1218 :
1219 18 : _PUBLIC_ enum ndr_err_code ndr_push_scheduleSlots(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct scheduleSlots *r)
1220 : {
1221 18 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1222 18 : if (ndr_flags & NDR_SCALARS) {
1223 18 : NDR_CHECK(ndr_push_align(ndr, 1));
1224 18 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->slots, 168));
1225 18 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1226 : }
1227 18 : if (ndr_flags & NDR_BUFFERS) {
1228 7 : }
1229 18 : return NDR_ERR_SUCCESS;
1230 : }
1231 :
1232 1776 : _PUBLIC_ enum ndr_err_code ndr_pull_scheduleSlots(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct scheduleSlots *r)
1233 : {
1234 1776 : uint32_t size_slots_0 = 0;
1235 1776 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1236 1776 : if (ndr_flags & NDR_SCALARS) {
1237 1776 : NDR_CHECK(ndr_pull_align(ndr, 1));
1238 1776 : size_slots_0 = 168;
1239 1776 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->slots, size_slots_0));
1240 1776 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1241 : }
1242 1776 : if (ndr_flags & NDR_BUFFERS) {
1243 72 : }
1244 1776 : return NDR_ERR_SUCCESS;
1245 : }
1246 :
1247 0 : static void ndr_print_flags_scheduleSlots(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct scheduleSlots *r)
1248 : {
1249 0 : ndr_print_scheduleSlots(ndr, name, r);
1250 0 : }
1251 :
1252 0 : _PUBLIC_ void ndr_print_scheduleSlots(struct ndr_print *ndr, const char *name, const struct scheduleSlots *r)
1253 : {
1254 0 : ndr_print_struct(ndr, name, "scheduleSlots");
1255 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1256 0 : ndr->depth++;
1257 0 : ndr_print_array_uint8(ndr, "slots", r->slots, 168);
1258 0 : ndr->depth--;
1259 : }
1260 :
1261 18 : _PUBLIC_ enum ndr_err_code ndr_push_schedule(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct schedule *r)
1262 : {
1263 7 : uint32_t cntr_headerArray_0;
1264 7 : uint32_t cntr_dataArray_0;
1265 18 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1266 18 : if (ndr_flags & NDR_SCALARS) {
1267 18 : NDR_CHECK(ndr_push_align(ndr, 4));
1268 18 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
1269 18 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1270 18 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numberOfSchedules));
1271 36 : for (cntr_headerArray_0 = 0; cntr_headerArray_0 < (r->numberOfSchedules); cntr_headerArray_0++) {
1272 18 : NDR_CHECK(ndr_push_scheduleHeader(ndr, NDR_SCALARS, &r->headerArray[cntr_headerArray_0]));
1273 : }
1274 36 : for (cntr_dataArray_0 = 0; cntr_dataArray_0 < (r->numberOfSchedules); cntr_dataArray_0++) {
1275 18 : NDR_CHECK(ndr_push_scheduleSlots(ndr, NDR_SCALARS, &r->dataArray[cntr_dataArray_0]));
1276 : }
1277 18 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1278 : }
1279 18 : if (ndr_flags & NDR_BUFFERS) {
1280 7 : }
1281 18 : return NDR_ERR_SUCCESS;
1282 : }
1283 :
1284 1776 : _PUBLIC_ enum ndr_err_code ndr_pull_schedule(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct schedule *r)
1285 : {
1286 1776 : uint32_t size_headerArray_0 = 0;
1287 72 : uint32_t cntr_headerArray_0;
1288 1776 : TALLOC_CTX *_mem_save_headerArray_0 = NULL;
1289 1776 : uint32_t size_dataArray_0 = 0;
1290 72 : uint32_t cntr_dataArray_0;
1291 1776 : TALLOC_CTX *_mem_save_dataArray_0 = NULL;
1292 1776 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1293 1776 : if (ndr_flags & NDR_SCALARS) {
1294 1776 : NDR_CHECK(ndr_pull_align(ndr, 4));
1295 1776 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
1296 1776 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bandwidth));
1297 1776 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numberOfSchedules));
1298 1776 : size_headerArray_0 = r->numberOfSchedules;
1299 1776 : NDR_PULL_ALLOC_N(ndr, r->headerArray, size_headerArray_0);
1300 1776 : _mem_save_headerArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
1301 1776 : NDR_PULL_SET_MEM_CTX(ndr, r->headerArray, 0);
1302 3552 : for (cntr_headerArray_0 = 0; cntr_headerArray_0 < (size_headerArray_0); cntr_headerArray_0++) {
1303 1776 : NDR_CHECK(ndr_pull_scheduleHeader(ndr, NDR_SCALARS, &r->headerArray[cntr_headerArray_0]));
1304 : }
1305 1776 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_headerArray_0, 0);
1306 1776 : size_dataArray_0 = r->numberOfSchedules;
1307 1776 : NDR_PULL_ALLOC_N(ndr, r->dataArray, size_dataArray_0);
1308 1776 : _mem_save_dataArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
1309 1776 : NDR_PULL_SET_MEM_CTX(ndr, r->dataArray, 0);
1310 3552 : for (cntr_dataArray_0 = 0; cntr_dataArray_0 < (size_dataArray_0); cntr_dataArray_0++) {
1311 1776 : NDR_CHECK(ndr_pull_scheduleSlots(ndr, NDR_SCALARS, &r->dataArray[cntr_dataArray_0]));
1312 : }
1313 1776 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dataArray_0, 0);
1314 1776 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1315 : }
1316 1776 : if (ndr_flags & NDR_BUFFERS) {
1317 72 : }
1318 1776 : return NDR_ERR_SUCCESS;
1319 : }
1320 :
1321 0 : static void ndr_print_flags_schedule(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct schedule *r)
1322 : {
1323 0 : ndr_print_schedule(ndr, name, r);
1324 0 : }
1325 :
1326 0 : _PUBLIC_ void ndr_print_schedule(struct ndr_print *ndr, const char *name, const struct schedule *r)
1327 : {
1328 0 : uint32_t cntr_headerArray_0;
1329 0 : uint32_t cntr_dataArray_0;
1330 0 : ndr_print_struct(ndr, name, "schedule");
1331 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1332 0 : ndr->depth++;
1333 0 : ndr_print_uint32(ndr, "size", r->size);
1334 0 : ndr_print_uint32(ndr, "bandwidth", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->bandwidth);
1335 0 : ndr_print_uint32(ndr, "numberOfSchedules", r->numberOfSchedules);
1336 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "headerArray", (uint32_t)(r->numberOfSchedules));
1337 0 : ndr->depth++;
1338 0 : for (cntr_headerArray_0 = 0; cntr_headerArray_0 < (r->numberOfSchedules); cntr_headerArray_0++) {
1339 0 : ndr_print_scheduleHeader(ndr, "headerArray", &r->headerArray[cntr_headerArray_0]);
1340 : }
1341 0 : ndr->depth--;
1342 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "dataArray", (uint32_t)(r->numberOfSchedules));
1343 0 : ndr->depth++;
1344 0 : for (cntr_dataArray_0 = 0; cntr_dataArray_0 < (r->numberOfSchedules); cntr_dataArray_0++) {
1345 0 : ndr_print_scheduleSlots(ndr, "dataArray", &r->dataArray[cntr_dataArray_0]);
1346 : }
1347 0 : ndr->depth--;
1348 0 : ndr->depth--;
1349 : }
1350 :
1351 0 : static enum ndr_err_code ndr_push_partialAttributeSetCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct partialAttributeSetCtr1 *r)
1352 : {
1353 0 : uint32_t cntr_array_0;
1354 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1355 0 : if (ndr_flags & NDR_SCALARS) {
1356 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1357 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1358 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
1359 0 : NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->array[cntr_array_0]));
1360 : }
1361 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1362 : }
1363 0 : if (ndr_flags & NDR_BUFFERS) {
1364 0 : }
1365 0 : return NDR_ERR_SUCCESS;
1366 : }
1367 :
1368 0 : static enum ndr_err_code ndr_pull_partialAttributeSetCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct partialAttributeSetCtr1 *r)
1369 : {
1370 0 : uint32_t size_array_0 = 0;
1371 0 : uint32_t cntr_array_0;
1372 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
1373 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1374 0 : if (ndr_flags & NDR_SCALARS) {
1375 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1376 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1377 0 : size_array_0 = r->count;
1378 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
1379 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1380 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1381 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
1382 0 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
1383 : }
1384 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1385 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1386 : }
1387 0 : if (ndr_flags & NDR_BUFFERS) {
1388 0 : }
1389 0 : return NDR_ERR_SUCCESS;
1390 : }
1391 :
1392 0 : _PUBLIC_ void ndr_print_partialAttributeSetCtr1(struct ndr_print *ndr, const char *name, const struct partialAttributeSetCtr1 *r)
1393 : {
1394 0 : uint32_t cntr_array_0;
1395 0 : ndr_print_struct(ndr, name, "partialAttributeSetCtr1");
1396 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1397 0 : ndr->depth++;
1398 0 : ndr_print_uint32(ndr, "count", r->count);
1399 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
1400 0 : ndr->depth++;
1401 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
1402 0 : ndr_print_drsuapi_DsAttributeId(ndr, "array", r->array[cntr_array_0]);
1403 : }
1404 0 : ndr->depth--;
1405 0 : ndr->depth--;
1406 : }
1407 :
1408 0 : static enum ndr_err_code ndr_push_partialAttributeSetCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union partialAttributeSetCtr *r)
1409 : {
1410 0 : uint32_t level;
1411 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1412 0 : if (ndr_flags & NDR_SCALARS) {
1413 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1414 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1415 0 : NDR_CHECK(ndr_push_union_align(ndr, 4));
1416 0 : switch (level) {
1417 0 : case 1: {
1418 0 : NDR_CHECK(ndr_push_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
1419 0 : break; }
1420 :
1421 0 : default:
1422 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
1423 : }
1424 : }
1425 0 : if (ndr_flags & NDR_BUFFERS) {
1426 0 : if (!(ndr_flags & NDR_SCALARS)) {
1427 : /* We didn't get it above, and the token is not needed after this. */
1428 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1429 : }
1430 0 : switch (level) {
1431 0 : case 1:
1432 0 : break;
1433 :
1434 0 : default:
1435 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
1436 : }
1437 : }
1438 0 : return NDR_ERR_SUCCESS;
1439 : }
1440 :
1441 0 : static enum ndr_err_code ndr_pull_partialAttributeSetCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union partialAttributeSetCtr *r)
1442 : {
1443 0 : uint32_t level;
1444 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1445 0 : if (ndr_flags & NDR_SCALARS) {
1446 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1447 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1448 0 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
1449 0 : switch (level) {
1450 0 : case 1: {
1451 0 : NDR_CHECK(ndr_pull_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
1452 0 : break; }
1453 :
1454 0 : default:
1455 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
1456 : }
1457 : }
1458 0 : if (ndr_flags & NDR_BUFFERS) {
1459 0 : if (!(ndr_flags & NDR_SCALARS)) {
1460 : /* We didn't get it above, and the token is not needed after this. */
1461 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1462 : }
1463 0 : switch (level) {
1464 0 : case 1:
1465 0 : break;
1466 :
1467 0 : default:
1468 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
1469 : }
1470 : }
1471 0 : return NDR_ERR_SUCCESS;
1472 : }
1473 :
1474 0 : _PUBLIC_ void ndr_print_partialAttributeSetCtr(struct ndr_print *ndr, const char *name, const union partialAttributeSetCtr *r)
1475 : {
1476 0 : uint32_t level;
1477 0 : level = ndr_print_steal_switch_value(ndr, r);
1478 0 : ndr_print_union(ndr, name, level, "partialAttributeSetCtr");
1479 0 : switch (level) {
1480 0 : case 1:
1481 0 : ndr_print_partialAttributeSetCtr1(ndr, "ctr1", &r->ctr1);
1482 0 : break;
1483 :
1484 0 : default:
1485 0 : ndr_print_bad_level(ndr, name, level);
1486 : }
1487 0 : }
1488 :
1489 0 : _PUBLIC_ enum ndr_err_code ndr_push_partialAttributeSetBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct partialAttributeSetBlob *r)
1490 : {
1491 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1492 0 : if (ndr_flags & NDR_SCALARS) {
1493 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1494 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
1495 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1496 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
1497 0 : NDR_CHECK(ndr_push_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
1498 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1499 : }
1500 0 : if (ndr_flags & NDR_BUFFERS) {
1501 0 : }
1502 0 : return NDR_ERR_SUCCESS;
1503 : }
1504 :
1505 0 : _PUBLIC_ enum ndr_err_code ndr_pull_partialAttributeSetBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct partialAttributeSetBlob *r)
1506 : {
1507 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1508 0 : if (ndr_flags & NDR_SCALARS) {
1509 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1510 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1511 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1512 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1513 0 : NDR_CHECK(ndr_pull_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
1514 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1515 : }
1516 0 : if (ndr_flags & NDR_BUFFERS) {
1517 0 : }
1518 0 : return NDR_ERR_SUCCESS;
1519 : }
1520 :
1521 0 : static void ndr_print_flags_partialAttributeSetBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct partialAttributeSetBlob *r)
1522 : {
1523 0 : ndr_print_partialAttributeSetBlob(ndr, name, r);
1524 0 : }
1525 :
1526 0 : _PUBLIC_ void ndr_print_partialAttributeSetBlob(struct ndr_print *ndr, const char *name, const struct partialAttributeSetBlob *r)
1527 : {
1528 0 : ndr_print_struct(ndr, name, "partialAttributeSetBlob");
1529 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1530 0 : ndr->depth++;
1531 0 : ndr_print_uint32(ndr, "version", r->version);
1532 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
1533 0 : ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1534 0 : ndr_print_partialAttributeSetCtr(ndr, "ctr", &r->ctr);
1535 0 : ndr->depth--;
1536 : }
1537 :
1538 12149 : _PUBLIC_ enum ndr_err_code ndr_push_schemaInfoBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct schemaInfoBlob *r)
1539 : {
1540 : {
1541 12149 : libndr_flags _flags_save_STRUCT = ndr->flags;
1542 12149 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
1543 12149 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1544 12149 : if (ndr_flags & NDR_SCALARS) {
1545 12149 : NDR_CHECK(ndr_push_align(ndr, 4));
1546 12149 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0xFF));
1547 : {
1548 12149 : libndr_flags _flags_save_uint32 = ndr->flags;
1549 12149 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
1550 12149 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->revision));
1551 12149 : ndr->flags = _flags_save_uint32;
1552 : }
1553 12149 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->invocation_id));
1554 12149 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1555 : }
1556 12149 : if (ndr_flags & NDR_BUFFERS) {
1557 13 : }
1558 12149 : ndr->flags = _flags_save_STRUCT;
1559 : }
1560 12149 : return NDR_ERR_SUCCESS;
1561 : }
1562 :
1563 33582 : _PUBLIC_ enum ndr_err_code ndr_pull_schemaInfoBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct schemaInfoBlob *r)
1564 : {
1565 : {
1566 33582 : libndr_flags _flags_save_STRUCT = ndr->flags;
1567 33582 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
1568 33582 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1569 33582 : if (ndr_flags & NDR_SCALARS) {
1570 33582 : NDR_CHECK(ndr_pull_align(ndr, 4));
1571 33582 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->marker));
1572 : {
1573 33582 : libndr_flags _flags_save_uint32 = ndr->flags;
1574 33582 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
1575 33582 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->revision));
1576 33582 : ndr->flags = _flags_save_uint32;
1577 : }
1578 33582 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->invocation_id));
1579 33582 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1580 : }
1581 33582 : if (ndr_flags & NDR_BUFFERS) {
1582 358 : }
1583 33582 : ndr->flags = _flags_save_STRUCT;
1584 : }
1585 33582 : return NDR_ERR_SUCCESS;
1586 : }
1587 :
1588 0 : static void ndr_print_flags_schemaInfoBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct schemaInfoBlob *r)
1589 : {
1590 0 : ndr_print_schemaInfoBlob(ndr, name, r);
1591 0 : }
1592 :
1593 0 : _PUBLIC_ void ndr_print_schemaInfoBlob(struct ndr_print *ndr, const char *name, const struct schemaInfoBlob *r)
1594 : {
1595 0 : ndr_print_struct(ndr, name, "schemaInfoBlob");
1596 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1597 : {
1598 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
1599 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
1600 0 : ndr->depth++;
1601 0 : ndr_print_uint8(ndr, "marker", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0xFF:r->marker);
1602 : {
1603 0 : libndr_flags _flags_save_uint32 = ndr->flags;
1604 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
1605 0 : ndr_print_uint32(ndr, "revision", r->revision);
1606 0 : ndr->flags = _flags_save_uint32;
1607 : }
1608 0 : ndr_print_GUID(ndr, "invocation_id", &r->invocation_id);
1609 0 : ndr->depth--;
1610 0 : ndr->flags = _flags_save_STRUCT;
1611 : }
1612 : }
1613 :
1614 0 : static enum ndr_err_code ndr_push_drsuapi_MSPrefixMap_Entry(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_MSPrefixMap_Entry *r)
1615 : {
1616 : {
1617 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
1618 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
1619 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1620 0 : if (ndr_flags & NDR_SCALARS) {
1621 0 : NDR_CHECK(ndr_push_align(ndr, 2));
1622 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->entryID));
1623 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
1624 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->binary_oid, r->length));
1625 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
1626 : }
1627 0 : if (ndr_flags & NDR_BUFFERS) {
1628 0 : }
1629 0 : ndr->flags = _flags_save_STRUCT;
1630 : }
1631 0 : return NDR_ERR_SUCCESS;
1632 : }
1633 :
1634 0 : static enum ndr_err_code ndr_pull_drsuapi_MSPrefixMap_Entry(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_MSPrefixMap_Entry *r)
1635 : {
1636 0 : uint32_t size_binary_oid_0 = 0;
1637 : {
1638 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
1639 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
1640 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1641 0 : if (ndr_flags & NDR_SCALARS) {
1642 0 : NDR_CHECK(ndr_pull_align(ndr, 2));
1643 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->entryID));
1644 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
1645 0 : size_binary_oid_0 = r->length;
1646 0 : NDR_PULL_ALLOC_N(ndr, r->binary_oid, size_binary_oid_0);
1647 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->binary_oid, size_binary_oid_0));
1648 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
1649 : }
1650 0 : if (ndr_flags & NDR_BUFFERS) {
1651 0 : }
1652 0 : ndr->flags = _flags_save_STRUCT;
1653 : }
1654 0 : return NDR_ERR_SUCCESS;
1655 : }
1656 :
1657 0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_MSPrefixMap_Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_MSPrefixMap_Ctr *r)
1658 : {
1659 0 : uint32_t cntr_entries_0;
1660 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1661 0 : if (ndr_flags & NDR_SCALARS) {
1662 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1663 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_entries));
1664 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_MSPrefixMap_Ctr(r, ndr->flags)));
1665 0 : for (cntr_entries_0 = 0; cntr_entries_0 < (r->num_entries); cntr_entries_0++) {
1666 0 : NDR_CHECK(ndr_push_drsuapi_MSPrefixMap_Entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
1667 : }
1668 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1669 : }
1670 0 : if (ndr_flags & NDR_BUFFERS) {
1671 0 : }
1672 0 : return NDR_ERR_SUCCESS;
1673 : }
1674 :
1675 0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_MSPrefixMap_Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_MSPrefixMap_Ctr *r)
1676 : {
1677 0 : uint32_t size_entries_0 = 0;
1678 0 : uint32_t cntr_entries_0;
1679 0 : TALLOC_CTX *_mem_save_entries_0 = NULL;
1680 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1681 0 : if (ndr_flags & NDR_SCALARS) {
1682 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1683 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_entries));
1684 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
1685 0 : size_entries_0 = r->num_entries;
1686 0 : NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_0);
1687 0 : _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
1688 0 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
1689 0 : for (cntr_entries_0 = 0; cntr_entries_0 < (size_entries_0); cntr_entries_0++) {
1690 0 : NDR_CHECK(ndr_pull_drsuapi_MSPrefixMap_Entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
1691 : }
1692 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
1693 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1694 : }
1695 0 : if (ndr_flags & NDR_BUFFERS) {
1696 0 : }
1697 0 : return NDR_ERR_SUCCESS;
1698 : }
1699 :
1700 0 : static void ndr_print_flags_drsuapi_MSPrefixMap_Ctr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_MSPrefixMap_Ctr *r)
1701 : {
1702 0 : ndr_print_drsuapi_MSPrefixMap_Ctr(ndr, name, r);
1703 0 : }
1704 :
1705 0 : _PUBLIC_ void ndr_print_drsuapi_MSPrefixMap_Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_MSPrefixMap_Ctr *r)
1706 : {
1707 0 : uint32_t cntr_entries_0;
1708 0 : ndr_print_struct(ndr, name, "drsuapi_MSPrefixMap_Ctr");
1709 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1710 0 : ndr->depth++;
1711 0 : ndr_print_uint32(ndr, "num_entries", r->num_entries);
1712 0 : ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_MSPrefixMap_Ctr(r, ndr->flags):r->__ndr_size);
1713 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "entries", (uint32_t)(r->num_entries));
1714 0 : ndr->depth++;
1715 0 : for (cntr_entries_0 = 0; cntr_entries_0 < (r->num_entries); cntr_entries_0++) {
1716 0 : ndr_print_drsuapi_MSPrefixMap_Entry(ndr, "entries", &r->entries[cntr_entries_0]);
1717 : }
1718 0 : ndr->depth--;
1719 0 : ndr->depth--;
1720 : }
1721 :
1722 0 : _PUBLIC_ size_t ndr_size_drsuapi_MSPrefixMap_Ctr(const struct drsuapi_MSPrefixMap_Ctr *r, libndr_flags flags)
1723 : {
1724 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_MSPrefixMap_Ctr);
1725 : }
1726 :
1727 1351 : static enum ndr_err_code ndr_push_prefixMapVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum prefixMapVersion r)
1728 : {
1729 1351 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1730 1294 : return NDR_ERR_SUCCESS;
1731 : }
1732 :
1733 28911 : static enum ndr_err_code ndr_pull_prefixMapVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum prefixMapVersion *r)
1734 : {
1735 368 : uint32_t v;
1736 28911 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1737 28911 : *r = v;
1738 28911 : return NDR_ERR_SUCCESS;
1739 : }
1740 :
1741 0 : _PUBLIC_ void ndr_print_prefixMapVersion(struct ndr_print *ndr, const char *name, enum prefixMapVersion r)
1742 : {
1743 0 : const char *val = NULL;
1744 :
1745 0 : switch (r) {
1746 0 : case PREFIX_MAP_VERSION_DSDB: val = "PREFIX_MAP_VERSION_DSDB"; break;
1747 : }
1748 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1749 0 : }
1750 :
1751 2702 : static enum ndr_err_code ndr_push_prefixMapCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union prefixMapCtr *r)
1752 : {
1753 114 : uint32_t level;
1754 2702 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1755 2702 : if (ndr_flags & NDR_SCALARS) {
1756 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1757 1351 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1758 1351 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1759 1351 : switch (level) {
1760 1351 : case PREFIX_MAP_VERSION_DSDB: {
1761 1351 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
1762 1294 : break; }
1763 :
1764 0 : default:
1765 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
1766 : }
1767 : }
1768 2702 : if (ndr_flags & NDR_BUFFERS) {
1769 1351 : if (!(ndr_flags & NDR_SCALARS)) {
1770 : /* We didn't get it above, and the token is not needed after this. */
1771 1351 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1772 : }
1773 1351 : switch (level) {
1774 1351 : case PREFIX_MAP_VERSION_DSDB:
1775 1351 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
1776 1294 : break;
1777 :
1778 0 : default:
1779 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
1780 : }
1781 : }
1782 2588 : return NDR_ERR_SUCCESS;
1783 : }
1784 :
1785 57822 : static enum ndr_err_code ndr_pull_prefixMapCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union prefixMapCtr *r)
1786 : {
1787 736 : uint32_t level;
1788 57822 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1789 57822 : if (ndr_flags & NDR_SCALARS) {
1790 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1791 28911 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1792 28911 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1793 28911 : switch (level) {
1794 28911 : case PREFIX_MAP_VERSION_DSDB: {
1795 28911 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
1796 28543 : break; }
1797 :
1798 0 : default:
1799 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
1800 : }
1801 : }
1802 57822 : if (ndr_flags & NDR_BUFFERS) {
1803 28911 : if (!(ndr_flags & NDR_SCALARS)) {
1804 : /* We didn't get it above, and the token is not needed after this. */
1805 28911 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1806 : }
1807 28911 : switch (level) {
1808 28911 : case PREFIX_MAP_VERSION_DSDB:
1809 28911 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
1810 28543 : break;
1811 :
1812 0 : default:
1813 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
1814 : }
1815 : }
1816 57086 : return NDR_ERR_SUCCESS;
1817 : }
1818 :
1819 0 : _PUBLIC_ void ndr_print_prefixMapCtr(struct ndr_print *ndr, const char *name, const union prefixMapCtr *r)
1820 : {
1821 0 : uint32_t level;
1822 0 : level = ndr_print_steal_switch_value(ndr, r);
1823 0 : ndr_print_union(ndr, name, level, "prefixMapCtr");
1824 0 : switch (level) {
1825 0 : case PREFIX_MAP_VERSION_DSDB:
1826 0 : ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "dsdb", &r->dsdb);
1827 0 : break;
1828 :
1829 0 : default:
1830 0 : ndr_print_bad_level(ndr, name, level);
1831 : }
1832 0 : }
1833 :
1834 1351 : _PUBLIC_ enum ndr_err_code ndr_push_prefixMapBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct prefixMapBlob *r)
1835 : {
1836 1351 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1837 1351 : if (ndr_flags & NDR_SCALARS) {
1838 1351 : NDR_CHECK(ndr_push_align(ndr, 5));
1839 1408 : NDR_CHECK(ndr_push_prefixMapVersion(ndr, NDR_SCALARS, r->version));
1840 1351 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1841 1351 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
1842 1351 : NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
1843 1351 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1844 : }
1845 1351 : if (ndr_flags & NDR_BUFFERS) {
1846 1351 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
1847 1351 : NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
1848 : }
1849 1294 : return NDR_ERR_SUCCESS;
1850 : }
1851 :
1852 28911 : _PUBLIC_ enum ndr_err_code ndr_pull_prefixMapBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct prefixMapBlob *r)
1853 : {
1854 28911 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1855 28911 : if (ndr_flags & NDR_SCALARS) {
1856 28911 : NDR_CHECK(ndr_pull_align(ndr, 5));
1857 29279 : NDR_CHECK(ndr_pull_prefixMapVersion(ndr, NDR_SCALARS, &r->version));
1858 28911 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1859 28911 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1860 28911 : NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
1861 28911 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1862 : }
1863 28911 : if (ndr_flags & NDR_BUFFERS) {
1864 28911 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
1865 28911 : NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
1866 : }
1867 28543 : return NDR_ERR_SUCCESS;
1868 : }
1869 :
1870 0 : static void ndr_print_flags_prefixMapBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct prefixMapBlob *r)
1871 : {
1872 0 : ndr_print_prefixMapBlob(ndr, name, r);
1873 0 : }
1874 :
1875 0 : _PUBLIC_ void ndr_print_prefixMapBlob(struct ndr_print *ndr, const char *name, const struct prefixMapBlob *r)
1876 : {
1877 0 : ndr_print_struct(ndr, name, "prefixMapBlob");
1878 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1879 0 : ndr->depth++;
1880 0 : ndr_print_prefixMapVersion(ndr, "version", r->version);
1881 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
1882 0 : ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1883 0 : ndr_print_prefixMapCtr(ndr, "ctr", &r->ctr);
1884 0 : ndr->depth--;
1885 : }
1886 :
1887 2595 : static enum ndr_err_code ndr_push_ldapControlDirSyncExtra(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union ldapControlDirSyncExtra *r)
1888 : {
1889 0 : uint32_t level;
1890 2595 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1891 2595 : if (ndr_flags & NDR_SCALARS) {
1892 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1893 2076 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1894 2076 : NDR_CHECK(ndr_push_union_align(ndr, 8));
1895 2076 : switch (level) {
1896 0 : case 0: {
1897 0 : break; }
1898 :
1899 2076 : default: {
1900 2076 : NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1901 2076 : break; }
1902 :
1903 : }
1904 : }
1905 2595 : return NDR_ERR_SUCCESS;
1906 : }
1907 :
1908 284 : static enum ndr_err_code ndr_pull_ldapControlDirSyncExtra(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union ldapControlDirSyncExtra *r)
1909 : {
1910 0 : uint32_t level;
1911 284 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1912 284 : if (ndr_flags & NDR_SCALARS) {
1913 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1914 142 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1915 142 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
1916 142 : switch (level) {
1917 0 : case 0: {
1918 0 : break; }
1919 :
1920 142 : default: {
1921 142 : NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1922 142 : break; }
1923 :
1924 : }
1925 : }
1926 284 : return NDR_ERR_SUCCESS;
1927 : }
1928 :
1929 0 : _PUBLIC_ void ndr_print_ldapControlDirSyncExtra(struct ndr_print *ndr, const char *name, const union ldapControlDirSyncExtra *r)
1930 : {
1931 0 : uint32_t level;
1932 0 : level = ndr_print_steal_switch_value(ndr, r);
1933 0 : ndr_print_union(ndr, name, level, "ldapControlDirSyncExtra");
1934 0 : switch (level) {
1935 0 : case 0:
1936 0 : break;
1937 :
1938 0 : default:
1939 0 : ndr_print_replUpToDateVectorBlob(ndr, "uptodateness_vector", &r->uptodateness_vector);
1940 0 : break;
1941 :
1942 : }
1943 0 : }
1944 :
1945 1557 : static size_t ndr_size_ldapControlDirSyncExtra(const union ldapControlDirSyncExtra *r, uint32_t level, libndr_flags flags)
1946 : {
1947 1557 : return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_ldapControlDirSyncExtra);
1948 : }
1949 :
1950 519 : static enum ndr_err_code ndr_push_ldapControlDirSyncBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ldapControlDirSyncBlob *r)
1951 : {
1952 519 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1953 519 : if (ndr_flags & NDR_SCALARS) {
1954 519 : NDR_CHECK(ndr_push_align(ndr, 8));
1955 519 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 3));
1956 519 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
1957 519 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
1958 519 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
1959 519 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, 0)));
1960 519 : NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1961 519 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid1));
1962 519 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->extra, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, 0)));
1963 519 : NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1964 519 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1965 : }
1966 519 : if (ndr_flags & NDR_BUFFERS) {
1967 519 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->extra, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, 0)));
1968 519 : NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1969 : }
1970 519 : return NDR_ERR_SUCCESS;
1971 : }
1972 :
1973 142 : static enum ndr_err_code ndr_pull_ldapControlDirSyncBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ldapControlDirSyncBlob *r)
1974 : {
1975 142 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1976 142 : if (ndr_flags & NDR_SCALARS) {
1977 142 : NDR_CHECK(ndr_pull_align(ndr, 8));
1978 142 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u1));
1979 142 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
1980 142 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
1981 142 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
1982 142 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extra_length));
1983 142 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1984 142 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid1));
1985 142 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->extra, r->extra_length));
1986 142 : NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1987 142 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1988 : }
1989 142 : if (ndr_flags & NDR_BUFFERS) {
1990 142 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->extra, r->extra_length));
1991 142 : NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1992 : }
1993 142 : return NDR_ERR_SUCCESS;
1994 : }
1995 :
1996 0 : _PUBLIC_ void ndr_print_ldapControlDirSyncBlob(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncBlob *r)
1997 : {
1998 0 : ndr_print_struct(ndr, name, "ldapControlDirSyncBlob");
1999 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2000 0 : ndr->depth++;
2001 0 : ndr_print_uint32(ndr, "u1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->u1);
2002 0 : ndr_print_NTTIME(ndr, "time", r->time);
2003 0 : ndr_print_uint32(ndr, "u2", r->u2);
2004 0 : ndr_print_uint32(ndr, "u3", r->u3);
2005 0 : ndr_print_uint32(ndr, "extra_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, 0):r->extra_length);
2006 0 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
2007 0 : ndr_print_GUID(ndr, "guid1", &r->guid1);
2008 0 : ndr_print_set_switch_value(ndr, &r->extra, r->extra_length);
2009 0 : ndr_print_ldapControlDirSyncExtra(ndr, "extra", &r->extra);
2010 0 : ndr->depth--;
2011 : }
2012 :
2013 519 : _PUBLIC_ enum ndr_err_code ndr_push_ldapControlDirSyncCookie(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ldapControlDirSyncCookie *r)
2014 : {
2015 519 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
2016 519 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2017 519 : if (ndr_flags & NDR_SCALARS) {
2018 519 : NDR_CHECK(ndr_push_align(ndr, 8));
2019 519 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2020 519 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "MSDS", 4, sizeof(uint8_t), CH_DOS));
2021 : {
2022 0 : struct ndr_push *_ndr_blob;
2023 519 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_blob, 0, -1));
2024 519 : NDR_CHECK(ndr_push_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
2025 519 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_blob, 0, -1));
2026 : }
2027 519 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2028 : }
2029 519 : if (ndr_flags & NDR_BUFFERS) {
2030 519 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
2031 : }
2032 519 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
2033 519 : return NDR_ERR_SUCCESS;
2034 : }
2035 :
2036 142 : _PUBLIC_ enum ndr_err_code ndr_pull_ldapControlDirSyncCookie(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ldapControlDirSyncCookie *r)
2037 : {
2038 142 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
2039 142 : uint32_t size_msds_0 = 0;
2040 142 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2041 142 : if (ndr_flags & NDR_SCALARS) {
2042 142 : NDR_CHECK(ndr_pull_align(ndr, 8));
2043 142 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2044 142 : size_msds_0 = 4;
2045 142 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->msds, size_msds_0, sizeof(uint8_t), CH_DOS));
2046 : {
2047 0 : struct ndr_pull *_ndr_blob;
2048 142 : ssize_t sub_size = -1;
2049 142 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_blob, 0, sub_size));
2050 142 : NDR_CHECK(ndr_pull_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
2051 142 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_blob, 0, sub_size));
2052 : }
2053 142 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2054 : }
2055 142 : if (ndr_flags & NDR_BUFFERS) {
2056 142 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
2057 : }
2058 142 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
2059 142 : return NDR_ERR_SUCCESS;
2060 : }
2061 :
2062 0 : static void ndr_print_flags_ldapControlDirSyncCookie(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ldapControlDirSyncCookie *r)
2063 : {
2064 0 : ndr_print_ldapControlDirSyncCookie(ndr, name, r);
2065 0 : }
2066 :
2067 0 : _PUBLIC_ void ndr_print_ldapControlDirSyncCookie(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncCookie *r)
2068 : {
2069 0 : ndr_print_struct(ndr, name, "ldapControlDirSyncCookie");
2070 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2071 0 : ndr->depth++;
2072 0 : ndr_print_string(ndr, "msds", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"MSDS":r->msds);
2073 0 : ndr_print_ldapControlDirSyncBlob(ndr, "blob", &r->blob);
2074 0 : ndr->depth--;
2075 : }
2076 :
2077 359656 : _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsPackage(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct supplementalCredentialsPackage *r)
2078 : {
2079 359656 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2080 359656 : if (ndr_flags & NDR_SCALARS) {
2081 359656 : NDR_CHECK(ndr_push_align(ndr, 2));
2082 359656 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->name)));
2083 359656 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->data)));
2084 359656 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
2085 359656 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, 2 * strlen_m(r->name), sizeof(uint8_t), CH_UTF16));
2086 359656 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data, strlen(r->data), sizeof(uint8_t), CH_DOS));
2087 359656 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
2088 : }
2089 359656 : if (ndr_flags & NDR_BUFFERS) {
2090 3804 : }
2091 359656 : return NDR_ERR_SUCCESS;
2092 : }
2093 :
2094 1371545 : _PUBLIC_ enum ndr_err_code ndr_pull_supplementalCredentialsPackage(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct supplementalCredentialsPackage *r)
2095 : {
2096 1371545 : uint32_t size_name_0 = 0;
2097 1371545 : uint32_t size_data_0 = 0;
2098 1371545 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2099 1371545 : if (ndr_flags & NDR_SCALARS) {
2100 1371545 : NDR_CHECK(ndr_pull_align(ndr, 2));
2101 1371545 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len));
2102 1371545 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data_len));
2103 1371545 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
2104 1371545 : size_name_0 = r->name_len;
2105 1371545 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, size_name_0, sizeof(uint8_t), CH_UTF16));
2106 1371545 : size_data_0 = r->data_len;
2107 1371545 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data, size_data_0, sizeof(uint8_t), CH_DOS));
2108 1371545 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
2109 : }
2110 1371545 : if (ndr_flags & NDR_BUFFERS) {
2111 50978 : }
2112 1371545 : return NDR_ERR_SUCCESS;
2113 : }
2114 :
2115 0 : static void ndr_print_flags_supplementalCredentialsPackage(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct supplementalCredentialsPackage *r)
2116 : {
2117 0 : ndr_print_supplementalCredentialsPackage(ndr, name, r);
2118 0 : }
2119 :
2120 32 : _PUBLIC_ void ndr_print_supplementalCredentialsPackage(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsPackage *r)
2121 : {
2122 32 : ndr_print_struct(ndr, name, "supplementalCredentialsPackage");
2123 32 : if (r == NULL) { ndr_print_null(ndr); return; }
2124 32 : ndr->depth++;
2125 32 : ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->name):r->name_len);
2126 32 : ndr_print_uint16(ndr, "data_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->data):r->data_len);
2127 32 : ndr_print_uint16(ndr, "reserved", r->reserved);
2128 32 : ndr_print_string(ndr, "name", r->name);
2129 32 : ndr_print_string(ndr, "data", r->data);
2130 32 : ndr->depth--;
2131 : }
2132 :
2133 85848 : _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsSignature(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum supplementalCredentialsSignature r)
2134 : {
2135 : {
2136 85848 : libndr_flags _flags_save_ENUM = ndr->flags;
2137 85848 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2138 85848 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
2139 85848 : ndr->flags = _flags_save_ENUM;
2140 : }
2141 85848 : return NDR_ERR_SUCCESS;
2142 : }
2143 :
2144 311272 : _PUBLIC_ enum ndr_err_code ndr_pull_supplementalCredentialsSignature(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum supplementalCredentialsSignature *r)
2145 : {
2146 10201 : uint16_t v;
2147 : {
2148 311272 : libndr_flags _flags_save_ENUM = ndr->flags;
2149 311272 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2150 311272 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
2151 311272 : *r = v;
2152 311272 : ndr->flags = _flags_save_ENUM;
2153 : }
2154 311272 : return NDR_ERR_SUCCESS;
2155 : }
2156 :
2157 12 : _PUBLIC_ void ndr_print_supplementalCredentialsSignature(struct ndr_print *ndr, const char *name, enum supplementalCredentialsSignature r)
2158 : {
2159 12 : const char *val = NULL;
2160 :
2161 : {
2162 12 : libndr_flags _flags_save_ENUM = ndr->flags;
2163 12 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2164 12 : switch (r) {
2165 10 : case SUPPLEMENTAL_CREDENTIALS_SIGNATURE: val = "SUPPLEMENTAL_CREDENTIALS_SIGNATURE"; break;
2166 : }
2167 12 : ndr_print_enum(ndr, name, "ENUM", val, r);
2168 12 : ndr->flags = _flags_save_ENUM;
2169 : }
2170 12 : }
2171 :
2172 12 : _PUBLIC_ void ndr_print_supplementalCredentialsSubBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsSubBlob *r)
2173 : {
2174 12 : uint32_t cntr_packages_0;
2175 12 : ndr_print_struct(ndr, name, "supplementalCredentialsSubBlob");
2176 12 : if (r == NULL) { ndr_print_null(ndr); return; }
2177 12 : ndr->depth++;
2178 12 : ndr_print_string(ndr, "prefix", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_PREFIX:r->prefix);
2179 12 : ndr_print_supplementalCredentialsSignature(ndr, "signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_SIGNATURE:r->signature);
2180 12 : ndr_print_uint16(ndr, "num_packages", r->num_packages);
2181 12 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "packages", (uint32_t)(r->num_packages));
2182 12 : ndr->depth++;
2183 44 : for (cntr_packages_0 = 0; cntr_packages_0 < (r->num_packages); cntr_packages_0++) {
2184 32 : ndr_print_supplementalCredentialsPackage(ndr, "packages", &r->packages[cntr_packages_0]);
2185 : }
2186 12 : ndr->depth--;
2187 12 : ndr->depth--;
2188 : }
2189 :
2190 64446 : static size_t ndr_size_supplementalCredentialsSubBlob(const struct supplementalCredentialsSubBlob *r, libndr_flags flags)
2191 : {
2192 64446 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsSubBlob);
2193 : }
2194 :
2195 21482 : _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct supplementalCredentialsBlob *r)
2196 : {
2197 21482 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2198 21482 : if (ndr_flags & NDR_SCALARS) {
2199 21482 : NDR_CHECK(ndr_push_align(ndr, 4));
2200 21482 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2201 21482 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
2202 21482 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2203 : {
2204 211 : struct ndr_push *_ndr_sub;
2205 21482 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
2206 21482 : NDR_CHECK(ndr_push_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
2207 21482 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
2208 : }
2209 21482 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0));
2210 21482 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2211 : }
2212 21482 : if (ndr_flags & NDR_BUFFERS) {
2213 211 : }
2214 21482 : return NDR_ERR_SUCCESS;
2215 : }
2216 :
2217 311283 : _PUBLIC_ enum ndr_err_code ndr_pull_supplementalCredentialsBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct supplementalCredentialsBlob *r)
2218 : {
2219 311283 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2220 311283 : if (ndr_flags & NDR_SCALARS) {
2221 311283 : NDR_CHECK(ndr_pull_align(ndr, 4));
2222 311283 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
2223 311283 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
2224 311283 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
2225 : {
2226 10203 : struct ndr_pull *_ndr_sub;
2227 311283 : ssize_t sub_size = r->__ndr_size;
2228 311283 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sub, 0, sub_size));
2229 311283 : NDR_CHECK(ndr_pull_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
2230 311283 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sub, 0, sub_size));
2231 : }
2232 311283 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown3));
2233 311283 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2234 : }
2235 311283 : if (ndr_flags & NDR_BUFFERS) {
2236 10203 : }
2237 311283 : return NDR_ERR_SUCCESS;
2238 : }
2239 :
2240 0 : static void ndr_print_flags_supplementalCredentialsBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct supplementalCredentialsBlob *r)
2241 : {
2242 0 : ndr_print_supplementalCredentialsBlob(ndr, name, r);
2243 0 : }
2244 :
2245 12 : _PUBLIC_ void ndr_print_supplementalCredentialsBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsBlob *r)
2246 : {
2247 12 : ndr_print_struct(ndr, name, "supplementalCredentialsBlob");
2248 12 : if (r == NULL) { ndr_print_null(ndr); return; }
2249 12 : ndr->depth++;
2250 12 : ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
2251 12 : ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags):r->__ndr_size);
2252 12 : ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
2253 12 : ndr_print_supplementalCredentialsSubBlob(ndr, "sub", &r->sub);
2254 12 : ndr_print_uint8(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
2255 12 : ndr->depth--;
2256 : }
2257 :
2258 21447 : _PUBLIC_ enum ndr_err_code ndr_push_package_PackagesBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PackagesBlob *r)
2259 : {
2260 21447 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2261 21447 : if (ndr_flags & NDR_SCALARS) {
2262 21447 : NDR_CHECK(ndr_push_align(ndr, 4));
2263 : {
2264 21447 : libndr_flags _flags_save_string_array = ndr->flags;
2265 21447 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
2266 21447 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->names));
2267 21447 : ndr->flags = _flags_save_string_array;
2268 : }
2269 21447 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2270 : }
2271 21447 : if (ndr_flags & NDR_BUFFERS) {
2272 199 : }
2273 21447 : return NDR_ERR_SUCCESS;
2274 : }
2275 :
2276 1 : _PUBLIC_ enum ndr_err_code ndr_pull_package_PackagesBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PackagesBlob *r)
2277 : {
2278 1 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2279 1 : if (ndr_flags & NDR_SCALARS) {
2280 1 : NDR_CHECK(ndr_pull_align(ndr, 4));
2281 : {
2282 1 : libndr_flags _flags_save_string_array = ndr->flags;
2283 1 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
2284 1 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->names));
2285 0 : ndr->flags = _flags_save_string_array;
2286 : }
2287 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2288 : }
2289 0 : if (ndr_flags & NDR_BUFFERS) {
2290 0 : }
2291 0 : return NDR_ERR_SUCCESS;
2292 : }
2293 :
2294 0 : static void ndr_print_flags_package_PackagesBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct package_PackagesBlob *r)
2295 : {
2296 0 : ndr_print_package_PackagesBlob(ndr, name, r);
2297 0 : }
2298 :
2299 0 : _PUBLIC_ void ndr_print_package_PackagesBlob(struct ndr_print *ndr, const char *name, const struct package_PackagesBlob *r)
2300 : {
2301 0 : ndr_print_struct(ndr, name, "package_PackagesBlob");
2302 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2303 0 : ndr->depth++;
2304 : {
2305 0 : libndr_flags _flags_save_string_array = ndr->flags;
2306 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
2307 0 : ndr_print_string_array(ndr, "names", r->names);
2308 0 : ndr->flags = _flags_save_string_array;
2309 : }
2310 0 : ndr->depth--;
2311 : }
2312 :
2313 75770 : static enum ndr_err_code ndr_push_package_PrimaryKerberosString(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryKerberosString *r)
2314 : {
2315 75770 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2316 75770 : if (ndr_flags & NDR_SCALARS) {
2317 37885 : NDR_CHECK(ndr_push_align(ndr, 5));
2318 37885 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
2319 37885 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
2320 : {
2321 37885 : libndr_flags _flags_save_string = ndr->flags;
2322 37885 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
2323 37885 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->string));
2324 37885 : ndr->flags = _flags_save_string;
2325 : }
2326 37885 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2327 : }
2328 75770 : if (ndr_flags & NDR_BUFFERS) {
2329 : {
2330 37885 : libndr_flags _flags_save_string = ndr->flags;
2331 37885 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
2332 37885 : if (r->string) {
2333 37885 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->string));
2334 : {
2335 388 : struct ndr_push *_ndr_string;
2336 37885 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_string, 0, 2 * strlen_m(r->string)));
2337 37885 : NDR_CHECK(ndr_push_string(_ndr_string, NDR_SCALARS, r->string));
2338 37885 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_string, 0, 2 * strlen_m(r->string)));
2339 : }
2340 37885 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->string));
2341 : }
2342 37885 : ndr->flags = _flags_save_string;
2343 : }
2344 : }
2345 74994 : return NDR_ERR_SUCCESS;
2346 : }
2347 :
2348 588418 : static enum ndr_err_code ndr_pull_package_PrimaryKerberosString(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryKerberosString *r)
2349 : {
2350 20436 : uint32_t _ptr_string;
2351 588418 : TALLOC_CTX *_mem_save_string_0 = NULL;
2352 588418 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2353 588418 : if (ndr_flags & NDR_SCALARS) {
2354 294209 : NDR_CHECK(ndr_pull_align(ndr, 5));
2355 294209 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
2356 294209 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
2357 : {
2358 294209 : libndr_flags _flags_save_string = ndr->flags;
2359 294209 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
2360 294209 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
2361 294209 : if (_ptr_string) {
2362 294209 : NDR_PULL_ALLOC(ndr, r->string);
2363 294209 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->string, _ptr_string));
2364 : } else {
2365 0 : r->string = NULL;
2366 : }
2367 294209 : ndr->flags = _flags_save_string;
2368 : }
2369 294209 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2370 : }
2371 588418 : if (ndr_flags & NDR_BUFFERS) {
2372 : {
2373 294209 : libndr_flags _flags_save_string = ndr->flags;
2374 294209 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
2375 294209 : if (r->string) {
2376 10218 : uint32_t _relative_save_offset;
2377 294209 : _relative_save_offset = ndr->offset;
2378 294209 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->string));
2379 294209 : _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
2380 294209 : NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
2381 : {
2382 10218 : struct ndr_pull *_ndr_string;
2383 294209 : ssize_t sub_size = r->size;
2384 294209 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_string, 0, sub_size));
2385 294209 : NDR_CHECK(ndr_pull_string(_ndr_string, NDR_SCALARS, &r->string));
2386 294209 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_string, 0, sub_size));
2387 : }
2388 294209 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
2389 294209 : if (ndr->offset > ndr->relative_highest_offset) {
2390 294209 : ndr->relative_highest_offset = ndr->offset;
2391 : }
2392 294209 : ndr->offset = _relative_save_offset;
2393 : }
2394 294209 : ndr->flags = _flags_save_string;
2395 : }
2396 : }
2397 567982 : return NDR_ERR_SUCCESS;
2398 : }
2399 :
2400 0 : _PUBLIC_ void ndr_print_package_PrimaryKerberosString(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosString *r)
2401 : {
2402 0 : ndr_print_struct(ndr, name, "package_PrimaryKerberosString");
2403 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2404 0 : ndr->depth++;
2405 0 : ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
2406 0 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
2407 : {
2408 0 : libndr_flags _flags_save_string = ndr->flags;
2409 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
2410 0 : ndr_print_ptr(ndr, "string", r->string);
2411 0 : ndr->depth++;
2412 0 : if (r->string) {
2413 0 : ndr_print_string(ndr, "string", r->string);
2414 : }
2415 0 : ndr->depth--;
2416 0 : ndr->flags = _flags_save_string;
2417 : }
2418 0 : ndr->depth--;
2419 : }
2420 :
2421 95492 : static enum ndr_err_code ndr_push_package_PrimaryKerberosKey3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryKerberosKey3 *r)
2422 : {
2423 95492 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2424 95492 : if (ndr_flags & NDR_SCALARS) {
2425 47746 : NDR_CHECK(ndr_push_align(ndr, 5));
2426 47746 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2427 47746 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2428 47746 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2429 47746 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
2430 47746 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
2431 : {
2432 47746 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2433 47746 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2434 47746 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
2435 47746 : ndr->flags = _flags_save_DATA_BLOB;
2436 : }
2437 47746 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2438 : }
2439 95492 : if (ndr_flags & NDR_BUFFERS) {
2440 : {
2441 47746 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2442 47746 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2443 47746 : if (r->value) {
2444 47746 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->value));
2445 : {
2446 462 : struct ndr_push *_ndr_value;
2447 47746 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
2448 47746 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
2449 47746 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
2450 : }
2451 47746 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->value));
2452 : }
2453 47746 : ndr->flags = _flags_save_DATA_BLOB;
2454 : }
2455 : }
2456 94568 : return NDR_ERR_SUCCESS;
2457 : }
2458 :
2459 16480 : static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryKerberosKey3 *r)
2460 : {
2461 224 : uint32_t _ptr_value;
2462 16480 : TALLOC_CTX *_mem_save_value_0 = NULL;
2463 16480 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2464 16480 : if (ndr_flags & NDR_SCALARS) {
2465 8240 : NDR_CHECK(ndr_pull_align(ndr, 5));
2466 8240 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
2467 8240 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
2468 8240 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
2469 8240 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
2470 8240 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
2471 : {
2472 8240 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2473 8240 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2474 8240 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
2475 8240 : if (_ptr_value) {
2476 8240 : NDR_PULL_ALLOC(ndr, r->value);
2477 8240 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
2478 : } else {
2479 0 : r->value = NULL;
2480 : }
2481 8240 : ndr->flags = _flags_save_DATA_BLOB;
2482 : }
2483 8240 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2484 : }
2485 16480 : if (ndr_flags & NDR_BUFFERS) {
2486 : {
2487 8240 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2488 8240 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2489 8240 : if (r->value) {
2490 112 : uint32_t _relative_save_offset;
2491 8240 : _relative_save_offset = ndr->offset;
2492 8240 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
2493 8240 : _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
2494 8240 : NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
2495 : {
2496 112 : struct ndr_pull *_ndr_value;
2497 8240 : ssize_t sub_size = r->value_len;
2498 8240 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, sub_size));
2499 8240 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
2500 8240 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, sub_size));
2501 : }
2502 8240 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
2503 8240 : if (ndr->offset > ndr->relative_highest_offset) {
2504 8240 : ndr->relative_highest_offset = ndr->offset;
2505 : }
2506 8240 : ndr->offset = _relative_save_offset;
2507 : }
2508 8240 : ndr->flags = _flags_save_DATA_BLOB;
2509 : }
2510 : }
2511 16256 : return NDR_ERR_SUCCESS;
2512 : }
2513 :
2514 0 : _PUBLIC_ void ndr_print_package_PrimaryKerberosKey3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey3 *r)
2515 : {
2516 0 : ndr_print_struct(ndr, name, "package_PrimaryKerberosKey3");
2517 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2518 0 : ndr->depth++;
2519 0 : ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
2520 0 : ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
2521 0 : ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
2522 0 : ndr_print_uint32(ndr, "keytype", r->keytype);
2523 0 : ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
2524 : {
2525 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2526 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2527 0 : ndr_print_ptr(ndr, "value", r->value);
2528 0 : ndr->depth++;
2529 0 : if (r->value) {
2530 0 : ndr_print_DATA_BLOB(ndr, "value", *r->value);
2531 : }
2532 0 : ndr->depth--;
2533 0 : ndr->flags = _flags_save_DATA_BLOB;
2534 : }
2535 0 : ndr->depth--;
2536 : }
2537 :
2538 42894 : static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryKerberosCtr3 *r)
2539 : {
2540 398 : uint32_t cntr_keys_0;
2541 398 : uint32_t cntr_old_keys_0;
2542 42894 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2543 42894 : if (ndr_flags & NDR_SCALARS) {
2544 21447 : NDR_CHECK(ndr_push_align(ndr, 5));
2545 21447 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
2546 21447 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
2547 21447 : NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2548 64341 : for (cntr_keys_0 = 0; cntr_keys_0 < (r->num_keys); cntr_keys_0++) {
2549 42894 : NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2550 : }
2551 26299 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (r->num_old_keys); cntr_old_keys_0++) {
2552 4852 : NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
2553 : }
2554 21447 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2555 21447 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2556 21447 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2557 21447 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2558 21447 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2559 21447 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2560 : }
2561 42894 : if (ndr_flags & NDR_BUFFERS) {
2562 21447 : NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2563 64341 : for (cntr_keys_0 = 0; cntr_keys_0 < (r->num_keys); cntr_keys_0++) {
2564 42894 : NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2565 : }
2566 26299 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (r->num_old_keys); cntr_old_keys_0++) {
2567 4852 : NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2568 : }
2569 : }
2570 42496 : return NDR_ERR_SUCCESS;
2571 : }
2572 :
2573 4852 : static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryKerberosCtr3 *r)
2574 : {
2575 4852 : uint32_t size_keys_0 = 0;
2576 64 : uint32_t cntr_keys_0;
2577 4852 : TALLOC_CTX *_mem_save_keys_0 = NULL;
2578 4852 : uint32_t size_old_keys_0 = 0;
2579 64 : uint32_t cntr_old_keys_0;
2580 4852 : TALLOC_CTX *_mem_save_old_keys_0 = NULL;
2581 4852 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2582 4852 : if (ndr_flags & NDR_SCALARS) {
2583 2426 : NDR_CHECK(ndr_pull_align(ndr, 5));
2584 2426 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
2585 2426 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
2586 2426 : NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2587 2426 : size_keys_0 = r->num_keys;
2588 2426 : NDR_PULL_ALLOC_N(ndr, r->keys, size_keys_0);
2589 2426 : _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2590 2426 : NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2591 7278 : for (cntr_keys_0 = 0; cntr_keys_0 < (size_keys_0); cntr_keys_0++) {
2592 4852 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2593 : }
2594 2426 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2595 2426 : size_old_keys_0 = r->num_old_keys;
2596 2426 : NDR_PULL_ALLOC_N(ndr, r->old_keys, size_old_keys_0);
2597 2426 : _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2598 2426 : NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2599 5814 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (size_old_keys_0); cntr_old_keys_0++) {
2600 3388 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
2601 : }
2602 2426 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2603 2426 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding1));
2604 2426 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding2));
2605 2426 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding3));
2606 2426 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding4));
2607 2426 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding5));
2608 2426 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2609 : }
2610 4852 : if (ndr_flags & NDR_BUFFERS) {
2611 2426 : NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2612 2426 : size_keys_0 = r->num_keys;
2613 2426 : _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2614 2426 : NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2615 7278 : for (cntr_keys_0 = 0; cntr_keys_0 < (size_keys_0); cntr_keys_0++) {
2616 4852 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2617 : }
2618 2426 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2619 2426 : size_old_keys_0 = r->num_old_keys;
2620 2426 : _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2621 2426 : NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2622 5814 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (size_old_keys_0); cntr_old_keys_0++) {
2623 3388 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2624 : }
2625 2426 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2626 7214 : for (cntr_keys_0 = 0; cntr_keys_0 < (size_keys_0); cntr_keys_0++) {
2627 : }
2628 5734 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (size_old_keys_0); cntr_old_keys_0++) {
2629 : }
2630 : }
2631 4788 : return NDR_ERR_SUCCESS;
2632 : }
2633 :
2634 0 : _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr3 *r)
2635 : {
2636 0 : uint32_t cntr_keys_0;
2637 0 : uint32_t cntr_old_keys_0;
2638 0 : ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr3");
2639 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2640 0 : ndr->depth++;
2641 0 : ndr_print_uint16(ndr, "num_keys", r->num_keys);
2642 0 : ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
2643 0 : ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
2644 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "keys", (uint32_t)(r->num_keys));
2645 0 : ndr->depth++;
2646 0 : for (cntr_keys_0 = 0; cntr_keys_0 < (r->num_keys); cntr_keys_0++) {
2647 0 : ndr_print_package_PrimaryKerberosKey3(ndr, "keys", &r->keys[cntr_keys_0]);
2648 : }
2649 0 : ndr->depth--;
2650 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "old_keys", (uint32_t)(r->num_old_keys));
2651 0 : ndr->depth++;
2652 0 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (r->num_old_keys); cntr_old_keys_0++) {
2653 0 : ndr_print_package_PrimaryKerberosKey3(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
2654 : }
2655 0 : ndr->depth--;
2656 0 : ndr_print_uint32(ndr, "padding1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding1);
2657 0 : ndr_print_uint32(ndr, "padding2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding2);
2658 0 : ndr_print_uint32(ndr, "padding3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding3);
2659 0 : ndr_print_uint32(ndr, "padding4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding4);
2660 0 : ndr_print_uint32(ndr, "padding5", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding5);
2661 0 : ndr->depth--;
2662 : }
2663 :
2664 163440 : static enum ndr_err_code ndr_push_package_PrimaryKerberosKey4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryKerberosKey4 *r)
2665 : {
2666 163440 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2667 163440 : if (ndr_flags & NDR_SCALARS) {
2668 81720 : NDR_CHECK(ndr_push_align(ndr, 5));
2669 81720 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2670 81720 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2671 81720 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2672 81720 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->iteration_count));
2673 81720 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
2674 81720 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
2675 : {
2676 81720 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2677 81720 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2678 81720 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
2679 81720 : ndr->flags = _flags_save_DATA_BLOB;
2680 : }
2681 81720 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2682 : }
2683 163440 : if (ndr_flags & NDR_BUFFERS) {
2684 : {
2685 81720 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2686 81720 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2687 81720 : if (r->value) {
2688 81720 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->value));
2689 : {
2690 980 : struct ndr_push *_ndr_value;
2691 81720 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
2692 81720 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
2693 81720 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
2694 : }
2695 81720 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->value));
2696 : }
2697 81720 : ndr->flags = _flags_save_DATA_BLOB;
2698 : }
2699 : }
2700 161480 : return NDR_ERR_SUCCESS;
2701 : }
2702 :
2703 2610408 : static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryKerberosKey4 *r)
2704 : {
2705 82496 : uint32_t _ptr_value;
2706 2610408 : TALLOC_CTX *_mem_save_value_0 = NULL;
2707 2610408 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2708 2610408 : if (ndr_flags & NDR_SCALARS) {
2709 1305204 : NDR_CHECK(ndr_pull_align(ndr, 5));
2710 1305204 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
2711 1305204 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
2712 1305204 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
2713 1305204 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->iteration_count));
2714 1305204 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
2715 1305204 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
2716 : {
2717 1305204 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2718 1305204 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2719 1305204 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
2720 1305204 : if (_ptr_value) {
2721 1305204 : NDR_PULL_ALLOC(ndr, r->value);
2722 1305204 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
2723 : } else {
2724 0 : r->value = NULL;
2725 : }
2726 1305204 : ndr->flags = _flags_save_DATA_BLOB;
2727 : }
2728 1305204 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2729 : }
2730 2610408 : if (ndr_flags & NDR_BUFFERS) {
2731 : {
2732 1305204 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2733 1305204 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2734 1305204 : if (r->value) {
2735 41248 : uint32_t _relative_save_offset;
2736 1305204 : _relative_save_offset = ndr->offset;
2737 1305204 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
2738 1305204 : _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
2739 1305204 : NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
2740 : {
2741 41248 : struct ndr_pull *_ndr_value;
2742 1305204 : ssize_t sub_size = r->value_len;
2743 1305204 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, sub_size));
2744 1305204 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
2745 1305204 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, sub_size));
2746 : }
2747 1305204 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
2748 1305204 : if (ndr->offset > ndr->relative_highest_offset) {
2749 1305204 : ndr->relative_highest_offset = ndr->offset;
2750 : }
2751 1305204 : ndr->offset = _relative_save_offset;
2752 : }
2753 1305204 : ndr->flags = _flags_save_DATA_BLOB;
2754 : }
2755 : }
2756 2527912 : return NDR_ERR_SUCCESS;
2757 : }
2758 :
2759 0 : _PUBLIC_ void ndr_print_package_PrimaryKerberosKey4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey4 *r)
2760 : {
2761 0 : ndr_print_struct(ndr, name, "package_PrimaryKerberosKey4");
2762 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2763 0 : ndr->depth++;
2764 0 : ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
2765 0 : ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
2766 0 : ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
2767 0 : ndr_print_uint32(ndr, "iteration_count", r->iteration_count);
2768 0 : ndr_print_uint32(ndr, "keytype", r->keytype);
2769 0 : ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
2770 : {
2771 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2772 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2773 0 : ndr_print_ptr(ndr, "value", r->value);
2774 0 : ndr->depth++;
2775 0 : if (r->value) {
2776 0 : ndr_print_DATA_BLOB(ndr, "value", *r->value);
2777 : }
2778 0 : ndr->depth--;
2779 0 : ndr->flags = _flags_save_DATA_BLOB;
2780 : }
2781 0 : ndr->depth--;
2782 : }
2783 :
2784 32876 : static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryKerberosCtr4 *r)
2785 : {
2786 378 : uint32_t cntr_keys_0;
2787 378 : uint32_t cntr_old_keys_0;
2788 378 : uint32_t cntr_older_keys_0;
2789 32876 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2790 32876 : if (ndr_flags & NDR_SCALARS) {
2791 16438 : NDR_CHECK(ndr_push_align(ndr, 5));
2792 16438 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
2793 16438 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2794 16438 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
2795 16438 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_older_keys));
2796 16438 : NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2797 16438 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->default_iteration_count));
2798 82190 : for (cntr_keys_0 = 0; cntr_keys_0 < (r->num_keys); cntr_keys_0++) {
2799 65752 : NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2800 : }
2801 25758 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (r->num_old_keys); cntr_old_keys_0++) {
2802 9320 : NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
2803 : }
2804 23086 : for (cntr_older_keys_0 = 0; cntr_older_keys_0 < (r->num_older_keys); cntr_older_keys_0++) {
2805 6648 : NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
2806 : }
2807 16438 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2808 : }
2809 32876 : if (ndr_flags & NDR_BUFFERS) {
2810 16438 : NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2811 82190 : for (cntr_keys_0 = 0; cntr_keys_0 < (r->num_keys); cntr_keys_0++) {
2812 65752 : NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2813 : }
2814 25758 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (r->num_old_keys); cntr_old_keys_0++) {
2815 9320 : NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2816 : }
2817 23086 : for (cntr_older_keys_0 = 0; cntr_older_keys_0 < (r->num_older_keys); cntr_older_keys_0++) {
2818 6648 : NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
2819 : }
2820 : }
2821 32498 : return NDR_ERR_SUCCESS;
2822 : }
2823 :
2824 583566 : static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryKerberosCtr4 *r)
2825 : {
2826 583566 : uint32_t size_keys_0 = 0;
2827 20372 : uint32_t cntr_keys_0;
2828 583566 : TALLOC_CTX *_mem_save_keys_0 = NULL;
2829 583566 : uint32_t size_service_keys_0 = 0;
2830 20372 : uint32_t cntr_service_keys_0;
2831 583566 : TALLOC_CTX *_mem_save_service_keys_0 = NULL;
2832 583566 : uint32_t size_old_keys_0 = 0;
2833 20372 : uint32_t cntr_old_keys_0;
2834 583566 : TALLOC_CTX *_mem_save_old_keys_0 = NULL;
2835 583566 : uint32_t size_older_keys_0 = 0;
2836 20372 : uint32_t cntr_older_keys_0;
2837 583566 : TALLOC_CTX *_mem_save_older_keys_0 = NULL;
2838 583566 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2839 583566 : if (ndr_flags & NDR_SCALARS) {
2840 291783 : NDR_CHECK(ndr_pull_align(ndr, 5));
2841 291783 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
2842 291783 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_service_keys));
2843 291783 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
2844 291783 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_older_keys));
2845 291783 : NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
2846 291783 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->default_iteration_count));
2847 291783 : size_keys_0 = r->num_keys;
2848 291783 : NDR_PULL_ALLOC_N(ndr, r->keys, size_keys_0);
2849 291783 : _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2850 291783 : NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2851 1458915 : for (cntr_keys_0 = 0; cntr_keys_0 < (size_keys_0); cntr_keys_0++) {
2852 1167132 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
2853 : }
2854 291783 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2855 291783 : size_service_keys_0 = r->num_service_keys;
2856 291783 : NDR_PULL_ALLOC_N(ndr, r->service_keys, size_service_keys_0);
2857 291783 : _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2858 291783 : NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
2859 291783 : for (cntr_service_keys_0 = 0; cntr_service_keys_0 < (size_service_keys_0); cntr_service_keys_0++) {
2860 0 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->service_keys[cntr_service_keys_0]));
2861 : }
2862 291783 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
2863 291783 : size_old_keys_0 = r->num_old_keys;
2864 291783 : NDR_PULL_ALLOC_N(ndr, r->old_keys, size_old_keys_0);
2865 291783 : _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2866 291783 : NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2867 371111 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (size_old_keys_0); cntr_old_keys_0++) {
2868 79328 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
2869 : }
2870 291783 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2871 291783 : size_older_keys_0 = r->num_older_keys;
2872 291783 : NDR_PULL_ALLOC_N(ndr, r->older_keys, size_older_keys_0);
2873 291783 : _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2874 291783 : NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
2875 350527 : for (cntr_older_keys_0 = 0; cntr_older_keys_0 < (size_older_keys_0); cntr_older_keys_0++) {
2876 58744 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
2877 : }
2878 291783 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
2879 291783 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2880 : }
2881 583566 : if (ndr_flags & NDR_BUFFERS) {
2882 291783 : NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
2883 291783 : size_keys_0 = r->num_keys;
2884 291783 : _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2885 291783 : NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
2886 1458915 : for (cntr_keys_0 = 0; cntr_keys_0 < (size_keys_0); cntr_keys_0++) {
2887 1167132 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
2888 : }
2889 291783 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
2890 291783 : size_service_keys_0 = r->num_service_keys;
2891 291783 : _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2892 291783 : NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
2893 291783 : for (cntr_service_keys_0 = 0; cntr_service_keys_0 < (size_service_keys_0); cntr_service_keys_0++) {
2894 0 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->service_keys[cntr_service_keys_0]));
2895 : }
2896 291783 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
2897 291783 : size_old_keys_0 = r->num_old_keys;
2898 291783 : _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2899 291783 : NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
2900 371111 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (size_old_keys_0); cntr_old_keys_0++) {
2901 79328 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
2902 : }
2903 291783 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
2904 291783 : size_older_keys_0 = r->num_older_keys;
2905 291783 : _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2906 291783 : NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
2907 350527 : for (cntr_older_keys_0 = 0; cntr_older_keys_0 < (size_older_keys_0); cntr_older_keys_0++) {
2908 58744 : NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
2909 : }
2910 291783 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
2911 1418171 : for (cntr_keys_0 = 0; cntr_keys_0 < (size_keys_0); cntr_keys_0++) {
2912 : }
2913 281597 : for (cntr_service_keys_0 = 0; cntr_service_keys_0 < (size_service_keys_0); cntr_service_keys_0++) {
2914 : }
2915 360653 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (size_old_keys_0); cntr_old_keys_0++) {
2916 : }
2917 340109 : for (cntr_older_keys_0 = 0; cntr_older_keys_0 < (size_older_keys_0); cntr_older_keys_0++) {
2918 : }
2919 : }
2920 563194 : return NDR_ERR_SUCCESS;
2921 : }
2922 :
2923 0 : _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr4 *r)
2924 : {
2925 0 : uint32_t cntr_keys_0;
2926 0 : uint32_t cntr_service_keys_0;
2927 0 : uint32_t cntr_old_keys_0;
2928 0 : uint32_t cntr_older_keys_0;
2929 0 : ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr4");
2930 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2931 0 : ndr->depth++;
2932 0 : ndr_print_uint16(ndr, "num_keys", r->num_keys);
2933 0 : ndr_print_uint16(ndr, "num_service_keys", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->num_service_keys);
2934 0 : ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
2935 0 : ndr_print_uint16(ndr, "num_older_keys", r->num_older_keys);
2936 0 : ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
2937 0 : ndr_print_uint32(ndr, "default_iteration_count", r->default_iteration_count);
2938 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "keys", (uint32_t)(r->num_keys));
2939 0 : ndr->depth++;
2940 0 : for (cntr_keys_0 = 0; cntr_keys_0 < (r->num_keys); cntr_keys_0++) {
2941 0 : ndr_print_package_PrimaryKerberosKey4(ndr, "keys", &r->keys[cntr_keys_0]);
2942 : }
2943 0 : ndr->depth--;
2944 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "service_keys", (uint32_t)(r->num_service_keys));
2945 0 : ndr->depth++;
2946 0 : for (cntr_service_keys_0 = 0; cntr_service_keys_0 < (r->num_service_keys); cntr_service_keys_0++) {
2947 0 : ndr_print_package_PrimaryKerberosKey4(ndr, "service_keys", &r->service_keys[cntr_service_keys_0]);
2948 : }
2949 0 : ndr->depth--;
2950 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "old_keys", (uint32_t)(r->num_old_keys));
2951 0 : ndr->depth++;
2952 0 : for (cntr_old_keys_0 = 0; cntr_old_keys_0 < (r->num_old_keys); cntr_old_keys_0++) {
2953 0 : ndr_print_package_PrimaryKerberosKey4(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
2954 : }
2955 0 : ndr->depth--;
2956 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "older_keys", (uint32_t)(r->num_older_keys));
2957 0 : ndr->depth++;
2958 0 : for (cntr_older_keys_0 = 0; cntr_older_keys_0 < (r->num_older_keys); cntr_older_keys_0++) {
2959 0 : ndr_print_package_PrimaryKerberosKey4(ndr, "older_keys", &r->older_keys[cntr_older_keys_0]);
2960 : }
2961 0 : ndr->depth--;
2962 0 : ndr->depth--;
2963 : }
2964 :
2965 75770 : static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union package_PrimaryKerberosCtr *r)
2966 : {
2967 776 : uint32_t level;
2968 75770 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2969 75770 : if (ndr_flags & NDR_SCALARS) {
2970 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2971 37885 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2972 37885 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2973 37885 : switch (level) {
2974 21447 : case 3: {
2975 21447 : NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2976 21248 : break; }
2977 :
2978 16438 : case 4: {
2979 16438 : NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2980 16249 : break; }
2981 :
2982 0 : default:
2983 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
2984 : }
2985 : }
2986 75770 : if (ndr_flags & NDR_BUFFERS) {
2987 37885 : if (!(ndr_flags & NDR_SCALARS)) {
2988 : /* We didn't get it above, and the token is not needed after this. */
2989 37885 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2990 : }
2991 37885 : switch (level) {
2992 21447 : case 3:
2993 21447 : NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2994 21248 : break;
2995 :
2996 16438 : case 4:
2997 16438 : NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2998 16249 : break;
2999 :
3000 0 : default:
3001 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3002 : }
3003 : }
3004 74994 : return NDR_ERR_SUCCESS;
3005 : }
3006 :
3007 588418 : static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union package_PrimaryKerberosCtr *r)
3008 : {
3009 20436 : uint32_t level;
3010 588418 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3011 588418 : if (ndr_flags & NDR_SCALARS) {
3012 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3013 294209 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3014 294209 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3015 294209 : switch (level) {
3016 2426 : case 3: {
3017 2426 : NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
3018 2394 : break; }
3019 :
3020 291783 : case 4: {
3021 291783 : NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
3022 281597 : break; }
3023 :
3024 0 : default:
3025 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3026 : }
3027 : }
3028 588418 : if (ndr_flags & NDR_BUFFERS) {
3029 294209 : if (!(ndr_flags & NDR_SCALARS)) {
3030 : /* We didn't get it above, and the token is not needed after this. */
3031 294209 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3032 : }
3033 294209 : switch (level) {
3034 2426 : case 3:
3035 2426 : NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
3036 2394 : break;
3037 :
3038 291783 : case 4:
3039 291783 : NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
3040 281597 : break;
3041 :
3042 0 : default:
3043 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3044 : }
3045 : }
3046 567982 : return NDR_ERR_SUCCESS;
3047 : }
3048 :
3049 0 : _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr(struct ndr_print *ndr, const char *name, const union package_PrimaryKerberosCtr *r)
3050 : {
3051 0 : uint32_t level;
3052 0 : level = ndr_print_steal_switch_value(ndr, r);
3053 0 : ndr_print_union(ndr, name, level, "package_PrimaryKerberosCtr");
3054 0 : switch (level) {
3055 0 : case 3:
3056 0 : ndr_print_package_PrimaryKerberosCtr3(ndr, "ctr3", &r->ctr3);
3057 0 : break;
3058 :
3059 0 : case 4:
3060 0 : ndr_print_package_PrimaryKerberosCtr4(ndr, "ctr4", &r->ctr4);
3061 0 : break;
3062 :
3063 0 : default:
3064 0 : ndr_print_bad_level(ndr, name, level);
3065 : }
3066 0 : }
3067 :
3068 37885 : _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryKerberosBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryKerberosBlob *r)
3069 : {
3070 37885 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3071 37885 : if (ndr_flags & NDR_SCALARS) {
3072 37885 : NDR_CHECK(ndr_push_align(ndr, 5));
3073 37885 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version));
3074 37885 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
3075 37885 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
3076 37885 : NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
3077 37885 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3078 : }
3079 37885 : if (ndr_flags & NDR_BUFFERS) {
3080 37885 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
3081 37885 : NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
3082 : }
3083 37497 : return NDR_ERR_SUCCESS;
3084 : }
3085 :
3086 294209 : _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryKerberosBlob *r)
3087 : {
3088 294209 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3089 294209 : if (ndr_flags & NDR_SCALARS) {
3090 294209 : NDR_CHECK(ndr_pull_align(ndr, 5));
3091 294209 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version));
3092 294209 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
3093 294209 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
3094 294209 : NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
3095 294209 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3096 : }
3097 294209 : if (ndr_flags & NDR_BUFFERS) {
3098 294209 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
3099 294209 : NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
3100 : }
3101 283991 : return NDR_ERR_SUCCESS;
3102 : }
3103 :
3104 0 : static void ndr_print_flags_package_PrimaryKerberosBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct package_PrimaryKerberosBlob *r)
3105 : {
3106 0 : ndr_print_package_PrimaryKerberosBlob(ndr, name, r);
3107 0 : }
3108 :
3109 0 : _PUBLIC_ void ndr_print_package_PrimaryKerberosBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosBlob *r)
3110 : {
3111 0 : ndr_print_struct(ndr, name, "package_PrimaryKerberosBlob");
3112 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3113 0 : ndr->depth++;
3114 0 : ndr_print_uint16(ndr, "version", r->version);
3115 0 : ndr_print_uint16(ndr, "flags", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->flags);
3116 0 : ndr_print_set_switch_value(ndr, &r->ctr, r->version);
3117 0 : ndr_print_package_PrimaryKerberosCtr(ndr, "ctr", &r->ctr);
3118 0 : ndr->depth--;
3119 : }
3120 :
3121 14 : _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryCLEARTEXTBlob *r)
3122 : {
3123 14 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3124 14 : if (ndr_flags & NDR_SCALARS) {
3125 14 : NDR_CHECK(ndr_push_align(ndr, 4));
3126 : {
3127 14 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3128 14 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3129 14 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext));
3130 14 : ndr->flags = _flags_save_DATA_BLOB;
3131 : }
3132 14 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3133 : }
3134 14 : if (ndr_flags & NDR_BUFFERS) {
3135 0 : }
3136 14 : return NDR_ERR_SUCCESS;
3137 : }
3138 :
3139 14 : _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryCLEARTEXTBlob *r)
3140 : {
3141 14 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3142 14 : if (ndr_flags & NDR_SCALARS) {
3143 14 : NDR_CHECK(ndr_pull_align(ndr, 4));
3144 : {
3145 14 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3146 14 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3147 14 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext));
3148 14 : ndr->flags = _flags_save_DATA_BLOB;
3149 : }
3150 14 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3151 : }
3152 14 : if (ndr_flags & NDR_BUFFERS) {
3153 0 : }
3154 14 : return NDR_ERR_SUCCESS;
3155 : }
3156 :
3157 0 : static void ndr_print_flags_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct package_PrimaryCLEARTEXTBlob *r)
3158 : {
3159 0 : ndr_print_package_PrimaryCLEARTEXTBlob(ndr, name, r);
3160 0 : }
3161 :
3162 0 : _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryCLEARTEXTBlob *r)
3163 : {
3164 0 : ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
3165 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3166 0 : ndr->depth++;
3167 : {
3168 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3169 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3170 0 : ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext);
3171 0 : ndr->flags = _flags_save_DATA_BLOB;
3172 : }
3173 0 : ndr->depth--;
3174 : }
3175 :
3176 621963 : static enum ndr_err_code ndr_push_package_PrimaryWDigestHash(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryWDigestHash *r)
3177 : {
3178 : {
3179 621963 : libndr_flags _flags_save_STRUCT = ndr->flags;
3180 621963 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3181 621963 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3182 621963 : if (ndr_flags & NDR_SCALARS) {
3183 621963 : NDR_CHECK(ndr_push_align(ndr, 1));
3184 621963 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
3185 621963 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3186 : }
3187 621963 : if (ndr_flags & NDR_BUFFERS) {
3188 5771 : }
3189 621963 : ndr->flags = _flags_save_STRUCT;
3190 : }
3191 621963 : return NDR_ERR_SUCCESS;
3192 : }
3193 :
3194 3161 : static enum ndr_err_code ndr_pull_package_PrimaryWDigestHash(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryWDigestHash *r)
3195 : {
3196 3161 : uint32_t size_hash_0 = 0;
3197 : {
3198 3161 : libndr_flags _flags_save_STRUCT = ndr->flags;
3199 3161 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3200 3161 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3201 3161 : if (ndr_flags & NDR_SCALARS) {
3202 3161 : NDR_CHECK(ndr_pull_align(ndr, 1));
3203 3161 : size_hash_0 = 16;
3204 3161 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, size_hash_0));
3205 3161 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3206 : }
3207 3161 : if (ndr_flags & NDR_BUFFERS) {
3208 0 : }
3209 3161 : ndr->flags = _flags_save_STRUCT;
3210 : }
3211 3161 : return NDR_ERR_SUCCESS;
3212 : }
3213 :
3214 0 : _PUBLIC_ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestHash *r)
3215 : {
3216 0 : ndr_print_struct(ndr, name, "package_PrimaryWDigestHash");
3217 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3218 : {
3219 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
3220 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3221 0 : ndr->depth++;
3222 0 : ndr_print_array_uint8(ndr, "hash", r->hash, 16);
3223 0 : ndr->depth--;
3224 0 : ndr->flags = _flags_save_STRUCT;
3225 : }
3226 : }
3227 :
3228 21447 : _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryWDigestBlob *r)
3229 : {
3230 199 : uint32_t cntr_hashes_0;
3231 21447 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3232 21447 : if (ndr_flags & NDR_SCALARS) {
3233 21447 : NDR_CHECK(ndr_push_align(ndr, 4));
3234 21447 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0x31));
3235 21447 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0x01));
3236 21447 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_hashes));
3237 21447 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3238 21447 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, 0));
3239 643410 : for (cntr_hashes_0 = 0; cntr_hashes_0 < (r->num_hashes); cntr_hashes_0++) {
3240 621963 : NDR_CHECK(ndr_push_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
3241 : }
3242 21447 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3243 : }
3244 21447 : if (ndr_flags & NDR_BUFFERS) {
3245 199 : }
3246 21447 : return NDR_ERR_SUCCESS;
3247 : }
3248 :
3249 109 : _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryWDigestBlob *r)
3250 : {
3251 109 : uint32_t size_hashes_0 = 0;
3252 0 : uint32_t cntr_hashes_0;
3253 109 : TALLOC_CTX *_mem_save_hashes_0 = NULL;
3254 109 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3255 109 : if (ndr_flags & NDR_SCALARS) {
3256 109 : NDR_CHECK(ndr_pull_align(ndr, 4));
3257 109 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
3258 109 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown2));
3259 109 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_hashes));
3260 109 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
3261 109 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->unknown4));
3262 109 : size_hashes_0 = r->num_hashes;
3263 109 : NDR_PULL_ALLOC_N(ndr, r->hashes, size_hashes_0);
3264 109 : _mem_save_hashes_0 = NDR_PULL_GET_MEM_CTX(ndr);
3265 109 : NDR_PULL_SET_MEM_CTX(ndr, r->hashes, 0);
3266 3270 : for (cntr_hashes_0 = 0; cntr_hashes_0 < (size_hashes_0); cntr_hashes_0++) {
3267 3161 : NDR_CHECK(ndr_pull_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
3268 : }
3269 109 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0);
3270 109 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3271 : }
3272 109 : if (ndr_flags & NDR_BUFFERS) {
3273 0 : }
3274 109 : return NDR_ERR_SUCCESS;
3275 : }
3276 :
3277 0 : static void ndr_print_flags_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct package_PrimaryWDigestBlob *r)
3278 : {
3279 0 : ndr_print_package_PrimaryWDigestBlob(ndr, name, r);
3280 0 : }
3281 :
3282 0 : _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r)
3283 : {
3284 0 : uint32_t cntr_hashes_0;
3285 0 : ndr_print_struct(ndr, name, "package_PrimaryWDigestBlob");
3286 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3287 0 : ndr->depth++;
3288 0 : ndr_print_uint16(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x31:r->unknown1);
3289 0 : ndr_print_uint8(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x01:r->unknown2);
3290 0 : ndr_print_uint8(ndr, "num_hashes", r->num_hashes);
3291 0 : ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
3292 0 : ndr_print_udlong(ndr, "unknown4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown4);
3293 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "hashes", (uint32_t)(r->num_hashes));
3294 0 : ndr->depth++;
3295 0 : for (cntr_hashes_0 = 0; cntr_hashes_0 < (r->num_hashes); cntr_hashes_0++) {
3296 0 : ndr_print_package_PrimaryWDigestHash(ndr, "hashes", &r->hashes[cntr_hashes_0]);
3297 : }
3298 0 : ndr->depth--;
3299 0 : ndr->depth--;
3300 : }
3301 :
3302 9045 : _PUBLIC_ enum ndr_err_code ndr_push_package_PrimarySambaGPGBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimarySambaGPGBlob *r)
3303 : {
3304 9045 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3305 9045 : if (ndr_flags & NDR_SCALARS) {
3306 9045 : NDR_CHECK(ndr_push_align(ndr, 4));
3307 : {
3308 9045 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3309 9045 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3310 9045 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->gpg_blob));
3311 9045 : ndr->flags = _flags_save_DATA_BLOB;
3312 : }
3313 9045 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3314 : }
3315 9045 : if (ndr_flags & NDR_BUFFERS) {
3316 127 : }
3317 9045 : return NDR_ERR_SUCCESS;
3318 : }
3319 :
3320 0 : _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimarySambaGPGBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimarySambaGPGBlob *r)
3321 : {
3322 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3323 0 : if (ndr_flags & NDR_SCALARS) {
3324 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
3325 : {
3326 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3327 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3328 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->gpg_blob));
3329 0 : ndr->flags = _flags_save_DATA_BLOB;
3330 : }
3331 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3332 : }
3333 0 : if (ndr_flags & NDR_BUFFERS) {
3334 0 : }
3335 0 : return NDR_ERR_SUCCESS;
3336 : }
3337 :
3338 0 : static void ndr_print_flags_package_PrimarySambaGPGBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct package_PrimarySambaGPGBlob *r)
3339 : {
3340 0 : ndr_print_package_PrimarySambaGPGBlob(ndr, name, r);
3341 0 : }
3342 :
3343 0 : _PUBLIC_ void ndr_print_package_PrimarySambaGPGBlob(struct ndr_print *ndr, const char *name, const struct package_PrimarySambaGPGBlob *r)
3344 : {
3345 0 : ndr_print_struct(ndr, name, "package_PrimarySambaGPGBlob");
3346 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3347 0 : ndr->depth++;
3348 : {
3349 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3350 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3351 0 : ndr_print_DATA_BLOB(ndr, "gpg_blob", r->gpg_blob);
3352 0 : ndr->flags = _flags_save_DATA_BLOB;
3353 : }
3354 0 : ndr->depth--;
3355 : }
3356 :
3357 244 : static enum ndr_err_code ndr_push_package_PrimaryUserPasswordValue(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryUserPasswordValue *r)
3358 : {
3359 244 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3360 244 : if (ndr_flags & NDR_SCALARS) {
3361 122 : NDR_CHECK(ndr_push_align(ndr, 5));
3362 122 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->scheme)));
3363 122 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->scheme, 2 * strlen_m(r->scheme), sizeof(uint8_t), CH_UTF16));
3364 122 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
3365 : {
3366 122 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3367 122 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3368 122 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
3369 122 : ndr->flags = _flags_save_DATA_BLOB;
3370 : }
3371 122 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3372 : }
3373 244 : if (ndr_flags & NDR_BUFFERS) {
3374 : {
3375 122 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3376 122 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3377 122 : if (r->value) {
3378 122 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->value));
3379 : {
3380 16 : struct ndr_push *_ndr_value;
3381 122 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
3382 122 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
3383 122 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
3384 : }
3385 122 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->value));
3386 : }
3387 122 : ndr->flags = _flags_save_DATA_BLOB;
3388 : }
3389 : }
3390 212 : return NDR_ERR_SUCCESS;
3391 : }
3392 :
3393 916 : static enum ndr_err_code ndr_pull_package_PrimaryUserPasswordValue(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryUserPasswordValue *r)
3394 : {
3395 916 : uint32_t size_scheme_0 = 0;
3396 112 : uint32_t _ptr_value;
3397 916 : TALLOC_CTX *_mem_save_value_0 = NULL;
3398 916 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3399 916 : if (ndr_flags & NDR_SCALARS) {
3400 458 : NDR_CHECK(ndr_pull_align(ndr, 5));
3401 458 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->scheme_len));
3402 458 : size_scheme_0 = r->scheme_len;
3403 458 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->scheme, size_scheme_0, sizeof(uint8_t), CH_UTF16));
3404 458 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
3405 : {
3406 458 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3407 458 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3408 458 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
3409 458 : if (_ptr_value) {
3410 458 : NDR_PULL_ALLOC(ndr, r->value);
3411 458 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
3412 : } else {
3413 0 : r->value = NULL;
3414 : }
3415 458 : ndr->flags = _flags_save_DATA_BLOB;
3416 : }
3417 458 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3418 : }
3419 916 : if (ndr_flags & NDR_BUFFERS) {
3420 : {
3421 458 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3422 458 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3423 458 : if (r->value) {
3424 56 : uint32_t _relative_save_offset;
3425 458 : _relative_save_offset = ndr->offset;
3426 458 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
3427 458 : _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
3428 458 : NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
3429 : {
3430 56 : struct ndr_pull *_ndr_value;
3431 458 : ssize_t sub_size = r->value_len;
3432 458 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, sub_size));
3433 458 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
3434 458 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, sub_size));
3435 : }
3436 458 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
3437 458 : if (ndr->offset > ndr->relative_highest_offset) {
3438 458 : ndr->relative_highest_offset = ndr->offset;
3439 : }
3440 458 : ndr->offset = _relative_save_offset;
3441 : }
3442 458 : ndr->flags = _flags_save_DATA_BLOB;
3443 : }
3444 : }
3445 804 : return NDR_ERR_SUCCESS;
3446 : }
3447 :
3448 0 : _PUBLIC_ void ndr_print_package_PrimaryUserPasswordValue(struct ndr_print *ndr, const char *name, const struct package_PrimaryUserPasswordValue *r)
3449 : {
3450 0 : ndr_print_struct(ndr, name, "package_PrimaryUserPasswordValue");
3451 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3452 0 : ndr->depth++;
3453 0 : ndr_print_uint16(ndr, "scheme_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->scheme):r->scheme_len);
3454 0 : ndr_print_string(ndr, "scheme", r->scheme);
3455 0 : ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
3456 : {
3457 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3458 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3459 0 : ndr_print_ptr(ndr, "value", r->value);
3460 0 : ndr->depth++;
3461 0 : if (r->value) {
3462 0 : ndr_print_DATA_BLOB(ndr, "value", *r->value);
3463 : }
3464 0 : ndr->depth--;
3465 0 : ndr->flags = _flags_save_DATA_BLOB;
3466 : }
3467 0 : ndr->depth--;
3468 : }
3469 :
3470 44 : _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryUserPasswordBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct package_PrimaryUserPasswordBlob *r)
3471 : {
3472 6 : uint32_t cntr_hashes_0;
3473 44 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3474 44 : if (ndr_flags & NDR_SCALARS) {
3475 44 : NDR_CHECK(ndr_push_align(ndr, 5));
3476 44 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->current_nt_hash));
3477 44 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_hashes));
3478 166 : for (cntr_hashes_0 = 0; cntr_hashes_0 < (r->num_hashes); cntr_hashes_0++) {
3479 122 : NDR_CHECK(ndr_push_package_PrimaryUserPasswordValue(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
3480 : }
3481 44 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3482 : }
3483 44 : if (ndr_flags & NDR_BUFFERS) {
3484 166 : for (cntr_hashes_0 = 0; cntr_hashes_0 < (r->num_hashes); cntr_hashes_0++) {
3485 122 : NDR_CHECK(ndr_push_package_PrimaryUserPasswordValue(ndr, NDR_BUFFERS, &r->hashes[cntr_hashes_0]));
3486 : }
3487 : }
3488 38 : return NDR_ERR_SUCCESS;
3489 : }
3490 :
3491 148 : _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryUserPasswordBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct package_PrimaryUserPasswordBlob *r)
3492 : {
3493 148 : uint32_t size_hashes_0 = 0;
3494 18 : uint32_t cntr_hashes_0;
3495 148 : TALLOC_CTX *_mem_save_hashes_0 = NULL;
3496 148 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3497 148 : if (ndr_flags & NDR_SCALARS) {
3498 148 : NDR_CHECK(ndr_pull_align(ndr, 5));
3499 148 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->current_nt_hash));
3500 148 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_hashes));
3501 148 : size_hashes_0 = r->num_hashes;
3502 148 : NDR_PULL_ALLOC_N(ndr, r->hashes, size_hashes_0);
3503 148 : _mem_save_hashes_0 = NDR_PULL_GET_MEM_CTX(ndr);
3504 148 : NDR_PULL_SET_MEM_CTX(ndr, r->hashes, 0);
3505 606 : for (cntr_hashes_0 = 0; cntr_hashes_0 < (size_hashes_0); cntr_hashes_0++) {
3506 458 : NDR_CHECK(ndr_pull_package_PrimaryUserPasswordValue(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
3507 : }
3508 148 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0);
3509 148 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3510 : }
3511 148 : if (ndr_flags & NDR_BUFFERS) {
3512 148 : size_hashes_0 = r->num_hashes;
3513 148 : _mem_save_hashes_0 = NDR_PULL_GET_MEM_CTX(ndr);
3514 148 : NDR_PULL_SET_MEM_CTX(ndr, r->hashes, 0);
3515 606 : for (cntr_hashes_0 = 0; cntr_hashes_0 < (size_hashes_0); cntr_hashes_0++) {
3516 458 : NDR_CHECK(ndr_pull_package_PrimaryUserPasswordValue(ndr, NDR_BUFFERS, &r->hashes[cntr_hashes_0]));
3517 : }
3518 148 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0);
3519 550 : for (cntr_hashes_0 = 0; cntr_hashes_0 < (size_hashes_0); cntr_hashes_0++) {
3520 : }
3521 : }
3522 130 : return NDR_ERR_SUCCESS;
3523 : }
3524 :
3525 0 : static void ndr_print_flags_package_PrimaryUserPasswordBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct package_PrimaryUserPasswordBlob *r)
3526 : {
3527 0 : ndr_print_package_PrimaryUserPasswordBlob(ndr, name, r);
3528 0 : }
3529 :
3530 0 : _PUBLIC_ void ndr_print_package_PrimaryUserPasswordBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryUserPasswordBlob *r)
3531 : {
3532 0 : uint32_t cntr_hashes_0;
3533 0 : ndr_print_struct(ndr, name, "package_PrimaryUserPasswordBlob");
3534 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3535 0 : ndr->depth++;
3536 0 : ndr_print_samr_Password(ndr, "current_nt_hash", &r->current_nt_hash);
3537 0 : ndr_print_uint16(ndr, "num_hashes", r->num_hashes);
3538 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "hashes", (uint32_t)(r->num_hashes));
3539 0 : ndr->depth++;
3540 0 : for (cntr_hashes_0 = 0; cntr_hashes_0 < (r->num_hashes); cntr_hashes_0++) {
3541 0 : ndr_print_package_PrimaryUserPasswordValue(ndr, "hashes", &r->hashes[cntr_hashes_0]);
3542 : }
3543 0 : ndr->depth--;
3544 0 : ndr->depth--;
3545 : }
3546 :
3547 78 : static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct AuthInfoNone *r)
3548 : {
3549 78 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3550 78 : if (ndr_flags & NDR_SCALARS) {
3551 78 : NDR_CHECK(ndr_push_align(ndr, 4));
3552 78 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3553 78 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3554 : }
3555 78 : if (ndr_flags & NDR_BUFFERS) {
3556 0 : }
3557 78 : return NDR_ERR_SUCCESS;
3558 : }
3559 :
3560 1364 : static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct AuthInfoNone *r)
3561 : {
3562 1364 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3563 1364 : if (ndr_flags & NDR_SCALARS) {
3564 1364 : NDR_CHECK(ndr_pull_align(ndr, 4));
3565 1364 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
3566 1364 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3567 : }
3568 1364 : if (ndr_flags & NDR_BUFFERS) {
3569 0 : }
3570 1364 : return NDR_ERR_SUCCESS;
3571 : }
3572 :
3573 0 : _PUBLIC_ void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r)
3574 : {
3575 0 : ndr_print_struct(ndr, name, "AuthInfoNone");
3576 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3577 0 : ndr->depth++;
3578 0 : ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->size);
3579 0 : ndr->depth--;
3580 : }
3581 :
3582 0 : static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct AuthInfoNT4Owf *r)
3583 : {
3584 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3585 0 : if (ndr_flags & NDR_SCALARS) {
3586 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3587 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16));
3588 0 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password));
3589 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3590 : }
3591 0 : if (ndr_flags & NDR_BUFFERS) {
3592 0 : }
3593 0 : return NDR_ERR_SUCCESS;
3594 : }
3595 :
3596 0 : static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct AuthInfoNT4Owf *r)
3597 : {
3598 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3599 0 : if (ndr_flags & NDR_SCALARS) {
3600 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
3601 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
3602 0 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password));
3603 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3604 : }
3605 0 : if (ndr_flags & NDR_BUFFERS) {
3606 0 : }
3607 0 : return NDR_ERR_SUCCESS;
3608 : }
3609 :
3610 0 : _PUBLIC_ void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r)
3611 : {
3612 0 : ndr_print_struct(ndr, name, "AuthInfoNT4Owf");
3613 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3614 0 : ndr->depth++;
3615 0 : ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?16:r->size);
3616 0 : ndr_print_samr_Password(ndr, "password", &r->password);
3617 0 : ndr->depth--;
3618 : }
3619 :
3620 5428 : static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct AuthInfoClear *r)
3621 : {
3622 5428 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3623 5428 : if (ndr_flags & NDR_SCALARS) {
3624 5428 : NDR_CHECK(ndr_push_align(ndr, 4));
3625 5428 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
3626 5428 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
3627 5428 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3628 : }
3629 5428 : if (ndr_flags & NDR_BUFFERS) {
3630 46 : }
3631 5428 : return NDR_ERR_SUCCESS;
3632 : }
3633 :
3634 5955 : static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct AuthInfoClear *r)
3635 : {
3636 5955 : uint32_t size_password_0 = 0;
3637 5955 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3638 5955 : if (ndr_flags & NDR_SCALARS) {
3639 5955 : NDR_CHECK(ndr_pull_align(ndr, 4));
3640 5955 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
3641 5955 : size_password_0 = r->size;
3642 5955 : NDR_PULL_ALLOC_N(ndr, r->password, size_password_0);
3643 5955 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, size_password_0));
3644 5955 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3645 : }
3646 5955 : if (ndr_flags & NDR_BUFFERS) {
3647 20 : }
3648 5955 : return NDR_ERR_SUCCESS;
3649 : }
3650 :
3651 12 : _PUBLIC_ void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r)
3652 : {
3653 12 : ndr_print_struct(ndr, name, "AuthInfoClear");
3654 12 : if (r == NULL) { ndr_print_null(ndr); return; }
3655 12 : ndr->depth++;
3656 12 : ndr_print_uint32(ndr, "size", r->size);
3657 12 : ndr_print_array_uint8(ndr, "password", r->password, r->size);
3658 12 : ndr->depth--;
3659 : }
3660 :
3661 505 : static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct AuthInfoVersion *r)
3662 : {
3663 505 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3664 505 : if (ndr_flags & NDR_SCALARS) {
3665 505 : NDR_CHECK(ndr_push_align(ndr, 4));
3666 505 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
3667 505 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
3668 505 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3669 : }
3670 505 : if (ndr_flags & NDR_BUFFERS) {
3671 13 : }
3672 505 : return NDR_ERR_SUCCESS;
3673 : }
3674 :
3675 2976 : static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct AuthInfoVersion *r)
3676 : {
3677 2976 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3678 2976 : if (ndr_flags & NDR_SCALARS) {
3679 2976 : NDR_CHECK(ndr_pull_align(ndr, 4));
3680 2976 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
3681 2976 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
3682 2976 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3683 : }
3684 2976 : if (ndr_flags & NDR_BUFFERS) {
3685 4 : }
3686 2976 : return NDR_ERR_SUCCESS;
3687 : }
3688 :
3689 0 : _PUBLIC_ void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r)
3690 : {
3691 0 : ndr_print_struct(ndr, name, "AuthInfoVersion");
3692 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3693 0 : ndr->depth++;
3694 0 : ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->size);
3695 0 : ndr_print_uint32(ndr, "version", r->version);
3696 0 : ndr->depth--;
3697 : }
3698 :
3699 6011 : static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union AuthInfo *r)
3700 : {
3701 59 : uint32_t level;
3702 6011 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3703 6011 : if (ndr_flags & NDR_SCALARS) {
3704 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3705 6011 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3706 6011 : NDR_CHECK(ndr_push_union_align(ndr, 4));
3707 6011 : switch (level) {
3708 78 : case TRUST_AUTH_TYPE_NONE: {
3709 78 : NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
3710 78 : break; }
3711 :
3712 0 : case TRUST_AUTH_TYPE_NT4OWF: {
3713 0 : NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
3714 0 : break; }
3715 :
3716 5428 : case TRUST_AUTH_TYPE_CLEAR: {
3717 5428 : NDR_CHECK(ndr_push_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
3718 5382 : break; }
3719 :
3720 505 : case TRUST_AUTH_TYPE_VERSION: {
3721 505 : NDR_CHECK(ndr_push_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
3722 492 : break; }
3723 :
3724 0 : default:
3725 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3726 : }
3727 : }
3728 6011 : if (ndr_flags & NDR_BUFFERS) {
3729 0 : if (!(ndr_flags & NDR_SCALARS)) {
3730 : /* We didn't get it above, and the token is not needed after this. */
3731 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3732 : }
3733 0 : switch (level) {
3734 0 : case TRUST_AUTH_TYPE_NONE:
3735 0 : break;
3736 :
3737 0 : case TRUST_AUTH_TYPE_NT4OWF:
3738 0 : break;
3739 :
3740 0 : case TRUST_AUTH_TYPE_CLEAR:
3741 0 : break;
3742 :
3743 0 : case TRUST_AUTH_TYPE_VERSION:
3744 0 : break;
3745 :
3746 0 : default:
3747 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3748 : }
3749 : }
3750 5952 : return NDR_ERR_SUCCESS;
3751 : }
3752 :
3753 10295 : static enum ndr_err_code ndr_pull_AuthInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union AuthInfo *r)
3754 : {
3755 24 : uint32_t level;
3756 10295 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3757 10295 : if (ndr_flags & NDR_SCALARS) {
3758 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3759 10295 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3760 10295 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
3761 10295 : switch (level) {
3762 1364 : case TRUST_AUTH_TYPE_NONE: {
3763 1364 : NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
3764 1364 : break; }
3765 :
3766 0 : case TRUST_AUTH_TYPE_NT4OWF: {
3767 0 : NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
3768 0 : break; }
3769 :
3770 5955 : case TRUST_AUTH_TYPE_CLEAR: {
3771 5955 : NDR_CHECK(ndr_pull_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
3772 5935 : break; }
3773 :
3774 2976 : case TRUST_AUTH_TYPE_VERSION: {
3775 2976 : NDR_CHECK(ndr_pull_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
3776 2972 : break; }
3777 :
3778 0 : default:
3779 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3780 : }
3781 : }
3782 10295 : if (ndr_flags & NDR_BUFFERS) {
3783 0 : if (!(ndr_flags & NDR_SCALARS)) {
3784 : /* We didn't get it above, and the token is not needed after this. */
3785 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3786 : }
3787 0 : switch (level) {
3788 0 : case TRUST_AUTH_TYPE_NONE:
3789 0 : break;
3790 :
3791 0 : case TRUST_AUTH_TYPE_NT4OWF:
3792 0 : break;
3793 :
3794 0 : case TRUST_AUTH_TYPE_CLEAR:
3795 0 : break;
3796 :
3797 0 : case TRUST_AUTH_TYPE_VERSION:
3798 0 : break;
3799 :
3800 0 : default:
3801 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3802 : }
3803 : }
3804 10271 : return NDR_ERR_SUCCESS;
3805 : }
3806 :
3807 12 : _PUBLIC_ void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r)
3808 : {
3809 12 : uint32_t level;
3810 12 : level = ndr_print_steal_switch_value(ndr, r);
3811 12 : ndr_print_union(ndr, name, level, "AuthInfo");
3812 12 : switch (level) {
3813 0 : case TRUST_AUTH_TYPE_NONE:
3814 0 : ndr_print_AuthInfoNone(ndr, "none", &r->none);
3815 0 : break;
3816 :
3817 0 : case TRUST_AUTH_TYPE_NT4OWF:
3818 0 : ndr_print_AuthInfoNT4Owf(ndr, "nt4owf", &r->nt4owf);
3819 0 : break;
3820 :
3821 12 : case TRUST_AUTH_TYPE_CLEAR:
3822 12 : ndr_print_AuthInfoClear(ndr, "clear", &r->clear);
3823 12 : break;
3824 :
3825 0 : case TRUST_AUTH_TYPE_VERSION:
3826 0 : ndr_print_AuthInfoVersion(ndr, "version", &r->version);
3827 0 : break;
3828 :
3829 0 : default:
3830 0 : ndr_print_bad_level(ndr, name, level);
3831 : }
3832 12 : }
3833 :
3834 6011 : _PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct AuthenticationInformation *r)
3835 : {
3836 6011 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3837 6011 : if (ndr_flags & NDR_SCALARS) {
3838 6011 : NDR_CHECK(ndr_push_align(ndr, 4));
3839 6011 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->LastUpdateTime));
3840 6011 : NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
3841 6011 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
3842 6011 : NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
3843 : {
3844 6011 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3845 6011 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
3846 6011 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
3847 6011 : ndr->flags = _flags_save_DATA_BLOB;
3848 : }
3849 6011 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3850 : }
3851 6011 : if (ndr_flags & NDR_BUFFERS) {
3852 59 : }
3853 6011 : return NDR_ERR_SUCCESS;
3854 : }
3855 :
3856 10295 : _PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct AuthenticationInformation *r)
3857 : {
3858 10295 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3859 10295 : if (ndr_flags & NDR_SCALARS) {
3860 10295 : NDR_CHECK(ndr_pull_align(ndr, 4));
3861 10295 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->LastUpdateTime));
3862 10295 : NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
3863 10295 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
3864 10295 : NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
3865 : {
3866 10295 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3867 10295 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
3868 10295 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
3869 10295 : ndr->flags = _flags_save_DATA_BLOB;
3870 : }
3871 10295 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3872 : }
3873 10295 : if (ndr_flags & NDR_BUFFERS) {
3874 24 : }
3875 10295 : return NDR_ERR_SUCCESS;
3876 : }
3877 :
3878 0 : static void ndr_print_flags_AuthenticationInformation(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct AuthenticationInformation *r)
3879 : {
3880 0 : ndr_print_AuthenticationInformation(ndr, name, r);
3881 0 : }
3882 :
3883 12 : _PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r)
3884 : {
3885 12 : ndr_print_struct(ndr, name, "AuthenticationInformation");
3886 12 : if (r == NULL) { ndr_print_null(ndr); return; }
3887 12 : ndr->depth++;
3888 12 : ndr_print_NTTIME(ndr, "LastUpdateTime", r->LastUpdateTime);
3889 12 : ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
3890 12 : ndr_print_set_switch_value(ndr, &r->AuthInfo, r->AuthType);
3891 12 : ndr_print_AuthInfo(ndr, "AuthInfo", &r->AuthInfo);
3892 : {
3893 12 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
3894 12 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
3895 12 : ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
3896 12 : ndr->flags = _flags_save_DATA_BLOB;
3897 : }
3898 12 : ndr->depth--;
3899 : }
3900 :
3901 0 : static void ndr_print_flags_AuthenticationInformationArray(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct AuthenticationInformationArray *r)
3902 : {
3903 0 : ndr_print_AuthenticationInformationArray(ndr, name, r);
3904 0 : }
3905 :
3906 16 : _PUBLIC_ void ndr_print_AuthenticationInformationArray(struct ndr_print *ndr, const char *name, const struct AuthenticationInformationArray *r)
3907 : {
3908 16 : uint32_t cntr_array_0;
3909 16 : ndr_print_struct(ndr, name, "AuthenticationInformationArray");
3910 16 : if (r == NULL) { ndr_print_null(ndr); return; }
3911 16 : ndr->depth++;
3912 16 : ndr_print_uint32(ndr, "count", r->count);
3913 16 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
3914 16 : ndr->depth++;
3915 28 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
3916 12 : ndr_print_AuthenticationInformation(ndr, "array", &r->array[cntr_array_0]);
3917 : }
3918 16 : ndr->depth--;
3919 16 : ndr->depth--;
3920 : }
3921 :
3922 3399 : _PUBLIC_ size_t ndr_size_AuthenticationInformationArray(const struct AuthenticationInformationArray *r, libndr_flags flags)
3923 : {
3924 3399 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_AuthenticationInformationArray);
3925 : }
3926 :
3927 3016 : _PUBLIC_ enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct trustAuthInOutBlob *r)
3928 : {
3929 3016 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3930 3016 : if (ndr_flags & NDR_SCALARS) {
3931 3016 : NDR_CHECK(ndr_pull_align(ndr, 4));
3932 3016 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3933 3016 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_offset));
3934 3016 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->previous_offset));
3935 : {
3936 14 : struct ndr_pull *_ndr_current;
3937 3016 : ssize_t sub_size = (r->previous_offset) - (r->current_offset);
3938 3016 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_current, 0, sub_size));
3939 3016 : NDR_CHECK(ndr_pull_AuthenticationInformationArray(_ndr_current, NDR_SCALARS, &r->current));
3940 3016 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_current, 0, sub_size));
3941 : }
3942 : {
3943 3016 : libndr_flags _flags_save_AuthenticationInformationArray = ndr->flags;
3944 3016 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3945 : {
3946 14 : struct ndr_pull *_ndr_previous;
3947 3016 : ssize_t sub_size = -1;
3948 3016 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_previous, 0, sub_size));
3949 3016 : NDR_CHECK(ndr_pull_AuthenticationInformationArray(_ndr_previous, NDR_SCALARS, &r->previous));
3950 3016 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_previous, 0, sub_size));
3951 : }
3952 3016 : ndr->flags = _flags_save_AuthenticationInformationArray;
3953 : }
3954 3016 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3955 : }
3956 3016 : if (ndr_flags & NDR_BUFFERS) {
3957 14 : }
3958 3016 : return NDR_ERR_SUCCESS;
3959 : }
3960 :
3961 0 : static void ndr_print_flags_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct trustAuthInOutBlob *r)
3962 : {
3963 0 : ndr_print_trustAuthInOutBlob(ndr, name, r);
3964 0 : }
3965 :
3966 8 : _PUBLIC_ void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r)
3967 : {
3968 8 : ndr_print_struct(ndr, name, "trustAuthInOutBlob");
3969 8 : if (r == NULL) { ndr_print_null(ndr); return; }
3970 8 : ndr->depth++;
3971 8 : ndr_print_uint32(ndr, "count", r->count);
3972 8 : ndr_print_uint32(ndr, "current_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->count > 0)?12:0:r->current_offset);
3973 8 : ndr_print_uint32(ndr, "previous_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->count > 0)?12 + ndr_size_AuthenticationInformationArray(&r->current, ndr->flags):0:r->previous_offset);
3974 8 : ndr_print_AuthenticationInformationArray(ndr, "current", &r->current);
3975 : {
3976 8 : libndr_flags _flags_save_AuthenticationInformationArray = ndr->flags;
3977 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
3978 8 : ndr_print_AuthenticationInformationArray(ndr, "previous", &r->previous);
3979 8 : ndr->flags = _flags_save_AuthenticationInformationArray;
3980 : }
3981 8 : ndr->depth--;
3982 : }
3983 :
3984 624 : _PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, libndr_flags flags)
3985 : {
3986 624 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob);
3987 : }
3988 :
3989 104 : _PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct trustDomainPasswords *r)
3990 : {
3991 104 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3992 104 : if (ndr_flags & NDR_SCALARS) {
3993 104 : NDR_CHECK(ndr_push_align(ndr, 4));
3994 104 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512));
3995 : {
3996 0 : struct ndr_push *_ndr_outgoing;
3997 104 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustAuthInOutBlob(&r->outgoing, ndr->flags)));
3998 104 : NDR_CHECK(ndr_push_trustAuthInOutBlob(_ndr_outgoing, NDR_SCALARS, &r->outgoing));
3999 104 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustAuthInOutBlob(&r->outgoing, ndr->flags)));
4000 : }
4001 : {
4002 0 : struct ndr_push *_ndr_incoming;
4003 104 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustAuthInOutBlob(&r->incoming, ndr->flags)));
4004 104 : NDR_CHECK(ndr_push_trustAuthInOutBlob(_ndr_incoming, NDR_SCALARS, &r->incoming));
4005 104 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustAuthInOutBlob(&r->incoming, ndr->flags)));
4006 : }
4007 104 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustAuthInOutBlob(&r->outgoing, ndr->flags)));
4008 104 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustAuthInOutBlob(&r->incoming, ndr->flags)));
4009 104 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4010 : }
4011 104 : if (ndr_flags & NDR_BUFFERS) {
4012 0 : }
4013 104 : return NDR_ERR_SUCCESS;
4014 : }
4015 :
4016 0 : static void ndr_print_flags_trustDomainPasswords(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct trustDomainPasswords *r)
4017 : {
4018 0 : ndr_print_trustDomainPasswords(ndr, name, r);
4019 0 : }
4020 :
4021 2 : _PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r)
4022 : {
4023 2 : ndr_print_struct(ndr, name, "trustDomainPasswords");
4024 2 : if (r == NULL) { ndr_print_null(ndr); return; }
4025 2 : ndr->depth++;
4026 2 : ndr_print_array_uint8(ndr, "confounder", r->confounder, 512);
4027 2 : ndr_print_trustAuthInOutBlob(ndr, "outgoing", &r->outgoing);
4028 2 : ndr_print_trustAuthInOutBlob(ndr, "incoming", &r->incoming);
4029 2 : ndr_print_uint32(ndr, "outgoing_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustAuthInOutBlob(&r->outgoing, ndr->flags):r->outgoing_size);
4030 2 : ndr_print_uint32(ndr, "incoming_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustAuthInOutBlob(&r->incoming, ndr->flags):r->incoming_size);
4031 2 : ndr->depth--;
4032 : }
4033 :
4034 0 : _PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DsCompressedChunk *r)
4035 : {
4036 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4037 0 : if (ndr_flags & NDR_SCALARS) {
4038 0 : NDR_CHECK(ndr_push_align(ndr, 4));
4039 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
4040 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
4041 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4042 : }
4043 0 : if (ndr_flags & NDR_BUFFERS) {
4044 0 : }
4045 0 : return NDR_ERR_SUCCESS;
4046 : }
4047 :
4048 0 : _PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DsCompressedChunk *r)
4049 : {
4050 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4051 0 : if (ndr_flags & NDR_SCALARS) {
4052 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
4053 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
4054 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
4055 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4056 : }
4057 0 : if (ndr_flags & NDR_BUFFERS) {
4058 0 : }
4059 0 : return NDR_ERR_SUCCESS;
4060 : }
4061 :
4062 0 : static void ndr_print_flags_DsCompressedChunk(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct DsCompressedChunk *r)
4063 : {
4064 0 : ndr_print_DsCompressedChunk(ndr, name, r);
4065 0 : }
4066 :
4067 0 : _PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
4068 : {
4069 0 : ndr_print_struct(ndr, name, "DsCompressedChunk");
4070 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4071 0 : ndr->depth++;
4072 0 : ndr_print_uint32(ndr, "marker", r->marker);
4073 0 : ndr_print_DATA_BLOB(ndr, "data", r->data);
4074 0 : ndr->depth--;
4075 : }
4076 :
4077 0 : static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ExtendedErrorAString *r)
4078 : {
4079 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4080 0 : if (ndr_flags & NDR_SCALARS) {
4081 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4082 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
4083 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
4084 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4085 : }
4086 0 : if (ndr_flags & NDR_BUFFERS) {
4087 0 : if (r->string) {
4088 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->__size));
4089 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint8_t), CH_DOS));
4090 : }
4091 : }
4092 0 : return NDR_ERR_SUCCESS;
4093 : }
4094 :
4095 0 : static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ExtendedErrorAString *r)
4096 : {
4097 0 : uint32_t _ptr_string;
4098 0 : uint32_t size_string_1 = 0;
4099 0 : TALLOC_CTX *_mem_save_string_0 = NULL;
4100 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4101 0 : if (ndr_flags & NDR_SCALARS) {
4102 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4103 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
4104 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
4105 0 : if (_ptr_string) {
4106 0 : NDR_PULL_ALLOC(ndr, r->string);
4107 : } else {
4108 0 : r->string = NULL;
4109 : }
4110 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4111 : }
4112 0 : if (ndr_flags & NDR_BUFFERS) {
4113 0 : if (r->string) {
4114 0 : _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
4115 0 : NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
4116 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
4117 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->string, &size_string_1));
4118 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, size_string_1, sizeof(uint8_t), CH_DOS));
4119 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
4120 : }
4121 0 : if (r->string) {
4122 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->string, r->__size));
4123 : }
4124 : }
4125 0 : return NDR_ERR_SUCCESS;
4126 : }
4127 :
4128 0 : _PUBLIC_ void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r)
4129 : {
4130 0 : ndr_print_struct(ndr, name, "ExtendedErrorAString");
4131 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4132 0 : ndr->depth++;
4133 0 : ndr_print_uint16(ndr, "__size", r->__size);
4134 0 : ndr_print_ptr(ndr, "string", r->string);
4135 0 : ndr->depth++;
4136 0 : if (r->string) {
4137 0 : ndr_print_string(ndr, "string", r->string);
4138 : }
4139 0 : ndr->depth--;
4140 0 : ndr->depth--;
4141 : }
4142 :
4143 0 : static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ExtendedErrorUString *r)
4144 : {
4145 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4146 0 : if (ndr_flags & NDR_SCALARS) {
4147 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4148 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
4149 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
4150 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4151 : }
4152 0 : if (ndr_flags & NDR_BUFFERS) {
4153 0 : if (r->string) {
4154 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->__size));
4155 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint16_t), CH_UTF16));
4156 : }
4157 : }
4158 0 : return NDR_ERR_SUCCESS;
4159 : }
4160 :
4161 0 : static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ExtendedErrorUString *r)
4162 : {
4163 0 : uint32_t _ptr_string;
4164 0 : uint32_t size_string_1 = 0;
4165 0 : TALLOC_CTX *_mem_save_string_0 = NULL;
4166 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4167 0 : if (ndr_flags & NDR_SCALARS) {
4168 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4169 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
4170 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
4171 0 : if (_ptr_string) {
4172 0 : NDR_PULL_ALLOC(ndr, r->string);
4173 : } else {
4174 0 : r->string = NULL;
4175 : }
4176 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4177 : }
4178 0 : if (ndr_flags & NDR_BUFFERS) {
4179 0 : if (r->string) {
4180 0 : _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
4181 0 : NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
4182 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
4183 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->string, &size_string_1));
4184 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, size_string_1, sizeof(uint16_t), CH_UTF16));
4185 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
4186 : }
4187 0 : if (r->string) {
4188 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->string, r->__size));
4189 : }
4190 : }
4191 0 : return NDR_ERR_SUCCESS;
4192 : }
4193 :
4194 0 : _PUBLIC_ void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r)
4195 : {
4196 0 : ndr_print_struct(ndr, name, "ExtendedErrorUString");
4197 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4198 0 : ndr->depth++;
4199 0 : ndr_print_uint16(ndr, "__size", r->__size);
4200 0 : ndr_print_ptr(ndr, "string", r->string);
4201 0 : ndr->depth++;
4202 0 : if (r->string) {
4203 0 : ndr_print_string(ndr, "string", r->string);
4204 : }
4205 0 : ndr->depth--;
4206 0 : ndr->depth--;
4207 : }
4208 :
4209 0 : static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ExtendedErrorBlob *r)
4210 : {
4211 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4212 0 : if (ndr_flags & NDR_SCALARS) {
4213 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4214 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
4215 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
4216 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4217 : }
4218 0 : if (ndr_flags & NDR_BUFFERS) {
4219 0 : if (r->data) {
4220 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
4221 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
4222 : }
4223 : }
4224 0 : return NDR_ERR_SUCCESS;
4225 : }
4226 :
4227 0 : static enum ndr_err_code ndr_pull_ExtendedErrorBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ExtendedErrorBlob *r)
4228 : {
4229 0 : uint32_t _ptr_data;
4230 0 : uint32_t size_data_1 = 0;
4231 0 : TALLOC_CTX *_mem_save_data_0 = NULL;
4232 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4233 0 : if (ndr_flags & NDR_SCALARS) {
4234 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4235 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
4236 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
4237 0 : if (_ptr_data) {
4238 0 : NDR_PULL_ALLOC(ndr, r->data);
4239 : } else {
4240 0 : r->data = NULL;
4241 : }
4242 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4243 : }
4244 0 : if (ndr_flags & NDR_BUFFERS) {
4245 0 : if (r->data) {
4246 0 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
4247 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
4248 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
4249 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
4250 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
4251 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
4252 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
4253 : }
4254 0 : if (r->data) {
4255 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
4256 : }
4257 : }
4258 0 : return NDR_ERR_SUCCESS;
4259 : }
4260 :
4261 0 : _PUBLIC_ void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r)
4262 : {
4263 0 : ndr_print_struct(ndr, name, "ExtendedErrorBlob");
4264 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4265 0 : ndr->depth++;
4266 0 : ndr_print_uint16(ndr, "length", r->length);
4267 0 : ndr_print_ptr(ndr, "data", r->data);
4268 0 : ndr->depth++;
4269 0 : if (r->data) {
4270 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
4271 : }
4272 0 : ndr->depth--;
4273 0 : ndr->depth--;
4274 : }
4275 :
4276 0 : static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum ExtendedErrorComputerNamePresent r)
4277 : {
4278 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
4279 0 : return NDR_ERR_SUCCESS;
4280 : }
4281 :
4282 0 : static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum ExtendedErrorComputerNamePresent *r)
4283 : {
4284 0 : uint16_t v;
4285 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
4286 0 : *r = v;
4287 0 : return NDR_ERR_SUCCESS;
4288 : }
4289 :
4290 0 : _PUBLIC_ void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r)
4291 : {
4292 0 : const char *val = NULL;
4293 :
4294 0 : switch (r) {
4295 0 : case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break;
4296 0 : case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break;
4297 : }
4298 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
4299 0 : }
4300 :
4301 0 : static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union ExtendedErrorComputerNameU *r)
4302 : {
4303 0 : uint32_t level;
4304 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4305 0 : if (ndr_flags & NDR_SCALARS) {
4306 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4307 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4308 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4309 0 : NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level));
4310 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4311 0 : switch (level) {
4312 0 : case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
4313 0 : NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
4314 0 : break; }
4315 :
4316 0 : case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
4317 0 : break; }
4318 :
4319 0 : default:
4320 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4321 : }
4322 : }
4323 0 : if (ndr_flags & NDR_BUFFERS) {
4324 0 : if (!(ndr_flags & NDR_SCALARS)) {
4325 : /* We didn't get it above, and the token is not needed after this. */
4326 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4327 : }
4328 0 : switch (level) {
4329 0 : case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
4330 0 : NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
4331 0 : break;
4332 :
4333 0 : case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
4334 0 : break;
4335 :
4336 0 : default:
4337 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4338 : }
4339 : }
4340 0 : return NDR_ERR_SUCCESS;
4341 : }
4342 :
4343 0 : static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union ExtendedErrorComputerNameU *r)
4344 : {
4345 0 : uint32_t level;
4346 0 : uint16_t _level;
4347 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4348 0 : if (ndr_flags & NDR_SCALARS) {
4349 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4350 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4351 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4352 0 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
4353 0 : if (_level != level) {
4354 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
4355 : }
4356 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4357 0 : switch (level) {
4358 0 : case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
4359 0 : NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
4360 0 : break; }
4361 :
4362 0 : case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
4363 0 : break; }
4364 :
4365 0 : default:
4366 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4367 : }
4368 : }
4369 0 : if (ndr_flags & NDR_BUFFERS) {
4370 0 : if (!(ndr_flags & NDR_SCALARS)) {
4371 : /* We didn't get it above, and the token is not needed after this. */
4372 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4373 : }
4374 0 : switch (level) {
4375 0 : case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
4376 0 : NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
4377 0 : break;
4378 :
4379 0 : case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
4380 0 : break;
4381 :
4382 0 : default:
4383 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4384 : }
4385 : }
4386 0 : return NDR_ERR_SUCCESS;
4387 : }
4388 :
4389 0 : _PUBLIC_ void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r)
4390 : {
4391 0 : uint32_t level;
4392 0 : level = ndr_print_steal_switch_value(ndr, r);
4393 0 : ndr_print_union(ndr, name, level, "ExtendedErrorComputerNameU");
4394 0 : switch (level) {
4395 0 : case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
4396 0 : ndr_print_ExtendedErrorUString(ndr, "name", &r->name);
4397 0 : break;
4398 :
4399 0 : case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
4400 0 : break;
4401 :
4402 0 : default:
4403 0 : ndr_print_bad_level(ndr, name, level);
4404 : }
4405 0 : }
4406 :
4407 0 : static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ExtendedErrorComputerName *r)
4408 : {
4409 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4410 0 : if (ndr_flags & NDR_SCALARS) {
4411 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4412 0 : NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present));
4413 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present));
4414 0 : NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
4415 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4416 : }
4417 0 : if (ndr_flags & NDR_BUFFERS) {
4418 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present));
4419 0 : NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
4420 : }
4421 0 : return NDR_ERR_SUCCESS;
4422 : }
4423 :
4424 0 : static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ExtendedErrorComputerName *r)
4425 : {
4426 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4427 0 : if (ndr_flags & NDR_SCALARS) {
4428 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4429 0 : NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present));
4430 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present));
4431 0 : NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
4432 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4433 : }
4434 0 : if (ndr_flags & NDR_BUFFERS) {
4435 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present));
4436 0 : NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
4437 : }
4438 0 : return NDR_ERR_SUCCESS;
4439 : }
4440 :
4441 0 : _PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r)
4442 : {
4443 0 : ndr_print_struct(ndr, name, "ExtendedErrorComputerName");
4444 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4445 0 : ndr->depth++;
4446 0 : ndr_print_ExtendedErrorComputerNamePresent(ndr, "present", r->present);
4447 0 : ndr_print_set_switch_value(ndr, &r->n, r->present);
4448 0 : ndr_print_ExtendedErrorComputerNameU(ndr, "n", &r->n);
4449 0 : ndr->depth--;
4450 : }
4451 :
4452 0 : static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum ExtendedErrorParamType r)
4453 : {
4454 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
4455 0 : return NDR_ERR_SUCCESS;
4456 : }
4457 :
4458 0 : static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum ExtendedErrorParamType *r)
4459 : {
4460 0 : uint16_t v;
4461 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
4462 0 : *r = v;
4463 0 : return NDR_ERR_SUCCESS;
4464 : }
4465 :
4466 0 : _PUBLIC_ void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r)
4467 : {
4468 0 : const char *val = NULL;
4469 :
4470 0 : switch (r) {
4471 0 : case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break;
4472 0 : case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break;
4473 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT32: val = "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break;
4474 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT16: val = "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break;
4475 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT64: val = "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break;
4476 0 : case EXTENDED_ERROR_PARAM_TYPE_NONE: val = "EXTENDED_ERROR_PARAM_TYPE_NONE"; break;
4477 0 : case EXTENDED_ERROR_PARAM_TYPE_BLOB: val = "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break;
4478 : }
4479 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
4480 0 : }
4481 :
4482 0 : static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union ExtendedErrorParamU *r)
4483 : {
4484 0 : uint32_t level;
4485 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4486 0 : if (ndr_flags & NDR_SCALARS) {
4487 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4488 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4489 0 : NDR_CHECK(ndr_push_union_align(ndr, 8));
4490 0 : NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level));
4491 0 : NDR_CHECK(ndr_push_union_align(ndr, 8));
4492 0 : switch (level) {
4493 0 : case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
4494 0 : NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
4495 0 : break; }
4496 :
4497 0 : case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
4498 0 : NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
4499 0 : break; }
4500 :
4501 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
4502 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32));
4503 0 : break; }
4504 :
4505 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
4506 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->uint16));
4507 0 : break; }
4508 :
4509 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
4510 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64));
4511 0 : break; }
4512 :
4513 0 : case EXTENDED_ERROR_PARAM_TYPE_NONE: {
4514 0 : break; }
4515 :
4516 0 : case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
4517 0 : NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
4518 0 : break; }
4519 :
4520 0 : default:
4521 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4522 : }
4523 : }
4524 0 : if (ndr_flags & NDR_BUFFERS) {
4525 0 : if (!(ndr_flags & NDR_SCALARS)) {
4526 : /* We didn't get it above, and the token is not needed after this. */
4527 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4528 : }
4529 0 : switch (level) {
4530 0 : case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
4531 0 : NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
4532 0 : break;
4533 :
4534 0 : case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
4535 0 : NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
4536 0 : break;
4537 :
4538 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT32:
4539 0 : break;
4540 :
4541 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT16:
4542 0 : break;
4543 :
4544 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT64:
4545 0 : break;
4546 :
4547 0 : case EXTENDED_ERROR_PARAM_TYPE_NONE:
4548 0 : break;
4549 :
4550 0 : case EXTENDED_ERROR_PARAM_TYPE_BLOB:
4551 0 : NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
4552 0 : break;
4553 :
4554 0 : default:
4555 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4556 : }
4557 : }
4558 0 : return NDR_ERR_SUCCESS;
4559 : }
4560 :
4561 0 : static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union ExtendedErrorParamU *r)
4562 : {
4563 0 : uint32_t level;
4564 0 : uint16_t _level;
4565 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4566 0 : if (ndr_flags & NDR_SCALARS) {
4567 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4568 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4569 0 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
4570 0 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
4571 0 : if (_level != level) {
4572 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
4573 : }
4574 0 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
4575 0 : switch (level) {
4576 0 : case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
4577 0 : NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
4578 0 : break; }
4579 :
4580 0 : case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
4581 0 : NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
4582 0 : break; }
4583 :
4584 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
4585 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32));
4586 0 : break; }
4587 :
4588 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
4589 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->uint16));
4590 0 : break; }
4591 :
4592 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
4593 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64));
4594 0 : break; }
4595 :
4596 0 : case EXTENDED_ERROR_PARAM_TYPE_NONE: {
4597 0 : break; }
4598 :
4599 0 : case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
4600 0 : NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
4601 0 : break; }
4602 :
4603 0 : default:
4604 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4605 : }
4606 : }
4607 0 : if (ndr_flags & NDR_BUFFERS) {
4608 0 : if (!(ndr_flags & NDR_SCALARS)) {
4609 : /* We didn't get it above, and the token is not needed after this. */
4610 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4611 : }
4612 0 : switch (level) {
4613 0 : case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
4614 0 : NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
4615 0 : break;
4616 :
4617 0 : case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
4618 0 : NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
4619 0 : break;
4620 :
4621 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT32:
4622 0 : break;
4623 :
4624 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT16:
4625 0 : break;
4626 :
4627 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT64:
4628 0 : break;
4629 :
4630 0 : case EXTENDED_ERROR_PARAM_TYPE_NONE:
4631 0 : break;
4632 :
4633 0 : case EXTENDED_ERROR_PARAM_TYPE_BLOB:
4634 0 : NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
4635 0 : break;
4636 :
4637 0 : default:
4638 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4639 : }
4640 : }
4641 0 : return NDR_ERR_SUCCESS;
4642 : }
4643 :
4644 0 : _PUBLIC_ void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r)
4645 : {
4646 0 : uint32_t level;
4647 0 : level = ndr_print_steal_switch_value(ndr, r);
4648 0 : ndr_print_union(ndr, name, level, "ExtendedErrorParamU");
4649 0 : switch (level) {
4650 0 : case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
4651 0 : ndr_print_ExtendedErrorAString(ndr, "a_string", &r->a_string);
4652 0 : break;
4653 :
4654 0 : case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
4655 0 : ndr_print_ExtendedErrorUString(ndr, "u_string", &r->u_string);
4656 0 : break;
4657 :
4658 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT32:
4659 0 : ndr_print_uint32(ndr, "uint32", r->uint32);
4660 0 : break;
4661 :
4662 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT16:
4663 0 : ndr_print_uint16(ndr, "uint16", r->uint16);
4664 0 : break;
4665 :
4666 0 : case EXTENDED_ERROR_PARAM_TYPE_UINT64:
4667 0 : ndr_print_hyper(ndr, "uint64", r->uint64);
4668 0 : break;
4669 :
4670 0 : case EXTENDED_ERROR_PARAM_TYPE_NONE:
4671 0 : break;
4672 :
4673 0 : case EXTENDED_ERROR_PARAM_TYPE_BLOB:
4674 0 : ndr_print_ExtendedErrorBlob(ndr, "blob", &r->blob);
4675 0 : break;
4676 :
4677 0 : default:
4678 0 : ndr_print_bad_level(ndr, name, level);
4679 : }
4680 0 : }
4681 :
4682 0 : static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ExtendedErrorParam *r)
4683 : {
4684 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4685 0 : if (ndr_flags & NDR_SCALARS) {
4686 0 : NDR_CHECK(ndr_push_align(ndr, 8));
4687 0 : NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type));
4688 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
4689 0 : NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
4690 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
4691 : }
4692 0 : if (ndr_flags & NDR_BUFFERS) {
4693 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
4694 0 : NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
4695 : }
4696 0 : return NDR_ERR_SUCCESS;
4697 : }
4698 :
4699 0 : static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ExtendedErrorParam *r)
4700 : {
4701 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4702 0 : if (ndr_flags & NDR_SCALARS) {
4703 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
4704 0 : NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type));
4705 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type));
4706 0 : NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
4707 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
4708 : }
4709 0 : if (ndr_flags & NDR_BUFFERS) {
4710 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type));
4711 0 : NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
4712 : }
4713 0 : return NDR_ERR_SUCCESS;
4714 : }
4715 :
4716 0 : _PUBLIC_ void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r)
4717 : {
4718 0 : ndr_print_struct(ndr, name, "ExtendedErrorParam");
4719 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4720 0 : ndr->depth++;
4721 0 : ndr_print_ExtendedErrorParamType(ndr, "type", r->type);
4722 0 : ndr_print_set_switch_value(ndr, &r->p, r->type);
4723 0 : ndr_print_ExtendedErrorParamU(ndr, "p", &r->p);
4724 0 : ndr->depth--;
4725 : }
4726 :
4727 0 : _PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ExtendedErrorInfo *r)
4728 : {
4729 0 : uint32_t cntr_params_0;
4730 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4731 0 : if (ndr_flags & NDR_SCALARS) {
4732 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_params));
4733 0 : NDR_CHECK(ndr_push_align(ndr, 8));
4734 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
4735 0 : NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
4736 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pid));
4737 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
4738 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->generating_component));
4739 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
4740 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->detection_location));
4741 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
4742 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_params));
4743 0 : for (cntr_params_0 = 0; cntr_params_0 < (r->num_params); cntr_params_0++) {
4744 0 : NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
4745 : }
4746 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
4747 : }
4748 0 : if (ndr_flags & NDR_BUFFERS) {
4749 0 : if (r->next) {
4750 0 : NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
4751 : }
4752 0 : NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
4753 0 : for (cntr_params_0 = 0; cntr_params_0 < (r->num_params); cntr_params_0++) {
4754 0 : NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
4755 : }
4756 : }
4757 0 : return NDR_ERR_SUCCESS;
4758 : }
4759 :
4760 0 : _PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ExtendedErrorInfo *r)
4761 : {
4762 0 : uint32_t _ptr_next;
4763 0 : TALLOC_CTX *_mem_save_next_0 = NULL;
4764 0 : uint32_t size_params_0 = 0;
4765 0 : uint32_t cntr_params_0;
4766 0 : TALLOC_CTX *_mem_save_params_0 = NULL;
4767 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4768 0 : if (ndr_flags & NDR_SCALARS) {
4769 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->params));
4770 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
4771 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
4772 0 : if (_ptr_next) {
4773 0 : NDR_PULL_ALLOC(ndr, r->next);
4774 : } else {
4775 0 : r->next = NULL;
4776 : }
4777 0 : NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
4778 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pid));
4779 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
4780 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->generating_component));
4781 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
4782 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->detection_location));
4783 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
4784 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_params));
4785 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->params, &size_params_0));
4786 0 : NDR_PULL_ALLOC_N(ndr, r->params, size_params_0);
4787 0 : _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
4788 0 : NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
4789 0 : for (cntr_params_0 = 0; cntr_params_0 < (size_params_0); cntr_params_0++) {
4790 0 : NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
4791 : }
4792 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
4793 0 : if (r->params) {
4794 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params));
4795 : }
4796 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
4797 : }
4798 0 : if (ndr_flags & NDR_BUFFERS) {
4799 0 : if (r->next) {
4800 0 : _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
4801 0 : NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
4802 0 : NDR_RECURSION_CHECK(ndr, 20000);
4803 0 : NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
4804 0 : NDR_RECURSION_UNWIND(ndr);
4805 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
4806 : }
4807 0 : NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
4808 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->params, &size_params_0));
4809 0 : _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
4810 0 : NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
4811 0 : for (cntr_params_0 = 0; cntr_params_0 < (size_params_0); cntr_params_0++) {
4812 0 : NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
4813 : }
4814 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
4815 0 : for (cntr_params_0 = 0; cntr_params_0 < (size_params_0); cntr_params_0++) {
4816 : }
4817 : }
4818 0 : return NDR_ERR_SUCCESS;
4819 : }
4820 :
4821 0 : static void ndr_print_flags_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ExtendedErrorInfo *r)
4822 : {
4823 0 : ndr_print_ExtendedErrorInfo(ndr, name, r);
4824 0 : }
4825 :
4826 0 : _PUBLIC_ void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r)
4827 : {
4828 0 : uint32_t cntr_params_0;
4829 0 : ndr_print_struct(ndr, name, "ExtendedErrorInfo");
4830 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4831 0 : ndr->depth++;
4832 0 : ndr_print_ptr(ndr, "next", r->next);
4833 0 : ndr->depth++;
4834 0 : if (r->next) {
4835 0 : ndr_print_ExtendedErrorInfo(ndr, "next", r->next);
4836 : }
4837 0 : ndr->depth--;
4838 0 : ndr_print_ExtendedErrorComputerName(ndr, "computer_name", &r->computer_name);
4839 0 : ndr_print_hyper(ndr, "pid", r->pid);
4840 0 : ndr_print_NTTIME(ndr, "time", r->time);
4841 0 : ndr_print_uint32(ndr, "generating_component", r->generating_component);
4842 0 : ndr_print_WERROR(ndr, "status", r->status);
4843 0 : ndr_print_uint16(ndr, "detection_location", r->detection_location);
4844 0 : ndr_print_uint16(ndr, "flags", r->flags);
4845 0 : ndr_print_uint16(ndr, "num_params", r->num_params);
4846 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "params", (uint32_t)(r->num_params));
4847 0 : ndr->depth++;
4848 0 : for (cntr_params_0 = 0; cntr_params_0 < (r->num_params); cntr_params_0++) {
4849 0 : ndr_print_ExtendedErrorParam(ndr, "params", &r->params[cntr_params_0]);
4850 : }
4851 0 : ndr->depth--;
4852 0 : ndr->depth--;
4853 : }
4854 :
4855 1122 : static enum ndr_err_code ndr_push_ForestTrustString(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ForestTrustString *r)
4856 : {
4857 1122 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4858 1122 : if (ndr_flags & NDR_SCALARS) {
4859 1122 : NDR_CHECK(ndr_push_align(ndr, 4));
4860 1122 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string)));
4861 1122 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_UTF8));
4862 1122 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4863 : }
4864 1122 : if (ndr_flags & NDR_BUFFERS) {
4865 0 : }
4866 1122 : return NDR_ERR_SUCCESS;
4867 : }
4868 :
4869 9911 : static enum ndr_err_code ndr_pull_ForestTrustString(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ForestTrustString *r)
4870 : {
4871 9911 : uint32_t size_string_0 = 0;
4872 9911 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4873 9911 : if (ndr_flags & NDR_SCALARS) {
4874 9911 : NDR_CHECK(ndr_pull_align(ndr, 4));
4875 9911 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
4876 9911 : size_string_0 = r->size;
4877 9911 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, size_string_0, sizeof(uint8_t), CH_UTF8));
4878 9911 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4879 : }
4880 9911 : if (ndr_flags & NDR_BUFFERS) {
4881 6 : }
4882 9911 : return NDR_ERR_SUCCESS;
4883 : }
4884 :
4885 6 : _PUBLIC_ void ndr_print_ForestTrustString(struct ndr_print *ndr, const char *name, const struct ForestTrustString *r)
4886 : {
4887 6 : ndr_print_struct(ndr, name, "ForestTrustString");
4888 6 : if (r == NULL) { ndr_print_null(ndr); return; }
4889 6 : ndr->depth++;
4890 6 : ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->size);
4891 6 : ndr_print_string(ndr, "string", r->string);
4892 6 : ndr->depth--;
4893 : }
4894 :
4895 158 : static enum ndr_err_code ndr_push_ForestTrustDataDomainInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ForestTrustDataDomainInfo *r)
4896 : {
4897 : {
4898 158 : libndr_flags _flags_save_STRUCT = ndr->flags;
4899 158 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
4900 158 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4901 158 : if (ndr_flags & NDR_SCALARS) {
4902 158 : NDR_CHECK(ndr_push_align(ndr, 4));
4903 158 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->sid, ndr->flags)));
4904 : {
4905 0 : struct ndr_push *_ndr_sid;
4906 158 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
4907 158 : NDR_CHECK(ndr_push_dom_sid(_ndr_sid, NDR_SCALARS, &r->sid));
4908 158 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
4909 : }
4910 158 : NDR_CHECK(ndr_push_ForestTrustString(ndr, NDR_SCALARS, &r->dns_name));
4911 158 : NDR_CHECK(ndr_push_ForestTrustString(ndr, NDR_SCALARS, &r->netbios_name));
4912 158 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4913 : }
4914 158 : if (ndr_flags & NDR_BUFFERS) {
4915 0 : }
4916 158 : ndr->flags = _flags_save_STRUCT;
4917 : }
4918 158 : return NDR_ERR_SUCCESS;
4919 : }
4920 :
4921 1885 : static enum ndr_err_code ndr_pull_ForestTrustDataDomainInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ForestTrustDataDomainInfo *r)
4922 : {
4923 : {
4924 1885 : libndr_flags _flags_save_STRUCT = ndr->flags;
4925 1885 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
4926 1885 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4927 1885 : if (ndr_flags & NDR_SCALARS) {
4928 1885 : NDR_CHECK(ndr_pull_align(ndr, 4));
4929 1885 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_size));
4930 : {
4931 2 : struct ndr_pull *_ndr_sid;
4932 1885 : ssize_t sub_size = r->sid_size;
4933 1885 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sid, 0, sub_size));
4934 1885 : NDR_CHECK(ndr_pull_dom_sid(_ndr_sid, NDR_SCALARS, &r->sid));
4935 1885 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sid, 0, sub_size));
4936 : }
4937 1885 : NDR_CHECK(ndr_pull_ForestTrustString(ndr, NDR_SCALARS, &r->dns_name));
4938 1885 : NDR_CHECK(ndr_pull_ForestTrustString(ndr, NDR_SCALARS, &r->netbios_name));
4939 1885 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4940 : }
4941 1885 : if (ndr_flags & NDR_BUFFERS) {
4942 2 : }
4943 1885 : ndr->flags = _flags_save_STRUCT;
4944 : }
4945 1885 : return NDR_ERR_SUCCESS;
4946 : }
4947 :
4948 2 : _PUBLIC_ void ndr_print_ForestTrustDataDomainInfo(struct ndr_print *ndr, const char *name, const struct ForestTrustDataDomainInfo *r)
4949 : {
4950 2 : ndr_print_struct(ndr, name, "ForestTrustDataDomainInfo");
4951 2 : if (r == NULL) { ndr_print_null(ndr); return; }
4952 : {
4953 2 : libndr_flags _flags_save_STRUCT = ndr->flags;
4954 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
4955 2 : ndr->depth++;
4956 2 : ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size);
4957 2 : ndr_print_dom_sid(ndr, "sid", &r->sid);
4958 2 : ndr_print_ForestTrustString(ndr, "dns_name", &r->dns_name);
4959 2 : ndr_print_ForestTrustString(ndr, "netbios_name", &r->netbios_name);
4960 2 : ndr->depth--;
4961 2 : ndr->flags = _flags_save_STRUCT;
4962 : }
4963 : }
4964 :
4965 0 : static enum ndr_err_code ndr_push_ForestTrustDataBinaryData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ForestTrustDataBinaryData *r)
4966 : {
4967 : {
4968 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
4969 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
4970 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4971 0 : if (ndr_flags & NDR_SCALARS) {
4972 0 : NDR_CHECK(ndr_push_align(ndr, 4));
4973 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
4974 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->size));
4975 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4976 : }
4977 0 : if (ndr_flags & NDR_BUFFERS) {
4978 0 : }
4979 0 : ndr->flags = _flags_save_STRUCT;
4980 : }
4981 0 : return NDR_ERR_SUCCESS;
4982 : }
4983 :
4984 0 : static enum ndr_err_code ndr_pull_ForestTrustDataBinaryData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ForestTrustDataBinaryData *r)
4985 : {
4986 0 : uint32_t size_data_0 = 0;
4987 : {
4988 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
4989 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
4990 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4991 0 : if (ndr_flags & NDR_SCALARS) {
4992 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
4993 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
4994 0 : size_data_0 = r->size;
4995 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_0);
4996 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
4997 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4998 : }
4999 0 : if (ndr_flags & NDR_BUFFERS) {
5000 0 : }
5001 0 : ndr->flags = _flags_save_STRUCT;
5002 : }
5003 0 : return NDR_ERR_SUCCESS;
5004 : }
5005 :
5006 0 : _PUBLIC_ void ndr_print_ForestTrustDataBinaryData(struct ndr_print *ndr, const char *name, const struct ForestTrustDataBinaryData *r)
5007 : {
5008 0 : ndr_print_struct(ndr, name, "ForestTrustDataBinaryData");
5009 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5010 : {
5011 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
5012 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
5013 0 : ndr->depth++;
5014 0 : ndr_print_uint32(ndr, "size", r->size);
5015 0 : ndr_print_array_uint8(ndr, "data", r->data, r->size);
5016 0 : ndr->depth--;
5017 0 : ndr->flags = _flags_save_STRUCT;
5018 : }
5019 : }
5020 :
5021 964 : static enum ndr_err_code ndr_push_ForestTrustData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union ForestTrustData *r)
5022 : {
5023 0 : uint32_t level;
5024 964 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5025 964 : if (ndr_flags & NDR_SCALARS) {
5026 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5027 964 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5028 964 : NDR_CHECK(ndr_push_union_align(ndr, 4));
5029 964 : switch (level) {
5030 774 : case FOREST_TRUST_TOP_LEVEL_NAME: {
5031 774 : NDR_CHECK(ndr_push_ForestTrustString(ndr, NDR_SCALARS, &r->name));
5032 774 : break; }
5033 :
5034 32 : case FOREST_TRUST_TOP_LEVEL_NAME_EX: {
5035 32 : NDR_CHECK(ndr_push_ForestTrustString(ndr, NDR_SCALARS, &r->name));
5036 32 : break; }
5037 :
5038 158 : case FOREST_TRUST_DOMAIN_INFO: {
5039 158 : NDR_CHECK(ndr_push_ForestTrustDataDomainInfo(ndr, NDR_SCALARS, &r->info));
5040 158 : break; }
5041 :
5042 0 : default: {
5043 0 : NDR_CHECK(ndr_push_ForestTrustDataBinaryData(ndr, NDR_SCALARS, &r->data));
5044 0 : break; }
5045 :
5046 : }
5047 : }
5048 964 : return NDR_ERR_SUCCESS;
5049 : }
5050 :
5051 8026 : static enum ndr_err_code ndr_pull_ForestTrustData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union ForestTrustData *r)
5052 : {
5053 4 : uint32_t level;
5054 8026 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5055 8026 : if (ndr_flags & NDR_SCALARS) {
5056 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5057 8026 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5058 8026 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
5059 8026 : switch (level) {
5060 6089 : case FOREST_TRUST_TOP_LEVEL_NAME: {
5061 6089 : NDR_CHECK(ndr_pull_ForestTrustString(ndr, NDR_SCALARS, &r->name));
5062 6087 : break; }
5063 :
5064 52 : case FOREST_TRUST_TOP_LEVEL_NAME_EX: {
5065 52 : NDR_CHECK(ndr_pull_ForestTrustString(ndr, NDR_SCALARS, &r->name));
5066 52 : break; }
5067 :
5068 1885 : case FOREST_TRUST_DOMAIN_INFO: {
5069 1885 : NDR_CHECK(ndr_pull_ForestTrustDataDomainInfo(ndr, NDR_SCALARS, &r->info));
5070 1883 : break; }
5071 :
5072 0 : default: {
5073 0 : NDR_CHECK(ndr_pull_ForestTrustDataBinaryData(ndr, NDR_SCALARS, &r->data));
5074 0 : break; }
5075 :
5076 : }
5077 : }
5078 8022 : return NDR_ERR_SUCCESS;
5079 : }
5080 :
5081 4 : _PUBLIC_ void ndr_print_ForestTrustData(struct ndr_print *ndr, const char *name, const union ForestTrustData *r)
5082 : {
5083 4 : uint32_t level;
5084 4 : level = ndr_print_steal_switch_value(ndr, r);
5085 4 : ndr_print_union(ndr, name, level, "ForestTrustData");
5086 4 : switch (level) {
5087 2 : case FOREST_TRUST_TOP_LEVEL_NAME:
5088 2 : ndr_print_ForestTrustString(ndr, "name", &r->name);
5089 2 : break;
5090 :
5091 0 : case FOREST_TRUST_TOP_LEVEL_NAME_EX:
5092 0 : ndr_print_ForestTrustString(ndr, "name", &r->name);
5093 0 : break;
5094 :
5095 2 : case FOREST_TRUST_DOMAIN_INFO:
5096 2 : ndr_print_ForestTrustDataDomainInfo(ndr, "info", &r->info);
5097 2 : break;
5098 :
5099 0 : default:
5100 0 : ndr_print_ForestTrustDataBinaryData(ndr, "data", &r->data);
5101 0 : break;
5102 :
5103 : }
5104 4 : }
5105 :
5106 964 : static enum ndr_err_code ndr_push_ForestTrustInfoRecordType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum ForestTrustInfoRecordType r)
5107 : {
5108 964 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
5109 964 : return NDR_ERR_SUCCESS;
5110 : }
5111 :
5112 8026 : static enum ndr_err_code ndr_pull_ForestTrustInfoRecordType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum ForestTrustInfoRecordType *r)
5113 : {
5114 4 : uint8_t v;
5115 8026 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
5116 8026 : *r = v;
5117 8026 : return NDR_ERR_SUCCESS;
5118 : }
5119 :
5120 4 : _PUBLIC_ void ndr_print_ForestTrustInfoRecordType(struct ndr_print *ndr, const char *name, enum ForestTrustInfoRecordType r)
5121 : {
5122 4 : const char *val = NULL;
5123 :
5124 4 : switch (r) {
5125 2 : case FOREST_TRUST_TOP_LEVEL_NAME: val = "FOREST_TRUST_TOP_LEVEL_NAME"; break;
5126 0 : case FOREST_TRUST_TOP_LEVEL_NAME_EX: val = "FOREST_TRUST_TOP_LEVEL_NAME_EX"; break;
5127 2 : case FOREST_TRUST_DOMAIN_INFO: val = "FOREST_TRUST_DOMAIN_INFO"; break;
5128 : }
5129 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
5130 4 : }
5131 :
5132 964 : _PUBLIC_ enum ndr_err_code ndr_push_ForestTrustInfoRecord(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ForestTrustInfoRecord *r)
5133 : {
5134 : {
5135 964 : libndr_flags _flags_save_STRUCT = ndr->flags;
5136 964 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
5137 964 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5138 964 : if (ndr_flags & NDR_SCALARS) {
5139 964 : NDR_CHECK(ndr_push_align(ndr, 4));
5140 964 : NDR_CHECK(ndr_push_lsa_ForestTrustRecordFlags(ndr, NDR_SCALARS, r->flags));
5141 964 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->timestamp));
5142 964 : NDR_CHECK(ndr_push_ForestTrustInfoRecordType(ndr, NDR_SCALARS, r->type));
5143 964 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->data, r->type));
5144 964 : NDR_CHECK(ndr_push_ForestTrustData(ndr, NDR_SCALARS, &r->data));
5145 964 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5146 : }
5147 964 : if (ndr_flags & NDR_BUFFERS) {
5148 0 : }
5149 964 : ndr->flags = _flags_save_STRUCT;
5150 : }
5151 964 : return NDR_ERR_SUCCESS;
5152 : }
5153 :
5154 8026 : _PUBLIC_ enum ndr_err_code ndr_pull_ForestTrustInfoRecord(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ForestTrustInfoRecord *r)
5155 : {
5156 : {
5157 8026 : libndr_flags _flags_save_STRUCT = ndr->flags;
5158 8026 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
5159 8026 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5160 8026 : if (ndr_flags & NDR_SCALARS) {
5161 8026 : NDR_CHECK(ndr_pull_align(ndr, 4));
5162 8026 : NDR_CHECK(ndr_pull_lsa_ForestTrustRecordFlags(ndr, NDR_SCALARS, &r->flags));
5163 8026 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->timestamp));
5164 8030 : NDR_CHECK(ndr_pull_ForestTrustInfoRecordType(ndr, NDR_SCALARS, &r->type));
5165 8026 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->data, r->type));
5166 8026 : NDR_CHECK(ndr_pull_ForestTrustData(ndr, NDR_SCALARS, &r->data));
5167 8026 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5168 : }
5169 8026 : if (ndr_flags & NDR_BUFFERS) {
5170 4 : }
5171 8026 : ndr->flags = _flags_save_STRUCT;
5172 : }
5173 8026 : return NDR_ERR_SUCCESS;
5174 : }
5175 :
5176 0 : static void ndr_print_flags_ForestTrustInfoRecord(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ForestTrustInfoRecord *r)
5177 : {
5178 0 : ndr_print_ForestTrustInfoRecord(ndr, name, r);
5179 0 : }
5180 :
5181 4 : _PUBLIC_ void ndr_print_ForestTrustInfoRecord(struct ndr_print *ndr, const char *name, const struct ForestTrustInfoRecord *r)
5182 : {
5183 4 : ndr_print_struct(ndr, name, "ForestTrustInfoRecord");
5184 4 : if (r == NULL) { ndr_print_null(ndr); return; }
5185 : {
5186 4 : libndr_flags _flags_save_STRUCT = ndr->flags;
5187 4 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
5188 4 : ndr->depth++;
5189 4 : ndr_print_lsa_ForestTrustRecordFlags(ndr, "flags", r->flags);
5190 4 : ndr_print_NTTIME(ndr, "timestamp", r->timestamp);
5191 4 : ndr_print_ForestTrustInfoRecordType(ndr, "type", r->type);
5192 4 : ndr_print_set_switch_value(ndr, &r->data, r->type);
5193 4 : ndr_print_ForestTrustData(ndr, "data", &r->data);
5194 4 : ndr->depth--;
5195 4 : ndr->flags = _flags_save_STRUCT;
5196 : }
5197 : }
5198 :
5199 482 : _PUBLIC_ size_t ndr_size_ForestTrustInfoRecord(const struct ForestTrustInfoRecord *r, libndr_flags flags)
5200 : {
5201 482 : flags |= LIBNDR_FLAG_NOALIGN;
5202 482 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ForestTrustInfoRecord);
5203 : }
5204 :
5205 482 : static enum ndr_err_code ndr_push_ForestTrustInfoRecordArmor(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ForestTrustInfoRecordArmor *r)
5206 : {
5207 : {
5208 482 : libndr_flags _flags_save_STRUCT = ndr->flags;
5209 482 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
5210 482 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5211 482 : if (ndr_flags & NDR_SCALARS) {
5212 482 : NDR_CHECK(ndr_push_align(ndr, 4));
5213 482 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_ForestTrustInfoRecord(&r->record, ndr->flags)));
5214 482 : NDR_CHECK(ndr_push_ForestTrustInfoRecord(ndr, NDR_SCALARS, &r->record));
5215 482 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5216 : }
5217 482 : if (ndr_flags & NDR_BUFFERS) {
5218 0 : }
5219 482 : ndr->flags = _flags_save_STRUCT;
5220 : }
5221 482 : return NDR_ERR_SUCCESS;
5222 : }
5223 :
5224 8026 : static enum ndr_err_code ndr_pull_ForestTrustInfoRecordArmor(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ForestTrustInfoRecordArmor *r)
5225 : {
5226 : {
5227 8026 : libndr_flags _flags_save_STRUCT = ndr->flags;
5228 8026 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
5229 8026 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5230 8026 : if (ndr_flags & NDR_SCALARS) {
5231 8026 : NDR_CHECK(ndr_pull_align(ndr, 4));
5232 8026 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->record_size));
5233 8026 : NDR_CHECK(ndr_pull_ForestTrustInfoRecord(ndr, NDR_SCALARS, &r->record));
5234 8026 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5235 : }
5236 8026 : if (ndr_flags & NDR_BUFFERS) {
5237 4 : }
5238 8026 : ndr->flags = _flags_save_STRUCT;
5239 : }
5240 8026 : return NDR_ERR_SUCCESS;
5241 : }
5242 :
5243 4 : _PUBLIC_ void ndr_print_ForestTrustInfoRecordArmor(struct ndr_print *ndr, const char *name, const struct ForestTrustInfoRecordArmor *r)
5244 : {
5245 4 : ndr_print_struct(ndr, name, "ForestTrustInfoRecordArmor");
5246 4 : if (r == NULL) { ndr_print_null(ndr); return; }
5247 : {
5248 4 : libndr_flags _flags_save_STRUCT = ndr->flags;
5249 4 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
5250 4 : ndr->depth++;
5251 4 : ndr_print_uint32(ndr, "record_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_ForestTrustInfoRecord(&r->record, ndr->flags):r->record_size);
5252 4 : ndr_print_ForestTrustInfoRecord(ndr, "record", &r->record);
5253 4 : ndr->depth--;
5254 4 : ndr->flags = _flags_save_STRUCT;
5255 : }
5256 : }
5257 :
5258 79 : _PUBLIC_ enum ndr_err_code ndr_push_ForestTrustInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ForestTrustInfo *r)
5259 : {
5260 0 : uint32_t cntr_records_0;
5261 : {
5262 79 : libndr_flags _flags_save_STRUCT = ndr->flags;
5263 79 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
5264 79 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5265 79 : if (ndr_flags & NDR_SCALARS) {
5266 79 : NDR_CHECK(ndr_push_align(ndr, 4));
5267 79 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
5268 79 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5269 561 : for (cntr_records_0 = 0; cntr_records_0 < (r->count); cntr_records_0++) {
5270 482 : NDR_CHECK(ndr_push_ForestTrustInfoRecordArmor(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
5271 : }
5272 79 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5273 : }
5274 79 : if (ndr_flags & NDR_BUFFERS) {
5275 0 : }
5276 79 : ndr->flags = _flags_save_STRUCT;
5277 : }
5278 79 : return NDR_ERR_SUCCESS;
5279 : }
5280 :
5281 1885 : _PUBLIC_ enum ndr_err_code ndr_pull_ForestTrustInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ForestTrustInfo *r)
5282 : {
5283 1885 : uint32_t size_records_0 = 0;
5284 2 : uint32_t cntr_records_0;
5285 1885 : TALLOC_CTX *_mem_save_records_0 = NULL;
5286 : {
5287 1885 : libndr_flags _flags_save_STRUCT = ndr->flags;
5288 1885 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
5289 1885 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5290 1885 : if (ndr_flags & NDR_SCALARS) {
5291 1885 : NDR_CHECK(ndr_pull_align(ndr, 4));
5292 1885 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
5293 1885 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5294 1885 : size_records_0 = r->count;
5295 1885 : NDR_PULL_ALLOC_N(ndr, r->records, size_records_0);
5296 1885 : _mem_save_records_0 = NDR_PULL_GET_MEM_CTX(ndr);
5297 1885 : NDR_PULL_SET_MEM_CTX(ndr, r->records, 0);
5298 9911 : for (cntr_records_0 = 0; cntr_records_0 < (size_records_0); cntr_records_0++) {
5299 8026 : NDR_CHECK(ndr_pull_ForestTrustInfoRecordArmor(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
5300 : }
5301 1885 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_records_0, 0);
5302 1885 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5303 : }
5304 1885 : if (ndr_flags & NDR_BUFFERS) {
5305 2 : }
5306 1885 : ndr->flags = _flags_save_STRUCT;
5307 : }
5308 1885 : return NDR_ERR_SUCCESS;
5309 : }
5310 :
5311 0 : static void ndr_print_flags_ForestTrustInfo(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ForestTrustInfo *r)
5312 : {
5313 0 : ndr_print_ForestTrustInfo(ndr, name, r);
5314 0 : }
5315 :
5316 2 : _PUBLIC_ void ndr_print_ForestTrustInfo(struct ndr_print *ndr, const char *name, const struct ForestTrustInfo *r)
5317 : {
5318 2 : uint32_t cntr_records_0;
5319 2 : ndr_print_struct(ndr, name, "ForestTrustInfo");
5320 2 : if (r == NULL) { ndr_print_null(ndr); return; }
5321 : {
5322 2 : libndr_flags _flags_save_STRUCT = ndr->flags;
5323 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
5324 2 : ndr->depth++;
5325 2 : ndr_print_uint32(ndr, "version", r->version);
5326 2 : ndr_print_uint32(ndr, "count", r->count);
5327 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "records", (uint32_t)(r->count));
5328 2 : ndr->depth++;
5329 6 : for (cntr_records_0 = 0; cntr_records_0 < (r->count); cntr_records_0++) {
5330 4 : ndr_print_ForestTrustInfoRecordArmor(ndr, "records", &r->records[cntr_records_0]);
5331 : }
5332 2 : ndr->depth--;
5333 2 : ndr->depth--;
5334 2 : ndr->flags = _flags_save_STRUCT;
5335 : }
5336 : }
5337 :
5338 58138 : _PUBLIC_ enum ndr_err_code ndr_push_PlaintextSecret(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct PlaintextSecret *r)
5339 : {
5340 58138 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5341 58138 : if (ndr_flags & NDR_SCALARS) {
5342 58138 : NDR_CHECK(ndr_push_align(ndr, 4));
5343 58138 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext));
5344 58138 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5345 : }
5346 58138 : if (ndr_flags & NDR_BUFFERS) {
5347 654 : }
5348 58138 : return NDR_ERR_SUCCESS;
5349 : }
5350 :
5351 1008374 : _PUBLIC_ enum ndr_err_code ndr_pull_PlaintextSecret(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct PlaintextSecret *r)
5352 : {
5353 1008374 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5354 1008374 : if (ndr_flags & NDR_SCALARS) {
5355 1008374 : NDR_CHECK(ndr_pull_align(ndr, 4));
5356 1008374 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext));
5357 1008374 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5358 : }
5359 1008374 : if (ndr_flags & NDR_BUFFERS) {
5360 32823 : }
5361 1008374 : return NDR_ERR_SUCCESS;
5362 : }
5363 :
5364 0 : static void ndr_print_flags_PlaintextSecret(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct PlaintextSecret *r)
5365 : {
5366 0 : ndr_print_PlaintextSecret(ndr, name, r);
5367 0 : }
5368 :
5369 0 : _PUBLIC_ void ndr_print_PlaintextSecret(struct ndr_print *ndr, const char *name, const struct PlaintextSecret *r)
5370 : {
5371 0 : ndr_print_struct(ndr, name, "PlaintextSecret");
5372 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5373 0 : ndr->depth++;
5374 0 : ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext);
5375 0 : ndr->depth--;
5376 : }
5377 :
5378 58146 : _PUBLIC_ enum ndr_err_code ndr_push_EncryptedSecretHeader(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct EncryptedSecretHeader *r)
5379 : {
5380 58146 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5381 58146 : if (ndr_flags & NDR_SCALARS) {
5382 58146 : NDR_CHECK(ndr_push_align(ndr, 4));
5383 58146 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->magic));
5384 58146 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
5385 58146 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->algorithm));
5386 58146 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
5387 58146 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5388 : }
5389 58146 : if (ndr_flags & NDR_BUFFERS) {
5390 662 : }
5391 58146 : return NDR_ERR_SUCCESS;
5392 : }
5393 :
5394 1008375 : _PUBLIC_ enum ndr_err_code ndr_pull_EncryptedSecretHeader(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct EncryptedSecretHeader *r)
5395 : {
5396 1008375 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5397 1008375 : if (ndr_flags & NDR_SCALARS) {
5398 1008375 : NDR_CHECK(ndr_pull_align(ndr, 4));
5399 1008375 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic));
5400 1008375 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
5401 1008375 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->algorithm));
5402 1008375 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
5403 1008375 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5404 : }
5405 1008375 : if (ndr_flags & NDR_BUFFERS) {
5406 32821 : }
5407 1008375 : return NDR_ERR_SUCCESS;
5408 : }
5409 :
5410 0 : static void ndr_print_flags_EncryptedSecretHeader(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct EncryptedSecretHeader *r)
5411 : {
5412 0 : ndr_print_EncryptedSecretHeader(ndr, name, r);
5413 0 : }
5414 :
5415 0 : _PUBLIC_ void ndr_print_EncryptedSecretHeader(struct ndr_print *ndr, const char *name, const struct EncryptedSecretHeader *r)
5416 : {
5417 0 : ndr_print_struct(ndr, name, "EncryptedSecretHeader");
5418 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5419 0 : ndr->depth++;
5420 0 : ndr_print_uint32(ndr, "magic", r->magic);
5421 0 : ndr_print_uint32(ndr, "version", r->version);
5422 0 : ndr_print_uint32(ndr, "algorithm", r->algorithm);
5423 0 : ndr_print_uint32(ndr, "flags", r->flags);
5424 0 : ndr->depth--;
5425 : }
5426 :
5427 58146 : _PUBLIC_ enum ndr_err_code ndr_push_EncryptedSecret(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct EncryptedSecret *r)
5428 : {
5429 58146 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5430 58146 : if (ndr_flags & NDR_SCALARS) {
5431 58146 : NDR_CHECK(ndr_push_align(ndr, 4));
5432 58146 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->iv));
5433 58146 : NDR_CHECK(ndr_push_EncryptedSecretHeader(ndr, NDR_SCALARS, &r->header));
5434 : {
5435 58146 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
5436 58146 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
5437 58146 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->encrypted));
5438 58146 : ndr->flags = _flags_save_DATA_BLOB;
5439 : }
5440 58146 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5441 : }
5442 58146 : if (ndr_flags & NDR_BUFFERS) {
5443 662 : }
5444 58146 : return NDR_ERR_SUCCESS;
5445 : }
5446 :
5447 1008377 : _PUBLIC_ enum ndr_err_code ndr_pull_EncryptedSecret(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct EncryptedSecret *r)
5448 : {
5449 1008377 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5450 1008377 : if (ndr_flags & NDR_SCALARS) {
5451 1008377 : NDR_CHECK(ndr_pull_align(ndr, 4));
5452 1008377 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->iv));
5453 1008375 : NDR_CHECK(ndr_pull_EncryptedSecretHeader(ndr, NDR_SCALARS, &r->header));
5454 : {
5455 1008375 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
5456 1008375 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
5457 1008375 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->encrypted));
5458 1008375 : ndr->flags = _flags_save_DATA_BLOB;
5459 : }
5460 1008375 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5461 : }
5462 1008375 : if (ndr_flags & NDR_BUFFERS) {
5463 32821 : }
5464 1008375 : return NDR_ERR_SUCCESS;
5465 : }
5466 :
5467 0 : static void ndr_print_flags_EncryptedSecret(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct EncryptedSecret *r)
5468 : {
5469 0 : ndr_print_EncryptedSecret(ndr, name, r);
5470 0 : }
5471 :
5472 0 : _PUBLIC_ void ndr_print_EncryptedSecret(struct ndr_print *ndr, const char *name, const struct EncryptedSecret *r)
5473 : {
5474 0 : ndr_print_struct(ndr, name, "EncryptedSecret");
5475 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5476 0 : ndr->depth++;
5477 0 : ndr_print_DATA_BLOB(ndr, "iv", r->iv);
5478 0 : ndr_print_EncryptedSecretHeader(ndr, "header", &r->header);
5479 : {
5480 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
5481 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
5482 0 : ndr_print_DATA_BLOB(ndr, "encrypted", r->encrypted);
5483 0 : ndr->flags = _flags_save_DATA_BLOB;
5484 : }
5485 0 : ndr->depth--;
5486 : }
5487 :
5488 : #ifndef SKIP_NDR_TABLE_drsblobs
5489 : static const struct ndr_interface_public_struct drsblobs_public_structs[] = {
5490 : {
5491 : .name = "replPropertyMetaData1",
5492 : .struct_size = sizeof(struct replPropertyMetaData1 ),
5493 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_replPropertyMetaData1,
5494 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_replPropertyMetaData1,
5495 : .ndr_print = (ndr_print_function_t) ndr_print_flags_replPropertyMetaData1,
5496 : },
5497 : {
5498 : .name = "replPropertyMetaDataBlob",
5499 : .struct_size = sizeof(struct replPropertyMetaDataBlob ),
5500 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_replPropertyMetaDataBlob,
5501 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_replPropertyMetaDataBlob,
5502 : .ndr_print = (ndr_print_function_t) ndr_print_flags_replPropertyMetaDataBlob,
5503 : },
5504 : {
5505 : .name = "replUpToDateVectorBlob",
5506 : .struct_size = sizeof(struct replUpToDateVectorBlob ),
5507 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_replUpToDateVectorBlob,
5508 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_replUpToDateVectorBlob,
5509 : .ndr_print = (ndr_print_function_t) ndr_print_flags_replUpToDateVectorBlob,
5510 : },
5511 : {
5512 : .name = "repsFromTo1OtherInfo",
5513 : .struct_size = sizeof(struct repsFromTo1OtherInfo ),
5514 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_repsFromTo1OtherInfo,
5515 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_repsFromTo1OtherInfo,
5516 : .ndr_print = (ndr_print_function_t) ndr_print_flags_repsFromTo1OtherInfo,
5517 : },
5518 : {
5519 : .name = "repsFromTo1",
5520 : .struct_size = sizeof(struct repsFromTo1 ),
5521 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_repsFromTo1,
5522 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_repsFromTo1,
5523 : .ndr_print = (ndr_print_function_t) ndr_print_flags_repsFromTo1,
5524 : },
5525 : {
5526 : .name = "repsFromTo2OtherInfo",
5527 : .struct_size = sizeof(struct repsFromTo2OtherInfo ),
5528 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_repsFromTo2OtherInfo,
5529 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_repsFromTo2OtherInfo,
5530 : .ndr_print = (ndr_print_function_t) ndr_print_flags_repsFromTo2OtherInfo,
5531 : },
5532 : {
5533 : .name = "repsFromTo2",
5534 : .struct_size = sizeof(struct repsFromTo2 ),
5535 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_repsFromTo2,
5536 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_repsFromTo2,
5537 : .ndr_print = (ndr_print_function_t) ndr_print_flags_repsFromTo2,
5538 : },
5539 : {
5540 : .name = "repsFromToBlob",
5541 : .struct_size = sizeof(struct repsFromToBlob ),
5542 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_repsFromToBlob,
5543 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_repsFromToBlob,
5544 : .ndr_print = (ndr_print_function_t) ndr_print_flags_repsFromToBlob,
5545 : },
5546 : {
5547 : .name = "scheduleHeader",
5548 : .struct_size = sizeof(struct scheduleHeader ),
5549 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_scheduleHeader,
5550 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_scheduleHeader,
5551 : .ndr_print = (ndr_print_function_t) ndr_print_flags_scheduleHeader,
5552 : },
5553 : {
5554 : .name = "scheduleSlots",
5555 : .struct_size = sizeof(struct scheduleSlots ),
5556 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_scheduleSlots,
5557 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_scheduleSlots,
5558 : .ndr_print = (ndr_print_function_t) ndr_print_flags_scheduleSlots,
5559 : },
5560 : {
5561 : .name = "schedule",
5562 : .struct_size = sizeof(struct schedule ),
5563 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_schedule,
5564 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_schedule,
5565 : .ndr_print = (ndr_print_function_t) ndr_print_flags_schedule,
5566 : },
5567 : {
5568 : .name = "partialAttributeSetBlob",
5569 : .struct_size = sizeof(struct partialAttributeSetBlob ),
5570 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_partialAttributeSetBlob,
5571 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_partialAttributeSetBlob,
5572 : .ndr_print = (ndr_print_function_t) ndr_print_flags_partialAttributeSetBlob,
5573 : },
5574 : {
5575 : .name = "schemaInfoBlob",
5576 : .struct_size = sizeof(struct schemaInfoBlob ),
5577 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_schemaInfoBlob,
5578 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_schemaInfoBlob,
5579 : .ndr_print = (ndr_print_function_t) ndr_print_flags_schemaInfoBlob,
5580 : },
5581 : {
5582 : .name = "drsuapi_MSPrefixMap_Ctr",
5583 : .struct_size = sizeof(struct drsuapi_MSPrefixMap_Ctr ),
5584 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_MSPrefixMap_Ctr,
5585 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_MSPrefixMap_Ctr,
5586 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_MSPrefixMap_Ctr,
5587 : },
5588 : {
5589 : .name = "prefixMapBlob",
5590 : .struct_size = sizeof(struct prefixMapBlob ),
5591 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_prefixMapBlob,
5592 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_prefixMapBlob,
5593 : .ndr_print = (ndr_print_function_t) ndr_print_flags_prefixMapBlob,
5594 : },
5595 : {
5596 : .name = "ldapControlDirSyncCookie",
5597 : .struct_size = sizeof(struct ldapControlDirSyncCookie ),
5598 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ldapControlDirSyncCookie,
5599 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ldapControlDirSyncCookie,
5600 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ldapControlDirSyncCookie,
5601 : },
5602 : {
5603 : .name = "supplementalCredentialsPackage",
5604 : .struct_size = sizeof(struct supplementalCredentialsPackage ),
5605 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_supplementalCredentialsPackage,
5606 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_supplementalCredentialsPackage,
5607 : .ndr_print = (ndr_print_function_t) ndr_print_flags_supplementalCredentialsPackage,
5608 : },
5609 : {
5610 : .name = "supplementalCredentialsBlob",
5611 : .struct_size = sizeof(struct supplementalCredentialsBlob ),
5612 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_supplementalCredentialsBlob,
5613 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_supplementalCredentialsBlob,
5614 : .ndr_print = (ndr_print_function_t) ndr_print_flags_supplementalCredentialsBlob,
5615 : },
5616 : {
5617 : .name = "package_PackagesBlob",
5618 : .struct_size = sizeof(struct package_PackagesBlob ),
5619 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_package_PackagesBlob,
5620 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_package_PackagesBlob,
5621 : .ndr_print = (ndr_print_function_t) ndr_print_flags_package_PackagesBlob,
5622 : },
5623 : {
5624 : .name = "package_PrimaryKerberosBlob",
5625 : .struct_size = sizeof(struct package_PrimaryKerberosBlob ),
5626 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_package_PrimaryKerberosBlob,
5627 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_package_PrimaryKerberosBlob,
5628 : .ndr_print = (ndr_print_function_t) ndr_print_flags_package_PrimaryKerberosBlob,
5629 : },
5630 : {
5631 : .name = "package_PrimaryCLEARTEXTBlob",
5632 : .struct_size = sizeof(struct package_PrimaryCLEARTEXTBlob ),
5633 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_package_PrimaryCLEARTEXTBlob,
5634 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_package_PrimaryCLEARTEXTBlob,
5635 : .ndr_print = (ndr_print_function_t) ndr_print_flags_package_PrimaryCLEARTEXTBlob,
5636 : },
5637 : {
5638 : .name = "package_PrimaryWDigestBlob",
5639 : .struct_size = sizeof(struct package_PrimaryWDigestBlob ),
5640 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_package_PrimaryWDigestBlob,
5641 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_package_PrimaryWDigestBlob,
5642 : .ndr_print = (ndr_print_function_t) ndr_print_flags_package_PrimaryWDigestBlob,
5643 : },
5644 : {
5645 : .name = "package_PrimarySambaGPGBlob",
5646 : .struct_size = sizeof(struct package_PrimarySambaGPGBlob ),
5647 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_package_PrimarySambaGPGBlob,
5648 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_package_PrimarySambaGPGBlob,
5649 : .ndr_print = (ndr_print_function_t) ndr_print_flags_package_PrimarySambaGPGBlob,
5650 : },
5651 : {
5652 : .name = "package_PrimaryUserPasswordBlob",
5653 : .struct_size = sizeof(struct package_PrimaryUserPasswordBlob ),
5654 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_package_PrimaryUserPasswordBlob,
5655 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_package_PrimaryUserPasswordBlob,
5656 : .ndr_print = (ndr_print_function_t) ndr_print_flags_package_PrimaryUserPasswordBlob,
5657 : },
5658 : {
5659 : .name = "AuthenticationInformation",
5660 : .struct_size = sizeof(struct AuthenticationInformation ),
5661 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_AuthenticationInformation,
5662 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_AuthenticationInformation,
5663 : .ndr_print = (ndr_print_function_t) ndr_print_flags_AuthenticationInformation,
5664 : },
5665 : {
5666 : .name = "AuthenticationInformationArray",
5667 : .struct_size = sizeof(struct AuthenticationInformationArray ),
5668 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_AuthenticationInformationArray,
5669 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_AuthenticationInformationArray,
5670 : .ndr_print = (ndr_print_function_t) ndr_print_flags_AuthenticationInformationArray,
5671 : },
5672 : {
5673 : .name = "trustAuthInOutBlob",
5674 : .struct_size = sizeof(struct trustAuthInOutBlob ),
5675 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_trustAuthInOutBlob,
5676 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_trustAuthInOutBlob,
5677 : .ndr_print = (ndr_print_function_t) ndr_print_flags_trustAuthInOutBlob,
5678 : },
5679 : {
5680 : .name = "trustDomainPasswords",
5681 : .struct_size = sizeof(struct trustDomainPasswords ),
5682 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_trustDomainPasswords,
5683 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_trustDomainPasswords,
5684 : .ndr_print = (ndr_print_function_t) ndr_print_flags_trustDomainPasswords,
5685 : },
5686 : {
5687 : .name = "DsCompressedChunk",
5688 : .struct_size = sizeof(struct DsCompressedChunk ),
5689 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DsCompressedChunk,
5690 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DsCompressedChunk,
5691 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DsCompressedChunk,
5692 : },
5693 : {
5694 : .name = "ExtendedErrorInfo",
5695 : .struct_size = sizeof(struct ExtendedErrorInfo ),
5696 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ExtendedErrorInfo,
5697 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ExtendedErrorInfo,
5698 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ExtendedErrorInfo,
5699 : },
5700 : {
5701 : .name = "ForestTrustInfoRecord",
5702 : .struct_size = sizeof(struct ForestTrustInfoRecord ),
5703 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ForestTrustInfoRecord,
5704 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ForestTrustInfoRecord,
5705 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ForestTrustInfoRecord,
5706 : },
5707 : {
5708 : .name = "ForestTrustInfo",
5709 : .struct_size = sizeof(struct ForestTrustInfo ),
5710 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ForestTrustInfo,
5711 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ForestTrustInfo,
5712 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ForestTrustInfo,
5713 : },
5714 : {
5715 : .name = "PlaintextSecret",
5716 : .struct_size = sizeof(struct PlaintextSecret ),
5717 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_PlaintextSecret,
5718 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_PlaintextSecret,
5719 : .ndr_print = (ndr_print_function_t) ndr_print_flags_PlaintextSecret,
5720 : },
5721 : {
5722 : .name = "EncryptedSecretHeader",
5723 : .struct_size = sizeof(struct EncryptedSecretHeader ),
5724 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_EncryptedSecretHeader,
5725 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_EncryptedSecretHeader,
5726 : .ndr_print = (ndr_print_function_t) ndr_print_flags_EncryptedSecretHeader,
5727 : },
5728 : {
5729 : .name = "EncryptedSecret",
5730 : .struct_size = sizeof(struct EncryptedSecret ),
5731 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_EncryptedSecret,
5732 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_EncryptedSecret,
5733 : .ndr_print = (ndr_print_function_t) ndr_print_flags_EncryptedSecret,
5734 : },
5735 : { .name = NULL }
5736 : };
5737 :
5738 : static const struct ndr_interface_call drsblobs_calls[] = {
5739 : { .name = NULL }
5740 : };
5741 :
5742 : static const char * const drsblobs_endpoint_strings[] = {
5743 : "ncacn_np:[\\pipe\\drsblobs]",
5744 : };
5745 :
5746 : static const struct ndr_interface_string_array drsblobs_endpoints = {
5747 : .count = 1,
5748 : .names = drsblobs_endpoint_strings
5749 : };
5750 :
5751 : static const char * const drsblobs_authservice_strings[] = {
5752 : "host",
5753 : };
5754 :
5755 : static const struct ndr_interface_string_array drsblobs_authservices = {
5756 : .count = 1,
5757 : .names = drsblobs_authservice_strings
5758 : };
5759 :
5760 :
5761 : const struct ndr_interface_table ndr_table_drsblobs = {
5762 : .name = "drsblobs",
5763 : .syntax_id = {
5764 : {0x12345778,0x1234,0xabcd,{0x00,0x01},{0x00,0x00,0x00,0x01}},
5765 : NDR_DRSBLOBS_VERSION
5766 : },
5767 : .helpstring = NDR_DRSBLOBS_HELPSTRING,
5768 : .num_calls = 0,
5769 : .calls = drsblobs_calls,
5770 : .num_public_structs = 35,
5771 : .public_structs = drsblobs_public_structs,
5772 : .endpoints = &drsblobs_endpoints,
5773 : .authservices = &drsblobs_authservices
5774 : };
5775 :
5776 : #endif /* SKIP_NDR_TABLE_drsblobs */
|