1 /* parser auto-generated by pidl */
4 #include "../librpc/gen_ndr/ndr_drsuapi.h"
6 #include "librpc/gen_ndr/ndr_security.h"
7 #include "librpc/gen_ndr/ndr_misc.h"
8 #include "librpc/gen_ndr/ndr_samr.h"
9 #include "librpc/ndr/ndr_compression.h"
10 static enum ndr_err_code
ndr_push_drsuapi_SupportedExtensions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
12 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
13 return NDR_ERR_SUCCESS
;
16 static enum ndr_err_code
ndr_pull_drsuapi_SupportedExtensions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
19 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
21 return NDR_ERR_SUCCESS
;
24 _PUBLIC_
void ndr_print_drsuapi_SupportedExtensions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
26 ndr_print_uint32(ndr
, name
, r
);
28 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_BASE", DRSUAPI_SUPPORTED_EXTENSION_BASE
, r
);
29 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION", DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION
, r
);
30 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI", DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI
, r
);
31 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2", DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2
, r
);
32 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS", DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS
, r
);
33 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1
, r
);
34 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION", DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION
, r
);
35 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_00000080", DRSUAPI_SUPPORTED_EXTENSION_00000080
, r
);
36 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE", DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE
, r
);
37 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2
, r
);
38 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION", DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION
, r
);
39 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2
, r
);
40 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD", DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD
, r
);
41 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND", DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND
, r
);
42 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO", DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO
, r
);
43 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION", DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION
, r
);
44 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01
, r
);
45 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP", DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP
, r
);
46 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY", DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY
, r
);
47 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3", DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3
, r
);
48 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_00100000", DRSUAPI_SUPPORTED_EXTENSION_00100000
, r
);
49 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2", DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2
, r
);
50 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6
, r
);
51 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS", DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS
, r
);
52 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8
, r
);
53 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5
, r
);
54 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6
, r
);
55 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3
, r
);
56 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7
, r
);
57 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT", DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT
, r
);
58 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS", DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS
, r
);
59 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_20000000", DRSUAPI_SUPPORTED_EXTENSION_20000000
, r
);
60 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_40000000", DRSUAPI_SUPPORTED_EXTENSION_40000000
, r
);
61 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_80000000", DRSUAPI_SUPPORTED_EXTENSION_80000000
, r
);
65 static enum ndr_err_code
ndr_push_drsuapi_SupportedExtensionsExt(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
67 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
68 return NDR_ERR_SUCCESS
;
71 static enum ndr_err_code
ndr_pull_drsuapi_SupportedExtensionsExt(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
74 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
76 return NDR_ERR_SUCCESS
;
79 _PUBLIC_
void ndr_print_drsuapi_SupportedExtensionsExt(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
81 ndr_print_uint32(ndr
, name
, r
);
83 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADAM", DRSUAPI_SUPPORTED_EXTENSION_ADAM
, r
);
84 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2", DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2
, r
);
88 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfo24(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsBindInfo24
*r
)
90 if (ndr_flags
& NDR_SCALARS
) {
91 NDR_CHECK(ndr_push_align(ndr
, 4));
92 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, r
->supported_extensions
));
93 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
94 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pid
));
96 if (ndr_flags
& NDR_BUFFERS
) {
98 return NDR_ERR_SUCCESS
;
101 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfo24(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsBindInfo24
*r
)
103 if (ndr_flags
& NDR_SCALARS
) {
104 NDR_CHECK(ndr_pull_align(ndr
, 4));
105 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, &r
->supported_extensions
));
106 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
107 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pid
));
109 if (ndr_flags
& NDR_BUFFERS
) {
111 return NDR_ERR_SUCCESS
;
114 _PUBLIC_
void ndr_print_drsuapi_DsBindInfo24(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsBindInfo24
*r
)
116 ndr_print_struct(ndr
, name
, "drsuapi_DsBindInfo24");
118 ndr_print_drsuapi_SupportedExtensions(ndr
, "supported_extensions", r
->supported_extensions
);
119 ndr_print_GUID(ndr
, "site_guid", &r
->site_guid
);
120 ndr_print_uint32(ndr
, "pid", r
->pid
);
124 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfo28(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsBindInfo28
*r
)
126 if (ndr_flags
& NDR_SCALARS
) {
127 NDR_CHECK(ndr_push_align(ndr
, 4));
128 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, r
->supported_extensions
));
129 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
130 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pid
));
131 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->repl_epoch
));
133 if (ndr_flags
& NDR_BUFFERS
) {
135 return NDR_ERR_SUCCESS
;
138 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfo28(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsBindInfo28
*r
)
140 if (ndr_flags
& NDR_SCALARS
) {
141 NDR_CHECK(ndr_pull_align(ndr
, 4));
142 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, &r
->supported_extensions
));
143 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
144 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pid
));
145 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->repl_epoch
));
147 if (ndr_flags
& NDR_BUFFERS
) {
149 return NDR_ERR_SUCCESS
;
152 _PUBLIC_
void ndr_print_drsuapi_DsBindInfo28(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsBindInfo28
*r
)
154 ndr_print_struct(ndr
, name
, "drsuapi_DsBindInfo28");
156 ndr_print_drsuapi_SupportedExtensions(ndr
, "supported_extensions", r
->supported_extensions
);
157 ndr_print_GUID(ndr
, "site_guid", &r
->site_guid
);
158 ndr_print_uint32(ndr
, "pid", r
->pid
);
159 ndr_print_uint32(ndr
, "repl_epoch", r
->repl_epoch
);
163 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfo48(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsBindInfo48
*r
)
165 if (ndr_flags
& NDR_SCALARS
) {
166 NDR_CHECK(ndr_push_align(ndr
, 4));
167 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, r
->supported_extensions
));
168 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
169 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pid
));
170 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->repl_epoch
));
171 NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr
, NDR_SCALARS
, r
->supported_extensions_ext
));
172 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->config_dn_guid
));
174 if (ndr_flags
& NDR_BUFFERS
) {
176 return NDR_ERR_SUCCESS
;
179 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfo48(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsBindInfo48
*r
)
181 if (ndr_flags
& NDR_SCALARS
) {
182 NDR_CHECK(ndr_pull_align(ndr
, 4));
183 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, &r
->supported_extensions
));
184 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
185 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pid
));
186 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->repl_epoch
));
187 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr
, NDR_SCALARS
, &r
->supported_extensions_ext
));
188 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->config_dn_guid
));
190 if (ndr_flags
& NDR_BUFFERS
) {
192 return NDR_ERR_SUCCESS
;
195 _PUBLIC_
void ndr_print_drsuapi_DsBindInfo48(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsBindInfo48
*r
)
197 ndr_print_struct(ndr
, name
, "drsuapi_DsBindInfo48");
199 ndr_print_drsuapi_SupportedExtensions(ndr
, "supported_extensions", r
->supported_extensions
);
200 ndr_print_GUID(ndr
, "site_guid", &r
->site_guid
);
201 ndr_print_uint32(ndr
, "pid", r
->pid
);
202 ndr_print_uint32(ndr
, "repl_epoch", r
->repl_epoch
);
203 ndr_print_drsuapi_SupportedExtensionsExt(ndr
, "supported_extensions_ext", r
->supported_extensions_ext
);
204 ndr_print_GUID(ndr
, "config_dn_guid", &r
->config_dn_guid
);
208 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfoFallBack(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsBindInfoFallBack
*r
)
210 if (ndr_flags
& NDR_SCALARS
) {
211 NDR_CHECK(ndr_push_align(ndr
, 4));
213 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
214 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
215 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->info
));
216 ndr
->flags
= _flags_save_DATA_BLOB
;
219 if (ndr_flags
& NDR_BUFFERS
) {
221 return NDR_ERR_SUCCESS
;
224 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfoFallBack(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsBindInfoFallBack
*r
)
226 if (ndr_flags
& NDR_SCALARS
) {
227 NDR_CHECK(ndr_pull_align(ndr
, 4));
229 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
230 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
231 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->info
));
232 ndr
->flags
= _flags_save_DATA_BLOB
;
235 if (ndr_flags
& NDR_BUFFERS
) {
237 return NDR_ERR_SUCCESS
;
240 _PUBLIC_
void ndr_print_drsuapi_DsBindInfoFallBack(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsBindInfoFallBack
*r
)
242 ndr_print_struct(ndr
, name
, "drsuapi_DsBindInfoFallBack");
244 ndr_print_DATA_BLOB(ndr
, "info", r
->info
);
248 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfo(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsBindInfo
*r
)
250 if (ndr_flags
& NDR_SCALARS
) {
251 int level
= ndr_push_get_switch_value(ndr
, r
);
255 struct ndr_push
*_ndr_info24
;
256 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info24
, 4, -1));
257 NDR_CHECK(ndr_push_drsuapi_DsBindInfo24(_ndr_info24
, NDR_SCALARS
, &r
->info24
));
258 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info24
, 4, -1));
264 struct ndr_push
*_ndr_info28
;
265 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info28
, 4, -1));
266 NDR_CHECK(ndr_push_drsuapi_DsBindInfo28(_ndr_info28
, NDR_SCALARS
, &r
->info28
));
267 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info28
, 4, -1));
273 struct ndr_push
*_ndr_info48
;
274 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info48
, 4, -1));
275 NDR_CHECK(ndr_push_drsuapi_DsBindInfo48(_ndr_info48
, NDR_SCALARS
, &r
->info48
));
276 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info48
, 4, -1));
282 struct ndr_push
*_ndr_FallBack
;
283 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_FallBack
, 4, -1));
284 NDR_CHECK(ndr_push_drsuapi_DsBindInfoFallBack(_ndr_FallBack
, NDR_SCALARS
, &r
->FallBack
));
285 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_FallBack
, 4, -1));
291 if (ndr_flags
& NDR_BUFFERS
) {
292 int level
= ndr_push_get_switch_value(ndr
, r
);
308 return NDR_ERR_SUCCESS
;
311 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfo(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsBindInfo
*r
)
314 level
= ndr_pull_get_switch_value(ndr
, r
);
315 if (ndr_flags
& NDR_SCALARS
) {
319 struct ndr_pull
*_ndr_info24
;
320 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info24
, 4, -1));
321 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo24(_ndr_info24
, NDR_SCALARS
, &r
->info24
));
322 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info24
, 4, -1));
328 struct ndr_pull
*_ndr_info28
;
329 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info28
, 4, -1));
330 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo28(_ndr_info28
, NDR_SCALARS
, &r
->info28
));
331 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info28
, 4, -1));
337 struct ndr_pull
*_ndr_info48
;
338 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info48
, 4, -1));
339 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo48(_ndr_info48
, NDR_SCALARS
, &r
->info48
));
340 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info48
, 4, -1));
346 struct ndr_pull
*_ndr_FallBack
;
347 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_FallBack
, 4, -1));
348 NDR_CHECK(ndr_pull_drsuapi_DsBindInfoFallBack(_ndr_FallBack
, NDR_SCALARS
, &r
->FallBack
));
349 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_FallBack
, 4, -1));
355 if (ndr_flags
& NDR_BUFFERS
) {
371 return NDR_ERR_SUCCESS
;
374 _PUBLIC_
void ndr_print_drsuapi_DsBindInfo(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsBindInfo
*r
)
377 level
= ndr_print_get_switch_value(ndr
, r
);
378 ndr_print_union(ndr
, name
, level
, "drsuapi_DsBindInfo");
381 ndr_print_drsuapi_DsBindInfo24(ndr
, "info24", &r
->info24
);
385 ndr_print_drsuapi_DsBindInfo28(ndr
, "info28", &r
->info28
);
389 ndr_print_drsuapi_DsBindInfo48(ndr
, "info48", &r
->info48
);
393 ndr_print_drsuapi_DsBindInfoFallBack(ndr
, "FallBack", &r
->FallBack
);
399 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfoCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsBindInfoCtr
*r
)
401 if (ndr_flags
& NDR_SCALARS
) {
402 NDR_CHECK(ndr_push_align(ndr
, 4));
403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
404 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->info
, r
->length
));
405 NDR_CHECK(ndr_push_drsuapi_DsBindInfo(ndr
, NDR_SCALARS
, &r
->info
));
407 if (ndr_flags
& NDR_BUFFERS
) {
409 return NDR_ERR_SUCCESS
;
412 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfoCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsBindInfoCtr
*r
)
414 if (ndr_flags
& NDR_SCALARS
) {
415 NDR_CHECK(ndr_pull_align(ndr
, 4));
416 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
417 if (r
->length
< 1 || r
->length
> 10000) {
418 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
420 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->info
, r
->length
));
421 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo(ndr
, NDR_SCALARS
, &r
->info
));
423 if (ndr_flags
& NDR_BUFFERS
) {
425 return NDR_ERR_SUCCESS
;
428 _PUBLIC_
void ndr_print_drsuapi_DsBindInfoCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsBindInfoCtr
*r
)
430 ndr_print_struct(ndr
, name
, "drsuapi_DsBindInfoCtr");
432 ndr_print_uint32(ndr
, "length", r
->length
);
433 ndr_print_set_switch_value(ndr
, &r
->info
, r
->length
);
434 ndr_print_drsuapi_DsBindInfo(ndr
, "info", &r
->info
);
438 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectIdentifier(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectIdentifier
*r
)
440 if (ndr_flags
& NDR_SCALARS
) {
441 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->dn
) + 1));
442 NDR_CHECK(ndr_push_align(ndr
, 4));
443 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_drsuapi_DsReplicaObjectIdentifier(r
, ndr
->iconv_convenience
, ndr
->flags
) - 4));
444 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_dom_sid28(&r
->sid
, ndr
->flags
)));
445 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
446 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
447 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->dn
)));
448 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dn
, strlen_m(r
->dn
) + 1, sizeof(uint16_t), CH_UTF16
));
450 if (ndr_flags
& NDR_BUFFERS
) {
451 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
453 return NDR_ERR_SUCCESS
;
456 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectIdentifier(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectIdentifier
*r
)
458 if (ndr_flags
& NDR_SCALARS
) {
459 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dn
));
460 NDR_CHECK(ndr_pull_align(ndr
, 4));
461 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
462 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_sid
));
463 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
464 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
465 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_dn
));
466 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dn
, ndr_get_array_size(ndr
, &r
->dn
), sizeof(uint16_t), CH_UTF16
));
468 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->dn
, r
->__ndr_size_dn
+ 1));
471 if (ndr_flags
& NDR_BUFFERS
) {
472 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
474 return NDR_ERR_SUCCESS
;
477 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjectIdentifier(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjectIdentifier
*r
)
479 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjectIdentifier");
481 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_drsuapi_DsReplicaObjectIdentifier(r
, ndr
->iconv_convenience
, ndr
->flags
) - 4:r
->__ndr_size
);
482 ndr_print_uint32(ndr
, "__ndr_size_sid", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_dom_sid28(&r
->sid
, ndr
->flags
):r
->__ndr_size_sid
);
483 ndr_print_GUID(ndr
, "guid", &r
->guid
);
484 ndr_print_dom_sid28(ndr
, "sid", &r
->sid
);
485 ndr_print_uint32(ndr
, "__ndr_size_dn", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->dn
):r
->__ndr_size_dn
);
486 ndr_print_string(ndr
, "dn", r
->dn
);
490 _PUBLIC_
size_t ndr_size_drsuapi_DsReplicaObjectIdentifier(const struct drsuapi_DsReplicaObjectIdentifier
*r
, struct smb_iconv_convenience
*ic
, int flags
)
492 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_drsuapi_DsReplicaObjectIdentifier
, ic
);
495 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaSyncOptions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
497 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
498 return NDR_ERR_SUCCESS
;
501 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaSyncOptions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
504 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
506 return NDR_ERR_SUCCESS
;
509 _PUBLIC_
void ndr_print_drsuapi_DsReplicaSyncOptions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
511 ndr_print_uint32(ndr
, name
, r
);
513 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_OPERATION
, r
);
514 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_WRITEABLE", DRSUAPI_DS_REPLICA_SYNC_WRITEABLE
, r
);
515 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_PERIODIC", DRSUAPI_DS_REPLICA_SYNC_PERIODIC
, r
);
516 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_INTERSITE_MESSAGING", DRSUAPI_DS_REPLICA_SYNC_INTERSITE_MESSAGING
, r
);
517 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_ALL_SOURCES", DRSUAPI_DS_REPLICA_SYNC_ALL_SOURCES
, r
);
518 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_FULL", DRSUAPI_DS_REPLICA_SYNC_FULL
, r
);
519 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_URGENT", DRSUAPI_DS_REPLICA_SYNC_URGENT
, r
);
520 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_NO_DISCARD", DRSUAPI_DS_REPLICA_SYNC_NO_DISCARD
, r
);
521 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_FORCE", DRSUAPI_DS_REPLICA_SYNC_FORCE
, r
);
522 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_ADD_REFERENCE", DRSUAPI_DS_REPLICA_SYNC_ADD_REFERENCE
, r
);
523 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_NEVER_COMPLETED", DRSUAPI_DS_REPLICA_SYNC_NEVER_COMPLETED
, r
);
524 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_TWO_WAY", DRSUAPI_DS_REPLICA_SYNC_TWO_WAY
, r
);
525 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_NEVER_NOTIFY", DRSUAPI_DS_REPLICA_SYNC_NEVER_NOTIFY
, r
);
526 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_INITIAL", DRSUAPI_DS_REPLICA_SYNC_INITIAL
, r
);
527 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_USE_COMPRESSION", DRSUAPI_DS_REPLICA_SYNC_USE_COMPRESSION
, r
);
528 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_ABANDONED", DRSUAPI_DS_REPLICA_SYNC_ABANDONED
, r
);
529 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_INITIAL_IN_PROGRESS", DRSUAPI_DS_REPLICA_SYNC_INITIAL_IN_PROGRESS
, r
);
530 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_PARTIAL_ATTRIBUTE_SET", DRSUAPI_DS_REPLICA_SYNC_PARTIAL_ATTRIBUTE_SET
, r
);
531 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_REQUEUE", DRSUAPI_DS_REPLICA_SYNC_REQUEUE
, r
);
532 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_NOTIFICATION", DRSUAPI_DS_REPLICA_SYNC_NOTIFICATION
, r
);
533 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_REPLICA", DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_REPLICA
, r
);
534 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_CRITICAL", DRSUAPI_DS_REPLICA_SYNC_CRITICAL
, r
);
535 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_FULL_IN_PROGRESS", DRSUAPI_DS_REPLICA_SYNC_FULL_IN_PROGRESS
, r
);
536 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_PREEMPTED", DRSUAPI_DS_REPLICA_SYNC_PREEMPTED
, r
);
540 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaSyncRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaSyncRequest1
*r
)
542 if (ndr_flags
& NDR_SCALARS
) {
543 NDR_CHECK(ndr_push_align(ndr
, 4));
544 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->naming_context
));
545 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
547 uint32_t _flags_save_string
= ndr
->flags
;
548 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
549 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->other_info
));
550 ndr
->flags
= _flags_save_string
;
552 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncOptions(ndr
, NDR_SCALARS
, r
->options
));
554 if (ndr_flags
& NDR_BUFFERS
) {
555 if (r
->naming_context
) {
556 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
559 uint32_t _flags_save_string
= ndr
->flags
;
560 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
562 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->other_info
));
564 ndr
->flags
= _flags_save_string
;
567 return NDR_ERR_SUCCESS
;
570 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaSyncRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaSyncRequest1
*r
)
572 uint32_t _ptr_naming_context
;
573 TALLOC_CTX
*_mem_save_naming_context_0
;
574 uint32_t _ptr_other_info
;
575 TALLOC_CTX
*_mem_save_other_info_0
;
576 if (ndr_flags
& NDR_SCALARS
) {
577 NDR_CHECK(ndr_pull_align(ndr
, 4));
578 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_naming_context
));
579 if (_ptr_naming_context
) {
580 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
582 r
->naming_context
= NULL
;
584 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
586 uint32_t _flags_save_string
= ndr
->flags
;
587 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
588 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_other_info
));
589 if (_ptr_other_info
) {
590 NDR_PULL_ALLOC(ndr
, r
->other_info
);
592 r
->other_info
= NULL
;
594 ndr
->flags
= _flags_save_string
;
596 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncOptions(ndr
, NDR_SCALARS
, &r
->options
));
598 if (ndr_flags
& NDR_BUFFERS
) {
599 if (r
->naming_context
) {
600 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
601 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
602 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
603 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
606 uint32_t _flags_save_string
= ndr
->flags
;
607 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
609 _mem_save_other_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
610 NDR_PULL_SET_MEM_CTX(ndr
, r
->other_info
, 0);
611 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->other_info
));
612 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_other_info_0
, 0);
614 ndr
->flags
= _flags_save_string
;
617 return NDR_ERR_SUCCESS
;
620 _PUBLIC_
void ndr_print_drsuapi_DsReplicaSyncRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaSyncRequest1
*r
)
622 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaSyncRequest1");
624 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
626 if (r
->naming_context
) {
627 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
630 ndr_print_GUID(ndr
, "source_dsa_guid", &r
->source_dsa_guid
);
631 ndr_print_ptr(ndr
, "other_info", r
->other_info
);
634 ndr_print_string(ndr
, "other_info", r
->other_info
);
637 ndr_print_drsuapi_DsReplicaSyncOptions(ndr
, "options", r
->options
);
641 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaSyncRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaSyncRequest
*r
)
643 if (ndr_flags
& NDR_SCALARS
) {
644 int level
= ndr_push_get_switch_value(ndr
, r
);
645 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
648 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
652 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
655 if (ndr_flags
& NDR_BUFFERS
) {
656 int level
= ndr_push_get_switch_value(ndr
, r
);
659 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
663 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
666 return NDR_ERR_SUCCESS
;
669 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaSyncRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaSyncRequest
*r
)
673 level
= ndr_pull_get_switch_value(ndr
, r
);
674 if (ndr_flags
& NDR_SCALARS
) {
675 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
676 if (_level
!= level
) {
677 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
681 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
685 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
688 if (ndr_flags
& NDR_BUFFERS
) {
691 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
695 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
698 return NDR_ERR_SUCCESS
;
701 _PUBLIC_
void ndr_print_drsuapi_DsReplicaSyncRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaSyncRequest
*r
)
704 level
= ndr_print_get_switch_value(ndr
, r
);
705 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaSyncRequest");
708 ndr_print_drsuapi_DsReplicaSyncRequest1(ndr
, "req1", &r
->req1
);
712 ndr_print_bad_level(ndr
, name
, level
);
716 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaHighWaterMark(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaHighWaterMark
*r
)
718 if (ndr_flags
& NDR_SCALARS
) {
719 NDR_CHECK(ndr_push_align(ndr
, 8));
720 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->tmp_highest_usn
));
721 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->reserved_usn
));
722 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->highest_usn
));
724 if (ndr_flags
& NDR_BUFFERS
) {
726 return NDR_ERR_SUCCESS
;
729 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaHighWaterMark(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaHighWaterMark
*r
)
731 if (ndr_flags
& NDR_SCALARS
) {
732 NDR_CHECK(ndr_pull_align(ndr
, 8));
733 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->tmp_highest_usn
));
734 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->reserved_usn
));
735 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->highest_usn
));
737 if (ndr_flags
& NDR_BUFFERS
) {
739 return NDR_ERR_SUCCESS
;
742 _PUBLIC_
void ndr_print_drsuapi_DsReplicaHighWaterMark(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaHighWaterMark
*r
)
744 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaHighWaterMark");
746 ndr_print_hyper(ndr
, "tmp_highest_usn", r
->tmp_highest_usn
);
747 ndr_print_hyper(ndr
, "reserved_usn", r
->reserved_usn
);
748 ndr_print_hyper(ndr
, "highest_usn", r
->highest_usn
);
752 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor
*r
)
754 if (ndr_flags
& NDR_SCALARS
) {
755 NDR_CHECK(ndr_push_align(ndr
, 8));
756 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
757 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->highest_usn
));
759 if (ndr_flags
& NDR_BUFFERS
) {
761 return NDR_ERR_SUCCESS
;
764 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor
*r
)
766 if (ndr_flags
& NDR_SCALARS
) {
767 NDR_CHECK(ndr_pull_align(ndr
, 8));
768 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
769 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->highest_usn
));
771 if (ndr_flags
& NDR_BUFFERS
) {
773 return NDR_ERR_SUCCESS
;
776 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor
*r
)
778 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor");
780 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
781 ndr_print_hyper(ndr
, "highest_usn", r
->highest_usn
);
785 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursorCtrEx(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursorCtrEx
*r
)
787 uint32_t cntr_cursors_0
;
788 if (ndr_flags
& NDR_SCALARS
) {
789 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
790 NDR_CHECK(ndr_push_align(ndr
, 8));
791 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1));
792 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
793 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
794 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
795 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
796 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
799 if (ndr_flags
& NDR_BUFFERS
) {
801 return NDR_ERR_SUCCESS
;
804 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursorCtrEx(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursorCtrEx
*r
)
806 uint32_t cntr_cursors_0
;
807 TALLOC_CTX
*_mem_save_cursors_0
;
808 if (ndr_flags
& NDR_SCALARS
) {
809 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->cursors
));
810 NDR_CHECK(ndr_pull_align(ndr
, 8));
811 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
812 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved1
));
813 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
814 if (r
->count
> 0x100000) {
815 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
817 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved2
));
818 NDR_PULL_ALLOC_N(ndr
, r
->cursors
, ndr_get_array_size(ndr
, &r
->cursors
));
819 _mem_save_cursors_0
= NDR_PULL_GET_MEM_CTX(ndr
);
820 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors
, 0);
821 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
822 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
824 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors_0
, 0);
826 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->cursors
, r
->count
));
829 if (ndr_flags
& NDR_BUFFERS
) {
831 return NDR_ERR_SUCCESS
;
834 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursorCtrEx(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursorCtrEx
*r
)
836 uint32_t cntr_cursors_0
;
837 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursorCtrEx");
839 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?1:r
->version
);
840 ndr_print_uint32(ndr
, "reserved1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved1
);
841 ndr_print_uint32(ndr
, "count", r
->count
);
842 ndr_print_uint32(ndr
, "reserved2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved2
);
843 ndr
->print(ndr
, "%s: ARRAY(%d)", "cursors", (int)r
->count
);
845 for (cntr_cursors_0
=0;cntr_cursors_0
<r
->count
;cntr_cursors_0
++) {
847 if (asprintf(&idx_0
, "[%d]", cntr_cursors_0
) != -1) {
848 ndr_print_drsuapi_DsReplicaCursor(ndr
, "cursors", &r
->cursors
[cntr_cursors_0
]);
856 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaNeighbourFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
858 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
859 return NDR_ERR_SUCCESS
;
862 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaNeighbourFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
865 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
867 return NDR_ERR_SUCCESS
;
870 _PUBLIC_
void ndr_print_drsuapi_DsReplicaNeighbourFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
872 ndr_print_uint32(ndr
, name
, r
);
874 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE", DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE
, r
);
875 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP", DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
, r
);
876 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS", DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS
, r
);
877 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_USE_ASYNC_INTERSIDE_TRANSPORT", DRSUAPI_DS_REPLICA_NEIGHBOUR_USE_ASYNC_INTERSIDE_TRANSPORT
, r
);
878 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC", DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC
, r
);
879 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS", DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
, r
);
880 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS", DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS
, r
);
881 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_NEXT_PACKET", DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_NEXT_PACKET
, r
);
882 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED", DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
, r
);
883 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED", DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED
, r
);
884 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS", DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS
, r
);
885 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC", DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC
, r
);
886 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES", DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES
, r
);
887 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS", DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS
, r
);
888 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET", DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET
, r
);
892 static enum ndr_err_code
ndr_push_drsuapi_DsExtendedOperation(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsExtendedOperation r
)
895 uint32_t _flags_save_ENUM
= ndr
->flags
;
896 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
897 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
898 ndr
->flags
= _flags_save_ENUM
;
900 return NDR_ERR_SUCCESS
;
903 static enum ndr_err_code
ndr_pull_drsuapi_DsExtendedOperation(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsExtendedOperation
*r
)
907 uint32_t _flags_save_ENUM
= ndr
->flags
;
908 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
909 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
911 ndr
->flags
= _flags_save_ENUM
;
913 return NDR_ERR_SUCCESS
;
916 _PUBLIC_
void ndr_print_drsuapi_DsExtendedOperation(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsExtendedOperation r
)
918 const char *val
= NULL
;
921 uint32_t _flags_save_ENUM
= ndr
->flags
;
922 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
924 case DRSUAPI_EXOP_NONE
: val
= "DRSUAPI_EXOP_NONE"; break;
925 case DRSUAPI_EXOP_FSMO_REQ_ROLE
: val
= "DRSUAPI_EXOP_FSMO_REQ_ROLE"; break;
926 case DRSUAPI_EXOP_FSMO_RID_ALLOC
: val
= "DRSUAPI_EXOP_FSMO_RID_ALLOC"; break;
927 case DRSUAPI_EXOP_FSMO_RID_REQ_ROLE
: val
= "DRSUAPI_EXOP_FSMO_RID_REQ_ROLE"; break;
928 case DRSUAPI_EXOP_FSMO_REQ_PDC
: val
= "DRSUAPI_EXOP_FSMO_REQ_PDC"; break;
929 case DRSUAPI_EXOP_FSMO_ABANDON_ROLE
: val
= "DRSUAPI_EXOP_FSMO_ABANDON_ROLE"; break;
930 case DRSUAPI_EXOP_REPL_OBJ
: val
= "DRSUAPI_EXOP_REPL_OBJ"; break;
931 case DRSUAPI_EXOP_REPL_SECRET
: val
= "DRSUAPI_EXOP_REPL_SECRET"; break;
933 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
934 ndr
->flags
= _flags_save_ENUM
;
938 static enum ndr_err_code
ndr_push_drsuapi_DsExtendedError(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsExtendedError r
)
941 uint32_t _flags_save_ENUM
= ndr
->flags
;
942 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
943 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
944 ndr
->flags
= _flags_save_ENUM
;
946 return NDR_ERR_SUCCESS
;
949 static enum ndr_err_code
ndr_pull_drsuapi_DsExtendedError(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsExtendedError
*r
)
953 uint32_t _flags_save_ENUM
= ndr
->flags
;
954 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
955 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
957 ndr
->flags
= _flags_save_ENUM
;
959 return NDR_ERR_SUCCESS
;
962 _PUBLIC_
void ndr_print_drsuapi_DsExtendedError(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsExtendedError r
)
964 const char *val
= NULL
;
967 uint32_t _flags_save_ENUM
= ndr
->flags
;
968 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
970 case DRSUAPI_EXOP_ERR_NONE
: val
= "DRSUAPI_EXOP_ERR_NONE"; break;
971 case DRSUAPI_EXOP_ERR_SUCCESS
: val
= "DRSUAPI_EXOP_ERR_SUCCESS"; break;
972 case DRSUAPI_EXOP_ERR_UNKNOWN_OP
: val
= "DRSUAPI_EXOP_ERR_UNKNOWN_OP"; break;
973 case DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER
: val
= "DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER"; break;
974 case DRSUAPI_EXOP_ERR_UPDATE_ERR
: val
= "DRSUAPI_EXOP_ERR_UPDATE_ERR"; break;
975 case DRSUAPI_EXOP_ERR_EXCEPTION
: val
= "DRSUAPI_EXOP_ERR_EXCEPTION"; break;
976 case DRSUAPI_EXOP_ERR_UNKNOWN_CALLER
: val
= "DRSUAPI_EXOP_ERR_UNKNOWN_CALLER"; break;
977 case DRSUAPI_EXOP_ERR_RID_ALLOC
: val
= "DRSUAPI_EXOP_ERR_RID_ALLOC"; break;
978 case DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED
: val
= "DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED"; break;
979 case DRSUAPI_EXOP_ERR_FMSO_PENDING_OP
: val
= "DRSUAPI_EXOP_ERR_FMSO_PENDING_OP"; break;
980 case DRSUAPI_EXOP_ERR_MISMATCH
: val
= "DRSUAPI_EXOP_ERR_MISMATCH"; break;
981 case DRSUAPI_EXOP_ERR_COULDNT_CONTACT
: val
= "DRSUAPI_EXOP_ERR_COULDNT_CONTACT"; break;
982 case DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES
: val
= "DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES"; break;
983 case DRSUAPI_EXOP_ERR_DIR_ERROR
: val
= "DRSUAPI_EXOP_ERR_DIR_ERROR"; break;
984 case DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS
: val
= "DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS"; break;
985 case DRSUAPI_EXOP_ERR_ACCESS_DENIED
: val
= "DRSUAPI_EXOP_ERR_ACCESS_DENIED"; break;
986 case DRSUAPI_EXOP_ERR_PARAM_ERROR
: val
= "DRSUAPI_EXOP_ERR_PARAM_ERROR"; break;
988 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
989 ndr
->flags
= _flags_save_ENUM
;
993 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesRequest5(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesRequest5
*r
)
995 if (ndr_flags
& NDR_SCALARS
) {
996 NDR_CHECK(ndr_push_align(ndr
, 8));
997 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->destination_dsa_guid
));
998 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
999 if (r
->naming_context
== NULL
) {
1000 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1002 NDR_CHECK(ndr_push_ref_ptr(ndr
));
1003 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1004 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->uptodateness_vector
));
1005 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, r
->replica_flags
));
1006 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_object_count
));
1007 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_ndr_size
));
1008 NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr
, NDR_SCALARS
, r
->extended_op
));
1009 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->fsmo_info
));
1011 if (ndr_flags
& NDR_BUFFERS
) {
1012 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
1013 if (r
->uptodateness_vector
) {
1014 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
1017 return NDR_ERR_SUCCESS
;
1020 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesRequest5(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesRequest5
*r
)
1022 uint32_t _ptr_naming_context
;
1023 TALLOC_CTX
*_mem_save_naming_context_0
;
1024 uint32_t _ptr_uptodateness_vector
;
1025 TALLOC_CTX
*_mem_save_uptodateness_vector_0
;
1026 if (ndr_flags
& NDR_SCALARS
) {
1027 NDR_CHECK(ndr_pull_align(ndr
, 8));
1028 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->destination_dsa_guid
));
1029 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1030 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
1031 if (_ptr_naming_context
) {
1032 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
1034 r
->naming_context
= NULL
;
1036 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1037 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_uptodateness_vector
));
1038 if (_ptr_uptodateness_vector
) {
1039 NDR_PULL_ALLOC(ndr
, r
->uptodateness_vector
);
1041 r
->uptodateness_vector
= NULL
;
1043 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, &r
->replica_flags
));
1044 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_object_count
));
1045 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_ndr_size
));
1046 NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr
, NDR_SCALARS
, &r
->extended_op
));
1047 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->fsmo_info
));
1049 if (ndr_flags
& NDR_BUFFERS
) {
1050 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1051 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
1052 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
1053 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
1054 if (r
->uptodateness_vector
) {
1055 _mem_save_uptodateness_vector_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1056 NDR_PULL_SET_MEM_CTX(ndr
, r
->uptodateness_vector
, 0);
1057 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
1058 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_uptodateness_vector_0
, 0);
1061 return NDR_ERR_SUCCESS
;
1064 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesRequest5
*r
)
1066 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesRequest5");
1068 ndr_print_GUID(ndr
, "destination_dsa_guid", &r
->destination_dsa_guid
);
1069 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
1070 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
1072 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
1074 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "highwatermark", &r
->highwatermark
);
1075 ndr_print_ptr(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
1077 if (r
->uptodateness_vector
) {
1078 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
1081 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr
, "replica_flags", r
->replica_flags
);
1082 ndr_print_uint32(ndr
, "max_object_count", r
->max_object_count
);
1083 ndr_print_uint32(ndr
, "max_ndr_size", r
->max_ndr_size
);
1084 ndr_print_drsuapi_DsExtendedOperation(ndr
, "extended_op", r
->extended_op
);
1085 ndr_print_hyper(ndr
, "fsmo_info", r
->fsmo_info
);
1089 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOID(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaOID
*r
)
1091 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaOID");
1093 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_drsuapi_DsReplicaOID_oid(r
->oid
, 0):r
->__ndr_size
);
1094 ndr_print_ptr(ndr
, "oid", r
->oid
);
1097 ndr_print_string(ndr
, "oid", r
->oid
);
1103 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaOIDMapping(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaOIDMapping
*r
)
1105 if (ndr_flags
& NDR_SCALARS
) {
1106 NDR_CHECK(ndr_push_align(ndr
, 4));
1107 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->id_prefix
));
1108 NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr
, NDR_SCALARS
, &r
->oid
));
1110 if (ndr_flags
& NDR_BUFFERS
) {
1111 NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr
, NDR_BUFFERS
, &r
->oid
));
1113 return NDR_ERR_SUCCESS
;
1116 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaOIDMapping(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaOIDMapping
*r
)
1118 if (ndr_flags
& NDR_SCALARS
) {
1119 NDR_CHECK(ndr_pull_align(ndr
, 4));
1120 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->id_prefix
));
1121 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr
, NDR_SCALARS
, &r
->oid
));
1123 if (ndr_flags
& NDR_BUFFERS
) {
1124 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr
, NDR_BUFFERS
, &r
->oid
));
1126 return NDR_ERR_SUCCESS
;
1129 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOIDMapping(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaOIDMapping
*r
)
1131 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaOIDMapping");
1133 ndr_print_uint32(ndr
, "id_prefix", r
->id_prefix
);
1134 ndr_print_drsuapi_DsReplicaOID(ndr
, "oid", &r
->oid
);
1138 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaOIDMapping_Ctr
*r
)
1140 uint32_t cntr_mappings_1
;
1141 if (ndr_flags
& NDR_SCALARS
) {
1142 NDR_CHECK(ndr_push_align(ndr
, 4));
1143 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_mappings
));
1144 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->mappings
));
1146 if (ndr_flags
& NDR_BUFFERS
) {
1148 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_mappings
));
1149 for (cntr_mappings_1
= 0; cntr_mappings_1
< r
->num_mappings
; cntr_mappings_1
++) {
1150 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping(ndr
, NDR_SCALARS
, &r
->mappings
[cntr_mappings_1
]));
1152 for (cntr_mappings_1
= 0; cntr_mappings_1
< r
->num_mappings
; cntr_mappings_1
++) {
1153 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping(ndr
, NDR_BUFFERS
, &r
->mappings
[cntr_mappings_1
]));
1157 return NDR_ERR_SUCCESS
;
1160 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaOIDMapping_Ctr
*r
)
1162 uint32_t _ptr_mappings
;
1163 uint32_t cntr_mappings_1
;
1164 TALLOC_CTX
*_mem_save_mappings_0
;
1165 TALLOC_CTX
*_mem_save_mappings_1
;
1166 if (ndr_flags
& NDR_SCALARS
) {
1167 NDR_CHECK(ndr_pull_align(ndr
, 4));
1168 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_mappings
));
1169 if (r
->num_mappings
> 0x100000) {
1170 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1172 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_mappings
));
1173 if (_ptr_mappings
) {
1174 NDR_PULL_ALLOC(ndr
, r
->mappings
);
1179 if (ndr_flags
& NDR_BUFFERS
) {
1181 _mem_save_mappings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1182 NDR_PULL_SET_MEM_CTX(ndr
, r
->mappings
, 0);
1183 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->mappings
));
1184 NDR_PULL_ALLOC_N(ndr
, r
->mappings
, ndr_get_array_size(ndr
, &r
->mappings
));
1185 _mem_save_mappings_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1186 NDR_PULL_SET_MEM_CTX(ndr
, r
->mappings
, 0);
1187 for (cntr_mappings_1
= 0; cntr_mappings_1
< r
->num_mappings
; cntr_mappings_1
++) {
1188 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping(ndr
, NDR_SCALARS
, &r
->mappings
[cntr_mappings_1
]));
1190 for (cntr_mappings_1
= 0; cntr_mappings_1
< r
->num_mappings
; cntr_mappings_1
++) {
1191 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping(ndr
, NDR_BUFFERS
, &r
->mappings
[cntr_mappings_1
]));
1193 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_mappings_1
, 0);
1194 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_mappings_0
, 0);
1197 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->mappings
, r
->num_mappings
));
1200 return NDR_ERR_SUCCESS
;
1203 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaOIDMapping_Ctr
*r
)
1205 uint32_t cntr_mappings_1
;
1206 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaOIDMapping_Ctr");
1208 ndr_print_uint32(ndr
, "num_mappings", r
->num_mappings
);
1209 ndr_print_ptr(ndr
, "mappings", r
->mappings
);
1212 ndr
->print(ndr
, "%s: ARRAY(%d)", "mappings", (int)r
->num_mappings
);
1214 for (cntr_mappings_1
=0;cntr_mappings_1
<r
->num_mappings
;cntr_mappings_1
++) {
1216 if (asprintf(&idx_1
, "[%d]", cntr_mappings_1
) != -1) {
1217 ndr_print_drsuapi_DsReplicaOIDMapping(ndr
, "mappings", &r
->mappings
[cntr_mappings_1
]);
1227 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsAttributeId(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsAttributeId r
)
1230 uint32_t _flags_save_ENUM
= ndr
->flags
;
1231 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1232 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
1233 ndr
->flags
= _flags_save_ENUM
;
1235 return NDR_ERR_SUCCESS
;
1238 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsAttributeId(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsAttributeId
*r
)
1242 uint32_t _flags_save_ENUM
= ndr
->flags
;
1243 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1244 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
1246 ndr
->flags
= _flags_save_ENUM
;
1248 return NDR_ERR_SUCCESS
;
1251 _PUBLIC_
void ndr_print_drsuapi_DsAttributeId(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsAttributeId r
)
1253 const char *val
= NULL
;
1256 uint32_t _flags_save_ENUM
= ndr
->flags
;
1257 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1259 case DRSUAPI_ATTRIBUTE_objectClass
: val
= "DRSUAPI_ATTRIBUTE_objectClass"; break;
1260 case DRSUAPI_ATTRIBUTE_description
: val
= "DRSUAPI_ATTRIBUTE_description"; break;
1261 case DRSUAPI_ATTRIBUTE_member
: val
= "DRSUAPI_ATTRIBUTE_member"; break;
1262 case DRSUAPI_ATTRIBUTE_instanceType
: val
= "DRSUAPI_ATTRIBUTE_instanceType"; break;
1263 case DRSUAPI_ATTRIBUTE_whenCreated
: val
= "DRSUAPI_ATTRIBUTE_whenCreated"; break;
1264 case DRSUAPI_ATTRIBUTE_hasMasterNCs
: val
= "DRSUAPI_ATTRIBUTE_hasMasterNCs"; break;
1265 case DRSUAPI_ATTRIBUTE_governsID
: val
= "DRSUAPI_ATTRIBUTE_governsID"; break;
1266 case DRSUAPI_ATTRIBUTE_attributeID
: val
= "DRSUAPI_ATTRIBUTE_attributeID"; break;
1267 case DRSUAPI_ATTRIBUTE_attributeSyntax
: val
= "DRSUAPI_ATTRIBUTE_attributeSyntax"; break;
1268 case DRSUAPI_ATTRIBUTE_isSingleValued
: val
= "DRSUAPI_ATTRIBUTE_isSingleValued"; break;
1269 case DRSUAPI_ATTRIBUTE_rangeLower
: val
= "DRSUAPI_ATTRIBUTE_rangeLower"; break;
1270 case DRSUAPI_ATTRIBUTE_rangeUpper
: val
= "DRSUAPI_ATTRIBUTE_rangeUpper"; break;
1271 case DRSUAPI_ATTRIBUTE_dMDLocation
: val
= "DRSUAPI_ATTRIBUTE_dMDLocation"; break;
1272 case DRSUAPI_ATTRIBUTE_objectVersion
: val
= "DRSUAPI_ATTRIBUTE_objectVersion"; break;
1273 case DRSUAPI_ATTRIBUTE_invocationId
: val
= "DRSUAPI_ATTRIBUTE_invocationId"; break;
1274 case DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly
: val
= "DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly"; break;
1275 case DRSUAPI_ATTRIBUTE_adminDisplayName
: val
= "DRSUAPI_ATTRIBUTE_adminDisplayName"; break;
1276 case DRSUAPI_ATTRIBUTE_adminDescription
: val
= "DRSUAPI_ATTRIBUTE_adminDescription"; break;
1277 case DRSUAPI_ATTRIBUTE_oMSyntax
: val
= "DRSUAPI_ATTRIBUTE_oMSyntax"; break;
1278 case DRSUAPI_ATTRIBUTE_ntSecurityDescriptor
: val
= "DRSUAPI_ATTRIBUTE_ntSecurityDescriptor"; break;
1279 case DRSUAPI_ATTRIBUTE_searchFlags
: val
= "DRSUAPI_ATTRIBUTE_searchFlags"; break;
1280 case DRSUAPI_ATTRIBUTE_lDAPDisplayName
: val
= "DRSUAPI_ATTRIBUTE_lDAPDisplayName"; break;
1281 case DRSUAPI_ATTRIBUTE_name
: val
= "DRSUAPI_ATTRIBUTE_name"; break;
1282 case DRSUAPI_ATTRIBUTE_userAccountControl
: val
= "DRSUAPI_ATTRIBUTE_userAccountControl"; break;
1283 case DRSUAPI_ATTRIBUTE_currentValue
: val
= "DRSUAPI_ATTRIBUTE_currentValue"; break;
1284 case DRSUAPI_ATTRIBUTE_homeDirectory
: val
= "DRSUAPI_ATTRIBUTE_homeDirectory"; break;
1285 case DRSUAPI_ATTRIBUTE_homeDrive
: val
= "DRSUAPI_ATTRIBUTE_homeDrive"; break;
1286 case DRSUAPI_ATTRIBUTE_scriptPath
: val
= "DRSUAPI_ATTRIBUTE_scriptPath"; break;
1287 case DRSUAPI_ATTRIBUTE_profilePath
: val
= "DRSUAPI_ATTRIBUTE_profilePath"; break;
1288 case DRSUAPI_ATTRIBUTE_objectSid
: val
= "DRSUAPI_ATTRIBUTE_objectSid"; break;
1289 case DRSUAPI_ATTRIBUTE_schemaIDGUID
: val
= "DRSUAPI_ATTRIBUTE_schemaIDGUID"; break;
1290 case DRSUAPI_ATTRIBUTE_dBCSPwd
: val
= "DRSUAPI_ATTRIBUTE_dBCSPwd"; break;
1291 case DRSUAPI_ATTRIBUTE_logonHours
: val
= "DRSUAPI_ATTRIBUTE_logonHours"; break;
1292 case DRSUAPI_ATTRIBUTE_userWorkstations
: val
= "DRSUAPI_ATTRIBUTE_userWorkstations"; break;
1293 case DRSUAPI_ATTRIBUTE_unicodePwd
: val
= "DRSUAPI_ATTRIBUTE_unicodePwd"; break;
1294 case DRSUAPI_ATTRIBUTE_ntPwdHistory
: val
= "DRSUAPI_ATTRIBUTE_ntPwdHistory"; break;
1295 case DRSUAPI_ATTRIBUTE_priorValue
: val
= "DRSUAPI_ATTRIBUTE_priorValue"; break;
1296 case DRSUAPI_ATTRIBUTE_supplementalCredentials
: val
= "DRSUAPI_ATTRIBUTE_supplementalCredentials"; break;
1297 case DRSUAPI_ATTRIBUTE_trustAuthIncoming
: val
= "DRSUAPI_ATTRIBUTE_trustAuthIncoming"; break;
1298 case DRSUAPI_ATTRIBUTE_trustAuthOutgoing
: val
= "DRSUAPI_ATTRIBUTE_trustAuthOutgoing"; break;
1299 case DRSUAPI_ATTRIBUTE_lmPwdHistory
: val
= "DRSUAPI_ATTRIBUTE_lmPwdHistory"; break;
1300 case DRSUAPI_ATTRIBUTE_sAMAccountName
: val
= "DRSUAPI_ATTRIBUTE_sAMAccountName"; break;
1301 case DRSUAPI_ATTRIBUTE_sAMAccountType
: val
= "DRSUAPI_ATTRIBUTE_sAMAccountType"; break;
1302 case DRSUAPI_ATTRIBUTE_fSMORoleOwner
: val
= "DRSUAPI_ATTRIBUTE_fSMORoleOwner"; break;
1303 case DRSUAPI_ATTRIBUTE_systemFlags
: val
= "DRSUAPI_ATTRIBUTE_systemFlags"; break;
1304 case DRSUAPI_ATTRIBUTE_serverReference
: val
= "DRSUAPI_ATTRIBUTE_serverReference"; break;
1305 case DRSUAPI_ATTRIBUTE_serverReferenceBL
: val
= "DRSUAPI_ATTRIBUTE_serverReferenceBL"; break;
1306 case DRSUAPI_ATTRIBUTE_initialAuthIncoming
: val
= "DRSUAPI_ATTRIBUTE_initialAuthIncoming"; break;
1307 case DRSUAPI_ATTRIBUTE_initialAuthOutgoing
: val
= "DRSUAPI_ATTRIBUTE_initialAuthOutgoing"; break;
1308 case DRSUAPI_ATTRIBUTE_wellKnownObjects
: val
= "DRSUAPI_ATTRIBUTE_wellKnownObjects"; break;
1309 case DRSUAPI_ATTRIBUTE_dNSHostName
: val
= "DRSUAPI_ATTRIBUTE_dNSHostName"; break;
1310 case DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet
: val
= "DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet"; break;
1311 case DRSUAPI_ATTRIBUTE_userPrincipalName
: val
= "DRSUAPI_ATTRIBUTE_userPrincipalName"; break;
1312 case DRSUAPI_ATTRIBUTE_groupType
: val
= "DRSUAPI_ATTRIBUTE_groupType"; break;
1313 case DRSUAPI_ATTRIBUTE_servicePrincipalName
: val
= "DRSUAPI_ATTRIBUTE_servicePrincipalName"; break;
1314 case DRSUAPI_ATTRIBUTE_objectCategory
: val
= "DRSUAPI_ATTRIBUTE_objectCategory"; break;
1315 case DRSUAPI_ATTRIBUTE_gPLink
: val
= "DRSUAPI_ATTRIBUTE_gPLink"; break;
1316 case DRSUAPI_ATTRIBUTE_msDS_Behavior_Version
: val
= "DRSUAPI_ATTRIBUTE_msDS_Behavior_Version"; break;
1317 case DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber
: val
= "DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber"; break;
1318 case DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs
: val
= "DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs"; break;
1319 case DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs
: val
= "DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs"; break;
1321 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1322 ndr
->flags
= _flags_save_ENUM
;
1326 static enum ndr_err_code
ndr_push_drsuapi_DsPartialAttributeSet(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsPartialAttributeSet
*r
)
1328 uint32_t cntr_attids_0
;
1329 if (ndr_flags
& NDR_SCALARS
) {
1330 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_attids
));
1331 NDR_CHECK(ndr_push_align(ndr
, 4));
1332 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1));
1333 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1334 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_attids
));
1335 for (cntr_attids_0
= 0; cntr_attids_0
< r
->num_attids
; cntr_attids_0
++) {
1336 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, r
->attids
[cntr_attids_0
]));
1339 if (ndr_flags
& NDR_BUFFERS
) {
1341 return NDR_ERR_SUCCESS
;
1344 static enum ndr_err_code
ndr_pull_drsuapi_DsPartialAttributeSet(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsPartialAttributeSet
*r
)
1346 uint32_t cntr_attids_0
;
1347 TALLOC_CTX
*_mem_save_attids_0
;
1348 if (ndr_flags
& NDR_SCALARS
) {
1349 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attids
));
1350 NDR_CHECK(ndr_pull_align(ndr
, 4));
1351 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
1352 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved1
));
1353 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_attids
));
1354 if (r
->num_attids
< 1 || r
->num_attids
> 0x100000) {
1355 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1357 NDR_PULL_ALLOC_N(ndr
, r
->attids
, ndr_get_array_size(ndr
, &r
->attids
));
1358 _mem_save_attids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1359 NDR_PULL_SET_MEM_CTX(ndr
, r
->attids
, 0);
1360 for (cntr_attids_0
= 0; cntr_attids_0
< r
->num_attids
; cntr_attids_0
++) {
1361 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, &r
->attids
[cntr_attids_0
]));
1363 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attids_0
, 0);
1365 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->attids
, r
->num_attids
));
1368 if (ndr_flags
& NDR_BUFFERS
) {
1370 return NDR_ERR_SUCCESS
;
1373 _PUBLIC_
void ndr_print_drsuapi_DsPartialAttributeSet(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsPartialAttributeSet
*r
)
1375 uint32_t cntr_attids_0
;
1376 ndr_print_struct(ndr
, name
, "drsuapi_DsPartialAttributeSet");
1378 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?1:r
->version
);
1379 ndr_print_uint32(ndr
, "reserved1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved1
);
1380 ndr_print_uint32(ndr
, "num_attids", r
->num_attids
);
1381 ndr
->print(ndr
, "%s: ARRAY(%d)", "attids", (int)r
->num_attids
);
1383 for (cntr_attids_0
=0;cntr_attids_0
<r
->num_attids
;cntr_attids_0
++) {
1385 if (asprintf(&idx_0
, "[%d]", cntr_attids_0
) != -1) {
1386 ndr_print_drsuapi_DsAttributeId(ndr
, "attids", r
->attids
[cntr_attids_0
]);
1394 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesRequest8(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesRequest8
*r
)
1396 if (ndr_flags
& NDR_SCALARS
) {
1397 NDR_CHECK(ndr_push_align(ndr
, 8));
1398 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->destination_dsa_guid
));
1399 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1400 if (r
->naming_context
== NULL
) {
1401 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1403 NDR_CHECK(ndr_push_ref_ptr(ndr
));
1404 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1405 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->uptodateness_vector
));
1406 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, r
->replica_flags
));
1407 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_object_count
));
1408 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_ndr_size
));
1409 NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr
, NDR_SCALARS
, r
->extended_op
));
1410 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->fsmo_info
));
1411 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->partial_attribute_set
));
1412 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->partial_attribute_set_ex
));
1413 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
1415 if (ndr_flags
& NDR_BUFFERS
) {
1416 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
1417 if (r
->uptodateness_vector
) {
1418 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
1420 if (r
->partial_attribute_set
) {
1421 NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set
));
1423 if (r
->partial_attribute_set_ex
) {
1424 NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set_ex
));
1426 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
1428 return NDR_ERR_SUCCESS
;
1431 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesRequest8(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesRequest8
*r
)
1433 uint32_t _ptr_naming_context
;
1434 TALLOC_CTX
*_mem_save_naming_context_0
;
1435 uint32_t _ptr_uptodateness_vector
;
1436 TALLOC_CTX
*_mem_save_uptodateness_vector_0
;
1437 uint32_t _ptr_partial_attribute_set
;
1438 TALLOC_CTX
*_mem_save_partial_attribute_set_0
;
1439 uint32_t _ptr_partial_attribute_set_ex
;
1440 TALLOC_CTX
*_mem_save_partial_attribute_set_ex_0
;
1441 if (ndr_flags
& NDR_SCALARS
) {
1442 NDR_CHECK(ndr_pull_align(ndr
, 8));
1443 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->destination_dsa_guid
));
1444 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1445 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
1446 if (_ptr_naming_context
) {
1447 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
1449 r
->naming_context
= NULL
;
1451 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1452 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_uptodateness_vector
));
1453 if (_ptr_uptodateness_vector
) {
1454 NDR_PULL_ALLOC(ndr
, r
->uptodateness_vector
);
1456 r
->uptodateness_vector
= NULL
;
1458 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, &r
->replica_flags
));
1459 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_object_count
));
1460 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_ndr_size
));
1461 NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr
, NDR_SCALARS
, &r
->extended_op
));
1462 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->fsmo_info
));
1463 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_partial_attribute_set
));
1464 if (_ptr_partial_attribute_set
) {
1465 NDR_PULL_ALLOC(ndr
, r
->partial_attribute_set
);
1467 r
->partial_attribute_set
= NULL
;
1469 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_partial_attribute_set_ex
));
1470 if (_ptr_partial_attribute_set_ex
) {
1471 NDR_PULL_ALLOC(ndr
, r
->partial_attribute_set_ex
);
1473 r
->partial_attribute_set_ex
= NULL
;
1475 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
1477 if (ndr_flags
& NDR_BUFFERS
) {
1478 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1479 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
1480 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
1481 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
1482 if (r
->uptodateness_vector
) {
1483 _mem_save_uptodateness_vector_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1484 NDR_PULL_SET_MEM_CTX(ndr
, r
->uptodateness_vector
, 0);
1485 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
1486 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_uptodateness_vector_0
, 0);
1488 if (r
->partial_attribute_set
) {
1489 _mem_save_partial_attribute_set_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1490 NDR_PULL_SET_MEM_CTX(ndr
, r
->partial_attribute_set
, 0);
1491 NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set
));
1492 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_partial_attribute_set_0
, 0);
1494 if (r
->partial_attribute_set_ex
) {
1495 _mem_save_partial_attribute_set_ex_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1496 NDR_PULL_SET_MEM_CTX(ndr
, r
->partial_attribute_set_ex
, 0);
1497 NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set_ex
));
1498 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_partial_attribute_set_ex_0
, 0);
1500 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
1502 return NDR_ERR_SUCCESS
;
1505 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesRequest8(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesRequest8
*r
)
1507 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesRequest8");
1509 ndr_print_GUID(ndr
, "destination_dsa_guid", &r
->destination_dsa_guid
);
1510 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
1511 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
1513 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
1515 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "highwatermark", &r
->highwatermark
);
1516 ndr_print_ptr(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
1518 if (r
->uptodateness_vector
) {
1519 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
1522 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr
, "replica_flags", r
->replica_flags
);
1523 ndr_print_uint32(ndr
, "max_object_count", r
->max_object_count
);
1524 ndr_print_uint32(ndr
, "max_ndr_size", r
->max_ndr_size
);
1525 ndr_print_drsuapi_DsExtendedOperation(ndr
, "extended_op", r
->extended_op
);
1526 ndr_print_hyper(ndr
, "fsmo_info", r
->fsmo_info
);
1527 ndr_print_ptr(ndr
, "partial_attribute_set", r
->partial_attribute_set
);
1529 if (r
->partial_attribute_set
) {
1530 ndr_print_drsuapi_DsPartialAttributeSet(ndr
, "partial_attribute_set", r
->partial_attribute_set
);
1533 ndr_print_ptr(ndr
, "partial_attribute_set_ex", r
->partial_attribute_set_ex
);
1535 if (r
->partial_attribute_set_ex
) {
1536 ndr_print_drsuapi_DsPartialAttributeSet(ndr
, "partial_attribute_set_ex", r
->partial_attribute_set_ex
);
1539 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, "mapping_ctr", &r
->mapping_ctr
);
1543 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetNCChangesRequest
*r
)
1545 if (ndr_flags
& NDR_SCALARS
) {
1546 int level
= ndr_push_get_switch_value(ndr
, r
);
1547 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
1550 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr
, NDR_SCALARS
, &r
->req5
));
1554 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest8(ndr
, NDR_SCALARS
, &r
->req8
));
1558 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1561 if (ndr_flags
& NDR_BUFFERS
) {
1562 int level
= ndr_push_get_switch_value(ndr
, r
);
1565 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr
, NDR_BUFFERS
, &r
->req5
));
1569 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest8(ndr
, NDR_BUFFERS
, &r
->req8
));
1573 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1576 return NDR_ERR_SUCCESS
;
1579 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetNCChangesRequest
*r
)
1583 level
= ndr_pull_get_switch_value(ndr
, r
);
1584 if (ndr_flags
& NDR_SCALARS
) {
1585 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
1586 if (_level
!= level
) {
1587 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
1591 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr
, NDR_SCALARS
, &r
->req5
));
1595 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest8(ndr
, NDR_SCALARS
, &r
->req8
));
1599 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1602 if (ndr_flags
& NDR_BUFFERS
) {
1605 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr
, NDR_BUFFERS
, &r
->req5
));
1609 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest8(ndr
, NDR_BUFFERS
, &r
->req8
));
1613 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1616 return NDR_ERR_SUCCESS
;
1619 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetNCChangesRequest
*r
)
1622 level
= ndr_print_get_switch_value(ndr
, r
);
1623 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetNCChangesRequest");
1626 ndr_print_drsuapi_DsGetNCChangesRequest5(ndr
, "req5", &r
->req5
);
1630 ndr_print_drsuapi_DsGetNCChangesRequest8(ndr
, "req8", &r
->req8
);
1634 ndr_print_bad_level(ndr
, name
, level
);
1638 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor2
*r
)
1640 if (ndr_flags
& NDR_SCALARS
) {
1641 NDR_CHECK(ndr_push_align(ndr
, 8));
1642 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1643 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->highest_usn
));
1644 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_sync_success
));
1646 if (ndr_flags
& NDR_BUFFERS
) {
1648 return NDR_ERR_SUCCESS
;
1651 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor2
*r
)
1653 if (ndr_flags
& NDR_SCALARS
) {
1654 NDR_CHECK(ndr_pull_align(ndr
, 8));
1655 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1656 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->highest_usn
));
1657 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_sync_success
));
1659 if (ndr_flags
& NDR_BUFFERS
) {
1661 return NDR_ERR_SUCCESS
;
1664 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor2
*r
)
1666 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor2");
1668 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
1669 ndr_print_hyper(ndr
, "highest_usn", r
->highest_usn
);
1670 ndr_print_NTTIME(ndr
, "last_sync_success", r
->last_sync_success
);
1674 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor2CtrEx(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor2CtrEx
*r
)
1676 uint32_t cntr_cursors_0
;
1677 if (ndr_flags
& NDR_SCALARS
) {
1678 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1679 NDR_CHECK(ndr_push_align(ndr
, 8));
1680 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2));
1681 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1682 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1683 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1684 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
1685 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
1688 if (ndr_flags
& NDR_BUFFERS
) {
1690 return NDR_ERR_SUCCESS
;
1693 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor2CtrEx(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor2CtrEx
*r
)
1695 uint32_t cntr_cursors_0
;
1696 TALLOC_CTX
*_mem_save_cursors_0
;
1697 if (ndr_flags
& NDR_SCALARS
) {
1698 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->cursors
));
1699 NDR_CHECK(ndr_pull_align(ndr
, 8));
1700 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
1701 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved1
));
1702 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1703 if (r
->count
> 0x100000) {
1704 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1706 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved2
));
1707 NDR_PULL_ALLOC_N(ndr
, r
->cursors
, ndr_get_array_size(ndr
, &r
->cursors
));
1708 _mem_save_cursors_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1709 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors
, 0);
1710 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
1711 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
1713 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors_0
, 0);
1715 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->cursors
, r
->count
));
1718 if (ndr_flags
& NDR_BUFFERS
) {
1720 return NDR_ERR_SUCCESS
;
1723 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor2CtrEx(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor2CtrEx
*r
)
1725 uint32_t cntr_cursors_0
;
1726 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor2CtrEx");
1728 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2:r
->version
);
1729 ndr_print_uint32(ndr
, "reserved1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved1
);
1730 ndr_print_uint32(ndr
, "count", r
->count
);
1731 ndr_print_uint32(ndr
, "reserved2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved2
);
1732 ndr
->print(ndr
, "%s: ARRAY(%d)", "cursors", (int)r
->count
);
1734 for (cntr_cursors_0
=0;cntr_cursors_0
<r
->count
;cntr_cursors_0
++) {
1736 if (asprintf(&idx_0
, "[%d]", cntr_cursors_0
) != -1) {
1737 ndr_print_drsuapi_DsReplicaCursor2(ndr
, "cursors", &r
->cursors
[cntr_cursors_0
]);
1745 static enum ndr_err_code
ndr_push_drsuapi_DsAttributeValue(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAttributeValue
*r
)
1747 if (ndr_flags
& NDR_SCALARS
) {
1748 NDR_CHECK(ndr_push_align(ndr
, 4));
1749 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_DATA_BLOB(0, r
->blob
, 0)));
1750 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->blob
));
1752 if (ndr_flags
& NDR_BUFFERS
) {
1754 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->blob
));
1757 return NDR_ERR_SUCCESS
;
1760 static enum ndr_err_code
ndr_pull_drsuapi_DsAttributeValue(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAttributeValue
*r
)
1763 TALLOC_CTX
*_mem_save_blob_0
;
1764 if (ndr_flags
& NDR_SCALARS
) {
1765 NDR_CHECK(ndr_pull_align(ndr
, 4));
1766 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
1767 if (r
->__ndr_size
> 10485760) {
1768 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1770 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_blob
));
1772 NDR_PULL_ALLOC(ndr
, r
->blob
);
1777 if (ndr_flags
& NDR_BUFFERS
) {
1779 _mem_save_blob_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1780 NDR_PULL_SET_MEM_CTX(ndr
, r
->blob
, 0);
1781 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->blob
));
1782 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_blob_0
, 0);
1785 return NDR_ERR_SUCCESS
;
1788 _PUBLIC_
void ndr_print_drsuapi_DsAttributeValue(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAttributeValue
*r
)
1790 ndr_print_struct(ndr
, name
, "drsuapi_DsAttributeValue");
1792 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_DATA_BLOB(0, r
->blob
, 0):r
->__ndr_size
);
1793 ndr_print_ptr(ndr
, "blob", r
->blob
);
1796 ndr_print_DATA_BLOB(ndr
, "blob", *r
->blob
);
1802 static enum ndr_err_code
ndr_push_drsuapi_DsAttributeValueCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAttributeValueCtr
*r
)
1804 uint32_t cntr_values_1
;
1805 if (ndr_flags
& NDR_SCALARS
) {
1806 NDR_CHECK(ndr_push_align(ndr
, 4));
1807 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_values
));
1808 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->values
));
1810 if (ndr_flags
& NDR_BUFFERS
) {
1812 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_values
));
1813 for (cntr_values_1
= 0; cntr_values_1
< r
->num_values
; cntr_values_1
++) {
1814 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr
, NDR_SCALARS
, &r
->values
[cntr_values_1
]));
1816 for (cntr_values_1
= 0; cntr_values_1
< r
->num_values
; cntr_values_1
++) {
1817 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr
, NDR_BUFFERS
, &r
->values
[cntr_values_1
]));
1821 return NDR_ERR_SUCCESS
;
1824 static enum ndr_err_code
ndr_pull_drsuapi_DsAttributeValueCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAttributeValueCtr
*r
)
1826 uint32_t _ptr_values
;
1827 uint32_t cntr_values_1
;
1828 TALLOC_CTX
*_mem_save_values_0
;
1829 TALLOC_CTX
*_mem_save_values_1
;
1830 if (ndr_flags
& NDR_SCALARS
) {
1831 NDR_CHECK(ndr_pull_align(ndr
, 4));
1832 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_values
));
1833 if (r
->num_values
> 10485760) {
1834 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1836 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_values
));
1838 NDR_PULL_ALLOC(ndr
, r
->values
);
1843 if (ndr_flags
& NDR_BUFFERS
) {
1845 _mem_save_values_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1846 NDR_PULL_SET_MEM_CTX(ndr
, r
->values
, 0);
1847 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->values
));
1848 NDR_PULL_ALLOC_N(ndr
, r
->values
, ndr_get_array_size(ndr
, &r
->values
));
1849 _mem_save_values_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1850 NDR_PULL_SET_MEM_CTX(ndr
, r
->values
, 0);
1851 for (cntr_values_1
= 0; cntr_values_1
< r
->num_values
; cntr_values_1
++) {
1852 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr
, NDR_SCALARS
, &r
->values
[cntr_values_1
]));
1854 for (cntr_values_1
= 0; cntr_values_1
< r
->num_values
; cntr_values_1
++) {
1855 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr
, NDR_BUFFERS
, &r
->values
[cntr_values_1
]));
1857 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_values_1
, 0);
1858 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_values_0
, 0);
1861 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->values
, r
->num_values
));
1864 return NDR_ERR_SUCCESS
;
1867 _PUBLIC_
void ndr_print_drsuapi_DsAttributeValueCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAttributeValueCtr
*r
)
1869 uint32_t cntr_values_1
;
1870 ndr_print_struct(ndr
, name
, "drsuapi_DsAttributeValueCtr");
1872 ndr_print_uint32(ndr
, "num_values", r
->num_values
);
1873 ndr_print_ptr(ndr
, "values", r
->values
);
1876 ndr
->print(ndr
, "%s: ARRAY(%d)", "values", (int)r
->num_values
);
1878 for (cntr_values_1
=0;cntr_values_1
<r
->num_values
;cntr_values_1
++) {
1880 if (asprintf(&idx_1
, "[%d]", cntr_values_1
) != -1) {
1881 ndr_print_drsuapi_DsAttributeValue(ndr
, "values", &r
->values
[cntr_values_1
]);
1891 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectIdentifier3(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectIdentifier3
*r
)
1893 if (ndr_flags
& NDR_SCALARS
) {
1894 NDR_CHECK(ndr_push_align(ndr
, 4));
1895 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_drsuapi_DsReplicaObjectIdentifier3(r
, ndr
->iconv_convenience
, ndr
->flags
)));
1896 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_dom_sid28(&r
->sid
, ndr
->flags
)));
1897 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
1898 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
1899 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->dn
)));
1900 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dn
, strlen_m(r
->dn
) + 1, sizeof(uint16_t), CH_UTF16
));
1902 if (ndr_flags
& NDR_BUFFERS
) {
1903 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
1905 return NDR_ERR_SUCCESS
;
1908 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectIdentifier3(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectIdentifier3
*r
)
1910 if (ndr_flags
& NDR_SCALARS
) {
1911 NDR_CHECK(ndr_pull_align(ndr
, 4));
1912 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
1913 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_sid
));
1914 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
1915 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
1916 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_dn
));
1917 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dn
, r
->__ndr_size_dn
+ 1, sizeof(uint16_t), CH_UTF16
));
1919 if (ndr_flags
& NDR_BUFFERS
) {
1920 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
1922 return NDR_ERR_SUCCESS
;
1925 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjectIdentifier3
*r
)
1927 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjectIdentifier3");
1929 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_drsuapi_DsReplicaObjectIdentifier3(r
, ndr
->iconv_convenience
, ndr
->flags
):r
->__ndr_size
);
1930 ndr_print_uint32(ndr
, "__ndr_size_sid", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_dom_sid28(&r
->sid
, ndr
->flags
):r
->__ndr_size_sid
);
1931 ndr_print_GUID(ndr
, "guid", &r
->guid
);
1932 ndr_print_dom_sid28(ndr
, "sid", &r
->sid
);
1933 ndr_print_uint32(ndr
, "__ndr_size_dn", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->dn
):r
->__ndr_size_dn
);
1934 ndr_print_string(ndr
, "dn", r
->dn
);
1938 _PUBLIC_
size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3(const struct drsuapi_DsReplicaObjectIdentifier3
*r
, struct smb_iconv_convenience
*ic
, int flags
)
1940 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_drsuapi_DsReplicaObjectIdentifier3
, ic
);
1943 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectIdentifier3Binary
*r
)
1945 if (ndr_flags
& NDR_SCALARS
) {
1946 NDR_CHECK(ndr_push_align(ndr
, 4));
1947 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r
, ndr
->iconv_convenience
, ndr
->flags
)));
1948 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_dom_sid28(&r
->sid
, ndr
->flags
)));
1949 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
1950 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
1951 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->dn
)));
1952 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dn
, strlen_m(r
->dn
) + 1, sizeof(uint16_t), CH_UTF16
));
1953 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->binary
.length
+ 4));
1955 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
1956 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
1957 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->binary
));
1958 ndr
->flags
= _flags_save_DATA_BLOB
;
1961 if (ndr_flags
& NDR_BUFFERS
) {
1962 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
1964 return NDR_ERR_SUCCESS
;
1967 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectIdentifier3Binary
*r
)
1969 if (ndr_flags
& NDR_SCALARS
) {
1970 NDR_CHECK(ndr_pull_align(ndr
, 4));
1971 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
1972 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_sid
));
1973 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
1974 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
1975 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_dn
));
1976 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dn
, r
->__ndr_size_dn
+ 1, sizeof(uint16_t), CH_UTF16
));
1977 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_binary
));
1979 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
1980 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
1981 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->binary
));
1982 ndr
->flags
= _flags_save_DATA_BLOB
;
1985 if (ndr_flags
& NDR_BUFFERS
) {
1986 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
1988 return NDR_ERR_SUCCESS
;
1991 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjectIdentifier3Binary
*r
)
1993 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjectIdentifier3Binary");
1995 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r
, ndr
->iconv_convenience
, ndr
->flags
):r
->__ndr_size
);
1996 ndr_print_uint32(ndr
, "__ndr_size_sid", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_dom_sid28(&r
->sid
, ndr
->flags
):r
->__ndr_size_sid
);
1997 ndr_print_GUID(ndr
, "guid", &r
->guid
);
1998 ndr_print_dom_sid28(ndr
, "sid", &r
->sid
);
1999 ndr_print_uint32(ndr
, "__ndr_size_dn", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->dn
):r
->__ndr_size_dn
);
2000 ndr_print_string(ndr
, "dn", r
->dn
);
2001 ndr_print_uint32(ndr
, "__ndr_size_binary", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->binary
.length
+ 4:r
->__ndr_size_binary
);
2002 ndr_print_DATA_BLOB(ndr
, "binary", r
->binary
);
2006 _PUBLIC_
size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(const struct drsuapi_DsReplicaObjectIdentifier3Binary
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2008 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary
, ic
);
2011 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttribute
*r
)
2013 if (ndr_flags
& NDR_SCALARS
) {
2014 NDR_CHECK(ndr_push_align(ndr
, 4));
2015 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, r
->attid
));
2016 NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr
, NDR_SCALARS
, &r
->value_ctr
));
2018 if (ndr_flags
& NDR_BUFFERS
) {
2019 NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr
, NDR_BUFFERS
, &r
->value_ctr
));
2021 return NDR_ERR_SUCCESS
;
2024 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttribute
*r
)
2026 if (ndr_flags
& NDR_SCALARS
) {
2027 NDR_CHECK(ndr_pull_align(ndr
, 4));
2028 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, &r
->attid
));
2029 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr
, NDR_SCALARS
, &r
->value_ctr
));
2031 if (ndr_flags
& NDR_BUFFERS
) {
2032 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr
, NDR_BUFFERS
, &r
->value_ctr
));
2034 return NDR_ERR_SUCCESS
;
2037 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttribute(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttribute
*r
)
2039 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttribute");
2041 ndr_print_drsuapi_DsAttributeId(ndr
, "attid", r
->attid
);
2042 ndr_print_drsuapi_DsAttributeValueCtr(ndr
, "value_ctr", &r
->value_ctr
);
2046 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttributeCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttributeCtr
*r
)
2048 uint32_t cntr_attributes_1
;
2049 if (ndr_flags
& NDR_SCALARS
) {
2050 NDR_CHECK(ndr_push_align(ndr
, 4));
2051 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_attributes
));
2052 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attributes
));
2054 if (ndr_flags
& NDR_BUFFERS
) {
2055 if (r
->attributes
) {
2056 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_attributes
));
2057 for (cntr_attributes_1
= 0; cntr_attributes_1
< r
->num_attributes
; cntr_attributes_1
++) {
2058 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttribute(ndr
, NDR_SCALARS
, &r
->attributes
[cntr_attributes_1
]));
2060 for (cntr_attributes_1
= 0; cntr_attributes_1
< r
->num_attributes
; cntr_attributes_1
++) {
2061 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttribute(ndr
, NDR_BUFFERS
, &r
->attributes
[cntr_attributes_1
]));
2065 return NDR_ERR_SUCCESS
;
2068 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttributeCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttributeCtr
*r
)
2070 uint32_t _ptr_attributes
;
2071 uint32_t cntr_attributes_1
;
2072 TALLOC_CTX
*_mem_save_attributes_0
;
2073 TALLOC_CTX
*_mem_save_attributes_1
;
2074 if (ndr_flags
& NDR_SCALARS
) {
2075 NDR_CHECK(ndr_pull_align(ndr
, 4));
2076 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_attributes
));
2077 if (r
->num_attributes
> 1048576) {
2078 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2080 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attributes
));
2081 if (_ptr_attributes
) {
2082 NDR_PULL_ALLOC(ndr
, r
->attributes
);
2084 r
->attributes
= NULL
;
2087 if (ndr_flags
& NDR_BUFFERS
) {
2088 if (r
->attributes
) {
2089 _mem_save_attributes_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2090 NDR_PULL_SET_MEM_CTX(ndr
, r
->attributes
, 0);
2091 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attributes
));
2092 NDR_PULL_ALLOC_N(ndr
, r
->attributes
, ndr_get_array_size(ndr
, &r
->attributes
));
2093 _mem_save_attributes_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2094 NDR_PULL_SET_MEM_CTX(ndr
, r
->attributes
, 0);
2095 for (cntr_attributes_1
= 0; cntr_attributes_1
< r
->num_attributes
; cntr_attributes_1
++) {
2096 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttribute(ndr
, NDR_SCALARS
, &r
->attributes
[cntr_attributes_1
]));
2098 for (cntr_attributes_1
= 0; cntr_attributes_1
< r
->num_attributes
; cntr_attributes_1
++) {
2099 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttribute(ndr
, NDR_BUFFERS
, &r
->attributes
[cntr_attributes_1
]));
2101 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attributes_1
, 0);
2102 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attributes_0
, 0);
2104 if (r
->attributes
) {
2105 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->attributes
, r
->num_attributes
));
2108 return NDR_ERR_SUCCESS
;
2111 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttributeCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttributeCtr
*r
)
2113 uint32_t cntr_attributes_1
;
2114 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttributeCtr");
2116 ndr_print_uint32(ndr
, "num_attributes", r
->num_attributes
);
2117 ndr_print_ptr(ndr
, "attributes", r
->attributes
);
2119 if (r
->attributes
) {
2120 ndr
->print(ndr
, "%s: ARRAY(%d)", "attributes", (int)r
->num_attributes
);
2122 for (cntr_attributes_1
=0;cntr_attributes_1
<r
->num_attributes
;cntr_attributes_1
++) {
2124 if (asprintf(&idx_1
, "[%d]", cntr_attributes_1
) != -1) {
2125 ndr_print_drsuapi_DsReplicaAttribute(ndr
, "attributes", &r
->attributes
[cntr_attributes_1
]);
2135 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2137 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2138 return NDR_ERR_SUCCESS
;
2141 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2144 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2146 return NDR_ERR_SUCCESS
;
2149 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjectFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2151 ndr_print_uint32(ndr
, name
, r
);
2153 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER", DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER
, r
);
2154 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC", DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC
, r
);
2155 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY", DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY
, r
);
2159 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObject(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObject
*r
)
2161 if (ndr_flags
& NDR_SCALARS
) {
2162 NDR_CHECK(ndr_push_align(ndr
, 4));
2163 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->identifier
));
2164 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectFlags(ndr
, NDR_SCALARS
, r
->flags
));
2165 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr
, NDR_SCALARS
, &r
->attribute_ctr
));
2167 if (ndr_flags
& NDR_BUFFERS
) {
2168 if (r
->identifier
) {
2169 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->identifier
));
2171 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr
, NDR_BUFFERS
, &r
->attribute_ctr
));
2173 return NDR_ERR_SUCCESS
;
2176 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObject(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObject
*r
)
2178 uint32_t _ptr_identifier
;
2179 TALLOC_CTX
*_mem_save_identifier_0
;
2180 if (ndr_flags
& NDR_SCALARS
) {
2181 NDR_CHECK(ndr_pull_align(ndr
, 4));
2182 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_identifier
));
2183 if (_ptr_identifier
) {
2184 NDR_PULL_ALLOC(ndr
, r
->identifier
);
2186 r
->identifier
= NULL
;
2188 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectFlags(ndr
, NDR_SCALARS
, &r
->flags
));
2189 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr
, NDR_SCALARS
, &r
->attribute_ctr
));
2191 if (ndr_flags
& NDR_BUFFERS
) {
2192 if (r
->identifier
) {
2193 _mem_save_identifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2194 NDR_PULL_SET_MEM_CTX(ndr
, r
->identifier
, 0);
2195 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->identifier
));
2196 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_identifier_0
, 0);
2198 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr
, NDR_BUFFERS
, &r
->attribute_ctr
));
2200 return NDR_ERR_SUCCESS
;
2203 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObject(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObject
*r
)
2205 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObject");
2207 ndr_print_ptr(ndr
, "identifier", r
->identifier
);
2209 if (r
->identifier
) {
2210 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "identifier", r
->identifier
);
2213 ndr_print_drsuapi_DsReplicaObjectFlags(ndr
, "flags", r
->flags
);
2214 ndr_print_drsuapi_DsReplicaAttributeCtr(ndr
, "attribute_ctr", &r
->attribute_ctr
);
2218 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaMetaData(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaMetaData
*r
)
2220 if (ndr_flags
& NDR_SCALARS
) {
2221 NDR_CHECK(ndr_push_align(ndr
, 8));
2222 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
2223 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->originating_change_time
));
2224 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
2225 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
2227 if (ndr_flags
& NDR_BUFFERS
) {
2229 return NDR_ERR_SUCCESS
;
2232 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaMetaData(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaMetaData
*r
)
2234 if (ndr_flags
& NDR_SCALARS
) {
2235 NDR_CHECK(ndr_pull_align(ndr
, 8));
2236 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
2237 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
2238 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
2239 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
2241 if (ndr_flags
& NDR_BUFFERS
) {
2243 return NDR_ERR_SUCCESS
;
2246 _PUBLIC_
void ndr_print_drsuapi_DsReplicaMetaData(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaMetaData
*r
)
2248 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaMetaData");
2250 ndr_print_uint32(ndr
, "version", r
->version
);
2251 ndr_print_NTTIME_1sec(ndr
, "originating_change_time", r
->originating_change_time
);
2252 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
2253 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
2257 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaMetaDataCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaMetaDataCtr
*r
)
2259 uint32_t cntr_meta_data_0
;
2260 if (ndr_flags
& NDR_SCALARS
) {
2261 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2262 NDR_CHECK(ndr_push_align(ndr
, 8));
2263 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2264 for (cntr_meta_data_0
= 0; cntr_meta_data_0
< r
->count
; cntr_meta_data_0
++) {
2265 NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr
, NDR_SCALARS
, &r
->meta_data
[cntr_meta_data_0
]));
2268 if (ndr_flags
& NDR_BUFFERS
) {
2270 return NDR_ERR_SUCCESS
;
2273 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaMetaDataCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaMetaDataCtr
*r
)
2275 uint32_t cntr_meta_data_0
;
2276 TALLOC_CTX
*_mem_save_meta_data_0
;
2277 if (ndr_flags
& NDR_SCALARS
) {
2278 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->meta_data
));
2279 NDR_CHECK(ndr_pull_align(ndr
, 8));
2280 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2281 if (r
->count
> 1048576) {
2282 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2284 NDR_PULL_ALLOC_N(ndr
, r
->meta_data
, ndr_get_array_size(ndr
, &r
->meta_data
));
2285 _mem_save_meta_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2286 NDR_PULL_SET_MEM_CTX(ndr
, r
->meta_data
, 0);
2287 for (cntr_meta_data_0
= 0; cntr_meta_data_0
< r
->count
; cntr_meta_data_0
++) {
2288 NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr
, NDR_SCALARS
, &r
->meta_data
[cntr_meta_data_0
]));
2290 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_meta_data_0
, 0);
2292 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->meta_data
, r
->count
));
2295 if (ndr_flags
& NDR_BUFFERS
) {
2297 return NDR_ERR_SUCCESS
;
2300 _PUBLIC_
void ndr_print_drsuapi_DsReplicaMetaDataCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaMetaDataCtr
*r
)
2302 uint32_t cntr_meta_data_0
;
2303 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaMetaDataCtr");
2305 ndr_print_uint32(ndr
, "count", r
->count
);
2306 ndr
->print(ndr
, "%s: ARRAY(%d)", "meta_data", (int)r
->count
);
2308 for (cntr_meta_data_0
=0;cntr_meta_data_0
<r
->count
;cntr_meta_data_0
++) {
2310 if (asprintf(&idx_0
, "[%d]", cntr_meta_data_0
) != -1) {
2311 ndr_print_drsuapi_DsReplicaMetaData(ndr
, "meta_data", &r
->meta_data
[cntr_meta_data_0
]);
2319 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectListItemEx(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectListItemEx
*r
)
2321 if (ndr_flags
& NDR_SCALARS
) {
2322 NDR_CHECK(ndr_push_align(ndr
, 4));
2323 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->next_object
));
2324 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr
, NDR_SCALARS
, &r
->object
));
2325 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_nc_prefix
));
2326 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->parent_object_guid
));
2327 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->meta_data_ctr
));
2329 if (ndr_flags
& NDR_BUFFERS
) {
2330 if (r
->next_object
) {
2331 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next_object
));
2333 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr
, NDR_BUFFERS
, &r
->object
));
2334 if (r
->parent_object_guid
) {
2335 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, r
->parent_object_guid
));
2337 if (r
->meta_data_ctr
) {
2338 NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaDataCtr(ndr
, NDR_SCALARS
, r
->meta_data_ctr
));
2341 return NDR_ERR_SUCCESS
;
2344 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectListItemEx(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectListItemEx
*r
)
2346 uint32_t _ptr_next_object
;
2347 TALLOC_CTX
*_mem_save_next_object_0
;
2348 uint32_t _ptr_parent_object_guid
;
2349 TALLOC_CTX
*_mem_save_parent_object_guid_0
;
2350 uint32_t _ptr_meta_data_ctr
;
2351 TALLOC_CTX
*_mem_save_meta_data_ctr_0
;
2352 if (ndr_flags
& NDR_SCALARS
) {
2353 NDR_CHECK(ndr_pull_align(ndr
, 4));
2354 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_next_object
));
2355 if (_ptr_next_object
) {
2356 NDR_PULL_ALLOC(ndr
, r
->next_object
);
2358 r
->next_object
= NULL
;
2360 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr
, NDR_SCALARS
, &r
->object
));
2361 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_nc_prefix
));
2362 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parent_object_guid
));
2363 if (_ptr_parent_object_guid
) {
2364 NDR_PULL_ALLOC(ndr
, r
->parent_object_guid
);
2366 r
->parent_object_guid
= NULL
;
2368 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_meta_data_ctr
));
2369 if (_ptr_meta_data_ctr
) {
2370 NDR_PULL_ALLOC(ndr
, r
->meta_data_ctr
);
2372 r
->meta_data_ctr
= NULL
;
2375 if (ndr_flags
& NDR_BUFFERS
) {
2376 if (r
->next_object
) {
2377 _mem_save_next_object_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2378 NDR_PULL_SET_MEM_CTX(ndr
, r
->next_object
, 0);
2379 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next_object
));
2380 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_next_object_0
, 0);
2382 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr
, NDR_BUFFERS
, &r
->object
));
2383 if (r
->parent_object_guid
) {
2384 _mem_save_parent_object_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2385 NDR_PULL_SET_MEM_CTX(ndr
, r
->parent_object_guid
, 0);
2386 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, r
->parent_object_guid
));
2387 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parent_object_guid_0
, 0);
2389 if (r
->meta_data_ctr
) {
2390 _mem_save_meta_data_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2391 NDR_PULL_SET_MEM_CTX(ndr
, r
->meta_data_ctr
, 0);
2392 NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaDataCtr(ndr
, NDR_SCALARS
, r
->meta_data_ctr
));
2393 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_meta_data_ctr_0
, 0);
2396 return NDR_ERR_SUCCESS
;
2399 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr1
*r
)
2401 if (ndr_flags
& NDR_SCALARS
) {
2402 NDR_CHECK(ndr_push_align(ndr
, 8));
2403 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
2404 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
2405 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->naming_context
));
2406 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->old_highwatermark
));
2407 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->new_highwatermark
));
2408 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->uptodateness_vector
));
2409 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
2410 NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr
, NDR_SCALARS
, r
->extended_ret
));
2411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->object_count
));
2412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_drsuapi_DsGetNCChangesCtr1(r
, ndr
->iconv_convenience
, ndr
->flags
) + 55));
2413 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->first_object
));
2414 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->more_data
));
2416 if (ndr_flags
& NDR_BUFFERS
) {
2417 if (r
->naming_context
) {
2418 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
2420 if (r
->uptodateness_vector
) {
2421 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
2423 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
2424 if (r
->first_object
) {
2425 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->first_object
));
2428 return NDR_ERR_SUCCESS
;
2431 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr1
*r
)
2433 uint32_t _ptr_naming_context
;
2434 TALLOC_CTX
*_mem_save_naming_context_0
;
2435 uint32_t _ptr_uptodateness_vector
;
2436 TALLOC_CTX
*_mem_save_uptodateness_vector_0
;
2437 uint32_t _ptr_first_object
;
2438 TALLOC_CTX
*_mem_save_first_object_0
;
2439 if (ndr_flags
& NDR_SCALARS
) {
2440 NDR_CHECK(ndr_pull_align(ndr
, 8));
2441 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
2442 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
2443 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_naming_context
));
2444 if (_ptr_naming_context
) {
2445 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
2447 r
->naming_context
= NULL
;
2449 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->old_highwatermark
));
2450 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->new_highwatermark
));
2451 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_uptodateness_vector
));
2452 if (_ptr_uptodateness_vector
) {
2453 NDR_PULL_ALLOC(ndr
, r
->uptodateness_vector
);
2455 r
->uptodateness_vector
= NULL
;
2457 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
2458 NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr
, NDR_SCALARS
, &r
->extended_ret
));
2459 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->object_count
));
2460 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
2461 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_first_object
));
2462 if (_ptr_first_object
) {
2463 NDR_PULL_ALLOC(ndr
, r
->first_object
);
2465 r
->first_object
= NULL
;
2467 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->more_data
));
2469 if (ndr_flags
& NDR_BUFFERS
) {
2470 if (r
->naming_context
) {
2471 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2472 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
2473 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
2474 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
2476 if (r
->uptodateness_vector
) {
2477 _mem_save_uptodateness_vector_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2478 NDR_PULL_SET_MEM_CTX(ndr
, r
->uptodateness_vector
, 0);
2479 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
2480 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_uptodateness_vector_0
, 0);
2482 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
2483 if (r
->first_object
) {
2484 _mem_save_first_object_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2485 NDR_PULL_SET_MEM_CTX(ndr
, r
->first_object
, 0);
2486 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->first_object
));
2487 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_first_object_0
, 0);
2490 return NDR_ERR_SUCCESS
;
2493 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr1
*r
)
2495 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr1");
2497 ndr_print_GUID(ndr
, "source_dsa_guid", &r
->source_dsa_guid
);
2498 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
2499 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
2501 if (r
->naming_context
) {
2502 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
2505 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "old_highwatermark", &r
->old_highwatermark
);
2506 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "new_highwatermark", &r
->new_highwatermark
);
2507 ndr_print_ptr(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
2509 if (r
->uptodateness_vector
) {
2510 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
2513 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, "mapping_ctr", &r
->mapping_ctr
);
2514 ndr_print_drsuapi_DsExtendedError(ndr
, "extended_ret", r
->extended_ret
);
2515 ndr_print_uint32(ndr
, "object_count", r
->object_count
);
2516 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_drsuapi_DsGetNCChangesCtr1(r
, ndr
->iconv_convenience
, ndr
->flags
) + 55:r
->__ndr_size
);
2517 ndr_print_ptr(ndr
, "first_object", r
->first_object
);
2519 if (r
->first_object
) {
2520 ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr
, "first_object", r
->first_object
);
2523 ndr_print_uint32(ndr
, "more_data", r
->more_data
);
2527 _PUBLIC_
size_t ndr_size_drsuapi_DsGetNCChangesCtr1(const struct drsuapi_DsGetNCChangesCtr1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2529 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_drsuapi_DsGetNCChangesCtr1
, ic
);
2532 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsLinkedAttributeFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2534 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2535 return NDR_ERR_SUCCESS
;
2538 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsLinkedAttributeFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2541 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2543 return NDR_ERR_SUCCESS
;
2546 _PUBLIC_
void ndr_print_drsuapi_DsLinkedAttributeFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2548 ndr_print_uint32(ndr
, name
, r
);
2550 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE", DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE
, r
);
2554 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaLinkedAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaLinkedAttribute
*r
)
2556 if (ndr_flags
& NDR_SCALARS
) {
2557 NDR_CHECK(ndr_push_align(ndr
, 8));
2558 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->identifier
));
2559 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, r
->attid
));
2560 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr
, NDR_SCALARS
, &r
->value
));
2561 NDR_CHECK(ndr_push_drsuapi_DsLinkedAttributeFlags(ndr
, NDR_SCALARS
, r
->flags
));
2562 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->originating_add_time
));
2563 NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr
, NDR_SCALARS
, &r
->meta_data
));
2565 if (ndr_flags
& NDR_BUFFERS
) {
2566 if (r
->identifier
) {
2567 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->identifier
));
2569 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr
, NDR_BUFFERS
, &r
->value
));
2571 return NDR_ERR_SUCCESS
;
2574 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaLinkedAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaLinkedAttribute
*r
)
2576 uint32_t _ptr_identifier
;
2577 TALLOC_CTX
*_mem_save_identifier_0
;
2578 if (ndr_flags
& NDR_SCALARS
) {
2579 NDR_CHECK(ndr_pull_align(ndr
, 8));
2580 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_identifier
));
2581 if (_ptr_identifier
) {
2582 NDR_PULL_ALLOC(ndr
, r
->identifier
);
2584 r
->identifier
= NULL
;
2586 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, &r
->attid
));
2587 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr
, NDR_SCALARS
, &r
->value
));
2588 NDR_CHECK(ndr_pull_drsuapi_DsLinkedAttributeFlags(ndr
, NDR_SCALARS
, &r
->flags
));
2589 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->originating_add_time
));
2590 NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr
, NDR_SCALARS
, &r
->meta_data
));
2592 if (ndr_flags
& NDR_BUFFERS
) {
2593 if (r
->identifier
) {
2594 _mem_save_identifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2595 NDR_PULL_SET_MEM_CTX(ndr
, r
->identifier
, 0);
2596 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->identifier
));
2597 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_identifier_0
, 0);
2599 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr
, NDR_BUFFERS
, &r
->value
));
2601 return NDR_ERR_SUCCESS
;
2604 _PUBLIC_
void ndr_print_drsuapi_DsReplicaLinkedAttribute(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaLinkedAttribute
*r
)
2606 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaLinkedAttribute");
2608 ndr_print_ptr(ndr
, "identifier", r
->identifier
);
2610 if (r
->identifier
) {
2611 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "identifier", r
->identifier
);
2614 ndr_print_drsuapi_DsAttributeId(ndr
, "attid", r
->attid
);
2615 ndr_print_drsuapi_DsAttributeValue(ndr
, "value", &r
->value
);
2616 ndr_print_drsuapi_DsLinkedAttributeFlags(ndr
, "flags", r
->flags
);
2617 ndr_print_NTTIME_1sec(ndr
, "originating_add_time", r
->originating_add_time
);
2618 ndr_print_drsuapi_DsReplicaMetaData(ndr
, "meta_data", &r
->meta_data
);
2622 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr6
*r
)
2624 uint32_t cntr_linked_attributes_1
;
2625 if (ndr_flags
& NDR_SCALARS
) {
2626 NDR_CHECK(ndr_push_align(ndr
, 8));
2627 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
2628 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
2629 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->naming_context
));
2630 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->old_highwatermark
));
2631 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->new_highwatermark
));
2632 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->uptodateness_vector
));
2633 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
2634 NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr
, NDR_SCALARS
, r
->extended_ret
));
2635 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->object_count
));
2636 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_drsuapi_DsGetNCChangesCtr6(r
, ndr
->iconv_convenience
, ndr
->flags
) + 55));
2637 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->first_object
));
2638 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->more_data
));
2639 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->nc_object_count
));
2640 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->nc_linked_attributes_count
));
2641 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->linked_attributes_count
));
2642 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->linked_attributes
));
2643 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->drs_error
));
2645 if (ndr_flags
& NDR_BUFFERS
) {
2646 if (r
->naming_context
) {
2647 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
2649 if (r
->uptodateness_vector
) {
2650 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2CtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
2652 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
2653 if (r
->first_object
) {
2654 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->first_object
));
2656 if (r
->linked_attributes
) {
2657 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->linked_attributes_count
));
2658 for (cntr_linked_attributes_1
= 0; cntr_linked_attributes_1
< r
->linked_attributes_count
; cntr_linked_attributes_1
++) {
2659 NDR_CHECK(ndr_push_drsuapi_DsReplicaLinkedAttribute(ndr
, NDR_SCALARS
, &r
->linked_attributes
[cntr_linked_attributes_1
]));
2661 for (cntr_linked_attributes_1
= 0; cntr_linked_attributes_1
< r
->linked_attributes_count
; cntr_linked_attributes_1
++) {
2662 NDR_CHECK(ndr_push_drsuapi_DsReplicaLinkedAttribute(ndr
, NDR_BUFFERS
, &r
->linked_attributes
[cntr_linked_attributes_1
]));
2666 return NDR_ERR_SUCCESS
;
2669 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr6
*r
)
2671 uint32_t _ptr_naming_context
;
2672 TALLOC_CTX
*_mem_save_naming_context_0
;
2673 uint32_t _ptr_uptodateness_vector
;
2674 TALLOC_CTX
*_mem_save_uptodateness_vector_0
;
2675 uint32_t _ptr_first_object
;
2676 TALLOC_CTX
*_mem_save_first_object_0
;
2677 uint32_t _ptr_linked_attributes
;
2678 uint32_t cntr_linked_attributes_1
;
2679 TALLOC_CTX
*_mem_save_linked_attributes_0
;
2680 TALLOC_CTX
*_mem_save_linked_attributes_1
;
2681 if (ndr_flags
& NDR_SCALARS
) {
2682 NDR_CHECK(ndr_pull_align(ndr
, 8));
2683 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
2684 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
2685 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_naming_context
));
2686 if (_ptr_naming_context
) {
2687 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
2689 r
->naming_context
= NULL
;
2691 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->old_highwatermark
));
2692 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->new_highwatermark
));
2693 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_uptodateness_vector
));
2694 if (_ptr_uptodateness_vector
) {
2695 NDR_PULL_ALLOC(ndr
, r
->uptodateness_vector
);
2697 r
->uptodateness_vector
= NULL
;
2699 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
2700 NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr
, NDR_SCALARS
, &r
->extended_ret
));
2701 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->object_count
));
2702 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
2703 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_first_object
));
2704 if (_ptr_first_object
) {
2705 NDR_PULL_ALLOC(ndr
, r
->first_object
);
2707 r
->first_object
= NULL
;
2709 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->more_data
));
2710 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->nc_object_count
));
2711 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->nc_linked_attributes_count
));
2712 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->linked_attributes_count
));
2713 if (r
->linked_attributes_count
> 1048576) {
2714 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2716 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_linked_attributes
));
2717 if (_ptr_linked_attributes
) {
2718 NDR_PULL_ALLOC(ndr
, r
->linked_attributes
);
2720 r
->linked_attributes
= NULL
;
2722 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->drs_error
));
2724 if (ndr_flags
& NDR_BUFFERS
) {
2725 if (r
->naming_context
) {
2726 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2727 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
2728 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
2729 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
2731 if (r
->uptodateness_vector
) {
2732 _mem_save_uptodateness_vector_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2733 NDR_PULL_SET_MEM_CTX(ndr
, r
->uptodateness_vector
, 0);
2734 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2CtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
2735 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_uptodateness_vector_0
, 0);
2737 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
2738 if (r
->first_object
) {
2739 _mem_save_first_object_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2740 NDR_PULL_SET_MEM_CTX(ndr
, r
->first_object
, 0);
2741 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->first_object
));
2742 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_first_object_0
, 0);
2744 if (r
->linked_attributes
) {
2745 _mem_save_linked_attributes_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2746 NDR_PULL_SET_MEM_CTX(ndr
, r
->linked_attributes
, 0);
2747 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->linked_attributes
));
2748 NDR_PULL_ALLOC_N(ndr
, r
->linked_attributes
, ndr_get_array_size(ndr
, &r
->linked_attributes
));
2749 _mem_save_linked_attributes_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2750 NDR_PULL_SET_MEM_CTX(ndr
, r
->linked_attributes
, 0);
2751 for (cntr_linked_attributes_1
= 0; cntr_linked_attributes_1
< r
->linked_attributes_count
; cntr_linked_attributes_1
++) {
2752 NDR_CHECK(ndr_pull_drsuapi_DsReplicaLinkedAttribute(ndr
, NDR_SCALARS
, &r
->linked_attributes
[cntr_linked_attributes_1
]));
2754 for (cntr_linked_attributes_1
= 0; cntr_linked_attributes_1
< r
->linked_attributes_count
; cntr_linked_attributes_1
++) {
2755 NDR_CHECK(ndr_pull_drsuapi_DsReplicaLinkedAttribute(ndr
, NDR_BUFFERS
, &r
->linked_attributes
[cntr_linked_attributes_1
]));
2757 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_linked_attributes_1
, 0);
2758 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_linked_attributes_0
, 0);
2760 if (r
->linked_attributes
) {
2761 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->linked_attributes
, r
->linked_attributes_count
));
2764 return NDR_ERR_SUCCESS
;
2767 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr6
*r
)
2769 uint32_t cntr_linked_attributes_1
;
2770 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr6");
2772 ndr_print_GUID(ndr
, "source_dsa_guid", &r
->source_dsa_guid
);
2773 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
2774 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
2776 if (r
->naming_context
) {
2777 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
2780 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "old_highwatermark", &r
->old_highwatermark
);
2781 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "new_highwatermark", &r
->new_highwatermark
);
2782 ndr_print_ptr(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
2784 if (r
->uptodateness_vector
) {
2785 ndr_print_drsuapi_DsReplicaCursor2CtrEx(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
2788 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, "mapping_ctr", &r
->mapping_ctr
);
2789 ndr_print_drsuapi_DsExtendedError(ndr
, "extended_ret", r
->extended_ret
);
2790 ndr_print_uint32(ndr
, "object_count", r
->object_count
);
2791 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_drsuapi_DsGetNCChangesCtr6(r
, ndr
->iconv_convenience
, ndr
->flags
) + 55:r
->__ndr_size
);
2792 ndr_print_ptr(ndr
, "first_object", r
->first_object
);
2794 if (r
->first_object
) {
2795 ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr
, "first_object", r
->first_object
);
2798 ndr_print_uint32(ndr
, "more_data", r
->more_data
);
2799 ndr_print_uint32(ndr
, "nc_object_count", r
->nc_object_count
);
2800 ndr_print_uint32(ndr
, "nc_linked_attributes_count", r
->nc_linked_attributes_count
);
2801 ndr_print_uint32(ndr
, "linked_attributes_count", r
->linked_attributes_count
);
2802 ndr_print_ptr(ndr
, "linked_attributes", r
->linked_attributes
);
2804 if (r
->linked_attributes
) {
2805 ndr
->print(ndr
, "%s: ARRAY(%d)", "linked_attributes", (int)r
->linked_attributes_count
);
2807 for (cntr_linked_attributes_1
=0;cntr_linked_attributes_1
<r
->linked_attributes_count
;cntr_linked_attributes_1
++) {
2809 if (asprintf(&idx_1
, "[%d]", cntr_linked_attributes_1
) != -1) {
2810 ndr_print_drsuapi_DsReplicaLinkedAttribute(ndr
, "linked_attributes", &r
->linked_attributes
[cntr_linked_attributes_1
]);
2817 ndr_print_WERROR(ndr
, "drs_error", r
->drs_error
);
2821 _PUBLIC_
size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2823 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_drsuapi_DsGetNCChangesCtr6
, ic
);
2826 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr1TS
*r
)
2828 if (ndr_flags
& NDR_SCALARS
) {
2829 NDR_CHECK(ndr_push_align(ndr
, 1));
2831 struct ndr_push
*_ndr_ctr1
;
2832 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_ctr1
, 0xFFFFFC01, -1));
2833 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1
, NDR_SCALARS
|NDR_BUFFERS
, &r
->ctr1
));
2834 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_ctr1
, 0xFFFFFC01, -1));
2837 if (ndr_flags
& NDR_BUFFERS
) {
2839 return NDR_ERR_SUCCESS
;
2842 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr1TS
*r
)
2844 if (ndr_flags
& NDR_SCALARS
) {
2845 NDR_CHECK(ndr_pull_align(ndr
, 1));
2847 struct ndr_pull
*_ndr_ctr1
;
2848 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ctr1
, 0xFFFFFC01, -1));
2849 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1
, NDR_SCALARS
|NDR_BUFFERS
, &r
->ctr1
));
2850 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ctr1
, 0xFFFFFC01, -1));
2853 if (ndr_flags
& NDR_BUFFERS
) {
2855 return NDR_ERR_SUCCESS
;
2858 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr1TS
*r
)
2860 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr1TS");
2862 ndr_print_drsuapi_DsGetNCChangesCtr1(ndr
, "ctr1", &r
->ctr1
);
2866 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr6TS
*r
)
2868 if (ndr_flags
& NDR_SCALARS
) {
2869 NDR_CHECK(ndr_push_align(ndr
, 1));
2871 struct ndr_push
*_ndr_ctr6
;
2872 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_ctr6
, 0xFFFFFC01, -1));
2873 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6
, NDR_SCALARS
|NDR_BUFFERS
, &r
->ctr6
));
2874 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_ctr6
, 0xFFFFFC01, -1));
2877 if (ndr_flags
& NDR_BUFFERS
) {
2879 return NDR_ERR_SUCCESS
;
2882 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr6TS
*r
)
2884 if (ndr_flags
& NDR_SCALARS
) {
2885 NDR_CHECK(ndr_pull_align(ndr
, 1));
2887 struct ndr_pull
*_ndr_ctr6
;
2888 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ctr6
, 0xFFFFFC01, -1));
2889 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6
, NDR_SCALARS
|NDR_BUFFERS
, &r
->ctr6
));
2890 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ctr6
, 0xFFFFFC01, -1));
2893 if (ndr_flags
& NDR_BUFFERS
) {
2895 return NDR_ERR_SUCCESS
;
2898 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr6TS
*r
)
2900 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr6TS");
2902 ndr_print_drsuapi_DsGetNCChangesCtr6(ndr
, "ctr6", &r
->ctr6
);
2906 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesMSZIPCtr1
*r
)
2909 TALLOC_CTX
*_mem_save_ts_0
;
2910 if (ndr_flags
& NDR_SCALARS
) {
2911 NDR_CHECK(ndr_pull_align(ndr
, 4));
2912 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->decompressed_length
));
2913 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->compressed_length
));
2914 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ts
));
2916 NDR_PULL_ALLOC(ndr
, r
->ts
);
2921 if (ndr_flags
& NDR_BUFFERS
) {
2923 _mem_save_ts_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2924 NDR_PULL_SET_MEM_CTX(ndr
, r
->ts
, 0);
2926 struct ndr_pull
*_ndr_ts
;
2927 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ts
, 4, r
->compressed_length
));
2929 struct ndr_pull
*_ndr_ts_compressed
;
2930 NDR_CHECK(ndr_pull_compression_start(_ndr_ts
, &_ndr_ts_compressed
, NDR_COMPRESSION_MSZIP
, r
->decompressed_length
));
2931 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed
, NDR_SCALARS
|NDR_BUFFERS
, r
->ts
));
2932 NDR_CHECK(ndr_pull_compression_end(_ndr_ts
, _ndr_ts_compressed
, NDR_COMPRESSION_MSZIP
, r
->decompressed_length
));
2934 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ts
, 4, r
->compressed_length
));
2936 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ts_0
, 0);
2939 return NDR_ERR_SUCCESS
;
2942 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesMSZIPCtr1
*r
)
2944 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesMSZIPCtr1");
2946 ndr_print_uint32(ndr
, "decompressed_length", r
->decompressed_length
);
2947 ndr_print_uint32(ndr
, "compressed_length", r
->compressed_length
);
2948 ndr_print_ptr(ndr
, "ts", r
->ts
);
2951 ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr
, "ts", r
->ts
);
2957 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesMSZIPCtr6
*r
)
2960 TALLOC_CTX
*_mem_save_ts_0
;
2961 if (ndr_flags
& NDR_SCALARS
) {
2962 NDR_CHECK(ndr_pull_align(ndr
, 4));
2963 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->decompressed_length
));
2964 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->compressed_length
));
2965 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ts
));
2967 NDR_PULL_ALLOC(ndr
, r
->ts
);
2972 if (ndr_flags
& NDR_BUFFERS
) {
2974 _mem_save_ts_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2975 NDR_PULL_SET_MEM_CTX(ndr
, r
->ts
, 0);
2977 struct ndr_pull
*_ndr_ts
;
2978 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ts
, 4, r
->compressed_length
));
2980 struct ndr_pull
*_ndr_ts_compressed
;
2981 NDR_CHECK(ndr_pull_compression_start(_ndr_ts
, &_ndr_ts_compressed
, NDR_COMPRESSION_MSZIP
, r
->decompressed_length
));
2982 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed
, NDR_SCALARS
|NDR_BUFFERS
, r
->ts
));
2983 NDR_CHECK(ndr_pull_compression_end(_ndr_ts
, _ndr_ts_compressed
, NDR_COMPRESSION_MSZIP
, r
->decompressed_length
));
2985 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ts
, 4, r
->compressed_length
));
2987 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ts_0
, 0);
2990 return NDR_ERR_SUCCESS
;
2993 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesMSZIPCtr6
*r
)
2995 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesMSZIPCtr6");
2997 ndr_print_uint32(ndr
, "decompressed_length", r
->decompressed_length
);
2998 ndr_print_uint32(ndr
, "compressed_length", r
->compressed_length
);
2999 ndr_print_ptr(ndr
, "ts", r
->ts
);
3002 ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr
, "ts", r
->ts
);
3008 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesXPRESSCtr1
*r
)
3011 TALLOC_CTX
*_mem_save_ts_0
;
3012 if (ndr_flags
& NDR_SCALARS
) {
3013 NDR_CHECK(ndr_pull_align(ndr
, 4));
3014 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->decompressed_length
));
3015 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->compressed_length
));
3016 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ts
));
3018 NDR_PULL_ALLOC(ndr
, r
->ts
);
3023 if (ndr_flags
& NDR_BUFFERS
) {
3025 _mem_save_ts_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3026 NDR_PULL_SET_MEM_CTX(ndr
, r
->ts
, 0);
3028 struct ndr_pull
*_ndr_ts
;
3029 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ts
, 4, r
->compressed_length
));
3031 struct ndr_pull
*_ndr_ts_compressed
;
3032 NDR_CHECK(ndr_pull_compression_start(_ndr_ts
, &_ndr_ts_compressed
, NDR_COMPRESSION_XPRESS
, r
->decompressed_length
));
3033 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed
, NDR_SCALARS
|NDR_BUFFERS
, r
->ts
));
3034 NDR_CHECK(ndr_pull_compression_end(_ndr_ts
, _ndr_ts_compressed
, NDR_COMPRESSION_XPRESS
, r
->decompressed_length
));
3036 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ts
, 4, r
->compressed_length
));
3038 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ts_0
, 0);
3041 return NDR_ERR_SUCCESS
;
3044 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesXPRESSCtr1
*r
)
3046 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesXPRESSCtr1");
3048 ndr_print_uint32(ndr
, "decompressed_length", r
->decompressed_length
);
3049 ndr_print_uint32(ndr
, "compressed_length", r
->compressed_length
);
3050 ndr_print_ptr(ndr
, "ts", r
->ts
);
3053 ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr
, "ts", r
->ts
);
3059 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesXPRESSCtr6
*r
)
3062 TALLOC_CTX
*_mem_save_ts_0
;
3063 if (ndr_flags
& NDR_SCALARS
) {
3064 NDR_CHECK(ndr_pull_align(ndr
, 4));
3065 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->decompressed_length
));
3066 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->compressed_length
));
3067 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ts
));
3069 NDR_PULL_ALLOC(ndr
, r
->ts
);
3074 if (ndr_flags
& NDR_BUFFERS
) {
3076 _mem_save_ts_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3077 NDR_PULL_SET_MEM_CTX(ndr
, r
->ts
, 0);
3079 struct ndr_pull
*_ndr_ts
;
3080 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ts
, 4, r
->compressed_length
));
3082 struct ndr_pull
*_ndr_ts_compressed
;
3083 NDR_CHECK(ndr_pull_compression_start(_ndr_ts
, &_ndr_ts_compressed
, NDR_COMPRESSION_XPRESS
, r
->decompressed_length
));
3084 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed
, NDR_SCALARS
|NDR_BUFFERS
, r
->ts
));
3085 NDR_CHECK(ndr_pull_compression_end(_ndr_ts
, _ndr_ts_compressed
, NDR_COMPRESSION_XPRESS
, r
->decompressed_length
));
3087 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ts
, 4, r
->compressed_length
));
3089 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ts_0
, 0);
3092 return NDR_ERR_SUCCESS
;
3095 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesXPRESSCtr6
*r
)
3097 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesXPRESSCtr6");
3099 ndr_print_uint32(ndr
, "decompressed_length", r
->decompressed_length
);
3100 ndr_print_uint32(ndr
, "compressed_length", r
->compressed_length
);
3101 ndr_print_ptr(ndr
, "ts", r
->ts
);
3104 ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr
, "ts", r
->ts
);
3110 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCompressionType(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsGetNCChangesCompressionType r
)
3112 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
3113 return NDR_ERR_SUCCESS
;
3116 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCompressionType(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsGetNCChangesCompressionType
*r
)
3119 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
3121 return NDR_ERR_SUCCESS
;
3124 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCompressionType(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsGetNCChangesCompressionType r
)
3126 const char *val
= NULL
;
3129 case DRSUAPI_COMPRESSION_TYPE_MSZIP
: val
= "DRSUAPI_COMPRESSION_TYPE_MSZIP"; break;
3130 case DRSUAPI_COMPRESSION_TYPE_XPRESS
: val
= "DRSUAPI_COMPRESSION_TYPE_XPRESS"; break;
3132 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
3135 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetNCChangesCompressedCtr
*r
)
3138 uint32_t _flags_save_UNION
= ndr
->flags
;
3139 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3140 if (ndr_flags
& NDR_SCALARS
) {
3141 int level
= ndr_push_get_switch_value(ndr
, r
);
3143 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16): {
3144 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_SCALARS
, &r
->mszip1
));
3147 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16): {
3148 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(ndr
, NDR_SCALARS
, &r
->mszip6
));
3151 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16): {
3152 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(ndr
, NDR_SCALARS
, &r
->xpress1
));
3155 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16): {
3156 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(ndr
, NDR_SCALARS
, &r
->xpress6
));
3160 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3163 if (ndr_flags
& NDR_BUFFERS
) {
3164 int level
= ndr_push_get_switch_value(ndr
, r
);
3166 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3167 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_BUFFERS
, &r
->mszip1
));
3170 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3171 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(ndr
, NDR_BUFFERS
, &r
->mszip6
));
3174 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3175 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(ndr
, NDR_BUFFERS
, &r
->xpress1
));
3178 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3179 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(ndr
, NDR_BUFFERS
, &r
->xpress6
));
3183 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3186 ndr
->flags
= _flags_save_UNION
;
3188 return NDR_ERR_SUCCESS
;
3191 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetNCChangesCompressedCtr
*r
)
3195 uint32_t _flags_save_UNION
= ndr
->flags
;
3196 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3197 level
= ndr_pull_get_switch_value(ndr
, r
);
3198 if (ndr_flags
& NDR_SCALARS
) {
3200 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16): {
3201 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_SCALARS
, &r
->mszip1
));
3204 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16): {
3205 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(ndr
, NDR_SCALARS
, &r
->mszip6
));
3208 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16): {
3209 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(ndr
, NDR_SCALARS
, &r
->xpress1
));
3212 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16): {
3213 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(ndr
, NDR_SCALARS
, &r
->xpress6
));
3217 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3220 if (ndr_flags
& NDR_BUFFERS
) {
3222 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3223 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_BUFFERS
, &r
->mszip1
));
3226 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3227 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(ndr
, NDR_BUFFERS
, &r
->mszip6
));
3230 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3231 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(ndr
, NDR_BUFFERS
, &r
->xpress1
));
3234 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3235 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(ndr
, NDR_BUFFERS
, &r
->xpress6
));
3239 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3242 ndr
->flags
= _flags_save_UNION
;
3244 return NDR_ERR_SUCCESS
;
3247 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetNCChangesCompressedCtr
*r
)
3251 uint32_t _flags_save_UNION
= ndr
->flags
;
3252 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3253 level
= ndr_print_get_switch_value(ndr
, r
);
3254 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetNCChangesCompressedCtr");
3256 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3257 ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, "mszip1", &r
->mszip1
);
3260 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3261 ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(ndr
, "mszip6", &r
->mszip6
);
3264 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3265 ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(ndr
, "xpress1", &r
->xpress1
);
3268 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3269 ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(ndr
, "xpress6", &r
->xpress6
);
3273 ndr_print_bad_level(ndr
, name
, level
);
3275 ndr
->flags
= _flags_save_UNION
;
3279 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr2
*r
)
3281 if (ndr_flags
& NDR_SCALARS
) {
3282 NDR_CHECK(ndr_push_align(ndr
, 4));
3283 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_SCALARS
, &r
->mszip1
));
3285 if (ndr_flags
& NDR_BUFFERS
) {
3286 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_BUFFERS
, &r
->mszip1
));
3288 return NDR_ERR_SUCCESS
;
3291 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr2
*r
)
3293 if (ndr_flags
& NDR_SCALARS
) {
3294 NDR_CHECK(ndr_pull_align(ndr
, 4));
3295 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_SCALARS
, &r
->mszip1
));
3297 if (ndr_flags
& NDR_BUFFERS
) {
3298 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_BUFFERS
, &r
->mszip1
));
3300 return NDR_ERR_SUCCESS
;
3303 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr2
*r
)
3305 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr2");
3307 ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, "mszip1", &r
->mszip1
);
3311 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr7(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr7
*r
)
3313 if (ndr_flags
& NDR_SCALARS
) {
3314 NDR_CHECK(ndr_push_align(ndr
, 4));
3315 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->level
));
3316 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressionType(ndr
, NDR_SCALARS
, r
->type
));
3317 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->level
| (r
->type
<< 16)));
3318 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
3320 if (ndr_flags
& NDR_BUFFERS
) {
3321 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
3323 return NDR_ERR_SUCCESS
;
3326 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr7(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr7
*r
)
3328 if (ndr_flags
& NDR_SCALARS
) {
3329 NDR_CHECK(ndr_pull_align(ndr
, 4));
3330 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->level
));
3331 if (r
->level
< 0 || r
->level
> 6) {
3332 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3334 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressionType(ndr
, NDR_SCALARS
, &r
->type
));
3335 if (r
->type
< 2 || r
->type
> 3) {
3336 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3338 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->level
| (r
->type
<< 16)));
3339 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
3341 if (ndr_flags
& NDR_BUFFERS
) {
3342 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
3344 return NDR_ERR_SUCCESS
;
3347 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr7(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr7
*r
)
3349 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr7");
3351 ndr_print_int32(ndr
, "level", r
->level
);
3352 ndr_print_drsuapi_DsGetNCChangesCompressionType(ndr
, "type", r
->type
);
3353 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->level
| (r
->type
<< 16));
3354 ndr_print_drsuapi_DsGetNCChangesCompressedCtr(ndr
, "ctr", &r
->ctr
);
3358 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetNCChangesCtr
*r
)
3360 if (ndr_flags
& NDR_SCALARS
) {
3361 int level
= ndr_push_get_switch_value(ndr
, r
);
3362 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
3365 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
3369 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
3373 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(ndr
, NDR_SCALARS
, &r
->ctr6
));
3377 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr7(ndr
, NDR_SCALARS
, &r
->ctr7
));
3381 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3384 if (ndr_flags
& NDR_BUFFERS
) {
3385 int level
= ndr_push_get_switch_value(ndr
, r
);
3388 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
3392 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
3396 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(ndr
, NDR_BUFFERS
, &r
->ctr6
));
3400 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr7(ndr
, NDR_BUFFERS
, &r
->ctr7
));
3404 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3407 return NDR_ERR_SUCCESS
;
3410 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetNCChangesCtr
*r
)
3414 level
= ndr_pull_get_switch_value(ndr
, r
);
3415 if (ndr_flags
& NDR_SCALARS
) {
3416 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
3417 if (_level
!= level
) {
3418 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
3422 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
3426 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
3430 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(ndr
, NDR_SCALARS
, &r
->ctr6
));
3434 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr7(ndr
, NDR_SCALARS
, &r
->ctr7
));
3438 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3441 if (ndr_flags
& NDR_BUFFERS
) {
3444 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
3448 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
3452 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(ndr
, NDR_BUFFERS
, &r
->ctr6
));
3456 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr7(ndr
, NDR_BUFFERS
, &r
->ctr7
));
3460 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3463 return NDR_ERR_SUCCESS
;
3466 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetNCChangesCtr
*r
)
3469 level
= ndr_print_get_switch_value(ndr
, r
);
3470 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetNCChangesCtr");
3473 ndr_print_drsuapi_DsGetNCChangesCtr1(ndr
, "ctr1", &r
->ctr1
);
3477 ndr_print_drsuapi_DsGetNCChangesCtr2(ndr
, "ctr2", &r
->ctr2
);
3481 ndr_print_drsuapi_DsGetNCChangesCtr6(ndr
, "ctr6", &r
->ctr6
);
3485 ndr_print_drsuapi_DsGetNCChangesCtr7(ndr
, "ctr7", &r
->ctr7
);
3489 ndr_print_bad_level(ndr
, name
, level
);
3493 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaUpdateRefsOptions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
3495 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
3496 return NDR_ERR_SUCCESS
;
3499 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaUpdateRefsOptions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
3502 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
3504 return NDR_ERR_SUCCESS
;
3507 _PUBLIC_
void ndr_print_drsuapi_DsReplicaUpdateRefsOptions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
3509 ndr_print_uint32(ndr
, name
, r
);
3511 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION
, r
);
3512 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE", DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE
, r
);
3513 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE", DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE
, r
);
3514 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE", DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE
, r
);
3515 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_UPDATE_0x00000010", DRSUAPI_DS_REPLICA_UPDATE_0x00000010
, r
);
3519 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaUpdateRefsRequest1
*r
)
3521 if (ndr_flags
& NDR_SCALARS
) {
3522 NDR_CHECK(ndr_push_align(ndr
, 4));
3523 if (r
->naming_context
== NULL
) {
3524 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3526 NDR_CHECK(ndr_push_ref_ptr(ndr
));
3527 if (r
->dest_dsa_dns_name
== NULL
) {
3528 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3530 NDR_CHECK(ndr_push_ref_ptr(ndr
));
3531 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->dest_dsa_guid
));
3532 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsOptions(ndr
, NDR_SCALARS
, r
->options
));
3534 if (ndr_flags
& NDR_BUFFERS
) {
3535 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
3536 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dest_dsa_dns_name
, CH_DOS
)));
3537 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3538 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dest_dsa_dns_name
, CH_DOS
)));
3539 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dest_dsa_dns_name
, ndr_charset_length(r
->dest_dsa_dns_name
, CH_DOS
), sizeof(uint8_t), CH_DOS
));
3541 return NDR_ERR_SUCCESS
;
3544 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaUpdateRefsRequest1
*r
)
3546 uint32_t _ptr_naming_context
;
3547 TALLOC_CTX
*_mem_save_naming_context_0
;
3548 uint32_t _ptr_dest_dsa_dns_name
;
3549 if (ndr_flags
& NDR_SCALARS
) {
3550 NDR_CHECK(ndr_pull_align(ndr
, 4));
3551 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
3552 if (_ptr_naming_context
) {
3553 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
3555 r
->naming_context
= NULL
;
3557 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_dest_dsa_dns_name
));
3558 if (_ptr_dest_dsa_dns_name
) {
3559 NDR_PULL_ALLOC(ndr
, r
->dest_dsa_dns_name
);
3561 r
->dest_dsa_dns_name
= NULL
;
3563 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->dest_dsa_guid
));
3564 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsOptions(ndr
, NDR_SCALARS
, &r
->options
));
3566 if (ndr_flags
& NDR_BUFFERS
) {
3567 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3568 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
3569 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
3570 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
3571 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dest_dsa_dns_name
));
3572 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dest_dsa_dns_name
));
3573 if (ndr_get_array_length(ndr
, &r
->dest_dsa_dns_name
) > ndr_get_array_size(ndr
, &r
->dest_dsa_dns_name
)) {
3574 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dest_dsa_dns_name
), ndr_get_array_length(ndr
, &r
->dest_dsa_dns_name
));
3576 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dest_dsa_dns_name
), sizeof(uint8_t)));
3577 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dest_dsa_dns_name
, ndr_get_array_length(ndr
, &r
->dest_dsa_dns_name
), sizeof(uint8_t), CH_DOS
));
3579 return NDR_ERR_SUCCESS
;
3582 _PUBLIC_
void ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaUpdateRefsRequest1
*r
)
3584 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaUpdateRefsRequest1");
3586 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
3588 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
3590 ndr_print_ptr(ndr
, "dest_dsa_dns_name", r
->dest_dsa_dns_name
);
3592 ndr_print_string(ndr
, "dest_dsa_dns_name", r
->dest_dsa_dns_name
);
3594 ndr_print_GUID(ndr
, "dest_dsa_guid", &r
->dest_dsa_guid
);
3595 ndr_print_drsuapi_DsReplicaUpdateRefsOptions(ndr
, "options", r
->options
);
3599 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaUpdateRefsRequest
*r
)
3601 if (ndr_flags
& NDR_SCALARS
) {
3602 int level
= ndr_push_get_switch_value(ndr
, r
);
3603 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
3606 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
3610 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3613 if (ndr_flags
& NDR_BUFFERS
) {
3614 int level
= ndr_push_get_switch_value(ndr
, r
);
3617 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
3621 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3624 return NDR_ERR_SUCCESS
;
3627 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaUpdateRefsRequest
*r
)
3631 level
= ndr_pull_get_switch_value(ndr
, r
);
3632 if (ndr_flags
& NDR_SCALARS
) {
3633 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
3634 if (_level
!= level
) {
3635 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
3639 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
3643 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3646 if (ndr_flags
& NDR_BUFFERS
) {
3649 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
3653 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3656 return NDR_ERR_SUCCESS
;
3659 _PUBLIC_
void ndr_print_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaUpdateRefsRequest
*r
)
3662 level
= ndr_print_get_switch_value(ndr
, r
);
3663 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaUpdateRefsRequest");
3666 ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(ndr
, "req1", &r
->req1
);
3670 ndr_print_bad_level(ndr
, name
, level
);
3674 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAddOptions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
3676 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
3677 return NDR_ERR_SUCCESS
;
3680 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAddOptions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
3683 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
3685 return NDR_ERR_SUCCESS
;
3688 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAddOptions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
3690 ndr_print_uint32(ndr
, name
, r
);
3692 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION
, r
);
3693 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_WRITEABLE", DRSUAPI_DS_REPLICA_ADD_WRITEABLE
, r
);
3697 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaDeleteOptions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
3699 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
3700 return NDR_ERR_SUCCESS
;
3703 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaDeleteOptions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
3706 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
3708 return NDR_ERR_SUCCESS
;
3711 _PUBLIC_
void ndr_print_drsuapi_DsReplicaDeleteOptions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
3713 ndr_print_uint32(ndr
, name
, r
);
3715 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION
, r
);
3716 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_DELETE_WRITEABLE", DRSUAPI_DS_REPLICA_DELETE_WRITEABLE
, r
);
3720 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaModifyOptions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
3722 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
3723 return NDR_ERR_SUCCESS
;
3726 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaModifyOptions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
3729 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
3731 return NDR_ERR_SUCCESS
;
3734 _PUBLIC_
void ndr_print_drsuapi_DsReplicaModifyOptions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
3736 ndr_print_uint32(ndr
, name
, r
);
3738 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION
, r
);
3739 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE", DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE
, r
);
3743 static enum ndr_err_code
ndr_push_drsuapi_DsMembershipType(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsMembershipType r
)
3745 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
3746 return NDR_ERR_SUCCESS
;
3749 static enum ndr_err_code
ndr_pull_drsuapi_DsMembershipType(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsMembershipType
*r
)
3752 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
3754 return NDR_ERR_SUCCESS
;
3757 _PUBLIC_
void ndr_print_drsuapi_DsMembershipType(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsMembershipType r
)
3759 const char *val
= NULL
;
3762 case DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS"; break;
3763 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS"; break;
3764 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS"; break;
3765 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2"; break;
3766 case DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS"; break;
3767 case DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS"; break;
3768 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2"; break;
3770 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
3773 static enum ndr_err_code
ndr_push_drsuapi_DsGetMembershipsCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetMembershipsCtr1
*r
)
3775 uint32_t cntr_info_array_1
;
3776 uint32_t cntr_group_attrs_1
;
3777 uint32_t cntr_sids_1
;
3778 if (ndr_flags
& NDR_SCALARS
) {
3779 NDR_CHECK(ndr_push_align(ndr
, 4));
3780 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->status
));
3781 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_memberships
));
3782 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sids
));
3783 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info_array
));
3784 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->group_attrs
));
3785 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
3787 if (ndr_flags
& NDR_BUFFERS
) {
3788 if (r
->info_array
) {
3789 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_memberships
));
3790 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->num_memberships
; cntr_info_array_1
++) {
3791 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info_array
[cntr_info_array_1
]));
3793 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->num_memberships
; cntr_info_array_1
++) {
3794 if (r
->info_array
[cntr_info_array_1
]) {
3795 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info_array
[cntr_info_array_1
]));
3799 if (r
->group_attrs
) {
3800 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_memberships
));
3801 for (cntr_group_attrs_1
= 0; cntr_group_attrs_1
< r
->num_memberships
; cntr_group_attrs_1
++) {
3802 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->group_attrs
[cntr_group_attrs_1
]));
3806 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sids
));
3807 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
3808 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
[cntr_sids_1
]));
3810 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
3811 if (r
->sids
[cntr_sids_1
]) {
3812 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sids
[cntr_sids_1
]));
3817 return NDR_ERR_SUCCESS
;
3820 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMembershipsCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetMembershipsCtr1
*r
)
3822 uint32_t _ptr_info_array
;
3823 uint32_t cntr_info_array_1
;
3824 TALLOC_CTX
*_mem_save_info_array_0
;
3825 TALLOC_CTX
*_mem_save_info_array_1
;
3826 TALLOC_CTX
*_mem_save_info_array_2
;
3827 uint32_t _ptr_group_attrs
;
3828 uint32_t cntr_group_attrs_1
;
3829 TALLOC_CTX
*_mem_save_group_attrs_0
;
3830 TALLOC_CTX
*_mem_save_group_attrs_1
;
3832 uint32_t cntr_sids_1
;
3833 TALLOC_CTX
*_mem_save_sids_0
;
3834 TALLOC_CTX
*_mem_save_sids_1
;
3835 TALLOC_CTX
*_mem_save_sids_2
;
3836 if (ndr_flags
& NDR_SCALARS
) {
3837 NDR_CHECK(ndr_pull_align(ndr
, 4));
3838 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->status
));
3839 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_memberships
));
3840 if (r
->num_memberships
> 10000) {
3841 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3843 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_sids
));
3844 if (r
->num_sids
> 10000) {
3845 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3847 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info_array
));
3848 if (_ptr_info_array
) {
3849 NDR_PULL_ALLOC(ndr
, r
->info_array
);
3851 r
->info_array
= NULL
;
3853 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_group_attrs
));
3854 if (_ptr_group_attrs
) {
3855 NDR_PULL_ALLOC(ndr
, r
->group_attrs
);
3857 r
->group_attrs
= NULL
;
3859 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
3861 NDR_PULL_ALLOC(ndr
, r
->sids
);
3866 if (ndr_flags
& NDR_BUFFERS
) {
3867 if (r
->info_array
) {
3868 _mem_save_info_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3869 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
, 0);
3870 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->info_array
));
3871 NDR_PULL_ALLOC_N(ndr
, r
->info_array
, ndr_get_array_size(ndr
, &r
->info_array
));
3872 _mem_save_info_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3873 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
, 0);
3874 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->num_memberships
; cntr_info_array_1
++) {
3875 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info_array
));
3876 if (_ptr_info_array
) {
3877 NDR_PULL_ALLOC(ndr
, r
->info_array
[cntr_info_array_1
]);
3879 r
->info_array
[cntr_info_array_1
] = NULL
;
3882 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->num_memberships
; cntr_info_array_1
++) {
3883 if (r
->info_array
[cntr_info_array_1
]) {
3884 _mem_save_info_array_2
= NDR_PULL_GET_MEM_CTX(ndr
);
3885 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
[cntr_info_array_1
], 0);
3886 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info_array
[cntr_info_array_1
]));
3887 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_2
, 0);
3890 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_1
, 0);
3891 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_0
, 0);
3893 if (r
->group_attrs
) {
3894 _mem_save_group_attrs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3895 NDR_PULL_SET_MEM_CTX(ndr
, r
->group_attrs
, 0);
3896 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->group_attrs
));
3897 NDR_PULL_ALLOC_N(ndr
, r
->group_attrs
, ndr_get_array_size(ndr
, &r
->group_attrs
));
3898 _mem_save_group_attrs_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3899 NDR_PULL_SET_MEM_CTX(ndr
, r
->group_attrs
, 0);
3900 for (cntr_group_attrs_1
= 0; cntr_group_attrs_1
< r
->num_memberships
; cntr_group_attrs_1
++) {
3901 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->group_attrs
[cntr_group_attrs_1
]));
3903 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_attrs_1
, 0);
3904 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_attrs_0
, 0);
3907 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3908 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
3909 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
3910 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
3911 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3912 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
3913 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
3914 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
3916 NDR_PULL_ALLOC(ndr
, r
->sids
[cntr_sids_1
]);
3918 r
->sids
[cntr_sids_1
] = NULL
;
3921 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
3922 if (r
->sids
[cntr_sids_1
]) {
3923 _mem_save_sids_2
= NDR_PULL_GET_MEM_CTX(ndr
);
3924 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
[cntr_sids_1
], 0);
3925 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sids
[cntr_sids_1
]));
3926 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_2
, 0);
3929 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
3930 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
3932 if (r
->info_array
) {
3933 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->info_array
, r
->num_memberships
));
3935 if (r
->group_attrs
) {
3936 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->group_attrs
, r
->num_memberships
));
3939 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->num_sids
));
3942 return NDR_ERR_SUCCESS
;
3945 _PUBLIC_
void ndr_print_drsuapi_DsGetMembershipsCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetMembershipsCtr1
*r
)
3947 uint32_t cntr_info_array_1
;
3948 uint32_t cntr_group_attrs_1
;
3949 uint32_t cntr_sids_1
;
3950 ndr_print_struct(ndr
, name
, "drsuapi_DsGetMembershipsCtr1");
3952 ndr_print_NTSTATUS(ndr
, "status", r
->status
);
3953 ndr_print_uint32(ndr
, "num_memberships", r
->num_memberships
);
3954 ndr_print_uint32(ndr
, "num_sids", r
->num_sids
);
3955 ndr_print_ptr(ndr
, "info_array", r
->info_array
);
3957 if (r
->info_array
) {
3958 ndr
->print(ndr
, "%s: ARRAY(%d)", "info_array", (int)r
->num_memberships
);
3960 for (cntr_info_array_1
=0;cntr_info_array_1
<r
->num_memberships
;cntr_info_array_1
++) {
3962 if (asprintf(&idx_1
, "[%d]", cntr_info_array_1
) != -1) {
3963 ndr_print_ptr(ndr
, "info_array", r
->info_array
[cntr_info_array_1
]);
3965 if (r
->info_array
[cntr_info_array_1
]) {
3966 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "info_array", r
->info_array
[cntr_info_array_1
]);
3975 ndr_print_ptr(ndr
, "group_attrs", r
->group_attrs
);
3977 if (r
->group_attrs
) {
3978 ndr
->print(ndr
, "%s: ARRAY(%d)", "group_attrs", (int)r
->num_memberships
);
3980 for (cntr_group_attrs_1
=0;cntr_group_attrs_1
<r
->num_memberships
;cntr_group_attrs_1
++) {
3982 if (asprintf(&idx_1
, "[%d]", cntr_group_attrs_1
) != -1) {
3983 ndr_print_samr_GroupAttrs(ndr
, "group_attrs", r
->group_attrs
[cntr_group_attrs_1
]);
3990 ndr_print_ptr(ndr
, "sids", r
->sids
);
3993 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->num_sids
);
3995 for (cntr_sids_1
=0;cntr_sids_1
<r
->num_sids
;cntr_sids_1
++) {
3997 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
3998 ndr_print_ptr(ndr
, "sids", r
->sids
[cntr_sids_1
]);
4000 if (r
->sids
[cntr_sids_1
]) {
4001 ndr_print_dom_sid28(ndr
, "sids", r
->sids
[cntr_sids_1
]);
4013 static enum ndr_err_code
ndr_push_drsuapi_DsGetMembershipsCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetMembershipsCtr
*r
)
4015 if (ndr_flags
& NDR_SCALARS
) {
4016 int level
= ndr_push_get_switch_value(ndr
, r
);
4017 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
4020 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
4024 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4027 if (ndr_flags
& NDR_BUFFERS
) {
4028 int level
= ndr_push_get_switch_value(ndr
, r
);
4031 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
4035 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4038 return NDR_ERR_SUCCESS
;
4041 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMembershipsCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetMembershipsCtr
*r
)
4045 level
= ndr_pull_get_switch_value(ndr
, r
);
4046 if (ndr_flags
& NDR_SCALARS
) {
4047 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
4048 if (_level
!= level
) {
4049 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4053 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
4057 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4060 if (ndr_flags
& NDR_BUFFERS
) {
4063 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
4067 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4070 return NDR_ERR_SUCCESS
;
4073 _PUBLIC_
void ndr_print_drsuapi_DsGetMembershipsCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetMembershipsCtr
*r
)
4076 level
= ndr_print_get_switch_value(ndr
, r
);
4077 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetMembershipsCtr");
4080 ndr_print_drsuapi_DsGetMembershipsCtr1(ndr
, "ctr1", &r
->ctr1
);
4084 ndr_print_bad_level(ndr
, name
, level
);
4088 static enum ndr_err_code
ndr_push_drsuapi_DsGetMembershipsRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetMembershipsRequest1
*r
)
4090 uint32_t cntr_info_array_1
;
4091 if (ndr_flags
& NDR_SCALARS
) {
4092 NDR_CHECK(ndr_push_align(ndr
, 4));
4093 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4094 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info_array
));
4095 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
4096 NDR_CHECK(ndr_push_drsuapi_DsMembershipType(ndr
, NDR_SCALARS
, r
->type
));
4097 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain
));
4099 if (ndr_flags
& NDR_BUFFERS
) {
4100 if (r
->info_array
) {
4101 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4102 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->count
; cntr_info_array_1
++) {
4103 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info_array
[cntr_info_array_1
]));
4105 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->count
; cntr_info_array_1
++) {
4106 if (r
->info_array
[cntr_info_array_1
]) {
4107 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info_array
[cntr_info_array_1
]));
4112 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain
));
4115 return NDR_ERR_SUCCESS
;
4118 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMembershipsRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetMembershipsRequest1
*r
)
4120 uint32_t _ptr_info_array
;
4121 uint32_t cntr_info_array_1
;
4122 TALLOC_CTX
*_mem_save_info_array_0
;
4123 TALLOC_CTX
*_mem_save_info_array_1
;
4124 TALLOC_CTX
*_mem_save_info_array_2
;
4125 uint32_t _ptr_domain
;
4126 TALLOC_CTX
*_mem_save_domain_0
;
4127 if (ndr_flags
& NDR_SCALARS
) {
4128 NDR_CHECK(ndr_pull_align(ndr
, 4));
4129 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4130 if (r
->count
< 1 || r
->count
> 10000) {
4131 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4133 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info_array
));
4134 if (_ptr_info_array
) {
4135 NDR_PULL_ALLOC(ndr
, r
->info_array
);
4137 r
->info_array
= NULL
;
4139 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
4140 NDR_CHECK(ndr_pull_drsuapi_DsMembershipType(ndr
, NDR_SCALARS
, &r
->type
));
4141 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain
));
4143 NDR_PULL_ALLOC(ndr
, r
->domain
);
4148 if (ndr_flags
& NDR_BUFFERS
) {
4149 if (r
->info_array
) {
4150 _mem_save_info_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4151 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
, 0);
4152 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->info_array
));
4153 NDR_PULL_ALLOC_N(ndr
, r
->info_array
, ndr_get_array_size(ndr
, &r
->info_array
));
4154 _mem_save_info_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4155 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
, 0);
4156 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->count
; cntr_info_array_1
++) {
4157 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info_array
));
4158 if (_ptr_info_array
) {
4159 NDR_PULL_ALLOC(ndr
, r
->info_array
[cntr_info_array_1
]);
4161 r
->info_array
[cntr_info_array_1
] = NULL
;
4164 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->count
; cntr_info_array_1
++) {
4165 if (r
->info_array
[cntr_info_array_1
]) {
4166 _mem_save_info_array_2
= NDR_PULL_GET_MEM_CTX(ndr
);
4167 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
[cntr_info_array_1
], 0);
4168 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info_array
[cntr_info_array_1
]));
4169 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_2
, 0);
4172 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_1
, 0);
4173 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_0
, 0);
4176 _mem_save_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4177 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain
, 0);
4178 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain
));
4179 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_0
, 0);
4181 if (r
->info_array
) {
4182 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->info_array
, r
->count
));
4185 return NDR_ERR_SUCCESS
;
4188 _PUBLIC_
void ndr_print_drsuapi_DsGetMembershipsRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetMembershipsRequest1
*r
)
4190 uint32_t cntr_info_array_1
;
4191 ndr_print_struct(ndr
, name
, "drsuapi_DsGetMembershipsRequest1");
4193 ndr_print_uint32(ndr
, "count", r
->count
);
4194 ndr_print_ptr(ndr
, "info_array", r
->info_array
);
4196 if (r
->info_array
) {
4197 ndr
->print(ndr
, "%s: ARRAY(%d)", "info_array", (int)r
->count
);
4199 for (cntr_info_array_1
=0;cntr_info_array_1
<r
->count
;cntr_info_array_1
++) {
4201 if (asprintf(&idx_1
, "[%d]", cntr_info_array_1
) != -1) {
4202 ndr_print_ptr(ndr
, "info_array", r
->info_array
[cntr_info_array_1
]);
4204 if (r
->info_array
[cntr_info_array_1
]) {
4205 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "info_array", r
->info_array
[cntr_info_array_1
]);
4214 ndr_print_uint32(ndr
, "flags", r
->flags
);
4215 ndr_print_drsuapi_DsMembershipType(ndr
, "type", r
->type
);
4216 ndr_print_ptr(ndr
, "domain", r
->domain
);
4219 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "domain", r
->domain
);
4225 static enum ndr_err_code
ndr_push_drsuapi_DsGetMembershipsRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetMembershipsRequest
*r
)
4227 if (ndr_flags
& NDR_SCALARS
) {
4228 int level
= ndr_push_get_switch_value(ndr
, r
);
4229 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
4232 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4236 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4239 if (ndr_flags
& NDR_BUFFERS
) {
4240 int level
= ndr_push_get_switch_value(ndr
, r
);
4243 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4247 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4250 return NDR_ERR_SUCCESS
;
4253 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMembershipsRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetMembershipsRequest
*r
)
4257 level
= ndr_pull_get_switch_value(ndr
, r
);
4258 if (ndr_flags
& NDR_SCALARS
) {
4259 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
4260 if (_level
!= level
) {
4261 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4265 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4269 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4272 if (ndr_flags
& NDR_BUFFERS
) {
4275 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4279 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4282 return NDR_ERR_SUCCESS
;
4285 _PUBLIC_
void ndr_print_drsuapi_DsGetMembershipsRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetMembershipsRequest
*r
)
4288 level
= ndr_print_get_switch_value(ndr
, r
);
4289 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetMembershipsRequest");
4292 ndr_print_drsuapi_DsGetMembershipsRequest1(ndr
, "req1", &r
->req1
);
4296 ndr_print_bad_level(ndr
, name
, level
);
4300 static enum ndr_err_code
ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNT4ChangeLogRequest1
*r
)
4302 if (ndr_flags
& NDR_SCALARS
) {
4303 NDR_CHECK(ndr_push_align(ndr
, 4));
4304 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
4305 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
4306 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4307 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
4309 if (ndr_flags
& NDR_BUFFERS
) {
4311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4312 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
4315 return NDR_ERR_SUCCESS
;
4318 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNT4ChangeLogRequest1
*r
)
4321 TALLOC_CTX
*_mem_save_data_0
;
4322 if (ndr_flags
& NDR_SCALARS
) {
4323 NDR_CHECK(ndr_pull_align(ndr
, 4));
4324 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
4325 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
4326 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
4327 if (r
->length
> 0x00A00000) {
4328 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4330 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
4332 NDR_PULL_ALLOC(ndr
, r
->data
);
4337 if (ndr_flags
& NDR_BUFFERS
) {
4339 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4340 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
4341 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
4342 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
4343 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
4344 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
4347 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
4350 return NDR_ERR_SUCCESS
;
4353 _PUBLIC_
void ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNT4ChangeLogRequest1
*r
)
4355 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNT4ChangeLogRequest1");
4357 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
4358 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
4359 ndr_print_uint32(ndr
, "length", r
->length
);
4360 ndr_print_ptr(ndr
, "data", r
->data
);
4363 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
4369 static enum ndr_err_code
ndr_push_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetNT4ChangeLogRequest
*r
)
4371 if (ndr_flags
& NDR_SCALARS
) {
4372 int level
= ndr_push_get_switch_value(ndr
, r
);
4373 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
4376 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4380 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4383 if (ndr_flags
& NDR_BUFFERS
) {
4384 int level
= ndr_push_get_switch_value(ndr
, r
);
4387 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4391 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4394 return NDR_ERR_SUCCESS
;
4397 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetNT4ChangeLogRequest
*r
)
4401 level
= ndr_pull_get_switch_value(ndr
, r
);
4402 if (ndr_flags
& NDR_SCALARS
) {
4403 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
4404 if (_level
!= level
) {
4405 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4409 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4413 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4416 if (ndr_flags
& NDR_BUFFERS
) {
4419 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4423 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4426 return NDR_ERR_SUCCESS
;
4429 _PUBLIC_
void ndr_print_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetNT4ChangeLogRequest
*r
)
4432 level
= ndr_print_get_switch_value(ndr
, r
);
4433 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetNT4ChangeLogRequest");
4436 ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(ndr
, "req1", &r
->req1
);
4440 ndr_print_bad_level(ndr
, name
, level
);
4444 static enum ndr_err_code
ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNT4ChangeLogInfo1
*r
)
4446 if (ndr_flags
& NDR_SCALARS
) {
4447 NDR_CHECK(ndr_push_align(ndr
, 8));
4448 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length1
));
4449 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length2
));
4450 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown1
));
4451 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->time2
));
4452 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown3
));
4453 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->time4
));
4454 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown5
));
4455 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->time6
));
4456 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->status
));
4457 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data1
));
4458 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data2
));
4460 if (ndr_flags
& NDR_BUFFERS
) {
4462 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length1
));
4463 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data1
, r
->length1
));
4466 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length2
));
4467 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data2
, r
->length2
));
4470 return NDR_ERR_SUCCESS
;
4473 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNT4ChangeLogInfo1
*r
)
4475 uint32_t _ptr_data1
;
4476 TALLOC_CTX
*_mem_save_data1_0
;
4477 uint32_t _ptr_data2
;
4478 TALLOC_CTX
*_mem_save_data2_0
;
4479 if (ndr_flags
& NDR_SCALARS
) {
4480 NDR_CHECK(ndr_pull_align(ndr
, 8));
4481 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length1
));
4482 if (r
->length1
> 0x00A00000) {
4483 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4485 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length2
));
4486 if (r
->length2
> 0x00A00000) {
4487 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4489 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown1
));
4490 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->time2
));
4491 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown3
));
4492 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->time4
));
4493 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown5
));
4494 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->time6
));
4495 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->status
));
4496 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data1
));
4498 NDR_PULL_ALLOC(ndr
, r
->data1
);
4502 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data2
));
4504 NDR_PULL_ALLOC(ndr
, r
->data2
);
4509 if (ndr_flags
& NDR_BUFFERS
) {
4511 _mem_save_data1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4512 NDR_PULL_SET_MEM_CTX(ndr
, r
->data1
, 0);
4513 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data1
));
4514 NDR_PULL_ALLOC_N(ndr
, r
->data1
, ndr_get_array_size(ndr
, &r
->data1
));
4515 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data1
, ndr_get_array_size(ndr
, &r
->data1
)));
4516 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data1_0
, 0);
4519 _mem_save_data2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4520 NDR_PULL_SET_MEM_CTX(ndr
, r
->data2
, 0);
4521 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data2
));
4522 NDR_PULL_ALLOC_N(ndr
, r
->data2
, ndr_get_array_size(ndr
, &r
->data2
));
4523 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data2
, ndr_get_array_size(ndr
, &r
->data2
)));
4524 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data2_0
, 0);
4527 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data1
, r
->length1
));
4530 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data2
, r
->length2
));
4533 return NDR_ERR_SUCCESS
;
4536 _PUBLIC_
void ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNT4ChangeLogInfo1
*r
)
4538 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNT4ChangeLogInfo1");
4540 ndr_print_uint32(ndr
, "length1", r
->length1
);
4541 ndr_print_uint32(ndr
, "length2", r
->length2
);
4542 ndr_print_hyper(ndr
, "unknown1", r
->unknown1
);
4543 ndr_print_NTTIME(ndr
, "time2", r
->time2
);
4544 ndr_print_hyper(ndr
, "unknown3", r
->unknown3
);
4545 ndr_print_NTTIME(ndr
, "time4", r
->time4
);
4546 ndr_print_hyper(ndr
, "unknown5", r
->unknown5
);
4547 ndr_print_NTTIME(ndr
, "time6", r
->time6
);
4548 ndr_print_NTSTATUS(ndr
, "status", r
->status
);
4549 ndr_print_ptr(ndr
, "data1", r
->data1
);
4552 ndr_print_array_uint8(ndr
, "data1", r
->data1
, r
->length1
);
4555 ndr_print_ptr(ndr
, "data2", r
->data2
);
4558 ndr_print_array_uint8(ndr
, "data2", r
->data2
, r
->length2
);
4564 static enum ndr_err_code
ndr_push_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetNT4ChangeLogInfo
*r
)
4566 if (ndr_flags
& NDR_SCALARS
) {
4567 int level
= ndr_push_get_switch_value(ndr
, r
);
4568 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
4571 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
4575 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4578 if (ndr_flags
& NDR_BUFFERS
) {
4579 int level
= ndr_push_get_switch_value(ndr
, r
);
4582 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
4586 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4589 return NDR_ERR_SUCCESS
;
4592 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetNT4ChangeLogInfo
*r
)
4596 level
= ndr_pull_get_switch_value(ndr
, r
);
4597 if (ndr_flags
& NDR_SCALARS
) {
4598 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
4599 if (_level
!= level
) {
4600 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4604 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
4608 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4611 if (ndr_flags
& NDR_BUFFERS
) {
4614 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
4618 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4621 return NDR_ERR_SUCCESS
;
4624 _PUBLIC_
void ndr_print_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetNT4ChangeLogInfo
*r
)
4627 level
= ndr_print_get_switch_value(ndr
, r
);
4628 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetNT4ChangeLogInfo");
4631 ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(ndr
, "info1", &r
->info1
);
4635 ndr_print_bad_level(ndr
, name
, level
);
4639 static enum ndr_err_code
ndr_push_drsuapi_DsNameStatus(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsNameStatus r
)
4641 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4642 return NDR_ERR_SUCCESS
;
4645 static enum ndr_err_code
ndr_pull_drsuapi_DsNameStatus(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsNameStatus
*r
)
4648 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4650 return NDR_ERR_SUCCESS
;
4653 _PUBLIC_
void ndr_print_drsuapi_DsNameStatus(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsNameStatus r
)
4655 const char *val
= NULL
;
4658 case DRSUAPI_DS_NAME_STATUS_OK
: val
= "DRSUAPI_DS_NAME_STATUS_OK"; break;
4659 case DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR
: val
= "DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR"; break;
4660 case DRSUAPI_DS_NAME_STATUS_NOT_FOUND
: val
= "DRSUAPI_DS_NAME_STATUS_NOT_FOUND"; break;
4661 case DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE
: val
= "DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE"; break;
4662 case DRSUAPI_DS_NAME_STATUS_NO_MAPPING
: val
= "DRSUAPI_DS_NAME_STATUS_NO_MAPPING"; break;
4663 case DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY
: val
= "DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY"; break;
4664 case DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING
: val
= "DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING"; break;
4665 case DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL
: val
= "DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL"; break;
4667 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4670 static enum ndr_err_code
ndr_push_drsuapi_DsNameFlags(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsNameFlags r
)
4672 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4673 return NDR_ERR_SUCCESS
;
4676 static enum ndr_err_code
ndr_pull_drsuapi_DsNameFlags(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsNameFlags
*r
)
4679 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4681 return NDR_ERR_SUCCESS
;
4684 _PUBLIC_
void ndr_print_drsuapi_DsNameFlags(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsNameFlags r
)
4686 const char *val
= NULL
;
4689 case DRSUAPI_DS_NAME_FLAG_NO_FLAGS
: val
= "DRSUAPI_DS_NAME_FLAG_NO_FLAGS"; break;
4690 case DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY
: val
= "DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY"; break;
4691 case DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC
: val
= "DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC"; break;
4692 case DRSUAPI_DS_NAME_FLAG_GCVERIFY
: val
= "DRSUAPI_DS_NAME_FLAG_GCVERIFY"; break;
4693 case DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL
: val
= "DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL"; break;
4695 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4698 static enum ndr_err_code
ndr_push_drsuapi_DsNameFormat(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsNameFormat r
)
4700 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4701 return NDR_ERR_SUCCESS
;
4704 static enum ndr_err_code
ndr_pull_drsuapi_DsNameFormat(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsNameFormat
*r
)
4707 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4709 return NDR_ERR_SUCCESS
;
4712 _PUBLIC_
void ndr_print_drsuapi_DsNameFormat(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsNameFormat r
)
4714 const char *val
= NULL
;
4717 case DRSUAPI_DS_NAME_FORMAT_UNKNOWN
: val
= "DRSUAPI_DS_NAME_FORMAT_UNKNOWN"; break;
4718 case DRSUAPI_DS_NAME_FORMAT_FQDN_1779
: val
= "DRSUAPI_DS_NAME_FORMAT_FQDN_1779"; break;
4719 case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT
: val
= "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT"; break;
4720 case DRSUAPI_DS_NAME_FORMAT_DISPLAY
: val
= "DRSUAPI_DS_NAME_FORMAT_DISPLAY"; break;
4721 case DRSUAPI_DS_NAME_FORMAT_GUID
: val
= "DRSUAPI_DS_NAME_FORMAT_GUID"; break;
4722 case DRSUAPI_DS_NAME_FORMAT_CANONICAL
: val
= "DRSUAPI_DS_NAME_FORMAT_CANONICAL"; break;
4723 case DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL
: val
= "DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL"; break;
4724 case DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX
: val
= "DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX"; break;
4725 case DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL
: val
= "DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL"; break;
4726 case DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY
: val
= "DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY"; break;
4727 case DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN
: val
= "DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN"; break;
4729 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4732 static enum ndr_err_code
ndr_push_drsuapi_DsNameString(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsNameString
*r
)
4734 if (ndr_flags
& NDR_SCALARS
) {
4735 NDR_CHECK(ndr_push_align(ndr
, 4));
4736 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->str
));
4738 if (ndr_flags
& NDR_BUFFERS
) {
4740 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->str
, CH_UTF16
)));
4741 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4742 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->str
, CH_UTF16
)));
4743 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->str
, ndr_charset_length(r
->str
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4746 return NDR_ERR_SUCCESS
;
4749 static enum ndr_err_code
ndr_pull_drsuapi_DsNameString(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsNameString
*r
)
4752 TALLOC_CTX
*_mem_save_str_0
;
4753 if (ndr_flags
& NDR_SCALARS
) {
4754 NDR_CHECK(ndr_pull_align(ndr
, 4));
4755 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_str
));
4757 NDR_PULL_ALLOC(ndr
, r
->str
);
4762 if (ndr_flags
& NDR_BUFFERS
) {
4764 _mem_save_str_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4765 NDR_PULL_SET_MEM_CTX(ndr
, r
->str
, 0);
4766 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->str
));
4767 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->str
));
4768 if (ndr_get_array_length(ndr
, &r
->str
) > ndr_get_array_size(ndr
, &r
->str
)) {
4769 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->str
), ndr_get_array_length(ndr
, &r
->str
));
4771 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->str
), sizeof(uint16_t)));
4772 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->str
, ndr_get_array_length(ndr
, &r
->str
), sizeof(uint16_t), CH_UTF16
));
4773 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_str_0
, 0);
4776 return NDR_ERR_SUCCESS
;
4779 _PUBLIC_
void ndr_print_drsuapi_DsNameString(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsNameString
*r
)
4781 ndr_print_struct(ndr
, name
, "drsuapi_DsNameString");
4783 ndr_print_ptr(ndr
, "str", r
->str
);
4786 ndr_print_string(ndr
, "str", r
->str
);
4792 static enum ndr_err_code
ndr_push_drsuapi_DsNameRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsNameRequest1
*r
)
4794 uint32_t cntr_names_1
;
4795 if (ndr_flags
& NDR_SCALARS
) {
4796 NDR_CHECK(ndr_push_align(ndr
, 4));
4797 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->codepage
));
4798 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->language
));
4799 NDR_CHECK(ndr_push_drsuapi_DsNameFlags(ndr
, NDR_SCALARS
, r
->format_flags
));
4800 NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr
, NDR_SCALARS
, r
->format_offered
));
4801 NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr
, NDR_SCALARS
, r
->format_desired
));
4802 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4803 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
4805 if (ndr_flags
& NDR_BUFFERS
) {
4807 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4808 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4809 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4811 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4812 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4816 return NDR_ERR_SUCCESS
;
4819 static enum ndr_err_code
ndr_pull_drsuapi_DsNameRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsNameRequest1
*r
)
4821 uint32_t _ptr_names
;
4822 uint32_t cntr_names_1
;
4823 TALLOC_CTX
*_mem_save_names_0
;
4824 TALLOC_CTX
*_mem_save_names_1
;
4825 if (ndr_flags
& NDR_SCALARS
) {
4826 NDR_CHECK(ndr_pull_align(ndr
, 4));
4827 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->codepage
));
4828 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->language
));
4829 NDR_CHECK(ndr_pull_drsuapi_DsNameFlags(ndr
, NDR_SCALARS
, &r
->format_flags
));
4830 NDR_CHECK(ndr_pull_drsuapi_DsNameFormat(ndr
, NDR_SCALARS
, &r
->format_offered
));
4831 NDR_CHECK(ndr_pull_drsuapi_DsNameFormat(ndr
, NDR_SCALARS
, &r
->format_desired
));
4832 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4833 if (r
->count
< 1 || r
->count
> 10000) {
4834 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4836 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
4838 NDR_PULL_ALLOC(ndr
, r
->names
);
4843 if (ndr_flags
& NDR_BUFFERS
) {
4845 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4846 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4847 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
4848 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
4849 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4850 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4851 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4852 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4854 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4855 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4857 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
4858 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
4861 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
4864 return NDR_ERR_SUCCESS
;
4867 _PUBLIC_
void ndr_print_drsuapi_DsNameRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsNameRequest1
*r
)
4869 uint32_t cntr_names_1
;
4870 ndr_print_struct(ndr
, name
, "drsuapi_DsNameRequest1");
4872 ndr_print_uint32(ndr
, "codepage", r
->codepage
);
4873 ndr_print_uint32(ndr
, "language", r
->language
);
4874 ndr_print_drsuapi_DsNameFlags(ndr
, "format_flags", r
->format_flags
);
4875 ndr_print_drsuapi_DsNameFormat(ndr
, "format_offered", r
->format_offered
);
4876 ndr_print_drsuapi_DsNameFormat(ndr
, "format_desired", r
->format_desired
);
4877 ndr_print_uint32(ndr
, "count", r
->count
);
4878 ndr_print_ptr(ndr
, "names", r
->names
);
4881 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
4883 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
4885 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
4886 ndr_print_drsuapi_DsNameString(ndr
, "names", &r
->names
[cntr_names_1
]);
4896 static enum ndr_err_code
ndr_push_drsuapi_DsNameRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsNameRequest
*r
)
4898 if (ndr_flags
& NDR_SCALARS
) {
4899 int level
= ndr_push_get_switch_value(ndr
, r
);
4900 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
4903 NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4907 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4910 if (ndr_flags
& NDR_BUFFERS
) {
4911 int level
= ndr_push_get_switch_value(ndr
, r
);
4914 NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4918 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4921 return NDR_ERR_SUCCESS
;
4924 static enum ndr_err_code
ndr_pull_drsuapi_DsNameRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsNameRequest
*r
)
4928 level
= ndr_pull_get_switch_value(ndr
, r
);
4929 if (ndr_flags
& NDR_SCALARS
) {
4930 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
4931 if (_level
!= level
) {
4932 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4936 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4940 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4943 if (ndr_flags
& NDR_BUFFERS
) {
4946 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4950 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4953 return NDR_ERR_SUCCESS
;
4956 _PUBLIC_
void ndr_print_drsuapi_DsNameRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsNameRequest
*r
)
4959 level
= ndr_print_get_switch_value(ndr
, r
);
4960 ndr_print_union(ndr
, name
, level
, "drsuapi_DsNameRequest");
4963 ndr_print_drsuapi_DsNameRequest1(ndr
, "req1", &r
->req1
);
4967 ndr_print_bad_level(ndr
, name
, level
);
4971 static enum ndr_err_code
ndr_push_drsuapi_DsNameInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsNameInfo1
*r
)
4973 if (ndr_flags
& NDR_SCALARS
) {
4974 NDR_CHECK(ndr_push_align(ndr
, 4));
4975 NDR_CHECK(ndr_push_drsuapi_DsNameStatus(ndr
, NDR_SCALARS
, r
->status
));
4976 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dns_domain_name
));
4977 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->result_name
));
4979 if (ndr_flags
& NDR_BUFFERS
) {
4980 if (r
->dns_domain_name
) {
4981 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_domain_name
, CH_UTF16
)));
4982 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4983 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_domain_name
, CH_UTF16
)));
4984 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dns_domain_name
, ndr_charset_length(r
->dns_domain_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4986 if (r
->result_name
) {
4987 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->result_name
, CH_UTF16
)));
4988 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4989 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->result_name
, CH_UTF16
)));
4990 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->result_name
, ndr_charset_length(r
->result_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4993 return NDR_ERR_SUCCESS
;
4996 static enum ndr_err_code
ndr_pull_drsuapi_DsNameInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsNameInfo1
*r
)
4998 uint32_t _ptr_dns_domain_name
;
4999 TALLOC_CTX
*_mem_save_dns_domain_name_0
;
5000 uint32_t _ptr_result_name
;
5001 TALLOC_CTX
*_mem_save_result_name_0
;
5002 if (ndr_flags
& NDR_SCALARS
) {
5003 NDR_CHECK(ndr_pull_align(ndr
, 4));
5004 NDR_CHECK(ndr_pull_drsuapi_DsNameStatus(ndr
, NDR_SCALARS
, &r
->status
));
5005 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_domain_name
));
5006 if (_ptr_dns_domain_name
) {
5007 NDR_PULL_ALLOC(ndr
, r
->dns_domain_name
);
5009 r
->dns_domain_name
= NULL
;
5011 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_result_name
));
5012 if (_ptr_result_name
) {
5013 NDR_PULL_ALLOC(ndr
, r
->result_name
);
5015 r
->result_name
= NULL
;
5018 if (ndr_flags
& NDR_BUFFERS
) {
5019 if (r
->dns_domain_name
) {
5020 _mem_save_dns_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5021 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_domain_name
, 0);
5022 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dns_domain_name
));
5023 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dns_domain_name
));
5024 if (ndr_get_array_length(ndr
, &r
->dns_domain_name
) > ndr_get_array_size(ndr
, &r
->dns_domain_name
)) {
5025 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dns_domain_name
), ndr_get_array_length(ndr
, &r
->dns_domain_name
));
5027 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dns_domain_name
), sizeof(uint16_t)));
5028 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dns_domain_name
, ndr_get_array_length(ndr
, &r
->dns_domain_name
), sizeof(uint16_t), CH_UTF16
));
5029 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_domain_name_0
, 0);
5031 if (r
->result_name
) {
5032 _mem_save_result_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5033 NDR_PULL_SET_MEM_CTX(ndr
, r
->result_name
, 0);
5034 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->result_name
));
5035 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->result_name
));
5036 if (ndr_get_array_length(ndr
, &r
->result_name
) > ndr_get_array_size(ndr
, &r
->result_name
)) {
5037 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->result_name
), ndr_get_array_length(ndr
, &r
->result_name
));
5039 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->result_name
), sizeof(uint16_t)));
5040 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->result_name
, ndr_get_array_length(ndr
, &r
->result_name
), sizeof(uint16_t), CH_UTF16
));
5041 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_result_name_0
, 0);
5044 return NDR_ERR_SUCCESS
;
5047 _PUBLIC_
void ndr_print_drsuapi_DsNameInfo1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsNameInfo1
*r
)
5049 ndr_print_struct(ndr
, name
, "drsuapi_DsNameInfo1");
5051 ndr_print_drsuapi_DsNameStatus(ndr
, "status", r
->status
);
5052 ndr_print_ptr(ndr
, "dns_domain_name", r
->dns_domain_name
);
5054 if (r
->dns_domain_name
) {
5055 ndr_print_string(ndr
, "dns_domain_name", r
->dns_domain_name
);
5058 ndr_print_ptr(ndr
, "result_name", r
->result_name
);
5060 if (r
->result_name
) {
5061 ndr_print_string(ndr
, "result_name", r
->result_name
);
5067 static enum ndr_err_code
ndr_push_drsuapi_DsNameCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsNameCtr1
*r
)
5069 uint32_t cntr_array_1
;
5070 if (ndr_flags
& NDR_SCALARS
) {
5071 NDR_CHECK(ndr_push_align(ndr
, 4));
5072 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5073 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
5075 if (ndr_flags
& NDR_BUFFERS
) {
5077 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5078 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
5079 NDR_CHECK(ndr_push_drsuapi_DsNameInfo1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
5081 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
5082 NDR_CHECK(ndr_push_drsuapi_DsNameInfo1(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
5086 return NDR_ERR_SUCCESS
;
5089 static enum ndr_err_code
ndr_pull_drsuapi_DsNameCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsNameCtr1
*r
)
5091 uint32_t _ptr_array
;
5092 uint32_t cntr_array_1
;
5093 TALLOC_CTX
*_mem_save_array_0
;
5094 TALLOC_CTX
*_mem_save_array_1
;
5095 if (ndr_flags
& NDR_SCALARS
) {
5096 NDR_CHECK(ndr_pull_align(ndr
, 4));
5097 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
5098 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
5100 NDR_PULL_ALLOC(ndr
, r
->array
);
5105 if (ndr_flags
& NDR_BUFFERS
) {
5107 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5108 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
5109 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
5110 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
5111 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5112 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
5113 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
5114 NDR_CHECK(ndr_pull_drsuapi_DsNameInfo1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
5116 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
5117 NDR_CHECK(ndr_pull_drsuapi_DsNameInfo1(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
5119 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
5120 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
5123 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
5126 return NDR_ERR_SUCCESS
;
5129 _PUBLIC_
void ndr_print_drsuapi_DsNameCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsNameCtr1
*r
)
5131 uint32_t cntr_array_1
;
5132 ndr_print_struct(ndr
, name
, "drsuapi_DsNameCtr1");
5134 ndr_print_uint32(ndr
, "count", r
->count
);
5135 ndr_print_ptr(ndr
, "array", r
->array
);
5138 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
5140 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
5142 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
5143 ndr_print_drsuapi_DsNameInfo1(ndr
, "array", &r
->array
[cntr_array_1
]);
5153 static enum ndr_err_code
ndr_push_drsuapi_DsNameCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsNameCtr
*r
)
5155 if (ndr_flags
& NDR_SCALARS
) {
5156 int level
= ndr_push_get_switch_value(ndr
, r
);
5157 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
5160 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ctr1
));
5164 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5167 if (ndr_flags
& NDR_BUFFERS
) {
5168 int level
= ndr_push_get_switch_value(ndr
, r
);
5172 NDR_CHECK(ndr_push_drsuapi_DsNameCtr1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr1
));
5177 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5180 return NDR_ERR_SUCCESS
;
5183 static enum ndr_err_code
ndr_pull_drsuapi_DsNameCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsNameCtr
*r
)
5187 TALLOC_CTX
*_mem_save_ctr1_0
;
5188 level
= ndr_pull_get_switch_value(ndr
, r
);
5189 if (ndr_flags
& NDR_SCALARS
) {
5190 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
5191 if (_level
!= level
) {
5192 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
5197 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr1
));
5199 NDR_PULL_ALLOC(ndr
, r
->ctr1
);
5206 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5209 if (ndr_flags
& NDR_BUFFERS
) {
5213 _mem_save_ctr1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5214 NDR_PULL_SET_MEM_CTX(ndr
, r
->ctr1
, 0);
5215 NDR_CHECK(ndr_pull_drsuapi_DsNameCtr1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr1
));
5216 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr1_0
, 0);
5221 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5224 return NDR_ERR_SUCCESS
;
5227 _PUBLIC_
void ndr_print_drsuapi_DsNameCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsNameCtr
*r
)
5230 level
= ndr_print_get_switch_value(ndr
, r
);
5231 ndr_print_union(ndr
, name
, level
, "drsuapi_DsNameCtr");
5234 ndr_print_ptr(ndr
, "ctr1", r
->ctr1
);
5237 ndr_print_drsuapi_DsNameCtr1(ndr
, "ctr1", r
->ctr1
);
5243 ndr_print_bad_level(ndr
, name
, level
);
5247 static enum ndr_err_code
ndr_push_drsuapi_DsSpnOperation(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsSpnOperation r
)
5249 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
5250 return NDR_ERR_SUCCESS
;
5253 static enum ndr_err_code
ndr_pull_drsuapi_DsSpnOperation(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsSpnOperation
*r
)
5256 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
5258 return NDR_ERR_SUCCESS
;
5261 _PUBLIC_
void ndr_print_drsuapi_DsSpnOperation(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsSpnOperation r
)
5263 const char *val
= NULL
;
5266 case DRSUAPI_DS_SPN_OPERATION_ADD
: val
= "DRSUAPI_DS_SPN_OPERATION_ADD"; break;
5267 case DRSUAPI_DS_SPN_OPERATION_REPLACE
: val
= "DRSUAPI_DS_SPN_OPERATION_REPLACE"; break;
5268 case DRSUAPI_DS_SPN_OPERATION_DELETE
: val
= "DRSUAPI_DS_SPN_OPERATION_DELETE"; break;
5270 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5273 static enum ndr_err_code
ndr_push_drsuapi_DsWriteAccountSpnRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsWriteAccountSpnRequest1
*r
)
5275 uint32_t cntr_spn_names_1
;
5276 if (ndr_flags
& NDR_SCALARS
) {
5277 NDR_CHECK(ndr_push_align(ndr
, 4));
5278 NDR_CHECK(ndr_push_drsuapi_DsSpnOperation(ndr
, NDR_SCALARS
, r
->operation
));
5279 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
5280 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_dn
));
5281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5282 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->spn_names
));
5284 if (ndr_flags
& NDR_BUFFERS
) {
5286 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
5287 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5288 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
5289 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_dn
, ndr_charset_length(r
->object_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5292 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5293 for (cntr_spn_names_1
= 0; cntr_spn_names_1
< r
->count
; cntr_spn_names_1
++) {
5294 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr
, NDR_SCALARS
, &r
->spn_names
[cntr_spn_names_1
]));
5296 for (cntr_spn_names_1
= 0; cntr_spn_names_1
< r
->count
; cntr_spn_names_1
++) {
5297 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr
, NDR_BUFFERS
, &r
->spn_names
[cntr_spn_names_1
]));
5301 return NDR_ERR_SUCCESS
;
5304 static enum ndr_err_code
ndr_pull_drsuapi_DsWriteAccountSpnRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsWriteAccountSpnRequest1
*r
)
5306 uint32_t _ptr_object_dn
;
5307 TALLOC_CTX
*_mem_save_object_dn_0
;
5308 uint32_t _ptr_spn_names
;
5309 uint32_t cntr_spn_names_1
;
5310 TALLOC_CTX
*_mem_save_spn_names_0
;
5311 TALLOC_CTX
*_mem_save_spn_names_1
;
5312 if (ndr_flags
& NDR_SCALARS
) {
5313 NDR_CHECK(ndr_pull_align(ndr
, 4));
5314 NDR_CHECK(ndr_pull_drsuapi_DsSpnOperation(ndr
, NDR_SCALARS
, &r
->operation
));
5315 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
5316 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_dn
));
5317 if (_ptr_object_dn
) {
5318 NDR_PULL_ALLOC(ndr
, r
->object_dn
);
5320 r
->object_dn
= NULL
;
5322 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
5323 if (r
->count
> 10000) {
5324 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5326 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_spn_names
));
5327 if (_ptr_spn_names
) {
5328 NDR_PULL_ALLOC(ndr
, r
->spn_names
);
5330 r
->spn_names
= NULL
;
5333 if (ndr_flags
& NDR_BUFFERS
) {
5335 _mem_save_object_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5336 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_dn
, 0);
5337 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_dn
));
5338 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_dn
));
5339 if (ndr_get_array_length(ndr
, &r
->object_dn
) > ndr_get_array_size(ndr
, &r
->object_dn
)) {
5340 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->object_dn
), ndr_get_array_length(ndr
, &r
->object_dn
));
5342 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t)));
5343 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_dn
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t), CH_UTF16
));
5344 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_dn_0
, 0);
5347 _mem_save_spn_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5348 NDR_PULL_SET_MEM_CTX(ndr
, r
->spn_names
, 0);
5349 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->spn_names
));
5350 NDR_PULL_ALLOC_N(ndr
, r
->spn_names
, ndr_get_array_size(ndr
, &r
->spn_names
));
5351 _mem_save_spn_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5352 NDR_PULL_SET_MEM_CTX(ndr
, r
->spn_names
, 0);
5353 for (cntr_spn_names_1
= 0; cntr_spn_names_1
< r
->count
; cntr_spn_names_1
++) {
5354 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr
, NDR_SCALARS
, &r
->spn_names
[cntr_spn_names_1
]));
5356 for (cntr_spn_names_1
= 0; cntr_spn_names_1
< r
->count
; cntr_spn_names_1
++) {
5357 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr
, NDR_BUFFERS
, &r
->spn_names
[cntr_spn_names_1
]));
5359 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_spn_names_1
, 0);
5360 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_spn_names_0
, 0);
5363 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->spn_names
, r
->count
));
5366 return NDR_ERR_SUCCESS
;
5369 _PUBLIC_
void ndr_print_drsuapi_DsWriteAccountSpnRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsWriteAccountSpnRequest1
*r
)
5371 uint32_t cntr_spn_names_1
;
5372 ndr_print_struct(ndr
, name
, "drsuapi_DsWriteAccountSpnRequest1");
5374 ndr_print_drsuapi_DsSpnOperation(ndr
, "operation", r
->operation
);
5375 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
5376 ndr_print_ptr(ndr
, "object_dn", r
->object_dn
);
5379 ndr_print_string(ndr
, "object_dn", r
->object_dn
);
5382 ndr_print_uint32(ndr
, "count", r
->count
);
5383 ndr_print_ptr(ndr
, "spn_names", r
->spn_names
);
5386 ndr
->print(ndr
, "%s: ARRAY(%d)", "spn_names", (int)r
->count
);
5388 for (cntr_spn_names_1
=0;cntr_spn_names_1
<r
->count
;cntr_spn_names_1
++) {
5390 if (asprintf(&idx_1
, "[%d]", cntr_spn_names_1
) != -1) {
5391 ndr_print_drsuapi_DsNameString(ndr
, "spn_names", &r
->spn_names
[cntr_spn_names_1
]);
5401 static enum ndr_err_code
ndr_push_drsuapi_DsWriteAccountSpnRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsWriteAccountSpnRequest
*r
)
5403 if (ndr_flags
& NDR_SCALARS
) {
5404 int level
= ndr_push_get_switch_value(ndr
, r
);
5405 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
5408 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5412 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5415 if (ndr_flags
& NDR_BUFFERS
) {
5416 int level
= ndr_push_get_switch_value(ndr
, r
);
5419 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5423 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5426 return NDR_ERR_SUCCESS
;
5429 static enum ndr_err_code
ndr_pull_drsuapi_DsWriteAccountSpnRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsWriteAccountSpnRequest
*r
)
5433 level
= ndr_pull_get_switch_value(ndr
, r
);
5434 if (ndr_flags
& NDR_SCALARS
) {
5435 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
5436 if (_level
!= level
) {
5437 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
5441 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5445 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5448 if (ndr_flags
& NDR_BUFFERS
) {
5451 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5455 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5458 return NDR_ERR_SUCCESS
;
5461 _PUBLIC_
void ndr_print_drsuapi_DsWriteAccountSpnRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsWriteAccountSpnRequest
*r
)
5464 level
= ndr_print_get_switch_value(ndr
, r
);
5465 ndr_print_union(ndr
, name
, level
, "drsuapi_DsWriteAccountSpnRequest");
5468 ndr_print_drsuapi_DsWriteAccountSpnRequest1(ndr
, "req1", &r
->req1
);
5472 ndr_print_bad_level(ndr
, name
, level
);
5476 static enum ndr_err_code
ndr_push_drsuapi_DsWriteAccountSpnResult1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsWriteAccountSpnResult1
*r
)
5478 if (ndr_flags
& NDR_SCALARS
) {
5479 NDR_CHECK(ndr_push_align(ndr
, 4));
5480 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->status
));
5482 if (ndr_flags
& NDR_BUFFERS
) {
5484 return NDR_ERR_SUCCESS
;
5487 static enum ndr_err_code
ndr_pull_drsuapi_DsWriteAccountSpnResult1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsWriteAccountSpnResult1
*r
)
5489 if (ndr_flags
& NDR_SCALARS
) {
5490 NDR_CHECK(ndr_pull_align(ndr
, 4));
5491 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->status
));
5493 if (ndr_flags
& NDR_BUFFERS
) {
5495 return NDR_ERR_SUCCESS
;
5498 _PUBLIC_
void ndr_print_drsuapi_DsWriteAccountSpnResult1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsWriteAccountSpnResult1
*r
)
5500 ndr_print_struct(ndr
, name
, "drsuapi_DsWriteAccountSpnResult1");
5502 ndr_print_WERROR(ndr
, "status", r
->status
);
5506 static enum ndr_err_code
ndr_push_drsuapi_DsWriteAccountSpnResult(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsWriteAccountSpnResult
*r
)
5508 if (ndr_flags
& NDR_SCALARS
) {
5509 int level
= ndr_push_get_switch_value(ndr
, r
);
5510 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
5513 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnResult1(ndr
, NDR_SCALARS
, &r
->res1
));
5517 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5520 if (ndr_flags
& NDR_BUFFERS
) {
5521 int level
= ndr_push_get_switch_value(ndr
, r
);
5527 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5530 return NDR_ERR_SUCCESS
;
5533 static enum ndr_err_code
ndr_pull_drsuapi_DsWriteAccountSpnResult(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsWriteAccountSpnResult
*r
)
5537 level
= ndr_pull_get_switch_value(ndr
, r
);
5538 if (ndr_flags
& NDR_SCALARS
) {
5539 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
5540 if (_level
!= level
) {
5541 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
5545 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnResult1(ndr
, NDR_SCALARS
, &r
->res1
));
5549 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5552 if (ndr_flags
& NDR_BUFFERS
) {
5558 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5561 return NDR_ERR_SUCCESS
;
5564 _PUBLIC_
void ndr_print_drsuapi_DsWriteAccountSpnResult(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsWriteAccountSpnResult
*r
)
5567 level
= ndr_print_get_switch_value(ndr
, r
);
5568 ndr_print_union(ndr
, name
, level
, "drsuapi_DsWriteAccountSpnResult");
5571 ndr_print_drsuapi_DsWriteAccountSpnResult1(ndr
, "res1", &r
->res1
);
5575 ndr_print_bad_level(ndr
, name
, level
);
5579 static enum ndr_err_code
ndr_push_drsuapi_DsRemoveDSServerRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsRemoveDSServerRequest1
*r
)
5581 if (ndr_flags
& NDR_SCALARS
) {
5582 NDR_CHECK(ndr_push_align(ndr
, 4));
5583 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_dn
));
5584 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_dn
));
5585 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->commit
));
5587 if (ndr_flags
& NDR_BUFFERS
) {
5589 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
5590 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5591 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
5592 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_dn
, ndr_charset_length(r
->server_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5595 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_dn
, CH_UTF16
)));
5596 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5597 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_dn
, CH_UTF16
)));
5598 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_dn
, ndr_charset_length(r
->domain_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5601 return NDR_ERR_SUCCESS
;
5604 static enum ndr_err_code
ndr_pull_drsuapi_DsRemoveDSServerRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsRemoveDSServerRequest1
*r
)
5606 uint32_t _ptr_server_dn
;
5607 TALLOC_CTX
*_mem_save_server_dn_0
;
5608 uint32_t _ptr_domain_dn
;
5609 TALLOC_CTX
*_mem_save_domain_dn_0
;
5610 if (ndr_flags
& NDR_SCALARS
) {
5611 NDR_CHECK(ndr_pull_align(ndr
, 4));
5612 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_dn
));
5613 if (_ptr_server_dn
) {
5614 NDR_PULL_ALLOC(ndr
, r
->server_dn
);
5616 r
->server_dn
= NULL
;
5618 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_dn
));
5619 if (_ptr_domain_dn
) {
5620 NDR_PULL_ALLOC(ndr
, r
->domain_dn
);
5622 r
->domain_dn
= NULL
;
5624 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->commit
));
5626 if (ndr_flags
& NDR_BUFFERS
) {
5628 _mem_save_server_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5629 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_dn
, 0);
5630 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_dn
));
5631 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_dn
));
5632 if (ndr_get_array_length(ndr
, &r
->server_dn
) > ndr_get_array_size(ndr
, &r
->server_dn
)) {
5633 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->server_dn
), ndr_get_array_length(ndr
, &r
->server_dn
));
5635 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t)));
5636 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_dn
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t), CH_UTF16
));
5637 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_dn_0
, 0);
5640 _mem_save_domain_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5641 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_dn
, 0);
5642 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_dn
));
5643 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_dn
));
5644 if (ndr_get_array_length(ndr
, &r
->domain_dn
) > ndr_get_array_size(ndr
, &r
->domain_dn
)) {
5645 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain_dn
), ndr_get_array_length(ndr
, &r
->domain_dn
));
5647 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_dn
), sizeof(uint16_t)));
5648 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_dn
, ndr_get_array_length(ndr
, &r
->domain_dn
), sizeof(uint16_t), CH_UTF16
));
5649 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_dn_0
, 0);
5652 return NDR_ERR_SUCCESS
;
5655 _PUBLIC_
void ndr_print_drsuapi_DsRemoveDSServerRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsRemoveDSServerRequest1
*r
)
5657 ndr_print_struct(ndr
, name
, "drsuapi_DsRemoveDSServerRequest1");
5659 ndr_print_ptr(ndr
, "server_dn", r
->server_dn
);
5662 ndr_print_string(ndr
, "server_dn", r
->server_dn
);
5665 ndr_print_ptr(ndr
, "domain_dn", r
->domain_dn
);
5668 ndr_print_string(ndr
, "domain_dn", r
->domain_dn
);
5671 ndr_print_uint32(ndr
, "commit", r
->commit
);
5675 static enum ndr_err_code
ndr_push_drsuapi_DsRemoveDSServerRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsRemoveDSServerRequest
*r
)
5677 if (ndr_flags
& NDR_SCALARS
) {
5678 int level
= ndr_push_get_switch_value(ndr
, r
);
5679 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
5682 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5686 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5689 if (ndr_flags
& NDR_BUFFERS
) {
5690 int level
= ndr_push_get_switch_value(ndr
, r
);
5693 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5697 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5700 return NDR_ERR_SUCCESS
;
5703 static enum ndr_err_code
ndr_pull_drsuapi_DsRemoveDSServerRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsRemoveDSServerRequest
*r
)
5707 level
= ndr_pull_get_switch_value(ndr
, r
);
5708 if (ndr_flags
& NDR_SCALARS
) {
5709 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
5710 if (_level
!= level
) {
5711 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
5715 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5719 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5722 if (ndr_flags
& NDR_BUFFERS
) {
5725 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5729 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5732 return NDR_ERR_SUCCESS
;
5735 _PUBLIC_
void ndr_print_drsuapi_DsRemoveDSServerRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsRemoveDSServerRequest
*r
)
5738 level
= ndr_print_get_switch_value(ndr
, r
);
5739 ndr_print_union(ndr
, name
, level
, "drsuapi_DsRemoveDSServerRequest");
5742 ndr_print_drsuapi_DsRemoveDSServerRequest1(ndr
, "req1", &r
->req1
);
5746 ndr_print_bad_level(ndr
, name
, level
);
5750 static enum ndr_err_code
ndr_push_drsuapi_DsRemoveDSServerResult1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsRemoveDSServerResult1
*r
)
5752 if (ndr_flags
& NDR_SCALARS
) {
5753 NDR_CHECK(ndr_push_align(ndr
, 4));
5754 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->last_dc_in_domain
));
5756 if (ndr_flags
& NDR_BUFFERS
) {
5758 return NDR_ERR_SUCCESS
;
5761 static enum ndr_err_code
ndr_pull_drsuapi_DsRemoveDSServerResult1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsRemoveDSServerResult1
*r
)
5763 if (ndr_flags
& NDR_SCALARS
) {
5764 NDR_CHECK(ndr_pull_align(ndr
, 4));
5765 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->last_dc_in_domain
));
5767 if (ndr_flags
& NDR_BUFFERS
) {
5769 return NDR_ERR_SUCCESS
;
5772 _PUBLIC_
void ndr_print_drsuapi_DsRemoveDSServerResult1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsRemoveDSServerResult1
*r
)
5774 ndr_print_struct(ndr
, name
, "drsuapi_DsRemoveDSServerResult1");
5776 ndr_print_uint32(ndr
, "last_dc_in_domain", r
->last_dc_in_domain
);
5780 static enum ndr_err_code
ndr_push_drsuapi_DsRemoveDSServerResult(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsRemoveDSServerResult
*r
)
5782 if (ndr_flags
& NDR_SCALARS
) {
5783 int level
= ndr_push_get_switch_value(ndr
, r
);
5784 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
5787 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerResult1(ndr
, NDR_SCALARS
, &r
->res1
));
5791 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5794 if (ndr_flags
& NDR_BUFFERS
) {
5795 int level
= ndr_push_get_switch_value(ndr
, r
);
5801 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5804 return NDR_ERR_SUCCESS
;
5807 static enum ndr_err_code
ndr_pull_drsuapi_DsRemoveDSServerResult(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsRemoveDSServerResult
*r
)
5811 level
= ndr_pull_get_switch_value(ndr
, r
);
5812 if (ndr_flags
& NDR_SCALARS
) {
5813 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
5814 if (_level
!= level
) {
5815 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
5819 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerResult1(ndr
, NDR_SCALARS
, &r
->res1
));
5823 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5826 if (ndr_flags
& NDR_BUFFERS
) {
5832 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5835 return NDR_ERR_SUCCESS
;
5838 _PUBLIC_
void ndr_print_drsuapi_DsRemoveDSServerResult(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsRemoveDSServerResult
*r
)
5841 level
= ndr_print_get_switch_value(ndr
, r
);
5842 ndr_print_union(ndr
, name
, level
, "drsuapi_DsRemoveDSServerResult");
5845 ndr_print_drsuapi_DsRemoveDSServerResult1(ndr
, "res1", &r
->res1
);
5849 ndr_print_bad_level(ndr
, name
, level
);
5853 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfoRequest1
*r
)
5855 if (ndr_flags
& NDR_SCALARS
) {
5856 NDR_CHECK(ndr_push_align(ndr
, 4));
5857 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_name
));
5858 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->level
));
5860 if (ndr_flags
& NDR_BUFFERS
) {
5861 if (r
->domain_name
) {
5862 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
5863 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5864 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
5865 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_name
, ndr_charset_length(r
->domain_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5868 return NDR_ERR_SUCCESS
;
5871 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfoRequest1
*r
)
5873 uint32_t _ptr_domain_name
;
5874 TALLOC_CTX
*_mem_save_domain_name_0
;
5875 if (ndr_flags
& NDR_SCALARS
) {
5876 NDR_CHECK(ndr_pull_align(ndr
, 4));
5877 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
5878 if (_ptr_domain_name
) {
5879 NDR_PULL_ALLOC(ndr
, r
->domain_name
);
5881 r
->domain_name
= NULL
;
5883 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->level
));
5885 if (ndr_flags
& NDR_BUFFERS
) {
5886 if (r
->domain_name
) {
5887 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5888 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_name
, 0);
5889 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_name
));
5890 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_name
));
5891 if (ndr_get_array_length(ndr
, &r
->domain_name
) > ndr_get_array_size(ndr
, &r
->domain_name
)) {
5892 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain_name
), ndr_get_array_length(ndr
, &r
->domain_name
));
5894 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t)));
5895 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_name
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t), CH_UTF16
));
5896 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
5899 return NDR_ERR_SUCCESS
;
5902 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfoRequest1
*r
)
5904 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfoRequest1");
5906 ndr_print_ptr(ndr
, "domain_name", r
->domain_name
);
5908 if (r
->domain_name
) {
5909 ndr_print_string(ndr
, "domain_name", r
->domain_name
);
5912 ndr_print_int32(ndr
, "level", r
->level
);
5916 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetDCInfoRequest
*r
)
5918 if (ndr_flags
& NDR_SCALARS
) {
5919 int level
= ndr_push_get_switch_value(ndr
, r
);
5920 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
5923 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5927 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5930 if (ndr_flags
& NDR_BUFFERS
) {
5931 int level
= ndr_push_get_switch_value(ndr
, r
);
5934 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5938 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5941 return NDR_ERR_SUCCESS
;
5944 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetDCInfoRequest
*r
)
5948 level
= ndr_pull_get_switch_value(ndr
, r
);
5949 if (ndr_flags
& NDR_SCALARS
) {
5950 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
5951 if (_level
!= level
) {
5952 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
5956 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5960 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5963 if (ndr_flags
& NDR_BUFFERS
) {
5966 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5970 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5973 return NDR_ERR_SUCCESS
;
5976 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetDCInfoRequest
*r
)
5979 level
= ndr_print_get_switch_value(ndr
, r
);
5980 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetDCInfoRequest");
5983 ndr_print_drsuapi_DsGetDCInfoRequest1(ndr
, "req1", &r
->req1
);
5987 ndr_print_bad_level(ndr
, name
, level
);
5991 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfo1
*r
)
5993 if (ndr_flags
& NDR_SCALARS
) {
5994 NDR_CHECK(ndr_push_align(ndr
, 4));
5995 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_name
));
5996 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dns_name
));
5997 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_name
));
5998 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->computer_dn
));
5999 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_dn
));
6000 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_pdc
));
6001 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_enabled
));
6003 if (ndr_flags
& NDR_BUFFERS
) {
6004 if (r
->netbios_name
) {
6005 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
6006 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6007 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
6008 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->netbios_name
, ndr_charset_length(r
->netbios_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6011 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
6012 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6013 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
6014 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dns_name
, ndr_charset_length(r
->dns_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6017 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
6018 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6019 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
6020 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_name
, ndr_charset_length(r
->site_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6022 if (r
->computer_dn
) {
6023 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
6024 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6025 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
6026 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->computer_dn
, ndr_charset_length(r
->computer_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6029 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
6030 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6031 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
6032 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_dn
, ndr_charset_length(r
->server_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6035 return NDR_ERR_SUCCESS
;
6038 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfo1
*r
)
6040 uint32_t _ptr_netbios_name
;
6041 TALLOC_CTX
*_mem_save_netbios_name_0
;
6042 uint32_t _ptr_dns_name
;
6043 TALLOC_CTX
*_mem_save_dns_name_0
;
6044 uint32_t _ptr_site_name
;
6045 TALLOC_CTX
*_mem_save_site_name_0
;
6046 uint32_t _ptr_computer_dn
;
6047 TALLOC_CTX
*_mem_save_computer_dn_0
;
6048 uint32_t _ptr_server_dn
;
6049 TALLOC_CTX
*_mem_save_server_dn_0
;
6050 if (ndr_flags
& NDR_SCALARS
) {
6051 NDR_CHECK(ndr_pull_align(ndr
, 4));
6052 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_name
));
6053 if (_ptr_netbios_name
) {
6054 NDR_PULL_ALLOC(ndr
, r
->netbios_name
);
6056 r
->netbios_name
= NULL
;
6058 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_name
));
6059 if (_ptr_dns_name
) {
6060 NDR_PULL_ALLOC(ndr
, r
->dns_name
);
6064 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_name
));
6065 if (_ptr_site_name
) {
6066 NDR_PULL_ALLOC(ndr
, r
->site_name
);
6068 r
->site_name
= NULL
;
6070 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_dn
));
6071 if (_ptr_computer_dn
) {
6072 NDR_PULL_ALLOC(ndr
, r
->computer_dn
);
6074 r
->computer_dn
= NULL
;
6076 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_dn
));
6077 if (_ptr_server_dn
) {
6078 NDR_PULL_ALLOC(ndr
, r
->server_dn
);
6080 r
->server_dn
= NULL
;
6082 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_pdc
));
6083 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_enabled
));
6085 if (ndr_flags
& NDR_BUFFERS
) {
6086 if (r
->netbios_name
) {
6087 _mem_save_netbios_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6088 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_name
, 0);
6089 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_name
));
6090 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->netbios_name
));
6091 if (ndr_get_array_length(ndr
, &r
->netbios_name
) > ndr_get_array_size(ndr
, &r
->netbios_name
)) {
6092 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->netbios_name
), ndr_get_array_length(ndr
, &r
->netbios_name
));
6094 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t)));
6095 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->netbios_name
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t), CH_UTF16
));
6096 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_name_0
, 0);
6099 _mem_save_dns_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6100 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_name
, 0);
6101 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dns_name
));
6102 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dns_name
));
6103 if (ndr_get_array_length(ndr
, &r
->dns_name
) > ndr_get_array_size(ndr
, &r
->dns_name
)) {
6104 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dns_name
), ndr_get_array_length(ndr
, &r
->dns_name
));
6106 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t)));
6107 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dns_name
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t), CH_UTF16
));
6108 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_name_0
, 0);
6111 _mem_save_site_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6112 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_name
, 0);
6113 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_name
));
6114 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_name
));
6115 if (ndr_get_array_length(ndr
, &r
->site_name
) > ndr_get_array_size(ndr
, &r
->site_name
)) {
6116 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->site_name
), ndr_get_array_length(ndr
, &r
->site_name
));
6118 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t)));
6119 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_name
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t), CH_UTF16
));
6120 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_name_0
, 0);
6122 if (r
->computer_dn
) {
6123 _mem_save_computer_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6124 NDR_PULL_SET_MEM_CTX(ndr
, r
->computer_dn
, 0);
6125 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->computer_dn
));
6126 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->computer_dn
));
6127 if (ndr_get_array_length(ndr
, &r
->computer_dn
) > ndr_get_array_size(ndr
, &r
->computer_dn
)) {
6128 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->computer_dn
), ndr_get_array_length(ndr
, &r
->computer_dn
));
6130 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t)));
6131 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->computer_dn
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t), CH_UTF16
));
6132 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_dn_0
, 0);
6135 _mem_save_server_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6136 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_dn
, 0);
6137 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_dn
));
6138 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_dn
));
6139 if (ndr_get_array_length(ndr
, &r
->server_dn
) > ndr_get_array_size(ndr
, &r
->server_dn
)) {
6140 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->server_dn
), ndr_get_array_length(ndr
, &r
->server_dn
));
6142 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t)));
6143 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_dn
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t), CH_UTF16
));
6144 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_dn_0
, 0);
6147 return NDR_ERR_SUCCESS
;
6150 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfo1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfo1
*r
)
6152 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfo1");
6154 ndr_print_ptr(ndr
, "netbios_name", r
->netbios_name
);
6156 if (r
->netbios_name
) {
6157 ndr_print_string(ndr
, "netbios_name", r
->netbios_name
);
6160 ndr_print_ptr(ndr
, "dns_name", r
->dns_name
);
6163 ndr_print_string(ndr
, "dns_name", r
->dns_name
);
6166 ndr_print_ptr(ndr
, "site_name", r
->site_name
);
6169 ndr_print_string(ndr
, "site_name", r
->site_name
);
6172 ndr_print_ptr(ndr
, "computer_dn", r
->computer_dn
);
6174 if (r
->computer_dn
) {
6175 ndr_print_string(ndr
, "computer_dn", r
->computer_dn
);
6178 ndr_print_ptr(ndr
, "server_dn", r
->server_dn
);
6181 ndr_print_string(ndr
, "server_dn", r
->server_dn
);
6184 ndr_print_uint32(ndr
, "is_pdc", r
->is_pdc
);
6185 ndr_print_uint32(ndr
, "is_enabled", r
->is_enabled
);
6189 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfoCtr1
*r
)
6191 uint32_t cntr_array_1
;
6192 if (ndr_flags
& NDR_SCALARS
) {
6193 NDR_CHECK(ndr_push_align(ndr
, 4));
6194 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
6195 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
6197 if (ndr_flags
& NDR_BUFFERS
) {
6199 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
6200 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6201 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
6203 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6204 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo1(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
6208 return NDR_ERR_SUCCESS
;
6211 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfoCtr1
*r
)
6213 uint32_t _ptr_array
;
6214 uint32_t cntr_array_1
;
6215 TALLOC_CTX
*_mem_save_array_0
;
6216 TALLOC_CTX
*_mem_save_array_1
;
6217 if (ndr_flags
& NDR_SCALARS
) {
6218 NDR_CHECK(ndr_pull_align(ndr
, 4));
6219 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
6220 if (r
->count
> 10000) {
6221 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6223 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
6225 NDR_PULL_ALLOC(ndr
, r
->array
);
6230 if (ndr_flags
& NDR_BUFFERS
) {
6232 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6233 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
6234 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
6235 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
6236 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6237 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
6238 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6239 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
6241 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6242 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo1(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
6244 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
6245 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
6248 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
6251 return NDR_ERR_SUCCESS
;
6254 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfoCtr1
*r
)
6256 uint32_t cntr_array_1
;
6257 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfoCtr1");
6259 ndr_print_uint32(ndr
, "count", r
->count
);
6260 ndr_print_ptr(ndr
, "array", r
->array
);
6263 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
6265 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
6267 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
6268 ndr_print_drsuapi_DsGetDCInfo1(ndr
, "array", &r
->array
[cntr_array_1
]);
6278 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfo2
*r
)
6280 if (ndr_flags
& NDR_SCALARS
) {
6281 NDR_CHECK(ndr_push_align(ndr
, 4));
6282 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_name
));
6283 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dns_name
));
6284 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_name
));
6285 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_dn
));
6286 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->computer_dn
));
6287 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_dn
));
6288 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ntds_dn
));
6289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_pdc
));
6290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_enabled
));
6291 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_gc
));
6292 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
6293 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->computer_guid
));
6294 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->server_guid
));
6295 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->ntds_guid
));
6297 if (ndr_flags
& NDR_BUFFERS
) {
6298 if (r
->netbios_name
) {
6299 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
6300 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6301 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
6302 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->netbios_name
, ndr_charset_length(r
->netbios_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6305 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
6306 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6307 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
6308 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dns_name
, ndr_charset_length(r
->dns_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
6312 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6313 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
6314 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_name
, ndr_charset_length(r
->site_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6317 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_dn
, CH_UTF16
)));
6318 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6319 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_dn
, CH_UTF16
)));
6320 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_dn
, ndr_charset_length(r
->site_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6322 if (r
->computer_dn
) {
6323 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
6324 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6325 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
6326 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->computer_dn
, ndr_charset_length(r
->computer_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6329 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
6330 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6331 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
6332 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_dn
, ndr_charset_length(r
->server_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6335 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
)));
6336 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6337 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
)));
6338 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->ntds_dn
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6341 return NDR_ERR_SUCCESS
;
6344 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfo2
*r
)
6346 uint32_t _ptr_netbios_name
;
6347 TALLOC_CTX
*_mem_save_netbios_name_0
;
6348 uint32_t _ptr_dns_name
;
6349 TALLOC_CTX
*_mem_save_dns_name_0
;
6350 uint32_t _ptr_site_name
;
6351 TALLOC_CTX
*_mem_save_site_name_0
;
6352 uint32_t _ptr_site_dn
;
6353 TALLOC_CTX
*_mem_save_site_dn_0
;
6354 uint32_t _ptr_computer_dn
;
6355 TALLOC_CTX
*_mem_save_computer_dn_0
;
6356 uint32_t _ptr_server_dn
;
6357 TALLOC_CTX
*_mem_save_server_dn_0
;
6358 uint32_t _ptr_ntds_dn
;
6359 TALLOC_CTX
*_mem_save_ntds_dn_0
;
6360 if (ndr_flags
& NDR_SCALARS
) {
6361 NDR_CHECK(ndr_pull_align(ndr
, 4));
6362 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_name
));
6363 if (_ptr_netbios_name
) {
6364 NDR_PULL_ALLOC(ndr
, r
->netbios_name
);
6366 r
->netbios_name
= NULL
;
6368 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_name
));
6369 if (_ptr_dns_name
) {
6370 NDR_PULL_ALLOC(ndr
, r
->dns_name
);
6374 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_name
));
6375 if (_ptr_site_name
) {
6376 NDR_PULL_ALLOC(ndr
, r
->site_name
);
6378 r
->site_name
= NULL
;
6380 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_dn
));
6382 NDR_PULL_ALLOC(ndr
, r
->site_dn
);
6386 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_dn
));
6387 if (_ptr_computer_dn
) {
6388 NDR_PULL_ALLOC(ndr
, r
->computer_dn
);
6390 r
->computer_dn
= NULL
;
6392 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_dn
));
6393 if (_ptr_server_dn
) {
6394 NDR_PULL_ALLOC(ndr
, r
->server_dn
);
6396 r
->server_dn
= NULL
;
6398 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ntds_dn
));
6400 NDR_PULL_ALLOC(ndr
, r
->ntds_dn
);
6404 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_pdc
));
6405 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_enabled
));
6406 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_gc
));
6407 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
6408 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->computer_guid
));
6409 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->server_guid
));
6410 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->ntds_guid
));
6412 if (ndr_flags
& NDR_BUFFERS
) {
6413 if (r
->netbios_name
) {
6414 _mem_save_netbios_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6415 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_name
, 0);
6416 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_name
));
6417 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->netbios_name
));
6418 if (ndr_get_array_length(ndr
, &r
->netbios_name
) > ndr_get_array_size(ndr
, &r
->netbios_name
)) {
6419 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->netbios_name
), ndr_get_array_length(ndr
, &r
->netbios_name
));
6421 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t)));
6422 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->netbios_name
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t), CH_UTF16
));
6423 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_name_0
, 0);
6426 _mem_save_dns_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6427 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_name
, 0);
6428 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dns_name
));
6429 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dns_name
));
6430 if (ndr_get_array_length(ndr
, &r
->dns_name
) > ndr_get_array_size(ndr
, &r
->dns_name
)) {
6431 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dns_name
), ndr_get_array_length(ndr
, &r
->dns_name
));
6433 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t)));
6434 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dns_name
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t), CH_UTF16
));
6435 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_name_0
, 0);
6438 _mem_save_site_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6439 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_name
, 0);
6440 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_name
));
6441 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_name
));
6442 if (ndr_get_array_length(ndr
, &r
->site_name
) > ndr_get_array_size(ndr
, &r
->site_name
)) {
6443 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->site_name
), ndr_get_array_length(ndr
, &r
->site_name
));
6445 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t)));
6446 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_name
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t), CH_UTF16
));
6447 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_name_0
, 0);
6450 _mem_save_site_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6451 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_dn
, 0);
6452 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_dn
));
6453 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_dn
));
6454 if (ndr_get_array_length(ndr
, &r
->site_dn
) > ndr_get_array_size(ndr
, &r
->site_dn
)) {
6455 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->site_dn
), ndr_get_array_length(ndr
, &r
->site_dn
));
6457 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_dn
), sizeof(uint16_t)));
6458 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_dn
, ndr_get_array_length(ndr
, &r
->site_dn
), sizeof(uint16_t), CH_UTF16
));
6459 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_dn_0
, 0);
6461 if (r
->computer_dn
) {
6462 _mem_save_computer_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6463 NDR_PULL_SET_MEM_CTX(ndr
, r
->computer_dn
, 0);
6464 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->computer_dn
));
6465 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->computer_dn
));
6466 if (ndr_get_array_length(ndr
, &r
->computer_dn
) > ndr_get_array_size(ndr
, &r
->computer_dn
)) {
6467 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->computer_dn
), ndr_get_array_length(ndr
, &r
->computer_dn
));
6469 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t)));
6470 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->computer_dn
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t), CH_UTF16
));
6471 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_dn_0
, 0);
6474 _mem_save_server_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6475 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_dn
, 0);
6476 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_dn
));
6477 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_dn
));
6478 if (ndr_get_array_length(ndr
, &r
->server_dn
) > ndr_get_array_size(ndr
, &r
->server_dn
)) {
6479 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->server_dn
), ndr_get_array_length(ndr
, &r
->server_dn
));
6481 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t)));
6482 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_dn
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t), CH_UTF16
));
6483 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_dn_0
, 0);
6486 _mem_save_ntds_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6487 NDR_PULL_SET_MEM_CTX(ndr
, r
->ntds_dn
, 0);
6488 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->ntds_dn
));
6489 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->ntds_dn
));
6490 if (ndr_get_array_length(ndr
, &r
->ntds_dn
) > ndr_get_array_size(ndr
, &r
->ntds_dn
)) {
6491 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->ntds_dn
), ndr_get_array_length(ndr
, &r
->ntds_dn
));
6493 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->ntds_dn
), sizeof(uint16_t)));
6494 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->ntds_dn
, ndr_get_array_length(ndr
, &r
->ntds_dn
), sizeof(uint16_t), CH_UTF16
));
6495 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ntds_dn_0
, 0);
6498 return NDR_ERR_SUCCESS
;
6501 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfo2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfo2
*r
)
6503 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfo2");
6505 ndr_print_ptr(ndr
, "netbios_name", r
->netbios_name
);
6507 if (r
->netbios_name
) {
6508 ndr_print_string(ndr
, "netbios_name", r
->netbios_name
);
6511 ndr_print_ptr(ndr
, "dns_name", r
->dns_name
);
6514 ndr_print_string(ndr
, "dns_name", r
->dns_name
);
6517 ndr_print_ptr(ndr
, "site_name", r
->site_name
);
6520 ndr_print_string(ndr
, "site_name", r
->site_name
);
6523 ndr_print_ptr(ndr
, "site_dn", r
->site_dn
);
6526 ndr_print_string(ndr
, "site_dn", r
->site_dn
);
6529 ndr_print_ptr(ndr
, "computer_dn", r
->computer_dn
);
6531 if (r
->computer_dn
) {
6532 ndr_print_string(ndr
, "computer_dn", r
->computer_dn
);
6535 ndr_print_ptr(ndr
, "server_dn", r
->server_dn
);
6538 ndr_print_string(ndr
, "server_dn", r
->server_dn
);
6541 ndr_print_ptr(ndr
, "ntds_dn", r
->ntds_dn
);
6544 ndr_print_string(ndr
, "ntds_dn", r
->ntds_dn
);
6547 ndr_print_uint32(ndr
, "is_pdc", r
->is_pdc
);
6548 ndr_print_uint32(ndr
, "is_enabled", r
->is_enabled
);
6549 ndr_print_uint32(ndr
, "is_gc", r
->is_gc
);
6550 ndr_print_GUID(ndr
, "site_guid", &r
->site_guid
);
6551 ndr_print_GUID(ndr
, "computer_guid", &r
->computer_guid
);
6552 ndr_print_GUID(ndr
, "server_guid", &r
->server_guid
);
6553 ndr_print_GUID(ndr
, "ntds_guid", &r
->ntds_guid
);
6557 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoCtr2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfoCtr2
*r
)
6559 uint32_t cntr_array_1
;
6560 if (ndr_flags
& NDR_SCALARS
) {
6561 NDR_CHECK(ndr_push_align(ndr
, 4));
6562 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
6563 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
6565 if (ndr_flags
& NDR_BUFFERS
) {
6567 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
6568 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6569 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
6571 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6572 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
6576 return NDR_ERR_SUCCESS
;
6579 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoCtr2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfoCtr2
*r
)
6581 uint32_t _ptr_array
;
6582 uint32_t cntr_array_1
;
6583 TALLOC_CTX
*_mem_save_array_0
;
6584 TALLOC_CTX
*_mem_save_array_1
;
6585 if (ndr_flags
& NDR_SCALARS
) {
6586 NDR_CHECK(ndr_pull_align(ndr
, 4));
6587 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
6588 if (r
->count
> 10000) {
6589 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6591 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
6593 NDR_PULL_ALLOC(ndr
, r
->array
);
6598 if (ndr_flags
& NDR_BUFFERS
) {
6600 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6601 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
6602 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
6603 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
6604 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6605 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
6606 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6607 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
6609 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6610 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
6612 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
6613 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
6616 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
6619 return NDR_ERR_SUCCESS
;
6622 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoCtr2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfoCtr2
*r
)
6624 uint32_t cntr_array_1
;
6625 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfoCtr2");
6627 ndr_print_uint32(ndr
, "count", r
->count
);
6628 ndr_print_ptr(ndr
, "array", r
->array
);
6631 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
6633 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
6635 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
6636 ndr_print_drsuapi_DsGetDCInfo2(ndr
, "array", &r
->array
[cntr_array_1
]);
6646 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfo3
*r
)
6648 if (ndr_flags
& NDR_SCALARS
) {
6649 NDR_CHECK(ndr_push_align(ndr
, 4));
6650 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_name
));
6651 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dns_name
));
6652 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_name
));
6653 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_dn
));
6654 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->computer_dn
));
6655 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_dn
));
6656 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ntds_dn
));
6657 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_pdc
));
6658 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_enabled
));
6659 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_gc
));
6660 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_rodc
));
6661 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
6662 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->computer_guid
));
6663 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->server_guid
));
6664 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->ntds_guid
));
6666 if (ndr_flags
& NDR_BUFFERS
) {
6667 if (r
->netbios_name
) {
6668 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
6669 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6670 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
6671 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->netbios_name
, ndr_charset_length(r
->netbios_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6674 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
6675 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6676 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
6677 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dns_name
, ndr_charset_length(r
->dns_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6680 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
6681 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6682 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
6683 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_name
, ndr_charset_length(r
->site_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6686 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_dn
, CH_UTF16
)));
6687 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6688 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_dn
, CH_UTF16
)));
6689 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_dn
, ndr_charset_length(r
->site_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6691 if (r
->computer_dn
) {
6692 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
6693 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6694 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
6695 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->computer_dn
, ndr_charset_length(r
->computer_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6698 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
6699 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6700 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
6701 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_dn
, ndr_charset_length(r
->server_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6704 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
)));
6705 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6706 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
)));
6707 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->ntds_dn
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6710 return NDR_ERR_SUCCESS
;
6713 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfo3
*r
)
6715 uint32_t _ptr_netbios_name
;
6716 TALLOC_CTX
*_mem_save_netbios_name_0
;
6717 uint32_t _ptr_dns_name
;
6718 TALLOC_CTX
*_mem_save_dns_name_0
;
6719 uint32_t _ptr_site_name
;
6720 TALLOC_CTX
*_mem_save_site_name_0
;
6721 uint32_t _ptr_site_dn
;
6722 TALLOC_CTX
*_mem_save_site_dn_0
;
6723 uint32_t _ptr_computer_dn
;
6724 TALLOC_CTX
*_mem_save_computer_dn_0
;
6725 uint32_t _ptr_server_dn
;
6726 TALLOC_CTX
*_mem_save_server_dn_0
;
6727 uint32_t _ptr_ntds_dn
;
6728 TALLOC_CTX
*_mem_save_ntds_dn_0
;
6729 if (ndr_flags
& NDR_SCALARS
) {
6730 NDR_CHECK(ndr_pull_align(ndr
, 4));
6731 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_name
));
6732 if (_ptr_netbios_name
) {
6733 NDR_PULL_ALLOC(ndr
, r
->netbios_name
);
6735 r
->netbios_name
= NULL
;
6737 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_name
));
6738 if (_ptr_dns_name
) {
6739 NDR_PULL_ALLOC(ndr
, r
->dns_name
);
6743 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_name
));
6744 if (_ptr_site_name
) {
6745 NDR_PULL_ALLOC(ndr
, r
->site_name
);
6747 r
->site_name
= NULL
;
6749 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_dn
));
6751 NDR_PULL_ALLOC(ndr
, r
->site_dn
);
6755 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_dn
));
6756 if (_ptr_computer_dn
) {
6757 NDR_PULL_ALLOC(ndr
, r
->computer_dn
);
6759 r
->computer_dn
= NULL
;
6761 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_dn
));
6762 if (_ptr_server_dn
) {
6763 NDR_PULL_ALLOC(ndr
, r
->server_dn
);
6765 r
->server_dn
= NULL
;
6767 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ntds_dn
));
6769 NDR_PULL_ALLOC(ndr
, r
->ntds_dn
);
6773 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_pdc
));
6774 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_enabled
));
6775 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_gc
));
6776 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_rodc
));
6777 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
6778 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->computer_guid
));
6779 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->server_guid
));
6780 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->ntds_guid
));
6782 if (ndr_flags
& NDR_BUFFERS
) {
6783 if (r
->netbios_name
) {
6784 _mem_save_netbios_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6785 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_name
, 0);
6786 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_name
));
6787 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->netbios_name
));
6788 if (ndr_get_array_length(ndr
, &r
->netbios_name
) > ndr_get_array_size(ndr
, &r
->netbios_name
)) {
6789 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->netbios_name
), ndr_get_array_length(ndr
, &r
->netbios_name
));
6791 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t)));
6792 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->netbios_name
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t), CH_UTF16
));
6793 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_name_0
, 0);
6796 _mem_save_dns_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6797 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_name
, 0);
6798 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dns_name
));
6799 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dns_name
));
6800 if (ndr_get_array_length(ndr
, &r
->dns_name
) > ndr_get_array_size(ndr
, &r
->dns_name
)) {
6801 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dns_name
), ndr_get_array_length(ndr
, &r
->dns_name
));
6803 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t)));
6804 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dns_name
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t), CH_UTF16
));
6805 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_name_0
, 0);
6808 _mem_save_site_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6809 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_name
, 0);
6810 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_name
));
6811 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_name
));
6812 if (ndr_get_array_length(ndr
, &r
->site_name
) > ndr_get_array_size(ndr
, &r
->site_name
)) {
6813 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->site_name
), ndr_get_array_length(ndr
, &r
->site_name
));
6815 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t)));
6816 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_name
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t), CH_UTF16
));
6817 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_name_0
, 0);
6820 _mem_save_site_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6821 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_dn
, 0);
6822 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_dn
));
6823 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_dn
));
6824 if (ndr_get_array_length(ndr
, &r
->site_dn
) > ndr_get_array_size(ndr
, &r
->site_dn
)) {
6825 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->site_dn
), ndr_get_array_length(ndr
, &r
->site_dn
));
6827 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_dn
), sizeof(uint16_t)));
6828 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_dn
, ndr_get_array_length(ndr
, &r
->site_dn
), sizeof(uint16_t), CH_UTF16
));
6829 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_dn_0
, 0);
6831 if (r
->computer_dn
) {
6832 _mem_save_computer_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6833 NDR_PULL_SET_MEM_CTX(ndr
, r
->computer_dn
, 0);
6834 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->computer_dn
));
6835 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->computer_dn
));
6836 if (ndr_get_array_length(ndr
, &r
->computer_dn
) > ndr_get_array_size(ndr
, &r
->computer_dn
)) {
6837 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->computer_dn
), ndr_get_array_length(ndr
, &r
->computer_dn
));
6839 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t)));
6840 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->computer_dn
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t), CH_UTF16
));
6841 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_dn_0
, 0);
6844 _mem_save_server_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6845 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_dn
, 0);
6846 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_dn
));
6847 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_dn
));
6848 if (ndr_get_array_length(ndr
, &r
->server_dn
) > ndr_get_array_size(ndr
, &r
->server_dn
)) {
6849 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->server_dn
), ndr_get_array_length(ndr
, &r
->server_dn
));
6851 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t)));
6852 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_dn
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t), CH_UTF16
));
6853 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_dn_0
, 0);
6856 _mem_save_ntds_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6857 NDR_PULL_SET_MEM_CTX(ndr
, r
->ntds_dn
, 0);
6858 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->ntds_dn
));
6859 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->ntds_dn
));
6860 if (ndr_get_array_length(ndr
, &r
->ntds_dn
) > ndr_get_array_size(ndr
, &r
->ntds_dn
)) {
6861 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->ntds_dn
), ndr_get_array_length(ndr
, &r
->ntds_dn
));
6863 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->ntds_dn
), sizeof(uint16_t)));
6864 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->ntds_dn
, ndr_get_array_length(ndr
, &r
->ntds_dn
), sizeof(uint16_t), CH_UTF16
));
6865 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ntds_dn_0
, 0);
6868 return NDR_ERR_SUCCESS
;
6871 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfo3(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfo3
*r
)
6873 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfo3");
6875 ndr_print_ptr(ndr
, "netbios_name", r
->netbios_name
);
6877 if (r
->netbios_name
) {
6878 ndr_print_string(ndr
, "netbios_name", r
->netbios_name
);
6881 ndr_print_ptr(ndr
, "dns_name", r
->dns_name
);
6884 ndr_print_string(ndr
, "dns_name", r
->dns_name
);
6887 ndr_print_ptr(ndr
, "site_name", r
->site_name
);
6890 ndr_print_string(ndr
, "site_name", r
->site_name
);
6893 ndr_print_ptr(ndr
, "site_dn", r
->site_dn
);
6896 ndr_print_string(ndr
, "site_dn", r
->site_dn
);
6899 ndr_print_ptr(ndr
, "computer_dn", r
->computer_dn
);
6901 if (r
->computer_dn
) {
6902 ndr_print_string(ndr
, "computer_dn", r
->computer_dn
);
6905 ndr_print_ptr(ndr
, "server_dn", r
->server_dn
);
6908 ndr_print_string(ndr
, "server_dn", r
->server_dn
);
6911 ndr_print_ptr(ndr
, "ntds_dn", r
->ntds_dn
);
6914 ndr_print_string(ndr
, "ntds_dn", r
->ntds_dn
);
6917 ndr_print_uint32(ndr
, "is_pdc", r
->is_pdc
);
6918 ndr_print_uint32(ndr
, "is_enabled", r
->is_enabled
);
6919 ndr_print_uint32(ndr
, "is_gc", r
->is_gc
);
6920 ndr_print_uint32(ndr
, "is_rodc", r
->is_rodc
);
6921 ndr_print_GUID(ndr
, "site_guid", &r
->site_guid
);
6922 ndr_print_GUID(ndr
, "computer_guid", &r
->computer_guid
);
6923 ndr_print_GUID(ndr
, "server_guid", &r
->server_guid
);
6924 ndr_print_GUID(ndr
, "ntds_guid", &r
->ntds_guid
);
6928 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoCtr3(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfoCtr3
*r
)
6930 uint32_t cntr_array_1
;
6931 if (ndr_flags
& NDR_SCALARS
) {
6932 NDR_CHECK(ndr_push_align(ndr
, 4));
6933 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
6934 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
6936 if (ndr_flags
& NDR_BUFFERS
) {
6938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
6939 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6940 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo3(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
6942 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6943 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo3(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
6947 return NDR_ERR_SUCCESS
;
6950 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoCtr3(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfoCtr3
*r
)
6952 uint32_t _ptr_array
;
6953 uint32_t cntr_array_1
;
6954 TALLOC_CTX
*_mem_save_array_0
;
6955 TALLOC_CTX
*_mem_save_array_1
;
6956 if (ndr_flags
& NDR_SCALARS
) {
6957 NDR_CHECK(ndr_pull_align(ndr
, 4));
6958 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
6959 if (r
->count
> 10000) {
6960 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6962 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
6964 NDR_PULL_ALLOC(ndr
, r
->array
);
6969 if (ndr_flags
& NDR_BUFFERS
) {
6971 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6972 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
6973 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
6974 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
6975 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6976 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
6977 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6978 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo3(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
6980 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6981 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo3(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
6983 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
6984 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
6987 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
6990 return NDR_ERR_SUCCESS
;
6993 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoCtr3(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfoCtr3
*r
)
6995 uint32_t cntr_array_1
;
6996 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfoCtr3");
6998 ndr_print_uint32(ndr
, "count", r
->count
);
6999 ndr_print_ptr(ndr
, "array", r
->array
);
7002 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
7004 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
7006 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
7007 ndr_print_drsuapi_DsGetDCInfo3(ndr
, "array", &r
->array
[cntr_array_1
]);
7017 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCConnection01(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCConnection01
*r
)
7019 if (ndr_flags
& NDR_SCALARS
) {
7020 NDR_CHECK(ndr_push_align(ndr
, 4));
7022 uint32_t _flags_save_ipv4address
= ndr
->flags
;
7023 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_BIGENDIAN
);
7024 NDR_CHECK(ndr_push_ipv4address(ndr
, NDR_SCALARS
, r
->client_ip_address
));
7025 ndr
->flags
= _flags_save_ipv4address
;
7027 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
7028 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->connection_time
));
7029 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown4
));
7030 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
7031 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
7032 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->client_account
));
7034 if (ndr_flags
& NDR_BUFFERS
) {
7035 if (r
->client_account
) {
7036 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client_account
, CH_UTF16
)));
7037 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7038 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client_account
, CH_UTF16
)));
7039 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->client_account
, ndr_charset_length(r
->client_account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7042 return NDR_ERR_SUCCESS
;
7045 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCConnection01(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCConnection01
*r
)
7047 uint32_t _ptr_client_account
;
7048 TALLOC_CTX
*_mem_save_client_account_0
;
7049 if (ndr_flags
& NDR_SCALARS
) {
7050 NDR_CHECK(ndr_pull_align(ndr
, 4));
7052 uint32_t _flags_save_ipv4address
= ndr
->flags
;
7053 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_BIGENDIAN
);
7054 NDR_CHECK(ndr_pull_ipv4address(ndr
, NDR_SCALARS
, &r
->client_ip_address
));
7055 ndr
->flags
= _flags_save_ipv4address
;
7057 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
7058 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->connection_time
));
7059 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown4
));
7060 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
7061 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
7062 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_client_account
));
7063 if (_ptr_client_account
) {
7064 NDR_PULL_ALLOC(ndr
, r
->client_account
);
7066 r
->client_account
= NULL
;
7069 if (ndr_flags
& NDR_BUFFERS
) {
7070 if (r
->client_account
) {
7071 _mem_save_client_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7072 NDR_PULL_SET_MEM_CTX(ndr
, r
->client_account
, 0);
7073 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->client_account
));
7074 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->client_account
));
7075 if (ndr_get_array_length(ndr
, &r
->client_account
) > ndr_get_array_size(ndr
, &r
->client_account
)) {
7076 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->client_account
), ndr_get_array_length(ndr
, &r
->client_account
));
7078 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->client_account
), sizeof(uint16_t)));
7079 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->client_account
, ndr_get_array_length(ndr
, &r
->client_account
), sizeof(uint16_t), CH_UTF16
));
7080 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_client_account_0
, 0);
7083 return NDR_ERR_SUCCESS
;
7086 _PUBLIC_
void ndr_print_drsuapi_DsGetDCConnection01(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCConnection01
*r
)
7088 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCConnection01");
7090 ndr_print_ipv4address(ndr
, "client_ip_address", r
->client_ip_address
);
7091 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
7092 ndr_print_uint32(ndr
, "connection_time", r
->connection_time
);
7093 ndr_print_uint32(ndr
, "unknown4", r
->unknown4
);
7094 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
7095 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
7096 ndr_print_ptr(ndr
, "client_account", r
->client_account
);
7098 if (r
->client_account
) {
7099 ndr_print_string(ndr
, "client_account", r
->client_account
);
7105 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCConnectionCtr01(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCConnectionCtr01
*r
)
7107 uint32_t cntr_array_1
;
7108 if (ndr_flags
& NDR_SCALARS
) {
7109 NDR_CHECK(ndr_push_align(ndr
, 4));
7110 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7111 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
7113 if (ndr_flags
& NDR_BUFFERS
) {
7115 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7116 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7117 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnection01(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
7119 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7120 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnection01(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
7124 return NDR_ERR_SUCCESS
;
7127 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCConnectionCtr01(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCConnectionCtr01
*r
)
7129 uint32_t _ptr_array
;
7130 uint32_t cntr_array_1
;
7131 TALLOC_CTX
*_mem_save_array_0
;
7132 TALLOC_CTX
*_mem_save_array_1
;
7133 if (ndr_flags
& NDR_SCALARS
) {
7134 NDR_CHECK(ndr_pull_align(ndr
, 4));
7135 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
7136 if (r
->count
> 10000) {
7137 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
7139 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
7141 NDR_PULL_ALLOC(ndr
, r
->array
);
7146 if (ndr_flags
& NDR_BUFFERS
) {
7148 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7149 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
7150 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
7151 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
7152 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7153 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
7154 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7155 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnection01(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
7157 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7158 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnection01(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
7160 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
7161 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
7164 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
7167 return NDR_ERR_SUCCESS
;
7170 _PUBLIC_
void ndr_print_drsuapi_DsGetDCConnectionCtr01(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCConnectionCtr01
*r
)
7172 uint32_t cntr_array_1
;
7173 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCConnectionCtr01");
7175 ndr_print_uint32(ndr
, "count", r
->count
);
7176 ndr_print_ptr(ndr
, "array", r
->array
);
7179 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
7181 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
7183 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
7184 ndr_print_drsuapi_DsGetDCConnection01(ndr
, "array", &r
->array
[cntr_array_1
]);
7194 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetDCInfoCtr
*r
)
7196 if (ndr_flags
& NDR_SCALARS
) {
7197 int level
= ndr_push_get_switch_value(ndr
, r
);
7198 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
7200 case DRSUAPI_DC_INFO_CTR_1
: {
7201 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
7204 case DRSUAPI_DC_INFO_CTR_2
: {
7205 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
7208 case DRSUAPI_DC_INFO_CTR_3
: {
7209 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr3(ndr
, NDR_SCALARS
, &r
->ctr3
));
7212 case DRSUAPI_DC_CONNECTION_CTR_01
: {
7213 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnectionCtr01(ndr
, NDR_SCALARS
, &r
->ctr01
));
7217 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7220 if (ndr_flags
& NDR_BUFFERS
) {
7221 int level
= ndr_push_get_switch_value(ndr
, r
);
7223 case DRSUAPI_DC_INFO_CTR_1
:
7224 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
7227 case DRSUAPI_DC_INFO_CTR_2
:
7228 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
7231 case DRSUAPI_DC_INFO_CTR_3
:
7232 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr3(ndr
, NDR_BUFFERS
, &r
->ctr3
));
7235 case DRSUAPI_DC_CONNECTION_CTR_01
:
7236 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnectionCtr01(ndr
, NDR_BUFFERS
, &r
->ctr01
));
7240 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7243 return NDR_ERR_SUCCESS
;
7246 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetDCInfoCtr
*r
)
7250 level
= ndr_pull_get_switch_value(ndr
, r
);
7251 if (ndr_flags
& NDR_SCALARS
) {
7252 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
7253 if (_level
!= level
) {
7254 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
7257 case DRSUAPI_DC_INFO_CTR_1
: {
7258 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
7261 case DRSUAPI_DC_INFO_CTR_2
: {
7262 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
7265 case DRSUAPI_DC_INFO_CTR_3
: {
7266 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr3(ndr
, NDR_SCALARS
, &r
->ctr3
));
7269 case DRSUAPI_DC_CONNECTION_CTR_01
: {
7270 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnectionCtr01(ndr
, NDR_SCALARS
, &r
->ctr01
));
7274 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7277 if (ndr_flags
& NDR_BUFFERS
) {
7279 case DRSUAPI_DC_INFO_CTR_1
:
7280 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
7283 case DRSUAPI_DC_INFO_CTR_2
:
7284 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
7287 case DRSUAPI_DC_INFO_CTR_3
:
7288 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr3(ndr
, NDR_BUFFERS
, &r
->ctr3
));
7291 case DRSUAPI_DC_CONNECTION_CTR_01
:
7292 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnectionCtr01(ndr
, NDR_BUFFERS
, &r
->ctr01
));
7296 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7299 return NDR_ERR_SUCCESS
;
7302 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetDCInfoCtr
*r
)
7305 level
= ndr_print_get_switch_value(ndr
, r
);
7306 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetDCInfoCtr");
7308 case DRSUAPI_DC_INFO_CTR_1
:
7309 ndr_print_drsuapi_DsGetDCInfoCtr1(ndr
, "ctr1", &r
->ctr1
);
7312 case DRSUAPI_DC_INFO_CTR_2
:
7313 ndr_print_drsuapi_DsGetDCInfoCtr2(ndr
, "ctr2", &r
->ctr2
);
7316 case DRSUAPI_DC_INFO_CTR_3
:
7317 ndr_print_drsuapi_DsGetDCInfoCtr3(ndr
, "ctr3", &r
->ctr3
);
7320 case DRSUAPI_DC_CONNECTION_CTR_01
:
7321 ndr_print_drsuapi_DsGetDCConnectionCtr01(ndr
, "ctr01", &r
->ctr01
);
7325 ndr_print_bad_level(ndr
, name
, level
);
7329 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectListItem(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectListItem
*r
)
7331 if (ndr_flags
& NDR_SCALARS
) {
7332 NDR_CHECK(ndr_push_align(ndr
, 4));
7333 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->next_object
));
7334 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr
, NDR_SCALARS
, &r
->object
));
7336 if (ndr_flags
& NDR_BUFFERS
) {
7337 if (r
->next_object
) {
7338 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next_object
));
7340 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr
, NDR_BUFFERS
, &r
->object
));
7342 return NDR_ERR_SUCCESS
;
7345 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectListItem(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectListItem
*r
)
7347 uint32_t _ptr_next_object
;
7348 TALLOC_CTX
*_mem_save_next_object_0
;
7349 if (ndr_flags
& NDR_SCALARS
) {
7350 NDR_CHECK(ndr_pull_align(ndr
, 4));
7351 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_next_object
));
7352 if (_ptr_next_object
) {
7353 NDR_PULL_ALLOC(ndr
, r
->next_object
);
7355 r
->next_object
= NULL
;
7357 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr
, NDR_SCALARS
, &r
->object
));
7359 if (ndr_flags
& NDR_BUFFERS
) {
7360 if (r
->next_object
) {
7361 _mem_save_next_object_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7362 NDR_PULL_SET_MEM_CTX(ndr
, r
->next_object
, 0);
7363 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next_object
));
7364 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_next_object_0
, 0);
7366 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr
, NDR_BUFFERS
, &r
->object
));
7368 return NDR_ERR_SUCCESS
;
7371 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryRequest2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryRequest2
*r
)
7373 if (ndr_flags
& NDR_SCALARS
) {
7374 NDR_CHECK(ndr_push_align(ndr
, 4));
7375 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr
, NDR_SCALARS
, &r
->first_object
));
7377 if (ndr_flags
& NDR_BUFFERS
) {
7378 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr
, NDR_BUFFERS
, &r
->first_object
));
7380 return NDR_ERR_SUCCESS
;
7383 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryRequest2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryRequest2
*r
)
7385 if (ndr_flags
& NDR_SCALARS
) {
7386 NDR_CHECK(ndr_pull_align(ndr
, 4));
7387 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr
, NDR_SCALARS
, &r
->first_object
));
7389 if (ndr_flags
& NDR_BUFFERS
) {
7390 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr
, NDR_BUFFERS
, &r
->first_object
));
7392 return NDR_ERR_SUCCESS
;
7395 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryRequest2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryRequest2
*r
)
7397 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryRequest2");
7399 ndr_print_drsuapi_DsReplicaObjectListItem(ndr
, "first_object", &r
->first_object
);
7403 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsAddEntryRequest
*r
)
7405 if (ndr_flags
& NDR_SCALARS
) {
7406 int level
= ndr_push_get_switch_value(ndr
, r
);
7407 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
7410 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest2(ndr
, NDR_SCALARS
, &r
->req2
));
7414 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7417 if (ndr_flags
& NDR_BUFFERS
) {
7418 int level
= ndr_push_get_switch_value(ndr
, r
);
7421 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest2(ndr
, NDR_BUFFERS
, &r
->req2
));
7425 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7428 return NDR_ERR_SUCCESS
;
7431 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsAddEntryRequest
*r
)
7435 level
= ndr_pull_get_switch_value(ndr
, r
);
7436 if (ndr_flags
& NDR_SCALARS
) {
7437 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
7438 if (_level
!= level
) {
7439 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
7443 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest2(ndr
, NDR_SCALARS
, &r
->req2
));
7447 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7450 if (ndr_flags
& NDR_BUFFERS
) {
7453 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest2(ndr
, NDR_BUFFERS
, &r
->req2
));
7457 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7460 return NDR_ERR_SUCCESS
;
7463 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsAddEntryRequest
*r
)
7466 level
= ndr_print_get_switch_value(ndr
, r
);
7467 ndr_print_union(ndr
, name
, level
, "drsuapi_DsAddEntryRequest");
7470 ndr_print_drsuapi_DsAddEntryRequest2(ndr
, "req2", &r
->req2
);
7474 ndr_print_bad_level(ndr
, name
, level
);
7478 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryErrorInfoX(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryErrorInfoX
*r
)
7480 if (ndr_flags
& NDR_SCALARS
) {
7481 NDR_CHECK(ndr_push_align(ndr
, 4));
7482 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
7483 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->status
));
7484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
7485 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->unknown3
));
7487 if (ndr_flags
& NDR_BUFFERS
) {
7489 return NDR_ERR_SUCCESS
;
7492 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryErrorInfoX(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryErrorInfoX
*r
)
7494 if (ndr_flags
& NDR_SCALARS
) {
7495 NDR_CHECK(ndr_pull_align(ndr
, 4));
7496 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
7497 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->status
));
7498 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
7499 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown3
));
7501 if (ndr_flags
& NDR_BUFFERS
) {
7503 return NDR_ERR_SUCCESS
;
7506 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryErrorInfoX(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryErrorInfoX
*r
)
7508 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryErrorInfoX");
7510 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
7511 ndr_print_WERROR(ndr
, "status", r
->status
);
7512 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
7513 ndr_print_uint16(ndr
, "unknown3", r
->unknown3
);
7517 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryExtraErrorBuffer(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryExtraErrorBuffer
*r
)
7519 if (ndr_flags
& NDR_SCALARS
) {
7520 NDR_CHECK(ndr_push_align(ndr
, 4));
7521 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
7522 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
7524 if (ndr_flags
& NDR_BUFFERS
) {
7526 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
7527 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->size
));
7530 return NDR_ERR_SUCCESS
;
7533 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryExtraErrorBuffer(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryExtraErrorBuffer
*r
)
7536 TALLOC_CTX
*_mem_save_data_0
;
7537 if (ndr_flags
& NDR_SCALARS
) {
7538 NDR_CHECK(ndr_pull_align(ndr
, 4));
7539 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
7540 if (r
->size
> 10485760) {
7541 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
7543 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
7545 NDR_PULL_ALLOC(ndr
, r
->data
);
7550 if (ndr_flags
& NDR_BUFFERS
) {
7552 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7553 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
7554 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
7555 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
7556 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
7557 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
7560 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
7563 return NDR_ERR_SUCCESS
;
7566 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryExtraErrorBuffer(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryExtraErrorBuffer
*r
)
7568 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryExtraErrorBuffer");
7570 ndr_print_uint32(ndr
, "size", r
->size
);
7571 ndr_print_ptr(ndr
, "data", r
->data
);
7574 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->size
);
7580 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryExtraError1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryExtraError1
*r
)
7582 if (ndr_flags
& NDR_SCALARS
) {
7583 NDR_CHECK(ndr_push_align(ndr
, 4));
7584 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->error
));
7585 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, r
->attid
));
7586 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
7587 NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraErrorBuffer(ndr
, NDR_SCALARS
, &r
->buffer
));
7589 if (ndr_flags
& NDR_BUFFERS
) {
7590 NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraErrorBuffer(ndr
, NDR_BUFFERS
, &r
->buffer
));
7592 return NDR_ERR_SUCCESS
;
7595 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryExtraError1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryExtraError1
*r
)
7597 if (ndr_flags
& NDR_SCALARS
) {
7598 NDR_CHECK(ndr_pull_align(ndr
, 4));
7599 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->error
));
7600 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, &r
->attid
));
7601 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
7602 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraErrorBuffer(ndr
, NDR_SCALARS
, &r
->buffer
));
7604 if (ndr_flags
& NDR_BUFFERS
) {
7605 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraErrorBuffer(ndr
, NDR_BUFFERS
, &r
->buffer
));
7607 return NDR_ERR_SUCCESS
;
7610 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryExtraError1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryExtraError1
*r
)
7612 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryExtraError1");
7614 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "error", &r
->error
);
7615 ndr_print_drsuapi_DsAttributeId(ndr
, "attid", r
->attid
);
7616 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
7617 ndr_print_drsuapi_DsAddEntryExtraErrorBuffer(ndr
, "buffer", &r
->buffer
);
7621 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryErrorListItem1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryErrorListItem1
*r
)
7623 if (ndr_flags
& NDR_SCALARS
) {
7624 NDR_CHECK(ndr_push_align(ndr
, 4));
7625 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->next
));
7626 NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraError1(ndr
, NDR_SCALARS
, &r
->error
));
7628 if (ndr_flags
& NDR_BUFFERS
) {
7630 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next
));
7632 NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraError1(ndr
, NDR_BUFFERS
, &r
->error
));
7634 return NDR_ERR_SUCCESS
;
7637 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryErrorListItem1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryErrorListItem1
*r
)
7640 TALLOC_CTX
*_mem_save_next_0
;
7641 if (ndr_flags
& NDR_SCALARS
) {
7642 NDR_CHECK(ndr_pull_align(ndr
, 4));
7643 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_next
));
7645 NDR_PULL_ALLOC(ndr
, r
->next
);
7649 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraError1(ndr
, NDR_SCALARS
, &r
->error
));
7651 if (ndr_flags
& NDR_BUFFERS
) {
7653 _mem_save_next_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7654 NDR_PULL_SET_MEM_CTX(ndr
, r
->next
, 0);
7655 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next
));
7656 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_next_0
, 0);
7658 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraError1(ndr
, NDR_BUFFERS
, &r
->error
));
7660 return NDR_ERR_SUCCESS
;
7663 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryErrorListItem1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryErrorListItem1
*r
)
7665 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryErrorListItem1");
7667 ndr_print_ptr(ndr
, "next", r
->next
);
7670 ndr_print_drsuapi_DsAddEntryErrorListItem1(ndr
, "next", r
->next
);
7673 ndr_print_drsuapi_DsAddEntryExtraError1(ndr
, "error", &r
->error
);
7677 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryErrorInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryErrorInfo1
*r
)
7679 if (ndr_flags
& NDR_SCALARS
) {
7680 NDR_CHECK(ndr_push_align(ndr
, 4));
7681 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->id
));
7682 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->status
));
7683 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_SCALARS
, &r
->first
));
7685 if (ndr_flags
& NDR_BUFFERS
) {
7687 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
7689 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_BUFFERS
, &r
->first
));
7691 return NDR_ERR_SUCCESS
;
7694 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryErrorInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryErrorInfo1
*r
)
7697 TALLOC_CTX
*_mem_save_id_0
;
7698 if (ndr_flags
& NDR_SCALARS
) {
7699 NDR_CHECK(ndr_pull_align(ndr
, 4));
7700 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_id
));
7702 NDR_PULL_ALLOC(ndr
, r
->id
);
7706 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->status
));
7707 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_SCALARS
, &r
->first
));
7709 if (ndr_flags
& NDR_BUFFERS
) {
7711 _mem_save_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7712 NDR_PULL_SET_MEM_CTX(ndr
, r
->id
, 0);
7713 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
7714 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_id_0
, 0);
7716 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_BUFFERS
, &r
->first
));
7718 return NDR_ERR_SUCCESS
;
7721 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryErrorInfo1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryErrorInfo1
*r
)
7723 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryErrorInfo1");
7725 ndr_print_ptr(ndr
, "id", r
->id
);
7728 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "id", r
->id
);
7731 ndr_print_WERROR(ndr
, "status", r
->status
);
7732 ndr_print_drsuapi_DsAddEntryErrorListItem1(ndr
, "first", &r
->first
);
7736 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryErrorInfo(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsAddEntryErrorInfo
*r
)
7738 if (ndr_flags
& NDR_SCALARS
) {
7739 int level
= ndr_push_get_switch_value(ndr
, r
);
7740 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
7743 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo1(ndr
, NDR_SCALARS
, &r
->error1
));
7747 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
7751 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
7755 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
7759 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
7763 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7766 if (ndr_flags
& NDR_BUFFERS
) {
7767 int level
= ndr_push_get_switch_value(ndr
, r
);
7770 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo1(ndr
, NDR_BUFFERS
, &r
->error1
));
7786 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7789 return NDR_ERR_SUCCESS
;
7792 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryErrorInfo(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsAddEntryErrorInfo
*r
)
7796 level
= ndr_pull_get_switch_value(ndr
, r
);
7797 if (ndr_flags
& NDR_SCALARS
) {
7798 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
7799 if (_level
!= level
) {
7800 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
7804 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo1(ndr
, NDR_SCALARS
, &r
->error1
));
7808 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
7812 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
7816 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
7820 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
7824 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7827 if (ndr_flags
& NDR_BUFFERS
) {
7830 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo1(ndr
, NDR_BUFFERS
, &r
->error1
));
7846 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7849 return NDR_ERR_SUCCESS
;
7852 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryErrorInfo(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsAddEntryErrorInfo
*r
)
7855 level
= ndr_print_get_switch_value(ndr
, r
);
7856 ndr_print_union(ndr
, name
, level
, "drsuapi_DsAddEntryErrorInfo");
7859 ndr_print_drsuapi_DsAddEntryErrorInfo1(ndr
, "error1", &r
->error1
);
7863 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "errorX", &r
->errorX
);
7867 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "errorX", &r
->errorX
);
7871 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "errorX", &r
->errorX
);
7875 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "errorX", &r
->errorX
);
7879 ndr_print_bad_level(ndr
, name
, level
);
7883 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryError1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryError1
*r
)
7885 if (ndr_flags
& NDR_SCALARS
) {
7886 NDR_CHECK(ndr_push_align(ndr
, 4));
7887 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->status
));
7888 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
7889 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info
));
7891 if (ndr_flags
& NDR_BUFFERS
) {
7893 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->info
, r
->level
));
7894 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info
));
7897 return NDR_ERR_SUCCESS
;
7900 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryError1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryError1
*r
)
7903 TALLOC_CTX
*_mem_save_info_0
;
7904 if (ndr_flags
& NDR_SCALARS
) {
7905 NDR_CHECK(ndr_pull_align(ndr
, 4));
7906 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->status
));
7907 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
7908 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
7910 NDR_PULL_ALLOC(ndr
, r
->info
);
7915 if (ndr_flags
& NDR_BUFFERS
) {
7917 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7918 NDR_PULL_SET_MEM_CTX(ndr
, r
->info
, 0);
7919 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->info
, r
->level
));
7920 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info
));
7921 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
7924 return NDR_ERR_SUCCESS
;
7927 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryError1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryError1
*r
)
7929 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryError1");
7931 ndr_print_WERROR(ndr
, "status", r
->status
);
7932 ndr_print_uint32(ndr
, "level", r
->level
);
7933 ndr_print_ptr(ndr
, "info", r
->info
);
7936 ndr_print_set_switch_value(ndr
, r
->info
, r
->level
);
7937 ndr_print_drsuapi_DsAddEntryErrorInfo(ndr
, "info", r
->info
);
7943 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryError(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsAddEntryError
*r
)
7945 if (ndr_flags
& NDR_SCALARS
) {
7946 int level
= ndr_push_get_switch_value(ndr
, r
);
7947 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
7950 NDR_CHECK(ndr_push_drsuapi_DsAddEntryError1(ndr
, NDR_SCALARS
, &r
->info1
));
7954 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7957 if (ndr_flags
& NDR_BUFFERS
) {
7958 int level
= ndr_push_get_switch_value(ndr
, r
);
7961 NDR_CHECK(ndr_push_drsuapi_DsAddEntryError1(ndr
, NDR_BUFFERS
, &r
->info1
));
7965 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7968 return NDR_ERR_SUCCESS
;
7971 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryError(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsAddEntryError
*r
)
7975 level
= ndr_pull_get_switch_value(ndr
, r
);
7976 if (ndr_flags
& NDR_SCALARS
) {
7977 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
7978 if (_level
!= level
) {
7979 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
7983 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryError1(ndr
, NDR_SCALARS
, &r
->info1
));
7987 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7990 if (ndr_flags
& NDR_BUFFERS
) {
7993 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryError1(ndr
, NDR_BUFFERS
, &r
->info1
));
7997 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
8000 return NDR_ERR_SUCCESS
;
8003 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryError(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsAddEntryError
*r
)
8006 level
= ndr_print_get_switch_value(ndr
, r
);
8007 ndr_print_union(ndr
, name
, level
, "drsuapi_DsAddEntryError");
8010 ndr_print_drsuapi_DsAddEntryError1(ndr
, "info1", &r
->info1
);
8014 ndr_print_bad_level(ndr
, name
, level
);
8018 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectIdentifier2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectIdentifier2
*r
)
8020 if (ndr_flags
& NDR_SCALARS
) {
8021 NDR_CHECK(ndr_push_align(ndr
, 4));
8022 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
8023 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
8025 if (ndr_flags
& NDR_BUFFERS
) {
8026 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
8028 return NDR_ERR_SUCCESS
;
8031 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectIdentifier2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectIdentifier2
*r
)
8033 if (ndr_flags
& NDR_SCALARS
) {
8034 NDR_CHECK(ndr_pull_align(ndr
, 4));
8035 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
8036 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
8038 if (ndr_flags
& NDR_BUFFERS
) {
8039 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
8041 return NDR_ERR_SUCCESS
;
8044 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjectIdentifier2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjectIdentifier2
*r
)
8046 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjectIdentifier2");
8048 ndr_print_GUID(ndr
, "guid", &r
->guid
);
8049 ndr_print_dom_sid28(ndr
, "sid", &r
->sid
);
8053 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryCtr2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryCtr2
*r
)
8055 uint32_t cntr_objects_1
;
8056 if (ndr_flags
& NDR_SCALARS
) {
8057 NDR_CHECK(ndr_push_align(ndr
, 4));
8058 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->id
));
8059 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
8060 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->error
));
8061 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
8062 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->objects
));
8064 if (ndr_flags
& NDR_BUFFERS
) {
8066 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
8069 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
8070 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
8071 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_SCALARS
, &r
->objects
[cntr_objects_1
]));
8073 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
8074 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_BUFFERS
, &r
->objects
[cntr_objects_1
]));
8078 return NDR_ERR_SUCCESS
;
8081 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryCtr2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryCtr2
*r
)
8084 TALLOC_CTX
*_mem_save_id_0
;
8085 uint32_t _ptr_objects
;
8086 uint32_t cntr_objects_1
;
8087 TALLOC_CTX
*_mem_save_objects_0
;
8088 TALLOC_CTX
*_mem_save_objects_1
;
8089 if (ndr_flags
& NDR_SCALARS
) {
8090 NDR_CHECK(ndr_pull_align(ndr
, 4));
8091 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_id
));
8093 NDR_PULL_ALLOC(ndr
, r
->id
);
8097 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
8098 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->error
));
8099 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
8100 if (r
->count
> 10000) {
8101 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
8103 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_objects
));
8105 NDR_PULL_ALLOC(ndr
, r
->objects
);
8110 if (ndr_flags
& NDR_BUFFERS
) {
8112 _mem_save_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8113 NDR_PULL_SET_MEM_CTX(ndr
, r
->id
, 0);
8114 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
8115 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_id_0
, 0);
8118 _mem_save_objects_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8119 NDR_PULL_SET_MEM_CTX(ndr
, r
->objects
, 0);
8120 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->objects
));
8121 NDR_PULL_ALLOC_N(ndr
, r
->objects
, ndr_get_array_size(ndr
, &r
->objects
));
8122 _mem_save_objects_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8123 NDR_PULL_SET_MEM_CTX(ndr
, r
->objects
, 0);
8124 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
8125 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_SCALARS
, &r
->objects
[cntr_objects_1
]));
8127 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
8128 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_BUFFERS
, &r
->objects
[cntr_objects_1
]));
8130 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objects_1
, 0);
8131 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objects_0
, 0);
8134 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->objects
, r
->count
));
8137 return NDR_ERR_SUCCESS
;
8140 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryCtr2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryCtr2
*r
)
8142 uint32_t cntr_objects_1
;
8143 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryCtr2");
8145 ndr_print_ptr(ndr
, "id", r
->id
);
8148 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "id", r
->id
);
8151 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
8152 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "error", &r
->error
);
8153 ndr_print_uint32(ndr
, "count", r
->count
);
8154 ndr_print_ptr(ndr
, "objects", r
->objects
);
8157 ndr
->print(ndr
, "%s: ARRAY(%d)", "objects", (int)r
->count
);
8159 for (cntr_objects_1
=0;cntr_objects_1
<r
->count
;cntr_objects_1
++) {
8161 if (asprintf(&idx_1
, "[%d]", cntr_objects_1
) != -1) {
8162 ndr_print_drsuapi_DsReplicaObjectIdentifier2(ndr
, "objects", &r
->objects
[cntr_objects_1
]);
8172 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryCtr3(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryCtr3
*r
)
8174 uint32_t cntr_objects_1
;
8175 if (ndr_flags
& NDR_SCALARS
) {
8176 NDR_CHECK(ndr_push_align(ndr
, 4));
8177 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->id
));
8178 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
8179 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->error
));
8180 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
8181 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->objects
));
8183 if (ndr_flags
& NDR_BUFFERS
) {
8185 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
8188 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->error
, r
->level
));
8189 NDR_CHECK(ndr_push_drsuapi_DsAddEntryError(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->error
));
8192 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
8193 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
8194 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_SCALARS
, &r
->objects
[cntr_objects_1
]));
8196 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
8197 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_BUFFERS
, &r
->objects
[cntr_objects_1
]));
8201 return NDR_ERR_SUCCESS
;
8204 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryCtr3(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryCtr3
*r
)
8207 TALLOC_CTX
*_mem_save_id_0
;
8208 uint32_t _ptr_error
;
8209 TALLOC_CTX
*_mem_save_error_0
;
8210 uint32_t _ptr_objects
;
8211 uint32_t cntr_objects_1
;
8212 TALLOC_CTX
*_mem_save_objects_0
;
8213 TALLOC_CTX
*_mem_save_objects_1
;
8214 if (ndr_flags
& NDR_SCALARS
) {
8215 NDR_CHECK(ndr_pull_align(ndr
, 4));
8216 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_id
));
8218 NDR_PULL_ALLOC(ndr
, r
->id
);
8222 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
8223 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_error
));
8225 NDR_PULL_ALLOC(ndr
, r
->error
);
8229 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
8230 if (r
->count
> 10000) {
8231 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
8233 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_objects
));
8235 NDR_PULL_ALLOC(ndr
, r
->objects
);
8240 if (ndr_flags
& NDR_BUFFERS
) {
8242 _mem_save_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8243 NDR_PULL_SET_MEM_CTX(ndr
, r
->id
, 0);
8244 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
8245 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_id_0
, 0);
8248 _mem_save_error_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8249 NDR_PULL_SET_MEM_CTX(ndr
, r
->error
, 0);
8250 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->error
, r
->level
));
8251 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryError(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->error
));
8252 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_error_0
, 0);
8255 _mem_save_objects_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8256 NDR_PULL_SET_MEM_CTX(ndr
, r
->objects
, 0);
8257 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->objects
));
8258 NDR_PULL_ALLOC_N(ndr
, r
->objects
, ndr_get_array_size(ndr
, &r
->objects
));
8259 _mem_save_objects_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8260 NDR_PULL_SET_MEM_CTX(ndr
, r
->objects
, 0);
8261 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
8262 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_SCALARS
, &r
->objects
[cntr_objects_1
]));
8264 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
8265 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_BUFFERS
, &r
->objects
[cntr_objects_1
]));
8267 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objects_1
, 0);
8268 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objects_0
, 0);
8271 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->objects
, r
->count
));
8274 return NDR_ERR_SUCCESS
;
8277 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryCtr3(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryCtr3
*r
)
8279 uint32_t cntr_objects_1
;
8280 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryCtr3");
8282 ndr_print_ptr(ndr
, "id", r
->id
);
8285 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "id", r
->id
);
8288 ndr_print_uint32(ndr
, "level", r
->level
);
8289 ndr_print_ptr(ndr
, "error", r
->error
);
8292 ndr_print_set_switch_value(ndr
, r
->error
, r
->level
);
8293 ndr_print_drsuapi_DsAddEntryError(ndr
, "error", r
->error
);
8296 ndr_print_uint32(ndr
, "count", r
->count
);
8297 ndr_print_ptr(ndr
, "objects", r
->objects
);
8300 ndr
->print(ndr
, "%s: ARRAY(%d)", "objects", (int)r
->count
);
8302 for (cntr_objects_1
=0;cntr_objects_1
<r
->count
;cntr_objects_1
++) {
8304 if (asprintf(&idx_1
, "[%d]", cntr_objects_1
) != -1) {
8305 ndr_print_drsuapi_DsReplicaObjectIdentifier2(ndr
, "objects", &r
->objects
[cntr_objects_1
]);
8315 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsAddEntryCtr
*r
)
8317 if (ndr_flags
& NDR_SCALARS
) {
8318 int level
= ndr_push_get_switch_value(ndr
, r
);
8319 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
8322 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
8326 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr3(ndr
, NDR_SCALARS
, &r
->ctr3
));
8330 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
8333 if (ndr_flags
& NDR_BUFFERS
) {
8334 int level
= ndr_push_get_switch_value(ndr
, r
);
8337 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
8341 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr3(ndr
, NDR_BUFFERS
, &r
->ctr3
));
8345 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
8348 return NDR_ERR_SUCCESS
;
8351 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsAddEntryCtr
*r
)
8355 level
= ndr_pull_get_switch_value(ndr
, r
);
8356 if (ndr_flags
& NDR_SCALARS
) {
8357 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
8358 if (_level
!= level
) {
8359 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
8363 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
8367 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr3(ndr
, NDR_SCALARS
, &r
->ctr3
));
8371 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
8374 if (ndr_flags
& NDR_BUFFERS
) {
8377 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
8381 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr3(ndr
, NDR_BUFFERS
, &r
->ctr3
));
8385 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
8388 return NDR_ERR_SUCCESS
;
8391 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsAddEntryCtr
*r
)
8394 level
= ndr_print_get_switch_value(ndr
, r
);
8395 ndr_print_union(ndr
, name
, level
, "drsuapi_DsAddEntryCtr");
8398 ndr_print_drsuapi_DsAddEntryCtr2(ndr
, "ctr2", &r
->ctr2
);
8402 ndr_print_drsuapi_DsAddEntryCtr3(ndr
, "ctr3", &r
->ctr3
);
8406 ndr_print_bad_level(ndr
, name
, level
);
8410 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaGetInfoLevel(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaGetInfoLevel r
)
8412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
8413 return NDR_ERR_SUCCESS
;
8416 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaGetInfoLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaGetInfoLevel
*r
)
8419 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
8421 return NDR_ERR_SUCCESS
;
8424 _PUBLIC_
void ndr_print_drsuapi_DsReplicaGetInfoLevel(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsReplicaGetInfoLevel r
)
8426 const char *val
= NULL
;
8429 case DRSUAPI_DS_REPLICA_GET_INFO
: val
= "DRSUAPI_DS_REPLICA_GET_INFO"; break;
8430 case DRSUAPI_DS_REPLICA_GET_INFO2
: val
= "DRSUAPI_DS_REPLICA_GET_INFO2"; break;
8432 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
8435 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaInfoType(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaInfoType r
)
8437 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
8438 return NDR_ERR_SUCCESS
;
8441 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaInfoType(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaInfoType
*r
)
8444 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
8446 return NDR_ERR_SUCCESS
;
8449 _PUBLIC_
void ndr_print_drsuapi_DsReplicaInfoType(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsReplicaInfoType r
)
8451 const char *val
= NULL
;
8454 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
: val
= "DRSUAPI_DS_REPLICA_INFO_NEIGHBORS"; break;
8455 case DRSUAPI_DS_REPLICA_INFO_CURSORS
: val
= "DRSUAPI_DS_REPLICA_INFO_CURSORS"; break;
8456 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
: val
= "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA"; break;
8457 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
: val
= "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES"; break;
8458 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
: val
= "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES"; break;
8459 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
: val
= "DRSUAPI_DS_REPLICA_INFO_PENDING_OPS"; break;
8460 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
: val
= "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA"; break;
8461 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
: val
= "DRSUAPI_DS_REPLICA_INFO_CURSORS2"; break;
8462 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
: val
= "DRSUAPI_DS_REPLICA_INFO_CURSORS3"; break;
8463 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
: val
= "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2"; break;
8464 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
: val
= "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2"; break;
8465 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
: val
= "DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02"; break;
8466 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
: val
= "DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04"; break;
8467 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
: val
= "DRSUAPI_DS_REPLICA_INFO_CURSORS05"; break;
8468 case DRSUAPI_DS_REPLICA_INFO_06
: val
= "DRSUAPI_DS_REPLICA_INFO_06"; break;
8470 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
8473 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaGetInfoRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaGetInfoRequest1
*r
)
8475 if (ndr_flags
& NDR_SCALARS
) {
8476 NDR_CHECK(ndr_push_align(ndr
, 4));
8477 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, r
->info_type
));
8478 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_dn
));
8479 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid1
));
8481 if (ndr_flags
& NDR_BUFFERS
) {
8483 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
8484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8485 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
8486 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_dn
, ndr_charset_length(r
->object_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8489 return NDR_ERR_SUCCESS
;
8492 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaGetInfoRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaGetInfoRequest1
*r
)
8494 uint32_t _ptr_object_dn
;
8495 TALLOC_CTX
*_mem_save_object_dn_0
;
8496 if (ndr_flags
& NDR_SCALARS
) {
8497 NDR_CHECK(ndr_pull_align(ndr
, 4));
8498 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, &r
->info_type
));
8499 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_dn
));
8500 if (_ptr_object_dn
) {
8501 NDR_PULL_ALLOC(ndr
, r
->object_dn
);
8503 r
->object_dn
= NULL
;
8505 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid1
));
8507 if (ndr_flags
& NDR_BUFFERS
) {
8509 _mem_save_object_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8510 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_dn
, 0);
8511 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_dn
));
8512 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_dn
));
8513 if (ndr_get_array_length(ndr
, &r
->object_dn
) > ndr_get_array_size(ndr
, &r
->object_dn
)) {
8514 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->object_dn
), ndr_get_array_length(ndr
, &r
->object_dn
));
8516 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t)));
8517 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_dn
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t), CH_UTF16
));
8518 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_dn_0
, 0);
8521 return NDR_ERR_SUCCESS
;
8524 _PUBLIC_
void ndr_print_drsuapi_DsReplicaGetInfoRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaGetInfoRequest1
*r
)
8526 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaGetInfoRequest1");
8528 ndr_print_drsuapi_DsReplicaInfoType(ndr
, "info_type", r
->info_type
);
8529 ndr_print_ptr(ndr
, "object_dn", r
->object_dn
);
8532 ndr_print_string(ndr
, "object_dn", r
->object_dn
);
8535 ndr_print_GUID(ndr
, "guid1", &r
->guid1
);
8539 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaGetInfoRequest2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaGetInfoRequest2
*r
)
8541 if (ndr_flags
& NDR_SCALARS
) {
8542 NDR_CHECK(ndr_push_align(ndr
, 4));
8543 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, r
->info_type
));
8544 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_dn
));
8545 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid1
));
8546 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
8547 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string1
));
8548 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string2
));
8549 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
8551 if (ndr_flags
& NDR_BUFFERS
) {
8553 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
8554 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8555 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
8556 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_dn
, ndr_charset_length(r
->object_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8559 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->string1
, CH_UTF16
)));
8560 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8561 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->string1
, CH_UTF16
)));
8562 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string1
, ndr_charset_length(r
->string1
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8565 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->string2
, CH_UTF16
)));
8566 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8567 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->string2
, CH_UTF16
)));
8568 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string2
, ndr_charset_length(r
->string2
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8571 return NDR_ERR_SUCCESS
;
8574 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaGetInfoRequest2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaGetInfoRequest2
*r
)
8576 uint32_t _ptr_object_dn
;
8577 TALLOC_CTX
*_mem_save_object_dn_0
;
8578 uint32_t _ptr_string1
;
8579 TALLOC_CTX
*_mem_save_string1_0
;
8580 uint32_t _ptr_string2
;
8581 TALLOC_CTX
*_mem_save_string2_0
;
8582 if (ndr_flags
& NDR_SCALARS
) {
8583 NDR_CHECK(ndr_pull_align(ndr
, 4));
8584 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, &r
->info_type
));
8585 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_dn
));
8586 if (_ptr_object_dn
) {
8587 NDR_PULL_ALLOC(ndr
, r
->object_dn
);
8589 r
->object_dn
= NULL
;
8591 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid1
));
8592 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
8593 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string1
));
8595 NDR_PULL_ALLOC(ndr
, r
->string1
);
8599 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string2
));
8601 NDR_PULL_ALLOC(ndr
, r
->string2
);
8605 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
8607 if (ndr_flags
& NDR_BUFFERS
) {
8609 _mem_save_object_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8610 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_dn
, 0);
8611 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_dn
));
8612 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_dn
));
8613 if (ndr_get_array_length(ndr
, &r
->object_dn
) > ndr_get_array_size(ndr
, &r
->object_dn
)) {
8614 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->object_dn
), ndr_get_array_length(ndr
, &r
->object_dn
));
8616 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t)));
8617 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_dn
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t), CH_UTF16
));
8618 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_dn_0
, 0);
8621 _mem_save_string1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8622 NDR_PULL_SET_MEM_CTX(ndr
, r
->string1
, 0);
8623 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string1
));
8624 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string1
));
8625 if (ndr_get_array_length(ndr
, &r
->string1
) > ndr_get_array_size(ndr
, &r
->string1
)) {
8626 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->string1
), ndr_get_array_length(ndr
, &r
->string1
));
8628 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->string1
), sizeof(uint16_t)));
8629 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string1
, ndr_get_array_length(ndr
, &r
->string1
), sizeof(uint16_t), CH_UTF16
));
8630 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string1_0
, 0);
8633 _mem_save_string2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8634 NDR_PULL_SET_MEM_CTX(ndr
, r
->string2
, 0);
8635 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string2
));
8636 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string2
));
8637 if (ndr_get_array_length(ndr
, &r
->string2
) > ndr_get_array_size(ndr
, &r
->string2
)) {
8638 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->string2
), ndr_get_array_length(ndr
, &r
->string2
));
8640 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->string2
), sizeof(uint16_t)));
8641 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string2
, ndr_get_array_length(ndr
, &r
->string2
), sizeof(uint16_t), CH_UTF16
));
8642 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string2_0
, 0);
8645 return NDR_ERR_SUCCESS
;
8648 _PUBLIC_
void ndr_print_drsuapi_DsReplicaGetInfoRequest2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaGetInfoRequest2
*r
)
8650 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaGetInfoRequest2");
8652 ndr_print_drsuapi_DsReplicaInfoType(ndr
, "info_type", r
->info_type
);
8653 ndr_print_ptr(ndr
, "object_dn", r
->object_dn
);
8656 ndr_print_string(ndr
, "object_dn", r
->object_dn
);
8659 ndr_print_GUID(ndr
, "guid1", &r
->guid1
);
8660 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
8661 ndr_print_ptr(ndr
, "string1", r
->string1
);
8664 ndr_print_string(ndr
, "string1", r
->string1
);
8667 ndr_print_ptr(ndr
, "string2", r
->string2
);
8670 ndr_print_string(ndr
, "string2", r
->string2
);
8673 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
8677 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaGetInfoRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaGetInfoRequest
*r
)
8679 if (ndr_flags
& NDR_SCALARS
) {
8680 int level
= ndr_push_get_switch_value(ndr
, r
);
8681 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoLevel(ndr
, NDR_SCALARS
, level
));
8683 case DRSUAPI_DS_REPLICA_GET_INFO
: {
8684 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
8687 case DRSUAPI_DS_REPLICA_GET_INFO2
: {
8688 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest2(ndr
, NDR_SCALARS
, &r
->req2
));
8692 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
8695 if (ndr_flags
& NDR_BUFFERS
) {
8696 int level
= ndr_push_get_switch_value(ndr
, r
);
8698 case DRSUAPI_DS_REPLICA_GET_INFO
:
8699 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
8702 case DRSUAPI_DS_REPLICA_GET_INFO2
:
8703 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest2(ndr
, NDR_BUFFERS
, &r
->req2
));
8707 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
8710 return NDR_ERR_SUCCESS
;
8713 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaGetInfoRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaGetInfoRequest
*r
)
8717 level
= ndr_pull_get_switch_value(ndr
, r
);
8718 if (ndr_flags
& NDR_SCALARS
) {
8719 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
8720 if (_level
!= level
) {
8721 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
8724 case DRSUAPI_DS_REPLICA_GET_INFO
: {
8725 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
8728 case DRSUAPI_DS_REPLICA_GET_INFO2
: {
8729 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest2(ndr
, NDR_SCALARS
, &r
->req2
));
8733 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
8736 if (ndr_flags
& NDR_BUFFERS
) {
8738 case DRSUAPI_DS_REPLICA_GET_INFO
:
8739 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
8742 case DRSUAPI_DS_REPLICA_GET_INFO2
:
8743 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest2(ndr
, NDR_BUFFERS
, &r
->req2
));
8747 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
8750 return NDR_ERR_SUCCESS
;
8753 _PUBLIC_
void ndr_print_drsuapi_DsReplicaGetInfoRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaGetInfoRequest
*r
)
8756 level
= ndr_print_get_switch_value(ndr
, r
);
8757 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaGetInfoRequest");
8759 case DRSUAPI_DS_REPLICA_GET_INFO
:
8760 ndr_print_drsuapi_DsReplicaGetInfoRequest1(ndr
, "req1", &r
->req1
);
8763 case DRSUAPI_DS_REPLICA_GET_INFO2
:
8764 ndr_print_drsuapi_DsReplicaGetInfoRequest2(ndr
, "req2", &r
->req2
);
8768 ndr_print_bad_level(ndr
, name
, level
);
8772 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaNeighbour(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaNeighbour
*r
)
8774 if (ndr_flags
& NDR_SCALARS
) {
8775 NDR_CHECK(ndr_push_align(ndr
, 8));
8776 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->naming_context_dn
));
8777 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dsa_obj_dn
));
8778 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dsa_address
));
8779 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->transport_obj_dn
));
8780 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, r
->replica_flags
));
8781 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
8782 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->naming_context_obj_guid
));
8783 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_obj_guid
));
8784 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
8785 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->transport_obj_guid
));
8786 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->tmp_highest_usn
));
8787 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->highest_usn
));
8788 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_success
));
8789 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_attempt
));
8790 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->result_last_attempt
));
8791 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->consecutive_sync_failures
));
8793 if (ndr_flags
& NDR_BUFFERS
) {
8794 if (r
->naming_context_dn
) {
8795 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->naming_context_dn
, CH_UTF16
)));
8796 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8797 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->naming_context_dn
, CH_UTF16
)));
8798 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->naming_context_dn
, ndr_charset_length(r
->naming_context_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8800 if (r
->source_dsa_obj_dn
) {
8801 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_obj_dn
, CH_UTF16
)));
8802 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8803 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_obj_dn
, CH_UTF16
)));
8804 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->source_dsa_obj_dn
, ndr_charset_length(r
->source_dsa_obj_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8806 if (r
->source_dsa_address
) {
8807 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
)));
8808 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8809 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
)));
8810 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->source_dsa_address
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8812 if (r
->transport_obj_dn
) {
8813 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->transport_obj_dn
, CH_UTF16
)));
8814 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8815 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->transport_obj_dn
, CH_UTF16
)));
8816 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->transport_obj_dn
, ndr_charset_length(r
->transport_obj_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8819 return NDR_ERR_SUCCESS
;
8822 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaNeighbour(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaNeighbour
*r
)
8824 uint32_t _ptr_naming_context_dn
;
8825 TALLOC_CTX
*_mem_save_naming_context_dn_0
;
8826 uint32_t _ptr_source_dsa_obj_dn
;
8827 TALLOC_CTX
*_mem_save_source_dsa_obj_dn_0
;
8828 uint32_t _ptr_source_dsa_address
;
8829 TALLOC_CTX
*_mem_save_source_dsa_address_0
;
8830 uint32_t _ptr_transport_obj_dn
;
8831 TALLOC_CTX
*_mem_save_transport_obj_dn_0
;
8832 if (ndr_flags
& NDR_SCALARS
) {
8833 NDR_CHECK(ndr_pull_align(ndr
, 8));
8834 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_naming_context_dn
));
8835 if (_ptr_naming_context_dn
) {
8836 NDR_PULL_ALLOC(ndr
, r
->naming_context_dn
);
8838 r
->naming_context_dn
= NULL
;
8840 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dsa_obj_dn
));
8841 if (_ptr_source_dsa_obj_dn
) {
8842 NDR_PULL_ALLOC(ndr
, r
->source_dsa_obj_dn
);
8844 r
->source_dsa_obj_dn
= NULL
;
8846 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dsa_address
));
8847 if (_ptr_source_dsa_address
) {
8848 NDR_PULL_ALLOC(ndr
, r
->source_dsa_address
);
8850 r
->source_dsa_address
= NULL
;
8852 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_transport_obj_dn
));
8853 if (_ptr_transport_obj_dn
) {
8854 NDR_PULL_ALLOC(ndr
, r
->transport_obj_dn
);
8856 r
->transport_obj_dn
= NULL
;
8858 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, &r
->replica_flags
));
8859 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
8860 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->naming_context_obj_guid
));
8861 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_obj_guid
));
8862 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
8863 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->transport_obj_guid
));
8864 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->tmp_highest_usn
));
8865 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->highest_usn
));
8866 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_success
));
8867 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_attempt
));
8868 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->result_last_attempt
));
8869 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->consecutive_sync_failures
));
8871 if (ndr_flags
& NDR_BUFFERS
) {
8872 if (r
->naming_context_dn
) {
8873 _mem_save_naming_context_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8874 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context_dn
, 0);
8875 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->naming_context_dn
));
8876 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->naming_context_dn
));
8877 if (ndr_get_array_length(ndr
, &r
->naming_context_dn
) > ndr_get_array_size(ndr
, &r
->naming_context_dn
)) {
8878 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->naming_context_dn
), ndr_get_array_length(ndr
, &r
->naming_context_dn
));
8880 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->naming_context_dn
), sizeof(uint16_t)));
8881 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->naming_context_dn
, ndr_get_array_length(ndr
, &r
->naming_context_dn
), sizeof(uint16_t), CH_UTF16
));
8882 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_dn_0
, 0);
8884 if (r
->source_dsa_obj_dn
) {
8885 _mem_save_source_dsa_obj_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8886 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dsa_obj_dn
, 0);
8887 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->source_dsa_obj_dn
));
8888 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->source_dsa_obj_dn
));
8889 if (ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
) > ndr_get_array_size(ndr
, &r
->source_dsa_obj_dn
)) {
8890 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->source_dsa_obj_dn
), ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
));
8892 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
), sizeof(uint16_t)));
8893 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->source_dsa_obj_dn
, ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
), sizeof(uint16_t), CH_UTF16
));
8894 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dsa_obj_dn_0
, 0);
8896 if (r
->source_dsa_address
) {
8897 _mem_save_source_dsa_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8898 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dsa_address
, 0);
8899 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->source_dsa_address
));
8900 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->source_dsa_address
));
8901 if (ndr_get_array_length(ndr
, &r
->source_dsa_address
) > ndr_get_array_size(ndr
, &r
->source_dsa_address
)) {
8902 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->source_dsa_address
), ndr_get_array_length(ndr
, &r
->source_dsa_address
));
8904 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->source_dsa_address
), sizeof(uint16_t)));
8905 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->source_dsa_address
, ndr_get_array_length(ndr
, &r
->source_dsa_address
), sizeof(uint16_t), CH_UTF16
));
8906 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dsa_address_0
, 0);
8908 if (r
->transport_obj_dn
) {
8909 _mem_save_transport_obj_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8910 NDR_PULL_SET_MEM_CTX(ndr
, r
->transport_obj_dn
, 0);
8911 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->transport_obj_dn
));
8912 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->transport_obj_dn
));
8913 if (ndr_get_array_length(ndr
, &r
->transport_obj_dn
) > ndr_get_array_size(ndr
, &r
->transport_obj_dn
)) {
8914 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->transport_obj_dn
), ndr_get_array_length(ndr
, &r
->transport_obj_dn
));
8916 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->transport_obj_dn
), sizeof(uint16_t)));
8917 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->transport_obj_dn
, ndr_get_array_length(ndr
, &r
->transport_obj_dn
), sizeof(uint16_t), CH_UTF16
));
8918 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_transport_obj_dn_0
, 0);
8921 return NDR_ERR_SUCCESS
;
8924 _PUBLIC_
void ndr_print_drsuapi_DsReplicaNeighbour(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaNeighbour
*r
)
8926 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaNeighbour");
8928 ndr_print_ptr(ndr
, "naming_context_dn", r
->naming_context_dn
);
8930 if (r
->naming_context_dn
) {
8931 ndr_print_string(ndr
, "naming_context_dn", r
->naming_context_dn
);
8934 ndr_print_ptr(ndr
, "source_dsa_obj_dn", r
->source_dsa_obj_dn
);
8936 if (r
->source_dsa_obj_dn
) {
8937 ndr_print_string(ndr
, "source_dsa_obj_dn", r
->source_dsa_obj_dn
);
8940 ndr_print_ptr(ndr
, "source_dsa_address", r
->source_dsa_address
);
8942 if (r
->source_dsa_address
) {
8943 ndr_print_string(ndr
, "source_dsa_address", r
->source_dsa_address
);
8946 ndr_print_ptr(ndr
, "transport_obj_dn", r
->transport_obj_dn
);
8948 if (r
->transport_obj_dn
) {
8949 ndr_print_string(ndr
, "transport_obj_dn", r
->transport_obj_dn
);
8952 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr
, "replica_flags", r
->replica_flags
);
8953 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
8954 ndr_print_GUID(ndr
, "naming_context_obj_guid", &r
->naming_context_obj_guid
);
8955 ndr_print_GUID(ndr
, "source_dsa_obj_guid", &r
->source_dsa_obj_guid
);
8956 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
8957 ndr_print_GUID(ndr
, "transport_obj_guid", &r
->transport_obj_guid
);
8958 ndr_print_hyper(ndr
, "tmp_highest_usn", r
->tmp_highest_usn
);
8959 ndr_print_hyper(ndr
, "highest_usn", r
->highest_usn
);
8960 ndr_print_NTTIME(ndr
, "last_success", r
->last_success
);
8961 ndr_print_NTTIME(ndr
, "last_attempt", r
->last_attempt
);
8962 ndr_print_WERROR(ndr
, "result_last_attempt", r
->result_last_attempt
);
8963 ndr_print_uint32(ndr
, "consecutive_sync_failures", r
->consecutive_sync_failures
);
8967 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaNeighbourCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaNeighbourCtr
*r
)
8969 uint32_t cntr_array_0
;
8970 if (ndr_flags
& NDR_SCALARS
) {
8971 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
8972 NDR_CHECK(ndr_push_align(ndr
, 8));
8973 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
8974 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
8975 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
8976 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbour(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
8979 if (ndr_flags
& NDR_BUFFERS
) {
8980 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
8981 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbour(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
8984 return NDR_ERR_SUCCESS
;
8987 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaNeighbourCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaNeighbourCtr
*r
)
8989 uint32_t cntr_array_0
;
8990 TALLOC_CTX
*_mem_save_array_0
;
8991 if (ndr_flags
& NDR_SCALARS
) {
8992 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
8993 NDR_CHECK(ndr_pull_align(ndr
, 8));
8994 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
8995 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
8996 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
8997 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8998 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
8999 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9000 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbour(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9002 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9004 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
9007 if (ndr_flags
& NDR_BUFFERS
) {
9008 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9009 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
9010 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9011 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbour(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
9013 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9015 return NDR_ERR_SUCCESS
;
9018 _PUBLIC_
void ndr_print_drsuapi_DsReplicaNeighbourCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaNeighbourCtr
*r
)
9020 uint32_t cntr_array_0
;
9021 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaNeighbourCtr");
9023 ndr_print_uint32(ndr
, "count", r
->count
);
9024 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
9025 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
9027 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
9029 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
9030 ndr_print_drsuapi_DsReplicaNeighbour(ndr
, "array", &r
->array
[cntr_array_0
]);
9038 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursorCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursorCtr
*r
)
9040 uint32_t cntr_array_0
;
9041 if (ndr_flags
& NDR_SCALARS
) {
9042 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9043 NDR_CHECK(ndr_push_align(ndr
, 8));
9044 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9045 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
9046 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9047 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9050 if (ndr_flags
& NDR_BUFFERS
) {
9052 return NDR_ERR_SUCCESS
;
9055 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursorCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursorCtr
*r
)
9057 uint32_t cntr_array_0
;
9058 TALLOC_CTX
*_mem_save_array_0
;
9059 if (ndr_flags
& NDR_SCALARS
) {
9060 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
9061 NDR_CHECK(ndr_pull_align(ndr
, 8));
9062 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
9063 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
9064 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
9065 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9066 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
9067 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9068 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9070 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9072 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
9075 if (ndr_flags
& NDR_BUFFERS
) {
9077 return NDR_ERR_SUCCESS
;
9080 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursorCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursorCtr
*r
)
9082 uint32_t cntr_array_0
;
9083 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursorCtr");
9085 ndr_print_uint32(ndr
, "count", r
->count
);
9086 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
9087 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
9089 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
9091 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
9092 ndr_print_drsuapi_DsReplicaCursor(ndr
, "array", &r
->array
[cntr_array_0
]);
9100 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjMetaData(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjMetaData
*r
)
9102 if (ndr_flags
& NDR_SCALARS
) {
9103 NDR_CHECK(ndr_push_align(ndr
, 8));
9104 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attribute_name
));
9105 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
9106 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->originating_change_time
));
9107 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
9108 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
9109 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->local_usn
));
9111 if (ndr_flags
& NDR_BUFFERS
) {
9112 if (r
->attribute_name
) {
9113 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
9114 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9115 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
9116 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->attribute_name
, ndr_charset_length(r
->attribute_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9119 return NDR_ERR_SUCCESS
;
9122 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjMetaData(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjMetaData
*r
)
9124 uint32_t _ptr_attribute_name
;
9125 TALLOC_CTX
*_mem_save_attribute_name_0
;
9126 if (ndr_flags
& NDR_SCALARS
) {
9127 NDR_CHECK(ndr_pull_align(ndr
, 8));
9128 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attribute_name
));
9129 if (_ptr_attribute_name
) {
9130 NDR_PULL_ALLOC(ndr
, r
->attribute_name
);
9132 r
->attribute_name
= NULL
;
9134 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
9135 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
9136 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
9137 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
9138 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->local_usn
));
9140 if (ndr_flags
& NDR_BUFFERS
) {
9141 if (r
->attribute_name
) {
9142 _mem_save_attribute_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9143 NDR_PULL_SET_MEM_CTX(ndr
, r
->attribute_name
, 0);
9144 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attribute_name
));
9145 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->attribute_name
));
9146 if (ndr_get_array_length(ndr
, &r
->attribute_name
) > ndr_get_array_size(ndr
, &r
->attribute_name
)) {
9147 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->attribute_name
), ndr_get_array_length(ndr
, &r
->attribute_name
));
9149 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t)));
9150 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->attribute_name
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t), CH_UTF16
));
9151 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attribute_name_0
, 0);
9154 return NDR_ERR_SUCCESS
;
9157 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjMetaData(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjMetaData
*r
)
9159 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjMetaData");
9161 ndr_print_ptr(ndr
, "attribute_name", r
->attribute_name
);
9163 if (r
->attribute_name
) {
9164 ndr_print_string(ndr
, "attribute_name", r
->attribute_name
);
9167 ndr_print_uint32(ndr
, "version", r
->version
);
9168 ndr_print_NTTIME(ndr
, "originating_change_time", r
->originating_change_time
);
9169 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
9170 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
9171 ndr_print_hyper(ndr
, "local_usn", r
->local_usn
);
9175 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjMetaDataCtr
*r
)
9177 uint32_t cntr_array_0
;
9178 if (ndr_flags
& NDR_SCALARS
) {
9179 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9180 NDR_CHECK(ndr_push_align(ndr
, 8));
9181 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9182 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
9183 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9184 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9187 if (ndr_flags
& NDR_BUFFERS
) {
9188 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9189 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
9192 return NDR_ERR_SUCCESS
;
9195 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjMetaDataCtr
*r
)
9197 uint32_t cntr_array_0
;
9198 TALLOC_CTX
*_mem_save_array_0
;
9199 if (ndr_flags
& NDR_SCALARS
) {
9200 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
9201 NDR_CHECK(ndr_pull_align(ndr
, 8));
9202 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
9203 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
9204 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
9205 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9206 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
9207 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9208 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9210 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9212 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
9215 if (ndr_flags
& NDR_BUFFERS
) {
9216 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9217 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
9218 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9219 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
9221 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9223 return NDR_ERR_SUCCESS
;
9226 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjMetaDataCtr
*r
)
9228 uint32_t cntr_array_0
;
9229 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjMetaDataCtr");
9231 ndr_print_uint32(ndr
, "count", r
->count
);
9232 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
9233 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
9235 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
9237 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
9238 ndr_print_drsuapi_DsReplicaObjMetaData(ndr
, "array", &r
->array
[cntr_array_0
]);
9246 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaKccDsaFailure(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaKccDsaFailure
*r
)
9248 if (ndr_flags
& NDR_SCALARS
) {
9249 NDR_CHECK(ndr_push_align(ndr
, 4));
9250 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dsa_obj_dn
));
9251 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->dsa_obj_guid
));
9252 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->first_failure
));
9253 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_failures
));
9254 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->last_result
));
9256 if (ndr_flags
& NDR_BUFFERS
) {
9257 if (r
->dsa_obj_dn
) {
9258 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dsa_obj_dn
, CH_UTF16
)));
9259 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9260 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dsa_obj_dn
, CH_UTF16
)));
9261 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dsa_obj_dn
, ndr_charset_length(r
->dsa_obj_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9264 return NDR_ERR_SUCCESS
;
9267 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaKccDsaFailure(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaKccDsaFailure
*r
)
9269 uint32_t _ptr_dsa_obj_dn
;
9270 TALLOC_CTX
*_mem_save_dsa_obj_dn_0
;
9271 if (ndr_flags
& NDR_SCALARS
) {
9272 NDR_CHECK(ndr_pull_align(ndr
, 4));
9273 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dsa_obj_dn
));
9274 if (_ptr_dsa_obj_dn
) {
9275 NDR_PULL_ALLOC(ndr
, r
->dsa_obj_dn
);
9277 r
->dsa_obj_dn
= NULL
;
9279 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->dsa_obj_guid
));
9280 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->first_failure
));
9281 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_failures
));
9282 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->last_result
));
9284 if (ndr_flags
& NDR_BUFFERS
) {
9285 if (r
->dsa_obj_dn
) {
9286 _mem_save_dsa_obj_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9287 NDR_PULL_SET_MEM_CTX(ndr
, r
->dsa_obj_dn
, 0);
9288 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dsa_obj_dn
));
9289 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dsa_obj_dn
));
9290 if (ndr_get_array_length(ndr
, &r
->dsa_obj_dn
) > ndr_get_array_size(ndr
, &r
->dsa_obj_dn
)) {
9291 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dsa_obj_dn
), ndr_get_array_length(ndr
, &r
->dsa_obj_dn
));
9293 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dsa_obj_dn
), sizeof(uint16_t)));
9294 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dsa_obj_dn
, ndr_get_array_length(ndr
, &r
->dsa_obj_dn
), sizeof(uint16_t), CH_UTF16
));
9295 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dsa_obj_dn_0
, 0);
9298 return NDR_ERR_SUCCESS
;
9301 _PUBLIC_
void ndr_print_drsuapi_DsReplicaKccDsaFailure(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaKccDsaFailure
*r
)
9303 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaKccDsaFailure");
9305 ndr_print_ptr(ndr
, "dsa_obj_dn", r
->dsa_obj_dn
);
9307 if (r
->dsa_obj_dn
) {
9308 ndr_print_string(ndr
, "dsa_obj_dn", r
->dsa_obj_dn
);
9311 ndr_print_GUID(ndr
, "dsa_obj_guid", &r
->dsa_obj_guid
);
9312 ndr_print_NTTIME(ndr
, "first_failure", r
->first_failure
);
9313 ndr_print_uint32(ndr
, "num_failures", r
->num_failures
);
9314 ndr_print_WERROR(ndr
, "last_result", r
->last_result
);
9318 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaKccDsaFailuresCtr
*r
)
9320 uint32_t cntr_array_0
;
9321 if (ndr_flags
& NDR_SCALARS
) {
9322 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9323 NDR_CHECK(ndr_push_align(ndr
, 4));
9324 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9325 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
9326 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9327 NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailure(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9330 if (ndr_flags
& NDR_BUFFERS
) {
9331 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9332 NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailure(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
9335 return NDR_ERR_SUCCESS
;
9338 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaKccDsaFailuresCtr
*r
)
9340 uint32_t cntr_array_0
;
9341 TALLOC_CTX
*_mem_save_array_0
;
9342 if (ndr_flags
& NDR_SCALARS
) {
9343 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
9344 NDR_CHECK(ndr_pull_align(ndr
, 4));
9345 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
9346 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
9347 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
9348 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9349 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
9350 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9351 NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailure(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9353 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9355 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
9358 if (ndr_flags
& NDR_BUFFERS
) {
9359 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9360 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
9361 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9362 NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailure(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
9364 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9366 return NDR_ERR_SUCCESS
;
9369 _PUBLIC_
void ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaKccDsaFailuresCtr
*r
)
9371 uint32_t cntr_array_0
;
9372 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaKccDsaFailuresCtr");
9374 ndr_print_uint32(ndr
, "count", r
->count
);
9375 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
9376 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
9378 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
9380 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
9381 ndr_print_drsuapi_DsReplicaKccDsaFailure(ndr
, "array", &r
->array
[cntr_array_0
]);
9389 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaOpType(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaOpType r
)
9391 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
9392 return NDR_ERR_SUCCESS
;
9395 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaOpType(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaOpType
*r
)
9398 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
9400 return NDR_ERR_SUCCESS
;
9403 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOpType(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsReplicaOpType r
)
9405 const char *val
= NULL
;
9408 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
: val
= "DRSUAPI_DS_REPLICA_OP_TYPE_SYNC"; break;
9409 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
: val
= "DRSUAPI_DS_REPLICA_OP_TYPE_ADD"; break;
9410 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
: val
= "DRSUAPI_DS_REPLICA_OP_TYPE_DELETE"; break;
9411 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
: val
= "DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY"; break;
9412 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
: val
= "DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS"; break;
9414 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
9417 static enum ndr_err_code
ndr_push_drsuapi_DsRplicaOpOptions(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsRplicaOpOptions
*r
)
9419 if (ndr_flags
& NDR_SCALARS
) {
9420 int level
= ndr_push_get_switch_value(ndr
, r
);
9421 NDR_CHECK(ndr_push_drsuapi_DsReplicaOpType(ndr
, NDR_SCALARS
, level
));
9423 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
: {
9424 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncOptions(ndr
, NDR_SCALARS
, r
->sync
));
9427 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
: {
9428 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddOptions(ndr
, NDR_SCALARS
, r
->add
));
9431 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
: {
9432 NDR_CHECK(ndr_push_drsuapi_DsReplicaDeleteOptions(ndr
, NDR_SCALARS
, r
->op_delete
));
9435 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
: {
9436 NDR_CHECK(ndr_push_drsuapi_DsReplicaModifyOptions(ndr
, NDR_SCALARS
, r
->modify
));
9439 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
: {
9440 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsOptions(ndr
, NDR_SCALARS
, r
->update_refs
));
9444 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
9449 if (ndr_flags
& NDR_BUFFERS
) {
9450 int level
= ndr_push_get_switch_value(ndr
, r
);
9452 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
:
9455 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
:
9458 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
:
9461 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
:
9464 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
:
9472 return NDR_ERR_SUCCESS
;
9475 static enum ndr_err_code
ndr_pull_drsuapi_DsRplicaOpOptions(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsRplicaOpOptions
*r
)
9479 level
= ndr_pull_get_switch_value(ndr
, r
);
9480 if (ndr_flags
& NDR_SCALARS
) {
9481 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
9482 if (_level
!= level
) {
9483 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
9486 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
: {
9487 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncOptions(ndr
, NDR_SCALARS
, &r
->sync
));
9490 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
: {
9491 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddOptions(ndr
, NDR_SCALARS
, &r
->add
));
9494 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
: {
9495 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDeleteOptions(ndr
, NDR_SCALARS
, &r
->op_delete
));
9498 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
: {
9499 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModifyOptions(ndr
, NDR_SCALARS
, &r
->modify
));
9502 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
: {
9503 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsOptions(ndr
, NDR_SCALARS
, &r
->update_refs
));
9507 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
9512 if (ndr_flags
& NDR_BUFFERS
) {
9514 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
:
9517 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
:
9520 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
:
9523 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
:
9526 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
:
9534 return NDR_ERR_SUCCESS
;
9537 _PUBLIC_
void ndr_print_drsuapi_DsRplicaOpOptions(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsRplicaOpOptions
*r
)
9540 level
= ndr_print_get_switch_value(ndr
, r
);
9541 ndr_print_union(ndr
, name
, level
, "drsuapi_DsRplicaOpOptions");
9543 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
:
9544 ndr_print_drsuapi_DsReplicaSyncOptions(ndr
, "sync", r
->sync
);
9547 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
:
9548 ndr_print_drsuapi_DsReplicaAddOptions(ndr
, "add", r
->add
);
9551 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
:
9552 ndr_print_drsuapi_DsReplicaDeleteOptions(ndr
, "op_delete", r
->op_delete
);
9555 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
:
9556 ndr_print_drsuapi_DsReplicaModifyOptions(ndr
, "modify", r
->modify
);
9559 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
:
9560 ndr_print_drsuapi_DsReplicaUpdateRefsOptions(ndr
, "update_refs", r
->update_refs
);
9564 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
9570 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaOp(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaOp
*r
)
9572 if (ndr_flags
& NDR_SCALARS
) {
9573 NDR_CHECK(ndr_push_align(ndr
, 4));
9574 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->operation_start
));
9575 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->serial_num
));
9576 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
9577 NDR_CHECK(ndr_push_drsuapi_DsReplicaOpType(ndr
, NDR_SCALARS
, r
->operation_type
));
9578 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->options
, r
->operation_type
));
9579 NDR_CHECK(ndr_push_drsuapi_DsRplicaOpOptions(ndr
, NDR_SCALARS
, &r
->options
));
9580 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->nc_dn
));
9581 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->remote_dsa_obj_dn
));
9582 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->remote_dsa_address
));
9583 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->nc_obj_guid
));
9584 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->remote_dsa_obj_guid
));
9586 if (ndr_flags
& NDR_BUFFERS
) {
9588 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->nc_dn
, CH_UTF16
)));
9589 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9590 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->nc_dn
, CH_UTF16
)));
9591 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->nc_dn
, ndr_charset_length(r
->nc_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9593 if (r
->remote_dsa_obj_dn
) {
9594 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote_dsa_obj_dn
, CH_UTF16
)));
9595 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9596 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote_dsa_obj_dn
, CH_UTF16
)));
9597 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->remote_dsa_obj_dn
, ndr_charset_length(r
->remote_dsa_obj_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9599 if (r
->remote_dsa_address
) {
9600 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote_dsa_address
, CH_UTF16
)));
9601 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9602 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote_dsa_address
, CH_UTF16
)));
9603 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->remote_dsa_address
, ndr_charset_length(r
->remote_dsa_address
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9606 return NDR_ERR_SUCCESS
;
9609 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaOp(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaOp
*r
)
9611 uint32_t _ptr_nc_dn
;
9612 TALLOC_CTX
*_mem_save_nc_dn_0
;
9613 uint32_t _ptr_remote_dsa_obj_dn
;
9614 TALLOC_CTX
*_mem_save_remote_dsa_obj_dn_0
;
9615 uint32_t _ptr_remote_dsa_address
;
9616 TALLOC_CTX
*_mem_save_remote_dsa_address_0
;
9617 if (ndr_flags
& NDR_SCALARS
) {
9618 NDR_CHECK(ndr_pull_align(ndr
, 4));
9619 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->operation_start
));
9620 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->serial_num
));
9621 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
9622 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOpType(ndr
, NDR_SCALARS
, &r
->operation_type
));
9623 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->options
, r
->operation_type
));
9624 NDR_CHECK(ndr_pull_drsuapi_DsRplicaOpOptions(ndr
, NDR_SCALARS
, &r
->options
));
9625 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nc_dn
));
9627 NDR_PULL_ALLOC(ndr
, r
->nc_dn
);
9631 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_remote_dsa_obj_dn
));
9632 if (_ptr_remote_dsa_obj_dn
) {
9633 NDR_PULL_ALLOC(ndr
, r
->remote_dsa_obj_dn
);
9635 r
->remote_dsa_obj_dn
= NULL
;
9637 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_remote_dsa_address
));
9638 if (_ptr_remote_dsa_address
) {
9639 NDR_PULL_ALLOC(ndr
, r
->remote_dsa_address
);
9641 r
->remote_dsa_address
= NULL
;
9643 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->nc_obj_guid
));
9644 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->remote_dsa_obj_guid
));
9646 if (ndr_flags
& NDR_BUFFERS
) {
9648 _mem_save_nc_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9649 NDR_PULL_SET_MEM_CTX(ndr
, r
->nc_dn
, 0);
9650 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->nc_dn
));
9651 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->nc_dn
));
9652 if (ndr_get_array_length(ndr
, &r
->nc_dn
) > ndr_get_array_size(ndr
, &r
->nc_dn
)) {
9653 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->nc_dn
), ndr_get_array_length(ndr
, &r
->nc_dn
));
9655 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->nc_dn
), sizeof(uint16_t)));
9656 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->nc_dn
, ndr_get_array_length(ndr
, &r
->nc_dn
), sizeof(uint16_t), CH_UTF16
));
9657 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nc_dn_0
, 0);
9659 if (r
->remote_dsa_obj_dn
) {
9660 _mem_save_remote_dsa_obj_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9661 NDR_PULL_SET_MEM_CTX(ndr
, r
->remote_dsa_obj_dn
, 0);
9662 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->remote_dsa_obj_dn
));
9663 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->remote_dsa_obj_dn
));
9664 if (ndr_get_array_length(ndr
, &r
->remote_dsa_obj_dn
) > ndr_get_array_size(ndr
, &r
->remote_dsa_obj_dn
)) {
9665 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->remote_dsa_obj_dn
), ndr_get_array_length(ndr
, &r
->remote_dsa_obj_dn
));
9667 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->remote_dsa_obj_dn
), sizeof(uint16_t)));
9668 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->remote_dsa_obj_dn
, ndr_get_array_length(ndr
, &r
->remote_dsa_obj_dn
), sizeof(uint16_t), CH_UTF16
));
9669 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_remote_dsa_obj_dn_0
, 0);
9671 if (r
->remote_dsa_address
) {
9672 _mem_save_remote_dsa_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9673 NDR_PULL_SET_MEM_CTX(ndr
, r
->remote_dsa_address
, 0);
9674 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->remote_dsa_address
));
9675 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->remote_dsa_address
));
9676 if (ndr_get_array_length(ndr
, &r
->remote_dsa_address
) > ndr_get_array_size(ndr
, &r
->remote_dsa_address
)) {
9677 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->remote_dsa_address
), ndr_get_array_length(ndr
, &r
->remote_dsa_address
));
9679 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->remote_dsa_address
), sizeof(uint16_t)));
9680 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->remote_dsa_address
, ndr_get_array_length(ndr
, &r
->remote_dsa_address
), sizeof(uint16_t), CH_UTF16
));
9681 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_remote_dsa_address_0
, 0);
9684 return NDR_ERR_SUCCESS
;
9687 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOp(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaOp
*r
)
9689 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaOp");
9691 ndr_print_NTTIME(ndr
, "operation_start", r
->operation_start
);
9692 ndr_print_uint32(ndr
, "serial_num", r
->serial_num
);
9693 ndr_print_uint32(ndr
, "priority", r
->priority
);
9694 ndr_print_drsuapi_DsReplicaOpType(ndr
, "operation_type", r
->operation_type
);
9695 ndr_print_set_switch_value(ndr
, &r
->options
, r
->operation_type
);
9696 ndr_print_drsuapi_DsRplicaOpOptions(ndr
, "options", &r
->options
);
9697 ndr_print_ptr(ndr
, "nc_dn", r
->nc_dn
);
9700 ndr_print_string(ndr
, "nc_dn", r
->nc_dn
);
9703 ndr_print_ptr(ndr
, "remote_dsa_obj_dn", r
->remote_dsa_obj_dn
);
9705 if (r
->remote_dsa_obj_dn
) {
9706 ndr_print_string(ndr
, "remote_dsa_obj_dn", r
->remote_dsa_obj_dn
);
9709 ndr_print_ptr(ndr
, "remote_dsa_address", r
->remote_dsa_address
);
9711 if (r
->remote_dsa_address
) {
9712 ndr_print_string(ndr
, "remote_dsa_address", r
->remote_dsa_address
);
9715 ndr_print_GUID(ndr
, "nc_obj_guid", &r
->nc_obj_guid
);
9716 ndr_print_GUID(ndr
, "remote_dsa_obj_guid", &r
->remote_dsa_obj_guid
);
9720 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaOpCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaOpCtr
*r
)
9722 uint32_t cntr_array_0
;
9723 if (ndr_flags
& NDR_SCALARS
) {
9724 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9725 NDR_CHECK(ndr_push_align(ndr
, 4));
9726 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->time
));
9727 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9728 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9729 NDR_CHECK(ndr_push_drsuapi_DsReplicaOp(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9732 if (ndr_flags
& NDR_BUFFERS
) {
9733 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9734 NDR_CHECK(ndr_push_drsuapi_DsReplicaOp(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
9737 return NDR_ERR_SUCCESS
;
9740 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaOpCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaOpCtr
*r
)
9742 uint32_t cntr_array_0
;
9743 TALLOC_CTX
*_mem_save_array_0
;
9744 if (ndr_flags
& NDR_SCALARS
) {
9745 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
9746 NDR_CHECK(ndr_pull_align(ndr
, 4));
9747 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->time
));
9748 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
9749 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
9750 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9751 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
9752 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9753 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOp(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9755 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9757 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
9760 if (ndr_flags
& NDR_BUFFERS
) {
9761 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9762 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
9763 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9764 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOp(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
9766 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9768 return NDR_ERR_SUCCESS
;
9771 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOpCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaOpCtr
*r
)
9773 uint32_t cntr_array_0
;
9774 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaOpCtr");
9776 ndr_print_NTTIME(ndr
, "time", r
->time
);
9777 ndr_print_uint32(ndr
, "count", r
->count
);
9778 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
9780 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
9782 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
9783 ndr_print_drsuapi_DsReplicaOp(ndr
, "array", &r
->array
[cntr_array_0
]);
9791 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttrValMetaData(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttrValMetaData
*r
)
9793 if (ndr_flags
& NDR_SCALARS
) {
9794 NDR_CHECK(ndr_push_align(ndr
, 8));
9795 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attribute_name
));
9796 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_dn
));
9797 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_DATA_BLOB(0, r
->binary
, 0)));
9798 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->binary
));
9799 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->deleted
));
9800 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->created
));
9801 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
9802 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->originating_change_time
));
9803 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
9804 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
9805 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->local_usn
));
9807 if (ndr_flags
& NDR_BUFFERS
) {
9808 if (r
->attribute_name
) {
9809 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
9810 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9811 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
9812 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->attribute_name
, ndr_charset_length(r
->attribute_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9815 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
9816 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9817 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
9818 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_dn
, ndr_charset_length(r
->object_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9821 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->binary
));
9824 return NDR_ERR_SUCCESS
;
9827 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttrValMetaData(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttrValMetaData
*r
)
9829 uint32_t _ptr_attribute_name
;
9830 TALLOC_CTX
*_mem_save_attribute_name_0
;
9831 uint32_t _ptr_object_dn
;
9832 TALLOC_CTX
*_mem_save_object_dn_0
;
9833 uint32_t _ptr_binary
;
9834 TALLOC_CTX
*_mem_save_binary_0
;
9835 if (ndr_flags
& NDR_SCALARS
) {
9836 NDR_CHECK(ndr_pull_align(ndr
, 8));
9837 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attribute_name
));
9838 if (_ptr_attribute_name
) {
9839 NDR_PULL_ALLOC(ndr
, r
->attribute_name
);
9841 r
->attribute_name
= NULL
;
9843 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_dn
));
9844 if (_ptr_object_dn
) {
9845 NDR_PULL_ALLOC(ndr
, r
->object_dn
);
9847 r
->object_dn
= NULL
;
9849 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_binary
));
9850 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_binary
));
9852 NDR_PULL_ALLOC(ndr
, r
->binary
);
9856 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->deleted
));
9857 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->created
));
9858 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
9859 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
9860 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
9861 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
9862 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->local_usn
));
9864 if (ndr_flags
& NDR_BUFFERS
) {
9865 if (r
->attribute_name
) {
9866 _mem_save_attribute_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9867 NDR_PULL_SET_MEM_CTX(ndr
, r
->attribute_name
, 0);
9868 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attribute_name
));
9869 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->attribute_name
));
9870 if (ndr_get_array_length(ndr
, &r
->attribute_name
) > ndr_get_array_size(ndr
, &r
->attribute_name
)) {
9871 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->attribute_name
), ndr_get_array_length(ndr
, &r
->attribute_name
));
9873 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t)));
9874 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->attribute_name
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t), CH_UTF16
));
9875 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attribute_name_0
, 0);
9878 _mem_save_object_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9879 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_dn
, 0);
9880 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_dn
));
9881 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_dn
));
9882 if (ndr_get_array_length(ndr
, &r
->object_dn
) > ndr_get_array_size(ndr
, &r
->object_dn
)) {
9883 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->object_dn
), ndr_get_array_length(ndr
, &r
->object_dn
));
9885 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t)));
9886 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_dn
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t), CH_UTF16
));
9887 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_dn_0
, 0);
9890 _mem_save_binary_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9891 NDR_PULL_SET_MEM_CTX(ndr
, r
->binary
, 0);
9892 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->binary
));
9893 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_binary_0
, 0);
9896 return NDR_ERR_SUCCESS
;
9899 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttrValMetaData(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttrValMetaData
*r
)
9901 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttrValMetaData");
9903 ndr_print_ptr(ndr
, "attribute_name", r
->attribute_name
);
9905 if (r
->attribute_name
) {
9906 ndr_print_string(ndr
, "attribute_name", r
->attribute_name
);
9909 ndr_print_ptr(ndr
, "object_dn", r
->object_dn
);
9912 ndr_print_string(ndr
, "object_dn", r
->object_dn
);
9915 ndr_print_uint32(ndr
, "__ndr_size_binary", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_DATA_BLOB(0, r
->binary
, 0):r
->__ndr_size_binary
);
9916 ndr_print_ptr(ndr
, "binary", r
->binary
);
9919 ndr_print_DATA_BLOB(ndr
, "binary", *r
->binary
);
9922 ndr_print_NTTIME(ndr
, "deleted", r
->deleted
);
9923 ndr_print_NTTIME(ndr
, "created", r
->created
);
9924 ndr_print_uint32(ndr
, "version", r
->version
);
9925 ndr_print_NTTIME(ndr
, "originating_change_time", r
->originating_change_time
);
9926 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
9927 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
9928 ndr_print_hyper(ndr
, "local_usn", r
->local_usn
);
9932 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttrValMetaDataCtr
*r
)
9934 uint32_t cntr_array_0
;
9935 if (ndr_flags
& NDR_SCALARS
) {
9936 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9937 NDR_CHECK(ndr_push_align(ndr
, 8));
9938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9939 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->enumeration_context
));
9940 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9941 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9944 if (ndr_flags
& NDR_BUFFERS
) {
9945 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9946 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
9949 return NDR_ERR_SUCCESS
;
9952 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttrValMetaDataCtr
*r
)
9954 uint32_t cntr_array_0
;
9955 TALLOC_CTX
*_mem_save_array_0
;
9956 if (ndr_flags
& NDR_SCALARS
) {
9957 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
9958 NDR_CHECK(ndr_pull_align(ndr
, 8));
9959 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
9960 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->enumeration_context
));
9961 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
9962 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9963 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
9964 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9965 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
9967 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9969 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
9972 if (ndr_flags
& NDR_BUFFERS
) {
9973 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9974 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
9975 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
9976 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
9978 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
9980 return NDR_ERR_SUCCESS
;
9983 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttrValMetaDataCtr
*r
)
9985 uint32_t cntr_array_0
;
9986 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttrValMetaDataCtr");
9988 ndr_print_uint32(ndr
, "count", r
->count
);
9989 ndr_print_int32(ndr
, "enumeration_context", r
->enumeration_context
);
9990 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
9992 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
9994 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
9995 ndr_print_drsuapi_DsReplicaAttrValMetaData(ndr
, "array", &r
->array
[cntr_array_0
]);
10003 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor2Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor2Ctr
*r
)
10005 uint32_t cntr_array_0
;
10006 if (ndr_flags
& NDR_SCALARS
) {
10007 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10008 NDR_CHECK(ndr_push_align(ndr
, 8));
10009 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10010 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->enumeration_context
));
10011 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10012 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10015 if (ndr_flags
& NDR_BUFFERS
) {
10017 return NDR_ERR_SUCCESS
;
10020 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor2Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor2Ctr
*r
)
10022 uint32_t cntr_array_0
;
10023 TALLOC_CTX
*_mem_save_array_0
;
10024 if (ndr_flags
& NDR_SCALARS
) {
10025 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10026 NDR_CHECK(ndr_pull_align(ndr
, 8));
10027 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10028 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->enumeration_context
));
10029 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10030 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10031 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10032 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10033 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10035 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10037 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10040 if (ndr_flags
& NDR_BUFFERS
) {
10042 return NDR_ERR_SUCCESS
;
10045 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor2Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor2Ctr
*r
)
10047 uint32_t cntr_array_0
;
10048 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor2Ctr");
10050 ndr_print_uint32(ndr
, "count", r
->count
);
10051 ndr_print_int32(ndr
, "enumeration_context", r
->enumeration_context
);
10052 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
10054 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
10056 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
10057 ndr_print_drsuapi_DsReplicaCursor2(ndr
, "array", &r
->array
[cntr_array_0
]);
10065 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor3(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor3
*r
)
10067 if (ndr_flags
& NDR_SCALARS
) {
10068 NDR_CHECK(ndr_push_align(ndr
, 8));
10069 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
10070 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->highest_usn
));
10071 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_sync_success
));
10072 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dsa_obj_dn
));
10074 if (ndr_flags
& NDR_BUFFERS
) {
10075 if (r
->source_dsa_obj_dn
) {
10076 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_obj_dn
, CH_UTF16
)));
10077 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10078 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_obj_dn
, CH_UTF16
)));
10079 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->source_dsa_obj_dn
, ndr_charset_length(r
->source_dsa_obj_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10082 return NDR_ERR_SUCCESS
;
10085 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor3(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor3
*r
)
10087 uint32_t _ptr_source_dsa_obj_dn
;
10088 TALLOC_CTX
*_mem_save_source_dsa_obj_dn_0
;
10089 if (ndr_flags
& NDR_SCALARS
) {
10090 NDR_CHECK(ndr_pull_align(ndr
, 8));
10091 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
10092 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->highest_usn
));
10093 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_sync_success
));
10094 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dsa_obj_dn
));
10095 if (_ptr_source_dsa_obj_dn
) {
10096 NDR_PULL_ALLOC(ndr
, r
->source_dsa_obj_dn
);
10098 r
->source_dsa_obj_dn
= NULL
;
10101 if (ndr_flags
& NDR_BUFFERS
) {
10102 if (r
->source_dsa_obj_dn
) {
10103 _mem_save_source_dsa_obj_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10104 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dsa_obj_dn
, 0);
10105 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->source_dsa_obj_dn
));
10106 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->source_dsa_obj_dn
));
10107 if (ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
) > ndr_get_array_size(ndr
, &r
->source_dsa_obj_dn
)) {
10108 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->source_dsa_obj_dn
), ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
));
10110 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
), sizeof(uint16_t)));
10111 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->source_dsa_obj_dn
, ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
), sizeof(uint16_t), CH_UTF16
));
10112 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dsa_obj_dn_0
, 0);
10115 return NDR_ERR_SUCCESS
;
10118 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor3(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor3
*r
)
10120 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor3");
10122 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
10123 ndr_print_hyper(ndr
, "highest_usn", r
->highest_usn
);
10124 ndr_print_NTTIME(ndr
, "last_sync_success", r
->last_sync_success
);
10125 ndr_print_ptr(ndr
, "source_dsa_obj_dn", r
->source_dsa_obj_dn
);
10127 if (r
->source_dsa_obj_dn
) {
10128 ndr_print_string(ndr
, "source_dsa_obj_dn", r
->source_dsa_obj_dn
);
10134 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor3Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor3Ctr
*r
)
10136 uint32_t cntr_array_0
;
10137 if (ndr_flags
& NDR_SCALARS
) {
10138 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10139 NDR_CHECK(ndr_push_align(ndr
, 8));
10140 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10141 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->enumeration_context
));
10142 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10143 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10146 if (ndr_flags
& NDR_BUFFERS
) {
10147 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10148 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10151 return NDR_ERR_SUCCESS
;
10154 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor3Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor3Ctr
*r
)
10156 uint32_t cntr_array_0
;
10157 TALLOC_CTX
*_mem_save_array_0
;
10158 if (ndr_flags
& NDR_SCALARS
) {
10159 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10160 NDR_CHECK(ndr_pull_align(ndr
, 8));
10161 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10162 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->enumeration_context
));
10163 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10164 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10165 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10166 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10167 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10169 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10171 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10174 if (ndr_flags
& NDR_BUFFERS
) {
10175 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10176 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10177 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10178 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10180 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10182 return NDR_ERR_SUCCESS
;
10185 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor3Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor3Ctr
*r
)
10187 uint32_t cntr_array_0
;
10188 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor3Ctr");
10190 ndr_print_uint32(ndr
, "count", r
->count
);
10191 ndr_print_int32(ndr
, "enumeration_context", r
->enumeration_context
);
10192 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
10194 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
10196 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
10197 ndr_print_drsuapi_DsReplicaCursor3(ndr
, "array", &r
->array
[cntr_array_0
]);
10205 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjMetaData2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjMetaData2
*r
)
10207 if (ndr_flags
& NDR_SCALARS
) {
10208 NDR_CHECK(ndr_push_align(ndr
, 8));
10209 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attribute_name
));
10210 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
10211 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->originating_change_time
));
10212 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
10213 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
10214 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->local_usn
));
10215 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->originating_dsa_dn
));
10217 if (ndr_flags
& NDR_BUFFERS
) {
10218 if (r
->attribute_name
) {
10219 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
10220 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10221 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
10222 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->attribute_name
, ndr_charset_length(r
->attribute_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10224 if (r
->originating_dsa_dn
) {
10225 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->originating_dsa_dn
, CH_UTF16
)));
10226 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10227 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->originating_dsa_dn
, CH_UTF16
)));
10228 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->originating_dsa_dn
, ndr_charset_length(r
->originating_dsa_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10231 return NDR_ERR_SUCCESS
;
10234 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjMetaData2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjMetaData2
*r
)
10236 uint32_t _ptr_attribute_name
;
10237 TALLOC_CTX
*_mem_save_attribute_name_0
;
10238 uint32_t _ptr_originating_dsa_dn
;
10239 TALLOC_CTX
*_mem_save_originating_dsa_dn_0
;
10240 if (ndr_flags
& NDR_SCALARS
) {
10241 NDR_CHECK(ndr_pull_align(ndr
, 8));
10242 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attribute_name
));
10243 if (_ptr_attribute_name
) {
10244 NDR_PULL_ALLOC(ndr
, r
->attribute_name
);
10246 r
->attribute_name
= NULL
;
10248 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
10249 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
10250 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
10251 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
10252 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->local_usn
));
10253 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_originating_dsa_dn
));
10254 if (_ptr_originating_dsa_dn
) {
10255 NDR_PULL_ALLOC(ndr
, r
->originating_dsa_dn
);
10257 r
->originating_dsa_dn
= NULL
;
10260 if (ndr_flags
& NDR_BUFFERS
) {
10261 if (r
->attribute_name
) {
10262 _mem_save_attribute_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10263 NDR_PULL_SET_MEM_CTX(ndr
, r
->attribute_name
, 0);
10264 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attribute_name
));
10265 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->attribute_name
));
10266 if (ndr_get_array_length(ndr
, &r
->attribute_name
) > ndr_get_array_size(ndr
, &r
->attribute_name
)) {
10267 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->attribute_name
), ndr_get_array_length(ndr
, &r
->attribute_name
));
10269 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t)));
10270 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->attribute_name
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t), CH_UTF16
));
10271 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attribute_name_0
, 0);
10273 if (r
->originating_dsa_dn
) {
10274 _mem_save_originating_dsa_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10275 NDR_PULL_SET_MEM_CTX(ndr
, r
->originating_dsa_dn
, 0);
10276 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->originating_dsa_dn
));
10277 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->originating_dsa_dn
));
10278 if (ndr_get_array_length(ndr
, &r
->originating_dsa_dn
) > ndr_get_array_size(ndr
, &r
->originating_dsa_dn
)) {
10279 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->originating_dsa_dn
), ndr_get_array_length(ndr
, &r
->originating_dsa_dn
));
10281 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->originating_dsa_dn
), sizeof(uint16_t)));
10282 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->originating_dsa_dn
, ndr_get_array_length(ndr
, &r
->originating_dsa_dn
), sizeof(uint16_t), CH_UTF16
));
10283 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_originating_dsa_dn_0
, 0);
10286 return NDR_ERR_SUCCESS
;
10289 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjMetaData2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjMetaData2
*r
)
10291 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjMetaData2");
10293 ndr_print_ptr(ndr
, "attribute_name", r
->attribute_name
);
10295 if (r
->attribute_name
) {
10296 ndr_print_string(ndr
, "attribute_name", r
->attribute_name
);
10299 ndr_print_uint32(ndr
, "version", r
->version
);
10300 ndr_print_NTTIME(ndr
, "originating_change_time", r
->originating_change_time
);
10301 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
10302 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
10303 ndr_print_hyper(ndr
, "local_usn", r
->local_usn
);
10304 ndr_print_ptr(ndr
, "originating_dsa_dn", r
->originating_dsa_dn
);
10306 if (r
->originating_dsa_dn
) {
10307 ndr_print_string(ndr
, "originating_dsa_dn", r
->originating_dsa_dn
);
10313 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjMetaData2Ctr
*r
)
10315 uint32_t cntr_array_0
;
10316 if (ndr_flags
& NDR_SCALARS
) {
10317 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10318 NDR_CHECK(ndr_push_align(ndr
, 8));
10319 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10320 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->enumeration_context
));
10321 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10322 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10325 if (ndr_flags
& NDR_BUFFERS
) {
10326 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10327 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10330 return NDR_ERR_SUCCESS
;
10333 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjMetaData2Ctr
*r
)
10335 uint32_t cntr_array_0
;
10336 TALLOC_CTX
*_mem_save_array_0
;
10337 if (ndr_flags
& NDR_SCALARS
) {
10338 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10339 NDR_CHECK(ndr_pull_align(ndr
, 8));
10340 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10341 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->enumeration_context
));
10342 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10343 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10344 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10345 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10346 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10348 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10350 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10353 if (ndr_flags
& NDR_BUFFERS
) {
10354 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10355 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10356 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10357 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10359 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10361 return NDR_ERR_SUCCESS
;
10364 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjMetaData2Ctr
*r
)
10366 uint32_t cntr_array_0
;
10367 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjMetaData2Ctr");
10369 ndr_print_uint32(ndr
, "count", r
->count
);
10370 ndr_print_int32(ndr
, "enumeration_context", r
->enumeration_context
);
10371 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
10373 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
10375 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
10376 ndr_print_drsuapi_DsReplicaObjMetaData2(ndr
, "array", &r
->array
[cntr_array_0
]);
10384 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttrValMetaData2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttrValMetaData2
*r
)
10386 if (ndr_flags
& NDR_SCALARS
) {
10387 NDR_CHECK(ndr_push_align(ndr
, 8));
10388 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attribute_name
));
10389 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_dn
));
10390 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_DATA_BLOB(0, r
->binary
, 0)));
10391 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->binary
));
10392 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->deleted
));
10393 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->created
));
10394 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
10395 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->originating_change_time
));
10396 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
10397 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
10398 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->local_usn
));
10399 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->originating_dsa_dn
));
10401 if (ndr_flags
& NDR_BUFFERS
) {
10402 if (r
->attribute_name
) {
10403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
10404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
10406 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->attribute_name
, ndr_charset_length(r
->attribute_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10408 if (r
->object_dn
) {
10409 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
10410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
10412 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_dn
, ndr_charset_length(r
->object_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10415 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->binary
));
10417 if (r
->originating_dsa_dn
) {
10418 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->originating_dsa_dn
, CH_UTF16
)));
10419 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10420 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->originating_dsa_dn
, CH_UTF16
)));
10421 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->originating_dsa_dn
, ndr_charset_length(r
->originating_dsa_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10424 return NDR_ERR_SUCCESS
;
10427 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttrValMetaData2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttrValMetaData2
*r
)
10429 uint32_t _ptr_attribute_name
;
10430 TALLOC_CTX
*_mem_save_attribute_name_0
;
10431 uint32_t _ptr_object_dn
;
10432 TALLOC_CTX
*_mem_save_object_dn_0
;
10433 uint32_t _ptr_binary
;
10434 TALLOC_CTX
*_mem_save_binary_0
;
10435 uint32_t _ptr_originating_dsa_dn
;
10436 TALLOC_CTX
*_mem_save_originating_dsa_dn_0
;
10437 if (ndr_flags
& NDR_SCALARS
) {
10438 NDR_CHECK(ndr_pull_align(ndr
, 8));
10439 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attribute_name
));
10440 if (_ptr_attribute_name
) {
10441 NDR_PULL_ALLOC(ndr
, r
->attribute_name
);
10443 r
->attribute_name
= NULL
;
10445 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_dn
));
10446 if (_ptr_object_dn
) {
10447 NDR_PULL_ALLOC(ndr
, r
->object_dn
);
10449 r
->object_dn
= NULL
;
10451 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_binary
));
10452 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_binary
));
10454 NDR_PULL_ALLOC(ndr
, r
->binary
);
10458 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->deleted
));
10459 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->created
));
10460 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
10461 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
10462 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
10463 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
10464 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->local_usn
));
10465 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_originating_dsa_dn
));
10466 if (_ptr_originating_dsa_dn
) {
10467 NDR_PULL_ALLOC(ndr
, r
->originating_dsa_dn
);
10469 r
->originating_dsa_dn
= NULL
;
10472 if (ndr_flags
& NDR_BUFFERS
) {
10473 if (r
->attribute_name
) {
10474 _mem_save_attribute_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10475 NDR_PULL_SET_MEM_CTX(ndr
, r
->attribute_name
, 0);
10476 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attribute_name
));
10477 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->attribute_name
));
10478 if (ndr_get_array_length(ndr
, &r
->attribute_name
) > ndr_get_array_size(ndr
, &r
->attribute_name
)) {
10479 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->attribute_name
), ndr_get_array_length(ndr
, &r
->attribute_name
));
10481 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t)));
10482 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->attribute_name
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t), CH_UTF16
));
10483 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attribute_name_0
, 0);
10485 if (r
->object_dn
) {
10486 _mem_save_object_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10487 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_dn
, 0);
10488 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_dn
));
10489 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_dn
));
10490 if (ndr_get_array_length(ndr
, &r
->object_dn
) > ndr_get_array_size(ndr
, &r
->object_dn
)) {
10491 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->object_dn
), ndr_get_array_length(ndr
, &r
->object_dn
));
10493 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t)));
10494 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_dn
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t), CH_UTF16
));
10495 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_dn_0
, 0);
10498 _mem_save_binary_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10499 NDR_PULL_SET_MEM_CTX(ndr
, r
->binary
, 0);
10500 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->binary
));
10501 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_binary_0
, 0);
10503 if (r
->originating_dsa_dn
) {
10504 _mem_save_originating_dsa_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10505 NDR_PULL_SET_MEM_CTX(ndr
, r
->originating_dsa_dn
, 0);
10506 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->originating_dsa_dn
));
10507 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->originating_dsa_dn
));
10508 if (ndr_get_array_length(ndr
, &r
->originating_dsa_dn
) > ndr_get_array_size(ndr
, &r
->originating_dsa_dn
)) {
10509 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->originating_dsa_dn
), ndr_get_array_length(ndr
, &r
->originating_dsa_dn
));
10511 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->originating_dsa_dn
), sizeof(uint16_t)));
10512 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->originating_dsa_dn
, ndr_get_array_length(ndr
, &r
->originating_dsa_dn
), sizeof(uint16_t), CH_UTF16
));
10513 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_originating_dsa_dn_0
, 0);
10516 return NDR_ERR_SUCCESS
;
10519 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttrValMetaData2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttrValMetaData2
*r
)
10521 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttrValMetaData2");
10523 ndr_print_ptr(ndr
, "attribute_name", r
->attribute_name
);
10525 if (r
->attribute_name
) {
10526 ndr_print_string(ndr
, "attribute_name", r
->attribute_name
);
10529 ndr_print_ptr(ndr
, "object_dn", r
->object_dn
);
10531 if (r
->object_dn
) {
10532 ndr_print_string(ndr
, "object_dn", r
->object_dn
);
10535 ndr_print_uint32(ndr
, "__ndr_size_binary", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_DATA_BLOB(0, r
->binary
, 0):r
->__ndr_size_binary
);
10536 ndr_print_ptr(ndr
, "binary", r
->binary
);
10539 ndr_print_DATA_BLOB(ndr
, "binary", *r
->binary
);
10542 ndr_print_NTTIME(ndr
, "deleted", r
->deleted
);
10543 ndr_print_NTTIME(ndr
, "created", r
->created
);
10544 ndr_print_uint32(ndr
, "version", r
->version
);
10545 ndr_print_NTTIME(ndr
, "originating_change_time", r
->originating_change_time
);
10546 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
10547 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
10548 ndr_print_hyper(ndr
, "local_usn", r
->local_usn
);
10549 ndr_print_ptr(ndr
, "originating_dsa_dn", r
->originating_dsa_dn
);
10551 if (r
->originating_dsa_dn
) {
10552 ndr_print_string(ndr
, "originating_dsa_dn", r
->originating_dsa_dn
);
10558 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttrValMetaData2Ctr
*r
)
10560 uint32_t cntr_array_0
;
10561 if (ndr_flags
& NDR_SCALARS
) {
10562 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10563 NDR_CHECK(ndr_push_align(ndr
, 8));
10564 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10565 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->enumeration_context
));
10566 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10567 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10570 if (ndr_flags
& NDR_BUFFERS
) {
10571 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10572 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10575 return NDR_ERR_SUCCESS
;
10578 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttrValMetaData2Ctr
*r
)
10580 uint32_t cntr_array_0
;
10581 TALLOC_CTX
*_mem_save_array_0
;
10582 if (ndr_flags
& NDR_SCALARS
) {
10583 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10584 NDR_CHECK(ndr_pull_align(ndr
, 8));
10585 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10586 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->enumeration_context
));
10587 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10588 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10589 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10590 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10591 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10593 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10595 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10598 if (ndr_flags
& NDR_BUFFERS
) {
10599 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10600 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10601 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10602 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10604 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10606 return NDR_ERR_SUCCESS
;
10609 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttrValMetaData2Ctr
*r
)
10611 uint32_t cntr_array_0
;
10612 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttrValMetaData2Ctr");
10614 ndr_print_uint32(ndr
, "count", r
->count
);
10615 ndr_print_int32(ndr
, "enumeration_context", r
->enumeration_context
);
10616 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
10618 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
10620 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
10621 ndr_print_drsuapi_DsReplicaAttrValMetaData2(ndr
, "array", &r
->array
[cntr_array_0
]);
10629 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaConnection04(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaConnection04
*r
)
10631 if (ndr_flags
& NDR_SCALARS
) {
10632 NDR_CHECK(ndr_push_align(ndr
, 8));
10633 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->u1
));
10634 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u2
));
10635 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u3
));
10636 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->bind_guid
));
10637 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->bind_time
));
10639 uint32_t _flags_save_ipv4address
= ndr
->flags
;
10640 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_BIGENDIAN
);
10641 NDR_CHECK(ndr_push_ipv4address(ndr
, NDR_SCALARS
, r
->client_ip_address
));
10642 ndr
->flags
= _flags_save_ipv4address
;
10644 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u5
));
10646 if (ndr_flags
& NDR_BUFFERS
) {
10648 return NDR_ERR_SUCCESS
;
10651 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaConnection04(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaConnection04
*r
)
10653 if (ndr_flags
& NDR_SCALARS
) {
10654 NDR_CHECK(ndr_pull_align(ndr
, 8));
10655 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->u1
));
10656 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u2
));
10657 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u3
));
10658 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->bind_guid
));
10659 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->bind_time
));
10661 uint32_t _flags_save_ipv4address
= ndr
->flags
;
10662 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_BIGENDIAN
);
10663 NDR_CHECK(ndr_pull_ipv4address(ndr
, NDR_SCALARS
, &r
->client_ip_address
));
10664 ndr
->flags
= _flags_save_ipv4address
;
10666 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u5
));
10668 if (ndr_flags
& NDR_BUFFERS
) {
10670 return NDR_ERR_SUCCESS
;
10673 _PUBLIC_
void ndr_print_drsuapi_DsReplicaConnection04(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaConnection04
*r
)
10675 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaConnection04");
10677 ndr_print_hyper(ndr
, "u1", r
->u1
);
10678 ndr_print_uint32(ndr
, "u2", r
->u2
);
10679 ndr_print_uint32(ndr
, "u3", r
->u3
);
10680 ndr_print_GUID(ndr
, "bind_guid", &r
->bind_guid
);
10681 ndr_print_NTTIME_1sec(ndr
, "bind_time", r
->bind_time
);
10682 ndr_print_ipv4address(ndr
, "client_ip_address", r
->client_ip_address
);
10683 ndr_print_uint32(ndr
, "u5", r
->u5
);
10687 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaConnection04Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaConnection04Ctr
*r
)
10689 uint32_t cntr_array_0
;
10690 if (ndr_flags
& NDR_SCALARS
) {
10691 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10692 NDR_CHECK(ndr_push_align(ndr
, 8));
10693 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10694 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
10695 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10696 NDR_CHECK(ndr_push_drsuapi_DsReplicaConnection04(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10699 if (ndr_flags
& NDR_BUFFERS
) {
10701 return NDR_ERR_SUCCESS
;
10704 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaConnection04Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaConnection04Ctr
*r
)
10706 uint32_t cntr_array_0
;
10707 TALLOC_CTX
*_mem_save_array_0
;
10708 if (ndr_flags
& NDR_SCALARS
) {
10709 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10710 NDR_CHECK(ndr_pull_align(ndr
, 8));
10711 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10712 if (r
->count
> 10000) {
10713 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
10715 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
10716 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10717 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10718 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10719 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10720 NDR_CHECK(ndr_pull_drsuapi_DsReplicaConnection04(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10722 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10724 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10727 if (ndr_flags
& NDR_BUFFERS
) {
10729 return NDR_ERR_SUCCESS
;
10732 _PUBLIC_
void ndr_print_drsuapi_DsReplicaConnection04Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaConnection04Ctr
*r
)
10734 uint32_t cntr_array_0
;
10735 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaConnection04Ctr");
10737 ndr_print_uint32(ndr
, "count", r
->count
);
10738 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
10739 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
10741 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
10743 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
10744 ndr_print_drsuapi_DsReplicaConnection04(ndr
, "array", &r
->array
[cntr_array_0
]);
10752 static enum ndr_err_code
ndr_push_drsuapi_DsReplica06(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplica06
*r
)
10754 if (ndr_flags
& NDR_SCALARS
) {
10755 NDR_CHECK(ndr_push_align(ndr
, 8));
10756 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->str1
));
10757 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u1
));
10758 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u2
));
10759 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u3
));
10760 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u4
));
10761 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u5
));
10762 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->u6
));
10763 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u7
));
10765 if (ndr_flags
& NDR_BUFFERS
) {
10767 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->str1
, CH_UTF16
)));
10768 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10769 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->str1
, CH_UTF16
)));
10770 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->str1
, ndr_charset_length(r
->str1
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10773 return NDR_ERR_SUCCESS
;
10776 static enum ndr_err_code
ndr_pull_drsuapi_DsReplica06(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplica06
*r
)
10778 uint32_t _ptr_str1
;
10779 TALLOC_CTX
*_mem_save_str1_0
;
10780 if (ndr_flags
& NDR_SCALARS
) {
10781 NDR_CHECK(ndr_pull_align(ndr
, 8));
10782 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_str1
));
10784 NDR_PULL_ALLOC(ndr
, r
->str1
);
10788 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u1
));
10789 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u2
));
10790 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u3
));
10791 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u4
));
10792 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u5
));
10793 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->u6
));
10794 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u7
));
10796 if (ndr_flags
& NDR_BUFFERS
) {
10798 _mem_save_str1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10799 NDR_PULL_SET_MEM_CTX(ndr
, r
->str1
, 0);
10800 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->str1
));
10801 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->str1
));
10802 if (ndr_get_array_length(ndr
, &r
->str1
) > ndr_get_array_size(ndr
, &r
->str1
)) {
10803 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->str1
), ndr_get_array_length(ndr
, &r
->str1
));
10805 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->str1
), sizeof(uint16_t)));
10806 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->str1
, ndr_get_array_length(ndr
, &r
->str1
), sizeof(uint16_t), CH_UTF16
));
10807 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_str1_0
, 0);
10810 return NDR_ERR_SUCCESS
;
10813 _PUBLIC_
void ndr_print_drsuapi_DsReplica06(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplica06
*r
)
10815 ndr_print_struct(ndr
, name
, "drsuapi_DsReplica06");
10817 ndr_print_ptr(ndr
, "str1", r
->str1
);
10820 ndr_print_string(ndr
, "str1", r
->str1
);
10823 ndr_print_uint32(ndr
, "u1", r
->u1
);
10824 ndr_print_uint32(ndr
, "u2", r
->u2
);
10825 ndr_print_uint32(ndr
, "u3", r
->u3
);
10826 ndr_print_uint32(ndr
, "u4", r
->u4
);
10827 ndr_print_uint32(ndr
, "u5", r
->u5
);
10828 ndr_print_hyper(ndr
, "u6", r
->u6
);
10829 ndr_print_uint32(ndr
, "u7", r
->u7
);
10833 static enum ndr_err_code
ndr_push_drsuapi_DsReplica06Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplica06Ctr
*r
)
10835 uint32_t cntr_array_0
;
10836 if (ndr_flags
& NDR_SCALARS
) {
10837 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10838 NDR_CHECK(ndr_push_align(ndr
, 8));
10839 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10840 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
10841 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10842 NDR_CHECK(ndr_push_drsuapi_DsReplica06(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10845 if (ndr_flags
& NDR_BUFFERS
) {
10846 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10847 NDR_CHECK(ndr_push_drsuapi_DsReplica06(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10850 return NDR_ERR_SUCCESS
;
10853 static enum ndr_err_code
ndr_pull_drsuapi_DsReplica06Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplica06Ctr
*r
)
10855 uint32_t cntr_array_0
;
10856 TALLOC_CTX
*_mem_save_array_0
;
10857 if (ndr_flags
& NDR_SCALARS
) {
10858 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10859 NDR_CHECK(ndr_pull_align(ndr
, 8));
10860 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10861 if (r
->count
> 256) {
10862 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
10864 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
10865 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10866 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10867 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10868 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10869 NDR_CHECK(ndr_pull_drsuapi_DsReplica06(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10871 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10873 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10876 if (ndr_flags
& NDR_BUFFERS
) {
10877 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10878 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10879 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10880 NDR_CHECK(ndr_pull_drsuapi_DsReplica06(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10882 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10884 return NDR_ERR_SUCCESS
;
10887 _PUBLIC_
void ndr_print_drsuapi_DsReplica06Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplica06Ctr
*r
)
10889 uint32_t cntr_array_0
;
10890 ndr_print_struct(ndr
, name
, "drsuapi_DsReplica06Ctr");
10892 ndr_print_uint32(ndr
, "count", r
->count
);
10893 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
10894 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
10896 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
10898 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
10899 ndr_print_drsuapi_DsReplica06(ndr
, "array", &r
->array
[cntr_array_0
]);
10907 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaInfo(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaInfo
*r
)
10909 if (ndr_flags
& NDR_SCALARS
) {
10910 int level
= ndr_push_get_switch_value(ndr
, r
);
10911 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, level
));
10913 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
: {
10914 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->neighbours
));
10917 case DRSUAPI_DS_REPLICA_INFO_CURSORS
: {
10918 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->cursors
));
10921 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
: {
10922 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->objmetadata
));
10925 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
: {
10926 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->connectfailures
));
10929 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
: {
10930 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->linkfailures
));
10933 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
: {
10934 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->pendingops
));
10937 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
: {
10938 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attrvalmetadata
));
10941 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
: {
10942 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->cursors2
));
10945 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
: {
10946 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->cursors3
));
10949 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
: {
10950 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->objmetadata2
));
10953 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
: {
10954 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attrvalmetadata2
));
10957 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
: {
10958 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->neighbours02
));
10961 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
: {
10962 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->connections04
));
10965 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
: {
10966 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->cursors05
));
10969 case DRSUAPI_DS_REPLICA_INFO_06
: {
10970 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->i06
));
10974 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
10977 if (ndr_flags
& NDR_BUFFERS
) {
10978 int level
= ndr_push_get_switch_value(ndr
, r
);
10980 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
:
10981 if (r
->neighbours
) {
10982 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->neighbours
));
10986 case DRSUAPI_DS_REPLICA_INFO_CURSORS
:
10988 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtr(ndr
, NDR_SCALARS
, r
->cursors
));
10992 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
:
10993 if (r
->objmetadata
) {
10994 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaDataCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->objmetadata
));
10998 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
:
10999 if (r
->connectfailures
) {
11000 NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->connectfailures
));
11004 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
:
11005 if (r
->linkfailures
) {
11006 NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->linkfailures
));
11010 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
:
11011 if (r
->pendingops
) {
11012 NDR_CHECK(ndr_push_drsuapi_DsReplicaOpCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->pendingops
));
11016 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
:
11017 if (r
->attrvalmetadata
) {
11018 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaDataCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->attrvalmetadata
));
11022 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
:
11024 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2Ctr(ndr
, NDR_SCALARS
, r
->cursors2
));
11028 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
:
11030 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->cursors3
));
11034 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
:
11035 if (r
->objmetadata2
) {
11036 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->objmetadata2
));
11040 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
:
11041 if (r
->attrvalmetadata2
) {
11042 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->attrvalmetadata2
));
11046 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
:
11047 if (r
->neighbours02
) {
11048 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->neighbours02
));
11052 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
:
11053 if (r
->connections04
) {
11054 NDR_CHECK(ndr_push_drsuapi_DsReplicaConnection04Ctr(ndr
, NDR_SCALARS
, r
->connections04
));
11058 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
:
11059 if (r
->cursors05
) {
11060 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->cursors05
));
11064 case DRSUAPI_DS_REPLICA_INFO_06
:
11066 NDR_CHECK(ndr_push_drsuapi_DsReplica06Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->i06
));
11071 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11074 return NDR_ERR_SUCCESS
;
11077 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaInfo(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaInfo
*r
)
11081 TALLOC_CTX
*_mem_save_neighbours_0
;
11082 TALLOC_CTX
*_mem_save_cursors_0
;
11083 TALLOC_CTX
*_mem_save_objmetadata_0
;
11084 TALLOC_CTX
*_mem_save_connectfailures_0
;
11085 TALLOC_CTX
*_mem_save_linkfailures_0
;
11086 TALLOC_CTX
*_mem_save_pendingops_0
;
11087 TALLOC_CTX
*_mem_save_attrvalmetadata_0
;
11088 TALLOC_CTX
*_mem_save_cursors2_0
;
11089 TALLOC_CTX
*_mem_save_cursors3_0
;
11090 TALLOC_CTX
*_mem_save_objmetadata2_0
;
11091 TALLOC_CTX
*_mem_save_attrvalmetadata2_0
;
11092 TALLOC_CTX
*_mem_save_neighbours02_0
;
11093 TALLOC_CTX
*_mem_save_connections04_0
;
11094 TALLOC_CTX
*_mem_save_cursors05_0
;
11095 TALLOC_CTX
*_mem_save_i06_0
;
11096 level
= ndr_pull_get_switch_value(ndr
, r
);
11097 if (ndr_flags
& NDR_SCALARS
) {
11098 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
11099 if (_level
!= level
) {
11100 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
11103 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
: {
11104 uint32_t _ptr_neighbours
;
11105 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_neighbours
));
11106 if (_ptr_neighbours
) {
11107 NDR_PULL_ALLOC(ndr
, r
->neighbours
);
11109 r
->neighbours
= NULL
;
11113 case DRSUAPI_DS_REPLICA_INFO_CURSORS
: {
11114 uint32_t _ptr_cursors
;
11115 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_cursors
));
11116 if (_ptr_cursors
) {
11117 NDR_PULL_ALLOC(ndr
, r
->cursors
);
11123 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
: {
11124 uint32_t _ptr_objmetadata
;
11125 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_objmetadata
));
11126 if (_ptr_objmetadata
) {
11127 NDR_PULL_ALLOC(ndr
, r
->objmetadata
);
11129 r
->objmetadata
= NULL
;
11133 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
: {
11134 uint32_t _ptr_connectfailures
;
11135 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_connectfailures
));
11136 if (_ptr_connectfailures
) {
11137 NDR_PULL_ALLOC(ndr
, r
->connectfailures
);
11139 r
->connectfailures
= NULL
;
11143 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
: {
11144 uint32_t _ptr_linkfailures
;
11145 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_linkfailures
));
11146 if (_ptr_linkfailures
) {
11147 NDR_PULL_ALLOC(ndr
, r
->linkfailures
);
11149 r
->linkfailures
= NULL
;
11153 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
: {
11154 uint32_t _ptr_pendingops
;
11155 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_pendingops
));
11156 if (_ptr_pendingops
) {
11157 NDR_PULL_ALLOC(ndr
, r
->pendingops
);
11159 r
->pendingops
= NULL
;
11163 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
: {
11164 uint32_t _ptr_attrvalmetadata
;
11165 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attrvalmetadata
));
11166 if (_ptr_attrvalmetadata
) {
11167 NDR_PULL_ALLOC(ndr
, r
->attrvalmetadata
);
11169 r
->attrvalmetadata
= NULL
;
11173 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
: {
11174 uint32_t _ptr_cursors2
;
11175 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_cursors2
));
11176 if (_ptr_cursors2
) {
11177 NDR_PULL_ALLOC(ndr
, r
->cursors2
);
11179 r
->cursors2
= NULL
;
11183 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
: {
11184 uint32_t _ptr_cursors3
;
11185 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_cursors3
));
11186 if (_ptr_cursors3
) {
11187 NDR_PULL_ALLOC(ndr
, r
->cursors3
);
11189 r
->cursors3
= NULL
;
11193 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
: {
11194 uint32_t _ptr_objmetadata2
;
11195 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_objmetadata2
));
11196 if (_ptr_objmetadata2
) {
11197 NDR_PULL_ALLOC(ndr
, r
->objmetadata2
);
11199 r
->objmetadata2
= NULL
;
11203 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
: {
11204 uint32_t _ptr_attrvalmetadata2
;
11205 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attrvalmetadata2
));
11206 if (_ptr_attrvalmetadata2
) {
11207 NDR_PULL_ALLOC(ndr
, r
->attrvalmetadata2
);
11209 r
->attrvalmetadata2
= NULL
;
11213 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
: {
11214 uint32_t _ptr_neighbours02
;
11215 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_neighbours02
));
11216 if (_ptr_neighbours02
) {
11217 NDR_PULL_ALLOC(ndr
, r
->neighbours02
);
11219 r
->neighbours02
= NULL
;
11223 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
: {
11224 uint32_t _ptr_connections04
;
11225 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_connections04
));
11226 if (_ptr_connections04
) {
11227 NDR_PULL_ALLOC(ndr
, r
->connections04
);
11229 r
->connections04
= NULL
;
11233 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
: {
11234 uint32_t _ptr_cursors05
;
11235 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_cursors05
));
11236 if (_ptr_cursors05
) {
11237 NDR_PULL_ALLOC(ndr
, r
->cursors05
);
11239 r
->cursors05
= NULL
;
11243 case DRSUAPI_DS_REPLICA_INFO_06
: {
11245 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_i06
));
11247 NDR_PULL_ALLOC(ndr
, r
->i06
);
11254 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11257 if (ndr_flags
& NDR_BUFFERS
) {
11259 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
:
11260 if (r
->neighbours
) {
11261 _mem_save_neighbours_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11262 NDR_PULL_SET_MEM_CTX(ndr
, r
->neighbours
, 0);
11263 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->neighbours
));
11264 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_neighbours_0
, 0);
11268 case DRSUAPI_DS_REPLICA_INFO_CURSORS
:
11270 _mem_save_cursors_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11271 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors
, 0);
11272 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtr(ndr
, NDR_SCALARS
, r
->cursors
));
11273 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors_0
, 0);
11277 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
:
11278 if (r
->objmetadata
) {
11279 _mem_save_objmetadata_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11280 NDR_PULL_SET_MEM_CTX(ndr
, r
->objmetadata
, 0);
11281 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaDataCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->objmetadata
));
11282 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objmetadata_0
, 0);
11286 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
:
11287 if (r
->connectfailures
) {
11288 _mem_save_connectfailures_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11289 NDR_PULL_SET_MEM_CTX(ndr
, r
->connectfailures
, 0);
11290 NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->connectfailures
));
11291 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connectfailures_0
, 0);
11295 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
:
11296 if (r
->linkfailures
) {
11297 _mem_save_linkfailures_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11298 NDR_PULL_SET_MEM_CTX(ndr
, r
->linkfailures
, 0);
11299 NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->linkfailures
));
11300 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_linkfailures_0
, 0);
11304 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
:
11305 if (r
->pendingops
) {
11306 _mem_save_pendingops_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11307 NDR_PULL_SET_MEM_CTX(ndr
, r
->pendingops
, 0);
11308 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOpCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->pendingops
));
11309 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_pendingops_0
, 0);
11313 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
:
11314 if (r
->attrvalmetadata
) {
11315 _mem_save_attrvalmetadata_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11316 NDR_PULL_SET_MEM_CTX(ndr
, r
->attrvalmetadata
, 0);
11317 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaDataCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->attrvalmetadata
));
11318 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attrvalmetadata_0
, 0);
11322 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
:
11324 _mem_save_cursors2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11325 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors2
, 0);
11326 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2Ctr(ndr
, NDR_SCALARS
, r
->cursors2
));
11327 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors2_0
, 0);
11331 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
:
11333 _mem_save_cursors3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11334 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors3
, 0);
11335 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->cursors3
));
11336 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors3_0
, 0);
11340 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
:
11341 if (r
->objmetadata2
) {
11342 _mem_save_objmetadata2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11343 NDR_PULL_SET_MEM_CTX(ndr
, r
->objmetadata2
, 0);
11344 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->objmetadata2
));
11345 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objmetadata2_0
, 0);
11349 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
:
11350 if (r
->attrvalmetadata2
) {
11351 _mem_save_attrvalmetadata2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11352 NDR_PULL_SET_MEM_CTX(ndr
, r
->attrvalmetadata2
, 0);
11353 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->attrvalmetadata2
));
11354 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attrvalmetadata2_0
, 0);
11358 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
:
11359 if (r
->neighbours02
) {
11360 _mem_save_neighbours02_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11361 NDR_PULL_SET_MEM_CTX(ndr
, r
->neighbours02
, 0);
11362 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->neighbours02
));
11363 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_neighbours02_0
, 0);
11367 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
:
11368 if (r
->connections04
) {
11369 _mem_save_connections04_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11370 NDR_PULL_SET_MEM_CTX(ndr
, r
->connections04
, 0);
11371 NDR_CHECK(ndr_pull_drsuapi_DsReplicaConnection04Ctr(ndr
, NDR_SCALARS
, r
->connections04
));
11372 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connections04_0
, 0);
11376 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
:
11377 if (r
->cursors05
) {
11378 _mem_save_cursors05_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11379 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors05
, 0);
11380 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->cursors05
));
11381 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors05_0
, 0);
11385 case DRSUAPI_DS_REPLICA_INFO_06
:
11387 _mem_save_i06_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11388 NDR_PULL_SET_MEM_CTX(ndr
, r
->i06
, 0);
11389 NDR_CHECK(ndr_pull_drsuapi_DsReplica06Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->i06
));
11390 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_i06_0
, 0);
11395 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11398 return NDR_ERR_SUCCESS
;
11401 _PUBLIC_
void ndr_print_drsuapi_DsReplicaInfo(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaInfo
*r
)
11404 level
= ndr_print_get_switch_value(ndr
, r
);
11405 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaInfo");
11407 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
:
11408 ndr_print_ptr(ndr
, "neighbours", r
->neighbours
);
11410 if (r
->neighbours
) {
11411 ndr_print_drsuapi_DsReplicaNeighbourCtr(ndr
, "neighbours", r
->neighbours
);
11416 case DRSUAPI_DS_REPLICA_INFO_CURSORS
:
11417 ndr_print_ptr(ndr
, "cursors", r
->cursors
);
11420 ndr_print_drsuapi_DsReplicaCursorCtr(ndr
, "cursors", r
->cursors
);
11425 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
:
11426 ndr_print_ptr(ndr
, "objmetadata", r
->objmetadata
);
11428 if (r
->objmetadata
) {
11429 ndr_print_drsuapi_DsReplicaObjMetaDataCtr(ndr
, "objmetadata", r
->objmetadata
);
11434 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
:
11435 ndr_print_ptr(ndr
, "connectfailures", r
->connectfailures
);
11437 if (r
->connectfailures
) {
11438 ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, "connectfailures", r
->connectfailures
);
11443 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
:
11444 ndr_print_ptr(ndr
, "linkfailures", r
->linkfailures
);
11446 if (r
->linkfailures
) {
11447 ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, "linkfailures", r
->linkfailures
);
11452 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
:
11453 ndr_print_ptr(ndr
, "pendingops", r
->pendingops
);
11455 if (r
->pendingops
) {
11456 ndr_print_drsuapi_DsReplicaOpCtr(ndr
, "pendingops", r
->pendingops
);
11461 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
:
11462 ndr_print_ptr(ndr
, "attrvalmetadata", r
->attrvalmetadata
);
11464 if (r
->attrvalmetadata
) {
11465 ndr_print_drsuapi_DsReplicaAttrValMetaDataCtr(ndr
, "attrvalmetadata", r
->attrvalmetadata
);
11470 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
:
11471 ndr_print_ptr(ndr
, "cursors2", r
->cursors2
);
11474 ndr_print_drsuapi_DsReplicaCursor2Ctr(ndr
, "cursors2", r
->cursors2
);
11479 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
:
11480 ndr_print_ptr(ndr
, "cursors3", r
->cursors3
);
11483 ndr_print_drsuapi_DsReplicaCursor3Ctr(ndr
, "cursors3", r
->cursors3
);
11488 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
:
11489 ndr_print_ptr(ndr
, "objmetadata2", r
->objmetadata2
);
11491 if (r
->objmetadata2
) {
11492 ndr_print_drsuapi_DsReplicaObjMetaData2Ctr(ndr
, "objmetadata2", r
->objmetadata2
);
11497 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
:
11498 ndr_print_ptr(ndr
, "attrvalmetadata2", r
->attrvalmetadata2
);
11500 if (r
->attrvalmetadata2
) {
11501 ndr_print_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr
, "attrvalmetadata2", r
->attrvalmetadata2
);
11506 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
:
11507 ndr_print_ptr(ndr
, "neighbours02", r
->neighbours02
);
11509 if (r
->neighbours02
) {
11510 ndr_print_drsuapi_DsReplicaNeighbourCtr(ndr
, "neighbours02", r
->neighbours02
);
11515 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
:
11516 ndr_print_ptr(ndr
, "connections04", r
->connections04
);
11518 if (r
->connections04
) {
11519 ndr_print_drsuapi_DsReplicaConnection04Ctr(ndr
, "connections04", r
->connections04
);
11524 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
:
11525 ndr_print_ptr(ndr
, "cursors05", r
->cursors05
);
11527 if (r
->cursors05
) {
11528 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr
, "cursors05", r
->cursors05
);
11533 case DRSUAPI_DS_REPLICA_INFO_06
:
11534 ndr_print_ptr(ndr
, "i06", r
->i06
);
11537 ndr_print_drsuapi_DsReplica06Ctr(ndr
, "i06", r
->i06
);
11543 ndr_print_bad_level(ndr
, name
, level
);
11547 static enum ndr_err_code
ndr_push_drsuapi_DsGetMemberships2Ctr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetMemberships2Ctr
*r
)
11549 if (ndr_flags
& NDR_SCALARS
) {
11550 int level
= ndr_push_get_switch_value(ndr
, r
);
11551 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
11554 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
11558 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11561 if (ndr_flags
& NDR_BUFFERS
) {
11562 int level
= ndr_push_get_switch_value(ndr
, r
);
11565 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
11569 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11572 return NDR_ERR_SUCCESS
;
11575 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMemberships2Ctr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetMemberships2Ctr
*r
)
11579 level
= ndr_pull_get_switch_value(ndr
, r
);
11580 if (ndr_flags
& NDR_SCALARS
) {
11581 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
11582 if (_level
!= level
) {
11583 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
11587 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
11591 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11594 if (ndr_flags
& NDR_BUFFERS
) {
11597 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
11601 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11604 return NDR_ERR_SUCCESS
;
11607 _PUBLIC_
void ndr_print_drsuapi_DsGetMemberships2Ctr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetMemberships2Ctr
*r
)
11610 level
= ndr_print_get_switch_value(ndr
, r
);
11611 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetMemberships2Ctr");
11614 ndr_print_drsuapi_DsGetMembershipsCtr1(ndr
, "ctr1", &r
->ctr1
);
11618 ndr_print_bad_level(ndr
, name
, level
);
11622 static enum ndr_err_code
ndr_push_drsuapi_DsGetMemberships2Request1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetMemberships2Request1
*r
)
11624 uint32_t cntr_req_array_1
;
11625 if (ndr_flags
& NDR_SCALARS
) {
11626 NDR_CHECK(ndr_push_align(ndr
, 4));
11627 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_req
));
11628 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->req_array
));
11630 if (ndr_flags
& NDR_BUFFERS
) {
11631 if (r
->req_array
) {
11632 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_req
));
11633 for (cntr_req_array_1
= 0; cntr_req_array_1
< r
->num_req
; cntr_req_array_1
++) {
11634 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->req_array
[cntr_req_array_1
]));
11636 for (cntr_req_array_1
= 0; cntr_req_array_1
< r
->num_req
; cntr_req_array_1
++) {
11637 if (r
->req_array
[cntr_req_array_1
]) {
11638 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->req_array
[cntr_req_array_1
]));
11643 return NDR_ERR_SUCCESS
;
11646 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMemberships2Request1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetMemberships2Request1
*r
)
11648 uint32_t _ptr_req_array
;
11649 uint32_t cntr_req_array_1
;
11650 TALLOC_CTX
*_mem_save_req_array_0
;
11651 TALLOC_CTX
*_mem_save_req_array_1
;
11652 TALLOC_CTX
*_mem_save_req_array_2
;
11653 if (ndr_flags
& NDR_SCALARS
) {
11654 NDR_CHECK(ndr_pull_align(ndr
, 4));
11655 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_req
));
11656 if (r
->num_req
< 1 || r
->num_req
> 10000) {
11657 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
11659 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_req_array
));
11660 if (_ptr_req_array
) {
11661 NDR_PULL_ALLOC(ndr
, r
->req_array
);
11663 r
->req_array
= NULL
;
11666 if (ndr_flags
& NDR_BUFFERS
) {
11667 if (r
->req_array
) {
11668 _mem_save_req_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11669 NDR_PULL_SET_MEM_CTX(ndr
, r
->req_array
, 0);
11670 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->req_array
));
11671 NDR_PULL_ALLOC_N(ndr
, r
->req_array
, ndr_get_array_size(ndr
, &r
->req_array
));
11672 _mem_save_req_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11673 NDR_PULL_SET_MEM_CTX(ndr
, r
->req_array
, 0);
11674 for (cntr_req_array_1
= 0; cntr_req_array_1
< r
->num_req
; cntr_req_array_1
++) {
11675 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_req_array
));
11676 if (_ptr_req_array
) {
11677 NDR_PULL_ALLOC(ndr
, r
->req_array
[cntr_req_array_1
]);
11679 r
->req_array
[cntr_req_array_1
] = NULL
;
11682 for (cntr_req_array_1
= 0; cntr_req_array_1
< r
->num_req
; cntr_req_array_1
++) {
11683 if (r
->req_array
[cntr_req_array_1
]) {
11684 _mem_save_req_array_2
= NDR_PULL_GET_MEM_CTX(ndr
);
11685 NDR_PULL_SET_MEM_CTX(ndr
, r
->req_array
[cntr_req_array_1
], 0);
11686 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->req_array
[cntr_req_array_1
]));
11687 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_array_2
, 0);
11690 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_array_1
, 0);
11691 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_array_0
, 0);
11693 if (r
->req_array
) {
11694 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->req_array
, r
->num_req
));
11697 return NDR_ERR_SUCCESS
;
11700 _PUBLIC_
void ndr_print_drsuapi_DsGetMemberships2Request1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetMemberships2Request1
*r
)
11702 uint32_t cntr_req_array_1
;
11703 ndr_print_struct(ndr
, name
, "drsuapi_DsGetMemberships2Request1");
11705 ndr_print_uint32(ndr
, "num_req", r
->num_req
);
11706 ndr_print_ptr(ndr
, "req_array", r
->req_array
);
11708 if (r
->req_array
) {
11709 ndr
->print(ndr
, "%s: ARRAY(%d)", "req_array", (int)r
->num_req
);
11711 for (cntr_req_array_1
=0;cntr_req_array_1
<r
->num_req
;cntr_req_array_1
++) {
11713 if (asprintf(&idx_1
, "[%d]", cntr_req_array_1
) != -1) {
11714 ndr_print_ptr(ndr
, "req_array", r
->req_array
[cntr_req_array_1
]);
11716 if (r
->req_array
[cntr_req_array_1
]) {
11717 ndr_print_drsuapi_DsGetMembershipsRequest1(ndr
, "req_array", r
->req_array
[cntr_req_array_1
]);
11729 static enum ndr_err_code
ndr_push_drsuapi_DsGetMemberships2Request(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetMemberships2Request
*r
)
11731 if (ndr_flags
& NDR_SCALARS
) {
11732 int level
= ndr_push_get_switch_value(ndr
, r
);
11733 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
11736 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request1(ndr
, NDR_SCALARS
, &r
->req1
));
11740 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11743 if (ndr_flags
& NDR_BUFFERS
) {
11744 int level
= ndr_push_get_switch_value(ndr
, r
);
11747 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request1(ndr
, NDR_BUFFERS
, &r
->req1
));
11751 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11754 return NDR_ERR_SUCCESS
;
11757 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMemberships2Request(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetMemberships2Request
*r
)
11761 level
= ndr_pull_get_switch_value(ndr
, r
);
11762 if (ndr_flags
& NDR_SCALARS
) {
11763 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
11764 if (_level
!= level
) {
11765 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
11769 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request1(ndr
, NDR_SCALARS
, &r
->req1
));
11773 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11776 if (ndr_flags
& NDR_BUFFERS
) {
11779 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request1(ndr
, NDR_BUFFERS
, &r
->req1
));
11783 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11786 return NDR_ERR_SUCCESS
;
11789 _PUBLIC_
void ndr_print_drsuapi_DsGetMemberships2Request(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetMemberships2Request
*r
)
11792 level
= ndr_print_get_switch_value(ndr
, r
);
11793 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetMemberships2Request");
11796 ndr_print_drsuapi_DsGetMemberships2Request1(ndr
, "req1", &r
->req1
);
11800 ndr_print_bad_level(ndr
, name
, level
);
11804 static enum ndr_err_code
ndr_push_drsuapi_DsSiteCostInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsSiteCostInfo
*r
)
11806 if (ndr_flags
& NDR_SCALARS
) {
11807 NDR_CHECK(ndr_push_align(ndr
, 4));
11808 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->error_code
));
11809 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->site_cost
));
11811 if (ndr_flags
& NDR_BUFFERS
) {
11813 return NDR_ERR_SUCCESS
;
11816 static enum ndr_err_code
ndr_pull_drsuapi_DsSiteCostInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsSiteCostInfo
*r
)
11818 if (ndr_flags
& NDR_SCALARS
) {
11819 NDR_CHECK(ndr_pull_align(ndr
, 4));
11820 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->error_code
));
11821 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->site_cost
));
11823 if (ndr_flags
& NDR_BUFFERS
) {
11825 return NDR_ERR_SUCCESS
;
11828 _PUBLIC_
void ndr_print_drsuapi_DsSiteCostInfo(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsSiteCostInfo
*r
)
11830 ndr_print_struct(ndr
, name
, "drsuapi_DsSiteCostInfo");
11832 ndr_print_WERROR(ndr
, "error_code", r
->error_code
);
11833 ndr_print_uint32(ndr
, "site_cost", r
->site_cost
);
11837 static enum ndr_err_code
ndr_push_drsuapi_QuerySitesByCostCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_QuerySitesByCostCtr1
*r
)
11839 uint32_t cntr_info_1
;
11840 if (ndr_flags
& NDR_SCALARS
) {
11841 NDR_CHECK(ndr_push_align(ndr
, 4));
11842 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_info
));
11843 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info
));
11844 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
11846 if (ndr_flags
& NDR_BUFFERS
) {
11848 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_info
));
11849 for (cntr_info_1
= 0; cntr_info_1
< r
->num_info
; cntr_info_1
++) {
11850 NDR_CHECK(ndr_push_drsuapi_DsSiteCostInfo(ndr
, NDR_SCALARS
, &r
->info
[cntr_info_1
]));
11854 return NDR_ERR_SUCCESS
;
11857 static enum ndr_err_code
ndr_pull_drsuapi_QuerySitesByCostCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_QuerySitesByCostCtr1
*r
)
11859 uint32_t _ptr_info
;
11860 uint32_t cntr_info_1
;
11861 TALLOC_CTX
*_mem_save_info_0
;
11862 TALLOC_CTX
*_mem_save_info_1
;
11863 if (ndr_flags
& NDR_SCALARS
) {
11864 NDR_CHECK(ndr_pull_align(ndr
, 4));
11865 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_info
));
11866 if (r
->num_info
> 10000) {
11867 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
11869 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
11871 NDR_PULL_ALLOC(ndr
, r
->info
);
11875 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
11877 if (ndr_flags
& NDR_BUFFERS
) {
11879 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11880 NDR_PULL_SET_MEM_CTX(ndr
, r
->info
, 0);
11881 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->info
));
11882 NDR_PULL_ALLOC_N(ndr
, r
->info
, ndr_get_array_size(ndr
, &r
->info
));
11883 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11884 NDR_PULL_SET_MEM_CTX(ndr
, r
->info
, 0);
11885 for (cntr_info_1
= 0; cntr_info_1
< r
->num_info
; cntr_info_1
++) {
11886 NDR_CHECK(ndr_pull_drsuapi_DsSiteCostInfo(ndr
, NDR_SCALARS
, &r
->info
[cntr_info_1
]));
11888 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
11889 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
11892 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->info
, r
->num_info
));
11895 return NDR_ERR_SUCCESS
;
11898 _PUBLIC_
void ndr_print_drsuapi_QuerySitesByCostCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_QuerySitesByCostCtr1
*r
)
11900 uint32_t cntr_info_1
;
11901 ndr_print_struct(ndr
, name
, "drsuapi_QuerySitesByCostCtr1");
11903 ndr_print_uint32(ndr
, "num_info", r
->num_info
);
11904 ndr_print_ptr(ndr
, "info", r
->info
);
11907 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)r
->num_info
);
11909 for (cntr_info_1
=0;cntr_info_1
<r
->num_info
;cntr_info_1
++) {
11911 if (asprintf(&idx_1
, "[%d]", cntr_info_1
) != -1) {
11912 ndr_print_drsuapi_DsSiteCostInfo(ndr
, "info", &r
->info
[cntr_info_1
]);
11919 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
11923 static enum ndr_err_code
ndr_push_drsuapi_QuerySitesByCostCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_QuerySitesByCostCtr
*r
)
11925 if (ndr_flags
& NDR_SCALARS
) {
11926 int level
= ndr_push_get_switch_value(ndr
, r
);
11927 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
11930 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
11934 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11937 if (ndr_flags
& NDR_BUFFERS
) {
11938 int level
= ndr_push_get_switch_value(ndr
, r
);
11941 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
11945 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11948 return NDR_ERR_SUCCESS
;
11951 static enum ndr_err_code
ndr_pull_drsuapi_QuerySitesByCostCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_QuerySitesByCostCtr
*r
)
11955 level
= ndr_pull_get_switch_value(ndr
, r
);
11956 if (ndr_flags
& NDR_SCALARS
) {
11957 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
11958 if (_level
!= level
) {
11959 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
11963 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
11967 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11970 if (ndr_flags
& NDR_BUFFERS
) {
11973 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
11977 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
11980 return NDR_ERR_SUCCESS
;
11983 _PUBLIC_
void ndr_print_drsuapi_QuerySitesByCostCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_QuerySitesByCostCtr
*r
)
11986 level
= ndr_print_get_switch_value(ndr
, r
);
11987 ndr_print_union(ndr
, name
, level
, "drsuapi_QuerySitesByCostCtr");
11990 ndr_print_drsuapi_QuerySitesByCostCtr1(ndr
, "ctr1", &r
->ctr1
);
11994 ndr_print_bad_level(ndr
, name
, level
);
11998 static enum ndr_err_code
ndr_push_drsuapi_QuerySitesByCostRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_QuerySitesByCostRequest1
*r
)
12000 uint32_t cntr_site_to_1
;
12001 if (ndr_flags
& NDR_SCALARS
) {
12002 NDR_CHECK(ndr_push_align(ndr
, 4));
12003 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_from
));
12004 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_req
));
12005 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_to
));
12006 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
12008 if (ndr_flags
& NDR_BUFFERS
) {
12009 if (r
->site_from
) {
12010 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_from
, CH_UTF16
)));
12011 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12012 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_from
, CH_UTF16
)));
12013 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_from
, ndr_charset_length(r
->site_from
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
12016 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_req
));
12017 for (cntr_site_to_1
= 0; cntr_site_to_1
< r
->num_req
; cntr_site_to_1
++) {
12018 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_to
[cntr_site_to_1
]));
12020 for (cntr_site_to_1
= 0; cntr_site_to_1
< r
->num_req
; cntr_site_to_1
++) {
12021 if (r
->site_to
[cntr_site_to_1
]) {
12022 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_to
[cntr_site_to_1
], CH_UTF16
)));
12023 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12024 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_to
[cntr_site_to_1
], CH_UTF16
)));
12025 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_to
[cntr_site_to_1
], ndr_charset_length(r
->site_to
[cntr_site_to_1
], CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
12030 return NDR_ERR_SUCCESS
;
12033 static enum ndr_err_code
ndr_pull_drsuapi_QuerySitesByCostRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_QuerySitesByCostRequest1
*r
)
12035 uint32_t _ptr_site_from
;
12036 TALLOC_CTX
*_mem_save_site_from_0
;
12037 uint32_t _ptr_site_to
;
12038 uint32_t cntr_site_to_1
;
12039 TALLOC_CTX
*_mem_save_site_to_0
;
12040 TALLOC_CTX
*_mem_save_site_to_1
;
12041 TALLOC_CTX
*_mem_save_site_to_2
;
12042 if (ndr_flags
& NDR_SCALARS
) {
12043 NDR_CHECK(ndr_pull_align(ndr
, 4));
12044 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_from
));
12045 if (_ptr_site_from
) {
12046 NDR_PULL_ALLOC(ndr
, r
->site_from
);
12048 r
->site_from
= NULL
;
12050 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_req
));
12051 if (r
->num_req
< 1 || r
->num_req
> 10000) {
12052 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
12054 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_to
));
12055 if (_ptr_site_to
) {
12056 NDR_PULL_ALLOC(ndr
, r
->site_to
);
12060 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
12062 if (ndr_flags
& NDR_BUFFERS
) {
12063 if (r
->site_from
) {
12064 _mem_save_site_from_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12065 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_from
, 0);
12066 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_from
));
12067 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_from
));
12068 if (ndr_get_array_length(ndr
, &r
->site_from
) > ndr_get_array_size(ndr
, &r
->site_from
)) {
12069 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->site_from
), ndr_get_array_length(ndr
, &r
->site_from
));
12071 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_from
), sizeof(uint16_t)));
12072 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_from
, ndr_get_array_length(ndr
, &r
->site_from
), sizeof(uint16_t), CH_UTF16
));
12073 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_from_0
, 0);
12076 _mem_save_site_to_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12077 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_to
, 0);
12078 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_to
));
12079 NDR_PULL_ALLOC_N(ndr
, r
->site_to
, ndr_get_array_size(ndr
, &r
->site_to
));
12080 _mem_save_site_to_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12081 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_to
, 0);
12082 for (cntr_site_to_1
= 0; cntr_site_to_1
< r
->num_req
; cntr_site_to_1
++) {
12083 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_to
));
12084 if (_ptr_site_to
) {
12085 NDR_PULL_ALLOC(ndr
, r
->site_to
[cntr_site_to_1
]);
12087 r
->site_to
[cntr_site_to_1
] = NULL
;
12090 for (cntr_site_to_1
= 0; cntr_site_to_1
< r
->num_req
; cntr_site_to_1
++) {
12091 if (r
->site_to
[cntr_site_to_1
]) {
12092 _mem_save_site_to_2
= NDR_PULL_GET_MEM_CTX(ndr
);
12093 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_to
[cntr_site_to_1
], 0);
12094 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_to
[cntr_site_to_1
]));
12095 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_to
[cntr_site_to_1
]));
12096 if (ndr_get_array_length(ndr
, &r
->site_to
[cntr_site_to_1
]) > ndr_get_array_size(ndr
, &r
->site_to
[cntr_site_to_1
])) {
12097 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->site_to
[cntr_site_to_1
]), ndr_get_array_length(ndr
, &r
->site_to
[cntr_site_to_1
]));
12099 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_to
[cntr_site_to_1
]), sizeof(uint16_t)));
12100 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_to
[cntr_site_to_1
], ndr_get_array_length(ndr
, &r
->site_to
[cntr_site_to_1
]), sizeof(uint16_t), CH_UTF16
));
12101 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_to_2
, 0);
12104 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_to_1
, 0);
12105 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_to_0
, 0);
12108 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->site_to
, r
->num_req
));
12111 return NDR_ERR_SUCCESS
;
12114 _PUBLIC_
void ndr_print_drsuapi_QuerySitesByCostRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_QuerySitesByCostRequest1
*r
)
12116 uint32_t cntr_site_to_1
;
12117 ndr_print_struct(ndr
, name
, "drsuapi_QuerySitesByCostRequest1");
12119 ndr_print_ptr(ndr
, "site_from", r
->site_from
);
12121 if (r
->site_from
) {
12122 ndr_print_string(ndr
, "site_from", r
->site_from
);
12125 ndr_print_uint32(ndr
, "num_req", r
->num_req
);
12126 ndr_print_ptr(ndr
, "site_to", r
->site_to
);
12129 ndr
->print(ndr
, "%s: ARRAY(%d)", "site_to", (int)r
->num_req
);
12131 for (cntr_site_to_1
=0;cntr_site_to_1
<r
->num_req
;cntr_site_to_1
++) {
12133 if (asprintf(&idx_1
, "[%d]", cntr_site_to_1
) != -1) {
12134 ndr_print_ptr(ndr
, "site_to", r
->site_to
[cntr_site_to_1
]);
12136 if (r
->site_to
[cntr_site_to_1
]) {
12137 ndr_print_string(ndr
, "site_to", r
->site_to
[cntr_site_to_1
]);
12146 ndr_print_uint32(ndr
, "flags", r
->flags
);
12150 static enum ndr_err_code
ndr_push_drsuapi_QuerySitesByCostRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_QuerySitesByCostRequest
*r
)
12152 if (ndr_flags
& NDR_SCALARS
) {
12153 int level
= ndr_push_get_switch_value(ndr
, r
);
12154 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
12157 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
12161 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
12164 if (ndr_flags
& NDR_BUFFERS
) {
12165 int level
= ndr_push_get_switch_value(ndr
, r
);
12168 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
12172 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
12175 return NDR_ERR_SUCCESS
;
12178 static enum ndr_err_code
ndr_pull_drsuapi_QuerySitesByCostRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_QuerySitesByCostRequest
*r
)
12182 level
= ndr_pull_get_switch_value(ndr
, r
);
12183 if (ndr_flags
& NDR_SCALARS
) {
12184 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
12185 if (_level
!= level
) {
12186 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
12190 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
12194 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
12197 if (ndr_flags
& NDR_BUFFERS
) {
12200 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
12204 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
12207 return NDR_ERR_SUCCESS
;
12210 _PUBLIC_
void ndr_print_drsuapi_QuerySitesByCostRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_QuerySitesByCostRequest
*r
)
12213 level
= ndr_print_get_switch_value(ndr
, r
);
12214 ndr_print_union(ndr
, name
, level
, "drsuapi_QuerySitesByCostRequest");
12217 ndr_print_drsuapi_QuerySitesByCostRequest1(ndr
, "req1", &r
->req1
);
12221 ndr_print_bad_level(ndr
, name
, level
);
12225 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsBind(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsBind
*r
)
12227 if (flags
& NDR_IN
) {
12228 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.bind_guid
));
12229 if (r
->in
.bind_guid
) {
12230 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, r
->in
.bind_guid
));
12232 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.bind_info
));
12233 if (r
->in
.bind_info
) {
12234 NDR_CHECK(ndr_push_drsuapi_DsBindInfoCtr(ndr
, NDR_SCALARS
, r
->in
.bind_info
));
12237 if (flags
& NDR_OUT
) {
12238 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.bind_info
));
12239 if (r
->out
.bind_info
) {
12240 NDR_CHECK(ndr_push_drsuapi_DsBindInfoCtr(ndr
, NDR_SCALARS
, r
->out
.bind_info
));
12242 if (r
->out
.bind_handle
== NULL
) {
12243 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12245 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.bind_handle
));
12246 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12248 return NDR_ERR_SUCCESS
;
12251 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsBind(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsBind
*r
)
12253 uint32_t _ptr_bind_guid
;
12254 uint32_t _ptr_bind_info
;
12255 TALLOC_CTX
*_mem_save_bind_guid_0
;
12256 TALLOC_CTX
*_mem_save_bind_info_0
;
12257 TALLOC_CTX
*_mem_save_bind_handle_0
;
12258 if (flags
& NDR_IN
) {
12259 ZERO_STRUCT(r
->out
);
12261 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_bind_guid
));
12262 if (_ptr_bind_guid
) {
12263 NDR_PULL_ALLOC(ndr
, r
->in
.bind_guid
);
12265 r
->in
.bind_guid
= NULL
;
12267 if (r
->in
.bind_guid
) {
12268 _mem_save_bind_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12269 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_guid
, 0);
12270 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, r
->in
.bind_guid
));
12271 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_guid_0
, 0);
12273 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_bind_info
));
12274 if (_ptr_bind_info
) {
12275 NDR_PULL_ALLOC(ndr
, r
->in
.bind_info
);
12277 r
->in
.bind_info
= NULL
;
12279 if (r
->in
.bind_info
) {
12280 _mem_save_bind_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12281 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_info
, 0);
12282 NDR_CHECK(ndr_pull_drsuapi_DsBindInfoCtr(ndr
, NDR_SCALARS
, r
->in
.bind_info
));
12283 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_info_0
, 0);
12285 NDR_PULL_ALLOC(ndr
, r
->out
.bind_handle
);
12286 ZERO_STRUCTP(r
->out
.bind_handle
);
12288 if (flags
& NDR_OUT
) {
12289 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_bind_info
));
12290 if (_ptr_bind_info
) {
12291 NDR_PULL_ALLOC(ndr
, r
->out
.bind_info
);
12293 r
->out
.bind_info
= NULL
;
12295 if (r
->out
.bind_info
) {
12296 _mem_save_bind_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12297 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.bind_info
, 0);
12298 NDR_CHECK(ndr_pull_drsuapi_DsBindInfoCtr(ndr
, NDR_SCALARS
, r
->out
.bind_info
));
12299 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_info_0
, 0);
12301 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12302 NDR_PULL_ALLOC(ndr
, r
->out
.bind_handle
);
12304 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12305 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
12306 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.bind_handle
));
12307 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12308 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12310 return NDR_ERR_SUCCESS
;
12313 _PUBLIC_
void ndr_print_drsuapi_DsBind(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsBind
*r
)
12315 ndr_print_struct(ndr
, name
, "drsuapi_DsBind");
12317 if (flags
& NDR_SET_VALUES
) {
12318 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12320 if (flags
& NDR_IN
) {
12321 ndr_print_struct(ndr
, "in", "drsuapi_DsBind");
12323 ndr_print_ptr(ndr
, "bind_guid", r
->in
.bind_guid
);
12325 if (r
->in
.bind_guid
) {
12326 ndr_print_GUID(ndr
, "bind_guid", r
->in
.bind_guid
);
12329 ndr_print_ptr(ndr
, "bind_info", r
->in
.bind_info
);
12331 if (r
->in
.bind_info
) {
12332 ndr_print_drsuapi_DsBindInfoCtr(ndr
, "bind_info", r
->in
.bind_info
);
12337 if (flags
& NDR_OUT
) {
12338 ndr_print_struct(ndr
, "out", "drsuapi_DsBind");
12340 ndr_print_ptr(ndr
, "bind_info", r
->out
.bind_info
);
12342 if (r
->out
.bind_info
) {
12343 ndr_print_drsuapi_DsBindInfoCtr(ndr
, "bind_info", r
->out
.bind_info
);
12346 ndr_print_ptr(ndr
, "bind_handle", r
->out
.bind_handle
);
12348 ndr_print_policy_handle(ndr
, "bind_handle", r
->out
.bind_handle
);
12350 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12356 static enum ndr_err_code
ndr_push_drsuapi_DsUnbind(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsUnbind
*r
)
12358 if (flags
& NDR_IN
) {
12359 if (r
->in
.bind_handle
== NULL
) {
12360 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12362 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
12364 if (flags
& NDR_OUT
) {
12365 if (r
->out
.bind_handle
== NULL
) {
12366 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12368 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.bind_handle
));
12369 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12371 return NDR_ERR_SUCCESS
;
12374 static enum ndr_err_code
ndr_pull_drsuapi_DsUnbind(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsUnbind
*r
)
12376 TALLOC_CTX
*_mem_save_bind_handle_0
;
12377 if (flags
& NDR_IN
) {
12378 ZERO_STRUCT(r
->out
);
12380 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12381 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
12383 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12384 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
12385 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
12386 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12387 NDR_PULL_ALLOC(ndr
, r
->out
.bind_handle
);
12388 *r
->out
.bind_handle
= *r
->in
.bind_handle
;
12390 if (flags
& NDR_OUT
) {
12391 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12392 NDR_PULL_ALLOC(ndr
, r
->out
.bind_handle
);
12394 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12395 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
12396 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.bind_handle
));
12397 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12398 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12400 return NDR_ERR_SUCCESS
;
12403 _PUBLIC_
void ndr_print_drsuapi_DsUnbind(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsUnbind
*r
)
12405 ndr_print_struct(ndr
, name
, "drsuapi_DsUnbind");
12407 if (flags
& NDR_SET_VALUES
) {
12408 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12410 if (flags
& NDR_IN
) {
12411 ndr_print_struct(ndr
, "in", "drsuapi_DsUnbind");
12413 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
12415 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
12419 if (flags
& NDR_OUT
) {
12420 ndr_print_struct(ndr
, "out", "drsuapi_DsUnbind");
12422 ndr_print_ptr(ndr
, "bind_handle", r
->out
.bind_handle
);
12424 ndr_print_policy_handle(ndr
, "bind_handle", r
->out
.bind_handle
);
12426 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12432 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaSync(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsReplicaSync
*r
)
12434 if (flags
& NDR_IN
) {
12435 if (r
->in
.bind_handle
== NULL
) {
12436 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12438 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
12439 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
12440 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
12441 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
12443 if (flags
& NDR_OUT
) {
12444 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12446 return NDR_ERR_SUCCESS
;
12449 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaSync(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsReplicaSync
*r
)
12451 TALLOC_CTX
*_mem_save_bind_handle_0
;
12452 if (flags
& NDR_IN
) {
12453 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12454 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
12456 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12457 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
12458 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
12459 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12460 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
12461 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
12462 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
12464 if (flags
& NDR_OUT
) {
12465 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12467 return NDR_ERR_SUCCESS
;
12470 _PUBLIC_
void ndr_print_drsuapi_DsReplicaSync(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsReplicaSync
*r
)
12472 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaSync");
12474 if (flags
& NDR_SET_VALUES
) {
12475 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12477 if (flags
& NDR_IN
) {
12478 ndr_print_struct(ndr
, "in", "drsuapi_DsReplicaSync");
12480 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
12482 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
12484 ndr_print_int32(ndr
, "level", r
->in
.level
);
12485 ndr_print_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
);
12486 ndr_print_drsuapi_DsReplicaSyncRequest(ndr
, "req", &r
->in
.req
);
12489 if (flags
& NDR_OUT
) {
12490 ndr_print_struct(ndr
, "out", "drsuapi_DsReplicaSync");
12492 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12498 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChanges(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsGetNCChanges
*r
)
12500 if (flags
& NDR_IN
) {
12501 if (r
->in
.bind_handle
== NULL
) {
12502 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12504 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
12505 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
12506 if (r
->in
.req
== NULL
) {
12507 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12509 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
12510 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
12512 if (flags
& NDR_OUT
) {
12513 if (r
->out
.level_out
== NULL
) {
12514 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12516 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
12517 if (r
->out
.ctr
== NULL
) {
12518 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12520 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
12521 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
12522 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12524 return NDR_ERR_SUCCESS
;
12527 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChanges(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsGetNCChanges
*r
)
12529 TALLOC_CTX
*_mem_save_bind_handle_0
;
12530 TALLOC_CTX
*_mem_save_req_0
;
12531 TALLOC_CTX
*_mem_save_level_out_0
;
12532 TALLOC_CTX
*_mem_save_ctr_0
;
12533 if (flags
& NDR_IN
) {
12534 ZERO_STRUCT(r
->out
);
12536 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12537 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
12539 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12540 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
12541 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
12542 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12543 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
12544 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12545 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
12547 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12548 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
12549 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
12550 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
12551 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
12552 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
12553 ZERO_STRUCTP(r
->out
.level_out
);
12554 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
12555 ZERO_STRUCTP(r
->out
.ctr
);
12557 if (flags
& NDR_OUT
) {
12558 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12559 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
12561 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12562 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
12563 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
12564 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
12565 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12566 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
12568 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12569 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
12570 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
12571 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
12572 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
12573 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12575 return NDR_ERR_SUCCESS
;
12578 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChanges(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsGetNCChanges
*r
)
12580 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChanges");
12582 if (flags
& NDR_SET_VALUES
) {
12583 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12585 if (flags
& NDR_IN
) {
12586 ndr_print_struct(ndr
, "in", "drsuapi_DsGetNCChanges");
12588 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
12590 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
12592 ndr_print_int32(ndr
, "level", r
->in
.level
);
12593 ndr_print_ptr(ndr
, "req", r
->in
.req
);
12595 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
12596 ndr_print_drsuapi_DsGetNCChangesRequest(ndr
, "req", r
->in
.req
);
12600 if (flags
& NDR_OUT
) {
12601 ndr_print_struct(ndr
, "out", "drsuapi_DsGetNCChanges");
12603 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
12605 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
12607 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
12609 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
12610 ndr_print_drsuapi_DsGetNCChangesCtr(ndr
, "ctr", r
->out
.ctr
);
12612 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12618 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaUpdateRefs(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsReplicaUpdateRefs
*r
)
12620 if (flags
& NDR_IN
) {
12621 if (r
->in
.bind_handle
== NULL
) {
12622 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12624 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
12625 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
12626 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
12627 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
12629 if (flags
& NDR_OUT
) {
12630 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12632 return NDR_ERR_SUCCESS
;
12635 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaUpdateRefs(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsReplicaUpdateRefs
*r
)
12637 TALLOC_CTX
*_mem_save_bind_handle_0
;
12638 if (flags
& NDR_IN
) {
12639 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12640 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
12642 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12643 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
12644 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
12645 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12646 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
12647 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
12648 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
12650 if (flags
& NDR_OUT
) {
12651 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12653 return NDR_ERR_SUCCESS
;
12656 _PUBLIC_
void ndr_print_drsuapi_DsReplicaUpdateRefs(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsReplicaUpdateRefs
*r
)
12658 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaUpdateRefs");
12660 if (flags
& NDR_SET_VALUES
) {
12661 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12663 if (flags
& NDR_IN
) {
12664 ndr_print_struct(ndr
, "in", "drsuapi_DsReplicaUpdateRefs");
12666 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
12668 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
12670 ndr_print_int32(ndr
, "level", r
->in
.level
);
12671 ndr_print_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
);
12672 ndr_print_drsuapi_DsReplicaUpdateRefsRequest(ndr
, "req", &r
->in
.req
);
12675 if (flags
& NDR_OUT
) {
12676 ndr_print_struct(ndr
, "out", "drsuapi_DsReplicaUpdateRefs");
12678 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12684 static enum ndr_err_code
ndr_push_DRSUAPI_REPLICA_ADD(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_REPLICA_ADD
*r
)
12686 if (flags
& NDR_IN
) {
12688 if (flags
& NDR_OUT
) {
12689 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12691 return NDR_ERR_SUCCESS
;
12694 static enum ndr_err_code
ndr_pull_DRSUAPI_REPLICA_ADD(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_REPLICA_ADD
*r
)
12696 if (flags
& NDR_IN
) {
12698 if (flags
& NDR_OUT
) {
12699 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12701 return NDR_ERR_SUCCESS
;
12704 _PUBLIC_
void ndr_print_DRSUAPI_REPLICA_ADD(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_REPLICA_ADD
*r
)
12706 ndr_print_struct(ndr
, name
, "DRSUAPI_REPLICA_ADD");
12708 if (flags
& NDR_SET_VALUES
) {
12709 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12711 if (flags
& NDR_IN
) {
12712 ndr_print_struct(ndr
, "in", "DRSUAPI_REPLICA_ADD");
12716 if (flags
& NDR_OUT
) {
12717 ndr_print_struct(ndr
, "out", "DRSUAPI_REPLICA_ADD");
12719 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12725 static enum ndr_err_code
ndr_push_DRSUAPI_REPLICA_DEL(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_REPLICA_DEL
*r
)
12727 if (flags
& NDR_IN
) {
12729 if (flags
& NDR_OUT
) {
12730 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12732 return NDR_ERR_SUCCESS
;
12735 static enum ndr_err_code
ndr_pull_DRSUAPI_REPLICA_DEL(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_REPLICA_DEL
*r
)
12737 if (flags
& NDR_IN
) {
12739 if (flags
& NDR_OUT
) {
12740 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12742 return NDR_ERR_SUCCESS
;
12745 _PUBLIC_
void ndr_print_DRSUAPI_REPLICA_DEL(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_REPLICA_DEL
*r
)
12747 ndr_print_struct(ndr
, name
, "DRSUAPI_REPLICA_DEL");
12749 if (flags
& NDR_SET_VALUES
) {
12750 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12752 if (flags
& NDR_IN
) {
12753 ndr_print_struct(ndr
, "in", "DRSUAPI_REPLICA_DEL");
12757 if (flags
& NDR_OUT
) {
12758 ndr_print_struct(ndr
, "out", "DRSUAPI_REPLICA_DEL");
12760 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12766 static enum ndr_err_code
ndr_push_DRSUAPI_REPLICA_MODIFY(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_REPLICA_MODIFY
*r
)
12768 if (flags
& NDR_IN
) {
12770 if (flags
& NDR_OUT
) {
12771 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12773 return NDR_ERR_SUCCESS
;
12776 static enum ndr_err_code
ndr_pull_DRSUAPI_REPLICA_MODIFY(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_REPLICA_MODIFY
*r
)
12778 if (flags
& NDR_IN
) {
12780 if (flags
& NDR_OUT
) {
12781 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12783 return NDR_ERR_SUCCESS
;
12786 _PUBLIC_
void ndr_print_DRSUAPI_REPLICA_MODIFY(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_REPLICA_MODIFY
*r
)
12788 ndr_print_struct(ndr
, name
, "DRSUAPI_REPLICA_MODIFY");
12790 if (flags
& NDR_SET_VALUES
) {
12791 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12793 if (flags
& NDR_IN
) {
12794 ndr_print_struct(ndr
, "in", "DRSUAPI_REPLICA_MODIFY");
12798 if (flags
& NDR_OUT
) {
12799 ndr_print_struct(ndr
, "out", "DRSUAPI_REPLICA_MODIFY");
12801 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12807 static enum ndr_err_code
ndr_push_DRSUAPI_VERIFY_NAMES(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_VERIFY_NAMES
*r
)
12809 if (flags
& NDR_IN
) {
12811 if (flags
& NDR_OUT
) {
12812 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12814 return NDR_ERR_SUCCESS
;
12817 static enum ndr_err_code
ndr_pull_DRSUAPI_VERIFY_NAMES(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_VERIFY_NAMES
*r
)
12819 if (flags
& NDR_IN
) {
12821 if (flags
& NDR_OUT
) {
12822 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12824 return NDR_ERR_SUCCESS
;
12827 _PUBLIC_
void ndr_print_DRSUAPI_VERIFY_NAMES(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_VERIFY_NAMES
*r
)
12829 ndr_print_struct(ndr
, name
, "DRSUAPI_VERIFY_NAMES");
12831 if (flags
& NDR_SET_VALUES
) {
12832 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12834 if (flags
& NDR_IN
) {
12835 ndr_print_struct(ndr
, "in", "DRSUAPI_VERIFY_NAMES");
12839 if (flags
& NDR_OUT
) {
12840 ndr_print_struct(ndr
, "out", "DRSUAPI_VERIFY_NAMES");
12842 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12848 static enum ndr_err_code
ndr_push_drsuapi_DsGetMemberships(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsGetMemberships
*r
)
12850 if (flags
& NDR_IN
) {
12851 if (r
->in
.bind_handle
== NULL
) {
12852 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12854 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
12855 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
12856 if (r
->in
.req
== NULL
) {
12857 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12859 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
12860 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
12862 if (flags
& NDR_OUT
) {
12863 if (r
->out
.level_out
== NULL
) {
12864 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12866 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
12867 if (r
->out
.ctr
== NULL
) {
12868 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12870 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
12871 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
12872 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12874 return NDR_ERR_SUCCESS
;
12877 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMemberships(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsGetMemberships
*r
)
12879 TALLOC_CTX
*_mem_save_bind_handle_0
;
12880 TALLOC_CTX
*_mem_save_req_0
;
12881 TALLOC_CTX
*_mem_save_level_out_0
;
12882 TALLOC_CTX
*_mem_save_ctr_0
;
12883 if (flags
& NDR_IN
) {
12884 ZERO_STRUCT(r
->out
);
12886 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12887 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
12889 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12890 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
12891 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
12892 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12893 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
12894 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12895 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
12897 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12898 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
12899 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
12900 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
12901 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
12902 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
12903 ZERO_STRUCTP(r
->out
.level_out
);
12904 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
12905 ZERO_STRUCTP(r
->out
.ctr
);
12907 if (flags
& NDR_OUT
) {
12908 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12909 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
12911 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12912 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
12913 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
12914 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
12915 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12916 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
12918 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12919 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
12920 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
12921 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
12922 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
12923 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12925 return NDR_ERR_SUCCESS
;
12928 _PUBLIC_
void ndr_print_drsuapi_DsGetMemberships(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsGetMemberships
*r
)
12930 ndr_print_struct(ndr
, name
, "drsuapi_DsGetMemberships");
12932 if (flags
& NDR_SET_VALUES
) {
12933 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12935 if (flags
& NDR_IN
) {
12936 ndr_print_struct(ndr
, "in", "drsuapi_DsGetMemberships");
12938 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
12940 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
12942 ndr_print_int32(ndr
, "level", r
->in
.level
);
12943 ndr_print_ptr(ndr
, "req", r
->in
.req
);
12945 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
12946 ndr_print_drsuapi_DsGetMembershipsRequest(ndr
, "req", r
->in
.req
);
12950 if (flags
& NDR_OUT
) {
12951 ndr_print_struct(ndr
, "out", "drsuapi_DsGetMemberships");
12953 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
12955 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
12957 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
12959 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
12960 ndr_print_drsuapi_DsGetMembershipsCtr(ndr
, "ctr", r
->out
.ctr
);
12962 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12968 static enum ndr_err_code
ndr_push_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_INTER_DOMAIN_MOVE
*r
)
12970 if (flags
& NDR_IN
) {
12972 if (flags
& NDR_OUT
) {
12973 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12975 return NDR_ERR_SUCCESS
;
12978 static enum ndr_err_code
ndr_pull_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_INTER_DOMAIN_MOVE
*r
)
12980 if (flags
& NDR_IN
) {
12982 if (flags
& NDR_OUT
) {
12983 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12985 return NDR_ERR_SUCCESS
;
12988 _PUBLIC_
void ndr_print_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_INTER_DOMAIN_MOVE
*r
)
12990 ndr_print_struct(ndr
, name
, "DRSUAPI_INTER_DOMAIN_MOVE");
12992 if (flags
& NDR_SET_VALUES
) {
12993 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12995 if (flags
& NDR_IN
) {
12996 ndr_print_struct(ndr
, "in", "DRSUAPI_INTER_DOMAIN_MOVE");
13000 if (flags
& NDR_OUT
) {
13001 ndr_print_struct(ndr
, "out", "DRSUAPI_INTER_DOMAIN_MOVE");
13003 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13009 static enum ndr_err_code
ndr_push_drsuapi_DsGetNT4ChangeLog(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsGetNT4ChangeLog
*r
)
13011 if (flags
& NDR_IN
) {
13012 if (r
->in
.bind_handle
== NULL
) {
13013 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13015 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13016 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
13017 if (r
->in
.req
== NULL
) {
13018 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13020 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13021 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13023 if (flags
& NDR_OUT
) {
13024 if (r
->out
.level_out
== NULL
) {
13025 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13027 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
13028 if (r
->out
.info
== NULL
) {
13029 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13031 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, *r
->out
.level_out
));
13032 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
13033 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13035 return NDR_ERR_SUCCESS
;
13038 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNT4ChangeLog(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsGetNT4ChangeLog
*r
)
13040 TALLOC_CTX
*_mem_save_bind_handle_0
;
13041 TALLOC_CTX
*_mem_save_req_0
;
13042 TALLOC_CTX
*_mem_save_level_out_0
;
13043 TALLOC_CTX
*_mem_save_info_0
;
13044 if (flags
& NDR_IN
) {
13045 ZERO_STRUCT(r
->out
);
13047 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13048 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13050 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13051 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13052 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13053 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13054 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
13055 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13056 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
13058 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13059 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
13060 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13061 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13062 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
13063 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13064 ZERO_STRUCTP(r
->out
.level_out
);
13065 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
13066 ZERO_STRUCTP(r
->out
.info
);
13068 if (flags
& NDR_OUT
) {
13069 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13070 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13072 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13073 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
13074 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
13075 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
13076 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13077 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
13079 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13080 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
13081 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, *r
->out
.level_out
));
13082 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
13083 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
13084 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13086 return NDR_ERR_SUCCESS
;
13089 _PUBLIC_
void ndr_print_drsuapi_DsGetNT4ChangeLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsGetNT4ChangeLog
*r
)
13091 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNT4ChangeLog");
13093 if (flags
& NDR_SET_VALUES
) {
13094 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13096 if (flags
& NDR_IN
) {
13097 ndr_print_struct(ndr
, "in", "drsuapi_DsGetNT4ChangeLog");
13099 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13101 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13103 ndr_print_uint32(ndr
, "level", r
->in
.level
);
13104 ndr_print_ptr(ndr
, "req", r
->in
.req
);
13106 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
13107 ndr_print_drsuapi_DsGetNT4ChangeLogRequest(ndr
, "req", r
->in
.req
);
13111 if (flags
& NDR_OUT
) {
13112 ndr_print_struct(ndr
, "out", "drsuapi_DsGetNT4ChangeLog");
13114 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
13116 ndr_print_uint32(ndr
, "level_out", *r
->out
.level_out
);
13118 ndr_print_ptr(ndr
, "info", r
->out
.info
);
13120 ndr_print_set_switch_value(ndr
, r
->out
.info
, *r
->out
.level_out
);
13121 ndr_print_drsuapi_DsGetNT4ChangeLogInfo(ndr
, "info", r
->out
.info
);
13123 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13129 static enum ndr_err_code
ndr_push_drsuapi_DsCrackNames(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsCrackNames
*r
)
13131 if (flags
& NDR_IN
) {
13132 if (r
->in
.bind_handle
== NULL
) {
13133 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13135 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13136 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13137 if (r
->in
.req
== NULL
) {
13138 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13140 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13141 NDR_CHECK(ndr_push_drsuapi_DsNameRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13143 if (flags
& NDR_OUT
) {
13144 if (r
->out
.level_out
== NULL
) {
13145 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13147 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
13148 if (r
->out
.ctr
== NULL
) {
13149 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13151 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
13152 NDR_CHECK(ndr_push_drsuapi_DsNameCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13153 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13155 return NDR_ERR_SUCCESS
;
13158 static enum ndr_err_code
ndr_pull_drsuapi_DsCrackNames(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsCrackNames
*r
)
13160 TALLOC_CTX
*_mem_save_bind_handle_0
;
13161 TALLOC_CTX
*_mem_save_req_0
;
13162 TALLOC_CTX
*_mem_save_level_out_0
;
13163 TALLOC_CTX
*_mem_save_ctr_0
;
13164 if (flags
& NDR_IN
) {
13165 ZERO_STRUCT(r
->out
);
13167 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13168 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13170 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13171 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13172 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13173 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13174 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
13175 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13176 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
13178 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13179 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
13180 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13181 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13182 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
13183 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13184 ZERO_STRUCTP(r
->out
.level_out
);
13185 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13186 ZERO_STRUCTP(r
->out
.ctr
);
13188 if (flags
& NDR_OUT
) {
13189 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13190 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13192 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13193 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
13194 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
13195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
13196 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13197 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13199 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13200 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
13201 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
13202 NDR_CHECK(ndr_pull_drsuapi_DsNameCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13203 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
13204 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13206 return NDR_ERR_SUCCESS
;
13209 _PUBLIC_
void ndr_print_drsuapi_DsCrackNames(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsCrackNames
*r
)
13211 ndr_print_struct(ndr
, name
, "drsuapi_DsCrackNames");
13213 if (flags
& NDR_SET_VALUES
) {
13214 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13216 if (flags
& NDR_IN
) {
13217 ndr_print_struct(ndr
, "in", "drsuapi_DsCrackNames");
13219 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13221 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13223 ndr_print_int32(ndr
, "level", r
->in
.level
);
13224 ndr_print_ptr(ndr
, "req", r
->in
.req
);
13226 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
13227 ndr_print_drsuapi_DsNameRequest(ndr
, "req", r
->in
.req
);
13231 if (flags
& NDR_OUT
) {
13232 ndr_print_struct(ndr
, "out", "drsuapi_DsCrackNames");
13234 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
13236 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
13238 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
13240 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
13241 ndr_print_drsuapi_DsNameCtr(ndr
, "ctr", r
->out
.ctr
);
13243 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13249 static enum ndr_err_code
ndr_push_drsuapi_DsWriteAccountSpn(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsWriteAccountSpn
*r
)
13251 if (flags
& NDR_IN
) {
13252 if (r
->in
.bind_handle
== NULL
) {
13253 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13255 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13256 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13257 if (r
->in
.req
== NULL
) {
13258 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13260 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13261 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13263 if (flags
& NDR_OUT
) {
13264 if (r
->out
.level_out
== NULL
) {
13265 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13267 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
13268 if (r
->out
.res
== NULL
) {
13269 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13271 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
));
13272 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnResult(ndr
, NDR_SCALARS
, r
->out
.res
));
13273 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13275 return NDR_ERR_SUCCESS
;
13278 static enum ndr_err_code
ndr_pull_drsuapi_DsWriteAccountSpn(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsWriteAccountSpn
*r
)
13280 TALLOC_CTX
*_mem_save_bind_handle_0
;
13281 TALLOC_CTX
*_mem_save_req_0
;
13282 TALLOC_CTX
*_mem_save_level_out_0
;
13283 TALLOC_CTX
*_mem_save_res_0
;
13284 if (flags
& NDR_IN
) {
13285 ZERO_STRUCT(r
->out
);
13287 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13288 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13290 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13291 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13292 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13293 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13294 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
13295 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13296 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
13298 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13299 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
13300 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13301 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13302 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
13303 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13304 ZERO_STRUCTP(r
->out
.level_out
);
13305 NDR_PULL_ALLOC(ndr
, r
->out
.res
);
13306 ZERO_STRUCTP(r
->out
.res
);
13308 if (flags
& NDR_OUT
) {
13309 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13310 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13312 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13313 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
13314 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
13315 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
13316 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13317 NDR_PULL_ALLOC(ndr
, r
->out
.res
);
13319 _mem_save_res_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13320 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.res
, LIBNDR_FLAG_REF_ALLOC
);
13321 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
));
13322 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnResult(ndr
, NDR_SCALARS
, r
->out
.res
));
13323 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_res_0
, LIBNDR_FLAG_REF_ALLOC
);
13324 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13326 return NDR_ERR_SUCCESS
;
13329 _PUBLIC_
void ndr_print_drsuapi_DsWriteAccountSpn(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsWriteAccountSpn
*r
)
13331 ndr_print_struct(ndr
, name
, "drsuapi_DsWriteAccountSpn");
13333 if (flags
& NDR_SET_VALUES
) {
13334 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13336 if (flags
& NDR_IN
) {
13337 ndr_print_struct(ndr
, "in", "drsuapi_DsWriteAccountSpn");
13339 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13341 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13343 ndr_print_int32(ndr
, "level", r
->in
.level
);
13344 ndr_print_ptr(ndr
, "req", r
->in
.req
);
13346 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
13347 ndr_print_drsuapi_DsWriteAccountSpnRequest(ndr
, "req", r
->in
.req
);
13351 if (flags
& NDR_OUT
) {
13352 ndr_print_struct(ndr
, "out", "drsuapi_DsWriteAccountSpn");
13354 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
13356 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
13358 ndr_print_ptr(ndr
, "res", r
->out
.res
);
13360 ndr_print_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
);
13361 ndr_print_drsuapi_DsWriteAccountSpnResult(ndr
, "res", r
->out
.res
);
13363 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13369 static enum ndr_err_code
ndr_push_drsuapi_DsRemoveDSServer(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsRemoveDSServer
*r
)
13371 if (flags
& NDR_IN
) {
13372 if (r
->in
.bind_handle
== NULL
) {
13373 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13375 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13376 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13377 if (r
->in
.req
== NULL
) {
13378 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13380 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13381 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13383 if (flags
& NDR_OUT
) {
13384 if (r
->out
.level_out
== NULL
) {
13385 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13387 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
13388 if (r
->out
.res
== NULL
) {
13389 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13391 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
));
13392 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerResult(ndr
, NDR_SCALARS
, r
->out
.res
));
13393 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13395 return NDR_ERR_SUCCESS
;
13398 static enum ndr_err_code
ndr_pull_drsuapi_DsRemoveDSServer(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsRemoveDSServer
*r
)
13400 TALLOC_CTX
*_mem_save_bind_handle_0
;
13401 TALLOC_CTX
*_mem_save_req_0
;
13402 TALLOC_CTX
*_mem_save_level_out_0
;
13403 TALLOC_CTX
*_mem_save_res_0
;
13404 if (flags
& NDR_IN
) {
13405 ZERO_STRUCT(r
->out
);
13407 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13408 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13410 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13411 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13412 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13413 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13414 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
13415 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13416 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
13418 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13419 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
13420 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13421 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13422 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
13423 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13424 ZERO_STRUCTP(r
->out
.level_out
);
13425 NDR_PULL_ALLOC(ndr
, r
->out
.res
);
13426 ZERO_STRUCTP(r
->out
.res
);
13428 if (flags
& NDR_OUT
) {
13429 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13430 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13432 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13433 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
13434 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
13435 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
13436 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13437 NDR_PULL_ALLOC(ndr
, r
->out
.res
);
13439 _mem_save_res_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13440 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.res
, LIBNDR_FLAG_REF_ALLOC
);
13441 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
));
13442 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerResult(ndr
, NDR_SCALARS
, r
->out
.res
));
13443 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_res_0
, LIBNDR_FLAG_REF_ALLOC
);
13444 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13446 return NDR_ERR_SUCCESS
;
13449 _PUBLIC_
void ndr_print_drsuapi_DsRemoveDSServer(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsRemoveDSServer
*r
)
13451 ndr_print_struct(ndr
, name
, "drsuapi_DsRemoveDSServer");
13453 if (flags
& NDR_SET_VALUES
) {
13454 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13456 if (flags
& NDR_IN
) {
13457 ndr_print_struct(ndr
, "in", "drsuapi_DsRemoveDSServer");
13459 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13461 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13463 ndr_print_int32(ndr
, "level", r
->in
.level
);
13464 ndr_print_ptr(ndr
, "req", r
->in
.req
);
13466 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
13467 ndr_print_drsuapi_DsRemoveDSServerRequest(ndr
, "req", r
->in
.req
);
13471 if (flags
& NDR_OUT
) {
13472 ndr_print_struct(ndr
, "out", "drsuapi_DsRemoveDSServer");
13474 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
13476 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
13478 ndr_print_ptr(ndr
, "res", r
->out
.res
);
13480 ndr_print_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
);
13481 ndr_print_drsuapi_DsRemoveDSServerResult(ndr
, "res", r
->out
.res
);
13483 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13489 static enum ndr_err_code
ndr_push_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_REMOVE_DS_DOMAIN
*r
)
13491 if (flags
& NDR_IN
) {
13493 if (flags
& NDR_OUT
) {
13494 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13496 return NDR_ERR_SUCCESS
;
13499 static enum ndr_err_code
ndr_pull_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_REMOVE_DS_DOMAIN
*r
)
13501 if (flags
& NDR_IN
) {
13503 if (flags
& NDR_OUT
) {
13504 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13506 return NDR_ERR_SUCCESS
;
13509 _PUBLIC_
void ndr_print_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_REMOVE_DS_DOMAIN
*r
)
13511 ndr_print_struct(ndr
, name
, "DRSUAPI_REMOVE_DS_DOMAIN");
13513 if (flags
& NDR_SET_VALUES
) {
13514 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13516 if (flags
& NDR_IN
) {
13517 ndr_print_struct(ndr
, "in", "DRSUAPI_REMOVE_DS_DOMAIN");
13521 if (flags
& NDR_OUT
) {
13522 ndr_print_struct(ndr
, "out", "DRSUAPI_REMOVE_DS_DOMAIN");
13524 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13530 static enum ndr_err_code
ndr_push_drsuapi_DsGetDomainControllerInfo(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsGetDomainControllerInfo
*r
)
13532 if (flags
& NDR_IN
) {
13533 if (r
->in
.bind_handle
== NULL
) {
13534 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13536 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13537 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13538 if (r
->in
.req
== NULL
) {
13539 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13541 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13542 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13544 if (flags
& NDR_OUT
) {
13545 if (r
->out
.level_out
== NULL
) {
13546 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13548 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
13549 if (r
->out
.ctr
== NULL
) {
13550 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13552 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
13553 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13554 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13556 return NDR_ERR_SUCCESS
;
13559 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDomainControllerInfo(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsGetDomainControllerInfo
*r
)
13561 TALLOC_CTX
*_mem_save_bind_handle_0
;
13562 TALLOC_CTX
*_mem_save_req_0
;
13563 TALLOC_CTX
*_mem_save_level_out_0
;
13564 TALLOC_CTX
*_mem_save_ctr_0
;
13565 if (flags
& NDR_IN
) {
13566 ZERO_STRUCT(r
->out
);
13568 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13569 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13571 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13572 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13573 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13574 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13575 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
13576 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13577 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
13579 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13580 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
13581 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13582 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13583 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
13584 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13585 ZERO_STRUCTP(r
->out
.level_out
);
13586 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13587 ZERO_STRUCTP(r
->out
.ctr
);
13589 if (flags
& NDR_OUT
) {
13590 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13591 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13593 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13594 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
13595 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
13596 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
13597 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13598 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13600 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13601 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
13602 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
13603 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13604 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
13605 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13607 return NDR_ERR_SUCCESS
;
13610 _PUBLIC_
void ndr_print_drsuapi_DsGetDomainControllerInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsGetDomainControllerInfo
*r
)
13612 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDomainControllerInfo");
13614 if (flags
& NDR_SET_VALUES
) {
13615 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13617 if (flags
& NDR_IN
) {
13618 ndr_print_struct(ndr
, "in", "drsuapi_DsGetDomainControllerInfo");
13620 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13622 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13624 ndr_print_int32(ndr
, "level", r
->in
.level
);
13625 ndr_print_ptr(ndr
, "req", r
->in
.req
);
13627 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
13628 ndr_print_drsuapi_DsGetDCInfoRequest(ndr
, "req", r
->in
.req
);
13632 if (flags
& NDR_OUT
) {
13633 ndr_print_struct(ndr
, "out", "drsuapi_DsGetDomainControllerInfo");
13635 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
13637 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
13639 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
13641 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
13642 ndr_print_drsuapi_DsGetDCInfoCtr(ndr
, "ctr", r
->out
.ctr
);
13644 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13650 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsAddEntry(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsAddEntry
*r
)
13652 if (flags
& NDR_IN
) {
13653 if (r
->in
.bind_handle
== NULL
) {
13654 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13656 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13657 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13658 if (r
->in
.req
== NULL
) {
13659 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13661 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13662 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13664 if (flags
& NDR_OUT
) {
13665 if (r
->out
.level_out
== NULL
) {
13666 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13668 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
13669 if (r
->out
.ctr
== NULL
) {
13670 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13672 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
13673 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13674 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13676 return NDR_ERR_SUCCESS
;
13679 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsAddEntry(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsAddEntry
*r
)
13681 TALLOC_CTX
*_mem_save_bind_handle_0
;
13682 TALLOC_CTX
*_mem_save_req_0
;
13683 TALLOC_CTX
*_mem_save_level_out_0
;
13684 TALLOC_CTX
*_mem_save_ctr_0
;
13685 if (flags
& NDR_IN
) {
13686 ZERO_STRUCT(r
->out
);
13688 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13689 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13691 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13692 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13693 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13694 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13695 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
13696 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13697 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
13699 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13700 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
13701 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13702 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13703 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
13704 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13705 ZERO_STRUCTP(r
->out
.level_out
);
13706 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13707 ZERO_STRUCTP(r
->out
.ctr
);
13709 if (flags
& NDR_OUT
) {
13710 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13711 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13713 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13714 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
13715 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
13716 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
13717 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13718 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13720 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13721 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
13722 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
13723 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13724 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
13725 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13727 return NDR_ERR_SUCCESS
;
13730 _PUBLIC_
void ndr_print_drsuapi_DsAddEntry(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsAddEntry
*r
)
13732 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntry");
13734 if (flags
& NDR_SET_VALUES
) {
13735 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13737 if (flags
& NDR_IN
) {
13738 ndr_print_struct(ndr
, "in", "drsuapi_DsAddEntry");
13740 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13742 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13744 ndr_print_int32(ndr
, "level", r
->in
.level
);
13745 ndr_print_ptr(ndr
, "req", r
->in
.req
);
13747 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
13748 ndr_print_drsuapi_DsAddEntryRequest(ndr
, "req", r
->in
.req
);
13752 if (flags
& NDR_OUT
) {
13753 ndr_print_struct(ndr
, "out", "drsuapi_DsAddEntry");
13755 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
13757 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
13759 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
13761 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
13762 ndr_print_drsuapi_DsAddEntryCtr(ndr
, "ctr", r
->out
.ctr
);
13764 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13770 static enum ndr_err_code
ndr_push_DRSUAPI_EXECUTE_KCC(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_EXECUTE_KCC
*r
)
13772 if (flags
& NDR_IN
) {
13774 if (flags
& NDR_OUT
) {
13775 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13777 return NDR_ERR_SUCCESS
;
13780 static enum ndr_err_code
ndr_pull_DRSUAPI_EXECUTE_KCC(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_EXECUTE_KCC
*r
)
13782 if (flags
& NDR_IN
) {
13784 if (flags
& NDR_OUT
) {
13785 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13787 return NDR_ERR_SUCCESS
;
13790 _PUBLIC_
void ndr_print_DRSUAPI_EXECUTE_KCC(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_EXECUTE_KCC
*r
)
13792 ndr_print_struct(ndr
, name
, "DRSUAPI_EXECUTE_KCC");
13794 if (flags
& NDR_SET_VALUES
) {
13795 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13797 if (flags
& NDR_IN
) {
13798 ndr_print_struct(ndr
, "in", "DRSUAPI_EXECUTE_KCC");
13802 if (flags
& NDR_OUT
) {
13803 ndr_print_struct(ndr
, "out", "DRSUAPI_EXECUTE_KCC");
13805 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13811 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaGetInfo(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsReplicaGetInfo
*r
)
13813 if (flags
& NDR_IN
) {
13814 if (r
->in
.bind_handle
== NULL
) {
13815 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13817 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13818 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
13819 if (r
->in
.req
== NULL
) {
13820 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13822 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13823 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13825 if (flags
& NDR_OUT
) {
13826 if (r
->out
.info_type
== NULL
) {
13827 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13829 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, *r
->out
.info_type
));
13830 if (r
->out
.info
== NULL
) {
13831 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13833 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, *r
->out
.info_type
));
13834 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
13835 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13837 return NDR_ERR_SUCCESS
;
13840 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaGetInfo(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsReplicaGetInfo
*r
)
13842 TALLOC_CTX
*_mem_save_bind_handle_0
;
13843 TALLOC_CTX
*_mem_save_req_0
;
13844 TALLOC_CTX
*_mem_save_info_type_0
;
13845 TALLOC_CTX
*_mem_save_info_0
;
13846 if (flags
& NDR_IN
) {
13847 ZERO_STRUCT(r
->out
);
13849 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13850 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13852 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13853 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13854 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13855 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13856 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
13857 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13858 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
13860 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13861 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
13862 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13863 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13864 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
13865 NDR_PULL_ALLOC(ndr
, r
->out
.info_type
);
13866 ZERO_STRUCTP(r
->out
.info_type
);
13867 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
13868 ZERO_STRUCTP(r
->out
.info
);
13870 if (flags
& NDR_OUT
) {
13871 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13872 NDR_PULL_ALLOC(ndr
, r
->out
.info_type
);
13874 _mem_save_info_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13875 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info_type
, LIBNDR_FLAG_REF_ALLOC
);
13876 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, r
->out
.info_type
));
13877 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_type_0
, LIBNDR_FLAG_REF_ALLOC
);
13878 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13879 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
13881 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13882 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
13883 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, *r
->out
.info_type
));
13884 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
13885 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
13886 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13888 return NDR_ERR_SUCCESS
;
13891 _PUBLIC_
void ndr_print_drsuapi_DsReplicaGetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsReplicaGetInfo
*r
)
13893 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaGetInfo");
13895 if (flags
& NDR_SET_VALUES
) {
13896 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13898 if (flags
& NDR_IN
) {
13899 ndr_print_struct(ndr
, "in", "drsuapi_DsReplicaGetInfo");
13901 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13903 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13905 ndr_print_drsuapi_DsReplicaGetInfoLevel(ndr
, "level", r
->in
.level
);
13906 ndr_print_ptr(ndr
, "req", r
->in
.req
);
13908 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
13909 ndr_print_drsuapi_DsReplicaGetInfoRequest(ndr
, "req", r
->in
.req
);
13913 if (flags
& NDR_OUT
) {
13914 ndr_print_struct(ndr
, "out", "drsuapi_DsReplicaGetInfo");
13916 ndr_print_ptr(ndr
, "info_type", r
->out
.info_type
);
13918 ndr_print_drsuapi_DsReplicaInfoType(ndr
, "info_type", *r
->out
.info_type
);
13920 ndr_print_ptr(ndr
, "info", r
->out
.info
);
13922 ndr_print_set_switch_value(ndr
, r
->out
.info
, *r
->out
.info_type
);
13923 ndr_print_drsuapi_DsReplicaInfo(ndr
, "info", r
->out
.info
);
13925 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13931 static enum ndr_err_code
ndr_push_DRSUAPI_ADD_SID_HISTORY(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_ADD_SID_HISTORY
*r
)
13933 if (flags
& NDR_IN
) {
13935 if (flags
& NDR_OUT
) {
13936 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13938 return NDR_ERR_SUCCESS
;
13941 static enum ndr_err_code
ndr_pull_DRSUAPI_ADD_SID_HISTORY(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_ADD_SID_HISTORY
*r
)
13943 if (flags
& NDR_IN
) {
13945 if (flags
& NDR_OUT
) {
13946 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13948 return NDR_ERR_SUCCESS
;
13951 _PUBLIC_
void ndr_print_DRSUAPI_ADD_SID_HISTORY(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_ADD_SID_HISTORY
*r
)
13953 ndr_print_struct(ndr
, name
, "DRSUAPI_ADD_SID_HISTORY");
13955 if (flags
& NDR_SET_VALUES
) {
13956 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13958 if (flags
& NDR_IN
) {
13959 ndr_print_struct(ndr
, "in", "DRSUAPI_ADD_SID_HISTORY");
13963 if (flags
& NDR_OUT
) {
13964 ndr_print_struct(ndr
, "out", "DRSUAPI_ADD_SID_HISTORY");
13966 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13972 static enum ndr_err_code
ndr_push_drsuapi_DsGetMemberships2(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsGetMemberships2
*r
)
13974 if (flags
& NDR_IN
) {
13975 if (r
->in
.bind_handle
== NULL
) {
13976 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13978 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13979 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13980 if (r
->in
.req
== NULL
) {
13981 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13983 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13984 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13986 if (flags
& NDR_OUT
) {
13987 if (r
->out
.level_out
== NULL
) {
13988 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13990 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
13991 if (r
->out
.ctr
== NULL
) {
13992 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13994 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
13995 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13996 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13998 return NDR_ERR_SUCCESS
;
14001 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMemberships2(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsGetMemberships2
*r
)
14003 TALLOC_CTX
*_mem_save_bind_handle_0
;
14004 TALLOC_CTX
*_mem_save_req_0
;
14005 TALLOC_CTX
*_mem_save_level_out_0
;
14006 TALLOC_CTX
*_mem_save_ctr_0
;
14007 if (flags
& NDR_IN
) {
14008 ZERO_STRUCT(r
->out
);
14010 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14011 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14013 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14014 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14015 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14016 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14017 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14018 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14019 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
14021 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14022 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
14023 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14024 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14025 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
14026 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14027 ZERO_STRUCTP(r
->out
.level_out
);
14028 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
14029 ZERO_STRUCTP(r
->out
.ctr
);
14031 if (flags
& NDR_OUT
) {
14032 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14033 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14035 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14036 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
14037 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
14038 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
14039 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14040 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
14042 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14043 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
14044 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
14045 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
14046 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
14047 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14049 return NDR_ERR_SUCCESS
;
14052 _PUBLIC_
void ndr_print_drsuapi_DsGetMemberships2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsGetMemberships2
*r
)
14054 ndr_print_struct(ndr
, name
, "drsuapi_DsGetMemberships2");
14056 if (flags
& NDR_SET_VALUES
) {
14057 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14059 if (flags
& NDR_IN
) {
14060 ndr_print_struct(ndr
, "in", "drsuapi_DsGetMemberships2");
14062 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
14064 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
14066 ndr_print_int32(ndr
, "level", r
->in
.level
);
14067 ndr_print_ptr(ndr
, "req", r
->in
.req
);
14069 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
14070 ndr_print_drsuapi_DsGetMemberships2Request(ndr
, "req", r
->in
.req
);
14074 if (flags
& NDR_OUT
) {
14075 ndr_print_struct(ndr
, "out", "drsuapi_DsGetMemberships2");
14077 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
14079 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
14081 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
14083 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
14084 ndr_print_drsuapi_DsGetMemberships2Ctr(ndr
, "ctr", r
->out
.ctr
);
14086 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14092 static enum ndr_err_code
ndr_push_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_REPLICA_VERIFY_OBJECTS
*r
)
14094 if (flags
& NDR_IN
) {
14096 if (flags
& NDR_OUT
) {
14097 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14099 return NDR_ERR_SUCCESS
;
14102 static enum ndr_err_code
ndr_pull_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_REPLICA_VERIFY_OBJECTS
*r
)
14104 if (flags
& NDR_IN
) {
14106 if (flags
& NDR_OUT
) {
14107 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14109 return NDR_ERR_SUCCESS
;
14112 _PUBLIC_
void ndr_print_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_REPLICA_VERIFY_OBJECTS
*r
)
14114 ndr_print_struct(ndr
, name
, "DRSUAPI_REPLICA_VERIFY_OBJECTS");
14116 if (flags
& NDR_SET_VALUES
) {
14117 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14119 if (flags
& NDR_IN
) {
14120 ndr_print_struct(ndr
, "in", "DRSUAPI_REPLICA_VERIFY_OBJECTS");
14124 if (flags
& NDR_OUT
) {
14125 ndr_print_struct(ndr
, "out", "DRSUAPI_REPLICA_VERIFY_OBJECTS");
14127 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14133 static enum ndr_err_code
ndr_push_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_GET_OBJECT_EXISTENCE
*r
)
14135 if (flags
& NDR_IN
) {
14137 if (flags
& NDR_OUT
) {
14138 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14140 return NDR_ERR_SUCCESS
;
14143 static enum ndr_err_code
ndr_pull_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_GET_OBJECT_EXISTENCE
*r
)
14145 if (flags
& NDR_IN
) {
14147 if (flags
& NDR_OUT
) {
14148 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14150 return NDR_ERR_SUCCESS
;
14153 _PUBLIC_
void ndr_print_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_GET_OBJECT_EXISTENCE
*r
)
14155 ndr_print_struct(ndr
, name
, "DRSUAPI_GET_OBJECT_EXISTENCE");
14157 if (flags
& NDR_SET_VALUES
) {
14158 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14160 if (flags
& NDR_IN
) {
14161 ndr_print_struct(ndr
, "in", "DRSUAPI_GET_OBJECT_EXISTENCE");
14165 if (flags
& NDR_OUT
) {
14166 ndr_print_struct(ndr
, "out", "DRSUAPI_GET_OBJECT_EXISTENCE");
14168 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14174 static enum ndr_err_code
ndr_push_drsuapi_QuerySitesByCost(struct ndr_push
*ndr
, int flags
, const struct drsuapi_QuerySitesByCost
*r
)
14176 if (flags
& NDR_IN
) {
14177 if (r
->in
.bind_handle
== NULL
) {
14178 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14180 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14181 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
14182 if (r
->in
.req
== NULL
) {
14183 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14185 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14186 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14188 if (flags
& NDR_OUT
) {
14189 if (r
->out
.level_out
== NULL
) {
14190 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14192 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
14193 if (r
->out
.ctr
== NULL
) {
14194 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14196 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
14197 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
14198 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14200 return NDR_ERR_SUCCESS
;
14203 static enum ndr_err_code
ndr_pull_drsuapi_QuerySitesByCost(struct ndr_pull
*ndr
, int flags
, struct drsuapi_QuerySitesByCost
*r
)
14205 TALLOC_CTX
*_mem_save_bind_handle_0
;
14206 TALLOC_CTX
*_mem_save_req_0
;
14207 TALLOC_CTX
*_mem_save_level_out_0
;
14208 TALLOC_CTX
*_mem_save_ctr_0
;
14209 if (flags
& NDR_IN
) {
14210 ZERO_STRUCT(r
->out
);
14212 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14213 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14215 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14216 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14217 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14218 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14219 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14220 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14221 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
14223 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14224 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
14225 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14226 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14227 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
14228 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14229 ZERO_STRUCTP(r
->out
.level_out
);
14230 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
14231 ZERO_STRUCTP(r
->out
.ctr
);
14233 if (flags
& NDR_OUT
) {
14234 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14235 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14237 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14238 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
14239 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
14240 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
14241 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14242 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
14244 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14245 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
14246 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
14247 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
14248 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
14249 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14251 return NDR_ERR_SUCCESS
;
14254 _PUBLIC_
void ndr_print_drsuapi_QuerySitesByCost(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_QuerySitesByCost
*r
)
14256 ndr_print_struct(ndr
, name
, "drsuapi_QuerySitesByCost");
14258 if (flags
& NDR_SET_VALUES
) {
14259 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14261 if (flags
& NDR_IN
) {
14262 ndr_print_struct(ndr
, "in", "drsuapi_QuerySitesByCost");
14264 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
14266 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
14268 ndr_print_int32(ndr
, "level", r
->in
.level
);
14269 ndr_print_ptr(ndr
, "req", r
->in
.req
);
14271 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
14272 ndr_print_drsuapi_QuerySitesByCostRequest(ndr
, "req", r
->in
.req
);
14276 if (flags
& NDR_OUT
) {
14277 ndr_print_struct(ndr
, "out", "drsuapi_QuerySitesByCost");
14279 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
14281 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
14283 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
14285 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
14286 ndr_print_drsuapi_QuerySitesByCostCtr(ndr
, "ctr", r
->out
.ctr
);
14288 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14294 static const struct ndr_interface_call drsuapi_calls
[] = {
14297 sizeof(struct drsuapi_DsBind
),
14298 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsBind
,
14299 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsBind
,
14300 (ndr_print_function_t
) ndr_print_drsuapi_DsBind
,
14304 "drsuapi_DsUnbind",
14305 sizeof(struct drsuapi_DsUnbind
),
14306 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsUnbind
,
14307 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsUnbind
,
14308 (ndr_print_function_t
) ndr_print_drsuapi_DsUnbind
,
14312 "drsuapi_DsReplicaSync",
14313 sizeof(struct drsuapi_DsReplicaSync
),
14314 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsReplicaSync
,
14315 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsReplicaSync
,
14316 (ndr_print_function_t
) ndr_print_drsuapi_DsReplicaSync
,
14320 "drsuapi_DsGetNCChanges",
14321 sizeof(struct drsuapi_DsGetNCChanges
),
14322 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsGetNCChanges
,
14323 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsGetNCChanges
,
14324 (ndr_print_function_t
) ndr_print_drsuapi_DsGetNCChanges
,
14328 "drsuapi_DsReplicaUpdateRefs",
14329 sizeof(struct drsuapi_DsReplicaUpdateRefs
),
14330 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsReplicaUpdateRefs
,
14331 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsReplicaUpdateRefs
,
14332 (ndr_print_function_t
) ndr_print_drsuapi_DsReplicaUpdateRefs
,
14336 "DRSUAPI_REPLICA_ADD",
14337 sizeof(struct DRSUAPI_REPLICA_ADD
),
14338 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_REPLICA_ADD
,
14339 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_REPLICA_ADD
,
14340 (ndr_print_function_t
) ndr_print_DRSUAPI_REPLICA_ADD
,
14344 "DRSUAPI_REPLICA_DEL",
14345 sizeof(struct DRSUAPI_REPLICA_DEL
),
14346 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_REPLICA_DEL
,
14347 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_REPLICA_DEL
,
14348 (ndr_print_function_t
) ndr_print_DRSUAPI_REPLICA_DEL
,
14352 "DRSUAPI_REPLICA_MODIFY",
14353 sizeof(struct DRSUAPI_REPLICA_MODIFY
),
14354 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_REPLICA_MODIFY
,
14355 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_REPLICA_MODIFY
,
14356 (ndr_print_function_t
) ndr_print_DRSUAPI_REPLICA_MODIFY
,
14360 "DRSUAPI_VERIFY_NAMES",
14361 sizeof(struct DRSUAPI_VERIFY_NAMES
),
14362 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_VERIFY_NAMES
,
14363 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_VERIFY_NAMES
,
14364 (ndr_print_function_t
) ndr_print_DRSUAPI_VERIFY_NAMES
,
14368 "drsuapi_DsGetMemberships",
14369 sizeof(struct drsuapi_DsGetMemberships
),
14370 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsGetMemberships
,
14371 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsGetMemberships
,
14372 (ndr_print_function_t
) ndr_print_drsuapi_DsGetMemberships
,
14376 "DRSUAPI_INTER_DOMAIN_MOVE",
14377 sizeof(struct DRSUAPI_INTER_DOMAIN_MOVE
),
14378 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_INTER_DOMAIN_MOVE
,
14379 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_INTER_DOMAIN_MOVE
,
14380 (ndr_print_function_t
) ndr_print_DRSUAPI_INTER_DOMAIN_MOVE
,
14384 "drsuapi_DsGetNT4ChangeLog",
14385 sizeof(struct drsuapi_DsGetNT4ChangeLog
),
14386 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsGetNT4ChangeLog
,
14387 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsGetNT4ChangeLog
,
14388 (ndr_print_function_t
) ndr_print_drsuapi_DsGetNT4ChangeLog
,
14392 "drsuapi_DsCrackNames",
14393 sizeof(struct drsuapi_DsCrackNames
),
14394 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsCrackNames
,
14395 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsCrackNames
,
14396 (ndr_print_function_t
) ndr_print_drsuapi_DsCrackNames
,
14400 "drsuapi_DsWriteAccountSpn",
14401 sizeof(struct drsuapi_DsWriteAccountSpn
),
14402 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsWriteAccountSpn
,
14403 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsWriteAccountSpn
,
14404 (ndr_print_function_t
) ndr_print_drsuapi_DsWriteAccountSpn
,
14408 "drsuapi_DsRemoveDSServer",
14409 sizeof(struct drsuapi_DsRemoveDSServer
),
14410 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsRemoveDSServer
,
14411 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsRemoveDSServer
,
14412 (ndr_print_function_t
) ndr_print_drsuapi_DsRemoveDSServer
,
14416 "DRSUAPI_REMOVE_DS_DOMAIN",
14417 sizeof(struct DRSUAPI_REMOVE_DS_DOMAIN
),
14418 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_REMOVE_DS_DOMAIN
,
14419 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_REMOVE_DS_DOMAIN
,
14420 (ndr_print_function_t
) ndr_print_DRSUAPI_REMOVE_DS_DOMAIN
,
14424 "drsuapi_DsGetDomainControllerInfo",
14425 sizeof(struct drsuapi_DsGetDomainControllerInfo
),
14426 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsGetDomainControllerInfo
,
14427 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsGetDomainControllerInfo
,
14428 (ndr_print_function_t
) ndr_print_drsuapi_DsGetDomainControllerInfo
,
14432 "drsuapi_DsAddEntry",
14433 sizeof(struct drsuapi_DsAddEntry
),
14434 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsAddEntry
,
14435 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsAddEntry
,
14436 (ndr_print_function_t
) ndr_print_drsuapi_DsAddEntry
,
14440 "DRSUAPI_EXECUTE_KCC",
14441 sizeof(struct DRSUAPI_EXECUTE_KCC
),
14442 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_EXECUTE_KCC
,
14443 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_EXECUTE_KCC
,
14444 (ndr_print_function_t
) ndr_print_DRSUAPI_EXECUTE_KCC
,
14448 "drsuapi_DsReplicaGetInfo",
14449 sizeof(struct drsuapi_DsReplicaGetInfo
),
14450 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsReplicaGetInfo
,
14451 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsReplicaGetInfo
,
14452 (ndr_print_function_t
) ndr_print_drsuapi_DsReplicaGetInfo
,
14456 "DRSUAPI_ADD_SID_HISTORY",
14457 sizeof(struct DRSUAPI_ADD_SID_HISTORY
),
14458 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_ADD_SID_HISTORY
,
14459 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_ADD_SID_HISTORY
,
14460 (ndr_print_function_t
) ndr_print_DRSUAPI_ADD_SID_HISTORY
,
14464 "drsuapi_DsGetMemberships2",
14465 sizeof(struct drsuapi_DsGetMemberships2
),
14466 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsGetMemberships2
,
14467 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsGetMemberships2
,
14468 (ndr_print_function_t
) ndr_print_drsuapi_DsGetMemberships2
,
14472 "DRSUAPI_REPLICA_VERIFY_OBJECTS",
14473 sizeof(struct DRSUAPI_REPLICA_VERIFY_OBJECTS
),
14474 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
14475 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
14476 (ndr_print_function_t
) ndr_print_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
14480 "DRSUAPI_GET_OBJECT_EXISTENCE",
14481 sizeof(struct DRSUAPI_GET_OBJECT_EXISTENCE
),
14482 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_GET_OBJECT_EXISTENCE
,
14483 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_GET_OBJECT_EXISTENCE
,
14484 (ndr_print_function_t
) ndr_print_DRSUAPI_GET_OBJECT_EXISTENCE
,
14488 "drsuapi_QuerySitesByCost",
14489 sizeof(struct drsuapi_QuerySitesByCost
),
14490 (ndr_push_flags_fn_t
) ndr_push_drsuapi_QuerySitesByCost
,
14491 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_QuerySitesByCost
,
14492 (ndr_print_function_t
) ndr_print_drsuapi_QuerySitesByCost
,
14495 { NULL
, 0, NULL
, NULL
, NULL
, false }
14498 static const char * const drsuapi_endpoint_strings
[] = {
14499 "ncacn_np:[\\pipe\\lsass]",
14500 "ncacn_np:[\\pipe\\protected_storage]",
14505 static const struct ndr_interface_string_array drsuapi_endpoints
= {
14507 .names
= drsuapi_endpoint_strings
14510 static const char * const drsuapi_authservice_strings
[] = {
14514 static const struct ndr_interface_string_array drsuapi_authservices
= {
14516 .names
= drsuapi_authservice_strings
14520 const struct ndr_interface_table ndr_table_drsuapi
= {
14523 {0xe3514235,0x4b06,0x11d1,{0xab,0x04},{0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},
14524 NDR_DRSUAPI_VERSION
14526 .helpstring
= NDR_DRSUAPI_HELPSTRING
,
14528 .calls
= drsuapi_calls
,
14529 .endpoints
= &drsuapi_endpoints
,
14530 .authservices
= &drsuapi_authservices