1 /* parser auto-generated by pidl */
4 #include "../librpc/gen_ndr/ndr_drsblobs.h"
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 static enum ndr_err_code
ndr_push_replPropertyMetaData1(struct ndr_push
*ndr
, int ndr_flags
, const struct replPropertyMetaData1
*r
)
12 if (ndr_flags
& NDR_SCALARS
) {
13 NDR_CHECK(ndr_push_align(ndr
, 8));
14 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, r
->attid
));
15 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
16 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->originating_change_time
));
17 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
18 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
19 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->local_usn
));
20 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
22 if (ndr_flags
& NDR_BUFFERS
) {
24 return NDR_ERR_SUCCESS
;
27 static enum ndr_err_code
ndr_pull_replPropertyMetaData1(struct ndr_pull
*ndr
, int ndr_flags
, struct replPropertyMetaData1
*r
)
29 if (ndr_flags
& NDR_SCALARS
) {
30 NDR_CHECK(ndr_pull_align(ndr
, 8));
31 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, &r
->attid
));
32 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
33 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
34 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
35 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
36 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->local_usn
));
37 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
39 if (ndr_flags
& NDR_BUFFERS
) {
41 return NDR_ERR_SUCCESS
;
44 _PUBLIC_
void ndr_print_replPropertyMetaData1(struct ndr_print
*ndr
, const char *name
, const struct replPropertyMetaData1
*r
)
46 ndr_print_struct(ndr
, name
, "replPropertyMetaData1");
48 ndr_print_drsuapi_DsAttributeId(ndr
, "attid", r
->attid
);
49 ndr_print_uint32(ndr
, "version", r
->version
);
50 ndr_print_NTTIME_1sec(ndr
, "originating_change_time", r
->originating_change_time
);
51 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
52 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
53 ndr_print_hyper(ndr
, "local_usn", r
->local_usn
);
57 static enum ndr_err_code
ndr_push_replPropertyMetaDataCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct replPropertyMetaDataCtr1
*r
)
59 uint32_t cntr_array_0
;
60 if (ndr_flags
& NDR_SCALARS
) {
61 NDR_CHECK(ndr_push_align(ndr
, 8));
62 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
63 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
64 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
65 NDR_CHECK(ndr_push_replPropertyMetaData1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
67 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
69 if (ndr_flags
& NDR_BUFFERS
) {
71 return NDR_ERR_SUCCESS
;
74 static enum ndr_err_code
ndr_pull_replPropertyMetaDataCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct replPropertyMetaDataCtr1
*r
)
76 uint32_t cntr_array_0
;
77 TALLOC_CTX
*_mem_save_array_0
;
78 if (ndr_flags
& NDR_SCALARS
) {
79 NDR_CHECK(ndr_pull_align(ndr
, 8));
80 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
81 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
82 NDR_PULL_ALLOC_N(ndr
, r
->array
, r
->count
);
83 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
84 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
85 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
86 NDR_CHECK(ndr_pull_replPropertyMetaData1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
88 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
89 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
91 if (ndr_flags
& NDR_BUFFERS
) {
93 return NDR_ERR_SUCCESS
;
96 _PUBLIC_
void ndr_print_replPropertyMetaDataCtr1(struct ndr_print
*ndr
, const char *name
, const struct replPropertyMetaDataCtr1
*r
)
98 uint32_t cntr_array_0
;
99 ndr_print_struct(ndr
, name
, "replPropertyMetaDataCtr1");
101 ndr_print_uint32(ndr
, "count", r
->count
);
102 ndr_print_uint32(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved
);
103 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
105 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
107 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
108 ndr_print_replPropertyMetaData1(ndr
, "array", &r
->array
[cntr_array_0
]);
116 static enum ndr_err_code
ndr_push_replPropertyMetaDataCtr(struct ndr_push
*ndr
, int ndr_flags
, const union replPropertyMetaDataCtr
*r
)
118 if (ndr_flags
& NDR_SCALARS
) {
119 int level
= ndr_push_get_switch_value(ndr
, r
);
120 NDR_CHECK(ndr_push_union_align(ndr
, 8));
123 NDR_CHECK(ndr_push_replPropertyMetaDataCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
127 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
130 if (ndr_flags
& NDR_BUFFERS
) {
131 int level
= ndr_push_get_switch_value(ndr
, r
);
137 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
140 return NDR_ERR_SUCCESS
;
143 static enum ndr_err_code
ndr_pull_replPropertyMetaDataCtr(struct ndr_pull
*ndr
, int ndr_flags
, union replPropertyMetaDataCtr
*r
)
146 level
= ndr_pull_get_switch_value(ndr
, r
);
147 if (ndr_flags
& NDR_SCALARS
) {
148 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
151 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
155 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
158 if (ndr_flags
& NDR_BUFFERS
) {
164 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
167 return NDR_ERR_SUCCESS
;
170 _PUBLIC_
void ndr_print_replPropertyMetaDataCtr(struct ndr_print
*ndr
, const char *name
, const union replPropertyMetaDataCtr
*r
)
173 level
= ndr_print_get_switch_value(ndr
, r
);
174 ndr_print_union(ndr
, name
, level
, "replPropertyMetaDataCtr");
177 ndr_print_replPropertyMetaDataCtr1(ndr
, "ctr1", &r
->ctr1
);
181 ndr_print_bad_level(ndr
, name
, level
);
185 _PUBLIC_
enum ndr_err_code
ndr_push_replPropertyMetaDataBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct replPropertyMetaDataBlob
*r
)
187 if (ndr_flags
& NDR_SCALARS
) {
188 NDR_CHECK(ndr_push_align(ndr
, 8));
189 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
190 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
191 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->version
));
192 NDR_CHECK(ndr_push_replPropertyMetaDataCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
193 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
195 if (ndr_flags
& NDR_BUFFERS
) {
197 return NDR_ERR_SUCCESS
;
200 _PUBLIC_
enum ndr_err_code
ndr_pull_replPropertyMetaDataBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct replPropertyMetaDataBlob
*r
)
202 if (ndr_flags
& NDR_SCALARS
) {
203 NDR_CHECK(ndr_pull_align(ndr
, 8));
204 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
205 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
206 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->version
));
207 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
208 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
210 if (ndr_flags
& NDR_BUFFERS
) {
212 return NDR_ERR_SUCCESS
;
215 _PUBLIC_
void ndr_print_replPropertyMetaDataBlob(struct ndr_print
*ndr
, const char *name
, const struct replPropertyMetaDataBlob
*r
)
217 ndr_print_struct(ndr
, name
, "replPropertyMetaDataBlob");
219 ndr_print_uint32(ndr
, "version", r
->version
);
220 ndr_print_uint32(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved
);
221 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->version
);
222 ndr_print_replPropertyMetaDataCtr(ndr
, "ctr", &r
->ctr
);
226 static enum ndr_err_code
ndr_push_replUpToDateVectorCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct replUpToDateVectorCtr1
*r
)
228 uint32_t cntr_cursors_0
;
229 if (ndr_flags
& NDR_SCALARS
) {
230 NDR_CHECK(ndr_push_align(ndr
, 8));
231 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
232 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
233 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
234 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
236 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
238 if (ndr_flags
& NDR_BUFFERS
) {
240 return NDR_ERR_SUCCESS
;
243 static enum ndr_err_code
ndr_pull_replUpToDateVectorCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct replUpToDateVectorCtr1
*r
)
245 uint32_t cntr_cursors_0
;
246 TALLOC_CTX
*_mem_save_cursors_0
;
247 if (ndr_flags
& NDR_SCALARS
) {
248 NDR_CHECK(ndr_pull_align(ndr
, 8));
249 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
250 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
251 NDR_PULL_ALLOC_N(ndr
, r
->cursors
, r
->count
);
252 _mem_save_cursors_0
= NDR_PULL_GET_MEM_CTX(ndr
);
253 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors
, 0);
254 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
255 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
257 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors_0
, 0);
258 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
260 if (ndr_flags
& NDR_BUFFERS
) {
262 return NDR_ERR_SUCCESS
;
265 _PUBLIC_
void ndr_print_replUpToDateVectorCtr1(struct ndr_print
*ndr
, const char *name
, const struct replUpToDateVectorCtr1
*r
)
267 uint32_t cntr_cursors_0
;
268 ndr_print_struct(ndr
, name
, "replUpToDateVectorCtr1");
270 ndr_print_uint32(ndr
, "count", r
->count
);
271 ndr_print_uint32(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved
);
272 ndr
->print(ndr
, "%s: ARRAY(%d)", "cursors", (int)r
->count
);
274 for (cntr_cursors_0
=0;cntr_cursors_0
<r
->count
;cntr_cursors_0
++) {
276 if (asprintf(&idx_0
, "[%d]", cntr_cursors_0
) != -1) {
277 ndr_print_drsuapi_DsReplicaCursor(ndr
, "cursors", &r
->cursors
[cntr_cursors_0
]);
285 static enum ndr_err_code
ndr_push_replUpToDateVectorCtr2(struct ndr_push
*ndr
, int ndr_flags
, const struct replUpToDateVectorCtr2
*r
)
287 uint32_t cntr_cursors_0
;
288 if (ndr_flags
& NDR_SCALARS
) {
289 NDR_CHECK(ndr_push_align(ndr
, 8));
290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
291 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
292 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
293 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
295 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
297 if (ndr_flags
& NDR_BUFFERS
) {
299 return NDR_ERR_SUCCESS
;
302 static enum ndr_err_code
ndr_pull_replUpToDateVectorCtr2(struct ndr_pull
*ndr
, int ndr_flags
, struct replUpToDateVectorCtr2
*r
)
304 uint32_t cntr_cursors_0
;
305 TALLOC_CTX
*_mem_save_cursors_0
;
306 if (ndr_flags
& NDR_SCALARS
) {
307 NDR_CHECK(ndr_pull_align(ndr
, 8));
308 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
309 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
310 NDR_PULL_ALLOC_N(ndr
, r
->cursors
, r
->count
);
311 _mem_save_cursors_0
= NDR_PULL_GET_MEM_CTX(ndr
);
312 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors
, 0);
313 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
314 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
316 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors_0
, 0);
317 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
319 if (ndr_flags
& NDR_BUFFERS
) {
321 return NDR_ERR_SUCCESS
;
324 _PUBLIC_
void ndr_print_replUpToDateVectorCtr2(struct ndr_print
*ndr
, const char *name
, const struct replUpToDateVectorCtr2
*r
)
326 uint32_t cntr_cursors_0
;
327 ndr_print_struct(ndr
, name
, "replUpToDateVectorCtr2");
329 ndr_print_uint32(ndr
, "count", r
->count
);
330 ndr_print_uint32(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved
);
331 ndr
->print(ndr
, "%s: ARRAY(%d)", "cursors", (int)r
->count
);
333 for (cntr_cursors_0
=0;cntr_cursors_0
<r
->count
;cntr_cursors_0
++) {
335 if (asprintf(&idx_0
, "[%d]", cntr_cursors_0
) != -1) {
336 ndr_print_drsuapi_DsReplicaCursor2(ndr
, "cursors", &r
->cursors
[cntr_cursors_0
]);
344 static enum ndr_err_code
ndr_push_replUpToDateVectorCtr(struct ndr_push
*ndr
, int ndr_flags
, const union replUpToDateVectorCtr
*r
)
346 if (ndr_flags
& NDR_SCALARS
) {
347 int level
= ndr_push_get_switch_value(ndr
, r
);
348 NDR_CHECK(ndr_push_union_align(ndr
, 8));
351 NDR_CHECK(ndr_push_replUpToDateVectorCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
355 NDR_CHECK(ndr_push_replUpToDateVectorCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
359 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
362 if (ndr_flags
& NDR_BUFFERS
) {
363 int level
= ndr_push_get_switch_value(ndr
, r
);
372 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
375 return NDR_ERR_SUCCESS
;
378 static enum ndr_err_code
ndr_pull_replUpToDateVectorCtr(struct ndr_pull
*ndr
, int ndr_flags
, union replUpToDateVectorCtr
*r
)
381 level
= ndr_pull_get_switch_value(ndr
, r
);
382 if (ndr_flags
& NDR_SCALARS
) {
383 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
386 NDR_CHECK(ndr_pull_replUpToDateVectorCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
390 NDR_CHECK(ndr_pull_replUpToDateVectorCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
394 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
397 if (ndr_flags
& NDR_BUFFERS
) {
406 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
409 return NDR_ERR_SUCCESS
;
412 _PUBLIC_
void ndr_print_replUpToDateVectorCtr(struct ndr_print
*ndr
, const char *name
, const union replUpToDateVectorCtr
*r
)
415 level
= ndr_print_get_switch_value(ndr
, r
);
416 ndr_print_union(ndr
, name
, level
, "replUpToDateVectorCtr");
419 ndr_print_replUpToDateVectorCtr1(ndr
, "ctr1", &r
->ctr1
);
423 ndr_print_replUpToDateVectorCtr2(ndr
, "ctr2", &r
->ctr2
);
427 ndr_print_bad_level(ndr
, name
, level
);
431 _PUBLIC_
enum ndr_err_code
ndr_push_replUpToDateVectorBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct replUpToDateVectorBlob
*r
)
433 if (ndr_flags
& NDR_SCALARS
) {
434 NDR_CHECK(ndr_push_align(ndr
, 8));
435 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
436 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
437 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->version
));
438 NDR_CHECK(ndr_push_replUpToDateVectorCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
439 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
441 if (ndr_flags
& NDR_BUFFERS
) {
443 return NDR_ERR_SUCCESS
;
446 _PUBLIC_
enum ndr_err_code
ndr_pull_replUpToDateVectorBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct replUpToDateVectorBlob
*r
)
448 if (ndr_flags
& NDR_SCALARS
) {
449 NDR_CHECK(ndr_pull_align(ndr
, 8));
450 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
451 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
452 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->version
));
453 NDR_CHECK(ndr_pull_replUpToDateVectorCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
454 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
456 if (ndr_flags
& NDR_BUFFERS
) {
458 return NDR_ERR_SUCCESS
;
461 _PUBLIC_
void ndr_print_replUpToDateVectorBlob(struct ndr_print
*ndr
, const char *name
, const struct replUpToDateVectorBlob
*r
)
463 ndr_print_struct(ndr
, name
, "replUpToDateVectorBlob");
465 ndr_print_uint32(ndr
, "version", r
->version
);
466 ndr_print_uint32(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved
);
467 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->version
);
468 ndr_print_replUpToDateVectorCtr(ndr
, "ctr", &r
->ctr
);
472 _PUBLIC_
enum ndr_err_code
ndr_push_repsFromTo1OtherInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct repsFromTo1OtherInfo
*r
)
474 if (ndr_flags
& NDR_SCALARS
) {
475 NDR_CHECK(ndr_push_align(ndr
, 4));
476 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen(r
->dns_name
) + 1));
477 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dns_name
, strlen(r
->dns_name
) + 1, sizeof(uint8_t), CH_DOS
));
478 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
480 if (ndr_flags
& NDR_BUFFERS
) {
482 return NDR_ERR_SUCCESS
;
485 _PUBLIC_
enum ndr_err_code
ndr_pull_repsFromTo1OtherInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct repsFromTo1OtherInfo
*r
)
487 if (ndr_flags
& NDR_SCALARS
) {
488 NDR_CHECK(ndr_pull_align(ndr
, 4));
489 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__dns_name_size
));
490 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dns_name
, r
->__dns_name_size
, sizeof(uint8_t), CH_DOS
));
491 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
493 if (ndr_flags
& NDR_BUFFERS
) {
495 return NDR_ERR_SUCCESS
;
498 _PUBLIC_
void ndr_print_repsFromTo1OtherInfo(struct ndr_print
*ndr
, const char *name
, const struct repsFromTo1OtherInfo
*r
)
500 ndr_print_struct(ndr
, name
, "repsFromTo1OtherInfo");
502 ndr_print_uint32(ndr
, "__dns_name_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen(r
->dns_name
) + 1:r
->__dns_name_size
);
503 ndr_print_string(ndr
, "dns_name", r
->dns_name
);
507 _PUBLIC_
size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo
*r
, struct smb_iconv_convenience
*ic
, int flags
)
509 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_repsFromTo1OtherInfo
, ic
);
512 _PUBLIC_
enum ndr_err_code
ndr_push_repsFromTo1(struct ndr_push
*ndr
, int ndr_flags
, const struct repsFromTo1
*r
)
515 uint32_t _flags_save_STRUCT
= ndr
->flags
;
516 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
517 if (ndr_flags
& NDR_SCALARS
) {
518 NDR_CHECK(ndr_push_align(ndr
, 8));
519 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_repsFromTo1(r
, ndr
->iconv_convenience
, ndr
->flags
) + 8));
520 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->consecutive_sync_failures
));
521 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->last_success
));
522 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->last_attempt
));
523 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->result_last_attempt
));
524 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->other_info
));
525 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_repsFromTo1OtherInfo(r
->other_info
, ndr
->iconv_convenience
, ndr
->flags
)));
526 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, r
->replica_flags
));
527 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->schedule
, 84));
528 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
529 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
530 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_obj_guid
));
531 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
532 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->transport_guid
));
533 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
535 if (ndr_flags
& NDR_BUFFERS
) {
537 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->other_info
));
538 NDR_CHECK(ndr_push_repsFromTo1OtherInfo(ndr
, NDR_SCALARS
, r
->other_info
));
541 ndr
->flags
= _flags_save_STRUCT
;
543 return NDR_ERR_SUCCESS
;
546 _PUBLIC_
enum ndr_err_code
ndr_pull_repsFromTo1(struct ndr_pull
*ndr
, int ndr_flags
, struct repsFromTo1
*r
)
548 uint32_t _ptr_other_info
;
549 TALLOC_CTX
*_mem_save_other_info_0
;
551 uint32_t _flags_save_STRUCT
= ndr
->flags
;
552 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
553 if (ndr_flags
& NDR_SCALARS
) {
554 NDR_CHECK(ndr_pull_align(ndr
, 8));
555 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->blobsize
));
556 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->consecutive_sync_failures
));
557 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->last_success
));
558 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->last_attempt
));
559 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->result_last_attempt
));
560 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_other_info
));
561 if (_ptr_other_info
) {
562 NDR_PULL_ALLOC(ndr
, r
->other_info
);
563 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->other_info
, _ptr_other_info
));
565 r
->other_info
= NULL
;
567 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->other_info_length
));
568 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, &r
->replica_flags
));
569 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->schedule
, 84));
570 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
571 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
572 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_obj_guid
));
573 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
574 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->transport_guid
));
575 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
577 if (ndr_flags
& NDR_BUFFERS
) {
579 uint32_t _relative_save_offset
;
580 _relative_save_offset
= ndr
->offset
;
581 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->other_info
));
582 _mem_save_other_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
583 NDR_PULL_SET_MEM_CTX(ndr
, r
->other_info
, 0);
584 NDR_CHECK(ndr_pull_repsFromTo1OtherInfo(ndr
, NDR_SCALARS
, r
->other_info
));
585 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_other_info_0
, 0);
586 if (ndr
->offset
> ndr
->relative_highest_offset
) {
587 ndr
->relative_highest_offset
= ndr
->offset
;
589 ndr
->offset
= _relative_save_offset
;
592 ndr
->flags
= _flags_save_STRUCT
;
594 return NDR_ERR_SUCCESS
;
597 _PUBLIC_
void ndr_print_repsFromTo1(struct ndr_print
*ndr
, const char *name
, const struct repsFromTo1
*r
)
599 ndr_print_struct(ndr
, name
, "repsFromTo1");
601 uint32_t _flags_save_STRUCT
= ndr
->flags
;
602 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
604 ndr_print_uint32(ndr
, "blobsize", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_repsFromTo1(r
, ndr
->iconv_convenience
, ndr
->flags
) + 8:r
->blobsize
);
605 ndr_print_uint32(ndr
, "consecutive_sync_failures", r
->consecutive_sync_failures
);
606 ndr_print_NTTIME_1sec(ndr
, "last_success", r
->last_success
);
607 ndr_print_NTTIME_1sec(ndr
, "last_attempt", r
->last_attempt
);
608 ndr_print_WERROR(ndr
, "result_last_attempt", r
->result_last_attempt
);
609 ndr_print_ptr(ndr
, "other_info", r
->other_info
);
612 ndr_print_repsFromTo1OtherInfo(ndr
, "other_info", r
->other_info
);
615 ndr_print_uint32(ndr
, "other_info_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_repsFromTo1OtherInfo(r
->other_info
, ndr
->iconv_convenience
, ndr
->flags
):r
->other_info_length
);
616 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr
, "replica_flags", r
->replica_flags
);
617 ndr_print_array_uint8(ndr
, "schedule", r
->schedule
, 84);
618 ndr_print_uint32(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved
);
619 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "highwatermark", &r
->highwatermark
);
620 ndr_print_GUID(ndr
, "source_dsa_obj_guid", &r
->source_dsa_obj_guid
);
621 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
622 ndr_print_GUID(ndr
, "transport_guid", &r
->transport_guid
);
624 ndr
->flags
= _flags_save_STRUCT
;
628 _PUBLIC_
size_t ndr_size_repsFromTo1(const struct repsFromTo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
630 flags
|= LIBNDR_PRINT_ARRAY_HEX
;
631 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_repsFromTo1
, ic
);
634 _PUBLIC_
enum ndr_err_code
ndr_push_repsFromTo2OtherInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct repsFromTo2OtherInfo
*r
)
636 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
637 if (ndr_flags
& NDR_SCALARS
) {
638 NDR_CHECK(ndr_push_align(ndr
, 8));
639 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
640 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_repsFromTo2OtherInfo(r
, ndr
->iconv_convenience
, ndr
->flags
)));
642 uint32_t _flags_save_string
= ndr
->flags
;
643 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
644 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dns_name1
));
645 ndr
->flags
= _flags_save_string
;
647 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
649 uint32_t _flags_save_string
= ndr
->flags
;
650 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
651 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dns_name2
));
652 ndr
->flags
= _flags_save_string
;
654 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown2
));
655 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
657 if (ndr_flags
& NDR_BUFFERS
) {
658 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
660 uint32_t _flags_save_string
= ndr
->flags
;
661 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
663 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->dns_name1
));
664 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->dns_name1
));
666 ndr
->flags
= _flags_save_string
;
669 uint32_t _flags_save_string
= ndr
->flags
;
670 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
672 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->dns_name2
));
673 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->dns_name2
));
675 ndr
->flags
= _flags_save_string
;
678 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
679 return NDR_ERR_SUCCESS
;
682 _PUBLIC_
enum ndr_err_code
ndr_pull_repsFromTo2OtherInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct repsFromTo2OtherInfo
*r
)
684 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
685 uint32_t _ptr_dns_name1
;
686 TALLOC_CTX
*_mem_save_dns_name1_0
;
687 uint32_t _ptr_dns_name2
;
688 TALLOC_CTX
*_mem_save_dns_name2_0
;
689 if (ndr_flags
& NDR_SCALARS
) {
690 NDR_CHECK(ndr_pull_align(ndr
, 8));
691 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
692 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
694 uint32_t _flags_save_string
= ndr
->flags
;
695 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
696 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_name1
));
697 if (_ptr_dns_name1
) {
698 NDR_PULL_ALLOC(ndr
, r
->dns_name1
);
699 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dns_name1
, _ptr_dns_name1
));
703 ndr
->flags
= _flags_save_string
;
705 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
707 uint32_t _flags_save_string
= ndr
->flags
;
708 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
709 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_name2
));
710 if (_ptr_dns_name2
) {
711 NDR_PULL_ALLOC(ndr
, r
->dns_name2
);
712 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dns_name2
, _ptr_dns_name2
));
716 ndr
->flags
= _flags_save_string
;
718 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown2
));
719 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
721 if (ndr_flags
& NDR_BUFFERS
) {
722 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
724 uint32_t _flags_save_string
= ndr
->flags
;
725 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
727 uint32_t _relative_save_offset
;
728 _relative_save_offset
= ndr
->offset
;
729 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dns_name1
));
730 _mem_save_dns_name1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
731 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_name1
, 0);
732 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->dns_name1
));
733 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_name1_0
, 0);
734 if (ndr
->offset
> ndr
->relative_highest_offset
) {
735 ndr
->relative_highest_offset
= ndr
->offset
;
737 ndr
->offset
= _relative_save_offset
;
739 ndr
->flags
= _flags_save_string
;
742 uint32_t _flags_save_string
= ndr
->flags
;
743 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
745 uint32_t _relative_save_offset
;
746 _relative_save_offset
= ndr
->offset
;
747 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dns_name2
));
748 _mem_save_dns_name2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
749 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_name2
, 0);
750 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->dns_name2
));
751 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_name2_0
, 0);
752 if (ndr
->offset
> ndr
->relative_highest_offset
) {
753 ndr
->relative_highest_offset
= ndr
->offset
;
755 ndr
->offset
= _relative_save_offset
;
757 ndr
->flags
= _flags_save_string
;
760 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
761 return NDR_ERR_SUCCESS
;
764 _PUBLIC_
void ndr_print_repsFromTo2OtherInfo(struct ndr_print
*ndr
, const char *name
, const struct repsFromTo2OtherInfo
*r
)
766 ndr_print_struct(ndr
, name
, "repsFromTo2OtherInfo");
768 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_repsFromTo2OtherInfo(r
, ndr
->iconv_convenience
, ndr
->flags
):r
->__ndr_size
);
769 ndr_print_ptr(ndr
, "dns_name1", r
->dns_name1
);
772 ndr_print_string(ndr
, "dns_name1", r
->dns_name1
);
775 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
776 ndr_print_ptr(ndr
, "dns_name2", r
->dns_name2
);
779 ndr_print_string(ndr
, "dns_name2", r
->dns_name2
);
782 ndr_print_hyper(ndr
, "unknown2", r
->unknown2
);
786 _PUBLIC_
size_t ndr_size_repsFromTo2OtherInfo(const struct repsFromTo2OtherInfo
*r
, struct smb_iconv_convenience
*ic
, int flags
)
788 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_repsFromTo2OtherInfo
, ic
);
791 _PUBLIC_
enum ndr_err_code
ndr_push_repsFromTo2(struct ndr_push
*ndr
, int ndr_flags
, const struct repsFromTo2
*r
)
794 uint32_t _flags_save_STRUCT
= ndr
->flags
;
795 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
796 if (ndr_flags
& NDR_SCALARS
) {
797 NDR_CHECK(ndr_push_align(ndr
, 8));
798 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_repsFromTo2(r
, ndr
->iconv_convenience
, ndr
->flags
) + 8));
799 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->consecutive_sync_failures
));
800 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->last_success
));
801 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->last_attempt
));
802 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->result_last_attempt
));
803 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->other_info
));
804 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_repsFromTo2OtherInfo(r
->other_info
, ndr
->iconv_convenience
, ndr
->flags
)));
805 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, r
->replica_flags
));
806 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->schedule
, 84));
807 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
808 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
809 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_obj_guid
));
810 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
811 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->transport_guid
));
812 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown1
));
813 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
815 if (ndr_flags
& NDR_BUFFERS
) {
817 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->other_info
));
818 NDR_CHECK(ndr_push_repsFromTo2OtherInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->other_info
));
821 ndr
->flags
= _flags_save_STRUCT
;
823 return NDR_ERR_SUCCESS
;
826 _PUBLIC_
enum ndr_err_code
ndr_pull_repsFromTo2(struct ndr_pull
*ndr
, int ndr_flags
, struct repsFromTo2
*r
)
828 uint32_t _ptr_other_info
;
829 TALLOC_CTX
*_mem_save_other_info_0
;
831 uint32_t _flags_save_STRUCT
= ndr
->flags
;
832 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
833 if (ndr_flags
& NDR_SCALARS
) {
834 NDR_CHECK(ndr_pull_align(ndr
, 8));
835 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->blobsize
));
836 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->consecutive_sync_failures
));
837 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->last_success
));
838 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->last_attempt
));
839 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->result_last_attempt
));
840 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_other_info
));
841 if (_ptr_other_info
) {
842 NDR_PULL_ALLOC(ndr
, r
->other_info
);
843 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->other_info
, _ptr_other_info
));
845 r
->other_info
= NULL
;
847 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->other_info_length
));
848 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, &r
->replica_flags
));
849 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->schedule
, 84));
850 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
851 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
852 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_obj_guid
));
853 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
854 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->transport_guid
));
855 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown1
));
856 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
858 if (ndr_flags
& NDR_BUFFERS
) {
860 uint32_t _relative_save_offset
;
861 _relative_save_offset
= ndr
->offset
;
862 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->other_info
));
863 _mem_save_other_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
864 NDR_PULL_SET_MEM_CTX(ndr
, r
->other_info
, 0);
865 NDR_CHECK(ndr_pull_repsFromTo2OtherInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->other_info
));
866 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_other_info_0
, 0);
867 if (ndr
->offset
> ndr
->relative_highest_offset
) {
868 ndr
->relative_highest_offset
= ndr
->offset
;
870 ndr
->offset
= _relative_save_offset
;
873 ndr
->flags
= _flags_save_STRUCT
;
875 return NDR_ERR_SUCCESS
;
878 _PUBLIC_
void ndr_print_repsFromTo2(struct ndr_print
*ndr
, const char *name
, const struct repsFromTo2
*r
)
880 ndr_print_struct(ndr
, name
, "repsFromTo2");
882 uint32_t _flags_save_STRUCT
= ndr
->flags
;
883 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
885 ndr_print_uint32(ndr
, "blobsize", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_repsFromTo2(r
, ndr
->iconv_convenience
, ndr
->flags
) + 8:r
->blobsize
);
886 ndr_print_uint32(ndr
, "consecutive_sync_failures", r
->consecutive_sync_failures
);
887 ndr_print_NTTIME_1sec(ndr
, "last_success", r
->last_success
);
888 ndr_print_NTTIME_1sec(ndr
, "last_attempt", r
->last_attempt
);
889 ndr_print_WERROR(ndr
, "result_last_attempt", r
->result_last_attempt
);
890 ndr_print_ptr(ndr
, "other_info", r
->other_info
);
893 ndr_print_repsFromTo2OtherInfo(ndr
, "other_info", r
->other_info
);
896 ndr_print_uint32(ndr
, "other_info_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_repsFromTo2OtherInfo(r
->other_info
, ndr
->iconv_convenience
, ndr
->flags
):r
->other_info_length
);
897 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr
, "replica_flags", r
->replica_flags
);
898 ndr_print_array_uint8(ndr
, "schedule", r
->schedule
, 84);
899 ndr_print_uint32(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved
);
900 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "highwatermark", &r
->highwatermark
);
901 ndr_print_GUID(ndr
, "source_dsa_obj_guid", &r
->source_dsa_obj_guid
);
902 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
903 ndr_print_GUID(ndr
, "transport_guid", &r
->transport_guid
);
904 ndr_print_hyper(ndr
, "unknown1", r
->unknown1
);
906 ndr
->flags
= _flags_save_STRUCT
;
910 _PUBLIC_
size_t ndr_size_repsFromTo2(const struct repsFromTo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
912 flags
|= LIBNDR_PRINT_ARRAY_HEX
;
913 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_repsFromTo2
, ic
);
916 static enum ndr_err_code
ndr_push_repsFromTo(struct ndr_push
*ndr
, int ndr_flags
, const union repsFromTo
*r
)
918 if (ndr_flags
& NDR_SCALARS
) {
919 int level
= ndr_push_get_switch_value(ndr
, r
);
920 NDR_CHECK(ndr_push_union_align(ndr
, 8));
923 NDR_CHECK(ndr_push_repsFromTo1(ndr
, NDR_SCALARS
, &r
->ctr1
));
927 NDR_CHECK(ndr_push_repsFromTo2(ndr
, NDR_SCALARS
, &r
->ctr2
));
931 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
934 if (ndr_flags
& NDR_BUFFERS
) {
935 int level
= ndr_push_get_switch_value(ndr
, r
);
938 NDR_CHECK(ndr_push_repsFromTo1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
942 NDR_CHECK(ndr_push_repsFromTo2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
946 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
949 return NDR_ERR_SUCCESS
;
952 static enum ndr_err_code
ndr_pull_repsFromTo(struct ndr_pull
*ndr
, int ndr_flags
, union repsFromTo
*r
)
955 level
= ndr_pull_get_switch_value(ndr
, r
);
956 if (ndr_flags
& NDR_SCALARS
) {
957 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
960 NDR_CHECK(ndr_pull_repsFromTo1(ndr
, NDR_SCALARS
, &r
->ctr1
));
964 NDR_CHECK(ndr_pull_repsFromTo2(ndr
, NDR_SCALARS
, &r
->ctr2
));
968 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
971 if (ndr_flags
& NDR_BUFFERS
) {
974 NDR_CHECK(ndr_pull_repsFromTo1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
978 NDR_CHECK(ndr_pull_repsFromTo2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
982 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
985 return NDR_ERR_SUCCESS
;
988 _PUBLIC_
void ndr_print_repsFromTo(struct ndr_print
*ndr
, const char *name
, const union repsFromTo
*r
)
991 level
= ndr_print_get_switch_value(ndr
, r
);
992 ndr_print_union(ndr
, name
, level
, "repsFromTo");
995 ndr_print_repsFromTo1(ndr
, "ctr1", &r
->ctr1
);
999 ndr_print_repsFromTo2(ndr
, "ctr2", &r
->ctr2
);
1003 ndr_print_bad_level(ndr
, name
, level
);
1007 _PUBLIC_
enum ndr_err_code
ndr_push_repsFromToBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct repsFromToBlob
*r
)
1009 if (ndr_flags
& NDR_SCALARS
) {
1010 NDR_CHECK(ndr_push_align(ndr
, 8));
1011 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
1012 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1013 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->version
));
1014 NDR_CHECK(ndr_push_repsFromTo(ndr
, NDR_SCALARS
, &r
->ctr
));
1015 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
1017 if (ndr_flags
& NDR_BUFFERS
) {
1018 NDR_CHECK(ndr_push_repsFromTo(ndr
, NDR_BUFFERS
, &r
->ctr
));
1020 return NDR_ERR_SUCCESS
;
1023 _PUBLIC_
enum ndr_err_code
ndr_pull_repsFromToBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct repsFromToBlob
*r
)
1025 if (ndr_flags
& NDR_SCALARS
) {
1026 NDR_CHECK(ndr_pull_align(ndr
, 8));
1027 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
1028 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
1029 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->version
));
1030 NDR_CHECK(ndr_pull_repsFromTo(ndr
, NDR_SCALARS
, &r
->ctr
));
1031 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
1033 if (ndr_flags
& NDR_BUFFERS
) {
1034 NDR_CHECK(ndr_pull_repsFromTo(ndr
, NDR_BUFFERS
, &r
->ctr
));
1036 return NDR_ERR_SUCCESS
;
1039 _PUBLIC_
void ndr_print_repsFromToBlob(struct ndr_print
*ndr
, const char *name
, const struct repsFromToBlob
*r
)
1041 ndr_print_struct(ndr
, name
, "repsFromToBlob");
1043 ndr_print_uint32(ndr
, "version", r
->version
);
1044 ndr_print_uint32(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved
);
1045 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->version
);
1046 ndr_print_repsFromTo(ndr
, "ctr", &r
->ctr
);
1050 static enum ndr_err_code
ndr_push_partialAttributeSetCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct partialAttributeSetCtr1
*r
)
1052 uint32_t cntr_array_0
;
1053 if (ndr_flags
& NDR_SCALARS
) {
1054 NDR_CHECK(ndr_push_align(ndr
, 4));
1055 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1056 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
1057 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, r
->array
[cntr_array_0
]));
1059 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1061 if (ndr_flags
& NDR_BUFFERS
) {
1063 return NDR_ERR_SUCCESS
;
1066 static enum ndr_err_code
ndr_pull_partialAttributeSetCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct partialAttributeSetCtr1
*r
)
1068 uint32_t cntr_array_0
;
1069 TALLOC_CTX
*_mem_save_array_0
;
1070 if (ndr_flags
& NDR_SCALARS
) {
1071 NDR_CHECK(ndr_pull_align(ndr
, 4));
1072 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1073 NDR_PULL_ALLOC_N(ndr
, r
->array
, r
->count
);
1074 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1075 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
1076 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
1077 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
1079 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
1080 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1082 if (ndr_flags
& NDR_BUFFERS
) {
1084 return NDR_ERR_SUCCESS
;
1087 _PUBLIC_
void ndr_print_partialAttributeSetCtr1(struct ndr_print
*ndr
, const char *name
, const struct partialAttributeSetCtr1
*r
)
1089 uint32_t cntr_array_0
;
1090 ndr_print_struct(ndr
, name
, "partialAttributeSetCtr1");
1092 ndr_print_uint32(ndr
, "count", r
->count
);
1093 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
1095 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
1097 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
1098 ndr_print_drsuapi_DsAttributeId(ndr
, "array", r
->array
[cntr_array_0
]);
1106 static enum ndr_err_code
ndr_push_partialAttributeSetCtr(struct ndr_push
*ndr
, int ndr_flags
, const union partialAttributeSetCtr
*r
)
1108 if (ndr_flags
& NDR_SCALARS
) {
1109 int level
= ndr_push_get_switch_value(ndr
, r
);
1110 NDR_CHECK(ndr_push_union_align(ndr
, 4));
1113 NDR_CHECK(ndr_push_partialAttributeSetCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
1117 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1120 if (ndr_flags
& NDR_BUFFERS
) {
1121 int level
= ndr_push_get_switch_value(ndr
, r
);
1127 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1130 return NDR_ERR_SUCCESS
;
1133 static enum ndr_err_code
ndr_pull_partialAttributeSetCtr(struct ndr_pull
*ndr
, int ndr_flags
, union partialAttributeSetCtr
*r
)
1136 level
= ndr_pull_get_switch_value(ndr
, r
);
1137 if (ndr_flags
& NDR_SCALARS
) {
1138 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
1141 NDR_CHECK(ndr_pull_partialAttributeSetCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
1145 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1148 if (ndr_flags
& NDR_BUFFERS
) {
1154 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1157 return NDR_ERR_SUCCESS
;
1160 _PUBLIC_
void ndr_print_partialAttributeSetCtr(struct ndr_print
*ndr
, const char *name
, const union partialAttributeSetCtr
*r
)
1163 level
= ndr_print_get_switch_value(ndr
, r
);
1164 ndr_print_union(ndr
, name
, level
, "partialAttributeSetCtr");
1167 ndr_print_partialAttributeSetCtr1(ndr
, "ctr1", &r
->ctr1
);
1171 ndr_print_bad_level(ndr
, name
, level
);
1175 _PUBLIC_
enum ndr_err_code
ndr_push_partialAttributeSetBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct partialAttributeSetBlob
*r
)
1177 if (ndr_flags
& NDR_SCALARS
) {
1178 NDR_CHECK(ndr_push_align(ndr
, 4));
1179 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
1180 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1181 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->version
));
1182 NDR_CHECK(ndr_push_partialAttributeSetCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
1183 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1185 if (ndr_flags
& NDR_BUFFERS
) {
1187 return NDR_ERR_SUCCESS
;
1190 _PUBLIC_
enum ndr_err_code
ndr_pull_partialAttributeSetBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct partialAttributeSetBlob
*r
)
1192 if (ndr_flags
& NDR_SCALARS
) {
1193 NDR_CHECK(ndr_pull_align(ndr
, 4));
1194 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
1195 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
1196 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->version
));
1197 NDR_CHECK(ndr_pull_partialAttributeSetCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
1198 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1200 if (ndr_flags
& NDR_BUFFERS
) {
1202 return NDR_ERR_SUCCESS
;
1205 _PUBLIC_
void ndr_print_partialAttributeSetBlob(struct ndr_print
*ndr
, const char *name
, const struct partialAttributeSetBlob
*r
)
1207 ndr_print_struct(ndr
, name
, "partialAttributeSetBlob");
1209 ndr_print_uint32(ndr
, "version", r
->version
);
1210 ndr_print_uint32(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved
);
1211 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->version
);
1212 ndr_print_partialAttributeSetCtr(ndr
, "ctr", &r
->ctr
);
1216 static enum ndr_err_code
ndr_push_prefixMapVersion(struct ndr_push
*ndr
, int ndr_flags
, enum prefixMapVersion r
)
1218 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
1219 return NDR_ERR_SUCCESS
;
1222 static enum ndr_err_code
ndr_pull_prefixMapVersion(struct ndr_pull
*ndr
, int ndr_flags
, enum prefixMapVersion
*r
)
1225 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
1227 return NDR_ERR_SUCCESS
;
1230 _PUBLIC_
void ndr_print_prefixMapVersion(struct ndr_print
*ndr
, const char *name
, enum prefixMapVersion r
)
1232 const char *val
= NULL
;
1235 case PREFIX_MAP_VERSION_DSDB
: val
= "PREFIX_MAP_VERSION_DSDB"; break;
1237 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1240 static enum ndr_err_code
ndr_push_prefixMapCtr(struct ndr_push
*ndr
, int ndr_flags
, const union prefixMapCtr
*r
)
1242 if (ndr_flags
& NDR_SCALARS
) {
1243 int level
= ndr_push_get_switch_value(ndr
, r
);
1244 NDR_CHECK(ndr_push_union_align(ndr
, 5));
1246 case PREFIX_MAP_VERSION_DSDB
: {
1247 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->dsdb
));
1251 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1254 if (ndr_flags
& NDR_BUFFERS
) {
1255 int level
= ndr_push_get_switch_value(ndr
, r
);
1257 case PREFIX_MAP_VERSION_DSDB
:
1258 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->dsdb
));
1262 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1265 return NDR_ERR_SUCCESS
;
1268 static enum ndr_err_code
ndr_pull_prefixMapCtr(struct ndr_pull
*ndr
, int ndr_flags
, union prefixMapCtr
*r
)
1271 level
= ndr_pull_get_switch_value(ndr
, r
);
1272 if (ndr_flags
& NDR_SCALARS
) {
1273 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
1275 case PREFIX_MAP_VERSION_DSDB
: {
1276 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->dsdb
));
1280 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1283 if (ndr_flags
& NDR_BUFFERS
) {
1285 case PREFIX_MAP_VERSION_DSDB
:
1286 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->dsdb
));
1290 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1293 return NDR_ERR_SUCCESS
;
1296 _PUBLIC_
void ndr_print_prefixMapCtr(struct ndr_print
*ndr
, const char *name
, const union prefixMapCtr
*r
)
1299 level
= ndr_print_get_switch_value(ndr
, r
);
1300 ndr_print_union(ndr
, name
, level
, "prefixMapCtr");
1302 case PREFIX_MAP_VERSION_DSDB
:
1303 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, "dsdb", &r
->dsdb
);
1307 ndr_print_bad_level(ndr
, name
, level
);
1311 _PUBLIC_
enum ndr_err_code
ndr_push_prefixMapBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct prefixMapBlob
*r
)
1313 if (ndr_flags
& NDR_SCALARS
) {
1314 NDR_CHECK(ndr_push_align(ndr
, 5));
1315 NDR_CHECK(ndr_push_prefixMapVersion(ndr
, NDR_SCALARS
, r
->version
));
1316 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1317 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->version
));
1318 NDR_CHECK(ndr_push_prefixMapCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
1319 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1321 if (ndr_flags
& NDR_BUFFERS
) {
1322 NDR_CHECK(ndr_push_prefixMapCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
1324 return NDR_ERR_SUCCESS
;
1327 _PUBLIC_
enum ndr_err_code
ndr_pull_prefixMapBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct prefixMapBlob
*r
)
1329 if (ndr_flags
& NDR_SCALARS
) {
1330 NDR_CHECK(ndr_pull_align(ndr
, 5));
1331 NDR_CHECK(ndr_pull_prefixMapVersion(ndr
, NDR_SCALARS
, &r
->version
));
1332 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
1333 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->version
));
1334 NDR_CHECK(ndr_pull_prefixMapCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
1335 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1337 if (ndr_flags
& NDR_BUFFERS
) {
1338 NDR_CHECK(ndr_pull_prefixMapCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
1340 return NDR_ERR_SUCCESS
;
1343 _PUBLIC_
void ndr_print_prefixMapBlob(struct ndr_print
*ndr
, const char *name
, const struct prefixMapBlob
*r
)
1345 ndr_print_struct(ndr
, name
, "prefixMapBlob");
1347 ndr_print_prefixMapVersion(ndr
, "version", r
->version
);
1348 ndr_print_uint32(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved
);
1349 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->version
);
1350 ndr_print_prefixMapCtr(ndr
, "ctr", &r
->ctr
);
1354 static enum ndr_err_code
ndr_push_ldapControlDirSyncExtra(struct ndr_push
*ndr
, int ndr_flags
, const union ldapControlDirSyncExtra
*r
)
1356 if (ndr_flags
& NDR_SCALARS
) {
1357 int level
= ndr_push_get_switch_value(ndr
, r
);
1358 NDR_CHECK(ndr_push_union_align(ndr
, 8));
1364 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr
, NDR_SCALARS
, &r
->uptodateness_vector
));
1369 if (ndr_flags
& NDR_BUFFERS
) {
1370 int level
= ndr_push_get_switch_value(ndr
, r
);
1380 return NDR_ERR_SUCCESS
;
1383 static enum ndr_err_code
ndr_pull_ldapControlDirSyncExtra(struct ndr_pull
*ndr
, int ndr_flags
, union ldapControlDirSyncExtra
*r
)
1386 level
= ndr_pull_get_switch_value(ndr
, r
);
1387 if (ndr_flags
& NDR_SCALARS
) {
1388 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
1394 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr
, NDR_SCALARS
, &r
->uptodateness_vector
));
1399 if (ndr_flags
& NDR_BUFFERS
) {
1409 return NDR_ERR_SUCCESS
;
1412 _PUBLIC_
void ndr_print_ldapControlDirSyncExtra(struct ndr_print
*ndr
, const char *name
, const union ldapControlDirSyncExtra
*r
)
1415 level
= ndr_print_get_switch_value(ndr
, r
);
1416 ndr_print_union(ndr
, name
, level
, "ldapControlDirSyncExtra");
1422 ndr_print_replUpToDateVectorBlob(ndr
, "uptodateness_vector", &r
->uptodateness_vector
);
1428 static size_t ndr_size_ldapControlDirSyncExtra(const union ldapControlDirSyncExtra
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
1430 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_ldapControlDirSyncExtra
, ic
);
1433 static enum ndr_err_code
ndr_push_ldapControlDirSyncBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct ldapControlDirSyncBlob
*r
)
1435 if (ndr_flags
& NDR_SCALARS
) {
1436 NDR_CHECK(ndr_push_align(ndr
, 8));
1437 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 3));
1438 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->time
));
1439 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u2
));
1440 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u3
));
1441 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_ldapControlDirSyncExtra(&r
->extra
, r
->extra
.uptodateness_vector
.version
, ndr
->iconv_convenience
, 0)));
1442 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1443 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid1
));
1444 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->extra
, ndr_size_ldapControlDirSyncExtra(&r
->extra
, r
->extra
.uptodateness_vector
.version
, ndr
->iconv_convenience
, 0)));
1445 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr
, NDR_SCALARS
, &r
->extra
));
1446 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
1448 if (ndr_flags
& NDR_BUFFERS
) {
1449 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr
, NDR_BUFFERS
, &r
->extra
));
1451 return NDR_ERR_SUCCESS
;
1454 static enum ndr_err_code
ndr_pull_ldapControlDirSyncBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct ldapControlDirSyncBlob
*r
)
1456 if (ndr_flags
& NDR_SCALARS
) {
1457 NDR_CHECK(ndr_pull_align(ndr
, 8));
1458 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u1
));
1459 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->time
));
1460 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u2
));
1461 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u3
));
1462 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->extra_length
));
1463 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1464 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid1
));
1465 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->extra
, r
->extra_length
));
1466 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr
, NDR_SCALARS
, &r
->extra
));
1467 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
1469 if (ndr_flags
& NDR_BUFFERS
) {
1470 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr
, NDR_BUFFERS
, &r
->extra
));
1472 return NDR_ERR_SUCCESS
;
1475 _PUBLIC_
void ndr_print_ldapControlDirSyncBlob(struct ndr_print
*ndr
, const char *name
, const struct ldapControlDirSyncBlob
*r
)
1477 ndr_print_struct(ndr
, name
, "ldapControlDirSyncBlob");
1479 ndr_print_uint32(ndr
, "u1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?3:r
->u1
);
1480 ndr_print_NTTIME(ndr
, "time", r
->time
);
1481 ndr_print_uint32(ndr
, "u2", r
->u2
);
1482 ndr_print_uint32(ndr
, "u3", r
->u3
);
1483 ndr_print_uint32(ndr
, "extra_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_ldapControlDirSyncExtra(&r
->extra
, r
->extra
.uptodateness_vector
.version
, ndr
->iconv_convenience
, 0):r
->extra_length
);
1484 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "highwatermark", &r
->highwatermark
);
1485 ndr_print_GUID(ndr
, "guid1", &r
->guid1
);
1486 ndr_print_set_switch_value(ndr
, &r
->extra
, r
->extra_length
);
1487 ndr_print_ldapControlDirSyncExtra(ndr
, "extra", &r
->extra
);
1491 _PUBLIC_
enum ndr_err_code
ndr_push_ldapControlDirSyncCookie(struct ndr_push
*ndr
, int ndr_flags
, const struct ldapControlDirSyncCookie
*r
)
1493 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
1494 if (ndr_flags
& NDR_SCALARS
) {
1495 NDR_CHECK(ndr_push_align(ndr
, 8));
1496 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
1497 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, "MSDS", 4, sizeof(uint8_t), CH_DOS
));
1499 struct ndr_push
*_ndr_blob
;
1500 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_blob
, 0, -1));
1501 NDR_CHECK(ndr_push_ldapControlDirSyncBlob(_ndr_blob
, NDR_SCALARS
|NDR_BUFFERS
, &r
->blob
));
1502 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_blob
, 0, -1));
1504 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
1506 if (ndr_flags
& NDR_BUFFERS
) {
1507 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
1509 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
1510 return NDR_ERR_SUCCESS
;
1513 _PUBLIC_
enum ndr_err_code
ndr_pull_ldapControlDirSyncCookie(struct ndr_pull
*ndr
, int ndr_flags
, struct ldapControlDirSyncCookie
*r
)
1515 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
1516 if (ndr_flags
& NDR_SCALARS
) {
1517 NDR_CHECK(ndr_pull_align(ndr
, 8));
1518 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
1519 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->msds
, 4, sizeof(uint8_t), CH_DOS
));
1521 struct ndr_pull
*_ndr_blob
;
1522 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_blob
, 0, -1));
1523 NDR_CHECK(ndr_pull_ldapControlDirSyncBlob(_ndr_blob
, NDR_SCALARS
|NDR_BUFFERS
, &r
->blob
));
1524 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_blob
, 0, -1));
1526 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
1528 if (ndr_flags
& NDR_BUFFERS
) {
1529 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
1531 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
1532 return NDR_ERR_SUCCESS
;
1535 _PUBLIC_
void ndr_print_ldapControlDirSyncCookie(struct ndr_print
*ndr
, const char *name
, const struct ldapControlDirSyncCookie
*r
)
1537 ndr_print_struct(ndr
, name
, "ldapControlDirSyncCookie");
1539 ndr_print_string(ndr
, "msds", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?"MSDS":r
->msds
);
1540 ndr_print_ldapControlDirSyncBlob(ndr
, "blob", &r
->blob
);
1544 static enum ndr_err_code
ndr_push_supplementalCredentialsPackage(struct ndr_push
*ndr
, int ndr_flags
, const struct supplementalCredentialsPackage
*r
)
1546 if (ndr_flags
& NDR_SCALARS
) {
1547 NDR_CHECK(ndr_push_align(ndr
, 2));
1548 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->name
)));
1549 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen(r
->data
)));
1550 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->reserved
));
1551 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->name
, 2 * strlen_m(r
->name
), sizeof(uint8_t), CH_UTF16
));
1552 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data
, strlen(r
->data
), sizeof(uint8_t), CH_DOS
));
1553 NDR_CHECK(ndr_push_trailer_align(ndr
, 2));
1555 if (ndr_flags
& NDR_BUFFERS
) {
1557 return NDR_ERR_SUCCESS
;
1560 static enum ndr_err_code
ndr_pull_supplementalCredentialsPackage(struct ndr_pull
*ndr
, int ndr_flags
, struct supplementalCredentialsPackage
*r
)
1562 if (ndr_flags
& NDR_SCALARS
) {
1563 NDR_CHECK(ndr_pull_align(ndr
, 2));
1564 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->name_len
));
1565 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->data_len
));
1566 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved
));
1567 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->name
, r
->name_len
, sizeof(uint8_t), CH_UTF16
));
1568 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data
, r
->data_len
, sizeof(uint8_t), CH_DOS
));
1569 NDR_CHECK(ndr_pull_trailer_align(ndr
, 2));
1571 if (ndr_flags
& NDR_BUFFERS
) {
1573 return NDR_ERR_SUCCESS
;
1576 _PUBLIC_
void ndr_print_supplementalCredentialsPackage(struct ndr_print
*ndr
, const char *name
, const struct supplementalCredentialsPackage
*r
)
1578 ndr_print_struct(ndr
, name
, "supplementalCredentialsPackage");
1580 ndr_print_uint16(ndr
, "name_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->name
):r
->name_len
);
1581 ndr_print_uint16(ndr
, "data_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen(r
->data
):r
->data_len
);
1582 ndr_print_uint16(ndr
, "reserved", r
->reserved
);
1583 ndr_print_string(ndr
, "name", r
->name
);
1584 ndr_print_string(ndr
, "data", r
->data
);
1588 static enum ndr_err_code
ndr_push_supplementalCredentialsSignature(struct ndr_push
*ndr
, int ndr_flags
, enum supplementalCredentialsSignature r
)
1591 uint32_t _flags_save_ENUM
= ndr
->flags
;
1592 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1593 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
1594 ndr
->flags
= _flags_save_ENUM
;
1596 return NDR_ERR_SUCCESS
;
1599 static enum ndr_err_code
ndr_pull_supplementalCredentialsSignature(struct ndr_pull
*ndr
, int ndr_flags
, enum supplementalCredentialsSignature
*r
)
1603 uint32_t _flags_save_ENUM
= ndr
->flags
;
1604 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1605 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
1607 ndr
->flags
= _flags_save_ENUM
;
1609 return NDR_ERR_SUCCESS
;
1612 _PUBLIC_
void ndr_print_supplementalCredentialsSignature(struct ndr_print
*ndr
, const char *name
, enum supplementalCredentialsSignature r
)
1614 const char *val
= NULL
;
1617 uint32_t _flags_save_ENUM
= ndr
->flags
;
1618 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1620 case SUPPLEMENTAL_CREDENTIALS_SIGNATURE
: val
= "SUPPLEMENTAL_CREDENTIALS_SIGNATURE"; break;
1622 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1623 ndr
->flags
= _flags_save_ENUM
;
1627 static enum ndr_err_code
ndr_push_supplementalCredentialsSubBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct supplementalCredentialsSubBlob
*r
)
1629 uint32_t cntr_packages_0
;
1630 if (ndr_flags
& NDR_SCALARS
) {
1631 NDR_CHECK(ndr_push_align(ndr
, 3));
1632 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, SUPPLEMENTAL_CREDENTIALS_PREFIX
, 0x30, sizeof(uint16_t), CH_UTF16
));
1633 NDR_CHECK(ndr_push_supplementalCredentialsSignature(ndr
, NDR_SCALARS
, SUPPLEMENTAL_CREDENTIALS_SIGNATURE
));
1634 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_packages
));
1635 for (cntr_packages_0
= 0; cntr_packages_0
< r
->num_packages
; cntr_packages_0
++) {
1636 NDR_CHECK(ndr_push_supplementalCredentialsPackage(ndr
, NDR_SCALARS
, &r
->packages
[cntr_packages_0
]));
1638 NDR_CHECK(ndr_push_trailer_align(ndr
, 3));
1640 if (ndr_flags
& NDR_BUFFERS
) {
1642 return NDR_ERR_SUCCESS
;
1645 static enum ndr_err_code
ndr_pull_supplementalCredentialsSubBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct supplementalCredentialsSubBlob
*r
)
1647 uint32_t cntr_packages_0
;
1648 TALLOC_CTX
*_mem_save_packages_0
;
1649 if (ndr_flags
& NDR_SCALARS
) {
1650 NDR_CHECK(ndr_pull_align(ndr
, 3));
1651 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->prefix
, 0x30, sizeof(uint16_t), CH_UTF16
));
1652 NDR_CHECK(ndr_pull_supplementalCredentialsSignature(ndr
, NDR_SCALARS
, &r
->signature
));
1653 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_packages
));
1654 NDR_PULL_ALLOC_N(ndr
, r
->packages
, r
->num_packages
);
1655 _mem_save_packages_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1656 NDR_PULL_SET_MEM_CTX(ndr
, r
->packages
, 0);
1657 for (cntr_packages_0
= 0; cntr_packages_0
< r
->num_packages
; cntr_packages_0
++) {
1658 NDR_CHECK(ndr_pull_supplementalCredentialsPackage(ndr
, NDR_SCALARS
, &r
->packages
[cntr_packages_0
]));
1660 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_packages_0
, 0);
1661 NDR_CHECK(ndr_pull_trailer_align(ndr
, 3));
1663 if (ndr_flags
& NDR_BUFFERS
) {
1665 return NDR_ERR_SUCCESS
;
1668 _PUBLIC_
void ndr_print_supplementalCredentialsSubBlob(struct ndr_print
*ndr
, const char *name
, const struct supplementalCredentialsSubBlob
*r
)
1670 uint32_t cntr_packages_0
;
1671 ndr_print_struct(ndr
, name
, "supplementalCredentialsSubBlob");
1673 ndr_print_string(ndr
, "prefix", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?SUPPLEMENTAL_CREDENTIALS_PREFIX
:r
->prefix
);
1674 ndr_print_supplementalCredentialsSignature(ndr
, "signature", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?SUPPLEMENTAL_CREDENTIALS_SIGNATURE
:r
->signature
);
1675 ndr_print_uint16(ndr
, "num_packages", r
->num_packages
);
1676 ndr
->print(ndr
, "%s: ARRAY(%d)", "packages", (int)r
->num_packages
);
1678 for (cntr_packages_0
=0;cntr_packages_0
<r
->num_packages
;cntr_packages_0
++) {
1680 if (asprintf(&idx_0
, "[%d]", cntr_packages_0
) != -1) {
1681 ndr_print_supplementalCredentialsPackage(ndr
, "packages", &r
->packages
[cntr_packages_0
]);
1689 static size_t ndr_size_supplementalCredentialsSubBlob(const struct supplementalCredentialsSubBlob
*r
, struct smb_iconv_convenience
*ic
, int flags
)
1691 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_supplementalCredentialsSubBlob
, ic
);
1694 _PUBLIC_
enum ndr_err_code
ndr_push_supplementalCredentialsBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct supplementalCredentialsBlob
*r
)
1696 if (ndr_flags
& NDR_SCALARS
) {
1697 NDR_CHECK(ndr_push_align(ndr
, 4));
1698 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1699 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_supplementalCredentialsSubBlob(&r
->sub
, ndr
->iconv_convenience
, ndr
->flags
)));
1700 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1702 struct ndr_push
*_ndr_sub
;
1703 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_sub
, 0, ndr_size_supplementalCredentialsSubBlob(&r
->sub
, ndr
->iconv_convenience
, ndr
->flags
)));
1704 NDR_CHECK(ndr_push_supplementalCredentialsSubBlob(_ndr_sub
, NDR_SCALARS
, &r
->sub
));
1705 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_sub
, 0, ndr_size_supplementalCredentialsSubBlob(&r
->sub
, ndr
->iconv_convenience
, ndr
->flags
)));
1707 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, 0));
1708 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1710 if (ndr_flags
& NDR_BUFFERS
) {
1712 return NDR_ERR_SUCCESS
;
1715 _PUBLIC_
enum ndr_err_code
ndr_pull_supplementalCredentialsBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct supplementalCredentialsBlob
*r
)
1717 if (ndr_flags
& NDR_SCALARS
) {
1718 NDR_CHECK(ndr_pull_align(ndr
, 4));
1719 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
1720 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
1721 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
1723 struct ndr_pull
*_ndr_sub
;
1724 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_sub
, 0, r
->__ndr_size
));
1725 NDR_CHECK(ndr_pull_supplementalCredentialsSubBlob(_ndr_sub
, NDR_SCALARS
, &r
->sub
));
1726 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_sub
, 0, r
->__ndr_size
));
1728 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->unknown3
));
1729 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1731 if (ndr_flags
& NDR_BUFFERS
) {
1733 return NDR_ERR_SUCCESS
;
1736 _PUBLIC_
void ndr_print_supplementalCredentialsBlob(struct ndr_print
*ndr
, const char *name
, const struct supplementalCredentialsBlob
*r
)
1738 ndr_print_struct(ndr
, name
, "supplementalCredentialsBlob");
1740 ndr_print_uint32(ndr
, "unknown1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->unknown1
);
1741 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_supplementalCredentialsSubBlob(&r
->sub
, ndr
->iconv_convenience
, ndr
->flags
):r
->__ndr_size
);
1742 ndr_print_uint32(ndr
, "unknown2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->unknown2
);
1743 ndr_print_supplementalCredentialsSubBlob(ndr
, "sub", &r
->sub
);
1744 ndr_print_uint8(ndr
, "unknown3", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->unknown3
);
1748 _PUBLIC_
enum ndr_err_code
ndr_push_package_PackagesBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct package_PackagesBlob
*r
)
1750 if (ndr_flags
& NDR_SCALARS
) {
1751 NDR_CHECK(ndr_push_align(ndr
, 4));
1753 uint32_t _flags_save_string_array
= ndr
->flags
;
1754 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NOTERM
|LIBNDR_FLAG_REMAINING
);
1755 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->names
));
1756 ndr
->flags
= _flags_save_string_array
;
1758 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1760 if (ndr_flags
& NDR_BUFFERS
) {
1762 return NDR_ERR_SUCCESS
;
1765 _PUBLIC_
enum ndr_err_code
ndr_pull_package_PackagesBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct package_PackagesBlob
*r
)
1767 if (ndr_flags
& NDR_SCALARS
) {
1768 NDR_CHECK(ndr_pull_align(ndr
, 4));
1770 uint32_t _flags_save_string_array
= ndr
->flags
;
1771 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NOTERM
|LIBNDR_FLAG_REMAINING
);
1772 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->names
));
1773 ndr
->flags
= _flags_save_string_array
;
1775 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1777 if (ndr_flags
& NDR_BUFFERS
) {
1779 return NDR_ERR_SUCCESS
;
1782 _PUBLIC_
void ndr_print_package_PackagesBlob(struct ndr_print
*ndr
, const char *name
, const struct package_PackagesBlob
*r
)
1784 ndr_print_struct(ndr
, name
, "package_PackagesBlob");
1786 ndr_print_string_array(ndr
, "names", r
->names
);
1790 static enum ndr_err_code
ndr_push_package_PrimaryKerberosString(struct ndr_push
*ndr
, int ndr_flags
, const struct package_PrimaryKerberosString
*r
)
1792 if (ndr_flags
& NDR_SCALARS
) {
1793 NDR_CHECK(ndr_push_align(ndr
, 5));
1794 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
)));
1795 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
)));
1797 uint32_t _flags_save_string
= ndr
->flags
;
1798 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NOTERM
|LIBNDR_FLAG_REMAINING
);
1799 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->string
));
1800 ndr
->flags
= _flags_save_string
;
1802 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1804 if (ndr_flags
& NDR_BUFFERS
) {
1806 uint32_t _flags_save_string
= ndr
->flags
;
1807 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NOTERM
|LIBNDR_FLAG_REMAINING
);
1809 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->string
));
1811 struct ndr_push
*_ndr_string
;
1812 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_string
, 0, 2 * strlen_m(r
->string
)));
1813 NDR_CHECK(ndr_push_string(_ndr_string
, NDR_SCALARS
, r
->string
));
1814 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_string
, 0, 2 * strlen_m(r
->string
)));
1817 ndr
->flags
= _flags_save_string
;
1820 return NDR_ERR_SUCCESS
;
1823 static enum ndr_err_code
ndr_pull_package_PrimaryKerberosString(struct ndr_pull
*ndr
, int ndr_flags
, struct package_PrimaryKerberosString
*r
)
1825 uint32_t _ptr_string
;
1826 TALLOC_CTX
*_mem_save_string_0
;
1827 if (ndr_flags
& NDR_SCALARS
) {
1828 NDR_CHECK(ndr_pull_align(ndr
, 5));
1829 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
1830 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
1832 uint32_t _flags_save_string
= ndr
->flags
;
1833 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NOTERM
|LIBNDR_FLAG_REMAINING
);
1834 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
1836 NDR_PULL_ALLOC(ndr
, r
->string
);
1837 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->string
, _ptr_string
));
1841 ndr
->flags
= _flags_save_string
;
1843 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1845 if (ndr_flags
& NDR_BUFFERS
) {
1847 uint32_t _flags_save_string
= ndr
->flags
;
1848 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NOTERM
|LIBNDR_FLAG_REMAINING
);
1850 uint32_t _relative_save_offset
;
1851 _relative_save_offset
= ndr
->offset
;
1852 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->string
));
1853 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1854 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
1856 struct ndr_pull
*_ndr_string
;
1857 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_string
, 0, r
->size
));
1858 NDR_CHECK(ndr_pull_string(_ndr_string
, NDR_SCALARS
, &r
->string
));
1859 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_string
, 0, r
->size
));
1861 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
1862 if (ndr
->offset
> ndr
->relative_highest_offset
) {
1863 ndr
->relative_highest_offset
= ndr
->offset
;
1865 ndr
->offset
= _relative_save_offset
;
1867 ndr
->flags
= _flags_save_string
;
1870 return NDR_ERR_SUCCESS
;
1873 _PUBLIC_
void ndr_print_package_PrimaryKerberosString(struct ndr_print
*ndr
, const char *name
, const struct package_PrimaryKerberosString
*r
)
1875 ndr_print_struct(ndr
, name
, "package_PrimaryKerberosString");
1877 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->length
);
1878 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->size
);
1879 ndr_print_ptr(ndr
, "string", r
->string
);
1882 ndr_print_string(ndr
, "string", r
->string
);
1888 static enum ndr_err_code
ndr_push_package_PrimaryKerberosKey3(struct ndr_push
*ndr
, int ndr_flags
, const struct package_PrimaryKerberosKey3
*r
)
1890 if (ndr_flags
& NDR_SCALARS
) {
1891 NDR_CHECK(ndr_push_align(ndr
, 5));
1892 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 0));
1893 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 0));
1894 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1895 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->keytype
));
1896 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, (r
->value
?r
->value
->length
:0)));
1898 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
1899 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
1900 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->value
));
1901 ndr
->flags
= _flags_save_DATA_BLOB
;
1903 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1905 if (ndr_flags
& NDR_BUFFERS
) {
1907 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
1908 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
1910 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->value
));
1912 struct ndr_push
*_ndr_value
;
1913 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_value
, 0, (r
->value
?r
->value
->length
:0)));
1914 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value
, NDR_SCALARS
, *r
->value
));
1915 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_value
, 0, (r
->value
?r
->value
->length
:0)));
1918 ndr
->flags
= _flags_save_DATA_BLOB
;
1921 return NDR_ERR_SUCCESS
;
1924 static enum ndr_err_code
ndr_pull_package_PrimaryKerberosKey3(struct ndr_pull
*ndr
, int ndr_flags
, struct package_PrimaryKerberosKey3
*r
)
1926 uint32_t _ptr_value
;
1927 TALLOC_CTX
*_mem_save_value_0
;
1928 if (ndr_flags
& NDR_SCALARS
) {
1929 NDR_CHECK(ndr_pull_align(ndr
, 5));
1930 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved1
));
1931 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved2
));
1932 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved3
));
1933 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->keytype
));
1934 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->value_len
));
1936 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
1937 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
1938 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_value
));
1940 NDR_PULL_ALLOC(ndr
, r
->value
);
1941 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->value
, _ptr_value
));
1945 ndr
->flags
= _flags_save_DATA_BLOB
;
1947 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1949 if (ndr_flags
& NDR_BUFFERS
) {
1951 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
1952 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
1954 uint32_t _relative_save_offset
;
1955 _relative_save_offset
= ndr
->offset
;
1956 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->value
));
1957 _mem_save_value_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1958 NDR_PULL_SET_MEM_CTX(ndr
, r
->value
, 0);
1960 struct ndr_pull
*_ndr_value
;
1961 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_value
, 0, r
->value_len
));
1962 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value
, NDR_SCALARS
, r
->value
));
1963 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_value
, 0, r
->value_len
));
1965 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_value_0
, 0);
1966 if (ndr
->offset
> ndr
->relative_highest_offset
) {
1967 ndr
->relative_highest_offset
= ndr
->offset
;
1969 ndr
->offset
= _relative_save_offset
;
1971 ndr
->flags
= _flags_save_DATA_BLOB
;
1974 return NDR_ERR_SUCCESS
;
1977 _PUBLIC_
void ndr_print_package_PrimaryKerberosKey3(struct ndr_print
*ndr
, const char *name
, const struct package_PrimaryKerberosKey3
*r
)
1979 ndr_print_struct(ndr
, name
, "package_PrimaryKerberosKey3");
1981 ndr_print_uint16(ndr
, "reserved1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved1
);
1982 ndr_print_uint16(ndr
, "reserved2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved2
);
1983 ndr_print_uint32(ndr
, "reserved3", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved3
);
1984 ndr_print_uint32(ndr
, "keytype", r
->keytype
);
1985 ndr_print_uint32(ndr
, "value_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?(r
->value
?r
->value
->length
:0):r
->value_len
);
1986 ndr_print_ptr(ndr
, "value", r
->value
);
1989 ndr_print_DATA_BLOB(ndr
, "value", *r
->value
);
1995 static enum ndr_err_code
ndr_push_package_PrimaryKerberosCtr3(struct ndr_push
*ndr
, int ndr_flags
, const struct package_PrimaryKerberosCtr3
*r
)
1997 uint32_t cntr_keys_0
;
1998 uint32_t cntr_old_keys_0
;
1999 if (ndr_flags
& NDR_SCALARS
) {
2000 NDR_CHECK(ndr_push_align(ndr
, 5));
2001 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_keys
));
2002 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_old_keys
));
2003 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr
, NDR_SCALARS
, &r
->salt
));
2004 for (cntr_keys_0
= 0; cntr_keys_0
< r
->num_keys
; cntr_keys_0
++) {
2005 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr
, NDR_SCALARS
, &r
->keys
[cntr_keys_0
]));
2007 for (cntr_old_keys_0
= 0; cntr_old_keys_0
< r
->num_old_keys
; cntr_old_keys_0
++) {
2008 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr
, NDR_SCALARS
, &r
->old_keys
[cntr_old_keys_0
]));
2010 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2011 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2012 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2013 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2014 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2015 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2017 if (ndr_flags
& NDR_BUFFERS
) {
2018 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr
, NDR_BUFFERS
, &r
->salt
));
2019 for (cntr_keys_0
= 0; cntr_keys_0
< r
->num_keys
; cntr_keys_0
++) {
2020 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr
, NDR_BUFFERS
, &r
->keys
[cntr_keys_0
]));
2022 for (cntr_old_keys_0
= 0; cntr_old_keys_0
< r
->num_old_keys
; cntr_old_keys_0
++) {
2023 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr
, NDR_BUFFERS
, &r
->old_keys
[cntr_old_keys_0
]));
2026 return NDR_ERR_SUCCESS
;
2029 static enum ndr_err_code
ndr_pull_package_PrimaryKerberosCtr3(struct ndr_pull
*ndr
, int ndr_flags
, struct package_PrimaryKerberosCtr3
*r
)
2031 uint32_t cntr_keys_0
;
2032 TALLOC_CTX
*_mem_save_keys_0
;
2033 uint32_t cntr_old_keys_0
;
2034 TALLOC_CTX
*_mem_save_old_keys_0
;
2035 if (ndr_flags
& NDR_SCALARS
) {
2036 NDR_CHECK(ndr_pull_align(ndr
, 5));
2037 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_keys
));
2038 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_old_keys
));
2039 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr
, NDR_SCALARS
, &r
->salt
));
2040 NDR_PULL_ALLOC_N(ndr
, r
->keys
, r
->num_keys
);
2041 _mem_save_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2042 NDR_PULL_SET_MEM_CTX(ndr
, r
->keys
, 0);
2043 for (cntr_keys_0
= 0; cntr_keys_0
< r
->num_keys
; cntr_keys_0
++) {
2044 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr
, NDR_SCALARS
, &r
->keys
[cntr_keys_0
]));
2046 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keys_0
, 0);
2047 NDR_PULL_ALLOC_N(ndr
, r
->old_keys
, r
->num_old_keys
);
2048 _mem_save_old_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2049 NDR_PULL_SET_MEM_CTX(ndr
, r
->old_keys
, 0);
2050 for (cntr_old_keys_0
= 0; cntr_old_keys_0
< r
->num_old_keys
; cntr_old_keys_0
++) {
2051 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr
, NDR_SCALARS
, &r
->old_keys
[cntr_old_keys_0
]));
2053 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_keys_0
, 0);
2054 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->padding1
));
2055 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->padding2
));
2056 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->padding3
));
2057 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->padding4
));
2058 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->padding5
));
2059 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2061 if (ndr_flags
& NDR_BUFFERS
) {
2062 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr
, NDR_BUFFERS
, &r
->salt
));
2063 _mem_save_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2064 NDR_PULL_SET_MEM_CTX(ndr
, r
->keys
, 0);
2065 for (cntr_keys_0
= 0; cntr_keys_0
< r
->num_keys
; cntr_keys_0
++) {
2066 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr
, NDR_BUFFERS
, &r
->keys
[cntr_keys_0
]));
2068 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keys_0
, 0);
2069 _mem_save_old_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2070 NDR_PULL_SET_MEM_CTX(ndr
, r
->old_keys
, 0);
2071 for (cntr_old_keys_0
= 0; cntr_old_keys_0
< r
->num_old_keys
; cntr_old_keys_0
++) {
2072 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr
, NDR_BUFFERS
, &r
->old_keys
[cntr_old_keys_0
]));
2074 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_keys_0
, 0);
2076 return NDR_ERR_SUCCESS
;
2079 _PUBLIC_
void ndr_print_package_PrimaryKerberosCtr3(struct ndr_print
*ndr
, const char *name
, const struct package_PrimaryKerberosCtr3
*r
)
2081 uint32_t cntr_keys_0
;
2082 uint32_t cntr_old_keys_0
;
2083 ndr_print_struct(ndr
, name
, "package_PrimaryKerberosCtr3");
2085 ndr_print_uint16(ndr
, "num_keys", r
->num_keys
);
2086 ndr_print_uint16(ndr
, "num_old_keys", r
->num_old_keys
);
2087 ndr_print_package_PrimaryKerberosString(ndr
, "salt", &r
->salt
);
2088 ndr
->print(ndr
, "%s: ARRAY(%d)", "keys", (int)r
->num_keys
);
2090 for (cntr_keys_0
=0;cntr_keys_0
<r
->num_keys
;cntr_keys_0
++) {
2092 if (asprintf(&idx_0
, "[%d]", cntr_keys_0
) != -1) {
2093 ndr_print_package_PrimaryKerberosKey3(ndr
, "keys", &r
->keys
[cntr_keys_0
]);
2098 ndr
->print(ndr
, "%s: ARRAY(%d)", "old_keys", (int)r
->num_old_keys
);
2100 for (cntr_old_keys_0
=0;cntr_old_keys_0
<r
->num_old_keys
;cntr_old_keys_0
++) {
2102 if (asprintf(&idx_0
, "[%d]", cntr_old_keys_0
) != -1) {
2103 ndr_print_package_PrimaryKerberosKey3(ndr
, "old_keys", &r
->old_keys
[cntr_old_keys_0
]);
2108 ndr_print_uint32(ndr
, "padding1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->padding1
);
2109 ndr_print_uint32(ndr
, "padding2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->padding2
);
2110 ndr_print_uint32(ndr
, "padding3", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->padding3
);
2111 ndr_print_uint32(ndr
, "padding4", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->padding4
);
2112 ndr_print_uint32(ndr
, "padding5", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->padding5
);
2116 static enum ndr_err_code
ndr_push_package_PrimaryKerberosKey4(struct ndr_push
*ndr
, int ndr_flags
, const struct package_PrimaryKerberosKey4
*r
)
2118 if (ndr_flags
& NDR_SCALARS
) {
2119 NDR_CHECK(ndr_push_align(ndr
, 5));
2120 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 0));
2121 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 0));
2122 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->iteration_count
));
2124 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->keytype
));
2125 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, (r
->value
?r
->value
->length
:0)));
2127 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
2128 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
2129 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->value
));
2130 ndr
->flags
= _flags_save_DATA_BLOB
;
2132 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2134 if (ndr_flags
& NDR_BUFFERS
) {
2136 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
2137 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
2139 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->value
));
2141 struct ndr_push
*_ndr_value
;
2142 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_value
, 0, (r
->value
?r
->value
->length
:0)));
2143 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value
, NDR_SCALARS
, *r
->value
));
2144 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_value
, 0, (r
->value
?r
->value
->length
:0)));
2147 ndr
->flags
= _flags_save_DATA_BLOB
;
2150 return NDR_ERR_SUCCESS
;
2153 static enum ndr_err_code
ndr_pull_package_PrimaryKerberosKey4(struct ndr_pull
*ndr
, int ndr_flags
, struct package_PrimaryKerberosKey4
*r
)
2155 uint32_t _ptr_value
;
2156 TALLOC_CTX
*_mem_save_value_0
;
2157 if (ndr_flags
& NDR_SCALARS
) {
2158 NDR_CHECK(ndr_pull_align(ndr
, 5));
2159 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved1
));
2160 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved2
));
2161 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved3
));
2162 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->iteration_count
));
2163 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->keytype
));
2164 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->value_len
));
2166 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
2167 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
2168 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_value
));
2170 NDR_PULL_ALLOC(ndr
, r
->value
);
2171 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->value
, _ptr_value
));
2175 ndr
->flags
= _flags_save_DATA_BLOB
;
2177 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2179 if (ndr_flags
& NDR_BUFFERS
) {
2181 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
2182 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
2184 uint32_t _relative_save_offset
;
2185 _relative_save_offset
= ndr
->offset
;
2186 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->value
));
2187 _mem_save_value_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2188 NDR_PULL_SET_MEM_CTX(ndr
, r
->value
, 0);
2190 struct ndr_pull
*_ndr_value
;
2191 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_value
, 0, r
->value_len
));
2192 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value
, NDR_SCALARS
, r
->value
));
2193 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_value
, 0, r
->value_len
));
2195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_value_0
, 0);
2196 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2197 ndr
->relative_highest_offset
= ndr
->offset
;
2199 ndr
->offset
= _relative_save_offset
;
2201 ndr
->flags
= _flags_save_DATA_BLOB
;
2204 return NDR_ERR_SUCCESS
;
2207 _PUBLIC_
void ndr_print_package_PrimaryKerberosKey4(struct ndr_print
*ndr
, const char *name
, const struct package_PrimaryKerberosKey4
*r
)
2209 ndr_print_struct(ndr
, name
, "package_PrimaryKerberosKey4");
2211 ndr_print_uint16(ndr
, "reserved1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved1
);
2212 ndr_print_uint16(ndr
, "reserved2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved2
);
2213 ndr_print_uint32(ndr
, "reserved3", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved3
);
2214 ndr_print_uint32(ndr
, "iteration_count", r
->iteration_count
);
2215 ndr_print_uint32(ndr
, "keytype", r
->keytype
);
2216 ndr_print_uint32(ndr
, "value_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?(r
->value
?r
->value
->length
:0):r
->value_len
);
2217 ndr_print_ptr(ndr
, "value", r
->value
);
2220 ndr_print_DATA_BLOB(ndr
, "value", *r
->value
);
2226 static enum ndr_err_code
ndr_push_package_PrimaryKerberosCtr4(struct ndr_push
*ndr
, int ndr_flags
, const struct package_PrimaryKerberosCtr4
*r
)
2228 uint32_t cntr_keys_0
;
2229 uint32_t cntr_old_keys_0
;
2230 uint32_t cntr_older_keys_0
;
2231 if (ndr_flags
& NDR_SCALARS
) {
2232 NDR_CHECK(ndr_push_align(ndr
, 5));
2233 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_keys
));
2234 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 0));
2235 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_old_keys
));
2236 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_older_keys
));
2237 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr
, NDR_SCALARS
, &r
->salt
));
2238 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->default_iteration_count
));
2239 for (cntr_keys_0
= 0; cntr_keys_0
< r
->num_keys
; cntr_keys_0
++) {
2240 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr
, NDR_SCALARS
, &r
->keys
[cntr_keys_0
]));
2242 for (cntr_old_keys_0
= 0; cntr_old_keys_0
< r
->num_old_keys
; cntr_old_keys_0
++) {
2243 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr
, NDR_SCALARS
, &r
->old_keys
[cntr_old_keys_0
]));
2245 for (cntr_older_keys_0
= 0; cntr_older_keys_0
< r
->num_older_keys
; cntr_older_keys_0
++) {
2246 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr
, NDR_SCALARS
, &r
->older_keys
[cntr_older_keys_0
]));
2248 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2250 if (ndr_flags
& NDR_BUFFERS
) {
2251 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr
, NDR_BUFFERS
, &r
->salt
));
2252 for (cntr_keys_0
= 0; cntr_keys_0
< r
->num_keys
; cntr_keys_0
++) {
2253 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr
, NDR_BUFFERS
, &r
->keys
[cntr_keys_0
]));
2255 for (cntr_old_keys_0
= 0; cntr_old_keys_0
< r
->num_old_keys
; cntr_old_keys_0
++) {
2256 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr
, NDR_BUFFERS
, &r
->old_keys
[cntr_old_keys_0
]));
2258 for (cntr_older_keys_0
= 0; cntr_older_keys_0
< r
->num_older_keys
; cntr_older_keys_0
++) {
2259 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr
, NDR_BUFFERS
, &r
->older_keys
[cntr_older_keys_0
]));
2262 return NDR_ERR_SUCCESS
;
2265 static enum ndr_err_code
ndr_pull_package_PrimaryKerberosCtr4(struct ndr_pull
*ndr
, int ndr_flags
, struct package_PrimaryKerberosCtr4
*r
)
2267 uint32_t cntr_keys_0
;
2268 TALLOC_CTX
*_mem_save_keys_0
;
2269 uint32_t cntr_service_keys_0
;
2270 TALLOC_CTX
*_mem_save_service_keys_0
;
2271 uint32_t cntr_old_keys_0
;
2272 TALLOC_CTX
*_mem_save_old_keys_0
;
2273 uint32_t cntr_older_keys_0
;
2274 TALLOC_CTX
*_mem_save_older_keys_0
;
2275 if (ndr_flags
& NDR_SCALARS
) {
2276 NDR_CHECK(ndr_pull_align(ndr
, 5));
2277 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_keys
));
2278 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_service_keys
));
2279 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_old_keys
));
2280 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_older_keys
));
2281 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr
, NDR_SCALARS
, &r
->salt
));
2282 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->default_iteration_count
));
2283 NDR_PULL_ALLOC_N(ndr
, r
->keys
, r
->num_keys
);
2284 _mem_save_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2285 NDR_PULL_SET_MEM_CTX(ndr
, r
->keys
, 0);
2286 for (cntr_keys_0
= 0; cntr_keys_0
< r
->num_keys
; cntr_keys_0
++) {
2287 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr
, NDR_SCALARS
, &r
->keys
[cntr_keys_0
]));
2289 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keys_0
, 0);
2290 NDR_PULL_ALLOC_N(ndr
, r
->service_keys
, r
->num_service_keys
);
2291 _mem_save_service_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2292 NDR_PULL_SET_MEM_CTX(ndr
, r
->service_keys
, 0);
2293 for (cntr_service_keys_0
= 0; cntr_service_keys_0
< r
->num_service_keys
; cntr_service_keys_0
++) {
2294 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr
, NDR_SCALARS
, &r
->service_keys
[cntr_service_keys_0
]));
2296 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_keys_0
, 0);
2297 NDR_PULL_ALLOC_N(ndr
, r
->old_keys
, r
->num_old_keys
);
2298 _mem_save_old_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2299 NDR_PULL_SET_MEM_CTX(ndr
, r
->old_keys
, 0);
2300 for (cntr_old_keys_0
= 0; cntr_old_keys_0
< r
->num_old_keys
; cntr_old_keys_0
++) {
2301 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr
, NDR_SCALARS
, &r
->old_keys
[cntr_old_keys_0
]));
2303 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_keys_0
, 0);
2304 NDR_PULL_ALLOC_N(ndr
, r
->older_keys
, r
->num_older_keys
);
2305 _mem_save_older_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2306 NDR_PULL_SET_MEM_CTX(ndr
, r
->older_keys
, 0);
2307 for (cntr_older_keys_0
= 0; cntr_older_keys_0
< r
->num_older_keys
; cntr_older_keys_0
++) {
2308 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr
, NDR_SCALARS
, &r
->older_keys
[cntr_older_keys_0
]));
2310 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_older_keys_0
, 0);
2311 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2313 if (ndr_flags
& NDR_BUFFERS
) {
2314 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr
, NDR_BUFFERS
, &r
->salt
));
2315 _mem_save_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2316 NDR_PULL_SET_MEM_CTX(ndr
, r
->keys
, 0);
2317 for (cntr_keys_0
= 0; cntr_keys_0
< r
->num_keys
; cntr_keys_0
++) {
2318 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr
, NDR_BUFFERS
, &r
->keys
[cntr_keys_0
]));
2320 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keys_0
, 0);
2321 _mem_save_service_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2322 NDR_PULL_SET_MEM_CTX(ndr
, r
->service_keys
, 0);
2323 for (cntr_service_keys_0
= 0; cntr_service_keys_0
< r
->num_service_keys
; cntr_service_keys_0
++) {
2324 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr
, NDR_BUFFERS
, &r
->service_keys
[cntr_service_keys_0
]));
2326 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_keys_0
, 0);
2327 _mem_save_old_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2328 NDR_PULL_SET_MEM_CTX(ndr
, r
->old_keys
, 0);
2329 for (cntr_old_keys_0
= 0; cntr_old_keys_0
< r
->num_old_keys
; cntr_old_keys_0
++) {
2330 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr
, NDR_BUFFERS
, &r
->old_keys
[cntr_old_keys_0
]));
2332 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_keys_0
, 0);
2333 _mem_save_older_keys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2334 NDR_PULL_SET_MEM_CTX(ndr
, r
->older_keys
, 0);
2335 for (cntr_older_keys_0
= 0; cntr_older_keys_0
< r
->num_older_keys
; cntr_older_keys_0
++) {
2336 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr
, NDR_BUFFERS
, &r
->older_keys
[cntr_older_keys_0
]));
2338 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_older_keys_0
, 0);
2340 return NDR_ERR_SUCCESS
;
2343 _PUBLIC_
void ndr_print_package_PrimaryKerberosCtr4(struct ndr_print
*ndr
, const char *name
, const struct package_PrimaryKerberosCtr4
*r
)
2345 uint32_t cntr_keys_0
;
2346 uint32_t cntr_service_keys_0
;
2347 uint32_t cntr_old_keys_0
;
2348 uint32_t cntr_older_keys_0
;
2349 ndr_print_struct(ndr
, name
, "package_PrimaryKerberosCtr4");
2351 ndr_print_uint16(ndr
, "num_keys", r
->num_keys
);
2352 ndr_print_uint16(ndr
, "num_service_keys", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->num_service_keys
);
2353 ndr_print_uint16(ndr
, "num_old_keys", r
->num_old_keys
);
2354 ndr_print_uint16(ndr
, "num_older_keys", r
->num_older_keys
);
2355 ndr_print_package_PrimaryKerberosString(ndr
, "salt", &r
->salt
);
2356 ndr_print_uint32(ndr
, "default_iteration_count", r
->default_iteration_count
);
2357 ndr
->print(ndr
, "%s: ARRAY(%d)", "keys", (int)r
->num_keys
);
2359 for (cntr_keys_0
=0;cntr_keys_0
<r
->num_keys
;cntr_keys_0
++) {
2361 if (asprintf(&idx_0
, "[%d]", cntr_keys_0
) != -1) {
2362 ndr_print_package_PrimaryKerberosKey4(ndr
, "keys", &r
->keys
[cntr_keys_0
]);
2367 ndr
->print(ndr
, "%s: ARRAY(%d)", "service_keys", (int)r
->num_service_keys
);
2369 for (cntr_service_keys_0
=0;cntr_service_keys_0
<r
->num_service_keys
;cntr_service_keys_0
++) {
2371 if (asprintf(&idx_0
, "[%d]", cntr_service_keys_0
) != -1) {
2372 ndr_print_package_PrimaryKerberosKey4(ndr
, "service_keys", &r
->service_keys
[cntr_service_keys_0
]);
2377 ndr
->print(ndr
, "%s: ARRAY(%d)", "old_keys", (int)r
->num_old_keys
);
2379 for (cntr_old_keys_0
=0;cntr_old_keys_0
<r
->num_old_keys
;cntr_old_keys_0
++) {
2381 if (asprintf(&idx_0
, "[%d]", cntr_old_keys_0
) != -1) {
2382 ndr_print_package_PrimaryKerberosKey4(ndr
, "old_keys", &r
->old_keys
[cntr_old_keys_0
]);
2387 ndr
->print(ndr
, "%s: ARRAY(%d)", "older_keys", (int)r
->num_older_keys
);
2389 for (cntr_older_keys_0
=0;cntr_older_keys_0
<r
->num_older_keys
;cntr_older_keys_0
++) {
2391 if (asprintf(&idx_0
, "[%d]", cntr_older_keys_0
) != -1) {
2392 ndr_print_package_PrimaryKerberosKey4(ndr
, "older_keys", &r
->older_keys
[cntr_older_keys_0
]);
2400 static enum ndr_err_code
ndr_push_package_PrimaryKerberosCtr(struct ndr_push
*ndr
, int ndr_flags
, const union package_PrimaryKerberosCtr
*r
)
2402 if (ndr_flags
& NDR_SCALARS
) {
2403 int level
= ndr_push_get_switch_value(ndr
, r
);
2404 NDR_CHECK(ndr_push_union_align(ndr
, 5));
2407 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr
, NDR_SCALARS
, &r
->ctr3
));
2411 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr
, NDR_SCALARS
, &r
->ctr4
));
2415 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
2418 if (ndr_flags
& NDR_BUFFERS
) {
2419 int level
= ndr_push_get_switch_value(ndr
, r
);
2422 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr
, NDR_BUFFERS
, &r
->ctr3
));
2426 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr
, NDR_BUFFERS
, &r
->ctr4
));
2430 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
2433 return NDR_ERR_SUCCESS
;
2436 static enum ndr_err_code
ndr_pull_package_PrimaryKerberosCtr(struct ndr_pull
*ndr
, int ndr_flags
, union package_PrimaryKerberosCtr
*r
)
2439 level
= ndr_pull_get_switch_value(ndr
, r
);
2440 if (ndr_flags
& NDR_SCALARS
) {
2441 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
2444 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr
, NDR_SCALARS
, &r
->ctr3
));
2448 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr
, NDR_SCALARS
, &r
->ctr4
));
2452 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
2455 if (ndr_flags
& NDR_BUFFERS
) {
2458 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr
, NDR_BUFFERS
, &r
->ctr3
));
2462 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr
, NDR_BUFFERS
, &r
->ctr4
));
2466 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
2469 return NDR_ERR_SUCCESS
;
2472 _PUBLIC_
void ndr_print_package_PrimaryKerberosCtr(struct ndr_print
*ndr
, const char *name
, const union package_PrimaryKerberosCtr
*r
)
2475 level
= ndr_print_get_switch_value(ndr
, r
);
2476 ndr_print_union(ndr
, name
, level
, "package_PrimaryKerberosCtr");
2479 ndr_print_package_PrimaryKerberosCtr3(ndr
, "ctr3", &r
->ctr3
);
2483 ndr_print_package_PrimaryKerberosCtr4(ndr
, "ctr4", &r
->ctr4
);
2487 ndr_print_bad_level(ndr
, name
, level
);
2491 _PUBLIC_
enum ndr_err_code
ndr_push_package_PrimaryKerberosBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct package_PrimaryKerberosBlob
*r
)
2493 if (ndr_flags
& NDR_SCALARS
) {
2494 NDR_CHECK(ndr_push_align(ndr
, 5));
2495 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->version
));
2496 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 0));
2497 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->version
));
2498 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
2499 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2501 if (ndr_flags
& NDR_BUFFERS
) {
2502 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
2504 return NDR_ERR_SUCCESS
;
2507 _PUBLIC_
enum ndr_err_code
ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct package_PrimaryKerberosBlob
*r
)
2509 if (ndr_flags
& NDR_SCALARS
) {
2510 NDR_CHECK(ndr_pull_align(ndr
, 5));
2511 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->version
));
2512 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->flags
));
2513 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->version
));
2514 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
2515 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2517 if (ndr_flags
& NDR_BUFFERS
) {
2518 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
2520 return NDR_ERR_SUCCESS
;
2523 _PUBLIC_
void ndr_print_package_PrimaryKerberosBlob(struct ndr_print
*ndr
, const char *name
, const struct package_PrimaryKerberosBlob
*r
)
2525 ndr_print_struct(ndr
, name
, "package_PrimaryKerberosBlob");
2527 ndr_print_uint16(ndr
, "version", r
->version
);
2528 ndr_print_uint16(ndr
, "flags", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->flags
);
2529 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->version
);
2530 ndr_print_package_PrimaryKerberosCtr(ndr
, "ctr", &r
->ctr
);
2534 _PUBLIC_
enum ndr_err_code
ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct package_PrimaryCLEARTEXTBlob
*r
)
2536 if (ndr_flags
& NDR_SCALARS
) {
2537 NDR_CHECK(ndr_push_align(ndr
, 4));
2539 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
2540 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
2541 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->cleartext
));
2542 ndr
->flags
= _flags_save_DATA_BLOB
;
2544 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2546 if (ndr_flags
& NDR_BUFFERS
) {
2548 return NDR_ERR_SUCCESS
;
2551 _PUBLIC_
enum ndr_err_code
ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct package_PrimaryCLEARTEXTBlob
*r
)
2553 if (ndr_flags
& NDR_SCALARS
) {
2554 NDR_CHECK(ndr_pull_align(ndr
, 4));
2556 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
2557 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
2558 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->cleartext
));
2559 ndr
->flags
= _flags_save_DATA_BLOB
;
2561 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2563 if (ndr_flags
& NDR_BUFFERS
) {
2565 return NDR_ERR_SUCCESS
;
2568 _PUBLIC_
void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print
*ndr
, const char *name
, const struct package_PrimaryCLEARTEXTBlob
*r
)
2570 ndr_print_struct(ndr
, name
, "package_PrimaryCLEARTEXTBlob");
2572 ndr_print_DATA_BLOB(ndr
, "cleartext", r
->cleartext
);
2576 static enum ndr_err_code
ndr_push_package_PrimaryWDigestHash(struct ndr_push
*ndr
, int ndr_flags
, const struct package_PrimaryWDigestHash
*r
)
2579 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2580 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2581 if (ndr_flags
& NDR_SCALARS
) {
2582 NDR_CHECK(ndr_push_align(ndr
, 1));
2583 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->hash
, 16));
2584 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
2586 if (ndr_flags
& NDR_BUFFERS
) {
2588 ndr
->flags
= _flags_save_STRUCT
;
2590 return NDR_ERR_SUCCESS
;
2593 static enum ndr_err_code
ndr_pull_package_PrimaryWDigestHash(struct ndr_pull
*ndr
, int ndr_flags
, struct package_PrimaryWDigestHash
*r
)
2596 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2597 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2598 if (ndr_flags
& NDR_SCALARS
) {
2599 NDR_CHECK(ndr_pull_align(ndr
, 1));
2600 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->hash
, 16));
2601 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
2603 if (ndr_flags
& NDR_BUFFERS
) {
2605 ndr
->flags
= _flags_save_STRUCT
;
2607 return NDR_ERR_SUCCESS
;
2610 _PUBLIC_
void ndr_print_package_PrimaryWDigestHash(struct ndr_print
*ndr
, const char *name
, const struct package_PrimaryWDigestHash
*r
)
2612 ndr_print_struct(ndr
, name
, "package_PrimaryWDigestHash");
2614 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2615 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2617 ndr_print_array_uint8(ndr
, "hash", r
->hash
, 16);
2619 ndr
->flags
= _flags_save_STRUCT
;
2623 _PUBLIC_
enum ndr_err_code
ndr_push_package_PrimaryWDigestBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct package_PrimaryWDigestBlob
*r
)
2625 uint32_t cntr_hashes_0
;
2626 if (ndr_flags
& NDR_SCALARS
) {
2627 NDR_CHECK(ndr_push_align(ndr
, 4));
2628 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 0x31));
2629 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, 0x01));
2630 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->num_hashes
));
2631 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2632 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, 0));
2633 for (cntr_hashes_0
= 0; cntr_hashes_0
< r
->num_hashes
; cntr_hashes_0
++) {
2634 NDR_CHECK(ndr_push_package_PrimaryWDigestHash(ndr
, NDR_SCALARS
, &r
->hashes
[cntr_hashes_0
]));
2636 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2638 if (ndr_flags
& NDR_BUFFERS
) {
2640 return NDR_ERR_SUCCESS
;
2643 _PUBLIC_
enum ndr_err_code
ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct package_PrimaryWDigestBlob
*r
)
2645 uint32_t cntr_hashes_0
;
2646 TALLOC_CTX
*_mem_save_hashes_0
;
2647 if (ndr_flags
& NDR_SCALARS
) {
2648 NDR_CHECK(ndr_pull_align(ndr
, 4));
2649 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown1
));
2650 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->unknown2
));
2651 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->num_hashes
));
2652 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown3
));
2653 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->uuknown4
));
2654 NDR_PULL_ALLOC_N(ndr
, r
->hashes
, r
->num_hashes
);
2655 _mem_save_hashes_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2656 NDR_PULL_SET_MEM_CTX(ndr
, r
->hashes
, 0);
2657 for (cntr_hashes_0
= 0; cntr_hashes_0
< r
->num_hashes
; cntr_hashes_0
++) {
2658 NDR_CHECK(ndr_pull_package_PrimaryWDigestHash(ndr
, NDR_SCALARS
, &r
->hashes
[cntr_hashes_0
]));
2660 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hashes_0
, 0);
2661 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2663 if (ndr_flags
& NDR_BUFFERS
) {
2665 return NDR_ERR_SUCCESS
;
2668 _PUBLIC_
void ndr_print_package_PrimaryWDigestBlob(struct ndr_print
*ndr
, const char *name
, const struct package_PrimaryWDigestBlob
*r
)
2670 uint32_t cntr_hashes_0
;
2671 ndr_print_struct(ndr
, name
, "package_PrimaryWDigestBlob");
2673 ndr_print_uint16(ndr
, "unknown1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x31:r
->unknown1
);
2674 ndr_print_uint8(ndr
, "unknown2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x01:r
->unknown2
);
2675 ndr_print_uint8(ndr
, "num_hashes", r
->num_hashes
);
2676 ndr_print_uint32(ndr
, "unknown3", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->unknown3
);
2677 ndr_print_udlong(ndr
, "uuknown4", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->uuknown4
);
2678 ndr
->print(ndr
, "%s: ARRAY(%d)", "hashes", (int)r
->num_hashes
);
2680 for (cntr_hashes_0
=0;cntr_hashes_0
<r
->num_hashes
;cntr_hashes_0
++) {
2682 if (asprintf(&idx_0
, "[%d]", cntr_hashes_0
) != -1) {
2683 ndr_print_package_PrimaryWDigestHash(ndr
, "hashes", &r
->hashes
[cntr_hashes_0
]);
2691 static enum ndr_err_code
ndr_push_AuthInfoNone(struct ndr_push
*ndr
, int ndr_flags
, const struct AuthInfoNone
*r
)
2693 if (ndr_flags
& NDR_SCALARS
) {
2694 NDR_CHECK(ndr_push_align(ndr
, 4));
2695 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2696 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2698 if (ndr_flags
& NDR_BUFFERS
) {
2700 return NDR_ERR_SUCCESS
;
2703 static enum ndr_err_code
ndr_pull_AuthInfoNone(struct ndr_pull
*ndr
, int ndr_flags
, struct AuthInfoNone
*r
)
2705 if (ndr_flags
& NDR_SCALARS
) {
2706 NDR_CHECK(ndr_pull_align(ndr
, 4));
2707 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2708 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2710 if (ndr_flags
& NDR_BUFFERS
) {
2712 return NDR_ERR_SUCCESS
;
2715 _PUBLIC_
void ndr_print_AuthInfoNone(struct ndr_print
*ndr
, const char *name
, const struct AuthInfoNone
*r
)
2717 ndr_print_struct(ndr
, name
, "AuthInfoNone");
2719 ndr_print_uint32(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->size
);
2723 static enum ndr_err_code
ndr_push_AuthInfoNT4Owf(struct ndr_push
*ndr
, int ndr_flags
, const struct AuthInfoNT4Owf
*r
)
2725 if (ndr_flags
& NDR_SCALARS
) {
2726 NDR_CHECK(ndr_push_align(ndr
, 4));
2727 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 16));
2728 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, &r
->password
));
2729 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2731 if (ndr_flags
& NDR_BUFFERS
) {
2733 return NDR_ERR_SUCCESS
;
2736 static enum ndr_err_code
ndr_pull_AuthInfoNT4Owf(struct ndr_pull
*ndr
, int ndr_flags
, struct AuthInfoNT4Owf
*r
)
2738 if (ndr_flags
& NDR_SCALARS
) {
2739 NDR_CHECK(ndr_pull_align(ndr
, 4));
2740 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2741 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, &r
->password
));
2742 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2744 if (ndr_flags
& NDR_BUFFERS
) {
2746 return NDR_ERR_SUCCESS
;
2749 _PUBLIC_
void ndr_print_AuthInfoNT4Owf(struct ndr_print
*ndr
, const char *name
, const struct AuthInfoNT4Owf
*r
)
2751 ndr_print_struct(ndr
, name
, "AuthInfoNT4Owf");
2753 ndr_print_uint32(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?16:r
->size
);
2754 ndr_print_samr_Password(ndr
, "password", &r
->password
);
2758 static enum ndr_err_code
ndr_push_AuthInfoClear(struct ndr_push
*ndr
, int ndr_flags
, const struct AuthInfoClear
*r
)
2760 if (ndr_flags
& NDR_SCALARS
) {
2761 NDR_CHECK(ndr_push_align(ndr
, 4));
2762 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2763 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->password
, r
->size
));
2764 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2766 if (ndr_flags
& NDR_BUFFERS
) {
2768 return NDR_ERR_SUCCESS
;
2771 static enum ndr_err_code
ndr_pull_AuthInfoClear(struct ndr_pull
*ndr
, int ndr_flags
, struct AuthInfoClear
*r
)
2773 if (ndr_flags
& NDR_SCALARS
) {
2774 NDR_CHECK(ndr_pull_align(ndr
, 4));
2775 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2776 NDR_PULL_ALLOC_N(ndr
, r
->password
, r
->size
);
2777 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->password
, r
->size
));
2778 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2780 if (ndr_flags
& NDR_BUFFERS
) {
2782 return NDR_ERR_SUCCESS
;
2785 _PUBLIC_
void ndr_print_AuthInfoClear(struct ndr_print
*ndr
, const char *name
, const struct AuthInfoClear
*r
)
2787 ndr_print_struct(ndr
, name
, "AuthInfoClear");
2789 ndr_print_uint32(ndr
, "size", r
->size
);
2790 ndr_print_array_uint8(ndr
, "password", r
->password
, r
->size
);
2794 static enum ndr_err_code
ndr_push_AuthInfoVersion(struct ndr_push
*ndr
, int ndr_flags
, const struct AuthInfoVersion
*r
)
2796 if (ndr_flags
& NDR_SCALARS
) {
2797 NDR_CHECK(ndr_push_align(ndr
, 4));
2798 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 4));
2799 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
2800 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2802 if (ndr_flags
& NDR_BUFFERS
) {
2804 return NDR_ERR_SUCCESS
;
2807 static enum ndr_err_code
ndr_pull_AuthInfoVersion(struct ndr_pull
*ndr
, int ndr_flags
, struct AuthInfoVersion
*r
)
2809 if (ndr_flags
& NDR_SCALARS
) {
2810 NDR_CHECK(ndr_pull_align(ndr
, 4));
2811 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2812 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
2813 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2815 if (ndr_flags
& NDR_BUFFERS
) {
2817 return NDR_ERR_SUCCESS
;
2820 _PUBLIC_
void ndr_print_AuthInfoVersion(struct ndr_print
*ndr
, const char *name
, const struct AuthInfoVersion
*r
)
2822 ndr_print_struct(ndr
, name
, "AuthInfoVersion");
2824 ndr_print_uint32(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?4:r
->size
);
2825 ndr_print_uint32(ndr
, "version", r
->version
);
2829 static enum ndr_err_code
ndr_push_AuthInfo(struct ndr_push
*ndr
, int ndr_flags
, const union AuthInfo
*r
)
2831 if (ndr_flags
& NDR_SCALARS
) {
2832 int level
= ndr_push_get_switch_value(ndr
, r
);
2833 NDR_CHECK(ndr_push_union_align(ndr
, 4));
2835 case TRUST_AUTH_TYPE_NONE
: {
2836 NDR_CHECK(ndr_push_AuthInfoNone(ndr
, NDR_SCALARS
, &r
->none
));
2839 case TRUST_AUTH_TYPE_NT4OWF
: {
2840 NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr
, NDR_SCALARS
, &r
->nt4owf
));
2843 case TRUST_AUTH_TYPE_CLEAR
: {
2844 NDR_CHECK(ndr_push_AuthInfoClear(ndr
, NDR_SCALARS
, &r
->clear
));
2847 case TRUST_AUTH_TYPE_VERSION
: {
2848 NDR_CHECK(ndr_push_AuthInfoVersion(ndr
, NDR_SCALARS
, &r
->version
));
2852 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
2855 if (ndr_flags
& NDR_BUFFERS
) {
2856 int level
= ndr_push_get_switch_value(ndr
, r
);
2858 case TRUST_AUTH_TYPE_NONE
:
2861 case TRUST_AUTH_TYPE_NT4OWF
:
2864 case TRUST_AUTH_TYPE_CLEAR
:
2867 case TRUST_AUTH_TYPE_VERSION
:
2871 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
2874 return NDR_ERR_SUCCESS
;
2877 static enum ndr_err_code
ndr_pull_AuthInfo(struct ndr_pull
*ndr
, int ndr_flags
, union AuthInfo
*r
)
2880 level
= ndr_pull_get_switch_value(ndr
, r
);
2881 if (ndr_flags
& NDR_SCALARS
) {
2882 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
2884 case TRUST_AUTH_TYPE_NONE
: {
2885 NDR_CHECK(ndr_pull_AuthInfoNone(ndr
, NDR_SCALARS
, &r
->none
));
2888 case TRUST_AUTH_TYPE_NT4OWF
: {
2889 NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr
, NDR_SCALARS
, &r
->nt4owf
));
2892 case TRUST_AUTH_TYPE_CLEAR
: {
2893 NDR_CHECK(ndr_pull_AuthInfoClear(ndr
, NDR_SCALARS
, &r
->clear
));
2896 case TRUST_AUTH_TYPE_VERSION
: {
2897 NDR_CHECK(ndr_pull_AuthInfoVersion(ndr
, NDR_SCALARS
, &r
->version
));
2901 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
2904 if (ndr_flags
& NDR_BUFFERS
) {
2906 case TRUST_AUTH_TYPE_NONE
:
2909 case TRUST_AUTH_TYPE_NT4OWF
:
2912 case TRUST_AUTH_TYPE_CLEAR
:
2915 case TRUST_AUTH_TYPE_VERSION
:
2919 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
2922 return NDR_ERR_SUCCESS
;
2925 _PUBLIC_
void ndr_print_AuthInfo(struct ndr_print
*ndr
, const char *name
, const union AuthInfo
*r
)
2928 level
= ndr_print_get_switch_value(ndr
, r
);
2929 ndr_print_union(ndr
, name
, level
, "AuthInfo");
2931 case TRUST_AUTH_TYPE_NONE
:
2932 ndr_print_AuthInfoNone(ndr
, "none", &r
->none
);
2935 case TRUST_AUTH_TYPE_NT4OWF
:
2936 ndr_print_AuthInfoNT4Owf(ndr
, "nt4owf", &r
->nt4owf
);
2939 case TRUST_AUTH_TYPE_CLEAR
:
2940 ndr_print_AuthInfoClear(ndr
, "clear", &r
->clear
);
2943 case TRUST_AUTH_TYPE_VERSION
:
2944 ndr_print_AuthInfoVersion(ndr
, "version", &r
->version
);
2948 ndr_print_bad_level(ndr
, name
, level
);
2952 _PUBLIC_
enum ndr_err_code
ndr_push_AuthenticationInformation(struct ndr_push
*ndr
, int ndr_flags
, const struct AuthenticationInformation
*r
)
2954 if (ndr_flags
& NDR_SCALARS
) {
2955 NDR_CHECK(ndr_push_align(ndr
, 4));
2956 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->LastUpdateTime
));
2957 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr
, NDR_SCALARS
, r
->AuthType
));
2958 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->AuthInfo
, r
->AuthType
));
2959 NDR_CHECK(ndr_push_AuthInfo(ndr
, NDR_SCALARS
, &r
->AuthInfo
));
2961 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
2962 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2963 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->_pad
));
2964 ndr
->flags
= _flags_save_DATA_BLOB
;
2966 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2968 if (ndr_flags
& NDR_BUFFERS
) {
2970 return NDR_ERR_SUCCESS
;
2973 _PUBLIC_
enum ndr_err_code
ndr_pull_AuthenticationInformation(struct ndr_pull
*ndr
, int ndr_flags
, struct AuthenticationInformation
*r
)
2975 if (ndr_flags
& NDR_SCALARS
) {
2976 NDR_CHECK(ndr_pull_align(ndr
, 4));
2977 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->LastUpdateTime
));
2978 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr
, NDR_SCALARS
, &r
->AuthType
));
2979 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->AuthInfo
, r
->AuthType
));
2980 NDR_CHECK(ndr_pull_AuthInfo(ndr
, NDR_SCALARS
, &r
->AuthInfo
));
2982 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
2983 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2984 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->_pad
));
2985 ndr
->flags
= _flags_save_DATA_BLOB
;
2987 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2989 if (ndr_flags
& NDR_BUFFERS
) {
2991 return NDR_ERR_SUCCESS
;
2994 _PUBLIC_
void ndr_print_AuthenticationInformation(struct ndr_print
*ndr
, const char *name
, const struct AuthenticationInformation
*r
)
2996 ndr_print_struct(ndr
, name
, "AuthenticationInformation");
2998 ndr_print_NTTIME(ndr
, "LastUpdateTime", r
->LastUpdateTime
);
2999 ndr_print_lsa_TrustAuthType(ndr
, "AuthType", r
->AuthType
);
3000 ndr_print_set_switch_value(ndr
, &r
->AuthInfo
, r
->AuthType
);
3001 ndr_print_AuthInfo(ndr
, "AuthInfo", &r
->AuthInfo
);
3002 ndr_print_DATA_BLOB(ndr
, "_pad", r
->_pad
);
3006 _PUBLIC_
size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob
*r
, struct smb_iconv_convenience
*ic
, int flags
)
3008 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_trustAuthInOutBlob
, ic
);
3011 _PUBLIC_
enum ndr_err_code
ndr_push_trustCurrentPasswords(struct ndr_push
*ndr
, int ndr_flags
, const struct trustCurrentPasswords
*r
)
3013 uint32_t cntr_current_0
;
3014 if (ndr_flags
& NDR_SCALARS
) {
3015 NDR_CHECK(ndr_push_align(ndr
, 5));
3016 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3017 for (cntr_current_0
= 0; cntr_current_0
< r
->count
; cntr_current_0
++) {
3018 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->current
[cntr_current_0
]));
3020 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3022 if (ndr_flags
& NDR_BUFFERS
) {
3023 for (cntr_current_0
= 0; cntr_current_0
< r
->count
; cntr_current_0
++) {
3024 if (r
->current
[cntr_current_0
]) {
3025 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->current
[cntr_current_0
]));
3026 NDR_CHECK(ndr_push_AuthenticationInformation(ndr
, NDR_SCALARS
, r
->current
[cntr_current_0
]));
3030 return NDR_ERR_SUCCESS
;
3033 _PUBLIC_
enum ndr_err_code
ndr_pull_trustCurrentPasswords(struct ndr_pull
*ndr
, int ndr_flags
, struct trustCurrentPasswords
*r
)
3035 uint32_t _ptr_current
;
3036 uint32_t cntr_current_0
;
3037 TALLOC_CTX
*_mem_save_current_0
;
3038 TALLOC_CTX
*_mem_save_current_1
;
3039 if (ndr_flags
& NDR_SCALARS
) {
3040 NDR_CHECK(ndr_pull_align(ndr
, 5));
3041 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
3042 NDR_PULL_ALLOC_N(ndr
, r
->current
, r
->count
);
3043 _mem_save_current_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3044 NDR_PULL_SET_MEM_CTX(ndr
, r
->current
, 0);
3045 for (cntr_current_0
= 0; cntr_current_0
< r
->count
; cntr_current_0
++) {
3046 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_current
));
3048 NDR_PULL_ALLOC(ndr
, r
->current
[cntr_current_0
]);
3049 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->current
[cntr_current_0
], _ptr_current
));
3051 r
->current
[cntr_current_0
] = NULL
;
3054 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_current_0
, 0);
3055 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3057 if (ndr_flags
& NDR_BUFFERS
) {
3058 _mem_save_current_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3059 NDR_PULL_SET_MEM_CTX(ndr
, r
->current
, 0);
3060 for (cntr_current_0
= 0; cntr_current_0
< r
->count
; cntr_current_0
++) {
3061 if (r
->current
[cntr_current_0
]) {
3062 uint32_t _relative_save_offset
;
3063 _relative_save_offset
= ndr
->offset
;
3064 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->current
[cntr_current_0
]));
3065 _mem_save_current_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3066 NDR_PULL_SET_MEM_CTX(ndr
, r
->current
[cntr_current_0
], 0);
3067 NDR_CHECK(ndr_pull_AuthenticationInformation(ndr
, NDR_SCALARS
, r
->current
[cntr_current_0
]));
3068 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_current_1
, 0);
3069 if (ndr
->offset
> ndr
->relative_highest_offset
) {
3070 ndr
->relative_highest_offset
= ndr
->offset
;
3072 ndr
->offset
= _relative_save_offset
;
3075 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_current_0
, 0);
3077 return NDR_ERR_SUCCESS
;
3080 _PUBLIC_
void ndr_print_trustCurrentPasswords(struct ndr_print
*ndr
, const char *name
, const struct trustCurrentPasswords
*r
)
3082 uint32_t cntr_current_0
;
3083 ndr_print_struct(ndr
, name
, "trustCurrentPasswords");
3085 ndr_print_uint32(ndr
, "count", r
->count
);
3086 ndr
->print(ndr
, "%s: ARRAY(%d)", "current", (int)r
->count
);
3088 for (cntr_current_0
=0;cntr_current_0
<r
->count
;cntr_current_0
++) {
3090 if (asprintf(&idx_0
, "[%d]", cntr_current_0
) != -1) {
3091 ndr_print_ptr(ndr
, "current", r
->current
[cntr_current_0
]);
3093 if (r
->current
[cntr_current_0
]) {
3094 ndr_print_AuthenticationInformation(ndr
, "current", r
->current
[cntr_current_0
]);
3104 _PUBLIC_
size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords
*r
, struct smb_iconv_convenience
*ic
, int flags
)
3106 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_trustCurrentPasswords
, ic
);
3109 _PUBLIC_
enum ndr_err_code
ndr_push_trustDomainPasswords(struct ndr_push
*ndr
, int ndr_flags
, const struct trustDomainPasswords
*r
)
3111 if (ndr_flags
& NDR_SCALARS
) {
3112 NDR_CHECK(ndr_push_align(ndr
, 5));
3113 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->confounder
, 512));
3115 struct ndr_push
*_ndr_outgoing
;
3116 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_outgoing
, 0, ndr_size_trustCurrentPasswords(&r
->outgoing
, ndr
->iconv_convenience
, ndr
->flags
)));
3117 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing
, NDR_SCALARS
|NDR_BUFFERS
, &r
->outgoing
));
3118 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_outgoing
, 0, ndr_size_trustCurrentPasswords(&r
->outgoing
, ndr
->iconv_convenience
, ndr
->flags
)));
3121 struct ndr_push
*_ndr_incoming
;
3122 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_incoming
, 0, ndr_size_trustCurrentPasswords(&r
->incoming
, ndr
->iconv_convenience
, ndr
->flags
)));
3123 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming
, NDR_SCALARS
|NDR_BUFFERS
, &r
->incoming
));
3124 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_incoming
, 0, ndr_size_trustCurrentPasswords(&r
->incoming
, ndr
->iconv_convenience
, ndr
->flags
)));
3126 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_trustCurrentPasswords(&r
->outgoing
, ndr
->iconv_convenience
, ndr
->flags
)));
3127 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_trustCurrentPasswords(&r
->incoming
, ndr
->iconv_convenience
, ndr
->flags
)));
3128 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3130 if (ndr_flags
& NDR_BUFFERS
) {
3132 return NDR_ERR_SUCCESS
;
3135 _PUBLIC_
void ndr_print_trustDomainPasswords(struct ndr_print
*ndr
, const char *name
, const struct trustDomainPasswords
*r
)
3137 ndr_print_struct(ndr
, name
, "trustDomainPasswords");
3139 ndr_print_array_uint8(ndr
, "confounder", r
->confounder
, 512);
3140 ndr_print_trustCurrentPasswords(ndr
, "outgoing", &r
->outgoing
);
3141 ndr_print_trustCurrentPasswords(ndr
, "incoming", &r
->incoming
);
3142 ndr_print_uint32(ndr
, "outgoing_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_trustCurrentPasswords(&r
->outgoing
, ndr
->iconv_convenience
, ndr
->flags
):r
->outgoing_size
);
3143 ndr_print_uint32(ndr
, "incoming_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_trustCurrentPasswords(&r
->incoming
, ndr
->iconv_convenience
, ndr
->flags
):r
->incoming_size
);
3147 _PUBLIC_
enum ndr_err_code
ndr_push_DsCompressedChunk(struct ndr_push
*ndr
, int ndr_flags
, const struct DsCompressedChunk
*r
)
3149 if (ndr_flags
& NDR_SCALARS
) {
3150 NDR_CHECK(ndr_push_align(ndr
, 4));
3151 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->marker
));
3152 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->data
));
3153 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
3155 if (ndr_flags
& NDR_BUFFERS
) {
3157 return NDR_ERR_SUCCESS
;
3160 _PUBLIC_
enum ndr_err_code
ndr_pull_DsCompressedChunk(struct ndr_pull
*ndr
, int ndr_flags
, struct DsCompressedChunk
*r
)
3162 if (ndr_flags
& NDR_SCALARS
) {
3163 NDR_CHECK(ndr_pull_align(ndr
, 4));
3164 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->marker
));
3165 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->data
));
3166 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
3168 if (ndr_flags
& NDR_BUFFERS
) {
3170 return NDR_ERR_SUCCESS
;
3173 _PUBLIC_
void ndr_print_DsCompressedChunk(struct ndr_print
*ndr
, const char *name
, const struct DsCompressedChunk
*r
)
3175 ndr_print_struct(ndr
, name
, "DsCompressedChunk");
3177 ndr_print_uint32(ndr
, "marker", r
->marker
);
3178 ndr_print_DATA_BLOB(ndr
, "data", r
->data
);
3182 static enum ndr_err_code
ndr_push_ExtendedErrorAString(struct ndr_push
*ndr
, int ndr_flags
, const struct ExtendedErrorAString
*r
)
3184 if (ndr_flags
& NDR_SCALARS
) {
3185 NDR_CHECK(ndr_push_align(ndr
, 5));
3186 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->__size
));
3187 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
3188 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3190 if (ndr_flags
& NDR_BUFFERS
) {
3192 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->__size
));
3193 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, r
->__size
, sizeof(uint8_t), CH_DOS
));
3196 return NDR_ERR_SUCCESS
;
3199 static enum ndr_err_code
ndr_pull_ExtendedErrorAString(struct ndr_pull
*ndr
, int ndr_flags
, struct ExtendedErrorAString
*r
)
3201 uint32_t _ptr_string
;
3202 TALLOC_CTX
*_mem_save_string_0
;
3203 if (ndr_flags
& NDR_SCALARS
) {
3204 NDR_CHECK(ndr_pull_align(ndr
, 5));
3205 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->__size
));
3206 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
3208 NDR_PULL_ALLOC(ndr
, r
->string
);
3212 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3214 if (ndr_flags
& NDR_BUFFERS
) {
3216 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3217 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
3218 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
3219 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_size(ndr
, &r
->string
), sizeof(uint8_t), CH_DOS
));
3220 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
3223 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->__size
));
3226 return NDR_ERR_SUCCESS
;
3229 _PUBLIC_
void ndr_print_ExtendedErrorAString(struct ndr_print
*ndr
, const char *name
, const struct ExtendedErrorAString
*r
)
3231 ndr_print_struct(ndr
, name
, "ExtendedErrorAString");
3233 ndr_print_uint16(ndr
, "__size", r
->__size
);
3234 ndr_print_ptr(ndr
, "string", r
->string
);
3237 ndr_print_string(ndr
, "string", r
->string
);
3243 static enum ndr_err_code
ndr_push_ExtendedErrorUString(struct ndr_push
*ndr
, int ndr_flags
, const struct ExtendedErrorUString
*r
)
3245 if (ndr_flags
& NDR_SCALARS
) {
3246 NDR_CHECK(ndr_push_align(ndr
, 5));
3247 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->__size
));
3248 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
3249 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3251 if (ndr_flags
& NDR_BUFFERS
) {
3253 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->__size
));
3254 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, r
->__size
, sizeof(uint16_t), CH_UTF16
));
3257 return NDR_ERR_SUCCESS
;
3260 static enum ndr_err_code
ndr_pull_ExtendedErrorUString(struct ndr_pull
*ndr
, int ndr_flags
, struct ExtendedErrorUString
*r
)
3262 uint32_t _ptr_string
;
3263 TALLOC_CTX
*_mem_save_string_0
;
3264 if (ndr_flags
& NDR_SCALARS
) {
3265 NDR_CHECK(ndr_pull_align(ndr
, 5));
3266 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->__size
));
3267 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
3269 NDR_PULL_ALLOC(ndr
, r
->string
);
3273 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3275 if (ndr_flags
& NDR_BUFFERS
) {
3277 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3278 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
3279 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
3280 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_size(ndr
, &r
->string
), sizeof(uint16_t), CH_UTF16
));
3281 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
3284 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->__size
));
3287 return NDR_ERR_SUCCESS
;
3290 _PUBLIC_
void ndr_print_ExtendedErrorUString(struct ndr_print
*ndr
, const char *name
, const struct ExtendedErrorUString
*r
)
3292 ndr_print_struct(ndr
, name
, "ExtendedErrorUString");
3294 ndr_print_uint16(ndr
, "__size", r
->__size
);
3295 ndr_print_ptr(ndr
, "string", r
->string
);
3298 ndr_print_string(ndr
, "string", r
->string
);
3304 static enum ndr_err_code
ndr_push_ExtendedErrorBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct ExtendedErrorBlob
*r
)
3306 if (ndr_flags
& NDR_SCALARS
) {
3307 NDR_CHECK(ndr_push_align(ndr
, 5));
3308 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->length
));
3309 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
3310 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3312 if (ndr_flags
& NDR_BUFFERS
) {
3314 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->length
));
3315 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
3318 return NDR_ERR_SUCCESS
;
3321 static enum ndr_err_code
ndr_pull_ExtendedErrorBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct ExtendedErrorBlob
*r
)
3324 TALLOC_CTX
*_mem_save_data_0
;
3325 if (ndr_flags
& NDR_SCALARS
) {
3326 NDR_CHECK(ndr_pull_align(ndr
, 5));
3327 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
3328 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
3330 NDR_PULL_ALLOC(ndr
, r
->data
);
3334 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3336 if (ndr_flags
& NDR_BUFFERS
) {
3338 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3339 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
3340 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
3341 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
3342 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
3343 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
3346 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
3349 return NDR_ERR_SUCCESS
;
3352 _PUBLIC_
void ndr_print_ExtendedErrorBlob(struct ndr_print
*ndr
, const char *name
, const struct ExtendedErrorBlob
*r
)
3354 ndr_print_struct(ndr
, name
, "ExtendedErrorBlob");
3356 ndr_print_uint16(ndr
, "length", r
->length
);
3357 ndr_print_ptr(ndr
, "data", r
->data
);
3360 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
3366 static enum ndr_err_code
ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push
*ndr
, int ndr_flags
, enum ExtendedErrorComputerNamePresent r
)
3368 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
3369 return NDR_ERR_SUCCESS
;
3372 static enum ndr_err_code
ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull
*ndr
, int ndr_flags
, enum ExtendedErrorComputerNamePresent
*r
)
3375 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
3377 return NDR_ERR_SUCCESS
;
3380 _PUBLIC_
void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print
*ndr
, const char *name
, enum ExtendedErrorComputerNamePresent r
)
3382 const char *val
= NULL
;
3385 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT
: val
= "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break;
3386 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT
: val
= "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break;
3388 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
3391 static enum ndr_err_code
ndr_push_ExtendedErrorComputerNameU(struct ndr_push
*ndr
, int ndr_flags
, const union ExtendedErrorComputerNameU
*r
)
3393 if (ndr_flags
& NDR_SCALARS
) {
3394 int level
= ndr_push_get_switch_value(ndr
, r
);
3395 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr
, NDR_SCALARS
, level
));
3396 NDR_CHECK(ndr_push_union_align(ndr
, 5));
3398 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT
: {
3399 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr
, NDR_SCALARS
, &r
->name
));
3402 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT
: {
3406 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3409 if (ndr_flags
& NDR_BUFFERS
) {
3410 int level
= ndr_push_get_switch_value(ndr
, r
);
3412 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT
:
3413 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr
, NDR_BUFFERS
, &r
->name
));
3416 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT
:
3420 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3423 return NDR_ERR_SUCCESS
;
3426 static enum ndr_err_code
ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull
*ndr
, int ndr_flags
, union ExtendedErrorComputerNameU
*r
)
3430 level
= ndr_pull_get_switch_value(ndr
, r
);
3431 if (ndr_flags
& NDR_SCALARS
) {
3432 NDR_CHECK(ndr_pull_uint1632(ndr
, NDR_SCALARS
, &_level
));
3433 if (_level
!= level
) {
3434 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
3436 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
3438 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT
: {
3439 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr
, NDR_SCALARS
, &r
->name
));
3442 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT
: {
3446 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3449 if (ndr_flags
& NDR_BUFFERS
) {
3451 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT
:
3452 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr
, NDR_BUFFERS
, &r
->name
));
3455 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT
:
3459 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3462 return NDR_ERR_SUCCESS
;
3465 _PUBLIC_
void ndr_print_ExtendedErrorComputerNameU(struct ndr_print
*ndr
, const char *name
, const union ExtendedErrorComputerNameU
*r
)
3468 level
= ndr_print_get_switch_value(ndr
, r
);
3469 ndr_print_union(ndr
, name
, level
, "ExtendedErrorComputerNameU");
3471 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT
:
3472 ndr_print_ExtendedErrorUString(ndr
, "name", &r
->name
);
3475 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT
:
3479 ndr_print_bad_level(ndr
, name
, level
);
3483 static enum ndr_err_code
ndr_push_ExtendedErrorComputerName(struct ndr_push
*ndr
, int ndr_flags
, const struct ExtendedErrorComputerName
*r
)
3485 if (ndr_flags
& NDR_SCALARS
) {
3486 NDR_CHECK(ndr_push_align(ndr
, 5));
3487 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr
, NDR_SCALARS
, r
->present
));
3488 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->n
, r
->present
));
3489 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr
, NDR_SCALARS
, &r
->n
));
3490 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3492 if (ndr_flags
& NDR_BUFFERS
) {
3493 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr
, NDR_BUFFERS
, &r
->n
));
3495 return NDR_ERR_SUCCESS
;
3498 static enum ndr_err_code
ndr_pull_ExtendedErrorComputerName(struct ndr_pull
*ndr
, int ndr_flags
, struct ExtendedErrorComputerName
*r
)
3500 if (ndr_flags
& NDR_SCALARS
) {
3501 NDR_CHECK(ndr_pull_align(ndr
, 5));
3502 NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr
, NDR_SCALARS
, &r
->present
));
3503 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->n
, r
->present
));
3504 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr
, NDR_SCALARS
, &r
->n
));
3505 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3507 if (ndr_flags
& NDR_BUFFERS
) {
3508 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr
, NDR_BUFFERS
, &r
->n
));
3510 return NDR_ERR_SUCCESS
;
3513 _PUBLIC_
void ndr_print_ExtendedErrorComputerName(struct ndr_print
*ndr
, const char *name
, const struct ExtendedErrorComputerName
*r
)
3515 ndr_print_struct(ndr
, name
, "ExtendedErrorComputerName");
3517 ndr_print_ExtendedErrorComputerNamePresent(ndr
, "present", r
->present
);
3518 ndr_print_set_switch_value(ndr
, &r
->n
, r
->present
);
3519 ndr_print_ExtendedErrorComputerNameU(ndr
, "n", &r
->n
);
3523 static enum ndr_err_code
ndr_push_ExtendedErrorParamType(struct ndr_push
*ndr
, int ndr_flags
, enum ExtendedErrorParamType r
)
3525 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
3526 return NDR_ERR_SUCCESS
;
3529 static enum ndr_err_code
ndr_pull_ExtendedErrorParamType(struct ndr_pull
*ndr
, int ndr_flags
, enum ExtendedErrorParamType
*r
)
3532 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
3534 return NDR_ERR_SUCCESS
;
3537 _PUBLIC_
void ndr_print_ExtendedErrorParamType(struct ndr_print
*ndr
, const char *name
, enum ExtendedErrorParamType r
)
3539 const char *val
= NULL
;
3542 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING
: val
= "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break;
3543 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING
: val
= "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break;
3544 case EXTENDED_ERROR_PARAM_TYPE_UINT32
: val
= "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break;
3545 case EXTENDED_ERROR_PARAM_TYPE_UINT16
: val
= "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break;
3546 case EXTENDED_ERROR_PARAM_TYPE_UINT64
: val
= "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break;
3547 case EXTENDED_ERROR_PARAM_TYPE_NONE
: val
= "EXTENDED_ERROR_PARAM_TYPE_NONE"; break;
3548 case EXTENDED_ERROR_PARAM_TYPE_BLOB
: val
= "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break;
3550 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
3553 static enum ndr_err_code
ndr_push_ExtendedErrorParamU(struct ndr_push
*ndr
, int ndr_flags
, const union ExtendedErrorParamU
*r
)
3555 if (ndr_flags
& NDR_SCALARS
) {
3556 int level
= ndr_push_get_switch_value(ndr
, r
);
3557 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr
, NDR_SCALARS
, level
));
3558 NDR_CHECK(ndr_push_union_align(ndr
, 8));
3560 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING
: {
3561 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr
, NDR_SCALARS
, &r
->a_string
));
3564 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING
: {
3565 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr
, NDR_SCALARS
, &r
->u_string
));
3568 case EXTENDED_ERROR_PARAM_TYPE_UINT32
: {
3569 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->uint32
));
3572 case EXTENDED_ERROR_PARAM_TYPE_UINT16
: {
3573 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->uint16
));
3576 case EXTENDED_ERROR_PARAM_TYPE_UINT64
: {
3577 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->uint64
));
3580 case EXTENDED_ERROR_PARAM_TYPE_NONE
: {
3583 case EXTENDED_ERROR_PARAM_TYPE_BLOB
: {
3584 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr
, NDR_SCALARS
, &r
->blob
));
3588 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3591 if (ndr_flags
& NDR_BUFFERS
) {
3592 int level
= ndr_push_get_switch_value(ndr
, r
);
3594 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING
:
3595 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr
, NDR_BUFFERS
, &r
->a_string
));
3598 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING
:
3599 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr
, NDR_BUFFERS
, &r
->u_string
));
3602 case EXTENDED_ERROR_PARAM_TYPE_UINT32
:
3605 case EXTENDED_ERROR_PARAM_TYPE_UINT16
:
3608 case EXTENDED_ERROR_PARAM_TYPE_UINT64
:
3611 case EXTENDED_ERROR_PARAM_TYPE_NONE
:
3614 case EXTENDED_ERROR_PARAM_TYPE_BLOB
:
3615 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr
, NDR_BUFFERS
, &r
->blob
));
3619 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3622 return NDR_ERR_SUCCESS
;
3625 static enum ndr_err_code
ndr_pull_ExtendedErrorParamU(struct ndr_pull
*ndr
, int ndr_flags
, union ExtendedErrorParamU
*r
)
3629 level
= ndr_pull_get_switch_value(ndr
, r
);
3630 if (ndr_flags
& NDR_SCALARS
) {
3631 NDR_CHECK(ndr_pull_uint1632(ndr
, NDR_SCALARS
, &_level
));
3632 if (_level
!= level
) {
3633 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
3635 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
3637 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING
: {
3638 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr
, NDR_SCALARS
, &r
->a_string
));
3641 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING
: {
3642 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr
, NDR_SCALARS
, &r
->u_string
));
3645 case EXTENDED_ERROR_PARAM_TYPE_UINT32
: {
3646 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->uint32
));
3649 case EXTENDED_ERROR_PARAM_TYPE_UINT16
: {
3650 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->uint16
));
3653 case EXTENDED_ERROR_PARAM_TYPE_UINT64
: {
3654 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->uint64
));
3657 case EXTENDED_ERROR_PARAM_TYPE_NONE
: {
3660 case EXTENDED_ERROR_PARAM_TYPE_BLOB
: {
3661 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr
, NDR_SCALARS
, &r
->blob
));
3665 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3668 if (ndr_flags
& NDR_BUFFERS
) {
3670 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING
:
3671 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr
, NDR_BUFFERS
, &r
->a_string
));
3674 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING
:
3675 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr
, NDR_BUFFERS
, &r
->u_string
));
3678 case EXTENDED_ERROR_PARAM_TYPE_UINT32
:
3681 case EXTENDED_ERROR_PARAM_TYPE_UINT16
:
3684 case EXTENDED_ERROR_PARAM_TYPE_UINT64
:
3687 case EXTENDED_ERROR_PARAM_TYPE_NONE
:
3690 case EXTENDED_ERROR_PARAM_TYPE_BLOB
:
3691 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr
, NDR_BUFFERS
, &r
->blob
));
3695 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3698 return NDR_ERR_SUCCESS
;
3701 _PUBLIC_
void ndr_print_ExtendedErrorParamU(struct ndr_print
*ndr
, const char *name
, const union ExtendedErrorParamU
*r
)
3704 level
= ndr_print_get_switch_value(ndr
, r
);
3705 ndr_print_union(ndr
, name
, level
, "ExtendedErrorParamU");
3707 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING
:
3708 ndr_print_ExtendedErrorAString(ndr
, "a_string", &r
->a_string
);
3711 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING
:
3712 ndr_print_ExtendedErrorUString(ndr
, "u_string", &r
->u_string
);
3715 case EXTENDED_ERROR_PARAM_TYPE_UINT32
:
3716 ndr_print_uint32(ndr
, "uint32", r
->uint32
);
3719 case EXTENDED_ERROR_PARAM_TYPE_UINT16
:
3720 ndr_print_uint16(ndr
, "uint16", r
->uint16
);
3723 case EXTENDED_ERROR_PARAM_TYPE_UINT64
:
3724 ndr_print_hyper(ndr
, "uint64", r
->uint64
);
3727 case EXTENDED_ERROR_PARAM_TYPE_NONE
:
3730 case EXTENDED_ERROR_PARAM_TYPE_BLOB
:
3731 ndr_print_ExtendedErrorBlob(ndr
, "blob", &r
->blob
);
3735 ndr_print_bad_level(ndr
, name
, level
);
3739 static enum ndr_err_code
ndr_push_ExtendedErrorParam(struct ndr_push
*ndr
, int ndr_flags
, const struct ExtendedErrorParam
*r
)
3741 if (ndr_flags
& NDR_SCALARS
) {
3742 NDR_CHECK(ndr_push_align(ndr
, 8));
3743 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr
, NDR_SCALARS
, r
->type
));
3744 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->p
, r
->type
));
3745 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr
, NDR_SCALARS
, &r
->p
));
3746 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
3748 if (ndr_flags
& NDR_BUFFERS
) {
3749 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr
, NDR_BUFFERS
, &r
->p
));
3751 return NDR_ERR_SUCCESS
;
3754 static enum ndr_err_code
ndr_pull_ExtendedErrorParam(struct ndr_pull
*ndr
, int ndr_flags
, struct ExtendedErrorParam
*r
)
3756 if (ndr_flags
& NDR_SCALARS
) {
3757 NDR_CHECK(ndr_pull_align(ndr
, 8));
3758 NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr
, NDR_SCALARS
, &r
->type
));
3759 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->p
, r
->type
));
3760 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr
, NDR_SCALARS
, &r
->p
));
3761 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
3763 if (ndr_flags
& NDR_BUFFERS
) {
3764 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr
, NDR_BUFFERS
, &r
->p
));
3766 return NDR_ERR_SUCCESS
;
3769 _PUBLIC_
void ndr_print_ExtendedErrorParam(struct ndr_print
*ndr
, const char *name
, const struct ExtendedErrorParam
*r
)
3771 ndr_print_struct(ndr
, name
, "ExtendedErrorParam");
3773 ndr_print_ExtendedErrorParamType(ndr
, "type", r
->type
);
3774 ndr_print_set_switch_value(ndr
, &r
->p
, r
->type
);
3775 ndr_print_ExtendedErrorParamU(ndr
, "p", &r
->p
);
3779 _PUBLIC_
enum ndr_err_code
ndr_push_ExtendedErrorInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct ExtendedErrorInfo
*r
)
3781 uint32_t cntr_params_0
;
3782 if (ndr_flags
& NDR_SCALARS
) {
3783 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_params
));
3784 NDR_CHECK(ndr_push_align(ndr
, 8));
3785 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->next
));
3786 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr
, NDR_SCALARS
, &r
->computer_name
));
3787 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->pid
));
3788 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->time
));
3789 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->generating_component
));
3790 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->status
));
3791 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->detection_location
));
3792 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->flags
));
3793 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_params
));
3794 for (cntr_params_0
= 0; cntr_params_0
< r
->num_params
; cntr_params_0
++) {
3795 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr
, NDR_SCALARS
, &r
->params
[cntr_params_0
]));
3797 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
3799 if (ndr_flags
& NDR_BUFFERS
) {
3801 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next
));
3803 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr
, NDR_BUFFERS
, &r
->computer_name
));
3804 for (cntr_params_0
= 0; cntr_params_0
< r
->num_params
; cntr_params_0
++) {
3805 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr
, NDR_BUFFERS
, &r
->params
[cntr_params_0
]));
3808 return NDR_ERR_SUCCESS
;
3811 _PUBLIC_
enum ndr_err_code
ndr_pull_ExtendedErrorInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct ExtendedErrorInfo
*r
)
3814 TALLOC_CTX
*_mem_save_next_0
;
3815 uint32_t cntr_params_0
;
3816 TALLOC_CTX
*_mem_save_params_0
;
3817 if (ndr_flags
& NDR_SCALARS
) {
3818 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->params
));
3819 NDR_CHECK(ndr_pull_align(ndr
, 8));
3820 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_next
));
3822 NDR_PULL_ALLOC(ndr
, r
->next
);
3826 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr
, NDR_SCALARS
, &r
->computer_name
));
3827 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->pid
));
3828 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->time
));
3829 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->generating_component
));
3830 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->status
));
3831 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->detection_location
));
3832 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->flags
));
3833 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_params
));
3834 NDR_PULL_ALLOC_N(ndr
, r
->params
, ndr_get_array_size(ndr
, &r
->params
));
3835 _mem_save_params_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3836 NDR_PULL_SET_MEM_CTX(ndr
, r
->params
, 0);
3837 for (cntr_params_0
= 0; cntr_params_0
< r
->num_params
; cntr_params_0
++) {
3838 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr
, NDR_SCALARS
, &r
->params
[cntr_params_0
]));
3840 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_params_0
, 0);
3842 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->params
, r
->num_params
));
3844 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
3846 if (ndr_flags
& NDR_BUFFERS
) {
3848 _mem_save_next_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3849 NDR_PULL_SET_MEM_CTX(ndr
, r
->next
, 0);
3850 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next
));
3851 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_next_0
, 0);
3853 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr
, NDR_BUFFERS
, &r
->computer_name
));
3854 _mem_save_params_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3855 NDR_PULL_SET_MEM_CTX(ndr
, r
->params
, 0);
3856 for (cntr_params_0
= 0; cntr_params_0
< r
->num_params
; cntr_params_0
++) {
3857 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr
, NDR_BUFFERS
, &r
->params
[cntr_params_0
]));
3859 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_params_0
, 0);
3861 return NDR_ERR_SUCCESS
;
3864 _PUBLIC_
void ndr_print_ExtendedErrorInfo(struct ndr_print
*ndr
, const char *name
, const struct ExtendedErrorInfo
*r
)
3866 uint32_t cntr_params_0
;
3867 ndr_print_struct(ndr
, name
, "ExtendedErrorInfo");
3869 ndr_print_ptr(ndr
, "next", r
->next
);
3872 ndr_print_ExtendedErrorInfo(ndr
, "next", r
->next
);
3875 ndr_print_ExtendedErrorComputerName(ndr
, "computer_name", &r
->computer_name
);
3876 ndr_print_hyper(ndr
, "pid", r
->pid
);
3877 ndr_print_NTTIME(ndr
, "time", r
->time
);
3878 ndr_print_uint32(ndr
, "generating_component", r
->generating_component
);
3879 ndr_print_WERROR(ndr
, "status", r
->status
);
3880 ndr_print_uint16(ndr
, "detection_location", r
->detection_location
);
3881 ndr_print_uint16(ndr
, "flags", r
->flags
);
3882 ndr_print_uint16(ndr
, "num_params", r
->num_params
);
3883 ndr
->print(ndr
, "%s: ARRAY(%d)", "params", (int)r
->num_params
);
3885 for (cntr_params_0
=0;cntr_params_0
<r
->num_params
;cntr_params_0
++) {
3887 if (asprintf(&idx_0
, "[%d]", cntr_params_0
) != -1) {
3888 ndr_print_ExtendedErrorParam(ndr
, "params", &r
->params
[cntr_params_0
]);
3896 static enum ndr_err_code
ndr_push_ExtendedErrorInfoPtr(struct ndr_push
*ndr
, int ndr_flags
, const struct ExtendedErrorInfoPtr
*r
)
3898 if (ndr_flags
& NDR_SCALARS
) {
3899 NDR_CHECK(ndr_push_align(ndr
, 5));
3900 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info
));
3901 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3903 if (ndr_flags
& NDR_BUFFERS
) {
3905 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info
));
3908 return NDR_ERR_SUCCESS
;
3911 static enum ndr_err_code
ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull
*ndr
, int ndr_flags
, struct ExtendedErrorInfoPtr
*r
)
3914 TALLOC_CTX
*_mem_save_info_0
;
3915 if (ndr_flags
& NDR_SCALARS
) {
3916 NDR_CHECK(ndr_pull_align(ndr
, 5));
3917 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
3919 NDR_PULL_ALLOC(ndr
, r
->info
);
3923 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3925 if (ndr_flags
& NDR_BUFFERS
) {
3927 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3928 NDR_PULL_SET_MEM_CTX(ndr
, r
->info
, 0);
3929 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info
));
3930 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
3933 return NDR_ERR_SUCCESS
;
3936 _PUBLIC_
void ndr_print_ExtendedErrorInfoPtr(struct ndr_print
*ndr
, const char *name
, const struct ExtendedErrorInfoPtr
*r
)
3938 ndr_print_struct(ndr
, name
, "ExtendedErrorInfoPtr");
3940 ndr_print_ptr(ndr
, "info", r
->info
);
3943 ndr_print_ExtendedErrorInfo(ndr
, "info", r
->info
);
3949 static enum ndr_err_code
ndr_push_decode_replPropertyMetaData(struct ndr_push
*ndr
, int flags
, const struct decode_replPropertyMetaData
*r
)
3951 if (flags
& NDR_IN
) {
3952 NDR_CHECK(ndr_push_replPropertyMetaDataBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
3954 if (flags
& NDR_OUT
) {
3956 return NDR_ERR_SUCCESS
;
3959 static enum ndr_err_code
ndr_pull_decode_replPropertyMetaData(struct ndr_pull
*ndr
, int flags
, struct decode_replPropertyMetaData
*r
)
3961 if (flags
& NDR_IN
) {
3962 NDR_CHECK(ndr_pull_replPropertyMetaDataBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
3964 if (flags
& NDR_OUT
) {
3966 return NDR_ERR_SUCCESS
;
3969 _PUBLIC_
void ndr_print_decode_replPropertyMetaData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_replPropertyMetaData
*r
)
3971 ndr_print_struct(ndr
, name
, "decode_replPropertyMetaData");
3973 if (flags
& NDR_SET_VALUES
) {
3974 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3976 if (flags
& NDR_IN
) {
3977 ndr_print_struct(ndr
, "in", "decode_replPropertyMetaData");
3979 ndr_print_replPropertyMetaDataBlob(ndr
, "blob", &r
->in
.blob
);
3982 if (flags
& NDR_OUT
) {
3983 ndr_print_struct(ndr
, "out", "decode_replPropertyMetaData");
3990 static enum ndr_err_code
ndr_push_decode_replUpToDateVector(struct ndr_push
*ndr
, int flags
, const struct decode_replUpToDateVector
*r
)
3992 if (flags
& NDR_IN
) {
3993 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
3995 if (flags
& NDR_OUT
) {
3997 return NDR_ERR_SUCCESS
;
4000 static enum ndr_err_code
ndr_pull_decode_replUpToDateVector(struct ndr_pull
*ndr
, int flags
, struct decode_replUpToDateVector
*r
)
4002 if (flags
& NDR_IN
) {
4003 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4005 if (flags
& NDR_OUT
) {
4007 return NDR_ERR_SUCCESS
;
4010 _PUBLIC_
void ndr_print_decode_replUpToDateVector(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_replUpToDateVector
*r
)
4012 ndr_print_struct(ndr
, name
, "decode_replUpToDateVector");
4014 if (flags
& NDR_SET_VALUES
) {
4015 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4017 if (flags
& NDR_IN
) {
4018 ndr_print_struct(ndr
, "in", "decode_replUpToDateVector");
4020 ndr_print_replUpToDateVectorBlob(ndr
, "blob", &r
->in
.blob
);
4023 if (flags
& NDR_OUT
) {
4024 ndr_print_struct(ndr
, "out", "decode_replUpToDateVector");
4031 static enum ndr_err_code
ndr_push_decode_repsFromTo(struct ndr_push
*ndr
, int flags
, const struct decode_repsFromTo
*r
)
4033 if (flags
& NDR_IN
) {
4034 NDR_CHECK(ndr_push_repsFromToBlob(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.blob
));
4036 if (flags
& NDR_OUT
) {
4038 return NDR_ERR_SUCCESS
;
4041 static enum ndr_err_code
ndr_pull_decode_repsFromTo(struct ndr_pull
*ndr
, int flags
, struct decode_repsFromTo
*r
)
4043 if (flags
& NDR_IN
) {
4044 NDR_CHECK(ndr_pull_repsFromToBlob(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.blob
));
4046 if (flags
& NDR_OUT
) {
4048 return NDR_ERR_SUCCESS
;
4051 _PUBLIC_
void ndr_print_decode_repsFromTo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_repsFromTo
*r
)
4053 ndr_print_struct(ndr
, name
, "decode_repsFromTo");
4055 if (flags
& NDR_SET_VALUES
) {
4056 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4058 if (flags
& NDR_IN
) {
4059 ndr_print_struct(ndr
, "in", "decode_repsFromTo");
4061 ndr_print_repsFromToBlob(ndr
, "blob", &r
->in
.blob
);
4064 if (flags
& NDR_OUT
) {
4065 ndr_print_struct(ndr
, "out", "decode_repsFromTo");
4072 static enum ndr_err_code
ndr_push_decode_partialAttributeSet(struct ndr_push
*ndr
, int flags
, const struct decode_partialAttributeSet
*r
)
4074 if (flags
& NDR_IN
) {
4075 NDR_CHECK(ndr_push_partialAttributeSetBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4077 if (flags
& NDR_OUT
) {
4079 return NDR_ERR_SUCCESS
;
4082 static enum ndr_err_code
ndr_pull_decode_partialAttributeSet(struct ndr_pull
*ndr
, int flags
, struct decode_partialAttributeSet
*r
)
4084 if (flags
& NDR_IN
) {
4085 NDR_CHECK(ndr_pull_partialAttributeSetBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4087 if (flags
& NDR_OUT
) {
4089 return NDR_ERR_SUCCESS
;
4092 _PUBLIC_
void ndr_print_decode_partialAttributeSet(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_partialAttributeSet
*r
)
4094 ndr_print_struct(ndr
, name
, "decode_partialAttributeSet");
4096 if (flags
& NDR_SET_VALUES
) {
4097 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4099 if (flags
& NDR_IN
) {
4100 ndr_print_struct(ndr
, "in", "decode_partialAttributeSet");
4102 ndr_print_partialAttributeSetBlob(ndr
, "blob", &r
->in
.blob
);
4105 if (flags
& NDR_OUT
) {
4106 ndr_print_struct(ndr
, "out", "decode_partialAttributeSet");
4113 static enum ndr_err_code
ndr_push_decode_prefixMap(struct ndr_push
*ndr
, int flags
, const struct decode_prefixMap
*r
)
4115 if (flags
& NDR_IN
) {
4116 NDR_CHECK(ndr_push_prefixMapBlob(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.blob
));
4118 if (flags
& NDR_OUT
) {
4120 return NDR_ERR_SUCCESS
;
4123 static enum ndr_err_code
ndr_pull_decode_prefixMap(struct ndr_pull
*ndr
, int flags
, struct decode_prefixMap
*r
)
4125 if (flags
& NDR_IN
) {
4126 NDR_CHECK(ndr_pull_prefixMapBlob(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.blob
));
4128 if (flags
& NDR_OUT
) {
4130 return NDR_ERR_SUCCESS
;
4133 _PUBLIC_
void ndr_print_decode_prefixMap(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_prefixMap
*r
)
4135 ndr_print_struct(ndr
, name
, "decode_prefixMap");
4137 if (flags
& NDR_SET_VALUES
) {
4138 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4140 if (flags
& NDR_IN
) {
4141 ndr_print_struct(ndr
, "in", "decode_prefixMap");
4143 ndr_print_prefixMapBlob(ndr
, "blob", &r
->in
.blob
);
4146 if (flags
& NDR_OUT
) {
4147 ndr_print_struct(ndr
, "out", "decode_prefixMap");
4154 static enum ndr_err_code
ndr_push_decode_ldapControlDirSync(struct ndr_push
*ndr
, int flags
, const struct decode_ldapControlDirSync
*r
)
4156 if (flags
& NDR_IN
) {
4157 NDR_CHECK(ndr_push_ldapControlDirSyncCookie(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.cookie
));
4159 if (flags
& NDR_OUT
) {
4161 return NDR_ERR_SUCCESS
;
4164 static enum ndr_err_code
ndr_pull_decode_ldapControlDirSync(struct ndr_pull
*ndr
, int flags
, struct decode_ldapControlDirSync
*r
)
4166 if (flags
& NDR_IN
) {
4167 NDR_CHECK(ndr_pull_ldapControlDirSyncCookie(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.cookie
));
4169 if (flags
& NDR_OUT
) {
4171 return NDR_ERR_SUCCESS
;
4174 _PUBLIC_
void ndr_print_decode_ldapControlDirSync(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_ldapControlDirSync
*r
)
4176 ndr_print_struct(ndr
, name
, "decode_ldapControlDirSync");
4178 if (flags
& NDR_SET_VALUES
) {
4179 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4181 if (flags
& NDR_IN
) {
4182 ndr_print_struct(ndr
, "in", "decode_ldapControlDirSync");
4184 ndr_print_ldapControlDirSyncCookie(ndr
, "cookie", &r
->in
.cookie
);
4187 if (flags
& NDR_OUT
) {
4188 ndr_print_struct(ndr
, "out", "decode_ldapControlDirSync");
4195 static enum ndr_err_code
ndr_push_decode_supplementalCredentials(struct ndr_push
*ndr
, int flags
, const struct decode_supplementalCredentials
*r
)
4197 if (flags
& NDR_IN
) {
4198 NDR_CHECK(ndr_push_supplementalCredentialsBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4200 if (flags
& NDR_OUT
) {
4202 return NDR_ERR_SUCCESS
;
4205 static enum ndr_err_code
ndr_pull_decode_supplementalCredentials(struct ndr_pull
*ndr
, int flags
, struct decode_supplementalCredentials
*r
)
4207 if (flags
& NDR_IN
) {
4208 NDR_CHECK(ndr_pull_supplementalCredentialsBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4210 if (flags
& NDR_OUT
) {
4212 return NDR_ERR_SUCCESS
;
4215 _PUBLIC_
void ndr_print_decode_supplementalCredentials(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_supplementalCredentials
*r
)
4217 ndr_print_struct(ndr
, name
, "decode_supplementalCredentials");
4219 if (flags
& NDR_SET_VALUES
) {
4220 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4222 if (flags
& NDR_IN
) {
4223 ndr_print_struct(ndr
, "in", "decode_supplementalCredentials");
4225 ndr_print_supplementalCredentialsBlob(ndr
, "blob", &r
->in
.blob
);
4228 if (flags
& NDR_OUT
) {
4229 ndr_print_struct(ndr
, "out", "decode_supplementalCredentials");
4236 static enum ndr_err_code
ndr_push_decode_Packages(struct ndr_push
*ndr
, int flags
, const struct decode_Packages
*r
)
4238 if (flags
& NDR_IN
) {
4239 NDR_CHECK(ndr_push_package_PackagesBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4241 if (flags
& NDR_OUT
) {
4243 return NDR_ERR_SUCCESS
;
4246 static enum ndr_err_code
ndr_pull_decode_Packages(struct ndr_pull
*ndr
, int flags
, struct decode_Packages
*r
)
4248 if (flags
& NDR_IN
) {
4249 NDR_CHECK(ndr_pull_package_PackagesBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4251 if (flags
& NDR_OUT
) {
4253 return NDR_ERR_SUCCESS
;
4256 _PUBLIC_
void ndr_print_decode_Packages(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_Packages
*r
)
4258 ndr_print_struct(ndr
, name
, "decode_Packages");
4260 if (flags
& NDR_SET_VALUES
) {
4261 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4263 if (flags
& NDR_IN
) {
4264 ndr_print_struct(ndr
, "in", "decode_Packages");
4266 ndr_print_package_PackagesBlob(ndr
, "blob", &r
->in
.blob
);
4269 if (flags
& NDR_OUT
) {
4270 ndr_print_struct(ndr
, "out", "decode_Packages");
4277 static enum ndr_err_code
ndr_push_decode_PrimaryKerberos(struct ndr_push
*ndr
, int flags
, const struct decode_PrimaryKerberos
*r
)
4279 if (flags
& NDR_IN
) {
4280 NDR_CHECK(ndr_push_package_PrimaryKerberosBlob(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.blob
));
4282 if (flags
& NDR_OUT
) {
4284 return NDR_ERR_SUCCESS
;
4287 static enum ndr_err_code
ndr_pull_decode_PrimaryKerberos(struct ndr_pull
*ndr
, int flags
, struct decode_PrimaryKerberos
*r
)
4289 if (flags
& NDR_IN
) {
4290 NDR_CHECK(ndr_pull_package_PrimaryKerberosBlob(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.blob
));
4292 if (flags
& NDR_OUT
) {
4294 return NDR_ERR_SUCCESS
;
4297 _PUBLIC_
void ndr_print_decode_PrimaryKerberos(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_PrimaryKerberos
*r
)
4299 ndr_print_struct(ndr
, name
, "decode_PrimaryKerberos");
4301 if (flags
& NDR_SET_VALUES
) {
4302 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4304 if (flags
& NDR_IN
) {
4305 ndr_print_struct(ndr
, "in", "decode_PrimaryKerberos");
4307 ndr_print_package_PrimaryKerberosBlob(ndr
, "blob", &r
->in
.blob
);
4310 if (flags
& NDR_OUT
) {
4311 ndr_print_struct(ndr
, "out", "decode_PrimaryKerberos");
4318 static enum ndr_err_code
ndr_push_decode_PrimaryCLEARTEXT(struct ndr_push
*ndr
, int flags
, const struct decode_PrimaryCLEARTEXT
*r
)
4320 if (flags
& NDR_IN
) {
4321 NDR_CHECK(ndr_push_package_PrimaryCLEARTEXTBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4323 if (flags
& NDR_OUT
) {
4325 return NDR_ERR_SUCCESS
;
4328 static enum ndr_err_code
ndr_pull_decode_PrimaryCLEARTEXT(struct ndr_pull
*ndr
, int flags
, struct decode_PrimaryCLEARTEXT
*r
)
4330 if (flags
& NDR_IN
) {
4331 NDR_CHECK(ndr_pull_package_PrimaryCLEARTEXTBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4333 if (flags
& NDR_OUT
) {
4335 return NDR_ERR_SUCCESS
;
4338 _PUBLIC_
void ndr_print_decode_PrimaryCLEARTEXT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_PrimaryCLEARTEXT
*r
)
4340 ndr_print_struct(ndr
, name
, "decode_PrimaryCLEARTEXT");
4342 if (flags
& NDR_SET_VALUES
) {
4343 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4345 if (flags
& NDR_IN
) {
4346 ndr_print_struct(ndr
, "in", "decode_PrimaryCLEARTEXT");
4348 ndr_print_package_PrimaryCLEARTEXTBlob(ndr
, "blob", &r
->in
.blob
);
4351 if (flags
& NDR_OUT
) {
4352 ndr_print_struct(ndr
, "out", "decode_PrimaryCLEARTEXT");
4359 static enum ndr_err_code
ndr_push_decode_PrimaryWDigest(struct ndr_push
*ndr
, int flags
, const struct decode_PrimaryWDigest
*r
)
4361 if (flags
& NDR_IN
) {
4362 NDR_CHECK(ndr_push_package_PrimaryWDigestBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4364 if (flags
& NDR_OUT
) {
4366 return NDR_ERR_SUCCESS
;
4369 static enum ndr_err_code
ndr_pull_decode_PrimaryWDigest(struct ndr_pull
*ndr
, int flags
, struct decode_PrimaryWDigest
*r
)
4371 if (flags
& NDR_IN
) {
4372 NDR_CHECK(ndr_pull_package_PrimaryWDigestBlob(ndr
, NDR_SCALARS
, &r
->in
.blob
));
4374 if (flags
& NDR_OUT
) {
4376 return NDR_ERR_SUCCESS
;
4379 _PUBLIC_
void ndr_print_decode_PrimaryWDigest(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_PrimaryWDigest
*r
)
4381 ndr_print_struct(ndr
, name
, "decode_PrimaryWDigest");
4383 if (flags
& NDR_SET_VALUES
) {
4384 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4386 if (flags
& NDR_IN
) {
4387 ndr_print_struct(ndr
, "in", "decode_PrimaryWDigest");
4389 ndr_print_package_PrimaryWDigestBlob(ndr
, "blob", &r
->in
.blob
);
4392 if (flags
& NDR_OUT
) {
4393 ndr_print_struct(ndr
, "out", "decode_PrimaryWDigest");
4400 static enum ndr_err_code
ndr_push_decode_trustAuthInOut(struct ndr_push
*ndr
, int flags
, const struct decode_trustAuthInOut
*r
)
4402 if (flags
& NDR_IN
) {
4403 NDR_CHECK(ndr_push_trustAuthInOutBlob(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.blob
));
4405 if (flags
& NDR_OUT
) {
4407 return NDR_ERR_SUCCESS
;
4410 static enum ndr_err_code
ndr_pull_decode_trustAuthInOut(struct ndr_pull
*ndr
, int flags
, struct decode_trustAuthInOut
*r
)
4412 if (flags
& NDR_IN
) {
4413 NDR_CHECK(ndr_pull_trustAuthInOutBlob(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.blob
));
4415 if (flags
& NDR_OUT
) {
4417 return NDR_ERR_SUCCESS
;
4420 _PUBLIC_
void ndr_print_decode_trustAuthInOut(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_trustAuthInOut
*r
)
4422 ndr_print_struct(ndr
, name
, "decode_trustAuthInOut");
4424 if (flags
& NDR_SET_VALUES
) {
4425 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4427 if (flags
& NDR_IN
) {
4428 ndr_print_struct(ndr
, "in", "decode_trustAuthInOut");
4430 ndr_print_trustAuthInOutBlob(ndr
, "blob", &r
->in
.blob
);
4433 if (flags
& NDR_OUT
) {
4434 ndr_print_struct(ndr
, "out", "decode_trustAuthInOut");
4441 static enum ndr_err_code
ndr_push_decode_trustDomainPasswords(struct ndr_push
*ndr
, int flags
, const struct decode_trustDomainPasswords
*r
)
4443 if (flags
& NDR_IN
) {
4444 NDR_CHECK(ndr_push_trustDomainPasswords(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.blob
));
4446 if (flags
& NDR_OUT
) {
4448 return NDR_ERR_SUCCESS
;
4451 static enum ndr_err_code
ndr_pull_decode_trustDomainPasswords(struct ndr_pull
*ndr
, int flags
, struct decode_trustDomainPasswords
*r
)
4453 if (flags
& NDR_IN
) {
4454 NDR_CHECK(ndr_pull_trustDomainPasswords(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.blob
));
4456 if (flags
& NDR_OUT
) {
4458 return NDR_ERR_SUCCESS
;
4461 _PUBLIC_
void ndr_print_decode_trustDomainPasswords(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_trustDomainPasswords
*r
)
4463 ndr_print_struct(ndr
, name
, "decode_trustDomainPasswords");
4465 if (flags
& NDR_SET_VALUES
) {
4466 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4468 if (flags
& NDR_IN
) {
4469 ndr_print_struct(ndr
, "in", "decode_trustDomainPasswords");
4471 ndr_print_trustDomainPasswords(ndr
, "blob", &r
->in
.blob
);
4474 if (flags
& NDR_OUT
) {
4475 ndr_print_struct(ndr
, "out", "decode_trustDomainPasswords");
4482 static enum ndr_err_code
ndr_push_decode_ExtendedErrorInfo(struct ndr_push
*ndr
, int flags
, const struct decode_ExtendedErrorInfo
*r
)
4484 if (flags
& NDR_IN
) {
4486 struct ndr_push
*_ndr_ptr
;
4487 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_ptr
, 0xFFFFFC01, -1));
4488 NDR_CHECK(ndr_push_ExtendedErrorInfoPtr(_ndr_ptr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.ptr
));
4489 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_ptr
, 0xFFFFFC01, -1));
4492 if (flags
& NDR_OUT
) {
4494 return NDR_ERR_SUCCESS
;
4497 static enum ndr_err_code
ndr_pull_decode_ExtendedErrorInfo(struct ndr_pull
*ndr
, int flags
, struct decode_ExtendedErrorInfo
*r
)
4499 if (flags
& NDR_IN
) {
4501 struct ndr_pull
*_ndr_ptr
;
4502 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ptr
, 0xFFFFFC01, -1));
4503 NDR_CHECK(ndr_pull_ExtendedErrorInfoPtr(_ndr_ptr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.ptr
));
4504 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ptr
, 0xFFFFFC01, -1));
4507 if (flags
& NDR_OUT
) {
4509 return NDR_ERR_SUCCESS
;
4512 _PUBLIC_
void ndr_print_decode_ExtendedErrorInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct decode_ExtendedErrorInfo
*r
)
4514 ndr_print_struct(ndr
, name
, "decode_ExtendedErrorInfo");
4516 if (flags
& NDR_SET_VALUES
) {
4517 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4519 if (flags
& NDR_IN
) {
4520 ndr_print_struct(ndr
, "in", "decode_ExtendedErrorInfo");
4522 ndr_print_ExtendedErrorInfoPtr(ndr
, "ptr", &r
->in
.ptr
);
4525 if (flags
& NDR_OUT
) {
4526 ndr_print_struct(ndr
, "out", "decode_ExtendedErrorInfo");
4533 static const struct ndr_interface_call drsblobs_calls
[] = {
4535 "decode_replPropertyMetaData",
4536 sizeof(struct decode_replPropertyMetaData
),
4537 (ndr_push_flags_fn_t
) ndr_push_decode_replPropertyMetaData
,
4538 (ndr_pull_flags_fn_t
) ndr_pull_decode_replPropertyMetaData
,
4539 (ndr_print_function_t
) ndr_print_decode_replPropertyMetaData
,
4543 "decode_replUpToDateVector",
4544 sizeof(struct decode_replUpToDateVector
),
4545 (ndr_push_flags_fn_t
) ndr_push_decode_replUpToDateVector
,
4546 (ndr_pull_flags_fn_t
) ndr_pull_decode_replUpToDateVector
,
4547 (ndr_print_function_t
) ndr_print_decode_replUpToDateVector
,
4551 "decode_repsFromTo",
4552 sizeof(struct decode_repsFromTo
),
4553 (ndr_push_flags_fn_t
) ndr_push_decode_repsFromTo
,
4554 (ndr_pull_flags_fn_t
) ndr_pull_decode_repsFromTo
,
4555 (ndr_print_function_t
) ndr_print_decode_repsFromTo
,
4559 "decode_partialAttributeSet",
4560 sizeof(struct decode_partialAttributeSet
),
4561 (ndr_push_flags_fn_t
) ndr_push_decode_partialAttributeSet
,
4562 (ndr_pull_flags_fn_t
) ndr_pull_decode_partialAttributeSet
,
4563 (ndr_print_function_t
) ndr_print_decode_partialAttributeSet
,
4568 sizeof(struct decode_prefixMap
),
4569 (ndr_push_flags_fn_t
) ndr_push_decode_prefixMap
,
4570 (ndr_pull_flags_fn_t
) ndr_pull_decode_prefixMap
,
4571 (ndr_print_function_t
) ndr_print_decode_prefixMap
,
4575 "decode_ldapControlDirSync",
4576 sizeof(struct decode_ldapControlDirSync
),
4577 (ndr_push_flags_fn_t
) ndr_push_decode_ldapControlDirSync
,
4578 (ndr_pull_flags_fn_t
) ndr_pull_decode_ldapControlDirSync
,
4579 (ndr_print_function_t
) ndr_print_decode_ldapControlDirSync
,
4583 "decode_supplementalCredentials",
4584 sizeof(struct decode_supplementalCredentials
),
4585 (ndr_push_flags_fn_t
) ndr_push_decode_supplementalCredentials
,
4586 (ndr_pull_flags_fn_t
) ndr_pull_decode_supplementalCredentials
,
4587 (ndr_print_function_t
) ndr_print_decode_supplementalCredentials
,
4592 sizeof(struct decode_Packages
),
4593 (ndr_push_flags_fn_t
) ndr_push_decode_Packages
,
4594 (ndr_pull_flags_fn_t
) ndr_pull_decode_Packages
,
4595 (ndr_print_function_t
) ndr_print_decode_Packages
,
4599 "decode_PrimaryKerberos",
4600 sizeof(struct decode_PrimaryKerberos
),
4601 (ndr_push_flags_fn_t
) ndr_push_decode_PrimaryKerberos
,
4602 (ndr_pull_flags_fn_t
) ndr_pull_decode_PrimaryKerberos
,
4603 (ndr_print_function_t
) ndr_print_decode_PrimaryKerberos
,
4607 "decode_PrimaryCLEARTEXT",
4608 sizeof(struct decode_PrimaryCLEARTEXT
),
4609 (ndr_push_flags_fn_t
) ndr_push_decode_PrimaryCLEARTEXT
,
4610 (ndr_pull_flags_fn_t
) ndr_pull_decode_PrimaryCLEARTEXT
,
4611 (ndr_print_function_t
) ndr_print_decode_PrimaryCLEARTEXT
,
4615 "decode_PrimaryWDigest",
4616 sizeof(struct decode_PrimaryWDigest
),
4617 (ndr_push_flags_fn_t
) ndr_push_decode_PrimaryWDigest
,
4618 (ndr_pull_flags_fn_t
) ndr_pull_decode_PrimaryWDigest
,
4619 (ndr_print_function_t
) ndr_print_decode_PrimaryWDigest
,
4623 "decode_trustAuthInOut",
4624 sizeof(struct decode_trustAuthInOut
),
4625 (ndr_push_flags_fn_t
) ndr_push_decode_trustAuthInOut
,
4626 (ndr_pull_flags_fn_t
) ndr_pull_decode_trustAuthInOut
,
4627 (ndr_print_function_t
) ndr_print_decode_trustAuthInOut
,
4631 "decode_trustDomainPasswords",
4632 sizeof(struct decode_trustDomainPasswords
),
4633 (ndr_push_flags_fn_t
) ndr_push_decode_trustDomainPasswords
,
4634 (ndr_pull_flags_fn_t
) ndr_pull_decode_trustDomainPasswords
,
4635 (ndr_print_function_t
) ndr_print_decode_trustDomainPasswords
,
4639 "decode_ExtendedErrorInfo",
4640 sizeof(struct decode_ExtendedErrorInfo
),
4641 (ndr_push_flags_fn_t
) ndr_push_decode_ExtendedErrorInfo
,
4642 (ndr_pull_flags_fn_t
) ndr_pull_decode_ExtendedErrorInfo
,
4643 (ndr_print_function_t
) ndr_print_decode_ExtendedErrorInfo
,
4646 { NULL
, 0, NULL
, NULL
, NULL
, false }
4649 static const char * const drsblobs_endpoint_strings
[] = {
4650 "ncacn_np:[\\pipe\\drsblobs]",
4653 static const struct ndr_interface_string_array drsblobs_endpoints
= {
4655 .names
= drsblobs_endpoint_strings
4658 static const char * const drsblobs_authservice_strings
[] = {
4662 static const struct ndr_interface_string_array drsblobs_authservices
= {
4664 .names
= drsblobs_authservice_strings
4668 const struct ndr_interface_table ndr_table_drsblobs
= {
4671 {0x12345778,0x1234,0xabcd,{0x00,0x01},{0x00,0x00,0x00,0x01}},
4672 NDR_DRSBLOBS_VERSION
4674 .helpstring
= NDR_DRSBLOBS_HELPSTRING
,
4676 .calls
= drsblobs_calls
,
4677 .endpoints
= &drsblobs_endpoints
,
4678 .authservices
= &drsblobs_authservices