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
));
95 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
97 if (ndr_flags
& NDR_BUFFERS
) {
99 return NDR_ERR_SUCCESS
;
102 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfo24(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsBindInfo24
*r
)
104 if (ndr_flags
& NDR_SCALARS
) {
105 NDR_CHECK(ndr_pull_align(ndr
, 4));
106 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, &r
->supported_extensions
));
107 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
108 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pid
));
109 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
111 if (ndr_flags
& NDR_BUFFERS
) {
113 return NDR_ERR_SUCCESS
;
116 _PUBLIC_
void ndr_print_drsuapi_DsBindInfo24(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsBindInfo24
*r
)
118 ndr_print_struct(ndr
, name
, "drsuapi_DsBindInfo24");
120 ndr_print_drsuapi_SupportedExtensions(ndr
, "supported_extensions", r
->supported_extensions
);
121 ndr_print_GUID(ndr
, "site_guid", &r
->site_guid
);
122 ndr_print_uint32(ndr
, "pid", r
->pid
);
126 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfo28(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsBindInfo28
*r
)
128 if (ndr_flags
& NDR_SCALARS
) {
129 NDR_CHECK(ndr_push_align(ndr
, 4));
130 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, r
->supported_extensions
));
131 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
132 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pid
));
133 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->repl_epoch
));
134 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
136 if (ndr_flags
& NDR_BUFFERS
) {
138 return NDR_ERR_SUCCESS
;
141 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfo28(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsBindInfo28
*r
)
143 if (ndr_flags
& NDR_SCALARS
) {
144 NDR_CHECK(ndr_pull_align(ndr
, 4));
145 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, &r
->supported_extensions
));
146 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
147 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pid
));
148 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->repl_epoch
));
149 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
151 if (ndr_flags
& NDR_BUFFERS
) {
153 return NDR_ERR_SUCCESS
;
156 _PUBLIC_
void ndr_print_drsuapi_DsBindInfo28(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsBindInfo28
*r
)
158 ndr_print_struct(ndr
, name
, "drsuapi_DsBindInfo28");
160 ndr_print_drsuapi_SupportedExtensions(ndr
, "supported_extensions", r
->supported_extensions
);
161 ndr_print_GUID(ndr
, "site_guid", &r
->site_guid
);
162 ndr_print_uint32(ndr
, "pid", r
->pid
);
163 ndr_print_uint32(ndr
, "repl_epoch", r
->repl_epoch
);
167 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfo48(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsBindInfo48
*r
)
169 if (ndr_flags
& NDR_SCALARS
) {
170 NDR_CHECK(ndr_push_align(ndr
, 4));
171 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, r
->supported_extensions
));
172 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
173 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pid
));
174 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->repl_epoch
));
175 NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr
, NDR_SCALARS
, r
->supported_extensions_ext
));
176 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->config_dn_guid
));
177 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
179 if (ndr_flags
& NDR_BUFFERS
) {
181 return NDR_ERR_SUCCESS
;
184 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfo48(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsBindInfo48
*r
)
186 if (ndr_flags
& NDR_SCALARS
) {
187 NDR_CHECK(ndr_pull_align(ndr
, 4));
188 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr
, NDR_SCALARS
, &r
->supported_extensions
));
189 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
190 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pid
));
191 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->repl_epoch
));
192 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr
, NDR_SCALARS
, &r
->supported_extensions_ext
));
193 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->config_dn_guid
));
194 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
196 if (ndr_flags
& NDR_BUFFERS
) {
198 return NDR_ERR_SUCCESS
;
201 _PUBLIC_
void ndr_print_drsuapi_DsBindInfo48(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsBindInfo48
*r
)
203 ndr_print_struct(ndr
, name
, "drsuapi_DsBindInfo48");
205 ndr_print_drsuapi_SupportedExtensions(ndr
, "supported_extensions", r
->supported_extensions
);
206 ndr_print_GUID(ndr
, "site_guid", &r
->site_guid
);
207 ndr_print_uint32(ndr
, "pid", r
->pid
);
208 ndr_print_uint32(ndr
, "repl_epoch", r
->repl_epoch
);
209 ndr_print_drsuapi_SupportedExtensionsExt(ndr
, "supported_extensions_ext", r
->supported_extensions_ext
);
210 ndr_print_GUID(ndr
, "config_dn_guid", &r
->config_dn_guid
);
214 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfoFallBack(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsBindInfoFallBack
*r
)
216 if (ndr_flags
& NDR_SCALARS
) {
217 NDR_CHECK(ndr_push_align(ndr
, 4));
219 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
220 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
221 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->info
));
222 ndr
->flags
= _flags_save_DATA_BLOB
;
224 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
226 if (ndr_flags
& NDR_BUFFERS
) {
228 return NDR_ERR_SUCCESS
;
231 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfoFallBack(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsBindInfoFallBack
*r
)
233 if (ndr_flags
& NDR_SCALARS
) {
234 NDR_CHECK(ndr_pull_align(ndr
, 4));
236 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
237 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
238 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->info
));
239 ndr
->flags
= _flags_save_DATA_BLOB
;
241 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
243 if (ndr_flags
& NDR_BUFFERS
) {
245 return NDR_ERR_SUCCESS
;
248 _PUBLIC_
void ndr_print_drsuapi_DsBindInfoFallBack(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsBindInfoFallBack
*r
)
250 ndr_print_struct(ndr
, name
, "drsuapi_DsBindInfoFallBack");
252 ndr_print_DATA_BLOB(ndr
, "info", r
->info
);
256 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfo(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsBindInfo
*r
)
258 if (ndr_flags
& NDR_SCALARS
) {
259 int level
= ndr_push_get_switch_value(ndr
, r
);
260 NDR_CHECK(ndr_push_union_align(ndr
, 1));
264 struct ndr_push
*_ndr_info24
;
265 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info24
, 4, -1));
266 NDR_CHECK(ndr_push_drsuapi_DsBindInfo24(_ndr_info24
, NDR_SCALARS
, &r
->info24
));
267 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info24
, 4, -1));
273 struct ndr_push
*_ndr_info28
;
274 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info28
, 4, -1));
275 NDR_CHECK(ndr_push_drsuapi_DsBindInfo28(_ndr_info28
, NDR_SCALARS
, &r
->info28
));
276 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info28
, 4, -1));
282 struct ndr_push
*_ndr_info48
;
283 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info48
, 4, -1));
284 NDR_CHECK(ndr_push_drsuapi_DsBindInfo48(_ndr_info48
, NDR_SCALARS
, &r
->info48
));
285 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info48
, 4, -1));
291 struct ndr_push
*_ndr_FallBack
;
292 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_FallBack
, 4, -1));
293 NDR_CHECK(ndr_push_drsuapi_DsBindInfoFallBack(_ndr_FallBack
, NDR_SCALARS
, &r
->FallBack
));
294 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_FallBack
, 4, -1));
300 if (ndr_flags
& NDR_BUFFERS
) {
301 int level
= ndr_push_get_switch_value(ndr
, r
);
317 return NDR_ERR_SUCCESS
;
320 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfo(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsBindInfo
*r
)
323 level
= ndr_pull_get_switch_value(ndr
, r
);
324 if (ndr_flags
& NDR_SCALARS
) {
325 NDR_CHECK(ndr_pull_union_align(ndr
, 1));
329 struct ndr_pull
*_ndr_info24
;
330 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info24
, 4, -1));
331 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo24(_ndr_info24
, NDR_SCALARS
, &r
->info24
));
332 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info24
, 4, -1));
338 struct ndr_pull
*_ndr_info28
;
339 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info28
, 4, -1));
340 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo28(_ndr_info28
, NDR_SCALARS
, &r
->info28
));
341 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info28
, 4, -1));
347 struct ndr_pull
*_ndr_info48
;
348 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info48
, 4, -1));
349 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo48(_ndr_info48
, NDR_SCALARS
, &r
->info48
));
350 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info48
, 4, -1));
356 struct ndr_pull
*_ndr_FallBack
;
357 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_FallBack
, 4, -1));
358 NDR_CHECK(ndr_pull_drsuapi_DsBindInfoFallBack(_ndr_FallBack
, NDR_SCALARS
, &r
->FallBack
));
359 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_FallBack
, 4, -1));
365 if (ndr_flags
& NDR_BUFFERS
) {
381 return NDR_ERR_SUCCESS
;
384 _PUBLIC_
void ndr_print_drsuapi_DsBindInfo(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsBindInfo
*r
)
387 level
= ndr_print_get_switch_value(ndr
, r
);
388 ndr_print_union(ndr
, name
, level
, "drsuapi_DsBindInfo");
391 ndr_print_drsuapi_DsBindInfo24(ndr
, "info24", &r
->info24
);
395 ndr_print_drsuapi_DsBindInfo28(ndr
, "info28", &r
->info28
);
399 ndr_print_drsuapi_DsBindInfo48(ndr
, "info48", &r
->info48
);
403 ndr_print_drsuapi_DsBindInfoFallBack(ndr
, "FallBack", &r
->FallBack
);
409 static enum ndr_err_code
ndr_push_drsuapi_DsBindInfoCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsBindInfoCtr
*r
)
411 if (ndr_flags
& NDR_SCALARS
) {
412 NDR_CHECK(ndr_push_align(ndr
, 4));
413 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
414 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->info
, r
->length
));
415 NDR_CHECK(ndr_push_drsuapi_DsBindInfo(ndr
, NDR_SCALARS
, &r
->info
));
416 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
418 if (ndr_flags
& NDR_BUFFERS
) {
420 return NDR_ERR_SUCCESS
;
423 static enum ndr_err_code
ndr_pull_drsuapi_DsBindInfoCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsBindInfoCtr
*r
)
425 if (ndr_flags
& NDR_SCALARS
) {
426 NDR_CHECK(ndr_pull_align(ndr
, 4));
427 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
428 if (r
->length
< 1 || r
->length
> 10000) {
429 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
431 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->info
, r
->length
));
432 NDR_CHECK(ndr_pull_drsuapi_DsBindInfo(ndr
, NDR_SCALARS
, &r
->info
));
433 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
435 if (ndr_flags
& NDR_BUFFERS
) {
437 return NDR_ERR_SUCCESS
;
440 _PUBLIC_
void ndr_print_drsuapi_DsBindInfoCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsBindInfoCtr
*r
)
442 ndr_print_struct(ndr
, name
, "drsuapi_DsBindInfoCtr");
444 ndr_print_uint32(ndr
, "length", r
->length
);
445 ndr_print_set_switch_value(ndr
, &r
->info
, r
->length
);
446 ndr_print_drsuapi_DsBindInfo(ndr
, "info", &r
->info
);
450 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectIdentifier(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectIdentifier
*r
)
452 if (ndr_flags
& NDR_SCALARS
) {
453 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, strlen_m(r
->dn
) + 1));
454 NDR_CHECK(ndr_push_align(ndr
, 4));
455 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_drsuapi_DsReplicaObjectIdentifier(r
, ndr
->iconv_convenience
, ndr
->flags
) - 4));
456 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_dom_sid28(&r
->sid
, ndr
->flags
)));
457 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
458 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
459 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->dn
)));
460 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dn
, strlen_m(r
->dn
) + 1, sizeof(uint16_t), CH_UTF16
));
461 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
463 if (ndr_flags
& NDR_BUFFERS
) {
464 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
466 return NDR_ERR_SUCCESS
;
469 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectIdentifier(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectIdentifier
*r
)
471 if (ndr_flags
& NDR_SCALARS
) {
472 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dn
));
473 NDR_CHECK(ndr_pull_align(ndr
, 4));
474 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
475 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_sid
));
476 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
477 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
478 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_dn
));
479 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dn
, ndr_get_array_size(ndr
, &r
->dn
), sizeof(uint16_t), CH_UTF16
));
481 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->dn
, r
->__ndr_size_dn
+ 1));
483 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
485 if (ndr_flags
& NDR_BUFFERS
) {
486 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
488 return NDR_ERR_SUCCESS
;
491 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjectIdentifier(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjectIdentifier
*r
)
493 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjectIdentifier");
495 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
);
496 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
);
497 ndr_print_GUID(ndr
, "guid", &r
->guid
);
498 ndr_print_dom_sid28(ndr
, "sid", &r
->sid
);
499 ndr_print_uint32(ndr
, "__ndr_size_dn", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->dn
):r
->__ndr_size_dn
);
500 ndr_print_string(ndr
, "dn", r
->dn
);
504 _PUBLIC_
size_t ndr_size_drsuapi_DsReplicaObjectIdentifier(const struct drsuapi_DsReplicaObjectIdentifier
*r
, struct smb_iconv_convenience
*ic
, int flags
)
506 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_drsuapi_DsReplicaObjectIdentifier
, ic
);
509 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaSyncOptions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
511 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
512 return NDR_ERR_SUCCESS
;
515 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaSyncOptions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
518 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
520 return NDR_ERR_SUCCESS
;
523 _PUBLIC_
void ndr_print_drsuapi_DsReplicaSyncOptions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
525 ndr_print_uint32(ndr
, name
, r
);
527 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_OPERATION
, r
);
528 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_WRITEABLE", DRSUAPI_DS_REPLICA_SYNC_WRITEABLE
, r
);
529 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_PERIODIC", DRSUAPI_DS_REPLICA_SYNC_PERIODIC
, r
);
530 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_INTERSITE_MESSAGING", DRSUAPI_DS_REPLICA_SYNC_INTERSITE_MESSAGING
, r
);
531 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_ALL_SOURCES", DRSUAPI_DS_REPLICA_SYNC_ALL_SOURCES
, r
);
532 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_FULL", DRSUAPI_DS_REPLICA_SYNC_FULL
, r
);
533 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_URGENT", DRSUAPI_DS_REPLICA_SYNC_URGENT
, r
);
534 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_NO_DISCARD", DRSUAPI_DS_REPLICA_SYNC_NO_DISCARD
, r
);
535 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_FORCE", DRSUAPI_DS_REPLICA_SYNC_FORCE
, r
);
536 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_ADD_REFERENCE", DRSUAPI_DS_REPLICA_SYNC_ADD_REFERENCE
, r
);
537 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_NEVER_COMPLETED", DRSUAPI_DS_REPLICA_SYNC_NEVER_COMPLETED
, r
);
538 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_TWO_WAY", DRSUAPI_DS_REPLICA_SYNC_TWO_WAY
, r
);
539 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_NEVER_NOTIFY", DRSUAPI_DS_REPLICA_SYNC_NEVER_NOTIFY
, r
);
540 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_INITIAL", DRSUAPI_DS_REPLICA_SYNC_INITIAL
, r
);
541 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_USE_COMPRESSION", DRSUAPI_DS_REPLICA_SYNC_USE_COMPRESSION
, r
);
542 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_ABANDONED", DRSUAPI_DS_REPLICA_SYNC_ABANDONED
, r
);
543 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_INITIAL_IN_PROGRESS", DRSUAPI_DS_REPLICA_SYNC_INITIAL_IN_PROGRESS
, r
);
544 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_PARTIAL_ATTRIBUTE_SET", DRSUAPI_DS_REPLICA_SYNC_PARTIAL_ATTRIBUTE_SET
, r
);
545 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_REQUEUE", DRSUAPI_DS_REPLICA_SYNC_REQUEUE
, r
);
546 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_NOTIFICATION", DRSUAPI_DS_REPLICA_SYNC_NOTIFICATION
, r
);
547 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_REPLICA", DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_REPLICA
, r
);
548 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_CRITICAL", DRSUAPI_DS_REPLICA_SYNC_CRITICAL
, r
);
549 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_FULL_IN_PROGRESS", DRSUAPI_DS_REPLICA_SYNC_FULL_IN_PROGRESS
, r
);
550 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_SYNC_PREEMPTED", DRSUAPI_DS_REPLICA_SYNC_PREEMPTED
, r
);
554 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaSyncRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaSyncRequest1
*r
)
556 if (ndr_flags
& NDR_SCALARS
) {
557 NDR_CHECK(ndr_push_align(ndr
, 5));
558 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->naming_context
));
559 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
561 uint32_t _flags_save_string
= ndr
->flags
;
562 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
563 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->other_info
));
564 ndr
->flags
= _flags_save_string
;
566 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncOptions(ndr
, NDR_SCALARS
, r
->options
));
567 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
569 if (ndr_flags
& NDR_BUFFERS
) {
570 if (r
->naming_context
) {
571 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
574 uint32_t _flags_save_string
= ndr
->flags
;
575 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
577 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->other_info
));
579 ndr
->flags
= _flags_save_string
;
582 return NDR_ERR_SUCCESS
;
585 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaSyncRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaSyncRequest1
*r
)
587 uint32_t _ptr_naming_context
;
588 TALLOC_CTX
*_mem_save_naming_context_0
;
589 uint32_t _ptr_other_info
;
590 TALLOC_CTX
*_mem_save_other_info_0
;
591 if (ndr_flags
& NDR_SCALARS
) {
592 NDR_CHECK(ndr_pull_align(ndr
, 5));
593 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_naming_context
));
594 if (_ptr_naming_context
) {
595 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
597 r
->naming_context
= NULL
;
599 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
601 uint32_t _flags_save_string
= ndr
->flags
;
602 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
603 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_other_info
));
604 if (_ptr_other_info
) {
605 NDR_PULL_ALLOC(ndr
, r
->other_info
);
607 r
->other_info
= NULL
;
609 ndr
->flags
= _flags_save_string
;
611 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncOptions(ndr
, NDR_SCALARS
, &r
->options
));
612 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
614 if (ndr_flags
& NDR_BUFFERS
) {
615 if (r
->naming_context
) {
616 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
617 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
618 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
619 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
622 uint32_t _flags_save_string
= ndr
->flags
;
623 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
625 _mem_save_other_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
626 NDR_PULL_SET_MEM_CTX(ndr
, r
->other_info
, 0);
627 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->other_info
));
628 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_other_info_0
, 0);
630 ndr
->flags
= _flags_save_string
;
633 return NDR_ERR_SUCCESS
;
636 _PUBLIC_
void ndr_print_drsuapi_DsReplicaSyncRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaSyncRequest1
*r
)
638 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaSyncRequest1");
640 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
642 if (r
->naming_context
) {
643 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
646 ndr_print_GUID(ndr
, "source_dsa_guid", &r
->source_dsa_guid
);
647 ndr_print_ptr(ndr
, "other_info", r
->other_info
);
650 ndr_print_string(ndr
, "other_info", r
->other_info
);
653 ndr_print_drsuapi_DsReplicaSyncOptions(ndr
, "options", r
->options
);
657 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaSyncRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaSyncRequest
*r
)
659 if (ndr_flags
& NDR_SCALARS
) {
660 int level
= ndr_push_get_switch_value(ndr
, r
);
661 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
662 NDR_CHECK(ndr_push_union_align(ndr
, 5));
665 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
669 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
672 if (ndr_flags
& NDR_BUFFERS
) {
673 int level
= ndr_push_get_switch_value(ndr
, r
);
676 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
680 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
683 return NDR_ERR_SUCCESS
;
686 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaSyncRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaSyncRequest
*r
)
690 level
= ndr_pull_get_switch_value(ndr
, r
);
691 if (ndr_flags
& NDR_SCALARS
) {
692 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
693 if (_level
!= level
) {
694 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
696 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
699 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
703 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
706 if (ndr_flags
& NDR_BUFFERS
) {
709 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
713 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
716 return NDR_ERR_SUCCESS
;
719 _PUBLIC_
void ndr_print_drsuapi_DsReplicaSyncRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaSyncRequest
*r
)
722 level
= ndr_print_get_switch_value(ndr
, r
);
723 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaSyncRequest");
726 ndr_print_drsuapi_DsReplicaSyncRequest1(ndr
, "req1", &r
->req1
);
730 ndr_print_bad_level(ndr
, name
, level
);
734 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaHighWaterMark(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaHighWaterMark
*r
)
736 if (ndr_flags
& NDR_SCALARS
) {
737 NDR_CHECK(ndr_push_align(ndr
, 8));
738 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->tmp_highest_usn
));
739 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->reserved_usn
));
740 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->highest_usn
));
741 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
743 if (ndr_flags
& NDR_BUFFERS
) {
745 return NDR_ERR_SUCCESS
;
748 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaHighWaterMark(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaHighWaterMark
*r
)
750 if (ndr_flags
& NDR_SCALARS
) {
751 NDR_CHECK(ndr_pull_align(ndr
, 8));
752 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->tmp_highest_usn
));
753 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->reserved_usn
));
754 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->highest_usn
));
755 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
757 if (ndr_flags
& NDR_BUFFERS
) {
759 return NDR_ERR_SUCCESS
;
762 _PUBLIC_
void ndr_print_drsuapi_DsReplicaHighWaterMark(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaHighWaterMark
*r
)
764 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaHighWaterMark");
766 ndr_print_hyper(ndr
, "tmp_highest_usn", r
->tmp_highest_usn
);
767 ndr_print_hyper(ndr
, "reserved_usn", r
->reserved_usn
);
768 ndr_print_hyper(ndr
, "highest_usn", r
->highest_usn
);
772 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor
*r
)
774 if (ndr_flags
& NDR_SCALARS
) {
775 NDR_CHECK(ndr_push_align(ndr
, 8));
776 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
777 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->highest_usn
));
778 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
780 if (ndr_flags
& NDR_BUFFERS
) {
782 return NDR_ERR_SUCCESS
;
785 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor
*r
)
787 if (ndr_flags
& NDR_SCALARS
) {
788 NDR_CHECK(ndr_pull_align(ndr
, 8));
789 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
790 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->highest_usn
));
791 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
793 if (ndr_flags
& NDR_BUFFERS
) {
795 return NDR_ERR_SUCCESS
;
798 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor
*r
)
800 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor");
802 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
803 ndr_print_hyper(ndr
, "highest_usn", r
->highest_usn
);
807 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursorCtrEx(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursorCtrEx
*r
)
809 uint32_t cntr_cursors_0
;
810 if (ndr_flags
& NDR_SCALARS
) {
811 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
812 NDR_CHECK(ndr_push_align(ndr
, 8));
813 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1));
814 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
815 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
816 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
817 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
818 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
820 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
822 if (ndr_flags
& NDR_BUFFERS
) {
824 return NDR_ERR_SUCCESS
;
827 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursorCtrEx(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursorCtrEx
*r
)
829 uint32_t cntr_cursors_0
;
830 TALLOC_CTX
*_mem_save_cursors_0
;
831 if (ndr_flags
& NDR_SCALARS
) {
832 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->cursors
));
833 NDR_CHECK(ndr_pull_align(ndr
, 8));
834 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
835 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved1
));
836 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
837 if (r
->count
> 0x100000) {
838 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
840 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved2
));
841 NDR_PULL_ALLOC_N(ndr
, r
->cursors
, ndr_get_array_size(ndr
, &r
->cursors
));
842 _mem_save_cursors_0
= NDR_PULL_GET_MEM_CTX(ndr
);
843 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors
, 0);
844 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
845 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
847 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors_0
, 0);
849 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->cursors
, r
->count
));
851 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
853 if (ndr_flags
& NDR_BUFFERS
) {
855 return NDR_ERR_SUCCESS
;
858 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursorCtrEx(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursorCtrEx
*r
)
860 uint32_t cntr_cursors_0
;
861 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursorCtrEx");
863 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?1:r
->version
);
864 ndr_print_uint32(ndr
, "reserved1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved1
);
865 ndr_print_uint32(ndr
, "count", r
->count
);
866 ndr_print_uint32(ndr
, "reserved2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved2
);
867 ndr
->print(ndr
, "%s: ARRAY(%d)", "cursors", (int)r
->count
);
869 for (cntr_cursors_0
=0;cntr_cursors_0
<r
->count
;cntr_cursors_0
++) {
871 if (asprintf(&idx_0
, "[%d]", cntr_cursors_0
) != -1) {
872 ndr_print_drsuapi_DsReplicaCursor(ndr
, "cursors", &r
->cursors
[cntr_cursors_0
]);
880 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaNeighbourFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
882 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
883 return NDR_ERR_SUCCESS
;
886 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaNeighbourFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
889 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
891 return NDR_ERR_SUCCESS
;
894 _PUBLIC_
void ndr_print_drsuapi_DsReplicaNeighbourFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
896 ndr_print_uint32(ndr
, name
, r
);
898 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE", DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE
, r
);
899 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP", DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
, r
);
900 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS", DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS
, r
);
901 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
);
902 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_ASYNC_REP", DRSUAPI_DS_REPLICA_NEIGHBOUR_ASYNC_REP
, r
);
903 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_ERROR", DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_ERROR
, r
);
904 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC", DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC
, r
);
905 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_CRITICAL_ONLY", DRSUAPI_DS_REPLICA_NEIGHBOUR_CRITICAL_ONLY
, r
);
906 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS", DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
, r
);
907 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS", DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS
, r
);
908 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_SYNC_PACKET", DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_SYNC_PACKET
, r
);
909 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED", DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
, r
);
910 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_SPECIAL_SECRET_PROCESSING", DRSUAPI_DS_REPLICA_NEIGHBOUR_SPECIAL_SECRET_PROCESSING
, r
);
911 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED", DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED
, r
);
912 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS", DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS
, r
);
913 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC", DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC
, r
);
914 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES", DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES
, r
);
915 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS", DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS
, r
);
916 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET", DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET
, r
);
920 static enum ndr_err_code
ndr_push_drsuapi_DsExtendedOperation(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsExtendedOperation r
)
923 uint32_t _flags_save_ENUM
= ndr
->flags
;
924 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
925 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
926 ndr
->flags
= _flags_save_ENUM
;
928 return NDR_ERR_SUCCESS
;
931 static enum ndr_err_code
ndr_pull_drsuapi_DsExtendedOperation(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsExtendedOperation
*r
)
935 uint32_t _flags_save_ENUM
= ndr
->flags
;
936 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
937 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
939 ndr
->flags
= _flags_save_ENUM
;
941 return NDR_ERR_SUCCESS
;
944 _PUBLIC_
void ndr_print_drsuapi_DsExtendedOperation(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsExtendedOperation r
)
946 const char *val
= NULL
;
949 uint32_t _flags_save_ENUM
= ndr
->flags
;
950 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
952 case DRSUAPI_EXOP_NONE
: val
= "DRSUAPI_EXOP_NONE"; break;
953 case DRSUAPI_EXOP_FSMO_REQ_ROLE
: val
= "DRSUAPI_EXOP_FSMO_REQ_ROLE"; break;
954 case DRSUAPI_EXOP_FSMO_RID_ALLOC
: val
= "DRSUAPI_EXOP_FSMO_RID_ALLOC"; break;
955 case DRSUAPI_EXOP_FSMO_RID_REQ_ROLE
: val
= "DRSUAPI_EXOP_FSMO_RID_REQ_ROLE"; break;
956 case DRSUAPI_EXOP_FSMO_REQ_PDC
: val
= "DRSUAPI_EXOP_FSMO_REQ_PDC"; break;
957 case DRSUAPI_EXOP_FSMO_ABANDON_ROLE
: val
= "DRSUAPI_EXOP_FSMO_ABANDON_ROLE"; break;
958 case DRSUAPI_EXOP_REPL_OBJ
: val
= "DRSUAPI_EXOP_REPL_OBJ"; break;
959 case DRSUAPI_EXOP_REPL_SECRET
: val
= "DRSUAPI_EXOP_REPL_SECRET"; break;
961 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
962 ndr
->flags
= _flags_save_ENUM
;
966 static enum ndr_err_code
ndr_push_drsuapi_DsExtendedError(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsExtendedError r
)
969 uint32_t _flags_save_ENUM
= ndr
->flags
;
970 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
971 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
972 ndr
->flags
= _flags_save_ENUM
;
974 return NDR_ERR_SUCCESS
;
977 static enum ndr_err_code
ndr_pull_drsuapi_DsExtendedError(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsExtendedError
*r
)
981 uint32_t _flags_save_ENUM
= ndr
->flags
;
982 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
983 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
985 ndr
->flags
= _flags_save_ENUM
;
987 return NDR_ERR_SUCCESS
;
990 _PUBLIC_
void ndr_print_drsuapi_DsExtendedError(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsExtendedError r
)
992 const char *val
= NULL
;
995 uint32_t _flags_save_ENUM
= ndr
->flags
;
996 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
998 case DRSUAPI_EXOP_ERR_NONE
: val
= "DRSUAPI_EXOP_ERR_NONE"; break;
999 case DRSUAPI_EXOP_ERR_SUCCESS
: val
= "DRSUAPI_EXOP_ERR_SUCCESS"; break;
1000 case DRSUAPI_EXOP_ERR_UNKNOWN_OP
: val
= "DRSUAPI_EXOP_ERR_UNKNOWN_OP"; break;
1001 case DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER
: val
= "DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER"; break;
1002 case DRSUAPI_EXOP_ERR_UPDATE_ERR
: val
= "DRSUAPI_EXOP_ERR_UPDATE_ERR"; break;
1003 case DRSUAPI_EXOP_ERR_EXCEPTION
: val
= "DRSUAPI_EXOP_ERR_EXCEPTION"; break;
1004 case DRSUAPI_EXOP_ERR_UNKNOWN_CALLER
: val
= "DRSUAPI_EXOP_ERR_UNKNOWN_CALLER"; break;
1005 case DRSUAPI_EXOP_ERR_RID_ALLOC
: val
= "DRSUAPI_EXOP_ERR_RID_ALLOC"; break;
1006 case DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED
: val
= "DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED"; break;
1007 case DRSUAPI_EXOP_ERR_FMSO_PENDING_OP
: val
= "DRSUAPI_EXOP_ERR_FMSO_PENDING_OP"; break;
1008 case DRSUAPI_EXOP_ERR_MISMATCH
: val
= "DRSUAPI_EXOP_ERR_MISMATCH"; break;
1009 case DRSUAPI_EXOP_ERR_COULDNT_CONTACT
: val
= "DRSUAPI_EXOP_ERR_COULDNT_CONTACT"; break;
1010 case DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES
: val
= "DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES"; break;
1011 case DRSUAPI_EXOP_ERR_DIR_ERROR
: val
= "DRSUAPI_EXOP_ERR_DIR_ERROR"; break;
1012 case DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS
: val
= "DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS"; break;
1013 case DRSUAPI_EXOP_ERR_ACCESS_DENIED
: val
= "DRSUAPI_EXOP_ERR_ACCESS_DENIED"; break;
1014 case DRSUAPI_EXOP_ERR_PARAM_ERROR
: val
= "DRSUAPI_EXOP_ERR_PARAM_ERROR"; break;
1016 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1017 ndr
->flags
= _flags_save_ENUM
;
1021 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesRequest5(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesRequest5
*r
)
1023 if (ndr_flags
& NDR_SCALARS
) {
1024 NDR_CHECK(ndr_push_align(ndr
, 8));
1025 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->destination_dsa_guid
));
1026 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1027 if (r
->naming_context
== NULL
) {
1028 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1030 NDR_CHECK(ndr_push_ref_ptr(ndr
));
1031 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1032 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->uptodateness_vector
));
1033 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, r
->replica_flags
));
1034 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_object_count
));
1035 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_ndr_size
));
1036 NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr
, NDR_SCALARS
, r
->extended_op
));
1037 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->fsmo_info
));
1038 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
1040 if (ndr_flags
& NDR_BUFFERS
) {
1041 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
1042 if (r
->uptodateness_vector
) {
1043 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
1046 return NDR_ERR_SUCCESS
;
1049 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesRequest5(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesRequest5
*r
)
1051 uint32_t _ptr_naming_context
;
1052 TALLOC_CTX
*_mem_save_naming_context_0
;
1053 uint32_t _ptr_uptodateness_vector
;
1054 TALLOC_CTX
*_mem_save_uptodateness_vector_0
;
1055 if (ndr_flags
& NDR_SCALARS
) {
1056 NDR_CHECK(ndr_pull_align(ndr
, 8));
1057 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->destination_dsa_guid
));
1058 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1059 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
1060 if (_ptr_naming_context
) {
1061 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
1063 r
->naming_context
= NULL
;
1065 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1066 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_uptodateness_vector
));
1067 if (_ptr_uptodateness_vector
) {
1068 NDR_PULL_ALLOC(ndr
, r
->uptodateness_vector
);
1070 r
->uptodateness_vector
= NULL
;
1072 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, &r
->replica_flags
));
1073 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_object_count
));
1074 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_ndr_size
));
1075 NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr
, NDR_SCALARS
, &r
->extended_op
));
1076 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->fsmo_info
));
1077 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
1079 if (ndr_flags
& NDR_BUFFERS
) {
1080 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1081 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
1082 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
1083 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
1084 if (r
->uptodateness_vector
) {
1085 _mem_save_uptodateness_vector_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1086 NDR_PULL_SET_MEM_CTX(ndr
, r
->uptodateness_vector
, 0);
1087 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
1088 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_uptodateness_vector_0
, 0);
1091 return NDR_ERR_SUCCESS
;
1094 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesRequest5
*r
)
1096 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesRequest5");
1098 ndr_print_GUID(ndr
, "destination_dsa_guid", &r
->destination_dsa_guid
);
1099 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
1100 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
1102 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
1104 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "highwatermark", &r
->highwatermark
);
1105 ndr_print_ptr(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
1107 if (r
->uptodateness_vector
) {
1108 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
1111 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr
, "replica_flags", r
->replica_flags
);
1112 ndr_print_uint32(ndr
, "max_object_count", r
->max_object_count
);
1113 ndr_print_uint32(ndr
, "max_ndr_size", r
->max_ndr_size
);
1114 ndr_print_drsuapi_DsExtendedOperation(ndr
, "extended_op", r
->extended_op
);
1115 ndr_print_hyper(ndr
, "fsmo_info", r
->fsmo_info
);
1119 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOID(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaOID
*r
)
1121 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaOID");
1123 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_drsuapi_DsReplicaOID_oid(r
->oid
, 0):r
->__ndr_size
);
1124 ndr_print_ptr(ndr
, "oid", r
->oid
);
1127 ndr_print_string(ndr
, "oid", r
->oid
);
1133 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaOIDMapping(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaOIDMapping
*r
)
1135 if (ndr_flags
& NDR_SCALARS
) {
1136 NDR_CHECK(ndr_push_align(ndr
, 5));
1137 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->id_prefix
));
1138 NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr
, NDR_SCALARS
, &r
->oid
));
1139 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1141 if (ndr_flags
& NDR_BUFFERS
) {
1142 NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr
, NDR_BUFFERS
, &r
->oid
));
1144 return NDR_ERR_SUCCESS
;
1147 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaOIDMapping(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaOIDMapping
*r
)
1149 if (ndr_flags
& NDR_SCALARS
) {
1150 NDR_CHECK(ndr_pull_align(ndr
, 5));
1151 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->id_prefix
));
1152 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr
, NDR_SCALARS
, &r
->oid
));
1153 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1155 if (ndr_flags
& NDR_BUFFERS
) {
1156 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr
, NDR_BUFFERS
, &r
->oid
));
1158 return NDR_ERR_SUCCESS
;
1161 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOIDMapping(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaOIDMapping
*r
)
1163 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaOIDMapping");
1165 ndr_print_uint32(ndr
, "id_prefix", r
->id_prefix
);
1166 ndr_print_drsuapi_DsReplicaOID(ndr
, "oid", &r
->oid
);
1170 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaOIDMapping_Ctr
*r
)
1172 uint32_t cntr_mappings_1
;
1173 if (ndr_flags
& NDR_SCALARS
) {
1174 NDR_CHECK(ndr_push_align(ndr
, 5));
1175 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_mappings
));
1176 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->mappings
));
1177 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1179 if (ndr_flags
& NDR_BUFFERS
) {
1181 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_mappings
));
1182 for (cntr_mappings_1
= 0; cntr_mappings_1
< r
->num_mappings
; cntr_mappings_1
++) {
1183 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping(ndr
, NDR_SCALARS
, &r
->mappings
[cntr_mappings_1
]));
1185 for (cntr_mappings_1
= 0; cntr_mappings_1
< r
->num_mappings
; cntr_mappings_1
++) {
1186 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping(ndr
, NDR_BUFFERS
, &r
->mappings
[cntr_mappings_1
]));
1190 return NDR_ERR_SUCCESS
;
1193 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaOIDMapping_Ctr
*r
)
1195 uint32_t _ptr_mappings
;
1196 uint32_t cntr_mappings_1
;
1197 TALLOC_CTX
*_mem_save_mappings_0
;
1198 TALLOC_CTX
*_mem_save_mappings_1
;
1199 if (ndr_flags
& NDR_SCALARS
) {
1200 NDR_CHECK(ndr_pull_align(ndr
, 5));
1201 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_mappings
));
1202 if (r
->num_mappings
> 0x100000) {
1203 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1205 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_mappings
));
1206 if (_ptr_mappings
) {
1207 NDR_PULL_ALLOC(ndr
, r
->mappings
);
1211 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1213 if (ndr_flags
& NDR_BUFFERS
) {
1215 _mem_save_mappings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1216 NDR_PULL_SET_MEM_CTX(ndr
, r
->mappings
, 0);
1217 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->mappings
));
1218 NDR_PULL_ALLOC_N(ndr
, r
->mappings
, ndr_get_array_size(ndr
, &r
->mappings
));
1219 _mem_save_mappings_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1220 NDR_PULL_SET_MEM_CTX(ndr
, r
->mappings
, 0);
1221 for (cntr_mappings_1
= 0; cntr_mappings_1
< r
->num_mappings
; cntr_mappings_1
++) {
1222 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping(ndr
, NDR_SCALARS
, &r
->mappings
[cntr_mappings_1
]));
1224 for (cntr_mappings_1
= 0; cntr_mappings_1
< r
->num_mappings
; cntr_mappings_1
++) {
1225 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping(ndr
, NDR_BUFFERS
, &r
->mappings
[cntr_mappings_1
]));
1227 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_mappings_1
, 0);
1228 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_mappings_0
, 0);
1231 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->mappings
, r
->num_mappings
));
1234 return NDR_ERR_SUCCESS
;
1237 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaOIDMapping_Ctr
*r
)
1239 uint32_t cntr_mappings_1
;
1240 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaOIDMapping_Ctr");
1242 ndr_print_uint32(ndr
, "num_mappings", r
->num_mappings
);
1243 ndr_print_ptr(ndr
, "mappings", r
->mappings
);
1246 ndr
->print(ndr
, "%s: ARRAY(%d)", "mappings", (int)r
->num_mappings
);
1248 for (cntr_mappings_1
=0;cntr_mappings_1
<r
->num_mappings
;cntr_mappings_1
++) {
1250 if (asprintf(&idx_1
, "[%d]", cntr_mappings_1
) != -1) {
1251 ndr_print_drsuapi_DsReplicaOIDMapping(ndr
, "mappings", &r
->mappings
[cntr_mappings_1
]);
1261 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsAttributeId(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsAttributeId r
)
1264 uint32_t _flags_save_ENUM
= ndr
->flags
;
1265 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1266 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
1267 ndr
->flags
= _flags_save_ENUM
;
1269 return NDR_ERR_SUCCESS
;
1272 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsAttributeId(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsAttributeId
*r
)
1276 uint32_t _flags_save_ENUM
= ndr
->flags
;
1277 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1278 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
1280 ndr
->flags
= _flags_save_ENUM
;
1282 return NDR_ERR_SUCCESS
;
1285 _PUBLIC_
void ndr_print_drsuapi_DsAttributeId(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsAttributeId r
)
1287 const char *val
= NULL
;
1290 uint32_t _flags_save_ENUM
= ndr
->flags
;
1291 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1293 case DRSUAPI_ATTRIBUTE_objectClass
: val
= "DRSUAPI_ATTRIBUTE_objectClass"; break;
1294 case DRSUAPI_ATTRIBUTE_description
: val
= "DRSUAPI_ATTRIBUTE_description"; break;
1295 case DRSUAPI_ATTRIBUTE_member
: val
= "DRSUAPI_ATTRIBUTE_member"; break;
1296 case DRSUAPI_ATTRIBUTE_instanceType
: val
= "DRSUAPI_ATTRIBUTE_instanceType"; break;
1297 case DRSUAPI_ATTRIBUTE_whenCreated
: val
= "DRSUAPI_ATTRIBUTE_whenCreated"; break;
1298 case DRSUAPI_ATTRIBUTE_possSuperiors
: val
= "DRSUAPI_ATTRIBUTE_possSuperiors"; break;
1299 case DRSUAPI_ATTRIBUTE_hasMasterNCs
: val
= "DRSUAPI_ATTRIBUTE_hasMasterNCs"; break;
1300 case DRSUAPI_ATTRIBUTE_subClassOf
: val
= "DRSUAPI_ATTRIBUTE_subClassOf"; break;
1301 case DRSUAPI_ATTRIBUTE_governsID
: val
= "DRSUAPI_ATTRIBUTE_governsID"; break;
1302 case DRSUAPI_ATTRIBUTE_mustContain
: val
= "DRSUAPI_ATTRIBUTE_mustContain"; break;
1303 case DRSUAPI_ATTRIBUTE_mayContain
: val
= "DRSUAPI_ATTRIBUTE_mayContain"; break;
1304 case DRSUAPI_ATTRIBUTE_attributeID
: val
= "DRSUAPI_ATTRIBUTE_attributeID"; break;
1305 case DRSUAPI_ATTRIBUTE_attributeSyntax
: val
= "DRSUAPI_ATTRIBUTE_attributeSyntax"; break;
1306 case DRSUAPI_ATTRIBUTE_isSingleValued
: val
= "DRSUAPI_ATTRIBUTE_isSingleValued"; break;
1307 case DRSUAPI_ATTRIBUTE_rangeLower
: val
= "DRSUAPI_ATTRIBUTE_rangeLower"; break;
1308 case DRSUAPI_ATTRIBUTE_rangeUpper
: val
= "DRSUAPI_ATTRIBUTE_rangeUpper"; break;
1309 case DRSUAPI_ATTRIBUTE_dMDLocation
: val
= "DRSUAPI_ATTRIBUTE_dMDLocation"; break;
1310 case DRSUAPI_ATTRIBUTE_objectVersion
: val
= "DRSUAPI_ATTRIBUTE_objectVersion"; break;
1311 case DRSUAPI_ATTRIBUTE_invocationId
: val
= "DRSUAPI_ATTRIBUTE_invocationId"; break;
1312 case DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly
: val
= "DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly"; break;
1313 case DRSUAPI_ATTRIBUTE_adminDisplayName
: val
= "DRSUAPI_ATTRIBUTE_adminDisplayName"; break;
1314 case DRSUAPI_ATTRIBUTE_adminDescription
: val
= "DRSUAPI_ATTRIBUTE_adminDescription"; break;
1315 case DRSUAPI_ATTRIBUTE_oMSyntax
: val
= "DRSUAPI_ATTRIBUTE_oMSyntax"; break;
1316 case DRSUAPI_ATTRIBUTE_ntSecurityDescriptor
: val
= "DRSUAPI_ATTRIBUTE_ntSecurityDescriptor"; break;
1317 case DRSUAPI_ATTRIBUTE_searchFlags
: val
= "DRSUAPI_ATTRIBUTE_searchFlags"; break;
1318 case DRSUAPI_ATTRIBUTE_auxiliaryClass
: val
= "DRSUAPI_ATTRIBUTE_auxiliaryClass"; break;
1319 case DRSUAPI_ATTRIBUTE_lDAPDisplayName
: val
= "DRSUAPI_ATTRIBUTE_lDAPDisplayName"; break;
1320 case DRSUAPI_ATTRIBUTE_name
: val
= "DRSUAPI_ATTRIBUTE_name"; break;
1321 case DRSUAPI_ATTRIBUTE_userAccountControl
: val
= "DRSUAPI_ATTRIBUTE_userAccountControl"; break;
1322 case DRSUAPI_ATTRIBUTE_currentValue
: val
= "DRSUAPI_ATTRIBUTE_currentValue"; break;
1323 case DRSUAPI_ATTRIBUTE_homeDirectory
: val
= "DRSUAPI_ATTRIBUTE_homeDirectory"; break;
1324 case DRSUAPI_ATTRIBUTE_homeDrive
: val
= "DRSUAPI_ATTRIBUTE_homeDrive"; break;
1325 case DRSUAPI_ATTRIBUTE_scriptPath
: val
= "DRSUAPI_ATTRIBUTE_scriptPath"; break;
1326 case DRSUAPI_ATTRIBUTE_profilePath
: val
= "DRSUAPI_ATTRIBUTE_profilePath"; break;
1327 case DRSUAPI_ATTRIBUTE_objectSid
: val
= "DRSUAPI_ATTRIBUTE_objectSid"; break;
1328 case DRSUAPI_ATTRIBUTE_schemaIDGUID
: val
= "DRSUAPI_ATTRIBUTE_schemaIDGUID"; break;
1329 case DRSUAPI_ATTRIBUTE_dBCSPwd
: val
= "DRSUAPI_ATTRIBUTE_dBCSPwd"; break;
1330 case DRSUAPI_ATTRIBUTE_logonHours
: val
= "DRSUAPI_ATTRIBUTE_logonHours"; break;
1331 case DRSUAPI_ATTRIBUTE_userWorkstations
: val
= "DRSUAPI_ATTRIBUTE_userWorkstations"; break;
1332 case DRSUAPI_ATTRIBUTE_unicodePwd
: val
= "DRSUAPI_ATTRIBUTE_unicodePwd"; break;
1333 case DRSUAPI_ATTRIBUTE_ntPwdHistory
: val
= "DRSUAPI_ATTRIBUTE_ntPwdHistory"; break;
1334 case DRSUAPI_ATTRIBUTE_priorValue
: val
= "DRSUAPI_ATTRIBUTE_priorValue"; break;
1335 case DRSUAPI_ATTRIBUTE_supplementalCredentials
: val
= "DRSUAPI_ATTRIBUTE_supplementalCredentials"; break;
1336 case DRSUAPI_ATTRIBUTE_trustAuthIncoming
: val
= "DRSUAPI_ATTRIBUTE_trustAuthIncoming"; break;
1337 case DRSUAPI_ATTRIBUTE_trustAuthOutgoing
: val
= "DRSUAPI_ATTRIBUTE_trustAuthOutgoing"; break;
1338 case DRSUAPI_ATTRIBUTE_lmPwdHistory
: val
= "DRSUAPI_ATTRIBUTE_lmPwdHistory"; break;
1339 case DRSUAPI_ATTRIBUTE_systemPossSuperiors
: val
= "DRSUAPI_ATTRIBUTE_systemPossSuperiors"; break;
1340 case DRSUAPI_ATTRIBUTE_systemMayContain
: val
= "DRSUAPI_ATTRIBUTE_systemMayContain"; break;
1341 case DRSUAPI_ATTRIBUTE_systemMustContain
: val
= "DRSUAPI_ATTRIBUTE_systemMustContain"; break;
1342 case DRSUAPI_ATTRIBUTE_sAMAccountName
: val
= "DRSUAPI_ATTRIBUTE_sAMAccountName"; break;
1343 case DRSUAPI_ATTRIBUTE_sAMAccountType
: val
= "DRSUAPI_ATTRIBUTE_sAMAccountType"; break;
1344 case DRSUAPI_ATTRIBUTE_fSMORoleOwner
: val
= "DRSUAPI_ATTRIBUTE_fSMORoleOwner"; break;
1345 case DRSUAPI_ATTRIBUTE_systemFlags
: val
= "DRSUAPI_ATTRIBUTE_systemFlags"; break;
1346 case DRSUAPI_ATTRIBUTE_serverReference
: val
= "DRSUAPI_ATTRIBUTE_serverReference"; break;
1347 case DRSUAPI_ATTRIBUTE_serverReferenceBL
: val
= "DRSUAPI_ATTRIBUTE_serverReferenceBL"; break;
1348 case DRSUAPI_ATTRIBUTE_initialAuthIncoming
: val
= "DRSUAPI_ATTRIBUTE_initialAuthIncoming"; break;
1349 case DRSUAPI_ATTRIBUTE_initialAuthOutgoing
: val
= "DRSUAPI_ATTRIBUTE_initialAuthOutgoing"; break;
1350 case DRSUAPI_ATTRIBUTE_wellKnownObjects
: val
= "DRSUAPI_ATTRIBUTE_wellKnownObjects"; break;
1351 case DRSUAPI_ATTRIBUTE_dNSHostName
: val
= "DRSUAPI_ATTRIBUTE_dNSHostName"; break;
1352 case DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet
: val
= "DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet"; break;
1353 case DRSUAPI_ATTRIBUTE_userPrincipalName
: val
= "DRSUAPI_ATTRIBUTE_userPrincipalName"; break;
1354 case DRSUAPI_ATTRIBUTE_groupType
: val
= "DRSUAPI_ATTRIBUTE_groupType"; break;
1355 case DRSUAPI_ATTRIBUTE_servicePrincipalName
: val
= "DRSUAPI_ATTRIBUTE_servicePrincipalName"; break;
1356 case DRSUAPI_ATTRIBUTE_objectCategory
: val
= "DRSUAPI_ATTRIBUTE_objectCategory"; break;
1357 case DRSUAPI_ATTRIBUTE_gPLink
: val
= "DRSUAPI_ATTRIBUTE_gPLink"; break;
1358 case DRSUAPI_ATTRIBUTE_msDS_Behavior_Version
: val
= "DRSUAPI_ATTRIBUTE_msDS_Behavior_Version"; break;
1359 case DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber
: val
= "DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber"; break;
1360 case DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs
: val
= "DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs"; break;
1361 case DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs
: val
= "DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs"; break;
1363 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1364 ndr
->flags
= _flags_save_ENUM
;
1368 static enum ndr_err_code
ndr_push_drsuapi_DsPartialAttributeSet(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsPartialAttributeSet
*r
)
1370 uint32_t cntr_attids_0
;
1371 if (ndr_flags
& NDR_SCALARS
) {
1372 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_attids
));
1373 NDR_CHECK(ndr_push_align(ndr
, 4));
1374 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1));
1375 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1376 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_attids
));
1377 for (cntr_attids_0
= 0; cntr_attids_0
< r
->num_attids
; cntr_attids_0
++) {
1378 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, r
->attids
[cntr_attids_0
]));
1380 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1382 if (ndr_flags
& NDR_BUFFERS
) {
1384 return NDR_ERR_SUCCESS
;
1387 static enum ndr_err_code
ndr_pull_drsuapi_DsPartialAttributeSet(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsPartialAttributeSet
*r
)
1389 uint32_t cntr_attids_0
;
1390 TALLOC_CTX
*_mem_save_attids_0
;
1391 if (ndr_flags
& NDR_SCALARS
) {
1392 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attids
));
1393 NDR_CHECK(ndr_pull_align(ndr
, 4));
1394 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
1395 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved1
));
1396 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_attids
));
1397 if (r
->num_attids
< 1 || r
->num_attids
> 0x100000) {
1398 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1400 NDR_PULL_ALLOC_N(ndr
, r
->attids
, ndr_get_array_size(ndr
, &r
->attids
));
1401 _mem_save_attids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1402 NDR_PULL_SET_MEM_CTX(ndr
, r
->attids
, 0);
1403 for (cntr_attids_0
= 0; cntr_attids_0
< r
->num_attids
; cntr_attids_0
++) {
1404 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, &r
->attids
[cntr_attids_0
]));
1406 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attids_0
, 0);
1408 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->attids
, r
->num_attids
));
1410 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1412 if (ndr_flags
& NDR_BUFFERS
) {
1414 return NDR_ERR_SUCCESS
;
1417 _PUBLIC_
void ndr_print_drsuapi_DsPartialAttributeSet(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsPartialAttributeSet
*r
)
1419 uint32_t cntr_attids_0
;
1420 ndr_print_struct(ndr
, name
, "drsuapi_DsPartialAttributeSet");
1422 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?1:r
->version
);
1423 ndr_print_uint32(ndr
, "reserved1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved1
);
1424 ndr_print_uint32(ndr
, "num_attids", r
->num_attids
);
1425 ndr
->print(ndr
, "%s: ARRAY(%d)", "attids", (int)r
->num_attids
);
1427 for (cntr_attids_0
=0;cntr_attids_0
<r
->num_attids
;cntr_attids_0
++) {
1429 if (asprintf(&idx_0
, "[%d]", cntr_attids_0
) != -1) {
1430 ndr_print_drsuapi_DsAttributeId(ndr
, "attids", r
->attids
[cntr_attids_0
]);
1438 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesRequest8(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesRequest8
*r
)
1440 if (ndr_flags
& NDR_SCALARS
) {
1441 NDR_CHECK(ndr_push_align(ndr
, 8));
1442 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->destination_dsa_guid
));
1443 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1444 if (r
->naming_context
== NULL
) {
1445 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1447 NDR_CHECK(ndr_push_ref_ptr(ndr
));
1448 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1449 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->uptodateness_vector
));
1450 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, r
->replica_flags
));
1451 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_object_count
));
1452 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_ndr_size
));
1453 NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr
, NDR_SCALARS
, r
->extended_op
));
1454 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->fsmo_info
));
1455 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->partial_attribute_set
));
1456 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->partial_attribute_set_ex
));
1457 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
1458 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
1460 if (ndr_flags
& NDR_BUFFERS
) {
1461 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
1462 if (r
->uptodateness_vector
) {
1463 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
1465 if (r
->partial_attribute_set
) {
1466 NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set
));
1468 if (r
->partial_attribute_set_ex
) {
1469 NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set_ex
));
1471 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
1473 return NDR_ERR_SUCCESS
;
1476 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesRequest8(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesRequest8
*r
)
1478 uint32_t _ptr_naming_context
;
1479 TALLOC_CTX
*_mem_save_naming_context_0
;
1480 uint32_t _ptr_uptodateness_vector
;
1481 TALLOC_CTX
*_mem_save_uptodateness_vector_0
;
1482 uint32_t _ptr_partial_attribute_set
;
1483 TALLOC_CTX
*_mem_save_partial_attribute_set_0
;
1484 uint32_t _ptr_partial_attribute_set_ex
;
1485 TALLOC_CTX
*_mem_save_partial_attribute_set_ex_0
;
1486 if (ndr_flags
& NDR_SCALARS
) {
1487 NDR_CHECK(ndr_pull_align(ndr
, 8));
1488 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->destination_dsa_guid
));
1489 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1490 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
1491 if (_ptr_naming_context
) {
1492 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
1494 r
->naming_context
= NULL
;
1496 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1497 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_uptodateness_vector
));
1498 if (_ptr_uptodateness_vector
) {
1499 NDR_PULL_ALLOC(ndr
, r
->uptodateness_vector
);
1501 r
->uptodateness_vector
= NULL
;
1503 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, &r
->replica_flags
));
1504 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_object_count
));
1505 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_ndr_size
));
1506 NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr
, NDR_SCALARS
, &r
->extended_op
));
1507 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->fsmo_info
));
1508 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_partial_attribute_set
));
1509 if (_ptr_partial_attribute_set
) {
1510 NDR_PULL_ALLOC(ndr
, r
->partial_attribute_set
);
1512 r
->partial_attribute_set
= NULL
;
1514 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_partial_attribute_set_ex
));
1515 if (_ptr_partial_attribute_set_ex
) {
1516 NDR_PULL_ALLOC(ndr
, r
->partial_attribute_set_ex
);
1518 r
->partial_attribute_set_ex
= NULL
;
1520 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
1521 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
1523 if (ndr_flags
& NDR_BUFFERS
) {
1524 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1525 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
1526 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
1527 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
1528 if (r
->uptodateness_vector
) {
1529 _mem_save_uptodateness_vector_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1530 NDR_PULL_SET_MEM_CTX(ndr
, r
->uptodateness_vector
, 0);
1531 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
1532 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_uptodateness_vector_0
, 0);
1534 if (r
->partial_attribute_set
) {
1535 _mem_save_partial_attribute_set_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1536 NDR_PULL_SET_MEM_CTX(ndr
, r
->partial_attribute_set
, 0);
1537 NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set
));
1538 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_partial_attribute_set_0
, 0);
1540 if (r
->partial_attribute_set_ex
) {
1541 _mem_save_partial_attribute_set_ex_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1542 NDR_PULL_SET_MEM_CTX(ndr
, r
->partial_attribute_set_ex
, 0);
1543 NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set_ex
));
1544 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_partial_attribute_set_ex_0
, 0);
1546 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
1548 return NDR_ERR_SUCCESS
;
1551 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesRequest8(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesRequest8
*r
)
1553 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesRequest8");
1555 ndr_print_GUID(ndr
, "destination_dsa_guid", &r
->destination_dsa_guid
);
1556 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
1557 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
1559 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
1561 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "highwatermark", &r
->highwatermark
);
1562 ndr_print_ptr(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
1564 if (r
->uptodateness_vector
) {
1565 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
1568 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr
, "replica_flags", r
->replica_flags
);
1569 ndr_print_uint32(ndr
, "max_object_count", r
->max_object_count
);
1570 ndr_print_uint32(ndr
, "max_ndr_size", r
->max_ndr_size
);
1571 ndr_print_drsuapi_DsExtendedOperation(ndr
, "extended_op", r
->extended_op
);
1572 ndr_print_hyper(ndr
, "fsmo_info", r
->fsmo_info
);
1573 ndr_print_ptr(ndr
, "partial_attribute_set", r
->partial_attribute_set
);
1575 if (r
->partial_attribute_set
) {
1576 ndr_print_drsuapi_DsPartialAttributeSet(ndr
, "partial_attribute_set", r
->partial_attribute_set
);
1579 ndr_print_ptr(ndr
, "partial_attribute_set_ex", r
->partial_attribute_set_ex
);
1581 if (r
->partial_attribute_set_ex
) {
1582 ndr_print_drsuapi_DsPartialAttributeSet(ndr
, "partial_attribute_set_ex", r
->partial_attribute_set_ex
);
1585 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, "mapping_ctr", &r
->mapping_ctr
);
1589 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesRequest10(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesRequest10
*r
)
1591 if (ndr_flags
& NDR_SCALARS
) {
1592 NDR_CHECK(ndr_push_align(ndr
, 8));
1593 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->destination_dsa_guid
));
1594 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1595 if (r
->naming_context
== NULL
) {
1596 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1598 NDR_CHECK(ndr_push_ref_ptr(ndr
));
1599 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1600 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->uptodateness_vector
));
1601 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, r
->replica_flags
));
1602 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_object_count
));
1603 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_ndr_size
));
1604 NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr
, NDR_SCALARS
, r
->extended_op
));
1605 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->fsmo_info
));
1606 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->partial_attribute_set
));
1607 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->partial_attribute_set_ex
));
1608 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
1609 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->more_flags
));
1610 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
1612 if (ndr_flags
& NDR_BUFFERS
) {
1613 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
1614 if (r
->uptodateness_vector
) {
1615 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
1617 if (r
->partial_attribute_set
) {
1618 NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set
));
1620 if (r
->partial_attribute_set_ex
) {
1621 NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set_ex
));
1623 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
1625 return NDR_ERR_SUCCESS
;
1628 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesRequest10(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesRequest10
*r
)
1630 uint32_t _ptr_naming_context
;
1631 TALLOC_CTX
*_mem_save_naming_context_0
;
1632 uint32_t _ptr_uptodateness_vector
;
1633 TALLOC_CTX
*_mem_save_uptodateness_vector_0
;
1634 uint32_t _ptr_partial_attribute_set
;
1635 TALLOC_CTX
*_mem_save_partial_attribute_set_0
;
1636 uint32_t _ptr_partial_attribute_set_ex
;
1637 TALLOC_CTX
*_mem_save_partial_attribute_set_ex_0
;
1638 if (ndr_flags
& NDR_SCALARS
) {
1639 NDR_CHECK(ndr_pull_align(ndr
, 8));
1640 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->destination_dsa_guid
));
1641 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1642 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
1643 if (_ptr_naming_context
) {
1644 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
1646 r
->naming_context
= NULL
;
1648 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->highwatermark
));
1649 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_uptodateness_vector
));
1650 if (_ptr_uptodateness_vector
) {
1651 NDR_PULL_ALLOC(ndr
, r
->uptodateness_vector
);
1653 r
->uptodateness_vector
= NULL
;
1655 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, &r
->replica_flags
));
1656 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_object_count
));
1657 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_ndr_size
));
1658 NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr
, NDR_SCALARS
, &r
->extended_op
));
1659 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->fsmo_info
));
1660 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_partial_attribute_set
));
1661 if (_ptr_partial_attribute_set
) {
1662 NDR_PULL_ALLOC(ndr
, r
->partial_attribute_set
);
1664 r
->partial_attribute_set
= NULL
;
1666 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_partial_attribute_set_ex
));
1667 if (_ptr_partial_attribute_set_ex
) {
1668 NDR_PULL_ALLOC(ndr
, r
->partial_attribute_set_ex
);
1670 r
->partial_attribute_set_ex
= NULL
;
1672 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
1673 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->more_flags
));
1674 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
1676 if (ndr_flags
& NDR_BUFFERS
) {
1677 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1678 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
1679 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
1680 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
1681 if (r
->uptodateness_vector
) {
1682 _mem_save_uptodateness_vector_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1683 NDR_PULL_SET_MEM_CTX(ndr
, r
->uptodateness_vector
, 0);
1684 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
1685 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_uptodateness_vector_0
, 0);
1687 if (r
->partial_attribute_set
) {
1688 _mem_save_partial_attribute_set_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1689 NDR_PULL_SET_MEM_CTX(ndr
, r
->partial_attribute_set
, 0);
1690 NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set
));
1691 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_partial_attribute_set_0
, 0);
1693 if (r
->partial_attribute_set_ex
) {
1694 _mem_save_partial_attribute_set_ex_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1695 NDR_PULL_SET_MEM_CTX(ndr
, r
->partial_attribute_set_ex
, 0);
1696 NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr
, NDR_SCALARS
, r
->partial_attribute_set_ex
));
1697 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_partial_attribute_set_ex_0
, 0);
1699 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
1701 return NDR_ERR_SUCCESS
;
1704 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesRequest10(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesRequest10
*r
)
1706 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesRequest10");
1708 ndr_print_GUID(ndr
, "destination_dsa_guid", &r
->destination_dsa_guid
);
1709 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
1710 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
1712 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
1714 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "highwatermark", &r
->highwatermark
);
1715 ndr_print_ptr(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
1717 if (r
->uptodateness_vector
) {
1718 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
1721 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr
, "replica_flags", r
->replica_flags
);
1722 ndr_print_uint32(ndr
, "max_object_count", r
->max_object_count
);
1723 ndr_print_uint32(ndr
, "max_ndr_size", r
->max_ndr_size
);
1724 ndr_print_drsuapi_DsExtendedOperation(ndr
, "extended_op", r
->extended_op
);
1725 ndr_print_hyper(ndr
, "fsmo_info", r
->fsmo_info
);
1726 ndr_print_ptr(ndr
, "partial_attribute_set", r
->partial_attribute_set
);
1728 if (r
->partial_attribute_set
) {
1729 ndr_print_drsuapi_DsPartialAttributeSet(ndr
, "partial_attribute_set", r
->partial_attribute_set
);
1732 ndr_print_ptr(ndr
, "partial_attribute_set_ex", r
->partial_attribute_set_ex
);
1734 if (r
->partial_attribute_set_ex
) {
1735 ndr_print_drsuapi_DsPartialAttributeSet(ndr
, "partial_attribute_set_ex", r
->partial_attribute_set_ex
);
1738 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, "mapping_ctr", &r
->mapping_ctr
);
1739 ndr_print_uint32(ndr
, "more_flags", r
->more_flags
);
1743 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetNCChangesRequest
*r
)
1745 if (ndr_flags
& NDR_SCALARS
) {
1746 int level
= ndr_push_get_switch_value(ndr
, r
);
1747 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
1748 NDR_CHECK(ndr_push_union_align(ndr
, 8));
1751 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr
, NDR_SCALARS
, &r
->req5
));
1755 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest8(ndr
, NDR_SCALARS
, &r
->req8
));
1759 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest10(ndr
, NDR_SCALARS
, &r
->req10
));
1763 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1766 if (ndr_flags
& NDR_BUFFERS
) {
1767 int level
= ndr_push_get_switch_value(ndr
, r
);
1770 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr
, NDR_BUFFERS
, &r
->req5
));
1774 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest8(ndr
, NDR_BUFFERS
, &r
->req8
));
1778 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest10(ndr
, NDR_BUFFERS
, &r
->req10
));
1782 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1785 return NDR_ERR_SUCCESS
;
1788 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetNCChangesRequest
*r
)
1792 level
= ndr_pull_get_switch_value(ndr
, r
);
1793 if (ndr_flags
& NDR_SCALARS
) {
1794 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
1795 if (_level
!= level
) {
1796 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
1798 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
1801 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr
, NDR_SCALARS
, &r
->req5
));
1805 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest8(ndr
, NDR_SCALARS
, &r
->req8
));
1809 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest10(ndr
, NDR_SCALARS
, &r
->req10
));
1813 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1816 if (ndr_flags
& NDR_BUFFERS
) {
1819 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr
, NDR_BUFFERS
, &r
->req5
));
1823 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest8(ndr
, NDR_BUFFERS
, &r
->req8
));
1827 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest10(ndr
, NDR_BUFFERS
, &r
->req10
));
1831 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1834 return NDR_ERR_SUCCESS
;
1837 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetNCChangesRequest
*r
)
1840 level
= ndr_print_get_switch_value(ndr
, r
);
1841 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetNCChangesRequest");
1844 ndr_print_drsuapi_DsGetNCChangesRequest5(ndr
, "req5", &r
->req5
);
1848 ndr_print_drsuapi_DsGetNCChangesRequest8(ndr
, "req8", &r
->req8
);
1852 ndr_print_drsuapi_DsGetNCChangesRequest10(ndr
, "req10", &r
->req10
);
1856 ndr_print_bad_level(ndr
, name
, level
);
1860 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor2
*r
)
1862 if (ndr_flags
& NDR_SCALARS
) {
1863 NDR_CHECK(ndr_push_align(ndr
, 8));
1864 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1865 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->highest_usn
));
1866 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_sync_success
));
1867 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
1869 if (ndr_flags
& NDR_BUFFERS
) {
1871 return NDR_ERR_SUCCESS
;
1874 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor2
*r
)
1876 if (ndr_flags
& NDR_SCALARS
) {
1877 NDR_CHECK(ndr_pull_align(ndr
, 8));
1878 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
1879 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->highest_usn
));
1880 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_sync_success
));
1881 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
1883 if (ndr_flags
& NDR_BUFFERS
) {
1885 return NDR_ERR_SUCCESS
;
1888 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor2
*r
)
1890 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor2");
1892 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
1893 ndr_print_hyper(ndr
, "highest_usn", r
->highest_usn
);
1894 ndr_print_NTTIME(ndr
, "last_sync_success", r
->last_sync_success
);
1898 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor2CtrEx(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor2CtrEx
*r
)
1900 uint32_t cntr_cursors_0
;
1901 if (ndr_flags
& NDR_SCALARS
) {
1902 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
1903 NDR_CHECK(ndr_push_align(ndr
, 8));
1904 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2));
1905 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1906 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1907 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1908 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
1909 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
1911 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
1913 if (ndr_flags
& NDR_BUFFERS
) {
1915 return NDR_ERR_SUCCESS
;
1918 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor2CtrEx(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor2CtrEx
*r
)
1920 uint32_t cntr_cursors_0
;
1921 TALLOC_CTX
*_mem_save_cursors_0
;
1922 if (ndr_flags
& NDR_SCALARS
) {
1923 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->cursors
));
1924 NDR_CHECK(ndr_pull_align(ndr
, 8));
1925 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
1926 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved1
));
1927 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1928 if (r
->count
> 0x100000) {
1929 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1931 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved2
));
1932 NDR_PULL_ALLOC_N(ndr
, r
->cursors
, ndr_get_array_size(ndr
, &r
->cursors
));
1933 _mem_save_cursors_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1934 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors
, 0);
1935 for (cntr_cursors_0
= 0; cntr_cursors_0
< r
->count
; cntr_cursors_0
++) {
1936 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr
, NDR_SCALARS
, &r
->cursors
[cntr_cursors_0
]));
1938 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors_0
, 0);
1940 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->cursors
, r
->count
));
1942 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
1944 if (ndr_flags
& NDR_BUFFERS
) {
1946 return NDR_ERR_SUCCESS
;
1949 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor2CtrEx(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor2CtrEx
*r
)
1951 uint32_t cntr_cursors_0
;
1952 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor2CtrEx");
1954 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2:r
->version
);
1955 ndr_print_uint32(ndr
, "reserved1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved1
);
1956 ndr_print_uint32(ndr
, "count", r
->count
);
1957 ndr_print_uint32(ndr
, "reserved2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0:r
->reserved2
);
1958 ndr
->print(ndr
, "%s: ARRAY(%d)", "cursors", (int)r
->count
);
1960 for (cntr_cursors_0
=0;cntr_cursors_0
<r
->count
;cntr_cursors_0
++) {
1962 if (asprintf(&idx_0
, "[%d]", cntr_cursors_0
) != -1) {
1963 ndr_print_drsuapi_DsReplicaCursor2(ndr
, "cursors", &r
->cursors
[cntr_cursors_0
]);
1971 static enum ndr_err_code
ndr_push_drsuapi_DsAttributeValue(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAttributeValue
*r
)
1973 if (ndr_flags
& NDR_SCALARS
) {
1974 NDR_CHECK(ndr_push_align(ndr
, 5));
1975 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_DATA_BLOB(0, r
->blob
, 0)));
1976 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->blob
));
1977 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1979 if (ndr_flags
& NDR_BUFFERS
) {
1981 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->blob
));
1984 return NDR_ERR_SUCCESS
;
1987 static enum ndr_err_code
ndr_pull_drsuapi_DsAttributeValue(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAttributeValue
*r
)
1990 TALLOC_CTX
*_mem_save_blob_0
;
1991 if (ndr_flags
& NDR_SCALARS
) {
1992 NDR_CHECK(ndr_pull_align(ndr
, 5));
1993 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
1994 if (r
->__ndr_size
> 10485760) {
1995 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1997 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_blob
));
1999 NDR_PULL_ALLOC(ndr
, r
->blob
);
2003 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2005 if (ndr_flags
& NDR_BUFFERS
) {
2007 _mem_save_blob_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2008 NDR_PULL_SET_MEM_CTX(ndr
, r
->blob
, 0);
2009 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->blob
));
2010 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_blob_0
, 0);
2013 return NDR_ERR_SUCCESS
;
2016 _PUBLIC_
void ndr_print_drsuapi_DsAttributeValue(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAttributeValue
*r
)
2018 ndr_print_struct(ndr
, name
, "drsuapi_DsAttributeValue");
2020 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_DATA_BLOB(0, r
->blob
, 0):r
->__ndr_size
);
2021 ndr_print_ptr(ndr
, "blob", r
->blob
);
2024 ndr_print_DATA_BLOB(ndr
, "blob", *r
->blob
);
2030 static enum ndr_err_code
ndr_push_drsuapi_DsAttributeValueCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAttributeValueCtr
*r
)
2032 uint32_t cntr_values_1
;
2033 if (ndr_flags
& NDR_SCALARS
) {
2034 NDR_CHECK(ndr_push_align(ndr
, 5));
2035 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_values
));
2036 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->values
));
2037 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2039 if (ndr_flags
& NDR_BUFFERS
) {
2041 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_values
));
2042 for (cntr_values_1
= 0; cntr_values_1
< r
->num_values
; cntr_values_1
++) {
2043 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr
, NDR_SCALARS
, &r
->values
[cntr_values_1
]));
2045 for (cntr_values_1
= 0; cntr_values_1
< r
->num_values
; cntr_values_1
++) {
2046 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr
, NDR_BUFFERS
, &r
->values
[cntr_values_1
]));
2050 return NDR_ERR_SUCCESS
;
2053 static enum ndr_err_code
ndr_pull_drsuapi_DsAttributeValueCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAttributeValueCtr
*r
)
2055 uint32_t _ptr_values
;
2056 uint32_t cntr_values_1
;
2057 TALLOC_CTX
*_mem_save_values_0
;
2058 TALLOC_CTX
*_mem_save_values_1
;
2059 if (ndr_flags
& NDR_SCALARS
) {
2060 NDR_CHECK(ndr_pull_align(ndr
, 5));
2061 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_values
));
2062 if (r
->num_values
> 10485760) {
2063 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2065 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_values
));
2067 NDR_PULL_ALLOC(ndr
, r
->values
);
2071 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2073 if (ndr_flags
& NDR_BUFFERS
) {
2075 _mem_save_values_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2076 NDR_PULL_SET_MEM_CTX(ndr
, r
->values
, 0);
2077 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->values
));
2078 NDR_PULL_ALLOC_N(ndr
, r
->values
, ndr_get_array_size(ndr
, &r
->values
));
2079 _mem_save_values_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2080 NDR_PULL_SET_MEM_CTX(ndr
, r
->values
, 0);
2081 for (cntr_values_1
= 0; cntr_values_1
< r
->num_values
; cntr_values_1
++) {
2082 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr
, NDR_SCALARS
, &r
->values
[cntr_values_1
]));
2084 for (cntr_values_1
= 0; cntr_values_1
< r
->num_values
; cntr_values_1
++) {
2085 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr
, NDR_BUFFERS
, &r
->values
[cntr_values_1
]));
2087 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_values_1
, 0);
2088 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_values_0
, 0);
2091 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->values
, r
->num_values
));
2094 return NDR_ERR_SUCCESS
;
2097 _PUBLIC_
void ndr_print_drsuapi_DsAttributeValueCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAttributeValueCtr
*r
)
2099 uint32_t cntr_values_1
;
2100 ndr_print_struct(ndr
, name
, "drsuapi_DsAttributeValueCtr");
2102 ndr_print_uint32(ndr
, "num_values", r
->num_values
);
2103 ndr_print_ptr(ndr
, "values", r
->values
);
2106 ndr
->print(ndr
, "%s: ARRAY(%d)", "values", (int)r
->num_values
);
2108 for (cntr_values_1
=0;cntr_values_1
<r
->num_values
;cntr_values_1
++) {
2110 if (asprintf(&idx_1
, "[%d]", cntr_values_1
) != -1) {
2111 ndr_print_drsuapi_DsAttributeValue(ndr
, "values", &r
->values
[cntr_values_1
]);
2121 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectIdentifier3(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectIdentifier3
*r
)
2123 if (ndr_flags
& NDR_SCALARS
) {
2124 NDR_CHECK(ndr_push_align(ndr
, 4));
2125 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_drsuapi_DsReplicaObjectIdentifier3(r
, ndr
->iconv_convenience
, ndr
->flags
)));
2126 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_dom_sid28(&r
->sid
, ndr
->flags
)));
2127 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
2128 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
2129 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->dn
)));
2130 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dn
, strlen_m(r
->dn
) + 1, sizeof(uint16_t), CH_UTF16
));
2131 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2133 if (ndr_flags
& NDR_BUFFERS
) {
2134 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
2136 return NDR_ERR_SUCCESS
;
2139 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectIdentifier3(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectIdentifier3
*r
)
2141 if (ndr_flags
& NDR_SCALARS
) {
2142 NDR_CHECK(ndr_pull_align(ndr
, 4));
2143 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
2144 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_sid
));
2145 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
2146 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
2147 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_dn
));
2148 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dn
, r
->__ndr_size_dn
+ 1, sizeof(uint16_t), CH_UTF16
));
2149 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2151 if (ndr_flags
& NDR_BUFFERS
) {
2152 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
2154 return NDR_ERR_SUCCESS
;
2157 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjectIdentifier3
*r
)
2159 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjectIdentifier3");
2161 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
);
2162 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
);
2163 ndr_print_GUID(ndr
, "guid", &r
->guid
);
2164 ndr_print_dom_sid28(ndr
, "sid", &r
->sid
);
2165 ndr_print_uint32(ndr
, "__ndr_size_dn", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->dn
):r
->__ndr_size_dn
);
2166 ndr_print_string(ndr
, "dn", r
->dn
);
2170 _PUBLIC_
size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3(const struct drsuapi_DsReplicaObjectIdentifier3
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2172 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_drsuapi_DsReplicaObjectIdentifier3
, ic
);
2175 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectIdentifier3Binary
*r
)
2177 if (ndr_flags
& NDR_SCALARS
) {
2178 NDR_CHECK(ndr_push_align(ndr
, 4));
2179 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r
, ndr
->iconv_convenience
, ndr
->flags
)));
2180 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_dom_sid28(&r
->sid
, ndr
->flags
)));
2181 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
2182 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
2183 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->dn
)));
2184 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dn
, strlen_m(r
->dn
) + 1, sizeof(uint16_t), CH_UTF16
));
2185 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->binary
.length
+ 4));
2187 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
2188 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
2189 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->binary
));
2190 ndr
->flags
= _flags_save_DATA_BLOB
;
2192 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2194 if (ndr_flags
& NDR_BUFFERS
) {
2195 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
2197 return NDR_ERR_SUCCESS
;
2200 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectIdentifier3Binary
*r
)
2202 if (ndr_flags
& NDR_SCALARS
) {
2203 NDR_CHECK(ndr_pull_align(ndr
, 4));
2204 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
2205 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_sid
));
2206 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
2207 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
2208 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_dn
));
2209 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dn
, r
->__ndr_size_dn
+ 1, sizeof(uint16_t), CH_UTF16
));
2210 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_binary
));
2212 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
2213 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
2214 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->binary
));
2215 ndr
->flags
= _flags_save_DATA_BLOB
;
2217 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2219 if (ndr_flags
& NDR_BUFFERS
) {
2220 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
2222 return NDR_ERR_SUCCESS
;
2225 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjectIdentifier3Binary
*r
)
2227 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjectIdentifier3Binary");
2229 ndr_print_uint32(ndr
, "__ndr_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r
, ndr
->iconv_convenience
, ndr
->flags
):r
->__ndr_size
);
2230 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
);
2231 ndr_print_GUID(ndr
, "guid", &r
->guid
);
2232 ndr_print_dom_sid28(ndr
, "sid", &r
->sid
);
2233 ndr_print_uint32(ndr
, "__ndr_size_dn", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->dn
):r
->__ndr_size_dn
);
2234 ndr_print_string(ndr
, "dn", r
->dn
);
2235 ndr_print_uint32(ndr
, "__ndr_size_binary", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->binary
.length
+ 4:r
->__ndr_size_binary
);
2236 ndr_print_DATA_BLOB(ndr
, "binary", r
->binary
);
2240 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttribute
*r
)
2242 if (ndr_flags
& NDR_SCALARS
) {
2243 NDR_CHECK(ndr_push_align(ndr
, 5));
2244 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, r
->attid
));
2245 NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr
, NDR_SCALARS
, &r
->value_ctr
));
2246 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2248 if (ndr_flags
& NDR_BUFFERS
) {
2249 NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr
, NDR_BUFFERS
, &r
->value_ctr
));
2251 return NDR_ERR_SUCCESS
;
2254 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttribute
*r
)
2256 if (ndr_flags
& NDR_SCALARS
) {
2257 NDR_CHECK(ndr_pull_align(ndr
, 5));
2258 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, &r
->attid
));
2259 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr
, NDR_SCALARS
, &r
->value_ctr
));
2260 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2262 if (ndr_flags
& NDR_BUFFERS
) {
2263 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr
, NDR_BUFFERS
, &r
->value_ctr
));
2265 return NDR_ERR_SUCCESS
;
2268 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttribute(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttribute
*r
)
2270 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttribute");
2272 ndr_print_drsuapi_DsAttributeId(ndr
, "attid", r
->attid
);
2273 ndr_print_drsuapi_DsAttributeValueCtr(ndr
, "value_ctr", &r
->value_ctr
);
2277 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttributeCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttributeCtr
*r
)
2279 uint32_t cntr_attributes_1
;
2280 if (ndr_flags
& NDR_SCALARS
) {
2281 NDR_CHECK(ndr_push_align(ndr
, 5));
2282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_attributes
));
2283 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attributes
));
2284 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2286 if (ndr_flags
& NDR_BUFFERS
) {
2287 if (r
->attributes
) {
2288 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_attributes
));
2289 for (cntr_attributes_1
= 0; cntr_attributes_1
< r
->num_attributes
; cntr_attributes_1
++) {
2290 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttribute(ndr
, NDR_SCALARS
, &r
->attributes
[cntr_attributes_1
]));
2292 for (cntr_attributes_1
= 0; cntr_attributes_1
< r
->num_attributes
; cntr_attributes_1
++) {
2293 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttribute(ndr
, NDR_BUFFERS
, &r
->attributes
[cntr_attributes_1
]));
2297 return NDR_ERR_SUCCESS
;
2300 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttributeCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttributeCtr
*r
)
2302 uint32_t _ptr_attributes
;
2303 uint32_t cntr_attributes_1
;
2304 TALLOC_CTX
*_mem_save_attributes_0
;
2305 TALLOC_CTX
*_mem_save_attributes_1
;
2306 if (ndr_flags
& NDR_SCALARS
) {
2307 NDR_CHECK(ndr_pull_align(ndr
, 5));
2308 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_attributes
));
2309 if (r
->num_attributes
> 1048576) {
2310 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2312 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attributes
));
2313 if (_ptr_attributes
) {
2314 NDR_PULL_ALLOC(ndr
, r
->attributes
);
2316 r
->attributes
= NULL
;
2318 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2320 if (ndr_flags
& NDR_BUFFERS
) {
2321 if (r
->attributes
) {
2322 _mem_save_attributes_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2323 NDR_PULL_SET_MEM_CTX(ndr
, r
->attributes
, 0);
2324 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attributes
));
2325 NDR_PULL_ALLOC_N(ndr
, r
->attributes
, ndr_get_array_size(ndr
, &r
->attributes
));
2326 _mem_save_attributes_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2327 NDR_PULL_SET_MEM_CTX(ndr
, r
->attributes
, 0);
2328 for (cntr_attributes_1
= 0; cntr_attributes_1
< r
->num_attributes
; cntr_attributes_1
++) {
2329 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttribute(ndr
, NDR_SCALARS
, &r
->attributes
[cntr_attributes_1
]));
2331 for (cntr_attributes_1
= 0; cntr_attributes_1
< r
->num_attributes
; cntr_attributes_1
++) {
2332 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttribute(ndr
, NDR_BUFFERS
, &r
->attributes
[cntr_attributes_1
]));
2334 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attributes_1
, 0);
2335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attributes_0
, 0);
2337 if (r
->attributes
) {
2338 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->attributes
, r
->num_attributes
));
2341 return NDR_ERR_SUCCESS
;
2344 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttributeCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttributeCtr
*r
)
2346 uint32_t cntr_attributes_1
;
2347 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttributeCtr");
2349 ndr_print_uint32(ndr
, "num_attributes", r
->num_attributes
);
2350 ndr_print_ptr(ndr
, "attributes", r
->attributes
);
2352 if (r
->attributes
) {
2353 ndr
->print(ndr
, "%s: ARRAY(%d)", "attributes", (int)r
->num_attributes
);
2355 for (cntr_attributes_1
=0;cntr_attributes_1
<r
->num_attributes
;cntr_attributes_1
++) {
2357 if (asprintf(&idx_1
, "[%d]", cntr_attributes_1
) != -1) {
2358 ndr_print_drsuapi_DsReplicaAttribute(ndr
, "attributes", &r
->attributes
[cntr_attributes_1
]);
2368 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2370 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2371 return NDR_ERR_SUCCESS
;
2374 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2377 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2379 return NDR_ERR_SUCCESS
;
2382 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjectFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2384 ndr_print_uint32(ndr
, name
, r
);
2386 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER", DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER
, r
);
2387 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC", DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC
, r
);
2388 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY", DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY
, r
);
2392 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObject(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObject
*r
)
2394 if (ndr_flags
& NDR_SCALARS
) {
2395 NDR_CHECK(ndr_push_align(ndr
, 5));
2396 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->identifier
));
2397 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectFlags(ndr
, NDR_SCALARS
, r
->flags
));
2398 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr
, NDR_SCALARS
, &r
->attribute_ctr
));
2399 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2401 if (ndr_flags
& NDR_BUFFERS
) {
2402 if (r
->identifier
) {
2403 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->identifier
));
2405 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr
, NDR_BUFFERS
, &r
->attribute_ctr
));
2407 return NDR_ERR_SUCCESS
;
2410 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObject(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObject
*r
)
2412 uint32_t _ptr_identifier
;
2413 TALLOC_CTX
*_mem_save_identifier_0
;
2414 if (ndr_flags
& NDR_SCALARS
) {
2415 NDR_CHECK(ndr_pull_align(ndr
, 5));
2416 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_identifier
));
2417 if (_ptr_identifier
) {
2418 NDR_PULL_ALLOC(ndr
, r
->identifier
);
2420 r
->identifier
= NULL
;
2422 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectFlags(ndr
, NDR_SCALARS
, &r
->flags
));
2423 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr
, NDR_SCALARS
, &r
->attribute_ctr
));
2424 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2426 if (ndr_flags
& NDR_BUFFERS
) {
2427 if (r
->identifier
) {
2428 _mem_save_identifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2429 NDR_PULL_SET_MEM_CTX(ndr
, r
->identifier
, 0);
2430 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->identifier
));
2431 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_identifier_0
, 0);
2433 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr
, NDR_BUFFERS
, &r
->attribute_ctr
));
2435 return NDR_ERR_SUCCESS
;
2438 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObject(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObject
*r
)
2440 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObject");
2442 ndr_print_ptr(ndr
, "identifier", r
->identifier
);
2444 if (r
->identifier
) {
2445 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "identifier", r
->identifier
);
2448 ndr_print_drsuapi_DsReplicaObjectFlags(ndr
, "flags", r
->flags
);
2449 ndr_print_drsuapi_DsReplicaAttributeCtr(ndr
, "attribute_ctr", &r
->attribute_ctr
);
2453 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaMetaData(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaMetaData
*r
)
2455 if (ndr_flags
& NDR_SCALARS
) {
2456 NDR_CHECK(ndr_push_align(ndr
, 8));
2457 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
2458 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->originating_change_time
));
2459 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
2460 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
2461 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
2463 if (ndr_flags
& NDR_BUFFERS
) {
2465 return NDR_ERR_SUCCESS
;
2468 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaMetaData(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaMetaData
*r
)
2470 if (ndr_flags
& NDR_SCALARS
) {
2471 NDR_CHECK(ndr_pull_align(ndr
, 8));
2472 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
2473 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
2474 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
2475 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
2476 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
2478 if (ndr_flags
& NDR_BUFFERS
) {
2480 return NDR_ERR_SUCCESS
;
2483 _PUBLIC_
void ndr_print_drsuapi_DsReplicaMetaData(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaMetaData
*r
)
2485 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaMetaData");
2487 ndr_print_uint32(ndr
, "version", r
->version
);
2488 ndr_print_NTTIME_1sec(ndr
, "originating_change_time", r
->originating_change_time
);
2489 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
2490 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
2494 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaMetaDataCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaMetaDataCtr
*r
)
2496 uint32_t cntr_meta_data_0
;
2497 if (ndr_flags
& NDR_SCALARS
) {
2498 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2499 NDR_CHECK(ndr_push_align(ndr
, 8));
2500 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2501 for (cntr_meta_data_0
= 0; cntr_meta_data_0
< r
->count
; cntr_meta_data_0
++) {
2502 NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr
, NDR_SCALARS
, &r
->meta_data
[cntr_meta_data_0
]));
2504 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
2506 if (ndr_flags
& NDR_BUFFERS
) {
2508 return NDR_ERR_SUCCESS
;
2511 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaMetaDataCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaMetaDataCtr
*r
)
2513 uint32_t cntr_meta_data_0
;
2514 TALLOC_CTX
*_mem_save_meta_data_0
;
2515 if (ndr_flags
& NDR_SCALARS
) {
2516 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->meta_data
));
2517 NDR_CHECK(ndr_pull_align(ndr
, 8));
2518 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2519 if (r
->count
> 1048576) {
2520 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2522 NDR_PULL_ALLOC_N(ndr
, r
->meta_data
, ndr_get_array_size(ndr
, &r
->meta_data
));
2523 _mem_save_meta_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2524 NDR_PULL_SET_MEM_CTX(ndr
, r
->meta_data
, 0);
2525 for (cntr_meta_data_0
= 0; cntr_meta_data_0
< r
->count
; cntr_meta_data_0
++) {
2526 NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr
, NDR_SCALARS
, &r
->meta_data
[cntr_meta_data_0
]));
2528 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_meta_data_0
, 0);
2530 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->meta_data
, r
->count
));
2532 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
2534 if (ndr_flags
& NDR_BUFFERS
) {
2536 return NDR_ERR_SUCCESS
;
2539 _PUBLIC_
void ndr_print_drsuapi_DsReplicaMetaDataCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaMetaDataCtr
*r
)
2541 uint32_t cntr_meta_data_0
;
2542 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaMetaDataCtr");
2544 ndr_print_uint32(ndr
, "count", r
->count
);
2545 ndr
->print(ndr
, "%s: ARRAY(%d)", "meta_data", (int)r
->count
);
2547 for (cntr_meta_data_0
=0;cntr_meta_data_0
<r
->count
;cntr_meta_data_0
++) {
2549 if (asprintf(&idx_0
, "[%d]", cntr_meta_data_0
) != -1) {
2550 ndr_print_drsuapi_DsReplicaMetaData(ndr
, "meta_data", &r
->meta_data
[cntr_meta_data_0
]);
2558 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectListItemEx(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectListItemEx
*r
)
2560 if (ndr_flags
& NDR_SCALARS
) {
2561 NDR_CHECK(ndr_push_align(ndr
, 5));
2562 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->next_object
));
2563 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr
, NDR_SCALARS
, &r
->object
));
2564 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_nc_prefix
));
2565 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->parent_object_guid
));
2566 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->meta_data_ctr
));
2567 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2569 if (ndr_flags
& NDR_BUFFERS
) {
2570 if (r
->next_object
) {
2571 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next_object
));
2573 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr
, NDR_BUFFERS
, &r
->object
));
2574 if (r
->parent_object_guid
) {
2575 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, r
->parent_object_guid
));
2577 if (r
->meta_data_ctr
) {
2578 NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaDataCtr(ndr
, NDR_SCALARS
, r
->meta_data_ctr
));
2581 return NDR_ERR_SUCCESS
;
2584 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectListItemEx(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectListItemEx
*r
)
2586 uint32_t _ptr_next_object
;
2587 TALLOC_CTX
*_mem_save_next_object_0
;
2588 uint32_t _ptr_parent_object_guid
;
2589 TALLOC_CTX
*_mem_save_parent_object_guid_0
;
2590 uint32_t _ptr_meta_data_ctr
;
2591 TALLOC_CTX
*_mem_save_meta_data_ctr_0
;
2592 if (ndr_flags
& NDR_SCALARS
) {
2593 NDR_CHECK(ndr_pull_align(ndr
, 5));
2594 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_next_object
));
2595 if (_ptr_next_object
) {
2596 NDR_PULL_ALLOC(ndr
, r
->next_object
);
2598 r
->next_object
= NULL
;
2600 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr
, NDR_SCALARS
, &r
->object
));
2601 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_nc_prefix
));
2602 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parent_object_guid
));
2603 if (_ptr_parent_object_guid
) {
2604 NDR_PULL_ALLOC(ndr
, r
->parent_object_guid
);
2606 r
->parent_object_guid
= NULL
;
2608 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_meta_data_ctr
));
2609 if (_ptr_meta_data_ctr
) {
2610 NDR_PULL_ALLOC(ndr
, r
->meta_data_ctr
);
2612 r
->meta_data_ctr
= NULL
;
2614 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2616 if (ndr_flags
& NDR_BUFFERS
) {
2617 if (r
->next_object
) {
2618 _mem_save_next_object_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2619 NDR_PULL_SET_MEM_CTX(ndr
, r
->next_object
, 0);
2620 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next_object
));
2621 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_next_object_0
, 0);
2623 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr
, NDR_BUFFERS
, &r
->object
));
2624 if (r
->parent_object_guid
) {
2625 _mem_save_parent_object_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2626 NDR_PULL_SET_MEM_CTX(ndr
, r
->parent_object_guid
, 0);
2627 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, r
->parent_object_guid
));
2628 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parent_object_guid_0
, 0);
2630 if (r
->meta_data_ctr
) {
2631 _mem_save_meta_data_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2632 NDR_PULL_SET_MEM_CTX(ndr
, r
->meta_data_ctr
, 0);
2633 NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaDataCtr(ndr
, NDR_SCALARS
, r
->meta_data_ctr
));
2634 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_meta_data_ctr_0
, 0);
2637 return NDR_ERR_SUCCESS
;
2640 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr1
*r
)
2642 if (ndr_flags
& NDR_SCALARS
) {
2643 NDR_CHECK(ndr_push_align(ndr
, 8));
2644 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
2645 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
2646 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->naming_context
));
2647 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->old_highwatermark
));
2648 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->new_highwatermark
));
2649 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->uptodateness_vector
));
2650 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
2651 NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr
, NDR_SCALARS
, r
->extended_ret
));
2652 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->object_count
));
2653 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_drsuapi_DsGetNCChangesCtr1(r
, ndr
->iconv_convenience
, ndr
->flags
) + 55));
2654 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->first_object
));
2655 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->more_data
));
2656 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
2658 if (ndr_flags
& NDR_BUFFERS
) {
2659 if (r
->naming_context
) {
2660 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
2662 if (r
->uptodateness_vector
) {
2663 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
2665 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
2666 if (r
->first_object
) {
2667 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->first_object
));
2670 return NDR_ERR_SUCCESS
;
2673 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr1
*r
)
2675 uint32_t _ptr_naming_context
;
2676 TALLOC_CTX
*_mem_save_naming_context_0
;
2677 uint32_t _ptr_uptodateness_vector
;
2678 TALLOC_CTX
*_mem_save_uptodateness_vector_0
;
2679 uint32_t _ptr_first_object
;
2680 TALLOC_CTX
*_mem_save_first_object_0
;
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_trailer_align(ndr
, 8));
2712 if (ndr_flags
& NDR_BUFFERS
) {
2713 if (r
->naming_context
) {
2714 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2715 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
2716 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
2717 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
2719 if (r
->uptodateness_vector
) {
2720 _mem_save_uptodateness_vector_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2721 NDR_PULL_SET_MEM_CTX(ndr
, r
->uptodateness_vector
, 0);
2722 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
2723 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_uptodateness_vector_0
, 0);
2725 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
2726 if (r
->first_object
) {
2727 _mem_save_first_object_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2728 NDR_PULL_SET_MEM_CTX(ndr
, r
->first_object
, 0);
2729 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->first_object
));
2730 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_first_object_0
, 0);
2733 return NDR_ERR_SUCCESS
;
2736 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr1
*r
)
2738 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr1");
2740 ndr_print_GUID(ndr
, "source_dsa_guid", &r
->source_dsa_guid
);
2741 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
2742 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
2744 if (r
->naming_context
) {
2745 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
2748 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "old_highwatermark", &r
->old_highwatermark
);
2749 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "new_highwatermark", &r
->new_highwatermark
);
2750 ndr_print_ptr(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
2752 if (r
->uptodateness_vector
) {
2753 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
2756 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, "mapping_ctr", &r
->mapping_ctr
);
2757 ndr_print_drsuapi_DsExtendedError(ndr
, "extended_ret", r
->extended_ret
);
2758 ndr_print_uint32(ndr
, "object_count", r
->object_count
);
2759 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
);
2760 ndr_print_ptr(ndr
, "first_object", r
->first_object
);
2762 if (r
->first_object
) {
2763 ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr
, "first_object", r
->first_object
);
2766 ndr_print_uint32(ndr
, "more_data", r
->more_data
);
2770 _PUBLIC_
size_t ndr_size_drsuapi_DsGetNCChangesCtr1(const struct drsuapi_DsGetNCChangesCtr1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2772 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_drsuapi_DsGetNCChangesCtr1
, ic
);
2775 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsLinkedAttributeFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2777 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2778 return NDR_ERR_SUCCESS
;
2781 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsLinkedAttributeFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2784 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2786 return NDR_ERR_SUCCESS
;
2789 _PUBLIC_
void ndr_print_drsuapi_DsLinkedAttributeFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2791 ndr_print_uint32(ndr
, name
, r
);
2793 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE", DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE
, r
);
2797 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaLinkedAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaLinkedAttribute
*r
)
2799 if (ndr_flags
& NDR_SCALARS
) {
2800 NDR_CHECK(ndr_push_align(ndr
, 8));
2801 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->identifier
));
2802 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, r
->attid
));
2803 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr
, NDR_SCALARS
, &r
->value
));
2804 NDR_CHECK(ndr_push_drsuapi_DsLinkedAttributeFlags(ndr
, NDR_SCALARS
, r
->flags
));
2805 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->originating_add_time
));
2806 NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr
, NDR_SCALARS
, &r
->meta_data
));
2807 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
2809 if (ndr_flags
& NDR_BUFFERS
) {
2810 if (r
->identifier
) {
2811 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->identifier
));
2813 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr
, NDR_BUFFERS
, &r
->value
));
2815 return NDR_ERR_SUCCESS
;
2818 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaLinkedAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaLinkedAttribute
*r
)
2820 uint32_t _ptr_identifier
;
2821 TALLOC_CTX
*_mem_save_identifier_0
;
2822 if (ndr_flags
& NDR_SCALARS
) {
2823 NDR_CHECK(ndr_pull_align(ndr
, 8));
2824 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_identifier
));
2825 if (_ptr_identifier
) {
2826 NDR_PULL_ALLOC(ndr
, r
->identifier
);
2828 r
->identifier
= NULL
;
2830 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, &r
->attid
));
2831 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr
, NDR_SCALARS
, &r
->value
));
2832 NDR_CHECK(ndr_pull_drsuapi_DsLinkedAttributeFlags(ndr
, NDR_SCALARS
, &r
->flags
));
2833 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->originating_add_time
));
2834 NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr
, NDR_SCALARS
, &r
->meta_data
));
2835 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
2837 if (ndr_flags
& NDR_BUFFERS
) {
2838 if (r
->identifier
) {
2839 _mem_save_identifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2840 NDR_PULL_SET_MEM_CTX(ndr
, r
->identifier
, 0);
2841 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->identifier
));
2842 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_identifier_0
, 0);
2844 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr
, NDR_BUFFERS
, &r
->value
));
2846 return NDR_ERR_SUCCESS
;
2849 _PUBLIC_
void ndr_print_drsuapi_DsReplicaLinkedAttribute(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaLinkedAttribute
*r
)
2851 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaLinkedAttribute");
2853 ndr_print_ptr(ndr
, "identifier", r
->identifier
);
2855 if (r
->identifier
) {
2856 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "identifier", r
->identifier
);
2859 ndr_print_drsuapi_DsAttributeId(ndr
, "attid", r
->attid
);
2860 ndr_print_drsuapi_DsAttributeValue(ndr
, "value", &r
->value
);
2861 ndr_print_drsuapi_DsLinkedAttributeFlags(ndr
, "flags", r
->flags
);
2862 ndr_print_NTTIME_1sec(ndr
, "originating_add_time", r
->originating_add_time
);
2863 ndr_print_drsuapi_DsReplicaMetaData(ndr
, "meta_data", &r
->meta_data
);
2867 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr6
*r
)
2869 uint32_t cntr_linked_attributes_1
;
2870 if (ndr_flags
& NDR_SCALARS
) {
2871 NDR_CHECK(ndr_push_align(ndr
, 8));
2872 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
2873 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
2874 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->naming_context
));
2875 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->old_highwatermark
));
2876 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->new_highwatermark
));
2877 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->uptodateness_vector
));
2878 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
2879 NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr
, NDR_SCALARS
, r
->extended_ret
));
2880 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->object_count
));
2881 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_drsuapi_DsGetNCChangesCtr6(r
, ndr
->iconv_convenience
, ndr
->flags
) + 55));
2882 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->first_object
));
2883 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->more_data
));
2884 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->nc_object_count
));
2885 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->nc_linked_attributes_count
));
2886 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->linked_attributes_count
));
2887 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->linked_attributes
));
2888 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->drs_error
));
2889 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
2891 if (ndr_flags
& NDR_BUFFERS
) {
2892 if (r
->naming_context
) {
2893 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
2895 if (r
->uptodateness_vector
) {
2896 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2CtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
2898 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
2899 if (r
->first_object
) {
2900 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->first_object
));
2902 if (r
->linked_attributes
) {
2903 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->linked_attributes_count
));
2904 for (cntr_linked_attributes_1
= 0; cntr_linked_attributes_1
< r
->linked_attributes_count
; cntr_linked_attributes_1
++) {
2905 NDR_CHECK(ndr_push_drsuapi_DsReplicaLinkedAttribute(ndr
, NDR_SCALARS
, &r
->linked_attributes
[cntr_linked_attributes_1
]));
2907 for (cntr_linked_attributes_1
= 0; cntr_linked_attributes_1
< r
->linked_attributes_count
; cntr_linked_attributes_1
++) {
2908 NDR_CHECK(ndr_push_drsuapi_DsReplicaLinkedAttribute(ndr
, NDR_BUFFERS
, &r
->linked_attributes
[cntr_linked_attributes_1
]));
2912 return NDR_ERR_SUCCESS
;
2915 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr6
*r
)
2917 uint32_t _ptr_naming_context
;
2918 TALLOC_CTX
*_mem_save_naming_context_0
;
2919 uint32_t _ptr_uptodateness_vector
;
2920 TALLOC_CTX
*_mem_save_uptodateness_vector_0
;
2921 uint32_t _ptr_first_object
;
2922 TALLOC_CTX
*_mem_save_first_object_0
;
2923 uint32_t _ptr_linked_attributes
;
2924 uint32_t cntr_linked_attributes_1
;
2925 TALLOC_CTX
*_mem_save_linked_attributes_0
;
2926 TALLOC_CTX
*_mem_save_linked_attributes_1
;
2927 if (ndr_flags
& NDR_SCALARS
) {
2928 NDR_CHECK(ndr_pull_align(ndr
, 8));
2929 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_guid
));
2930 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
2931 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_naming_context
));
2932 if (_ptr_naming_context
) {
2933 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
2935 r
->naming_context
= NULL
;
2937 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->old_highwatermark
));
2938 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr
, NDR_SCALARS
, &r
->new_highwatermark
));
2939 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_uptodateness_vector
));
2940 if (_ptr_uptodateness_vector
) {
2941 NDR_PULL_ALLOC(ndr
, r
->uptodateness_vector
);
2943 r
->uptodateness_vector
= NULL
;
2945 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_SCALARS
, &r
->mapping_ctr
));
2946 NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr
, NDR_SCALARS
, &r
->extended_ret
));
2947 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->object_count
));
2948 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size
));
2949 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_first_object
));
2950 if (_ptr_first_object
) {
2951 NDR_PULL_ALLOC(ndr
, r
->first_object
);
2953 r
->first_object
= NULL
;
2955 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->more_data
));
2956 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->nc_object_count
));
2957 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->nc_linked_attributes_count
));
2958 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->linked_attributes_count
));
2959 if (r
->linked_attributes_count
> 1048576) {
2960 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2962 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_linked_attributes
));
2963 if (_ptr_linked_attributes
) {
2964 NDR_PULL_ALLOC(ndr
, r
->linked_attributes
);
2966 r
->linked_attributes
= NULL
;
2968 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->drs_error
));
2969 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
2971 if (ndr_flags
& NDR_BUFFERS
) {
2972 if (r
->naming_context
) {
2973 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2974 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
2975 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
2976 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
2978 if (r
->uptodateness_vector
) {
2979 _mem_save_uptodateness_vector_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2980 NDR_PULL_SET_MEM_CTX(ndr
, r
->uptodateness_vector
, 0);
2981 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2CtrEx(ndr
, NDR_SCALARS
, r
->uptodateness_vector
));
2982 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_uptodateness_vector_0
, 0);
2984 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, NDR_BUFFERS
, &r
->mapping_ctr
));
2985 if (r
->first_object
) {
2986 _mem_save_first_object_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2987 NDR_PULL_SET_MEM_CTX(ndr
, r
->first_object
, 0);
2988 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->first_object
));
2989 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_first_object_0
, 0);
2991 if (r
->linked_attributes
) {
2992 _mem_save_linked_attributes_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2993 NDR_PULL_SET_MEM_CTX(ndr
, r
->linked_attributes
, 0);
2994 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->linked_attributes
));
2995 NDR_PULL_ALLOC_N(ndr
, r
->linked_attributes
, ndr_get_array_size(ndr
, &r
->linked_attributes
));
2996 _mem_save_linked_attributes_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2997 NDR_PULL_SET_MEM_CTX(ndr
, r
->linked_attributes
, 0);
2998 for (cntr_linked_attributes_1
= 0; cntr_linked_attributes_1
< r
->linked_attributes_count
; cntr_linked_attributes_1
++) {
2999 NDR_CHECK(ndr_pull_drsuapi_DsReplicaLinkedAttribute(ndr
, NDR_SCALARS
, &r
->linked_attributes
[cntr_linked_attributes_1
]));
3001 for (cntr_linked_attributes_1
= 0; cntr_linked_attributes_1
< r
->linked_attributes_count
; cntr_linked_attributes_1
++) {
3002 NDR_CHECK(ndr_pull_drsuapi_DsReplicaLinkedAttribute(ndr
, NDR_BUFFERS
, &r
->linked_attributes
[cntr_linked_attributes_1
]));
3004 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_linked_attributes_1
, 0);
3005 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_linked_attributes_0
, 0);
3007 if (r
->linked_attributes
) {
3008 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->linked_attributes
, r
->linked_attributes_count
));
3011 return NDR_ERR_SUCCESS
;
3014 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr6
*r
)
3016 uint32_t cntr_linked_attributes_1
;
3017 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr6");
3019 ndr_print_GUID(ndr
, "source_dsa_guid", &r
->source_dsa_guid
);
3020 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
3021 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
3023 if (r
->naming_context
) {
3024 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
3027 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "old_highwatermark", &r
->old_highwatermark
);
3028 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr
, "new_highwatermark", &r
->new_highwatermark
);
3029 ndr_print_ptr(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
3031 if (r
->uptodateness_vector
) {
3032 ndr_print_drsuapi_DsReplicaCursor2CtrEx(ndr
, "uptodateness_vector", r
->uptodateness_vector
);
3035 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr
, "mapping_ctr", &r
->mapping_ctr
);
3036 ndr_print_drsuapi_DsExtendedError(ndr
, "extended_ret", r
->extended_ret
);
3037 ndr_print_uint32(ndr
, "object_count", r
->object_count
);
3038 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
);
3039 ndr_print_ptr(ndr
, "first_object", r
->first_object
);
3041 if (r
->first_object
) {
3042 ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr
, "first_object", r
->first_object
);
3045 ndr_print_uint32(ndr
, "more_data", r
->more_data
);
3046 ndr_print_uint32(ndr
, "nc_object_count", r
->nc_object_count
);
3047 ndr_print_uint32(ndr
, "nc_linked_attributes_count", r
->nc_linked_attributes_count
);
3048 ndr_print_uint32(ndr
, "linked_attributes_count", r
->linked_attributes_count
);
3049 ndr_print_ptr(ndr
, "linked_attributes", r
->linked_attributes
);
3051 if (r
->linked_attributes
) {
3052 ndr
->print(ndr
, "%s: ARRAY(%d)", "linked_attributes", (int)r
->linked_attributes_count
);
3054 for (cntr_linked_attributes_1
=0;cntr_linked_attributes_1
<r
->linked_attributes_count
;cntr_linked_attributes_1
++) {
3056 if (asprintf(&idx_1
, "[%d]", cntr_linked_attributes_1
) != -1) {
3057 ndr_print_drsuapi_DsReplicaLinkedAttribute(ndr
, "linked_attributes", &r
->linked_attributes
[cntr_linked_attributes_1
]);
3064 ndr_print_WERROR(ndr
, "drs_error", r
->drs_error
);
3068 _PUBLIC_
size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6
*r
, struct smb_iconv_convenience
*ic
, int flags
)
3070 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_drsuapi_DsGetNCChangesCtr6
, ic
);
3073 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr1TS
*r
)
3075 if (ndr_flags
& NDR_SCALARS
) {
3076 NDR_CHECK(ndr_push_align(ndr
, 1));
3078 struct ndr_push
*_ndr_ctr1
;
3079 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_ctr1
, 0xFFFFFC01, -1));
3080 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1
, NDR_SCALARS
|NDR_BUFFERS
, &r
->ctr1
));
3081 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_ctr1
, 0xFFFFFC01, -1));
3083 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
3085 if (ndr_flags
& NDR_BUFFERS
) {
3087 return NDR_ERR_SUCCESS
;
3090 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr1TS
*r
)
3092 if (ndr_flags
& NDR_SCALARS
) {
3093 NDR_CHECK(ndr_pull_align(ndr
, 1));
3095 struct ndr_pull
*_ndr_ctr1
;
3096 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ctr1
, 0xFFFFFC01, -1));
3097 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1
, NDR_SCALARS
|NDR_BUFFERS
, &r
->ctr1
));
3098 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ctr1
, 0xFFFFFC01, -1));
3100 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
3102 if (ndr_flags
& NDR_BUFFERS
) {
3104 return NDR_ERR_SUCCESS
;
3107 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr1TS
*r
)
3109 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr1TS");
3111 ndr_print_drsuapi_DsGetNCChangesCtr1(ndr
, "ctr1", &r
->ctr1
);
3115 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr6TS
*r
)
3117 if (ndr_flags
& NDR_SCALARS
) {
3118 NDR_CHECK(ndr_push_align(ndr
, 1));
3120 struct ndr_push
*_ndr_ctr6
;
3121 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_ctr6
, 0xFFFFFC01, -1));
3122 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6
, NDR_SCALARS
|NDR_BUFFERS
, &r
->ctr6
));
3123 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_ctr6
, 0xFFFFFC01, -1));
3125 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
3127 if (ndr_flags
& NDR_BUFFERS
) {
3129 return NDR_ERR_SUCCESS
;
3132 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr6TS
*r
)
3134 if (ndr_flags
& NDR_SCALARS
) {
3135 NDR_CHECK(ndr_pull_align(ndr
, 1));
3137 struct ndr_pull
*_ndr_ctr6
;
3138 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ctr6
, 0xFFFFFC01, -1));
3139 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6
, NDR_SCALARS
|NDR_BUFFERS
, &r
->ctr6
));
3140 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ctr6
, 0xFFFFFC01, -1));
3142 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
3144 if (ndr_flags
& NDR_BUFFERS
) {
3146 return NDR_ERR_SUCCESS
;
3149 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr6TS
*r
)
3151 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr6TS");
3153 ndr_print_drsuapi_DsGetNCChangesCtr6(ndr
, "ctr6", &r
->ctr6
);
3157 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesMSZIPCtr1
*r
)
3160 TALLOC_CTX
*_mem_save_ts_0
;
3161 if (ndr_flags
& NDR_SCALARS
) {
3162 NDR_CHECK(ndr_pull_align(ndr
, 5));
3163 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->decompressed_length
));
3164 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->compressed_length
));
3165 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ts
));
3167 NDR_PULL_ALLOC(ndr
, r
->ts
);
3171 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3173 if (ndr_flags
& NDR_BUFFERS
) {
3175 _mem_save_ts_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3176 NDR_PULL_SET_MEM_CTX(ndr
, r
->ts
, 0);
3178 struct ndr_pull
*_ndr_ts
;
3179 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ts
, 4, r
->compressed_length
));
3181 struct ndr_pull
*_ndr_ts_compressed
;
3182 NDR_CHECK(ndr_pull_compression_start(_ndr_ts
, &_ndr_ts_compressed
, NDR_COMPRESSION_MSZIP
, r
->decompressed_length
));
3183 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed
, NDR_SCALARS
|NDR_BUFFERS
, r
->ts
));
3184 NDR_CHECK(ndr_pull_compression_end(_ndr_ts
, _ndr_ts_compressed
, NDR_COMPRESSION_MSZIP
, r
->decompressed_length
));
3186 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ts
, 4, r
->compressed_length
));
3188 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ts_0
, 0);
3191 return NDR_ERR_SUCCESS
;
3194 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesMSZIPCtr1
*r
)
3196 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesMSZIPCtr1");
3198 ndr_print_uint32(ndr
, "decompressed_length", r
->decompressed_length
);
3199 ndr_print_uint32(ndr
, "compressed_length", r
->compressed_length
);
3200 ndr_print_ptr(ndr
, "ts", r
->ts
);
3203 ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr
, "ts", r
->ts
);
3209 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesMSZIPCtr6
*r
)
3212 TALLOC_CTX
*_mem_save_ts_0
;
3213 if (ndr_flags
& NDR_SCALARS
) {
3214 NDR_CHECK(ndr_pull_align(ndr
, 5));
3215 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->decompressed_length
));
3216 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->compressed_length
));
3217 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ts
));
3219 NDR_PULL_ALLOC(ndr
, r
->ts
);
3223 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3225 if (ndr_flags
& NDR_BUFFERS
) {
3227 _mem_save_ts_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3228 NDR_PULL_SET_MEM_CTX(ndr
, r
->ts
, 0);
3230 struct ndr_pull
*_ndr_ts
;
3231 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ts
, 4, r
->compressed_length
));
3233 struct ndr_pull
*_ndr_ts_compressed
;
3234 NDR_CHECK(ndr_pull_compression_start(_ndr_ts
, &_ndr_ts_compressed
, NDR_COMPRESSION_MSZIP
, r
->decompressed_length
));
3235 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed
, NDR_SCALARS
|NDR_BUFFERS
, r
->ts
));
3236 NDR_CHECK(ndr_pull_compression_end(_ndr_ts
, _ndr_ts_compressed
, NDR_COMPRESSION_MSZIP
, r
->decompressed_length
));
3238 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ts
, 4, r
->compressed_length
));
3240 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ts_0
, 0);
3243 return NDR_ERR_SUCCESS
;
3246 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesMSZIPCtr6
*r
)
3248 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesMSZIPCtr6");
3250 ndr_print_uint32(ndr
, "decompressed_length", r
->decompressed_length
);
3251 ndr_print_uint32(ndr
, "compressed_length", r
->compressed_length
);
3252 ndr_print_ptr(ndr
, "ts", r
->ts
);
3255 ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr
, "ts", r
->ts
);
3261 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesXPRESSCtr1
*r
)
3264 TALLOC_CTX
*_mem_save_ts_0
;
3265 if (ndr_flags
& NDR_SCALARS
) {
3266 NDR_CHECK(ndr_pull_align(ndr
, 5));
3267 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->decompressed_length
));
3268 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->compressed_length
));
3269 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ts
));
3271 NDR_PULL_ALLOC(ndr
, r
->ts
);
3275 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3277 if (ndr_flags
& NDR_BUFFERS
) {
3279 _mem_save_ts_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3280 NDR_PULL_SET_MEM_CTX(ndr
, r
->ts
, 0);
3282 struct ndr_pull
*_ndr_ts
;
3283 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ts
, 4, r
->compressed_length
));
3285 struct ndr_pull
*_ndr_ts_compressed
;
3286 NDR_CHECK(ndr_pull_compression_start(_ndr_ts
, &_ndr_ts_compressed
, NDR_COMPRESSION_XPRESS
, r
->decompressed_length
));
3287 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed
, NDR_SCALARS
|NDR_BUFFERS
, r
->ts
));
3288 NDR_CHECK(ndr_pull_compression_end(_ndr_ts
, _ndr_ts_compressed
, NDR_COMPRESSION_XPRESS
, r
->decompressed_length
));
3290 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ts
, 4, r
->compressed_length
));
3292 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ts_0
, 0);
3295 return NDR_ERR_SUCCESS
;
3298 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesXPRESSCtr1
*r
)
3300 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesXPRESSCtr1");
3302 ndr_print_uint32(ndr
, "decompressed_length", r
->decompressed_length
);
3303 ndr_print_uint32(ndr
, "compressed_length", r
->compressed_length
);
3304 ndr_print_ptr(ndr
, "ts", r
->ts
);
3307 ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr
, "ts", r
->ts
);
3313 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesXPRESSCtr6
*r
)
3316 TALLOC_CTX
*_mem_save_ts_0
;
3317 if (ndr_flags
& NDR_SCALARS
) {
3318 NDR_CHECK(ndr_pull_align(ndr
, 5));
3319 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->decompressed_length
));
3320 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->compressed_length
));
3321 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ts
));
3323 NDR_PULL_ALLOC(ndr
, r
->ts
);
3327 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3329 if (ndr_flags
& NDR_BUFFERS
) {
3331 _mem_save_ts_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3332 NDR_PULL_SET_MEM_CTX(ndr
, r
->ts
, 0);
3334 struct ndr_pull
*_ndr_ts
;
3335 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_ts
, 4, r
->compressed_length
));
3337 struct ndr_pull
*_ndr_ts_compressed
;
3338 NDR_CHECK(ndr_pull_compression_start(_ndr_ts
, &_ndr_ts_compressed
, NDR_COMPRESSION_XPRESS
, r
->decompressed_length
));
3339 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed
, NDR_SCALARS
|NDR_BUFFERS
, r
->ts
));
3340 NDR_CHECK(ndr_pull_compression_end(_ndr_ts
, _ndr_ts_compressed
, NDR_COMPRESSION_XPRESS
, r
->decompressed_length
));
3342 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_ts
, 4, r
->compressed_length
));
3344 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ts_0
, 0);
3347 return NDR_ERR_SUCCESS
;
3350 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesXPRESSCtr6
*r
)
3352 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesXPRESSCtr6");
3354 ndr_print_uint32(ndr
, "decompressed_length", r
->decompressed_length
);
3355 ndr_print_uint32(ndr
, "compressed_length", r
->compressed_length
);
3356 ndr_print_ptr(ndr
, "ts", r
->ts
);
3359 ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr
, "ts", r
->ts
);
3365 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCompressionType(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsGetNCChangesCompressionType r
)
3367 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
3368 return NDR_ERR_SUCCESS
;
3371 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCompressionType(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsGetNCChangesCompressionType
*r
)
3374 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
3376 return NDR_ERR_SUCCESS
;
3379 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCompressionType(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsGetNCChangesCompressionType r
)
3381 const char *val
= NULL
;
3384 case DRSUAPI_COMPRESSION_TYPE_MSZIP
: val
= "DRSUAPI_COMPRESSION_TYPE_MSZIP"; break;
3385 case DRSUAPI_COMPRESSION_TYPE_XPRESS
: val
= "DRSUAPI_COMPRESSION_TYPE_XPRESS"; break;
3387 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
3390 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetNCChangesCompressedCtr
*r
)
3393 uint32_t _flags_save_UNION
= ndr
->flags
;
3394 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3395 if (ndr_flags
& NDR_SCALARS
) {
3396 int level
= ndr_push_get_switch_value(ndr
, r
);
3397 NDR_CHECK(ndr_push_union_align(ndr
, 5));
3399 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16): {
3400 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_SCALARS
, &r
->mszip1
));
3403 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16): {
3404 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(ndr
, NDR_SCALARS
, &r
->mszip6
));
3407 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16): {
3408 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(ndr
, NDR_SCALARS
, &r
->xpress1
));
3411 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16): {
3412 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(ndr
, NDR_SCALARS
, &r
->xpress6
));
3416 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3419 if (ndr_flags
& NDR_BUFFERS
) {
3420 int level
= ndr_push_get_switch_value(ndr
, r
);
3422 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3423 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_BUFFERS
, &r
->mszip1
));
3426 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3427 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(ndr
, NDR_BUFFERS
, &r
->mszip6
));
3430 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3431 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(ndr
, NDR_BUFFERS
, &r
->xpress1
));
3434 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3435 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(ndr
, NDR_BUFFERS
, &r
->xpress6
));
3439 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3442 ndr
->flags
= _flags_save_UNION
;
3444 return NDR_ERR_SUCCESS
;
3447 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetNCChangesCompressedCtr
*r
)
3451 uint32_t _flags_save_UNION
= ndr
->flags
;
3452 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3453 level
= ndr_pull_get_switch_value(ndr
, r
);
3454 if (ndr_flags
& NDR_SCALARS
) {
3455 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
3457 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16): {
3458 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_SCALARS
, &r
->mszip1
));
3461 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16): {
3462 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(ndr
, NDR_SCALARS
, &r
->mszip6
));
3465 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16): {
3466 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(ndr
, NDR_SCALARS
, &r
->xpress1
));
3469 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16): {
3470 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(ndr
, NDR_SCALARS
, &r
->xpress6
));
3474 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3477 if (ndr_flags
& NDR_BUFFERS
) {
3479 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3480 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_BUFFERS
, &r
->mszip1
));
3483 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3484 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(ndr
, NDR_BUFFERS
, &r
->mszip6
));
3487 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3488 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(ndr
, NDR_BUFFERS
, &r
->xpress1
));
3491 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3492 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(ndr
, NDR_BUFFERS
, &r
->xpress6
));
3496 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3499 ndr
->flags
= _flags_save_UNION
;
3501 return NDR_ERR_SUCCESS
;
3504 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetNCChangesCompressedCtr
*r
)
3508 uint32_t _flags_save_UNION
= ndr
->flags
;
3509 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3510 level
= ndr_print_get_switch_value(ndr
, r
);
3511 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetNCChangesCompressedCtr");
3513 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3514 ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, "mszip1", &r
->mszip1
);
3517 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16):
3518 ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(ndr
, "mszip6", &r
->mszip6
);
3521 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3522 ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(ndr
, "xpress1", &r
->xpress1
);
3525 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16):
3526 ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(ndr
, "xpress6", &r
->xpress6
);
3530 ndr_print_bad_level(ndr
, name
, level
);
3532 ndr
->flags
= _flags_save_UNION
;
3536 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr2
*r
)
3538 if (ndr_flags
& NDR_SCALARS
) {
3539 NDR_CHECK(ndr_push_align(ndr
, 5));
3540 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_SCALARS
, &r
->mszip1
));
3541 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3543 if (ndr_flags
& NDR_BUFFERS
) {
3544 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_BUFFERS
, &r
->mszip1
));
3546 return NDR_ERR_SUCCESS
;
3549 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr2
*r
)
3551 if (ndr_flags
& NDR_SCALARS
) {
3552 NDR_CHECK(ndr_pull_align(ndr
, 5));
3553 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_SCALARS
, &r
->mszip1
));
3554 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3556 if (ndr_flags
& NDR_BUFFERS
) {
3557 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, NDR_BUFFERS
, &r
->mszip1
));
3559 return NDR_ERR_SUCCESS
;
3562 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr2
*r
)
3564 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr2");
3566 ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr
, "mszip1", &r
->mszip1
);
3570 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr7(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNCChangesCtr7
*r
)
3572 if (ndr_flags
& NDR_SCALARS
) {
3573 NDR_CHECK(ndr_push_align(ndr
, 5));
3574 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->level
));
3575 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressionType(ndr
, NDR_SCALARS
, r
->type
));
3576 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->level
| (r
->type
<< 16)));
3577 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
3578 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3580 if (ndr_flags
& NDR_BUFFERS
) {
3581 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
3583 return NDR_ERR_SUCCESS
;
3586 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr7(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNCChangesCtr7
*r
)
3588 if (ndr_flags
& NDR_SCALARS
) {
3589 NDR_CHECK(ndr_pull_align(ndr
, 5));
3590 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->level
));
3591 if (r
->level
< 0 || r
->level
> 6) {
3592 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3594 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressionType(ndr
, NDR_SCALARS
, &r
->type
));
3595 if (r
->type
< 2 || r
->type
> 3) {
3596 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3598 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->level
| (r
->type
<< 16)));
3599 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
3600 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3602 if (ndr_flags
& NDR_BUFFERS
) {
3603 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
3605 return NDR_ERR_SUCCESS
;
3608 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr7(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNCChangesCtr7
*r
)
3610 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChangesCtr7");
3612 ndr_print_int32(ndr
, "level", r
->level
);
3613 ndr_print_drsuapi_DsGetNCChangesCompressionType(ndr
, "type", r
->type
);
3614 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->level
| (r
->type
<< 16));
3615 ndr_print_drsuapi_DsGetNCChangesCompressedCtr(ndr
, "ctr", &r
->ctr
);
3619 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChangesCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetNCChangesCtr
*r
)
3621 if (ndr_flags
& NDR_SCALARS
) {
3622 int level
= ndr_push_get_switch_value(ndr
, r
);
3623 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
3624 NDR_CHECK(ndr_push_union_align(ndr
, 8));
3627 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
3631 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
3635 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(ndr
, NDR_SCALARS
, &r
->ctr6
));
3639 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr7(ndr
, NDR_SCALARS
, &r
->ctr7
));
3643 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3646 if (ndr_flags
& NDR_BUFFERS
) {
3647 int level
= ndr_push_get_switch_value(ndr
, r
);
3650 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
3654 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
3658 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(ndr
, NDR_BUFFERS
, &r
->ctr6
));
3662 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr7(ndr
, NDR_BUFFERS
, &r
->ctr7
));
3666 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3669 return NDR_ERR_SUCCESS
;
3672 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChangesCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetNCChangesCtr
*r
)
3676 level
= ndr_pull_get_switch_value(ndr
, r
);
3677 if (ndr_flags
& NDR_SCALARS
) {
3678 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
3679 if (_level
!= level
) {
3680 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
3682 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
3685 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
3689 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
3693 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(ndr
, NDR_SCALARS
, &r
->ctr6
));
3697 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr7(ndr
, NDR_SCALARS
, &r
->ctr7
));
3701 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3704 if (ndr_flags
& NDR_BUFFERS
) {
3707 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
3711 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
3715 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(ndr
, NDR_BUFFERS
, &r
->ctr6
));
3719 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr7(ndr
, NDR_BUFFERS
, &r
->ctr7
));
3723 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3726 return NDR_ERR_SUCCESS
;
3729 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChangesCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetNCChangesCtr
*r
)
3732 level
= ndr_print_get_switch_value(ndr
, r
);
3733 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetNCChangesCtr");
3736 ndr_print_drsuapi_DsGetNCChangesCtr1(ndr
, "ctr1", &r
->ctr1
);
3740 ndr_print_drsuapi_DsGetNCChangesCtr2(ndr
, "ctr2", &r
->ctr2
);
3744 ndr_print_drsuapi_DsGetNCChangesCtr6(ndr
, "ctr6", &r
->ctr6
);
3748 ndr_print_drsuapi_DsGetNCChangesCtr7(ndr
, "ctr7", &r
->ctr7
);
3752 ndr_print_bad_level(ndr
, name
, level
);
3756 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaUpdateRefsOptions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
3758 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
3759 return NDR_ERR_SUCCESS
;
3762 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaUpdateRefsOptions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
3765 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
3767 return NDR_ERR_SUCCESS
;
3770 _PUBLIC_
void ndr_print_drsuapi_DsReplicaUpdateRefsOptions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
3772 ndr_print_uint32(ndr
, name
, r
);
3774 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION
, r
);
3775 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_UPDATE_GETCHG_CHECK", DRSUAPI_DS_REPLICA_UPDATE_GETCHG_CHECK
, r
);
3776 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE", DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE
, r
);
3777 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE", DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE
, r
);
3778 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE", DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE
, r
);
3782 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaUpdateRefsRequest1
*r
)
3784 if (ndr_flags
& NDR_SCALARS
) {
3785 NDR_CHECK(ndr_push_align(ndr
, 5));
3786 if (r
->naming_context
== NULL
) {
3787 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3789 NDR_CHECK(ndr_push_ref_ptr(ndr
));
3790 if (r
->dest_dsa_dns_name
== NULL
) {
3791 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3793 NDR_CHECK(ndr_push_ref_ptr(ndr
));
3794 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->dest_dsa_guid
));
3795 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsOptions(ndr
, NDR_SCALARS
, r
->options
));
3796 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3798 if (ndr_flags
& NDR_BUFFERS
) {
3799 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
3800 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dest_dsa_dns_name
, CH_DOS
)));
3801 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3802 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dest_dsa_dns_name
, CH_DOS
)));
3803 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
));
3805 return NDR_ERR_SUCCESS
;
3808 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaUpdateRefsRequest1
*r
)
3810 uint32_t _ptr_naming_context
;
3811 TALLOC_CTX
*_mem_save_naming_context_0
;
3812 uint32_t _ptr_dest_dsa_dns_name
;
3813 if (ndr_flags
& NDR_SCALARS
) {
3814 NDR_CHECK(ndr_pull_align(ndr
, 5));
3815 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
3816 if (_ptr_naming_context
) {
3817 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
3819 r
->naming_context
= NULL
;
3821 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_dest_dsa_dns_name
));
3822 if (_ptr_dest_dsa_dns_name
) {
3823 NDR_PULL_ALLOC(ndr
, r
->dest_dsa_dns_name
);
3825 r
->dest_dsa_dns_name
= NULL
;
3827 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->dest_dsa_guid
));
3828 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsOptions(ndr
, NDR_SCALARS
, &r
->options
));
3829 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3831 if (ndr_flags
& NDR_BUFFERS
) {
3832 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3833 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
3834 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
3835 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
3836 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dest_dsa_dns_name
));
3837 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dest_dsa_dns_name
));
3838 if (ndr_get_array_length(ndr
, &r
->dest_dsa_dns_name
) > ndr_get_array_size(ndr
, &r
->dest_dsa_dns_name
)) {
3839 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
));
3841 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dest_dsa_dns_name
), sizeof(uint8_t)));
3842 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
));
3844 return NDR_ERR_SUCCESS
;
3847 _PUBLIC_
void ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaUpdateRefsRequest1
*r
)
3849 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaUpdateRefsRequest1");
3851 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
3853 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
3855 ndr_print_ptr(ndr
, "dest_dsa_dns_name", r
->dest_dsa_dns_name
);
3857 ndr_print_string(ndr
, "dest_dsa_dns_name", r
->dest_dsa_dns_name
);
3859 ndr_print_GUID(ndr
, "dest_dsa_guid", &r
->dest_dsa_guid
);
3860 ndr_print_drsuapi_DsReplicaUpdateRefsOptions(ndr
, "options", r
->options
);
3864 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaUpdateRefsRequest
*r
)
3866 if (ndr_flags
& NDR_SCALARS
) {
3867 int level
= ndr_push_get_switch_value(ndr
, r
);
3868 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
3869 NDR_CHECK(ndr_push_union_align(ndr
, 5));
3872 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
3876 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3879 if (ndr_flags
& NDR_BUFFERS
) {
3880 int level
= ndr_push_get_switch_value(ndr
, r
);
3883 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
3887 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3890 return NDR_ERR_SUCCESS
;
3893 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaUpdateRefsRequest
*r
)
3897 level
= ndr_pull_get_switch_value(ndr
, r
);
3898 if (ndr_flags
& NDR_SCALARS
) {
3899 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
3900 if (_level
!= level
) {
3901 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
3903 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
3906 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
3910 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3913 if (ndr_flags
& NDR_BUFFERS
) {
3916 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
3920 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3923 return NDR_ERR_SUCCESS
;
3926 _PUBLIC_
void ndr_print_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaUpdateRefsRequest
*r
)
3929 level
= ndr_print_get_switch_value(ndr
, r
);
3930 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaUpdateRefsRequest");
3933 ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(ndr
, "req1", &r
->req1
);
3937 ndr_print_bad_level(ndr
, name
, level
);
3941 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAddOptions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
3943 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
3944 return NDR_ERR_SUCCESS
;
3947 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAddOptions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
3950 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
3952 return NDR_ERR_SUCCESS
;
3955 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAddOptions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
3957 ndr_print_uint32(ndr
, name
, r
);
3959 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION
, r
);
3960 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_WRITEABLE", DRSUAPI_DS_REPLICA_ADD_WRITEABLE
, r
);
3964 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAddRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAddRequest1
*r
)
3966 if (ndr_flags
& NDR_SCALARS
) {
3967 NDR_CHECK(ndr_push_align(ndr
, 5));
3968 if (r
->naming_context
== NULL
) {
3969 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3971 NDR_CHECK(ndr_push_ref_ptr(ndr
));
3972 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dsa_address
));
3973 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->schedule
, 84));
3974 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddOptions(ndr
, NDR_SCALARS
, r
->options
));
3975 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3977 if (ndr_flags
& NDR_BUFFERS
) {
3978 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
3979 if (r
->source_dsa_address
) {
3980 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
)));
3981 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3982 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
)));
3983 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
));
3986 return NDR_ERR_SUCCESS
;
3989 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAddRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAddRequest1
*r
)
3991 uint32_t _ptr_naming_context
;
3992 TALLOC_CTX
*_mem_save_naming_context_0
;
3993 uint32_t _ptr_source_dsa_address
;
3994 TALLOC_CTX
*_mem_save_source_dsa_address_0
;
3995 if (ndr_flags
& NDR_SCALARS
) {
3996 NDR_CHECK(ndr_pull_align(ndr
, 5));
3997 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
3998 if (_ptr_naming_context
) {
3999 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
4001 r
->naming_context
= NULL
;
4003 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dsa_address
));
4004 if (_ptr_source_dsa_address
) {
4005 NDR_PULL_ALLOC(ndr
, r
->source_dsa_address
);
4007 r
->source_dsa_address
= NULL
;
4009 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->schedule
, 84));
4010 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddOptions(ndr
, NDR_SCALARS
, &r
->options
));
4011 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4013 if (ndr_flags
& NDR_BUFFERS
) {
4014 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4015 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
4016 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
4017 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
4018 if (r
->source_dsa_address
) {
4019 _mem_save_source_dsa_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4020 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dsa_address
, 0);
4021 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->source_dsa_address
));
4022 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->source_dsa_address
));
4023 if (ndr_get_array_length(ndr
, &r
->source_dsa_address
) > ndr_get_array_size(ndr
, &r
->source_dsa_address
)) {
4024 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
));
4026 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->source_dsa_address
), sizeof(uint16_t)));
4027 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
));
4028 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dsa_address_0
, 0);
4031 return NDR_ERR_SUCCESS
;
4034 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAddRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAddRequest1
*r
)
4036 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAddRequest1");
4038 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
4040 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
4042 ndr_print_ptr(ndr
, "source_dsa_address", r
->source_dsa_address
);
4044 if (r
->source_dsa_address
) {
4045 ndr_print_string(ndr
, "source_dsa_address", r
->source_dsa_address
);
4048 ndr_print_array_uint8(ndr
, "schedule", r
->schedule
, 84);
4049 ndr_print_drsuapi_DsReplicaAddOptions(ndr
, "options", r
->options
);
4053 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAddRequest2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAddRequest2
*r
)
4055 if (ndr_flags
& NDR_SCALARS
) {
4056 NDR_CHECK(ndr_push_align(ndr
, 5));
4057 if (r
->naming_context
== NULL
) {
4058 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4060 NDR_CHECK(ndr_push_ref_ptr(ndr
));
4061 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dsa_dn
));
4062 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->transport_dn
));
4063 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dsa_address
));
4064 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->schedule
, 84));
4065 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddOptions(ndr
, NDR_SCALARS
, r
->options
));
4066 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4068 if (ndr_flags
& NDR_BUFFERS
) {
4069 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
4070 if (r
->source_dsa_dn
) {
4071 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->source_dsa_dn
));
4073 if (r
->transport_dn
) {
4074 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->transport_dn
));
4076 if (r
->source_dsa_address
) {
4077 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
)));
4078 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4079 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
)));
4080 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
));
4083 return NDR_ERR_SUCCESS
;
4086 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAddRequest2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAddRequest2
*r
)
4088 uint32_t _ptr_naming_context
;
4089 TALLOC_CTX
*_mem_save_naming_context_0
;
4090 uint32_t _ptr_source_dsa_dn
;
4091 TALLOC_CTX
*_mem_save_source_dsa_dn_0
;
4092 uint32_t _ptr_transport_dn
;
4093 TALLOC_CTX
*_mem_save_transport_dn_0
;
4094 uint32_t _ptr_source_dsa_address
;
4095 TALLOC_CTX
*_mem_save_source_dsa_address_0
;
4096 if (ndr_flags
& NDR_SCALARS
) {
4097 NDR_CHECK(ndr_pull_align(ndr
, 5));
4098 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
4099 if (_ptr_naming_context
) {
4100 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
4102 r
->naming_context
= NULL
;
4104 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dsa_dn
));
4105 if (_ptr_source_dsa_dn
) {
4106 NDR_PULL_ALLOC(ndr
, r
->source_dsa_dn
);
4108 r
->source_dsa_dn
= NULL
;
4110 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_transport_dn
));
4111 if (_ptr_transport_dn
) {
4112 NDR_PULL_ALLOC(ndr
, r
->transport_dn
);
4114 r
->transport_dn
= NULL
;
4116 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dsa_address
));
4117 if (_ptr_source_dsa_address
) {
4118 NDR_PULL_ALLOC(ndr
, r
->source_dsa_address
);
4120 r
->source_dsa_address
= NULL
;
4122 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->schedule
, 84));
4123 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddOptions(ndr
, NDR_SCALARS
, &r
->options
));
4124 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4126 if (ndr_flags
& NDR_BUFFERS
) {
4127 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4128 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
4129 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
4130 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
4131 if (r
->source_dsa_dn
) {
4132 _mem_save_source_dsa_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4133 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dsa_dn
, 0);
4134 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->source_dsa_dn
));
4135 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dsa_dn_0
, 0);
4137 if (r
->transport_dn
) {
4138 _mem_save_transport_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4139 NDR_PULL_SET_MEM_CTX(ndr
, r
->transport_dn
, 0);
4140 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->transport_dn
));
4141 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_transport_dn_0
, 0);
4143 if (r
->source_dsa_address
) {
4144 _mem_save_source_dsa_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4145 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dsa_address
, 0);
4146 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->source_dsa_address
));
4147 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->source_dsa_address
));
4148 if (ndr_get_array_length(ndr
, &r
->source_dsa_address
) > ndr_get_array_size(ndr
, &r
->source_dsa_address
)) {
4149 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
));
4151 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->source_dsa_address
), sizeof(uint16_t)));
4152 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
));
4153 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dsa_address_0
, 0);
4156 return NDR_ERR_SUCCESS
;
4159 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAddRequest2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAddRequest2
*r
)
4161 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAddRequest2");
4163 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
4165 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
4167 ndr_print_ptr(ndr
, "source_dsa_dn", r
->source_dsa_dn
);
4169 if (r
->source_dsa_dn
) {
4170 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "source_dsa_dn", r
->source_dsa_dn
);
4173 ndr_print_ptr(ndr
, "transport_dn", r
->transport_dn
);
4175 if (r
->transport_dn
) {
4176 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "transport_dn", r
->transport_dn
);
4179 ndr_print_ptr(ndr
, "source_dsa_address", r
->source_dsa_address
);
4181 if (r
->source_dsa_address
) {
4182 ndr_print_string(ndr
, "source_dsa_address", r
->source_dsa_address
);
4185 ndr_print_array_uint8(ndr
, "schedule", r
->schedule
, 84);
4186 ndr_print_drsuapi_DsReplicaAddOptions(ndr
, "options", r
->options
);
4190 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAddRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaAddRequest
*r
)
4192 if (ndr_flags
& NDR_SCALARS
) {
4193 int level
= ndr_push_get_switch_value(ndr
, r
);
4194 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
4195 NDR_CHECK(ndr_push_union_align(ndr
, 5));
4198 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4202 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest2(ndr
, NDR_SCALARS
, &r
->req2
));
4206 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4209 if (ndr_flags
& NDR_BUFFERS
) {
4210 int level
= ndr_push_get_switch_value(ndr
, r
);
4213 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4217 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest2(ndr
, NDR_BUFFERS
, &r
->req2
));
4221 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4224 return NDR_ERR_SUCCESS
;
4227 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAddRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaAddRequest
*r
)
4231 level
= ndr_pull_get_switch_value(ndr
, r
);
4232 if (ndr_flags
& NDR_SCALARS
) {
4233 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
4234 if (_level
!= level
) {
4235 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4237 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
4240 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4244 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest2(ndr
, NDR_SCALARS
, &r
->req2
));
4248 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4251 if (ndr_flags
& NDR_BUFFERS
) {
4254 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4258 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest2(ndr
, NDR_BUFFERS
, &r
->req2
));
4262 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4265 return NDR_ERR_SUCCESS
;
4268 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAddRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaAddRequest
*r
)
4271 level
= ndr_print_get_switch_value(ndr
, r
);
4272 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaAddRequest");
4275 ndr_print_drsuapi_DsReplicaAddRequest1(ndr
, "req1", &r
->req1
);
4279 ndr_print_drsuapi_DsReplicaAddRequest2(ndr
, "req2", &r
->req2
);
4283 ndr_print_bad_level(ndr
, name
, level
);
4287 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaDeleteOptions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
4289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4290 return NDR_ERR_SUCCESS
;
4293 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaDeleteOptions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
4296 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4298 return NDR_ERR_SUCCESS
;
4301 _PUBLIC_
void ndr_print_drsuapi_DsReplicaDeleteOptions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
4303 ndr_print_uint32(ndr
, name
, r
);
4305 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION
, r
);
4306 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_WRITEABLE", DRSUAPI_DS_REPLICA_ADD_WRITEABLE
, r
);
4310 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaDelRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaDelRequest1
*r
)
4312 if (ndr_flags
& NDR_SCALARS
) {
4313 NDR_CHECK(ndr_push_align(ndr
, 5));
4314 if (r
->naming_context
== NULL
) {
4315 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4317 NDR_CHECK(ndr_push_ref_ptr(ndr
));
4318 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dsa_address
));
4319 NDR_CHECK(ndr_push_drsuapi_DsReplicaDeleteOptions(ndr
, NDR_SCALARS
, r
->options
));
4320 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4322 if (ndr_flags
& NDR_BUFFERS
) {
4323 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
4324 if (r
->source_dsa_address
) {
4325 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
)));
4326 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4327 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
)));
4328 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
));
4331 return NDR_ERR_SUCCESS
;
4334 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaDelRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaDelRequest1
*r
)
4336 uint32_t _ptr_naming_context
;
4337 TALLOC_CTX
*_mem_save_naming_context_0
;
4338 uint32_t _ptr_source_dsa_address
;
4339 TALLOC_CTX
*_mem_save_source_dsa_address_0
;
4340 if (ndr_flags
& NDR_SCALARS
) {
4341 NDR_CHECK(ndr_pull_align(ndr
, 5));
4342 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
4343 if (_ptr_naming_context
) {
4344 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
4346 r
->naming_context
= NULL
;
4348 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dsa_address
));
4349 if (_ptr_source_dsa_address
) {
4350 NDR_PULL_ALLOC(ndr
, r
->source_dsa_address
);
4352 r
->source_dsa_address
= NULL
;
4354 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDeleteOptions(ndr
, NDR_SCALARS
, &r
->options
));
4355 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4357 if (ndr_flags
& NDR_BUFFERS
) {
4358 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4359 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
4360 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
4361 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
4362 if (r
->source_dsa_address
) {
4363 _mem_save_source_dsa_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4364 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dsa_address
, 0);
4365 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->source_dsa_address
));
4366 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->source_dsa_address
));
4367 if (ndr_get_array_length(ndr
, &r
->source_dsa_address
) > ndr_get_array_size(ndr
, &r
->source_dsa_address
)) {
4368 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
));
4370 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->source_dsa_address
), sizeof(uint16_t)));
4371 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
));
4372 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dsa_address_0
, 0);
4375 return NDR_ERR_SUCCESS
;
4378 _PUBLIC_
void ndr_print_drsuapi_DsReplicaDelRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaDelRequest1
*r
)
4380 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaDelRequest1");
4382 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
4384 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
4386 ndr_print_ptr(ndr
, "source_dsa_address", r
->source_dsa_address
);
4388 if (r
->source_dsa_address
) {
4389 ndr_print_string(ndr
, "source_dsa_address", r
->source_dsa_address
);
4392 ndr_print_drsuapi_DsReplicaDeleteOptions(ndr
, "options", r
->options
);
4396 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaDelRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaDelRequest
*r
)
4398 if (ndr_flags
& NDR_SCALARS
) {
4399 int level
= ndr_push_get_switch_value(ndr
, r
);
4400 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
4401 NDR_CHECK(ndr_push_union_align(ndr
, 5));
4404 NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4408 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4411 if (ndr_flags
& NDR_BUFFERS
) {
4412 int level
= ndr_push_get_switch_value(ndr
, r
);
4415 NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4419 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4422 return NDR_ERR_SUCCESS
;
4425 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaDelRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaDelRequest
*r
)
4429 level
= ndr_pull_get_switch_value(ndr
, r
);
4430 if (ndr_flags
& NDR_SCALARS
) {
4431 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
4432 if (_level
!= level
) {
4433 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4435 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
4438 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4442 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4445 if (ndr_flags
& NDR_BUFFERS
) {
4448 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4452 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4455 return NDR_ERR_SUCCESS
;
4458 _PUBLIC_
void ndr_print_drsuapi_DsReplicaDelRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaDelRequest
*r
)
4461 level
= ndr_print_get_switch_value(ndr
, r
);
4462 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaDelRequest");
4465 ndr_print_drsuapi_DsReplicaDelRequest1(ndr
, "req1", &r
->req1
);
4469 ndr_print_bad_level(ndr
, name
, level
);
4473 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaModifyOptions(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
4475 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4476 return NDR_ERR_SUCCESS
;
4479 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaModifyOptions(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
4482 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4484 return NDR_ERR_SUCCESS
;
4487 _PUBLIC_
void ndr_print_drsuapi_DsReplicaModifyOptions(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
4489 ndr_print_uint32(ndr
, name
, r
);
4491 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION
, r
);
4492 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_WRITEABLE", DRSUAPI_DS_REPLICA_ADD_WRITEABLE
, r
);
4496 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaModRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaModRequest1
*r
)
4498 if (ndr_flags
& NDR_SCALARS
) {
4499 NDR_CHECK(ndr_push_align(ndr
, 5));
4500 if (r
->naming_context
== NULL
) {
4501 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4503 NDR_CHECK(ndr_push_ref_ptr(ndr
));
4504 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dra
));
4505 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dra_address
));
4506 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->schedule
, 84));
4507 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->replica_flags
));
4508 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->modify_fields
));
4509 NDR_CHECK(ndr_push_drsuapi_DsReplicaModifyOptions(ndr
, NDR_SCALARS
, r
->options
));
4510 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4512 if (ndr_flags
& NDR_BUFFERS
) {
4513 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
4514 if (r
->source_dra_address
) {
4515 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dra_address
, CH_UTF16
)));
4516 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4517 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dra_address
, CH_UTF16
)));
4518 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->source_dra_address
, ndr_charset_length(r
->source_dra_address
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4521 return NDR_ERR_SUCCESS
;
4524 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaModRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaModRequest1
*r
)
4526 uint32_t _ptr_naming_context
;
4527 TALLOC_CTX
*_mem_save_naming_context_0
;
4528 uint32_t _ptr_source_dra_address
;
4529 TALLOC_CTX
*_mem_save_source_dra_address_0
;
4530 if (ndr_flags
& NDR_SCALARS
) {
4531 NDR_CHECK(ndr_pull_align(ndr
, 5));
4532 NDR_CHECK(ndr_pull_ref_ptr(ndr
, &_ptr_naming_context
));
4533 if (_ptr_naming_context
) {
4534 NDR_PULL_ALLOC(ndr
, r
->naming_context
);
4536 r
->naming_context
= NULL
;
4538 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dra
));
4539 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dra_address
));
4540 if (_ptr_source_dra_address
) {
4541 NDR_PULL_ALLOC(ndr
, r
->source_dra_address
);
4543 r
->source_dra_address
= NULL
;
4545 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->schedule
, 84));
4546 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->replica_flags
));
4547 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->modify_fields
));
4548 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModifyOptions(ndr
, NDR_SCALARS
, &r
->options
));
4549 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4551 if (ndr_flags
& NDR_BUFFERS
) {
4552 _mem_save_naming_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4553 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context
, 0);
4554 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->naming_context
));
4555 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_0
, 0);
4556 if (r
->source_dra_address
) {
4557 _mem_save_source_dra_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4558 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dra_address
, 0);
4559 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->source_dra_address
));
4560 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->source_dra_address
));
4561 if (ndr_get_array_length(ndr
, &r
->source_dra_address
) > ndr_get_array_size(ndr
, &r
->source_dra_address
)) {
4562 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_dra_address
), ndr_get_array_length(ndr
, &r
->source_dra_address
));
4564 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->source_dra_address
), sizeof(uint16_t)));
4565 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->source_dra_address
, ndr_get_array_length(ndr
, &r
->source_dra_address
), sizeof(uint16_t), CH_UTF16
));
4566 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dra_address_0
, 0);
4569 return NDR_ERR_SUCCESS
;
4572 _PUBLIC_
void ndr_print_drsuapi_DsReplicaModRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaModRequest1
*r
)
4574 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaModRequest1");
4576 ndr_print_ptr(ndr
, "naming_context", r
->naming_context
);
4578 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "naming_context", r
->naming_context
);
4580 ndr_print_GUID(ndr
, "source_dra", &r
->source_dra
);
4581 ndr_print_ptr(ndr
, "source_dra_address", r
->source_dra_address
);
4583 if (r
->source_dra_address
) {
4584 ndr_print_string(ndr
, "source_dra_address", r
->source_dra_address
);
4587 ndr_print_array_uint8(ndr
, "schedule", r
->schedule
, 84);
4588 ndr_print_uint32(ndr
, "replica_flags", r
->replica_flags
);
4589 ndr_print_uint32(ndr
, "modify_fields", r
->modify_fields
);
4590 ndr_print_drsuapi_DsReplicaModifyOptions(ndr
, "options", r
->options
);
4594 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaModRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaModRequest
*r
)
4596 if (ndr_flags
& NDR_SCALARS
) {
4597 int level
= ndr_push_get_switch_value(ndr
, r
);
4598 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
4599 NDR_CHECK(ndr_push_union_align(ndr
, 5));
4602 NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4606 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4609 if (ndr_flags
& NDR_BUFFERS
) {
4610 int level
= ndr_push_get_switch_value(ndr
, r
);
4613 NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4617 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4620 return NDR_ERR_SUCCESS
;
4623 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaModRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaModRequest
*r
)
4627 level
= ndr_pull_get_switch_value(ndr
, r
);
4628 if (ndr_flags
& NDR_SCALARS
) {
4629 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
4630 if (_level
!= level
) {
4631 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4633 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
4636 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
4640 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4643 if (ndr_flags
& NDR_BUFFERS
) {
4646 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
4650 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4653 return NDR_ERR_SUCCESS
;
4656 _PUBLIC_
void ndr_print_drsuapi_DsReplicaModRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaModRequest
*r
)
4659 level
= ndr_print_get_switch_value(ndr
, r
);
4660 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaModRequest");
4663 ndr_print_drsuapi_DsReplicaModRequest1(ndr
, "req1", &r
->req1
);
4667 ndr_print_bad_level(ndr
, name
, level
);
4671 static enum ndr_err_code
ndr_push_drsuapi_DsMembershipType(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsMembershipType r
)
4673 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
4674 return NDR_ERR_SUCCESS
;
4677 static enum ndr_err_code
ndr_pull_drsuapi_DsMembershipType(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsMembershipType
*r
)
4680 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
4682 return NDR_ERR_SUCCESS
;
4685 _PUBLIC_
void ndr_print_drsuapi_DsMembershipType(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsMembershipType r
)
4687 const char *val
= NULL
;
4690 case DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS"; break;
4691 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS"; break;
4692 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS"; break;
4693 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2"; break;
4694 case DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS"; break;
4695 case DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS"; break;
4696 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2
: val
= "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2"; break;
4698 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4701 static enum ndr_err_code
ndr_push_drsuapi_DsGetMembershipsCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetMembershipsCtr1
*r
)
4703 uint32_t cntr_info_array_1
;
4704 uint32_t cntr_group_attrs_1
;
4705 uint32_t cntr_sids_1
;
4706 if (ndr_flags
& NDR_SCALARS
) {
4707 NDR_CHECK(ndr_push_align(ndr
, 5));
4708 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->status
));
4709 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_memberships
));
4710 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sids
));
4711 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info_array
));
4712 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->group_attrs
));
4713 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
4714 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4716 if (ndr_flags
& NDR_BUFFERS
) {
4717 if (r
->info_array
) {
4718 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_memberships
));
4719 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->num_memberships
; cntr_info_array_1
++) {
4720 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info_array
[cntr_info_array_1
]));
4722 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->num_memberships
; cntr_info_array_1
++) {
4723 if (r
->info_array
[cntr_info_array_1
]) {
4724 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info_array
[cntr_info_array_1
]));
4728 if (r
->group_attrs
) {
4729 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_memberships
));
4730 for (cntr_group_attrs_1
= 0; cntr_group_attrs_1
< r
->num_memberships
; cntr_group_attrs_1
++) {
4731 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->group_attrs
[cntr_group_attrs_1
]));
4735 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_sids
));
4736 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
4737 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
[cntr_sids_1
]));
4739 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
4740 if (r
->sids
[cntr_sids_1
]) {
4741 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sids
[cntr_sids_1
]));
4746 return NDR_ERR_SUCCESS
;
4749 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMembershipsCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetMembershipsCtr1
*r
)
4751 uint32_t _ptr_info_array
;
4752 uint32_t cntr_info_array_1
;
4753 TALLOC_CTX
*_mem_save_info_array_0
;
4754 TALLOC_CTX
*_mem_save_info_array_1
;
4755 TALLOC_CTX
*_mem_save_info_array_2
;
4756 uint32_t _ptr_group_attrs
;
4757 uint32_t cntr_group_attrs_1
;
4758 TALLOC_CTX
*_mem_save_group_attrs_0
;
4759 TALLOC_CTX
*_mem_save_group_attrs_1
;
4761 uint32_t cntr_sids_1
;
4762 TALLOC_CTX
*_mem_save_sids_0
;
4763 TALLOC_CTX
*_mem_save_sids_1
;
4764 TALLOC_CTX
*_mem_save_sids_2
;
4765 if (ndr_flags
& NDR_SCALARS
) {
4766 NDR_CHECK(ndr_pull_align(ndr
, 5));
4767 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->status
));
4768 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_memberships
));
4769 if (r
->num_memberships
> 10000) {
4770 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4772 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_sids
));
4773 if (r
->num_sids
> 10000) {
4774 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4776 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info_array
));
4777 if (_ptr_info_array
) {
4778 NDR_PULL_ALLOC(ndr
, r
->info_array
);
4780 r
->info_array
= NULL
;
4782 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_group_attrs
));
4783 if (_ptr_group_attrs
) {
4784 NDR_PULL_ALLOC(ndr
, r
->group_attrs
);
4786 r
->group_attrs
= NULL
;
4788 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
4790 NDR_PULL_ALLOC(ndr
, r
->sids
);
4794 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4796 if (ndr_flags
& NDR_BUFFERS
) {
4797 if (r
->info_array
) {
4798 _mem_save_info_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4799 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
, 0);
4800 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->info_array
));
4801 NDR_PULL_ALLOC_N(ndr
, r
->info_array
, ndr_get_array_size(ndr
, &r
->info_array
));
4802 _mem_save_info_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4803 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
, 0);
4804 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->num_memberships
; cntr_info_array_1
++) {
4805 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info_array
));
4806 if (_ptr_info_array
) {
4807 NDR_PULL_ALLOC(ndr
, r
->info_array
[cntr_info_array_1
]);
4809 r
->info_array
[cntr_info_array_1
] = NULL
;
4812 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->num_memberships
; cntr_info_array_1
++) {
4813 if (r
->info_array
[cntr_info_array_1
]) {
4814 _mem_save_info_array_2
= NDR_PULL_GET_MEM_CTX(ndr
);
4815 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
[cntr_info_array_1
], 0);
4816 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info_array
[cntr_info_array_1
]));
4817 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_2
, 0);
4820 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_1
, 0);
4821 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_0
, 0);
4823 if (r
->group_attrs
) {
4824 _mem_save_group_attrs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4825 NDR_PULL_SET_MEM_CTX(ndr
, r
->group_attrs
, 0);
4826 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->group_attrs
));
4827 NDR_PULL_ALLOC_N(ndr
, r
->group_attrs
, ndr_get_array_size(ndr
, &r
->group_attrs
));
4828 _mem_save_group_attrs_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4829 NDR_PULL_SET_MEM_CTX(ndr
, r
->group_attrs
, 0);
4830 for (cntr_group_attrs_1
= 0; cntr_group_attrs_1
< r
->num_memberships
; cntr_group_attrs_1
++) {
4831 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->group_attrs
[cntr_group_attrs_1
]));
4833 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_attrs_1
, 0);
4834 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_attrs_0
, 0);
4837 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4838 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4839 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
4840 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
4841 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4842 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4843 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
4844 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
4846 NDR_PULL_ALLOC(ndr
, r
->sids
[cntr_sids_1
]);
4848 r
->sids
[cntr_sids_1
] = NULL
;
4851 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
4852 if (r
->sids
[cntr_sids_1
]) {
4853 _mem_save_sids_2
= NDR_PULL_GET_MEM_CTX(ndr
);
4854 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
[cntr_sids_1
], 0);
4855 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sids
[cntr_sids_1
]));
4856 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_2
, 0);
4859 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
4860 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
4862 if (r
->info_array
) {
4863 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->info_array
, r
->num_memberships
));
4865 if (r
->group_attrs
) {
4866 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->group_attrs
, r
->num_memberships
));
4869 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->num_sids
));
4872 return NDR_ERR_SUCCESS
;
4875 _PUBLIC_
void ndr_print_drsuapi_DsGetMembershipsCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetMembershipsCtr1
*r
)
4877 uint32_t cntr_info_array_1
;
4878 uint32_t cntr_group_attrs_1
;
4879 uint32_t cntr_sids_1
;
4880 ndr_print_struct(ndr
, name
, "drsuapi_DsGetMembershipsCtr1");
4882 ndr_print_NTSTATUS(ndr
, "status", r
->status
);
4883 ndr_print_uint32(ndr
, "num_memberships", r
->num_memberships
);
4884 ndr_print_uint32(ndr
, "num_sids", r
->num_sids
);
4885 ndr_print_ptr(ndr
, "info_array", r
->info_array
);
4887 if (r
->info_array
) {
4888 ndr
->print(ndr
, "%s: ARRAY(%d)", "info_array", (int)r
->num_memberships
);
4890 for (cntr_info_array_1
=0;cntr_info_array_1
<r
->num_memberships
;cntr_info_array_1
++) {
4892 if (asprintf(&idx_1
, "[%d]", cntr_info_array_1
) != -1) {
4893 ndr_print_ptr(ndr
, "info_array", r
->info_array
[cntr_info_array_1
]);
4895 if (r
->info_array
[cntr_info_array_1
]) {
4896 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "info_array", r
->info_array
[cntr_info_array_1
]);
4905 ndr_print_ptr(ndr
, "group_attrs", r
->group_attrs
);
4907 if (r
->group_attrs
) {
4908 ndr
->print(ndr
, "%s: ARRAY(%d)", "group_attrs", (int)r
->num_memberships
);
4910 for (cntr_group_attrs_1
=0;cntr_group_attrs_1
<r
->num_memberships
;cntr_group_attrs_1
++) {
4912 if (asprintf(&idx_1
, "[%d]", cntr_group_attrs_1
) != -1) {
4913 ndr_print_samr_GroupAttrs(ndr
, "group_attrs", r
->group_attrs
[cntr_group_attrs_1
]);
4920 ndr_print_ptr(ndr
, "sids", r
->sids
);
4923 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->num_sids
);
4925 for (cntr_sids_1
=0;cntr_sids_1
<r
->num_sids
;cntr_sids_1
++) {
4927 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
4928 ndr_print_ptr(ndr
, "sids", r
->sids
[cntr_sids_1
]);
4930 if (r
->sids
[cntr_sids_1
]) {
4931 ndr_print_dom_sid28(ndr
, "sids", r
->sids
[cntr_sids_1
]);
4943 static enum ndr_err_code
ndr_push_drsuapi_DsGetMembershipsCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetMembershipsCtr
*r
)
4945 if (ndr_flags
& NDR_SCALARS
) {
4946 int level
= ndr_push_get_switch_value(ndr
, r
);
4947 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
4948 NDR_CHECK(ndr_push_union_align(ndr
, 5));
4951 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
4955 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4958 if (ndr_flags
& NDR_BUFFERS
) {
4959 int level
= ndr_push_get_switch_value(ndr
, r
);
4962 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
4966 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4969 return NDR_ERR_SUCCESS
;
4972 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMembershipsCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetMembershipsCtr
*r
)
4976 level
= ndr_pull_get_switch_value(ndr
, r
);
4977 if (ndr_flags
& NDR_SCALARS
) {
4978 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
4979 if (_level
!= level
) {
4980 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4982 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
4985 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
4989 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4992 if (ndr_flags
& NDR_BUFFERS
) {
4995 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
4999 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5002 return NDR_ERR_SUCCESS
;
5005 _PUBLIC_
void ndr_print_drsuapi_DsGetMembershipsCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetMembershipsCtr
*r
)
5008 level
= ndr_print_get_switch_value(ndr
, r
);
5009 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetMembershipsCtr");
5012 ndr_print_drsuapi_DsGetMembershipsCtr1(ndr
, "ctr1", &r
->ctr1
);
5016 ndr_print_bad_level(ndr
, name
, level
);
5020 static enum ndr_err_code
ndr_push_drsuapi_DsGetMembershipsRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetMembershipsRequest1
*r
)
5022 uint32_t cntr_info_array_1
;
5023 if (ndr_flags
& NDR_SCALARS
) {
5024 NDR_CHECK(ndr_push_align(ndr
, 5));
5025 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5026 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info_array
));
5027 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
5028 NDR_CHECK(ndr_push_drsuapi_DsMembershipType(ndr
, NDR_SCALARS
, r
->type
));
5029 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain
));
5030 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
5032 if (ndr_flags
& NDR_BUFFERS
) {
5033 if (r
->info_array
) {
5034 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
5035 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->count
; cntr_info_array_1
++) {
5036 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info_array
[cntr_info_array_1
]));
5038 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->count
; cntr_info_array_1
++) {
5039 if (r
->info_array
[cntr_info_array_1
]) {
5040 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info_array
[cntr_info_array_1
]));
5045 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain
));
5048 return NDR_ERR_SUCCESS
;
5051 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMembershipsRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetMembershipsRequest1
*r
)
5053 uint32_t _ptr_info_array
;
5054 uint32_t cntr_info_array_1
;
5055 TALLOC_CTX
*_mem_save_info_array_0
;
5056 TALLOC_CTX
*_mem_save_info_array_1
;
5057 TALLOC_CTX
*_mem_save_info_array_2
;
5058 uint32_t _ptr_domain
;
5059 TALLOC_CTX
*_mem_save_domain_0
;
5060 if (ndr_flags
& NDR_SCALARS
) {
5061 NDR_CHECK(ndr_pull_align(ndr
, 5));
5062 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
5063 if (r
->count
< 1 || r
->count
> 10000) {
5064 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5066 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info_array
));
5067 if (_ptr_info_array
) {
5068 NDR_PULL_ALLOC(ndr
, r
->info_array
);
5070 r
->info_array
= NULL
;
5072 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
5073 NDR_CHECK(ndr_pull_drsuapi_DsMembershipType(ndr
, NDR_SCALARS
, &r
->type
));
5074 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain
));
5076 NDR_PULL_ALLOC(ndr
, r
->domain
);
5080 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
5082 if (ndr_flags
& NDR_BUFFERS
) {
5083 if (r
->info_array
) {
5084 _mem_save_info_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5085 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
, 0);
5086 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->info_array
));
5087 NDR_PULL_ALLOC_N(ndr
, r
->info_array
, ndr_get_array_size(ndr
, &r
->info_array
));
5088 _mem_save_info_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5089 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
, 0);
5090 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->count
; cntr_info_array_1
++) {
5091 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info_array
));
5092 if (_ptr_info_array
) {
5093 NDR_PULL_ALLOC(ndr
, r
->info_array
[cntr_info_array_1
]);
5095 r
->info_array
[cntr_info_array_1
] = NULL
;
5098 for (cntr_info_array_1
= 0; cntr_info_array_1
< r
->count
; cntr_info_array_1
++) {
5099 if (r
->info_array
[cntr_info_array_1
]) {
5100 _mem_save_info_array_2
= NDR_PULL_GET_MEM_CTX(ndr
);
5101 NDR_PULL_SET_MEM_CTX(ndr
, r
->info_array
[cntr_info_array_1
], 0);
5102 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info_array
[cntr_info_array_1
]));
5103 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_2
, 0);
5106 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_1
, 0);
5107 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_array_0
, 0);
5110 _mem_save_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5111 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain
, 0);
5112 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain
));
5113 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_0
, 0);
5115 if (r
->info_array
) {
5116 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->info_array
, r
->count
));
5119 return NDR_ERR_SUCCESS
;
5122 _PUBLIC_
void ndr_print_drsuapi_DsGetMembershipsRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetMembershipsRequest1
*r
)
5124 uint32_t cntr_info_array_1
;
5125 ndr_print_struct(ndr
, name
, "drsuapi_DsGetMembershipsRequest1");
5127 ndr_print_uint32(ndr
, "count", r
->count
);
5128 ndr_print_ptr(ndr
, "info_array", r
->info_array
);
5130 if (r
->info_array
) {
5131 ndr
->print(ndr
, "%s: ARRAY(%d)", "info_array", (int)r
->count
);
5133 for (cntr_info_array_1
=0;cntr_info_array_1
<r
->count
;cntr_info_array_1
++) {
5135 if (asprintf(&idx_1
, "[%d]", cntr_info_array_1
) != -1) {
5136 ndr_print_ptr(ndr
, "info_array", r
->info_array
[cntr_info_array_1
]);
5138 if (r
->info_array
[cntr_info_array_1
]) {
5139 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "info_array", r
->info_array
[cntr_info_array_1
]);
5148 ndr_print_uint32(ndr
, "flags", r
->flags
);
5149 ndr_print_drsuapi_DsMembershipType(ndr
, "type", r
->type
);
5150 ndr_print_ptr(ndr
, "domain", r
->domain
);
5153 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "domain", r
->domain
);
5159 static enum ndr_err_code
ndr_push_drsuapi_DsGetMembershipsRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetMembershipsRequest
*r
)
5161 if (ndr_flags
& NDR_SCALARS
) {
5162 int level
= ndr_push_get_switch_value(ndr
, r
);
5163 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
5164 NDR_CHECK(ndr_push_union_align(ndr
, 5));
5167 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5171 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5174 if (ndr_flags
& NDR_BUFFERS
) {
5175 int level
= ndr_push_get_switch_value(ndr
, r
);
5178 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5182 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5185 return NDR_ERR_SUCCESS
;
5188 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMembershipsRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetMembershipsRequest
*r
)
5192 level
= ndr_pull_get_switch_value(ndr
, r
);
5193 if (ndr_flags
& NDR_SCALARS
) {
5194 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
5195 if (_level
!= level
) {
5196 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
5198 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
5201 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5205 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5208 if (ndr_flags
& NDR_BUFFERS
) {
5211 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5215 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5218 return NDR_ERR_SUCCESS
;
5221 _PUBLIC_
void ndr_print_drsuapi_DsGetMembershipsRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetMembershipsRequest
*r
)
5224 level
= ndr_print_get_switch_value(ndr
, r
);
5225 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetMembershipsRequest");
5228 ndr_print_drsuapi_DsGetMembershipsRequest1(ndr
, "req1", &r
->req1
);
5232 ndr_print_bad_level(ndr
, name
, level
);
5236 static enum ndr_err_code
ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNT4ChangeLogRequest1
*r
)
5238 if (ndr_flags
& NDR_SCALARS
) {
5239 NDR_CHECK(ndr_push_align(ndr
, 5));
5240 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
5241 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
5242 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
5243 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
5244 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
5246 if (ndr_flags
& NDR_BUFFERS
) {
5248 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->length
));
5249 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
5252 return NDR_ERR_SUCCESS
;
5255 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNT4ChangeLogRequest1
*r
)
5258 TALLOC_CTX
*_mem_save_data_0
;
5259 if (ndr_flags
& NDR_SCALARS
) {
5260 NDR_CHECK(ndr_pull_align(ndr
, 5));
5261 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
5262 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
5263 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
5264 if (r
->length
> 0x00A00000) {
5265 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5267 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
5269 NDR_PULL_ALLOC(ndr
, r
->data
);
5273 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
5275 if (ndr_flags
& NDR_BUFFERS
) {
5277 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5278 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
5279 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
5280 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
5281 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
5282 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
5285 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
5288 return NDR_ERR_SUCCESS
;
5291 _PUBLIC_
void ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNT4ChangeLogRequest1
*r
)
5293 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNT4ChangeLogRequest1");
5295 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
5296 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
5297 ndr_print_uint32(ndr
, "length", r
->length
);
5298 ndr_print_ptr(ndr
, "data", r
->data
);
5301 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
5307 static enum ndr_err_code
ndr_push_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetNT4ChangeLogRequest
*r
)
5309 if (ndr_flags
& NDR_SCALARS
) {
5310 int level
= ndr_push_get_switch_value(ndr
, r
);
5311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
5312 NDR_CHECK(ndr_push_union_align(ndr
, 5));
5315 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5319 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5322 if (ndr_flags
& NDR_BUFFERS
) {
5323 int level
= ndr_push_get_switch_value(ndr
, r
);
5326 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5330 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5333 return NDR_ERR_SUCCESS
;
5336 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetNT4ChangeLogRequest
*r
)
5340 level
= ndr_pull_get_switch_value(ndr
, r
);
5341 if (ndr_flags
& NDR_SCALARS
) {
5342 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
5343 if (_level
!= level
) {
5344 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
5346 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
5349 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5353 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5356 if (ndr_flags
& NDR_BUFFERS
) {
5359 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5363 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5366 return NDR_ERR_SUCCESS
;
5369 _PUBLIC_
void ndr_print_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetNT4ChangeLogRequest
*r
)
5372 level
= ndr_print_get_switch_value(ndr
, r
);
5373 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetNT4ChangeLogRequest");
5376 ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(ndr
, "req1", &r
->req1
);
5380 ndr_print_bad_level(ndr
, name
, level
);
5384 static enum ndr_err_code
ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetNT4ChangeLogInfo1
*r
)
5386 if (ndr_flags
& NDR_SCALARS
) {
5387 NDR_CHECK(ndr_push_align(ndr
, 8));
5388 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length1
));
5389 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length2
));
5390 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown1
));
5391 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->time2
));
5392 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown3
));
5393 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->time4
));
5394 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown5
));
5395 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->time6
));
5396 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->status
));
5397 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data1
));
5398 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data2
));
5399 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
5401 if (ndr_flags
& NDR_BUFFERS
) {
5403 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->length1
));
5404 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data1
, r
->length1
));
5407 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->length2
));
5408 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data2
, r
->length2
));
5411 return NDR_ERR_SUCCESS
;
5414 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetNT4ChangeLogInfo1
*r
)
5416 uint32_t _ptr_data1
;
5417 TALLOC_CTX
*_mem_save_data1_0
;
5418 uint32_t _ptr_data2
;
5419 TALLOC_CTX
*_mem_save_data2_0
;
5420 if (ndr_flags
& NDR_SCALARS
) {
5421 NDR_CHECK(ndr_pull_align(ndr
, 8));
5422 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length1
));
5423 if (r
->length1
> 0x00A00000) {
5424 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5426 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length2
));
5427 if (r
->length2
> 0x00A00000) {
5428 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5430 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown1
));
5431 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->time2
));
5432 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown3
));
5433 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->time4
));
5434 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown5
));
5435 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->time6
));
5436 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->status
));
5437 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data1
));
5439 NDR_PULL_ALLOC(ndr
, r
->data1
);
5443 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data2
));
5445 NDR_PULL_ALLOC(ndr
, r
->data2
);
5449 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
5451 if (ndr_flags
& NDR_BUFFERS
) {
5453 _mem_save_data1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5454 NDR_PULL_SET_MEM_CTX(ndr
, r
->data1
, 0);
5455 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data1
));
5456 NDR_PULL_ALLOC_N(ndr
, r
->data1
, ndr_get_array_size(ndr
, &r
->data1
));
5457 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data1
, ndr_get_array_size(ndr
, &r
->data1
)));
5458 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data1_0
, 0);
5461 _mem_save_data2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5462 NDR_PULL_SET_MEM_CTX(ndr
, r
->data2
, 0);
5463 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data2
));
5464 NDR_PULL_ALLOC_N(ndr
, r
->data2
, ndr_get_array_size(ndr
, &r
->data2
));
5465 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data2
, ndr_get_array_size(ndr
, &r
->data2
)));
5466 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data2_0
, 0);
5469 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data1
, r
->length1
));
5472 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data2
, r
->length2
));
5475 return NDR_ERR_SUCCESS
;
5478 _PUBLIC_
void ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetNT4ChangeLogInfo1
*r
)
5480 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNT4ChangeLogInfo1");
5482 ndr_print_uint32(ndr
, "length1", r
->length1
);
5483 ndr_print_uint32(ndr
, "length2", r
->length2
);
5484 ndr_print_hyper(ndr
, "unknown1", r
->unknown1
);
5485 ndr_print_NTTIME(ndr
, "time2", r
->time2
);
5486 ndr_print_hyper(ndr
, "unknown3", r
->unknown3
);
5487 ndr_print_NTTIME(ndr
, "time4", r
->time4
);
5488 ndr_print_hyper(ndr
, "unknown5", r
->unknown5
);
5489 ndr_print_NTTIME(ndr
, "time6", r
->time6
);
5490 ndr_print_NTSTATUS(ndr
, "status", r
->status
);
5491 ndr_print_ptr(ndr
, "data1", r
->data1
);
5494 ndr_print_array_uint8(ndr
, "data1", r
->data1
, r
->length1
);
5497 ndr_print_ptr(ndr
, "data2", r
->data2
);
5500 ndr_print_array_uint8(ndr
, "data2", r
->data2
, r
->length2
);
5506 static enum ndr_err_code
ndr_push_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetNT4ChangeLogInfo
*r
)
5508 if (ndr_flags
& NDR_SCALARS
) {
5509 int level
= ndr_push_get_switch_value(ndr
, r
);
5510 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
5511 NDR_CHECK(ndr_push_union_align(ndr
, 8));
5514 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
5518 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5521 if (ndr_flags
& NDR_BUFFERS
) {
5522 int level
= ndr_push_get_switch_value(ndr
, r
);
5525 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
5529 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5532 return NDR_ERR_SUCCESS
;
5535 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetNT4ChangeLogInfo
*r
)
5539 level
= ndr_pull_get_switch_value(ndr
, r
);
5540 if (ndr_flags
& NDR_SCALARS
) {
5541 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
5542 if (_level
!= level
) {
5543 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
5545 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
5548 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
5552 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5555 if (ndr_flags
& NDR_BUFFERS
) {
5558 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
5562 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5565 return NDR_ERR_SUCCESS
;
5568 _PUBLIC_
void ndr_print_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetNT4ChangeLogInfo
*r
)
5571 level
= ndr_print_get_switch_value(ndr
, r
);
5572 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetNT4ChangeLogInfo");
5575 ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(ndr
, "info1", &r
->info1
);
5579 ndr_print_bad_level(ndr
, name
, level
);
5583 static enum ndr_err_code
ndr_push_drsuapi_DsNameStatus(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsNameStatus r
)
5585 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
5586 return NDR_ERR_SUCCESS
;
5589 static enum ndr_err_code
ndr_pull_drsuapi_DsNameStatus(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsNameStatus
*r
)
5592 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
5594 return NDR_ERR_SUCCESS
;
5597 _PUBLIC_
void ndr_print_drsuapi_DsNameStatus(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsNameStatus r
)
5599 const char *val
= NULL
;
5602 case DRSUAPI_DS_NAME_STATUS_OK
: val
= "DRSUAPI_DS_NAME_STATUS_OK"; break;
5603 case DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR
: val
= "DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR"; break;
5604 case DRSUAPI_DS_NAME_STATUS_NOT_FOUND
: val
= "DRSUAPI_DS_NAME_STATUS_NOT_FOUND"; break;
5605 case DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE
: val
= "DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE"; break;
5606 case DRSUAPI_DS_NAME_STATUS_NO_MAPPING
: val
= "DRSUAPI_DS_NAME_STATUS_NO_MAPPING"; break;
5607 case DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY
: val
= "DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY"; break;
5608 case DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING
: val
= "DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING"; break;
5609 case DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL
: val
= "DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL"; break;
5611 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5614 static enum ndr_err_code
ndr_push_drsuapi_DsNameFlags(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsNameFlags r
)
5616 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
5617 return NDR_ERR_SUCCESS
;
5620 static enum ndr_err_code
ndr_pull_drsuapi_DsNameFlags(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsNameFlags
*r
)
5623 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
5625 return NDR_ERR_SUCCESS
;
5628 _PUBLIC_
void ndr_print_drsuapi_DsNameFlags(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsNameFlags r
)
5630 const char *val
= NULL
;
5633 case DRSUAPI_DS_NAME_FLAG_NO_FLAGS
: val
= "DRSUAPI_DS_NAME_FLAG_NO_FLAGS"; break;
5634 case DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY
: val
= "DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY"; break;
5635 case DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC
: val
= "DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC"; break;
5636 case DRSUAPI_DS_NAME_FLAG_GCVERIFY
: val
= "DRSUAPI_DS_NAME_FLAG_GCVERIFY"; break;
5637 case DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL
: val
= "DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL"; break;
5639 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5642 static enum ndr_err_code
ndr_push_drsuapi_DsNameFormat(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsNameFormat r
)
5644 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
5645 return NDR_ERR_SUCCESS
;
5648 static enum ndr_err_code
ndr_pull_drsuapi_DsNameFormat(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsNameFormat
*r
)
5651 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
5653 return NDR_ERR_SUCCESS
;
5656 _PUBLIC_
void ndr_print_drsuapi_DsNameFormat(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsNameFormat r
)
5658 const char *val
= NULL
;
5661 case DRSUAPI_DS_NAME_FORMAT_UNKNOWN
: val
= "DRSUAPI_DS_NAME_FORMAT_UNKNOWN"; break;
5662 case DRSUAPI_DS_NAME_FORMAT_FQDN_1779
: val
= "DRSUAPI_DS_NAME_FORMAT_FQDN_1779"; break;
5663 case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT
: val
= "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT"; break;
5664 case DRSUAPI_DS_NAME_FORMAT_DISPLAY
: val
= "DRSUAPI_DS_NAME_FORMAT_DISPLAY"; break;
5665 case DRSUAPI_DS_NAME_FORMAT_GUID
: val
= "DRSUAPI_DS_NAME_FORMAT_GUID"; break;
5666 case DRSUAPI_DS_NAME_FORMAT_CANONICAL
: val
= "DRSUAPI_DS_NAME_FORMAT_CANONICAL"; break;
5667 case DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL
: val
= "DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL"; break;
5668 case DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX
: val
= "DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX"; break;
5669 case DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL
: val
= "DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL"; break;
5670 case DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY
: val
= "DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY"; break;
5671 case DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN
: val
= "DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN"; break;
5673 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5676 static enum ndr_err_code
ndr_push_drsuapi_DsNameString(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsNameString
*r
)
5678 if (ndr_flags
& NDR_SCALARS
) {
5679 NDR_CHECK(ndr_push_align(ndr
, 5));
5680 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->str
));
5681 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
5683 if (ndr_flags
& NDR_BUFFERS
) {
5685 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->str
, CH_UTF16
)));
5686 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5687 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->str
, CH_UTF16
)));
5688 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->str
, ndr_charset_length(r
->str
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5691 return NDR_ERR_SUCCESS
;
5694 static enum ndr_err_code
ndr_pull_drsuapi_DsNameString(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsNameString
*r
)
5697 TALLOC_CTX
*_mem_save_str_0
;
5698 if (ndr_flags
& NDR_SCALARS
) {
5699 NDR_CHECK(ndr_pull_align(ndr
, 5));
5700 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_str
));
5702 NDR_PULL_ALLOC(ndr
, r
->str
);
5706 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
5708 if (ndr_flags
& NDR_BUFFERS
) {
5710 _mem_save_str_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5711 NDR_PULL_SET_MEM_CTX(ndr
, r
->str
, 0);
5712 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->str
));
5713 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->str
));
5714 if (ndr_get_array_length(ndr
, &r
->str
) > ndr_get_array_size(ndr
, &r
->str
)) {
5715 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
));
5717 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->str
), sizeof(uint16_t)));
5718 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->str
, ndr_get_array_length(ndr
, &r
->str
), sizeof(uint16_t), CH_UTF16
));
5719 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_str_0
, 0);
5722 return NDR_ERR_SUCCESS
;
5725 _PUBLIC_
void ndr_print_drsuapi_DsNameString(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsNameString
*r
)
5727 ndr_print_struct(ndr
, name
, "drsuapi_DsNameString");
5729 ndr_print_ptr(ndr
, "str", r
->str
);
5732 ndr_print_string(ndr
, "str", r
->str
);
5738 static enum ndr_err_code
ndr_push_drsuapi_DsNameRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsNameRequest1
*r
)
5740 uint32_t cntr_names_1
;
5741 if (ndr_flags
& NDR_SCALARS
) {
5742 NDR_CHECK(ndr_push_align(ndr
, 5));
5743 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->codepage
));
5744 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->language
));
5745 NDR_CHECK(ndr_push_drsuapi_DsNameFlags(ndr
, NDR_SCALARS
, r
->format_flags
));
5746 NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr
, NDR_SCALARS
, r
->format_offered
));
5747 NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr
, NDR_SCALARS
, r
->format_desired
));
5748 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5749 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
5750 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
5752 if (ndr_flags
& NDR_BUFFERS
) {
5754 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
5755 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
5756 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
5758 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
5759 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
5763 return NDR_ERR_SUCCESS
;
5766 static enum ndr_err_code
ndr_pull_drsuapi_DsNameRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsNameRequest1
*r
)
5768 uint32_t _ptr_names
;
5769 uint32_t cntr_names_1
;
5770 TALLOC_CTX
*_mem_save_names_0
;
5771 TALLOC_CTX
*_mem_save_names_1
;
5772 if (ndr_flags
& NDR_SCALARS
) {
5773 NDR_CHECK(ndr_pull_align(ndr
, 5));
5774 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->codepage
));
5775 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->language
));
5776 NDR_CHECK(ndr_pull_drsuapi_DsNameFlags(ndr
, NDR_SCALARS
, &r
->format_flags
));
5777 NDR_CHECK(ndr_pull_drsuapi_DsNameFormat(ndr
, NDR_SCALARS
, &r
->format_offered
));
5778 NDR_CHECK(ndr_pull_drsuapi_DsNameFormat(ndr
, NDR_SCALARS
, &r
->format_desired
));
5779 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
5780 if (r
->count
< 1 || r
->count
> 10000) {
5781 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5783 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
5785 NDR_PULL_ALLOC(ndr
, r
->names
);
5789 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
5791 if (ndr_flags
& NDR_BUFFERS
) {
5793 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5794 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
5795 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
5796 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
5797 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5798 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
5799 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
5800 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
5802 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
5803 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
5805 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
5806 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
5809 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
5812 return NDR_ERR_SUCCESS
;
5815 _PUBLIC_
void ndr_print_drsuapi_DsNameRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsNameRequest1
*r
)
5817 uint32_t cntr_names_1
;
5818 ndr_print_struct(ndr
, name
, "drsuapi_DsNameRequest1");
5820 ndr_print_uint32(ndr
, "codepage", r
->codepage
);
5821 ndr_print_uint32(ndr
, "language", r
->language
);
5822 ndr_print_drsuapi_DsNameFlags(ndr
, "format_flags", r
->format_flags
);
5823 ndr_print_drsuapi_DsNameFormat(ndr
, "format_offered", r
->format_offered
);
5824 ndr_print_drsuapi_DsNameFormat(ndr
, "format_desired", r
->format_desired
);
5825 ndr_print_uint32(ndr
, "count", r
->count
);
5826 ndr_print_ptr(ndr
, "names", r
->names
);
5829 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
5831 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
5833 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
5834 ndr_print_drsuapi_DsNameString(ndr
, "names", &r
->names
[cntr_names_1
]);
5844 static enum ndr_err_code
ndr_push_drsuapi_DsNameRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsNameRequest
*r
)
5846 if (ndr_flags
& NDR_SCALARS
) {
5847 int level
= ndr_push_get_switch_value(ndr
, r
);
5848 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
5849 NDR_CHECK(ndr_push_union_align(ndr
, 5));
5852 NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5856 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5859 if (ndr_flags
& NDR_BUFFERS
) {
5860 int level
= ndr_push_get_switch_value(ndr
, r
);
5863 NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5867 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5870 return NDR_ERR_SUCCESS
;
5873 static enum ndr_err_code
ndr_pull_drsuapi_DsNameRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsNameRequest
*r
)
5877 level
= ndr_pull_get_switch_value(ndr
, r
);
5878 if (ndr_flags
& NDR_SCALARS
) {
5879 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
5880 if (_level
!= level
) {
5881 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
5883 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
5886 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
5890 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5893 if (ndr_flags
& NDR_BUFFERS
) {
5896 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
5900 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5903 return NDR_ERR_SUCCESS
;
5906 _PUBLIC_
void ndr_print_drsuapi_DsNameRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsNameRequest
*r
)
5909 level
= ndr_print_get_switch_value(ndr
, r
);
5910 ndr_print_union(ndr
, name
, level
, "drsuapi_DsNameRequest");
5913 ndr_print_drsuapi_DsNameRequest1(ndr
, "req1", &r
->req1
);
5917 ndr_print_bad_level(ndr
, name
, level
);
5921 static enum ndr_err_code
ndr_push_drsuapi_DsNameInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsNameInfo1
*r
)
5923 if (ndr_flags
& NDR_SCALARS
) {
5924 NDR_CHECK(ndr_push_align(ndr
, 5));
5925 NDR_CHECK(ndr_push_drsuapi_DsNameStatus(ndr
, NDR_SCALARS
, r
->status
));
5926 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dns_domain_name
));
5927 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->result_name
));
5928 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
5930 if (ndr_flags
& NDR_BUFFERS
) {
5931 if (r
->dns_domain_name
) {
5932 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_domain_name
, CH_UTF16
)));
5933 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5934 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_domain_name
, CH_UTF16
)));
5935 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
));
5937 if (r
->result_name
) {
5938 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->result_name
, CH_UTF16
)));
5939 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5940 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->result_name
, CH_UTF16
)));
5941 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->result_name
, ndr_charset_length(r
->result_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5944 return NDR_ERR_SUCCESS
;
5947 static enum ndr_err_code
ndr_pull_drsuapi_DsNameInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsNameInfo1
*r
)
5949 uint32_t _ptr_dns_domain_name
;
5950 TALLOC_CTX
*_mem_save_dns_domain_name_0
;
5951 uint32_t _ptr_result_name
;
5952 TALLOC_CTX
*_mem_save_result_name_0
;
5953 if (ndr_flags
& NDR_SCALARS
) {
5954 NDR_CHECK(ndr_pull_align(ndr
, 5));
5955 NDR_CHECK(ndr_pull_drsuapi_DsNameStatus(ndr
, NDR_SCALARS
, &r
->status
));
5956 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_domain_name
));
5957 if (_ptr_dns_domain_name
) {
5958 NDR_PULL_ALLOC(ndr
, r
->dns_domain_name
);
5960 r
->dns_domain_name
= NULL
;
5962 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_result_name
));
5963 if (_ptr_result_name
) {
5964 NDR_PULL_ALLOC(ndr
, r
->result_name
);
5966 r
->result_name
= NULL
;
5968 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
5970 if (ndr_flags
& NDR_BUFFERS
) {
5971 if (r
->dns_domain_name
) {
5972 _mem_save_dns_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5973 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_domain_name
, 0);
5974 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dns_domain_name
));
5975 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dns_domain_name
));
5976 if (ndr_get_array_length(ndr
, &r
->dns_domain_name
) > ndr_get_array_size(ndr
, &r
->dns_domain_name
)) {
5977 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
));
5979 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dns_domain_name
), sizeof(uint16_t)));
5980 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
));
5981 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_domain_name_0
, 0);
5983 if (r
->result_name
) {
5984 _mem_save_result_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5985 NDR_PULL_SET_MEM_CTX(ndr
, r
->result_name
, 0);
5986 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->result_name
));
5987 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->result_name
));
5988 if (ndr_get_array_length(ndr
, &r
->result_name
) > ndr_get_array_size(ndr
, &r
->result_name
)) {
5989 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
));
5991 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->result_name
), sizeof(uint16_t)));
5992 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->result_name
, ndr_get_array_length(ndr
, &r
->result_name
), sizeof(uint16_t), CH_UTF16
));
5993 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_result_name_0
, 0);
5996 return NDR_ERR_SUCCESS
;
5999 _PUBLIC_
void ndr_print_drsuapi_DsNameInfo1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsNameInfo1
*r
)
6001 ndr_print_struct(ndr
, name
, "drsuapi_DsNameInfo1");
6003 ndr_print_drsuapi_DsNameStatus(ndr
, "status", r
->status
);
6004 ndr_print_ptr(ndr
, "dns_domain_name", r
->dns_domain_name
);
6006 if (r
->dns_domain_name
) {
6007 ndr_print_string(ndr
, "dns_domain_name", r
->dns_domain_name
);
6010 ndr_print_ptr(ndr
, "result_name", r
->result_name
);
6012 if (r
->result_name
) {
6013 ndr_print_string(ndr
, "result_name", r
->result_name
);
6019 static enum ndr_err_code
ndr_push_drsuapi_DsNameCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsNameCtr1
*r
)
6021 uint32_t cntr_array_1
;
6022 if (ndr_flags
& NDR_SCALARS
) {
6023 NDR_CHECK(ndr_push_align(ndr
, 5));
6024 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
6025 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
6026 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
6028 if (ndr_flags
& NDR_BUFFERS
) {
6030 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
6031 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6032 NDR_CHECK(ndr_push_drsuapi_DsNameInfo1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
6034 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6035 NDR_CHECK(ndr_push_drsuapi_DsNameInfo1(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
6039 return NDR_ERR_SUCCESS
;
6042 static enum ndr_err_code
ndr_pull_drsuapi_DsNameCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsNameCtr1
*r
)
6044 uint32_t _ptr_array
;
6045 uint32_t cntr_array_1
;
6046 TALLOC_CTX
*_mem_save_array_0
;
6047 TALLOC_CTX
*_mem_save_array_1
;
6048 if (ndr_flags
& NDR_SCALARS
) {
6049 NDR_CHECK(ndr_pull_align(ndr
, 5));
6050 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
6051 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
6053 NDR_PULL_ALLOC(ndr
, r
->array
);
6057 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
6059 if (ndr_flags
& NDR_BUFFERS
) {
6061 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6062 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
6063 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
6064 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
6065 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6066 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
6067 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6068 NDR_CHECK(ndr_pull_drsuapi_DsNameInfo1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
6070 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
6071 NDR_CHECK(ndr_pull_drsuapi_DsNameInfo1(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
6073 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
6074 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
6077 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
6080 return NDR_ERR_SUCCESS
;
6083 _PUBLIC_
void ndr_print_drsuapi_DsNameCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsNameCtr1
*r
)
6085 uint32_t cntr_array_1
;
6086 ndr_print_struct(ndr
, name
, "drsuapi_DsNameCtr1");
6088 ndr_print_uint32(ndr
, "count", r
->count
);
6089 ndr_print_ptr(ndr
, "array", r
->array
);
6092 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
6094 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
6096 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
6097 ndr_print_drsuapi_DsNameInfo1(ndr
, "array", &r
->array
[cntr_array_1
]);
6107 static enum ndr_err_code
ndr_push_drsuapi_DsNameCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsNameCtr
*r
)
6109 if (ndr_flags
& NDR_SCALARS
) {
6110 int level
= ndr_push_get_switch_value(ndr
, r
);
6111 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
6112 NDR_CHECK(ndr_push_union_align(ndr
, 5));
6115 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ctr1
));
6119 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6122 if (ndr_flags
& NDR_BUFFERS
) {
6123 int level
= ndr_push_get_switch_value(ndr
, r
);
6127 NDR_CHECK(ndr_push_drsuapi_DsNameCtr1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr1
));
6132 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6135 return NDR_ERR_SUCCESS
;
6138 static enum ndr_err_code
ndr_pull_drsuapi_DsNameCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsNameCtr
*r
)
6142 TALLOC_CTX
*_mem_save_ctr1_0
;
6143 level
= ndr_pull_get_switch_value(ndr
, r
);
6144 if (ndr_flags
& NDR_SCALARS
) {
6145 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
6146 if (_level
!= level
) {
6147 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
6149 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
6153 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr1
));
6155 NDR_PULL_ALLOC(ndr
, r
->ctr1
);
6162 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6165 if (ndr_flags
& NDR_BUFFERS
) {
6169 _mem_save_ctr1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6170 NDR_PULL_SET_MEM_CTX(ndr
, r
->ctr1
, 0);
6171 NDR_CHECK(ndr_pull_drsuapi_DsNameCtr1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr1
));
6172 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr1_0
, 0);
6177 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6180 return NDR_ERR_SUCCESS
;
6183 _PUBLIC_
void ndr_print_drsuapi_DsNameCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsNameCtr
*r
)
6186 level
= ndr_print_get_switch_value(ndr
, r
);
6187 ndr_print_union(ndr
, name
, level
, "drsuapi_DsNameCtr");
6190 ndr_print_ptr(ndr
, "ctr1", r
->ctr1
);
6193 ndr_print_drsuapi_DsNameCtr1(ndr
, "ctr1", r
->ctr1
);
6199 ndr_print_bad_level(ndr
, name
, level
);
6203 static enum ndr_err_code
ndr_push_drsuapi_DsSpnOperation(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsSpnOperation r
)
6205 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
6206 return NDR_ERR_SUCCESS
;
6209 static enum ndr_err_code
ndr_pull_drsuapi_DsSpnOperation(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsSpnOperation
*r
)
6212 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
6214 return NDR_ERR_SUCCESS
;
6217 _PUBLIC_
void ndr_print_drsuapi_DsSpnOperation(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsSpnOperation r
)
6219 const char *val
= NULL
;
6222 case DRSUAPI_DS_SPN_OPERATION_ADD
: val
= "DRSUAPI_DS_SPN_OPERATION_ADD"; break;
6223 case DRSUAPI_DS_SPN_OPERATION_REPLACE
: val
= "DRSUAPI_DS_SPN_OPERATION_REPLACE"; break;
6224 case DRSUAPI_DS_SPN_OPERATION_DELETE
: val
= "DRSUAPI_DS_SPN_OPERATION_DELETE"; break;
6226 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
6229 static enum ndr_err_code
ndr_push_drsuapi_DsWriteAccountSpnRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsWriteAccountSpnRequest1
*r
)
6231 uint32_t cntr_spn_names_1
;
6232 if (ndr_flags
& NDR_SCALARS
) {
6233 NDR_CHECK(ndr_push_align(ndr
, 5));
6234 NDR_CHECK(ndr_push_drsuapi_DsSpnOperation(ndr
, NDR_SCALARS
, r
->operation
));
6235 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
6236 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_dn
));
6237 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
6238 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->spn_names
));
6239 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
6241 if (ndr_flags
& NDR_BUFFERS
) {
6243 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
6244 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6245 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
6246 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_dn
, ndr_charset_length(r
->object_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6249 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
6250 for (cntr_spn_names_1
= 0; cntr_spn_names_1
< r
->count
; cntr_spn_names_1
++) {
6251 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr
, NDR_SCALARS
, &r
->spn_names
[cntr_spn_names_1
]));
6253 for (cntr_spn_names_1
= 0; cntr_spn_names_1
< r
->count
; cntr_spn_names_1
++) {
6254 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr
, NDR_BUFFERS
, &r
->spn_names
[cntr_spn_names_1
]));
6258 return NDR_ERR_SUCCESS
;
6261 static enum ndr_err_code
ndr_pull_drsuapi_DsWriteAccountSpnRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsWriteAccountSpnRequest1
*r
)
6263 uint32_t _ptr_object_dn
;
6264 TALLOC_CTX
*_mem_save_object_dn_0
;
6265 uint32_t _ptr_spn_names
;
6266 uint32_t cntr_spn_names_1
;
6267 TALLOC_CTX
*_mem_save_spn_names_0
;
6268 TALLOC_CTX
*_mem_save_spn_names_1
;
6269 if (ndr_flags
& NDR_SCALARS
) {
6270 NDR_CHECK(ndr_pull_align(ndr
, 5));
6271 NDR_CHECK(ndr_pull_drsuapi_DsSpnOperation(ndr
, NDR_SCALARS
, &r
->operation
));
6272 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
6273 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_dn
));
6274 if (_ptr_object_dn
) {
6275 NDR_PULL_ALLOC(ndr
, r
->object_dn
);
6277 r
->object_dn
= NULL
;
6279 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
6280 if (r
->count
> 10000) {
6281 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6283 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_spn_names
));
6284 if (_ptr_spn_names
) {
6285 NDR_PULL_ALLOC(ndr
, r
->spn_names
);
6287 r
->spn_names
= NULL
;
6289 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
6291 if (ndr_flags
& NDR_BUFFERS
) {
6293 _mem_save_object_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6294 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_dn
, 0);
6295 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_dn
));
6296 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_dn
));
6297 if (ndr_get_array_length(ndr
, &r
->object_dn
) > ndr_get_array_size(ndr
, &r
->object_dn
)) {
6298 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
));
6300 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t)));
6301 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_dn
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t), CH_UTF16
));
6302 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_dn_0
, 0);
6305 _mem_save_spn_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6306 NDR_PULL_SET_MEM_CTX(ndr
, r
->spn_names
, 0);
6307 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->spn_names
));
6308 NDR_PULL_ALLOC_N(ndr
, r
->spn_names
, ndr_get_array_size(ndr
, &r
->spn_names
));
6309 _mem_save_spn_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6310 NDR_PULL_SET_MEM_CTX(ndr
, r
->spn_names
, 0);
6311 for (cntr_spn_names_1
= 0; cntr_spn_names_1
< r
->count
; cntr_spn_names_1
++) {
6312 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr
, NDR_SCALARS
, &r
->spn_names
[cntr_spn_names_1
]));
6314 for (cntr_spn_names_1
= 0; cntr_spn_names_1
< r
->count
; cntr_spn_names_1
++) {
6315 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr
, NDR_BUFFERS
, &r
->spn_names
[cntr_spn_names_1
]));
6317 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_spn_names_1
, 0);
6318 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_spn_names_0
, 0);
6321 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->spn_names
, r
->count
));
6324 return NDR_ERR_SUCCESS
;
6327 _PUBLIC_
void ndr_print_drsuapi_DsWriteAccountSpnRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsWriteAccountSpnRequest1
*r
)
6329 uint32_t cntr_spn_names_1
;
6330 ndr_print_struct(ndr
, name
, "drsuapi_DsWriteAccountSpnRequest1");
6332 ndr_print_drsuapi_DsSpnOperation(ndr
, "operation", r
->operation
);
6333 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
6334 ndr_print_ptr(ndr
, "object_dn", r
->object_dn
);
6337 ndr_print_string(ndr
, "object_dn", r
->object_dn
);
6340 ndr_print_uint32(ndr
, "count", r
->count
);
6341 ndr_print_ptr(ndr
, "spn_names", r
->spn_names
);
6344 ndr
->print(ndr
, "%s: ARRAY(%d)", "spn_names", (int)r
->count
);
6346 for (cntr_spn_names_1
=0;cntr_spn_names_1
<r
->count
;cntr_spn_names_1
++) {
6348 if (asprintf(&idx_1
, "[%d]", cntr_spn_names_1
) != -1) {
6349 ndr_print_drsuapi_DsNameString(ndr
, "spn_names", &r
->spn_names
[cntr_spn_names_1
]);
6359 static enum ndr_err_code
ndr_push_drsuapi_DsWriteAccountSpnRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsWriteAccountSpnRequest
*r
)
6361 if (ndr_flags
& NDR_SCALARS
) {
6362 int level
= ndr_push_get_switch_value(ndr
, r
);
6363 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
6364 NDR_CHECK(ndr_push_union_align(ndr
, 5));
6367 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
6371 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6374 if (ndr_flags
& NDR_BUFFERS
) {
6375 int level
= ndr_push_get_switch_value(ndr
, r
);
6378 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
6382 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6385 return NDR_ERR_SUCCESS
;
6388 static enum ndr_err_code
ndr_pull_drsuapi_DsWriteAccountSpnRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsWriteAccountSpnRequest
*r
)
6392 level
= ndr_pull_get_switch_value(ndr
, r
);
6393 if (ndr_flags
& NDR_SCALARS
) {
6394 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
6395 if (_level
!= level
) {
6396 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
6398 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
6401 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
6405 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6408 if (ndr_flags
& NDR_BUFFERS
) {
6411 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
6415 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6418 return NDR_ERR_SUCCESS
;
6421 _PUBLIC_
void ndr_print_drsuapi_DsWriteAccountSpnRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsWriteAccountSpnRequest
*r
)
6424 level
= ndr_print_get_switch_value(ndr
, r
);
6425 ndr_print_union(ndr
, name
, level
, "drsuapi_DsWriteAccountSpnRequest");
6428 ndr_print_drsuapi_DsWriteAccountSpnRequest1(ndr
, "req1", &r
->req1
);
6432 ndr_print_bad_level(ndr
, name
, level
);
6436 static enum ndr_err_code
ndr_push_drsuapi_DsWriteAccountSpnResult1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsWriteAccountSpnResult1
*r
)
6438 if (ndr_flags
& NDR_SCALARS
) {
6439 NDR_CHECK(ndr_push_align(ndr
, 4));
6440 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->status
));
6441 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
6443 if (ndr_flags
& NDR_BUFFERS
) {
6445 return NDR_ERR_SUCCESS
;
6448 static enum ndr_err_code
ndr_pull_drsuapi_DsWriteAccountSpnResult1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsWriteAccountSpnResult1
*r
)
6450 if (ndr_flags
& NDR_SCALARS
) {
6451 NDR_CHECK(ndr_pull_align(ndr
, 4));
6452 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->status
));
6453 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
6455 if (ndr_flags
& NDR_BUFFERS
) {
6457 return NDR_ERR_SUCCESS
;
6460 _PUBLIC_
void ndr_print_drsuapi_DsWriteAccountSpnResult1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsWriteAccountSpnResult1
*r
)
6462 ndr_print_struct(ndr
, name
, "drsuapi_DsWriteAccountSpnResult1");
6464 ndr_print_WERROR(ndr
, "status", r
->status
);
6468 static enum ndr_err_code
ndr_push_drsuapi_DsWriteAccountSpnResult(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsWriteAccountSpnResult
*r
)
6470 if (ndr_flags
& NDR_SCALARS
) {
6471 int level
= ndr_push_get_switch_value(ndr
, r
);
6472 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
6473 NDR_CHECK(ndr_push_union_align(ndr
, 4));
6476 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnResult1(ndr
, NDR_SCALARS
, &r
->res1
));
6480 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6483 if (ndr_flags
& NDR_BUFFERS
) {
6484 int level
= ndr_push_get_switch_value(ndr
, r
);
6490 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6493 return NDR_ERR_SUCCESS
;
6496 static enum ndr_err_code
ndr_pull_drsuapi_DsWriteAccountSpnResult(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsWriteAccountSpnResult
*r
)
6500 level
= ndr_pull_get_switch_value(ndr
, r
);
6501 if (ndr_flags
& NDR_SCALARS
) {
6502 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
6503 if (_level
!= level
) {
6504 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
6506 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
6509 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnResult1(ndr
, NDR_SCALARS
, &r
->res1
));
6513 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6516 if (ndr_flags
& NDR_BUFFERS
) {
6522 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6525 return NDR_ERR_SUCCESS
;
6528 _PUBLIC_
void ndr_print_drsuapi_DsWriteAccountSpnResult(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsWriteAccountSpnResult
*r
)
6531 level
= ndr_print_get_switch_value(ndr
, r
);
6532 ndr_print_union(ndr
, name
, level
, "drsuapi_DsWriteAccountSpnResult");
6535 ndr_print_drsuapi_DsWriteAccountSpnResult1(ndr
, "res1", &r
->res1
);
6539 ndr_print_bad_level(ndr
, name
, level
);
6543 static enum ndr_err_code
ndr_push_drsuapi_DsRemoveDSServerRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsRemoveDSServerRequest1
*r
)
6545 if (ndr_flags
& NDR_SCALARS
) {
6546 NDR_CHECK(ndr_push_align(ndr
, 5));
6547 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_dn
));
6548 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_dn
));
6549 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->commit
));
6550 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
6552 if (ndr_flags
& NDR_BUFFERS
) {
6554 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
6555 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6556 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
6557 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_dn
, ndr_charset_length(r
->server_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6560 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_dn
, CH_UTF16
)));
6561 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6562 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_dn
, CH_UTF16
)));
6563 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_dn
, ndr_charset_length(r
->domain_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6566 return NDR_ERR_SUCCESS
;
6569 static enum ndr_err_code
ndr_pull_drsuapi_DsRemoveDSServerRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsRemoveDSServerRequest1
*r
)
6571 uint32_t _ptr_server_dn
;
6572 TALLOC_CTX
*_mem_save_server_dn_0
;
6573 uint32_t _ptr_domain_dn
;
6574 TALLOC_CTX
*_mem_save_domain_dn_0
;
6575 if (ndr_flags
& NDR_SCALARS
) {
6576 NDR_CHECK(ndr_pull_align(ndr
, 5));
6577 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_dn
));
6578 if (_ptr_server_dn
) {
6579 NDR_PULL_ALLOC(ndr
, r
->server_dn
);
6581 r
->server_dn
= NULL
;
6583 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_dn
));
6584 if (_ptr_domain_dn
) {
6585 NDR_PULL_ALLOC(ndr
, r
->domain_dn
);
6587 r
->domain_dn
= NULL
;
6589 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->commit
));
6590 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
6592 if (ndr_flags
& NDR_BUFFERS
) {
6594 _mem_save_server_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6595 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_dn
, 0);
6596 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_dn
));
6597 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_dn
));
6598 if (ndr_get_array_length(ndr
, &r
->server_dn
) > ndr_get_array_size(ndr
, &r
->server_dn
)) {
6599 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
));
6601 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t)));
6602 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_dn
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t), CH_UTF16
));
6603 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_dn_0
, 0);
6606 _mem_save_domain_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6607 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_dn
, 0);
6608 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_dn
));
6609 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_dn
));
6610 if (ndr_get_array_length(ndr
, &r
->domain_dn
) > ndr_get_array_size(ndr
, &r
->domain_dn
)) {
6611 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
));
6613 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_dn
), sizeof(uint16_t)));
6614 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_dn
, ndr_get_array_length(ndr
, &r
->domain_dn
), sizeof(uint16_t), CH_UTF16
));
6615 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_dn_0
, 0);
6618 return NDR_ERR_SUCCESS
;
6621 _PUBLIC_
void ndr_print_drsuapi_DsRemoveDSServerRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsRemoveDSServerRequest1
*r
)
6623 ndr_print_struct(ndr
, name
, "drsuapi_DsRemoveDSServerRequest1");
6625 ndr_print_ptr(ndr
, "server_dn", r
->server_dn
);
6628 ndr_print_string(ndr
, "server_dn", r
->server_dn
);
6631 ndr_print_ptr(ndr
, "domain_dn", r
->domain_dn
);
6634 ndr_print_string(ndr
, "domain_dn", r
->domain_dn
);
6637 ndr_print_uint32(ndr
, "commit", r
->commit
);
6641 static enum ndr_err_code
ndr_push_drsuapi_DsRemoveDSServerRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsRemoveDSServerRequest
*r
)
6643 if (ndr_flags
& NDR_SCALARS
) {
6644 int level
= ndr_push_get_switch_value(ndr
, r
);
6645 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
6646 NDR_CHECK(ndr_push_union_align(ndr
, 5));
6649 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
6653 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6656 if (ndr_flags
& NDR_BUFFERS
) {
6657 int level
= ndr_push_get_switch_value(ndr
, r
);
6660 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
6664 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6667 return NDR_ERR_SUCCESS
;
6670 static enum ndr_err_code
ndr_pull_drsuapi_DsRemoveDSServerRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsRemoveDSServerRequest
*r
)
6674 level
= ndr_pull_get_switch_value(ndr
, r
);
6675 if (ndr_flags
& NDR_SCALARS
) {
6676 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
6677 if (_level
!= level
) {
6678 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
6680 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
6683 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
6687 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6690 if (ndr_flags
& NDR_BUFFERS
) {
6693 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
6697 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6700 return NDR_ERR_SUCCESS
;
6703 _PUBLIC_
void ndr_print_drsuapi_DsRemoveDSServerRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsRemoveDSServerRequest
*r
)
6706 level
= ndr_print_get_switch_value(ndr
, r
);
6707 ndr_print_union(ndr
, name
, level
, "drsuapi_DsRemoveDSServerRequest");
6710 ndr_print_drsuapi_DsRemoveDSServerRequest1(ndr
, "req1", &r
->req1
);
6714 ndr_print_bad_level(ndr
, name
, level
);
6718 static enum ndr_err_code
ndr_push_drsuapi_DsRemoveDSServerResult1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsRemoveDSServerResult1
*r
)
6720 if (ndr_flags
& NDR_SCALARS
) {
6721 NDR_CHECK(ndr_push_align(ndr
, 4));
6722 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->last_dc_in_domain
));
6723 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
6725 if (ndr_flags
& NDR_BUFFERS
) {
6727 return NDR_ERR_SUCCESS
;
6730 static enum ndr_err_code
ndr_pull_drsuapi_DsRemoveDSServerResult1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsRemoveDSServerResult1
*r
)
6732 if (ndr_flags
& NDR_SCALARS
) {
6733 NDR_CHECK(ndr_pull_align(ndr
, 4));
6734 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->last_dc_in_domain
));
6735 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
6737 if (ndr_flags
& NDR_BUFFERS
) {
6739 return NDR_ERR_SUCCESS
;
6742 _PUBLIC_
void ndr_print_drsuapi_DsRemoveDSServerResult1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsRemoveDSServerResult1
*r
)
6744 ndr_print_struct(ndr
, name
, "drsuapi_DsRemoveDSServerResult1");
6746 ndr_print_uint32(ndr
, "last_dc_in_domain", r
->last_dc_in_domain
);
6750 static enum ndr_err_code
ndr_push_drsuapi_DsRemoveDSServerResult(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsRemoveDSServerResult
*r
)
6752 if (ndr_flags
& NDR_SCALARS
) {
6753 int level
= ndr_push_get_switch_value(ndr
, r
);
6754 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
6755 NDR_CHECK(ndr_push_union_align(ndr
, 4));
6758 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerResult1(ndr
, NDR_SCALARS
, &r
->res1
));
6762 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6765 if (ndr_flags
& NDR_BUFFERS
) {
6766 int level
= ndr_push_get_switch_value(ndr
, r
);
6772 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6775 return NDR_ERR_SUCCESS
;
6778 static enum ndr_err_code
ndr_pull_drsuapi_DsRemoveDSServerResult(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsRemoveDSServerResult
*r
)
6782 level
= ndr_pull_get_switch_value(ndr
, r
);
6783 if (ndr_flags
& NDR_SCALARS
) {
6784 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
6785 if (_level
!= level
) {
6786 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
6788 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
6791 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerResult1(ndr
, NDR_SCALARS
, &r
->res1
));
6795 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6798 if (ndr_flags
& NDR_BUFFERS
) {
6804 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6807 return NDR_ERR_SUCCESS
;
6810 _PUBLIC_
void ndr_print_drsuapi_DsRemoveDSServerResult(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsRemoveDSServerResult
*r
)
6813 level
= ndr_print_get_switch_value(ndr
, r
);
6814 ndr_print_union(ndr
, name
, level
, "drsuapi_DsRemoveDSServerResult");
6817 ndr_print_drsuapi_DsRemoveDSServerResult1(ndr
, "res1", &r
->res1
);
6821 ndr_print_bad_level(ndr
, name
, level
);
6825 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfoRequest1
*r
)
6827 if (ndr_flags
& NDR_SCALARS
) {
6828 NDR_CHECK(ndr_push_align(ndr
, 5));
6829 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_name
));
6830 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->level
));
6831 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
6833 if (ndr_flags
& NDR_BUFFERS
) {
6834 if (r
->domain_name
) {
6835 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
6836 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6837 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
6838 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_name
, ndr_charset_length(r
->domain_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6841 return NDR_ERR_SUCCESS
;
6844 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfoRequest1
*r
)
6846 uint32_t _ptr_domain_name
;
6847 TALLOC_CTX
*_mem_save_domain_name_0
;
6848 if (ndr_flags
& NDR_SCALARS
) {
6849 NDR_CHECK(ndr_pull_align(ndr
, 5));
6850 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
6851 if (_ptr_domain_name
) {
6852 NDR_PULL_ALLOC(ndr
, r
->domain_name
);
6854 r
->domain_name
= NULL
;
6856 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->level
));
6857 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
6859 if (ndr_flags
& NDR_BUFFERS
) {
6860 if (r
->domain_name
) {
6861 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6862 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_name
, 0);
6863 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_name
));
6864 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_name
));
6865 if (ndr_get_array_length(ndr
, &r
->domain_name
) > ndr_get_array_size(ndr
, &r
->domain_name
)) {
6866 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
));
6868 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t)));
6869 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_name
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t), CH_UTF16
));
6870 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
6873 return NDR_ERR_SUCCESS
;
6876 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfoRequest1
*r
)
6878 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfoRequest1");
6880 ndr_print_ptr(ndr
, "domain_name", r
->domain_name
);
6882 if (r
->domain_name
) {
6883 ndr_print_string(ndr
, "domain_name", r
->domain_name
);
6886 ndr_print_int32(ndr
, "level", r
->level
);
6890 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetDCInfoRequest
*r
)
6892 if (ndr_flags
& NDR_SCALARS
) {
6893 int level
= ndr_push_get_switch_value(ndr
, r
);
6894 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
6895 NDR_CHECK(ndr_push_union_align(ndr
, 5));
6898 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
6902 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6905 if (ndr_flags
& NDR_BUFFERS
) {
6906 int level
= ndr_push_get_switch_value(ndr
, r
);
6909 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
6913 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6916 return NDR_ERR_SUCCESS
;
6919 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetDCInfoRequest
*r
)
6923 level
= ndr_pull_get_switch_value(ndr
, r
);
6924 if (ndr_flags
& NDR_SCALARS
) {
6925 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
6926 if (_level
!= level
) {
6927 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
6929 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
6932 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
6936 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6939 if (ndr_flags
& NDR_BUFFERS
) {
6942 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
6946 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
6949 return NDR_ERR_SUCCESS
;
6952 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetDCInfoRequest
*r
)
6955 level
= ndr_print_get_switch_value(ndr
, r
);
6956 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetDCInfoRequest");
6959 ndr_print_drsuapi_DsGetDCInfoRequest1(ndr
, "req1", &r
->req1
);
6963 ndr_print_bad_level(ndr
, name
, level
);
6967 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfo1
*r
)
6969 if (ndr_flags
& NDR_SCALARS
) {
6970 NDR_CHECK(ndr_push_align(ndr
, 5));
6971 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_name
));
6972 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dns_name
));
6973 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_name
));
6974 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->computer_dn
));
6975 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_dn
));
6976 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_pdc
));
6977 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_enabled
));
6978 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
6980 if (ndr_flags
& NDR_BUFFERS
) {
6981 if (r
->netbios_name
) {
6982 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
6983 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6984 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
6985 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->netbios_name
, ndr_charset_length(r
->netbios_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6988 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
6989 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6990 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
6991 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dns_name
, ndr_charset_length(r
->dns_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6994 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
6995 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6996 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
6997 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_name
, ndr_charset_length(r
->site_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6999 if (r
->computer_dn
) {
7000 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
7001 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7002 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
7003 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->computer_dn
, ndr_charset_length(r
->computer_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7006 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
7007 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7008 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
7009 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_dn
, ndr_charset_length(r
->server_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7012 return NDR_ERR_SUCCESS
;
7015 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfo1
*r
)
7017 uint32_t _ptr_netbios_name
;
7018 TALLOC_CTX
*_mem_save_netbios_name_0
;
7019 uint32_t _ptr_dns_name
;
7020 TALLOC_CTX
*_mem_save_dns_name_0
;
7021 uint32_t _ptr_site_name
;
7022 TALLOC_CTX
*_mem_save_site_name_0
;
7023 uint32_t _ptr_computer_dn
;
7024 TALLOC_CTX
*_mem_save_computer_dn_0
;
7025 uint32_t _ptr_server_dn
;
7026 TALLOC_CTX
*_mem_save_server_dn_0
;
7027 if (ndr_flags
& NDR_SCALARS
) {
7028 NDR_CHECK(ndr_pull_align(ndr
, 5));
7029 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_name
));
7030 if (_ptr_netbios_name
) {
7031 NDR_PULL_ALLOC(ndr
, r
->netbios_name
);
7033 r
->netbios_name
= NULL
;
7035 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_name
));
7036 if (_ptr_dns_name
) {
7037 NDR_PULL_ALLOC(ndr
, r
->dns_name
);
7041 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_name
));
7042 if (_ptr_site_name
) {
7043 NDR_PULL_ALLOC(ndr
, r
->site_name
);
7045 r
->site_name
= NULL
;
7047 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_dn
));
7048 if (_ptr_computer_dn
) {
7049 NDR_PULL_ALLOC(ndr
, r
->computer_dn
);
7051 r
->computer_dn
= NULL
;
7053 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_dn
));
7054 if (_ptr_server_dn
) {
7055 NDR_PULL_ALLOC(ndr
, r
->server_dn
);
7057 r
->server_dn
= NULL
;
7059 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_pdc
));
7060 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_enabled
));
7061 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7063 if (ndr_flags
& NDR_BUFFERS
) {
7064 if (r
->netbios_name
) {
7065 _mem_save_netbios_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7066 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_name
, 0);
7067 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_name
));
7068 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->netbios_name
));
7069 if (ndr_get_array_length(ndr
, &r
->netbios_name
) > ndr_get_array_size(ndr
, &r
->netbios_name
)) {
7070 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
));
7072 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t)));
7073 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->netbios_name
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t), CH_UTF16
));
7074 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_name_0
, 0);
7077 _mem_save_dns_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7078 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_name
, 0);
7079 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dns_name
));
7080 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dns_name
));
7081 if (ndr_get_array_length(ndr
, &r
->dns_name
) > ndr_get_array_size(ndr
, &r
->dns_name
)) {
7082 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
));
7084 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t)));
7085 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dns_name
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t), CH_UTF16
));
7086 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_name_0
, 0);
7089 _mem_save_site_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7090 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_name
, 0);
7091 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_name
));
7092 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_name
));
7093 if (ndr_get_array_length(ndr
, &r
->site_name
) > ndr_get_array_size(ndr
, &r
->site_name
)) {
7094 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
));
7096 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t)));
7097 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_name
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t), CH_UTF16
));
7098 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_name_0
, 0);
7100 if (r
->computer_dn
) {
7101 _mem_save_computer_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7102 NDR_PULL_SET_MEM_CTX(ndr
, r
->computer_dn
, 0);
7103 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->computer_dn
));
7104 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->computer_dn
));
7105 if (ndr_get_array_length(ndr
, &r
->computer_dn
) > ndr_get_array_size(ndr
, &r
->computer_dn
)) {
7106 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
));
7108 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t)));
7109 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->computer_dn
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t), CH_UTF16
));
7110 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_dn_0
, 0);
7113 _mem_save_server_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7114 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_dn
, 0);
7115 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_dn
));
7116 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_dn
));
7117 if (ndr_get_array_length(ndr
, &r
->server_dn
) > ndr_get_array_size(ndr
, &r
->server_dn
)) {
7118 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
));
7120 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t)));
7121 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_dn
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t), CH_UTF16
));
7122 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_dn_0
, 0);
7125 return NDR_ERR_SUCCESS
;
7128 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfo1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfo1
*r
)
7130 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfo1");
7132 ndr_print_ptr(ndr
, "netbios_name", r
->netbios_name
);
7134 if (r
->netbios_name
) {
7135 ndr_print_string(ndr
, "netbios_name", r
->netbios_name
);
7138 ndr_print_ptr(ndr
, "dns_name", r
->dns_name
);
7141 ndr_print_string(ndr
, "dns_name", r
->dns_name
);
7144 ndr_print_ptr(ndr
, "site_name", r
->site_name
);
7147 ndr_print_string(ndr
, "site_name", r
->site_name
);
7150 ndr_print_ptr(ndr
, "computer_dn", r
->computer_dn
);
7152 if (r
->computer_dn
) {
7153 ndr_print_string(ndr
, "computer_dn", r
->computer_dn
);
7156 ndr_print_ptr(ndr
, "server_dn", r
->server_dn
);
7159 ndr_print_string(ndr
, "server_dn", r
->server_dn
);
7162 ndr_print_uint32(ndr
, "is_pdc", r
->is_pdc
);
7163 ndr_print_uint32(ndr
, "is_enabled", r
->is_enabled
);
7167 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfoCtr1
*r
)
7169 uint32_t cntr_array_1
;
7170 if (ndr_flags
& NDR_SCALARS
) {
7171 NDR_CHECK(ndr_push_align(ndr
, 5));
7172 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7173 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
7174 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
7176 if (ndr_flags
& NDR_BUFFERS
) {
7178 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
7179 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7180 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
7182 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7183 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo1(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
7187 return NDR_ERR_SUCCESS
;
7190 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfoCtr1
*r
)
7192 uint32_t _ptr_array
;
7193 uint32_t cntr_array_1
;
7194 TALLOC_CTX
*_mem_save_array_0
;
7195 TALLOC_CTX
*_mem_save_array_1
;
7196 if (ndr_flags
& NDR_SCALARS
) {
7197 NDR_CHECK(ndr_pull_align(ndr
, 5));
7198 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
7199 if (r
->count
> 10000) {
7200 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
7202 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
7204 NDR_PULL_ALLOC(ndr
, r
->array
);
7208 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7210 if (ndr_flags
& NDR_BUFFERS
) {
7212 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7213 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
7214 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
7215 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
7216 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7217 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
7218 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7219 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
7221 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7222 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo1(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
7224 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
7225 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
7228 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
7231 return NDR_ERR_SUCCESS
;
7234 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfoCtr1
*r
)
7236 uint32_t cntr_array_1
;
7237 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfoCtr1");
7239 ndr_print_uint32(ndr
, "count", r
->count
);
7240 ndr_print_ptr(ndr
, "array", r
->array
);
7243 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
7245 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
7247 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
7248 ndr_print_drsuapi_DsGetDCInfo1(ndr
, "array", &r
->array
[cntr_array_1
]);
7258 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfo2
*r
)
7260 if (ndr_flags
& NDR_SCALARS
) {
7261 NDR_CHECK(ndr_push_align(ndr
, 5));
7262 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_name
));
7263 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dns_name
));
7264 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_name
));
7265 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_dn
));
7266 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->computer_dn
));
7267 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_dn
));
7268 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ntds_dn
));
7269 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_pdc
));
7270 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_enabled
));
7271 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_gc
));
7272 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
7273 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->computer_guid
));
7274 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->server_guid
));
7275 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->ntds_guid
));
7276 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
7278 if (ndr_flags
& NDR_BUFFERS
) {
7279 if (r
->netbios_name
) {
7280 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
7281 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7282 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
7283 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->netbios_name
, ndr_charset_length(r
->netbios_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7286 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
7287 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7288 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
7289 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dns_name
, ndr_charset_length(r
->dns_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7292 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
7293 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7294 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
7295 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_name
, ndr_charset_length(r
->site_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7298 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_dn
, CH_UTF16
)));
7299 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7300 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_dn
, CH_UTF16
)));
7301 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_dn
, ndr_charset_length(r
->site_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7303 if (r
->computer_dn
) {
7304 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
7305 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7306 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
7307 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->computer_dn
, ndr_charset_length(r
->computer_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7310 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
7311 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7312 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
7313 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_dn
, ndr_charset_length(r
->server_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7316 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
)));
7317 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7318 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
)));
7319 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->ntds_dn
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7322 return NDR_ERR_SUCCESS
;
7325 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfo2
*r
)
7327 uint32_t _ptr_netbios_name
;
7328 TALLOC_CTX
*_mem_save_netbios_name_0
;
7329 uint32_t _ptr_dns_name
;
7330 TALLOC_CTX
*_mem_save_dns_name_0
;
7331 uint32_t _ptr_site_name
;
7332 TALLOC_CTX
*_mem_save_site_name_0
;
7333 uint32_t _ptr_site_dn
;
7334 TALLOC_CTX
*_mem_save_site_dn_0
;
7335 uint32_t _ptr_computer_dn
;
7336 TALLOC_CTX
*_mem_save_computer_dn_0
;
7337 uint32_t _ptr_server_dn
;
7338 TALLOC_CTX
*_mem_save_server_dn_0
;
7339 uint32_t _ptr_ntds_dn
;
7340 TALLOC_CTX
*_mem_save_ntds_dn_0
;
7341 if (ndr_flags
& NDR_SCALARS
) {
7342 NDR_CHECK(ndr_pull_align(ndr
, 5));
7343 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_name
));
7344 if (_ptr_netbios_name
) {
7345 NDR_PULL_ALLOC(ndr
, r
->netbios_name
);
7347 r
->netbios_name
= NULL
;
7349 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_name
));
7350 if (_ptr_dns_name
) {
7351 NDR_PULL_ALLOC(ndr
, r
->dns_name
);
7355 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_name
));
7356 if (_ptr_site_name
) {
7357 NDR_PULL_ALLOC(ndr
, r
->site_name
);
7359 r
->site_name
= NULL
;
7361 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_dn
));
7363 NDR_PULL_ALLOC(ndr
, r
->site_dn
);
7367 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_dn
));
7368 if (_ptr_computer_dn
) {
7369 NDR_PULL_ALLOC(ndr
, r
->computer_dn
);
7371 r
->computer_dn
= NULL
;
7373 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_dn
));
7374 if (_ptr_server_dn
) {
7375 NDR_PULL_ALLOC(ndr
, r
->server_dn
);
7377 r
->server_dn
= NULL
;
7379 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ntds_dn
));
7381 NDR_PULL_ALLOC(ndr
, r
->ntds_dn
);
7385 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_pdc
));
7386 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_enabled
));
7387 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_gc
));
7388 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
7389 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->computer_guid
));
7390 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->server_guid
));
7391 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->ntds_guid
));
7392 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7394 if (ndr_flags
& NDR_BUFFERS
) {
7395 if (r
->netbios_name
) {
7396 _mem_save_netbios_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7397 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_name
, 0);
7398 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_name
));
7399 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->netbios_name
));
7400 if (ndr_get_array_length(ndr
, &r
->netbios_name
) > ndr_get_array_size(ndr
, &r
->netbios_name
)) {
7401 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
));
7403 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t)));
7404 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->netbios_name
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t), CH_UTF16
));
7405 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_name_0
, 0);
7408 _mem_save_dns_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7409 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_name
, 0);
7410 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dns_name
));
7411 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dns_name
));
7412 if (ndr_get_array_length(ndr
, &r
->dns_name
) > ndr_get_array_size(ndr
, &r
->dns_name
)) {
7413 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
));
7415 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t)));
7416 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dns_name
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t), CH_UTF16
));
7417 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_name_0
, 0);
7420 _mem_save_site_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7421 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_name
, 0);
7422 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_name
));
7423 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_name
));
7424 if (ndr_get_array_length(ndr
, &r
->site_name
) > ndr_get_array_size(ndr
, &r
->site_name
)) {
7425 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
));
7427 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t)));
7428 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_name
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t), CH_UTF16
));
7429 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_name_0
, 0);
7432 _mem_save_site_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7433 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_dn
, 0);
7434 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_dn
));
7435 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_dn
));
7436 if (ndr_get_array_length(ndr
, &r
->site_dn
) > ndr_get_array_size(ndr
, &r
->site_dn
)) {
7437 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
));
7439 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_dn
), sizeof(uint16_t)));
7440 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_dn
, ndr_get_array_length(ndr
, &r
->site_dn
), sizeof(uint16_t), CH_UTF16
));
7441 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_dn_0
, 0);
7443 if (r
->computer_dn
) {
7444 _mem_save_computer_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7445 NDR_PULL_SET_MEM_CTX(ndr
, r
->computer_dn
, 0);
7446 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->computer_dn
));
7447 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->computer_dn
));
7448 if (ndr_get_array_length(ndr
, &r
->computer_dn
) > ndr_get_array_size(ndr
, &r
->computer_dn
)) {
7449 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
));
7451 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t)));
7452 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->computer_dn
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t), CH_UTF16
));
7453 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_dn_0
, 0);
7456 _mem_save_server_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7457 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_dn
, 0);
7458 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_dn
));
7459 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_dn
));
7460 if (ndr_get_array_length(ndr
, &r
->server_dn
) > ndr_get_array_size(ndr
, &r
->server_dn
)) {
7461 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
));
7463 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t)));
7464 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_dn
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t), CH_UTF16
));
7465 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_dn_0
, 0);
7468 _mem_save_ntds_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7469 NDR_PULL_SET_MEM_CTX(ndr
, r
->ntds_dn
, 0);
7470 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->ntds_dn
));
7471 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->ntds_dn
));
7472 if (ndr_get_array_length(ndr
, &r
->ntds_dn
) > ndr_get_array_size(ndr
, &r
->ntds_dn
)) {
7473 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
));
7475 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->ntds_dn
), sizeof(uint16_t)));
7476 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->ntds_dn
, ndr_get_array_length(ndr
, &r
->ntds_dn
), sizeof(uint16_t), CH_UTF16
));
7477 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ntds_dn_0
, 0);
7480 return NDR_ERR_SUCCESS
;
7483 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfo2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfo2
*r
)
7485 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfo2");
7487 ndr_print_ptr(ndr
, "netbios_name", r
->netbios_name
);
7489 if (r
->netbios_name
) {
7490 ndr_print_string(ndr
, "netbios_name", r
->netbios_name
);
7493 ndr_print_ptr(ndr
, "dns_name", r
->dns_name
);
7496 ndr_print_string(ndr
, "dns_name", r
->dns_name
);
7499 ndr_print_ptr(ndr
, "site_name", r
->site_name
);
7502 ndr_print_string(ndr
, "site_name", r
->site_name
);
7505 ndr_print_ptr(ndr
, "site_dn", r
->site_dn
);
7508 ndr_print_string(ndr
, "site_dn", r
->site_dn
);
7511 ndr_print_ptr(ndr
, "computer_dn", r
->computer_dn
);
7513 if (r
->computer_dn
) {
7514 ndr_print_string(ndr
, "computer_dn", r
->computer_dn
);
7517 ndr_print_ptr(ndr
, "server_dn", r
->server_dn
);
7520 ndr_print_string(ndr
, "server_dn", r
->server_dn
);
7523 ndr_print_ptr(ndr
, "ntds_dn", r
->ntds_dn
);
7526 ndr_print_string(ndr
, "ntds_dn", r
->ntds_dn
);
7529 ndr_print_uint32(ndr
, "is_pdc", r
->is_pdc
);
7530 ndr_print_uint32(ndr
, "is_enabled", r
->is_enabled
);
7531 ndr_print_uint32(ndr
, "is_gc", r
->is_gc
);
7532 ndr_print_GUID(ndr
, "site_guid", &r
->site_guid
);
7533 ndr_print_GUID(ndr
, "computer_guid", &r
->computer_guid
);
7534 ndr_print_GUID(ndr
, "server_guid", &r
->server_guid
);
7535 ndr_print_GUID(ndr
, "ntds_guid", &r
->ntds_guid
);
7539 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoCtr2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfoCtr2
*r
)
7541 uint32_t cntr_array_1
;
7542 if (ndr_flags
& NDR_SCALARS
) {
7543 NDR_CHECK(ndr_push_align(ndr
, 5));
7544 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7545 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
7546 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
7548 if (ndr_flags
& NDR_BUFFERS
) {
7550 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
7551 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7552 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
7554 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7555 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
7559 return NDR_ERR_SUCCESS
;
7562 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoCtr2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfoCtr2
*r
)
7564 uint32_t _ptr_array
;
7565 uint32_t cntr_array_1
;
7566 TALLOC_CTX
*_mem_save_array_0
;
7567 TALLOC_CTX
*_mem_save_array_1
;
7568 if (ndr_flags
& NDR_SCALARS
) {
7569 NDR_CHECK(ndr_pull_align(ndr
, 5));
7570 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
7571 if (r
->count
> 10000) {
7572 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
7574 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
7576 NDR_PULL_ALLOC(ndr
, r
->array
);
7580 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7582 if (ndr_flags
& NDR_BUFFERS
) {
7584 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7585 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
7586 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
7587 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
7588 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7589 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
7590 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7591 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
7593 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7594 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
7596 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
7597 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
7600 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
7603 return NDR_ERR_SUCCESS
;
7606 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoCtr2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfoCtr2
*r
)
7608 uint32_t cntr_array_1
;
7609 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfoCtr2");
7611 ndr_print_uint32(ndr
, "count", r
->count
);
7612 ndr_print_ptr(ndr
, "array", r
->array
);
7615 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
7617 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
7619 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
7620 ndr_print_drsuapi_DsGetDCInfo2(ndr
, "array", &r
->array
[cntr_array_1
]);
7630 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfo3
*r
)
7632 if (ndr_flags
& NDR_SCALARS
) {
7633 NDR_CHECK(ndr_push_align(ndr
, 5));
7634 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_name
));
7635 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dns_name
));
7636 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_name
));
7637 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_dn
));
7638 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->computer_dn
));
7639 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_dn
));
7640 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ntds_dn
));
7641 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_pdc
));
7642 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_enabled
));
7643 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_gc
));
7644 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->is_rodc
));
7645 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
7646 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->computer_guid
));
7647 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->server_guid
));
7648 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->ntds_guid
));
7649 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
7651 if (ndr_flags
& NDR_BUFFERS
) {
7652 if (r
->netbios_name
) {
7653 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
7654 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7655 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
7656 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->netbios_name
, ndr_charset_length(r
->netbios_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7659 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
7660 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7661 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
7662 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dns_name
, ndr_charset_length(r
->dns_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7665 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
7666 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7667 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_name
, CH_UTF16
)));
7668 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_name
, ndr_charset_length(r
->site_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7671 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_dn
, CH_UTF16
)));
7672 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7673 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_dn
, CH_UTF16
)));
7674 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_dn
, ndr_charset_length(r
->site_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7676 if (r
->computer_dn
) {
7677 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
7678 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7679 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer_dn
, CH_UTF16
)));
7680 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->computer_dn
, ndr_charset_length(r
->computer_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7683 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
7684 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7685 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_dn
, CH_UTF16
)));
7686 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_dn
, ndr_charset_length(r
->server_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7689 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
)));
7690 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7691 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
)));
7692 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->ntds_dn
, ndr_charset_length(r
->ntds_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7695 return NDR_ERR_SUCCESS
;
7698 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfo3
*r
)
7700 uint32_t _ptr_netbios_name
;
7701 TALLOC_CTX
*_mem_save_netbios_name_0
;
7702 uint32_t _ptr_dns_name
;
7703 TALLOC_CTX
*_mem_save_dns_name_0
;
7704 uint32_t _ptr_site_name
;
7705 TALLOC_CTX
*_mem_save_site_name_0
;
7706 uint32_t _ptr_site_dn
;
7707 TALLOC_CTX
*_mem_save_site_dn_0
;
7708 uint32_t _ptr_computer_dn
;
7709 TALLOC_CTX
*_mem_save_computer_dn_0
;
7710 uint32_t _ptr_server_dn
;
7711 TALLOC_CTX
*_mem_save_server_dn_0
;
7712 uint32_t _ptr_ntds_dn
;
7713 TALLOC_CTX
*_mem_save_ntds_dn_0
;
7714 if (ndr_flags
& NDR_SCALARS
) {
7715 NDR_CHECK(ndr_pull_align(ndr
, 5));
7716 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_name
));
7717 if (_ptr_netbios_name
) {
7718 NDR_PULL_ALLOC(ndr
, r
->netbios_name
);
7720 r
->netbios_name
= NULL
;
7722 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_name
));
7723 if (_ptr_dns_name
) {
7724 NDR_PULL_ALLOC(ndr
, r
->dns_name
);
7728 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_name
));
7729 if (_ptr_site_name
) {
7730 NDR_PULL_ALLOC(ndr
, r
->site_name
);
7732 r
->site_name
= NULL
;
7734 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_dn
));
7736 NDR_PULL_ALLOC(ndr
, r
->site_dn
);
7740 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_dn
));
7741 if (_ptr_computer_dn
) {
7742 NDR_PULL_ALLOC(ndr
, r
->computer_dn
);
7744 r
->computer_dn
= NULL
;
7746 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_dn
));
7747 if (_ptr_server_dn
) {
7748 NDR_PULL_ALLOC(ndr
, r
->server_dn
);
7750 r
->server_dn
= NULL
;
7752 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ntds_dn
));
7754 NDR_PULL_ALLOC(ndr
, r
->ntds_dn
);
7758 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_pdc
));
7759 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_enabled
));
7760 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_gc
));
7761 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->is_rodc
));
7762 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->site_guid
));
7763 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->computer_guid
));
7764 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->server_guid
));
7765 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->ntds_guid
));
7766 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7768 if (ndr_flags
& NDR_BUFFERS
) {
7769 if (r
->netbios_name
) {
7770 _mem_save_netbios_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7771 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_name
, 0);
7772 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_name
));
7773 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->netbios_name
));
7774 if (ndr_get_array_length(ndr
, &r
->netbios_name
) > ndr_get_array_size(ndr
, &r
->netbios_name
)) {
7775 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
));
7777 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t)));
7778 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->netbios_name
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t), CH_UTF16
));
7779 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_name_0
, 0);
7782 _mem_save_dns_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7783 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_name
, 0);
7784 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dns_name
));
7785 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dns_name
));
7786 if (ndr_get_array_length(ndr
, &r
->dns_name
) > ndr_get_array_size(ndr
, &r
->dns_name
)) {
7787 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
));
7789 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t)));
7790 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dns_name
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t), CH_UTF16
));
7791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_name_0
, 0);
7794 _mem_save_site_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7795 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_name
, 0);
7796 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_name
));
7797 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_name
));
7798 if (ndr_get_array_length(ndr
, &r
->site_name
) > ndr_get_array_size(ndr
, &r
->site_name
)) {
7799 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
));
7801 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t)));
7802 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_name
, ndr_get_array_length(ndr
, &r
->site_name
), sizeof(uint16_t), CH_UTF16
));
7803 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_name_0
, 0);
7806 _mem_save_site_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7807 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_dn
, 0);
7808 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_dn
));
7809 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_dn
));
7810 if (ndr_get_array_length(ndr
, &r
->site_dn
) > ndr_get_array_size(ndr
, &r
->site_dn
)) {
7811 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
));
7813 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_dn
), sizeof(uint16_t)));
7814 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_dn
, ndr_get_array_length(ndr
, &r
->site_dn
), sizeof(uint16_t), CH_UTF16
));
7815 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_dn_0
, 0);
7817 if (r
->computer_dn
) {
7818 _mem_save_computer_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7819 NDR_PULL_SET_MEM_CTX(ndr
, r
->computer_dn
, 0);
7820 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->computer_dn
));
7821 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->computer_dn
));
7822 if (ndr_get_array_length(ndr
, &r
->computer_dn
) > ndr_get_array_size(ndr
, &r
->computer_dn
)) {
7823 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
));
7825 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t)));
7826 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->computer_dn
, ndr_get_array_length(ndr
, &r
->computer_dn
), sizeof(uint16_t), CH_UTF16
));
7827 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_dn_0
, 0);
7830 _mem_save_server_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7831 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_dn
, 0);
7832 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_dn
));
7833 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_dn
));
7834 if (ndr_get_array_length(ndr
, &r
->server_dn
) > ndr_get_array_size(ndr
, &r
->server_dn
)) {
7835 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
));
7837 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t)));
7838 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_dn
, ndr_get_array_length(ndr
, &r
->server_dn
), sizeof(uint16_t), CH_UTF16
));
7839 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_dn_0
, 0);
7842 _mem_save_ntds_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7843 NDR_PULL_SET_MEM_CTX(ndr
, r
->ntds_dn
, 0);
7844 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->ntds_dn
));
7845 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->ntds_dn
));
7846 if (ndr_get_array_length(ndr
, &r
->ntds_dn
) > ndr_get_array_size(ndr
, &r
->ntds_dn
)) {
7847 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
));
7849 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->ntds_dn
), sizeof(uint16_t)));
7850 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->ntds_dn
, ndr_get_array_length(ndr
, &r
->ntds_dn
), sizeof(uint16_t), CH_UTF16
));
7851 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ntds_dn_0
, 0);
7854 return NDR_ERR_SUCCESS
;
7857 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfo3(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfo3
*r
)
7859 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfo3");
7861 ndr_print_ptr(ndr
, "netbios_name", r
->netbios_name
);
7863 if (r
->netbios_name
) {
7864 ndr_print_string(ndr
, "netbios_name", r
->netbios_name
);
7867 ndr_print_ptr(ndr
, "dns_name", r
->dns_name
);
7870 ndr_print_string(ndr
, "dns_name", r
->dns_name
);
7873 ndr_print_ptr(ndr
, "site_name", r
->site_name
);
7876 ndr_print_string(ndr
, "site_name", r
->site_name
);
7879 ndr_print_ptr(ndr
, "site_dn", r
->site_dn
);
7882 ndr_print_string(ndr
, "site_dn", r
->site_dn
);
7885 ndr_print_ptr(ndr
, "computer_dn", r
->computer_dn
);
7887 if (r
->computer_dn
) {
7888 ndr_print_string(ndr
, "computer_dn", r
->computer_dn
);
7891 ndr_print_ptr(ndr
, "server_dn", r
->server_dn
);
7894 ndr_print_string(ndr
, "server_dn", r
->server_dn
);
7897 ndr_print_ptr(ndr
, "ntds_dn", r
->ntds_dn
);
7900 ndr_print_string(ndr
, "ntds_dn", r
->ntds_dn
);
7903 ndr_print_uint32(ndr
, "is_pdc", r
->is_pdc
);
7904 ndr_print_uint32(ndr
, "is_enabled", r
->is_enabled
);
7905 ndr_print_uint32(ndr
, "is_gc", r
->is_gc
);
7906 ndr_print_uint32(ndr
, "is_rodc", r
->is_rodc
);
7907 ndr_print_GUID(ndr
, "site_guid", &r
->site_guid
);
7908 ndr_print_GUID(ndr
, "computer_guid", &r
->computer_guid
);
7909 ndr_print_GUID(ndr
, "server_guid", &r
->server_guid
);
7910 ndr_print_GUID(ndr
, "ntds_guid", &r
->ntds_guid
);
7914 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoCtr3(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCInfoCtr3
*r
)
7916 uint32_t cntr_array_1
;
7917 if (ndr_flags
& NDR_SCALARS
) {
7918 NDR_CHECK(ndr_push_align(ndr
, 5));
7919 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7920 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
7921 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
7923 if (ndr_flags
& NDR_BUFFERS
) {
7925 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
7926 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7927 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo3(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
7929 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7930 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo3(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
7934 return NDR_ERR_SUCCESS
;
7937 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoCtr3(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCInfoCtr3
*r
)
7939 uint32_t _ptr_array
;
7940 uint32_t cntr_array_1
;
7941 TALLOC_CTX
*_mem_save_array_0
;
7942 TALLOC_CTX
*_mem_save_array_1
;
7943 if (ndr_flags
& NDR_SCALARS
) {
7944 NDR_CHECK(ndr_pull_align(ndr
, 5));
7945 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
7946 if (r
->count
> 10000) {
7947 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
7949 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
7951 NDR_PULL_ALLOC(ndr
, r
->array
);
7955 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7957 if (ndr_flags
& NDR_BUFFERS
) {
7959 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7960 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
7961 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
7962 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
7963 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7964 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
7965 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7966 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo3(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
7968 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7969 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo3(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
7971 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
7972 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
7975 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
7978 return NDR_ERR_SUCCESS
;
7981 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoCtr3(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCInfoCtr3
*r
)
7983 uint32_t cntr_array_1
;
7984 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCInfoCtr3");
7986 ndr_print_uint32(ndr
, "count", r
->count
);
7987 ndr_print_ptr(ndr
, "array", r
->array
);
7990 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
7992 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
7994 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
7995 ndr_print_drsuapi_DsGetDCInfo3(ndr
, "array", &r
->array
[cntr_array_1
]);
8005 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCConnection01(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCConnection01
*r
)
8007 if (ndr_flags
& NDR_SCALARS
) {
8008 NDR_CHECK(ndr_push_align(ndr
, 5));
8010 uint32_t _flags_save_ipv4address
= ndr
->flags
;
8011 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_BIGENDIAN
);
8012 NDR_CHECK(ndr_push_ipv4address(ndr
, NDR_SCALARS
, r
->client_ip_address
));
8013 ndr
->flags
= _flags_save_ipv4address
;
8015 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
8016 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->connection_time
));
8017 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown4
));
8018 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
8019 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
8020 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->client_account
));
8021 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8023 if (ndr_flags
& NDR_BUFFERS
) {
8024 if (r
->client_account
) {
8025 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client_account
, CH_UTF16
)));
8026 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8027 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client_account
, CH_UTF16
)));
8028 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->client_account
, ndr_charset_length(r
->client_account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8031 return NDR_ERR_SUCCESS
;
8034 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCConnection01(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCConnection01
*r
)
8036 uint32_t _ptr_client_account
;
8037 TALLOC_CTX
*_mem_save_client_account_0
;
8038 if (ndr_flags
& NDR_SCALARS
) {
8039 NDR_CHECK(ndr_pull_align(ndr
, 5));
8041 uint32_t _flags_save_ipv4address
= ndr
->flags
;
8042 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_BIGENDIAN
);
8043 NDR_CHECK(ndr_pull_ipv4address(ndr
, NDR_SCALARS
, &r
->client_ip_address
));
8044 ndr
->flags
= _flags_save_ipv4address
;
8046 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
8047 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->connection_time
));
8048 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown4
));
8049 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
8050 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
8051 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_client_account
));
8052 if (_ptr_client_account
) {
8053 NDR_PULL_ALLOC(ndr
, r
->client_account
);
8055 r
->client_account
= NULL
;
8057 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8059 if (ndr_flags
& NDR_BUFFERS
) {
8060 if (r
->client_account
) {
8061 _mem_save_client_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8062 NDR_PULL_SET_MEM_CTX(ndr
, r
->client_account
, 0);
8063 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->client_account
));
8064 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->client_account
));
8065 if (ndr_get_array_length(ndr
, &r
->client_account
) > ndr_get_array_size(ndr
, &r
->client_account
)) {
8066 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
));
8068 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->client_account
), sizeof(uint16_t)));
8069 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->client_account
, ndr_get_array_length(ndr
, &r
->client_account
), sizeof(uint16_t), CH_UTF16
));
8070 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_client_account_0
, 0);
8073 return NDR_ERR_SUCCESS
;
8076 _PUBLIC_
void ndr_print_drsuapi_DsGetDCConnection01(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCConnection01
*r
)
8078 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCConnection01");
8080 ndr_print_ipv4address(ndr
, "client_ip_address", r
->client_ip_address
);
8081 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
8082 ndr_print_uint32(ndr
, "connection_time", r
->connection_time
);
8083 ndr_print_uint32(ndr
, "unknown4", r
->unknown4
);
8084 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
8085 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
8086 ndr_print_ptr(ndr
, "client_account", r
->client_account
);
8088 if (r
->client_account
) {
8089 ndr_print_string(ndr
, "client_account", r
->client_account
);
8095 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCConnectionCtr01(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetDCConnectionCtr01
*r
)
8097 uint32_t cntr_array_1
;
8098 if (ndr_flags
& NDR_SCALARS
) {
8099 NDR_CHECK(ndr_push_align(ndr
, 5));
8100 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
8101 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
8102 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8104 if (ndr_flags
& NDR_BUFFERS
) {
8106 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
8107 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
8108 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnection01(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
8110 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
8111 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnection01(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
8115 return NDR_ERR_SUCCESS
;
8118 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCConnectionCtr01(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetDCConnectionCtr01
*r
)
8120 uint32_t _ptr_array
;
8121 uint32_t cntr_array_1
;
8122 TALLOC_CTX
*_mem_save_array_0
;
8123 TALLOC_CTX
*_mem_save_array_1
;
8124 if (ndr_flags
& NDR_SCALARS
) {
8125 NDR_CHECK(ndr_pull_align(ndr
, 5));
8126 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
8127 if (r
->count
> 10000) {
8128 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
8130 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
8132 NDR_PULL_ALLOC(ndr
, r
->array
);
8136 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8138 if (ndr_flags
& NDR_BUFFERS
) {
8140 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8141 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
8142 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
8143 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
8144 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8145 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
8146 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
8147 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnection01(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
8149 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
8150 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnection01(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
8152 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
8153 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
8156 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
8159 return NDR_ERR_SUCCESS
;
8162 _PUBLIC_
void ndr_print_drsuapi_DsGetDCConnectionCtr01(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetDCConnectionCtr01
*r
)
8164 uint32_t cntr_array_1
;
8165 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDCConnectionCtr01");
8167 ndr_print_uint32(ndr
, "count", r
->count
);
8168 ndr_print_ptr(ndr
, "array", r
->array
);
8171 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
8173 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
8175 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
8176 ndr_print_drsuapi_DsGetDCConnection01(ndr
, "array", &r
->array
[cntr_array_1
]);
8186 static enum ndr_err_code
ndr_push_drsuapi_DsGetDCInfoCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetDCInfoCtr
*r
)
8188 if (ndr_flags
& NDR_SCALARS
) {
8189 int level
= ndr_push_get_switch_value(ndr
, r
);
8190 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
8191 NDR_CHECK(ndr_push_union_align(ndr
, 5));
8193 case DRSUAPI_DC_INFO_CTR_1
: {
8194 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
8197 case DRSUAPI_DC_INFO_CTR_2
: {
8198 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
8201 case DRSUAPI_DC_INFO_CTR_3
: {
8202 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr3(ndr
, NDR_SCALARS
, &r
->ctr3
));
8205 case DRSUAPI_DC_CONNECTION_CTR_01
: {
8206 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnectionCtr01(ndr
, NDR_SCALARS
, &r
->ctr01
));
8210 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8213 if (ndr_flags
& NDR_BUFFERS
) {
8214 int level
= ndr_push_get_switch_value(ndr
, r
);
8216 case DRSUAPI_DC_INFO_CTR_1
:
8217 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
8220 case DRSUAPI_DC_INFO_CTR_2
:
8221 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
8224 case DRSUAPI_DC_INFO_CTR_3
:
8225 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr3(ndr
, NDR_BUFFERS
, &r
->ctr3
));
8228 case DRSUAPI_DC_CONNECTION_CTR_01
:
8229 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnectionCtr01(ndr
, NDR_BUFFERS
, &r
->ctr01
));
8233 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8236 return NDR_ERR_SUCCESS
;
8239 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDCInfoCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetDCInfoCtr
*r
)
8243 level
= ndr_pull_get_switch_value(ndr
, r
);
8244 if (ndr_flags
& NDR_SCALARS
) {
8245 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
8246 if (_level
!= level
) {
8247 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
8249 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
8251 case DRSUAPI_DC_INFO_CTR_1
: {
8252 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
8255 case DRSUAPI_DC_INFO_CTR_2
: {
8256 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
8259 case DRSUAPI_DC_INFO_CTR_3
: {
8260 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr3(ndr
, NDR_SCALARS
, &r
->ctr3
));
8263 case DRSUAPI_DC_CONNECTION_CTR_01
: {
8264 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnectionCtr01(ndr
, NDR_SCALARS
, &r
->ctr01
));
8268 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8271 if (ndr_flags
& NDR_BUFFERS
) {
8273 case DRSUAPI_DC_INFO_CTR_1
:
8274 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
8277 case DRSUAPI_DC_INFO_CTR_2
:
8278 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
8281 case DRSUAPI_DC_INFO_CTR_3
:
8282 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr3(ndr
, NDR_BUFFERS
, &r
->ctr3
));
8285 case DRSUAPI_DC_CONNECTION_CTR_01
:
8286 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnectionCtr01(ndr
, NDR_BUFFERS
, &r
->ctr01
));
8290 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8293 return NDR_ERR_SUCCESS
;
8296 _PUBLIC_
void ndr_print_drsuapi_DsGetDCInfoCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetDCInfoCtr
*r
)
8299 level
= ndr_print_get_switch_value(ndr
, r
);
8300 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetDCInfoCtr");
8302 case DRSUAPI_DC_INFO_CTR_1
:
8303 ndr_print_drsuapi_DsGetDCInfoCtr1(ndr
, "ctr1", &r
->ctr1
);
8306 case DRSUAPI_DC_INFO_CTR_2
:
8307 ndr_print_drsuapi_DsGetDCInfoCtr2(ndr
, "ctr2", &r
->ctr2
);
8310 case DRSUAPI_DC_INFO_CTR_3
:
8311 ndr_print_drsuapi_DsGetDCInfoCtr3(ndr
, "ctr3", &r
->ctr3
);
8314 case DRSUAPI_DC_CONNECTION_CTR_01
:
8315 ndr_print_drsuapi_DsGetDCConnectionCtr01(ndr
, "ctr01", &r
->ctr01
);
8319 ndr_print_bad_level(ndr
, name
, level
);
8323 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectListItem(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectListItem
*r
)
8325 if (ndr_flags
& NDR_SCALARS
) {
8326 NDR_CHECK(ndr_push_align(ndr
, 5));
8327 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->next_object
));
8328 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr
, NDR_SCALARS
, &r
->object
));
8329 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8331 if (ndr_flags
& NDR_BUFFERS
) {
8332 if (r
->next_object
) {
8333 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next_object
));
8335 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr
, NDR_BUFFERS
, &r
->object
));
8337 return NDR_ERR_SUCCESS
;
8340 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectListItem(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectListItem
*r
)
8342 uint32_t _ptr_next_object
;
8343 TALLOC_CTX
*_mem_save_next_object_0
;
8344 if (ndr_flags
& NDR_SCALARS
) {
8345 NDR_CHECK(ndr_pull_align(ndr
, 5));
8346 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_next_object
));
8347 if (_ptr_next_object
) {
8348 NDR_PULL_ALLOC(ndr
, r
->next_object
);
8350 r
->next_object
= NULL
;
8352 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr
, NDR_SCALARS
, &r
->object
));
8353 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8355 if (ndr_flags
& NDR_BUFFERS
) {
8356 if (r
->next_object
) {
8357 _mem_save_next_object_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8358 NDR_PULL_SET_MEM_CTX(ndr
, r
->next_object
, 0);
8359 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next_object
));
8360 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_next_object_0
, 0);
8362 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr
, NDR_BUFFERS
, &r
->object
));
8364 return NDR_ERR_SUCCESS
;
8367 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryRequest2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryRequest2
*r
)
8369 if (ndr_flags
& NDR_SCALARS
) {
8370 NDR_CHECK(ndr_push_align(ndr
, 5));
8371 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr
, NDR_SCALARS
, &r
->first_object
));
8372 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8374 if (ndr_flags
& NDR_BUFFERS
) {
8375 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr
, NDR_BUFFERS
, &r
->first_object
));
8377 return NDR_ERR_SUCCESS
;
8380 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryRequest2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryRequest2
*r
)
8382 if (ndr_flags
& NDR_SCALARS
) {
8383 NDR_CHECK(ndr_pull_align(ndr
, 5));
8384 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr
, NDR_SCALARS
, &r
->first_object
));
8385 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8387 if (ndr_flags
& NDR_BUFFERS
) {
8388 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr
, NDR_BUFFERS
, &r
->first_object
));
8390 return NDR_ERR_SUCCESS
;
8393 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryRequest2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryRequest2
*r
)
8395 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryRequest2");
8397 ndr_print_drsuapi_DsReplicaObjectListItem(ndr
, "first_object", &r
->first_object
);
8401 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsAddEntryRequest
*r
)
8403 if (ndr_flags
& NDR_SCALARS
) {
8404 int level
= ndr_push_get_switch_value(ndr
, r
);
8405 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
8406 NDR_CHECK(ndr_push_union_align(ndr
, 5));
8409 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest2(ndr
, NDR_SCALARS
, &r
->req2
));
8413 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8416 if (ndr_flags
& NDR_BUFFERS
) {
8417 int level
= ndr_push_get_switch_value(ndr
, r
);
8420 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest2(ndr
, NDR_BUFFERS
, &r
->req2
));
8424 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8427 return NDR_ERR_SUCCESS
;
8430 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsAddEntryRequest
*r
)
8434 level
= ndr_pull_get_switch_value(ndr
, r
);
8435 if (ndr_flags
& NDR_SCALARS
) {
8436 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
8437 if (_level
!= level
) {
8438 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
8440 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
8443 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest2(ndr
, NDR_SCALARS
, &r
->req2
));
8447 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8450 if (ndr_flags
& NDR_BUFFERS
) {
8453 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest2(ndr
, NDR_BUFFERS
, &r
->req2
));
8457 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8460 return NDR_ERR_SUCCESS
;
8463 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsAddEntryRequest
*r
)
8466 level
= ndr_print_get_switch_value(ndr
, r
);
8467 ndr_print_union(ndr
, name
, level
, "drsuapi_DsAddEntryRequest");
8470 ndr_print_drsuapi_DsAddEntryRequest2(ndr
, "req2", &r
->req2
);
8474 ndr_print_bad_level(ndr
, name
, level
);
8478 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryErrorInfoX(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryErrorInfoX
*r
)
8480 if (ndr_flags
& NDR_SCALARS
) {
8481 NDR_CHECK(ndr_push_align(ndr
, 4));
8482 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
8483 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->status
));
8484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
8485 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->unknown3
));
8486 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
8488 if (ndr_flags
& NDR_BUFFERS
) {
8490 return NDR_ERR_SUCCESS
;
8493 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryErrorInfoX(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryErrorInfoX
*r
)
8495 if (ndr_flags
& NDR_SCALARS
) {
8496 NDR_CHECK(ndr_pull_align(ndr
, 4));
8497 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
8498 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->status
));
8499 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
8500 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown3
));
8501 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
8503 if (ndr_flags
& NDR_BUFFERS
) {
8505 return NDR_ERR_SUCCESS
;
8508 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryErrorInfoX(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryErrorInfoX
*r
)
8510 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryErrorInfoX");
8512 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
8513 ndr_print_WERROR(ndr
, "status", r
->status
);
8514 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
8515 ndr_print_uint16(ndr
, "unknown3", r
->unknown3
);
8519 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryExtraErrorBuffer(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryExtraErrorBuffer
*r
)
8521 if (ndr_flags
& NDR_SCALARS
) {
8522 NDR_CHECK(ndr_push_align(ndr
, 5));
8523 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
8524 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
8525 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8527 if (ndr_flags
& NDR_BUFFERS
) {
8529 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->size
));
8530 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->size
));
8533 return NDR_ERR_SUCCESS
;
8536 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryExtraErrorBuffer(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryExtraErrorBuffer
*r
)
8539 TALLOC_CTX
*_mem_save_data_0
;
8540 if (ndr_flags
& NDR_SCALARS
) {
8541 NDR_CHECK(ndr_pull_align(ndr
, 5));
8542 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
8543 if (r
->size
> 10485760) {
8544 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
8546 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
8548 NDR_PULL_ALLOC(ndr
, r
->data
);
8552 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8554 if (ndr_flags
& NDR_BUFFERS
) {
8556 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8557 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
8558 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
8559 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
8560 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
8561 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
8564 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
8567 return NDR_ERR_SUCCESS
;
8570 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryExtraErrorBuffer(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryExtraErrorBuffer
*r
)
8572 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryExtraErrorBuffer");
8574 ndr_print_uint32(ndr
, "size", r
->size
);
8575 ndr_print_ptr(ndr
, "data", r
->data
);
8578 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->size
);
8584 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryExtraError1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryExtraError1
*r
)
8586 if (ndr_flags
& NDR_SCALARS
) {
8587 NDR_CHECK(ndr_push_align(ndr
, 5));
8588 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->error
));
8589 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, r
->attid
));
8590 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
8591 NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraErrorBuffer(ndr
, NDR_SCALARS
, &r
->buffer
));
8592 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8594 if (ndr_flags
& NDR_BUFFERS
) {
8595 NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraErrorBuffer(ndr
, NDR_BUFFERS
, &r
->buffer
));
8597 return NDR_ERR_SUCCESS
;
8600 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryExtraError1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryExtraError1
*r
)
8602 if (ndr_flags
& NDR_SCALARS
) {
8603 NDR_CHECK(ndr_pull_align(ndr
, 5));
8604 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->error
));
8605 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr
, NDR_SCALARS
, &r
->attid
));
8606 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
8607 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraErrorBuffer(ndr
, NDR_SCALARS
, &r
->buffer
));
8608 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8610 if (ndr_flags
& NDR_BUFFERS
) {
8611 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraErrorBuffer(ndr
, NDR_BUFFERS
, &r
->buffer
));
8613 return NDR_ERR_SUCCESS
;
8616 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryExtraError1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryExtraError1
*r
)
8618 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryExtraError1");
8620 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "error", &r
->error
);
8621 ndr_print_drsuapi_DsAttributeId(ndr
, "attid", r
->attid
);
8622 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
8623 ndr_print_drsuapi_DsAddEntryExtraErrorBuffer(ndr
, "buffer", &r
->buffer
);
8627 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryErrorListItem1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryErrorListItem1
*r
)
8629 if (ndr_flags
& NDR_SCALARS
) {
8630 NDR_CHECK(ndr_push_align(ndr
, 5));
8631 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->next
));
8632 NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraError1(ndr
, NDR_SCALARS
, &r
->error
));
8633 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8635 if (ndr_flags
& NDR_BUFFERS
) {
8637 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next
));
8639 NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraError1(ndr
, NDR_BUFFERS
, &r
->error
));
8641 return NDR_ERR_SUCCESS
;
8644 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryErrorListItem1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryErrorListItem1
*r
)
8647 TALLOC_CTX
*_mem_save_next_0
;
8648 if (ndr_flags
& NDR_SCALARS
) {
8649 NDR_CHECK(ndr_pull_align(ndr
, 5));
8650 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_next
));
8652 NDR_PULL_ALLOC(ndr
, r
->next
);
8656 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraError1(ndr
, NDR_SCALARS
, &r
->error
));
8657 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8659 if (ndr_flags
& NDR_BUFFERS
) {
8661 _mem_save_next_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8662 NDR_PULL_SET_MEM_CTX(ndr
, r
->next
, 0);
8663 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->next
));
8664 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_next_0
, 0);
8666 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraError1(ndr
, NDR_BUFFERS
, &r
->error
));
8668 return NDR_ERR_SUCCESS
;
8671 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryErrorListItem1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryErrorListItem1
*r
)
8673 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryErrorListItem1");
8675 ndr_print_ptr(ndr
, "next", r
->next
);
8678 ndr_print_drsuapi_DsAddEntryErrorListItem1(ndr
, "next", r
->next
);
8681 ndr_print_drsuapi_DsAddEntryExtraError1(ndr
, "error", &r
->error
);
8685 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryErrorInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryErrorInfo1
*r
)
8687 if (ndr_flags
& NDR_SCALARS
) {
8688 NDR_CHECK(ndr_push_align(ndr
, 5));
8689 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->id
));
8690 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->status
));
8691 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_SCALARS
, &r
->first
));
8692 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8694 if (ndr_flags
& NDR_BUFFERS
) {
8696 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
8698 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_BUFFERS
, &r
->first
));
8700 return NDR_ERR_SUCCESS
;
8703 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryErrorInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryErrorInfo1
*r
)
8706 TALLOC_CTX
*_mem_save_id_0
;
8707 if (ndr_flags
& NDR_SCALARS
) {
8708 NDR_CHECK(ndr_pull_align(ndr
, 5));
8709 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_id
));
8711 NDR_PULL_ALLOC(ndr
, r
->id
);
8715 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->status
));
8716 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_SCALARS
, &r
->first
));
8717 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8719 if (ndr_flags
& NDR_BUFFERS
) {
8721 _mem_save_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8722 NDR_PULL_SET_MEM_CTX(ndr
, r
->id
, 0);
8723 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
8724 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_id_0
, 0);
8726 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorListItem1(ndr
, NDR_BUFFERS
, &r
->first
));
8728 return NDR_ERR_SUCCESS
;
8731 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryErrorInfo1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryErrorInfo1
*r
)
8733 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryErrorInfo1");
8735 ndr_print_ptr(ndr
, "id", r
->id
);
8738 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "id", r
->id
);
8741 ndr_print_WERROR(ndr
, "status", r
->status
);
8742 ndr_print_drsuapi_DsAddEntryErrorListItem1(ndr
, "first", &r
->first
);
8746 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryErrorInfo(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsAddEntryErrorInfo
*r
)
8748 if (ndr_flags
& NDR_SCALARS
) {
8749 int level
= ndr_push_get_switch_value(ndr
, r
);
8750 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
8751 NDR_CHECK(ndr_push_union_align(ndr
, 5));
8754 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo1(ndr
, NDR_SCALARS
, &r
->error1
));
8758 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
8762 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
8766 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
8770 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
8774 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8777 if (ndr_flags
& NDR_BUFFERS
) {
8778 int level
= ndr_push_get_switch_value(ndr
, r
);
8781 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo1(ndr
, NDR_BUFFERS
, &r
->error1
));
8797 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8800 return NDR_ERR_SUCCESS
;
8803 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryErrorInfo(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsAddEntryErrorInfo
*r
)
8807 level
= ndr_pull_get_switch_value(ndr
, r
);
8808 if (ndr_flags
& NDR_SCALARS
) {
8809 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
8810 if (_level
!= level
) {
8811 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
8813 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
8816 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo1(ndr
, NDR_SCALARS
, &r
->error1
));
8820 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
8824 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
8828 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
8832 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->errorX
));
8836 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8839 if (ndr_flags
& NDR_BUFFERS
) {
8842 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo1(ndr
, NDR_BUFFERS
, &r
->error1
));
8858 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8861 return NDR_ERR_SUCCESS
;
8864 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryErrorInfo(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsAddEntryErrorInfo
*r
)
8867 level
= ndr_print_get_switch_value(ndr
, r
);
8868 ndr_print_union(ndr
, name
, level
, "drsuapi_DsAddEntryErrorInfo");
8871 ndr_print_drsuapi_DsAddEntryErrorInfo1(ndr
, "error1", &r
->error1
);
8875 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "errorX", &r
->errorX
);
8879 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "errorX", &r
->errorX
);
8883 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "errorX", &r
->errorX
);
8887 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "errorX", &r
->errorX
);
8891 ndr_print_bad_level(ndr
, name
, level
);
8895 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryError1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryError1
*r
)
8897 if (ndr_flags
& NDR_SCALARS
) {
8898 NDR_CHECK(ndr_push_align(ndr
, 5));
8899 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->status
));
8900 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
8901 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info
));
8902 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8904 if (ndr_flags
& NDR_BUFFERS
) {
8906 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->info
, r
->level
));
8907 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info
));
8910 return NDR_ERR_SUCCESS
;
8913 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryError1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryError1
*r
)
8916 TALLOC_CTX
*_mem_save_info_0
;
8917 if (ndr_flags
& NDR_SCALARS
) {
8918 NDR_CHECK(ndr_pull_align(ndr
, 5));
8919 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->status
));
8920 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
8921 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
8923 NDR_PULL_ALLOC(ndr
, r
->info
);
8927 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8929 if (ndr_flags
& NDR_BUFFERS
) {
8931 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8932 NDR_PULL_SET_MEM_CTX(ndr
, r
->info
, 0);
8933 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->info
, r
->level
));
8934 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info
));
8935 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
8938 return NDR_ERR_SUCCESS
;
8941 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryError1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryError1
*r
)
8943 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryError1");
8945 ndr_print_WERROR(ndr
, "status", r
->status
);
8946 ndr_print_uint32(ndr
, "level", r
->level
);
8947 ndr_print_ptr(ndr
, "info", r
->info
);
8950 ndr_print_set_switch_value(ndr
, r
->info
, r
->level
);
8951 ndr_print_drsuapi_DsAddEntryErrorInfo(ndr
, "info", r
->info
);
8957 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryError(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsAddEntryError
*r
)
8959 if (ndr_flags
& NDR_SCALARS
) {
8960 int level
= ndr_push_get_switch_value(ndr
, r
);
8961 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
8962 NDR_CHECK(ndr_push_union_align(ndr
, 5));
8965 NDR_CHECK(ndr_push_drsuapi_DsAddEntryError1(ndr
, NDR_SCALARS
, &r
->info1
));
8969 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8972 if (ndr_flags
& NDR_BUFFERS
) {
8973 int level
= ndr_push_get_switch_value(ndr
, r
);
8976 NDR_CHECK(ndr_push_drsuapi_DsAddEntryError1(ndr
, NDR_BUFFERS
, &r
->info1
));
8980 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
8983 return NDR_ERR_SUCCESS
;
8986 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryError(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsAddEntryError
*r
)
8990 level
= ndr_pull_get_switch_value(ndr
, r
);
8991 if (ndr_flags
& NDR_SCALARS
) {
8992 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
8993 if (_level
!= level
) {
8994 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
8996 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
8999 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryError1(ndr
, NDR_SCALARS
, &r
->info1
));
9003 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9006 if (ndr_flags
& NDR_BUFFERS
) {
9009 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryError1(ndr
, NDR_BUFFERS
, &r
->info1
));
9013 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9016 return NDR_ERR_SUCCESS
;
9019 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryError(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsAddEntryError
*r
)
9022 level
= ndr_print_get_switch_value(ndr
, r
);
9023 ndr_print_union(ndr
, name
, level
, "drsuapi_DsAddEntryError");
9026 ndr_print_drsuapi_DsAddEntryError1(ndr
, "info1", &r
->info1
);
9030 ndr_print_bad_level(ndr
, name
, level
);
9034 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjectIdentifier2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjectIdentifier2
*r
)
9036 if (ndr_flags
& NDR_SCALARS
) {
9037 NDR_CHECK(ndr_push_align(ndr
, 4));
9038 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
9039 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
9040 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
9042 if (ndr_flags
& NDR_BUFFERS
) {
9043 NDR_CHECK(ndr_push_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
9045 return NDR_ERR_SUCCESS
;
9048 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjectIdentifier2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjectIdentifier2
*r
)
9050 if (ndr_flags
& NDR_SCALARS
) {
9051 NDR_CHECK(ndr_pull_align(ndr
, 4));
9052 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
9053 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_SCALARS
, &r
->sid
));
9054 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
9056 if (ndr_flags
& NDR_BUFFERS
) {
9057 NDR_CHECK(ndr_pull_dom_sid28(ndr
, NDR_BUFFERS
, &r
->sid
));
9059 return NDR_ERR_SUCCESS
;
9062 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjectIdentifier2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjectIdentifier2
*r
)
9064 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjectIdentifier2");
9066 ndr_print_GUID(ndr
, "guid", &r
->guid
);
9067 ndr_print_dom_sid28(ndr
, "sid", &r
->sid
);
9071 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryCtr2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryCtr2
*r
)
9073 uint32_t cntr_objects_1
;
9074 if (ndr_flags
& NDR_SCALARS
) {
9075 NDR_CHECK(ndr_push_align(ndr
, 5));
9076 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->id
));
9077 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
9078 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->error
));
9079 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9080 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->objects
));
9081 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
9083 if (ndr_flags
& NDR_BUFFERS
) {
9085 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
9088 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
9089 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
9090 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_SCALARS
, &r
->objects
[cntr_objects_1
]));
9092 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
9093 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_BUFFERS
, &r
->objects
[cntr_objects_1
]));
9097 return NDR_ERR_SUCCESS
;
9100 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryCtr2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryCtr2
*r
)
9103 TALLOC_CTX
*_mem_save_id_0
;
9104 uint32_t _ptr_objects
;
9105 uint32_t cntr_objects_1
;
9106 TALLOC_CTX
*_mem_save_objects_0
;
9107 TALLOC_CTX
*_mem_save_objects_1
;
9108 if (ndr_flags
& NDR_SCALARS
) {
9109 NDR_CHECK(ndr_pull_align(ndr
, 5));
9110 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_id
));
9112 NDR_PULL_ALLOC(ndr
, r
->id
);
9116 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
9117 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr
, NDR_SCALARS
, &r
->error
));
9118 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
9119 if (r
->count
> 10000) {
9120 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
9122 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_objects
));
9124 NDR_PULL_ALLOC(ndr
, r
->objects
);
9128 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
9130 if (ndr_flags
& NDR_BUFFERS
) {
9132 _mem_save_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9133 NDR_PULL_SET_MEM_CTX(ndr
, r
->id
, 0);
9134 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
9135 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_id_0
, 0);
9138 _mem_save_objects_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9139 NDR_PULL_SET_MEM_CTX(ndr
, r
->objects
, 0);
9140 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->objects
));
9141 NDR_PULL_ALLOC_N(ndr
, r
->objects
, ndr_get_array_size(ndr
, &r
->objects
));
9142 _mem_save_objects_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9143 NDR_PULL_SET_MEM_CTX(ndr
, r
->objects
, 0);
9144 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
9145 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_SCALARS
, &r
->objects
[cntr_objects_1
]));
9147 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
9148 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_BUFFERS
, &r
->objects
[cntr_objects_1
]));
9150 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objects_1
, 0);
9151 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objects_0
, 0);
9154 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->objects
, r
->count
));
9157 return NDR_ERR_SUCCESS
;
9160 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryCtr2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryCtr2
*r
)
9162 uint32_t cntr_objects_1
;
9163 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryCtr2");
9165 ndr_print_ptr(ndr
, "id", r
->id
);
9168 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "id", r
->id
);
9171 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
9172 ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr
, "error", &r
->error
);
9173 ndr_print_uint32(ndr
, "count", r
->count
);
9174 ndr_print_ptr(ndr
, "objects", r
->objects
);
9177 ndr
->print(ndr
, "%s: ARRAY(%d)", "objects", (int)r
->count
);
9179 for (cntr_objects_1
=0;cntr_objects_1
<r
->count
;cntr_objects_1
++) {
9181 if (asprintf(&idx_1
, "[%d]", cntr_objects_1
) != -1) {
9182 ndr_print_drsuapi_DsReplicaObjectIdentifier2(ndr
, "objects", &r
->objects
[cntr_objects_1
]);
9192 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryCtr3(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsAddEntryCtr3
*r
)
9194 uint32_t cntr_objects_1
;
9195 if (ndr_flags
& NDR_SCALARS
) {
9196 NDR_CHECK(ndr_push_align(ndr
, 5));
9197 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->id
));
9198 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
9199 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->error
));
9200 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
9201 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->objects
));
9202 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
9204 if (ndr_flags
& NDR_BUFFERS
) {
9206 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
9209 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->error
, r
->level
));
9210 NDR_CHECK(ndr_push_drsuapi_DsAddEntryError(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->error
));
9213 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
9214 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
9215 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_SCALARS
, &r
->objects
[cntr_objects_1
]));
9217 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
9218 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_BUFFERS
, &r
->objects
[cntr_objects_1
]));
9222 return NDR_ERR_SUCCESS
;
9225 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryCtr3(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsAddEntryCtr3
*r
)
9228 TALLOC_CTX
*_mem_save_id_0
;
9229 uint32_t _ptr_error
;
9230 TALLOC_CTX
*_mem_save_error_0
;
9231 uint32_t _ptr_objects
;
9232 uint32_t cntr_objects_1
;
9233 TALLOC_CTX
*_mem_save_objects_0
;
9234 TALLOC_CTX
*_mem_save_objects_1
;
9235 if (ndr_flags
& NDR_SCALARS
) {
9236 NDR_CHECK(ndr_pull_align(ndr
, 5));
9237 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_id
));
9239 NDR_PULL_ALLOC(ndr
, r
->id
);
9243 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
9244 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_error
));
9246 NDR_PULL_ALLOC(ndr
, r
->error
);
9250 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
9251 if (r
->count
> 10000) {
9252 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
9254 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_objects
));
9256 NDR_PULL_ALLOC(ndr
, r
->objects
);
9260 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
9262 if (ndr_flags
& NDR_BUFFERS
) {
9264 _mem_save_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9265 NDR_PULL_SET_MEM_CTX(ndr
, r
->id
, 0);
9266 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->id
));
9267 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_id_0
, 0);
9270 _mem_save_error_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9271 NDR_PULL_SET_MEM_CTX(ndr
, r
->error
, 0);
9272 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->error
, r
->level
));
9273 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryError(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->error
));
9274 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_error_0
, 0);
9277 _mem_save_objects_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9278 NDR_PULL_SET_MEM_CTX(ndr
, r
->objects
, 0);
9279 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->objects
));
9280 NDR_PULL_ALLOC_N(ndr
, r
->objects
, ndr_get_array_size(ndr
, &r
->objects
));
9281 _mem_save_objects_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9282 NDR_PULL_SET_MEM_CTX(ndr
, r
->objects
, 0);
9283 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
9284 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_SCALARS
, &r
->objects
[cntr_objects_1
]));
9286 for (cntr_objects_1
= 0; cntr_objects_1
< r
->count
; cntr_objects_1
++) {
9287 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr
, NDR_BUFFERS
, &r
->objects
[cntr_objects_1
]));
9289 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objects_1
, 0);
9290 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objects_0
, 0);
9293 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->objects
, r
->count
));
9296 return NDR_ERR_SUCCESS
;
9299 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryCtr3(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsAddEntryCtr3
*r
)
9301 uint32_t cntr_objects_1
;
9302 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntryCtr3");
9304 ndr_print_ptr(ndr
, "id", r
->id
);
9307 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr
, "id", r
->id
);
9310 ndr_print_uint32(ndr
, "level", r
->level
);
9311 ndr_print_ptr(ndr
, "error", r
->error
);
9314 ndr_print_set_switch_value(ndr
, r
->error
, r
->level
);
9315 ndr_print_drsuapi_DsAddEntryError(ndr
, "error", r
->error
);
9318 ndr_print_uint32(ndr
, "count", r
->count
);
9319 ndr_print_ptr(ndr
, "objects", r
->objects
);
9322 ndr
->print(ndr
, "%s: ARRAY(%d)", "objects", (int)r
->count
);
9324 for (cntr_objects_1
=0;cntr_objects_1
<r
->count
;cntr_objects_1
++) {
9326 if (asprintf(&idx_1
, "[%d]", cntr_objects_1
) != -1) {
9327 ndr_print_drsuapi_DsReplicaObjectIdentifier2(ndr
, "objects", &r
->objects
[cntr_objects_1
]);
9337 static enum ndr_err_code
ndr_push_drsuapi_DsAddEntryCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsAddEntryCtr
*r
)
9339 if (ndr_flags
& NDR_SCALARS
) {
9340 int level
= ndr_push_get_switch_value(ndr
, r
);
9341 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
9342 NDR_CHECK(ndr_push_union_align(ndr
, 5));
9345 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
9349 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr3(ndr
, NDR_SCALARS
, &r
->ctr3
));
9353 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9356 if (ndr_flags
& NDR_BUFFERS
) {
9357 int level
= ndr_push_get_switch_value(ndr
, r
);
9360 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
9364 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr3(ndr
, NDR_BUFFERS
, &r
->ctr3
));
9368 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9371 return NDR_ERR_SUCCESS
;
9374 static enum ndr_err_code
ndr_pull_drsuapi_DsAddEntryCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsAddEntryCtr
*r
)
9378 level
= ndr_pull_get_switch_value(ndr
, r
);
9379 if (ndr_flags
& NDR_SCALARS
) {
9380 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
9381 if (_level
!= level
) {
9382 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
9384 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
9387 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr2(ndr
, NDR_SCALARS
, &r
->ctr2
));
9391 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr3(ndr
, NDR_SCALARS
, &r
->ctr3
));
9395 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9398 if (ndr_flags
& NDR_BUFFERS
) {
9401 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr2(ndr
, NDR_BUFFERS
, &r
->ctr2
));
9405 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr3(ndr
, NDR_BUFFERS
, &r
->ctr3
));
9409 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9412 return NDR_ERR_SUCCESS
;
9415 _PUBLIC_
void ndr_print_drsuapi_DsAddEntryCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsAddEntryCtr
*r
)
9418 level
= ndr_print_get_switch_value(ndr
, r
);
9419 ndr_print_union(ndr
, name
, level
, "drsuapi_DsAddEntryCtr");
9422 ndr_print_drsuapi_DsAddEntryCtr2(ndr
, "ctr2", &r
->ctr2
);
9426 ndr_print_drsuapi_DsAddEntryCtr3(ndr
, "ctr3", &r
->ctr3
);
9430 ndr_print_bad_level(ndr
, name
, level
);
9434 static enum ndr_err_code
ndr_push_drsuapi_DsExecuteKCCFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
9436 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
9437 return NDR_ERR_SUCCESS
;
9440 static enum ndr_err_code
ndr_pull_drsuapi_DsExecuteKCCFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
9443 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
9445 return NDR_ERR_SUCCESS
;
9448 _PUBLIC_
void ndr_print_drsuapi_DsExecuteKCCFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
9450 ndr_print_uint32(ndr
, name
, r
);
9452 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION
, r
);
9453 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DRSUAPI_DS_EXECUTE_KCC_DAMPED", DRSUAPI_DS_EXECUTE_KCC_DAMPED
, r
);
9457 static enum ndr_err_code
ndr_push_drsuapi_DsExecuteKCC1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsExecuteKCC1
*r
)
9459 if (ndr_flags
& NDR_SCALARS
) {
9460 NDR_CHECK(ndr_push_align(ndr
, 4));
9461 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->taskID
));
9462 NDR_CHECK(ndr_push_drsuapi_DsExecuteKCCFlags(ndr
, NDR_SCALARS
, r
->flags
));
9463 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
9465 if (ndr_flags
& NDR_BUFFERS
) {
9467 return NDR_ERR_SUCCESS
;
9470 static enum ndr_err_code
ndr_pull_drsuapi_DsExecuteKCC1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsExecuteKCC1
*r
)
9472 if (ndr_flags
& NDR_SCALARS
) {
9473 NDR_CHECK(ndr_pull_align(ndr
, 4));
9474 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->taskID
));
9475 NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCCFlags(ndr
, NDR_SCALARS
, &r
->flags
));
9476 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
9478 if (ndr_flags
& NDR_BUFFERS
) {
9480 return NDR_ERR_SUCCESS
;
9483 _PUBLIC_
void ndr_print_drsuapi_DsExecuteKCC1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsExecuteKCC1
*r
)
9485 ndr_print_struct(ndr
, name
, "drsuapi_DsExecuteKCC1");
9487 ndr_print_uint32(ndr
, "taskID", r
->taskID
);
9488 ndr_print_drsuapi_DsExecuteKCCFlags(ndr
, "flags", r
->flags
);
9492 static enum ndr_err_code
ndr_push_drsuapi_DsExecuteKCCRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsExecuteKCCRequest
*r
)
9494 if (ndr_flags
& NDR_SCALARS
) {
9495 int level
= ndr_push_get_switch_value(ndr
, r
);
9496 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
9497 NDR_CHECK(ndr_push_union_align(ndr
, 4));
9500 NDR_CHECK(ndr_push_drsuapi_DsExecuteKCC1(ndr
, NDR_SCALARS
, &r
->ctr1
));
9504 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9507 if (ndr_flags
& NDR_BUFFERS
) {
9508 int level
= ndr_push_get_switch_value(ndr
, r
);
9514 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9517 return NDR_ERR_SUCCESS
;
9520 static enum ndr_err_code
ndr_pull_drsuapi_DsExecuteKCCRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsExecuteKCCRequest
*r
)
9524 level
= ndr_pull_get_switch_value(ndr
, r
);
9525 if (ndr_flags
& NDR_SCALARS
) {
9526 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
9527 if (_level
!= level
) {
9528 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
9530 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
9533 NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCC1(ndr
, NDR_SCALARS
, &r
->ctr1
));
9537 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9540 if (ndr_flags
& NDR_BUFFERS
) {
9546 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9549 return NDR_ERR_SUCCESS
;
9552 _PUBLIC_
void ndr_print_drsuapi_DsExecuteKCCRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsExecuteKCCRequest
*r
)
9555 level
= ndr_print_get_switch_value(ndr
, r
);
9556 ndr_print_union(ndr
, name
, level
, "drsuapi_DsExecuteKCCRequest");
9559 ndr_print_drsuapi_DsExecuteKCC1(ndr
, "ctr1", &r
->ctr1
);
9563 ndr_print_bad_level(ndr
, name
, level
);
9567 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaGetInfoLevel(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaGetInfoLevel r
)
9569 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
9570 return NDR_ERR_SUCCESS
;
9573 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaGetInfoLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaGetInfoLevel
*r
)
9576 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
9578 return NDR_ERR_SUCCESS
;
9581 _PUBLIC_
void ndr_print_drsuapi_DsReplicaGetInfoLevel(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsReplicaGetInfoLevel r
)
9583 const char *val
= NULL
;
9586 case DRSUAPI_DS_REPLICA_GET_INFO
: val
= "DRSUAPI_DS_REPLICA_GET_INFO"; break;
9587 case DRSUAPI_DS_REPLICA_GET_INFO2
: val
= "DRSUAPI_DS_REPLICA_GET_INFO2"; break;
9589 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
9592 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaInfoType(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaInfoType r
)
9594 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
9595 return NDR_ERR_SUCCESS
;
9598 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaInfoType(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaInfoType
*r
)
9601 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
9603 return NDR_ERR_SUCCESS
;
9606 _PUBLIC_
void ndr_print_drsuapi_DsReplicaInfoType(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsReplicaInfoType r
)
9608 const char *val
= NULL
;
9611 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
: val
= "DRSUAPI_DS_REPLICA_INFO_NEIGHBORS"; break;
9612 case DRSUAPI_DS_REPLICA_INFO_CURSORS
: val
= "DRSUAPI_DS_REPLICA_INFO_CURSORS"; break;
9613 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
: val
= "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA"; break;
9614 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
: val
= "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES"; break;
9615 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
: val
= "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES"; break;
9616 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
: val
= "DRSUAPI_DS_REPLICA_INFO_PENDING_OPS"; break;
9617 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
: val
= "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA"; break;
9618 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
: val
= "DRSUAPI_DS_REPLICA_INFO_CURSORS2"; break;
9619 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
: val
= "DRSUAPI_DS_REPLICA_INFO_CURSORS3"; break;
9620 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
: val
= "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2"; break;
9621 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
: val
= "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2"; break;
9622 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
: val
= "DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02"; break;
9623 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
: val
= "DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04"; break;
9624 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
: val
= "DRSUAPI_DS_REPLICA_INFO_CURSORS05"; break;
9625 case DRSUAPI_DS_REPLICA_INFO_06
: val
= "DRSUAPI_DS_REPLICA_INFO_06"; break;
9627 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
9630 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaGetInfoRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaGetInfoRequest1
*r
)
9632 if (ndr_flags
& NDR_SCALARS
) {
9633 NDR_CHECK(ndr_push_align(ndr
, 5));
9634 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, r
->info_type
));
9635 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_dn
));
9636 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid1
));
9637 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
9639 if (ndr_flags
& NDR_BUFFERS
) {
9641 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
9642 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9643 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
9644 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_dn
, ndr_charset_length(r
->object_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9647 return NDR_ERR_SUCCESS
;
9650 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaGetInfoRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaGetInfoRequest1
*r
)
9652 uint32_t _ptr_object_dn
;
9653 TALLOC_CTX
*_mem_save_object_dn_0
;
9654 if (ndr_flags
& NDR_SCALARS
) {
9655 NDR_CHECK(ndr_pull_align(ndr
, 5));
9656 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, &r
->info_type
));
9657 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_dn
));
9658 if (_ptr_object_dn
) {
9659 NDR_PULL_ALLOC(ndr
, r
->object_dn
);
9661 r
->object_dn
= NULL
;
9663 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid1
));
9664 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
9666 if (ndr_flags
& NDR_BUFFERS
) {
9668 _mem_save_object_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9669 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_dn
, 0);
9670 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_dn
));
9671 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_dn
));
9672 if (ndr_get_array_length(ndr
, &r
->object_dn
) > ndr_get_array_size(ndr
, &r
->object_dn
)) {
9673 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
));
9675 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t)));
9676 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_dn
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t), CH_UTF16
));
9677 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_dn_0
, 0);
9680 return NDR_ERR_SUCCESS
;
9683 _PUBLIC_
void ndr_print_drsuapi_DsReplicaGetInfoRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaGetInfoRequest1
*r
)
9685 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaGetInfoRequest1");
9687 ndr_print_drsuapi_DsReplicaInfoType(ndr
, "info_type", r
->info_type
);
9688 ndr_print_ptr(ndr
, "object_dn", r
->object_dn
);
9691 ndr_print_string(ndr
, "object_dn", r
->object_dn
);
9694 ndr_print_GUID(ndr
, "guid1", &r
->guid1
);
9698 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaGetInfoRequest2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaGetInfoRequest2
*r
)
9700 if (ndr_flags
& NDR_SCALARS
) {
9701 NDR_CHECK(ndr_push_align(ndr
, 5));
9702 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, r
->info_type
));
9703 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_dn
));
9704 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid1
));
9705 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
9706 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string1
));
9707 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string2
));
9708 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
9709 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
9711 if (ndr_flags
& NDR_BUFFERS
) {
9713 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
9714 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9715 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
9716 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_dn
, ndr_charset_length(r
->object_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9719 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->string1
, CH_UTF16
)));
9720 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9721 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->string1
, CH_UTF16
)));
9722 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string1
, ndr_charset_length(r
->string1
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9725 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->string2
, CH_UTF16
)));
9726 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9727 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->string2
, CH_UTF16
)));
9728 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string2
, ndr_charset_length(r
->string2
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9731 return NDR_ERR_SUCCESS
;
9734 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaGetInfoRequest2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaGetInfoRequest2
*r
)
9736 uint32_t _ptr_object_dn
;
9737 TALLOC_CTX
*_mem_save_object_dn_0
;
9738 uint32_t _ptr_string1
;
9739 TALLOC_CTX
*_mem_save_string1_0
;
9740 uint32_t _ptr_string2
;
9741 TALLOC_CTX
*_mem_save_string2_0
;
9742 if (ndr_flags
& NDR_SCALARS
) {
9743 NDR_CHECK(ndr_pull_align(ndr
, 5));
9744 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, &r
->info_type
));
9745 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_dn
));
9746 if (_ptr_object_dn
) {
9747 NDR_PULL_ALLOC(ndr
, r
->object_dn
);
9749 r
->object_dn
= NULL
;
9751 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid1
));
9752 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
9753 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string1
));
9755 NDR_PULL_ALLOC(ndr
, r
->string1
);
9759 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string2
));
9761 NDR_PULL_ALLOC(ndr
, r
->string2
);
9765 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
9766 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
9768 if (ndr_flags
& NDR_BUFFERS
) {
9770 _mem_save_object_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9771 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_dn
, 0);
9772 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_dn
));
9773 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_dn
));
9774 if (ndr_get_array_length(ndr
, &r
->object_dn
) > ndr_get_array_size(ndr
, &r
->object_dn
)) {
9775 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
));
9777 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t)));
9778 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_dn
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t), CH_UTF16
));
9779 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_dn_0
, 0);
9782 _mem_save_string1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9783 NDR_PULL_SET_MEM_CTX(ndr
, r
->string1
, 0);
9784 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string1
));
9785 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string1
));
9786 if (ndr_get_array_length(ndr
, &r
->string1
) > ndr_get_array_size(ndr
, &r
->string1
)) {
9787 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
));
9789 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->string1
), sizeof(uint16_t)));
9790 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string1
, ndr_get_array_length(ndr
, &r
->string1
), sizeof(uint16_t), CH_UTF16
));
9791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string1_0
, 0);
9794 _mem_save_string2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9795 NDR_PULL_SET_MEM_CTX(ndr
, r
->string2
, 0);
9796 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string2
));
9797 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string2
));
9798 if (ndr_get_array_length(ndr
, &r
->string2
) > ndr_get_array_size(ndr
, &r
->string2
)) {
9799 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
));
9801 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->string2
), sizeof(uint16_t)));
9802 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string2
, ndr_get_array_length(ndr
, &r
->string2
), sizeof(uint16_t), CH_UTF16
));
9803 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string2_0
, 0);
9806 return NDR_ERR_SUCCESS
;
9809 _PUBLIC_
void ndr_print_drsuapi_DsReplicaGetInfoRequest2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaGetInfoRequest2
*r
)
9811 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaGetInfoRequest2");
9813 ndr_print_drsuapi_DsReplicaInfoType(ndr
, "info_type", r
->info_type
);
9814 ndr_print_ptr(ndr
, "object_dn", r
->object_dn
);
9817 ndr_print_string(ndr
, "object_dn", r
->object_dn
);
9820 ndr_print_GUID(ndr
, "guid1", &r
->guid1
);
9821 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
9822 ndr_print_ptr(ndr
, "string1", r
->string1
);
9825 ndr_print_string(ndr
, "string1", r
->string1
);
9828 ndr_print_ptr(ndr
, "string2", r
->string2
);
9831 ndr_print_string(ndr
, "string2", r
->string2
);
9834 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
9838 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaGetInfoRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaGetInfoRequest
*r
)
9840 if (ndr_flags
& NDR_SCALARS
) {
9841 int level
= ndr_push_get_switch_value(ndr
, r
);
9842 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoLevel(ndr
, NDR_SCALARS
, level
));
9843 NDR_CHECK(ndr_push_union_align(ndr
, 5));
9845 case DRSUAPI_DS_REPLICA_GET_INFO
: {
9846 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
9849 case DRSUAPI_DS_REPLICA_GET_INFO2
: {
9850 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest2(ndr
, NDR_SCALARS
, &r
->req2
));
9854 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9857 if (ndr_flags
& NDR_BUFFERS
) {
9858 int level
= ndr_push_get_switch_value(ndr
, r
);
9860 case DRSUAPI_DS_REPLICA_GET_INFO
:
9861 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
9864 case DRSUAPI_DS_REPLICA_GET_INFO2
:
9865 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest2(ndr
, NDR_BUFFERS
, &r
->req2
));
9869 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9872 return NDR_ERR_SUCCESS
;
9875 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaGetInfoRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaGetInfoRequest
*r
)
9879 level
= ndr_pull_get_switch_value(ndr
, r
);
9880 if (ndr_flags
& NDR_SCALARS
) {
9881 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
9882 if (_level
!= level
) {
9883 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
9885 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
9887 case DRSUAPI_DS_REPLICA_GET_INFO
: {
9888 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
9891 case DRSUAPI_DS_REPLICA_GET_INFO2
: {
9892 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest2(ndr
, NDR_SCALARS
, &r
->req2
));
9896 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9899 if (ndr_flags
& NDR_BUFFERS
) {
9901 case DRSUAPI_DS_REPLICA_GET_INFO
:
9902 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
9905 case DRSUAPI_DS_REPLICA_GET_INFO2
:
9906 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest2(ndr
, NDR_BUFFERS
, &r
->req2
));
9910 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
9913 return NDR_ERR_SUCCESS
;
9916 _PUBLIC_
void ndr_print_drsuapi_DsReplicaGetInfoRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaGetInfoRequest
*r
)
9919 level
= ndr_print_get_switch_value(ndr
, r
);
9920 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaGetInfoRequest");
9922 case DRSUAPI_DS_REPLICA_GET_INFO
:
9923 ndr_print_drsuapi_DsReplicaGetInfoRequest1(ndr
, "req1", &r
->req1
);
9926 case DRSUAPI_DS_REPLICA_GET_INFO2
:
9927 ndr_print_drsuapi_DsReplicaGetInfoRequest2(ndr
, "req2", &r
->req2
);
9931 ndr_print_bad_level(ndr
, name
, level
);
9935 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaNeighbour(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaNeighbour
*r
)
9937 if (ndr_flags
& NDR_SCALARS
) {
9938 NDR_CHECK(ndr_push_align(ndr
, 8));
9939 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->naming_context_dn
));
9940 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dsa_obj_dn
));
9941 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dsa_address
));
9942 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->transport_obj_dn
));
9943 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, r
->replica_flags
));
9944 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
9945 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->naming_context_obj_guid
));
9946 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_obj_guid
));
9947 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
9948 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->transport_obj_guid
));
9949 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->tmp_highest_usn
));
9950 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->highest_usn
));
9951 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_success
));
9952 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_attempt
));
9953 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->result_last_attempt
));
9954 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->consecutive_sync_failures
));
9955 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
9957 if (ndr_flags
& NDR_BUFFERS
) {
9958 if (r
->naming_context_dn
) {
9959 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->naming_context_dn
, CH_UTF16
)));
9960 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9961 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->naming_context_dn
, CH_UTF16
)));
9962 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
));
9964 if (r
->source_dsa_obj_dn
) {
9965 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_obj_dn
, CH_UTF16
)));
9966 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9967 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_obj_dn
, CH_UTF16
)));
9968 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
));
9970 if (r
->source_dsa_address
) {
9971 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
)));
9972 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9973 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_address
, CH_UTF16
)));
9974 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
));
9976 if (r
->transport_obj_dn
) {
9977 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->transport_obj_dn
, CH_UTF16
)));
9978 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9979 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->transport_obj_dn
, CH_UTF16
)));
9980 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
));
9983 return NDR_ERR_SUCCESS
;
9986 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaNeighbour(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaNeighbour
*r
)
9988 uint32_t _ptr_naming_context_dn
;
9989 TALLOC_CTX
*_mem_save_naming_context_dn_0
;
9990 uint32_t _ptr_source_dsa_obj_dn
;
9991 TALLOC_CTX
*_mem_save_source_dsa_obj_dn_0
;
9992 uint32_t _ptr_source_dsa_address
;
9993 TALLOC_CTX
*_mem_save_source_dsa_address_0
;
9994 uint32_t _ptr_transport_obj_dn
;
9995 TALLOC_CTX
*_mem_save_transport_obj_dn_0
;
9996 if (ndr_flags
& NDR_SCALARS
) {
9997 NDR_CHECK(ndr_pull_align(ndr
, 8));
9998 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_naming_context_dn
));
9999 if (_ptr_naming_context_dn
) {
10000 NDR_PULL_ALLOC(ndr
, r
->naming_context_dn
);
10002 r
->naming_context_dn
= NULL
;
10004 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dsa_obj_dn
));
10005 if (_ptr_source_dsa_obj_dn
) {
10006 NDR_PULL_ALLOC(ndr
, r
->source_dsa_obj_dn
);
10008 r
->source_dsa_obj_dn
= NULL
;
10010 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dsa_address
));
10011 if (_ptr_source_dsa_address
) {
10012 NDR_PULL_ALLOC(ndr
, r
->source_dsa_address
);
10014 r
->source_dsa_address
= NULL
;
10016 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_transport_obj_dn
));
10017 if (_ptr_transport_obj_dn
) {
10018 NDR_PULL_ALLOC(ndr
, r
->transport_obj_dn
);
10020 r
->transport_obj_dn
= NULL
;
10022 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr
, NDR_SCALARS
, &r
->replica_flags
));
10023 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
10024 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->naming_context_obj_guid
));
10025 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_obj_guid
));
10026 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
10027 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->transport_obj_guid
));
10028 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->tmp_highest_usn
));
10029 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->highest_usn
));
10030 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_success
));
10031 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_attempt
));
10032 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->result_last_attempt
));
10033 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->consecutive_sync_failures
));
10034 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
10036 if (ndr_flags
& NDR_BUFFERS
) {
10037 if (r
->naming_context_dn
) {
10038 _mem_save_naming_context_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10039 NDR_PULL_SET_MEM_CTX(ndr
, r
->naming_context_dn
, 0);
10040 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->naming_context_dn
));
10041 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->naming_context_dn
));
10042 if (ndr_get_array_length(ndr
, &r
->naming_context_dn
) > ndr_get_array_size(ndr
, &r
->naming_context_dn
)) {
10043 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
));
10045 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->naming_context_dn
), sizeof(uint16_t)));
10046 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
));
10047 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_naming_context_dn_0
, 0);
10049 if (r
->source_dsa_obj_dn
) {
10050 _mem_save_source_dsa_obj_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10051 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dsa_obj_dn
, 0);
10052 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->source_dsa_obj_dn
));
10053 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->source_dsa_obj_dn
));
10054 if (ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
) > ndr_get_array_size(ndr
, &r
->source_dsa_obj_dn
)) {
10055 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
));
10057 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
), sizeof(uint16_t)));
10058 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
));
10059 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dsa_obj_dn_0
, 0);
10061 if (r
->source_dsa_address
) {
10062 _mem_save_source_dsa_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10063 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dsa_address
, 0);
10064 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->source_dsa_address
));
10065 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->source_dsa_address
));
10066 if (ndr_get_array_length(ndr
, &r
->source_dsa_address
) > ndr_get_array_size(ndr
, &r
->source_dsa_address
)) {
10067 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
));
10069 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->source_dsa_address
), sizeof(uint16_t)));
10070 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
));
10071 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dsa_address_0
, 0);
10073 if (r
->transport_obj_dn
) {
10074 _mem_save_transport_obj_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10075 NDR_PULL_SET_MEM_CTX(ndr
, r
->transport_obj_dn
, 0);
10076 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->transport_obj_dn
));
10077 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->transport_obj_dn
));
10078 if (ndr_get_array_length(ndr
, &r
->transport_obj_dn
) > ndr_get_array_size(ndr
, &r
->transport_obj_dn
)) {
10079 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
));
10081 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->transport_obj_dn
), sizeof(uint16_t)));
10082 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
));
10083 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_transport_obj_dn_0
, 0);
10086 return NDR_ERR_SUCCESS
;
10089 _PUBLIC_
void ndr_print_drsuapi_DsReplicaNeighbour(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaNeighbour
*r
)
10091 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaNeighbour");
10093 ndr_print_ptr(ndr
, "naming_context_dn", r
->naming_context_dn
);
10095 if (r
->naming_context_dn
) {
10096 ndr_print_string(ndr
, "naming_context_dn", r
->naming_context_dn
);
10099 ndr_print_ptr(ndr
, "source_dsa_obj_dn", r
->source_dsa_obj_dn
);
10101 if (r
->source_dsa_obj_dn
) {
10102 ndr_print_string(ndr
, "source_dsa_obj_dn", r
->source_dsa_obj_dn
);
10105 ndr_print_ptr(ndr
, "source_dsa_address", r
->source_dsa_address
);
10107 if (r
->source_dsa_address
) {
10108 ndr_print_string(ndr
, "source_dsa_address", r
->source_dsa_address
);
10111 ndr_print_ptr(ndr
, "transport_obj_dn", r
->transport_obj_dn
);
10113 if (r
->transport_obj_dn
) {
10114 ndr_print_string(ndr
, "transport_obj_dn", r
->transport_obj_dn
);
10117 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr
, "replica_flags", r
->replica_flags
);
10118 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
10119 ndr_print_GUID(ndr
, "naming_context_obj_guid", &r
->naming_context_obj_guid
);
10120 ndr_print_GUID(ndr
, "source_dsa_obj_guid", &r
->source_dsa_obj_guid
);
10121 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
10122 ndr_print_GUID(ndr
, "transport_obj_guid", &r
->transport_obj_guid
);
10123 ndr_print_hyper(ndr
, "tmp_highest_usn", r
->tmp_highest_usn
);
10124 ndr_print_hyper(ndr
, "highest_usn", r
->highest_usn
);
10125 ndr_print_NTTIME(ndr
, "last_success", r
->last_success
);
10126 ndr_print_NTTIME(ndr
, "last_attempt", r
->last_attempt
);
10127 ndr_print_WERROR(ndr
, "result_last_attempt", r
->result_last_attempt
);
10128 ndr_print_uint32(ndr
, "consecutive_sync_failures", r
->consecutive_sync_failures
);
10132 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaNeighbourCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaNeighbourCtr
*r
)
10134 uint32_t cntr_array_0
;
10135 if (ndr_flags
& NDR_SCALARS
) {
10136 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
10137 NDR_CHECK(ndr_push_align(ndr
, 8));
10138 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10139 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
10140 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10141 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbour(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10143 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
10145 if (ndr_flags
& NDR_BUFFERS
) {
10146 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10147 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbour(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10150 return NDR_ERR_SUCCESS
;
10153 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaNeighbourCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaNeighbourCtr
*r
)
10155 uint32_t cntr_array_0
;
10156 TALLOC_CTX
*_mem_save_array_0
;
10157 if (ndr_flags
& NDR_SCALARS
) {
10158 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10159 NDR_CHECK(ndr_pull_align(ndr
, 8));
10160 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10161 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
10162 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10163 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10164 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10165 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10166 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbour(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10168 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10170 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10172 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
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_DsReplicaNeighbour(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_DsReplicaNeighbourCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaNeighbourCtr
*r
)
10187 uint32_t cntr_array_0
;
10188 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaNeighbourCtr");
10190 ndr_print_uint32(ndr
, "count", r
->count
);
10191 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
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_DsReplicaNeighbour(ndr
, "array", &r
->array
[cntr_array_0
]);
10205 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursorCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursorCtr
*r
)
10207 uint32_t cntr_array_0
;
10208 if (ndr_flags
& NDR_SCALARS
) {
10209 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
10210 NDR_CHECK(ndr_push_align(ndr
, 8));
10211 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10212 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
10213 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10214 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10216 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
10218 if (ndr_flags
& NDR_BUFFERS
) {
10220 return NDR_ERR_SUCCESS
;
10223 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursorCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursorCtr
*r
)
10225 uint32_t cntr_array_0
;
10226 TALLOC_CTX
*_mem_save_array_0
;
10227 if (ndr_flags
& NDR_SCALARS
) {
10228 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10229 NDR_CHECK(ndr_pull_align(ndr
, 8));
10230 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10231 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
10232 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10233 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10234 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10235 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10236 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10238 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10240 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10242 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
10244 if (ndr_flags
& NDR_BUFFERS
) {
10246 return NDR_ERR_SUCCESS
;
10249 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursorCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursorCtr
*r
)
10251 uint32_t cntr_array_0
;
10252 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursorCtr");
10254 ndr_print_uint32(ndr
, "count", r
->count
);
10255 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
10256 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
10258 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
10260 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
10261 ndr_print_drsuapi_DsReplicaCursor(ndr
, "array", &r
->array
[cntr_array_0
]);
10269 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjMetaData(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjMetaData
*r
)
10271 if (ndr_flags
& NDR_SCALARS
) {
10272 NDR_CHECK(ndr_push_align(ndr
, 8));
10273 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attribute_name
));
10274 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
10275 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->originating_change_time
));
10276 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
10277 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
10278 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->local_usn
));
10279 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
10281 if (ndr_flags
& NDR_BUFFERS
) {
10282 if (r
->attribute_name
) {
10283 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
10284 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10285 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
10286 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->attribute_name
, ndr_charset_length(r
->attribute_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10289 return NDR_ERR_SUCCESS
;
10292 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjMetaData(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjMetaData
*r
)
10294 uint32_t _ptr_attribute_name
;
10295 TALLOC_CTX
*_mem_save_attribute_name_0
;
10296 if (ndr_flags
& NDR_SCALARS
) {
10297 NDR_CHECK(ndr_pull_align(ndr
, 8));
10298 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attribute_name
));
10299 if (_ptr_attribute_name
) {
10300 NDR_PULL_ALLOC(ndr
, r
->attribute_name
);
10302 r
->attribute_name
= NULL
;
10304 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
10305 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
10306 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
10307 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
10308 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->local_usn
));
10309 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
10311 if (ndr_flags
& NDR_BUFFERS
) {
10312 if (r
->attribute_name
) {
10313 _mem_save_attribute_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10314 NDR_PULL_SET_MEM_CTX(ndr
, r
->attribute_name
, 0);
10315 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attribute_name
));
10316 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->attribute_name
));
10317 if (ndr_get_array_length(ndr
, &r
->attribute_name
) > ndr_get_array_size(ndr
, &r
->attribute_name
)) {
10318 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
));
10320 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t)));
10321 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->attribute_name
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t), CH_UTF16
));
10322 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attribute_name_0
, 0);
10325 return NDR_ERR_SUCCESS
;
10328 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjMetaData(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjMetaData
*r
)
10330 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjMetaData");
10332 ndr_print_ptr(ndr
, "attribute_name", r
->attribute_name
);
10334 if (r
->attribute_name
) {
10335 ndr_print_string(ndr
, "attribute_name", r
->attribute_name
);
10338 ndr_print_uint32(ndr
, "version", r
->version
);
10339 ndr_print_NTTIME(ndr
, "originating_change_time", r
->originating_change_time
);
10340 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
10341 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
10342 ndr_print_hyper(ndr
, "local_usn", r
->local_usn
);
10346 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjMetaDataCtr
*r
)
10348 uint32_t cntr_array_0
;
10349 if (ndr_flags
& NDR_SCALARS
) {
10350 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
10351 NDR_CHECK(ndr_push_align(ndr
, 8));
10352 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10353 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
10354 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10355 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10357 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
10359 if (ndr_flags
& NDR_BUFFERS
) {
10360 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10361 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10364 return NDR_ERR_SUCCESS
;
10367 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjMetaDataCtr
*r
)
10369 uint32_t cntr_array_0
;
10370 TALLOC_CTX
*_mem_save_array_0
;
10371 if (ndr_flags
& NDR_SCALARS
) {
10372 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10373 NDR_CHECK(ndr_pull_align(ndr
, 8));
10374 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10375 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
10376 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10377 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10378 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10379 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10380 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10382 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10384 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10386 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
10388 if (ndr_flags
& NDR_BUFFERS
) {
10389 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10390 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10391 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10392 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10394 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10396 return NDR_ERR_SUCCESS
;
10399 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjMetaDataCtr
*r
)
10401 uint32_t cntr_array_0
;
10402 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjMetaDataCtr");
10404 ndr_print_uint32(ndr
, "count", r
->count
);
10405 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
10406 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
10408 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
10410 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
10411 ndr_print_drsuapi_DsReplicaObjMetaData(ndr
, "array", &r
->array
[cntr_array_0
]);
10419 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaKccDsaFailure(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaKccDsaFailure
*r
)
10421 if (ndr_flags
& NDR_SCALARS
) {
10422 NDR_CHECK(ndr_push_align(ndr
, 5));
10423 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dsa_obj_dn
));
10424 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->dsa_obj_guid
));
10425 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->first_failure
));
10426 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_failures
));
10427 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->last_result
));
10428 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
10430 if (ndr_flags
& NDR_BUFFERS
) {
10431 if (r
->dsa_obj_dn
) {
10432 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dsa_obj_dn
, CH_UTF16
)));
10433 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10434 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dsa_obj_dn
, CH_UTF16
)));
10435 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
));
10438 return NDR_ERR_SUCCESS
;
10441 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaKccDsaFailure(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaKccDsaFailure
*r
)
10443 uint32_t _ptr_dsa_obj_dn
;
10444 TALLOC_CTX
*_mem_save_dsa_obj_dn_0
;
10445 if (ndr_flags
& NDR_SCALARS
) {
10446 NDR_CHECK(ndr_pull_align(ndr
, 5));
10447 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dsa_obj_dn
));
10448 if (_ptr_dsa_obj_dn
) {
10449 NDR_PULL_ALLOC(ndr
, r
->dsa_obj_dn
);
10451 r
->dsa_obj_dn
= NULL
;
10453 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->dsa_obj_guid
));
10454 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->first_failure
));
10455 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_failures
));
10456 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->last_result
));
10457 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
10459 if (ndr_flags
& NDR_BUFFERS
) {
10460 if (r
->dsa_obj_dn
) {
10461 _mem_save_dsa_obj_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10462 NDR_PULL_SET_MEM_CTX(ndr
, r
->dsa_obj_dn
, 0);
10463 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dsa_obj_dn
));
10464 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dsa_obj_dn
));
10465 if (ndr_get_array_length(ndr
, &r
->dsa_obj_dn
) > ndr_get_array_size(ndr
, &r
->dsa_obj_dn
)) {
10466 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
));
10468 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dsa_obj_dn
), sizeof(uint16_t)));
10469 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
));
10470 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dsa_obj_dn_0
, 0);
10473 return NDR_ERR_SUCCESS
;
10476 _PUBLIC_
void ndr_print_drsuapi_DsReplicaKccDsaFailure(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaKccDsaFailure
*r
)
10478 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaKccDsaFailure");
10480 ndr_print_ptr(ndr
, "dsa_obj_dn", r
->dsa_obj_dn
);
10482 if (r
->dsa_obj_dn
) {
10483 ndr_print_string(ndr
, "dsa_obj_dn", r
->dsa_obj_dn
);
10486 ndr_print_GUID(ndr
, "dsa_obj_guid", &r
->dsa_obj_guid
);
10487 ndr_print_NTTIME(ndr
, "first_failure", r
->first_failure
);
10488 ndr_print_uint32(ndr
, "num_failures", r
->num_failures
);
10489 ndr_print_WERROR(ndr
, "last_result", r
->last_result
);
10493 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaKccDsaFailuresCtr
*r
)
10495 uint32_t cntr_array_0
;
10496 if (ndr_flags
& NDR_SCALARS
) {
10497 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
10498 NDR_CHECK(ndr_push_align(ndr
, 5));
10499 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10500 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
10501 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10502 NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailure(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10504 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
10506 if (ndr_flags
& NDR_BUFFERS
) {
10507 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10508 NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailure(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10511 return NDR_ERR_SUCCESS
;
10514 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaKccDsaFailuresCtr
*r
)
10516 uint32_t cntr_array_0
;
10517 TALLOC_CTX
*_mem_save_array_0
;
10518 if (ndr_flags
& NDR_SCALARS
) {
10519 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10520 NDR_CHECK(ndr_pull_align(ndr
, 5));
10521 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10522 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
10523 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10524 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10525 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10526 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10527 NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailure(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10529 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10531 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10533 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
10535 if (ndr_flags
& NDR_BUFFERS
) {
10536 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10537 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10538 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10539 NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailure(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10541 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10543 return NDR_ERR_SUCCESS
;
10546 _PUBLIC_
void ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaKccDsaFailuresCtr
*r
)
10548 uint32_t cntr_array_0
;
10549 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaKccDsaFailuresCtr");
10551 ndr_print_uint32(ndr
, "count", r
->count
);
10552 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
10553 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
10555 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
10557 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
10558 ndr_print_drsuapi_DsReplicaKccDsaFailure(ndr
, "array", &r
->array
[cntr_array_0
]);
10566 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaOpType(struct ndr_push
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaOpType r
)
10568 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
10569 return NDR_ERR_SUCCESS
;
10572 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaOpType(struct ndr_pull
*ndr
, int ndr_flags
, enum drsuapi_DsReplicaOpType
*r
)
10575 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
10577 return NDR_ERR_SUCCESS
;
10580 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOpType(struct ndr_print
*ndr
, const char *name
, enum drsuapi_DsReplicaOpType r
)
10582 const char *val
= NULL
;
10585 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
: val
= "DRSUAPI_DS_REPLICA_OP_TYPE_SYNC"; break;
10586 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
: val
= "DRSUAPI_DS_REPLICA_OP_TYPE_ADD"; break;
10587 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
: val
= "DRSUAPI_DS_REPLICA_OP_TYPE_DELETE"; break;
10588 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
: val
= "DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY"; break;
10589 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
: val
= "DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS"; break;
10591 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
10594 static enum ndr_err_code
ndr_push_drsuapi_DsRplicaOpOptions(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsRplicaOpOptions
*r
)
10596 if (ndr_flags
& NDR_SCALARS
) {
10597 int level
= ndr_push_get_switch_value(ndr
, r
);
10598 NDR_CHECK(ndr_push_drsuapi_DsReplicaOpType(ndr
, NDR_SCALARS
, level
));
10599 NDR_CHECK(ndr_push_union_align(ndr
, 4));
10601 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
: {
10602 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncOptions(ndr
, NDR_SCALARS
, r
->sync
));
10605 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
: {
10606 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddOptions(ndr
, NDR_SCALARS
, r
->add
));
10609 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
: {
10610 NDR_CHECK(ndr_push_drsuapi_DsReplicaDeleteOptions(ndr
, NDR_SCALARS
, r
->op_delete
));
10613 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
: {
10614 NDR_CHECK(ndr_push_drsuapi_DsReplicaModifyOptions(ndr
, NDR_SCALARS
, r
->modify
));
10617 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
: {
10618 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsOptions(ndr
, NDR_SCALARS
, r
->update_refs
));
10622 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
10627 if (ndr_flags
& NDR_BUFFERS
) {
10628 int level
= ndr_push_get_switch_value(ndr
, r
);
10630 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
:
10633 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
:
10636 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
:
10639 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
:
10642 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
:
10650 return NDR_ERR_SUCCESS
;
10653 static enum ndr_err_code
ndr_pull_drsuapi_DsRplicaOpOptions(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsRplicaOpOptions
*r
)
10657 level
= ndr_pull_get_switch_value(ndr
, r
);
10658 if (ndr_flags
& NDR_SCALARS
) {
10659 NDR_CHECK(ndr_pull_uint1632(ndr
, NDR_SCALARS
, &_level
));
10660 if (_level
!= level
) {
10661 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
10663 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
10665 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
: {
10666 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncOptions(ndr
, NDR_SCALARS
, &r
->sync
));
10669 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
: {
10670 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddOptions(ndr
, NDR_SCALARS
, &r
->add
));
10673 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
: {
10674 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDeleteOptions(ndr
, NDR_SCALARS
, &r
->op_delete
));
10677 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
: {
10678 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModifyOptions(ndr
, NDR_SCALARS
, &r
->modify
));
10681 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
: {
10682 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsOptions(ndr
, NDR_SCALARS
, &r
->update_refs
));
10686 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
10691 if (ndr_flags
& NDR_BUFFERS
) {
10693 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
:
10696 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
:
10699 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
:
10702 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
:
10705 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
:
10713 return NDR_ERR_SUCCESS
;
10716 _PUBLIC_
void ndr_print_drsuapi_DsRplicaOpOptions(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsRplicaOpOptions
*r
)
10719 level
= ndr_print_get_switch_value(ndr
, r
);
10720 ndr_print_union(ndr
, name
, level
, "drsuapi_DsRplicaOpOptions");
10722 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
:
10723 ndr_print_drsuapi_DsReplicaSyncOptions(ndr
, "sync", r
->sync
);
10726 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD
:
10727 ndr_print_drsuapi_DsReplicaAddOptions(ndr
, "add", r
->add
);
10730 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
:
10731 ndr_print_drsuapi_DsReplicaDeleteOptions(ndr
, "op_delete", r
->op_delete
);
10734 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
:
10735 ndr_print_drsuapi_DsReplicaModifyOptions(ndr
, "modify", r
->modify
);
10738 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
:
10739 ndr_print_drsuapi_DsReplicaUpdateRefsOptions(ndr
, "update_refs", r
->update_refs
);
10743 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
10749 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaOp(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaOp
*r
)
10751 if (ndr_flags
& NDR_SCALARS
) {
10752 NDR_CHECK(ndr_push_align(ndr
, 5));
10753 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->operation_start
));
10754 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->serial_num
));
10755 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
10756 NDR_CHECK(ndr_push_drsuapi_DsReplicaOpType(ndr
, NDR_SCALARS
, r
->operation_type
));
10757 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->options
, r
->operation_type
));
10758 NDR_CHECK(ndr_push_drsuapi_DsRplicaOpOptions(ndr
, NDR_SCALARS
, &r
->options
));
10759 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->nc_dn
));
10760 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->remote_dsa_obj_dn
));
10761 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->remote_dsa_address
));
10762 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->nc_obj_guid
));
10763 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->remote_dsa_obj_guid
));
10764 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
10766 if (ndr_flags
& NDR_BUFFERS
) {
10768 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->nc_dn
, CH_UTF16
)));
10769 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10770 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->nc_dn
, CH_UTF16
)));
10771 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->nc_dn
, ndr_charset_length(r
->nc_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10773 if (r
->remote_dsa_obj_dn
) {
10774 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote_dsa_obj_dn
, CH_UTF16
)));
10775 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10776 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote_dsa_obj_dn
, CH_UTF16
)));
10777 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
));
10779 if (r
->remote_dsa_address
) {
10780 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote_dsa_address
, CH_UTF16
)));
10781 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10782 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote_dsa_address
, CH_UTF16
)));
10783 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
));
10786 return NDR_ERR_SUCCESS
;
10789 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaOp(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaOp
*r
)
10791 uint32_t _ptr_nc_dn
;
10792 TALLOC_CTX
*_mem_save_nc_dn_0
;
10793 uint32_t _ptr_remote_dsa_obj_dn
;
10794 TALLOC_CTX
*_mem_save_remote_dsa_obj_dn_0
;
10795 uint32_t _ptr_remote_dsa_address
;
10796 TALLOC_CTX
*_mem_save_remote_dsa_address_0
;
10797 if (ndr_flags
& NDR_SCALARS
) {
10798 NDR_CHECK(ndr_pull_align(ndr
, 5));
10799 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->operation_start
));
10800 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->serial_num
));
10801 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
10802 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOpType(ndr
, NDR_SCALARS
, &r
->operation_type
));
10803 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->options
, r
->operation_type
));
10804 NDR_CHECK(ndr_pull_drsuapi_DsRplicaOpOptions(ndr
, NDR_SCALARS
, &r
->options
));
10805 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nc_dn
));
10807 NDR_PULL_ALLOC(ndr
, r
->nc_dn
);
10811 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_remote_dsa_obj_dn
));
10812 if (_ptr_remote_dsa_obj_dn
) {
10813 NDR_PULL_ALLOC(ndr
, r
->remote_dsa_obj_dn
);
10815 r
->remote_dsa_obj_dn
= NULL
;
10817 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_remote_dsa_address
));
10818 if (_ptr_remote_dsa_address
) {
10819 NDR_PULL_ALLOC(ndr
, r
->remote_dsa_address
);
10821 r
->remote_dsa_address
= NULL
;
10823 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->nc_obj_guid
));
10824 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->remote_dsa_obj_guid
));
10825 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
10827 if (ndr_flags
& NDR_BUFFERS
) {
10829 _mem_save_nc_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10830 NDR_PULL_SET_MEM_CTX(ndr
, r
->nc_dn
, 0);
10831 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->nc_dn
));
10832 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->nc_dn
));
10833 if (ndr_get_array_length(ndr
, &r
->nc_dn
) > ndr_get_array_size(ndr
, &r
->nc_dn
)) {
10834 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
));
10836 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->nc_dn
), sizeof(uint16_t)));
10837 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->nc_dn
, ndr_get_array_length(ndr
, &r
->nc_dn
), sizeof(uint16_t), CH_UTF16
));
10838 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nc_dn_0
, 0);
10840 if (r
->remote_dsa_obj_dn
) {
10841 _mem_save_remote_dsa_obj_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10842 NDR_PULL_SET_MEM_CTX(ndr
, r
->remote_dsa_obj_dn
, 0);
10843 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->remote_dsa_obj_dn
));
10844 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->remote_dsa_obj_dn
));
10845 if (ndr_get_array_length(ndr
, &r
->remote_dsa_obj_dn
) > ndr_get_array_size(ndr
, &r
->remote_dsa_obj_dn
)) {
10846 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
));
10848 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->remote_dsa_obj_dn
), sizeof(uint16_t)));
10849 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
));
10850 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_remote_dsa_obj_dn_0
, 0);
10852 if (r
->remote_dsa_address
) {
10853 _mem_save_remote_dsa_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10854 NDR_PULL_SET_MEM_CTX(ndr
, r
->remote_dsa_address
, 0);
10855 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->remote_dsa_address
));
10856 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->remote_dsa_address
));
10857 if (ndr_get_array_length(ndr
, &r
->remote_dsa_address
) > ndr_get_array_size(ndr
, &r
->remote_dsa_address
)) {
10858 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
));
10860 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->remote_dsa_address
), sizeof(uint16_t)));
10861 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
));
10862 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_remote_dsa_address_0
, 0);
10865 return NDR_ERR_SUCCESS
;
10868 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOp(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaOp
*r
)
10870 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaOp");
10872 ndr_print_NTTIME(ndr
, "operation_start", r
->operation_start
);
10873 ndr_print_uint32(ndr
, "serial_num", r
->serial_num
);
10874 ndr_print_uint32(ndr
, "priority", r
->priority
);
10875 ndr_print_drsuapi_DsReplicaOpType(ndr
, "operation_type", r
->operation_type
);
10876 ndr_print_set_switch_value(ndr
, &r
->options
, r
->operation_type
);
10877 ndr_print_drsuapi_DsRplicaOpOptions(ndr
, "options", &r
->options
);
10878 ndr_print_ptr(ndr
, "nc_dn", r
->nc_dn
);
10881 ndr_print_string(ndr
, "nc_dn", r
->nc_dn
);
10884 ndr_print_ptr(ndr
, "remote_dsa_obj_dn", r
->remote_dsa_obj_dn
);
10886 if (r
->remote_dsa_obj_dn
) {
10887 ndr_print_string(ndr
, "remote_dsa_obj_dn", r
->remote_dsa_obj_dn
);
10890 ndr_print_ptr(ndr
, "remote_dsa_address", r
->remote_dsa_address
);
10892 if (r
->remote_dsa_address
) {
10893 ndr_print_string(ndr
, "remote_dsa_address", r
->remote_dsa_address
);
10896 ndr_print_GUID(ndr
, "nc_obj_guid", &r
->nc_obj_guid
);
10897 ndr_print_GUID(ndr
, "remote_dsa_obj_guid", &r
->remote_dsa_obj_guid
);
10901 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaOpCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaOpCtr
*r
)
10903 uint32_t cntr_array_0
;
10904 if (ndr_flags
& NDR_SCALARS
) {
10905 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
10906 NDR_CHECK(ndr_push_align(ndr
, 5));
10907 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->time
));
10908 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
10909 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10910 NDR_CHECK(ndr_push_drsuapi_DsReplicaOp(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10912 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
10914 if (ndr_flags
& NDR_BUFFERS
) {
10915 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10916 NDR_CHECK(ndr_push_drsuapi_DsReplicaOp(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10919 return NDR_ERR_SUCCESS
;
10922 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaOpCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaOpCtr
*r
)
10924 uint32_t cntr_array_0
;
10925 TALLOC_CTX
*_mem_save_array_0
;
10926 if (ndr_flags
& NDR_SCALARS
) {
10927 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
10928 NDR_CHECK(ndr_pull_align(ndr
, 5));
10929 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->time
));
10930 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
10931 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
10932 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10933 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10934 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10935 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOp(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
10937 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10939 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
10941 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
10943 if (ndr_flags
& NDR_BUFFERS
) {
10944 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10945 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
10946 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
10947 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOp(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
10949 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
10951 return NDR_ERR_SUCCESS
;
10954 _PUBLIC_
void ndr_print_drsuapi_DsReplicaOpCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaOpCtr
*r
)
10956 uint32_t cntr_array_0
;
10957 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaOpCtr");
10959 ndr_print_NTTIME(ndr
, "time", r
->time
);
10960 ndr_print_uint32(ndr
, "count", r
->count
);
10961 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
10963 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
10965 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
10966 ndr_print_drsuapi_DsReplicaOp(ndr
, "array", &r
->array
[cntr_array_0
]);
10974 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttrValMetaData(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttrValMetaData
*r
)
10976 if (ndr_flags
& NDR_SCALARS
) {
10977 NDR_CHECK(ndr_push_align(ndr
, 8));
10978 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attribute_name
));
10979 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_dn
));
10980 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_DATA_BLOB(0, r
->binary
, 0)));
10981 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->binary
));
10982 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->deleted
));
10983 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->created
));
10984 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
10985 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->originating_change_time
));
10986 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
10987 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
10988 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->local_usn
));
10989 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
10991 if (ndr_flags
& NDR_BUFFERS
) {
10992 if (r
->attribute_name
) {
10993 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
10994 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10995 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
10996 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->attribute_name
, ndr_charset_length(r
->attribute_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10998 if (r
->object_dn
) {
10999 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
11000 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11001 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
11002 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_dn
, ndr_charset_length(r
->object_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
11005 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->binary
));
11008 return NDR_ERR_SUCCESS
;
11011 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttrValMetaData(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttrValMetaData
*r
)
11013 uint32_t _ptr_attribute_name
;
11014 TALLOC_CTX
*_mem_save_attribute_name_0
;
11015 uint32_t _ptr_object_dn
;
11016 TALLOC_CTX
*_mem_save_object_dn_0
;
11017 uint32_t _ptr_binary
;
11018 TALLOC_CTX
*_mem_save_binary_0
;
11019 if (ndr_flags
& NDR_SCALARS
) {
11020 NDR_CHECK(ndr_pull_align(ndr
, 8));
11021 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attribute_name
));
11022 if (_ptr_attribute_name
) {
11023 NDR_PULL_ALLOC(ndr
, r
->attribute_name
);
11025 r
->attribute_name
= NULL
;
11027 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_dn
));
11028 if (_ptr_object_dn
) {
11029 NDR_PULL_ALLOC(ndr
, r
->object_dn
);
11031 r
->object_dn
= NULL
;
11033 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_binary
));
11034 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_binary
));
11036 NDR_PULL_ALLOC(ndr
, r
->binary
);
11040 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->deleted
));
11041 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->created
));
11042 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
11043 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
11044 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
11045 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
11046 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->local_usn
));
11047 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11049 if (ndr_flags
& NDR_BUFFERS
) {
11050 if (r
->attribute_name
) {
11051 _mem_save_attribute_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11052 NDR_PULL_SET_MEM_CTX(ndr
, r
->attribute_name
, 0);
11053 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attribute_name
));
11054 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->attribute_name
));
11055 if (ndr_get_array_length(ndr
, &r
->attribute_name
) > ndr_get_array_size(ndr
, &r
->attribute_name
)) {
11056 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
));
11058 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t)));
11059 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->attribute_name
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t), CH_UTF16
));
11060 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attribute_name_0
, 0);
11062 if (r
->object_dn
) {
11063 _mem_save_object_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11064 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_dn
, 0);
11065 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_dn
));
11066 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_dn
));
11067 if (ndr_get_array_length(ndr
, &r
->object_dn
) > ndr_get_array_size(ndr
, &r
->object_dn
)) {
11068 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
));
11070 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t)));
11071 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_dn
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t), CH_UTF16
));
11072 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_dn_0
, 0);
11075 _mem_save_binary_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11076 NDR_PULL_SET_MEM_CTX(ndr
, r
->binary
, 0);
11077 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->binary
));
11078 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_binary_0
, 0);
11081 return NDR_ERR_SUCCESS
;
11084 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttrValMetaData(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttrValMetaData
*r
)
11086 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttrValMetaData");
11088 ndr_print_ptr(ndr
, "attribute_name", r
->attribute_name
);
11090 if (r
->attribute_name
) {
11091 ndr_print_string(ndr
, "attribute_name", r
->attribute_name
);
11094 ndr_print_ptr(ndr
, "object_dn", r
->object_dn
);
11096 if (r
->object_dn
) {
11097 ndr_print_string(ndr
, "object_dn", r
->object_dn
);
11100 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
);
11101 ndr_print_ptr(ndr
, "binary", r
->binary
);
11104 ndr_print_DATA_BLOB(ndr
, "binary", *r
->binary
);
11107 ndr_print_NTTIME(ndr
, "deleted", r
->deleted
);
11108 ndr_print_NTTIME(ndr
, "created", r
->created
);
11109 ndr_print_uint32(ndr
, "version", r
->version
);
11110 ndr_print_NTTIME(ndr
, "originating_change_time", r
->originating_change_time
);
11111 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
11112 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
11113 ndr_print_hyper(ndr
, "local_usn", r
->local_usn
);
11117 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttrValMetaDataCtr
*r
)
11119 uint32_t cntr_array_0
;
11120 if (ndr_flags
& NDR_SCALARS
) {
11121 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
11122 NDR_CHECK(ndr_push_align(ndr
, 8));
11123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
11124 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->enumeration_context
));
11125 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11126 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11128 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11130 if (ndr_flags
& NDR_BUFFERS
) {
11131 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11132 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
11135 return NDR_ERR_SUCCESS
;
11138 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttrValMetaDataCtr
*r
)
11140 uint32_t cntr_array_0
;
11141 TALLOC_CTX
*_mem_save_array_0
;
11142 if (ndr_flags
& NDR_SCALARS
) {
11143 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
11144 NDR_CHECK(ndr_pull_align(ndr
, 8));
11145 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
11146 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->enumeration_context
));
11147 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
11148 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11149 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
11150 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11151 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11153 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
11155 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
11157 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11159 if (ndr_flags
& NDR_BUFFERS
) {
11160 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11161 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
11162 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11163 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
11165 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
11167 return NDR_ERR_SUCCESS
;
11170 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttrValMetaDataCtr
*r
)
11172 uint32_t cntr_array_0
;
11173 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttrValMetaDataCtr");
11175 ndr_print_uint32(ndr
, "count", r
->count
);
11176 ndr_print_int32(ndr
, "enumeration_context", r
->enumeration_context
);
11177 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
11179 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
11181 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
11182 ndr_print_drsuapi_DsReplicaAttrValMetaData(ndr
, "array", &r
->array
[cntr_array_0
]);
11190 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor2Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor2Ctr
*r
)
11192 uint32_t cntr_array_0
;
11193 if (ndr_flags
& NDR_SCALARS
) {
11194 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
11195 NDR_CHECK(ndr_push_align(ndr
, 8));
11196 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
11197 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->enumeration_context
));
11198 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11199 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11201 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11203 if (ndr_flags
& NDR_BUFFERS
) {
11205 return NDR_ERR_SUCCESS
;
11208 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor2Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor2Ctr
*r
)
11210 uint32_t cntr_array_0
;
11211 TALLOC_CTX
*_mem_save_array_0
;
11212 if (ndr_flags
& NDR_SCALARS
) {
11213 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
11214 NDR_CHECK(ndr_pull_align(ndr
, 8));
11215 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
11216 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->enumeration_context
));
11217 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
11218 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11219 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
11220 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11221 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11223 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
11225 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
11227 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11229 if (ndr_flags
& NDR_BUFFERS
) {
11231 return NDR_ERR_SUCCESS
;
11234 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor2Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor2Ctr
*r
)
11236 uint32_t cntr_array_0
;
11237 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor2Ctr");
11239 ndr_print_uint32(ndr
, "count", r
->count
);
11240 ndr_print_int32(ndr
, "enumeration_context", r
->enumeration_context
);
11241 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
11243 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
11245 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
11246 ndr_print_drsuapi_DsReplicaCursor2(ndr
, "array", &r
->array
[cntr_array_0
]);
11254 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor3(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor3
*r
)
11256 if (ndr_flags
& NDR_SCALARS
) {
11257 NDR_CHECK(ndr_push_align(ndr
, 8));
11258 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
11259 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->highest_usn
));
11260 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_sync_success
));
11261 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->source_dsa_obj_dn
));
11262 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11264 if (ndr_flags
& NDR_BUFFERS
) {
11265 if (r
->source_dsa_obj_dn
) {
11266 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_obj_dn
, CH_UTF16
)));
11267 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11268 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->source_dsa_obj_dn
, CH_UTF16
)));
11269 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
));
11272 return NDR_ERR_SUCCESS
;
11275 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor3(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor3
*r
)
11277 uint32_t _ptr_source_dsa_obj_dn
;
11278 TALLOC_CTX
*_mem_save_source_dsa_obj_dn_0
;
11279 if (ndr_flags
& NDR_SCALARS
) {
11280 NDR_CHECK(ndr_pull_align(ndr
, 8));
11281 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->source_dsa_invocation_id
));
11282 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->highest_usn
));
11283 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_sync_success
));
11284 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_source_dsa_obj_dn
));
11285 if (_ptr_source_dsa_obj_dn
) {
11286 NDR_PULL_ALLOC(ndr
, r
->source_dsa_obj_dn
);
11288 r
->source_dsa_obj_dn
= NULL
;
11290 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11292 if (ndr_flags
& NDR_BUFFERS
) {
11293 if (r
->source_dsa_obj_dn
) {
11294 _mem_save_source_dsa_obj_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11295 NDR_PULL_SET_MEM_CTX(ndr
, r
->source_dsa_obj_dn
, 0);
11296 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->source_dsa_obj_dn
));
11297 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->source_dsa_obj_dn
));
11298 if (ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
) > ndr_get_array_size(ndr
, &r
->source_dsa_obj_dn
)) {
11299 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
));
11301 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->source_dsa_obj_dn
), sizeof(uint16_t)));
11302 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
));
11303 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_source_dsa_obj_dn_0
, 0);
11306 return NDR_ERR_SUCCESS
;
11309 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor3(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor3
*r
)
11311 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor3");
11313 ndr_print_GUID(ndr
, "source_dsa_invocation_id", &r
->source_dsa_invocation_id
);
11314 ndr_print_hyper(ndr
, "highest_usn", r
->highest_usn
);
11315 ndr_print_NTTIME(ndr
, "last_sync_success", r
->last_sync_success
);
11316 ndr_print_ptr(ndr
, "source_dsa_obj_dn", r
->source_dsa_obj_dn
);
11318 if (r
->source_dsa_obj_dn
) {
11319 ndr_print_string(ndr
, "source_dsa_obj_dn", r
->source_dsa_obj_dn
);
11325 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaCursor3Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaCursor3Ctr
*r
)
11327 uint32_t cntr_array_0
;
11328 if (ndr_flags
& NDR_SCALARS
) {
11329 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
11330 NDR_CHECK(ndr_push_align(ndr
, 8));
11331 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
11332 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->enumeration_context
));
11333 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11334 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11336 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11338 if (ndr_flags
& NDR_BUFFERS
) {
11339 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11340 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
11343 return NDR_ERR_SUCCESS
;
11346 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaCursor3Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaCursor3Ctr
*r
)
11348 uint32_t cntr_array_0
;
11349 TALLOC_CTX
*_mem_save_array_0
;
11350 if (ndr_flags
& NDR_SCALARS
) {
11351 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
11352 NDR_CHECK(ndr_pull_align(ndr
, 8));
11353 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
11354 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->enumeration_context
));
11355 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
11356 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11357 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
11358 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11359 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11361 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
11363 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
11365 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11367 if (ndr_flags
& NDR_BUFFERS
) {
11368 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11369 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
11370 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11371 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
11373 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
11375 return NDR_ERR_SUCCESS
;
11378 _PUBLIC_
void ndr_print_drsuapi_DsReplicaCursor3Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaCursor3Ctr
*r
)
11380 uint32_t cntr_array_0
;
11381 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaCursor3Ctr");
11383 ndr_print_uint32(ndr
, "count", r
->count
);
11384 ndr_print_int32(ndr
, "enumeration_context", r
->enumeration_context
);
11385 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
11387 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
11389 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
11390 ndr_print_drsuapi_DsReplicaCursor3(ndr
, "array", &r
->array
[cntr_array_0
]);
11398 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjMetaData2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjMetaData2
*r
)
11400 if (ndr_flags
& NDR_SCALARS
) {
11401 NDR_CHECK(ndr_push_align(ndr
, 8));
11402 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attribute_name
));
11403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
11404 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->originating_change_time
));
11405 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
11406 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
11407 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->local_usn
));
11408 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->originating_dsa_dn
));
11409 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11411 if (ndr_flags
& NDR_BUFFERS
) {
11412 if (r
->attribute_name
) {
11413 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
11414 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11415 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
11416 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->attribute_name
, ndr_charset_length(r
->attribute_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
11418 if (r
->originating_dsa_dn
) {
11419 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->originating_dsa_dn
, CH_UTF16
)));
11420 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11421 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->originating_dsa_dn
, CH_UTF16
)));
11422 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
));
11425 return NDR_ERR_SUCCESS
;
11428 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjMetaData2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjMetaData2
*r
)
11430 uint32_t _ptr_attribute_name
;
11431 TALLOC_CTX
*_mem_save_attribute_name_0
;
11432 uint32_t _ptr_originating_dsa_dn
;
11433 TALLOC_CTX
*_mem_save_originating_dsa_dn_0
;
11434 if (ndr_flags
& NDR_SCALARS
) {
11435 NDR_CHECK(ndr_pull_align(ndr
, 8));
11436 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attribute_name
));
11437 if (_ptr_attribute_name
) {
11438 NDR_PULL_ALLOC(ndr
, r
->attribute_name
);
11440 r
->attribute_name
= NULL
;
11442 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
11443 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
11444 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
11445 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
11446 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->local_usn
));
11447 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_originating_dsa_dn
));
11448 if (_ptr_originating_dsa_dn
) {
11449 NDR_PULL_ALLOC(ndr
, r
->originating_dsa_dn
);
11451 r
->originating_dsa_dn
= NULL
;
11453 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11455 if (ndr_flags
& NDR_BUFFERS
) {
11456 if (r
->attribute_name
) {
11457 _mem_save_attribute_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11458 NDR_PULL_SET_MEM_CTX(ndr
, r
->attribute_name
, 0);
11459 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attribute_name
));
11460 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->attribute_name
));
11461 if (ndr_get_array_length(ndr
, &r
->attribute_name
) > ndr_get_array_size(ndr
, &r
->attribute_name
)) {
11462 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
));
11464 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t)));
11465 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->attribute_name
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t), CH_UTF16
));
11466 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attribute_name_0
, 0);
11468 if (r
->originating_dsa_dn
) {
11469 _mem_save_originating_dsa_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11470 NDR_PULL_SET_MEM_CTX(ndr
, r
->originating_dsa_dn
, 0);
11471 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->originating_dsa_dn
));
11472 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->originating_dsa_dn
));
11473 if (ndr_get_array_length(ndr
, &r
->originating_dsa_dn
) > ndr_get_array_size(ndr
, &r
->originating_dsa_dn
)) {
11474 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
));
11476 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->originating_dsa_dn
), sizeof(uint16_t)));
11477 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
));
11478 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_originating_dsa_dn_0
, 0);
11481 return NDR_ERR_SUCCESS
;
11484 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjMetaData2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjMetaData2
*r
)
11486 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjMetaData2");
11488 ndr_print_ptr(ndr
, "attribute_name", r
->attribute_name
);
11490 if (r
->attribute_name
) {
11491 ndr_print_string(ndr
, "attribute_name", r
->attribute_name
);
11494 ndr_print_uint32(ndr
, "version", r
->version
);
11495 ndr_print_NTTIME(ndr
, "originating_change_time", r
->originating_change_time
);
11496 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
11497 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
11498 ndr_print_hyper(ndr
, "local_usn", r
->local_usn
);
11499 ndr_print_ptr(ndr
, "originating_dsa_dn", r
->originating_dsa_dn
);
11501 if (r
->originating_dsa_dn
) {
11502 ndr_print_string(ndr
, "originating_dsa_dn", r
->originating_dsa_dn
);
11508 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaObjMetaData2Ctr
*r
)
11510 uint32_t cntr_array_0
;
11511 if (ndr_flags
& NDR_SCALARS
) {
11512 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
11513 NDR_CHECK(ndr_push_align(ndr
, 8));
11514 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
11515 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->enumeration_context
));
11516 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11517 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11519 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11521 if (ndr_flags
& NDR_BUFFERS
) {
11522 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11523 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
11526 return NDR_ERR_SUCCESS
;
11529 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaObjMetaData2Ctr
*r
)
11531 uint32_t cntr_array_0
;
11532 TALLOC_CTX
*_mem_save_array_0
;
11533 if (ndr_flags
& NDR_SCALARS
) {
11534 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
11535 NDR_CHECK(ndr_pull_align(ndr
, 8));
11536 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
11537 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->enumeration_context
));
11538 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
11539 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11540 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
11541 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11542 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11544 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
11546 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
11548 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11550 if (ndr_flags
& NDR_BUFFERS
) {
11551 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11552 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
11553 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11554 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
11556 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
11558 return NDR_ERR_SUCCESS
;
11561 _PUBLIC_
void ndr_print_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaObjMetaData2Ctr
*r
)
11563 uint32_t cntr_array_0
;
11564 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaObjMetaData2Ctr");
11566 ndr_print_uint32(ndr
, "count", r
->count
);
11567 ndr_print_int32(ndr
, "enumeration_context", r
->enumeration_context
);
11568 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
11570 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
11572 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
11573 ndr_print_drsuapi_DsReplicaObjMetaData2(ndr
, "array", &r
->array
[cntr_array_0
]);
11581 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttrValMetaData2(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttrValMetaData2
*r
)
11583 if (ndr_flags
& NDR_SCALARS
) {
11584 NDR_CHECK(ndr_push_align(ndr
, 8));
11585 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attribute_name
));
11586 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_dn
));
11587 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_DATA_BLOB(0, r
->binary
, 0)));
11588 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->binary
));
11589 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->deleted
));
11590 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->created
));
11591 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
11592 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->originating_change_time
));
11593 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
11594 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->originating_usn
));
11595 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->local_usn
));
11596 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->originating_dsa_dn
));
11597 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11599 if (ndr_flags
& NDR_BUFFERS
) {
11600 if (r
->attribute_name
) {
11601 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
11602 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11603 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->attribute_name
, CH_UTF16
)));
11604 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->attribute_name
, ndr_charset_length(r
->attribute_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
11606 if (r
->object_dn
) {
11607 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
11608 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11609 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_dn
, CH_UTF16
)));
11610 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_dn
, ndr_charset_length(r
->object_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
11613 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->binary
));
11615 if (r
->originating_dsa_dn
) {
11616 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->originating_dsa_dn
, CH_UTF16
)));
11617 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11618 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->originating_dsa_dn
, CH_UTF16
)));
11619 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
));
11622 return NDR_ERR_SUCCESS
;
11625 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttrValMetaData2(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttrValMetaData2
*r
)
11627 uint32_t _ptr_attribute_name
;
11628 TALLOC_CTX
*_mem_save_attribute_name_0
;
11629 uint32_t _ptr_object_dn
;
11630 TALLOC_CTX
*_mem_save_object_dn_0
;
11631 uint32_t _ptr_binary
;
11632 TALLOC_CTX
*_mem_save_binary_0
;
11633 uint32_t _ptr_originating_dsa_dn
;
11634 TALLOC_CTX
*_mem_save_originating_dsa_dn_0
;
11635 if (ndr_flags
& NDR_SCALARS
) {
11636 NDR_CHECK(ndr_pull_align(ndr
, 8));
11637 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attribute_name
));
11638 if (_ptr_attribute_name
) {
11639 NDR_PULL_ALLOC(ndr
, r
->attribute_name
);
11641 r
->attribute_name
= NULL
;
11643 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_dn
));
11644 if (_ptr_object_dn
) {
11645 NDR_PULL_ALLOC(ndr
, r
->object_dn
);
11647 r
->object_dn
= NULL
;
11649 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->__ndr_size_binary
));
11650 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_binary
));
11652 NDR_PULL_ALLOC(ndr
, r
->binary
);
11656 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->deleted
));
11657 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->created
));
11658 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
11659 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->originating_change_time
));
11660 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->originating_invocation_id
));
11661 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->originating_usn
));
11662 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->local_usn
));
11663 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_originating_dsa_dn
));
11664 if (_ptr_originating_dsa_dn
) {
11665 NDR_PULL_ALLOC(ndr
, r
->originating_dsa_dn
);
11667 r
->originating_dsa_dn
= NULL
;
11669 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11671 if (ndr_flags
& NDR_BUFFERS
) {
11672 if (r
->attribute_name
) {
11673 _mem_save_attribute_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11674 NDR_PULL_SET_MEM_CTX(ndr
, r
->attribute_name
, 0);
11675 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attribute_name
));
11676 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->attribute_name
));
11677 if (ndr_get_array_length(ndr
, &r
->attribute_name
) > ndr_get_array_size(ndr
, &r
->attribute_name
)) {
11678 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
));
11680 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t)));
11681 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->attribute_name
, ndr_get_array_length(ndr
, &r
->attribute_name
), sizeof(uint16_t), CH_UTF16
));
11682 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attribute_name_0
, 0);
11684 if (r
->object_dn
) {
11685 _mem_save_object_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11686 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_dn
, 0);
11687 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_dn
));
11688 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_dn
));
11689 if (ndr_get_array_length(ndr
, &r
->object_dn
) > ndr_get_array_size(ndr
, &r
->object_dn
)) {
11690 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
));
11692 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t)));
11693 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_dn
, ndr_get_array_length(ndr
, &r
->object_dn
), sizeof(uint16_t), CH_UTF16
));
11694 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_dn_0
, 0);
11697 _mem_save_binary_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11698 NDR_PULL_SET_MEM_CTX(ndr
, r
->binary
, 0);
11699 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->binary
));
11700 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_binary_0
, 0);
11702 if (r
->originating_dsa_dn
) {
11703 _mem_save_originating_dsa_dn_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11704 NDR_PULL_SET_MEM_CTX(ndr
, r
->originating_dsa_dn
, 0);
11705 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->originating_dsa_dn
));
11706 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->originating_dsa_dn
));
11707 if (ndr_get_array_length(ndr
, &r
->originating_dsa_dn
) > ndr_get_array_size(ndr
, &r
->originating_dsa_dn
)) {
11708 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
));
11710 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->originating_dsa_dn
), sizeof(uint16_t)));
11711 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
));
11712 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_originating_dsa_dn_0
, 0);
11715 return NDR_ERR_SUCCESS
;
11718 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttrValMetaData2(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttrValMetaData2
*r
)
11720 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttrValMetaData2");
11722 ndr_print_ptr(ndr
, "attribute_name", r
->attribute_name
);
11724 if (r
->attribute_name
) {
11725 ndr_print_string(ndr
, "attribute_name", r
->attribute_name
);
11728 ndr_print_ptr(ndr
, "object_dn", r
->object_dn
);
11730 if (r
->object_dn
) {
11731 ndr_print_string(ndr
, "object_dn", r
->object_dn
);
11734 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
);
11735 ndr_print_ptr(ndr
, "binary", r
->binary
);
11738 ndr_print_DATA_BLOB(ndr
, "binary", *r
->binary
);
11741 ndr_print_NTTIME(ndr
, "deleted", r
->deleted
);
11742 ndr_print_NTTIME(ndr
, "created", r
->created
);
11743 ndr_print_uint32(ndr
, "version", r
->version
);
11744 ndr_print_NTTIME(ndr
, "originating_change_time", r
->originating_change_time
);
11745 ndr_print_GUID(ndr
, "originating_invocation_id", &r
->originating_invocation_id
);
11746 ndr_print_hyper(ndr
, "originating_usn", r
->originating_usn
);
11747 ndr_print_hyper(ndr
, "local_usn", r
->local_usn
);
11748 ndr_print_ptr(ndr
, "originating_dsa_dn", r
->originating_dsa_dn
);
11750 if (r
->originating_dsa_dn
) {
11751 ndr_print_string(ndr
, "originating_dsa_dn", r
->originating_dsa_dn
);
11757 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaAttrValMetaData2Ctr
*r
)
11759 uint32_t cntr_array_0
;
11760 if (ndr_flags
& NDR_SCALARS
) {
11761 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
11762 NDR_CHECK(ndr_push_align(ndr
, 8));
11763 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
11764 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->enumeration_context
));
11765 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11766 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11768 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11770 if (ndr_flags
& NDR_BUFFERS
) {
11771 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11772 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
11775 return NDR_ERR_SUCCESS
;
11778 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaAttrValMetaData2Ctr
*r
)
11780 uint32_t cntr_array_0
;
11781 TALLOC_CTX
*_mem_save_array_0
;
11782 if (ndr_flags
& NDR_SCALARS
) {
11783 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
11784 NDR_CHECK(ndr_pull_align(ndr
, 8));
11785 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
11786 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->enumeration_context
));
11787 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
11788 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11789 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
11790 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11791 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11793 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
11795 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
11797 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11799 if (ndr_flags
& NDR_BUFFERS
) {
11800 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11801 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
11802 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11803 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
11805 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
11807 return NDR_ERR_SUCCESS
;
11810 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaAttrValMetaData2Ctr
*r
)
11812 uint32_t cntr_array_0
;
11813 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAttrValMetaData2Ctr");
11815 ndr_print_uint32(ndr
, "count", r
->count
);
11816 ndr_print_int32(ndr
, "enumeration_context", r
->enumeration_context
);
11817 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
11819 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
11821 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
11822 ndr_print_drsuapi_DsReplicaAttrValMetaData2(ndr
, "array", &r
->array
[cntr_array_0
]);
11830 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaConnection04(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaConnection04
*r
)
11832 if (ndr_flags
& NDR_SCALARS
) {
11833 NDR_CHECK(ndr_push_align(ndr
, 8));
11834 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->u1
));
11835 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u2
));
11836 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u3
));
11837 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->bind_guid
));
11838 NDR_CHECK(ndr_push_NTTIME_1sec(ndr
, NDR_SCALARS
, r
->bind_time
));
11840 uint32_t _flags_save_ipv4address
= ndr
->flags
;
11841 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_BIGENDIAN
);
11842 NDR_CHECK(ndr_push_ipv4address(ndr
, NDR_SCALARS
, r
->client_ip_address
));
11843 ndr
->flags
= _flags_save_ipv4address
;
11845 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u5
));
11846 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11848 if (ndr_flags
& NDR_BUFFERS
) {
11850 return NDR_ERR_SUCCESS
;
11853 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaConnection04(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaConnection04
*r
)
11855 if (ndr_flags
& NDR_SCALARS
) {
11856 NDR_CHECK(ndr_pull_align(ndr
, 8));
11857 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->u1
));
11858 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u2
));
11859 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u3
));
11860 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->bind_guid
));
11861 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr
, NDR_SCALARS
, &r
->bind_time
));
11863 uint32_t _flags_save_ipv4address
= ndr
->flags
;
11864 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_BIGENDIAN
);
11865 NDR_CHECK(ndr_pull_ipv4address(ndr
, NDR_SCALARS
, &r
->client_ip_address
));
11866 ndr
->flags
= _flags_save_ipv4address
;
11868 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u5
));
11869 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11871 if (ndr_flags
& NDR_BUFFERS
) {
11873 return NDR_ERR_SUCCESS
;
11876 _PUBLIC_
void ndr_print_drsuapi_DsReplicaConnection04(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaConnection04
*r
)
11878 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaConnection04");
11880 ndr_print_hyper(ndr
, "u1", r
->u1
);
11881 ndr_print_uint32(ndr
, "u2", r
->u2
);
11882 ndr_print_uint32(ndr
, "u3", r
->u3
);
11883 ndr_print_GUID(ndr
, "bind_guid", &r
->bind_guid
);
11884 ndr_print_NTTIME_1sec(ndr
, "bind_time", r
->bind_time
);
11885 ndr_print_ipv4address(ndr
, "client_ip_address", r
->client_ip_address
);
11886 ndr_print_uint32(ndr
, "u5", r
->u5
);
11890 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaConnection04Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplicaConnection04Ctr
*r
)
11892 uint32_t cntr_array_0
;
11893 if (ndr_flags
& NDR_SCALARS
) {
11894 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
11895 NDR_CHECK(ndr_push_align(ndr
, 8));
11896 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
11897 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
11898 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11899 NDR_CHECK(ndr_push_drsuapi_DsReplicaConnection04(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11901 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11903 if (ndr_flags
& NDR_BUFFERS
) {
11905 return NDR_ERR_SUCCESS
;
11908 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaConnection04Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplicaConnection04Ctr
*r
)
11910 uint32_t cntr_array_0
;
11911 TALLOC_CTX
*_mem_save_array_0
;
11912 if (ndr_flags
& NDR_SCALARS
) {
11913 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
11914 NDR_CHECK(ndr_pull_align(ndr
, 8));
11915 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
11916 if (r
->count
> 10000) {
11917 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
11919 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
11920 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
11921 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11922 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
11923 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
11924 NDR_CHECK(ndr_pull_drsuapi_DsReplicaConnection04(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
11926 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
11928 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
11930 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
11932 if (ndr_flags
& NDR_BUFFERS
) {
11934 return NDR_ERR_SUCCESS
;
11937 _PUBLIC_
void ndr_print_drsuapi_DsReplicaConnection04Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplicaConnection04Ctr
*r
)
11939 uint32_t cntr_array_0
;
11940 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaConnection04Ctr");
11942 ndr_print_uint32(ndr
, "count", r
->count
);
11943 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
11944 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
11946 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
11948 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
11949 ndr_print_drsuapi_DsReplicaConnection04(ndr
, "array", &r
->array
[cntr_array_0
]);
11957 static enum ndr_err_code
ndr_push_drsuapi_DsReplica06(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplica06
*r
)
11959 if (ndr_flags
& NDR_SCALARS
) {
11960 NDR_CHECK(ndr_push_align(ndr
, 8));
11961 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->str1
));
11962 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u1
));
11963 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u2
));
11964 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u3
));
11965 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u4
));
11966 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u5
));
11967 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->u6
));
11968 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u7
));
11969 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
11971 if (ndr_flags
& NDR_BUFFERS
) {
11973 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->str1
, CH_UTF16
)));
11974 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11975 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->str1
, CH_UTF16
)));
11976 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->str1
, ndr_charset_length(r
->str1
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
11979 return NDR_ERR_SUCCESS
;
11982 static enum ndr_err_code
ndr_pull_drsuapi_DsReplica06(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplica06
*r
)
11984 uint32_t _ptr_str1
;
11985 TALLOC_CTX
*_mem_save_str1_0
;
11986 if (ndr_flags
& NDR_SCALARS
) {
11987 NDR_CHECK(ndr_pull_align(ndr
, 8));
11988 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_str1
));
11990 NDR_PULL_ALLOC(ndr
, r
->str1
);
11994 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u1
));
11995 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u2
));
11996 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u3
));
11997 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u4
));
11998 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u5
));
11999 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->u6
));
12000 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u7
));
12001 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
12003 if (ndr_flags
& NDR_BUFFERS
) {
12005 _mem_save_str1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12006 NDR_PULL_SET_MEM_CTX(ndr
, r
->str1
, 0);
12007 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->str1
));
12008 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->str1
));
12009 if (ndr_get_array_length(ndr
, &r
->str1
) > ndr_get_array_size(ndr
, &r
->str1
)) {
12010 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
));
12012 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->str1
), sizeof(uint16_t)));
12013 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->str1
, ndr_get_array_length(ndr
, &r
->str1
), sizeof(uint16_t), CH_UTF16
));
12014 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_str1_0
, 0);
12017 return NDR_ERR_SUCCESS
;
12020 _PUBLIC_
void ndr_print_drsuapi_DsReplica06(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplica06
*r
)
12022 ndr_print_struct(ndr
, name
, "drsuapi_DsReplica06");
12024 ndr_print_ptr(ndr
, "str1", r
->str1
);
12027 ndr_print_string(ndr
, "str1", r
->str1
);
12030 ndr_print_uint32(ndr
, "u1", r
->u1
);
12031 ndr_print_uint32(ndr
, "u2", r
->u2
);
12032 ndr_print_uint32(ndr
, "u3", r
->u3
);
12033 ndr_print_uint32(ndr
, "u4", r
->u4
);
12034 ndr_print_uint32(ndr
, "u5", r
->u5
);
12035 ndr_print_hyper(ndr
, "u6", r
->u6
);
12036 ndr_print_uint32(ndr
, "u7", r
->u7
);
12040 static enum ndr_err_code
ndr_push_drsuapi_DsReplica06Ctr(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsReplica06Ctr
*r
)
12042 uint32_t cntr_array_0
;
12043 if (ndr_flags
& NDR_SCALARS
) {
12044 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
12045 NDR_CHECK(ndr_push_align(ndr
, 8));
12046 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
12047 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
12048 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
12049 NDR_CHECK(ndr_push_drsuapi_DsReplica06(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
12051 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
12053 if (ndr_flags
& NDR_BUFFERS
) {
12054 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
12055 NDR_CHECK(ndr_push_drsuapi_DsReplica06(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
12058 return NDR_ERR_SUCCESS
;
12061 static enum ndr_err_code
ndr_pull_drsuapi_DsReplica06Ctr(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsReplica06Ctr
*r
)
12063 uint32_t cntr_array_0
;
12064 TALLOC_CTX
*_mem_save_array_0
;
12065 if (ndr_flags
& NDR_SCALARS
) {
12066 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
12067 NDR_CHECK(ndr_pull_align(ndr
, 8));
12068 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
12069 if (r
->count
> 256) {
12070 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
12072 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
12073 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
12074 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12075 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
12076 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
12077 NDR_CHECK(ndr_pull_drsuapi_DsReplica06(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_0
]));
12079 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
12081 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
12083 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
12085 if (ndr_flags
& NDR_BUFFERS
) {
12086 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12087 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
12088 for (cntr_array_0
= 0; cntr_array_0
< r
->count
; cntr_array_0
++) {
12089 NDR_CHECK(ndr_pull_drsuapi_DsReplica06(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_0
]));
12091 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
12093 return NDR_ERR_SUCCESS
;
12096 _PUBLIC_
void ndr_print_drsuapi_DsReplica06Ctr(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsReplica06Ctr
*r
)
12098 uint32_t cntr_array_0
;
12099 ndr_print_struct(ndr
, name
, "drsuapi_DsReplica06Ctr");
12101 ndr_print_uint32(ndr
, "count", r
->count
);
12102 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
12103 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
12105 for (cntr_array_0
=0;cntr_array_0
<r
->count
;cntr_array_0
++) {
12107 if (asprintf(&idx_0
, "[%d]", cntr_array_0
) != -1) {
12108 ndr_print_drsuapi_DsReplica06(ndr
, "array", &r
->array
[cntr_array_0
]);
12116 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaInfo(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsReplicaInfo
*r
)
12118 if (ndr_flags
& NDR_SCALARS
) {
12119 int level
= ndr_push_get_switch_value(ndr
, r
);
12120 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, level
));
12121 NDR_CHECK(ndr_push_union_align(ndr
, 5));
12123 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
: {
12124 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->neighbours
));
12127 case DRSUAPI_DS_REPLICA_INFO_CURSORS
: {
12128 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->cursors
));
12131 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
: {
12132 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->objmetadata
));
12135 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
: {
12136 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->connectfailures
));
12139 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
: {
12140 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->linkfailures
));
12143 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
: {
12144 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->pendingops
));
12147 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
: {
12148 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attrvalmetadata
));
12151 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
: {
12152 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->cursors2
));
12155 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
: {
12156 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->cursors3
));
12159 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
: {
12160 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->objmetadata2
));
12163 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
: {
12164 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attrvalmetadata2
));
12167 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
: {
12168 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->neighbours02
));
12171 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
: {
12172 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->connections04
));
12175 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
: {
12176 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->cursors05
));
12179 case DRSUAPI_DS_REPLICA_INFO_06
: {
12180 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->i06
));
12184 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12187 if (ndr_flags
& NDR_BUFFERS
) {
12188 int level
= ndr_push_get_switch_value(ndr
, r
);
12190 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
:
12191 if (r
->neighbours
) {
12192 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->neighbours
));
12196 case DRSUAPI_DS_REPLICA_INFO_CURSORS
:
12198 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtr(ndr
, NDR_SCALARS
, r
->cursors
));
12202 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
:
12203 if (r
->objmetadata
) {
12204 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaDataCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->objmetadata
));
12208 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
:
12209 if (r
->connectfailures
) {
12210 NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->connectfailures
));
12214 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
:
12215 if (r
->linkfailures
) {
12216 NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->linkfailures
));
12220 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
:
12221 if (r
->pendingops
) {
12222 NDR_CHECK(ndr_push_drsuapi_DsReplicaOpCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->pendingops
));
12226 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
:
12227 if (r
->attrvalmetadata
) {
12228 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaDataCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->attrvalmetadata
));
12232 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
:
12234 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2Ctr(ndr
, NDR_SCALARS
, r
->cursors2
));
12238 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
:
12240 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->cursors3
));
12244 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
:
12245 if (r
->objmetadata2
) {
12246 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->objmetadata2
));
12250 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
:
12251 if (r
->attrvalmetadata2
) {
12252 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->attrvalmetadata2
));
12256 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
:
12257 if (r
->neighbours02
) {
12258 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->neighbours02
));
12262 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
:
12263 if (r
->connections04
) {
12264 NDR_CHECK(ndr_push_drsuapi_DsReplicaConnection04Ctr(ndr
, NDR_SCALARS
, r
->connections04
));
12268 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
:
12269 if (r
->cursors05
) {
12270 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->cursors05
));
12274 case DRSUAPI_DS_REPLICA_INFO_06
:
12276 NDR_CHECK(ndr_push_drsuapi_DsReplica06Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->i06
));
12281 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12284 return NDR_ERR_SUCCESS
;
12287 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaInfo(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsReplicaInfo
*r
)
12291 TALLOC_CTX
*_mem_save_neighbours_0
;
12292 TALLOC_CTX
*_mem_save_cursors_0
;
12293 TALLOC_CTX
*_mem_save_objmetadata_0
;
12294 TALLOC_CTX
*_mem_save_connectfailures_0
;
12295 TALLOC_CTX
*_mem_save_linkfailures_0
;
12296 TALLOC_CTX
*_mem_save_pendingops_0
;
12297 TALLOC_CTX
*_mem_save_attrvalmetadata_0
;
12298 TALLOC_CTX
*_mem_save_cursors2_0
;
12299 TALLOC_CTX
*_mem_save_cursors3_0
;
12300 TALLOC_CTX
*_mem_save_objmetadata2_0
;
12301 TALLOC_CTX
*_mem_save_attrvalmetadata2_0
;
12302 TALLOC_CTX
*_mem_save_neighbours02_0
;
12303 TALLOC_CTX
*_mem_save_connections04_0
;
12304 TALLOC_CTX
*_mem_save_cursors05_0
;
12305 TALLOC_CTX
*_mem_save_i06_0
;
12306 level
= ndr_pull_get_switch_value(ndr
, r
);
12307 if (ndr_flags
& NDR_SCALARS
) {
12308 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
12309 if (_level
!= level
) {
12310 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
12312 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
12314 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
: {
12315 uint32_t _ptr_neighbours
;
12316 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_neighbours
));
12317 if (_ptr_neighbours
) {
12318 NDR_PULL_ALLOC(ndr
, r
->neighbours
);
12320 r
->neighbours
= NULL
;
12324 case DRSUAPI_DS_REPLICA_INFO_CURSORS
: {
12325 uint32_t _ptr_cursors
;
12326 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_cursors
));
12327 if (_ptr_cursors
) {
12328 NDR_PULL_ALLOC(ndr
, r
->cursors
);
12334 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
: {
12335 uint32_t _ptr_objmetadata
;
12336 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_objmetadata
));
12337 if (_ptr_objmetadata
) {
12338 NDR_PULL_ALLOC(ndr
, r
->objmetadata
);
12340 r
->objmetadata
= NULL
;
12344 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
: {
12345 uint32_t _ptr_connectfailures
;
12346 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_connectfailures
));
12347 if (_ptr_connectfailures
) {
12348 NDR_PULL_ALLOC(ndr
, r
->connectfailures
);
12350 r
->connectfailures
= NULL
;
12354 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
: {
12355 uint32_t _ptr_linkfailures
;
12356 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_linkfailures
));
12357 if (_ptr_linkfailures
) {
12358 NDR_PULL_ALLOC(ndr
, r
->linkfailures
);
12360 r
->linkfailures
= NULL
;
12364 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
: {
12365 uint32_t _ptr_pendingops
;
12366 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_pendingops
));
12367 if (_ptr_pendingops
) {
12368 NDR_PULL_ALLOC(ndr
, r
->pendingops
);
12370 r
->pendingops
= NULL
;
12374 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
: {
12375 uint32_t _ptr_attrvalmetadata
;
12376 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attrvalmetadata
));
12377 if (_ptr_attrvalmetadata
) {
12378 NDR_PULL_ALLOC(ndr
, r
->attrvalmetadata
);
12380 r
->attrvalmetadata
= NULL
;
12384 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
: {
12385 uint32_t _ptr_cursors2
;
12386 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_cursors2
));
12387 if (_ptr_cursors2
) {
12388 NDR_PULL_ALLOC(ndr
, r
->cursors2
);
12390 r
->cursors2
= NULL
;
12394 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
: {
12395 uint32_t _ptr_cursors3
;
12396 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_cursors3
));
12397 if (_ptr_cursors3
) {
12398 NDR_PULL_ALLOC(ndr
, r
->cursors3
);
12400 r
->cursors3
= NULL
;
12404 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
: {
12405 uint32_t _ptr_objmetadata2
;
12406 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_objmetadata2
));
12407 if (_ptr_objmetadata2
) {
12408 NDR_PULL_ALLOC(ndr
, r
->objmetadata2
);
12410 r
->objmetadata2
= NULL
;
12414 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
: {
12415 uint32_t _ptr_attrvalmetadata2
;
12416 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attrvalmetadata2
));
12417 if (_ptr_attrvalmetadata2
) {
12418 NDR_PULL_ALLOC(ndr
, r
->attrvalmetadata2
);
12420 r
->attrvalmetadata2
= NULL
;
12424 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
: {
12425 uint32_t _ptr_neighbours02
;
12426 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_neighbours02
));
12427 if (_ptr_neighbours02
) {
12428 NDR_PULL_ALLOC(ndr
, r
->neighbours02
);
12430 r
->neighbours02
= NULL
;
12434 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
: {
12435 uint32_t _ptr_connections04
;
12436 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_connections04
));
12437 if (_ptr_connections04
) {
12438 NDR_PULL_ALLOC(ndr
, r
->connections04
);
12440 r
->connections04
= NULL
;
12444 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
: {
12445 uint32_t _ptr_cursors05
;
12446 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_cursors05
));
12447 if (_ptr_cursors05
) {
12448 NDR_PULL_ALLOC(ndr
, r
->cursors05
);
12450 r
->cursors05
= NULL
;
12454 case DRSUAPI_DS_REPLICA_INFO_06
: {
12456 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_i06
));
12458 NDR_PULL_ALLOC(ndr
, r
->i06
);
12465 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12468 if (ndr_flags
& NDR_BUFFERS
) {
12470 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
:
12471 if (r
->neighbours
) {
12472 _mem_save_neighbours_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12473 NDR_PULL_SET_MEM_CTX(ndr
, r
->neighbours
, 0);
12474 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->neighbours
));
12475 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_neighbours_0
, 0);
12479 case DRSUAPI_DS_REPLICA_INFO_CURSORS
:
12481 _mem_save_cursors_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12482 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors
, 0);
12483 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtr(ndr
, NDR_SCALARS
, r
->cursors
));
12484 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors_0
, 0);
12488 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
:
12489 if (r
->objmetadata
) {
12490 _mem_save_objmetadata_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12491 NDR_PULL_SET_MEM_CTX(ndr
, r
->objmetadata
, 0);
12492 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaDataCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->objmetadata
));
12493 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objmetadata_0
, 0);
12497 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
:
12498 if (r
->connectfailures
) {
12499 _mem_save_connectfailures_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12500 NDR_PULL_SET_MEM_CTX(ndr
, r
->connectfailures
, 0);
12501 NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->connectfailures
));
12502 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connectfailures_0
, 0);
12506 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
:
12507 if (r
->linkfailures
) {
12508 _mem_save_linkfailures_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12509 NDR_PULL_SET_MEM_CTX(ndr
, r
->linkfailures
, 0);
12510 NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->linkfailures
));
12511 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_linkfailures_0
, 0);
12515 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
:
12516 if (r
->pendingops
) {
12517 _mem_save_pendingops_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12518 NDR_PULL_SET_MEM_CTX(ndr
, r
->pendingops
, 0);
12519 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOpCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->pendingops
));
12520 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_pendingops_0
, 0);
12524 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
:
12525 if (r
->attrvalmetadata
) {
12526 _mem_save_attrvalmetadata_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12527 NDR_PULL_SET_MEM_CTX(ndr
, r
->attrvalmetadata
, 0);
12528 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaDataCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->attrvalmetadata
));
12529 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attrvalmetadata_0
, 0);
12533 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
:
12535 _mem_save_cursors2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12536 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors2
, 0);
12537 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2Ctr(ndr
, NDR_SCALARS
, r
->cursors2
));
12538 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors2_0
, 0);
12542 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
:
12544 _mem_save_cursors3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12545 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors3
, 0);
12546 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->cursors3
));
12547 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors3_0
, 0);
12551 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
:
12552 if (r
->objmetadata2
) {
12553 _mem_save_objmetadata2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12554 NDR_PULL_SET_MEM_CTX(ndr
, r
->objmetadata2
, 0);
12555 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->objmetadata2
));
12556 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_objmetadata2_0
, 0);
12560 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
:
12561 if (r
->attrvalmetadata2
) {
12562 _mem_save_attrvalmetadata2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12563 NDR_PULL_SET_MEM_CTX(ndr
, r
->attrvalmetadata2
, 0);
12564 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->attrvalmetadata2
));
12565 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attrvalmetadata2_0
, 0);
12569 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
:
12570 if (r
->neighbours02
) {
12571 _mem_save_neighbours02_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12572 NDR_PULL_SET_MEM_CTX(ndr
, r
->neighbours02
, 0);
12573 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->neighbours02
));
12574 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_neighbours02_0
, 0);
12578 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
:
12579 if (r
->connections04
) {
12580 _mem_save_connections04_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12581 NDR_PULL_SET_MEM_CTX(ndr
, r
->connections04
, 0);
12582 NDR_CHECK(ndr_pull_drsuapi_DsReplicaConnection04Ctr(ndr
, NDR_SCALARS
, r
->connections04
));
12583 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connections04_0
, 0);
12587 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
:
12588 if (r
->cursors05
) {
12589 _mem_save_cursors05_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12590 NDR_PULL_SET_MEM_CTX(ndr
, r
->cursors05
, 0);
12591 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr
, NDR_SCALARS
, r
->cursors05
));
12592 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cursors05_0
, 0);
12596 case DRSUAPI_DS_REPLICA_INFO_06
:
12598 _mem_save_i06_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12599 NDR_PULL_SET_MEM_CTX(ndr
, r
->i06
, 0);
12600 NDR_CHECK(ndr_pull_drsuapi_DsReplica06Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->i06
));
12601 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_i06_0
, 0);
12606 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12609 return NDR_ERR_SUCCESS
;
12612 _PUBLIC_
void ndr_print_drsuapi_DsReplicaInfo(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsReplicaInfo
*r
)
12615 level
= ndr_print_get_switch_value(ndr
, r
);
12616 ndr_print_union(ndr
, name
, level
, "drsuapi_DsReplicaInfo");
12618 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
:
12619 ndr_print_ptr(ndr
, "neighbours", r
->neighbours
);
12621 if (r
->neighbours
) {
12622 ndr_print_drsuapi_DsReplicaNeighbourCtr(ndr
, "neighbours", r
->neighbours
);
12627 case DRSUAPI_DS_REPLICA_INFO_CURSORS
:
12628 ndr_print_ptr(ndr
, "cursors", r
->cursors
);
12631 ndr_print_drsuapi_DsReplicaCursorCtr(ndr
, "cursors", r
->cursors
);
12636 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
:
12637 ndr_print_ptr(ndr
, "objmetadata", r
->objmetadata
);
12639 if (r
->objmetadata
) {
12640 ndr_print_drsuapi_DsReplicaObjMetaDataCtr(ndr
, "objmetadata", r
->objmetadata
);
12645 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
:
12646 ndr_print_ptr(ndr
, "connectfailures", r
->connectfailures
);
12648 if (r
->connectfailures
) {
12649 ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, "connectfailures", r
->connectfailures
);
12654 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
:
12655 ndr_print_ptr(ndr
, "linkfailures", r
->linkfailures
);
12657 if (r
->linkfailures
) {
12658 ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(ndr
, "linkfailures", r
->linkfailures
);
12663 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
:
12664 ndr_print_ptr(ndr
, "pendingops", r
->pendingops
);
12666 if (r
->pendingops
) {
12667 ndr_print_drsuapi_DsReplicaOpCtr(ndr
, "pendingops", r
->pendingops
);
12672 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
:
12673 ndr_print_ptr(ndr
, "attrvalmetadata", r
->attrvalmetadata
);
12675 if (r
->attrvalmetadata
) {
12676 ndr_print_drsuapi_DsReplicaAttrValMetaDataCtr(ndr
, "attrvalmetadata", r
->attrvalmetadata
);
12681 case DRSUAPI_DS_REPLICA_INFO_CURSORS2
:
12682 ndr_print_ptr(ndr
, "cursors2", r
->cursors2
);
12685 ndr_print_drsuapi_DsReplicaCursor2Ctr(ndr
, "cursors2", r
->cursors2
);
12690 case DRSUAPI_DS_REPLICA_INFO_CURSORS3
:
12691 ndr_print_ptr(ndr
, "cursors3", r
->cursors3
);
12694 ndr_print_drsuapi_DsReplicaCursor3Ctr(ndr
, "cursors3", r
->cursors3
);
12699 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
:
12700 ndr_print_ptr(ndr
, "objmetadata2", r
->objmetadata2
);
12702 if (r
->objmetadata2
) {
12703 ndr_print_drsuapi_DsReplicaObjMetaData2Ctr(ndr
, "objmetadata2", r
->objmetadata2
);
12708 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
:
12709 ndr_print_ptr(ndr
, "attrvalmetadata2", r
->attrvalmetadata2
);
12711 if (r
->attrvalmetadata2
) {
12712 ndr_print_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr
, "attrvalmetadata2", r
->attrvalmetadata2
);
12717 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
:
12718 ndr_print_ptr(ndr
, "neighbours02", r
->neighbours02
);
12720 if (r
->neighbours02
) {
12721 ndr_print_drsuapi_DsReplicaNeighbourCtr(ndr
, "neighbours02", r
->neighbours02
);
12726 case DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
:
12727 ndr_print_ptr(ndr
, "connections04", r
->connections04
);
12729 if (r
->connections04
) {
12730 ndr_print_drsuapi_DsReplicaConnection04Ctr(ndr
, "connections04", r
->connections04
);
12735 case DRSUAPI_DS_REPLICA_INFO_CURSORS05
:
12736 ndr_print_ptr(ndr
, "cursors05", r
->cursors05
);
12738 if (r
->cursors05
) {
12739 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr
, "cursors05", r
->cursors05
);
12744 case DRSUAPI_DS_REPLICA_INFO_06
:
12745 ndr_print_ptr(ndr
, "i06", r
->i06
);
12748 ndr_print_drsuapi_DsReplica06Ctr(ndr
, "i06", r
->i06
);
12754 ndr_print_bad_level(ndr
, name
, level
);
12758 static enum ndr_err_code
ndr_push_drsuapi_DsGetMemberships2Ctr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetMemberships2Ctr
*r
)
12760 if (ndr_flags
& NDR_SCALARS
) {
12761 int level
= ndr_push_get_switch_value(ndr
, r
);
12762 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
12763 NDR_CHECK(ndr_push_union_align(ndr
, 5));
12766 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
12770 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12773 if (ndr_flags
& NDR_BUFFERS
) {
12774 int level
= ndr_push_get_switch_value(ndr
, r
);
12777 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
12781 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12784 return NDR_ERR_SUCCESS
;
12787 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMemberships2Ctr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetMemberships2Ctr
*r
)
12791 level
= ndr_pull_get_switch_value(ndr
, r
);
12792 if (ndr_flags
& NDR_SCALARS
) {
12793 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
12794 if (_level
!= level
) {
12795 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
12797 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
12800 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
12804 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12807 if (ndr_flags
& NDR_BUFFERS
) {
12810 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
12814 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12817 return NDR_ERR_SUCCESS
;
12820 _PUBLIC_
void ndr_print_drsuapi_DsGetMemberships2Ctr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetMemberships2Ctr
*r
)
12823 level
= ndr_print_get_switch_value(ndr
, r
);
12824 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetMemberships2Ctr");
12827 ndr_print_drsuapi_DsGetMembershipsCtr1(ndr
, "ctr1", &r
->ctr1
);
12831 ndr_print_bad_level(ndr
, name
, level
);
12835 static enum ndr_err_code
ndr_push_drsuapi_DsGetMemberships2Request1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsGetMemberships2Request1
*r
)
12837 uint32_t cntr_req_array_1
;
12838 if (ndr_flags
& NDR_SCALARS
) {
12839 NDR_CHECK(ndr_push_align(ndr
, 5));
12840 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_req
));
12841 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->req_array
));
12842 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
12844 if (ndr_flags
& NDR_BUFFERS
) {
12845 if (r
->req_array
) {
12846 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_req
));
12847 for (cntr_req_array_1
= 0; cntr_req_array_1
< r
->num_req
; cntr_req_array_1
++) {
12848 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->req_array
[cntr_req_array_1
]));
12850 for (cntr_req_array_1
= 0; cntr_req_array_1
< r
->num_req
; cntr_req_array_1
++) {
12851 if (r
->req_array
[cntr_req_array_1
]) {
12852 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->req_array
[cntr_req_array_1
]));
12857 return NDR_ERR_SUCCESS
;
12860 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMemberships2Request1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsGetMemberships2Request1
*r
)
12862 uint32_t _ptr_req_array
;
12863 uint32_t cntr_req_array_1
;
12864 TALLOC_CTX
*_mem_save_req_array_0
;
12865 TALLOC_CTX
*_mem_save_req_array_1
;
12866 TALLOC_CTX
*_mem_save_req_array_2
;
12867 if (ndr_flags
& NDR_SCALARS
) {
12868 NDR_CHECK(ndr_pull_align(ndr
, 5));
12869 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_req
));
12870 if (r
->num_req
< 1 || r
->num_req
> 10000) {
12871 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
12873 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_req_array
));
12874 if (_ptr_req_array
) {
12875 NDR_PULL_ALLOC(ndr
, r
->req_array
);
12877 r
->req_array
= NULL
;
12879 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
12881 if (ndr_flags
& NDR_BUFFERS
) {
12882 if (r
->req_array
) {
12883 _mem_save_req_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12884 NDR_PULL_SET_MEM_CTX(ndr
, r
->req_array
, 0);
12885 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->req_array
));
12886 NDR_PULL_ALLOC_N(ndr
, r
->req_array
, ndr_get_array_size(ndr
, &r
->req_array
));
12887 _mem_save_req_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12888 NDR_PULL_SET_MEM_CTX(ndr
, r
->req_array
, 0);
12889 for (cntr_req_array_1
= 0; cntr_req_array_1
< r
->num_req
; cntr_req_array_1
++) {
12890 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_req_array
));
12891 if (_ptr_req_array
) {
12892 NDR_PULL_ALLOC(ndr
, r
->req_array
[cntr_req_array_1
]);
12894 r
->req_array
[cntr_req_array_1
] = NULL
;
12897 for (cntr_req_array_1
= 0; cntr_req_array_1
< r
->num_req
; cntr_req_array_1
++) {
12898 if (r
->req_array
[cntr_req_array_1
]) {
12899 _mem_save_req_array_2
= NDR_PULL_GET_MEM_CTX(ndr
);
12900 NDR_PULL_SET_MEM_CTX(ndr
, r
->req_array
[cntr_req_array_1
], 0);
12901 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->req_array
[cntr_req_array_1
]));
12902 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_array_2
, 0);
12905 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_array_1
, 0);
12906 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_array_0
, 0);
12908 if (r
->req_array
) {
12909 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->req_array
, r
->num_req
));
12912 return NDR_ERR_SUCCESS
;
12915 _PUBLIC_
void ndr_print_drsuapi_DsGetMemberships2Request1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsGetMemberships2Request1
*r
)
12917 uint32_t cntr_req_array_1
;
12918 ndr_print_struct(ndr
, name
, "drsuapi_DsGetMemberships2Request1");
12920 ndr_print_uint32(ndr
, "num_req", r
->num_req
);
12921 ndr_print_ptr(ndr
, "req_array", r
->req_array
);
12923 if (r
->req_array
) {
12924 ndr
->print(ndr
, "%s: ARRAY(%d)", "req_array", (int)r
->num_req
);
12926 for (cntr_req_array_1
=0;cntr_req_array_1
<r
->num_req
;cntr_req_array_1
++) {
12928 if (asprintf(&idx_1
, "[%d]", cntr_req_array_1
) != -1) {
12929 ndr_print_ptr(ndr
, "req_array", r
->req_array
[cntr_req_array_1
]);
12931 if (r
->req_array
[cntr_req_array_1
]) {
12932 ndr_print_drsuapi_DsGetMembershipsRequest1(ndr
, "req_array", r
->req_array
[cntr_req_array_1
]);
12944 static enum ndr_err_code
ndr_push_drsuapi_DsGetMemberships2Request(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_DsGetMemberships2Request
*r
)
12946 if (ndr_flags
& NDR_SCALARS
) {
12947 int level
= ndr_push_get_switch_value(ndr
, r
);
12948 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
12949 NDR_CHECK(ndr_push_union_align(ndr
, 5));
12952 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request1(ndr
, NDR_SCALARS
, &r
->req1
));
12956 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12959 if (ndr_flags
& NDR_BUFFERS
) {
12960 int level
= ndr_push_get_switch_value(ndr
, r
);
12963 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request1(ndr
, NDR_BUFFERS
, &r
->req1
));
12967 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12970 return NDR_ERR_SUCCESS
;
12973 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMemberships2Request(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_DsGetMemberships2Request
*r
)
12977 level
= ndr_pull_get_switch_value(ndr
, r
);
12978 if (ndr_flags
& NDR_SCALARS
) {
12979 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
12980 if (_level
!= level
) {
12981 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
12983 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
12986 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request1(ndr
, NDR_SCALARS
, &r
->req1
));
12990 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
12993 if (ndr_flags
& NDR_BUFFERS
) {
12996 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request1(ndr
, NDR_BUFFERS
, &r
->req1
));
13000 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
13003 return NDR_ERR_SUCCESS
;
13006 _PUBLIC_
void ndr_print_drsuapi_DsGetMemberships2Request(struct ndr_print
*ndr
, const char *name
, const union drsuapi_DsGetMemberships2Request
*r
)
13009 level
= ndr_print_get_switch_value(ndr
, r
);
13010 ndr_print_union(ndr
, name
, level
, "drsuapi_DsGetMemberships2Request");
13013 ndr_print_drsuapi_DsGetMemberships2Request1(ndr
, "req1", &r
->req1
);
13017 ndr_print_bad_level(ndr
, name
, level
);
13021 static enum ndr_err_code
ndr_push_drsuapi_DsSiteCostInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_DsSiteCostInfo
*r
)
13023 if (ndr_flags
& NDR_SCALARS
) {
13024 NDR_CHECK(ndr_push_align(ndr
, 4));
13025 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->error_code
));
13026 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->site_cost
));
13027 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
13029 if (ndr_flags
& NDR_BUFFERS
) {
13031 return NDR_ERR_SUCCESS
;
13034 static enum ndr_err_code
ndr_pull_drsuapi_DsSiteCostInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_DsSiteCostInfo
*r
)
13036 if (ndr_flags
& NDR_SCALARS
) {
13037 NDR_CHECK(ndr_pull_align(ndr
, 4));
13038 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->error_code
));
13039 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->site_cost
));
13040 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
13042 if (ndr_flags
& NDR_BUFFERS
) {
13044 return NDR_ERR_SUCCESS
;
13047 _PUBLIC_
void ndr_print_drsuapi_DsSiteCostInfo(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_DsSiteCostInfo
*r
)
13049 ndr_print_struct(ndr
, name
, "drsuapi_DsSiteCostInfo");
13051 ndr_print_WERROR(ndr
, "error_code", r
->error_code
);
13052 ndr_print_uint32(ndr
, "site_cost", r
->site_cost
);
13056 static enum ndr_err_code
ndr_push_drsuapi_QuerySitesByCostCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_QuerySitesByCostCtr1
*r
)
13058 uint32_t cntr_info_1
;
13059 if (ndr_flags
& NDR_SCALARS
) {
13060 NDR_CHECK(ndr_push_align(ndr
, 5));
13061 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_info
));
13062 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info
));
13063 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
13064 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
13066 if (ndr_flags
& NDR_BUFFERS
) {
13068 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_info
));
13069 for (cntr_info_1
= 0; cntr_info_1
< r
->num_info
; cntr_info_1
++) {
13070 NDR_CHECK(ndr_push_drsuapi_DsSiteCostInfo(ndr
, NDR_SCALARS
, &r
->info
[cntr_info_1
]));
13074 return NDR_ERR_SUCCESS
;
13077 static enum ndr_err_code
ndr_pull_drsuapi_QuerySitesByCostCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_QuerySitesByCostCtr1
*r
)
13079 uint32_t _ptr_info
;
13080 uint32_t cntr_info_1
;
13081 TALLOC_CTX
*_mem_save_info_0
;
13082 TALLOC_CTX
*_mem_save_info_1
;
13083 if (ndr_flags
& NDR_SCALARS
) {
13084 NDR_CHECK(ndr_pull_align(ndr
, 5));
13085 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_info
));
13086 if (r
->num_info
> 10000) {
13087 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
13089 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
13091 NDR_PULL_ALLOC(ndr
, r
->info
);
13095 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
13096 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
13098 if (ndr_flags
& NDR_BUFFERS
) {
13100 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13101 NDR_PULL_SET_MEM_CTX(ndr
, r
->info
, 0);
13102 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->info
));
13103 NDR_PULL_ALLOC_N(ndr
, r
->info
, ndr_get_array_size(ndr
, &r
->info
));
13104 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
13105 NDR_PULL_SET_MEM_CTX(ndr
, r
->info
, 0);
13106 for (cntr_info_1
= 0; cntr_info_1
< r
->num_info
; cntr_info_1
++) {
13107 NDR_CHECK(ndr_pull_drsuapi_DsSiteCostInfo(ndr
, NDR_SCALARS
, &r
->info
[cntr_info_1
]));
13109 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
13110 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
13113 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->info
, r
->num_info
));
13116 return NDR_ERR_SUCCESS
;
13119 _PUBLIC_
void ndr_print_drsuapi_QuerySitesByCostCtr1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_QuerySitesByCostCtr1
*r
)
13121 uint32_t cntr_info_1
;
13122 ndr_print_struct(ndr
, name
, "drsuapi_QuerySitesByCostCtr1");
13124 ndr_print_uint32(ndr
, "num_info", r
->num_info
);
13125 ndr_print_ptr(ndr
, "info", r
->info
);
13128 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)r
->num_info
);
13130 for (cntr_info_1
=0;cntr_info_1
<r
->num_info
;cntr_info_1
++) {
13132 if (asprintf(&idx_1
, "[%d]", cntr_info_1
) != -1) {
13133 ndr_print_drsuapi_DsSiteCostInfo(ndr
, "info", &r
->info
[cntr_info_1
]);
13140 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
13144 static enum ndr_err_code
ndr_push_drsuapi_QuerySitesByCostCtr(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_QuerySitesByCostCtr
*r
)
13146 if (ndr_flags
& NDR_SCALARS
) {
13147 int level
= ndr_push_get_switch_value(ndr
, r
);
13148 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
13149 NDR_CHECK(ndr_push_union_align(ndr
, 5));
13152 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
13156 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
13159 if (ndr_flags
& NDR_BUFFERS
) {
13160 int level
= ndr_push_get_switch_value(ndr
, r
);
13163 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
13167 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
13170 return NDR_ERR_SUCCESS
;
13173 static enum ndr_err_code
ndr_pull_drsuapi_QuerySitesByCostCtr(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_QuerySitesByCostCtr
*r
)
13177 level
= ndr_pull_get_switch_value(ndr
, r
);
13178 if (ndr_flags
& NDR_SCALARS
) {
13179 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
13180 if (_level
!= level
) {
13181 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
13183 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
13186 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr1(ndr
, NDR_SCALARS
, &r
->ctr1
));
13190 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
13193 if (ndr_flags
& NDR_BUFFERS
) {
13196 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr1(ndr
, NDR_BUFFERS
, &r
->ctr1
));
13200 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
13203 return NDR_ERR_SUCCESS
;
13206 _PUBLIC_
void ndr_print_drsuapi_QuerySitesByCostCtr(struct ndr_print
*ndr
, const char *name
, const union drsuapi_QuerySitesByCostCtr
*r
)
13209 level
= ndr_print_get_switch_value(ndr
, r
);
13210 ndr_print_union(ndr
, name
, level
, "drsuapi_QuerySitesByCostCtr");
13213 ndr_print_drsuapi_QuerySitesByCostCtr1(ndr
, "ctr1", &r
->ctr1
);
13217 ndr_print_bad_level(ndr
, name
, level
);
13221 static enum ndr_err_code
ndr_push_drsuapi_QuerySitesByCostRequest1(struct ndr_push
*ndr
, int ndr_flags
, const struct drsuapi_QuerySitesByCostRequest1
*r
)
13223 uint32_t cntr_site_to_1
;
13224 if (ndr_flags
& NDR_SCALARS
) {
13225 NDR_CHECK(ndr_push_align(ndr
, 5));
13226 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_from
));
13227 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_req
));
13228 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_to
));
13229 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
13230 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
13232 if (ndr_flags
& NDR_BUFFERS
) {
13233 if (r
->site_from
) {
13234 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_from
, CH_UTF16
)));
13235 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
13236 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_from
, CH_UTF16
)));
13237 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->site_from
, ndr_charset_length(r
->site_from
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
13240 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_req
));
13241 for (cntr_site_to_1
= 0; cntr_site_to_1
< r
->num_req
; cntr_site_to_1
++) {
13242 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->site_to
[cntr_site_to_1
]));
13244 for (cntr_site_to_1
= 0; cntr_site_to_1
< r
->num_req
; cntr_site_to_1
++) {
13245 if (r
->site_to
[cntr_site_to_1
]) {
13246 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_to
[cntr_site_to_1
], CH_UTF16
)));
13247 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
13248 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->site_to
[cntr_site_to_1
], CH_UTF16
)));
13249 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
));
13254 return NDR_ERR_SUCCESS
;
13257 static enum ndr_err_code
ndr_pull_drsuapi_QuerySitesByCostRequest1(struct ndr_pull
*ndr
, int ndr_flags
, struct drsuapi_QuerySitesByCostRequest1
*r
)
13259 uint32_t _ptr_site_from
;
13260 TALLOC_CTX
*_mem_save_site_from_0
;
13261 uint32_t _ptr_site_to
;
13262 uint32_t cntr_site_to_1
;
13263 TALLOC_CTX
*_mem_save_site_to_0
;
13264 TALLOC_CTX
*_mem_save_site_to_1
;
13265 TALLOC_CTX
*_mem_save_site_to_2
;
13266 if (ndr_flags
& NDR_SCALARS
) {
13267 NDR_CHECK(ndr_pull_align(ndr
, 5));
13268 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_from
));
13269 if (_ptr_site_from
) {
13270 NDR_PULL_ALLOC(ndr
, r
->site_from
);
13272 r
->site_from
= NULL
;
13274 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_req
));
13275 if (r
->num_req
< 1 || r
->num_req
> 10000) {
13276 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
13278 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_to
));
13279 if (_ptr_site_to
) {
13280 NDR_PULL_ALLOC(ndr
, r
->site_to
);
13284 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
13285 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
13287 if (ndr_flags
& NDR_BUFFERS
) {
13288 if (r
->site_from
) {
13289 _mem_save_site_from_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13290 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_from
, 0);
13291 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_from
));
13292 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_from
));
13293 if (ndr_get_array_length(ndr
, &r
->site_from
) > ndr_get_array_size(ndr
, &r
->site_from
)) {
13294 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
));
13296 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_from
), sizeof(uint16_t)));
13297 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->site_from
, ndr_get_array_length(ndr
, &r
->site_from
), sizeof(uint16_t), CH_UTF16
));
13298 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_from_0
, 0);
13301 _mem_save_site_to_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13302 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_to
, 0);
13303 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_to
));
13304 NDR_PULL_ALLOC_N(ndr
, r
->site_to
, ndr_get_array_size(ndr
, &r
->site_to
));
13305 _mem_save_site_to_1
= NDR_PULL_GET_MEM_CTX(ndr
);
13306 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_to
, 0);
13307 for (cntr_site_to_1
= 0; cntr_site_to_1
< r
->num_req
; cntr_site_to_1
++) {
13308 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_to
));
13309 if (_ptr_site_to
) {
13310 NDR_PULL_ALLOC(ndr
, r
->site_to
[cntr_site_to_1
]);
13312 r
->site_to
[cntr_site_to_1
] = NULL
;
13315 for (cntr_site_to_1
= 0; cntr_site_to_1
< r
->num_req
; cntr_site_to_1
++) {
13316 if (r
->site_to
[cntr_site_to_1
]) {
13317 _mem_save_site_to_2
= NDR_PULL_GET_MEM_CTX(ndr
);
13318 NDR_PULL_SET_MEM_CTX(ndr
, r
->site_to
[cntr_site_to_1
], 0);
13319 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->site_to
[cntr_site_to_1
]));
13320 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->site_to
[cntr_site_to_1
]));
13321 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
])) {
13322 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
]));
13324 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->site_to
[cntr_site_to_1
]), sizeof(uint16_t)));
13325 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
));
13326 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_to_2
, 0);
13329 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_to_1
, 0);
13330 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_to_0
, 0);
13333 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->site_to
, r
->num_req
));
13336 return NDR_ERR_SUCCESS
;
13339 _PUBLIC_
void ndr_print_drsuapi_QuerySitesByCostRequest1(struct ndr_print
*ndr
, const char *name
, const struct drsuapi_QuerySitesByCostRequest1
*r
)
13341 uint32_t cntr_site_to_1
;
13342 ndr_print_struct(ndr
, name
, "drsuapi_QuerySitesByCostRequest1");
13344 ndr_print_ptr(ndr
, "site_from", r
->site_from
);
13346 if (r
->site_from
) {
13347 ndr_print_string(ndr
, "site_from", r
->site_from
);
13350 ndr_print_uint32(ndr
, "num_req", r
->num_req
);
13351 ndr_print_ptr(ndr
, "site_to", r
->site_to
);
13354 ndr
->print(ndr
, "%s: ARRAY(%d)", "site_to", (int)r
->num_req
);
13356 for (cntr_site_to_1
=0;cntr_site_to_1
<r
->num_req
;cntr_site_to_1
++) {
13358 if (asprintf(&idx_1
, "[%d]", cntr_site_to_1
) != -1) {
13359 ndr_print_ptr(ndr
, "site_to", r
->site_to
[cntr_site_to_1
]);
13361 if (r
->site_to
[cntr_site_to_1
]) {
13362 ndr_print_string(ndr
, "site_to", r
->site_to
[cntr_site_to_1
]);
13371 ndr_print_uint32(ndr
, "flags", r
->flags
);
13375 static enum ndr_err_code
ndr_push_drsuapi_QuerySitesByCostRequest(struct ndr_push
*ndr
, int ndr_flags
, const union drsuapi_QuerySitesByCostRequest
*r
)
13377 if (ndr_flags
& NDR_SCALARS
) {
13378 int level
= ndr_push_get_switch_value(ndr
, r
);
13379 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, level
));
13380 NDR_CHECK(ndr_push_union_align(ndr
, 5));
13383 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
13387 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
13390 if (ndr_flags
& NDR_BUFFERS
) {
13391 int level
= ndr_push_get_switch_value(ndr
, r
);
13394 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
13398 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
13401 return NDR_ERR_SUCCESS
;
13404 static enum ndr_err_code
ndr_pull_drsuapi_QuerySitesByCostRequest(struct ndr_pull
*ndr
, int ndr_flags
, union drsuapi_QuerySitesByCostRequest
*r
)
13408 level
= ndr_pull_get_switch_value(ndr
, r
);
13409 if (ndr_flags
& NDR_SCALARS
) {
13410 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &_level
));
13411 if (_level
!= level
) {
13412 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
13414 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
13417 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest1(ndr
, NDR_SCALARS
, &r
->req1
));
13421 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
13424 if (ndr_flags
& NDR_BUFFERS
) {
13427 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest1(ndr
, NDR_BUFFERS
, &r
->req1
));
13431 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
13434 return NDR_ERR_SUCCESS
;
13437 _PUBLIC_
void ndr_print_drsuapi_QuerySitesByCostRequest(struct ndr_print
*ndr
, const char *name
, const union drsuapi_QuerySitesByCostRequest
*r
)
13440 level
= ndr_print_get_switch_value(ndr
, r
);
13441 ndr_print_union(ndr
, name
, level
, "drsuapi_QuerySitesByCostRequest");
13444 ndr_print_drsuapi_QuerySitesByCostRequest1(ndr
, "req1", &r
->req1
);
13448 ndr_print_bad_level(ndr
, name
, level
);
13452 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsBind(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsBind
*r
)
13454 if (flags
& NDR_IN
) {
13455 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.bind_guid
));
13456 if (r
->in
.bind_guid
) {
13457 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, r
->in
.bind_guid
));
13459 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.bind_info
));
13460 if (r
->in
.bind_info
) {
13461 NDR_CHECK(ndr_push_drsuapi_DsBindInfoCtr(ndr
, NDR_SCALARS
, r
->in
.bind_info
));
13464 if (flags
& NDR_OUT
) {
13465 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.bind_info
));
13466 if (r
->out
.bind_info
) {
13467 NDR_CHECK(ndr_push_drsuapi_DsBindInfoCtr(ndr
, NDR_SCALARS
, r
->out
.bind_info
));
13469 if (r
->out
.bind_handle
== NULL
) {
13470 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13472 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.bind_handle
));
13473 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13475 return NDR_ERR_SUCCESS
;
13478 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsBind(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsBind
*r
)
13480 uint32_t _ptr_bind_guid
;
13481 uint32_t _ptr_bind_info
;
13482 TALLOC_CTX
*_mem_save_bind_guid_0
;
13483 TALLOC_CTX
*_mem_save_bind_info_0
;
13484 TALLOC_CTX
*_mem_save_bind_handle_0
;
13485 if (flags
& NDR_IN
) {
13486 ZERO_STRUCT(r
->out
);
13488 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_bind_guid
));
13489 if (_ptr_bind_guid
) {
13490 NDR_PULL_ALLOC(ndr
, r
->in
.bind_guid
);
13492 r
->in
.bind_guid
= NULL
;
13494 if (r
->in
.bind_guid
) {
13495 _mem_save_bind_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13496 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_guid
, 0);
13497 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, r
->in
.bind_guid
));
13498 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_guid_0
, 0);
13500 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_bind_info
));
13501 if (_ptr_bind_info
) {
13502 NDR_PULL_ALLOC(ndr
, r
->in
.bind_info
);
13504 r
->in
.bind_info
= NULL
;
13506 if (r
->in
.bind_info
) {
13507 _mem_save_bind_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13508 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_info
, 0);
13509 NDR_CHECK(ndr_pull_drsuapi_DsBindInfoCtr(ndr
, NDR_SCALARS
, r
->in
.bind_info
));
13510 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_info_0
, 0);
13512 NDR_PULL_ALLOC(ndr
, r
->out
.bind_handle
);
13513 ZERO_STRUCTP(r
->out
.bind_handle
);
13515 if (flags
& NDR_OUT
) {
13516 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_bind_info
));
13517 if (_ptr_bind_info
) {
13518 NDR_PULL_ALLOC(ndr
, r
->out
.bind_info
);
13520 r
->out
.bind_info
= NULL
;
13522 if (r
->out
.bind_info
) {
13523 _mem_save_bind_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13524 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.bind_info
, 0);
13525 NDR_CHECK(ndr_pull_drsuapi_DsBindInfoCtr(ndr
, NDR_SCALARS
, r
->out
.bind_info
));
13526 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_info_0
, 0);
13528 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13529 NDR_PULL_ALLOC(ndr
, r
->out
.bind_handle
);
13531 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13532 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13533 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.bind_handle
));
13534 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13535 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13537 return NDR_ERR_SUCCESS
;
13540 _PUBLIC_
void ndr_print_drsuapi_DsBind(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsBind
*r
)
13542 ndr_print_struct(ndr
, name
, "drsuapi_DsBind");
13544 if (flags
& NDR_SET_VALUES
) {
13545 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13547 if (flags
& NDR_IN
) {
13548 ndr_print_struct(ndr
, "in", "drsuapi_DsBind");
13550 ndr_print_ptr(ndr
, "bind_guid", r
->in
.bind_guid
);
13552 if (r
->in
.bind_guid
) {
13553 ndr_print_GUID(ndr
, "bind_guid", r
->in
.bind_guid
);
13556 ndr_print_ptr(ndr
, "bind_info", r
->in
.bind_info
);
13558 if (r
->in
.bind_info
) {
13559 ndr_print_drsuapi_DsBindInfoCtr(ndr
, "bind_info", r
->in
.bind_info
);
13564 if (flags
& NDR_OUT
) {
13565 ndr_print_struct(ndr
, "out", "drsuapi_DsBind");
13567 ndr_print_ptr(ndr
, "bind_info", r
->out
.bind_info
);
13569 if (r
->out
.bind_info
) {
13570 ndr_print_drsuapi_DsBindInfoCtr(ndr
, "bind_info", r
->out
.bind_info
);
13573 ndr_print_ptr(ndr
, "bind_handle", r
->out
.bind_handle
);
13575 ndr_print_policy_handle(ndr
, "bind_handle", r
->out
.bind_handle
);
13577 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13583 static enum ndr_err_code
ndr_push_drsuapi_DsUnbind(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsUnbind
*r
)
13585 if (flags
& NDR_IN
) {
13586 if (r
->in
.bind_handle
== NULL
) {
13587 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13589 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13591 if (flags
& NDR_OUT
) {
13592 if (r
->out
.bind_handle
== NULL
) {
13593 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13595 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.bind_handle
));
13596 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13598 return NDR_ERR_SUCCESS
;
13601 static enum ndr_err_code
ndr_pull_drsuapi_DsUnbind(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsUnbind
*r
)
13603 TALLOC_CTX
*_mem_save_bind_handle_0
;
13604 if (flags
& NDR_IN
) {
13605 ZERO_STRUCT(r
->out
);
13607 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13608 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13610 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13611 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13612 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13613 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13614 NDR_PULL_ALLOC(ndr
, r
->out
.bind_handle
);
13615 *r
->out
.bind_handle
= *r
->in
.bind_handle
;
13617 if (flags
& NDR_OUT
) {
13618 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13619 NDR_PULL_ALLOC(ndr
, r
->out
.bind_handle
);
13621 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13622 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13623 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.bind_handle
));
13624 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13625 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13627 return NDR_ERR_SUCCESS
;
13630 _PUBLIC_
void ndr_print_drsuapi_DsUnbind(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsUnbind
*r
)
13632 ndr_print_struct(ndr
, name
, "drsuapi_DsUnbind");
13634 if (flags
& NDR_SET_VALUES
) {
13635 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13637 if (flags
& NDR_IN
) {
13638 ndr_print_struct(ndr
, "in", "drsuapi_DsUnbind");
13640 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13642 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13646 if (flags
& NDR_OUT
) {
13647 ndr_print_struct(ndr
, "out", "drsuapi_DsUnbind");
13649 ndr_print_ptr(ndr
, "bind_handle", r
->out
.bind_handle
);
13651 ndr_print_policy_handle(ndr
, "bind_handle", r
->out
.bind_handle
);
13653 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13659 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaSync(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsReplicaSync
*r
)
13661 if (flags
& NDR_IN
) {
13662 if (r
->in
.bind_handle
== NULL
) {
13663 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13665 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13666 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13667 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
13668 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
13670 if (flags
& NDR_OUT
) {
13671 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13673 return NDR_ERR_SUCCESS
;
13676 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaSync(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsReplicaSync
*r
)
13678 TALLOC_CTX
*_mem_save_bind_handle_0
;
13679 if (flags
& NDR_IN
) {
13680 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13681 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13683 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13684 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13685 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13686 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13687 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
13688 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
13689 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
13691 if (flags
& NDR_OUT
) {
13692 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13694 return NDR_ERR_SUCCESS
;
13697 _PUBLIC_
void ndr_print_drsuapi_DsReplicaSync(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsReplicaSync
*r
)
13699 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaSync");
13701 if (flags
& NDR_SET_VALUES
) {
13702 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13704 if (flags
& NDR_IN
) {
13705 ndr_print_struct(ndr
, "in", "drsuapi_DsReplicaSync");
13707 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13709 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13711 ndr_print_int32(ndr
, "level", r
->in
.level
);
13712 ndr_print_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
);
13713 ndr_print_drsuapi_DsReplicaSyncRequest(ndr
, "req", &r
->in
.req
);
13716 if (flags
& NDR_OUT
) {
13717 ndr_print_struct(ndr
, "out", "drsuapi_DsReplicaSync");
13719 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13725 static enum ndr_err_code
ndr_push_drsuapi_DsGetNCChanges(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsGetNCChanges
*r
)
13727 if (flags
& NDR_IN
) {
13728 if (r
->in
.bind_handle
== NULL
) {
13729 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13731 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13732 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13733 if (r
->in
.req
== NULL
) {
13734 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13736 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13737 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13739 if (flags
& NDR_OUT
) {
13740 if (r
->out
.level_out
== NULL
) {
13741 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13743 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
13744 if (r
->out
.ctr
== NULL
) {
13745 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13747 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
13748 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13749 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13751 return NDR_ERR_SUCCESS
;
13754 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNCChanges(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsGetNCChanges
*r
)
13756 TALLOC_CTX
*_mem_save_bind_handle_0
;
13757 TALLOC_CTX
*_mem_save_req_0
;
13758 TALLOC_CTX
*_mem_save_level_out_0
;
13759 TALLOC_CTX
*_mem_save_ctr_0
;
13760 if (flags
& NDR_IN
) {
13761 ZERO_STRUCT(r
->out
);
13763 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13764 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13766 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13767 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13768 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13769 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13770 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
13771 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13772 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
13774 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13775 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
13776 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
13777 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
13778 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
13779 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13780 ZERO_STRUCTP(r
->out
.level_out
);
13781 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13782 ZERO_STRUCTP(r
->out
.ctr
);
13784 if (flags
& NDR_OUT
) {
13785 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13786 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
13788 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13789 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
13790 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
13791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
13792 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13793 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13795 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13796 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
13797 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
13798 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13799 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
13800 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13802 return NDR_ERR_SUCCESS
;
13805 _PUBLIC_
void ndr_print_drsuapi_DsGetNCChanges(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsGetNCChanges
*r
)
13807 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNCChanges");
13809 if (flags
& NDR_SET_VALUES
) {
13810 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13812 if (flags
& NDR_IN
) {
13813 ndr_print_struct(ndr
, "in", "drsuapi_DsGetNCChanges");
13815 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13817 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13819 ndr_print_int32(ndr
, "level", r
->in
.level
);
13820 ndr_print_ptr(ndr
, "req", r
->in
.req
);
13822 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
13823 ndr_print_drsuapi_DsGetNCChangesRequest(ndr
, "req", r
->in
.req
);
13827 if (flags
& NDR_OUT
) {
13828 ndr_print_struct(ndr
, "out", "drsuapi_DsGetNCChanges");
13830 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
13832 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
13834 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
13836 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
13837 ndr_print_drsuapi_DsGetNCChangesCtr(ndr
, "ctr", r
->out
.ctr
);
13839 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13845 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaUpdateRefs(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsReplicaUpdateRefs
*r
)
13847 if (flags
& NDR_IN
) {
13848 if (r
->in
.bind_handle
== NULL
) {
13849 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13851 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13852 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13853 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
13854 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
13856 if (flags
& NDR_OUT
) {
13857 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13859 return NDR_ERR_SUCCESS
;
13862 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaUpdateRefs(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsReplicaUpdateRefs
*r
)
13864 TALLOC_CTX
*_mem_save_bind_handle_0
;
13865 if (flags
& NDR_IN
) {
13866 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13867 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13869 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13870 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13871 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13872 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13873 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
13874 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
13875 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
13877 if (flags
& NDR_OUT
) {
13878 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13880 return NDR_ERR_SUCCESS
;
13883 _PUBLIC_
void ndr_print_drsuapi_DsReplicaUpdateRefs(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsReplicaUpdateRefs
*r
)
13885 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaUpdateRefs");
13887 if (flags
& NDR_SET_VALUES
) {
13888 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13890 if (flags
& NDR_IN
) {
13891 ndr_print_struct(ndr
, "in", "drsuapi_DsReplicaUpdateRefs");
13893 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13895 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13897 ndr_print_int32(ndr
, "level", r
->in
.level
);
13898 ndr_print_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
);
13899 ndr_print_drsuapi_DsReplicaUpdateRefsRequest(ndr
, "req", &r
->in
.req
);
13902 if (flags
& NDR_OUT
) {
13903 ndr_print_struct(ndr
, "out", "drsuapi_DsReplicaUpdateRefs");
13905 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13911 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaAdd(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsReplicaAdd
*r
)
13913 if (flags
& NDR_IN
) {
13914 if (r
->in
.bind_handle
== NULL
) {
13915 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13917 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13918 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13919 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
13920 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
13922 if (flags
& NDR_OUT
) {
13923 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13925 return NDR_ERR_SUCCESS
;
13928 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaAdd(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsReplicaAdd
*r
)
13930 TALLOC_CTX
*_mem_save_bind_handle_0
;
13931 if (flags
& NDR_IN
) {
13932 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13933 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
13935 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13936 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
13937 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13938 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
13939 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
13940 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
13941 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
13943 if (flags
& NDR_OUT
) {
13944 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13946 return NDR_ERR_SUCCESS
;
13949 _PUBLIC_
void ndr_print_drsuapi_DsReplicaAdd(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsReplicaAdd
*r
)
13951 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaAdd");
13953 if (flags
& NDR_SET_VALUES
) {
13954 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13956 if (flags
& NDR_IN
) {
13957 ndr_print_struct(ndr
, "in", "drsuapi_DsReplicaAdd");
13959 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
13961 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
13963 ndr_print_int32(ndr
, "level", r
->in
.level
);
13964 ndr_print_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
);
13965 ndr_print_drsuapi_DsReplicaAddRequest(ndr
, "req", &r
->in
.req
);
13968 if (flags
& NDR_OUT
) {
13969 ndr_print_struct(ndr
, "out", "drsuapi_DsReplicaAdd");
13971 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13977 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaDel(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsReplicaDel
*r
)
13979 if (flags
& NDR_IN
) {
13980 if (r
->in
.bind_handle
== NULL
) {
13981 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13983 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
13984 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
13985 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
13986 NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
13988 if (flags
& NDR_OUT
) {
13989 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13991 return NDR_ERR_SUCCESS
;
13994 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaDel(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsReplicaDel
*r
)
13996 TALLOC_CTX
*_mem_save_bind_handle_0
;
13997 if (flags
& NDR_IN
) {
13998 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13999 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14001 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14002 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14003 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14004 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14005 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14006 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
14007 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
14009 if (flags
& NDR_OUT
) {
14010 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14012 return NDR_ERR_SUCCESS
;
14015 _PUBLIC_
void ndr_print_drsuapi_DsReplicaDel(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsReplicaDel
*r
)
14017 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaDel");
14019 if (flags
& NDR_SET_VALUES
) {
14020 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14022 if (flags
& NDR_IN
) {
14023 ndr_print_struct(ndr
, "in", "drsuapi_DsReplicaDel");
14025 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
14027 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
14029 ndr_print_int32(ndr
, "level", r
->in
.level
);
14030 ndr_print_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
);
14031 ndr_print_drsuapi_DsReplicaDelRequest(ndr
, "req", &r
->in
.req
);
14034 if (flags
& NDR_OUT
) {
14035 ndr_print_struct(ndr
, "out", "drsuapi_DsReplicaDel");
14037 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14043 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaMod(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsReplicaMod
*r
)
14045 if (flags
& NDR_IN
) {
14046 if (r
->in
.bind_handle
== NULL
) {
14047 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14049 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14050 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
14051 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
14052 NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
14054 if (flags
& NDR_OUT
) {
14055 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14057 return NDR_ERR_SUCCESS
;
14060 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaMod(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsReplicaMod
*r
)
14062 TALLOC_CTX
*_mem_save_bind_handle_0
;
14063 if (flags
& NDR_IN
) {
14064 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14065 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14067 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14068 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14069 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14070 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14071 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14072 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
));
14073 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.req
));
14075 if (flags
& NDR_OUT
) {
14076 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14078 return NDR_ERR_SUCCESS
;
14081 _PUBLIC_
void ndr_print_drsuapi_DsReplicaMod(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsReplicaMod
*r
)
14083 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaMod");
14085 if (flags
& NDR_SET_VALUES
) {
14086 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14088 if (flags
& NDR_IN
) {
14089 ndr_print_struct(ndr
, "in", "drsuapi_DsReplicaMod");
14091 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
14093 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
14095 ndr_print_int32(ndr
, "level", r
->in
.level
);
14096 ndr_print_set_switch_value(ndr
, &r
->in
.req
, r
->in
.level
);
14097 ndr_print_drsuapi_DsReplicaModRequest(ndr
, "req", &r
->in
.req
);
14100 if (flags
& NDR_OUT
) {
14101 ndr_print_struct(ndr
, "out", "drsuapi_DsReplicaMod");
14103 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14109 static enum ndr_err_code
ndr_push_DRSUAPI_VERIFY_NAMES(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_VERIFY_NAMES
*r
)
14111 if (flags
& NDR_IN
) {
14113 if (flags
& NDR_OUT
) {
14114 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14116 return NDR_ERR_SUCCESS
;
14119 static enum ndr_err_code
ndr_pull_DRSUAPI_VERIFY_NAMES(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_VERIFY_NAMES
*r
)
14121 if (flags
& NDR_IN
) {
14123 if (flags
& NDR_OUT
) {
14124 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14126 return NDR_ERR_SUCCESS
;
14129 _PUBLIC_
void ndr_print_DRSUAPI_VERIFY_NAMES(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_VERIFY_NAMES
*r
)
14131 ndr_print_struct(ndr
, name
, "DRSUAPI_VERIFY_NAMES");
14133 if (flags
& NDR_SET_VALUES
) {
14134 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14136 if (flags
& NDR_IN
) {
14137 ndr_print_struct(ndr
, "in", "DRSUAPI_VERIFY_NAMES");
14141 if (flags
& NDR_OUT
) {
14142 ndr_print_struct(ndr
, "out", "DRSUAPI_VERIFY_NAMES");
14144 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14150 static enum ndr_err_code
ndr_push_drsuapi_DsGetMemberships(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsGetMemberships
*r
)
14152 if (flags
& NDR_IN
) {
14153 if (r
->in
.bind_handle
== NULL
) {
14154 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14156 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14157 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
14158 if (r
->in
.req
== NULL
) {
14159 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14161 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14162 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14164 if (flags
& NDR_OUT
) {
14165 if (r
->out
.level_out
== NULL
) {
14166 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14168 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
14169 if (r
->out
.ctr
== NULL
) {
14170 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14172 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
14173 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
14174 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14176 return NDR_ERR_SUCCESS
;
14179 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMemberships(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsGetMemberships
*r
)
14181 TALLOC_CTX
*_mem_save_bind_handle_0
;
14182 TALLOC_CTX
*_mem_save_req_0
;
14183 TALLOC_CTX
*_mem_save_level_out_0
;
14184 TALLOC_CTX
*_mem_save_ctr_0
;
14185 if (flags
& NDR_IN
) {
14186 ZERO_STRUCT(r
->out
);
14188 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14189 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14191 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14192 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14193 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14194 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14195 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14196 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14197 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
14199 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14200 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
14201 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14202 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14203 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
14204 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14205 ZERO_STRUCTP(r
->out
.level_out
);
14206 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
14207 ZERO_STRUCTP(r
->out
.ctr
);
14209 if (flags
& NDR_OUT
) {
14210 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14211 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14213 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14214 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
14215 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
14216 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
14217 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14218 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
14220 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14221 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
14222 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
14223 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
14224 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
14225 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14227 return NDR_ERR_SUCCESS
;
14230 _PUBLIC_
void ndr_print_drsuapi_DsGetMemberships(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsGetMemberships
*r
)
14232 ndr_print_struct(ndr
, name
, "drsuapi_DsGetMemberships");
14234 if (flags
& NDR_SET_VALUES
) {
14235 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14237 if (flags
& NDR_IN
) {
14238 ndr_print_struct(ndr
, "in", "drsuapi_DsGetMemberships");
14240 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
14242 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
14244 ndr_print_int32(ndr
, "level", r
->in
.level
);
14245 ndr_print_ptr(ndr
, "req", r
->in
.req
);
14247 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
14248 ndr_print_drsuapi_DsGetMembershipsRequest(ndr
, "req", r
->in
.req
);
14252 if (flags
& NDR_OUT
) {
14253 ndr_print_struct(ndr
, "out", "drsuapi_DsGetMemberships");
14255 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
14257 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
14259 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
14261 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
14262 ndr_print_drsuapi_DsGetMembershipsCtr(ndr
, "ctr", r
->out
.ctr
);
14264 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14270 static enum ndr_err_code
ndr_push_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_INTER_DOMAIN_MOVE
*r
)
14272 if (flags
& NDR_IN
) {
14274 if (flags
& NDR_OUT
) {
14275 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14277 return NDR_ERR_SUCCESS
;
14280 static enum ndr_err_code
ndr_pull_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_INTER_DOMAIN_MOVE
*r
)
14282 if (flags
& NDR_IN
) {
14284 if (flags
& NDR_OUT
) {
14285 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14287 return NDR_ERR_SUCCESS
;
14290 _PUBLIC_
void ndr_print_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_INTER_DOMAIN_MOVE
*r
)
14292 ndr_print_struct(ndr
, name
, "DRSUAPI_INTER_DOMAIN_MOVE");
14294 if (flags
& NDR_SET_VALUES
) {
14295 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14297 if (flags
& NDR_IN
) {
14298 ndr_print_struct(ndr
, "in", "DRSUAPI_INTER_DOMAIN_MOVE");
14302 if (flags
& NDR_OUT
) {
14303 ndr_print_struct(ndr
, "out", "DRSUAPI_INTER_DOMAIN_MOVE");
14305 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14311 static enum ndr_err_code
ndr_push_drsuapi_DsGetNT4ChangeLog(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsGetNT4ChangeLog
*r
)
14313 if (flags
& NDR_IN
) {
14314 if (r
->in
.bind_handle
== NULL
) {
14315 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14317 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14318 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
14319 if (r
->in
.req
== NULL
) {
14320 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14322 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14323 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14325 if (flags
& NDR_OUT
) {
14326 if (r
->out
.level_out
== NULL
) {
14327 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14329 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
14330 if (r
->out
.info
== NULL
) {
14331 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14333 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, *r
->out
.level_out
));
14334 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
14335 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14337 return NDR_ERR_SUCCESS
;
14340 static enum ndr_err_code
ndr_pull_drsuapi_DsGetNT4ChangeLog(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsGetNT4ChangeLog
*r
)
14342 TALLOC_CTX
*_mem_save_bind_handle_0
;
14343 TALLOC_CTX
*_mem_save_req_0
;
14344 TALLOC_CTX
*_mem_save_level_out_0
;
14345 TALLOC_CTX
*_mem_save_info_0
;
14346 if (flags
& NDR_IN
) {
14347 ZERO_STRUCT(r
->out
);
14349 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14350 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14352 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14353 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14354 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14355 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14356 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14357 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14358 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
14360 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14361 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
14362 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14363 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14364 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
14365 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14366 ZERO_STRUCTP(r
->out
.level_out
);
14367 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
14368 ZERO_STRUCTP(r
->out
.info
);
14370 if (flags
& NDR_OUT
) {
14371 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14372 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14374 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14375 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
14376 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
14377 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
14378 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14379 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
14381 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14382 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
14383 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, *r
->out
.level_out
));
14384 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
14385 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
14386 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14388 return NDR_ERR_SUCCESS
;
14391 _PUBLIC_
void ndr_print_drsuapi_DsGetNT4ChangeLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsGetNT4ChangeLog
*r
)
14393 ndr_print_struct(ndr
, name
, "drsuapi_DsGetNT4ChangeLog");
14395 if (flags
& NDR_SET_VALUES
) {
14396 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14398 if (flags
& NDR_IN
) {
14399 ndr_print_struct(ndr
, "in", "drsuapi_DsGetNT4ChangeLog");
14401 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
14403 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
14405 ndr_print_uint32(ndr
, "level", r
->in
.level
);
14406 ndr_print_ptr(ndr
, "req", r
->in
.req
);
14408 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
14409 ndr_print_drsuapi_DsGetNT4ChangeLogRequest(ndr
, "req", r
->in
.req
);
14413 if (flags
& NDR_OUT
) {
14414 ndr_print_struct(ndr
, "out", "drsuapi_DsGetNT4ChangeLog");
14416 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
14418 ndr_print_uint32(ndr
, "level_out", *r
->out
.level_out
);
14420 ndr_print_ptr(ndr
, "info", r
->out
.info
);
14422 ndr_print_set_switch_value(ndr
, r
->out
.info
, *r
->out
.level_out
);
14423 ndr_print_drsuapi_DsGetNT4ChangeLogInfo(ndr
, "info", r
->out
.info
);
14425 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14431 static enum ndr_err_code
ndr_push_drsuapi_DsCrackNames(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsCrackNames
*r
)
14433 if (flags
& NDR_IN
) {
14434 if (r
->in
.bind_handle
== NULL
) {
14435 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14437 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14438 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
14439 if (r
->in
.req
== NULL
) {
14440 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14442 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14443 NDR_CHECK(ndr_push_drsuapi_DsNameRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14445 if (flags
& NDR_OUT
) {
14446 if (r
->out
.level_out
== NULL
) {
14447 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14449 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
14450 if (r
->out
.ctr
== NULL
) {
14451 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14453 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
14454 NDR_CHECK(ndr_push_drsuapi_DsNameCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
14455 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14457 return NDR_ERR_SUCCESS
;
14460 static enum ndr_err_code
ndr_pull_drsuapi_DsCrackNames(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsCrackNames
*r
)
14462 TALLOC_CTX
*_mem_save_bind_handle_0
;
14463 TALLOC_CTX
*_mem_save_req_0
;
14464 TALLOC_CTX
*_mem_save_level_out_0
;
14465 TALLOC_CTX
*_mem_save_ctr_0
;
14466 if (flags
& NDR_IN
) {
14467 ZERO_STRUCT(r
->out
);
14469 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14470 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14472 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14473 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14474 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14475 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14476 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14477 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14478 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
14480 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14481 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
14482 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14483 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14484 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
14485 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14486 ZERO_STRUCTP(r
->out
.level_out
);
14487 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
14488 ZERO_STRUCTP(r
->out
.ctr
);
14490 if (flags
& NDR_OUT
) {
14491 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14492 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14494 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14495 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
14496 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
14497 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
14498 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14499 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
14501 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14502 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
14503 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
14504 NDR_CHECK(ndr_pull_drsuapi_DsNameCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
14505 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
14506 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14508 return NDR_ERR_SUCCESS
;
14511 _PUBLIC_
void ndr_print_drsuapi_DsCrackNames(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsCrackNames
*r
)
14513 ndr_print_struct(ndr
, name
, "drsuapi_DsCrackNames");
14515 if (flags
& NDR_SET_VALUES
) {
14516 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14518 if (flags
& NDR_IN
) {
14519 ndr_print_struct(ndr
, "in", "drsuapi_DsCrackNames");
14521 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
14523 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
14525 ndr_print_int32(ndr
, "level", r
->in
.level
);
14526 ndr_print_ptr(ndr
, "req", r
->in
.req
);
14528 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
14529 ndr_print_drsuapi_DsNameRequest(ndr
, "req", r
->in
.req
);
14533 if (flags
& NDR_OUT
) {
14534 ndr_print_struct(ndr
, "out", "drsuapi_DsCrackNames");
14536 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
14538 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
14540 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
14542 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
14543 ndr_print_drsuapi_DsNameCtr(ndr
, "ctr", r
->out
.ctr
);
14545 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14551 static enum ndr_err_code
ndr_push_drsuapi_DsWriteAccountSpn(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsWriteAccountSpn
*r
)
14553 if (flags
& NDR_IN
) {
14554 if (r
->in
.bind_handle
== NULL
) {
14555 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14557 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14558 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
14559 if (r
->in
.req
== NULL
) {
14560 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14562 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14563 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14565 if (flags
& NDR_OUT
) {
14566 if (r
->out
.level_out
== NULL
) {
14567 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14569 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
14570 if (r
->out
.res
== NULL
) {
14571 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14573 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
));
14574 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnResult(ndr
, NDR_SCALARS
, r
->out
.res
));
14575 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14577 return NDR_ERR_SUCCESS
;
14580 static enum ndr_err_code
ndr_pull_drsuapi_DsWriteAccountSpn(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsWriteAccountSpn
*r
)
14582 TALLOC_CTX
*_mem_save_bind_handle_0
;
14583 TALLOC_CTX
*_mem_save_req_0
;
14584 TALLOC_CTX
*_mem_save_level_out_0
;
14585 TALLOC_CTX
*_mem_save_res_0
;
14586 if (flags
& NDR_IN
) {
14587 ZERO_STRUCT(r
->out
);
14589 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14590 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14592 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14593 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14594 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14595 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14596 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14597 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14598 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
14600 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14601 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
14602 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14603 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14604 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
14605 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14606 ZERO_STRUCTP(r
->out
.level_out
);
14607 NDR_PULL_ALLOC(ndr
, r
->out
.res
);
14608 ZERO_STRUCTP(r
->out
.res
);
14610 if (flags
& NDR_OUT
) {
14611 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14612 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14614 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14615 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
14616 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
14617 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
14618 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14619 NDR_PULL_ALLOC(ndr
, r
->out
.res
);
14621 _mem_save_res_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14622 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.res
, LIBNDR_FLAG_REF_ALLOC
);
14623 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
));
14624 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnResult(ndr
, NDR_SCALARS
, r
->out
.res
));
14625 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_res_0
, LIBNDR_FLAG_REF_ALLOC
);
14626 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14628 return NDR_ERR_SUCCESS
;
14631 _PUBLIC_
void ndr_print_drsuapi_DsWriteAccountSpn(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsWriteAccountSpn
*r
)
14633 ndr_print_struct(ndr
, name
, "drsuapi_DsWriteAccountSpn");
14635 if (flags
& NDR_SET_VALUES
) {
14636 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14638 if (flags
& NDR_IN
) {
14639 ndr_print_struct(ndr
, "in", "drsuapi_DsWriteAccountSpn");
14641 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
14643 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
14645 ndr_print_int32(ndr
, "level", r
->in
.level
);
14646 ndr_print_ptr(ndr
, "req", r
->in
.req
);
14648 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
14649 ndr_print_drsuapi_DsWriteAccountSpnRequest(ndr
, "req", r
->in
.req
);
14653 if (flags
& NDR_OUT
) {
14654 ndr_print_struct(ndr
, "out", "drsuapi_DsWriteAccountSpn");
14656 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
14658 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
14660 ndr_print_ptr(ndr
, "res", r
->out
.res
);
14662 ndr_print_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
);
14663 ndr_print_drsuapi_DsWriteAccountSpnResult(ndr
, "res", r
->out
.res
);
14665 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14671 static enum ndr_err_code
ndr_push_drsuapi_DsRemoveDSServer(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsRemoveDSServer
*r
)
14673 if (flags
& NDR_IN
) {
14674 if (r
->in
.bind_handle
== NULL
) {
14675 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14677 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14678 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
14679 if (r
->in
.req
== NULL
) {
14680 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14682 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14683 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14685 if (flags
& NDR_OUT
) {
14686 if (r
->out
.level_out
== NULL
) {
14687 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14689 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
14690 if (r
->out
.res
== NULL
) {
14691 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14693 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
));
14694 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerResult(ndr
, NDR_SCALARS
, r
->out
.res
));
14695 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14697 return NDR_ERR_SUCCESS
;
14700 static enum ndr_err_code
ndr_pull_drsuapi_DsRemoveDSServer(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsRemoveDSServer
*r
)
14702 TALLOC_CTX
*_mem_save_bind_handle_0
;
14703 TALLOC_CTX
*_mem_save_req_0
;
14704 TALLOC_CTX
*_mem_save_level_out_0
;
14705 TALLOC_CTX
*_mem_save_res_0
;
14706 if (flags
& NDR_IN
) {
14707 ZERO_STRUCT(r
->out
);
14709 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14710 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14712 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14713 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14714 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14715 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14716 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14717 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14718 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
14720 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14721 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
14722 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14723 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14724 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
14725 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14726 ZERO_STRUCTP(r
->out
.level_out
);
14727 NDR_PULL_ALLOC(ndr
, r
->out
.res
);
14728 ZERO_STRUCTP(r
->out
.res
);
14730 if (flags
& NDR_OUT
) {
14731 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14732 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14734 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14735 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
14736 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
14737 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
14738 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14739 NDR_PULL_ALLOC(ndr
, r
->out
.res
);
14741 _mem_save_res_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14742 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.res
, LIBNDR_FLAG_REF_ALLOC
);
14743 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
));
14744 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerResult(ndr
, NDR_SCALARS
, r
->out
.res
));
14745 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_res_0
, LIBNDR_FLAG_REF_ALLOC
);
14746 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14748 return NDR_ERR_SUCCESS
;
14751 _PUBLIC_
void ndr_print_drsuapi_DsRemoveDSServer(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsRemoveDSServer
*r
)
14753 ndr_print_struct(ndr
, name
, "drsuapi_DsRemoveDSServer");
14755 if (flags
& NDR_SET_VALUES
) {
14756 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14758 if (flags
& NDR_IN
) {
14759 ndr_print_struct(ndr
, "in", "drsuapi_DsRemoveDSServer");
14761 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
14763 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
14765 ndr_print_int32(ndr
, "level", r
->in
.level
);
14766 ndr_print_ptr(ndr
, "req", r
->in
.req
);
14768 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
14769 ndr_print_drsuapi_DsRemoveDSServerRequest(ndr
, "req", r
->in
.req
);
14773 if (flags
& NDR_OUT
) {
14774 ndr_print_struct(ndr
, "out", "drsuapi_DsRemoveDSServer");
14776 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
14778 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
14780 ndr_print_ptr(ndr
, "res", r
->out
.res
);
14782 ndr_print_set_switch_value(ndr
, r
->out
.res
, *r
->out
.level_out
);
14783 ndr_print_drsuapi_DsRemoveDSServerResult(ndr
, "res", r
->out
.res
);
14785 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14791 static enum ndr_err_code
ndr_push_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_REMOVE_DS_DOMAIN
*r
)
14793 if (flags
& NDR_IN
) {
14795 if (flags
& NDR_OUT
) {
14796 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14798 return NDR_ERR_SUCCESS
;
14801 static enum ndr_err_code
ndr_pull_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_REMOVE_DS_DOMAIN
*r
)
14803 if (flags
& NDR_IN
) {
14805 if (flags
& NDR_OUT
) {
14806 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14808 return NDR_ERR_SUCCESS
;
14811 _PUBLIC_
void ndr_print_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_REMOVE_DS_DOMAIN
*r
)
14813 ndr_print_struct(ndr
, name
, "DRSUAPI_REMOVE_DS_DOMAIN");
14815 if (flags
& NDR_SET_VALUES
) {
14816 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14818 if (flags
& NDR_IN
) {
14819 ndr_print_struct(ndr
, "in", "DRSUAPI_REMOVE_DS_DOMAIN");
14823 if (flags
& NDR_OUT
) {
14824 ndr_print_struct(ndr
, "out", "DRSUAPI_REMOVE_DS_DOMAIN");
14826 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14832 static enum ndr_err_code
ndr_push_drsuapi_DsGetDomainControllerInfo(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsGetDomainControllerInfo
*r
)
14834 if (flags
& NDR_IN
) {
14835 if (r
->in
.bind_handle
== NULL
) {
14836 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14838 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14839 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
14840 if (r
->in
.req
== NULL
) {
14841 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14843 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14844 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14846 if (flags
& NDR_OUT
) {
14847 if (r
->out
.level_out
== NULL
) {
14848 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14850 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
14851 if (r
->out
.ctr
== NULL
) {
14852 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14854 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
14855 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
14856 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14858 return NDR_ERR_SUCCESS
;
14861 static enum ndr_err_code
ndr_pull_drsuapi_DsGetDomainControllerInfo(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsGetDomainControllerInfo
*r
)
14863 TALLOC_CTX
*_mem_save_bind_handle_0
;
14864 TALLOC_CTX
*_mem_save_req_0
;
14865 TALLOC_CTX
*_mem_save_level_out_0
;
14866 TALLOC_CTX
*_mem_save_ctr_0
;
14867 if (flags
& NDR_IN
) {
14868 ZERO_STRUCT(r
->out
);
14870 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14871 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14873 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14874 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14875 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14876 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14877 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14878 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14879 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
14881 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14882 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
14883 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14884 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14885 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
14886 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14887 ZERO_STRUCTP(r
->out
.level_out
);
14888 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
14889 ZERO_STRUCTP(r
->out
.ctr
);
14891 if (flags
& NDR_OUT
) {
14892 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14893 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
14895 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14896 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
14897 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
14898 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
14899 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14900 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
14902 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14903 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
14904 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
14905 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
14906 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
14907 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14909 return NDR_ERR_SUCCESS
;
14912 _PUBLIC_
void ndr_print_drsuapi_DsGetDomainControllerInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsGetDomainControllerInfo
*r
)
14914 ndr_print_struct(ndr
, name
, "drsuapi_DsGetDomainControllerInfo");
14916 if (flags
& NDR_SET_VALUES
) {
14917 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14919 if (flags
& NDR_IN
) {
14920 ndr_print_struct(ndr
, "in", "drsuapi_DsGetDomainControllerInfo");
14922 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
14924 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
14926 ndr_print_int32(ndr
, "level", r
->in
.level
);
14927 ndr_print_ptr(ndr
, "req", r
->in
.req
);
14929 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
14930 ndr_print_drsuapi_DsGetDCInfoRequest(ndr
, "req", r
->in
.req
);
14934 if (flags
& NDR_OUT
) {
14935 ndr_print_struct(ndr
, "out", "drsuapi_DsGetDomainControllerInfo");
14937 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
14939 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
14941 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
14943 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
14944 ndr_print_drsuapi_DsGetDCInfoCtr(ndr
, "ctr", r
->out
.ctr
);
14946 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14952 _PUBLIC_
enum ndr_err_code
ndr_push_drsuapi_DsAddEntry(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsAddEntry
*r
)
14954 if (flags
& NDR_IN
) {
14955 if (r
->in
.bind_handle
== NULL
) {
14956 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14958 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14959 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
14960 if (r
->in
.req
== NULL
) {
14961 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14963 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
14964 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
14966 if (flags
& NDR_OUT
) {
14967 if (r
->out
.level_out
== NULL
) {
14968 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14970 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
14971 if (r
->out
.ctr
== NULL
) {
14972 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14974 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
14975 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
14976 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14978 return NDR_ERR_SUCCESS
;
14981 _PUBLIC_
enum ndr_err_code
ndr_pull_drsuapi_DsAddEntry(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsAddEntry
*r
)
14983 TALLOC_CTX
*_mem_save_bind_handle_0
;
14984 TALLOC_CTX
*_mem_save_req_0
;
14985 TALLOC_CTX
*_mem_save_level_out_0
;
14986 TALLOC_CTX
*_mem_save_ctr_0
;
14987 if (flags
& NDR_IN
) {
14988 ZERO_STRUCT(r
->out
);
14990 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14991 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
14993 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14994 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
14995 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
14996 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
14997 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
14998 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14999 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
15001 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15002 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
15003 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
15004 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
15005 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
15006 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
15007 ZERO_STRUCTP(r
->out
.level_out
);
15008 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
15009 ZERO_STRUCTP(r
->out
.ctr
);
15011 if (flags
& NDR_OUT
) {
15012 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15013 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
15015 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15016 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
15017 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
15018 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
15019 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15020 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
15022 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15023 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
15024 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
15025 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
15026 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
15027 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
15029 return NDR_ERR_SUCCESS
;
15032 _PUBLIC_
void ndr_print_drsuapi_DsAddEntry(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsAddEntry
*r
)
15034 ndr_print_struct(ndr
, name
, "drsuapi_DsAddEntry");
15036 if (flags
& NDR_SET_VALUES
) {
15037 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
15039 if (flags
& NDR_IN
) {
15040 ndr_print_struct(ndr
, "in", "drsuapi_DsAddEntry");
15042 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
15044 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
15046 ndr_print_int32(ndr
, "level", r
->in
.level
);
15047 ndr_print_ptr(ndr
, "req", r
->in
.req
);
15049 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
15050 ndr_print_drsuapi_DsAddEntryRequest(ndr
, "req", r
->in
.req
);
15054 if (flags
& NDR_OUT
) {
15055 ndr_print_struct(ndr
, "out", "drsuapi_DsAddEntry");
15057 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
15059 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
15061 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
15063 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
15064 ndr_print_drsuapi_DsAddEntryCtr(ndr
, "ctr", r
->out
.ctr
);
15066 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
15072 static enum ndr_err_code
ndr_push_drsuapi_DsExecuteKCC(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsExecuteKCC
*r
)
15074 if (flags
& NDR_IN
) {
15075 if (r
->in
.bind_handle
== NULL
) {
15076 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15078 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
15079 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
15080 if (r
->in
.req
== NULL
) {
15081 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15083 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
15084 NDR_CHECK(ndr_push_drsuapi_DsExecuteKCCRequest(ndr
, NDR_SCALARS
, r
->in
.req
));
15086 if (flags
& NDR_OUT
) {
15087 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
15089 return NDR_ERR_SUCCESS
;
15092 static enum ndr_err_code
ndr_pull_drsuapi_DsExecuteKCC(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsExecuteKCC
*r
)
15094 TALLOC_CTX
*_mem_save_bind_handle_0
;
15095 TALLOC_CTX
*_mem_save_req_0
;
15096 if (flags
& NDR_IN
) {
15097 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15098 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
15100 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15101 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
15102 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
15103 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
15104 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
15105 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15106 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
15108 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15109 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
15110 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
15111 NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCCRequest(ndr
, NDR_SCALARS
, r
->in
.req
));
15112 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
15114 if (flags
& NDR_OUT
) {
15115 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
15117 return NDR_ERR_SUCCESS
;
15120 _PUBLIC_
void ndr_print_drsuapi_DsExecuteKCC(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsExecuteKCC
*r
)
15122 ndr_print_struct(ndr
, name
, "drsuapi_DsExecuteKCC");
15124 if (flags
& NDR_SET_VALUES
) {
15125 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
15127 if (flags
& NDR_IN
) {
15128 ndr_print_struct(ndr
, "in", "drsuapi_DsExecuteKCC");
15130 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
15132 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
15134 ndr_print_uint32(ndr
, "level", r
->in
.level
);
15135 ndr_print_ptr(ndr
, "req", r
->in
.req
);
15137 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
15138 ndr_print_drsuapi_DsExecuteKCCRequest(ndr
, "req", r
->in
.req
);
15142 if (flags
& NDR_OUT
) {
15143 ndr_print_struct(ndr
, "out", "drsuapi_DsExecuteKCC");
15145 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
15151 static enum ndr_err_code
ndr_push_drsuapi_DsReplicaGetInfo(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsReplicaGetInfo
*r
)
15153 if (flags
& NDR_IN
) {
15154 if (r
->in
.bind_handle
== NULL
) {
15155 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15157 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
15158 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
15159 if (r
->in
.req
== NULL
) {
15160 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15162 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
15163 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
15165 if (flags
& NDR_OUT
) {
15166 if (r
->out
.info_type
== NULL
) {
15167 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15169 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, *r
->out
.info_type
));
15170 if (r
->out
.info
== NULL
) {
15171 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15173 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, *r
->out
.info_type
));
15174 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
15175 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
15177 return NDR_ERR_SUCCESS
;
15180 static enum ndr_err_code
ndr_pull_drsuapi_DsReplicaGetInfo(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsReplicaGetInfo
*r
)
15182 TALLOC_CTX
*_mem_save_bind_handle_0
;
15183 TALLOC_CTX
*_mem_save_req_0
;
15184 TALLOC_CTX
*_mem_save_info_type_0
;
15185 TALLOC_CTX
*_mem_save_info_0
;
15186 if (flags
& NDR_IN
) {
15187 ZERO_STRUCT(r
->out
);
15189 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15190 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
15192 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15193 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
15194 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
15195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
15196 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
15197 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15198 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
15200 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15201 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
15202 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
15203 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
15204 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
15205 NDR_PULL_ALLOC(ndr
, r
->out
.info_type
);
15206 ZERO_STRUCTP(r
->out
.info_type
);
15207 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
15208 ZERO_STRUCTP(r
->out
.info
);
15210 if (flags
& NDR_OUT
) {
15211 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15212 NDR_PULL_ALLOC(ndr
, r
->out
.info_type
);
15214 _mem_save_info_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15215 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info_type
, LIBNDR_FLAG_REF_ALLOC
);
15216 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr
, NDR_SCALARS
, r
->out
.info_type
));
15217 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_type_0
, LIBNDR_FLAG_REF_ALLOC
);
15218 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15219 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
15221 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15222 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
15223 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, *r
->out
.info_type
));
15224 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
15225 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
15226 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
15228 return NDR_ERR_SUCCESS
;
15231 _PUBLIC_
void ndr_print_drsuapi_DsReplicaGetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsReplicaGetInfo
*r
)
15233 ndr_print_struct(ndr
, name
, "drsuapi_DsReplicaGetInfo");
15235 if (flags
& NDR_SET_VALUES
) {
15236 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
15238 if (flags
& NDR_IN
) {
15239 ndr_print_struct(ndr
, "in", "drsuapi_DsReplicaGetInfo");
15241 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
15243 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
15245 ndr_print_drsuapi_DsReplicaGetInfoLevel(ndr
, "level", r
->in
.level
);
15246 ndr_print_ptr(ndr
, "req", r
->in
.req
);
15248 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
15249 ndr_print_drsuapi_DsReplicaGetInfoRequest(ndr
, "req", r
->in
.req
);
15253 if (flags
& NDR_OUT
) {
15254 ndr_print_struct(ndr
, "out", "drsuapi_DsReplicaGetInfo");
15256 ndr_print_ptr(ndr
, "info_type", r
->out
.info_type
);
15258 ndr_print_drsuapi_DsReplicaInfoType(ndr
, "info_type", *r
->out
.info_type
);
15260 ndr_print_ptr(ndr
, "info", r
->out
.info
);
15262 ndr_print_set_switch_value(ndr
, r
->out
.info
, *r
->out
.info_type
);
15263 ndr_print_drsuapi_DsReplicaInfo(ndr
, "info", r
->out
.info
);
15265 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
15271 static enum ndr_err_code
ndr_push_DRSUAPI_ADD_SID_HISTORY(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_ADD_SID_HISTORY
*r
)
15273 if (flags
& NDR_IN
) {
15275 if (flags
& NDR_OUT
) {
15276 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
15278 return NDR_ERR_SUCCESS
;
15281 static enum ndr_err_code
ndr_pull_DRSUAPI_ADD_SID_HISTORY(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_ADD_SID_HISTORY
*r
)
15283 if (flags
& NDR_IN
) {
15285 if (flags
& NDR_OUT
) {
15286 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
15288 return NDR_ERR_SUCCESS
;
15291 _PUBLIC_
void ndr_print_DRSUAPI_ADD_SID_HISTORY(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_ADD_SID_HISTORY
*r
)
15293 ndr_print_struct(ndr
, name
, "DRSUAPI_ADD_SID_HISTORY");
15295 if (flags
& NDR_SET_VALUES
) {
15296 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
15298 if (flags
& NDR_IN
) {
15299 ndr_print_struct(ndr
, "in", "DRSUAPI_ADD_SID_HISTORY");
15303 if (flags
& NDR_OUT
) {
15304 ndr_print_struct(ndr
, "out", "DRSUAPI_ADD_SID_HISTORY");
15306 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
15312 static enum ndr_err_code
ndr_push_drsuapi_DsGetMemberships2(struct ndr_push
*ndr
, int flags
, const struct drsuapi_DsGetMemberships2
*r
)
15314 if (flags
& NDR_IN
) {
15315 if (r
->in
.bind_handle
== NULL
) {
15316 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15318 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
15319 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
15320 if (r
->in
.req
== NULL
) {
15321 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15323 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
15324 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
15326 if (flags
& NDR_OUT
) {
15327 if (r
->out
.level_out
== NULL
) {
15328 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15330 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
15331 if (r
->out
.ctr
== NULL
) {
15332 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15334 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
15335 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
15336 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
15338 return NDR_ERR_SUCCESS
;
15341 static enum ndr_err_code
ndr_pull_drsuapi_DsGetMemberships2(struct ndr_pull
*ndr
, int flags
, struct drsuapi_DsGetMemberships2
*r
)
15343 TALLOC_CTX
*_mem_save_bind_handle_0
;
15344 TALLOC_CTX
*_mem_save_req_0
;
15345 TALLOC_CTX
*_mem_save_level_out_0
;
15346 TALLOC_CTX
*_mem_save_ctr_0
;
15347 if (flags
& NDR_IN
) {
15348 ZERO_STRUCT(r
->out
);
15350 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15351 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
15353 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15354 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
15355 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
15356 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
15357 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
15358 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15359 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
15361 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15362 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
15363 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
15364 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
15365 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
15366 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
15367 ZERO_STRUCTP(r
->out
.level_out
);
15368 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
15369 ZERO_STRUCTP(r
->out
.ctr
);
15371 if (flags
& NDR_OUT
) {
15372 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15373 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
15375 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15376 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
15377 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
15378 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
15379 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15380 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
15382 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15383 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
15384 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
15385 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Ctr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
15386 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
15387 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
15389 return NDR_ERR_SUCCESS
;
15392 _PUBLIC_
void ndr_print_drsuapi_DsGetMemberships2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_DsGetMemberships2
*r
)
15394 ndr_print_struct(ndr
, name
, "drsuapi_DsGetMemberships2");
15396 if (flags
& NDR_SET_VALUES
) {
15397 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
15399 if (flags
& NDR_IN
) {
15400 ndr_print_struct(ndr
, "in", "drsuapi_DsGetMemberships2");
15402 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
15404 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
15406 ndr_print_int32(ndr
, "level", r
->in
.level
);
15407 ndr_print_ptr(ndr
, "req", r
->in
.req
);
15409 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
15410 ndr_print_drsuapi_DsGetMemberships2Request(ndr
, "req", r
->in
.req
);
15414 if (flags
& NDR_OUT
) {
15415 ndr_print_struct(ndr
, "out", "drsuapi_DsGetMemberships2");
15417 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
15419 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
15421 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
15423 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
15424 ndr_print_drsuapi_DsGetMemberships2Ctr(ndr
, "ctr", r
->out
.ctr
);
15426 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
15432 static enum ndr_err_code
ndr_push_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_REPLICA_VERIFY_OBJECTS
*r
)
15434 if (flags
& NDR_IN
) {
15436 if (flags
& NDR_OUT
) {
15437 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
15439 return NDR_ERR_SUCCESS
;
15442 static enum ndr_err_code
ndr_pull_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_REPLICA_VERIFY_OBJECTS
*r
)
15444 if (flags
& NDR_IN
) {
15446 if (flags
& NDR_OUT
) {
15447 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
15449 return NDR_ERR_SUCCESS
;
15452 _PUBLIC_
void ndr_print_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_REPLICA_VERIFY_OBJECTS
*r
)
15454 ndr_print_struct(ndr
, name
, "DRSUAPI_REPLICA_VERIFY_OBJECTS");
15456 if (flags
& NDR_SET_VALUES
) {
15457 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
15459 if (flags
& NDR_IN
) {
15460 ndr_print_struct(ndr
, "in", "DRSUAPI_REPLICA_VERIFY_OBJECTS");
15464 if (flags
& NDR_OUT
) {
15465 ndr_print_struct(ndr
, "out", "DRSUAPI_REPLICA_VERIFY_OBJECTS");
15467 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
15473 static enum ndr_err_code
ndr_push_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_push
*ndr
, int flags
, const struct DRSUAPI_GET_OBJECT_EXISTENCE
*r
)
15475 if (flags
& NDR_IN
) {
15477 if (flags
& NDR_OUT
) {
15478 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
15480 return NDR_ERR_SUCCESS
;
15483 static enum ndr_err_code
ndr_pull_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_pull
*ndr
, int flags
, struct DRSUAPI_GET_OBJECT_EXISTENCE
*r
)
15485 if (flags
& NDR_IN
) {
15487 if (flags
& NDR_OUT
) {
15488 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
15490 return NDR_ERR_SUCCESS
;
15493 _PUBLIC_
void ndr_print_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct DRSUAPI_GET_OBJECT_EXISTENCE
*r
)
15495 ndr_print_struct(ndr
, name
, "DRSUAPI_GET_OBJECT_EXISTENCE");
15497 if (flags
& NDR_SET_VALUES
) {
15498 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
15500 if (flags
& NDR_IN
) {
15501 ndr_print_struct(ndr
, "in", "DRSUAPI_GET_OBJECT_EXISTENCE");
15505 if (flags
& NDR_OUT
) {
15506 ndr_print_struct(ndr
, "out", "DRSUAPI_GET_OBJECT_EXISTENCE");
15508 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
15514 static enum ndr_err_code
ndr_push_drsuapi_QuerySitesByCost(struct ndr_push
*ndr
, int flags
, const struct drsuapi_QuerySitesByCost
*r
)
15516 if (flags
& NDR_IN
) {
15517 if (r
->in
.bind_handle
== NULL
) {
15518 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15520 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
15521 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, r
->in
.level
));
15522 if (r
->in
.req
== NULL
) {
15523 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15525 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
15526 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
15528 if (flags
& NDR_OUT
) {
15529 if (r
->out
.level_out
== NULL
) {
15530 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15532 NDR_CHECK(ndr_push_int32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
15533 if (r
->out
.ctr
== NULL
) {
15534 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
15536 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
15537 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
15538 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
15540 return NDR_ERR_SUCCESS
;
15543 static enum ndr_err_code
ndr_pull_drsuapi_QuerySitesByCost(struct ndr_pull
*ndr
, int flags
, struct drsuapi_QuerySitesByCost
*r
)
15545 TALLOC_CTX
*_mem_save_bind_handle_0
;
15546 TALLOC_CTX
*_mem_save_req_0
;
15547 TALLOC_CTX
*_mem_save_level_out_0
;
15548 TALLOC_CTX
*_mem_save_ctr_0
;
15549 if (flags
& NDR_IN
) {
15550 ZERO_STRUCT(r
->out
);
15552 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15553 NDR_PULL_ALLOC(ndr
, r
->in
.bind_handle
);
15555 _mem_save_bind_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15556 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.bind_handle
, LIBNDR_FLAG_REF_ALLOC
);
15557 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.bind_handle
));
15558 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bind_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
15559 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, &r
->in
.level
));
15560 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15561 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
15563 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15564 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
15565 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
15566 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
15567 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
15568 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
15569 ZERO_STRUCTP(r
->out
.level_out
);
15570 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
15571 ZERO_STRUCTP(r
->out
.ctr
);
15573 if (flags
& NDR_OUT
) {
15574 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15575 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
15577 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15578 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
15579 NDR_CHECK(ndr_pull_int32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
15580 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
15581 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
15582 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
15584 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15585 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
15586 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
));
15587 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
15588 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
15589 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
15591 return NDR_ERR_SUCCESS
;
15594 _PUBLIC_
void ndr_print_drsuapi_QuerySitesByCost(struct ndr_print
*ndr
, const char *name
, int flags
, const struct drsuapi_QuerySitesByCost
*r
)
15596 ndr_print_struct(ndr
, name
, "drsuapi_QuerySitesByCost");
15598 if (flags
& NDR_SET_VALUES
) {
15599 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
15601 if (flags
& NDR_IN
) {
15602 ndr_print_struct(ndr
, "in", "drsuapi_QuerySitesByCost");
15604 ndr_print_ptr(ndr
, "bind_handle", r
->in
.bind_handle
);
15606 ndr_print_policy_handle(ndr
, "bind_handle", r
->in
.bind_handle
);
15608 ndr_print_int32(ndr
, "level", r
->in
.level
);
15609 ndr_print_ptr(ndr
, "req", r
->in
.req
);
15611 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
15612 ndr_print_drsuapi_QuerySitesByCostRequest(ndr
, "req", r
->in
.req
);
15616 if (flags
& NDR_OUT
) {
15617 ndr_print_struct(ndr
, "out", "drsuapi_QuerySitesByCost");
15619 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
15621 ndr_print_int32(ndr
, "level_out", *r
->out
.level_out
);
15623 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
15625 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level_out
);
15626 ndr_print_drsuapi_QuerySitesByCostCtr(ndr
, "ctr", r
->out
.ctr
);
15628 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
15634 static const struct ndr_interface_call drsuapi_calls
[] = {
15637 sizeof(struct drsuapi_DsBind
),
15638 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsBind
,
15639 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsBind
,
15640 (ndr_print_function_t
) ndr_print_drsuapi_DsBind
,
15644 "drsuapi_DsUnbind",
15645 sizeof(struct drsuapi_DsUnbind
),
15646 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsUnbind
,
15647 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsUnbind
,
15648 (ndr_print_function_t
) ndr_print_drsuapi_DsUnbind
,
15652 "drsuapi_DsReplicaSync",
15653 sizeof(struct drsuapi_DsReplicaSync
),
15654 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsReplicaSync
,
15655 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsReplicaSync
,
15656 (ndr_print_function_t
) ndr_print_drsuapi_DsReplicaSync
,
15660 "drsuapi_DsGetNCChanges",
15661 sizeof(struct drsuapi_DsGetNCChanges
),
15662 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsGetNCChanges
,
15663 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsGetNCChanges
,
15664 (ndr_print_function_t
) ndr_print_drsuapi_DsGetNCChanges
,
15668 "drsuapi_DsReplicaUpdateRefs",
15669 sizeof(struct drsuapi_DsReplicaUpdateRefs
),
15670 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsReplicaUpdateRefs
,
15671 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsReplicaUpdateRefs
,
15672 (ndr_print_function_t
) ndr_print_drsuapi_DsReplicaUpdateRefs
,
15676 "drsuapi_DsReplicaAdd",
15677 sizeof(struct drsuapi_DsReplicaAdd
),
15678 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsReplicaAdd
,
15679 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsReplicaAdd
,
15680 (ndr_print_function_t
) ndr_print_drsuapi_DsReplicaAdd
,
15684 "drsuapi_DsReplicaDel",
15685 sizeof(struct drsuapi_DsReplicaDel
),
15686 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsReplicaDel
,
15687 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsReplicaDel
,
15688 (ndr_print_function_t
) ndr_print_drsuapi_DsReplicaDel
,
15692 "drsuapi_DsReplicaMod",
15693 sizeof(struct drsuapi_DsReplicaMod
),
15694 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsReplicaMod
,
15695 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsReplicaMod
,
15696 (ndr_print_function_t
) ndr_print_drsuapi_DsReplicaMod
,
15700 "DRSUAPI_VERIFY_NAMES",
15701 sizeof(struct DRSUAPI_VERIFY_NAMES
),
15702 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_VERIFY_NAMES
,
15703 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_VERIFY_NAMES
,
15704 (ndr_print_function_t
) ndr_print_DRSUAPI_VERIFY_NAMES
,
15708 "drsuapi_DsGetMemberships",
15709 sizeof(struct drsuapi_DsGetMemberships
),
15710 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsGetMemberships
,
15711 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsGetMemberships
,
15712 (ndr_print_function_t
) ndr_print_drsuapi_DsGetMemberships
,
15716 "DRSUAPI_INTER_DOMAIN_MOVE",
15717 sizeof(struct DRSUAPI_INTER_DOMAIN_MOVE
),
15718 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_INTER_DOMAIN_MOVE
,
15719 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_INTER_DOMAIN_MOVE
,
15720 (ndr_print_function_t
) ndr_print_DRSUAPI_INTER_DOMAIN_MOVE
,
15724 "drsuapi_DsGetNT4ChangeLog",
15725 sizeof(struct drsuapi_DsGetNT4ChangeLog
),
15726 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsGetNT4ChangeLog
,
15727 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsGetNT4ChangeLog
,
15728 (ndr_print_function_t
) ndr_print_drsuapi_DsGetNT4ChangeLog
,
15732 "drsuapi_DsCrackNames",
15733 sizeof(struct drsuapi_DsCrackNames
),
15734 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsCrackNames
,
15735 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsCrackNames
,
15736 (ndr_print_function_t
) ndr_print_drsuapi_DsCrackNames
,
15740 "drsuapi_DsWriteAccountSpn",
15741 sizeof(struct drsuapi_DsWriteAccountSpn
),
15742 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsWriteAccountSpn
,
15743 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsWriteAccountSpn
,
15744 (ndr_print_function_t
) ndr_print_drsuapi_DsWriteAccountSpn
,
15748 "drsuapi_DsRemoveDSServer",
15749 sizeof(struct drsuapi_DsRemoveDSServer
),
15750 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsRemoveDSServer
,
15751 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsRemoveDSServer
,
15752 (ndr_print_function_t
) ndr_print_drsuapi_DsRemoveDSServer
,
15756 "DRSUAPI_REMOVE_DS_DOMAIN",
15757 sizeof(struct DRSUAPI_REMOVE_DS_DOMAIN
),
15758 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_REMOVE_DS_DOMAIN
,
15759 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_REMOVE_DS_DOMAIN
,
15760 (ndr_print_function_t
) ndr_print_DRSUAPI_REMOVE_DS_DOMAIN
,
15764 "drsuapi_DsGetDomainControllerInfo",
15765 sizeof(struct drsuapi_DsGetDomainControllerInfo
),
15766 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsGetDomainControllerInfo
,
15767 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsGetDomainControllerInfo
,
15768 (ndr_print_function_t
) ndr_print_drsuapi_DsGetDomainControllerInfo
,
15772 "drsuapi_DsAddEntry",
15773 sizeof(struct drsuapi_DsAddEntry
),
15774 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsAddEntry
,
15775 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsAddEntry
,
15776 (ndr_print_function_t
) ndr_print_drsuapi_DsAddEntry
,
15780 "drsuapi_DsExecuteKCC",
15781 sizeof(struct drsuapi_DsExecuteKCC
),
15782 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsExecuteKCC
,
15783 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsExecuteKCC
,
15784 (ndr_print_function_t
) ndr_print_drsuapi_DsExecuteKCC
,
15788 "drsuapi_DsReplicaGetInfo",
15789 sizeof(struct drsuapi_DsReplicaGetInfo
),
15790 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsReplicaGetInfo
,
15791 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsReplicaGetInfo
,
15792 (ndr_print_function_t
) ndr_print_drsuapi_DsReplicaGetInfo
,
15796 "DRSUAPI_ADD_SID_HISTORY",
15797 sizeof(struct DRSUAPI_ADD_SID_HISTORY
),
15798 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_ADD_SID_HISTORY
,
15799 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_ADD_SID_HISTORY
,
15800 (ndr_print_function_t
) ndr_print_DRSUAPI_ADD_SID_HISTORY
,
15804 "drsuapi_DsGetMemberships2",
15805 sizeof(struct drsuapi_DsGetMemberships2
),
15806 (ndr_push_flags_fn_t
) ndr_push_drsuapi_DsGetMemberships2
,
15807 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_DsGetMemberships2
,
15808 (ndr_print_function_t
) ndr_print_drsuapi_DsGetMemberships2
,
15812 "DRSUAPI_REPLICA_VERIFY_OBJECTS",
15813 sizeof(struct DRSUAPI_REPLICA_VERIFY_OBJECTS
),
15814 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
15815 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
15816 (ndr_print_function_t
) ndr_print_DRSUAPI_REPLICA_VERIFY_OBJECTS
,
15820 "DRSUAPI_GET_OBJECT_EXISTENCE",
15821 sizeof(struct DRSUAPI_GET_OBJECT_EXISTENCE
),
15822 (ndr_push_flags_fn_t
) ndr_push_DRSUAPI_GET_OBJECT_EXISTENCE
,
15823 (ndr_pull_flags_fn_t
) ndr_pull_DRSUAPI_GET_OBJECT_EXISTENCE
,
15824 (ndr_print_function_t
) ndr_print_DRSUAPI_GET_OBJECT_EXISTENCE
,
15828 "drsuapi_QuerySitesByCost",
15829 sizeof(struct drsuapi_QuerySitesByCost
),
15830 (ndr_push_flags_fn_t
) ndr_push_drsuapi_QuerySitesByCost
,
15831 (ndr_pull_flags_fn_t
) ndr_pull_drsuapi_QuerySitesByCost
,
15832 (ndr_print_function_t
) ndr_print_drsuapi_QuerySitesByCost
,
15835 { NULL
, 0, NULL
, NULL
, NULL
, false }
15838 static const char * const drsuapi_endpoint_strings
[] = {
15839 "ncacn_np:[\\pipe\\lsass]",
15840 "ncacn_np:[\\pipe\\protected_storage]",
15845 static const struct ndr_interface_string_array drsuapi_endpoints
= {
15847 .names
= drsuapi_endpoint_strings
15850 static const char * const drsuapi_authservice_strings
[] = {
15854 static const struct ndr_interface_string_array drsuapi_authservices
= {
15856 .names
= drsuapi_authservice_strings
15860 const struct ndr_interface_table ndr_table_drsuapi
= {
15863 {0xe3514235,0x4b06,0x11d1,{0xab,0x04},{0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},
15864 NDR_DRSUAPI_VERSION
15866 .helpstring
= NDR_DRSUAPI_HELPSTRING
,
15868 .calls
= drsuapi_calls
,
15869 .endpoints
= &drsuapi_endpoints
,
15870 .authservices
= &drsuapi_authservices