Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_drsuapi.h"
5 :
6 : #include "librpc/gen_ndr/ndr_security.h"
7 : #include "librpc/gen_ndr/ndr_misc.h"
8 : #include "librpc/gen_ndr/ndr_lsa.h"
9 : #include "librpc/gen_ndr/ndr_samr.h"
10 : #include "librpc/ndr/ndr_compression.h"
11 95055 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DrsOptions(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
12 : {
13 95055 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
14 94955 : return NDR_ERR_SUCCESS;
15 : }
16 :
17 100546 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DrsOptions(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
18 : {
19 25 : uint32_t v;
20 100546 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
21 100546 : *r = v;
22 100546 : return NDR_ERR_SUCCESS;
23 : }
24 :
25 0 : _PUBLIC_ void ndr_print_drsuapi_DrsOptions(struct ndr_print *ndr, const char *name, uint32_t r)
26 : {
27 0 : ndr_print_uint32(ndr, name, r);
28 0 : ndr->depth++;
29 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ASYNC_OP", DRSUAPI_DRS_ASYNC_OP, r);
30 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GETCHG_CHECK", DRSUAPI_DRS_GETCHG_CHECK, r);
31 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_UPDATE_NOTIFICATION", DRSUAPI_DRS_UPDATE_NOTIFICATION, r);
32 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ADD_REF", DRSUAPI_DRS_ADD_REF, r);
33 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_ALL", DRSUAPI_DRS_SYNC_ALL, r);
34 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DEL_REF", DRSUAPI_DRS_DEL_REF, r);
35 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_WRIT_REP", DRSUAPI_DRS_WRIT_REP, r);
36 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_INIT_SYNC", DRSUAPI_DRS_INIT_SYNC, r);
37 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_PER_SYNC", DRSUAPI_DRS_PER_SYNC, r);
38 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_MAIL_REP", DRSUAPI_DRS_MAIL_REP, r);
39 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ASYNC_REP", DRSUAPI_DRS_ASYNC_REP, r);
40 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_IGNORE_ERROR", DRSUAPI_DRS_IGNORE_ERROR, r);
41 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_TWOWAY_SYNC", DRSUAPI_DRS_TWOWAY_SYNC, r);
42 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_CRITICAL_ONLY", DRSUAPI_DRS_CRITICAL_ONLY, r);
43 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_ANC", DRSUAPI_DRS_GET_ANC, r);
44 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_NC_SIZE", DRSUAPI_DRS_GET_NC_SIZE, r);
45 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_LOCAL_ONLY", DRSUAPI_DRS_LOCAL_ONLY, r);
46 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NONGC_RO_REP", DRSUAPI_DRS_NONGC_RO_REP, r);
47 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_BYNAME", DRSUAPI_DRS_SYNC_BYNAME, r);
48 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_REF_OK", DRSUAPI_DRS_REF_OK, r);
49 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_NOW", DRSUAPI_DRS_FULL_SYNC_NOW, r);
50 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NO_SOURCE", DRSUAPI_DRS_NO_SOURCE, r);
51 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS", DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS, r);
52 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_PACKET", DRSUAPI_DRS_FULL_SYNC_PACKET, r);
53 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_REQUEUE", DRSUAPI_DRS_SYNC_REQUEUE, r);
54 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_URGENT", DRSUAPI_DRS_SYNC_URGENT, r);
55 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_REF_GCSPN", DRSUAPI_DRS_REF_GCSPN, r);
56 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NO_DISCARD", DRSUAPI_DRS_NO_DISCARD, r);
57 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NEVER_SYNCED", DRSUAPI_DRS_NEVER_SYNCED, r);
58 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING", DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING, r);
59 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_INIT_SYNC_NOW", DRSUAPI_DRS_INIT_SYNC_NOW, r);
60 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_PREEMPTED", DRSUAPI_DRS_PREEMPTED, r);
61 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_FORCED", DRSUAPI_DRS_SYNC_FORCED, r);
62 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DISABLE_AUTO_SYNC", DRSUAPI_DRS_DISABLE_AUTO_SYNC, r);
63 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DISABLE_PERIODIC_SYNC", DRSUAPI_DRS_DISABLE_PERIODIC_SYNC, r);
64 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_USE_COMPRESSION", DRSUAPI_DRS_USE_COMPRESSION, r);
65 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NEVER_NOTIFY", DRSUAPI_DRS_NEVER_NOTIFY, r);
66 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_PAS", DRSUAPI_DRS_SYNC_PAS, r);
67 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP", DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP, r);
68 0 : ndr->depth--;
69 0 : }
70 :
71 6785 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DrsMoreOptions(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
72 : {
73 6785 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
74 6785 : return NDR_ERR_SUCCESS;
75 : }
76 :
77 6785 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DrsMoreOptions(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
78 : {
79 0 : uint32_t v;
80 6785 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
81 6785 : *r = v;
82 6785 : return NDR_ERR_SUCCESS;
83 : }
84 :
85 0 : _PUBLIC_ void ndr_print_drsuapi_DrsMoreOptions(struct ndr_print *ndr, const char *name, uint32_t r)
86 : {
87 0 : ndr_print_uint32(ndr, name, r);
88 0 : ndr->depth++;
89 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_TGT", DRSUAPI_DRS_GET_TGT, r);
90 0 : ndr->depth--;
91 0 : }
92 :
93 0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DrsUpdate(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
94 : {
95 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
96 0 : return NDR_ERR_SUCCESS;
97 : }
98 :
99 0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DrsUpdate(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
100 : {
101 0 : uint32_t v;
102 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
103 0 : *r = v;
104 0 : return NDR_ERR_SUCCESS;
105 : }
106 :
107 0 : _PUBLIC_ void ndr_print_drsuapi_DrsUpdate(struct ndr_print *ndr, const char *name, uint32_t r)
108 : {
109 0 : ndr_print_uint32(ndr, name, r);
110 0 : ndr->depth++;
111 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_UPDATE_FLAGS", DRSUAPI_DRS_UPDATE_FLAGS, r);
112 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_UPDATE_ADDRESS", DRSUAPI_DRS_UPDATE_ADDRESS, r);
113 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_UPDATE_SCHEDULE", DRSUAPI_DRS_UPDATE_SCHEDULE, r);
114 0 : ndr->depth--;
115 0 : }
116 :
117 4143 : static enum ndr_err_code ndr_push_drsuapi_SupportedExtensions(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
118 : {
119 4143 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
120 4034 : return NDR_ERR_SUCCESS;
121 : }
122 :
123 4017 : static enum ndr_err_code ndr_pull_drsuapi_SupportedExtensions(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
124 : {
125 95 : uint32_t v;
126 4017 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
127 4017 : *r = v;
128 4017 : return NDR_ERR_SUCCESS;
129 : }
130 :
131 256 : _PUBLIC_ void ndr_print_drsuapi_SupportedExtensions(struct ndr_print *ndr, const char *name, uint32_t r)
132 : {
133 256 : ndr_print_uint32(ndr, name, r);
134 256 : ndr->depth++;
135 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_BASE", DRSUAPI_SUPPORTED_EXTENSION_BASE, r);
136 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION", DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION, r);
137 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI", DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI, r);
138 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2", DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2, r);
139 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS", DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS, r);
140 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1, r);
141 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION", DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION, r);
142 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY, r);
143 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE", DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE, r);
144 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2, r);
145 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION", DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION, r);
146 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2, r);
147 256 : 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);
148 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND", DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND, r);
149 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO", DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO, r);
150 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION", DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION, r);
151 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01, r);
152 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP", DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP, r);
153 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY", DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY, r);
154 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3", DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3, r);
155 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5, r);
156 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2", DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2, r);
157 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6, r);
158 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS", DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS, r);
159 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8, r);
160 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5, r);
161 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6, r);
162 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3, r);
163 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7, r);
164 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT", DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT, r);
165 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS", DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS, r);
166 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10, r);
167 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2", DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2, r);
168 256 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3", DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3, r);
169 256 : ndr->depth--;
170 256 : }
171 :
172 9 : static enum ndr_err_code ndr_push_drsuapi_SupportedExtensionsExt(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
173 : {
174 9 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
175 9 : return NDR_ERR_SUCCESS;
176 : }
177 :
178 7 : static enum ndr_err_code ndr_pull_drsuapi_SupportedExtensionsExt(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
179 : {
180 0 : uint32_t v;
181 7 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
182 7 : *r = v;
183 7 : return NDR_ERR_SUCCESS;
184 : }
185 :
186 0 : _PUBLIC_ void ndr_print_drsuapi_SupportedExtensionsExt(struct ndr_print *ndr, const char *name, uint32_t r)
187 : {
188 0 : ndr_print_uint32(ndr, name, r);
189 0 : ndr->depth++;
190 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADAM", DRSUAPI_SUPPORTED_EXTENSION_ADAM, r);
191 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2", DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2, r);
192 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN", DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN, r);
193 0 : ndr->depth--;
194 0 : }
195 :
196 0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo24(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfo24 *r)
197 : {
198 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
199 0 : if (ndr_flags & NDR_SCALARS) {
200 0 : NDR_CHECK(ndr_push_align(ndr, 4));
201 0 : NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
202 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
203 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
204 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
205 : }
206 0 : if (ndr_flags & NDR_BUFFERS) {
207 0 : }
208 0 : return NDR_ERR_SUCCESS;
209 : }
210 :
211 0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo24(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfo24 *r)
212 : {
213 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
214 0 : if (ndr_flags & NDR_SCALARS) {
215 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
216 0 : NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
217 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
218 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
219 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
220 : }
221 0 : if (ndr_flags & NDR_BUFFERS) {
222 0 : }
223 0 : return NDR_ERR_SUCCESS;
224 : }
225 :
226 0 : static void ndr_print_flags_drsuapi_DsBindInfo24(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfo24 *r)
227 : {
228 0 : ndr_print_drsuapi_DsBindInfo24(ndr, name, r);
229 0 : }
230 :
231 0 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo24(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo24 *r)
232 : {
233 0 : ndr_print_struct(ndr, name, "drsuapi_DsBindInfo24");
234 0 : if (r == NULL) { ndr_print_null(ndr); return; }
235 0 : ndr->depth++;
236 0 : ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
237 0 : ndr_print_GUID(ndr, "site_guid", &r->site_guid);
238 0 : ndr_print_uint32(ndr, "pid", r->pid);
239 0 : ndr->depth--;
240 : }
241 :
242 4134 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo28(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfo28 *r)
243 : {
244 4134 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
245 4134 : if (ndr_flags & NDR_SCALARS) {
246 4134 : NDR_CHECK(ndr_push_align(ndr, 4));
247 4243 : NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
248 4134 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
249 4134 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
250 4134 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch));
251 4134 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
252 : }
253 4134 : if (ndr_flags & NDR_BUFFERS) {
254 109 : }
255 4134 : return NDR_ERR_SUCCESS;
256 : }
257 :
258 4010 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo28(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfo28 *r)
259 : {
260 4010 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
261 4010 : if (ndr_flags & NDR_SCALARS) {
262 4010 : NDR_CHECK(ndr_pull_align(ndr, 4));
263 4105 : NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
264 4010 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
265 4010 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
266 4010 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch));
267 4010 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
268 : }
269 4010 : if (ndr_flags & NDR_BUFFERS) {
270 95 : }
271 4010 : return NDR_ERR_SUCCESS;
272 : }
273 :
274 0 : static void ndr_print_flags_drsuapi_DsBindInfo28(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfo28 *r)
275 : {
276 0 : ndr_print_drsuapi_DsBindInfo28(ndr, name, r);
277 0 : }
278 :
279 256 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo28(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo28 *r)
280 : {
281 256 : ndr_print_struct(ndr, name, "drsuapi_DsBindInfo28");
282 256 : if (r == NULL) { ndr_print_null(ndr); return; }
283 256 : ndr->depth++;
284 256 : ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
285 256 : ndr_print_GUID(ndr, "site_guid", &r->site_guid);
286 256 : ndr_print_uint32(ndr, "pid", r->pid);
287 256 : ndr_print_uint32(ndr, "repl_epoch", r->repl_epoch);
288 256 : ndr->depth--;
289 : }
290 :
291 0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo32(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfo32 *r)
292 : {
293 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
294 0 : if (ndr_flags & NDR_SCALARS) {
295 0 : NDR_CHECK(ndr_push_align(ndr, 4));
296 0 : NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
297 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
298 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
299 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch));
300 0 : NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, r->supported_extensions_ext));
301 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
302 : }
303 0 : if (ndr_flags & NDR_BUFFERS) {
304 0 : }
305 0 : return NDR_ERR_SUCCESS;
306 : }
307 :
308 0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo32(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfo32 *r)
309 : {
310 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
311 0 : if (ndr_flags & NDR_SCALARS) {
312 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
313 0 : NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
314 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
315 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
316 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch));
317 0 : NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, &r->supported_extensions_ext));
318 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
319 : }
320 0 : if (ndr_flags & NDR_BUFFERS) {
321 0 : }
322 0 : return NDR_ERR_SUCCESS;
323 : }
324 :
325 0 : static void ndr_print_flags_drsuapi_DsBindInfo32(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfo32 *r)
326 : {
327 0 : ndr_print_drsuapi_DsBindInfo32(ndr, name, r);
328 0 : }
329 :
330 0 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo32(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo32 *r)
331 : {
332 0 : ndr_print_struct(ndr, name, "drsuapi_DsBindInfo32");
333 0 : if (r == NULL) { ndr_print_null(ndr); return; }
334 0 : ndr->depth++;
335 0 : ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
336 0 : ndr_print_GUID(ndr, "site_guid", &r->site_guid);
337 0 : ndr_print_uint32(ndr, "pid", r->pid);
338 0 : ndr_print_uint32(ndr, "repl_epoch", r->repl_epoch);
339 0 : ndr_print_drsuapi_SupportedExtensionsExt(ndr, "supported_extensions_ext", r->supported_extensions_ext);
340 0 : ndr->depth--;
341 : }
342 :
343 9 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo48(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfo48 *r)
344 : {
345 9 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
346 9 : if (ndr_flags & NDR_SCALARS) {
347 9 : NDR_CHECK(ndr_push_align(ndr, 4));
348 9 : NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
349 9 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
350 9 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
351 9 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch));
352 9 : NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, r->supported_extensions_ext));
353 9 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->config_dn_guid));
354 9 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
355 : }
356 9 : if (ndr_flags & NDR_BUFFERS) {
357 0 : }
358 9 : return NDR_ERR_SUCCESS;
359 : }
360 :
361 7 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo48(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfo48 *r)
362 : {
363 7 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
364 7 : if (ndr_flags & NDR_SCALARS) {
365 7 : NDR_CHECK(ndr_pull_align(ndr, 4));
366 7 : NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
367 7 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
368 7 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
369 7 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch));
370 7 : NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, &r->supported_extensions_ext));
371 7 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->config_dn_guid));
372 7 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
373 : }
374 7 : if (ndr_flags & NDR_BUFFERS) {
375 0 : }
376 7 : return NDR_ERR_SUCCESS;
377 : }
378 :
379 0 : static void ndr_print_flags_drsuapi_DsBindInfo48(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfo48 *r)
380 : {
381 0 : ndr_print_drsuapi_DsBindInfo48(ndr, name, r);
382 0 : }
383 :
384 0 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo48(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo48 *r)
385 : {
386 0 : ndr_print_struct(ndr, name, "drsuapi_DsBindInfo48");
387 0 : if (r == NULL) { ndr_print_null(ndr); return; }
388 0 : ndr->depth++;
389 0 : ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
390 0 : ndr_print_GUID(ndr, "site_guid", &r->site_guid);
391 0 : ndr_print_uint32(ndr, "pid", r->pid);
392 0 : ndr_print_uint32(ndr, "repl_epoch", r->repl_epoch);
393 0 : ndr_print_drsuapi_SupportedExtensionsExt(ndr, "supported_extensions_ext", r->supported_extensions_ext);
394 0 : ndr_print_GUID(ndr, "config_dn_guid", &r->config_dn_guid);
395 0 : ndr->depth--;
396 : }
397 :
398 0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo52(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfo52 *r)
399 : {
400 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
401 0 : if (ndr_flags & NDR_SCALARS) {
402 0 : NDR_CHECK(ndr_push_align(ndr, 4));
403 0 : NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
404 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
405 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
406 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch));
407 0 : NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, r->supported_extensions_ext));
408 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->config_dn_guid));
409 0 : NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, r->supported_capabilities_ext));
410 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
411 : }
412 0 : if (ndr_flags & NDR_BUFFERS) {
413 0 : }
414 0 : return NDR_ERR_SUCCESS;
415 : }
416 :
417 0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo52(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfo52 *r)
418 : {
419 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
420 0 : if (ndr_flags & NDR_SCALARS) {
421 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
422 0 : NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
423 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
424 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
425 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch));
426 0 : NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, &r->supported_extensions_ext));
427 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->config_dn_guid));
428 0 : NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, &r->supported_capabilities_ext));
429 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
430 : }
431 0 : if (ndr_flags & NDR_BUFFERS) {
432 0 : }
433 0 : return NDR_ERR_SUCCESS;
434 : }
435 :
436 0 : static void ndr_print_flags_drsuapi_DsBindInfo52(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfo52 *r)
437 : {
438 0 : ndr_print_drsuapi_DsBindInfo52(ndr, name, r);
439 0 : }
440 :
441 0 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo52(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo52 *r)
442 : {
443 0 : ndr_print_struct(ndr, name, "drsuapi_DsBindInfo52");
444 0 : if (r == NULL) { ndr_print_null(ndr); return; }
445 0 : ndr->depth++;
446 0 : ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
447 0 : ndr_print_GUID(ndr, "site_guid", &r->site_guid);
448 0 : ndr_print_uint32(ndr, "pid", r->pid);
449 0 : ndr_print_uint32(ndr, "repl_epoch", r->repl_epoch);
450 0 : ndr_print_drsuapi_SupportedExtensionsExt(ndr, "supported_extensions_ext", r->supported_extensions_ext);
451 0 : ndr_print_GUID(ndr, "config_dn_guid", &r->config_dn_guid);
452 0 : ndr_print_drsuapi_SupportedExtensionsExt(ndr, "supported_capabilities_ext", r->supported_capabilities_ext);
453 0 : ndr->depth--;
454 : }
455 :
456 0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfoFallBack(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfoFallBack *r)
457 : {
458 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
459 0 : if (ndr_flags & NDR_SCALARS) {
460 0 : NDR_CHECK(ndr_push_align(ndr, 4));
461 : {
462 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
463 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
464 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->info));
465 0 : ndr->flags = _flags_save_DATA_BLOB;
466 : }
467 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
468 : }
469 0 : if (ndr_flags & NDR_BUFFERS) {
470 0 : }
471 0 : return NDR_ERR_SUCCESS;
472 : }
473 :
474 0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfoFallBack(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfoFallBack *r)
475 : {
476 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
477 0 : if (ndr_flags & NDR_SCALARS) {
478 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
479 : {
480 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
481 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
482 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->info));
483 0 : ndr->flags = _flags_save_DATA_BLOB;
484 : }
485 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
486 : }
487 0 : if (ndr_flags & NDR_BUFFERS) {
488 0 : }
489 0 : return NDR_ERR_SUCCESS;
490 : }
491 :
492 0 : static void ndr_print_flags_drsuapi_DsBindInfoFallBack(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfoFallBack *r)
493 : {
494 0 : ndr_print_drsuapi_DsBindInfoFallBack(ndr, name, r);
495 0 : }
496 :
497 0 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfoFallBack(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfoFallBack *r)
498 : {
499 0 : ndr_print_struct(ndr, name, "drsuapi_DsBindInfoFallBack");
500 0 : if (r == NULL) { ndr_print_null(ndr); return; }
501 0 : ndr->depth++;
502 : {
503 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
504 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
505 0 : ndr_print_DATA_BLOB(ndr, "info", r->info);
506 0 : ndr->flags = _flags_save_DATA_BLOB;
507 : }
508 0 : ndr->depth--;
509 : }
510 :
511 4143 : static enum ndr_err_code ndr_push_drsuapi_DsBindInfoCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfoCtr *r)
512 : {
513 : {
514 4143 : libndr_flags _flags_save_STRUCT = ndr->flags;
515 4143 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
516 4143 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
517 4143 : if (ndr_flags & NDR_SCALARS) {
518 4143 : NDR_CHECK(ndr_push_align(ndr, 5));
519 4143 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
520 4143 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
521 4143 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->length));
522 4143 : NDR_CHECK(ndr_push_drsuapi_DsBindInfo(ndr, NDR_SCALARS, &r->info));
523 4143 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
524 : }
525 4143 : if (ndr_flags & NDR_BUFFERS) {
526 109 : }
527 4143 : ndr->flags = _flags_save_STRUCT;
528 : }
529 4143 : return NDR_ERR_SUCCESS;
530 : }
531 :
532 4017 : static enum ndr_err_code ndr_pull_drsuapi_DsBindInfoCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfoCtr *r)
533 : {
534 : {
535 4017 : libndr_flags _flags_save_STRUCT = ndr->flags;
536 4017 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
537 4017 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
538 4017 : if (ndr_flags & NDR_SCALARS) {
539 4017 : NDR_CHECK(ndr_pull_align(ndr, 5));
540 4017 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
541 4017 : if (r->length < 1 || r->length > 10000) {
542 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->length), (uint32_t)(1), (uint32_t)(10000));
543 : }
544 4017 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_length));
545 4017 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->length));
546 4017 : NDR_CHECK(ndr_pull_drsuapi_DsBindInfo(ndr, NDR_SCALARS, &r->info));
547 4017 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
548 : }
549 4017 : if (ndr_flags & NDR_BUFFERS) {
550 95 : }
551 4017 : ndr->flags = _flags_save_STRUCT;
552 : }
553 4017 : return NDR_ERR_SUCCESS;
554 : }
555 :
556 256 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfoCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfoCtr *r)
557 : {
558 256 : ndr_print_struct(ndr, name, "drsuapi_DsBindInfoCtr");
559 256 : if (r == NULL) { ndr_print_null(ndr); return; }
560 : {
561 256 : libndr_flags _flags_save_STRUCT = ndr->flags;
562 256 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
563 256 : ndr->depth++;
564 256 : ndr_print_uint3264(ndr, "length", r->length);
565 256 : ndr_print_uint32(ndr, "__ndr_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->__ndr_length);
566 256 : ndr_print_set_switch_value(ndr, &r->info, r->length);
567 256 : ndr_print_drsuapi_DsBindInfo(ndr, "info", &r->info);
568 256 : ndr->depth--;
569 256 : ndr->flags = _flags_save_STRUCT;
570 : }
571 : }
572 :
573 1873046 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier *r)
574 : {
575 1873046 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
576 1873046 : if (ndr_flags & NDR_SCALARS) {
577 1873046 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->dn) + 1));
578 1873046 : NDR_CHECK(ndr_push_align(ndr, 4));
579 1873046 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags) - 4));
580 1873046 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
581 1873046 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
582 1873046 : NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
583 1873046 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn)));
584 1873046 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16));
585 1873046 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
586 : }
587 1873046 : if (ndr_flags & NDR_BUFFERS) {
588 1873046 : NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
589 : }
590 1873044 : return NDR_ERR_SUCCESS;
591 : }
592 :
593 622768 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectIdentifier *r)
594 : {
595 622768 : uint32_t size_dn_0 = 0;
596 622768 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
597 622768 : if (ndr_flags & NDR_SCALARS) {
598 622768 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dn));
599 622768 : NDR_CHECK(ndr_pull_align(ndr, 4));
600 622768 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
601 622768 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_sid));
602 622768 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
603 622768 : NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
604 622768 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_dn));
605 622768 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->dn, &size_dn_0));
606 622768 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dn, size_dn_0, sizeof(uint16_t), CH_UTF16));
607 622768 : if (r->dn) {
608 622768 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->dn, r->__ndr_size_dn + 1));
609 : }
610 622768 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
611 : }
612 622768 : if (ndr_flags & NDR_BUFFERS) {
613 622768 : NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
614 : }
615 622763 : return NDR_ERR_SUCCESS;
616 : }
617 :
618 0 : static void ndr_print_flags_drsuapi_DsReplicaObjectIdentifier(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObjectIdentifier *r)
619 : {
620 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, name, r);
621 0 : }
622 :
623 13968 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier *r)
624 : {
625 13968 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier");
626 13968 : if (r == NULL) { ndr_print_null(ndr); return; }
627 13968 : ndr->depth++;
628 13968 : ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags) - 4:r->__ndr_size);
629 13968 : 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);
630 13968 : ndr_print_GUID(ndr, "guid", &r->guid);
631 13968 : ndr_print_dom_sid28(ndr, "sid", &r->sid);
632 13968 : ndr_print_uint32(ndr, "__ndr_size_dn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->dn):r->__ndr_size_dn);
633 13968 : ndr_print_string(ndr, "dn", r->dn);
634 13968 : ndr->depth--;
635 : }
636 :
637 1873046 : _PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier(const struct drsuapi_DsReplicaObjectIdentifier *r, libndr_flags flags)
638 : {
639 1873046 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier);
640 : }
641 :
642 8856 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaSyncRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaSyncRequest1 *r)
643 : {
644 8856 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
645 8856 : if (ndr_flags & NDR_SCALARS) {
646 4428 : if (r->naming_context == NULL) {
647 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
648 : }
649 4428 : NDR_CHECK(ndr_push_align(ndr, 5));
650 4428 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
651 4428 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
652 4428 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_dns));
653 4428 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
654 4428 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
655 : }
656 8856 : if (ndr_flags & NDR_BUFFERS) {
657 4428 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
658 4428 : if (r->source_dsa_dns) {
659 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_dns, CH_DOS)));
660 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
661 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_dns, CH_DOS)));
662 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_dns, ndr_charset_length(r->source_dsa_dns, CH_DOS), sizeof(uint8_t), CH_DOS));
663 : }
664 : }
665 8856 : return NDR_ERR_SUCCESS;
666 : }
667 :
668 8856 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaSyncRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaSyncRequest1 *r)
669 : {
670 0 : uint32_t _ptr_naming_context;
671 8856 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
672 0 : uint32_t _ptr_source_dsa_dns;
673 8856 : uint32_t size_source_dsa_dns_1 = 0;
674 8856 : uint32_t length_source_dsa_dns_1 = 0;
675 8856 : TALLOC_CTX *_mem_save_source_dsa_dns_0 = NULL;
676 8856 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
677 8856 : if (ndr_flags & NDR_SCALARS) {
678 4428 : NDR_CHECK(ndr_pull_align(ndr, 5));
679 4428 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
680 4428 : if (_ptr_naming_context) {
681 4428 : NDR_PULL_ALLOC(ndr, r->naming_context);
682 : } else {
683 0 : r->naming_context = NULL;
684 : }
685 4428 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
686 4428 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_dns));
687 4428 : if (_ptr_source_dsa_dns) {
688 0 : NDR_PULL_ALLOC(ndr, r->source_dsa_dns);
689 : } else {
690 4428 : r->source_dsa_dns = NULL;
691 : }
692 4428 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
693 4428 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
694 : }
695 8856 : if (ndr_flags & NDR_BUFFERS) {
696 4428 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
697 4428 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
698 4428 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
699 4428 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
700 4428 : if (r->source_dsa_dns) {
701 0 : _mem_save_source_dsa_dns_0 = NDR_PULL_GET_MEM_CTX(ndr);
702 0 : NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_dns, 0);
703 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_dns));
704 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_dns));
705 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_dns, &size_source_dsa_dns_1));
706 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_dns, &length_source_dsa_dns_1));
707 0 : if (length_source_dsa_dns_1 > size_source_dsa_dns_1) {
708 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_dns_1, length_source_dsa_dns_1);
709 : }
710 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_dns_1, sizeof(uint8_t)));
711 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_dns, length_source_dsa_dns_1, sizeof(uint8_t), CH_DOS));
712 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_dns_0, 0);
713 : }
714 : }
715 8856 : return NDR_ERR_SUCCESS;
716 : }
717 :
718 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaSyncRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaSyncRequest1 *r)
719 : {
720 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaSyncRequest1");
721 0 : if (r == NULL) { ndr_print_null(ndr); return; }
722 0 : ndr->depth++;
723 0 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
724 0 : ndr->depth++;
725 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
726 0 : ndr->depth--;
727 0 : ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
728 0 : ndr_print_ptr(ndr, "source_dsa_dns", r->source_dsa_dns);
729 0 : ndr->depth++;
730 0 : if (r->source_dsa_dns) {
731 0 : ndr_print_string(ndr, "source_dsa_dns", r->source_dsa_dns);
732 : }
733 0 : ndr->depth--;
734 0 : ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
735 0 : ndr->depth--;
736 : }
737 :
738 4428 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaSyncRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaSyncRequest *r)
739 : {
740 0 : uint32_t level;
741 4428 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
742 4428 : if (ndr_flags & NDR_SCALARS) {
743 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
744 4428 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
745 4428 : NDR_CHECK(ndr_push_union_align(ndr, 5));
746 4428 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
747 4428 : NDR_CHECK(ndr_push_union_align(ndr, 5));
748 4428 : switch (level) {
749 4428 : case 1: {
750 4428 : NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr, NDR_SCALARS, &r->req1));
751 4428 : break; }
752 :
753 0 : default:
754 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
755 : }
756 : }
757 4428 : if (ndr_flags & NDR_BUFFERS) {
758 4428 : if (!(ndr_flags & NDR_SCALARS)) {
759 : /* We didn't get it above, and the token is not needed after this. */
760 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
761 : }
762 4428 : switch (level) {
763 4428 : case 1:
764 4428 : NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr, NDR_BUFFERS, &r->req1));
765 4428 : break;
766 :
767 0 : default:
768 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
769 : }
770 : }
771 4428 : return NDR_ERR_SUCCESS;
772 : }
773 :
774 4428 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaSyncRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaSyncRequest *r)
775 : {
776 0 : uint32_t level;
777 0 : uint32_t _level;
778 4428 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
779 4428 : if (ndr_flags & NDR_SCALARS) {
780 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
781 4428 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
782 4428 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
783 4428 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
784 4428 : if (_level != level) {
785 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
786 : }
787 4428 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
788 4428 : switch (level) {
789 4428 : case 1: {
790 4428 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr, NDR_SCALARS, &r->req1));
791 4428 : break; }
792 :
793 0 : default:
794 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
795 : }
796 : }
797 4428 : if (ndr_flags & NDR_BUFFERS) {
798 4428 : if (!(ndr_flags & NDR_SCALARS)) {
799 : /* We didn't get it above, and the token is not needed after this. */
800 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
801 : }
802 4428 : switch (level) {
803 4428 : case 1:
804 4428 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr, NDR_BUFFERS, &r->req1));
805 4428 : break;
806 :
807 0 : default:
808 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
809 : }
810 : }
811 4428 : return NDR_ERR_SUCCESS;
812 : }
813 :
814 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaSyncRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaSyncRequest *r)
815 : {
816 0 : uint32_t level;
817 0 : level = ndr_print_steal_switch_value(ndr, r);
818 0 : ndr_print_union(ndr, name, level, "drsuapi_DsReplicaSyncRequest");
819 0 : switch (level) {
820 0 : case 1:
821 0 : ndr_print_drsuapi_DsReplicaSyncRequest1(ndr, "req1", &r->req1);
822 0 : break;
823 :
824 0 : default:
825 0 : ndr_print_bad_level(ndr, name, level);
826 : }
827 0 : }
828 :
829 129658 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaHighWaterMark(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaHighWaterMark *r)
830 : {
831 129658 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
832 129658 : if (ndr_flags & NDR_SCALARS) {
833 129658 : NDR_CHECK(ndr_push_align(ndr, 8));
834 129658 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->tmp_highest_usn));
835 129658 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->reserved_usn));
836 129658 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
837 129658 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
838 : }
839 129658 : if (ndr_flags & NDR_BUFFERS) {
840 100 : }
841 129658 : return NDR_ERR_SUCCESS;
842 : }
843 :
844 114436 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaHighWaterMark(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaHighWaterMark *r)
845 : {
846 114436 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
847 114436 : if (ndr_flags & NDR_SCALARS) {
848 114436 : NDR_CHECK(ndr_pull_align(ndr, 8));
849 114436 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->tmp_highest_usn));
850 114436 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->reserved_usn));
851 114436 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
852 114436 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
853 : }
854 114436 : if (ndr_flags & NDR_BUFFERS) {
855 27 : }
856 114436 : return NDR_ERR_SUCCESS;
857 : }
858 :
859 0 : static void ndr_print_flags_drsuapi_DsReplicaHighWaterMark(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaHighWaterMark *r)
860 : {
861 0 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, name, r);
862 0 : }
863 :
864 82 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaHighWaterMark(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaHighWaterMark *r)
865 : {
866 82 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaHighWaterMark");
867 82 : if (r == NULL) { ndr_print_null(ndr); return; }
868 82 : ndr->depth++;
869 82 : ndr_print_hyper(ndr, "tmp_highest_usn", r->tmp_highest_usn);
870 82 : ndr_print_hyper(ndr, "reserved_usn", r->reserved_usn);
871 82 : ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
872 82 : ndr->depth--;
873 : }
874 :
875 13106 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor *r)
876 : {
877 13106 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
878 13106 : if (ndr_flags & NDR_SCALARS) {
879 13106 : NDR_CHECK(ndr_push_align(ndr, 8));
880 13106 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
881 13106 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
882 13106 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
883 : }
884 13106 : if (ndr_flags & NDR_BUFFERS) {
885 0 : }
886 13106 : return NDR_ERR_SUCCESS;
887 : }
888 :
889 11172 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor *r)
890 : {
891 11172 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
892 11172 : if (ndr_flags & NDR_SCALARS) {
893 11172 : NDR_CHECK(ndr_pull_align(ndr, 8));
894 11172 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
895 11172 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
896 11172 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
897 : }
898 11172 : if (ndr_flags & NDR_BUFFERS) {
899 0 : }
900 11172 : return NDR_ERR_SUCCESS;
901 : }
902 :
903 0 : static void ndr_print_flags_drsuapi_DsReplicaCursor(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaCursor *r)
904 : {
905 0 : ndr_print_drsuapi_DsReplicaCursor(ndr, name, r);
906 0 : }
907 :
908 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor *r)
909 : {
910 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor");
911 0 : if (r == NULL) { ndr_print_null(ndr); return; }
912 0 : ndr->depth++;
913 0 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
914 0 : ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
915 0 : ndr->depth--;
916 : }
917 :
918 4380 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursorCtrEx(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursorCtrEx *r)
919 : {
920 0 : uint32_t cntr_cursors_0;
921 4380 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
922 4380 : if (ndr_flags & NDR_SCALARS) {
923 4380 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
924 4380 : NDR_CHECK(ndr_push_align(ndr, 8));
925 4380 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
926 4380 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
927 4380 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
928 4380 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
929 15410 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
930 11030 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
931 : }
932 4380 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
933 : }
934 4380 : if (ndr_flags & NDR_BUFFERS) {
935 0 : }
936 4380 : return NDR_ERR_SUCCESS;
937 : }
938 :
939 4380 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursorCtrEx(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursorCtrEx *r)
940 : {
941 4380 : uint32_t size_cursors_0 = 0;
942 0 : uint32_t cntr_cursors_0;
943 4380 : TALLOC_CTX *_mem_save_cursors_0 = NULL;
944 4380 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
945 4380 : if (ndr_flags & NDR_SCALARS) {
946 4380 : NDR_CHECK(ndr_pull_array_size(ndr, &r->cursors));
947 4380 : NDR_CHECK(ndr_pull_align(ndr, 8));
948 4380 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
949 4380 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
950 4380 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
951 4380 : if (r->count > 1048576) {
952 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(1048576));
953 : }
954 4380 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
955 4380 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cursors, &size_cursors_0));
956 4380 : NDR_PULL_ALLOC_N(ndr, r->cursors, size_cursors_0);
957 4380 : _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
958 4380 : NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
959 15410 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (size_cursors_0); cntr_cursors_0++) {
960 11030 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
961 : }
962 4380 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
963 4380 : if (r->cursors) {
964 4380 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cursors, r->count));
965 : }
966 4380 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
967 : }
968 4380 : if (ndr_flags & NDR_BUFFERS) {
969 0 : }
970 4380 : return NDR_ERR_SUCCESS;
971 : }
972 :
973 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursorCtrEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursorCtrEx *r)
974 : {
975 0 : uint32_t cntr_cursors_0;
976 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursorCtrEx");
977 0 : if (r == NULL) { ndr_print_null(ndr); return; }
978 0 : ndr->depth++;
979 0 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->version);
980 0 : ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
981 0 : ndr_print_uint32(ndr, "count", r->count);
982 0 : ndr_print_uint32(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
983 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "cursors", (uint32_t)(r->count));
984 0 : ndr->depth++;
985 0 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
986 0 : ndr_print_drsuapi_DsReplicaCursor(ndr, "cursors", &r->cursors[cntr_cursors_0]);
987 : }
988 0 : ndr->depth--;
989 0 : ndr->depth--;
990 : }
991 :
992 10065 : static enum ndr_err_code ndr_push_drsuapi_DsExtendedOperation(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsExtendedOperation r)
993 : {
994 : {
995 10065 : libndr_flags _flags_save_ENUM = ndr->flags;
996 10065 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
997 10065 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
998 10065 : ndr->flags = _flags_save_ENUM;
999 : }
1000 10065 : return NDR_ERR_SUCCESS;
1001 : }
1002 :
1003 10097 : static enum ndr_err_code ndr_pull_drsuapi_DsExtendedOperation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsExtendedOperation *r)
1004 : {
1005 0 : uint32_t v;
1006 : {
1007 10097 : libndr_flags _flags_save_ENUM = ndr->flags;
1008 10097 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1009 10097 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1010 10097 : *r = v;
1011 10097 : ndr->flags = _flags_save_ENUM;
1012 : }
1013 10097 : return NDR_ERR_SUCCESS;
1014 : }
1015 :
1016 0 : _PUBLIC_ void ndr_print_drsuapi_DsExtendedOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedOperation r)
1017 : {
1018 0 : const char *val = NULL;
1019 :
1020 : {
1021 0 : libndr_flags _flags_save_ENUM = ndr->flags;
1022 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1023 0 : switch (r) {
1024 0 : case DRSUAPI_EXOP_NONE: val = "DRSUAPI_EXOP_NONE"; break;
1025 0 : case DRSUAPI_EXOP_FSMO_REQ_ROLE: val = "DRSUAPI_EXOP_FSMO_REQ_ROLE"; break;
1026 0 : case DRSUAPI_EXOP_FSMO_RID_ALLOC: val = "DRSUAPI_EXOP_FSMO_RID_ALLOC"; break;
1027 0 : case DRSUAPI_EXOP_FSMO_RID_REQ_ROLE: val = "DRSUAPI_EXOP_FSMO_RID_REQ_ROLE"; break;
1028 0 : case DRSUAPI_EXOP_FSMO_REQ_PDC: val = "DRSUAPI_EXOP_FSMO_REQ_PDC"; break;
1029 0 : case DRSUAPI_EXOP_FSMO_ABANDON_ROLE: val = "DRSUAPI_EXOP_FSMO_ABANDON_ROLE"; break;
1030 0 : case DRSUAPI_EXOP_REPL_OBJ: val = "DRSUAPI_EXOP_REPL_OBJ"; break;
1031 0 : case DRSUAPI_EXOP_REPL_SECRET: val = "DRSUAPI_EXOP_REPL_SECRET"; break;
1032 : }
1033 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1034 0 : ndr->flags = _flags_save_ENUM;
1035 : }
1036 0 : }
1037 :
1038 20234 : static enum ndr_err_code ndr_push_drsuapi_DsExtendedError(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsExtendedError r)
1039 : {
1040 : {
1041 20234 : libndr_flags _flags_save_ENUM = ndr->flags;
1042 20234 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1043 20234 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1044 20234 : ndr->flags = _flags_save_ENUM;
1045 : }
1046 20234 : return NDR_ERR_SUCCESS;
1047 : }
1048 :
1049 10066 : static enum ndr_err_code ndr_pull_drsuapi_DsExtendedError(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsExtendedError *r)
1050 : {
1051 1 : uint32_t v;
1052 : {
1053 10066 : libndr_flags _flags_save_ENUM = ndr->flags;
1054 10066 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1055 10066 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1056 10066 : *r = v;
1057 10066 : ndr->flags = _flags_save_ENUM;
1058 : }
1059 10066 : return NDR_ERR_SUCCESS;
1060 : }
1061 :
1062 41 : _PUBLIC_ void ndr_print_drsuapi_DsExtendedError(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedError r)
1063 : {
1064 41 : const char *val = NULL;
1065 :
1066 : {
1067 41 : libndr_flags _flags_save_ENUM = ndr->flags;
1068 41 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1069 41 : switch (r) {
1070 40 : case DRSUAPI_EXOP_ERR_NONE: val = "DRSUAPI_EXOP_ERR_NONE"; break;
1071 0 : case DRSUAPI_EXOP_ERR_SUCCESS: val = "DRSUAPI_EXOP_ERR_SUCCESS"; break;
1072 0 : case DRSUAPI_EXOP_ERR_UNKNOWN_OP: val = "DRSUAPI_EXOP_ERR_UNKNOWN_OP"; break;
1073 0 : case DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER: val = "DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER"; break;
1074 0 : case DRSUAPI_EXOP_ERR_UPDATE_ERR: val = "DRSUAPI_EXOP_ERR_UPDATE_ERR"; break;
1075 0 : case DRSUAPI_EXOP_ERR_EXCEPTION: val = "DRSUAPI_EXOP_ERR_EXCEPTION"; break;
1076 0 : case DRSUAPI_EXOP_ERR_UNKNOWN_CALLER: val = "DRSUAPI_EXOP_ERR_UNKNOWN_CALLER"; break;
1077 0 : case DRSUAPI_EXOP_ERR_RID_ALLOC: val = "DRSUAPI_EXOP_ERR_RID_ALLOC"; break;
1078 0 : case DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED: val = "DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED"; break;
1079 0 : case DRSUAPI_EXOP_ERR_FMSO_PENDING_OP: val = "DRSUAPI_EXOP_ERR_FMSO_PENDING_OP"; break;
1080 0 : case DRSUAPI_EXOP_ERR_MISMATCH: val = "DRSUAPI_EXOP_ERR_MISMATCH"; break;
1081 0 : case DRSUAPI_EXOP_ERR_COULDNT_CONTACT: val = "DRSUAPI_EXOP_ERR_COULDNT_CONTACT"; break;
1082 0 : case DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES: val = "DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES"; break;
1083 0 : case DRSUAPI_EXOP_ERR_DIR_ERROR: val = "DRSUAPI_EXOP_ERR_DIR_ERROR"; break;
1084 0 : case DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS: val = "DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS"; break;
1085 0 : case DRSUAPI_EXOP_ERR_ACCESS_DENIED: val = "DRSUAPI_EXOP_ERR_ACCESS_DENIED"; break;
1086 0 : case DRSUAPI_EXOP_ERR_PARAM_ERROR: val = "DRSUAPI_EXOP_ERR_PARAM_ERROR"; break;
1087 : }
1088 41 : ndr_print_enum(ndr, name, "ENUM", val, r);
1089 41 : ndr->flags = _flags_save_ENUM;
1090 : }
1091 41 : }
1092 :
1093 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest5(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesRequest5 *r)
1094 : {
1095 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1096 0 : if (ndr_flags & NDR_SCALARS) {
1097 0 : if (r->naming_context == NULL) {
1098 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1099 : }
1100 0 : NDR_CHECK(ndr_push_align(ndr, 8));
1101 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
1102 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
1103 0 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
1104 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1105 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
1106 0 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
1107 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_object_count));
1108 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size));
1109 0 : NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op));
1110 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info));
1111 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1112 : }
1113 0 : if (ndr_flags & NDR_BUFFERS) {
1114 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
1115 0 : if (r->uptodateness_vector) {
1116 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
1117 : }
1118 : }
1119 0 : return NDR_ERR_SUCCESS;
1120 : }
1121 :
1122 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest5(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesRequest5 *r)
1123 : {
1124 0 : uint32_t _ptr_naming_context;
1125 0 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
1126 0 : uint32_t _ptr_uptodateness_vector;
1127 0 : TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
1128 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1129 0 : if (ndr_flags & NDR_SCALARS) {
1130 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
1131 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
1132 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
1133 0 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
1134 0 : if (_ptr_naming_context) {
1135 0 : NDR_PULL_ALLOC(ndr, r->naming_context);
1136 : } else {
1137 0 : r->naming_context = NULL;
1138 : }
1139 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1140 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
1141 0 : if (_ptr_uptodateness_vector) {
1142 0 : NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
1143 : } else {
1144 0 : r->uptodateness_vector = NULL;
1145 : }
1146 0 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
1147 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_object_count));
1148 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size));
1149 0 : NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op));
1150 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info));
1151 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1152 : }
1153 0 : if (ndr_flags & NDR_BUFFERS) {
1154 0 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
1155 0 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
1156 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
1157 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
1158 0 : if (r->uptodateness_vector) {
1159 0 : _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
1160 0 : NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
1161 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
1162 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
1163 : }
1164 : }
1165 0 : return NDR_ERR_SUCCESS;
1166 : }
1167 :
1168 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest5 *r)
1169 : {
1170 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesRequest5");
1171 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1172 0 : ndr->depth++;
1173 0 : ndr_print_GUID(ndr, "destination_dsa_guid", &r->destination_dsa_guid);
1174 0 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
1175 0 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
1176 0 : ndr->depth++;
1177 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
1178 0 : ndr->depth--;
1179 0 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
1180 0 : ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
1181 0 : ndr->depth++;
1182 0 : if (r->uptodateness_vector) {
1183 0 : ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
1184 : }
1185 0 : ndr->depth--;
1186 0 : ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
1187 0 : ndr_print_uint32(ndr, "max_object_count", r->max_object_count);
1188 0 : ndr_print_uint32(ndr, "max_ndr_size", r->max_ndr_size);
1189 0 : ndr_print_drsuapi_DsExtendedOperation(ndr, "extended_op", r->extended_op);
1190 0 : ndr_print_hyper(ndr, "fsmo_info", r->fsmo_info);
1191 0 : ndr->depth--;
1192 : }
1193 :
1194 3306724 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaOID *r)
1195 : {
1196 3306724 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1197 3306724 : if (ndr_flags & NDR_SCALARS) {
1198 1653362 : NDR_CHECK(ndr_push_align(ndr, 5));
1199 1653362 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
1200 1653362 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->binary_oid));
1201 1653362 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1202 : }
1203 3306724 : if (ndr_flags & NDR_BUFFERS) {
1204 1653362 : if (r->binary_oid) {
1205 1653362 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
1206 1653362 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->binary_oid, r->length));
1207 : }
1208 : }
1209 3302568 : return NDR_ERR_SUCCESS;
1210 : }
1211 :
1212 5180470 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaOID *r)
1213 : {
1214 29228 : uint32_t _ptr_binary_oid;
1215 5180470 : uint32_t size_binary_oid_1 = 0;
1216 5180470 : TALLOC_CTX *_mem_save_binary_oid_0 = NULL;
1217 5180470 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1218 5180470 : if (ndr_flags & NDR_SCALARS) {
1219 2590235 : NDR_CHECK(ndr_pull_align(ndr, 5));
1220 2590235 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
1221 2590235 : if (r->length > 10000) {
1222 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->length), (uint32_t)(0), (uint32_t)(10000));
1223 : }
1224 2590235 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_oid));
1225 2590235 : if (_ptr_binary_oid) {
1226 2590235 : NDR_PULL_ALLOC(ndr, r->binary_oid);
1227 : } else {
1228 0 : r->binary_oid = NULL;
1229 : }
1230 2590235 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1231 : }
1232 5180470 : if (ndr_flags & NDR_BUFFERS) {
1233 2590235 : if (r->binary_oid) {
1234 2590235 : _mem_save_binary_oid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1235 2590235 : NDR_PULL_SET_MEM_CTX(ndr, r->binary_oid, 0);
1236 2590235 : NDR_CHECK(ndr_pull_array_size(ndr, &r->binary_oid));
1237 2590235 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->binary_oid, &size_binary_oid_1));
1238 2590235 : NDR_PULL_ALLOC_N(ndr, r->binary_oid, size_binary_oid_1);
1239 2590235 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->binary_oid, size_binary_oid_1));
1240 2590235 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_oid_0, 0);
1241 : }
1242 2590235 : if (r->binary_oid) {
1243 2590235 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->binary_oid, r->length));
1244 : }
1245 : }
1246 5151242 : return NDR_ERR_SUCCESS;
1247 : }
1248 :
1249 3306724 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaOIDMapping *r)
1250 : {
1251 3304646 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1252 3304646 : if (ndr_flags & NDR_SCALARS) {
1253 1653362 : NDR_CHECK(ndr_push_align(ndr, 5));
1254 1653362 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->id_prefix));
1255 1653362 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr, NDR_SCALARS, &r->oid));
1256 1653362 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1257 : }
1258 3304646 : if (ndr_flags & NDR_BUFFERS) {
1259 1653362 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr, NDR_BUFFERS, &r->oid));
1260 : }
1261 3302568 : return NDR_ERR_SUCCESS;
1262 : }
1263 :
1264 5180470 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaOIDMapping *r)
1265 : {
1266 5165856 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1267 5165856 : if (ndr_flags & NDR_SCALARS) {
1268 2590235 : NDR_CHECK(ndr_pull_align(ndr, 5));
1269 2590235 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->id_prefix));
1270 2590235 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr, NDR_SCALARS, &r->oid));
1271 2590235 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1272 : }
1273 5165856 : if (ndr_flags & NDR_BUFFERS) {
1274 2590235 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr, NDR_BUFFERS, &r->oid));
1275 : }
1276 5151242 : return NDR_ERR_SUCCESS;
1277 : }
1278 :
1279 1740 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOIDMapping(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOIDMapping *r)
1280 : {
1281 1740 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaOIDMapping");
1282 1740 : if (r == NULL) { ndr_print_null(ndr); return; }
1283 1740 : ndr->depth++;
1284 1740 : ndr_print_uint32(ndr, "id_prefix", r->id_prefix);
1285 1740 : ndr_print_drsuapi_DsReplicaOID(ndr, "oid", &r->oid);
1286 1740 : ndr->depth--;
1287 : }
1288 :
1289 63304 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaOIDMapping_Ctr *r)
1290 : {
1291 114 : uint32_t cntr_mappings_1;
1292 63304 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1293 63304 : if (ndr_flags & NDR_SCALARS) {
1294 31652 : NDR_CHECK(ndr_push_align(ndr, 5));
1295 31652 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_mappings));
1296 31652 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->mappings));
1297 31652 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1298 : }
1299 63304 : if (ndr_flags & NDR_BUFFERS) {
1300 31652 : if (r->mappings) {
1301 19749 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_mappings));
1302 1673111 : for (cntr_mappings_1 = 0; cntr_mappings_1 < (r->num_mappings); cntr_mappings_1++) {
1303 1653362 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping(ndr, NDR_SCALARS, &r->mappings[cntr_mappings_1]));
1304 : }
1305 1673111 : for (cntr_mappings_1 = 0; cntr_mappings_1 < (r->num_mappings); cntr_mappings_1++) {
1306 1655440 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping(ndr, NDR_BUFFERS, &r->mappings[cntr_mappings_1]));
1307 : }
1308 : }
1309 : }
1310 63190 : return NDR_ERR_SUCCESS;
1311 : }
1312 :
1313 97544 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaOIDMapping_Ctr *r)
1314 : {
1315 738 : uint32_t _ptr_mappings;
1316 97544 : uint32_t size_mappings_1 = 0;
1317 738 : uint32_t cntr_mappings_1;
1318 97544 : TALLOC_CTX *_mem_save_mappings_0 = NULL;
1319 97544 : TALLOC_CTX *_mem_save_mappings_1 = NULL;
1320 97544 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1321 97544 : if (ndr_flags & NDR_SCALARS) {
1322 48772 : NDR_CHECK(ndr_pull_align(ndr, 5));
1323 48772 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_mappings));
1324 48772 : if (r->num_mappings > 1048576) {
1325 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_mappings), (uint32_t)(0), (uint32_t)(1048576));
1326 : }
1327 48772 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_mappings));
1328 48772 : if (_ptr_mappings) {
1329 38973 : NDR_PULL_ALLOC(ndr, r->mappings);
1330 : } else {
1331 9799 : r->mappings = NULL;
1332 : }
1333 48772 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1334 : }
1335 97544 : if (ndr_flags & NDR_BUFFERS) {
1336 48772 : if (r->mappings) {
1337 38973 : _mem_save_mappings_0 = NDR_PULL_GET_MEM_CTX(ndr);
1338 38973 : NDR_PULL_SET_MEM_CTX(ndr, r->mappings, 0);
1339 38973 : NDR_CHECK(ndr_pull_array_size(ndr, &r->mappings));
1340 38973 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->mappings, &size_mappings_1));
1341 38973 : NDR_PULL_ALLOC_N(ndr, r->mappings, size_mappings_1);
1342 38973 : _mem_save_mappings_1 = NDR_PULL_GET_MEM_CTX(ndr);
1343 38973 : NDR_PULL_SET_MEM_CTX(ndr, r->mappings, 0);
1344 2629208 : for (cntr_mappings_1 = 0; cntr_mappings_1 < (size_mappings_1); cntr_mappings_1++) {
1345 2590235 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping(ndr, NDR_SCALARS, &r->mappings[cntr_mappings_1]));
1346 : }
1347 2629208 : for (cntr_mappings_1 = 0; cntr_mappings_1 < (size_mappings_1); cntr_mappings_1++) {
1348 2604849 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping(ndr, NDR_BUFFERS, &r->mappings[cntr_mappings_1]));
1349 : }
1350 38973 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mappings_1, 0);
1351 38973 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mappings_0, 0);
1352 : }
1353 48772 : if (r->mappings) {
1354 38973 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->mappings, r->num_mappings));
1355 : }
1356 2639007 : for (cntr_mappings_1 = 0; cntr_mappings_1 < (size_mappings_1); cntr_mappings_1++) {
1357 14614 : }
1358 : }
1359 96806 : return NDR_ERR_SUCCESS;
1360 : }
1361 :
1362 0 : static void ndr_print_flags_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaOIDMapping_Ctr *r)
1363 : {
1364 0 : ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, name, r);
1365 0 : }
1366 :
1367 41 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOIDMapping_Ctr *r)
1368 : {
1369 1 : uint32_t cntr_mappings_1;
1370 41 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaOIDMapping_Ctr");
1371 41 : if (r == NULL) { ndr_print_null(ndr); return; }
1372 41 : ndr->depth++;
1373 41 : ndr_print_uint32(ndr, "num_mappings", r->num_mappings);
1374 41 : ndr_print_ptr(ndr, "mappings", r->mappings);
1375 41 : ndr->depth++;
1376 41 : if (r->mappings) {
1377 40 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "mappings", (uint32_t)(r->num_mappings));
1378 40 : ndr->depth++;
1379 1780 : for (cntr_mappings_1 = 0; cntr_mappings_1 < (r->num_mappings); cntr_mappings_1++) {
1380 1740 : ndr_print_drsuapi_DsReplicaOIDMapping(ndr, "mappings", &r->mappings[cntr_mappings_1]);
1381 : }
1382 40 : ndr->depth--;
1383 : }
1384 41 : ndr->depth--;
1385 41 : ndr->depth--;
1386 : }
1387 :
1388 39915340 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsAttributeId(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAttributeId r)
1389 : {
1390 : {
1391 39915340 : libndr_flags _flags_save_ENUM = ndr->flags;
1392 39915340 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1393 39915340 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1394 39915340 : ndr->flags = _flags_save_ENUM;
1395 : }
1396 39915340 : return NDR_ERR_SUCCESS;
1397 : }
1398 :
1399 74653121 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsAttributeId(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAttributeId *r)
1400 : {
1401 3324101 : uint32_t v;
1402 : {
1403 74653121 : libndr_flags _flags_save_ENUM = ndr->flags;
1404 74653121 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1405 74653121 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1406 74653121 : *r = v;
1407 74653121 : ndr->flags = _flags_save_ENUM;
1408 : }
1409 74653121 : return NDR_ERR_SUCCESS;
1410 : }
1411 :
1412 213261 : _PUBLIC_ void ndr_print_drsuapi_DsAttributeId(struct ndr_print *ndr, const char *name, enum drsuapi_DsAttributeId r)
1413 : {
1414 213261 : const char *val = NULL;
1415 :
1416 : {
1417 213261 : libndr_flags _flags_save_ENUM = ndr->flags;
1418 213261 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1419 213261 : switch (r) {
1420 14048 : case DRSUAPI_ATTID_objectClass: val = "DRSUAPI_ATTID_objectClass"; break;
1421 305 : case DRSUAPI_ATTID_cn: val = "DRSUAPI_ATTID_cn"; break;
1422 0 : case DRSUAPI_ATTID_ou: val = "DRSUAPI_ATTID_ou"; break;
1423 412 : case DRSUAPI_ATTID_description: val = "DRSUAPI_ATTID_description"; break;
1424 104 : case DRSUAPI_ATTID_member: val = "DRSUAPI_ATTID_member"; break;
1425 0 : case DRSUAPI_ATTID_distinguishedName: val = "DRSUAPI_ATTID_distinguishedName"; break;
1426 14042 : case DRSUAPI_ATTID_instanceType: val = "DRSUAPI_ATTID_instanceType"; break;
1427 14042 : case DRSUAPI_ATTID_whenCreated: val = "DRSUAPI_ATTID_whenCreated"; break;
1428 132 : case DRSUAPI_ATTID_possSuperiors: val = "DRSUAPI_ATTID_possSuperiors"; break;
1429 414 : case DRSUAPI_ATTID_displayName: val = "DRSUAPI_ATTID_displayName"; break;
1430 16 : case DRSUAPI_ATTID_hasMasterNCs: val = "DRSUAPI_ATTID_hasMasterNCs"; break;
1431 20 : case DRSUAPI_ATTID_nCName: val = "DRSUAPI_ATTID_nCName"; break;
1432 936 : case DRSUAPI_ATTID_subClassOf: val = "DRSUAPI_ATTID_subClassOf"; break;
1433 936 : case DRSUAPI_ATTID_governsID: val = "DRSUAPI_ATTID_governsID"; break;
1434 68 : case DRSUAPI_ATTID_mustContain: val = "DRSUAPI_ATTID_mustContain"; break;
1435 208 : case DRSUAPI_ATTID_mayContain: val = "DRSUAPI_ATTID_mayContain"; break;
1436 936 : case DRSUAPI_ATTID_rDNAttId: val = "DRSUAPI_ATTID_rDNAttId"; break;
1437 5268 : case DRSUAPI_ATTID_attributeID: val = "DRSUAPI_ATTID_attributeID"; break;
1438 5268 : case DRSUAPI_ATTID_attributeSyntax: val = "DRSUAPI_ATTID_attributeSyntax"; break;
1439 5268 : case DRSUAPI_ATTID_isSingleValued: val = "DRSUAPI_ATTID_isSingleValued"; break;
1440 1120 : case DRSUAPI_ATTID_rangeLower: val = "DRSUAPI_ATTID_rangeLower"; break;
1441 1436 : case DRSUAPI_ATTID_rangeUpper: val = "DRSUAPI_ATTID_rangeUpper"; break;
1442 8 : case DRSUAPI_ATTID_dMDLocation: val = "DRSUAPI_ATTID_dMDLocation"; break;
1443 390 : case DRSUAPI_ATTID_isDeleted: val = "DRSUAPI_ATTID_isDeleted"; break;
1444 12 : case DRSUAPI_ATTID_objectVersion: val = "DRSUAPI_ATTID_objectVersion"; break;
1445 8 : case DRSUAPI_ATTID_invocationId: val = "DRSUAPI_ATTID_invocationId"; break;
1446 13416 : case DRSUAPI_ATTID_showInAdvancedViewOnly: val = "DRSUAPI_ATTID_showInAdvancedViewOnly"; break;
1447 6192 : case DRSUAPI_ATTID_adminDisplayName: val = "DRSUAPI_ATTID_adminDisplayName"; break;
1448 6192 : case DRSUAPI_ATTID_adminDescription: val = "DRSUAPI_ATTID_adminDescription"; break;
1449 5268 : case DRSUAPI_ATTID_oMSyntax: val = "DRSUAPI_ATTID_oMSyntax"; break;
1450 14046 : case DRSUAPI_ATTID_ntSecurityDescriptor: val = "DRSUAPI_ATTID_ntSecurityDescriptor"; break;
1451 5256 : case DRSUAPI_ATTID_searchFlags: val = "DRSUAPI_ATTID_searchFlags"; break;
1452 16 : case DRSUAPI_ATTID_auxiliaryClass: val = "DRSUAPI_ATTID_auxiliaryClass"; break;
1453 6204 : case DRSUAPI_ATTID_lDAPDisplayName: val = "DRSUAPI_ATTID_lDAPDisplayName"; break;
1454 14042 : case DRSUAPI_ATTID_name: val = "DRSUAPI_ATTID_name"; break;
1455 0 : case DRSUAPI_ATTID_objectGUID: val = "DRSUAPI_ATTID_objectGUID"; break;
1456 2 : case DRSUAPI_ATTID_replPropertyMetaData: val = "DRSUAPI_ATTID_replPropertyMetaData"; break;
1457 454 : case DRSUAPI_ATTID_userAccountControl: val = "DRSUAPI_ATTID_userAccountControl"; break;
1458 0 : case DRSUAPI_ATTID_badPwdCount: val = "DRSUAPI_ATTID_badPwdCount"; break;
1459 454 : case DRSUAPI_ATTID_codePage: val = "DRSUAPI_ATTID_codePage"; break;
1460 454 : case DRSUAPI_ATTID_countryCode: val = "DRSUAPI_ATTID_countryCode"; break;
1461 0 : case DRSUAPI_ATTID_currentValue: val = "DRSUAPI_ATTID_currentValue"; break;
1462 0 : case DRSUAPI_ATTID_homeDirectory: val = "DRSUAPI_ATTID_homeDirectory"; break;
1463 0 : case DRSUAPI_ATTID_homeDrive: val = "DRSUAPI_ATTID_homeDrive"; break;
1464 0 : case DRSUAPI_ATTID_lastLogoff: val = "DRSUAPI_ATTID_lastLogoff"; break;
1465 0 : case DRSUAPI_ATTID_lastLogon: val = "DRSUAPI_ATTID_lastLogon"; break;
1466 454 : case DRSUAPI_ATTID_dBCSPwd: val = "DRSUAPI_ATTID_dBCSPwd"; break;
1467 0 : case DRSUAPI_ATTID_scriptPath: val = "DRSUAPI_ATTID_scriptPath"; break;
1468 454 : case DRSUAPI_ATTID_logonHours: val = "DRSUAPI_ATTID_logonHours"; break;
1469 0 : case DRSUAPI_ATTID_userWorkstations: val = "DRSUAPI_ATTID_userWorkstations"; break;
1470 454 : case DRSUAPI_ATTID_unicodePwd: val = "DRSUAPI_ATTID_unicodePwd"; break;
1471 454 : case DRSUAPI_ATTID_ntPwdHistory: val = "DRSUAPI_ATTID_ntPwdHistory"; break;
1472 454 : case DRSUAPI_ATTID_pwdLastSet: val = "DRSUAPI_ATTID_pwdLastSet"; break;
1473 454 : case DRSUAPI_ATTID_primaryGroupID: val = "DRSUAPI_ATTID_primaryGroupID"; break;
1474 0 : case DRSUAPI_ATTID_priorValue: val = "DRSUAPI_ATTID_priorValue"; break;
1475 302 : case DRSUAPI_ATTID_supplementalCredentials: val = "DRSUAPI_ATTID_supplementalCredentials"; break;
1476 0 : case DRSUAPI_ATTID_trustAuthIncoming: val = "DRSUAPI_ATTID_trustAuthIncoming"; break;
1477 0 : case DRSUAPI_ATTID_trustDirection: val = "DRSUAPI_ATTID_trustDirection"; break;
1478 0 : case DRSUAPI_ATTID_trustPartner: val = "DRSUAPI_ATTID_trustPartner"; break;
1479 0 : case DRSUAPI_ATTID_trustPosixOffset: val = "DRSUAPI_ATTID_trustPosixOffset"; break;
1480 0 : case DRSUAPI_ATTID_trustAuthOutgoing: val = "DRSUAPI_ATTID_trustAuthOutgoing"; break;
1481 0 : case DRSUAPI_ATTID_trustType: val = "DRSUAPI_ATTID_trustType"; break;
1482 0 : case DRSUAPI_ATTID_userParameters: val = "DRSUAPI_ATTID_userParameters"; break;
1483 0 : case DRSUAPI_ATTID_profilePath: val = "DRSUAPI_ATTID_profilePath"; break;
1484 105 : case DRSUAPI_ATTID_operatorCount: val = "DRSUAPI_ATTID_operatorCount"; break;
1485 738 : case DRSUAPI_ATTID_objectSid: val = "DRSUAPI_ATTID_objectSid"; break;
1486 6204 : case DRSUAPI_ATTID_schemaIDGUID: val = "DRSUAPI_ATTID_schemaIDGUID"; break;
1487 157 : case DRSUAPI_ATTID_adminCount: val = "DRSUAPI_ATTID_adminCount"; break;
1488 112 : case DRSUAPI_ATTID_comment: val = "DRSUAPI_ATTID_comment"; break;
1489 454 : case DRSUAPI_ATTID_accountExpires: val = "DRSUAPI_ATTID_accountExpires"; break;
1490 454 : case DRSUAPI_ATTID_lmPwdHistory: val = "DRSUAPI_ATTID_lmPwdHistory"; break;
1491 0 : case DRSUAPI_ATTID_logonCount: val = "DRSUAPI_ATTID_logonCount"; break;
1492 736 : case DRSUAPI_ATTID_systemPossSuperiors: val = "DRSUAPI_ATTID_systemPossSuperiors"; break;
1493 608 : case DRSUAPI_ATTID_systemMayContain: val = "DRSUAPI_ATTID_systemMayContain"; break;
1494 328 : case DRSUAPI_ATTID_systemMustContain: val = "DRSUAPI_ATTID_systemMustContain"; break;
1495 28 : case DRSUAPI_ATTID_systemAuxiliaryClass: val = "DRSUAPI_ATTID_systemAuxiliaryClass"; break;
1496 610 : case DRSUAPI_ATTID_sAMAccountName: val = "DRSUAPI_ATTID_sAMAccountName"; break;
1497 610 : case DRSUAPI_ATTID_sAMAccountType: val = "DRSUAPI_ATTID_sAMAccountType"; break;
1498 12 : case DRSUAPI_ATTID_options: val = "DRSUAPI_ATTID_options"; break;
1499 20 : case DRSUAPI_ATTID_fSMORoleOwner: val = "DRSUAPI_ATTID_fSMORoleOwner"; break;
1500 5872 : case DRSUAPI_ATTID_systemFlags: val = "DRSUAPI_ATTID_systemFlags"; break;
1501 0 : case DRSUAPI_ATTID_trustAttributes: val = "DRSUAPI_ATTID_trustAttributes"; break;
1502 0 : case DRSUAPI_ATTID_trustParent: val = "DRSUAPI_ATTID_trustParent"; break;
1503 0 : case DRSUAPI_ATTID_flatName: val = "DRSUAPI_ATTID_flatName"; break;
1504 6 : case DRSUAPI_ATTID_serverReference: val = "DRSUAPI_ATTID_serverReference"; break;
1505 0 : case DRSUAPI_ATTID_serverReferenceBL: val = "DRSUAPI_ATTID_serverReferenceBL"; break;
1506 0 : case DRSUAPI_ATTID_nonSecurityMember: val = "DRSUAPI_ATTID_nonSecurityMember"; break;
1507 0 : case DRSUAPI_ATTID_initialAuthIncoming: val = "DRSUAPI_ATTID_initialAuthIncoming"; break;
1508 0 : case DRSUAPI_ATTID_initialAuthOutgoing: val = "DRSUAPI_ATTID_initialAuthOutgoing"; break;
1509 8 : case DRSUAPI_ATTID_wellKnownObjects: val = "DRSUAPI_ATTID_wellKnownObjects"; break;
1510 120 : case DRSUAPI_ATTID_dNSHostName: val = "DRSUAPI_ATTID_dNSHostName"; break;
1511 720 : case DRSUAPI_ATTID_isMemberOfPartialAttributeSet: val = "DRSUAPI_ATTID_isMemberOfPartialAttributeSet"; break;
1512 0 : case DRSUAPI_ATTID_managedBy: val = "DRSUAPI_ATTID_managedBy"; break;
1513 32 : case DRSUAPI_ATTID_userPrincipalName: val = "DRSUAPI_ATTID_userPrincipalName"; break;
1514 156 : case DRSUAPI_ATTID_groupType: val = "DRSUAPI_ATTID_groupType"; break;
1515 132 : case DRSUAPI_ATTID_servicePrincipalName: val = "DRSUAPI_ATTID_servicePrincipalName"; break;
1516 382 : case DRSUAPI_ATTID_lastKnownParent: val = "DRSUAPI_ATTID_lastKnownParent"; break;
1517 14046 : case DRSUAPI_ATTID_objectCategory: val = "DRSUAPI_ATTID_objectCategory"; break;
1518 8 : case DRSUAPI_ATTID_gPLink: val = "DRSUAPI_ATTID_gPLink"; break;
1519 8 : case DRSUAPI_ATTID_transportAddressAttribute: val = "DRSUAPI_ATTID_transportAddressAttribute"; break;
1520 4 : case DRSUAPI_ATTID_schemaInfo: val = "DRSUAPI_ATTID_schemaInfo"; break;
1521 20 : case DRSUAPI_ATTID_msDS_Behavior_Version: val = "DRSUAPI_ATTID_msDS_Behavior_Version"; break;
1522 0 : case DRSUAPI_ATTID_msDS_TrustForestTrustInfo: val = "DRSUAPI_ATTID_msDS_TrustForestTrustInfo"; break;
1523 0 : case DRSUAPI_ATTID_msDS_KeyVersionNumber: val = "DRSUAPI_ATTID_msDS_KeyVersionNumber"; break;
1524 0 : case DRSUAPI_ATTID_msDS_NonMembers: val = "DRSUAPI_ATTID_msDS_NonMembers"; break;
1525 0 : case DRSUAPI_ATTID_msDS_MembersForAzRole: val = "DRSUAPI_ATTID_msDS_MembersForAzRole"; break;
1526 8 : case DRSUAPI_ATTID_msDS_HasDomainNCs: val = "DRSUAPI_ATTID_msDS_HasDomainNCs"; break;
1527 24 : case DRSUAPI_ATTID_msDS_hasMasterNCs: val = "DRSUAPI_ATTID_msDS_hasMasterNCs"; break;
1528 0 : case DRSUAPI_ATTID_msDS_NeverRevealGroup: val = "DRSUAPI_ATTID_msDS_NeverRevealGroup"; break;
1529 0 : case DRSUAPI_ATTID_msDS_RevealOnDemandGroup: val = "DRSUAPI_ATTID_msDS_RevealOnDemandGroup"; break;
1530 116 : case DRSUAPI_ATTID_msDS_SupportedEncryptionTypes: val = "DRSUAPI_ATTID_msDS_SupportedEncryptionTypes"; break;
1531 0 : case DRSUAPI_ATTID_msDS_HostServiceAccount: val = "DRSUAPI_ATTID_msDS_HostServiceAccount"; break;
1532 382 : case DRSUAPI_ATTID_isRecycled: val = "DRSUAPI_ATTID_isRecycled"; break;
1533 0 : case DRSUAPI_ATTID_INVALID: val = "DRSUAPI_ATTID_INVALID"; break;
1534 : }
1535 213261 : ndr_print_enum(ndr, name, "ENUM", val, r);
1536 213261 : ndr->flags = _flags_save_ENUM;
1537 : }
1538 213261 : }
1539 :
1540 5404 : static enum ndr_err_code ndr_push_drsuapi_DsPartialAttributeSet(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsPartialAttributeSet *r)
1541 : {
1542 0 : uint32_t cntr_attids_0;
1543 5404 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1544 5404 : if (ndr_flags & NDR_SCALARS) {
1545 5404 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_attids));
1546 5404 : NDR_CHECK(ndr_push_align(ndr, 4));
1547 5404 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
1548 5404 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1549 5404 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_attids));
1550 3067982 : for (cntr_attids_0 = 0; cntr_attids_0 < (r->num_attids); cntr_attids_0++) {
1551 3062578 : NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attids[cntr_attids_0]));
1552 : }
1553 5404 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1554 : }
1555 5404 : if (ndr_flags & NDR_BUFFERS) {
1556 0 : }
1557 5404 : return NDR_ERR_SUCCESS;
1558 : }
1559 :
1560 5436 : static enum ndr_err_code ndr_pull_drsuapi_DsPartialAttributeSet(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsPartialAttributeSet *r)
1561 : {
1562 5436 : uint32_t size_attids_0 = 0;
1563 0 : uint32_t cntr_attids_0;
1564 5436 : TALLOC_CTX *_mem_save_attids_0 = NULL;
1565 5436 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1566 5436 : if (ndr_flags & NDR_SCALARS) {
1567 5436 : NDR_CHECK(ndr_pull_array_size(ndr, &r->attids));
1568 5436 : NDR_CHECK(ndr_pull_align(ndr, 4));
1569 5436 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1570 5436 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
1571 5436 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_attids));
1572 5436 : if (r->num_attids < 1 || r->num_attids > 1048576) {
1573 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_attids), (uint32_t)(1), (uint32_t)(1048576));
1574 : }
1575 5436 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attids, &size_attids_0));
1576 5436 : NDR_PULL_ALLOC_N(ndr, r->attids, size_attids_0);
1577 5436 : _mem_save_attids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1578 5436 : NDR_PULL_SET_MEM_CTX(ndr, r->attids, 0);
1579 3068110 : for (cntr_attids_0 = 0; cntr_attids_0 < (size_attids_0); cntr_attids_0++) {
1580 3062674 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attids[cntr_attids_0]));
1581 : }
1582 5436 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attids_0, 0);
1583 5436 : if (r->attids) {
1584 5436 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->attids, r->num_attids));
1585 : }
1586 5436 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1587 : }
1588 5436 : if (ndr_flags & NDR_BUFFERS) {
1589 0 : }
1590 5436 : return NDR_ERR_SUCCESS;
1591 : }
1592 :
1593 0 : _PUBLIC_ void ndr_print_drsuapi_DsPartialAttributeSet(struct ndr_print *ndr, const char *name, const struct drsuapi_DsPartialAttributeSet *r)
1594 : {
1595 0 : uint32_t cntr_attids_0;
1596 0 : ndr_print_struct(ndr, name, "drsuapi_DsPartialAttributeSet");
1597 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1598 0 : ndr->depth++;
1599 0 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->version);
1600 0 : ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
1601 0 : ndr_print_uint32(ndr, "num_attids", r->num_attids);
1602 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "attids", (uint32_t)(r->num_attids));
1603 0 : ndr->depth++;
1604 0 : for (cntr_attids_0 = 0; cntr_attids_0 < (r->num_attids); cntr_attids_0++) {
1605 0 : ndr_print_drsuapi_DsAttributeId(ndr, "attids", r->attids[cntr_attids_0]);
1606 : }
1607 0 : ndr->depth--;
1608 0 : ndr->depth--;
1609 : }
1610 :
1611 6560 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest8(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesRequest8 *r)
1612 : {
1613 6560 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1614 6560 : if (ndr_flags & NDR_SCALARS) {
1615 3280 : if (r->naming_context == NULL) {
1616 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1617 : }
1618 3280 : NDR_CHECK(ndr_push_align(ndr, 8));
1619 3280 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
1620 3280 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
1621 3280 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
1622 3280 : NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1623 3280 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
1624 3280 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
1625 3280 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_object_count));
1626 3280 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size));
1627 3280 : NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op));
1628 3280 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info));
1629 3280 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set));
1630 3280 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set_ex));
1631 3280 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
1632 3280 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1633 : }
1634 6560 : if (ndr_flags & NDR_BUFFERS) {
1635 3280 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
1636 3280 : if (r->uptodateness_vector) {
1637 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
1638 : }
1639 3280 : if (r->partial_attribute_set) {
1640 2840 : NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
1641 : }
1642 3280 : if (r->partial_attribute_set_ex) {
1643 3 : NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
1644 : }
1645 3280 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
1646 : }
1647 6560 : return NDR_ERR_SUCCESS;
1648 : }
1649 :
1650 6624 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest8(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesRequest8 *r)
1651 : {
1652 0 : uint32_t _ptr_naming_context;
1653 6624 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
1654 0 : uint32_t _ptr_uptodateness_vector;
1655 6624 : TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
1656 0 : uint32_t _ptr_partial_attribute_set;
1657 6624 : TALLOC_CTX *_mem_save_partial_attribute_set_0 = NULL;
1658 0 : uint32_t _ptr_partial_attribute_set_ex;
1659 6624 : TALLOC_CTX *_mem_save_partial_attribute_set_ex_0 = NULL;
1660 6624 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1661 6624 : if (ndr_flags & NDR_SCALARS) {
1662 3312 : NDR_CHECK(ndr_pull_align(ndr, 8));
1663 3312 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
1664 3312 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
1665 3312 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
1666 3312 : if (_ptr_naming_context) {
1667 3312 : NDR_PULL_ALLOC(ndr, r->naming_context);
1668 : } else {
1669 0 : r->naming_context = NULL;
1670 : }
1671 3312 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1672 3312 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
1673 3312 : if (_ptr_uptodateness_vector) {
1674 0 : NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
1675 : } else {
1676 3312 : r->uptodateness_vector = NULL;
1677 : }
1678 3312 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
1679 3312 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_object_count));
1680 3312 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size));
1681 3312 : NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op));
1682 3312 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info));
1683 3312 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set));
1684 3312 : if (_ptr_partial_attribute_set) {
1685 2872 : NDR_PULL_ALLOC(ndr, r->partial_attribute_set);
1686 : } else {
1687 440 : r->partial_attribute_set = NULL;
1688 : }
1689 3312 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set_ex));
1690 3312 : if (_ptr_partial_attribute_set_ex) {
1691 3 : NDR_PULL_ALLOC(ndr, r->partial_attribute_set_ex);
1692 : } else {
1693 3309 : r->partial_attribute_set_ex = NULL;
1694 : }
1695 3312 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
1696 3312 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1697 : }
1698 6624 : if (ndr_flags & NDR_BUFFERS) {
1699 3312 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
1700 3312 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
1701 3312 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
1702 3312 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
1703 3312 : if (r->uptodateness_vector) {
1704 0 : _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
1705 0 : NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
1706 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
1707 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
1708 : }
1709 3312 : if (r->partial_attribute_set) {
1710 2872 : _mem_save_partial_attribute_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
1711 2872 : NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set, 0);
1712 2872 : NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
1713 2872 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_0, 0);
1714 : }
1715 3312 : if (r->partial_attribute_set_ex) {
1716 3 : _mem_save_partial_attribute_set_ex_0 = NDR_PULL_GET_MEM_CTX(ndr);
1717 3 : NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set_ex, 0);
1718 3 : NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
1719 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_ex_0, 0);
1720 : }
1721 3312 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
1722 : }
1723 6624 : return NDR_ERR_SUCCESS;
1724 : }
1725 :
1726 0 : static void ndr_print_flags_drsuapi_DsGetNCChangesRequest8(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesRequest8 *r)
1727 : {
1728 0 : ndr_print_drsuapi_DsGetNCChangesRequest8(ndr, name, r);
1729 0 : }
1730 :
1731 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest8(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest8 *r)
1732 : {
1733 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesRequest8");
1734 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1735 0 : ndr->depth++;
1736 0 : ndr_print_GUID(ndr, "destination_dsa_guid", &r->destination_dsa_guid);
1737 0 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
1738 0 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
1739 0 : ndr->depth++;
1740 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
1741 0 : ndr->depth--;
1742 0 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
1743 0 : ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
1744 0 : ndr->depth++;
1745 0 : if (r->uptodateness_vector) {
1746 0 : ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
1747 : }
1748 0 : ndr->depth--;
1749 0 : ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
1750 0 : ndr_print_uint32(ndr, "max_object_count", r->max_object_count);
1751 0 : ndr_print_uint32(ndr, "max_ndr_size", r->max_ndr_size);
1752 0 : ndr_print_drsuapi_DsExtendedOperation(ndr, "extended_op", r->extended_op);
1753 0 : ndr_print_hyper(ndr, "fsmo_info", r->fsmo_info);
1754 0 : ndr_print_ptr(ndr, "partial_attribute_set", r->partial_attribute_set);
1755 0 : ndr->depth++;
1756 0 : if (r->partial_attribute_set) {
1757 0 : ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set", r->partial_attribute_set);
1758 : }
1759 0 : ndr->depth--;
1760 0 : ndr_print_ptr(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
1761 0 : ndr->depth++;
1762 0 : if (r->partial_attribute_set_ex) {
1763 0 : ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
1764 : }
1765 0 : ndr->depth--;
1766 0 : ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
1767 0 : ndr->depth--;
1768 : }
1769 :
1770 13570 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest10(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesRequest10 *r)
1771 : {
1772 13570 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1773 13570 : if (ndr_flags & NDR_SCALARS) {
1774 6785 : if (r->naming_context == NULL) {
1775 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1776 : }
1777 6785 : NDR_CHECK(ndr_push_align(ndr, 8));
1778 6785 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
1779 6785 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
1780 6785 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
1781 6785 : NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1782 6785 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
1783 6785 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
1784 6785 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_object_count));
1785 6785 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size));
1786 6785 : NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op));
1787 6785 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info));
1788 6785 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set));
1789 6785 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set_ex));
1790 6785 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
1791 6785 : NDR_CHECK(ndr_push_drsuapi_DrsMoreOptions(ndr, NDR_SCALARS, r->more_flags));
1792 6785 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1793 : }
1794 13570 : if (ndr_flags & NDR_BUFFERS) {
1795 6785 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
1796 6785 : if (r->uptodateness_vector) {
1797 4380 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
1798 : }
1799 6785 : if (r->partial_attribute_set) {
1800 2561 : NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
1801 : }
1802 6785 : if (r->partial_attribute_set_ex) {
1803 0 : NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
1804 : }
1805 6785 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
1806 : }
1807 13570 : return NDR_ERR_SUCCESS;
1808 : }
1809 :
1810 13570 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest10(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesRequest10 *r)
1811 : {
1812 0 : uint32_t _ptr_naming_context;
1813 13570 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
1814 0 : uint32_t _ptr_uptodateness_vector;
1815 13570 : TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
1816 0 : uint32_t _ptr_partial_attribute_set;
1817 13570 : TALLOC_CTX *_mem_save_partial_attribute_set_0 = NULL;
1818 0 : uint32_t _ptr_partial_attribute_set_ex;
1819 13570 : TALLOC_CTX *_mem_save_partial_attribute_set_ex_0 = NULL;
1820 13570 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1821 13570 : if (ndr_flags & NDR_SCALARS) {
1822 6785 : NDR_CHECK(ndr_pull_align(ndr, 8));
1823 6785 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
1824 6785 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
1825 6785 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
1826 6785 : if (_ptr_naming_context) {
1827 6785 : NDR_PULL_ALLOC(ndr, r->naming_context);
1828 : } else {
1829 0 : r->naming_context = NULL;
1830 : }
1831 6785 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1832 6785 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
1833 6785 : if (_ptr_uptodateness_vector) {
1834 4380 : NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
1835 : } else {
1836 2405 : r->uptodateness_vector = NULL;
1837 : }
1838 6785 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
1839 6785 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_object_count));
1840 6785 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size));
1841 6785 : NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op));
1842 6785 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info));
1843 6785 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set));
1844 6785 : if (_ptr_partial_attribute_set) {
1845 2561 : NDR_PULL_ALLOC(ndr, r->partial_attribute_set);
1846 : } else {
1847 4224 : r->partial_attribute_set = NULL;
1848 : }
1849 6785 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set_ex));
1850 6785 : if (_ptr_partial_attribute_set_ex) {
1851 0 : NDR_PULL_ALLOC(ndr, r->partial_attribute_set_ex);
1852 : } else {
1853 6785 : r->partial_attribute_set_ex = NULL;
1854 : }
1855 6785 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
1856 6785 : NDR_CHECK(ndr_pull_drsuapi_DrsMoreOptions(ndr, NDR_SCALARS, &r->more_flags));
1857 6785 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1858 : }
1859 13570 : if (ndr_flags & NDR_BUFFERS) {
1860 6785 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
1861 6785 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
1862 6785 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
1863 6785 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
1864 6785 : if (r->uptodateness_vector) {
1865 4380 : _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
1866 4380 : NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
1867 4380 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
1868 4380 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
1869 : }
1870 6785 : if (r->partial_attribute_set) {
1871 2561 : _mem_save_partial_attribute_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
1872 2561 : NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set, 0);
1873 2561 : NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
1874 2561 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_0, 0);
1875 : }
1876 6785 : if (r->partial_attribute_set_ex) {
1877 0 : _mem_save_partial_attribute_set_ex_0 = NDR_PULL_GET_MEM_CTX(ndr);
1878 0 : NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set_ex, 0);
1879 0 : NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
1880 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_ex_0, 0);
1881 : }
1882 6785 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
1883 : }
1884 13570 : return NDR_ERR_SUCCESS;
1885 : }
1886 :
1887 0 : static void ndr_print_flags_drsuapi_DsGetNCChangesRequest10(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesRequest10 *r)
1888 : {
1889 0 : ndr_print_drsuapi_DsGetNCChangesRequest10(ndr, name, r);
1890 0 : }
1891 :
1892 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest10(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest10 *r)
1893 : {
1894 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesRequest10");
1895 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1896 0 : ndr->depth++;
1897 0 : ndr_print_GUID(ndr, "destination_dsa_guid", &r->destination_dsa_guid);
1898 0 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
1899 0 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
1900 0 : ndr->depth++;
1901 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
1902 0 : ndr->depth--;
1903 0 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
1904 0 : ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
1905 0 : ndr->depth++;
1906 0 : if (r->uptodateness_vector) {
1907 0 : ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
1908 : }
1909 0 : ndr->depth--;
1910 0 : ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
1911 0 : ndr_print_uint32(ndr, "max_object_count", r->max_object_count);
1912 0 : ndr_print_uint32(ndr, "max_ndr_size", r->max_ndr_size);
1913 0 : ndr_print_drsuapi_DsExtendedOperation(ndr, "extended_op", r->extended_op);
1914 0 : ndr_print_hyper(ndr, "fsmo_info", r->fsmo_info);
1915 0 : ndr_print_ptr(ndr, "partial_attribute_set", r->partial_attribute_set);
1916 0 : ndr->depth++;
1917 0 : if (r->partial_attribute_set) {
1918 0 : ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set", r->partial_attribute_set);
1919 : }
1920 0 : ndr->depth--;
1921 0 : ndr_print_ptr(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
1922 0 : ndr->depth++;
1923 0 : if (r->partial_attribute_set_ex) {
1924 0 : ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
1925 : }
1926 0 : ndr->depth--;
1927 0 : ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
1928 0 : ndr_print_drsuapi_DrsMoreOptions(ndr, "more_flags", r->more_flags);
1929 0 : ndr->depth--;
1930 : }
1931 :
1932 10065 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetNCChangesRequest *r)
1933 : {
1934 0 : uint32_t level;
1935 10065 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1936 10065 : if (ndr_flags & NDR_SCALARS) {
1937 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1938 10065 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1939 10065 : NDR_CHECK(ndr_push_union_align(ndr, 8));
1940 10065 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1941 10065 : NDR_CHECK(ndr_push_union_align(ndr, 8));
1942 10065 : switch (level) {
1943 0 : case 5: {
1944 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr, NDR_SCALARS, &r->req5));
1945 0 : break; }
1946 :
1947 3280 : case 8: {
1948 3280 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest8(ndr, NDR_SCALARS, &r->req8));
1949 3280 : break; }
1950 :
1951 6785 : case 10: {
1952 6785 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest10(ndr, NDR_SCALARS, &r->req10));
1953 6785 : break; }
1954 :
1955 0 : default:
1956 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
1957 : }
1958 : }
1959 10065 : if (ndr_flags & NDR_BUFFERS) {
1960 10065 : if (!(ndr_flags & NDR_SCALARS)) {
1961 : /* We didn't get it above, and the token is not needed after this. */
1962 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1963 : }
1964 10065 : switch (level) {
1965 0 : case 5:
1966 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr, NDR_BUFFERS, &r->req5));
1967 0 : break;
1968 :
1969 3280 : case 8:
1970 3280 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest8(ndr, NDR_BUFFERS, &r->req8));
1971 3280 : break;
1972 :
1973 6785 : case 10:
1974 6785 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest10(ndr, NDR_BUFFERS, &r->req10));
1975 6785 : break;
1976 :
1977 0 : default:
1978 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
1979 : }
1980 : }
1981 10065 : return NDR_ERR_SUCCESS;
1982 : }
1983 :
1984 10097 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetNCChangesRequest *r)
1985 : {
1986 0 : uint32_t level;
1987 0 : uint32_t _level;
1988 10097 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1989 10097 : if (ndr_flags & NDR_SCALARS) {
1990 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1991 10097 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1992 10097 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
1993 10097 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1994 10097 : if (_level != level) {
1995 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
1996 : }
1997 10097 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
1998 10097 : switch (level) {
1999 0 : case 5: {
2000 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr, NDR_SCALARS, &r->req5));
2001 0 : break; }
2002 :
2003 3312 : case 8: {
2004 3312 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest8(ndr, NDR_SCALARS, &r->req8));
2005 3312 : break; }
2006 :
2007 6785 : case 10: {
2008 6785 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest10(ndr, NDR_SCALARS, &r->req10));
2009 6785 : break; }
2010 :
2011 0 : default:
2012 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
2013 : }
2014 : }
2015 10097 : if (ndr_flags & NDR_BUFFERS) {
2016 10097 : if (!(ndr_flags & NDR_SCALARS)) {
2017 : /* We didn't get it above, and the token is not needed after this. */
2018 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2019 : }
2020 10097 : switch (level) {
2021 0 : case 5:
2022 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr, NDR_BUFFERS, &r->req5));
2023 0 : break;
2024 :
2025 3312 : case 8:
2026 3312 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest8(ndr, NDR_BUFFERS, &r->req8));
2027 3312 : break;
2028 :
2029 6785 : case 10:
2030 6785 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest10(ndr, NDR_BUFFERS, &r->req10));
2031 6785 : break;
2032 :
2033 0 : default:
2034 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
2035 : }
2036 : }
2037 10097 : return NDR_ERR_SUCCESS;
2038 : }
2039 :
2040 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesRequest *r)
2041 : {
2042 0 : uint32_t level;
2043 0 : level = ndr_print_steal_switch_value(ndr, r);
2044 0 : ndr_print_union(ndr, name, level, "drsuapi_DsGetNCChangesRequest");
2045 0 : switch (level) {
2046 0 : case 5:
2047 0 : ndr_print_drsuapi_DsGetNCChangesRequest5(ndr, "req5", &r->req5);
2048 0 : break;
2049 :
2050 0 : case 8:
2051 0 : ndr_print_drsuapi_DsGetNCChangesRequest8(ndr, "req8", &r->req8);
2052 0 : break;
2053 :
2054 0 : case 10:
2055 0 : ndr_print_drsuapi_DsGetNCChangesRequest10(ndr, "req10", &r->req10);
2056 0 : break;
2057 :
2058 0 : default:
2059 0 : ndr_print_bad_level(ndr, name, level);
2060 : }
2061 0 : }
2062 :
2063 13239 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor2 *r)
2064 : {
2065 13239 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2066 13239 : if (ndr_flags & NDR_SCALARS) {
2067 13239 : NDR_CHECK(ndr_push_align(ndr, 8));
2068 13239 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
2069 13239 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
2070 13239 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_sync_success));
2071 13239 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2072 : }
2073 13239 : if (ndr_flags & NDR_BUFFERS) {
2074 0 : }
2075 13239 : return NDR_ERR_SUCCESS;
2076 : }
2077 :
2078 20969 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor2 *r)
2079 : {
2080 20969 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2081 20969 : if (ndr_flags & NDR_SCALARS) {
2082 20969 : NDR_CHECK(ndr_pull_align(ndr, 8));
2083 20969 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
2084 20969 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
2085 20969 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_sync_success));
2086 20969 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2087 : }
2088 20969 : if (ndr_flags & NDR_BUFFERS) {
2089 0 : }
2090 20969 : return NDR_ERR_SUCCESS;
2091 : }
2092 :
2093 0 : static void ndr_print_flags_drsuapi_DsReplicaCursor2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaCursor2 *r)
2094 : {
2095 0 : ndr_print_drsuapi_DsReplicaCursor2(ndr, name, r);
2096 0 : }
2097 :
2098 12 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2 *r)
2099 : {
2100 12 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor2");
2101 12 : if (r == NULL) { ndr_print_null(ndr); return; }
2102 12 : ndr->depth++;
2103 12 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
2104 12 : ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
2105 12 : ndr_print_NTTIME(ndr, "last_sync_success", r->last_sync_success);
2106 12 : ndr->depth--;
2107 : }
2108 :
2109 5364 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2CtrEx(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor2CtrEx *r)
2110 : {
2111 0 : uint32_t cntr_cursors_0;
2112 5364 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2113 5364 : if (ndr_flags & NDR_SCALARS) {
2114 5364 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2115 5364 : NDR_CHECK(ndr_push_align(ndr, 8));
2116 5364 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
2117 5364 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2118 5364 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2119 5364 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2120 14864 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
2121 9500 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
2122 : }
2123 5364 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2124 : }
2125 5364 : if (ndr_flags & NDR_BUFFERS) {
2126 0 : }
2127 5364 : return NDR_ERR_SUCCESS;
2128 : }
2129 :
2130 2676 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2CtrEx(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor2CtrEx *r)
2131 : {
2132 2676 : uint32_t size_cursors_0 = 0;
2133 0 : uint32_t cntr_cursors_0;
2134 2676 : TALLOC_CTX *_mem_save_cursors_0 = NULL;
2135 2676 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2136 2676 : if (ndr_flags & NDR_SCALARS) {
2137 2676 : NDR_CHECK(ndr_pull_array_size(ndr, &r->cursors));
2138 2676 : NDR_CHECK(ndr_pull_align(ndr, 8));
2139 2676 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2140 2676 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
2141 2676 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2142 2676 : if (r->count > 1048576) {
2143 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(1048576));
2144 : }
2145 2676 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
2146 2676 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cursors, &size_cursors_0));
2147 2676 : NDR_PULL_ALLOC_N(ndr, r->cursors, size_cursors_0);
2148 2676 : _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
2149 2676 : NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
2150 7420 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (size_cursors_0); cntr_cursors_0++) {
2151 4744 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
2152 : }
2153 2676 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
2154 2676 : if (r->cursors) {
2155 2676 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cursors, r->count));
2156 : }
2157 2676 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2158 : }
2159 2676 : if (ndr_flags & NDR_BUFFERS) {
2160 0 : }
2161 2676 : return NDR_ERR_SUCCESS;
2162 : }
2163 :
2164 12 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor2CtrEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2CtrEx *r)
2165 : {
2166 0 : uint32_t cntr_cursors_0;
2167 12 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor2CtrEx");
2168 12 : if (r == NULL) { ndr_print_null(ndr); return; }
2169 12 : ndr->depth++;
2170 12 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->version);
2171 12 : ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
2172 12 : ndr_print_uint32(ndr, "count", r->count);
2173 12 : ndr_print_uint32(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
2174 12 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "cursors", (uint32_t)(r->count));
2175 12 : ndr->depth++;
2176 24 : for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
2177 12 : ndr_print_drsuapi_DsReplicaCursor2(ndr, "cursors", &r->cursors[cntr_cursors_0]);
2178 : }
2179 12 : ndr->depth--;
2180 12 : ndr->depth--;
2181 : }
2182 :
2183 37303582 : static enum ndr_err_code ndr_push_drsuapi_DsAttributeValue(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAttributeValue *r)
2184 : {
2185 37303582 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2186 37303582 : if (ndr_flags & NDR_SCALARS) {
2187 18651791 : NDR_CHECK(ndr_push_align(ndr, 5));
2188 18651791 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_DATA_BLOB(0, r->blob, 0)));
2189 18651791 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->blob));
2190 18651791 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2191 : }
2192 37303582 : if (ndr_flags & NDR_BUFFERS) {
2193 18651791 : if (r->blob) {
2194 18651790 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->blob));
2195 : }
2196 : }
2197 37303550 : return NDR_ERR_SUCCESS;
2198 : }
2199 :
2200 18380796 : static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValue(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAttributeValue *r)
2201 : {
2202 126 : uint32_t _ptr_blob;
2203 18380796 : TALLOC_CTX *_mem_save_blob_0 = NULL;
2204 18380796 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2205 18380796 : if (ndr_flags & NDR_SCALARS) {
2206 9190398 : NDR_CHECK(ndr_pull_align(ndr, 5));
2207 9190398 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
2208 9190398 : if (r->__ndr_size > 26214400) {
2209 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->__ndr_size), (uint32_t)(0), (uint32_t)(26214400));
2210 : }
2211 9190398 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_blob));
2212 9190398 : if (_ptr_blob) {
2213 9190395 : NDR_PULL_ALLOC(ndr, r->blob);
2214 : } else {
2215 3 : r->blob = NULL;
2216 : }
2217 9190398 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2218 : }
2219 18380796 : if (ndr_flags & NDR_BUFFERS) {
2220 9190398 : if (r->blob) {
2221 9190395 : _mem_save_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
2222 9190395 : NDR_PULL_SET_MEM_CTX(ndr, r->blob, 0);
2223 9190395 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
2224 9190395 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_blob_0, 0);
2225 : }
2226 : }
2227 18380670 : return NDR_ERR_SUCCESS;
2228 : }
2229 :
2230 188150 : _PUBLIC_ void ndr_print_drsuapi_DsAttributeValue(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAttributeValue *r)
2231 : {
2232 188150 : ndr_print_struct(ndr, name, "drsuapi_DsAttributeValue");
2233 188150 : if (r == NULL) { ndr_print_null(ndr); return; }
2234 188150 : ndr->depth++;
2235 188150 : ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_DATA_BLOB(0, r->blob, 0):r->__ndr_size);
2236 188150 : ndr_print_ptr(ndr, "blob", r->blob);
2237 188150 : ndr->depth++;
2238 188150 : if (r->blob) {
2239 188150 : ndr_print_DATA_BLOB(ndr, "blob", *r->blob);
2240 : }
2241 188150 : ndr->depth--;
2242 188150 : ndr->depth--;
2243 : }
2244 :
2245 31879926 : static enum ndr_err_code ndr_push_drsuapi_DsAttributeValueCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAttributeValueCtr *r)
2246 : {
2247 24 : uint32_t cntr_values_1;
2248 31879926 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2249 31879926 : if (ndr_flags & NDR_SCALARS) {
2250 15939963 : NDR_CHECK(ndr_push_align(ndr, 5));
2251 15939963 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_values));
2252 15939963 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->values));
2253 15939963 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2254 : }
2255 31879926 : if (ndr_flags & NDR_BUFFERS) {
2256 15939963 : if (r->values) {
2257 14282479 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_values));
2258 32891324 : for (cntr_values_1 = 0; cntr_values_1 < (r->num_values); cntr_values_1++) {
2259 18608845 : NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->values[cntr_values_1]));
2260 : }
2261 32891324 : for (cntr_values_1 = 0; cntr_values_1 < (r->num_values); cntr_values_1++) {
2262 18608845 : NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->values[cntr_values_1]));
2263 : }
2264 : }
2265 : }
2266 31879902 : return NDR_ERR_SUCCESS;
2267 : }
2268 :
2269 15734754 : static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValueCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAttributeValueCtr *r)
2270 : {
2271 94 : uint32_t _ptr_values;
2272 15734754 : uint32_t size_values_1 = 0;
2273 94 : uint32_t cntr_values_1;
2274 15734754 : TALLOC_CTX *_mem_save_values_0 = NULL;
2275 15734754 : TALLOC_CTX *_mem_save_values_1 = NULL;
2276 15734754 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2277 15734754 : if (ndr_flags & NDR_SCALARS) {
2278 7867377 : NDR_CHECK(ndr_pull_align(ndr, 5));
2279 7867377 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_values));
2280 7867377 : if (r->num_values > 10485760) {
2281 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_values), (uint32_t)(0), (uint32_t)(10485760));
2282 : }
2283 7867377 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_values));
2284 7867377 : if (_ptr_values) {
2285 7040014 : NDR_PULL_ALLOC(ndr, r->values);
2286 : } else {
2287 827363 : r->values = NULL;
2288 : }
2289 7867377 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2290 : }
2291 15734754 : if (ndr_flags & NDR_BUFFERS) {
2292 7867377 : if (r->values) {
2293 7040014 : _mem_save_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
2294 7040014 : NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
2295 7040014 : NDR_CHECK(ndr_pull_array_size(ndr, &r->values));
2296 7040014 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->values, &size_values_1));
2297 7040014 : NDR_PULL_ALLOC_N(ndr, r->values, size_values_1);
2298 7040014 : _mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
2299 7040014 : NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
2300 16209030 : for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
2301 9169016 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->values[cntr_values_1]));
2302 : }
2303 16209030 : for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
2304 9169016 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->values[cntr_values_1]));
2305 : }
2306 7040014 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_1, 0);
2307 7040014 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_0, 0);
2308 : }
2309 7867377 : if (r->values) {
2310 7040014 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->values, r->num_values));
2311 : }
2312 17036393 : for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
2313 63 : }
2314 : }
2315 15734660 : return NDR_ERR_SUCCESS;
2316 : }
2317 :
2318 0 : _PUBLIC_ void ndr_print_drsuapi_DsAttributeValueCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAttributeValueCtr *r)
2319 : {
2320 0 : uint32_t cntr_values_1;
2321 0 : ndr_print_struct(ndr, name, "drsuapi_DsAttributeValueCtr");
2322 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2323 0 : ndr->depth++;
2324 0 : ndr_print_uint32(ndr, "num_values", r->num_values);
2325 0 : ndr_print_ptr(ndr, "values", r->values);
2326 0 : ndr->depth++;
2327 0 : if (r->values) {
2328 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "values", (uint32_t)(r->num_values));
2329 0 : ndr->depth++;
2330 0 : for (cntr_values_1 = 0; cntr_values_1 < (r->num_values); cntr_values_1++) {
2331 0 : ndr_print_drsuapi_DsAttributeValue(ndr, "values", &r->values[cntr_values_1]);
2332 : }
2333 0 : ndr->depth--;
2334 : }
2335 0 : ndr->depth--;
2336 0 : ndr->depth--;
2337 : }
2338 :
2339 1252748 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3 *r)
2340 : {
2341 1252748 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2342 1252748 : if (ndr_flags & NDR_SCALARS) {
2343 1252748 : NDR_CHECK(ndr_push_align(ndr, 4));
2344 1252748 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags)));
2345 1252748 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
2346 1252748 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
2347 1252748 : NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
2348 1252748 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn)));
2349 1252748 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16));
2350 1252748 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2351 : }
2352 1252748 : if (ndr_flags & NDR_BUFFERS) {
2353 1252748 : NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
2354 : }
2355 1252741 : return NDR_ERR_SUCCESS;
2356 : }
2357 :
2358 742012 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectIdentifier3 *r)
2359 : {
2360 742012 : uint32_t size_dn_0 = 0;
2361 742012 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2362 742012 : if (ndr_flags & NDR_SCALARS) {
2363 742012 : NDR_CHECK(ndr_pull_align(ndr, 4));
2364 742012 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
2365 742012 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_sid));
2366 742012 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
2367 742012 : NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
2368 742012 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_dn));
2369 742012 : size_dn_0 = r->__ndr_size_dn + 1;
2370 742012 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dn, size_dn_0, sizeof(uint16_t), CH_UTF16));
2371 742012 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2372 : }
2373 742012 : if (ndr_flags & NDR_BUFFERS) {
2374 742012 : NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
2375 : }
2376 742010 : return NDR_ERR_SUCCESS;
2377 : }
2378 :
2379 0 : static void ndr_print_flags_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObjectIdentifier3 *r)
2380 : {
2381 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier3(ndr, name, r);
2382 0 : }
2383 :
2384 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier3 *r)
2385 : {
2386 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier3");
2387 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2388 0 : ndr->depth++;
2389 0 : ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags):r->__ndr_size);
2390 0 : 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);
2391 0 : ndr_print_GUID(ndr, "guid", &r->guid);
2392 0 : ndr_print_dom_sid28(ndr, "sid", &r->sid);
2393 0 : ndr_print_uint32(ndr, "__ndr_size_dn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->dn):r->__ndr_size_dn);
2394 0 : ndr_print_string(ndr, "dn", r->dn);
2395 0 : ndr->depth--;
2396 : }
2397 :
2398 1252748 : _PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3(const struct drsuapi_DsReplicaObjectIdentifier3 *r, libndr_flags flags)
2399 : {
2400 1252748 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
2401 : }
2402 :
2403 11930 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
2404 : {
2405 11930 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2406 11930 : if (ndr_flags & NDR_SCALARS) {
2407 11930 : NDR_CHECK(ndr_push_align(ndr, 4));
2408 11930 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->flags)));
2409 11930 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
2410 11930 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
2411 11930 : NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
2412 11930 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn)));
2413 11930 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16));
2414 11930 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->binary.length + 4));
2415 : {
2416 11930 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2417 11930 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2418 11930 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->binary));
2419 11930 : ndr->flags = _flags_save_DATA_BLOB;
2420 : }
2421 11930 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2422 : }
2423 11930 : if (ndr_flags & NDR_BUFFERS) {
2424 11930 : NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
2425 : }
2426 11927 : return NDR_ERR_SUCCESS;
2427 : }
2428 :
2429 11735 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
2430 : {
2431 11735 : uint32_t size_dn_0 = 0;
2432 11735 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2433 11735 : if (ndr_flags & NDR_SCALARS) {
2434 11735 : NDR_CHECK(ndr_pull_align(ndr, 4));
2435 11735 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
2436 11735 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_sid));
2437 11735 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
2438 11735 : NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
2439 11735 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_dn));
2440 11735 : size_dn_0 = r->__ndr_size_dn + 1;
2441 11735 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dn, size_dn_0, sizeof(uint16_t), CH_UTF16));
2442 11735 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_binary));
2443 : {
2444 11735 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2445 11735 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2446 11735 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->binary));
2447 11735 : ndr->flags = _flags_save_DATA_BLOB;
2448 : }
2449 11735 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2450 : }
2451 11735 : if (ndr_flags & NDR_BUFFERS) {
2452 11735 : NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
2453 : }
2454 11732 : return NDR_ERR_SUCCESS;
2455 : }
2456 :
2457 0 : static void ndr_print_flags_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
2458 : {
2459 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(ndr, name, r);
2460 0 : }
2461 :
2462 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
2463 : {
2464 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier3Binary");
2465 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2466 0 : ndr->depth++;
2467 0 : ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->flags):r->__ndr_size);
2468 0 : 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);
2469 0 : ndr_print_GUID(ndr, "guid", &r->guid);
2470 0 : ndr_print_dom_sid28(ndr, "sid", &r->sid);
2471 0 : ndr_print_uint32(ndr, "__ndr_size_dn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->dn):r->__ndr_size_dn);
2472 0 : ndr_print_string(ndr, "dn", r->dn);
2473 0 : ndr_print_uint32(ndr, "__ndr_size_binary", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->binary.length + 4:r->__ndr_size_binary);
2474 : {
2475 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
2476 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2477 0 : ndr_print_DATA_BLOB(ndr, "binary", r->binary);
2478 0 : ndr->flags = _flags_save_DATA_BLOB;
2479 : }
2480 0 : ndr->depth--;
2481 : }
2482 :
2483 31879925 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaAttribute(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttribute *r)
2484 : {
2485 31879925 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2486 31879925 : if (ndr_flags & NDR_SCALARS) {
2487 15939963 : NDR_CHECK(ndr_push_align(ndr, 5));
2488 15939963 : NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
2489 15939963 : NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr, NDR_SCALARS, &r->value_ctr));
2490 15939963 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2491 : }
2492 31879925 : if (ndr_flags & NDR_BUFFERS) {
2493 15939963 : NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr, NDR_BUFFERS, &r->value_ctr));
2494 : }
2495 31879902 : return NDR_ERR_SUCCESS;
2496 : }
2497 :
2498 15734752 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttribute(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttribute *r)
2499 : {
2500 15734752 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2501 15734752 : if (ndr_flags & NDR_SCALARS) {
2502 7867377 : NDR_CHECK(ndr_pull_align(ndr, 5));
2503 7867377 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
2504 7867377 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr, NDR_SCALARS, &r->value_ctr));
2505 7867377 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2506 : }
2507 15734752 : if (ndr_flags & NDR_BUFFERS) {
2508 7867377 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr, NDR_BUFFERS, &r->value_ctr));
2509 : }
2510 15734660 : return NDR_ERR_SUCCESS;
2511 : }
2512 :
2513 2 : static void ndr_print_flags_drsuapi_DsReplicaAttribute(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaAttribute *r)
2514 : {
2515 2 : ndr_print_drsuapi_DsReplicaAttribute(ndr, name, r);
2516 2 : }
2517 :
2518 2336338 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttributeCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttributeCtr *r)
2519 : {
2520 2 : uint32_t cntr_attributes_1;
2521 2336338 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2522 2336338 : if (ndr_flags & NDR_SCALARS) {
2523 1168169 : NDR_CHECK(ndr_push_align(ndr, 5));
2524 1168169 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_attributes));
2525 1168169 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attributes));
2526 1168169 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2527 : }
2528 2336338 : if (ndr_flags & NDR_BUFFERS) {
2529 1168169 : if (r->attributes) {
2530 1168169 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_attributes));
2531 17108131 : for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->num_attributes); cntr_attributes_1++) {
2532 15939962 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAttribute(ndr, NDR_SCALARS, &r->attributes[cntr_attributes_1]));
2533 : }
2534 17108131 : for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->num_attributes); cntr_attributes_1++) {
2535 15939962 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAttribute(ndr, NDR_BUFFERS, &r->attributes[cntr_attributes_1]));
2536 : }
2537 : }
2538 : }
2539 2336336 : return NDR_ERR_SUCCESS;
2540 : }
2541 :
2542 1154468 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttributeCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttributeCtr *r)
2543 : {
2544 12 : uint32_t _ptr_attributes;
2545 1154468 : uint32_t size_attributes_1 = 0;
2546 12 : uint32_t cntr_attributes_1;
2547 1154468 : TALLOC_CTX *_mem_save_attributes_0 = NULL;
2548 1154468 : TALLOC_CTX *_mem_save_attributes_1 = NULL;
2549 1154468 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2550 1154468 : if (ndr_flags & NDR_SCALARS) {
2551 577234 : NDR_CHECK(ndr_pull_align(ndr, 5));
2552 577234 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_attributes));
2553 577234 : if (r->num_attributes > 1048576) {
2554 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_attributes), (uint32_t)(0), (uint32_t)(1048576));
2555 : }
2556 577234 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attributes));
2557 577234 : if (_ptr_attributes) {
2558 577233 : NDR_PULL_ALLOC(ndr, r->attributes);
2559 : } else {
2560 1 : r->attributes = NULL;
2561 : }
2562 577234 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2563 : }
2564 1154468 : if (ndr_flags & NDR_BUFFERS) {
2565 577234 : if (r->attributes) {
2566 577233 : _mem_save_attributes_0 = NDR_PULL_GET_MEM_CTX(ndr);
2567 577233 : NDR_PULL_SET_MEM_CTX(ndr, r->attributes, 0);
2568 577233 : NDR_CHECK(ndr_pull_array_size(ndr, &r->attributes));
2569 577233 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attributes, &size_attributes_1));
2570 577233 : NDR_PULL_ALLOC_N(ndr, r->attributes, size_attributes_1);
2571 577233 : _mem_save_attributes_1 = NDR_PULL_GET_MEM_CTX(ndr);
2572 577233 : NDR_PULL_SET_MEM_CTX(ndr, r->attributes, 0);
2573 8444608 : for (cntr_attributes_1 = 0; cntr_attributes_1 < (size_attributes_1); cntr_attributes_1++) {
2574 7867375 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttribute(ndr, NDR_SCALARS, &r->attributes[cntr_attributes_1]));
2575 : }
2576 8444608 : for (cntr_attributes_1 = 0; cntr_attributes_1 < (size_attributes_1); cntr_attributes_1++) {
2577 7867375 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttribute(ndr, NDR_BUFFERS, &r->attributes[cntr_attributes_1]));
2578 : }
2579 577233 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attributes_1, 0);
2580 577233 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attributes_0, 0);
2581 : }
2582 577234 : if (r->attributes) {
2583 577233 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->attributes, r->num_attributes));
2584 : }
2585 8444609 : for (cntr_attributes_1 = 0; cntr_attributes_1 < (size_attributes_1); cntr_attributes_1++) {
2586 45 : }
2587 : }
2588 1154456 : return NDR_ERR_SUCCESS;
2589 : }
2590 :
2591 13748 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttributeCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttributeCtr *r)
2592 : {
2593 6 : uint32_t cntr_attributes_1;
2594 13748 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttributeCtr");
2595 13748 : if (r == NULL) { ndr_print_null(ndr); return; }
2596 13748 : ndr->depth++;
2597 13748 : ndr_print_uint32(ndr, "num_attributes", r->num_attributes);
2598 13748 : ndr_print_ptr(ndr, "attributes", r->attributes);
2599 13748 : ndr->depth++;
2600 13748 : if (r->attributes) {
2601 13747 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "attributes", (uint32_t)(r->num_attributes));
2602 13747 : ndr->depth++;
2603 219668 : for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->num_attributes); cntr_attributes_1++) {
2604 205921 : ndr_print_drsuapi_DsReplicaAttribute(ndr, "attributes", &r->attributes[cntr_attributes_1]);
2605 : }
2606 13747 : ndr->depth--;
2607 : }
2608 13748 : ndr->depth--;
2609 13748 : ndr->depth--;
2610 : }
2611 :
2612 1168169 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
2613 : {
2614 1168169 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2615 1168168 : return NDR_ERR_SUCCESS;
2616 : }
2617 :
2618 577234 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
2619 : {
2620 6 : uint32_t v;
2621 577234 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2622 577234 : *r = v;
2623 577234 : return NDR_ERR_SUCCESS;
2624 : }
2625 :
2626 13748 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectFlags(struct ndr_print *ndr, const char *name, uint32_t r)
2627 : {
2628 13748 : ndr_print_uint32(ndr, name, r);
2629 13748 : ndr->depth++;
2630 13748 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER", DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER, r);
2631 13748 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC", DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC, r);
2632 13748 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY", DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY, r);
2633 13748 : ndr->depth--;
2634 13748 : }
2635 :
2636 2336338 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObject(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObject *r)
2637 : {
2638 2336338 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2639 2336338 : if (ndr_flags & NDR_SCALARS) {
2640 1168169 : NDR_CHECK(ndr_push_align(ndr, 5));
2641 1168169 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->identifier));
2642 1168169 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectFlags(ndr, NDR_SCALARS, r->flags));
2643 1168169 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr, NDR_SCALARS, &r->attribute_ctr));
2644 1168169 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2645 : }
2646 2336338 : if (ndr_flags & NDR_BUFFERS) {
2647 1168169 : if (r->identifier) {
2648 1168169 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
2649 : }
2650 1168169 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr, NDR_BUFFERS, &r->attribute_ctr));
2651 : }
2652 2336336 : return NDR_ERR_SUCCESS;
2653 : }
2654 :
2655 1154468 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObject(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObject *r)
2656 : {
2657 12 : uint32_t _ptr_identifier;
2658 1154468 : TALLOC_CTX *_mem_save_identifier_0 = NULL;
2659 1154468 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2660 1154468 : if (ndr_flags & NDR_SCALARS) {
2661 577234 : NDR_CHECK(ndr_pull_align(ndr, 5));
2662 577234 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_identifier));
2663 577234 : if (_ptr_identifier) {
2664 577232 : NDR_PULL_ALLOC(ndr, r->identifier);
2665 : } else {
2666 2 : r->identifier = NULL;
2667 : }
2668 577234 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectFlags(ndr, NDR_SCALARS, &r->flags));
2669 577234 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr, NDR_SCALARS, &r->attribute_ctr));
2670 577234 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2671 : }
2672 1154468 : if (ndr_flags & NDR_BUFFERS) {
2673 577234 : if (r->identifier) {
2674 577232 : _mem_save_identifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
2675 577232 : NDR_PULL_SET_MEM_CTX(ndr, r->identifier, 0);
2676 577232 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
2677 577232 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_identifier_0, 0);
2678 : }
2679 577234 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr, NDR_BUFFERS, &r->attribute_ctr));
2680 : }
2681 1154456 : return NDR_ERR_SUCCESS;
2682 : }
2683 :
2684 0 : static void ndr_print_flags_drsuapi_DsReplicaObject(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObject *r)
2685 : {
2686 0 : ndr_print_drsuapi_DsReplicaObject(ndr, name, r);
2687 0 : }
2688 :
2689 13748 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObject(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObject *r)
2690 : {
2691 13748 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaObject");
2692 13748 : if (r == NULL) { ndr_print_null(ndr); return; }
2693 13748 : ndr->depth++;
2694 13748 : ndr_print_ptr(ndr, "identifier", r->identifier);
2695 13748 : ndr->depth++;
2696 13748 : if (r->identifier) {
2697 13746 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "identifier", r->identifier);
2698 : }
2699 13748 : ndr->depth--;
2700 13748 : ndr_print_drsuapi_DsReplicaObjectFlags(ndr, "flags", r->flags);
2701 13748 : ndr_print_drsuapi_DsReplicaAttributeCtr(ndr, "attribute_ctr", &r->attribute_ctr);
2702 13748 : ndr->depth--;
2703 : }
2704 :
2705 15981992 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaMetaData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaMetaData *r)
2706 : {
2707 15981992 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2708 15981992 : if (ndr_flags & NDR_SCALARS) {
2709 15981992 : NDR_CHECK(ndr_push_align(ndr, 8));
2710 15981992 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
2711 15981992 : NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_change_time));
2712 15981992 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
2713 15981992 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
2714 15981992 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2715 : }
2716 15981992 : if (ndr_flags & NDR_BUFFERS) {
2717 0 : }
2718 15981992 : return NDR_ERR_SUCCESS;
2719 : }
2720 :
2721 7887807 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaMetaData *r)
2722 : {
2723 7887807 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2724 7887807 : if (ndr_flags & NDR_SCALARS) {
2725 7887807 : NDR_CHECK(ndr_pull_align(ndr, 8));
2726 7887807 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2727 7887807 : NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_change_time));
2728 7887807 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
2729 7887807 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
2730 7887807 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2731 : }
2732 7887807 : if (ndr_flags & NDR_BUFFERS) {
2733 0 : }
2734 7887807 : return NDR_ERR_SUCCESS;
2735 : }
2736 :
2737 206058 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaMetaData(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaMetaData *r)
2738 : {
2739 206058 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaMetaData");
2740 206058 : if (r == NULL) { ndr_print_null(ndr); return; }
2741 206058 : ndr->depth++;
2742 206058 : ndr_print_uint32(ndr, "version", r->version);
2743 206058 : ndr_print_NTTIME_1sec(ndr, "originating_change_time", r->originating_change_time);
2744 206058 : ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
2745 206058 : ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
2746 206058 : ndr->depth--;
2747 : }
2748 :
2749 1168074 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaMetaDataCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaMetaDataCtr *r)
2750 : {
2751 0 : uint32_t cntr_meta_data_0;
2752 1168074 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2753 1168074 : if (ndr_flags & NDR_SCALARS) {
2754 1168074 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2755 1168074 : NDR_CHECK(ndr_push_align(ndr, 8));
2756 1168074 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2757 17107120 : for (cntr_meta_data_0 = 0; cntr_meta_data_0 < (r->count); cntr_meta_data_0++) {
2758 15939046 : NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data[cntr_meta_data_0]));
2759 : }
2760 1168074 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2761 : }
2762 1168074 : if (ndr_flags & NDR_BUFFERS) {
2763 0 : }
2764 1168074 : return NDR_ERR_SUCCESS;
2765 : }
2766 :
2767 577136 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaDataCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaMetaDataCtr *r)
2768 : {
2769 577136 : uint32_t size_meta_data_0 = 0;
2770 2 : uint32_t cntr_meta_data_0;
2771 577136 : TALLOC_CTX *_mem_save_meta_data_0 = NULL;
2772 577136 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2773 577136 : if (ndr_flags & NDR_SCALARS) {
2774 577136 : NDR_CHECK(ndr_pull_array_size(ndr, &r->meta_data));
2775 577136 : NDR_CHECK(ndr_pull_align(ndr, 8));
2776 577136 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2777 577136 : if (r->count > 1048576) {
2778 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(1048576));
2779 : }
2780 577136 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->meta_data, &size_meta_data_0));
2781 577136 : NDR_PULL_ALLOC_N(ndr, r->meta_data, size_meta_data_0);
2782 577136 : _mem_save_meta_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2783 577136 : NDR_PULL_SET_MEM_CTX(ndr, r->meta_data, 0);
2784 8443561 : for (cntr_meta_data_0 = 0; cntr_meta_data_0 < (size_meta_data_0); cntr_meta_data_0++) {
2785 7866425 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data[cntr_meta_data_0]));
2786 : }
2787 577136 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_meta_data_0, 0);
2788 577136 : if (r->meta_data) {
2789 577136 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->meta_data, r->count));
2790 : }
2791 577136 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2792 : }
2793 577136 : if (ndr_flags & NDR_BUFFERS) {
2794 2 : }
2795 577136 : return NDR_ERR_SUCCESS;
2796 : }
2797 :
2798 0 : static void ndr_print_flags_drsuapi_DsReplicaMetaDataCtr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaMetaDataCtr *r)
2799 : {
2800 0 : ndr_print_drsuapi_DsReplicaMetaDataCtr(ndr, name, r);
2801 0 : }
2802 :
2803 13744 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaMetaDataCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaMetaDataCtr *r)
2804 : {
2805 2 : uint32_t cntr_meta_data_0;
2806 13744 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaMetaDataCtr");
2807 13744 : if (r == NULL) { ndr_print_null(ndr); return; }
2808 13744 : ndr->depth++;
2809 13744 : ndr_print_uint32(ndr, "count", r->count);
2810 13744 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "meta_data", (uint32_t)(r->count));
2811 13744 : ndr->depth++;
2812 219620 : for (cntr_meta_data_0 = 0; cntr_meta_data_0 < (r->count); cntr_meta_data_0++) {
2813 205876 : ndr_print_drsuapi_DsReplicaMetaData(ndr, "meta_data", &r->meta_data[cntr_meta_data_0]);
2814 : }
2815 13744 : ndr->depth--;
2816 13744 : ndr->depth--;
2817 : }
2818 :
2819 1168074 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectListItemEx(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectListItemEx *r)
2820 : {
2821 1168074 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2822 1168074 : if (ndr_flags & NDR_SCALARS) {
2823 1168074 : NDR_CHECK(ndr_push_align(ndr, 5));
2824 1168074 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->next_object));
2825 1168074 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object));
2826 1168074 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_nc_prefix));
2827 1168074 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->parent_object_guid));
2828 1168074 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->meta_data_ctr));
2829 1168074 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2830 : }
2831 1168074 : if (ndr_flags & NDR_BUFFERS) {
2832 1168074 : if (r->next_object) {
2833 1153844 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->next_object));
2834 : }
2835 1168074 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_BUFFERS, &r->object));
2836 1168074 : if (r->parent_object_guid) {
2837 1165594 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->parent_object_guid));
2838 : }
2839 1168074 : if (r->meta_data_ctr) {
2840 1168074 : NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaDataCtr(ndr, NDR_SCALARS, r->meta_data_ctr));
2841 : }
2842 : }
2843 1168074 : return NDR_ERR_SUCCESS;
2844 : }
2845 :
2846 577136 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectListItemEx(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectListItemEx *r)
2847 : {
2848 2 : uint32_t _ptr_next_object;
2849 577136 : TALLOC_CTX *_mem_save_next_object_0 = NULL;
2850 2 : uint32_t _ptr_parent_object_guid;
2851 577136 : TALLOC_CTX *_mem_save_parent_object_guid_0 = NULL;
2852 2 : uint32_t _ptr_meta_data_ctr;
2853 577136 : TALLOC_CTX *_mem_save_meta_data_ctr_0 = NULL;
2854 577136 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2855 577136 : if (ndr_flags & NDR_SCALARS) {
2856 577136 : NDR_CHECK(ndr_pull_align(ndr, 5));
2857 577136 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next_object));
2858 577136 : if (_ptr_next_object) {
2859 570072 : NDR_PULL_ALLOC(ndr, r->next_object);
2860 : } else {
2861 7064 : r->next_object = NULL;
2862 : }
2863 577136 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object));
2864 577136 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_nc_prefix));
2865 577136 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parent_object_guid));
2866 577136 : if (_ptr_parent_object_guid) {
2867 575901 : NDR_PULL_ALLOC(ndr, r->parent_object_guid);
2868 : } else {
2869 1235 : r->parent_object_guid = NULL;
2870 : }
2871 577136 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_meta_data_ctr));
2872 577136 : if (_ptr_meta_data_ctr) {
2873 577136 : NDR_PULL_ALLOC(ndr, r->meta_data_ctr);
2874 : } else {
2875 0 : r->meta_data_ctr = NULL;
2876 : }
2877 577136 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2878 : }
2879 577136 : if (ndr_flags & NDR_BUFFERS) {
2880 577136 : if (r->next_object) {
2881 570072 : _mem_save_next_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
2882 570072 : NDR_PULL_SET_MEM_CTX(ndr, r->next_object, 0);
2883 570072 : NDR_RECURSION_CHECK(ndr, 20000);
2884 570072 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->next_object));
2885 570072 : NDR_RECURSION_UNWIND(ndr);
2886 570072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_object_0, 0);
2887 : }
2888 577136 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_BUFFERS, &r->object));
2889 577136 : if (r->parent_object_guid) {
2890 575901 : _mem_save_parent_object_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2891 575901 : NDR_PULL_SET_MEM_CTX(ndr, r->parent_object_guid, 0);
2892 575901 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->parent_object_guid));
2893 575901 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parent_object_guid_0, 0);
2894 : }
2895 577136 : if (r->meta_data_ctr) {
2896 577136 : _mem_save_meta_data_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
2897 577136 : NDR_PULL_SET_MEM_CTX(ndr, r->meta_data_ctr, 0);
2898 577136 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaDataCtr(ndr, NDR_SCALARS, r->meta_data_ctr));
2899 577136 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_meta_data_ctr_0, 0);
2900 : }
2901 : }
2902 577134 : return NDR_ERR_SUCCESS;
2903 : }
2904 :
2905 0 : static void ndr_print_flags_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObjectListItemEx *r)
2906 : {
2907 0 : ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, name, r);
2908 0 : }
2909 :
2910 0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr1 *r)
2911 : {
2912 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2913 0 : if (ndr_flags & NDR_SCALARS) {
2914 0 : NDR_CHECK(ndr_push_align(ndr, 8));
2915 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
2916 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
2917 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->naming_context));
2918 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
2919 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
2920 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
2921 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
2922 0 : NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr, NDR_SCALARS, r->extended_ret));
2923 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_count));
2924 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->flags) + 55));
2925 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object));
2926 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data));
2927 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2928 : }
2929 0 : if (ndr_flags & NDR_BUFFERS) {
2930 0 : if (r->naming_context) {
2931 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
2932 : }
2933 0 : if (r->uptodateness_vector) {
2934 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
2935 : }
2936 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
2937 0 : if (r->first_object) {
2938 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
2939 : }
2940 : }
2941 0 : return NDR_ERR_SUCCESS;
2942 : }
2943 :
2944 2 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr1 *r)
2945 : {
2946 2 : uint32_t _ptr_naming_context;
2947 2 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
2948 2 : uint32_t _ptr_uptodateness_vector;
2949 2 : TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
2950 2 : uint32_t _ptr_first_object;
2951 2 : TALLOC_CTX *_mem_save_first_object_0 = NULL;
2952 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2953 2 : if (ndr_flags & NDR_SCALARS) {
2954 1 : NDR_CHECK(ndr_pull_align(ndr, 8));
2955 1 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
2956 1 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
2957 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_naming_context));
2958 1 : if (_ptr_naming_context) {
2959 0 : NDR_PULL_ALLOC(ndr, r->naming_context);
2960 : } else {
2961 1 : r->naming_context = NULL;
2962 : }
2963 1 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
2964 1 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
2965 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
2966 1 : if (_ptr_uptodateness_vector) {
2967 0 : NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
2968 : } else {
2969 1 : r->uptodateness_vector = NULL;
2970 : }
2971 1 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
2972 1 : NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr, NDR_SCALARS, &r->extended_ret));
2973 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_count));
2974 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
2975 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_first_object));
2976 1 : if (_ptr_first_object) {
2977 1 : NDR_PULL_ALLOC(ndr, r->first_object);
2978 : } else {
2979 0 : r->first_object = NULL;
2980 : }
2981 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->more_data));
2982 1 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2983 : }
2984 2 : if (ndr_flags & NDR_BUFFERS) {
2985 1 : if (r->naming_context) {
2986 0 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
2987 0 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
2988 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
2989 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
2990 : }
2991 1 : if (r->uptodateness_vector) {
2992 0 : _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
2993 0 : NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
2994 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
2995 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
2996 : }
2997 1 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
2998 1 : if (r->first_object) {
2999 1 : _mem_save_first_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
3000 1 : NDR_PULL_SET_MEM_CTX(ndr, r->first_object, 0);
3001 1 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
3002 1 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_first_object_0, 0);
3003 : }
3004 : }
3005 0 : return NDR_ERR_SUCCESS;
3006 : }
3007 :
3008 0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesCtr1 *r)
3009 : {
3010 0 : ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, name, r);
3011 0 : }
3012 :
3013 1 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1 *r)
3014 : {
3015 1 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr1");
3016 1 : if (r == NULL) { ndr_print_null(ndr); return; }
3017 1 : ndr->depth++;
3018 1 : ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
3019 1 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
3020 1 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
3021 1 : ndr->depth++;
3022 1 : if (r->naming_context) {
3023 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
3024 : }
3025 1 : ndr->depth--;
3026 1 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "old_highwatermark", &r->old_highwatermark);
3027 1 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "new_highwatermark", &r->new_highwatermark);
3028 1 : ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
3029 1 : ndr->depth++;
3030 1 : if (r->uptodateness_vector) {
3031 0 : ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
3032 : }
3033 1 : ndr->depth--;
3034 1 : ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
3035 1 : ndr_print_drsuapi_DsExtendedError(ndr, "extended_ret", r->extended_ret);
3036 1 : ndr_print_uint32(ndr, "object_count", r->object_count);
3037 1 : ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->flags) + 55:r->__ndr_size);
3038 1 : ndr_print_ptr(ndr, "first_object", r->first_object);
3039 1 : ndr->depth++;
3040 1 : if (r->first_object) {
3041 1 : ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "first_object", r->first_object);
3042 : }
3043 1 : ndr->depth--;
3044 1 : ndr_print_uint32(ndr, "more_data", r->more_data);
3045 1 : ndr->depth--;
3046 : }
3047 :
3048 0 : _PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr1(const struct drsuapi_DsGetNCChangesCtr1 *r, libndr_flags flags)
3049 : {
3050 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1);
3051 : }
3052 :
3053 42946 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsLinkedAttributeFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
3054 : {
3055 42946 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
3056 42946 : return NDR_ERR_SUCCESS;
3057 : }
3058 :
3059 21382 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsLinkedAttributeFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
3060 : {
3061 0 : uint32_t v;
3062 21382 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
3063 21382 : *r = v;
3064 21382 : return NDR_ERR_SUCCESS;
3065 : }
3066 :
3067 182 : _PUBLIC_ void ndr_print_drsuapi_DsLinkedAttributeFlags(struct ndr_print *ndr, const char *name, uint32_t r)
3068 : {
3069 182 : ndr_print_uint32(ndr, name, r);
3070 182 : ndr->depth++;
3071 182 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE", DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE, r);
3072 182 : ndr->depth--;
3073 182 : }
3074 :
3075 85892 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaLinkedAttribute(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaLinkedAttribute *r)
3076 : {
3077 85892 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3078 85892 : if (ndr_flags & NDR_SCALARS) {
3079 42946 : NDR_CHECK(ndr_push_align(ndr, 8));
3080 42946 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->identifier));
3081 42946 : NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
3082 42946 : NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->value));
3083 42946 : NDR_CHECK(ndr_push_drsuapi_DsLinkedAttributeFlags(ndr, NDR_SCALARS, r->flags));
3084 42946 : NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_add_time));
3085 42946 : NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data));
3086 42946 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3087 : }
3088 85892 : if (ndr_flags & NDR_BUFFERS) {
3089 42946 : if (r->identifier) {
3090 42946 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
3091 : }
3092 42946 : NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->value));
3093 : }
3094 85892 : return NDR_ERR_SUCCESS;
3095 : }
3096 :
3097 42764 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaLinkedAttribute(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaLinkedAttribute *r)
3098 : {
3099 0 : uint32_t _ptr_identifier;
3100 42764 : TALLOC_CTX *_mem_save_identifier_0 = NULL;
3101 42764 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3102 42764 : if (ndr_flags & NDR_SCALARS) {
3103 21382 : NDR_CHECK(ndr_pull_align(ndr, 8));
3104 21382 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_identifier));
3105 21382 : if (_ptr_identifier) {
3106 21382 : NDR_PULL_ALLOC(ndr, r->identifier);
3107 : } else {
3108 0 : r->identifier = NULL;
3109 : }
3110 21382 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
3111 21382 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->value));
3112 21382 : NDR_CHECK(ndr_pull_drsuapi_DsLinkedAttributeFlags(ndr, NDR_SCALARS, &r->flags));
3113 21382 : NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_add_time));
3114 21382 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data));
3115 21382 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3116 : }
3117 42764 : if (ndr_flags & NDR_BUFFERS) {
3118 21382 : if (r->identifier) {
3119 21382 : _mem_save_identifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
3120 21382 : NDR_PULL_SET_MEM_CTX(ndr, r->identifier, 0);
3121 21382 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
3122 21382 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_identifier_0, 0);
3123 : }
3124 21382 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->value));
3125 : }
3126 42764 : return NDR_ERR_SUCCESS;
3127 : }
3128 :
3129 0 : static void ndr_print_flags_drsuapi_DsReplicaLinkedAttribute(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaLinkedAttribute *r)
3130 : {
3131 0 : ndr_print_drsuapi_DsReplicaLinkedAttribute(ndr, name, r);
3132 0 : }
3133 :
3134 182 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaLinkedAttribute(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaLinkedAttribute *r)
3135 : {
3136 182 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaLinkedAttribute");
3137 182 : if (r == NULL) { ndr_print_null(ndr); return; }
3138 182 : ndr->depth++;
3139 182 : ndr_print_ptr(ndr, "identifier", r->identifier);
3140 182 : ndr->depth++;
3141 182 : if (r->identifier) {
3142 182 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "identifier", r->identifier);
3143 : }
3144 182 : ndr->depth--;
3145 182 : ndr_print_drsuapi_DsAttributeId(ndr, "attid", r->attid);
3146 182 : ndr_print_drsuapi_DsAttributeValue(ndr, "value", &r->value);
3147 182 : ndr_print_drsuapi_DsLinkedAttributeFlags(ndr, "flags", r->flags);
3148 182 : ndr_print_NTTIME_1sec(ndr, "originating_add_time", r->originating_add_time);
3149 182 : ndr_print_drsuapi_DsReplicaMetaData(ndr, "meta_data", &r->meta_data);
3150 182 : ndr->depth--;
3151 : }
3152 :
3153 30351 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr6 *r)
3154 : {
3155 0 : uint32_t cntr_linked_attributes_1;
3156 30351 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3157 30351 : if (ndr_flags & NDR_SCALARS) {
3158 20234 : NDR_CHECK(ndr_push_align(ndr, 8));
3159 20234 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
3160 20234 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
3161 20234 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->naming_context));
3162 20234 : NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
3163 20234 : NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
3164 20234 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
3165 20234 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
3166 20234 : NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr, NDR_SCALARS, r->extended_ret));
3167 20234 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_count));
3168 20234 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->flags) + 55));
3169 20234 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object));
3170 20234 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data));
3171 20234 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nc_object_count));
3172 20234 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nc_linked_attributes_count));
3173 20234 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linked_attributes_count));
3174 20234 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->linked_attributes));
3175 20234 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->drs_error));
3176 20234 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3177 : }
3178 30351 : if (ndr_flags & NDR_BUFFERS) {
3179 20234 : if (r->naming_context) {
3180 15960 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
3181 : }
3182 20234 : if (r->uptodateness_vector) {
3183 5364 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2CtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
3184 : }
3185 20234 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
3186 20234 : if (r->first_object) {
3187 14230 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
3188 : }
3189 20234 : if (r->linked_attributes) {
3190 20234 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->linked_attributes_count));
3191 63180 : for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (r->linked_attributes_count); cntr_linked_attributes_1++) {
3192 42946 : NDR_CHECK(ndr_push_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_SCALARS, &r->linked_attributes[cntr_linked_attributes_1]));
3193 : }
3194 63180 : for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (r->linked_attributes_count); cntr_linked_attributes_1++) {
3195 42946 : NDR_CHECK(ndr_push_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_BUFFERS, &r->linked_attributes[cntr_linked_attributes_1]));
3196 : }
3197 : }
3198 : }
3199 30351 : return NDR_ERR_SUCCESS;
3200 : }
3201 :
3202 20130 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr6 *r)
3203 : {
3204 0 : uint32_t _ptr_naming_context;
3205 20130 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
3206 0 : uint32_t _ptr_uptodateness_vector;
3207 20130 : TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
3208 0 : uint32_t _ptr_first_object;
3209 20130 : TALLOC_CTX *_mem_save_first_object_0 = NULL;
3210 0 : uint32_t _ptr_linked_attributes;
3211 20130 : uint32_t size_linked_attributes_1 = 0;
3212 0 : uint32_t cntr_linked_attributes_1;
3213 20130 : TALLOC_CTX *_mem_save_linked_attributes_0 = NULL;
3214 20130 : TALLOC_CTX *_mem_save_linked_attributes_1 = NULL;
3215 20130 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3216 20130 : if (ndr_flags & NDR_SCALARS) {
3217 10065 : NDR_CHECK(ndr_pull_align(ndr, 8));
3218 10065 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
3219 10065 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
3220 10065 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_naming_context));
3221 10065 : if (_ptr_naming_context) {
3222 7928 : NDR_PULL_ALLOC(ndr, r->naming_context);
3223 : } else {
3224 2137 : r->naming_context = NULL;
3225 : }
3226 10065 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
3227 10065 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
3228 10065 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
3229 10065 : if (_ptr_uptodateness_vector) {
3230 2676 : NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
3231 : } else {
3232 7389 : r->uptodateness_vector = NULL;
3233 : }
3234 10065 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
3235 10065 : NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr, NDR_SCALARS, &r->extended_ret));
3236 10065 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_count));
3237 10065 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
3238 10065 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_first_object));
3239 10065 : if (_ptr_first_object) {
3240 7063 : NDR_PULL_ALLOC(ndr, r->first_object);
3241 : } else {
3242 3002 : r->first_object = NULL;
3243 : }
3244 10065 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->more_data));
3245 10065 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_object_count));
3246 10065 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_linked_attributes_count));
3247 10065 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linked_attributes_count));
3248 10065 : if (r->linked_attributes_count > 1048576) {
3249 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->linked_attributes_count), (uint32_t)(0), (uint32_t)(1048576));
3250 : }
3251 10065 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_linked_attributes));
3252 10065 : if (_ptr_linked_attributes) {
3253 10065 : NDR_PULL_ALLOC(ndr, r->linked_attributes);
3254 : } else {
3255 0 : r->linked_attributes = NULL;
3256 : }
3257 10065 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->drs_error));
3258 10065 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3259 : }
3260 20130 : if (ndr_flags & NDR_BUFFERS) {
3261 10065 : if (r->naming_context) {
3262 7928 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
3263 7928 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
3264 7928 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
3265 7928 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
3266 : }
3267 10065 : if (r->uptodateness_vector) {
3268 2676 : _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
3269 2676 : NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
3270 2676 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2CtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
3271 2676 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
3272 : }
3273 10065 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
3274 10065 : if (r->first_object) {
3275 7063 : _mem_save_first_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
3276 7063 : NDR_PULL_SET_MEM_CTX(ndr, r->first_object, 0);
3277 7063 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
3278 7063 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_first_object_0, 0);
3279 : }
3280 10065 : if (r->linked_attributes) {
3281 10065 : _mem_save_linked_attributes_0 = NDR_PULL_GET_MEM_CTX(ndr);
3282 10065 : NDR_PULL_SET_MEM_CTX(ndr, r->linked_attributes, 0);
3283 10065 : NDR_CHECK(ndr_pull_array_size(ndr, &r->linked_attributes));
3284 10065 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->linked_attributes, &size_linked_attributes_1));
3285 10065 : NDR_PULL_ALLOC_N(ndr, r->linked_attributes, size_linked_attributes_1);
3286 10065 : _mem_save_linked_attributes_1 = NDR_PULL_GET_MEM_CTX(ndr);
3287 10065 : NDR_PULL_SET_MEM_CTX(ndr, r->linked_attributes, 0);
3288 31447 : for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (size_linked_attributes_1); cntr_linked_attributes_1++) {
3289 21382 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_SCALARS, &r->linked_attributes[cntr_linked_attributes_1]));
3290 : }
3291 31447 : for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (size_linked_attributes_1); cntr_linked_attributes_1++) {
3292 21382 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_BUFFERS, &r->linked_attributes[cntr_linked_attributes_1]));
3293 : }
3294 10065 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_linked_attributes_1, 0);
3295 10065 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_linked_attributes_0, 0);
3296 : }
3297 10065 : if (r->linked_attributes) {
3298 10065 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->linked_attributes, r->linked_attributes_count));
3299 : }
3300 31447 : for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (size_linked_attributes_1); cntr_linked_attributes_1++) {
3301 0 : }
3302 : }
3303 20130 : return NDR_ERR_SUCCESS;
3304 : }
3305 :
3306 0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesCtr6 *r)
3307 : {
3308 0 : ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, name, r);
3309 0 : }
3310 :
3311 40 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6 *r)
3312 : {
3313 0 : uint32_t cntr_linked_attributes_1;
3314 40 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr6");
3315 40 : if (r == NULL) { ndr_print_null(ndr); return; }
3316 40 : ndr->depth++;
3317 40 : ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
3318 40 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
3319 40 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
3320 40 : ndr->depth++;
3321 40 : if (r->naming_context) {
3322 40 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
3323 : }
3324 40 : ndr->depth--;
3325 40 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "old_highwatermark", &r->old_highwatermark);
3326 40 : ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "new_highwatermark", &r->new_highwatermark);
3327 40 : ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
3328 40 : ndr->depth++;
3329 40 : if (r->uptodateness_vector) {
3330 12 : ndr_print_drsuapi_DsReplicaCursor2CtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
3331 : }
3332 40 : ndr->depth--;
3333 40 : ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
3334 40 : ndr_print_drsuapi_DsExtendedError(ndr, "extended_ret", r->extended_ret);
3335 40 : ndr_print_uint32(ndr, "object_count", r->object_count);
3336 40 : ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->flags) + 55:r->__ndr_size);
3337 40 : ndr_print_ptr(ndr, "first_object", r->first_object);
3338 40 : ndr->depth++;
3339 40 : if (r->first_object) {
3340 40 : ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "first_object", r->first_object);
3341 : }
3342 40 : ndr->depth--;
3343 40 : ndr_print_uint32(ndr, "more_data", r->more_data);
3344 40 : ndr_print_uint32(ndr, "nc_object_count", r->nc_object_count);
3345 40 : ndr_print_uint32(ndr, "nc_linked_attributes_count", r->nc_linked_attributes_count);
3346 40 : ndr_print_uint32(ndr, "linked_attributes_count", r->linked_attributes_count);
3347 40 : ndr_print_ptr(ndr, "linked_attributes", r->linked_attributes);
3348 40 : ndr->depth++;
3349 40 : if (r->linked_attributes) {
3350 40 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "linked_attributes", (uint32_t)(r->linked_attributes_count));
3351 40 : ndr->depth++;
3352 222 : for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (r->linked_attributes_count); cntr_linked_attributes_1++) {
3353 182 : ndr_print_drsuapi_DsReplicaLinkedAttribute(ndr, "linked_attributes", &r->linked_attributes[cntr_linked_attributes_1]);
3354 : }
3355 40 : ndr->depth--;
3356 : }
3357 40 : ndr->depth--;
3358 40 : ndr_print_WERROR(ndr, "drs_error", r->drs_error);
3359 40 : ndr->depth--;
3360 : }
3361 :
3362 20234 : _PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6 *r, libndr_flags flags)
3363 : {
3364 20234 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6);
3365 : }
3366 :
3367 0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr1TS *r)
3368 : {
3369 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3370 0 : if (ndr_flags & NDR_SCALARS) {
3371 0 : NDR_CHECK(ndr_push_align(ndr, 1));
3372 : {
3373 0 : struct ndr_push *_ndr_ctr1;
3374 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr1, 0xFFFFFC01, -1));
3375 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1));
3376 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1));
3377 : }
3378 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3379 : }
3380 0 : if (ndr_flags & NDR_BUFFERS) {
3381 0 : }
3382 0 : return NDR_ERR_SUCCESS;
3383 : }
3384 :
3385 0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr1TS *r)
3386 : {
3387 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3388 0 : if (ndr_flags & NDR_SCALARS) {
3389 0 : NDR_CHECK(ndr_pull_align(ndr, 1));
3390 : {
3391 0 : struct ndr_pull *_ndr_ctr1;
3392 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr1, 0xFFFFFC01, -1));
3393 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1));
3394 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1));
3395 : }
3396 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3397 : }
3398 0 : if (ndr_flags & NDR_BUFFERS) {
3399 0 : }
3400 0 : return NDR_ERR_SUCCESS;
3401 : }
3402 :
3403 0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesCtr1TS *r)
3404 : {
3405 0 : ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, name, r);
3406 0 : }
3407 :
3408 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1TS *r)
3409 : {
3410 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr1TS");
3411 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3412 0 : ndr->depth++;
3413 0 : ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", &r->ctr1);
3414 0 : ndr->depth--;
3415 : }
3416 :
3417 0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr6TS *r)
3418 : {
3419 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3420 0 : if (ndr_flags & NDR_SCALARS) {
3421 0 : NDR_CHECK(ndr_push_align(ndr, 1));
3422 : {
3423 0 : struct ndr_push *_ndr_ctr6;
3424 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr6, 0xFFFFFC01, -1));
3425 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6));
3426 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1));
3427 : }
3428 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3429 : }
3430 0 : if (ndr_flags & NDR_BUFFERS) {
3431 0 : }
3432 0 : return NDR_ERR_SUCCESS;
3433 : }
3434 :
3435 0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr6TS *r)
3436 : {
3437 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3438 0 : if (ndr_flags & NDR_SCALARS) {
3439 0 : NDR_CHECK(ndr_pull_align(ndr, 1));
3440 : {
3441 0 : struct ndr_pull *_ndr_ctr6;
3442 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr6, 0xFFFFFC01, -1));
3443 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6));
3444 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1));
3445 : }
3446 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3447 : }
3448 0 : if (ndr_flags & NDR_BUFFERS) {
3449 0 : }
3450 0 : return NDR_ERR_SUCCESS;
3451 : }
3452 :
3453 0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesCtr6TS *r)
3454 : {
3455 0 : ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, name, r);
3456 0 : }
3457 :
3458 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6TS *r)
3459 : {
3460 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr6TS");
3461 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3462 0 : ndr->depth++;
3463 0 : ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", &r->ctr6);
3464 0 : ndr->depth--;
3465 : }
3466 :
3467 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
3468 : {
3469 0 : uint32_t _ptr_ts;
3470 0 : TALLOC_CTX *_mem_save_ts_0 = NULL;
3471 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3472 0 : if (ndr_flags & NDR_SCALARS) {
3473 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3474 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
3475 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
3476 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
3477 0 : if (_ptr_ts) {
3478 0 : NDR_PULL_ALLOC(ndr, r->ts);
3479 : } else {
3480 0 : r->ts = NULL;
3481 : }
3482 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3483 : }
3484 0 : if (ndr_flags & NDR_BUFFERS) {
3485 0 : if (r->ts) {
3486 0 : _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
3487 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
3488 : {
3489 0 : struct ndr_pull *_ndr_ts;
3490 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
3491 : {
3492 0 : struct ndr_pull *_ndr_ts_compressed;
3493 0 : NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length, r->compressed_length));
3494 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
3495 0 : NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
3496 : }
3497 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
3498 : }
3499 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
3500 : }
3501 : }
3502 0 : return NDR_ERR_SUCCESS;
3503 : }
3504 :
3505 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
3506 : {
3507 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr1");
3508 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3509 0 : ndr->depth++;
3510 0 : ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
3511 0 : ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
3512 0 : ndr_print_ptr(ndr, "ts", r->ts);
3513 0 : ndr->depth++;
3514 0 : if (r->ts) {
3515 0 : ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, "ts", r->ts);
3516 : }
3517 0 : ndr->depth--;
3518 0 : ndr->depth--;
3519 : }
3520 :
3521 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
3522 : {
3523 0 : uint32_t _ptr_ts;
3524 0 : TALLOC_CTX *_mem_save_ts_0 = NULL;
3525 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3526 0 : if (ndr_flags & NDR_SCALARS) {
3527 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3528 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
3529 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
3530 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
3531 0 : if (_ptr_ts) {
3532 0 : NDR_PULL_ALLOC(ndr, r->ts);
3533 : } else {
3534 0 : r->ts = NULL;
3535 : }
3536 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3537 : }
3538 0 : if (ndr_flags & NDR_BUFFERS) {
3539 0 : if (r->ts) {
3540 0 : _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
3541 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
3542 : {
3543 0 : struct ndr_pull *_ndr_ts;
3544 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
3545 : {
3546 0 : struct ndr_pull *_ndr_ts_compressed;
3547 0 : NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length, r->compressed_length));
3548 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
3549 0 : NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
3550 : }
3551 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
3552 : }
3553 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
3554 : }
3555 : }
3556 0 : return NDR_ERR_SUCCESS;
3557 : }
3558 :
3559 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
3560 : {
3561 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr6");
3562 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3563 0 : ndr->depth++;
3564 0 : ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
3565 0 : ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
3566 0 : ndr_print_ptr(ndr, "ts", r->ts);
3567 0 : ndr->depth++;
3568 0 : if (r->ts) {
3569 0 : ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, "ts", r->ts);
3570 : }
3571 0 : ndr->depth--;
3572 0 : ndr->depth--;
3573 : }
3574 :
3575 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *r)
3576 : {
3577 0 : uint32_t _ptr_ts;
3578 0 : TALLOC_CTX *_mem_save_ts_0 = NULL;
3579 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3580 0 : if (ndr_flags & NDR_SCALARS) {
3581 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3582 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
3583 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
3584 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
3585 0 : if (_ptr_ts) {
3586 0 : NDR_PULL_ALLOC(ndr, r->ts);
3587 : } else {
3588 0 : r->ts = NULL;
3589 : }
3590 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3591 : }
3592 0 : if (ndr_flags & NDR_BUFFERS) {
3593 0 : if (r->ts) {
3594 0 : _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
3595 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
3596 : {
3597 0 : struct ndr_pull *_ndr_ts;
3598 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
3599 : {
3600 0 : struct ndr_pull *_ndr_ts_compressed;
3601 0 : NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_WIN2K3_LZ77_DIRECT2, r->decompressed_length, r->compressed_length));
3602 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
3603 0 : NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_WIN2K3_LZ77_DIRECT2, r->decompressed_length));
3604 : }
3605 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
3606 : }
3607 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
3608 : }
3609 : }
3610 0 : return NDR_ERR_SUCCESS;
3611 : }
3612 :
3613 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *r)
3614 : {
3615 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1");
3616 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3617 0 : ndr->depth++;
3618 0 : ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
3619 0 : ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
3620 0 : ndr_print_ptr(ndr, "ts", r->ts);
3621 0 : ndr->depth++;
3622 0 : if (r->ts) {
3623 0 : ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, "ts", r->ts);
3624 : }
3625 0 : ndr->depth--;
3626 0 : ndr->depth--;
3627 : }
3628 :
3629 2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *r)
3630 : {
3631 2 : uint32_t _ptr_ts;
3632 2 : TALLOC_CTX *_mem_save_ts_0 = NULL;
3633 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3634 2 : if (ndr_flags & NDR_SCALARS) {
3635 1 : NDR_CHECK(ndr_pull_align(ndr, 5));
3636 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
3637 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
3638 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
3639 1 : if (_ptr_ts) {
3640 1 : NDR_PULL_ALLOC(ndr, r->ts);
3641 : } else {
3642 0 : r->ts = NULL;
3643 : }
3644 1 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3645 : }
3646 2 : if (ndr_flags & NDR_BUFFERS) {
3647 1 : if (r->ts) {
3648 1 : _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
3649 1 : NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
3650 : {
3651 1 : struct ndr_pull *_ndr_ts;
3652 2 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
3653 : {
3654 1 : struct ndr_pull *_ndr_ts_compressed;
3655 1 : NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_WIN2K3_LZ77_DIRECT2, r->decompressed_length, r->compressed_length));
3656 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
3657 0 : NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_WIN2K3_LZ77_DIRECT2, r->decompressed_length));
3658 : }
3659 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
3660 : }
3661 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
3662 : }
3663 : }
3664 0 : return NDR_ERR_SUCCESS;
3665 : }
3666 :
3667 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *r)
3668 : {
3669 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6");
3670 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3671 0 : ndr->depth++;
3672 0 : ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
3673 0 : ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
3674 0 : ndr_print_ptr(ndr, "ts", r->ts);
3675 0 : ndr->depth++;
3676 0 : if (r->ts) {
3677 0 : ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, "ts", r->ts);
3678 : }
3679 0 : ndr->depth--;
3680 0 : ndr->depth--;
3681 : }
3682 :
3683 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCompressionType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsGetNCChangesCompressionType r)
3684 : {
3685 0 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
3686 0 : return NDR_ERR_SUCCESS;
3687 : }
3688 :
3689 1 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCompressionType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsGetNCChangesCompressionType *r)
3690 : {
3691 1 : uint16_t v;
3692 1 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
3693 1 : *r = v;
3694 1 : return NDR_ERR_SUCCESS;
3695 : }
3696 :
3697 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCompressionType(struct ndr_print *ndr, const char *name, enum drsuapi_DsGetNCChangesCompressionType r)
3698 : {
3699 0 : const char *val = NULL;
3700 :
3701 0 : switch (r) {
3702 0 : case DRSUAPI_COMPRESSION_TYPE_MSZIP: val = "DRSUAPI_COMPRESSION_TYPE_MSZIP"; break;
3703 0 : case DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2: val = "DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2"; break;
3704 : }
3705 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
3706 0 : }
3707 :
3708 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetNCChangesCompressedCtr *r)
3709 : {
3710 0 : uint32_t level;
3711 : {
3712 0 : libndr_flags _flags_save_UNION = ndr->flags;
3713 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3714 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3715 0 : if (ndr_flags & NDR_SCALARS) {
3716 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3717 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3718 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3719 0 : switch (level) {
3720 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
3721 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
3722 0 : break; }
3723 :
3724 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
3725 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_SCALARS, &r->mszip6));
3726 0 : break; }
3727 :
3728 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16): {
3729 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(ndr, NDR_SCALARS, &r->xpress1));
3730 0 : break; }
3731 :
3732 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16): {
3733 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(ndr, NDR_SCALARS, &r->xpress6));
3734 0 : break; }
3735 :
3736 0 : default:
3737 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3738 : }
3739 : }
3740 0 : if (ndr_flags & NDR_BUFFERS) {
3741 0 : if (!(ndr_flags & NDR_SCALARS)) {
3742 : /* We didn't get it above, and the token is not needed after this. */
3743 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3744 : }
3745 0 : switch (level) {
3746 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
3747 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
3748 0 : break;
3749 :
3750 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
3751 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_BUFFERS, &r->mszip6));
3752 0 : break;
3753 :
3754 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
3755 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(ndr, NDR_BUFFERS, &r->xpress1));
3756 0 : break;
3757 :
3758 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
3759 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(ndr, NDR_BUFFERS, &r->xpress6));
3760 0 : break;
3761 :
3762 0 : default:
3763 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3764 : }
3765 : }
3766 0 : ndr->flags = _flags_save_UNION;
3767 : }
3768 0 : return NDR_ERR_SUCCESS;
3769 : }
3770 :
3771 2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetNCChangesCompressedCtr *r)
3772 : {
3773 2 : uint32_t level;
3774 : {
3775 2 : libndr_flags _flags_save_UNION = ndr->flags;
3776 2 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3777 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3778 2 : if (ndr_flags & NDR_SCALARS) {
3779 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3780 1 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3781 1 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3782 1 : switch (level) {
3783 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
3784 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
3785 0 : break; }
3786 :
3787 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
3788 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_SCALARS, &r->mszip6));
3789 0 : break; }
3790 :
3791 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16): {
3792 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(ndr, NDR_SCALARS, &r->xpress1));
3793 0 : break; }
3794 :
3795 1 : case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16): {
3796 1 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(ndr, NDR_SCALARS, &r->xpress6));
3797 0 : break; }
3798 :
3799 0 : default:
3800 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3801 : }
3802 : }
3803 2 : if (ndr_flags & NDR_BUFFERS) {
3804 1 : if (!(ndr_flags & NDR_SCALARS)) {
3805 : /* We didn't get it above, and the token is not needed after this. */
3806 1 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3807 : }
3808 1 : switch (level) {
3809 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
3810 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
3811 0 : break;
3812 :
3813 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
3814 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_BUFFERS, &r->mszip6));
3815 0 : break;
3816 :
3817 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
3818 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(ndr, NDR_BUFFERS, &r->xpress1));
3819 0 : break;
3820 :
3821 1 : case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
3822 1 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(ndr, NDR_BUFFERS, &r->xpress6));
3823 0 : break;
3824 :
3825 0 : default:
3826 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3827 : }
3828 : }
3829 1 : ndr->flags = _flags_save_UNION;
3830 : }
3831 1 : return NDR_ERR_SUCCESS;
3832 : }
3833 :
3834 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesCompressedCtr *r)
3835 : {
3836 0 : uint32_t level;
3837 : {
3838 0 : libndr_flags _flags_save_UNION = ndr->flags;
3839 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3840 0 : level = ndr_print_steal_switch_value(ndr, r);
3841 0 : ndr_print_union(ndr, name, level, "drsuapi_DsGetNCChangesCompressedCtr");
3842 0 : switch (level) {
3843 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
3844 0 : ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, "mszip1", &r->mszip1);
3845 0 : break;
3846 :
3847 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
3848 0 : ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, "mszip6", &r->mszip6);
3849 0 : break;
3850 :
3851 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
3852 0 : ndr_print_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(ndr, "xpress1", &r->xpress1);
3853 0 : break;
3854 :
3855 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
3856 0 : ndr_print_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(ndr, "xpress6", &r->xpress6);
3857 0 : break;
3858 :
3859 0 : default:
3860 0 : ndr_print_bad_level(ndr, name, level);
3861 : }
3862 0 : ndr->flags = _flags_save_UNION;
3863 : }
3864 0 : }
3865 :
3866 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr2 *r)
3867 : {
3868 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3869 0 : if (ndr_flags & NDR_SCALARS) {
3870 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3871 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
3872 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3873 : }
3874 0 : if (ndr_flags & NDR_BUFFERS) {
3875 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
3876 : }
3877 0 : return NDR_ERR_SUCCESS;
3878 : }
3879 :
3880 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr2 *r)
3881 : {
3882 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3883 0 : if (ndr_flags & NDR_SCALARS) {
3884 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3885 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
3886 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3887 : }
3888 0 : if (ndr_flags & NDR_BUFFERS) {
3889 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
3890 : }
3891 0 : return NDR_ERR_SUCCESS;
3892 : }
3893 :
3894 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr2 *r)
3895 : {
3896 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr2");
3897 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3898 0 : ndr->depth++;
3899 0 : ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, "mszip1", &r->mszip1);
3900 0 : ndr->depth--;
3901 : }
3902 :
3903 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr7(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr7 *r)
3904 : {
3905 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3906 0 : if (ndr_flags & NDR_SCALARS) {
3907 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3908 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3909 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressionType(ndr, NDR_SCALARS, r->type));
3910 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
3911 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr));
3912 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3913 : }
3914 0 : if (ndr_flags & NDR_BUFFERS) {
3915 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
3916 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr));
3917 : }
3918 0 : return NDR_ERR_SUCCESS;
3919 : }
3920 :
3921 2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr7(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr7 *r)
3922 : {
3923 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3924 2 : if (ndr_flags & NDR_SCALARS) {
3925 1 : NDR_CHECK(ndr_pull_align(ndr, 5));
3926 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3927 1 : if (r->level > 6) {
3928 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->level), (uint32_t)(0), (uint32_t)(6));
3929 : }
3930 2 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressionType(ndr, NDR_SCALARS, &r->type));
3931 1 : if (r->type < 2 || r->type > 3) {
3932 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%d) out of range (%d - %d)", (int)(r->type), (int)(2), (int)(3));
3933 : }
3934 1 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
3935 1 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr));
3936 1 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3937 : }
3938 2 : if (ndr_flags & NDR_BUFFERS) {
3939 1 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
3940 1 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr));
3941 : }
3942 0 : return NDR_ERR_SUCCESS;
3943 : }
3944 :
3945 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr7(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr7 *r)
3946 : {
3947 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr7");
3948 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3949 0 : ndr->depth++;
3950 0 : ndr_print_uint32(ndr, "level", r->level);
3951 0 : ndr_print_drsuapi_DsGetNCChangesCompressionType(ndr, "type", r->type);
3952 0 : ndr_print_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16));
3953 0 : ndr_print_drsuapi_DsGetNCChangesCompressedCtr(ndr, "ctr", &r->ctr);
3954 0 : ndr->depth--;
3955 : }
3956 :
3957 10117 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetNCChangesCtr *r)
3958 : {
3959 0 : uint32_t level;
3960 10117 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3961 10117 : if (ndr_flags & NDR_SCALARS) {
3962 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3963 10117 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3964 10117 : NDR_CHECK(ndr_push_union_align(ndr, 8));
3965 10117 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3966 10117 : NDR_CHECK(ndr_push_union_align(ndr, 8));
3967 10117 : switch (level) {
3968 0 : case 1: {
3969 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr, NDR_SCALARS, &r->ctr1));
3970 0 : break; }
3971 :
3972 0 : case 2: {
3973 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr2(ndr, NDR_SCALARS, &r->ctr2));
3974 0 : break; }
3975 :
3976 10117 : case 6: {
3977 10117 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(ndr, NDR_SCALARS, &r->ctr6));
3978 10117 : break; }
3979 :
3980 0 : case 7: {
3981 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr7(ndr, NDR_SCALARS, &r->ctr7));
3982 0 : break; }
3983 :
3984 0 : default:
3985 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3986 : }
3987 : }
3988 10117 : if (ndr_flags & NDR_BUFFERS) {
3989 10117 : if (!(ndr_flags & NDR_SCALARS)) {
3990 : /* We didn't get it above, and the token is not needed after this. */
3991 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3992 : }
3993 10117 : switch (level) {
3994 0 : case 1:
3995 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr, NDR_BUFFERS, &r->ctr1));
3996 0 : break;
3997 :
3998 0 : case 2:
3999 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr2(ndr, NDR_BUFFERS, &r->ctr2));
4000 0 : break;
4001 :
4002 10117 : case 6:
4003 10117 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(ndr, NDR_BUFFERS, &r->ctr6));
4004 10117 : break;
4005 :
4006 0 : case 7:
4007 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr7(ndr, NDR_BUFFERS, &r->ctr7));
4008 0 : break;
4009 :
4010 0 : default:
4011 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4012 : }
4013 : }
4014 10117 : return NDR_ERR_SUCCESS;
4015 : }
4016 :
4017 10067 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetNCChangesCtr *r)
4018 : {
4019 2 : uint32_t level;
4020 2 : uint32_t _level;
4021 10067 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4022 10067 : if (ndr_flags & NDR_SCALARS) {
4023 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4024 10067 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4025 10067 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
4026 10067 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4027 10067 : if (_level != level) {
4028 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
4029 : }
4030 10067 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
4031 10067 : switch (level) {
4032 1 : case 1: {
4033 1 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr, NDR_SCALARS, &r->ctr1));
4034 0 : break; }
4035 :
4036 0 : case 2: {
4037 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr2(ndr, NDR_SCALARS, &r->ctr2));
4038 0 : break; }
4039 :
4040 10065 : case 6: {
4041 10065 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(ndr, NDR_SCALARS, &r->ctr6));
4042 10065 : break; }
4043 :
4044 1 : case 7: {
4045 1 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr7(ndr, NDR_SCALARS, &r->ctr7));
4046 0 : break; }
4047 :
4048 0 : default:
4049 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4050 : }
4051 : }
4052 10067 : if (ndr_flags & NDR_BUFFERS) {
4053 10067 : if (!(ndr_flags & NDR_SCALARS)) {
4054 : /* We didn't get it above, and the token is not needed after this. */
4055 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4056 : }
4057 10067 : switch (level) {
4058 1 : case 1:
4059 1 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr, NDR_BUFFERS, &r->ctr1));
4060 0 : break;
4061 :
4062 0 : case 2:
4063 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr2(ndr, NDR_BUFFERS, &r->ctr2));
4064 0 : break;
4065 :
4066 10065 : case 6:
4067 10065 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(ndr, NDR_BUFFERS, &r->ctr6));
4068 10065 : break;
4069 :
4070 1 : case 7:
4071 1 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr7(ndr, NDR_BUFFERS, &r->ctr7));
4072 0 : break;
4073 :
4074 0 : default:
4075 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4076 : }
4077 : }
4078 10065 : return NDR_ERR_SUCCESS;
4079 : }
4080 :
4081 41 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesCtr *r)
4082 : {
4083 1 : uint32_t level;
4084 41 : level = ndr_print_steal_switch_value(ndr, r);
4085 41 : ndr_print_union(ndr, name, level, "drsuapi_DsGetNCChangesCtr");
4086 41 : switch (level) {
4087 1 : case 1:
4088 1 : ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", &r->ctr1);
4089 1 : break;
4090 :
4091 0 : case 2:
4092 0 : ndr_print_drsuapi_DsGetNCChangesCtr2(ndr, "ctr2", &r->ctr2);
4093 0 : break;
4094 :
4095 40 : case 6:
4096 40 : ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", &r->ctr6);
4097 40 : break;
4098 :
4099 0 : case 7:
4100 0 : ndr_print_drsuapi_DsGetNCChangesCtr7(ndr, "ctr7", &r->ctr7);
4101 0 : break;
4102 :
4103 0 : default:
4104 0 : ndr_print_bad_level(ndr, name, level);
4105 : }
4106 41 : }
4107 :
4108 3400 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaUpdateRefsRequest1 *r)
4109 : {
4110 3400 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4111 3400 : if (ndr_flags & NDR_SCALARS) {
4112 1700 : if (r->naming_context == NULL) {
4113 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4114 : }
4115 1700 : if (r->dest_dsa_dns_name == NULL) {
4116 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4117 : }
4118 1700 : NDR_CHECK(ndr_push_align(ndr, 5));
4119 1700 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
4120 1700 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->dest_dsa_dns_name */
4121 1700 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->dest_dsa_guid));
4122 1700 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
4123 1700 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4124 : }
4125 3400 : if (ndr_flags & NDR_BUFFERS) {
4126 1700 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
4127 1700 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dest_dsa_dns_name, CH_DOS)));
4128 1700 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4129 1700 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dest_dsa_dns_name, CH_DOS)));
4130 1700 : 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));
4131 : }
4132 3400 : return NDR_ERR_SUCCESS;
4133 : }
4134 :
4135 3400 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaUpdateRefsRequest1 *r)
4136 : {
4137 0 : uint32_t _ptr_naming_context;
4138 3400 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
4139 0 : uint32_t _ptr_dest_dsa_dns_name;
4140 3400 : uint32_t size_dest_dsa_dns_name_1 = 0;
4141 3400 : uint32_t length_dest_dsa_dns_name_1 = 0;
4142 3400 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4143 3400 : if (ndr_flags & NDR_SCALARS) {
4144 1700 : NDR_CHECK(ndr_pull_align(ndr, 5));
4145 1700 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
4146 1700 : if (_ptr_naming_context) {
4147 1700 : NDR_PULL_ALLOC(ndr, r->naming_context);
4148 : } else {
4149 0 : r->naming_context = NULL;
4150 : }
4151 1700 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_dest_dsa_dns_name));
4152 1700 : if (_ptr_dest_dsa_dns_name) {
4153 1700 : NDR_PULL_ALLOC(ndr, r->dest_dsa_dns_name);
4154 : } else {
4155 0 : r->dest_dsa_dns_name = NULL;
4156 : }
4157 1700 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->dest_dsa_guid));
4158 1700 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
4159 1700 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4160 : }
4161 3400 : if (ndr_flags & NDR_BUFFERS) {
4162 1700 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
4163 1700 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
4164 1700 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
4165 1700 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
4166 1700 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dest_dsa_dns_name));
4167 1700 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dest_dsa_dns_name));
4168 1700 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dest_dsa_dns_name, &size_dest_dsa_dns_name_1));
4169 1700 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dest_dsa_dns_name, &length_dest_dsa_dns_name_1));
4170 1700 : if (length_dest_dsa_dns_name_1 > size_dest_dsa_dns_name_1) {
4171 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dest_dsa_dns_name_1, length_dest_dsa_dns_name_1);
4172 : }
4173 1700 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dest_dsa_dns_name_1, sizeof(uint8_t)));
4174 1700 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dest_dsa_dns_name, length_dest_dsa_dns_name_1, sizeof(uint8_t), CH_DOS));
4175 : }
4176 3400 : return NDR_ERR_SUCCESS;
4177 : }
4178 :
4179 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaUpdateRefsRequest1 *r)
4180 : {
4181 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaUpdateRefsRequest1");
4182 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4183 0 : ndr->depth++;
4184 0 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
4185 0 : ndr->depth++;
4186 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
4187 0 : ndr->depth--;
4188 0 : ndr_print_ptr(ndr, "dest_dsa_dns_name", r->dest_dsa_dns_name);
4189 0 : ndr->depth++;
4190 0 : ndr_print_string(ndr, "dest_dsa_dns_name", r->dest_dsa_dns_name);
4191 0 : ndr->depth--;
4192 0 : ndr_print_GUID(ndr, "dest_dsa_guid", &r->dest_dsa_guid);
4193 0 : ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
4194 0 : ndr->depth--;
4195 : }
4196 :
4197 1700 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaUpdateRefsRequest *r)
4198 : {
4199 0 : uint32_t level;
4200 1700 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4201 1700 : if (ndr_flags & NDR_SCALARS) {
4202 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4203 1700 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4204 1700 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4205 1700 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
4206 1700 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4207 1700 : switch (level) {
4208 1700 : case 1: {
4209 1700 : NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_SCALARS, &r->req1));
4210 1700 : break; }
4211 :
4212 0 : default:
4213 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4214 : }
4215 : }
4216 1700 : if (ndr_flags & NDR_BUFFERS) {
4217 1700 : if (!(ndr_flags & NDR_SCALARS)) {
4218 : /* We didn't get it above, and the token is not needed after this. */
4219 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4220 : }
4221 1700 : switch (level) {
4222 1700 : case 1:
4223 1700 : NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_BUFFERS, &r->req1));
4224 1700 : break;
4225 :
4226 0 : default:
4227 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4228 : }
4229 : }
4230 1700 : return NDR_ERR_SUCCESS;
4231 : }
4232 :
4233 1700 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaUpdateRefsRequest *r)
4234 : {
4235 0 : uint32_t level;
4236 0 : uint32_t _level;
4237 1700 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4238 1700 : if (ndr_flags & NDR_SCALARS) {
4239 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4240 1700 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4241 1700 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4242 1700 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4243 1700 : if (_level != level) {
4244 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
4245 : }
4246 1700 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4247 1700 : switch (level) {
4248 1700 : case 1: {
4249 1700 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_SCALARS, &r->req1));
4250 1700 : break; }
4251 :
4252 0 : default:
4253 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4254 : }
4255 : }
4256 1700 : if (ndr_flags & NDR_BUFFERS) {
4257 1700 : if (!(ndr_flags & NDR_SCALARS)) {
4258 : /* We didn't get it above, and the token is not needed after this. */
4259 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4260 : }
4261 1700 : switch (level) {
4262 1700 : case 1:
4263 1700 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_BUFFERS, &r->req1));
4264 1700 : break;
4265 :
4266 0 : default:
4267 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4268 : }
4269 : }
4270 1700 : return NDR_ERR_SUCCESS;
4271 : }
4272 :
4273 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaUpdateRefsRequest *r)
4274 : {
4275 0 : uint32_t level;
4276 0 : level = ndr_print_steal_switch_value(ndr, r);
4277 0 : ndr_print_union(ndr, name, level, "drsuapi_DsReplicaUpdateRefsRequest");
4278 0 : switch (level) {
4279 0 : case 1:
4280 0 : ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(ndr, "req1", &r->req1);
4281 0 : break;
4282 :
4283 0 : default:
4284 0 : ndr_print_bad_level(ndr, name, level);
4285 : }
4286 0 : }
4287 :
4288 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAddRequest1 *r)
4289 : {
4290 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4291 0 : if (ndr_flags & NDR_SCALARS) {
4292 0 : if (r->naming_context == NULL) {
4293 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4294 : }
4295 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4296 0 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
4297 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
4298 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
4299 0 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
4300 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4301 : }
4302 0 : if (ndr_flags & NDR_BUFFERS) {
4303 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
4304 0 : if (r->source_dsa_address) {
4305 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
4306 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4307 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
4308 0 : 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));
4309 : }
4310 : }
4311 0 : return NDR_ERR_SUCCESS;
4312 : }
4313 :
4314 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAddRequest1 *r)
4315 : {
4316 0 : uint32_t _ptr_naming_context;
4317 0 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
4318 0 : uint32_t _ptr_source_dsa_address;
4319 0 : uint32_t size_source_dsa_address_1 = 0;
4320 0 : uint32_t length_source_dsa_address_1 = 0;
4321 0 : TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
4322 0 : uint32_t size_schedule_0 = 0;
4323 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4324 0 : if (ndr_flags & NDR_SCALARS) {
4325 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4326 0 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
4327 0 : if (_ptr_naming_context) {
4328 0 : NDR_PULL_ALLOC(ndr, r->naming_context);
4329 : } else {
4330 0 : r->naming_context = NULL;
4331 : }
4332 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
4333 0 : if (_ptr_source_dsa_address) {
4334 0 : NDR_PULL_ALLOC(ndr, r->source_dsa_address);
4335 : } else {
4336 0 : r->source_dsa_address = NULL;
4337 : }
4338 0 : size_schedule_0 = 84;
4339 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
4340 0 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
4341 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4342 : }
4343 0 : if (ndr_flags & NDR_BUFFERS) {
4344 0 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
4345 0 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
4346 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
4347 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
4348 0 : if (r->source_dsa_address) {
4349 0 : _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
4350 0 : NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
4351 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
4352 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
4353 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
4354 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
4355 0 : if (length_source_dsa_address_1 > size_source_dsa_address_1) {
4356 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_address_1, length_source_dsa_address_1);
4357 : }
4358 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint16_t)));
4359 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint16_t), CH_UTF16));
4360 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
4361 : }
4362 : }
4363 0 : return NDR_ERR_SUCCESS;
4364 : }
4365 :
4366 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest1 *r)
4367 : {
4368 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaAddRequest1");
4369 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4370 0 : ndr->depth++;
4371 0 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
4372 0 : ndr->depth++;
4373 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
4374 0 : ndr->depth--;
4375 0 : ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
4376 0 : ndr->depth++;
4377 0 : if (r->source_dsa_address) {
4378 0 : ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
4379 : }
4380 0 : ndr->depth--;
4381 0 : ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
4382 0 : ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
4383 0 : ndr->depth--;
4384 : }
4385 :
4386 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAddRequest2 *r)
4387 : {
4388 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4389 0 : if (ndr_flags & NDR_SCALARS) {
4390 0 : if (r->naming_context == NULL) {
4391 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4392 : }
4393 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4394 0 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
4395 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_dn));
4396 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport_dn));
4397 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
4398 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
4399 0 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
4400 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4401 : }
4402 0 : if (ndr_flags & NDR_BUFFERS) {
4403 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
4404 0 : if (r->source_dsa_dn) {
4405 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->source_dsa_dn));
4406 : }
4407 0 : if (r->transport_dn) {
4408 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->transport_dn));
4409 : }
4410 0 : if (r->source_dsa_address) {
4411 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
4412 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4413 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
4414 0 : 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));
4415 : }
4416 : }
4417 0 : return NDR_ERR_SUCCESS;
4418 : }
4419 :
4420 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAddRequest2 *r)
4421 : {
4422 0 : uint32_t _ptr_naming_context;
4423 0 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
4424 0 : uint32_t _ptr_source_dsa_dn;
4425 0 : TALLOC_CTX *_mem_save_source_dsa_dn_0 = NULL;
4426 0 : uint32_t _ptr_transport_dn;
4427 0 : TALLOC_CTX *_mem_save_transport_dn_0 = NULL;
4428 0 : uint32_t _ptr_source_dsa_address;
4429 0 : uint32_t size_source_dsa_address_1 = 0;
4430 0 : uint32_t length_source_dsa_address_1 = 0;
4431 0 : TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
4432 0 : uint32_t size_schedule_0 = 0;
4433 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4434 0 : if (ndr_flags & NDR_SCALARS) {
4435 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4436 0 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
4437 0 : if (_ptr_naming_context) {
4438 0 : NDR_PULL_ALLOC(ndr, r->naming_context);
4439 : } else {
4440 0 : r->naming_context = NULL;
4441 : }
4442 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_dn));
4443 0 : if (_ptr_source_dsa_dn) {
4444 0 : NDR_PULL_ALLOC(ndr, r->source_dsa_dn);
4445 : } else {
4446 0 : r->source_dsa_dn = NULL;
4447 : }
4448 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport_dn));
4449 0 : if (_ptr_transport_dn) {
4450 0 : NDR_PULL_ALLOC(ndr, r->transport_dn);
4451 : } else {
4452 0 : r->transport_dn = NULL;
4453 : }
4454 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
4455 0 : if (_ptr_source_dsa_address) {
4456 0 : NDR_PULL_ALLOC(ndr, r->source_dsa_address);
4457 : } else {
4458 0 : r->source_dsa_address = NULL;
4459 : }
4460 0 : size_schedule_0 = 84;
4461 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
4462 0 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
4463 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4464 : }
4465 0 : if (ndr_flags & NDR_BUFFERS) {
4466 0 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
4467 0 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
4468 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
4469 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
4470 0 : if (r->source_dsa_dn) {
4471 0 : _mem_save_source_dsa_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
4472 0 : NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_dn, 0);
4473 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->source_dsa_dn));
4474 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_dn_0, 0);
4475 : }
4476 0 : if (r->transport_dn) {
4477 0 : _mem_save_transport_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
4478 0 : NDR_PULL_SET_MEM_CTX(ndr, r->transport_dn, 0);
4479 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->transport_dn));
4480 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_dn_0, 0);
4481 : }
4482 0 : if (r->source_dsa_address) {
4483 0 : _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
4484 0 : NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
4485 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
4486 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
4487 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
4488 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
4489 0 : if (length_source_dsa_address_1 > size_source_dsa_address_1) {
4490 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_address_1, length_source_dsa_address_1);
4491 : }
4492 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint16_t)));
4493 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint16_t), CH_UTF16));
4494 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
4495 : }
4496 : }
4497 0 : return NDR_ERR_SUCCESS;
4498 : }
4499 :
4500 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest2 *r)
4501 : {
4502 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaAddRequest2");
4503 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4504 0 : ndr->depth++;
4505 0 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
4506 0 : ndr->depth++;
4507 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
4508 0 : ndr->depth--;
4509 0 : ndr_print_ptr(ndr, "source_dsa_dn", r->source_dsa_dn);
4510 0 : ndr->depth++;
4511 0 : if (r->source_dsa_dn) {
4512 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "source_dsa_dn", r->source_dsa_dn);
4513 : }
4514 0 : ndr->depth--;
4515 0 : ndr_print_ptr(ndr, "transport_dn", r->transport_dn);
4516 0 : ndr->depth++;
4517 0 : if (r->transport_dn) {
4518 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "transport_dn", r->transport_dn);
4519 : }
4520 0 : ndr->depth--;
4521 0 : ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
4522 0 : ndr->depth++;
4523 0 : if (r->source_dsa_address) {
4524 0 : ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
4525 : }
4526 0 : ndr->depth--;
4527 0 : ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
4528 0 : ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
4529 0 : ndr->depth--;
4530 : }
4531 :
4532 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaAddRequest *r)
4533 : {
4534 0 : uint32_t level;
4535 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4536 0 : if (ndr_flags & NDR_SCALARS) {
4537 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4538 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4539 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4540 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
4541 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4542 0 : switch (level) {
4543 0 : case 1: {
4544 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr, NDR_SCALARS, &r->req1));
4545 0 : break; }
4546 :
4547 0 : case 2: {
4548 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest2(ndr, NDR_SCALARS, &r->req2));
4549 0 : break; }
4550 :
4551 0 : default:
4552 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4553 : }
4554 : }
4555 0 : if (ndr_flags & NDR_BUFFERS) {
4556 0 : if (!(ndr_flags & NDR_SCALARS)) {
4557 : /* We didn't get it above, and the token is not needed after this. */
4558 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4559 : }
4560 0 : switch (level) {
4561 0 : case 1:
4562 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr, NDR_BUFFERS, &r->req1));
4563 0 : break;
4564 :
4565 0 : case 2:
4566 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest2(ndr, NDR_BUFFERS, &r->req2));
4567 0 : break;
4568 :
4569 0 : default:
4570 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4571 : }
4572 : }
4573 0 : return NDR_ERR_SUCCESS;
4574 : }
4575 :
4576 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaAddRequest *r)
4577 : {
4578 0 : uint32_t level;
4579 0 : uint32_t _level;
4580 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4581 0 : if (ndr_flags & NDR_SCALARS) {
4582 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4583 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4584 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4585 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4586 0 : if (_level != level) {
4587 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
4588 : }
4589 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4590 0 : switch (level) {
4591 0 : case 1: {
4592 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr, NDR_SCALARS, &r->req1));
4593 0 : break; }
4594 :
4595 0 : case 2: {
4596 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest2(ndr, NDR_SCALARS, &r->req2));
4597 0 : break; }
4598 :
4599 0 : default:
4600 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4601 : }
4602 : }
4603 0 : if (ndr_flags & NDR_BUFFERS) {
4604 0 : if (!(ndr_flags & NDR_SCALARS)) {
4605 : /* We didn't get it above, and the token is not needed after this. */
4606 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4607 : }
4608 0 : switch (level) {
4609 0 : case 1:
4610 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr, NDR_BUFFERS, &r->req1));
4611 0 : break;
4612 :
4613 0 : case 2:
4614 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest2(ndr, NDR_BUFFERS, &r->req2));
4615 0 : break;
4616 :
4617 0 : default:
4618 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4619 : }
4620 : }
4621 0 : return NDR_ERR_SUCCESS;
4622 : }
4623 :
4624 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaAddRequest *r)
4625 : {
4626 0 : uint32_t level;
4627 0 : level = ndr_print_steal_switch_value(ndr, r);
4628 0 : ndr_print_union(ndr, name, level, "drsuapi_DsReplicaAddRequest");
4629 0 : switch (level) {
4630 0 : case 1:
4631 0 : ndr_print_drsuapi_DsReplicaAddRequest1(ndr, "req1", &r->req1);
4632 0 : break;
4633 :
4634 0 : case 2:
4635 0 : ndr_print_drsuapi_DsReplicaAddRequest2(ndr, "req2", &r->req2);
4636 0 : break;
4637 :
4638 0 : default:
4639 0 : ndr_print_bad_level(ndr, name, level);
4640 : }
4641 0 : }
4642 :
4643 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaDelRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaDelRequest1 *r)
4644 : {
4645 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4646 0 : if (ndr_flags & NDR_SCALARS) {
4647 0 : if (r->naming_context == NULL) {
4648 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4649 : }
4650 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4651 0 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
4652 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
4653 0 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
4654 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4655 : }
4656 0 : if (ndr_flags & NDR_BUFFERS) {
4657 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
4658 0 : if (r->source_dsa_address) {
4659 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF8)));
4660 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4661 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF8)));
4662 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_address, ndr_charset_length(r->source_dsa_address, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4663 : }
4664 : }
4665 0 : return NDR_ERR_SUCCESS;
4666 : }
4667 :
4668 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDelRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaDelRequest1 *r)
4669 : {
4670 0 : uint32_t _ptr_naming_context;
4671 0 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
4672 0 : uint32_t _ptr_source_dsa_address;
4673 0 : uint32_t size_source_dsa_address_1 = 0;
4674 0 : uint32_t length_source_dsa_address_1 = 0;
4675 0 : TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
4676 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4677 0 : if (ndr_flags & NDR_SCALARS) {
4678 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4679 0 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
4680 0 : if (_ptr_naming_context) {
4681 0 : NDR_PULL_ALLOC(ndr, r->naming_context);
4682 : } else {
4683 0 : r->naming_context = NULL;
4684 : }
4685 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
4686 0 : if (_ptr_source_dsa_address) {
4687 0 : NDR_PULL_ALLOC(ndr, r->source_dsa_address);
4688 : } else {
4689 0 : r->source_dsa_address = NULL;
4690 : }
4691 0 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
4692 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4693 : }
4694 0 : if (ndr_flags & NDR_BUFFERS) {
4695 0 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
4696 0 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
4697 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
4698 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
4699 0 : if (r->source_dsa_address) {
4700 0 : _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
4701 0 : NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
4702 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
4703 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
4704 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
4705 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
4706 0 : if (length_source_dsa_address_1 > size_source_dsa_address_1) {
4707 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_address_1, length_source_dsa_address_1);
4708 : }
4709 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint8_t)));
4710 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint8_t), CH_UTF8));
4711 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
4712 : }
4713 : }
4714 0 : return NDR_ERR_SUCCESS;
4715 : }
4716 :
4717 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaDelRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaDelRequest1 *r)
4718 : {
4719 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaDelRequest1");
4720 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4721 0 : ndr->depth++;
4722 0 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
4723 0 : ndr->depth++;
4724 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
4725 0 : ndr->depth--;
4726 0 : ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
4727 0 : ndr->depth++;
4728 0 : if (r->source_dsa_address) {
4729 0 : ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
4730 : }
4731 0 : ndr->depth--;
4732 0 : ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
4733 0 : ndr->depth--;
4734 : }
4735 :
4736 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaDelRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaDelRequest *r)
4737 : {
4738 0 : uint32_t level;
4739 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4740 0 : if (ndr_flags & NDR_SCALARS) {
4741 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4742 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4743 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4744 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
4745 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4746 0 : switch (level) {
4747 0 : case 1: {
4748 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr, NDR_SCALARS, &r->req1));
4749 0 : break; }
4750 :
4751 0 : default:
4752 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4753 : }
4754 : }
4755 0 : if (ndr_flags & NDR_BUFFERS) {
4756 0 : if (!(ndr_flags & NDR_SCALARS)) {
4757 : /* We didn't get it above, and the token is not needed after this. */
4758 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4759 : }
4760 0 : switch (level) {
4761 0 : case 1:
4762 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr, NDR_BUFFERS, &r->req1));
4763 0 : break;
4764 :
4765 0 : default:
4766 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4767 : }
4768 : }
4769 0 : return NDR_ERR_SUCCESS;
4770 : }
4771 :
4772 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDelRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaDelRequest *r)
4773 : {
4774 0 : uint32_t level;
4775 0 : uint32_t _level;
4776 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4777 0 : if (ndr_flags & NDR_SCALARS) {
4778 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4779 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4780 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4781 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4782 0 : if (_level != level) {
4783 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
4784 : }
4785 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4786 0 : switch (level) {
4787 0 : case 1: {
4788 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr, NDR_SCALARS, &r->req1));
4789 0 : break; }
4790 :
4791 0 : default:
4792 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4793 : }
4794 : }
4795 0 : if (ndr_flags & NDR_BUFFERS) {
4796 0 : if (!(ndr_flags & NDR_SCALARS)) {
4797 : /* We didn't get it above, and the token is not needed after this. */
4798 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4799 : }
4800 0 : switch (level) {
4801 0 : case 1:
4802 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr, NDR_BUFFERS, &r->req1));
4803 0 : break;
4804 :
4805 0 : default:
4806 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4807 : }
4808 : }
4809 0 : return NDR_ERR_SUCCESS;
4810 : }
4811 :
4812 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaDelRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaDelRequest *r)
4813 : {
4814 0 : uint32_t level;
4815 0 : level = ndr_print_steal_switch_value(ndr, r);
4816 0 : ndr_print_union(ndr, name, level, "drsuapi_DsReplicaDelRequest");
4817 0 : switch (level) {
4818 0 : case 1:
4819 0 : ndr_print_drsuapi_DsReplicaDelRequest1(ndr, "req1", &r->req1);
4820 0 : break;
4821 :
4822 0 : default:
4823 0 : ndr_print_bad_level(ndr, name, level);
4824 : }
4825 0 : }
4826 :
4827 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaModRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaModRequest1 *r)
4828 : {
4829 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4830 0 : if (ndr_flags & NDR_SCALARS) {
4831 0 : if (r->naming_context == NULL) {
4832 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4833 : }
4834 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4835 0 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
4836 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dra));
4837 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dra_address));
4838 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
4839 0 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
4840 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->modify_fields));
4841 0 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
4842 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4843 : }
4844 0 : if (ndr_flags & NDR_BUFFERS) {
4845 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
4846 0 : if (r->source_dra_address) {
4847 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dra_address, CH_UTF16)));
4848 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4849 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dra_address, CH_UTF16)));
4850 0 : 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));
4851 : }
4852 : }
4853 0 : return NDR_ERR_SUCCESS;
4854 : }
4855 :
4856 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaModRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaModRequest1 *r)
4857 : {
4858 0 : uint32_t _ptr_naming_context;
4859 0 : TALLOC_CTX *_mem_save_naming_context_0 = NULL;
4860 0 : uint32_t _ptr_source_dra_address;
4861 0 : uint32_t size_source_dra_address_1 = 0;
4862 0 : uint32_t length_source_dra_address_1 = 0;
4863 0 : TALLOC_CTX *_mem_save_source_dra_address_0 = NULL;
4864 0 : uint32_t size_schedule_0 = 0;
4865 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4866 0 : if (ndr_flags & NDR_SCALARS) {
4867 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4868 0 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
4869 0 : if (_ptr_naming_context) {
4870 0 : NDR_PULL_ALLOC(ndr, r->naming_context);
4871 : } else {
4872 0 : r->naming_context = NULL;
4873 : }
4874 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dra));
4875 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dra_address));
4876 0 : if (_ptr_source_dra_address) {
4877 0 : NDR_PULL_ALLOC(ndr, r->source_dra_address);
4878 : } else {
4879 0 : r->source_dra_address = NULL;
4880 : }
4881 0 : size_schedule_0 = 84;
4882 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
4883 0 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
4884 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->modify_fields));
4885 0 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
4886 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4887 : }
4888 0 : if (ndr_flags & NDR_BUFFERS) {
4889 0 : _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
4890 0 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
4891 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
4892 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
4893 0 : if (r->source_dra_address) {
4894 0 : _mem_save_source_dra_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
4895 0 : NDR_PULL_SET_MEM_CTX(ndr, r->source_dra_address, 0);
4896 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dra_address));
4897 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dra_address));
4898 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dra_address, &size_source_dra_address_1));
4899 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dra_address, &length_source_dra_address_1));
4900 0 : if (length_source_dra_address_1 > size_source_dra_address_1) {
4901 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dra_address_1, length_source_dra_address_1);
4902 : }
4903 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dra_address_1, sizeof(uint16_t)));
4904 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dra_address, length_source_dra_address_1, sizeof(uint16_t), CH_UTF16));
4905 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dra_address_0, 0);
4906 : }
4907 : }
4908 0 : return NDR_ERR_SUCCESS;
4909 : }
4910 :
4911 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaModRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaModRequest1 *r)
4912 : {
4913 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaModRequest1");
4914 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4915 0 : ndr->depth++;
4916 0 : ndr_print_ptr(ndr, "naming_context", r->naming_context);
4917 0 : ndr->depth++;
4918 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
4919 0 : ndr->depth--;
4920 0 : ndr_print_GUID(ndr, "source_dra", &r->source_dra);
4921 0 : ndr_print_ptr(ndr, "source_dra_address", r->source_dra_address);
4922 0 : ndr->depth++;
4923 0 : if (r->source_dra_address) {
4924 0 : ndr_print_string(ndr, "source_dra_address", r->source_dra_address);
4925 : }
4926 0 : ndr->depth--;
4927 0 : ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
4928 0 : ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
4929 0 : ndr_print_uint32(ndr, "modify_fields", r->modify_fields);
4930 0 : ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
4931 0 : ndr->depth--;
4932 : }
4933 :
4934 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaModRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaModRequest *r)
4935 : {
4936 0 : uint32_t level;
4937 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4938 0 : if (ndr_flags & NDR_SCALARS) {
4939 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4940 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4941 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4942 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
4943 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4944 0 : switch (level) {
4945 0 : case 1: {
4946 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr, NDR_SCALARS, &r->req1));
4947 0 : break; }
4948 :
4949 0 : default:
4950 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4951 : }
4952 : }
4953 0 : if (ndr_flags & NDR_BUFFERS) {
4954 0 : if (!(ndr_flags & NDR_SCALARS)) {
4955 : /* We didn't get it above, and the token is not needed after this. */
4956 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4957 : }
4958 0 : switch (level) {
4959 0 : case 1:
4960 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr, NDR_BUFFERS, &r->req1));
4961 0 : break;
4962 :
4963 0 : default:
4964 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4965 : }
4966 : }
4967 0 : return NDR_ERR_SUCCESS;
4968 : }
4969 :
4970 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaModRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaModRequest *r)
4971 : {
4972 0 : uint32_t level;
4973 0 : uint32_t _level;
4974 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4975 0 : if (ndr_flags & NDR_SCALARS) {
4976 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4977 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4978 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4979 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4980 0 : if (_level != level) {
4981 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
4982 : }
4983 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4984 0 : switch (level) {
4985 0 : case 1: {
4986 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr, NDR_SCALARS, &r->req1));
4987 0 : break; }
4988 :
4989 0 : default:
4990 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4991 : }
4992 : }
4993 0 : if (ndr_flags & NDR_BUFFERS) {
4994 0 : if (!(ndr_flags & NDR_SCALARS)) {
4995 : /* We didn't get it above, and the token is not needed after this. */
4996 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4997 : }
4998 0 : switch (level) {
4999 0 : case 1:
5000 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr, NDR_BUFFERS, &r->req1));
5001 0 : break;
5002 :
5003 0 : default:
5004 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5005 : }
5006 : }
5007 0 : return NDR_ERR_SUCCESS;
5008 : }
5009 :
5010 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaModRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaModRequest *r)
5011 : {
5012 0 : uint32_t level;
5013 0 : level = ndr_print_steal_switch_value(ndr, r);
5014 0 : ndr_print_union(ndr, name, level, "drsuapi_DsReplicaModRequest");
5015 0 : switch (level) {
5016 0 : case 1:
5017 0 : ndr_print_drsuapi_DsReplicaModRequest1(ndr, "req1", &r->req1);
5018 0 : break;
5019 :
5020 0 : default:
5021 0 : ndr_print_bad_level(ndr, name, level);
5022 : }
5023 0 : }
5024 :
5025 0 : static enum ndr_err_code ndr_push_drsuapi_DsMembershipType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsMembershipType r)
5026 : {
5027 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
5028 0 : return NDR_ERR_SUCCESS;
5029 : }
5030 :
5031 0 : static enum ndr_err_code ndr_pull_drsuapi_DsMembershipType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsMembershipType *r)
5032 : {
5033 0 : uint32_t v;
5034 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
5035 0 : *r = v;
5036 0 : return NDR_ERR_SUCCESS;
5037 : }
5038 :
5039 0 : _PUBLIC_ void ndr_print_drsuapi_DsMembershipType(struct ndr_print *ndr, const char *name, enum drsuapi_DsMembershipType r)
5040 : {
5041 0 : const char *val = NULL;
5042 :
5043 0 : switch (r) {
5044 0 : case DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS"; break;
5045 0 : case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS"; break;
5046 0 : case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS"; break;
5047 0 : case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2"; break;
5048 0 : case DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS"; break;
5049 0 : case DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS"; break;
5050 0 : case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2"; break;
5051 : }
5052 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
5053 0 : }
5054 :
5055 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetMembershipsCtr1 *r)
5056 : {
5057 0 : uint32_t cntr_info_array_1;
5058 0 : uint32_t cntr_group_attrs_1;
5059 0 : uint32_t cntr_sids_1;
5060 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5061 0 : if (ndr_flags & NDR_SCALARS) {
5062 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5063 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
5064 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_memberships));
5065 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
5066 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array));
5067 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_attrs));
5068 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
5069 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5070 : }
5071 0 : if (ndr_flags & NDR_BUFFERS) {
5072 0 : if (r->info_array) {
5073 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_memberships));
5074 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->num_memberships); cntr_info_array_1++) {
5075 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array[cntr_info_array_1]));
5076 : }
5077 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->num_memberships); cntr_info_array_1++) {
5078 0 : if (r->info_array[cntr_info_array_1]) {
5079 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
5080 : }
5081 : }
5082 : }
5083 0 : if (r->group_attrs) {
5084 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_memberships));
5085 0 : for (cntr_group_attrs_1 = 0; cntr_group_attrs_1 < (r->num_memberships); cntr_group_attrs_1++) {
5086 0 : NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->group_attrs[cntr_group_attrs_1]));
5087 : }
5088 : }
5089 0 : if (r->sids) {
5090 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sids));
5091 0 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
5092 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids[cntr_sids_1]));
5093 : }
5094 0 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
5095 0 : if (r->sids[cntr_sids_1]) {
5096 0 : NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids[cntr_sids_1]));
5097 : }
5098 : }
5099 : }
5100 : }
5101 0 : return NDR_ERR_SUCCESS;
5102 : }
5103 :
5104 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetMembershipsCtr1 *r)
5105 : {
5106 0 : uint32_t _ptr_info_array;
5107 0 : uint32_t size_info_array_1 = 0;
5108 0 : uint32_t cntr_info_array_1;
5109 0 : TALLOC_CTX *_mem_save_info_array_0 = NULL;
5110 0 : TALLOC_CTX *_mem_save_info_array_1 = NULL;
5111 0 : TALLOC_CTX *_mem_save_info_array_2 = NULL;
5112 0 : uint32_t _ptr_group_attrs;
5113 0 : uint32_t size_group_attrs_1 = 0;
5114 0 : uint32_t cntr_group_attrs_1;
5115 0 : TALLOC_CTX *_mem_save_group_attrs_0 = NULL;
5116 0 : TALLOC_CTX *_mem_save_group_attrs_1 = NULL;
5117 0 : uint32_t _ptr_sids;
5118 0 : uint32_t size_sids_1 = 0;
5119 0 : uint32_t cntr_sids_1;
5120 0 : TALLOC_CTX *_mem_save_sids_0 = NULL;
5121 0 : TALLOC_CTX *_mem_save_sids_1 = NULL;
5122 0 : TALLOC_CTX *_mem_save_sids_2 = NULL;
5123 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5124 0 : if (ndr_flags & NDR_SCALARS) {
5125 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5126 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
5127 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_memberships));
5128 0 : if (r->num_memberships > 10000) {
5129 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_memberships), (uint32_t)(0), (uint32_t)(10000));
5130 : }
5131 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
5132 0 : if (r->num_sids > 10000) {
5133 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_sids), (uint32_t)(0), (uint32_t)(10000));
5134 : }
5135 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
5136 0 : if (_ptr_info_array) {
5137 0 : NDR_PULL_ALLOC(ndr, r->info_array);
5138 : } else {
5139 0 : r->info_array = NULL;
5140 : }
5141 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_attrs));
5142 0 : if (_ptr_group_attrs) {
5143 0 : NDR_PULL_ALLOC(ndr, r->group_attrs);
5144 : } else {
5145 0 : r->group_attrs = NULL;
5146 : }
5147 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
5148 0 : if (_ptr_sids) {
5149 0 : NDR_PULL_ALLOC(ndr, r->sids);
5150 : } else {
5151 0 : r->sids = NULL;
5152 : }
5153 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5154 : }
5155 0 : if (ndr_flags & NDR_BUFFERS) {
5156 0 : if (r->info_array) {
5157 0 : _mem_save_info_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5158 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
5159 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->info_array));
5160 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->info_array, &size_info_array_1));
5161 0 : NDR_PULL_ALLOC_N(ndr, r->info_array, size_info_array_1);
5162 0 : _mem_save_info_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5163 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
5164 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
5165 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
5166 0 : if (_ptr_info_array) {
5167 0 : NDR_PULL_ALLOC(ndr, r->info_array[cntr_info_array_1]);
5168 : } else {
5169 0 : r->info_array[cntr_info_array_1] = NULL;
5170 : }
5171 : }
5172 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
5173 0 : if (r->info_array[cntr_info_array_1]) {
5174 0 : _mem_save_info_array_2 = NDR_PULL_GET_MEM_CTX(ndr);
5175 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info_array[cntr_info_array_1], 0);
5176 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
5177 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_2, 0);
5178 : }
5179 : }
5180 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_1, 0);
5181 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_0, 0);
5182 : }
5183 0 : if (r->group_attrs) {
5184 0 : _mem_save_group_attrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
5185 0 : NDR_PULL_SET_MEM_CTX(ndr, r->group_attrs, 0);
5186 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->group_attrs));
5187 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->group_attrs, &size_group_attrs_1));
5188 0 : NDR_PULL_ALLOC_N(ndr, r->group_attrs, size_group_attrs_1);
5189 0 : _mem_save_group_attrs_1 = NDR_PULL_GET_MEM_CTX(ndr);
5190 0 : NDR_PULL_SET_MEM_CTX(ndr, r->group_attrs, 0);
5191 0 : for (cntr_group_attrs_1 = 0; cntr_group_attrs_1 < (size_group_attrs_1); cntr_group_attrs_1++) {
5192 0 : NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->group_attrs[cntr_group_attrs_1]));
5193 : }
5194 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_attrs_1, 0);
5195 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_attrs_0, 0);
5196 : }
5197 0 : if (r->sids) {
5198 0 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
5199 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
5200 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
5201 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
5202 0 : NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
5203 0 : _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
5204 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
5205 0 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
5206 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
5207 0 : if (_ptr_sids) {
5208 0 : NDR_PULL_ALLOC(ndr, r->sids[cntr_sids_1]);
5209 : } else {
5210 0 : r->sids[cntr_sids_1] = NULL;
5211 : }
5212 : }
5213 0 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
5214 0 : if (r->sids[cntr_sids_1]) {
5215 0 : _mem_save_sids_2 = NDR_PULL_GET_MEM_CTX(ndr);
5216 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sids[cntr_sids_1], 0);
5217 0 : NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids[cntr_sids_1]));
5218 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_2, 0);
5219 : }
5220 : }
5221 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
5222 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
5223 : }
5224 0 : if (r->info_array) {
5225 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->info_array, r->num_memberships));
5226 : }
5227 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
5228 0 : }
5229 0 : if (r->group_attrs) {
5230 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->group_attrs, r->num_memberships));
5231 : }
5232 0 : if (r->sids) {
5233 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
5234 : }
5235 0 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
5236 0 : }
5237 : }
5238 0 : return NDR_ERR_SUCCESS;
5239 : }
5240 :
5241 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMembershipsCtr1 *r)
5242 : {
5243 0 : uint32_t cntr_info_array_1;
5244 0 : uint32_t cntr_group_attrs_1;
5245 0 : uint32_t cntr_sids_1;
5246 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetMembershipsCtr1");
5247 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5248 0 : ndr->depth++;
5249 0 : ndr_print_NTSTATUS(ndr, "status", r->status);
5250 0 : ndr_print_uint32(ndr, "num_memberships", r->num_memberships);
5251 0 : ndr_print_uint32(ndr, "num_sids", r->num_sids);
5252 0 : ndr_print_ptr(ndr, "info_array", r->info_array);
5253 0 : ndr->depth++;
5254 0 : if (r->info_array) {
5255 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info_array", (uint32_t)(r->num_memberships));
5256 0 : ndr->depth++;
5257 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->num_memberships); cntr_info_array_1++) {
5258 0 : ndr_print_ptr(ndr, "info_array", r->info_array[cntr_info_array_1]);
5259 0 : ndr->depth++;
5260 0 : if (r->info_array[cntr_info_array_1]) {
5261 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "info_array", r->info_array[cntr_info_array_1]);
5262 : }
5263 0 : ndr->depth--;
5264 : }
5265 0 : ndr->depth--;
5266 : }
5267 0 : ndr->depth--;
5268 0 : ndr_print_ptr(ndr, "group_attrs", r->group_attrs);
5269 0 : ndr->depth++;
5270 0 : if (r->group_attrs) {
5271 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "group_attrs", (uint32_t)(r->num_memberships));
5272 0 : ndr->depth++;
5273 0 : for (cntr_group_attrs_1 = 0; cntr_group_attrs_1 < (r->num_memberships); cntr_group_attrs_1++) {
5274 0 : ndr_print_security_GroupAttrs(ndr, "group_attrs", r->group_attrs[cntr_group_attrs_1]);
5275 : }
5276 0 : ndr->depth--;
5277 : }
5278 0 : ndr->depth--;
5279 0 : ndr_print_ptr(ndr, "sids", r->sids);
5280 0 : ndr->depth++;
5281 0 : if (r->sids) {
5282 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sids", (uint32_t)(r->num_sids));
5283 0 : ndr->depth++;
5284 0 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
5285 0 : ndr_print_ptr(ndr, "sids", r->sids[cntr_sids_1]);
5286 0 : ndr->depth++;
5287 0 : if (r->sids[cntr_sids_1]) {
5288 0 : ndr_print_dom_sid28(ndr, "sids", r->sids[cntr_sids_1]);
5289 : }
5290 0 : ndr->depth--;
5291 : }
5292 0 : ndr->depth--;
5293 : }
5294 0 : ndr->depth--;
5295 0 : ndr->depth--;
5296 : }
5297 :
5298 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetMembershipsCtr *r)
5299 : {
5300 0 : uint32_t level;
5301 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5302 0 : if (ndr_flags & NDR_SCALARS) {
5303 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5304 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5305 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5306 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5307 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5308 0 : switch (level) {
5309 0 : case 1: {
5310 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1));
5311 0 : break; }
5312 :
5313 0 : default:
5314 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5315 : }
5316 : }
5317 0 : if (ndr_flags & NDR_BUFFERS) {
5318 0 : if (!(ndr_flags & NDR_SCALARS)) {
5319 : /* We didn't get it above, and the token is not needed after this. */
5320 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5321 : }
5322 0 : switch (level) {
5323 0 : case 1:
5324 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_BUFFERS, &r->ctr1));
5325 0 : break;
5326 :
5327 0 : default:
5328 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5329 : }
5330 : }
5331 0 : return NDR_ERR_SUCCESS;
5332 : }
5333 :
5334 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetMembershipsCtr *r)
5335 : {
5336 0 : uint32_t level;
5337 0 : uint32_t _level;
5338 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5339 0 : if (ndr_flags & NDR_SCALARS) {
5340 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5341 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5342 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5343 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5344 0 : if (_level != level) {
5345 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
5346 : }
5347 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5348 0 : switch (level) {
5349 0 : case 1: {
5350 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1));
5351 0 : break; }
5352 :
5353 0 : default:
5354 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5355 : }
5356 : }
5357 0 : if (ndr_flags & NDR_BUFFERS) {
5358 0 : if (!(ndr_flags & NDR_SCALARS)) {
5359 : /* We didn't get it above, and the token is not needed after this. */
5360 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5361 : }
5362 0 : switch (level) {
5363 0 : case 1:
5364 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_BUFFERS, &r->ctr1));
5365 0 : break;
5366 :
5367 0 : default:
5368 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5369 : }
5370 : }
5371 0 : return NDR_ERR_SUCCESS;
5372 : }
5373 :
5374 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMembershipsCtr *r)
5375 : {
5376 0 : uint32_t level;
5377 0 : level = ndr_print_steal_switch_value(ndr, r);
5378 0 : ndr_print_union(ndr, name, level, "drsuapi_DsGetMembershipsCtr");
5379 0 : switch (level) {
5380 0 : case 1:
5381 0 : ndr_print_drsuapi_DsGetMembershipsCtr1(ndr, "ctr1", &r->ctr1);
5382 0 : break;
5383 :
5384 0 : default:
5385 0 : ndr_print_bad_level(ndr, name, level);
5386 : }
5387 0 : }
5388 :
5389 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetMembershipsRequest1 *r)
5390 : {
5391 0 : uint32_t cntr_info_array_1;
5392 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5393 0 : if (ndr_flags & NDR_SCALARS) {
5394 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5395 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5396 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array));
5397 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
5398 0 : NDR_CHECK(ndr_push_drsuapi_DsMembershipType(ndr, NDR_SCALARS, r->type));
5399 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
5400 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5401 : }
5402 0 : if (ndr_flags & NDR_BUFFERS) {
5403 0 : if (r->info_array) {
5404 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5405 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->count); cntr_info_array_1++) {
5406 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array[cntr_info_array_1]));
5407 : }
5408 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->count); cntr_info_array_1++) {
5409 0 : if (r->info_array[cntr_info_array_1]) {
5410 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
5411 : }
5412 : }
5413 : }
5414 0 : if (r->domain) {
5415 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
5416 : }
5417 : }
5418 0 : return NDR_ERR_SUCCESS;
5419 : }
5420 :
5421 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetMembershipsRequest1 *r)
5422 : {
5423 0 : uint32_t _ptr_info_array;
5424 0 : uint32_t size_info_array_1 = 0;
5425 0 : uint32_t cntr_info_array_1;
5426 0 : TALLOC_CTX *_mem_save_info_array_0 = NULL;
5427 0 : TALLOC_CTX *_mem_save_info_array_1 = NULL;
5428 0 : TALLOC_CTX *_mem_save_info_array_2 = NULL;
5429 0 : uint32_t _ptr_domain;
5430 0 : TALLOC_CTX *_mem_save_domain_0 = NULL;
5431 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5432 0 : if (ndr_flags & NDR_SCALARS) {
5433 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5434 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5435 0 : if (r->count < 1 || r->count > 10000) {
5436 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(1), (uint32_t)(10000));
5437 : }
5438 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
5439 0 : if (_ptr_info_array) {
5440 0 : NDR_PULL_ALLOC(ndr, r->info_array);
5441 : } else {
5442 0 : r->info_array = NULL;
5443 : }
5444 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
5445 0 : NDR_CHECK(ndr_pull_drsuapi_DsMembershipType(ndr, NDR_SCALARS, &r->type));
5446 0 : if (r->type < 1 || r->type > 7) {
5447 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%d) out of range (%d - %d)", (int)(r->type), (int)(1), (int)(7));
5448 : }
5449 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
5450 0 : if (_ptr_domain) {
5451 0 : NDR_PULL_ALLOC(ndr, r->domain);
5452 : } else {
5453 0 : r->domain = NULL;
5454 : }
5455 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5456 : }
5457 0 : if (ndr_flags & NDR_BUFFERS) {
5458 0 : if (r->info_array) {
5459 0 : _mem_save_info_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5460 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
5461 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->info_array));
5462 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->info_array, &size_info_array_1));
5463 0 : NDR_PULL_ALLOC_N(ndr, r->info_array, size_info_array_1);
5464 0 : _mem_save_info_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5465 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
5466 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
5467 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
5468 0 : if (_ptr_info_array) {
5469 0 : NDR_PULL_ALLOC(ndr, r->info_array[cntr_info_array_1]);
5470 : } else {
5471 0 : r->info_array[cntr_info_array_1] = NULL;
5472 : }
5473 : }
5474 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
5475 0 : if (r->info_array[cntr_info_array_1]) {
5476 0 : _mem_save_info_array_2 = NDR_PULL_GET_MEM_CTX(ndr);
5477 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info_array[cntr_info_array_1], 0);
5478 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
5479 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_2, 0);
5480 : }
5481 : }
5482 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_1, 0);
5483 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_0, 0);
5484 : }
5485 0 : if (r->domain) {
5486 0 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
5487 0 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
5488 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
5489 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
5490 : }
5491 0 : if (r->info_array) {
5492 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->info_array, r->count));
5493 : }
5494 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
5495 0 : }
5496 : }
5497 0 : return NDR_ERR_SUCCESS;
5498 : }
5499 :
5500 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMembershipsRequest1 *r)
5501 : {
5502 0 : uint32_t cntr_info_array_1;
5503 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetMembershipsRequest1");
5504 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5505 0 : ndr->depth++;
5506 0 : ndr_print_uint32(ndr, "count", r->count);
5507 0 : ndr_print_ptr(ndr, "info_array", r->info_array);
5508 0 : ndr->depth++;
5509 0 : if (r->info_array) {
5510 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info_array", (uint32_t)(r->count));
5511 0 : ndr->depth++;
5512 0 : for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->count); cntr_info_array_1++) {
5513 0 : ndr_print_ptr(ndr, "info_array", r->info_array[cntr_info_array_1]);
5514 0 : ndr->depth++;
5515 0 : if (r->info_array[cntr_info_array_1]) {
5516 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "info_array", r->info_array[cntr_info_array_1]);
5517 : }
5518 0 : ndr->depth--;
5519 : }
5520 0 : ndr->depth--;
5521 : }
5522 0 : ndr->depth--;
5523 0 : ndr_print_uint32(ndr, "flags", r->flags);
5524 0 : ndr_print_drsuapi_DsMembershipType(ndr, "type", r->type);
5525 0 : ndr_print_ptr(ndr, "domain", r->domain);
5526 0 : ndr->depth++;
5527 0 : if (r->domain) {
5528 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "domain", r->domain);
5529 : }
5530 0 : ndr->depth--;
5531 0 : ndr->depth--;
5532 : }
5533 :
5534 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetMembershipsRequest *r)
5535 : {
5536 0 : uint32_t level;
5537 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5538 0 : if (ndr_flags & NDR_SCALARS) {
5539 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5540 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5541 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5542 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5543 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5544 0 : switch (level) {
5545 0 : case 1: {
5546 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS, &r->req1));
5547 0 : break; }
5548 :
5549 0 : default:
5550 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5551 : }
5552 : }
5553 0 : if (ndr_flags & NDR_BUFFERS) {
5554 0 : if (!(ndr_flags & NDR_SCALARS)) {
5555 : /* We didn't get it above, and the token is not needed after this. */
5556 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5557 : }
5558 0 : switch (level) {
5559 0 : case 1:
5560 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr, NDR_BUFFERS, &r->req1));
5561 0 : break;
5562 :
5563 0 : default:
5564 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5565 : }
5566 : }
5567 0 : return NDR_ERR_SUCCESS;
5568 : }
5569 :
5570 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetMembershipsRequest *r)
5571 : {
5572 0 : uint32_t level;
5573 0 : uint32_t _level;
5574 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5575 0 : if (ndr_flags & NDR_SCALARS) {
5576 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5577 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5578 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5579 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5580 0 : if (_level != level) {
5581 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
5582 : }
5583 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5584 0 : switch (level) {
5585 0 : case 1: {
5586 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS, &r->req1));
5587 0 : break; }
5588 :
5589 0 : default:
5590 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5591 : }
5592 : }
5593 0 : if (ndr_flags & NDR_BUFFERS) {
5594 0 : if (!(ndr_flags & NDR_SCALARS)) {
5595 : /* We didn't get it above, and the token is not needed after this. */
5596 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5597 : }
5598 0 : switch (level) {
5599 0 : case 1:
5600 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr, NDR_BUFFERS, &r->req1));
5601 0 : break;
5602 :
5603 0 : default:
5604 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5605 : }
5606 : }
5607 0 : return NDR_ERR_SUCCESS;
5608 : }
5609 :
5610 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMembershipsRequest *r)
5611 : {
5612 0 : uint32_t level;
5613 0 : level = ndr_print_steal_switch_value(ndr, r);
5614 0 : ndr_print_union(ndr, name, level, "drsuapi_DsGetMembershipsRequest");
5615 0 : switch (level) {
5616 0 : case 1:
5617 0 : ndr_print_drsuapi_DsGetMembershipsRequest1(ndr, "req1", &r->req1);
5618 0 : break;
5619 :
5620 0 : default:
5621 0 : ndr_print_bad_level(ndr, name, level);
5622 : }
5623 0 : }
5624 :
5625 4 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
5626 : {
5627 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
5628 4 : return NDR_ERR_SUCCESS;
5629 : }
5630 :
5631 4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
5632 : {
5633 0 : uint32_t v;
5634 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
5635 4 : *r = v;
5636 4 : return NDR_ERR_SUCCESS;
5637 : }
5638 :
5639 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogFlags(struct ndr_print *ndr, const char *name, uint32_t r)
5640 : {
5641 0 : ndr_print_uint32(ndr, name, r);
5642 0 : ndr->depth++;
5643 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG", DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG, r);
5644 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS", DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS, r);
5645 0 : ndr->depth--;
5646 0 : }
5647 :
5648 8 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNT4ChangeLogRequest1 *r)
5649 : {
5650 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5651 8 : if (ndr_flags & NDR_SCALARS) {
5652 4 : NDR_CHECK(ndr_push_align(ndr, 5));
5653 4 : NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogFlags(ndr, NDR_SCALARS, r->flags));
5654 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->preferred_maximum_length));
5655 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->restart_length));
5656 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->restart_data));
5657 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5658 : }
5659 8 : if (ndr_flags & NDR_BUFFERS) {
5660 4 : if (r->restart_data) {
5661 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->restart_length));
5662 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->restart_data, r->restart_length));
5663 : }
5664 : }
5665 8 : return NDR_ERR_SUCCESS;
5666 : }
5667 :
5668 8 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNT4ChangeLogRequest1 *r)
5669 : {
5670 0 : uint32_t _ptr_restart_data;
5671 8 : uint32_t size_restart_data_1 = 0;
5672 8 : TALLOC_CTX *_mem_save_restart_data_0 = NULL;
5673 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5674 8 : if (ndr_flags & NDR_SCALARS) {
5675 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
5676 4 : NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogFlags(ndr, NDR_SCALARS, &r->flags));
5677 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->preferred_maximum_length));
5678 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->restart_length));
5679 4 : if (r->restart_length > 10485760) {
5680 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->restart_length), (uint32_t)(0), (uint32_t)(10485760));
5681 : }
5682 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_restart_data));
5683 4 : if (_ptr_restart_data) {
5684 0 : NDR_PULL_ALLOC(ndr, r->restart_data);
5685 : } else {
5686 4 : r->restart_data = NULL;
5687 : }
5688 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5689 : }
5690 8 : if (ndr_flags & NDR_BUFFERS) {
5691 4 : if (r->restart_data) {
5692 0 : _mem_save_restart_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
5693 0 : NDR_PULL_SET_MEM_CTX(ndr, r->restart_data, 0);
5694 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->restart_data));
5695 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->restart_data, &size_restart_data_1));
5696 0 : NDR_PULL_ALLOC_N(ndr, r->restart_data, size_restart_data_1);
5697 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->restart_data, size_restart_data_1));
5698 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_restart_data_0, 0);
5699 : }
5700 4 : if (r->restart_data) {
5701 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->restart_data, r->restart_length));
5702 : }
5703 : }
5704 8 : return NDR_ERR_SUCCESS;
5705 : }
5706 :
5707 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNT4ChangeLogRequest1 *r)
5708 : {
5709 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNT4ChangeLogRequest1");
5710 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5711 0 : ndr->depth++;
5712 0 : ndr_print_drsuapi_DsGetNT4ChangeLogFlags(ndr, "flags", r->flags);
5713 0 : ndr_print_uint32(ndr, "preferred_maximum_length", r->preferred_maximum_length);
5714 0 : ndr_print_uint32(ndr, "restart_length", r->restart_length);
5715 0 : ndr_print_ptr(ndr, "restart_data", r->restart_data);
5716 0 : ndr->depth++;
5717 0 : if (r->restart_data) {
5718 0 : ndr_print_array_uint8(ndr, "restart_data", r->restart_data, r->restart_length);
5719 : }
5720 0 : ndr->depth--;
5721 0 : ndr->depth--;
5722 : }
5723 :
5724 4 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetNT4ChangeLogRequest *r)
5725 : {
5726 0 : uint32_t level;
5727 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5728 4 : if (ndr_flags & NDR_SCALARS) {
5729 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5730 4 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5731 4 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5732 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5733 4 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5734 4 : switch (level) {
5735 4 : case 1: {
5736 4 : NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_SCALARS, &r->req1));
5737 4 : break; }
5738 :
5739 0 : default:
5740 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5741 : }
5742 : }
5743 4 : if (ndr_flags & NDR_BUFFERS) {
5744 4 : if (!(ndr_flags & NDR_SCALARS)) {
5745 : /* We didn't get it above, and the token is not needed after this. */
5746 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5747 : }
5748 4 : switch (level) {
5749 4 : case 1:
5750 4 : NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_BUFFERS, &r->req1));
5751 4 : break;
5752 :
5753 0 : default:
5754 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5755 : }
5756 : }
5757 4 : return NDR_ERR_SUCCESS;
5758 : }
5759 :
5760 4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetNT4ChangeLogRequest *r)
5761 : {
5762 0 : uint32_t level;
5763 0 : uint32_t _level;
5764 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5765 4 : if (ndr_flags & NDR_SCALARS) {
5766 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5767 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5768 4 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5769 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5770 4 : if (_level != level) {
5771 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
5772 : }
5773 4 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5774 4 : switch (level) {
5775 4 : case 1: {
5776 4 : NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_SCALARS, &r->req1));
5777 4 : break; }
5778 :
5779 0 : default:
5780 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5781 : }
5782 : }
5783 4 : if (ndr_flags & NDR_BUFFERS) {
5784 4 : if (!(ndr_flags & NDR_SCALARS)) {
5785 : /* We didn't get it above, and the token is not needed after this. */
5786 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5787 : }
5788 4 : switch (level) {
5789 4 : case 1:
5790 4 : NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_BUFFERS, &r->req1));
5791 4 : break;
5792 :
5793 0 : default:
5794 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5795 : }
5796 : }
5797 4 : return NDR_ERR_SUCCESS;
5798 : }
5799 :
5800 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNT4ChangeLogRequest *r)
5801 : {
5802 0 : uint32_t level;
5803 0 : level = ndr_print_steal_switch_value(ndr, r);
5804 0 : ndr_print_union(ndr, name, level, "drsuapi_DsGetNT4ChangeLogRequest");
5805 0 : switch (level) {
5806 0 : case 1:
5807 0 : ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(ndr, "req1", &r->req1);
5808 0 : break;
5809 :
5810 0 : default:
5811 0 : ndr_print_bad_level(ndr, name, level);
5812 : }
5813 0 : }
5814 :
5815 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNT4ChangeLogInfo1 *r)
5816 : {
5817 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5818 0 : if (ndr_flags & NDR_SCALARS) {
5819 0 : NDR_CHECK(ndr_push_align(ndr, 8));
5820 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->restart_length));
5821 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->log_length));
5822 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sam_serial_number));
5823 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->sam_creation_time));
5824 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->builtin_serial_number));
5825 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->builtin_creation_time));
5826 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lsa_serial_number));
5827 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->lsa_creation_time));
5828 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
5829 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->restart_data));
5830 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->log_data));
5831 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5832 : }
5833 0 : if (ndr_flags & NDR_BUFFERS) {
5834 0 : if (r->restart_data) {
5835 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->restart_length));
5836 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->restart_data, r->restart_length));
5837 : }
5838 0 : if (r->log_data) {
5839 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->log_length));
5840 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->log_data, r->log_length));
5841 : }
5842 : }
5843 0 : return NDR_ERR_SUCCESS;
5844 : }
5845 :
5846 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNT4ChangeLogInfo1 *r)
5847 : {
5848 0 : uint32_t _ptr_restart_data;
5849 0 : uint32_t size_restart_data_1 = 0;
5850 0 : TALLOC_CTX *_mem_save_restart_data_0 = NULL;
5851 0 : uint32_t _ptr_log_data;
5852 0 : uint32_t size_log_data_1 = 0;
5853 0 : TALLOC_CTX *_mem_save_log_data_0 = NULL;
5854 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5855 0 : if (ndr_flags & NDR_SCALARS) {
5856 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
5857 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->restart_length));
5858 0 : if (r->restart_length > 10485760) {
5859 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->restart_length), (uint32_t)(0), (uint32_t)(10485760));
5860 : }
5861 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->log_length));
5862 0 : if (r->log_length > 10485760) {
5863 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->log_length), (uint32_t)(0), (uint32_t)(10485760));
5864 : }
5865 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sam_serial_number));
5866 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->sam_creation_time));
5867 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->builtin_serial_number));
5868 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->builtin_creation_time));
5869 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lsa_serial_number));
5870 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->lsa_creation_time));
5871 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
5872 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_restart_data));
5873 0 : if (_ptr_restart_data) {
5874 0 : NDR_PULL_ALLOC(ndr, r->restart_data);
5875 : } else {
5876 0 : r->restart_data = NULL;
5877 : }
5878 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_log_data));
5879 0 : if (_ptr_log_data) {
5880 0 : NDR_PULL_ALLOC(ndr, r->log_data);
5881 : } else {
5882 0 : r->log_data = NULL;
5883 : }
5884 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5885 : }
5886 0 : if (ndr_flags & NDR_BUFFERS) {
5887 0 : if (r->restart_data) {
5888 0 : _mem_save_restart_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
5889 0 : NDR_PULL_SET_MEM_CTX(ndr, r->restart_data, 0);
5890 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->restart_data));
5891 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->restart_data, &size_restart_data_1));
5892 0 : NDR_PULL_ALLOC_N(ndr, r->restart_data, size_restart_data_1);
5893 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->restart_data, size_restart_data_1));
5894 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_restart_data_0, 0);
5895 : }
5896 0 : if (r->log_data) {
5897 0 : _mem_save_log_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
5898 0 : NDR_PULL_SET_MEM_CTX(ndr, r->log_data, 0);
5899 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->log_data));
5900 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->log_data, &size_log_data_1));
5901 0 : NDR_PULL_ALLOC_N(ndr, r->log_data, size_log_data_1);
5902 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->log_data, size_log_data_1));
5903 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_log_data_0, 0);
5904 : }
5905 0 : if (r->restart_data) {
5906 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->restart_data, r->restart_length));
5907 : }
5908 0 : if (r->log_data) {
5909 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->log_data, r->log_length));
5910 : }
5911 : }
5912 0 : return NDR_ERR_SUCCESS;
5913 : }
5914 :
5915 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNT4ChangeLogInfo1 *r)
5916 : {
5917 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNT4ChangeLogInfo1");
5918 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5919 0 : ndr->depth++;
5920 0 : ndr_print_uint32(ndr, "restart_length", r->restart_length);
5921 0 : ndr_print_uint32(ndr, "log_length", r->log_length);
5922 0 : ndr_print_hyper(ndr, "sam_serial_number", r->sam_serial_number);
5923 0 : ndr_print_NTTIME(ndr, "sam_creation_time", r->sam_creation_time);
5924 0 : ndr_print_hyper(ndr, "builtin_serial_number", r->builtin_serial_number);
5925 0 : ndr_print_NTTIME(ndr, "builtin_creation_time", r->builtin_creation_time);
5926 0 : ndr_print_hyper(ndr, "lsa_serial_number", r->lsa_serial_number);
5927 0 : ndr_print_NTTIME(ndr, "lsa_creation_time", r->lsa_creation_time);
5928 0 : ndr_print_NTSTATUS(ndr, "status", r->status);
5929 0 : ndr_print_ptr(ndr, "restart_data", r->restart_data);
5930 0 : ndr->depth++;
5931 0 : if (r->restart_data) {
5932 0 : ndr_print_array_uint8(ndr, "restart_data", r->restart_data, r->restart_length);
5933 : }
5934 0 : ndr->depth--;
5935 0 : ndr_print_ptr(ndr, "log_data", r->log_data);
5936 0 : ndr->depth++;
5937 0 : if (r->log_data) {
5938 0 : ndr_print_array_uint8(ndr, "log_data", r->log_data, r->log_length);
5939 : }
5940 0 : ndr->depth--;
5941 0 : ndr->depth--;
5942 : }
5943 :
5944 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetNT4ChangeLogInfo *r)
5945 : {
5946 0 : uint32_t level;
5947 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5948 0 : if (ndr_flags & NDR_SCALARS) {
5949 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5950 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5951 0 : NDR_CHECK(ndr_push_union_align(ndr, 8));
5952 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5953 0 : NDR_CHECK(ndr_push_union_align(ndr, 8));
5954 0 : switch (level) {
5955 0 : case 1: {
5956 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_SCALARS, &r->info1));
5957 0 : break; }
5958 :
5959 0 : default:
5960 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5961 : }
5962 : }
5963 0 : if (ndr_flags & NDR_BUFFERS) {
5964 0 : if (!(ndr_flags & NDR_SCALARS)) {
5965 : /* We didn't get it above, and the token is not needed after this. */
5966 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5967 : }
5968 0 : switch (level) {
5969 0 : case 1:
5970 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_BUFFERS, &r->info1));
5971 0 : break;
5972 :
5973 0 : default:
5974 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5975 : }
5976 : }
5977 0 : return NDR_ERR_SUCCESS;
5978 : }
5979 :
5980 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetNT4ChangeLogInfo *r)
5981 : {
5982 0 : uint32_t level;
5983 0 : uint32_t _level;
5984 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5985 0 : if (ndr_flags & NDR_SCALARS) {
5986 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5987 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5988 0 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
5989 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5990 0 : if (_level != level) {
5991 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
5992 : }
5993 0 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
5994 0 : switch (level) {
5995 0 : case 1: {
5996 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_SCALARS, &r->info1));
5997 0 : break; }
5998 :
5999 0 : default:
6000 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
6001 : }
6002 : }
6003 0 : if (ndr_flags & NDR_BUFFERS) {
6004 0 : if (!(ndr_flags & NDR_SCALARS)) {
6005 : /* We didn't get it above, and the token is not needed after this. */
6006 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6007 : }
6008 0 : switch (level) {
6009 0 : case 1:
6010 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_BUFFERS, &r->info1));
6011 0 : break;
6012 :
6013 0 : default:
6014 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
6015 : }
6016 : }
6017 0 : return NDR_ERR_SUCCESS;
6018 : }
6019 :
6020 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNT4ChangeLogInfo *r)
6021 : {
6022 0 : uint32_t level;
6023 0 : level = ndr_print_steal_switch_value(ndr, r);
6024 0 : ndr_print_union(ndr, name, level, "drsuapi_DsGetNT4ChangeLogInfo");
6025 0 : switch (level) {
6026 0 : case 1:
6027 0 : ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(ndr, "info1", &r->info1);
6028 0 : break;
6029 :
6030 0 : default:
6031 0 : ndr_print_bad_level(ndr, name, level);
6032 : }
6033 0 : }
6034 :
6035 1883 : static enum ndr_err_code ndr_push_drsuapi_DsNameStatus(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameStatus r)
6036 : {
6037 1883 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
6038 1667 : return NDR_ERR_SUCCESS;
6039 : }
6040 :
6041 1639 : static enum ndr_err_code ndr_pull_drsuapi_DsNameStatus(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameStatus *r)
6042 : {
6043 180 : uint32_t v;
6044 1639 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
6045 1639 : *r = v;
6046 1639 : return NDR_ERR_SUCCESS;
6047 : }
6048 :
6049 488 : _PUBLIC_ void ndr_print_drsuapi_DsNameStatus(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameStatus r)
6050 : {
6051 488 : const char *val = NULL;
6052 :
6053 488 : switch (r) {
6054 488 : case DRSUAPI_DS_NAME_STATUS_OK: val = "DRSUAPI_DS_NAME_STATUS_OK"; break;
6055 0 : case DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR: val = "DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR"; break;
6056 0 : case DRSUAPI_DS_NAME_STATUS_NOT_FOUND: val = "DRSUAPI_DS_NAME_STATUS_NOT_FOUND"; break;
6057 0 : case DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE: val = "DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE"; break;
6058 0 : case DRSUAPI_DS_NAME_STATUS_NO_MAPPING: val = "DRSUAPI_DS_NAME_STATUS_NO_MAPPING"; break;
6059 0 : case DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY: val = "DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY"; break;
6060 0 : case DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING: val = "DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING"; break;
6061 0 : case DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL: val = "DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL"; break;
6062 : }
6063 488 : ndr_print_enum(ndr, name, "ENUM", val, r);
6064 488 : }
6065 :
6066 1639 : static enum ndr_err_code ndr_push_drsuapi_DsNameFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameFlags r)
6067 : {
6068 1639 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
6069 1459 : return NDR_ERR_SUCCESS;
6070 : }
6071 :
6072 1639 : static enum ndr_err_code ndr_pull_drsuapi_DsNameFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameFlags *r)
6073 : {
6074 180 : uint32_t v;
6075 1639 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
6076 1639 : *r = v;
6077 1639 : return NDR_ERR_SUCCESS;
6078 : }
6079 :
6080 0 : _PUBLIC_ void ndr_print_drsuapi_DsNameFlags(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameFlags r)
6081 : {
6082 0 : const char *val = NULL;
6083 :
6084 0 : switch (r) {
6085 0 : case DRSUAPI_DS_NAME_FLAG_NO_FLAGS: val = "DRSUAPI_DS_NAME_FLAG_NO_FLAGS"; break;
6086 0 : case DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY: val = "DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY"; break;
6087 0 : case DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC: val = "DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC"; break;
6088 0 : case DRSUAPI_DS_NAME_FLAG_GCVERIFY: val = "DRSUAPI_DS_NAME_FLAG_GCVERIFY"; break;
6089 0 : case DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL: val = "DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL"; break;
6090 : }
6091 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
6092 0 : }
6093 :
6094 3278 : static enum ndr_err_code ndr_push_drsuapi_DsNameFormat(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameFormat r)
6095 : {
6096 3278 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
6097 2918 : return NDR_ERR_SUCCESS;
6098 : }
6099 :
6100 3278 : static enum ndr_err_code ndr_pull_drsuapi_DsNameFormat(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameFormat *r)
6101 : {
6102 360 : uint32_t v;
6103 3278 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
6104 3278 : *r = v;
6105 3278 : return NDR_ERR_SUCCESS;
6106 : }
6107 :
6108 0 : _PUBLIC_ void ndr_print_drsuapi_DsNameFormat(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameFormat r)
6109 : {
6110 0 : const char *val = NULL;
6111 :
6112 0 : switch (r) {
6113 0 : case DRSUAPI_DS_NAME_FORMAT_UNKNOWN: val = "DRSUAPI_DS_NAME_FORMAT_UNKNOWN"; break;
6114 0 : case DRSUAPI_DS_NAME_FORMAT_FQDN_1779: val = "DRSUAPI_DS_NAME_FORMAT_FQDN_1779"; break;
6115 0 : case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT"; break;
6116 0 : case DRSUAPI_DS_NAME_FORMAT_DISPLAY: val = "DRSUAPI_DS_NAME_FORMAT_DISPLAY"; break;
6117 0 : case DRSUAPI_DS_NAME_FORMAT_GUID: val = "DRSUAPI_DS_NAME_FORMAT_GUID"; break;
6118 0 : case DRSUAPI_DS_NAME_FORMAT_CANONICAL: val = "DRSUAPI_DS_NAME_FORMAT_CANONICAL"; break;
6119 0 : case DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL: val = "DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL"; break;
6120 0 : case DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX: val = "DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX"; break;
6121 0 : case DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL: val = "DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL"; break;
6122 0 : case DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY: val = "DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY"; break;
6123 0 : case DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN: val = "DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN"; break;
6124 0 : case DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID: val = "DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID"; break;
6125 0 : case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX"; break;
6126 0 : case DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS: val = "DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS"; break;
6127 0 : case DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON: val = "DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON"; break;
6128 0 : case DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE"; break;
6129 0 : case DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME: val = "DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME"; break;
6130 0 : case DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME: val = "DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME"; break;
6131 0 : case DRSUAPI_DS_NAME_FORMAT_LIST_NCS: val = "DRSUAPI_DS_NAME_FORMAT_LIST_NCS"; break;
6132 0 : case DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS: val = "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS"; break;
6133 0 : case DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID: val = "DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID"; break;
6134 0 : case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN"; break;
6135 0 : case DRSUAPI_DS_NAME_FORMAT_LIST_ROLES: val = "DRSUAPI_DS_NAME_FORMAT_LIST_ROLES"; break;
6136 0 : case DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER: val = "DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER"; break;
6137 0 : case DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE"; break;
6138 0 : case DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE"; break;
6139 0 : case DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE"; break;
6140 0 : case DRSUAPI_DS_NAME_FORMAT_LIST_SITES: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SITES"; break;
6141 : }
6142 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
6143 0 : }
6144 :
6145 3302 : static enum ndr_err_code ndr_push_drsuapi_DsNameString(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsNameString *r)
6146 : {
6147 3302 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6148 3302 : if (ndr_flags & NDR_SCALARS) {
6149 1651 : NDR_CHECK(ndr_push_align(ndr, 5));
6150 1651 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->str));
6151 1651 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6152 : }
6153 3302 : if (ndr_flags & NDR_BUFFERS) {
6154 1651 : if (r->str) {
6155 1651 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->str, CH_UTF16)));
6156 1651 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6157 1651 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->str, CH_UTF16)));
6158 1651 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->str, ndr_charset_length(r->str, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6159 : }
6160 : }
6161 2942 : return NDR_ERR_SUCCESS;
6162 : }
6163 :
6164 3302 : static enum ndr_err_code ndr_pull_drsuapi_DsNameString(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsNameString *r)
6165 : {
6166 360 : uint32_t _ptr_str;
6167 3302 : uint32_t size_str_1 = 0;
6168 3302 : uint32_t length_str_1 = 0;
6169 3302 : TALLOC_CTX *_mem_save_str_0 = NULL;
6170 3302 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6171 3302 : if (ndr_flags & NDR_SCALARS) {
6172 1651 : NDR_CHECK(ndr_pull_align(ndr, 5));
6173 1651 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_str));
6174 1651 : if (_ptr_str) {
6175 1651 : NDR_PULL_ALLOC(ndr, r->str);
6176 : } else {
6177 0 : r->str = NULL;
6178 : }
6179 1651 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6180 : }
6181 3302 : if (ndr_flags & NDR_BUFFERS) {
6182 1651 : if (r->str) {
6183 1651 : _mem_save_str_0 = NDR_PULL_GET_MEM_CTX(ndr);
6184 1651 : NDR_PULL_SET_MEM_CTX(ndr, r->str, 0);
6185 1651 : NDR_CHECK(ndr_pull_array_size(ndr, &r->str));
6186 1651 : NDR_CHECK(ndr_pull_array_length(ndr, &r->str));
6187 1651 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->str, &size_str_1));
6188 1651 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->str, &length_str_1));
6189 1651 : if (length_str_1 > size_str_1) {
6190 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_str_1, length_str_1);
6191 : }
6192 1651 : NDR_CHECK(ndr_check_string_terminator(ndr, length_str_1, sizeof(uint16_t)));
6193 1651 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->str, length_str_1, sizeof(uint16_t), CH_UTF16));
6194 1651 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_str_0, 0);
6195 : }
6196 : }
6197 2942 : return NDR_ERR_SUCCESS;
6198 : }
6199 :
6200 0 : _PUBLIC_ void ndr_print_drsuapi_DsNameString(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameString *r)
6201 : {
6202 0 : ndr_print_struct(ndr, name, "drsuapi_DsNameString");
6203 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6204 0 : ndr->depth++;
6205 0 : ndr_print_ptr(ndr, "str", r->str);
6206 0 : ndr->depth++;
6207 0 : if (r->str) {
6208 0 : ndr_print_string(ndr, "str", r->str);
6209 : }
6210 0 : ndr->depth--;
6211 0 : ndr->depth--;
6212 : }
6213 :
6214 3278 : static enum ndr_err_code ndr_push_drsuapi_DsNameRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsNameRequest1 *r)
6215 : {
6216 360 : uint32_t cntr_names_1;
6217 3278 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6218 3278 : if (ndr_flags & NDR_SCALARS) {
6219 1639 : NDR_CHECK(ndr_push_align(ndr, 5));
6220 1639 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->codepage));
6221 1639 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->language));
6222 1819 : NDR_CHECK(ndr_push_drsuapi_DsNameFlags(ndr, NDR_SCALARS, r->format_flags));
6223 1819 : NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr, NDR_SCALARS, r->format_offered));
6224 1819 : NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr, NDR_SCALARS, r->format_desired));
6225 1639 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
6226 1639 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
6227 1639 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6228 : }
6229 3278 : if (ndr_flags & NDR_BUFFERS) {
6230 1639 : if (r->names) {
6231 1639 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
6232 3278 : for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
6233 1639 : NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
6234 : }
6235 3278 : for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
6236 1639 : NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
6237 : }
6238 : }
6239 : }
6240 2918 : return NDR_ERR_SUCCESS;
6241 : }
6242 :
6243 3278 : static enum ndr_err_code ndr_pull_drsuapi_DsNameRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsNameRequest1 *r)
6244 : {
6245 360 : uint32_t _ptr_names;
6246 3278 : uint32_t size_names_1 = 0;
6247 360 : uint32_t cntr_names_1;
6248 3278 : TALLOC_CTX *_mem_save_names_0 = NULL;
6249 3278 : TALLOC_CTX *_mem_save_names_1 = NULL;
6250 3278 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6251 3278 : if (ndr_flags & NDR_SCALARS) {
6252 1639 : NDR_CHECK(ndr_pull_align(ndr, 5));
6253 1639 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->codepage));
6254 1639 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->language));
6255 1819 : NDR_CHECK(ndr_pull_drsuapi_DsNameFlags(ndr, NDR_SCALARS, &r->format_flags));
6256 1819 : NDR_CHECK(ndr_pull_drsuapi_DsNameFormat(ndr, NDR_SCALARS, &r->format_offered));
6257 1819 : NDR_CHECK(ndr_pull_drsuapi_DsNameFormat(ndr, NDR_SCALARS, &r->format_desired));
6258 1639 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
6259 1639 : if (r->count < 1 || r->count > 10000) {
6260 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(1), (uint32_t)(10000));
6261 : }
6262 1639 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
6263 1639 : if (_ptr_names) {
6264 1639 : NDR_PULL_ALLOC(ndr, r->names);
6265 : } else {
6266 0 : r->names = NULL;
6267 : }
6268 1639 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6269 : }
6270 3278 : if (ndr_flags & NDR_BUFFERS) {
6271 1639 : if (r->names) {
6272 1639 : _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6273 1639 : NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
6274 1639 : NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
6275 1639 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_1));
6276 1639 : NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
6277 1639 : _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
6278 1639 : NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
6279 3278 : for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
6280 1639 : NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
6281 : }
6282 3278 : for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
6283 1639 : NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
6284 : }
6285 1639 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
6286 1639 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
6287 : }
6288 1639 : if (r->names) {
6289 1639 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
6290 : }
6291 3278 : for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
6292 180 : }
6293 : }
6294 2918 : return NDR_ERR_SUCCESS;
6295 : }
6296 :
6297 0 : _PUBLIC_ void ndr_print_drsuapi_DsNameRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameRequest1 *r)
6298 : {
6299 0 : uint32_t cntr_names_1;
6300 0 : ndr_print_struct(ndr, name, "drsuapi_DsNameRequest1");
6301 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6302 0 : ndr->depth++;
6303 0 : ndr_print_uint32(ndr, "codepage", r->codepage);
6304 0 : ndr_print_uint32(ndr, "language", r->language);
6305 0 : ndr_print_drsuapi_DsNameFlags(ndr, "format_flags", r->format_flags);
6306 0 : ndr_print_drsuapi_DsNameFormat(ndr, "format_offered", r->format_offered);
6307 0 : ndr_print_drsuapi_DsNameFormat(ndr, "format_desired", r->format_desired);
6308 0 : ndr_print_uint32(ndr, "count", r->count);
6309 0 : ndr_print_ptr(ndr, "names", r->names);
6310 0 : ndr->depth++;
6311 0 : if (r->names) {
6312 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "names", (uint32_t)(r->count));
6313 0 : ndr->depth++;
6314 0 : for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
6315 0 : ndr_print_drsuapi_DsNameString(ndr, "names", &r->names[cntr_names_1]);
6316 : }
6317 0 : ndr->depth--;
6318 : }
6319 0 : ndr->depth--;
6320 0 : ndr->depth--;
6321 : }
6322 :
6323 1639 : static enum ndr_err_code ndr_push_drsuapi_DsNameRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsNameRequest *r)
6324 : {
6325 180 : uint32_t level;
6326 1639 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6327 1639 : if (ndr_flags & NDR_SCALARS) {
6328 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6329 1639 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6330 1639 : NDR_CHECK(ndr_push_union_align(ndr, 5));
6331 1639 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
6332 1639 : NDR_CHECK(ndr_push_union_align(ndr, 5));
6333 1639 : switch (level) {
6334 1639 : case 1: {
6335 1639 : NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr, NDR_SCALARS, &r->req1));
6336 1459 : break; }
6337 :
6338 0 : default:
6339 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
6340 : }
6341 : }
6342 1639 : if (ndr_flags & NDR_BUFFERS) {
6343 1639 : if (!(ndr_flags & NDR_SCALARS)) {
6344 : /* We didn't get it above, and the token is not needed after this. */
6345 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6346 : }
6347 1639 : switch (level) {
6348 1639 : case 1:
6349 1639 : NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr, NDR_BUFFERS, &r->req1));
6350 1459 : break;
6351 :
6352 0 : default:
6353 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
6354 : }
6355 : }
6356 1459 : return NDR_ERR_SUCCESS;
6357 : }
6358 :
6359 1639 : static enum ndr_err_code ndr_pull_drsuapi_DsNameRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsNameRequest *r)
6360 : {
6361 180 : uint32_t level;
6362 180 : uint32_t _level;
6363 1639 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6364 1639 : if (ndr_flags & NDR_SCALARS) {
6365 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6366 1639 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6367 1639 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
6368 1639 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6369 1639 : if (_level != level) {
6370 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
6371 : }
6372 1639 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
6373 1639 : switch (level) {
6374 1639 : case 1: {
6375 1639 : NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr, NDR_SCALARS, &r->req1));
6376 1459 : break; }
6377 :
6378 0 : default:
6379 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
6380 : }
6381 : }
6382 1639 : if (ndr_flags & NDR_BUFFERS) {
6383 1639 : if (!(ndr_flags & NDR_SCALARS)) {
6384 : /* We didn't get it above, and the token is not needed after this. */
6385 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6386 : }
6387 1639 : switch (level) {
6388 1639 : case 1:
6389 1639 : NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr, NDR_BUFFERS, &r->req1));
6390 1459 : break;
6391 :
6392 0 : default:
6393 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
6394 : }
6395 : }
6396 1459 : return NDR_ERR_SUCCESS;
6397 : }
6398 :
6399 0 : _PUBLIC_ void ndr_print_drsuapi_DsNameRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsNameRequest *r)
6400 : {
6401 0 : uint32_t level;
6402 0 : level = ndr_print_steal_switch_value(ndr, r);
6403 0 : ndr_print_union(ndr, name, level, "drsuapi_DsNameRequest");
6404 0 : switch (level) {
6405 0 : case 1:
6406 0 : ndr_print_drsuapi_DsNameRequest1(ndr, "req1", &r->req1);
6407 0 : break;
6408 :
6409 0 : default:
6410 0 : ndr_print_bad_level(ndr, name, level);
6411 : }
6412 0 : }
6413 :
6414 3766 : static enum ndr_err_code ndr_push_drsuapi_DsNameInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsNameInfo1 *r)
6415 : {
6416 3766 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6417 3766 : if (ndr_flags & NDR_SCALARS) {
6418 1883 : NDR_CHECK(ndr_push_align(ndr, 5));
6419 2099 : NDR_CHECK(ndr_push_drsuapi_DsNameStatus(ndr, NDR_SCALARS, r->status));
6420 1883 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain_name));
6421 1883 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->result_name));
6422 1883 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6423 : }
6424 3766 : if (ndr_flags & NDR_BUFFERS) {
6425 1883 : if (r->dns_domain_name) {
6426 1800 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_name, CH_UTF16)));
6427 1800 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6428 1800 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_name, CH_UTF16)));
6429 1800 : 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));
6430 : }
6431 1883 : if (r->result_name) {
6432 1742 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->result_name, CH_UTF16)));
6433 1742 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6434 1742 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->result_name, CH_UTF16)));
6435 1742 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->result_name, ndr_charset_length(r->result_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6436 : }
6437 : }
6438 3334 : return NDR_ERR_SUCCESS;
6439 : }
6440 :
6441 3278 : static enum ndr_err_code ndr_pull_drsuapi_DsNameInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsNameInfo1 *r)
6442 : {
6443 360 : uint32_t _ptr_dns_domain_name;
6444 3278 : uint32_t size_dns_domain_name_1 = 0;
6445 3278 : uint32_t length_dns_domain_name_1 = 0;
6446 3278 : TALLOC_CTX *_mem_save_dns_domain_name_0 = NULL;
6447 360 : uint32_t _ptr_result_name;
6448 3278 : uint32_t size_result_name_1 = 0;
6449 3278 : uint32_t length_result_name_1 = 0;
6450 3278 : TALLOC_CTX *_mem_save_result_name_0 = NULL;
6451 3278 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6452 3278 : if (ndr_flags & NDR_SCALARS) {
6453 1639 : NDR_CHECK(ndr_pull_align(ndr, 5));
6454 1819 : NDR_CHECK(ndr_pull_drsuapi_DsNameStatus(ndr, NDR_SCALARS, &r->status));
6455 1639 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain_name));
6456 1639 : if (_ptr_dns_domain_name) {
6457 1556 : NDR_PULL_ALLOC(ndr, r->dns_domain_name);
6458 : } else {
6459 83 : r->dns_domain_name = NULL;
6460 : }
6461 1639 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_result_name));
6462 1639 : if (_ptr_result_name) {
6463 1498 : NDR_PULL_ALLOC(ndr, r->result_name);
6464 : } else {
6465 141 : r->result_name = NULL;
6466 : }
6467 1639 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6468 : }
6469 3278 : if (ndr_flags & NDR_BUFFERS) {
6470 1639 : if (r->dns_domain_name) {
6471 1556 : _mem_save_dns_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6472 1556 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain_name, 0);
6473 1556 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain_name));
6474 1556 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain_name));
6475 1556 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_domain_name, &size_dns_domain_name_1));
6476 1556 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_domain_name, &length_dns_domain_name_1));
6477 1556 : if (length_dns_domain_name_1 > size_dns_domain_name_1) {
6478 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_domain_name_1, length_dns_domain_name_1);
6479 : }
6480 1556 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_domain_name_1, sizeof(uint16_t)));
6481 1556 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain_name, length_dns_domain_name_1, sizeof(uint16_t), CH_UTF16));
6482 1556 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_name_0, 0);
6483 : }
6484 1639 : if (r->result_name) {
6485 1498 : _mem_save_result_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6486 1498 : NDR_PULL_SET_MEM_CTX(ndr, r->result_name, 0);
6487 1498 : NDR_CHECK(ndr_pull_array_size(ndr, &r->result_name));
6488 1498 : NDR_CHECK(ndr_pull_array_length(ndr, &r->result_name));
6489 1498 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->result_name, &size_result_name_1));
6490 1498 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->result_name, &length_result_name_1));
6491 1498 : if (length_result_name_1 > size_result_name_1) {
6492 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_result_name_1, length_result_name_1);
6493 : }
6494 1498 : NDR_CHECK(ndr_check_string_terminator(ndr, length_result_name_1, sizeof(uint16_t)));
6495 1498 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->result_name, length_result_name_1, sizeof(uint16_t), CH_UTF16));
6496 1498 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_result_name_0, 0);
6497 : }
6498 : }
6499 2918 : return NDR_ERR_SUCCESS;
6500 : }
6501 :
6502 488 : _PUBLIC_ void ndr_print_drsuapi_DsNameInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameInfo1 *r)
6503 : {
6504 488 : ndr_print_struct(ndr, name, "drsuapi_DsNameInfo1");
6505 488 : if (r == NULL) { ndr_print_null(ndr); return; }
6506 488 : ndr->depth++;
6507 488 : ndr_print_drsuapi_DsNameStatus(ndr, "status", r->status);
6508 488 : ndr_print_ptr(ndr, "dns_domain_name", r->dns_domain_name);
6509 488 : ndr->depth++;
6510 488 : if (r->dns_domain_name) {
6511 488 : ndr_print_string(ndr, "dns_domain_name", r->dns_domain_name);
6512 : }
6513 488 : ndr->depth--;
6514 488 : ndr_print_ptr(ndr, "result_name", r->result_name);
6515 488 : ndr->depth++;
6516 488 : if (r->result_name) {
6517 488 : ndr_print_string(ndr, "result_name", r->result_name);
6518 : }
6519 488 : ndr->depth--;
6520 488 : ndr->depth--;
6521 : }
6522 :
6523 1883 : static enum ndr_err_code ndr_push_drsuapi_DsNameCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsNameCtr1 *r)
6524 : {
6525 216 : uint32_t cntr_array_1;
6526 1883 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6527 1883 : if (ndr_flags & NDR_SCALARS) {
6528 1883 : NDR_CHECK(ndr_push_align(ndr, 5));
6529 1883 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
6530 1883 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
6531 1883 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6532 : }
6533 1883 : if (ndr_flags & NDR_BUFFERS) {
6534 1883 : if (r->array) {
6535 1883 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
6536 3766 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
6537 1883 : NDR_CHECK(ndr_push_drsuapi_DsNameInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
6538 : }
6539 3766 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
6540 1883 : NDR_CHECK(ndr_push_drsuapi_DsNameInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
6541 : }
6542 : }
6543 : }
6544 1667 : return NDR_ERR_SUCCESS;
6545 : }
6546 :
6547 1639 : static enum ndr_err_code ndr_pull_drsuapi_DsNameCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsNameCtr1 *r)
6548 : {
6549 180 : uint32_t _ptr_array;
6550 1639 : uint32_t size_array_1 = 0;
6551 180 : uint32_t cntr_array_1;
6552 1639 : TALLOC_CTX *_mem_save_array_0 = NULL;
6553 1639 : TALLOC_CTX *_mem_save_array_1 = NULL;
6554 1639 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6555 1639 : if (ndr_flags & NDR_SCALARS) {
6556 1639 : NDR_CHECK(ndr_pull_align(ndr, 5));
6557 1639 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
6558 1639 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
6559 1639 : if (_ptr_array) {
6560 1639 : NDR_PULL_ALLOC(ndr, r->array);
6561 : } else {
6562 0 : r->array = NULL;
6563 : }
6564 1639 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6565 : }
6566 1639 : if (ndr_flags & NDR_BUFFERS) {
6567 1639 : if (r->array) {
6568 1639 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
6569 1639 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
6570 1639 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
6571 1639 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
6572 1639 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
6573 1639 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
6574 1639 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
6575 3278 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
6576 1639 : NDR_CHECK(ndr_pull_drsuapi_DsNameInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
6577 : }
6578 3278 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
6579 1639 : NDR_CHECK(ndr_pull_drsuapi_DsNameInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
6580 : }
6581 1639 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
6582 1639 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
6583 : }
6584 1639 : if (r->array) {
6585 1639 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
6586 : }
6587 3278 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
6588 180 : }
6589 : }
6590 1459 : return NDR_ERR_SUCCESS;
6591 : }
6592 :
6593 488 : _PUBLIC_ void ndr_print_drsuapi_DsNameCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameCtr1 *r)
6594 : {
6595 72 : uint32_t cntr_array_1;
6596 488 : ndr_print_struct(ndr, name, "drsuapi_DsNameCtr1");
6597 488 : if (r == NULL) { ndr_print_null(ndr); return; }
6598 488 : ndr->depth++;
6599 488 : ndr_print_uint32(ndr, "count", r->count);
6600 488 : ndr_print_ptr(ndr, "array", r->array);
6601 488 : ndr->depth++;
6602 488 : if (r->array) {
6603 488 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
6604 488 : ndr->depth++;
6605 976 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
6606 488 : ndr_print_drsuapi_DsNameInfo1(ndr, "array", &r->array[cntr_array_1]);
6607 : }
6608 488 : ndr->depth--;
6609 : }
6610 488 : ndr->depth--;
6611 488 : ndr->depth--;
6612 : }
6613 :
6614 1883 : static enum ndr_err_code ndr_push_drsuapi_DsNameCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsNameCtr *r)
6615 : {
6616 216 : uint32_t level;
6617 1883 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6618 1883 : if (ndr_flags & NDR_SCALARS) {
6619 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6620 1883 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6621 1883 : NDR_CHECK(ndr_push_union_align(ndr, 5));
6622 1883 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
6623 1883 : NDR_CHECK(ndr_push_union_align(ndr, 5));
6624 1883 : switch (level) {
6625 1883 : case 1: {
6626 1883 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
6627 1667 : break; }
6628 :
6629 0 : default:
6630 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
6631 : }
6632 : }
6633 1883 : if (ndr_flags & NDR_BUFFERS) {
6634 1883 : if (!(ndr_flags & NDR_SCALARS)) {
6635 : /* We didn't get it above, and the token is not needed after this. */
6636 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6637 : }
6638 1883 : switch (level) {
6639 1883 : case 1:
6640 1883 : if (r->ctr1) {
6641 1883 : NDR_CHECK(ndr_push_drsuapi_DsNameCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
6642 : }
6643 1667 : break;
6644 :
6645 0 : default:
6646 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
6647 : }
6648 : }
6649 1667 : return NDR_ERR_SUCCESS;
6650 : }
6651 :
6652 1639 : static enum ndr_err_code ndr_pull_drsuapi_DsNameCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsNameCtr *r)
6653 : {
6654 180 : uint32_t level;
6655 180 : uint32_t _level;
6656 1639 : TALLOC_CTX *_mem_save_ctr1_0 = NULL;
6657 180 : uint32_t _ptr_ctr1;
6658 1639 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6659 1639 : if (ndr_flags & NDR_SCALARS) {
6660 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6661 1639 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6662 1639 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
6663 1639 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6664 1639 : if (_level != level) {
6665 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
6666 : }
6667 1639 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
6668 1639 : switch (level) {
6669 1639 : case 1: {
6670 1639 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
6671 1639 : if (_ptr_ctr1) {
6672 1639 : NDR_PULL_ALLOC(ndr, r->ctr1);
6673 : } else {
6674 0 : r->ctr1 = NULL;
6675 : }
6676 1459 : break; }
6677 :
6678 0 : default:
6679 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
6680 : }
6681 : }
6682 1639 : if (ndr_flags & NDR_BUFFERS) {
6683 1639 : if (!(ndr_flags & NDR_SCALARS)) {
6684 : /* We didn't get it above, and the token is not needed after this. */
6685 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6686 : }
6687 1639 : switch (level) {
6688 1639 : case 1:
6689 1639 : if (r->ctr1) {
6690 1639 : _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
6691 1639 : NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
6692 1639 : NDR_CHECK(ndr_pull_drsuapi_DsNameCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
6693 1639 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
6694 : }
6695 1459 : break;
6696 :
6697 0 : default:
6698 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
6699 : }
6700 : }
6701 1459 : return NDR_ERR_SUCCESS;
6702 : }
6703 :
6704 488 : _PUBLIC_ void ndr_print_drsuapi_DsNameCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsNameCtr *r)
6705 : {
6706 72 : uint32_t level;
6707 488 : level = ndr_print_steal_switch_value(ndr, r);
6708 488 : ndr_print_union(ndr, name, level, "drsuapi_DsNameCtr");
6709 488 : switch (level) {
6710 488 : case 1:
6711 488 : ndr_print_ptr(ndr, "ctr1", r->ctr1);
6712 488 : ndr->depth++;
6713 488 : if (r->ctr1) {
6714 488 : ndr_print_drsuapi_DsNameCtr1(ndr, "ctr1", r->ctr1);
6715 : }
6716 488 : ndr->depth--;
6717 488 : break;
6718 :
6719 0 : default:
6720 0 : ndr_print_bad_level(ndr, name, level);
6721 : }
6722 488 : }
6723 :
6724 4 : static enum ndr_err_code ndr_push_drsuapi_DsSpnOperation(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsSpnOperation r)
6725 : {
6726 4 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
6727 4 : return NDR_ERR_SUCCESS;
6728 : }
6729 :
6730 4 : static enum ndr_err_code ndr_pull_drsuapi_DsSpnOperation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsSpnOperation *r)
6731 : {
6732 0 : uint32_t v;
6733 4 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
6734 4 : *r = v;
6735 4 : return NDR_ERR_SUCCESS;
6736 : }
6737 :
6738 0 : _PUBLIC_ void ndr_print_drsuapi_DsSpnOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsSpnOperation r)
6739 : {
6740 0 : const char *val = NULL;
6741 :
6742 0 : switch (r) {
6743 0 : case DRSUAPI_DS_SPN_OPERATION_ADD: val = "DRSUAPI_DS_SPN_OPERATION_ADD"; break;
6744 0 : case DRSUAPI_DS_SPN_OPERATION_REPLACE: val = "DRSUAPI_DS_SPN_OPERATION_REPLACE"; break;
6745 0 : case DRSUAPI_DS_SPN_OPERATION_DELETE: val = "DRSUAPI_DS_SPN_OPERATION_DELETE"; break;
6746 : }
6747 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
6748 0 : }
6749 :
6750 8 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsWriteAccountSpnRequest1 *r)
6751 : {
6752 0 : uint32_t cntr_spn_names_1;
6753 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6754 8 : if (ndr_flags & NDR_SCALARS) {
6755 4 : NDR_CHECK(ndr_push_align(ndr, 5));
6756 4 : NDR_CHECK(ndr_push_drsuapi_DsSpnOperation(ndr, NDR_SCALARS, r->operation));
6757 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
6758 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
6759 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
6760 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->spn_names));
6761 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6762 : }
6763 8 : if (ndr_flags & NDR_BUFFERS) {
6764 4 : if (r->object_dn) {
6765 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
6766 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6767 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
6768 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_dn, ndr_charset_length(r->object_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6769 : }
6770 4 : if (r->spn_names) {
6771 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
6772 16 : for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (r->count); cntr_spn_names_1++) {
6773 12 : NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->spn_names[cntr_spn_names_1]));
6774 : }
6775 16 : for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (r->count); cntr_spn_names_1++) {
6776 12 : NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->spn_names[cntr_spn_names_1]));
6777 : }
6778 : }
6779 : }
6780 8 : return NDR_ERR_SUCCESS;
6781 : }
6782 :
6783 8 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsWriteAccountSpnRequest1 *r)
6784 : {
6785 0 : uint32_t _ptr_object_dn;
6786 8 : uint32_t size_object_dn_1 = 0;
6787 8 : uint32_t length_object_dn_1 = 0;
6788 8 : TALLOC_CTX *_mem_save_object_dn_0 = NULL;
6789 0 : uint32_t _ptr_spn_names;
6790 8 : uint32_t size_spn_names_1 = 0;
6791 0 : uint32_t cntr_spn_names_1;
6792 8 : TALLOC_CTX *_mem_save_spn_names_0 = NULL;
6793 8 : TALLOC_CTX *_mem_save_spn_names_1 = NULL;
6794 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6795 8 : if (ndr_flags & NDR_SCALARS) {
6796 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
6797 4 : NDR_CHECK(ndr_pull_drsuapi_DsSpnOperation(ndr, NDR_SCALARS, &r->operation));
6798 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
6799 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
6800 4 : if (_ptr_object_dn) {
6801 4 : NDR_PULL_ALLOC(ndr, r->object_dn);
6802 : } else {
6803 0 : r->object_dn = NULL;
6804 : }
6805 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
6806 4 : if (r->count > 10000) {
6807 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
6808 : }
6809 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_spn_names));
6810 4 : if (_ptr_spn_names) {
6811 4 : NDR_PULL_ALLOC(ndr, r->spn_names);
6812 : } else {
6813 0 : r->spn_names = NULL;
6814 : }
6815 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6816 : }
6817 8 : if (ndr_flags & NDR_BUFFERS) {
6818 4 : if (r->object_dn) {
6819 4 : _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
6820 4 : NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
6821 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
6822 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
6823 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
6824 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
6825 4 : if (length_object_dn_1 > size_object_dn_1) {
6826 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_object_dn_1, length_object_dn_1);
6827 : }
6828 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
6829 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
6830 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
6831 : }
6832 4 : if (r->spn_names) {
6833 4 : _mem_save_spn_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6834 4 : NDR_PULL_SET_MEM_CTX(ndr, r->spn_names, 0);
6835 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->spn_names));
6836 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->spn_names, &size_spn_names_1));
6837 4 : NDR_PULL_ALLOC_N(ndr, r->spn_names, size_spn_names_1);
6838 4 : _mem_save_spn_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
6839 4 : NDR_PULL_SET_MEM_CTX(ndr, r->spn_names, 0);
6840 16 : for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (size_spn_names_1); cntr_spn_names_1++) {
6841 12 : NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->spn_names[cntr_spn_names_1]));
6842 : }
6843 16 : for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (size_spn_names_1); cntr_spn_names_1++) {
6844 12 : NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->spn_names[cntr_spn_names_1]));
6845 : }
6846 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_spn_names_1, 0);
6847 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_spn_names_0, 0);
6848 : }
6849 4 : if (r->spn_names) {
6850 4 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->spn_names, r->count));
6851 : }
6852 16 : for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (size_spn_names_1); cntr_spn_names_1++) {
6853 0 : }
6854 : }
6855 8 : return NDR_ERR_SUCCESS;
6856 : }
6857 :
6858 0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsWriteAccountSpnRequest1 *r)
6859 : {
6860 0 : uint32_t cntr_spn_names_1;
6861 0 : ndr_print_struct(ndr, name, "drsuapi_DsWriteAccountSpnRequest1");
6862 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6863 0 : ndr->depth++;
6864 0 : ndr_print_drsuapi_DsSpnOperation(ndr, "operation", r->operation);
6865 0 : ndr_print_uint32(ndr, "unknown1", r->unknown1);
6866 0 : ndr_print_ptr(ndr, "object_dn", r->object_dn);
6867 0 : ndr->depth++;
6868 0 : if (r->object_dn) {
6869 0 : ndr_print_string(ndr, "object_dn", r->object_dn);
6870 : }
6871 0 : ndr->depth--;
6872 0 : ndr_print_uint32(ndr, "count", r->count);
6873 0 : ndr_print_ptr(ndr, "spn_names", r->spn_names);
6874 0 : ndr->depth++;
6875 0 : if (r->spn_names) {
6876 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "spn_names", (uint32_t)(r->count));
6877 0 : ndr->depth++;
6878 0 : for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (r->count); cntr_spn_names_1++) {
6879 0 : ndr_print_drsuapi_DsNameString(ndr, "spn_names", &r->spn_names[cntr_spn_names_1]);
6880 : }
6881 0 : ndr->depth--;
6882 : }
6883 0 : ndr->depth--;
6884 0 : ndr->depth--;
6885 : }
6886 :
6887 4 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsWriteAccountSpnRequest *r)
6888 : {
6889 0 : uint32_t level;
6890 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6891 4 : if (ndr_flags & NDR_SCALARS) {
6892 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6893 4 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6894 4 : NDR_CHECK(ndr_push_union_align(ndr, 5));
6895 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
6896 4 : NDR_CHECK(ndr_push_union_align(ndr, 5));
6897 4 : switch (level) {
6898 4 : case 1: {
6899 4 : NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_SCALARS, &r->req1));
6900 4 : break; }
6901 :
6902 0 : default:
6903 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
6904 : }
6905 : }
6906 4 : if (ndr_flags & NDR_BUFFERS) {
6907 4 : if (!(ndr_flags & NDR_SCALARS)) {
6908 : /* We didn't get it above, and the token is not needed after this. */
6909 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6910 : }
6911 4 : switch (level) {
6912 4 : case 1:
6913 4 : NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_BUFFERS, &r->req1));
6914 4 : break;
6915 :
6916 0 : default:
6917 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
6918 : }
6919 : }
6920 4 : return NDR_ERR_SUCCESS;
6921 : }
6922 :
6923 4 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsWriteAccountSpnRequest *r)
6924 : {
6925 0 : uint32_t level;
6926 0 : uint32_t _level;
6927 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6928 4 : if (ndr_flags & NDR_SCALARS) {
6929 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6930 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6931 4 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
6932 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6933 4 : if (_level != level) {
6934 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
6935 : }
6936 4 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
6937 4 : switch (level) {
6938 4 : case 1: {
6939 4 : NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_SCALARS, &r->req1));
6940 4 : break; }
6941 :
6942 0 : default:
6943 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
6944 : }
6945 : }
6946 4 : if (ndr_flags & NDR_BUFFERS) {
6947 4 : if (!(ndr_flags & NDR_SCALARS)) {
6948 : /* We didn't get it above, and the token is not needed after this. */
6949 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6950 : }
6951 4 : switch (level) {
6952 4 : case 1:
6953 4 : NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_BUFFERS, &r->req1));
6954 4 : break;
6955 :
6956 0 : default:
6957 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
6958 : }
6959 : }
6960 4 : return NDR_ERR_SUCCESS;
6961 : }
6962 :
6963 0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsWriteAccountSpnRequest *r)
6964 : {
6965 0 : uint32_t level;
6966 0 : level = ndr_print_steal_switch_value(ndr, r);
6967 0 : ndr_print_union(ndr, name, level, "drsuapi_DsWriteAccountSpnRequest");
6968 0 : switch (level) {
6969 0 : case 1:
6970 0 : ndr_print_drsuapi_DsWriteAccountSpnRequest1(ndr, "req1", &r->req1);
6971 0 : break;
6972 :
6973 0 : default:
6974 0 : ndr_print_bad_level(ndr, name, level);
6975 : }
6976 0 : }
6977 :
6978 4 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnResult1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsWriteAccountSpnResult1 *r)
6979 : {
6980 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6981 4 : if (ndr_flags & NDR_SCALARS) {
6982 4 : NDR_CHECK(ndr_push_align(ndr, 4));
6983 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
6984 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
6985 : }
6986 4 : if (ndr_flags & NDR_BUFFERS) {
6987 0 : }
6988 4 : return NDR_ERR_SUCCESS;
6989 : }
6990 :
6991 4 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnResult1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsWriteAccountSpnResult1 *r)
6992 : {
6993 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6994 4 : if (ndr_flags & NDR_SCALARS) {
6995 4 : NDR_CHECK(ndr_pull_align(ndr, 4));
6996 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
6997 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
6998 : }
6999 4 : if (ndr_flags & NDR_BUFFERS) {
7000 0 : }
7001 4 : return NDR_ERR_SUCCESS;
7002 : }
7003 :
7004 0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnResult1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsWriteAccountSpnResult1 *r)
7005 : {
7006 0 : ndr_print_struct(ndr, name, "drsuapi_DsWriteAccountSpnResult1");
7007 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7008 0 : ndr->depth++;
7009 0 : ndr_print_WERROR(ndr, "status", r->status);
7010 0 : ndr->depth--;
7011 : }
7012 :
7013 4 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnResult(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsWriteAccountSpnResult *r)
7014 : {
7015 0 : uint32_t level;
7016 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7017 4 : if (ndr_flags & NDR_SCALARS) {
7018 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7019 4 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7020 4 : NDR_CHECK(ndr_push_union_align(ndr, 4));
7021 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
7022 4 : NDR_CHECK(ndr_push_union_align(ndr, 4));
7023 4 : switch (level) {
7024 4 : case 1: {
7025 4 : NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnResult1(ndr, NDR_SCALARS, &r->res1));
7026 4 : break; }
7027 :
7028 0 : default:
7029 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7030 : }
7031 : }
7032 4 : if (ndr_flags & NDR_BUFFERS) {
7033 0 : if (!(ndr_flags & NDR_SCALARS)) {
7034 : /* We didn't get it above, and the token is not needed after this. */
7035 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7036 : }
7037 0 : switch (level) {
7038 0 : case 1:
7039 0 : break;
7040 :
7041 0 : default:
7042 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7043 : }
7044 : }
7045 4 : return NDR_ERR_SUCCESS;
7046 : }
7047 :
7048 4 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnResult(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsWriteAccountSpnResult *r)
7049 : {
7050 0 : uint32_t level;
7051 0 : uint32_t _level;
7052 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7053 4 : if (ndr_flags & NDR_SCALARS) {
7054 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7055 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7056 4 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
7057 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
7058 4 : if (_level != level) {
7059 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
7060 : }
7061 4 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
7062 4 : switch (level) {
7063 4 : case 1: {
7064 4 : NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnResult1(ndr, NDR_SCALARS, &r->res1));
7065 4 : break; }
7066 :
7067 0 : default:
7068 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
7069 : }
7070 : }
7071 4 : if (ndr_flags & NDR_BUFFERS) {
7072 0 : if (!(ndr_flags & NDR_SCALARS)) {
7073 : /* We didn't get it above, and the token is not needed after this. */
7074 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7075 : }
7076 0 : switch (level) {
7077 0 : case 1:
7078 0 : break;
7079 :
7080 0 : default:
7081 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
7082 : }
7083 : }
7084 4 : return NDR_ERR_SUCCESS;
7085 : }
7086 :
7087 0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnResult(struct ndr_print *ndr, const char *name, const union drsuapi_DsWriteAccountSpnResult *r)
7088 : {
7089 0 : uint32_t level;
7090 0 : level = ndr_print_steal_switch_value(ndr, r);
7091 0 : ndr_print_union(ndr, name, level, "drsuapi_DsWriteAccountSpnResult");
7092 0 : switch (level) {
7093 0 : case 1:
7094 0 : ndr_print_drsuapi_DsWriteAccountSpnResult1(ndr, "res1", &r->res1);
7095 0 : break;
7096 :
7097 0 : default:
7098 0 : ndr_print_bad_level(ndr, name, level);
7099 : }
7100 0 : }
7101 :
7102 14 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsRemoveDSServerRequest1 *r)
7103 : {
7104 14 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7105 14 : if (ndr_flags & NDR_SCALARS) {
7106 7 : NDR_CHECK(ndr_push_align(ndr, 5));
7107 7 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
7108 7 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_dn));
7109 7 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->commit));
7110 7 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7111 : }
7112 14 : if (ndr_flags & NDR_BUFFERS) {
7113 7 : if (r->server_dn) {
7114 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
7115 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7116 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
7117 7 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_dn, ndr_charset_length(r->server_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7118 : }
7119 7 : if (r->domain_dn) {
7120 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_dn, CH_UTF16)));
7121 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7122 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_dn, CH_UTF16)));
7123 7 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_dn, ndr_charset_length(r->domain_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7124 : }
7125 : }
7126 14 : return NDR_ERR_SUCCESS;
7127 : }
7128 :
7129 14 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsRemoveDSServerRequest1 *r)
7130 : {
7131 0 : uint32_t _ptr_server_dn;
7132 14 : uint32_t size_server_dn_1 = 0;
7133 14 : uint32_t length_server_dn_1 = 0;
7134 14 : TALLOC_CTX *_mem_save_server_dn_0 = NULL;
7135 0 : uint32_t _ptr_domain_dn;
7136 14 : uint32_t size_domain_dn_1 = 0;
7137 14 : uint32_t length_domain_dn_1 = 0;
7138 14 : TALLOC_CTX *_mem_save_domain_dn_0 = NULL;
7139 14 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7140 14 : if (ndr_flags & NDR_SCALARS) {
7141 7 : NDR_CHECK(ndr_pull_align(ndr, 5));
7142 7 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
7143 7 : if (_ptr_server_dn) {
7144 7 : NDR_PULL_ALLOC(ndr, r->server_dn);
7145 : } else {
7146 0 : r->server_dn = NULL;
7147 : }
7148 7 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_dn));
7149 7 : if (_ptr_domain_dn) {
7150 7 : NDR_PULL_ALLOC(ndr, r->domain_dn);
7151 : } else {
7152 0 : r->domain_dn = NULL;
7153 : }
7154 7 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->commit));
7155 7 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7156 : }
7157 14 : if (ndr_flags & NDR_BUFFERS) {
7158 7 : if (r->server_dn) {
7159 7 : _mem_save_server_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
7160 7 : NDR_PULL_SET_MEM_CTX(ndr, r->server_dn, 0);
7161 7 : NDR_CHECK(ndr_pull_array_size(ndr, &r->server_dn));
7162 7 : NDR_CHECK(ndr_pull_array_length(ndr, &r->server_dn));
7163 7 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_dn, &size_server_dn_1));
7164 7 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_dn, &length_server_dn_1));
7165 7 : if (length_server_dn_1 > size_server_dn_1) {
7166 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_dn_1, length_server_dn_1);
7167 : }
7168 7 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_dn_1, sizeof(uint16_t)));
7169 7 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_dn, length_server_dn_1, sizeof(uint16_t), CH_UTF16));
7170 7 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_dn_0, 0);
7171 : }
7172 7 : if (r->domain_dn) {
7173 7 : _mem_save_domain_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
7174 7 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_dn, 0);
7175 7 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_dn));
7176 7 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_dn));
7177 7 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_dn, &size_domain_dn_1));
7178 7 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_dn, &length_domain_dn_1));
7179 7 : if (length_domain_dn_1 > size_domain_dn_1) {
7180 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_dn_1, length_domain_dn_1);
7181 : }
7182 7 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_dn_1, sizeof(uint16_t)));
7183 7 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_dn, length_domain_dn_1, sizeof(uint16_t), CH_UTF16));
7184 7 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_dn_0, 0);
7185 : }
7186 : }
7187 14 : return NDR_ERR_SUCCESS;
7188 : }
7189 :
7190 0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsRemoveDSServerRequest1 *r)
7191 : {
7192 0 : ndr_print_struct(ndr, name, "drsuapi_DsRemoveDSServerRequest1");
7193 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7194 0 : ndr->depth++;
7195 0 : ndr_print_ptr(ndr, "server_dn", r->server_dn);
7196 0 : ndr->depth++;
7197 0 : if (r->server_dn) {
7198 0 : ndr_print_string(ndr, "server_dn", r->server_dn);
7199 : }
7200 0 : ndr->depth--;
7201 0 : ndr_print_ptr(ndr, "domain_dn", r->domain_dn);
7202 0 : ndr->depth++;
7203 0 : if (r->domain_dn) {
7204 0 : ndr_print_string(ndr, "domain_dn", r->domain_dn);
7205 : }
7206 0 : ndr->depth--;
7207 0 : ndr_print_uint32(ndr, "commit", r->commit);
7208 0 : ndr->depth--;
7209 : }
7210 :
7211 7 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsRemoveDSServerRequest *r)
7212 : {
7213 0 : uint32_t level;
7214 7 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7215 7 : if (ndr_flags & NDR_SCALARS) {
7216 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7217 7 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7218 7 : NDR_CHECK(ndr_push_union_align(ndr, 5));
7219 7 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
7220 7 : NDR_CHECK(ndr_push_union_align(ndr, 5));
7221 7 : switch (level) {
7222 7 : case 1: {
7223 7 : NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_SCALARS, &r->req1));
7224 7 : break; }
7225 :
7226 0 : default:
7227 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7228 : }
7229 : }
7230 7 : if (ndr_flags & NDR_BUFFERS) {
7231 7 : if (!(ndr_flags & NDR_SCALARS)) {
7232 : /* We didn't get it above, and the token is not needed after this. */
7233 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7234 : }
7235 7 : switch (level) {
7236 7 : case 1:
7237 7 : NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_BUFFERS, &r->req1));
7238 7 : break;
7239 :
7240 0 : default:
7241 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7242 : }
7243 : }
7244 7 : return NDR_ERR_SUCCESS;
7245 : }
7246 :
7247 7 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsRemoveDSServerRequest *r)
7248 : {
7249 0 : uint32_t level;
7250 0 : uint32_t _level;
7251 7 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7252 7 : if (ndr_flags & NDR_SCALARS) {
7253 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7254 7 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7255 7 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
7256 7 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
7257 7 : if (_level != level) {
7258 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
7259 : }
7260 7 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
7261 7 : switch (level) {
7262 7 : case 1: {
7263 7 : NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_SCALARS, &r->req1));
7264 7 : break; }
7265 :
7266 0 : default:
7267 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
7268 : }
7269 : }
7270 7 : if (ndr_flags & NDR_BUFFERS) {
7271 7 : if (!(ndr_flags & NDR_SCALARS)) {
7272 : /* We didn't get it above, and the token is not needed after this. */
7273 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7274 : }
7275 7 : switch (level) {
7276 7 : case 1:
7277 7 : NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_BUFFERS, &r->req1));
7278 7 : break;
7279 :
7280 0 : default:
7281 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
7282 : }
7283 : }
7284 7 : return NDR_ERR_SUCCESS;
7285 : }
7286 :
7287 0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsRemoveDSServerRequest *r)
7288 : {
7289 0 : uint32_t level;
7290 0 : level = ndr_print_steal_switch_value(ndr, r);
7291 0 : ndr_print_union(ndr, name, level, "drsuapi_DsRemoveDSServerRequest");
7292 0 : switch (level) {
7293 0 : case 1:
7294 0 : ndr_print_drsuapi_DsRemoveDSServerRequest1(ndr, "req1", &r->req1);
7295 0 : break;
7296 :
7297 0 : default:
7298 0 : ndr_print_bad_level(ndr, name, level);
7299 : }
7300 0 : }
7301 :
7302 7 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerResult1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsRemoveDSServerResult1 *r)
7303 : {
7304 7 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7305 7 : if (ndr_flags & NDR_SCALARS) {
7306 7 : NDR_CHECK(ndr_push_align(ndr, 4));
7307 7 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->last_dc_in_domain));
7308 7 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7309 : }
7310 7 : if (ndr_flags & NDR_BUFFERS) {
7311 0 : }
7312 7 : return NDR_ERR_SUCCESS;
7313 : }
7314 :
7315 7 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerResult1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsRemoveDSServerResult1 *r)
7316 : {
7317 7 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7318 7 : if (ndr_flags & NDR_SCALARS) {
7319 7 : NDR_CHECK(ndr_pull_align(ndr, 4));
7320 7 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->last_dc_in_domain));
7321 7 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7322 : }
7323 7 : if (ndr_flags & NDR_BUFFERS) {
7324 0 : }
7325 7 : return NDR_ERR_SUCCESS;
7326 : }
7327 :
7328 0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerResult1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsRemoveDSServerResult1 *r)
7329 : {
7330 0 : ndr_print_struct(ndr, name, "drsuapi_DsRemoveDSServerResult1");
7331 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7332 0 : ndr->depth++;
7333 0 : ndr_print_uint32(ndr, "last_dc_in_domain", r->last_dc_in_domain);
7334 0 : ndr->depth--;
7335 : }
7336 :
7337 7 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerResult(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsRemoveDSServerResult *r)
7338 : {
7339 0 : uint32_t level;
7340 7 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7341 7 : if (ndr_flags & NDR_SCALARS) {
7342 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7343 7 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7344 7 : NDR_CHECK(ndr_push_union_align(ndr, 4));
7345 7 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
7346 7 : NDR_CHECK(ndr_push_union_align(ndr, 4));
7347 7 : switch (level) {
7348 7 : case 1: {
7349 7 : NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerResult1(ndr, NDR_SCALARS, &r->res1));
7350 7 : break; }
7351 :
7352 0 : default:
7353 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7354 : }
7355 : }
7356 7 : if (ndr_flags & NDR_BUFFERS) {
7357 0 : if (!(ndr_flags & NDR_SCALARS)) {
7358 : /* We didn't get it above, and the token is not needed after this. */
7359 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7360 : }
7361 0 : switch (level) {
7362 0 : case 1:
7363 0 : break;
7364 :
7365 0 : default:
7366 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7367 : }
7368 : }
7369 7 : return NDR_ERR_SUCCESS;
7370 : }
7371 :
7372 7 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerResult(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsRemoveDSServerResult *r)
7373 : {
7374 0 : uint32_t level;
7375 0 : uint32_t _level;
7376 7 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7377 7 : if (ndr_flags & NDR_SCALARS) {
7378 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7379 7 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7380 7 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
7381 7 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
7382 7 : if (_level != level) {
7383 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
7384 : }
7385 7 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
7386 7 : switch (level) {
7387 7 : case 1: {
7388 7 : NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerResult1(ndr, NDR_SCALARS, &r->res1));
7389 7 : break; }
7390 :
7391 0 : default:
7392 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
7393 : }
7394 : }
7395 7 : if (ndr_flags & NDR_BUFFERS) {
7396 0 : if (!(ndr_flags & NDR_SCALARS)) {
7397 : /* We didn't get it above, and the token is not needed after this. */
7398 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7399 : }
7400 0 : switch (level) {
7401 0 : case 1:
7402 0 : break;
7403 :
7404 0 : default:
7405 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
7406 : }
7407 : }
7408 7 : return NDR_ERR_SUCCESS;
7409 : }
7410 :
7411 0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerResult(struct ndr_print *ndr, const char *name, const union drsuapi_DsRemoveDSServerResult *r)
7412 : {
7413 0 : uint32_t level;
7414 0 : level = ndr_print_steal_switch_value(ndr, r);
7415 0 : ndr_print_union(ndr, name, level, "drsuapi_DsRemoveDSServerResult");
7416 0 : switch (level) {
7417 0 : case 1:
7418 0 : ndr_print_drsuapi_DsRemoveDSServerResult1(ndr, "res1", &r->res1);
7419 0 : break;
7420 :
7421 0 : default:
7422 0 : ndr_print_bad_level(ndr, name, level);
7423 : }
7424 0 : }
7425 :
7426 18 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtrLevels(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsGetDCInfoCtrLevels r)
7427 : {
7428 18 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
7429 18 : return NDR_ERR_SUCCESS;
7430 : }
7431 :
7432 12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtrLevels(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsGetDCInfoCtrLevels *r)
7433 : {
7434 0 : uint32_t v;
7435 12 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
7436 12 : *r = v;
7437 12 : return NDR_ERR_SUCCESS;
7438 : }
7439 :
7440 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtrLevels(struct ndr_print *ndr, const char *name, enum drsuapi_DsGetDCInfoCtrLevels r)
7441 : {
7442 0 : const char *val = NULL;
7443 :
7444 0 : switch (r) {
7445 0 : case DRSUAPI_DC_INFO_CTR_1: val = "DRSUAPI_DC_INFO_CTR_1"; break;
7446 0 : case DRSUAPI_DC_INFO_CTR_2: val = "DRSUAPI_DC_INFO_CTR_2"; break;
7447 0 : case DRSUAPI_DC_INFO_CTR_3: val = "DRSUAPI_DC_INFO_CTR_3"; break;
7448 0 : case DRSUAPI_DC_CONNECTION_CTR_01: val = "DRSUAPI_DC_CONNECTION_CTR_01"; break;
7449 : }
7450 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
7451 0 : }
7452 :
7453 12 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfoRequest1 *r)
7454 : {
7455 12 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7456 12 : if (ndr_flags & NDR_SCALARS) {
7457 6 : NDR_CHECK(ndr_push_align(ndr, 5));
7458 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
7459 6 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, r->level));
7460 6 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7461 : }
7462 12 : if (ndr_flags & NDR_BUFFERS) {
7463 6 : if (r->domain_name) {
7464 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
7465 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7466 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
7467 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7468 : }
7469 : }
7470 12 : return NDR_ERR_SUCCESS;
7471 : }
7472 :
7473 12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfoRequest1 *r)
7474 : {
7475 0 : uint32_t _ptr_domain_name;
7476 12 : uint32_t size_domain_name_1 = 0;
7477 12 : uint32_t length_domain_name_1 = 0;
7478 12 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
7479 12 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7480 12 : if (ndr_flags & NDR_SCALARS) {
7481 6 : NDR_CHECK(ndr_pull_align(ndr, 5));
7482 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
7483 6 : if (_ptr_domain_name) {
7484 6 : NDR_PULL_ALLOC(ndr, r->domain_name);
7485 : } else {
7486 0 : r->domain_name = NULL;
7487 : }
7488 6 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, &r->level));
7489 6 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7490 : }
7491 12 : if (ndr_flags & NDR_BUFFERS) {
7492 6 : if (r->domain_name) {
7493 6 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7494 6 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
7495 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
7496 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
7497 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
7498 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
7499 6 : if (length_domain_name_1 > size_domain_name_1) {
7500 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
7501 : }
7502 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
7503 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
7504 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
7505 : }
7506 : }
7507 12 : return NDR_ERR_SUCCESS;
7508 : }
7509 :
7510 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoRequest1 *r)
7511 : {
7512 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfoRequest1");
7513 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7514 0 : ndr->depth++;
7515 0 : ndr_print_ptr(ndr, "domain_name", r->domain_name);
7516 0 : ndr->depth++;
7517 0 : if (r->domain_name) {
7518 0 : ndr_print_string(ndr, "domain_name", r->domain_name);
7519 : }
7520 0 : ndr->depth--;
7521 0 : ndr_print_drsuapi_DsGetDCInfoCtrLevels(ndr, "level", r->level);
7522 0 : ndr->depth--;
7523 : }
7524 :
7525 6 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetDCInfoRequest *r)
7526 : {
7527 0 : uint32_t level;
7528 6 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7529 6 : if (ndr_flags & NDR_SCALARS) {
7530 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7531 6 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7532 6 : NDR_CHECK(ndr_push_union_align(ndr, 5));
7533 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
7534 6 : NDR_CHECK(ndr_push_union_align(ndr, 5));
7535 6 : switch (level) {
7536 6 : case 1: {
7537 6 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr, NDR_SCALARS, &r->req1));
7538 6 : break; }
7539 :
7540 0 : default:
7541 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7542 : }
7543 : }
7544 6 : if (ndr_flags & NDR_BUFFERS) {
7545 6 : if (!(ndr_flags & NDR_SCALARS)) {
7546 : /* We didn't get it above, and the token is not needed after this. */
7547 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7548 : }
7549 6 : switch (level) {
7550 6 : case 1:
7551 6 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr, NDR_BUFFERS, &r->req1));
7552 6 : break;
7553 :
7554 0 : default:
7555 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7556 : }
7557 : }
7558 6 : return NDR_ERR_SUCCESS;
7559 : }
7560 :
7561 6 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetDCInfoRequest *r)
7562 : {
7563 0 : uint32_t level;
7564 0 : uint32_t _level;
7565 6 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7566 6 : if (ndr_flags & NDR_SCALARS) {
7567 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7568 6 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7569 6 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
7570 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
7571 6 : if (_level != level) {
7572 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
7573 : }
7574 6 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
7575 6 : switch (level) {
7576 6 : case 1: {
7577 6 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr, NDR_SCALARS, &r->req1));
7578 6 : break; }
7579 :
7580 0 : default:
7581 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
7582 : }
7583 : }
7584 6 : if (ndr_flags & NDR_BUFFERS) {
7585 6 : if (!(ndr_flags & NDR_SCALARS)) {
7586 : /* We didn't get it above, and the token is not needed after this. */
7587 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7588 : }
7589 6 : switch (level) {
7590 6 : case 1:
7591 6 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr, NDR_BUFFERS, &r->req1));
7592 6 : break;
7593 :
7594 0 : default:
7595 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
7596 : }
7597 : }
7598 6 : return NDR_ERR_SUCCESS;
7599 : }
7600 :
7601 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetDCInfoRequest *r)
7602 : {
7603 0 : uint32_t level;
7604 0 : level = ndr_print_steal_switch_value(ndr, r);
7605 0 : ndr_print_union(ndr, name, level, "drsuapi_DsGetDCInfoRequest");
7606 0 : switch (level) {
7607 0 : case 1:
7608 0 : ndr_print_drsuapi_DsGetDCInfoRequest1(ndr, "req1", &r->req1);
7609 0 : break;
7610 :
7611 0 : default:
7612 0 : ndr_print_bad_level(ndr, name, level);
7613 : }
7614 0 : }
7615 :
7616 12 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfo1 *r)
7617 : {
7618 12 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7619 12 : if (ndr_flags & NDR_SCALARS) {
7620 6 : NDR_CHECK(ndr_push_align(ndr, 5));
7621 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
7622 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
7623 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_name));
7624 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_dn));
7625 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
7626 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_pdc));
7627 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_enabled));
7628 6 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7629 : }
7630 12 : if (ndr_flags & NDR_BUFFERS) {
7631 6 : if (r->netbios_name) {
7632 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
7633 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7634 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
7635 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->netbios_name, ndr_charset_length(r->netbios_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7636 : }
7637 6 : if (r->dns_name) {
7638 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
7639 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7640 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
7641 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, ndr_charset_length(r->dns_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7642 : }
7643 6 : if (r->site_name) {
7644 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
7645 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7646 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
7647 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_name, ndr_charset_length(r->site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7648 : }
7649 6 : if (r->computer_dn) {
7650 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
7651 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7652 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
7653 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer_dn, ndr_charset_length(r->computer_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7654 : }
7655 6 : if (r->server_dn) {
7656 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
7657 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7658 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
7659 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_dn, ndr_charset_length(r->server_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7660 : }
7661 : }
7662 12 : return NDR_ERR_SUCCESS;
7663 : }
7664 :
7665 12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfo1 *r)
7666 : {
7667 0 : uint32_t _ptr_netbios_name;
7668 12 : uint32_t size_netbios_name_1 = 0;
7669 12 : uint32_t length_netbios_name_1 = 0;
7670 12 : TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
7671 0 : uint32_t _ptr_dns_name;
7672 12 : uint32_t size_dns_name_1 = 0;
7673 12 : uint32_t length_dns_name_1 = 0;
7674 12 : TALLOC_CTX *_mem_save_dns_name_0 = NULL;
7675 0 : uint32_t _ptr_site_name;
7676 12 : uint32_t size_site_name_1 = 0;
7677 12 : uint32_t length_site_name_1 = 0;
7678 12 : TALLOC_CTX *_mem_save_site_name_0 = NULL;
7679 0 : uint32_t _ptr_computer_dn;
7680 12 : uint32_t size_computer_dn_1 = 0;
7681 12 : uint32_t length_computer_dn_1 = 0;
7682 12 : TALLOC_CTX *_mem_save_computer_dn_0 = NULL;
7683 0 : uint32_t _ptr_server_dn;
7684 12 : uint32_t size_server_dn_1 = 0;
7685 12 : uint32_t length_server_dn_1 = 0;
7686 12 : TALLOC_CTX *_mem_save_server_dn_0 = NULL;
7687 12 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7688 12 : if (ndr_flags & NDR_SCALARS) {
7689 6 : NDR_CHECK(ndr_pull_align(ndr, 5));
7690 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
7691 6 : if (_ptr_netbios_name) {
7692 6 : NDR_PULL_ALLOC(ndr, r->netbios_name);
7693 : } else {
7694 0 : r->netbios_name = NULL;
7695 : }
7696 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
7697 6 : if (_ptr_dns_name) {
7698 6 : NDR_PULL_ALLOC(ndr, r->dns_name);
7699 : } else {
7700 0 : r->dns_name = NULL;
7701 : }
7702 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
7703 6 : if (_ptr_site_name) {
7704 6 : NDR_PULL_ALLOC(ndr, r->site_name);
7705 : } else {
7706 0 : r->site_name = NULL;
7707 : }
7708 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_dn));
7709 6 : if (_ptr_computer_dn) {
7710 6 : NDR_PULL_ALLOC(ndr, r->computer_dn);
7711 : } else {
7712 0 : r->computer_dn = NULL;
7713 : }
7714 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
7715 6 : if (_ptr_server_dn) {
7716 6 : NDR_PULL_ALLOC(ndr, r->server_dn);
7717 : } else {
7718 0 : r->server_dn = NULL;
7719 : }
7720 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_pdc));
7721 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_enabled));
7722 6 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7723 : }
7724 12 : if (ndr_flags & NDR_BUFFERS) {
7725 6 : if (r->netbios_name) {
7726 6 : _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7727 6 : NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
7728 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
7729 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
7730 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->netbios_name, &size_netbios_name_1));
7731 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->netbios_name, &length_netbios_name_1));
7732 6 : if (length_netbios_name_1 > size_netbios_name_1) {
7733 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_netbios_name_1, length_netbios_name_1);
7734 : }
7735 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_netbios_name_1, sizeof(uint16_t)));
7736 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, length_netbios_name_1, sizeof(uint16_t), CH_UTF16));
7737 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
7738 : }
7739 6 : if (r->dns_name) {
7740 6 : _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7741 6 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
7742 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
7743 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
7744 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_name, &size_dns_name_1));
7745 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_name, &length_dns_name_1));
7746 6 : if (length_dns_name_1 > size_dns_name_1) {
7747 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_name_1, length_dns_name_1);
7748 : }
7749 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_name_1, sizeof(uint16_t)));
7750 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, length_dns_name_1, sizeof(uint16_t), CH_UTF16));
7751 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
7752 : }
7753 6 : if (r->site_name) {
7754 6 : _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7755 6 : NDR_PULL_SET_MEM_CTX(ndr, r->site_name, 0);
7756 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->site_name));
7757 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->site_name));
7758 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_name, &size_site_name_1));
7759 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_name, &length_site_name_1));
7760 6 : if (length_site_name_1 > size_site_name_1) {
7761 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
7762 : }
7763 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
7764 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
7765 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
7766 : }
7767 6 : if (r->computer_dn) {
7768 6 : _mem_save_computer_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
7769 6 : NDR_PULL_SET_MEM_CTX(ndr, r->computer_dn, 0);
7770 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_dn));
7771 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_dn));
7772 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_dn, &size_computer_dn_1));
7773 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_dn, &length_computer_dn_1));
7774 6 : if (length_computer_dn_1 > size_computer_dn_1) {
7775 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_dn_1, length_computer_dn_1);
7776 : }
7777 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_dn_1, sizeof(uint16_t)));
7778 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_dn, length_computer_dn_1, sizeof(uint16_t), CH_UTF16));
7779 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_dn_0, 0);
7780 : }
7781 6 : if (r->server_dn) {
7782 6 : _mem_save_server_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
7783 6 : NDR_PULL_SET_MEM_CTX(ndr, r->server_dn, 0);
7784 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->server_dn));
7785 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->server_dn));
7786 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_dn, &size_server_dn_1));
7787 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_dn, &length_server_dn_1));
7788 6 : if (length_server_dn_1 > size_server_dn_1) {
7789 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_dn_1, length_server_dn_1);
7790 : }
7791 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_dn_1, sizeof(uint16_t)));
7792 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_dn, length_server_dn_1, sizeof(uint16_t), CH_UTF16));
7793 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_dn_0, 0);
7794 : }
7795 : }
7796 12 : return NDR_ERR_SUCCESS;
7797 : }
7798 :
7799 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfo1 *r)
7800 : {
7801 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfo1");
7802 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7803 0 : ndr->depth++;
7804 0 : ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
7805 0 : ndr->depth++;
7806 0 : if (r->netbios_name) {
7807 0 : ndr_print_string(ndr, "netbios_name", r->netbios_name);
7808 : }
7809 0 : ndr->depth--;
7810 0 : ndr_print_ptr(ndr, "dns_name", r->dns_name);
7811 0 : ndr->depth++;
7812 0 : if (r->dns_name) {
7813 0 : ndr_print_string(ndr, "dns_name", r->dns_name);
7814 : }
7815 0 : ndr->depth--;
7816 0 : ndr_print_ptr(ndr, "site_name", r->site_name);
7817 0 : ndr->depth++;
7818 0 : if (r->site_name) {
7819 0 : ndr_print_string(ndr, "site_name", r->site_name);
7820 : }
7821 0 : ndr->depth--;
7822 0 : ndr_print_ptr(ndr, "computer_dn", r->computer_dn);
7823 0 : ndr->depth++;
7824 0 : if (r->computer_dn) {
7825 0 : ndr_print_string(ndr, "computer_dn", r->computer_dn);
7826 : }
7827 0 : ndr->depth--;
7828 0 : ndr_print_ptr(ndr, "server_dn", r->server_dn);
7829 0 : ndr->depth++;
7830 0 : if (r->server_dn) {
7831 0 : ndr_print_string(ndr, "server_dn", r->server_dn);
7832 : }
7833 0 : ndr->depth--;
7834 0 : ndr_print_uint32(ndr, "is_pdc", r->is_pdc);
7835 0 : ndr_print_uint32(ndr, "is_enabled", r->is_enabled);
7836 0 : ndr->depth--;
7837 : }
7838 :
7839 6 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfoCtr1 *r)
7840 : {
7841 0 : uint32_t cntr_array_1;
7842 6 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7843 6 : if (ndr_flags & NDR_SCALARS) {
7844 3 : NDR_CHECK(ndr_push_align(ndr, 5));
7845 3 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
7846 3 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
7847 3 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7848 : }
7849 6 : if (ndr_flags & NDR_BUFFERS) {
7850 3 : if (r->array) {
7851 3 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
7852 9 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
7853 6 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
7854 : }
7855 9 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
7856 6 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
7857 : }
7858 : }
7859 : }
7860 6 : return NDR_ERR_SUCCESS;
7861 : }
7862 :
7863 6 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfoCtr1 *r)
7864 : {
7865 0 : uint32_t _ptr_array;
7866 6 : uint32_t size_array_1 = 0;
7867 0 : uint32_t cntr_array_1;
7868 6 : TALLOC_CTX *_mem_save_array_0 = NULL;
7869 6 : TALLOC_CTX *_mem_save_array_1 = NULL;
7870 6 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7871 6 : if (ndr_flags & NDR_SCALARS) {
7872 3 : NDR_CHECK(ndr_pull_align(ndr, 5));
7873 3 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
7874 3 : if (r->count > 10000) {
7875 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
7876 : }
7877 3 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
7878 3 : if (_ptr_array) {
7879 3 : NDR_PULL_ALLOC(ndr, r->array);
7880 : } else {
7881 0 : r->array = NULL;
7882 : }
7883 3 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7884 : }
7885 6 : if (ndr_flags & NDR_BUFFERS) {
7886 3 : if (r->array) {
7887 3 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
7888 3 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
7889 3 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
7890 3 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
7891 3 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
7892 3 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
7893 3 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
7894 9 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
7895 6 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
7896 : }
7897 9 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
7898 6 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
7899 : }
7900 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
7901 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
7902 : }
7903 3 : if (r->array) {
7904 3 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
7905 : }
7906 9 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
7907 0 : }
7908 : }
7909 6 : return NDR_ERR_SUCCESS;
7910 : }
7911 :
7912 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoCtr1 *r)
7913 : {
7914 0 : uint32_t cntr_array_1;
7915 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfoCtr1");
7916 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7917 0 : ndr->depth++;
7918 0 : ndr_print_uint32(ndr, "count", r->count);
7919 0 : ndr_print_ptr(ndr, "array", r->array);
7920 0 : ndr->depth++;
7921 0 : if (r->array) {
7922 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
7923 0 : ndr->depth++;
7924 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
7925 0 : ndr_print_drsuapi_DsGetDCInfo1(ndr, "array", &r->array[cntr_array_1]);
7926 : }
7927 0 : ndr->depth--;
7928 : }
7929 0 : ndr->depth--;
7930 0 : ndr->depth--;
7931 : }
7932 :
7933 8 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfo2 *r)
7934 : {
7935 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7936 8 : if (ndr_flags & NDR_SCALARS) {
7937 4 : NDR_CHECK(ndr_push_align(ndr, 5));
7938 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
7939 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
7940 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_name));
7941 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_dn));
7942 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_dn));
7943 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
7944 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ntds_dn));
7945 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_pdc));
7946 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_enabled));
7947 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_gc));
7948 4 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
7949 4 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->computer_guid));
7950 4 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->server_guid));
7951 4 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->ntds_guid));
7952 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7953 : }
7954 8 : if (ndr_flags & NDR_BUFFERS) {
7955 4 : if (r->netbios_name) {
7956 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
7957 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7958 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
7959 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->netbios_name, ndr_charset_length(r->netbios_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7960 : }
7961 4 : if (r->dns_name) {
7962 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
7963 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7964 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
7965 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, ndr_charset_length(r->dns_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7966 : }
7967 4 : if (r->site_name) {
7968 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
7969 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7970 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
7971 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_name, ndr_charset_length(r->site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7972 : }
7973 4 : if (r->site_dn) {
7974 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_dn, CH_UTF16)));
7975 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7976 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_dn, CH_UTF16)));
7977 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_dn, ndr_charset_length(r->site_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7978 : }
7979 4 : if (r->computer_dn) {
7980 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
7981 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7982 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
7983 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer_dn, ndr_charset_length(r->computer_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7984 : }
7985 4 : if (r->server_dn) {
7986 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
7987 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7988 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
7989 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_dn, ndr_charset_length(r->server_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7990 : }
7991 4 : if (r->ntds_dn) {
7992 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ntds_dn, CH_UTF16)));
7993 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7994 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ntds_dn, CH_UTF16)));
7995 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ntds_dn, ndr_charset_length(r->ntds_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7996 : }
7997 : }
7998 8 : return NDR_ERR_SUCCESS;
7999 : }
8000 :
8001 8 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfo2 *r)
8002 : {
8003 0 : uint32_t _ptr_netbios_name;
8004 8 : uint32_t size_netbios_name_1 = 0;
8005 8 : uint32_t length_netbios_name_1 = 0;
8006 8 : TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
8007 0 : uint32_t _ptr_dns_name;
8008 8 : uint32_t size_dns_name_1 = 0;
8009 8 : uint32_t length_dns_name_1 = 0;
8010 8 : TALLOC_CTX *_mem_save_dns_name_0 = NULL;
8011 0 : uint32_t _ptr_site_name;
8012 8 : uint32_t size_site_name_1 = 0;
8013 8 : uint32_t length_site_name_1 = 0;
8014 8 : TALLOC_CTX *_mem_save_site_name_0 = NULL;
8015 0 : uint32_t _ptr_site_dn;
8016 8 : uint32_t size_site_dn_1 = 0;
8017 8 : uint32_t length_site_dn_1 = 0;
8018 8 : TALLOC_CTX *_mem_save_site_dn_0 = NULL;
8019 0 : uint32_t _ptr_computer_dn;
8020 8 : uint32_t size_computer_dn_1 = 0;
8021 8 : uint32_t length_computer_dn_1 = 0;
8022 8 : TALLOC_CTX *_mem_save_computer_dn_0 = NULL;
8023 0 : uint32_t _ptr_server_dn;
8024 8 : uint32_t size_server_dn_1 = 0;
8025 8 : uint32_t length_server_dn_1 = 0;
8026 8 : TALLOC_CTX *_mem_save_server_dn_0 = NULL;
8027 0 : uint32_t _ptr_ntds_dn;
8028 8 : uint32_t size_ntds_dn_1 = 0;
8029 8 : uint32_t length_ntds_dn_1 = 0;
8030 8 : TALLOC_CTX *_mem_save_ntds_dn_0 = NULL;
8031 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8032 8 : if (ndr_flags & NDR_SCALARS) {
8033 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
8034 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
8035 4 : if (_ptr_netbios_name) {
8036 4 : NDR_PULL_ALLOC(ndr, r->netbios_name);
8037 : } else {
8038 0 : r->netbios_name = NULL;
8039 : }
8040 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
8041 4 : if (_ptr_dns_name) {
8042 4 : NDR_PULL_ALLOC(ndr, r->dns_name);
8043 : } else {
8044 0 : r->dns_name = NULL;
8045 : }
8046 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
8047 4 : if (_ptr_site_name) {
8048 4 : NDR_PULL_ALLOC(ndr, r->site_name);
8049 : } else {
8050 0 : r->site_name = NULL;
8051 : }
8052 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_dn));
8053 4 : if (_ptr_site_dn) {
8054 4 : NDR_PULL_ALLOC(ndr, r->site_dn);
8055 : } else {
8056 0 : r->site_dn = NULL;
8057 : }
8058 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_dn));
8059 4 : if (_ptr_computer_dn) {
8060 4 : NDR_PULL_ALLOC(ndr, r->computer_dn);
8061 : } else {
8062 0 : r->computer_dn = NULL;
8063 : }
8064 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
8065 4 : if (_ptr_server_dn) {
8066 4 : NDR_PULL_ALLOC(ndr, r->server_dn);
8067 : } else {
8068 0 : r->server_dn = NULL;
8069 : }
8070 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ntds_dn));
8071 4 : if (_ptr_ntds_dn) {
8072 2 : NDR_PULL_ALLOC(ndr, r->ntds_dn);
8073 : } else {
8074 2 : r->ntds_dn = NULL;
8075 : }
8076 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_pdc));
8077 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_enabled));
8078 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_gc));
8079 4 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
8080 4 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->computer_guid));
8081 4 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->server_guid));
8082 4 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->ntds_guid));
8083 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8084 : }
8085 8 : if (ndr_flags & NDR_BUFFERS) {
8086 4 : if (r->netbios_name) {
8087 4 : _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8088 4 : NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
8089 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
8090 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
8091 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->netbios_name, &size_netbios_name_1));
8092 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->netbios_name, &length_netbios_name_1));
8093 4 : if (length_netbios_name_1 > size_netbios_name_1) {
8094 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_netbios_name_1, length_netbios_name_1);
8095 : }
8096 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_netbios_name_1, sizeof(uint16_t)));
8097 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, length_netbios_name_1, sizeof(uint16_t), CH_UTF16));
8098 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
8099 : }
8100 4 : if (r->dns_name) {
8101 4 : _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8102 4 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
8103 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
8104 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
8105 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_name, &size_dns_name_1));
8106 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_name, &length_dns_name_1));
8107 4 : if (length_dns_name_1 > size_dns_name_1) {
8108 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_name_1, length_dns_name_1);
8109 : }
8110 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_name_1, sizeof(uint16_t)));
8111 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, length_dns_name_1, sizeof(uint16_t), CH_UTF16));
8112 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
8113 : }
8114 4 : if (r->site_name) {
8115 4 : _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8116 4 : NDR_PULL_SET_MEM_CTX(ndr, r->site_name, 0);
8117 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->site_name));
8118 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->site_name));
8119 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_name, &size_site_name_1));
8120 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_name, &length_site_name_1));
8121 4 : if (length_site_name_1 > size_site_name_1) {
8122 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
8123 : }
8124 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
8125 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
8126 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
8127 : }
8128 4 : if (r->site_dn) {
8129 4 : _mem_save_site_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
8130 4 : NDR_PULL_SET_MEM_CTX(ndr, r->site_dn, 0);
8131 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->site_dn));
8132 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->site_dn));
8133 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_dn, &size_site_dn_1));
8134 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_dn, &length_site_dn_1));
8135 4 : if (length_site_dn_1 > size_site_dn_1) {
8136 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_dn_1, length_site_dn_1);
8137 : }
8138 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_dn_1, sizeof(uint16_t)));
8139 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_dn, length_site_dn_1, sizeof(uint16_t), CH_UTF16));
8140 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_dn_0, 0);
8141 : }
8142 4 : if (r->computer_dn) {
8143 4 : _mem_save_computer_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
8144 4 : NDR_PULL_SET_MEM_CTX(ndr, r->computer_dn, 0);
8145 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_dn));
8146 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_dn));
8147 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_dn, &size_computer_dn_1));
8148 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_dn, &length_computer_dn_1));
8149 4 : if (length_computer_dn_1 > size_computer_dn_1) {
8150 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_dn_1, length_computer_dn_1);
8151 : }
8152 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_dn_1, sizeof(uint16_t)));
8153 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_dn, length_computer_dn_1, sizeof(uint16_t), CH_UTF16));
8154 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_dn_0, 0);
8155 : }
8156 4 : if (r->server_dn) {
8157 4 : _mem_save_server_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
8158 4 : NDR_PULL_SET_MEM_CTX(ndr, r->server_dn, 0);
8159 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->server_dn));
8160 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->server_dn));
8161 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_dn, &size_server_dn_1));
8162 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_dn, &length_server_dn_1));
8163 4 : if (length_server_dn_1 > size_server_dn_1) {
8164 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_dn_1, length_server_dn_1);
8165 : }
8166 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_dn_1, sizeof(uint16_t)));
8167 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_dn, length_server_dn_1, sizeof(uint16_t), CH_UTF16));
8168 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_dn_0, 0);
8169 : }
8170 4 : if (r->ntds_dn) {
8171 2 : _mem_save_ntds_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
8172 2 : NDR_PULL_SET_MEM_CTX(ndr, r->ntds_dn, 0);
8173 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->ntds_dn));
8174 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->ntds_dn));
8175 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->ntds_dn, &size_ntds_dn_1));
8176 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->ntds_dn, &length_ntds_dn_1));
8177 2 : if (length_ntds_dn_1 > size_ntds_dn_1) {
8178 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ntds_dn_1, length_ntds_dn_1);
8179 : }
8180 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ntds_dn_1, sizeof(uint16_t)));
8181 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ntds_dn, length_ntds_dn_1, sizeof(uint16_t), CH_UTF16));
8182 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ntds_dn_0, 0);
8183 : }
8184 : }
8185 8 : return NDR_ERR_SUCCESS;
8186 : }
8187 :
8188 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfo2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfo2 *r)
8189 : {
8190 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfo2");
8191 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8192 0 : ndr->depth++;
8193 0 : ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
8194 0 : ndr->depth++;
8195 0 : if (r->netbios_name) {
8196 0 : ndr_print_string(ndr, "netbios_name", r->netbios_name);
8197 : }
8198 0 : ndr->depth--;
8199 0 : ndr_print_ptr(ndr, "dns_name", r->dns_name);
8200 0 : ndr->depth++;
8201 0 : if (r->dns_name) {
8202 0 : ndr_print_string(ndr, "dns_name", r->dns_name);
8203 : }
8204 0 : ndr->depth--;
8205 0 : ndr_print_ptr(ndr, "site_name", r->site_name);
8206 0 : ndr->depth++;
8207 0 : if (r->site_name) {
8208 0 : ndr_print_string(ndr, "site_name", r->site_name);
8209 : }
8210 0 : ndr->depth--;
8211 0 : ndr_print_ptr(ndr, "site_dn", r->site_dn);
8212 0 : ndr->depth++;
8213 0 : if (r->site_dn) {
8214 0 : ndr_print_string(ndr, "site_dn", r->site_dn);
8215 : }
8216 0 : ndr->depth--;
8217 0 : ndr_print_ptr(ndr, "computer_dn", r->computer_dn);
8218 0 : ndr->depth++;
8219 0 : if (r->computer_dn) {
8220 0 : ndr_print_string(ndr, "computer_dn", r->computer_dn);
8221 : }
8222 0 : ndr->depth--;
8223 0 : ndr_print_ptr(ndr, "server_dn", r->server_dn);
8224 0 : ndr->depth++;
8225 0 : if (r->server_dn) {
8226 0 : ndr_print_string(ndr, "server_dn", r->server_dn);
8227 : }
8228 0 : ndr->depth--;
8229 0 : ndr_print_ptr(ndr, "ntds_dn", r->ntds_dn);
8230 0 : ndr->depth++;
8231 0 : if (r->ntds_dn) {
8232 0 : ndr_print_string(ndr, "ntds_dn", r->ntds_dn);
8233 : }
8234 0 : ndr->depth--;
8235 0 : ndr_print_uint32(ndr, "is_pdc", r->is_pdc);
8236 0 : ndr_print_uint32(ndr, "is_enabled", r->is_enabled);
8237 0 : ndr_print_uint32(ndr, "is_gc", r->is_gc);
8238 0 : ndr_print_GUID(ndr, "site_guid", &r->site_guid);
8239 0 : ndr_print_GUID(ndr, "computer_guid", &r->computer_guid);
8240 0 : ndr_print_GUID(ndr, "server_guid", &r->server_guid);
8241 0 : ndr_print_GUID(ndr, "ntds_guid", &r->ntds_guid);
8242 0 : ndr->depth--;
8243 : }
8244 :
8245 4 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfoCtr2 *r)
8246 : {
8247 0 : uint32_t cntr_array_1;
8248 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8249 4 : if (ndr_flags & NDR_SCALARS) {
8250 2 : NDR_CHECK(ndr_push_align(ndr, 5));
8251 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
8252 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
8253 2 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8254 : }
8255 4 : if (ndr_flags & NDR_BUFFERS) {
8256 2 : if (r->array) {
8257 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
8258 6 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
8259 4 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
8260 : }
8261 6 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
8262 4 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
8263 : }
8264 : }
8265 : }
8266 4 : return NDR_ERR_SUCCESS;
8267 : }
8268 :
8269 4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfoCtr2 *r)
8270 : {
8271 0 : uint32_t _ptr_array;
8272 4 : uint32_t size_array_1 = 0;
8273 0 : uint32_t cntr_array_1;
8274 4 : TALLOC_CTX *_mem_save_array_0 = NULL;
8275 4 : TALLOC_CTX *_mem_save_array_1 = NULL;
8276 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8277 4 : if (ndr_flags & NDR_SCALARS) {
8278 2 : NDR_CHECK(ndr_pull_align(ndr, 5));
8279 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
8280 2 : if (r->count > 10000) {
8281 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
8282 : }
8283 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
8284 2 : if (_ptr_array) {
8285 2 : NDR_PULL_ALLOC(ndr, r->array);
8286 : } else {
8287 0 : r->array = NULL;
8288 : }
8289 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8290 : }
8291 4 : if (ndr_flags & NDR_BUFFERS) {
8292 2 : if (r->array) {
8293 2 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
8294 2 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
8295 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
8296 2 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
8297 2 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
8298 2 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
8299 2 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
8300 6 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
8301 4 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
8302 : }
8303 6 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
8304 4 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
8305 : }
8306 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
8307 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
8308 : }
8309 2 : if (r->array) {
8310 2 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
8311 : }
8312 6 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
8313 0 : }
8314 : }
8315 4 : return NDR_ERR_SUCCESS;
8316 : }
8317 :
8318 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtr2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoCtr2 *r)
8319 : {
8320 0 : uint32_t cntr_array_1;
8321 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfoCtr2");
8322 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8323 0 : ndr->depth++;
8324 0 : ndr_print_uint32(ndr, "count", r->count);
8325 0 : ndr_print_ptr(ndr, "array", r->array);
8326 0 : ndr->depth++;
8327 0 : if (r->array) {
8328 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
8329 0 : ndr->depth++;
8330 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
8331 0 : ndr_print_drsuapi_DsGetDCInfo2(ndr, "array", &r->array[cntr_array_1]);
8332 : }
8333 0 : ndr->depth--;
8334 : }
8335 0 : ndr->depth--;
8336 0 : ndr->depth--;
8337 : }
8338 :
8339 4 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfo3 *r)
8340 : {
8341 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8342 4 : if (ndr_flags & NDR_SCALARS) {
8343 2 : NDR_CHECK(ndr_push_align(ndr, 5));
8344 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
8345 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
8346 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_name));
8347 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_dn));
8348 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_dn));
8349 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
8350 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ntds_dn));
8351 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_pdc));
8352 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_enabled));
8353 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_gc));
8354 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_rodc));
8355 2 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
8356 2 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->computer_guid));
8357 2 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->server_guid));
8358 2 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->ntds_guid));
8359 2 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8360 : }
8361 4 : if (ndr_flags & NDR_BUFFERS) {
8362 2 : if (r->netbios_name) {
8363 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
8364 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8365 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
8366 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->netbios_name, ndr_charset_length(r->netbios_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8367 : }
8368 2 : if (r->dns_name) {
8369 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
8370 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8371 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
8372 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, ndr_charset_length(r->dns_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8373 : }
8374 2 : if (r->site_name) {
8375 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
8376 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8377 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
8378 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_name, ndr_charset_length(r->site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8379 : }
8380 2 : if (r->site_dn) {
8381 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_dn, CH_UTF16)));
8382 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8383 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_dn, CH_UTF16)));
8384 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_dn, ndr_charset_length(r->site_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8385 : }
8386 2 : if (r->computer_dn) {
8387 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
8388 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8389 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
8390 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer_dn, ndr_charset_length(r->computer_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8391 : }
8392 2 : if (r->server_dn) {
8393 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
8394 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8395 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
8396 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_dn, ndr_charset_length(r->server_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8397 : }
8398 2 : if (r->ntds_dn) {
8399 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ntds_dn, CH_UTF16)));
8400 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8401 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ntds_dn, CH_UTF16)));
8402 1 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ntds_dn, ndr_charset_length(r->ntds_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8403 : }
8404 : }
8405 4 : return NDR_ERR_SUCCESS;
8406 : }
8407 :
8408 4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfo3 *r)
8409 : {
8410 0 : uint32_t _ptr_netbios_name;
8411 4 : uint32_t size_netbios_name_1 = 0;
8412 4 : uint32_t length_netbios_name_1 = 0;
8413 4 : TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
8414 0 : uint32_t _ptr_dns_name;
8415 4 : uint32_t size_dns_name_1 = 0;
8416 4 : uint32_t length_dns_name_1 = 0;
8417 4 : TALLOC_CTX *_mem_save_dns_name_0 = NULL;
8418 0 : uint32_t _ptr_site_name;
8419 4 : uint32_t size_site_name_1 = 0;
8420 4 : uint32_t length_site_name_1 = 0;
8421 4 : TALLOC_CTX *_mem_save_site_name_0 = NULL;
8422 0 : uint32_t _ptr_site_dn;
8423 4 : uint32_t size_site_dn_1 = 0;
8424 4 : uint32_t length_site_dn_1 = 0;
8425 4 : TALLOC_CTX *_mem_save_site_dn_0 = NULL;
8426 0 : uint32_t _ptr_computer_dn;
8427 4 : uint32_t size_computer_dn_1 = 0;
8428 4 : uint32_t length_computer_dn_1 = 0;
8429 4 : TALLOC_CTX *_mem_save_computer_dn_0 = NULL;
8430 0 : uint32_t _ptr_server_dn;
8431 4 : uint32_t size_server_dn_1 = 0;
8432 4 : uint32_t length_server_dn_1 = 0;
8433 4 : TALLOC_CTX *_mem_save_server_dn_0 = NULL;
8434 0 : uint32_t _ptr_ntds_dn;
8435 4 : uint32_t size_ntds_dn_1 = 0;
8436 4 : uint32_t length_ntds_dn_1 = 0;
8437 4 : TALLOC_CTX *_mem_save_ntds_dn_0 = NULL;
8438 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8439 4 : if (ndr_flags & NDR_SCALARS) {
8440 2 : NDR_CHECK(ndr_pull_align(ndr, 5));
8441 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
8442 2 : if (_ptr_netbios_name) {
8443 2 : NDR_PULL_ALLOC(ndr, r->netbios_name);
8444 : } else {
8445 0 : r->netbios_name = NULL;
8446 : }
8447 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
8448 2 : if (_ptr_dns_name) {
8449 2 : NDR_PULL_ALLOC(ndr, r->dns_name);
8450 : } else {
8451 0 : r->dns_name = NULL;
8452 : }
8453 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
8454 2 : if (_ptr_site_name) {
8455 2 : NDR_PULL_ALLOC(ndr, r->site_name);
8456 : } else {
8457 0 : r->site_name = NULL;
8458 : }
8459 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_dn));
8460 2 : if (_ptr_site_dn) {
8461 2 : NDR_PULL_ALLOC(ndr, r->site_dn);
8462 : } else {
8463 0 : r->site_dn = NULL;
8464 : }
8465 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_dn));
8466 2 : if (_ptr_computer_dn) {
8467 2 : NDR_PULL_ALLOC(ndr, r->computer_dn);
8468 : } else {
8469 0 : r->computer_dn = NULL;
8470 : }
8471 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
8472 2 : if (_ptr_server_dn) {
8473 2 : NDR_PULL_ALLOC(ndr, r->server_dn);
8474 : } else {
8475 0 : r->server_dn = NULL;
8476 : }
8477 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ntds_dn));
8478 2 : if (_ptr_ntds_dn) {
8479 1 : NDR_PULL_ALLOC(ndr, r->ntds_dn);
8480 : } else {
8481 1 : r->ntds_dn = NULL;
8482 : }
8483 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_pdc));
8484 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_enabled));
8485 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_gc));
8486 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_rodc));
8487 2 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
8488 2 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->computer_guid));
8489 2 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->server_guid));
8490 2 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->ntds_guid));
8491 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8492 : }
8493 4 : if (ndr_flags & NDR_BUFFERS) {
8494 2 : if (r->netbios_name) {
8495 2 : _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8496 2 : NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
8497 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
8498 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
8499 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->netbios_name, &size_netbios_name_1));
8500 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->netbios_name, &length_netbios_name_1));
8501 2 : if (length_netbios_name_1 > size_netbios_name_1) {
8502 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_netbios_name_1, length_netbios_name_1);
8503 : }
8504 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_netbios_name_1, sizeof(uint16_t)));
8505 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, length_netbios_name_1, sizeof(uint16_t), CH_UTF16));
8506 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
8507 : }
8508 2 : if (r->dns_name) {
8509 2 : _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8510 2 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
8511 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
8512 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
8513 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_name, &size_dns_name_1));
8514 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_name, &length_dns_name_1));
8515 2 : if (length_dns_name_1 > size_dns_name_1) {
8516 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_name_1, length_dns_name_1);
8517 : }
8518 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_name_1, sizeof(uint16_t)));
8519 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, length_dns_name_1, sizeof(uint16_t), CH_UTF16));
8520 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
8521 : }
8522 2 : if (r->site_name) {
8523 2 : _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8524 2 : NDR_PULL_SET_MEM_CTX(ndr, r->site_name, 0);
8525 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->site_name));
8526 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->site_name));
8527 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_name, &size_site_name_1));
8528 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_name, &length_site_name_1));
8529 2 : if (length_site_name_1 > size_site_name_1) {
8530 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
8531 : }
8532 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
8533 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
8534 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
8535 : }
8536 2 : if (r->site_dn) {
8537 2 : _mem_save_site_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
8538 2 : NDR_PULL_SET_MEM_CTX(ndr, r->site_dn, 0);
8539 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->site_dn));
8540 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->site_dn));
8541 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_dn, &size_site_dn_1));
8542 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_dn, &length_site_dn_1));
8543 2 : if (length_site_dn_1 > size_site_dn_1) {
8544 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_dn_1, length_site_dn_1);
8545 : }
8546 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_dn_1, sizeof(uint16_t)));
8547 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_dn, length_site_dn_1, sizeof(uint16_t), CH_UTF16));
8548 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_dn_0, 0);
8549 : }
8550 2 : if (r->computer_dn) {
8551 2 : _mem_save_computer_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
8552 2 : NDR_PULL_SET_MEM_CTX(ndr, r->computer_dn, 0);
8553 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_dn));
8554 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_dn));
8555 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_dn, &size_computer_dn_1));
8556 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_dn, &length_computer_dn_1));
8557 2 : if (length_computer_dn_1 > size_computer_dn_1) {
8558 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_dn_1, length_computer_dn_1);
8559 : }
8560 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_dn_1, sizeof(uint16_t)));
8561 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_dn, length_computer_dn_1, sizeof(uint16_t), CH_UTF16));
8562 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_dn_0, 0);
8563 : }
8564 2 : if (r->server_dn) {
8565 2 : _mem_save_server_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
8566 2 : NDR_PULL_SET_MEM_CTX(ndr, r->server_dn, 0);
8567 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->server_dn));
8568 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->server_dn));
8569 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_dn, &size_server_dn_1));
8570 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_dn, &length_server_dn_1));
8571 2 : if (length_server_dn_1 > size_server_dn_1) {
8572 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_dn_1, length_server_dn_1);
8573 : }
8574 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_dn_1, sizeof(uint16_t)));
8575 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_dn, length_server_dn_1, sizeof(uint16_t), CH_UTF16));
8576 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_dn_0, 0);
8577 : }
8578 2 : if (r->ntds_dn) {
8579 1 : _mem_save_ntds_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
8580 1 : NDR_PULL_SET_MEM_CTX(ndr, r->ntds_dn, 0);
8581 1 : NDR_CHECK(ndr_pull_array_size(ndr, &r->ntds_dn));
8582 1 : NDR_CHECK(ndr_pull_array_length(ndr, &r->ntds_dn));
8583 1 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->ntds_dn, &size_ntds_dn_1));
8584 1 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->ntds_dn, &length_ntds_dn_1));
8585 1 : if (length_ntds_dn_1 > size_ntds_dn_1) {
8586 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ntds_dn_1, length_ntds_dn_1);
8587 : }
8588 1 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ntds_dn_1, sizeof(uint16_t)));
8589 1 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ntds_dn, length_ntds_dn_1, sizeof(uint16_t), CH_UTF16));
8590 1 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ntds_dn_0, 0);
8591 : }
8592 : }
8593 4 : return NDR_ERR_SUCCESS;
8594 : }
8595 :
8596 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfo3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfo3 *r)
8597 : {
8598 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfo3");
8599 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8600 0 : ndr->depth++;
8601 0 : ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
8602 0 : ndr->depth++;
8603 0 : if (r->netbios_name) {
8604 0 : ndr_print_string(ndr, "netbios_name", r->netbios_name);
8605 : }
8606 0 : ndr->depth--;
8607 0 : ndr_print_ptr(ndr, "dns_name", r->dns_name);
8608 0 : ndr->depth++;
8609 0 : if (r->dns_name) {
8610 0 : ndr_print_string(ndr, "dns_name", r->dns_name);
8611 : }
8612 0 : ndr->depth--;
8613 0 : ndr_print_ptr(ndr, "site_name", r->site_name);
8614 0 : ndr->depth++;
8615 0 : if (r->site_name) {
8616 0 : ndr_print_string(ndr, "site_name", r->site_name);
8617 : }
8618 0 : ndr->depth--;
8619 0 : ndr_print_ptr(ndr, "site_dn", r->site_dn);
8620 0 : ndr->depth++;
8621 0 : if (r->site_dn) {
8622 0 : ndr_print_string(ndr, "site_dn", r->site_dn);
8623 : }
8624 0 : ndr->depth--;
8625 0 : ndr_print_ptr(ndr, "computer_dn", r->computer_dn);
8626 0 : ndr->depth++;
8627 0 : if (r->computer_dn) {
8628 0 : ndr_print_string(ndr, "computer_dn", r->computer_dn);
8629 : }
8630 0 : ndr->depth--;
8631 0 : ndr_print_ptr(ndr, "server_dn", r->server_dn);
8632 0 : ndr->depth++;
8633 0 : if (r->server_dn) {
8634 0 : ndr_print_string(ndr, "server_dn", r->server_dn);
8635 : }
8636 0 : ndr->depth--;
8637 0 : ndr_print_ptr(ndr, "ntds_dn", r->ntds_dn);
8638 0 : ndr->depth++;
8639 0 : if (r->ntds_dn) {
8640 0 : ndr_print_string(ndr, "ntds_dn", r->ntds_dn);
8641 : }
8642 0 : ndr->depth--;
8643 0 : ndr_print_uint32(ndr, "is_pdc", r->is_pdc);
8644 0 : ndr_print_uint32(ndr, "is_enabled", r->is_enabled);
8645 0 : ndr_print_uint32(ndr, "is_gc", r->is_gc);
8646 0 : ndr_print_uint32(ndr, "is_rodc", r->is_rodc);
8647 0 : ndr_print_GUID(ndr, "site_guid", &r->site_guid);
8648 0 : ndr_print_GUID(ndr, "computer_guid", &r->computer_guid);
8649 0 : ndr_print_GUID(ndr, "server_guid", &r->server_guid);
8650 0 : ndr_print_GUID(ndr, "ntds_guid", &r->ntds_guid);
8651 0 : ndr->depth--;
8652 : }
8653 :
8654 2 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfoCtr3 *r)
8655 : {
8656 0 : uint32_t cntr_array_1;
8657 2 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8658 2 : if (ndr_flags & NDR_SCALARS) {
8659 1 : NDR_CHECK(ndr_push_align(ndr, 5));
8660 1 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
8661 1 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
8662 1 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8663 : }
8664 2 : if (ndr_flags & NDR_BUFFERS) {
8665 1 : if (r->array) {
8666 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
8667 3 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
8668 2 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
8669 : }
8670 3 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
8671 2 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
8672 : }
8673 : }
8674 : }
8675 2 : return NDR_ERR_SUCCESS;
8676 : }
8677 :
8678 2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfoCtr3 *r)
8679 : {
8680 0 : uint32_t _ptr_array;
8681 2 : uint32_t size_array_1 = 0;
8682 0 : uint32_t cntr_array_1;
8683 2 : TALLOC_CTX *_mem_save_array_0 = NULL;
8684 2 : TALLOC_CTX *_mem_save_array_1 = NULL;
8685 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8686 2 : if (ndr_flags & NDR_SCALARS) {
8687 1 : NDR_CHECK(ndr_pull_align(ndr, 5));
8688 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
8689 1 : if (r->count > 10000) {
8690 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
8691 : }
8692 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
8693 1 : if (_ptr_array) {
8694 1 : NDR_PULL_ALLOC(ndr, r->array);
8695 : } else {
8696 0 : r->array = NULL;
8697 : }
8698 1 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8699 : }
8700 2 : if (ndr_flags & NDR_BUFFERS) {
8701 1 : if (r->array) {
8702 1 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
8703 1 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
8704 1 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
8705 1 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
8706 1 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
8707 1 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
8708 1 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
8709 3 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
8710 2 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
8711 : }
8712 3 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
8713 2 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
8714 : }
8715 1 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
8716 1 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
8717 : }
8718 1 : if (r->array) {
8719 1 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
8720 : }
8721 3 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
8722 0 : }
8723 : }
8724 2 : return NDR_ERR_SUCCESS;
8725 : }
8726 :
8727 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtr3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoCtr3 *r)
8728 : {
8729 0 : uint32_t cntr_array_1;
8730 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfoCtr3");
8731 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8732 0 : ndr->depth++;
8733 0 : ndr_print_uint32(ndr, "count", r->count);
8734 0 : ndr_print_ptr(ndr, "array", r->array);
8735 0 : ndr->depth++;
8736 0 : if (r->array) {
8737 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
8738 0 : ndr->depth++;
8739 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
8740 0 : ndr_print_drsuapi_DsGetDCInfo3(ndr, "array", &r->array[cntr_array_1]);
8741 : }
8742 0 : ndr->depth--;
8743 : }
8744 0 : ndr->depth--;
8745 0 : ndr->depth--;
8746 : }
8747 :
8748 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCConnection01(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCConnection01 *r)
8749 : {
8750 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8751 0 : if (ndr_flags & NDR_SCALARS) {
8752 0 : NDR_CHECK(ndr_push_align(ndr, 5));
8753 : {
8754 0 : libndr_flags _flags_save_ipv4address = ndr->flags;
8755 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
8756 0 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->client_ip_address));
8757 0 : ndr->flags = _flags_save_ipv4address;
8758 : }
8759 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
8760 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connection_time));
8761 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
8762 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
8763 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
8764 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_account));
8765 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8766 : }
8767 0 : if (ndr_flags & NDR_BUFFERS) {
8768 0 : if (r->client_account) {
8769 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_account, CH_UTF16)));
8770 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8771 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_account, CH_UTF16)));
8772 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_account, ndr_charset_length(r->client_account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8773 : }
8774 : }
8775 0 : return NDR_ERR_SUCCESS;
8776 : }
8777 :
8778 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCConnection01(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCConnection01 *r)
8779 : {
8780 0 : uint32_t _ptr_client_account;
8781 0 : uint32_t size_client_account_1 = 0;
8782 0 : uint32_t length_client_account_1 = 0;
8783 0 : TALLOC_CTX *_mem_save_client_account_0 = NULL;
8784 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8785 0 : if (ndr_flags & NDR_SCALARS) {
8786 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
8787 : {
8788 0 : libndr_flags _flags_save_ipv4address = ndr->flags;
8789 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
8790 0 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->client_ip_address));
8791 0 : ndr->flags = _flags_save_ipv4address;
8792 : }
8793 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
8794 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connection_time));
8795 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
8796 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
8797 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
8798 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_account));
8799 0 : if (_ptr_client_account) {
8800 0 : NDR_PULL_ALLOC(ndr, r->client_account);
8801 : } else {
8802 0 : r->client_account = NULL;
8803 : }
8804 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8805 : }
8806 0 : if (ndr_flags & NDR_BUFFERS) {
8807 0 : if (r->client_account) {
8808 0 : _mem_save_client_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
8809 0 : NDR_PULL_SET_MEM_CTX(ndr, r->client_account, 0);
8810 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->client_account));
8811 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->client_account));
8812 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client_account, &size_client_account_1));
8813 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client_account, &length_client_account_1));
8814 0 : if (length_client_account_1 > size_client_account_1) {
8815 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_client_account_1, length_client_account_1);
8816 : }
8817 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_client_account_1, sizeof(uint16_t)));
8818 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_account, length_client_account_1, sizeof(uint16_t), CH_UTF16));
8819 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_account_0, 0);
8820 : }
8821 : }
8822 0 : return NDR_ERR_SUCCESS;
8823 : }
8824 :
8825 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCConnection01(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCConnection01 *r)
8826 : {
8827 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetDCConnection01");
8828 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8829 0 : ndr->depth++;
8830 : {
8831 0 : libndr_flags _flags_save_ipv4address = ndr->flags;
8832 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
8833 0 : ndr_print_ipv4address(ndr, "client_ip_address", r->client_ip_address);
8834 0 : ndr->flags = _flags_save_ipv4address;
8835 : }
8836 0 : ndr_print_uint32(ndr, "unknown2", r->unknown2);
8837 0 : ndr_print_uint32(ndr, "connection_time", r->connection_time);
8838 0 : ndr_print_uint32(ndr, "unknown4", r->unknown4);
8839 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
8840 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
8841 0 : ndr_print_ptr(ndr, "client_account", r->client_account);
8842 0 : ndr->depth++;
8843 0 : if (r->client_account) {
8844 0 : ndr_print_string(ndr, "client_account", r->client_account);
8845 : }
8846 0 : ndr->depth--;
8847 0 : ndr->depth--;
8848 : }
8849 :
8850 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCConnectionCtr01(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCConnectionCtr01 *r)
8851 : {
8852 0 : uint32_t cntr_array_1;
8853 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8854 0 : if (ndr_flags & NDR_SCALARS) {
8855 0 : NDR_CHECK(ndr_push_align(ndr, 5));
8856 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
8857 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
8858 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8859 : }
8860 0 : if (ndr_flags & NDR_BUFFERS) {
8861 0 : if (r->array) {
8862 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
8863 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
8864 0 : NDR_CHECK(ndr_push_drsuapi_DsGetDCConnection01(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
8865 : }
8866 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
8867 0 : NDR_CHECK(ndr_push_drsuapi_DsGetDCConnection01(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
8868 : }
8869 : }
8870 : }
8871 0 : return NDR_ERR_SUCCESS;
8872 : }
8873 :
8874 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCConnectionCtr01(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCConnectionCtr01 *r)
8875 : {
8876 0 : uint32_t _ptr_array;
8877 0 : uint32_t size_array_1 = 0;
8878 0 : uint32_t cntr_array_1;
8879 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
8880 0 : TALLOC_CTX *_mem_save_array_1 = NULL;
8881 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8882 0 : if (ndr_flags & NDR_SCALARS) {
8883 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
8884 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
8885 0 : if (r->count > 10000) {
8886 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
8887 : }
8888 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
8889 0 : if (_ptr_array) {
8890 0 : NDR_PULL_ALLOC(ndr, r->array);
8891 : } else {
8892 0 : r->array = NULL;
8893 : }
8894 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8895 : }
8896 0 : if (ndr_flags & NDR_BUFFERS) {
8897 0 : if (r->array) {
8898 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
8899 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
8900 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
8901 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
8902 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
8903 0 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
8904 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
8905 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
8906 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnection01(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
8907 : }
8908 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
8909 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnection01(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
8910 : }
8911 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
8912 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
8913 : }
8914 0 : if (r->array) {
8915 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
8916 : }
8917 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
8918 0 : }
8919 : }
8920 0 : return NDR_ERR_SUCCESS;
8921 : }
8922 :
8923 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCConnectionCtr01(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCConnectionCtr01 *r)
8924 : {
8925 0 : uint32_t cntr_array_1;
8926 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetDCConnectionCtr01");
8927 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8928 0 : ndr->depth++;
8929 0 : ndr_print_uint32(ndr, "count", r->count);
8930 0 : ndr_print_ptr(ndr, "array", r->array);
8931 0 : ndr->depth++;
8932 0 : if (r->array) {
8933 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
8934 0 : ndr->depth++;
8935 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
8936 0 : ndr_print_drsuapi_DsGetDCConnection01(ndr, "array", &r->array[cntr_array_1]);
8937 : }
8938 0 : ndr->depth--;
8939 : }
8940 0 : ndr->depth--;
8941 0 : ndr->depth--;
8942 : }
8943 :
8944 6 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetDCInfoCtr *r)
8945 : {
8946 0 : uint32_t level;
8947 6 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8948 6 : if (ndr_flags & NDR_SCALARS) {
8949 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8950 6 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8951 6 : NDR_CHECK(ndr_push_union_align(ndr, 5));
8952 6 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, level));
8953 6 : NDR_CHECK(ndr_push_union_align(ndr, 5));
8954 6 : switch (level) {
8955 3 : case DRSUAPI_DC_INFO_CTR_1: {
8956 3 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr1(ndr, NDR_SCALARS, &r->ctr1));
8957 3 : break; }
8958 :
8959 2 : case DRSUAPI_DC_INFO_CTR_2: {
8960 2 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr2(ndr, NDR_SCALARS, &r->ctr2));
8961 2 : break; }
8962 :
8963 1 : case DRSUAPI_DC_INFO_CTR_3: {
8964 1 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr3(ndr, NDR_SCALARS, &r->ctr3));
8965 1 : break; }
8966 :
8967 0 : case DRSUAPI_DC_CONNECTION_CTR_01: {
8968 0 : NDR_CHECK(ndr_push_drsuapi_DsGetDCConnectionCtr01(ndr, NDR_SCALARS, &r->ctr01));
8969 0 : break; }
8970 :
8971 0 : default:
8972 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
8973 : }
8974 : }
8975 6 : if (ndr_flags & NDR_BUFFERS) {
8976 6 : if (!(ndr_flags & NDR_SCALARS)) {
8977 : /* We didn't get it above, and the token is not needed after this. */
8978 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8979 : }
8980 6 : switch (level) {
8981 3 : case DRSUAPI_DC_INFO_CTR_1:
8982 3 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr1(ndr, NDR_BUFFERS, &r->ctr1));
8983 3 : break;
8984 :
8985 2 : case DRSUAPI_DC_INFO_CTR_2:
8986 2 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr2(ndr, NDR_BUFFERS, &r->ctr2));
8987 2 : break;
8988 :
8989 1 : case DRSUAPI_DC_INFO_CTR_3:
8990 1 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr3(ndr, NDR_BUFFERS, &r->ctr3));
8991 1 : break;
8992 :
8993 0 : case DRSUAPI_DC_CONNECTION_CTR_01:
8994 0 : NDR_CHECK(ndr_push_drsuapi_DsGetDCConnectionCtr01(ndr, NDR_BUFFERS, &r->ctr01));
8995 0 : break;
8996 :
8997 0 : default:
8998 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
8999 : }
9000 : }
9001 6 : return NDR_ERR_SUCCESS;
9002 : }
9003 :
9004 6 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetDCInfoCtr *r)
9005 : {
9006 0 : uint32_t level;
9007 0 : uint32_t _level;
9008 6 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9009 6 : if (ndr_flags & NDR_SCALARS) {
9010 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
9011 6 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
9012 6 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
9013 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
9014 6 : if (_level != level) {
9015 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
9016 : }
9017 6 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
9018 6 : switch (level) {
9019 3 : case DRSUAPI_DC_INFO_CTR_1: {
9020 3 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr1(ndr, NDR_SCALARS, &r->ctr1));
9021 3 : break; }
9022 :
9023 2 : case DRSUAPI_DC_INFO_CTR_2: {
9024 2 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr2(ndr, NDR_SCALARS, &r->ctr2));
9025 2 : break; }
9026 :
9027 1 : case DRSUAPI_DC_INFO_CTR_3: {
9028 1 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr3(ndr, NDR_SCALARS, &r->ctr3));
9029 1 : break; }
9030 :
9031 0 : case DRSUAPI_DC_CONNECTION_CTR_01: {
9032 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnectionCtr01(ndr, NDR_SCALARS, &r->ctr01));
9033 0 : break; }
9034 :
9035 0 : default:
9036 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
9037 : }
9038 : }
9039 6 : if (ndr_flags & NDR_BUFFERS) {
9040 6 : if (!(ndr_flags & NDR_SCALARS)) {
9041 : /* We didn't get it above, and the token is not needed after this. */
9042 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
9043 : }
9044 6 : switch (level) {
9045 3 : case DRSUAPI_DC_INFO_CTR_1:
9046 3 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr1(ndr, NDR_BUFFERS, &r->ctr1));
9047 3 : break;
9048 :
9049 2 : case DRSUAPI_DC_INFO_CTR_2:
9050 2 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr2(ndr, NDR_BUFFERS, &r->ctr2));
9051 2 : break;
9052 :
9053 1 : case DRSUAPI_DC_INFO_CTR_3:
9054 1 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr3(ndr, NDR_BUFFERS, &r->ctr3));
9055 1 : break;
9056 :
9057 0 : case DRSUAPI_DC_CONNECTION_CTR_01:
9058 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnectionCtr01(ndr, NDR_BUFFERS, &r->ctr01));
9059 0 : break;
9060 :
9061 0 : default:
9062 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
9063 : }
9064 : }
9065 6 : return NDR_ERR_SUCCESS;
9066 : }
9067 :
9068 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetDCInfoCtr *r)
9069 : {
9070 0 : uint32_t level;
9071 0 : level = ndr_print_steal_switch_value(ndr, r);
9072 0 : ndr_print_union(ndr, name, level, "drsuapi_DsGetDCInfoCtr");
9073 0 : switch (level) {
9074 0 : case DRSUAPI_DC_INFO_CTR_1:
9075 0 : ndr_print_drsuapi_DsGetDCInfoCtr1(ndr, "ctr1", &r->ctr1);
9076 0 : break;
9077 :
9078 0 : case DRSUAPI_DC_INFO_CTR_2:
9079 0 : ndr_print_drsuapi_DsGetDCInfoCtr2(ndr, "ctr2", &r->ctr2);
9080 0 : break;
9081 :
9082 0 : case DRSUAPI_DC_INFO_CTR_3:
9083 0 : ndr_print_drsuapi_DsGetDCInfoCtr3(ndr, "ctr3", &r->ctr3);
9084 0 : break;
9085 :
9086 0 : case DRSUAPI_DC_CONNECTION_CTR_01:
9087 0 : ndr_print_drsuapi_DsGetDCConnectionCtr01(ndr, "ctr01", &r->ctr01);
9088 0 : break;
9089 :
9090 0 : default:
9091 0 : ndr_print_bad_level(ndr, name, level);
9092 : }
9093 0 : }
9094 :
9095 190 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectListItem(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectListItem *r)
9096 : {
9097 190 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9098 190 : if (ndr_flags & NDR_SCALARS) {
9099 95 : NDR_CHECK(ndr_push_align(ndr, 5));
9100 95 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->next_object));
9101 95 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object));
9102 95 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9103 : }
9104 190 : if (ndr_flags & NDR_BUFFERS) {
9105 95 : if (r->next_object) {
9106 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS|NDR_BUFFERS, r->next_object));
9107 : }
9108 95 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_BUFFERS, &r->object));
9109 : }
9110 188 : return NDR_ERR_SUCCESS;
9111 : }
9112 :
9113 196 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectListItem(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectListItem *r)
9114 : {
9115 8 : uint32_t _ptr_next_object;
9116 196 : TALLOC_CTX *_mem_save_next_object_0 = NULL;
9117 196 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9118 196 : if (ndr_flags & NDR_SCALARS) {
9119 98 : NDR_CHECK(ndr_pull_align(ndr, 5));
9120 98 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next_object));
9121 98 : if (_ptr_next_object) {
9122 0 : NDR_PULL_ALLOC(ndr, r->next_object);
9123 : } else {
9124 98 : r->next_object = NULL;
9125 : }
9126 98 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object));
9127 98 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9128 : }
9129 196 : if (ndr_flags & NDR_BUFFERS) {
9130 98 : if (r->next_object) {
9131 0 : _mem_save_next_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
9132 0 : NDR_PULL_SET_MEM_CTX(ndr, r->next_object, 0);
9133 0 : NDR_RECURSION_CHECK(ndr, 20000);
9134 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS|NDR_BUFFERS, r->next_object));
9135 0 : NDR_RECURSION_UNWIND(ndr);
9136 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_object_0, 0);
9137 : }
9138 98 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_BUFFERS, &r->object));
9139 : }
9140 188 : return NDR_ERR_SUCCESS;
9141 : }
9142 :
9143 0 : static void ndr_print_flags_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObjectListItem *r)
9144 : {
9145 0 : ndr_print_drsuapi_DsReplicaObjectListItem(ndr, name, r);
9146 0 : }
9147 :
9148 94 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_DirErr(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_DirErr r)
9149 : {
9150 94 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
9151 94 : return NDR_ERR_SUCCESS;
9152 : }
9153 :
9154 97 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_DirErr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_DirErr *r)
9155 : {
9156 3 : uint32_t v;
9157 97 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
9158 97 : *r = v;
9159 97 : return NDR_ERR_SUCCESS;
9160 : }
9161 :
9162 2 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_DirErr(struct ndr_print *ndr, const char *name, enum drsuapi_DsAddEntry_DirErr r)
9163 : {
9164 2 : const char *val = NULL;
9165 :
9166 2 : switch (r) {
9167 2 : case DRSUAPI_DIRERR_OK: val = "DRSUAPI_DIRERR_OK"; break;
9168 0 : case DRSUAPI_DIRERR_ATTRIBUTE: val = "DRSUAPI_DIRERR_ATTRIBUTE"; break;
9169 0 : case DRSUAPI_DIRERR_NAME: val = "DRSUAPI_DIRERR_NAME"; break;
9170 0 : case DRSUAPI_DIRERR_REFERRAL: val = "DRSUAPI_DIRERR_REFERRAL"; break;
9171 0 : case DRSUAPI_DIRERR_SECURITY: val = "DRSUAPI_DIRERR_SECURITY"; break;
9172 0 : case DRSUAPI_DIRERR_SERVICE: val = "DRSUAPI_DIRERR_SERVICE"; break;
9173 0 : case DRSUAPI_DIRERR_UPDATE: val = "DRSUAPI_DIRERR_UPDATE"; break;
9174 0 : case DRSUAPI_DIRERR_SYSTEM: val = "DRSUAPI_DIRERR_SYSTEM"; break;
9175 : }
9176 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
9177 2 : }
9178 :
9179 190 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryRequest2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryRequest2 *r)
9180 : {
9181 189 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9182 189 : if (ndr_flags & NDR_SCALARS) {
9183 95 : NDR_CHECK(ndr_push_align(ndr, 5));
9184 95 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS, &r->first_object));
9185 95 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9186 : }
9187 189 : if (ndr_flags & NDR_BUFFERS) {
9188 95 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_BUFFERS, &r->first_object));
9189 : }
9190 188 : return NDR_ERR_SUCCESS;
9191 : }
9192 :
9193 196 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryRequest2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryRequest2 *r)
9194 : {
9195 192 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9196 192 : if (ndr_flags & NDR_SCALARS) {
9197 98 : NDR_CHECK(ndr_pull_align(ndr, 5));
9198 98 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS, &r->first_object));
9199 98 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9200 : }
9201 192 : if (ndr_flags & NDR_BUFFERS) {
9202 98 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_BUFFERS, &r->first_object));
9203 : }
9204 188 : return NDR_ERR_SUCCESS;
9205 : }
9206 :
9207 4 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryRequest2 *r)
9208 : {
9209 4 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntryRequest2");
9210 4 : if (r == NULL) { ndr_print_null(ndr); return; }
9211 4 : ndr->depth++;
9212 4 : ndr_print_drsuapi_DsReplicaObjectListItem(ndr, "first_object", &r->first_object);
9213 4 : ndr->depth--;
9214 : }
9215 :
9216 0 : static enum ndr_err_code ndr_push_drsuapi_SecBufferType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_SecBufferType r)
9217 : {
9218 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
9219 0 : return NDR_ERR_SUCCESS;
9220 : }
9221 :
9222 0 : static enum ndr_err_code ndr_pull_drsuapi_SecBufferType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_SecBufferType *r)
9223 : {
9224 0 : uint32_t v;
9225 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
9226 0 : *r = v;
9227 0 : return NDR_ERR_SUCCESS;
9228 : }
9229 :
9230 0 : static enum ndr_err_code ndr_push_drsuapi_SecBuffer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_SecBuffer *r)
9231 : {
9232 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9233 0 : if (ndr_flags & NDR_SCALARS) {
9234 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9235 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_size));
9236 0 : NDR_CHECK(ndr_push_drsuapi_SecBufferType(ndr, NDR_SCALARS, r->buf_type));
9237 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer));
9238 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9239 : }
9240 0 : if (ndr_flags & NDR_BUFFERS) {
9241 0 : if (r->buffer) {
9242 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->buf_size));
9243 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->buffer, r->buf_size));
9244 : }
9245 : }
9246 0 : return NDR_ERR_SUCCESS;
9247 : }
9248 :
9249 0 : static enum ndr_err_code ndr_pull_drsuapi_SecBuffer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_SecBuffer *r)
9250 : {
9251 0 : uint32_t _ptr_buffer;
9252 0 : uint32_t size_buffer_1 = 0;
9253 0 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
9254 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9255 0 : if (ndr_flags & NDR_SCALARS) {
9256 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
9257 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_size));
9258 0 : if (r->buf_size > 10000) {
9259 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->buf_size), (uint32_t)(0), (uint32_t)(10000));
9260 : }
9261 0 : NDR_CHECK(ndr_pull_drsuapi_SecBufferType(ndr, NDR_SCALARS, &r->buf_type));
9262 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
9263 0 : if (_ptr_buffer) {
9264 0 : NDR_PULL_ALLOC(ndr, r->buffer);
9265 : } else {
9266 0 : r->buffer = NULL;
9267 : }
9268 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9269 : }
9270 0 : if (ndr_flags & NDR_BUFFERS) {
9271 0 : if (r->buffer) {
9272 0 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
9273 0 : NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0);
9274 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer));
9275 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->buffer, &size_buffer_1));
9276 0 : NDR_PULL_ALLOC_N(ndr, r->buffer, size_buffer_1);
9277 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, size_buffer_1));
9278 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
9279 : }
9280 0 : if (r->buffer) {
9281 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->buffer, r->buf_size));
9282 : }
9283 : }
9284 0 : return NDR_ERR_SUCCESS;
9285 : }
9286 :
9287 0 : _PUBLIC_ void ndr_print_drsuapi_SecBuffer(struct ndr_print *ndr, const char *name, const struct drsuapi_SecBuffer *r)
9288 : {
9289 0 : ndr_print_struct(ndr, name, "drsuapi_SecBuffer");
9290 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9291 0 : ndr->depth++;
9292 0 : ndr_print_uint32(ndr, "buf_size", r->buf_size);
9293 0 : ndr_print_drsuapi_SecBufferType(ndr, "buf_type", r->buf_type);
9294 0 : ndr_print_ptr(ndr, "buffer", r->buffer);
9295 0 : ndr->depth++;
9296 0 : if (r->buffer) {
9297 0 : ndr_print_array_uint8(ndr, "buffer", r->buffer, r->buf_size);
9298 : }
9299 0 : ndr->depth--;
9300 0 : ndr->depth--;
9301 : }
9302 :
9303 0 : static enum ndr_err_code ndr_push_drsuapi_SecBufferDesc(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_SecBufferDesc *r)
9304 : {
9305 0 : uint32_t cntr_buffers_1;
9306 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9307 0 : if (ndr_flags & NDR_SCALARS) {
9308 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9309 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9310 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buff_count));
9311 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffers));
9312 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9313 : }
9314 0 : if (ndr_flags & NDR_BUFFERS) {
9315 0 : if (r->buffers) {
9316 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->buff_count));
9317 0 : for (cntr_buffers_1 = 0; cntr_buffers_1 < (r->buff_count); cntr_buffers_1++) {
9318 0 : NDR_CHECK(ndr_push_drsuapi_SecBuffer(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_1]));
9319 : }
9320 0 : for (cntr_buffers_1 = 0; cntr_buffers_1 < (r->buff_count); cntr_buffers_1++) {
9321 0 : NDR_CHECK(ndr_push_drsuapi_SecBuffer(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_1]));
9322 : }
9323 : }
9324 : }
9325 0 : return NDR_ERR_SUCCESS;
9326 : }
9327 :
9328 0 : static enum ndr_err_code ndr_pull_drsuapi_SecBufferDesc(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_SecBufferDesc *r)
9329 : {
9330 0 : uint32_t _ptr_buffers;
9331 0 : uint32_t size_buffers_1 = 0;
9332 0 : uint32_t cntr_buffers_1;
9333 0 : TALLOC_CTX *_mem_save_buffers_0 = NULL;
9334 0 : TALLOC_CTX *_mem_save_buffers_1 = NULL;
9335 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9336 0 : if (ndr_flags & NDR_SCALARS) {
9337 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
9338 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
9339 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buff_count));
9340 0 : if (r->buff_count > 10000) {
9341 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->buff_count), (uint32_t)(0), (uint32_t)(10000));
9342 : }
9343 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffers));
9344 0 : if (_ptr_buffers) {
9345 0 : NDR_PULL_ALLOC(ndr, r->buffers);
9346 : } else {
9347 0 : r->buffers = NULL;
9348 : }
9349 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9350 : }
9351 0 : if (ndr_flags & NDR_BUFFERS) {
9352 0 : if (r->buffers) {
9353 0 : _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
9354 0 : NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
9355 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->buffers));
9356 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->buffers, &size_buffers_1));
9357 0 : NDR_PULL_ALLOC_N(ndr, r->buffers, size_buffers_1);
9358 0 : _mem_save_buffers_1 = NDR_PULL_GET_MEM_CTX(ndr);
9359 0 : NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
9360 0 : for (cntr_buffers_1 = 0; cntr_buffers_1 < (size_buffers_1); cntr_buffers_1++) {
9361 0 : NDR_CHECK(ndr_pull_drsuapi_SecBuffer(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_1]));
9362 : }
9363 0 : for (cntr_buffers_1 = 0; cntr_buffers_1 < (size_buffers_1); cntr_buffers_1++) {
9364 0 : NDR_CHECK(ndr_pull_drsuapi_SecBuffer(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_1]));
9365 : }
9366 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_1, 0);
9367 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
9368 : }
9369 0 : if (r->buffers) {
9370 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->buffers, r->buff_count));
9371 : }
9372 0 : for (cntr_buffers_1 = 0; cntr_buffers_1 < (size_buffers_1); cntr_buffers_1++) {
9373 0 : }
9374 : }
9375 0 : return NDR_ERR_SUCCESS;
9376 : }
9377 :
9378 0 : _PUBLIC_ void ndr_print_drsuapi_SecBufferDesc(struct ndr_print *ndr, const char *name, const struct drsuapi_SecBufferDesc *r)
9379 : {
9380 0 : uint32_t cntr_buffers_1;
9381 0 : ndr_print_struct(ndr, name, "drsuapi_SecBufferDesc");
9382 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9383 0 : ndr->depth++;
9384 0 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->version);
9385 0 : ndr_print_uint32(ndr, "buff_count", r->buff_count);
9386 0 : ndr_print_ptr(ndr, "buffers", r->buffers);
9387 0 : ndr->depth++;
9388 0 : if (r->buffers) {
9389 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "buffers", (uint32_t)(r->buff_count));
9390 0 : ndr->depth++;
9391 0 : for (cntr_buffers_1 = 0; cntr_buffers_1 < (r->buff_count); cntr_buffers_1++) {
9392 0 : ndr_print_drsuapi_SecBuffer(ndr, "buffers", &r->buffers[cntr_buffers_1]);
9393 : }
9394 0 : ndr->depth--;
9395 : }
9396 0 : ndr->depth--;
9397 0 : ndr->depth--;
9398 : }
9399 :
9400 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryRequest3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryRequest3 *r)
9401 : {
9402 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9403 0 : if (ndr_flags & NDR_SCALARS) {
9404 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9405 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS, &r->first_object));
9406 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_creds));
9407 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9408 : }
9409 0 : if (ndr_flags & NDR_BUFFERS) {
9410 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_BUFFERS, &r->first_object));
9411 0 : if (r->client_creds) {
9412 0 : NDR_CHECK(ndr_push_drsuapi_SecBufferDesc(ndr, NDR_SCALARS|NDR_BUFFERS, r->client_creds));
9413 : }
9414 : }
9415 0 : return NDR_ERR_SUCCESS;
9416 : }
9417 :
9418 0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryRequest3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryRequest3 *r)
9419 : {
9420 0 : uint32_t _ptr_client_creds;
9421 0 : TALLOC_CTX *_mem_save_client_creds_0 = NULL;
9422 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9423 0 : if (ndr_flags & NDR_SCALARS) {
9424 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
9425 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS, &r->first_object));
9426 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_creds));
9427 0 : if (_ptr_client_creds) {
9428 0 : NDR_PULL_ALLOC(ndr, r->client_creds);
9429 : } else {
9430 0 : r->client_creds = NULL;
9431 : }
9432 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9433 : }
9434 0 : if (ndr_flags & NDR_BUFFERS) {
9435 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_BUFFERS, &r->first_object));
9436 0 : if (r->client_creds) {
9437 0 : _mem_save_client_creds_0 = NDR_PULL_GET_MEM_CTX(ndr);
9438 0 : NDR_PULL_SET_MEM_CTX(ndr, r->client_creds, 0);
9439 0 : NDR_CHECK(ndr_pull_drsuapi_SecBufferDesc(ndr, NDR_SCALARS|NDR_BUFFERS, r->client_creds));
9440 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_creds_0, 0);
9441 : }
9442 : }
9443 0 : return NDR_ERR_SUCCESS;
9444 : }
9445 :
9446 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryRequest3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryRequest3 *r)
9447 : {
9448 0 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntryRequest3");
9449 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9450 0 : ndr->depth++;
9451 0 : ndr_print_drsuapi_DsReplicaObjectListItem(ndr, "first_object", &r->first_object);
9452 0 : ndr_print_ptr(ndr, "client_creds", r->client_creds);
9453 0 : ndr->depth++;
9454 0 : if (r->client_creds) {
9455 0 : ndr_print_drsuapi_SecBufferDesc(ndr, "client_creds", r->client_creds);
9456 : }
9457 0 : ndr->depth--;
9458 0 : ndr->depth--;
9459 : }
9460 :
9461 95 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsAddEntryRequest *r)
9462 : {
9463 1 : uint32_t level;
9464 95 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9465 95 : if (ndr_flags & NDR_SCALARS) {
9466 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
9467 95 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
9468 95 : NDR_CHECK(ndr_push_union_align(ndr, 5));
9469 95 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
9470 95 : NDR_CHECK(ndr_push_union_align(ndr, 5));
9471 95 : switch (level) {
9472 95 : case 2: {
9473 95 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest2(ndr, NDR_SCALARS, &r->req2));
9474 94 : break; }
9475 :
9476 0 : case 3: {
9477 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest3(ndr, NDR_SCALARS, &r->req3));
9478 0 : break; }
9479 :
9480 0 : default:
9481 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
9482 : }
9483 : }
9484 95 : if (ndr_flags & NDR_BUFFERS) {
9485 95 : if (!(ndr_flags & NDR_SCALARS)) {
9486 : /* We didn't get it above, and the token is not needed after this. */
9487 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
9488 : }
9489 95 : switch (level) {
9490 95 : case 2:
9491 96 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest2(ndr, NDR_BUFFERS, &r->req2));
9492 94 : break;
9493 :
9494 0 : case 3:
9495 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest3(ndr, NDR_BUFFERS, &r->req3));
9496 0 : break;
9497 :
9498 0 : default:
9499 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
9500 : }
9501 : }
9502 94 : return NDR_ERR_SUCCESS;
9503 : }
9504 :
9505 98 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsAddEntryRequest *r)
9506 : {
9507 4 : uint32_t level;
9508 4 : uint32_t _level;
9509 98 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9510 98 : if (ndr_flags & NDR_SCALARS) {
9511 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
9512 98 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
9513 98 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
9514 98 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
9515 98 : if (_level != level) {
9516 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
9517 : }
9518 98 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
9519 98 : switch (level) {
9520 98 : case 2: {
9521 98 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest2(ndr, NDR_SCALARS, &r->req2));
9522 94 : break; }
9523 :
9524 0 : case 3: {
9525 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest3(ndr, NDR_SCALARS, &r->req3));
9526 0 : break; }
9527 :
9528 0 : default:
9529 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
9530 : }
9531 : }
9532 98 : if (ndr_flags & NDR_BUFFERS) {
9533 98 : if (!(ndr_flags & NDR_SCALARS)) {
9534 : /* We didn't get it above, and the token is not needed after this. */
9535 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
9536 : }
9537 98 : switch (level) {
9538 98 : case 2:
9539 102 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest2(ndr, NDR_BUFFERS, &r->req2));
9540 94 : break;
9541 :
9542 0 : case 3:
9543 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest3(ndr, NDR_BUFFERS, &r->req3));
9544 0 : break;
9545 :
9546 0 : default:
9547 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
9548 : }
9549 : }
9550 94 : return NDR_ERR_SUCCESS;
9551 : }
9552 :
9553 4 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntryRequest *r)
9554 : {
9555 4 : uint32_t level;
9556 4 : level = ndr_print_steal_switch_value(ndr, r);
9557 4 : ndr_print_union(ndr, name, level, "drsuapi_DsAddEntryRequest");
9558 4 : switch (level) {
9559 4 : case 2:
9560 4 : ndr_print_drsuapi_DsAddEntryRequest2(ndr, "req2", &r->req2);
9561 4 : break;
9562 :
9563 0 : case 3:
9564 0 : ndr_print_drsuapi_DsAddEntryRequest3(ndr, "req3", &r->req3);
9565 0 : break;
9566 :
9567 0 : default:
9568 0 : ndr_print_bad_level(ndr, name, level);
9569 : }
9570 4 : }
9571 :
9572 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfoX(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryErrorInfoX *r)
9573 : {
9574 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9575 0 : if (ndr_flags & NDR_SCALARS) {
9576 0 : NDR_CHECK(ndr_push_align(ndr, 4));
9577 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dsid));
9578 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->extended_err));
9579 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->extended_data));
9580 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->problem));
9581 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9582 : }
9583 0 : if (ndr_flags & NDR_BUFFERS) {
9584 0 : }
9585 0 : return NDR_ERR_SUCCESS;
9586 : }
9587 :
9588 0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfoX(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryErrorInfoX *r)
9589 : {
9590 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9591 0 : if (ndr_flags & NDR_SCALARS) {
9592 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
9593 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dsid));
9594 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->extended_err));
9595 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extended_data));
9596 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->problem));
9597 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9598 : }
9599 0 : if (ndr_flags & NDR_BUFFERS) {
9600 0 : }
9601 0 : return NDR_ERR_SUCCESS;
9602 : }
9603 :
9604 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryErrorInfoX(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfoX *r)
9605 : {
9606 0 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntryErrorInfoX");
9607 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9608 0 : ndr->depth++;
9609 0 : ndr_print_uint32(ndr, "dsid", r->dsid);
9610 0 : ndr_print_WERROR(ndr, "extended_err", r->extended_err);
9611 0 : ndr_print_uint32(ndr, "extended_data", r->extended_data);
9612 0 : ndr_print_uint16(ndr, "problem", r->problem);
9613 0 : ndr->depth--;
9614 : }
9615 :
9616 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_AttrErr_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntry_AttrErr_V1 *r)
9617 : {
9618 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9619 0 : if (ndr_flags & NDR_SCALARS) {
9620 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9621 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dsid));
9622 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->extended_err));
9623 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->extended_data));
9624 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->problem));
9625 0 : NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
9626 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_val_returned));
9627 0 : NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->attr_val));
9628 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9629 : }
9630 0 : if (ndr_flags & NDR_BUFFERS) {
9631 0 : NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->attr_val));
9632 : }
9633 0 : return NDR_ERR_SUCCESS;
9634 : }
9635 :
9636 0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_AttrErr_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntry_AttrErr_V1 *r)
9637 : {
9638 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9639 0 : if (ndr_flags & NDR_SCALARS) {
9640 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
9641 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dsid));
9642 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->extended_err));
9643 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extended_data));
9644 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->problem));
9645 0 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
9646 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_val_returned));
9647 0 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->attr_val));
9648 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9649 : }
9650 0 : if (ndr_flags & NDR_BUFFERS) {
9651 0 : NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->attr_val));
9652 : }
9653 0 : return NDR_ERR_SUCCESS;
9654 : }
9655 :
9656 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_AttrErr_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntry_AttrErr_V1 *r)
9657 : {
9658 0 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntry_AttrErr_V1");
9659 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9660 0 : ndr->depth++;
9661 0 : ndr_print_uint32(ndr, "dsid", r->dsid);
9662 0 : ndr_print_WERROR(ndr, "extended_err", r->extended_err);
9663 0 : ndr_print_uint32(ndr, "extended_data", r->extended_data);
9664 0 : ndr_print_uint16(ndr, "problem", r->problem);
9665 0 : ndr_print_drsuapi_DsAttributeId(ndr, "attid", r->attid);
9666 0 : ndr_print_uint32(ndr, "is_val_returned", r->is_val_returned);
9667 0 : ndr_print_drsuapi_DsAttributeValue(ndr, "attr_val", &r->attr_val);
9668 0 : ndr->depth--;
9669 : }
9670 :
9671 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_AttrErrListItem_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntry_AttrErrListItem_V1 *r)
9672 : {
9673 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9674 0 : if (ndr_flags & NDR_SCALARS) {
9675 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9676 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
9677 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_AttrErr_V1(ndr, NDR_SCALARS, &r->err_data));
9678 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9679 : }
9680 0 : if (ndr_flags & NDR_BUFFERS) {
9681 0 : if (r->next) {
9682 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
9683 : }
9684 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_AttrErr_V1(ndr, NDR_BUFFERS, &r->err_data));
9685 : }
9686 0 : return NDR_ERR_SUCCESS;
9687 : }
9688 :
9689 0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_AttrErrListItem_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntry_AttrErrListItem_V1 *r)
9690 : {
9691 0 : uint32_t _ptr_next;
9692 0 : TALLOC_CTX *_mem_save_next_0 = NULL;
9693 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9694 0 : if (ndr_flags & NDR_SCALARS) {
9695 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
9696 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
9697 0 : if (_ptr_next) {
9698 0 : NDR_PULL_ALLOC(ndr, r->next);
9699 : } else {
9700 0 : r->next = NULL;
9701 : }
9702 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_AttrErr_V1(ndr, NDR_SCALARS, &r->err_data));
9703 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9704 : }
9705 0 : if (ndr_flags & NDR_BUFFERS) {
9706 0 : if (r->next) {
9707 0 : _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
9708 0 : NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
9709 0 : NDR_RECURSION_CHECK(ndr, 20000);
9710 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
9711 0 : NDR_RECURSION_UNWIND(ndr);
9712 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
9713 : }
9714 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_AttrErr_V1(ndr, NDR_BUFFERS, &r->err_data));
9715 : }
9716 0 : return NDR_ERR_SUCCESS;
9717 : }
9718 :
9719 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfo_Attr_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *r)
9720 : {
9721 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9722 0 : if (ndr_flags & NDR_SCALARS) {
9723 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9724 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->id));
9725 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
9726 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_SCALARS, &r->first));
9727 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9728 : }
9729 0 : if (ndr_flags & NDR_BUFFERS) {
9730 0 : if (r->id) {
9731 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
9732 : }
9733 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_BUFFERS, &r->first));
9734 : }
9735 0 : return NDR_ERR_SUCCESS;
9736 : }
9737 :
9738 0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfo_Attr_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *r)
9739 : {
9740 0 : uint32_t _ptr_id;
9741 0 : TALLOC_CTX *_mem_save_id_0 = NULL;
9742 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9743 0 : if (ndr_flags & NDR_SCALARS) {
9744 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
9745 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id));
9746 0 : if (_ptr_id) {
9747 0 : NDR_PULL_ALLOC(ndr, r->id);
9748 : } else {
9749 0 : r->id = NULL;
9750 : }
9751 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
9752 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_SCALARS, &r->first));
9753 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9754 : }
9755 0 : if (ndr_flags & NDR_BUFFERS) {
9756 0 : if (r->id) {
9757 0 : _mem_save_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
9758 0 : NDR_PULL_SET_MEM_CTX(ndr, r->id, 0);
9759 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
9760 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_0, 0);
9761 : }
9762 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_BUFFERS, &r->first));
9763 : }
9764 0 : return NDR_ERR_SUCCESS;
9765 : }
9766 :
9767 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryErrorInfo_Attr_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *r)
9768 : {
9769 0 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntryErrorInfo_Attr_V1");
9770 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9771 0 : ndr->depth++;
9772 0 : ndr_print_ptr(ndr, "id", r->id);
9773 0 : ndr->depth++;
9774 0 : if (r->id) {
9775 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "id", r->id);
9776 : }
9777 0 : ndr->depth--;
9778 0 : ndr_print_uint32(ndr, "count", r->count);
9779 0 : ndr_print_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, "first", &r->first);
9780 0 : ndr->depth--;
9781 : }
9782 :
9783 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfo_Name_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryErrorInfo_Name_V1 *r)
9784 : {
9785 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9786 0 : if (ndr_flags & NDR_SCALARS) {
9787 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9788 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dsid));
9789 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->extended_err));
9790 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->extended_data));
9791 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->problem));
9792 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->id_matched));
9793 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9794 : }
9795 0 : if (ndr_flags & NDR_BUFFERS) {
9796 0 : if (r->id_matched) {
9797 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id_matched));
9798 : }
9799 : }
9800 0 : return NDR_ERR_SUCCESS;
9801 : }
9802 :
9803 0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfo_Name_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryErrorInfo_Name_V1 *r)
9804 : {
9805 0 : uint32_t _ptr_id_matched;
9806 0 : TALLOC_CTX *_mem_save_id_matched_0 = NULL;
9807 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9808 0 : if (ndr_flags & NDR_SCALARS) {
9809 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
9810 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dsid));
9811 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->extended_err));
9812 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extended_data));
9813 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->problem));
9814 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id_matched));
9815 0 : if (_ptr_id_matched) {
9816 0 : NDR_PULL_ALLOC(ndr, r->id_matched);
9817 : } else {
9818 0 : r->id_matched = NULL;
9819 : }
9820 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9821 : }
9822 0 : if (ndr_flags & NDR_BUFFERS) {
9823 0 : if (r->id_matched) {
9824 0 : _mem_save_id_matched_0 = NDR_PULL_GET_MEM_CTX(ndr);
9825 0 : NDR_PULL_SET_MEM_CTX(ndr, r->id_matched, 0);
9826 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id_matched));
9827 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_matched_0, 0);
9828 : }
9829 : }
9830 0 : return NDR_ERR_SUCCESS;
9831 : }
9832 :
9833 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryErrorInfo_Name_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfo_Name_V1 *r)
9834 : {
9835 0 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntryErrorInfo_Name_V1");
9836 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9837 0 : ndr->depth++;
9838 0 : ndr_print_uint32(ndr, "dsid", r->dsid);
9839 0 : ndr_print_WERROR(ndr, "extended_err", r->extended_err);
9840 0 : ndr_print_uint32(ndr, "extended_data", r->extended_data);
9841 0 : ndr_print_uint16(ndr, "problem", r->problem);
9842 0 : ndr_print_ptr(ndr, "id_matched", r->id_matched);
9843 0 : ndr->depth++;
9844 0 : if (r->id_matched) {
9845 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "id_matched", r->id_matched);
9846 : }
9847 0 : ndr->depth--;
9848 0 : ndr->depth--;
9849 : }
9850 :
9851 0 : static enum ndr_err_code ndr_push_drsuapi_NameResOp_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_NameResOp_V1 *r)
9852 : {
9853 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9854 0 : if (ndr_flags & NDR_SCALARS) {
9855 0 : NDR_CHECK(ndr_push_align(ndr, 2));
9856 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 83));
9857 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0));
9858 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
9859 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
9860 : }
9861 0 : if (ndr_flags & NDR_BUFFERS) {
9862 0 : }
9863 0 : return NDR_ERR_SUCCESS;
9864 : }
9865 :
9866 1 : static enum ndr_err_code ndr_pull_drsuapi_NameResOp_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_NameResOp_V1 *r)
9867 : {
9868 1 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9869 1 : if (ndr_flags & NDR_SCALARS) {
9870 1 : NDR_CHECK(ndr_pull_align(ndr, 2));
9871 1 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->name_res));
9872 1 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unused_pad));
9873 1 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->next_rdn));
9874 1 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
9875 : }
9876 1 : if (ndr_flags & NDR_BUFFERS) {
9877 1 : }
9878 1 : return NDR_ERR_SUCCESS;
9879 : }
9880 :
9881 0 : _PUBLIC_ void ndr_print_drsuapi_NameResOp_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_NameResOp_V1 *r)
9882 : {
9883 0 : ndr_print_struct(ndr, name, "drsuapi_NameResOp_V1");
9884 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9885 0 : ndr->depth++;
9886 0 : ndr_print_uint8(ndr, "name_res", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?83:r->name_res);
9887 0 : ndr_print_uint8(ndr, "unused_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unused_pad);
9888 0 : ndr_print_uint16(ndr, "next_rdn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->next_rdn);
9889 0 : ndr->depth--;
9890 : }
9891 :
9892 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_RefType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_RefType r)
9893 : {
9894 0 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
9895 0 : return NDR_ERR_SUCCESS;
9896 : }
9897 :
9898 1 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_RefType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_RefType *r)
9899 : {
9900 1 : uint16_t v;
9901 1 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
9902 1 : *r = v;
9903 1 : return NDR_ERR_SUCCESS;
9904 : }
9905 :
9906 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_RefType(struct ndr_print *ndr, const char *name, enum drsuapi_DsAddEntry_RefType r)
9907 : {
9908 0 : const char *val = NULL;
9909 :
9910 0 : switch (r) {
9911 0 : case DRSUAPI_CH_REFTYPE_SUPERIOR: val = "DRSUAPI_CH_REFTYPE_SUPERIOR"; break;
9912 0 : case DRSUAPI_CH_REFTYPE_SUBORDINATE: val = "DRSUAPI_CH_REFTYPE_SUBORDINATE"; break;
9913 0 : case DRSUAPI_CH_REFTYPE_NSSR: val = "DRSUAPI_CH_REFTYPE_NSSR"; break;
9914 0 : case DRSUAPI_CH_REFTYPE_CROSS: val = "DRSUAPI_CH_REFTYPE_CROSS"; break;
9915 : }
9916 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
9917 0 : }
9918 :
9919 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_ChoiceType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_ChoiceType r)
9920 : {
9921 0 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
9922 0 : return NDR_ERR_SUCCESS;
9923 : }
9924 :
9925 1 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_ChoiceType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_ChoiceType *r)
9926 : {
9927 1 : uint8_t v;
9928 1 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
9929 1 : *r = v;
9930 1 : return NDR_ERR_SUCCESS;
9931 : }
9932 :
9933 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_ChoiceType(struct ndr_print *ndr, const char *name, enum drsuapi_DsAddEntry_ChoiceType r)
9934 : {
9935 0 : const char *val = NULL;
9936 :
9937 0 : switch (r) {
9938 0 : case DRSUAPI_SE_CHOICE_BASE_ONLY: val = "DRSUAPI_SE_CHOICE_BASE_ONLY"; break;
9939 0 : case DRSUAPI_SE_CHOICE_IMMED_CHLDRN: val = "DRSUAPI_SE_CHOICE_IMMED_CHLDRN"; break;
9940 0 : case DRSUAPI_SE_CHOICE_WHOLE_SUBTREE: val = "DRSUAPI_SE_CHOICE_WHOLE_SUBTREE"; break;
9941 : }
9942 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
9943 0 : }
9944 :
9945 0 : static enum ndr_err_code ndr_push_drsuapi_DsaAddressListItem_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsaAddressListItem_V1 *r)
9946 : {
9947 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9948 0 : if (ndr_flags & NDR_SCALARS) {
9949 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9950 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
9951 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->address));
9952 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9953 : }
9954 0 : if (ndr_flags & NDR_BUFFERS) {
9955 0 : if (r->next) {
9956 0 : NDR_CHECK(ndr_push_drsuapi_DsaAddressListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
9957 : }
9958 0 : if (r->address) {
9959 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->address));
9960 : }
9961 : }
9962 0 : return NDR_ERR_SUCCESS;
9963 : }
9964 :
9965 1025 : static enum ndr_err_code ndr_pull_drsuapi_DsaAddressListItem_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsaAddressListItem_V1 *r)
9966 : {
9967 1025 : uint32_t _ptr_next;
9968 1025 : TALLOC_CTX *_mem_save_next_0 = NULL;
9969 1025 : uint32_t _ptr_address;
9970 1025 : TALLOC_CTX *_mem_save_address_0 = NULL;
9971 1025 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9972 1025 : if (ndr_flags & NDR_SCALARS) {
9973 1025 : NDR_CHECK(ndr_pull_align(ndr, 5));
9974 1025 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
9975 1025 : if (_ptr_next) {
9976 1025 : NDR_PULL_ALLOC(ndr, r->next);
9977 : } else {
9978 0 : r->next = NULL;
9979 : }
9980 1025 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_address));
9981 1025 : if (_ptr_address) {
9982 1016 : NDR_PULL_ALLOC(ndr, r->address);
9983 : } else {
9984 9 : r->address = NULL;
9985 : }
9986 1025 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9987 : }
9988 1025 : if (ndr_flags & NDR_BUFFERS) {
9989 1025 : if (r->next) {
9990 1025 : _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
9991 1025 : NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
9992 1025 : NDR_RECURSION_CHECK(ndr, 1024);
9993 1024 : NDR_CHECK(ndr_pull_drsuapi_DsaAddressListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
9994 0 : NDR_RECURSION_UNWIND(ndr);
9995 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
9996 : }
9997 0 : if (r->address) {
9998 0 : _mem_save_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
9999 0 : NDR_PULL_SET_MEM_CTX(ndr, r->address, 0);
10000 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->address));
10001 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_address_0, 0);
10002 : }
10003 : }
10004 0 : return NDR_ERR_SUCCESS;
10005 : }
10006 :
10007 0 : _PUBLIC_ void ndr_print_drsuapi_DsaAddressListItem_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsaAddressListItem_V1 *r)
10008 : {
10009 0 : ndr_print_struct(ndr, name, "drsuapi_DsaAddressListItem_V1");
10010 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10011 0 : ndr->depth++;
10012 0 : ndr_print_ptr(ndr, "next", r->next);
10013 0 : ndr->depth++;
10014 0 : if (r->next) {
10015 0 : ndr_print_drsuapi_DsaAddressListItem_V1(ndr, "next", r->next);
10016 : }
10017 0 : ndr->depth--;
10018 0 : ndr_print_ptr(ndr, "address", r->address);
10019 0 : ndr->depth++;
10020 0 : if (r->address) {
10021 0 : ndr_print_lsa_String(ndr, "address", r->address);
10022 : }
10023 0 : ndr->depth--;
10024 0 : ndr->depth--;
10025 : }
10026 :
10027 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_RefErrListItem_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntry_RefErrListItem_V1 *r)
10028 : {
10029 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10030 0 : if (ndr_flags & NDR_SCALARS) {
10031 0 : NDR_CHECK(ndr_push_align(ndr, 5));
10032 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->id_target));
10033 0 : NDR_CHECK(ndr_push_drsuapi_NameResOp_V1(ndr, NDR_SCALARS, &r->op_state));
10034 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
10035 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
10036 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_RefType(ndr, NDR_SCALARS, r->ref_type));
10037 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->addr_list_count));
10038 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr_list));
10039 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
10040 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_choice_set));
10041 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_ChoiceType(ndr, NDR_SCALARS, r->choice));
10042 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
10043 : }
10044 0 : if (ndr_flags & NDR_BUFFERS) {
10045 0 : if (r->id_target) {
10046 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id_target));
10047 : }
10048 0 : if (r->addr_list) {
10049 0 : NDR_CHECK(ndr_push_drsuapi_DsaAddressListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr_list));
10050 : }
10051 0 : if (r->next) {
10052 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
10053 : }
10054 : }
10055 0 : return NDR_ERR_SUCCESS;
10056 : }
10057 :
10058 2 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_RefErrListItem_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntry_RefErrListItem_V1 *r)
10059 : {
10060 2 : uint32_t _ptr_id_target;
10061 2 : TALLOC_CTX *_mem_save_id_target_0 = NULL;
10062 2 : uint32_t _ptr_addr_list;
10063 2 : TALLOC_CTX *_mem_save_addr_list_0 = NULL;
10064 2 : uint32_t _ptr_next;
10065 2 : TALLOC_CTX *_mem_save_next_0 = NULL;
10066 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10067 2 : if (ndr_flags & NDR_SCALARS) {
10068 1 : NDR_CHECK(ndr_pull_align(ndr, 5));
10069 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id_target));
10070 1 : if (_ptr_id_target) {
10071 1 : NDR_PULL_ALLOC(ndr, r->id_target);
10072 : } else {
10073 0 : r->id_target = NULL;
10074 : }
10075 1 : NDR_CHECK(ndr_pull_drsuapi_NameResOp_V1(ndr, NDR_SCALARS, &r->op_state));
10076 1 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->rdn_alias));
10077 1 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->rdn_internal));
10078 2 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_RefType(ndr, NDR_SCALARS, &r->ref_type));
10079 1 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->addr_list_count));
10080 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr_list));
10081 1 : if (_ptr_addr_list) {
10082 1 : NDR_PULL_ALLOC(ndr, r->addr_list);
10083 : } else {
10084 0 : r->addr_list = NULL;
10085 : }
10086 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
10087 1 : if (_ptr_next) {
10088 1 : NDR_PULL_ALLOC(ndr, r->next);
10089 : } else {
10090 0 : r->next = NULL;
10091 : }
10092 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_choice_set));
10093 2 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_ChoiceType(ndr, NDR_SCALARS, &r->choice));
10094 1 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10095 : }
10096 2 : if (ndr_flags & NDR_BUFFERS) {
10097 1 : if (r->id_target) {
10098 1 : _mem_save_id_target_0 = NDR_PULL_GET_MEM_CTX(ndr);
10099 1 : NDR_PULL_SET_MEM_CTX(ndr, r->id_target, 0);
10100 1 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id_target));
10101 1 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_target_0, 0);
10102 : }
10103 1 : if (r->addr_list) {
10104 1 : _mem_save_addr_list_0 = NDR_PULL_GET_MEM_CTX(ndr);
10105 1 : NDR_PULL_SET_MEM_CTX(ndr, r->addr_list, 0);
10106 1 : NDR_CHECK(ndr_pull_drsuapi_DsaAddressListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr_list));
10107 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_list_0, 0);
10108 : }
10109 0 : if (r->next) {
10110 0 : _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
10111 0 : NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
10112 0 : NDR_RECURSION_CHECK(ndr, 20000);
10113 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
10114 0 : NDR_RECURSION_UNWIND(ndr);
10115 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
10116 : }
10117 : }
10118 0 : return NDR_ERR_SUCCESS;
10119 : }
10120 :
10121 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_RefErrListItem_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntry_RefErrListItem_V1 *r)
10122 : {
10123 0 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntry_RefErrListItem_V1");
10124 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10125 0 : ndr->depth++;
10126 0 : ndr_print_ptr(ndr, "id_target", r->id_target);
10127 0 : ndr->depth++;
10128 0 : if (r->id_target) {
10129 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "id_target", r->id_target);
10130 : }
10131 0 : ndr->depth--;
10132 0 : ndr_print_drsuapi_NameResOp_V1(ndr, "op_state", &r->op_state);
10133 0 : ndr_print_uint16(ndr, "rdn_alias", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->rdn_alias);
10134 0 : ndr_print_uint16(ndr, "rdn_internal", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->rdn_internal);
10135 0 : ndr_print_drsuapi_DsAddEntry_RefType(ndr, "ref_type", r->ref_type);
10136 0 : ndr_print_uint16(ndr, "addr_list_count", r->addr_list_count);
10137 0 : ndr_print_ptr(ndr, "addr_list", r->addr_list);
10138 0 : ndr->depth++;
10139 0 : if (r->addr_list) {
10140 0 : ndr_print_drsuapi_DsaAddressListItem_V1(ndr, "addr_list", r->addr_list);
10141 : }
10142 0 : ndr->depth--;
10143 0 : ndr_print_ptr(ndr, "next", r->next);
10144 0 : ndr->depth++;
10145 0 : if (r->next) {
10146 0 : ndr_print_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, "next", r->next);
10147 : }
10148 0 : ndr->depth--;
10149 0 : ndr_print_uint32(ndr, "is_choice_set", r->is_choice_set);
10150 0 : ndr_print_drsuapi_DsAddEntry_ChoiceType(ndr, "choice", r->choice);
10151 0 : ndr->depth--;
10152 : }
10153 :
10154 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfo_Referr_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *r)
10155 : {
10156 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10157 0 : if (ndr_flags & NDR_SCALARS) {
10158 0 : NDR_CHECK(ndr_push_align(ndr, 5));
10159 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dsid));
10160 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->extended_err));
10161 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->extended_data));
10162 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_SCALARS, &r->refer));
10163 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
10164 : }
10165 0 : if (ndr_flags & NDR_BUFFERS) {
10166 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_BUFFERS, &r->refer));
10167 : }
10168 0 : return NDR_ERR_SUCCESS;
10169 : }
10170 :
10171 2 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfo_Referr_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *r)
10172 : {
10173 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10174 2 : if (ndr_flags & NDR_SCALARS) {
10175 1 : NDR_CHECK(ndr_pull_align(ndr, 5));
10176 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dsid));
10177 1 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->extended_err));
10178 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extended_data));
10179 1 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_SCALARS, &r->refer));
10180 1 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10181 : }
10182 2 : if (ndr_flags & NDR_BUFFERS) {
10183 1 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_BUFFERS, &r->refer));
10184 : }
10185 0 : return NDR_ERR_SUCCESS;
10186 : }
10187 :
10188 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryErrorInfo_Referr_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *r)
10189 : {
10190 0 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntryErrorInfo_Referr_V1");
10191 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10192 0 : ndr->depth++;
10193 0 : ndr_print_uint32(ndr, "dsid", r->dsid);
10194 0 : ndr_print_WERROR(ndr, "extended_err", r->extended_err);
10195 0 : ndr_print_uint32(ndr, "extended_data", r->extended_data);
10196 0 : ndr_print_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, "refer", &r->refer);
10197 0 : ndr->depth--;
10198 : }
10199 :
10200 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsAddEntryErrorInfo *r)
10201 : {
10202 0 : uint32_t level;
10203 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10204 0 : if (ndr_flags & NDR_SCALARS) {
10205 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
10206 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
10207 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
10208 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
10209 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
10210 0 : switch (level) {
10211 0 : case 1: {
10212 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Attr_V1(ndr, NDR_SCALARS, &r->attr_err));
10213 0 : break; }
10214 :
10215 0 : case 2: {
10216 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Name_V1(ndr, NDR_SCALARS, &r->name_err));
10217 0 : break; }
10218 :
10219 0 : case 3: {
10220 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Referr_V1(ndr, NDR_SCALARS, &r->referral_err));
10221 0 : break; }
10222 :
10223 0 : case 4: {
10224 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->security_err));
10225 0 : break; }
10226 :
10227 0 : case 5: {
10228 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->service_err));
10229 0 : break; }
10230 :
10231 0 : case 6: {
10232 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->update_err));
10233 0 : break; }
10234 :
10235 0 : case 7: {
10236 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->system_err));
10237 0 : break; }
10238 :
10239 0 : default:
10240 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
10241 : }
10242 : }
10243 0 : if (ndr_flags & NDR_BUFFERS) {
10244 0 : if (!(ndr_flags & NDR_SCALARS)) {
10245 : /* We didn't get it above, and the token is not needed after this. */
10246 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
10247 : }
10248 0 : switch (level) {
10249 0 : case 1:
10250 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Attr_V1(ndr, NDR_BUFFERS, &r->attr_err));
10251 0 : break;
10252 :
10253 0 : case 2:
10254 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Name_V1(ndr, NDR_BUFFERS, &r->name_err));
10255 0 : break;
10256 :
10257 0 : case 3:
10258 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Referr_V1(ndr, NDR_BUFFERS, &r->referral_err));
10259 0 : break;
10260 :
10261 0 : case 4:
10262 0 : break;
10263 :
10264 0 : case 5:
10265 0 : break;
10266 :
10267 0 : case 6:
10268 0 : break;
10269 :
10270 0 : case 7:
10271 0 : break;
10272 :
10273 0 : default:
10274 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
10275 : }
10276 : }
10277 0 : return NDR_ERR_SUCCESS;
10278 : }
10279 :
10280 1 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsAddEntryErrorInfo *r)
10281 : {
10282 1 : uint32_t level;
10283 1 : uint32_t _level;
10284 1 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10285 1 : if (ndr_flags & NDR_SCALARS) {
10286 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
10287 1 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
10288 1 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
10289 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
10290 1 : if (_level != level) {
10291 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
10292 : }
10293 1 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
10294 1 : switch (level) {
10295 0 : case 1: {
10296 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Attr_V1(ndr, NDR_SCALARS, &r->attr_err));
10297 0 : break; }
10298 :
10299 0 : case 2: {
10300 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Name_V1(ndr, NDR_SCALARS, &r->name_err));
10301 0 : break; }
10302 :
10303 1 : case 3: {
10304 1 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Referr_V1(ndr, NDR_SCALARS, &r->referral_err));
10305 0 : break; }
10306 :
10307 0 : case 4: {
10308 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->security_err));
10309 0 : break; }
10310 :
10311 0 : case 5: {
10312 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->service_err));
10313 0 : break; }
10314 :
10315 0 : case 6: {
10316 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->update_err));
10317 0 : break; }
10318 :
10319 0 : case 7: {
10320 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->system_err));
10321 0 : break; }
10322 :
10323 0 : default:
10324 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
10325 : }
10326 : }
10327 1 : if (ndr_flags & NDR_BUFFERS) {
10328 1 : if (!(ndr_flags & NDR_SCALARS)) {
10329 : /* We didn't get it above, and the token is not needed after this. */
10330 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
10331 : }
10332 1 : switch (level) {
10333 0 : case 1:
10334 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Attr_V1(ndr, NDR_BUFFERS, &r->attr_err));
10335 0 : break;
10336 :
10337 0 : case 2:
10338 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Name_V1(ndr, NDR_BUFFERS, &r->name_err));
10339 0 : break;
10340 :
10341 1 : case 3:
10342 1 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Referr_V1(ndr, NDR_BUFFERS, &r->referral_err));
10343 0 : break;
10344 :
10345 0 : case 4:
10346 0 : break;
10347 :
10348 0 : case 5:
10349 0 : break;
10350 :
10351 0 : case 6:
10352 0 : break;
10353 :
10354 0 : case 7:
10355 0 : break;
10356 :
10357 0 : default:
10358 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
10359 : }
10360 : }
10361 0 : return NDR_ERR_SUCCESS;
10362 : }
10363 :
10364 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryErrorInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntryErrorInfo *r)
10365 : {
10366 0 : uint32_t level;
10367 0 : level = ndr_print_steal_switch_value(ndr, r);
10368 0 : ndr_print_union(ndr, name, level, "drsuapi_DsAddEntryErrorInfo");
10369 0 : switch (level) {
10370 0 : case 1:
10371 0 : ndr_print_drsuapi_DsAddEntryErrorInfo_Attr_V1(ndr, "attr_err", &r->attr_err);
10372 0 : break;
10373 :
10374 0 : case 2:
10375 0 : ndr_print_drsuapi_DsAddEntryErrorInfo_Name_V1(ndr, "name_err", &r->name_err);
10376 0 : break;
10377 :
10378 0 : case 3:
10379 0 : ndr_print_drsuapi_DsAddEntryErrorInfo_Referr_V1(ndr, "referral_err", &r->referral_err);
10380 0 : break;
10381 :
10382 0 : case 4:
10383 0 : ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr, "security_err", &r->security_err);
10384 0 : break;
10385 :
10386 0 : case 5:
10387 0 : ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr, "service_err", &r->service_err);
10388 0 : break;
10389 :
10390 0 : case 6:
10391 0 : ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr, "update_err", &r->update_err);
10392 0 : break;
10393 :
10394 0 : case 7:
10395 0 : ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr, "system_err", &r->system_err);
10396 0 : break;
10397 :
10398 0 : default:
10399 0 : ndr_print_bad_level(ndr, name, level);
10400 : }
10401 0 : }
10402 :
10403 188 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_ErrData_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntry_ErrData_V1 *r)
10404 : {
10405 188 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10406 188 : if (ndr_flags & NDR_SCALARS) {
10407 94 : NDR_CHECK(ndr_push_align(ndr, 5));
10408 94 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
10409 94 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_DirErr(ndr, NDR_SCALARS, r->dir_err));
10410 94 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
10411 94 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
10412 : }
10413 188 : if (ndr_flags & NDR_BUFFERS) {
10414 94 : if (r->info) {
10415 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->info, r->dir_err));
10416 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
10417 : }
10418 : }
10419 188 : return NDR_ERR_SUCCESS;
10420 : }
10421 :
10422 194 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_ErrData_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntry_ErrData_V1 *r)
10423 : {
10424 6 : uint32_t _ptr_info;
10425 194 : TALLOC_CTX *_mem_save_info_0 = NULL;
10426 194 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10427 194 : if (ndr_flags & NDR_SCALARS) {
10428 97 : NDR_CHECK(ndr_pull_align(ndr, 5));
10429 97 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
10430 100 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_DirErr(ndr, NDR_SCALARS, &r->dir_err));
10431 97 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10432 97 : if (_ptr_info) {
10433 1 : NDR_PULL_ALLOC(ndr, r->info);
10434 : } else {
10435 96 : r->info = NULL;
10436 : }
10437 97 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10438 : }
10439 194 : if (ndr_flags & NDR_BUFFERS) {
10440 97 : if (r->info) {
10441 1 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10442 1 : NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
10443 1 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->info, r->dir_err));
10444 1 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
10445 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
10446 : }
10447 : }
10448 188 : return NDR_ERR_SUCCESS;
10449 : }
10450 :
10451 2 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_ErrData_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntry_ErrData_V1 *r)
10452 : {
10453 2 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntry_ErrData_V1");
10454 2 : if (r == NULL) { ndr_print_null(ndr); return; }
10455 2 : ndr->depth++;
10456 2 : ndr_print_WERROR(ndr, "status", r->status);
10457 2 : ndr_print_drsuapi_DsAddEntry_DirErr(ndr, "dir_err", r->dir_err);
10458 2 : ndr_print_ptr(ndr, "info", r->info);
10459 2 : ndr->depth++;
10460 2 : if (r->info) {
10461 0 : ndr_print_set_switch_value(ndr, r->info, r->dir_err);
10462 0 : ndr_print_drsuapi_DsAddEntryErrorInfo(ndr, "info", r->info);
10463 : }
10464 2 : ndr->depth--;
10465 2 : ndr->depth--;
10466 : }
10467 :
10468 94 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_ErrData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsAddEntry_ErrData *r)
10469 : {
10470 0 : uint32_t level;
10471 94 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10472 94 : if (ndr_flags & NDR_SCALARS) {
10473 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
10474 94 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
10475 94 : NDR_CHECK(ndr_push_union_align(ndr, 5));
10476 94 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
10477 94 : NDR_CHECK(ndr_push_union_align(ndr, 5));
10478 94 : switch (level) {
10479 94 : case 1: {
10480 94 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_ErrData_V1(ndr, NDR_SCALARS, &r->v1));
10481 94 : break; }
10482 :
10483 0 : default:
10484 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
10485 : }
10486 : }
10487 94 : if (ndr_flags & NDR_BUFFERS) {
10488 94 : if (!(ndr_flags & NDR_SCALARS)) {
10489 : /* We didn't get it above, and the token is not needed after this. */
10490 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
10491 : }
10492 94 : switch (level) {
10493 94 : case 1:
10494 94 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_ErrData_V1(ndr, NDR_BUFFERS, &r->v1));
10495 94 : break;
10496 :
10497 0 : default:
10498 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
10499 : }
10500 : }
10501 94 : return NDR_ERR_SUCCESS;
10502 : }
10503 :
10504 97 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_ErrData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsAddEntry_ErrData *r)
10505 : {
10506 3 : uint32_t level;
10507 3 : uint32_t _level;
10508 97 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10509 97 : if (ndr_flags & NDR_SCALARS) {
10510 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
10511 97 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
10512 97 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
10513 97 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
10514 97 : if (_level != level) {
10515 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
10516 : }
10517 97 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
10518 97 : switch (level) {
10519 97 : case 1: {
10520 97 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_ErrData_V1(ndr, NDR_SCALARS, &r->v1));
10521 94 : break; }
10522 :
10523 0 : default:
10524 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
10525 : }
10526 : }
10527 97 : if (ndr_flags & NDR_BUFFERS) {
10528 97 : if (!(ndr_flags & NDR_SCALARS)) {
10529 : /* We didn't get it above, and the token is not needed after this. */
10530 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
10531 : }
10532 97 : switch (level) {
10533 97 : case 1:
10534 97 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_ErrData_V1(ndr, NDR_BUFFERS, &r->v1));
10535 94 : break;
10536 :
10537 0 : default:
10538 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
10539 : }
10540 : }
10541 94 : return NDR_ERR_SUCCESS;
10542 : }
10543 :
10544 2 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_ErrData(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntry_ErrData *r)
10545 : {
10546 2 : uint32_t level;
10547 2 : level = ndr_print_steal_switch_value(ndr, r);
10548 2 : ndr_print_union(ndr, name, level, "drsuapi_DsAddEntry_ErrData");
10549 2 : switch (level) {
10550 2 : case 1:
10551 2 : ndr_print_drsuapi_DsAddEntry_ErrData_V1(ndr, "v1", &r->v1);
10552 2 : break;
10553 :
10554 0 : default:
10555 0 : ndr_print_bad_level(ndr, name, level);
10556 : }
10557 2 : }
10558 :
10559 188 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier2 *r)
10560 : {
10561 188 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10562 188 : if (ndr_flags & NDR_SCALARS) {
10563 94 : NDR_CHECK(ndr_push_align(ndr, 4));
10564 94 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
10565 94 : NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
10566 94 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
10567 : }
10568 188 : if (ndr_flags & NDR_BUFFERS) {
10569 94 : NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
10570 : }
10571 188 : return NDR_ERR_SUCCESS;
10572 : }
10573 :
10574 192 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectIdentifier2 *r)
10575 : {
10576 190 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10577 190 : if (ndr_flags & NDR_SCALARS) {
10578 96 : NDR_CHECK(ndr_pull_align(ndr, 4));
10579 96 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
10580 96 : NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
10581 96 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
10582 : }
10583 190 : if (ndr_flags & NDR_BUFFERS) {
10584 96 : NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
10585 : }
10586 188 : return NDR_ERR_SUCCESS;
10587 : }
10588 :
10589 2 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier2 *r)
10590 : {
10591 2 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier2");
10592 2 : if (r == NULL) { ndr_print_null(ndr); return; }
10593 2 : ndr->depth++;
10594 2 : ndr_print_GUID(ndr, "guid", &r->guid);
10595 2 : ndr_print_dom_sid28(ndr, "sid", &r->sid);
10596 2 : ndr->depth--;
10597 : }
10598 :
10599 0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryCtr2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryCtr2 *r)
10600 : {
10601 0 : uint32_t cntr_objects_1;
10602 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10603 0 : if (ndr_flags & NDR_SCALARS) {
10604 0 : NDR_CHECK(ndr_push_align(ndr, 5));
10605 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->id));
10606 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_DirErr(ndr, NDR_SCALARS, r->dir_err));
10607 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dsid));
10608 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->extended_err));
10609 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->extended_data));
10610 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->problem));
10611 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
10612 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->objects));
10613 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
10614 : }
10615 0 : if (ndr_flags & NDR_BUFFERS) {
10616 0 : if (r->id) {
10617 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
10618 : }
10619 0 : if (r->objects) {
10620 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
10621 0 : for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
10622 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_SCALARS, &r->objects[cntr_objects_1]));
10623 : }
10624 0 : for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
10625 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_BUFFERS, &r->objects[cntr_objects_1]));
10626 : }
10627 : }
10628 : }
10629 0 : return NDR_ERR_SUCCESS;
10630 : }
10631 :
10632 0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryCtr2 *r)
10633 : {
10634 0 : uint32_t _ptr_id;
10635 0 : TALLOC_CTX *_mem_save_id_0 = NULL;
10636 0 : uint32_t _ptr_objects;
10637 0 : uint32_t size_objects_1 = 0;
10638 0 : uint32_t cntr_objects_1;
10639 0 : TALLOC_CTX *_mem_save_objects_0 = NULL;
10640 0 : TALLOC_CTX *_mem_save_objects_1 = NULL;
10641 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10642 0 : if (ndr_flags & NDR_SCALARS) {
10643 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
10644 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id));
10645 0 : if (_ptr_id) {
10646 0 : NDR_PULL_ALLOC(ndr, r->id);
10647 : } else {
10648 0 : r->id = NULL;
10649 : }
10650 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_DirErr(ndr, NDR_SCALARS, &r->dir_err));
10651 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dsid));
10652 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->extended_err));
10653 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extended_data));
10654 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->problem));
10655 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
10656 0 : if (r->count > 10000) {
10657 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
10658 : }
10659 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_objects));
10660 0 : if (_ptr_objects) {
10661 0 : NDR_PULL_ALLOC(ndr, r->objects);
10662 : } else {
10663 0 : r->objects = NULL;
10664 : }
10665 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10666 : }
10667 0 : if (ndr_flags & NDR_BUFFERS) {
10668 0 : if (r->id) {
10669 0 : _mem_save_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
10670 0 : NDR_PULL_SET_MEM_CTX(ndr, r->id, 0);
10671 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
10672 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_0, 0);
10673 : }
10674 0 : if (r->objects) {
10675 0 : _mem_save_objects_0 = NDR_PULL_GET_MEM_CTX(ndr);
10676 0 : NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
10677 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->objects));
10678 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->objects, &size_objects_1));
10679 0 : NDR_PULL_ALLOC_N(ndr, r->objects, size_objects_1);
10680 0 : _mem_save_objects_1 = NDR_PULL_GET_MEM_CTX(ndr);
10681 0 : NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
10682 0 : for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
10683 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_SCALARS, &r->objects[cntr_objects_1]));
10684 : }
10685 0 : for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
10686 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_BUFFERS, &r->objects[cntr_objects_1]));
10687 : }
10688 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_1, 0);
10689 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_0, 0);
10690 : }
10691 0 : if (r->objects) {
10692 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->objects, r->count));
10693 : }
10694 0 : for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
10695 0 : }
10696 : }
10697 0 : return NDR_ERR_SUCCESS;
10698 : }
10699 :
10700 0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryCtr2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryCtr2 *r)
10701 : {
10702 0 : uint32_t cntr_objects_1;
10703 0 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntryCtr2");
10704 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10705 0 : ndr->depth++;
10706 0 : ndr_print_ptr(ndr, "id", r->id);
10707 0 : ndr->depth++;
10708 0 : if (r->id) {
10709 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "id", r->id);
10710 : }
10711 0 : ndr->depth--;
10712 0 : ndr_print_drsuapi_DsAddEntry_DirErr(ndr, "dir_err", r->dir_err);
10713 0 : ndr_print_uint32(ndr, "dsid", r->dsid);
10714 0 : ndr_print_WERROR(ndr, "extended_err", r->extended_err);
10715 0 : ndr_print_uint32(ndr, "extended_data", r->extended_data);
10716 0 : ndr_print_uint16(ndr, "problem", r->problem);
10717 0 : ndr_print_uint32(ndr, "count", r->count);
10718 0 : ndr_print_ptr(ndr, "objects", r->objects);
10719 0 : ndr->depth++;
10720 0 : if (r->objects) {
10721 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "objects", (uint32_t)(r->count));
10722 0 : ndr->depth++;
10723 0 : for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
10724 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier2(ndr, "objects", &r->objects[cntr_objects_1]);
10725 : }
10726 0 : ndr->depth--;
10727 : }
10728 0 : ndr->depth--;
10729 0 : ndr->depth--;
10730 : }
10731 :
10732 188 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryCtr3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryCtr3 *r)
10733 : {
10734 0 : uint32_t cntr_objects_1;
10735 188 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10736 188 : if (ndr_flags & NDR_SCALARS) {
10737 94 : NDR_CHECK(ndr_push_align(ndr, 5));
10738 94 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->id));
10739 94 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->err_ver));
10740 94 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->err_data));
10741 94 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
10742 94 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->objects));
10743 94 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
10744 : }
10745 188 : if (ndr_flags & NDR_BUFFERS) {
10746 94 : if (r->id) {
10747 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
10748 : }
10749 94 : if (r->err_data) {
10750 94 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->err_data, r->err_ver));
10751 94 : NDR_CHECK(ndr_push_drsuapi_DsAddEntry_ErrData(ndr, NDR_SCALARS|NDR_BUFFERS, r->err_data));
10752 : }
10753 94 : if (r->objects) {
10754 94 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
10755 188 : for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
10756 94 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_SCALARS, &r->objects[cntr_objects_1]));
10757 : }
10758 188 : for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
10759 94 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_BUFFERS, &r->objects[cntr_objects_1]));
10760 : }
10761 : }
10762 : }
10763 188 : return NDR_ERR_SUCCESS;
10764 : }
10765 :
10766 194 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryCtr3 *r)
10767 : {
10768 6 : uint32_t _ptr_id;
10769 194 : TALLOC_CTX *_mem_save_id_0 = NULL;
10770 6 : uint32_t _ptr_err_data;
10771 194 : TALLOC_CTX *_mem_save_err_data_0 = NULL;
10772 6 : uint32_t _ptr_objects;
10773 194 : uint32_t size_objects_1 = 0;
10774 6 : uint32_t cntr_objects_1;
10775 194 : TALLOC_CTX *_mem_save_objects_0 = NULL;
10776 194 : TALLOC_CTX *_mem_save_objects_1 = NULL;
10777 194 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10778 194 : if (ndr_flags & NDR_SCALARS) {
10779 97 : NDR_CHECK(ndr_pull_align(ndr, 5));
10780 97 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id));
10781 97 : if (_ptr_id) {
10782 0 : NDR_PULL_ALLOC(ndr, r->id);
10783 : } else {
10784 97 : r->id = NULL;
10785 : }
10786 97 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->err_ver));
10787 97 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_err_data));
10788 97 : if (_ptr_err_data) {
10789 97 : NDR_PULL_ALLOC(ndr, r->err_data);
10790 : } else {
10791 0 : r->err_data = NULL;
10792 : }
10793 97 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
10794 97 : if (r->count > 10000) {
10795 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
10796 : }
10797 97 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_objects));
10798 97 : if (_ptr_objects) {
10799 97 : NDR_PULL_ALLOC(ndr, r->objects);
10800 : } else {
10801 0 : r->objects = NULL;
10802 : }
10803 97 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10804 : }
10805 194 : if (ndr_flags & NDR_BUFFERS) {
10806 97 : if (r->id) {
10807 0 : _mem_save_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
10808 0 : NDR_PULL_SET_MEM_CTX(ndr, r->id, 0);
10809 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
10810 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_0, 0);
10811 : }
10812 97 : if (r->err_data) {
10813 97 : _mem_save_err_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
10814 97 : NDR_PULL_SET_MEM_CTX(ndr, r->err_data, 0);
10815 97 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->err_data, r->err_ver));
10816 97 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_ErrData(ndr, NDR_SCALARS|NDR_BUFFERS, r->err_data));
10817 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_err_data_0, 0);
10818 : }
10819 96 : if (r->objects) {
10820 96 : _mem_save_objects_0 = NDR_PULL_GET_MEM_CTX(ndr);
10821 96 : NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
10822 96 : NDR_CHECK(ndr_pull_array_size(ndr, &r->objects));
10823 96 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->objects, &size_objects_1));
10824 96 : NDR_PULL_ALLOC_N(ndr, r->objects, size_objects_1);
10825 96 : _mem_save_objects_1 = NDR_PULL_GET_MEM_CTX(ndr);
10826 96 : NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
10827 192 : for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
10828 96 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_SCALARS, &r->objects[cntr_objects_1]));
10829 : }
10830 192 : for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
10831 98 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_BUFFERS, &r->objects[cntr_objects_1]));
10832 : }
10833 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_1, 0);
10834 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_0, 0);
10835 : }
10836 96 : if (r->objects) {
10837 96 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->objects, r->count));
10838 : }
10839 192 : for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
10840 2 : }
10841 : }
10842 188 : return NDR_ERR_SUCCESS;
10843 : }
10844 :
10845 2 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryCtr3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryCtr3 *r)
10846 : {
10847 2 : uint32_t cntr_objects_1;
10848 2 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntryCtr3");
10849 2 : if (r == NULL) { ndr_print_null(ndr); return; }
10850 2 : ndr->depth++;
10851 2 : ndr_print_ptr(ndr, "id", r->id);
10852 2 : ndr->depth++;
10853 2 : if (r->id) {
10854 0 : ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "id", r->id);
10855 : }
10856 2 : ndr->depth--;
10857 2 : ndr_print_uint32(ndr, "err_ver", r->err_ver);
10858 2 : ndr_print_ptr(ndr, "err_data", r->err_data);
10859 2 : ndr->depth++;
10860 2 : if (r->err_data) {
10861 2 : ndr_print_set_switch_value(ndr, r->err_data, r->err_ver);
10862 2 : ndr_print_drsuapi_DsAddEntry_ErrData(ndr, "err_data", r->err_data);
10863 : }
10864 2 : ndr->depth--;
10865 2 : ndr_print_uint32(ndr, "count", r->count);
10866 2 : ndr_print_ptr(ndr, "objects", r->objects);
10867 2 : ndr->depth++;
10868 2 : if (r->objects) {
10869 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "objects", (uint32_t)(r->count));
10870 2 : ndr->depth++;
10871 4 : for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
10872 2 : ndr_print_drsuapi_DsReplicaObjectIdentifier2(ndr, "objects", &r->objects[cntr_objects_1]);
10873 : }
10874 2 : ndr->depth--;
10875 : }
10876 2 : ndr->depth--;
10877 2 : ndr->depth--;
10878 : }
10879 :
10880 94 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsAddEntryCtr *r)
10881 : {
10882 0 : uint32_t level;
10883 94 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10884 94 : if (ndr_flags & NDR_SCALARS) {
10885 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
10886 94 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
10887 94 : NDR_CHECK(ndr_push_union_align(ndr, 5));
10888 94 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
10889 94 : NDR_CHECK(ndr_push_union_align(ndr, 5));
10890 94 : switch (level) {
10891 0 : case 2: {
10892 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr2(ndr, NDR_SCALARS, &r->ctr2));
10893 0 : break; }
10894 :
10895 94 : case 3: {
10896 94 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr3(ndr, NDR_SCALARS, &r->ctr3));
10897 94 : break; }
10898 :
10899 0 : default:
10900 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
10901 : }
10902 : }
10903 94 : if (ndr_flags & NDR_BUFFERS) {
10904 94 : if (!(ndr_flags & NDR_SCALARS)) {
10905 : /* We didn't get it above, and the token is not needed after this. */
10906 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
10907 : }
10908 94 : switch (level) {
10909 0 : case 2:
10910 0 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr2(ndr, NDR_BUFFERS, &r->ctr2));
10911 0 : break;
10912 :
10913 94 : case 3:
10914 94 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr3(ndr, NDR_BUFFERS, &r->ctr3));
10915 94 : break;
10916 :
10917 0 : default:
10918 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
10919 : }
10920 : }
10921 94 : return NDR_ERR_SUCCESS;
10922 : }
10923 :
10924 97 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsAddEntryCtr *r)
10925 : {
10926 3 : uint32_t level;
10927 3 : uint32_t _level;
10928 97 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10929 97 : if (ndr_flags & NDR_SCALARS) {
10930 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
10931 97 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
10932 97 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
10933 97 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
10934 97 : if (_level != level) {
10935 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
10936 : }
10937 97 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
10938 97 : switch (level) {
10939 0 : case 2: {
10940 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr2(ndr, NDR_SCALARS, &r->ctr2));
10941 0 : break; }
10942 :
10943 97 : case 3: {
10944 97 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr3(ndr, NDR_SCALARS, &r->ctr3));
10945 94 : break; }
10946 :
10947 0 : default:
10948 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
10949 : }
10950 : }
10951 97 : if (ndr_flags & NDR_BUFFERS) {
10952 97 : if (!(ndr_flags & NDR_SCALARS)) {
10953 : /* We didn't get it above, and the token is not needed after this. */
10954 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
10955 : }
10956 97 : switch (level) {
10957 0 : case 2:
10958 0 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr2(ndr, NDR_BUFFERS, &r->ctr2));
10959 0 : break;
10960 :
10961 97 : case 3:
10962 97 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr3(ndr, NDR_BUFFERS, &r->ctr3));
10963 94 : break;
10964 :
10965 0 : default:
10966 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
10967 : }
10968 : }
10969 94 : return NDR_ERR_SUCCESS;
10970 : }
10971 :
10972 2 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntryCtr *r)
10973 : {
10974 2 : uint32_t level;
10975 2 : level = ndr_print_steal_switch_value(ndr, r);
10976 2 : ndr_print_union(ndr, name, level, "drsuapi_DsAddEntryCtr");
10977 2 : switch (level) {
10978 0 : case 2:
10979 0 : ndr_print_drsuapi_DsAddEntryCtr2(ndr, "ctr2", &r->ctr2);
10980 0 : break;
10981 :
10982 2 : case 3:
10983 2 : ndr_print_drsuapi_DsAddEntryCtr3(ndr, "ctr3", &r->ctr3);
10984 2 : break;
10985 :
10986 0 : default:
10987 0 : ndr_print_bad_level(ndr, name, level);
10988 : }
10989 2 : }
10990 :
10991 4 : static enum ndr_err_code ndr_push_drsuapi_DsExecuteKCCFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
10992 : {
10993 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
10994 4 : return NDR_ERR_SUCCESS;
10995 : }
10996 :
10997 4 : static enum ndr_err_code ndr_pull_drsuapi_DsExecuteKCCFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
10998 : {
10999 0 : uint32_t v;
11000 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
11001 4 : *r = v;
11002 4 : return NDR_ERR_SUCCESS;
11003 : }
11004 :
11005 0 : _PUBLIC_ void ndr_print_drsuapi_DsExecuteKCCFlags(struct ndr_print *ndr, const char *name, uint32_t r)
11006 : {
11007 0 : ndr_print_uint32(ndr, name, r);
11008 0 : ndr->depth++;
11009 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION, r);
11010 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_EXECUTE_KCC_DAMPED", DRSUAPI_DS_EXECUTE_KCC_DAMPED, r);
11011 0 : ndr->depth--;
11012 0 : }
11013 :
11014 4 : static enum ndr_err_code ndr_push_drsuapi_DsExecuteKCC1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsExecuteKCC1 *r)
11015 : {
11016 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11017 4 : if (ndr_flags & NDR_SCALARS) {
11018 4 : NDR_CHECK(ndr_push_align(ndr, 4));
11019 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->taskID));
11020 4 : NDR_CHECK(ndr_push_drsuapi_DsExecuteKCCFlags(ndr, NDR_SCALARS, r->flags));
11021 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
11022 : }
11023 4 : if (ndr_flags & NDR_BUFFERS) {
11024 0 : }
11025 4 : return NDR_ERR_SUCCESS;
11026 : }
11027 :
11028 4 : static enum ndr_err_code ndr_pull_drsuapi_DsExecuteKCC1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsExecuteKCC1 *r)
11029 : {
11030 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11031 4 : if (ndr_flags & NDR_SCALARS) {
11032 4 : NDR_CHECK(ndr_pull_align(ndr, 4));
11033 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->taskID));
11034 4 : NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCCFlags(ndr, NDR_SCALARS, &r->flags));
11035 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
11036 : }
11037 4 : if (ndr_flags & NDR_BUFFERS) {
11038 0 : }
11039 4 : return NDR_ERR_SUCCESS;
11040 : }
11041 :
11042 0 : _PUBLIC_ void ndr_print_drsuapi_DsExecuteKCC1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsExecuteKCC1 *r)
11043 : {
11044 0 : ndr_print_struct(ndr, name, "drsuapi_DsExecuteKCC1");
11045 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11046 0 : ndr->depth++;
11047 0 : ndr_print_uint32(ndr, "taskID", r->taskID);
11048 0 : ndr_print_drsuapi_DsExecuteKCCFlags(ndr, "flags", r->flags);
11049 0 : ndr->depth--;
11050 : }
11051 :
11052 4 : static enum ndr_err_code ndr_push_drsuapi_DsExecuteKCCRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsExecuteKCCRequest *r)
11053 : {
11054 0 : uint32_t level;
11055 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11056 4 : if (ndr_flags & NDR_SCALARS) {
11057 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
11058 4 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
11059 4 : NDR_CHECK(ndr_push_union_align(ndr, 4));
11060 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
11061 4 : NDR_CHECK(ndr_push_union_align(ndr, 4));
11062 4 : switch (level) {
11063 4 : case 1: {
11064 4 : NDR_CHECK(ndr_push_drsuapi_DsExecuteKCC1(ndr, NDR_SCALARS, &r->ctr1));
11065 4 : break; }
11066 :
11067 0 : default:
11068 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
11069 : }
11070 : }
11071 4 : if (ndr_flags & NDR_BUFFERS) {
11072 0 : if (!(ndr_flags & NDR_SCALARS)) {
11073 : /* We didn't get it above, and the token is not needed after this. */
11074 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
11075 : }
11076 0 : switch (level) {
11077 0 : case 1:
11078 0 : break;
11079 :
11080 0 : default:
11081 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
11082 : }
11083 : }
11084 4 : return NDR_ERR_SUCCESS;
11085 : }
11086 :
11087 4 : static enum ndr_err_code ndr_pull_drsuapi_DsExecuteKCCRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsExecuteKCCRequest *r)
11088 : {
11089 0 : uint32_t level;
11090 0 : uint32_t _level;
11091 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11092 4 : if (ndr_flags & NDR_SCALARS) {
11093 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
11094 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
11095 4 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
11096 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
11097 4 : if (_level != level) {
11098 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
11099 : }
11100 4 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
11101 4 : switch (level) {
11102 4 : case 1: {
11103 4 : NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCC1(ndr, NDR_SCALARS, &r->ctr1));
11104 4 : break; }
11105 :
11106 0 : default:
11107 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
11108 : }
11109 : }
11110 4 : if (ndr_flags & NDR_BUFFERS) {
11111 0 : if (!(ndr_flags & NDR_SCALARS)) {
11112 : /* We didn't get it above, and the token is not needed after this. */
11113 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
11114 : }
11115 0 : switch (level) {
11116 0 : case 1:
11117 0 : break;
11118 :
11119 0 : default:
11120 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
11121 : }
11122 : }
11123 4 : return NDR_ERR_SUCCESS;
11124 : }
11125 :
11126 0 : _PUBLIC_ void ndr_print_drsuapi_DsExecuteKCCRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsExecuteKCCRequest *r)
11127 : {
11128 0 : uint32_t level;
11129 0 : level = ndr_print_steal_switch_value(ndr, r);
11130 0 : ndr_print_union(ndr, name, level, "drsuapi_DsExecuteKCCRequest");
11131 0 : switch (level) {
11132 0 : case 1:
11133 0 : ndr_print_drsuapi_DsExecuteKCC1(ndr, "ctr1", &r->ctr1);
11134 0 : break;
11135 :
11136 0 : default:
11137 0 : ndr_print_bad_level(ndr, name, level);
11138 : }
11139 0 : }
11140 :
11141 120 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoLevel(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaGetInfoLevel r)
11142 : {
11143 120 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
11144 120 : return NDR_ERR_SUCCESS;
11145 : }
11146 :
11147 60 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoLevel(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaGetInfoLevel *r)
11148 : {
11149 0 : uint32_t v;
11150 60 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
11151 60 : *r = v;
11152 60 : return NDR_ERR_SUCCESS;
11153 : }
11154 :
11155 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaGetInfoLevel(struct ndr_print *ndr, const char *name, enum drsuapi_DsReplicaGetInfoLevel r)
11156 : {
11157 0 : const char *val = NULL;
11158 :
11159 0 : switch (r) {
11160 0 : case DRSUAPI_DS_REPLICA_GET_INFO: val = "DRSUAPI_DS_REPLICA_GET_INFO"; break;
11161 0 : case DRSUAPI_DS_REPLICA_GET_INFO2: val = "DRSUAPI_DS_REPLICA_GET_INFO2"; break;
11162 : }
11163 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
11164 0 : }
11165 :
11166 180 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaInfoType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaInfoType r)
11167 : {
11168 180 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
11169 180 : return NDR_ERR_SUCCESS;
11170 : }
11171 :
11172 120 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaInfoType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaInfoType *r)
11173 : {
11174 0 : uint32_t v;
11175 120 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
11176 120 : *r = v;
11177 120 : return NDR_ERR_SUCCESS;
11178 : }
11179 :
11180 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaInfoType(struct ndr_print *ndr, const char *name, enum drsuapi_DsReplicaInfoType r)
11181 : {
11182 0 : const char *val = NULL;
11183 :
11184 0 : switch (r) {
11185 0 : case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS: val = "DRSUAPI_DS_REPLICA_INFO_NEIGHBORS"; break;
11186 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS: val = "DRSUAPI_DS_REPLICA_INFO_CURSORS"; break;
11187 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA: val = "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA"; break;
11188 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES: val = "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES"; break;
11189 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES: val = "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES"; break;
11190 0 : case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS: val = "DRSUAPI_DS_REPLICA_INFO_PENDING_OPS"; break;
11191 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA: val = "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA"; break;
11192 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS2: val = "DRSUAPI_DS_REPLICA_INFO_CURSORS2"; break;
11193 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS3: val = "DRSUAPI_DS_REPLICA_INFO_CURSORS3"; break;
11194 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2: val = "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2"; break;
11195 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2: val = "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2"; break;
11196 0 : case DRSUAPI_DS_REPLICA_INFO_REPSTO: val = "DRSUAPI_DS_REPLICA_INFO_REPSTO"; break;
11197 0 : case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS: val = "DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS"; break;
11198 0 : case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1: val = "DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1"; break;
11199 0 : case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS: val = "DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS"; break;
11200 : }
11201 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
11202 0 : }
11203 :
11204 120 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaGetInfoRequest1 *r)
11205 : {
11206 120 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11207 120 : if (ndr_flags & NDR_SCALARS) {
11208 60 : NDR_CHECK(ndr_push_align(ndr, 5));
11209 60 : NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, r->info_type));
11210 60 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
11211 60 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
11212 60 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
11213 : }
11214 120 : if (ndr_flags & NDR_BUFFERS) {
11215 60 : if (r->object_dn) {
11216 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
11217 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11218 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
11219 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_dn, ndr_charset_length(r->object_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11220 : }
11221 : }
11222 120 : return NDR_ERR_SUCCESS;
11223 : }
11224 :
11225 120 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaGetInfoRequest1 *r)
11226 : {
11227 0 : uint32_t _ptr_object_dn;
11228 120 : uint32_t size_object_dn_1 = 0;
11229 120 : uint32_t length_object_dn_1 = 0;
11230 120 : TALLOC_CTX *_mem_save_object_dn_0 = NULL;
11231 120 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11232 120 : if (ndr_flags & NDR_SCALARS) {
11233 60 : NDR_CHECK(ndr_pull_align(ndr, 5));
11234 60 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, &r->info_type));
11235 60 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
11236 60 : if (_ptr_object_dn) {
11237 0 : NDR_PULL_ALLOC(ndr, r->object_dn);
11238 : } else {
11239 60 : r->object_dn = NULL;
11240 : }
11241 60 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
11242 60 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
11243 : }
11244 120 : if (ndr_flags & NDR_BUFFERS) {
11245 60 : if (r->object_dn) {
11246 0 : _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
11247 0 : NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
11248 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
11249 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
11250 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
11251 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
11252 0 : if (length_object_dn_1 > size_object_dn_1) {
11253 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_object_dn_1, length_object_dn_1);
11254 : }
11255 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
11256 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
11257 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
11258 : }
11259 : }
11260 120 : return NDR_ERR_SUCCESS;
11261 : }
11262 :
11263 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaGetInfoRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaGetInfoRequest1 *r)
11264 : {
11265 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaGetInfoRequest1");
11266 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11267 0 : ndr->depth++;
11268 0 : ndr_print_drsuapi_DsReplicaInfoType(ndr, "info_type", r->info_type);
11269 0 : ndr_print_ptr(ndr, "object_dn", r->object_dn);
11270 0 : ndr->depth++;
11271 0 : if (r->object_dn) {
11272 0 : ndr_print_string(ndr, "object_dn", r->object_dn);
11273 : }
11274 0 : ndr->depth--;
11275 0 : ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
11276 0 : ndr->depth--;
11277 : }
11278 :
11279 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoRequest2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaGetInfoRequest2 *r)
11280 : {
11281 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11282 0 : if (ndr_flags & NDR_SCALARS) {
11283 0 : NDR_CHECK(ndr_push_align(ndr, 5));
11284 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, r->info_type));
11285 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
11286 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
11287 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
11288 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribute_name));
11289 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->value_dn_str));
11290 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
11291 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
11292 : }
11293 0 : if (ndr_flags & NDR_BUFFERS) {
11294 0 : if (r->object_dn) {
11295 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
11296 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11297 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
11298 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_dn, ndr_charset_length(r->object_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11299 : }
11300 0 : if (r->attribute_name) {
11301 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
11302 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11303 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
11304 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->attribute_name, ndr_charset_length(r->attribute_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11305 : }
11306 0 : if (r->value_dn_str) {
11307 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->value_dn_str, CH_UTF16)));
11308 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11309 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->value_dn_str, CH_UTF16)));
11310 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->value_dn_str, ndr_charset_length(r->value_dn_str, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11311 : }
11312 : }
11313 0 : return NDR_ERR_SUCCESS;
11314 : }
11315 :
11316 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoRequest2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaGetInfoRequest2 *r)
11317 : {
11318 0 : uint32_t _ptr_object_dn;
11319 0 : uint32_t size_object_dn_1 = 0;
11320 0 : uint32_t length_object_dn_1 = 0;
11321 0 : TALLOC_CTX *_mem_save_object_dn_0 = NULL;
11322 0 : uint32_t _ptr_attribute_name;
11323 0 : uint32_t size_attribute_name_1 = 0;
11324 0 : uint32_t length_attribute_name_1 = 0;
11325 0 : TALLOC_CTX *_mem_save_attribute_name_0 = NULL;
11326 0 : uint32_t _ptr_value_dn_str;
11327 0 : uint32_t size_value_dn_str_1 = 0;
11328 0 : uint32_t length_value_dn_str_1 = 0;
11329 0 : TALLOC_CTX *_mem_save_value_dn_str_0 = NULL;
11330 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11331 0 : if (ndr_flags & NDR_SCALARS) {
11332 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
11333 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, &r->info_type));
11334 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
11335 0 : if (_ptr_object_dn) {
11336 0 : NDR_PULL_ALLOC(ndr, r->object_dn);
11337 : } else {
11338 0 : r->object_dn = NULL;
11339 : }
11340 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
11341 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
11342 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribute_name));
11343 0 : if (_ptr_attribute_name) {
11344 0 : NDR_PULL_ALLOC(ndr, r->attribute_name);
11345 : } else {
11346 0 : r->attribute_name = NULL;
11347 : }
11348 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_dn_str));
11349 0 : if (_ptr_value_dn_str) {
11350 0 : NDR_PULL_ALLOC(ndr, r->value_dn_str);
11351 : } else {
11352 0 : r->value_dn_str = NULL;
11353 : }
11354 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
11355 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
11356 : }
11357 0 : if (ndr_flags & NDR_BUFFERS) {
11358 0 : if (r->object_dn) {
11359 0 : _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
11360 0 : NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
11361 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
11362 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
11363 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
11364 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
11365 0 : if (length_object_dn_1 > size_object_dn_1) {
11366 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_object_dn_1, length_object_dn_1);
11367 : }
11368 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
11369 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
11370 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
11371 : }
11372 0 : if (r->attribute_name) {
11373 0 : _mem_save_attribute_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11374 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attribute_name, 0);
11375 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->attribute_name));
11376 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->attribute_name));
11377 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->attribute_name, &size_attribute_name_1));
11378 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->attribute_name, &length_attribute_name_1));
11379 0 : if (length_attribute_name_1 > size_attribute_name_1) {
11380 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_attribute_name_1, length_attribute_name_1);
11381 : }
11382 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_attribute_name_1, sizeof(uint16_t)));
11383 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->attribute_name, length_attribute_name_1, sizeof(uint16_t), CH_UTF16));
11384 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribute_name_0, 0);
11385 : }
11386 0 : if (r->value_dn_str) {
11387 0 : _mem_save_value_dn_str_0 = NDR_PULL_GET_MEM_CTX(ndr);
11388 0 : NDR_PULL_SET_MEM_CTX(ndr, r->value_dn_str, 0);
11389 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->value_dn_str));
11390 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->value_dn_str));
11391 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->value_dn_str, &size_value_dn_str_1));
11392 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->value_dn_str, &length_value_dn_str_1));
11393 0 : if (length_value_dn_str_1 > size_value_dn_str_1) {
11394 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_value_dn_str_1, length_value_dn_str_1);
11395 : }
11396 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_value_dn_str_1, sizeof(uint16_t)));
11397 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->value_dn_str, length_value_dn_str_1, sizeof(uint16_t), CH_UTF16));
11398 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_dn_str_0, 0);
11399 : }
11400 : }
11401 0 : return NDR_ERR_SUCCESS;
11402 : }
11403 :
11404 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaGetInfoRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaGetInfoRequest2 *r)
11405 : {
11406 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaGetInfoRequest2");
11407 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11408 0 : ndr->depth++;
11409 0 : ndr_print_drsuapi_DsReplicaInfoType(ndr, "info_type", r->info_type);
11410 0 : ndr_print_ptr(ndr, "object_dn", r->object_dn);
11411 0 : ndr->depth++;
11412 0 : if (r->object_dn) {
11413 0 : ndr_print_string(ndr, "object_dn", r->object_dn);
11414 : }
11415 0 : ndr->depth--;
11416 0 : ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
11417 0 : ndr_print_uint32(ndr, "flags", r->flags);
11418 0 : ndr_print_ptr(ndr, "attribute_name", r->attribute_name);
11419 0 : ndr->depth++;
11420 0 : if (r->attribute_name) {
11421 0 : ndr_print_string(ndr, "attribute_name", r->attribute_name);
11422 : }
11423 0 : ndr->depth--;
11424 0 : ndr_print_ptr(ndr, "value_dn_str", r->value_dn_str);
11425 0 : ndr->depth++;
11426 0 : if (r->value_dn_str) {
11427 0 : ndr_print_string(ndr, "value_dn_str", r->value_dn_str);
11428 : }
11429 0 : ndr->depth--;
11430 0 : ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
11431 0 : ndr->depth--;
11432 : }
11433 :
11434 60 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaGetInfoRequest *r)
11435 : {
11436 0 : uint32_t level;
11437 60 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11438 60 : if (ndr_flags & NDR_SCALARS) {
11439 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
11440 60 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
11441 60 : NDR_CHECK(ndr_push_union_align(ndr, 5));
11442 60 : NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoLevel(ndr, NDR_SCALARS, level));
11443 60 : NDR_CHECK(ndr_push_union_align(ndr, 5));
11444 60 : switch (level) {
11445 60 : case DRSUAPI_DS_REPLICA_GET_INFO: {
11446 60 : NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest1(ndr, NDR_SCALARS, &r->req1));
11447 60 : break; }
11448 :
11449 0 : case DRSUAPI_DS_REPLICA_GET_INFO2: {
11450 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest2(ndr, NDR_SCALARS, &r->req2));
11451 0 : break; }
11452 :
11453 0 : default:
11454 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
11455 : }
11456 : }
11457 60 : if (ndr_flags & NDR_BUFFERS) {
11458 60 : if (!(ndr_flags & NDR_SCALARS)) {
11459 : /* We didn't get it above, and the token is not needed after this. */
11460 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
11461 : }
11462 60 : switch (level) {
11463 60 : case DRSUAPI_DS_REPLICA_GET_INFO:
11464 60 : NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest1(ndr, NDR_BUFFERS, &r->req1));
11465 60 : break;
11466 :
11467 0 : case DRSUAPI_DS_REPLICA_GET_INFO2:
11468 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest2(ndr, NDR_BUFFERS, &r->req2));
11469 0 : break;
11470 :
11471 0 : default:
11472 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
11473 : }
11474 : }
11475 60 : return NDR_ERR_SUCCESS;
11476 : }
11477 :
11478 60 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaGetInfoRequest *r)
11479 : {
11480 0 : uint32_t level;
11481 0 : uint32_t _level;
11482 60 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11483 60 : if (ndr_flags & NDR_SCALARS) {
11484 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
11485 60 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
11486 60 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
11487 60 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
11488 60 : if (_level != level) {
11489 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
11490 : }
11491 60 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
11492 60 : switch (level) {
11493 60 : case DRSUAPI_DS_REPLICA_GET_INFO: {
11494 60 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest1(ndr, NDR_SCALARS, &r->req1));
11495 60 : break; }
11496 :
11497 0 : case DRSUAPI_DS_REPLICA_GET_INFO2: {
11498 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest2(ndr, NDR_SCALARS, &r->req2));
11499 0 : break; }
11500 :
11501 0 : default:
11502 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
11503 : }
11504 : }
11505 60 : if (ndr_flags & NDR_BUFFERS) {
11506 60 : if (!(ndr_flags & NDR_SCALARS)) {
11507 : /* We didn't get it above, and the token is not needed after this. */
11508 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
11509 : }
11510 60 : switch (level) {
11511 60 : case DRSUAPI_DS_REPLICA_GET_INFO:
11512 60 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest1(ndr, NDR_BUFFERS, &r->req1));
11513 60 : break;
11514 :
11515 0 : case DRSUAPI_DS_REPLICA_GET_INFO2:
11516 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest2(ndr, NDR_BUFFERS, &r->req2));
11517 0 : break;
11518 :
11519 0 : default:
11520 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
11521 : }
11522 : }
11523 60 : return NDR_ERR_SUCCESS;
11524 : }
11525 :
11526 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaGetInfoRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaGetInfoRequest *r)
11527 : {
11528 0 : uint32_t level;
11529 0 : level = ndr_print_steal_switch_value(ndr, r);
11530 0 : ndr_print_union(ndr, name, level, "drsuapi_DsReplicaGetInfoRequest");
11531 0 : switch (level) {
11532 0 : case DRSUAPI_DS_REPLICA_GET_INFO:
11533 0 : ndr_print_drsuapi_DsReplicaGetInfoRequest1(ndr, "req1", &r->req1);
11534 0 : break;
11535 :
11536 0 : case DRSUAPI_DS_REPLICA_GET_INFO2:
11537 0 : ndr_print_drsuapi_DsReplicaGetInfoRequest2(ndr, "req2", &r->req2);
11538 0 : break;
11539 :
11540 0 : default:
11541 0 : ndr_print_bad_level(ndr, name, level);
11542 : }
11543 0 : }
11544 :
11545 512 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaNeighbour(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaNeighbour *r)
11546 : {
11547 512 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11548 512 : if (ndr_flags & NDR_SCALARS) {
11549 256 : NDR_CHECK(ndr_push_align(ndr, 8));
11550 256 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->naming_context_dn));
11551 256 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_obj_dn));
11552 256 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
11553 256 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport_obj_dn));
11554 256 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
11555 256 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
11556 256 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->naming_context_obj_guid));
11557 256 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
11558 256 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
11559 256 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_obj_guid));
11560 256 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->tmp_highest_usn));
11561 256 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
11562 256 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_success));
11563 256 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_attempt));
11564 256 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
11565 256 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
11566 256 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
11567 : }
11568 512 : if (ndr_flags & NDR_BUFFERS) {
11569 256 : if (r->naming_context_dn) {
11570 256 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->naming_context_dn, CH_UTF16)));
11571 256 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11572 256 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->naming_context_dn, CH_UTF16)));
11573 256 : 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));
11574 : }
11575 256 : if (r->source_dsa_obj_dn) {
11576 256 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_obj_dn, CH_UTF16)));
11577 256 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11578 256 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_obj_dn, CH_UTF16)));
11579 256 : 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));
11580 : }
11581 256 : if (r->source_dsa_address) {
11582 256 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
11583 256 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11584 256 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
11585 256 : 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));
11586 : }
11587 256 : if (r->transport_obj_dn) {
11588 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->transport_obj_dn, CH_UTF16)));
11589 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11590 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->transport_obj_dn, CH_UTF16)));
11591 0 : 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));
11592 : }
11593 : }
11594 512 : return NDR_ERR_SUCCESS;
11595 : }
11596 :
11597 512 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaNeighbour(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaNeighbour *r)
11598 : {
11599 0 : uint32_t _ptr_naming_context_dn;
11600 512 : uint32_t size_naming_context_dn_1 = 0;
11601 512 : uint32_t length_naming_context_dn_1 = 0;
11602 512 : TALLOC_CTX *_mem_save_naming_context_dn_0 = NULL;
11603 0 : uint32_t _ptr_source_dsa_obj_dn;
11604 512 : uint32_t size_source_dsa_obj_dn_1 = 0;
11605 512 : uint32_t length_source_dsa_obj_dn_1 = 0;
11606 512 : TALLOC_CTX *_mem_save_source_dsa_obj_dn_0 = NULL;
11607 0 : uint32_t _ptr_source_dsa_address;
11608 512 : uint32_t size_source_dsa_address_1 = 0;
11609 512 : uint32_t length_source_dsa_address_1 = 0;
11610 512 : TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
11611 0 : uint32_t _ptr_transport_obj_dn;
11612 512 : uint32_t size_transport_obj_dn_1 = 0;
11613 512 : uint32_t length_transport_obj_dn_1 = 0;
11614 512 : TALLOC_CTX *_mem_save_transport_obj_dn_0 = NULL;
11615 512 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11616 512 : if (ndr_flags & NDR_SCALARS) {
11617 256 : NDR_CHECK(ndr_pull_align(ndr, 8));
11618 256 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_naming_context_dn));
11619 256 : if (_ptr_naming_context_dn) {
11620 256 : NDR_PULL_ALLOC(ndr, r->naming_context_dn);
11621 : } else {
11622 0 : r->naming_context_dn = NULL;
11623 : }
11624 256 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_obj_dn));
11625 256 : if (_ptr_source_dsa_obj_dn) {
11626 256 : NDR_PULL_ALLOC(ndr, r->source_dsa_obj_dn);
11627 : } else {
11628 0 : r->source_dsa_obj_dn = NULL;
11629 : }
11630 256 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
11631 256 : if (_ptr_source_dsa_address) {
11632 256 : NDR_PULL_ALLOC(ndr, r->source_dsa_address);
11633 : } else {
11634 0 : r->source_dsa_address = NULL;
11635 : }
11636 256 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport_obj_dn));
11637 256 : if (_ptr_transport_obj_dn) {
11638 0 : NDR_PULL_ALLOC(ndr, r->transport_obj_dn);
11639 : } else {
11640 256 : r->transport_obj_dn = NULL;
11641 : }
11642 256 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
11643 256 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
11644 256 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->naming_context_obj_guid));
11645 256 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
11646 256 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
11647 256 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_obj_guid));
11648 256 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->tmp_highest_usn));
11649 256 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
11650 256 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_success));
11651 256 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_attempt));
11652 256 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
11653 256 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
11654 256 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
11655 : }
11656 512 : if (ndr_flags & NDR_BUFFERS) {
11657 256 : if (r->naming_context_dn) {
11658 256 : _mem_save_naming_context_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
11659 256 : NDR_PULL_SET_MEM_CTX(ndr, r->naming_context_dn, 0);
11660 256 : NDR_CHECK(ndr_pull_array_size(ndr, &r->naming_context_dn));
11661 256 : NDR_CHECK(ndr_pull_array_length(ndr, &r->naming_context_dn));
11662 256 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->naming_context_dn, &size_naming_context_dn_1));
11663 256 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->naming_context_dn, &length_naming_context_dn_1));
11664 256 : if (length_naming_context_dn_1 > size_naming_context_dn_1) {
11665 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_naming_context_dn_1, length_naming_context_dn_1);
11666 : }
11667 256 : NDR_CHECK(ndr_check_string_terminator(ndr, length_naming_context_dn_1, sizeof(uint16_t)));
11668 256 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->naming_context_dn, length_naming_context_dn_1, sizeof(uint16_t), CH_UTF16));
11669 256 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_dn_0, 0);
11670 : }
11671 256 : if (r->source_dsa_obj_dn) {
11672 256 : _mem_save_source_dsa_obj_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
11673 256 : NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_obj_dn, 0);
11674 256 : NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_obj_dn));
11675 256 : NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_obj_dn));
11676 256 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_obj_dn, &size_source_dsa_obj_dn_1));
11677 256 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_obj_dn, &length_source_dsa_obj_dn_1));
11678 256 : if (length_source_dsa_obj_dn_1 > size_source_dsa_obj_dn_1) {
11679 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_obj_dn_1, length_source_dsa_obj_dn_1);
11680 : }
11681 256 : NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_obj_dn_1, sizeof(uint16_t)));
11682 256 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_obj_dn, length_source_dsa_obj_dn_1, sizeof(uint16_t), CH_UTF16));
11683 256 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_obj_dn_0, 0);
11684 : }
11685 256 : if (r->source_dsa_address) {
11686 256 : _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
11687 256 : NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
11688 256 : NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
11689 256 : NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
11690 256 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
11691 256 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
11692 256 : if (length_source_dsa_address_1 > size_source_dsa_address_1) {
11693 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_address_1, length_source_dsa_address_1);
11694 : }
11695 256 : NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint16_t)));
11696 256 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint16_t), CH_UTF16));
11697 256 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
11698 : }
11699 256 : if (r->transport_obj_dn) {
11700 0 : _mem_save_transport_obj_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
11701 0 : NDR_PULL_SET_MEM_CTX(ndr, r->transport_obj_dn, 0);
11702 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->transport_obj_dn));
11703 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->transport_obj_dn));
11704 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->transport_obj_dn, &size_transport_obj_dn_1));
11705 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->transport_obj_dn, &length_transport_obj_dn_1));
11706 0 : if (length_transport_obj_dn_1 > size_transport_obj_dn_1) {
11707 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_transport_obj_dn_1, length_transport_obj_dn_1);
11708 : }
11709 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_transport_obj_dn_1, sizeof(uint16_t)));
11710 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->transport_obj_dn, length_transport_obj_dn_1, sizeof(uint16_t), CH_UTF16));
11711 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_obj_dn_0, 0);
11712 : }
11713 : }
11714 512 : return NDR_ERR_SUCCESS;
11715 : }
11716 :
11717 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaNeighbour(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaNeighbour *r)
11718 : {
11719 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaNeighbour");
11720 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11721 0 : ndr->depth++;
11722 0 : ndr_print_ptr(ndr, "naming_context_dn", r->naming_context_dn);
11723 0 : ndr->depth++;
11724 0 : if (r->naming_context_dn) {
11725 0 : ndr_print_string(ndr, "naming_context_dn", r->naming_context_dn);
11726 : }
11727 0 : ndr->depth--;
11728 0 : ndr_print_ptr(ndr, "source_dsa_obj_dn", r->source_dsa_obj_dn);
11729 0 : ndr->depth++;
11730 0 : if (r->source_dsa_obj_dn) {
11731 0 : ndr_print_string(ndr, "source_dsa_obj_dn", r->source_dsa_obj_dn);
11732 : }
11733 0 : ndr->depth--;
11734 0 : ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
11735 0 : ndr->depth++;
11736 0 : if (r->source_dsa_address) {
11737 0 : ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
11738 : }
11739 0 : ndr->depth--;
11740 0 : ndr_print_ptr(ndr, "transport_obj_dn", r->transport_obj_dn);
11741 0 : ndr->depth++;
11742 0 : if (r->transport_obj_dn) {
11743 0 : ndr_print_string(ndr, "transport_obj_dn", r->transport_obj_dn);
11744 : }
11745 0 : ndr->depth--;
11746 0 : ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
11747 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
11748 0 : ndr_print_GUID(ndr, "naming_context_obj_guid", &r->naming_context_obj_guid);
11749 0 : ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
11750 0 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
11751 0 : ndr_print_GUID(ndr, "transport_obj_guid", &r->transport_obj_guid);
11752 0 : ndr_print_hyper(ndr, "tmp_highest_usn", r->tmp_highest_usn);
11753 0 : ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
11754 0 : ndr_print_NTTIME(ndr, "last_success", r->last_success);
11755 0 : ndr_print_NTTIME(ndr, "last_attempt", r->last_attempt);
11756 0 : ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
11757 0 : ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
11758 0 : ndr->depth--;
11759 : }
11760 :
11761 60 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaNeighbourCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaNeighbourCtr *r)
11762 : {
11763 0 : uint32_t cntr_array_0;
11764 60 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11765 60 : if (ndr_flags & NDR_SCALARS) {
11766 60 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
11767 60 : NDR_CHECK(ndr_push_align(ndr, 8));
11768 60 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11769 60 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
11770 316 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
11771 256 : NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbour(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
11772 : }
11773 60 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
11774 : }
11775 60 : if (ndr_flags & NDR_BUFFERS) {
11776 316 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
11777 256 : NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbour(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
11778 : }
11779 : }
11780 60 : return NDR_ERR_SUCCESS;
11781 : }
11782 :
11783 60 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaNeighbourCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaNeighbourCtr *r)
11784 : {
11785 60 : uint32_t size_array_0 = 0;
11786 0 : uint32_t cntr_array_0;
11787 60 : TALLOC_CTX *_mem_save_array_0 = NULL;
11788 60 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11789 60 : if (ndr_flags & NDR_SCALARS) {
11790 60 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
11791 60 : NDR_CHECK(ndr_pull_align(ndr, 8));
11792 60 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
11793 60 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
11794 60 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
11795 60 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
11796 60 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
11797 60 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
11798 316 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
11799 256 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbour(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
11800 : }
11801 60 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
11802 60 : if (r->array) {
11803 60 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
11804 : }
11805 60 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
11806 : }
11807 60 : if (ndr_flags & NDR_BUFFERS) {
11808 60 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
11809 60 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
11810 60 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
11811 316 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
11812 256 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbour(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
11813 : }
11814 60 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
11815 316 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
11816 : }
11817 : }
11818 60 : return NDR_ERR_SUCCESS;
11819 : }
11820 :
11821 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaNeighbourCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaNeighbourCtr *r)
11822 : {
11823 0 : uint32_t cntr_array_0;
11824 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaNeighbourCtr");
11825 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11826 0 : ndr->depth++;
11827 0 : ndr_print_uint32(ndr, "count", r->count);
11828 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
11829 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
11830 0 : ndr->depth++;
11831 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
11832 0 : ndr_print_drsuapi_DsReplicaNeighbour(ndr, "array", &r->array[cntr_array_0]);
11833 : }
11834 0 : ndr->depth--;
11835 0 : ndr->depth--;
11836 : }
11837 :
11838 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursorCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursorCtr *r)
11839 : {
11840 0 : uint32_t cntr_array_0;
11841 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11842 0 : if (ndr_flags & NDR_SCALARS) {
11843 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
11844 0 : NDR_CHECK(ndr_push_align(ndr, 8));
11845 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11846 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
11847 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
11848 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
11849 : }
11850 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
11851 : }
11852 0 : if (ndr_flags & NDR_BUFFERS) {
11853 0 : }
11854 0 : return NDR_ERR_SUCCESS;
11855 : }
11856 :
11857 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursorCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursorCtr *r)
11858 : {
11859 0 : uint32_t size_array_0 = 0;
11860 0 : uint32_t cntr_array_0;
11861 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
11862 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11863 0 : if (ndr_flags & NDR_SCALARS) {
11864 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
11865 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
11866 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
11867 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
11868 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
11869 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
11870 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
11871 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
11872 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
11873 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
11874 : }
11875 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
11876 0 : if (r->array) {
11877 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->count));
11878 : }
11879 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
11880 : }
11881 0 : if (ndr_flags & NDR_BUFFERS) {
11882 0 : }
11883 0 : return NDR_ERR_SUCCESS;
11884 : }
11885 :
11886 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursorCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursorCtr *r)
11887 : {
11888 0 : uint32_t cntr_array_0;
11889 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursorCtr");
11890 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11891 0 : ndr->depth++;
11892 0 : ndr_print_uint32(ndr, "count", r->count);
11893 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
11894 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
11895 0 : ndr->depth++;
11896 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
11897 0 : ndr_print_drsuapi_DsReplicaCursor(ndr, "array", &r->array[cntr_array_0]);
11898 : }
11899 0 : ndr->depth--;
11900 0 : ndr->depth--;
11901 : }
11902 :
11903 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjMetaData *r)
11904 : {
11905 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11906 0 : if (ndr_flags & NDR_SCALARS) {
11907 0 : NDR_CHECK(ndr_push_align(ndr, 8));
11908 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribute_name));
11909 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
11910 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->originating_change_time));
11911 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
11912 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
11913 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
11914 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
11915 : }
11916 0 : if (ndr_flags & NDR_BUFFERS) {
11917 0 : if (r->attribute_name) {
11918 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
11919 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11920 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
11921 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->attribute_name, ndr_charset_length(r->attribute_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11922 : }
11923 : }
11924 0 : return NDR_ERR_SUCCESS;
11925 : }
11926 :
11927 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjMetaData *r)
11928 : {
11929 0 : uint32_t _ptr_attribute_name;
11930 0 : uint32_t size_attribute_name_1 = 0;
11931 0 : uint32_t length_attribute_name_1 = 0;
11932 0 : TALLOC_CTX *_mem_save_attribute_name_0 = NULL;
11933 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11934 0 : if (ndr_flags & NDR_SCALARS) {
11935 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
11936 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribute_name));
11937 0 : if (_ptr_attribute_name) {
11938 0 : NDR_PULL_ALLOC(ndr, r->attribute_name);
11939 : } else {
11940 0 : r->attribute_name = NULL;
11941 : }
11942 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
11943 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->originating_change_time));
11944 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
11945 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
11946 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
11947 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
11948 : }
11949 0 : if (ndr_flags & NDR_BUFFERS) {
11950 0 : if (r->attribute_name) {
11951 0 : _mem_save_attribute_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11952 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attribute_name, 0);
11953 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->attribute_name));
11954 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->attribute_name));
11955 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->attribute_name, &size_attribute_name_1));
11956 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->attribute_name, &length_attribute_name_1));
11957 0 : if (length_attribute_name_1 > size_attribute_name_1) {
11958 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_attribute_name_1, length_attribute_name_1);
11959 : }
11960 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_attribute_name_1, sizeof(uint16_t)));
11961 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->attribute_name, length_attribute_name_1, sizeof(uint16_t), CH_UTF16));
11962 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribute_name_0, 0);
11963 : }
11964 : }
11965 0 : return NDR_ERR_SUCCESS;
11966 : }
11967 :
11968 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjMetaData(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaData *r)
11969 : {
11970 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjMetaData");
11971 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11972 0 : ndr->depth++;
11973 0 : ndr_print_ptr(ndr, "attribute_name", r->attribute_name);
11974 0 : ndr->depth++;
11975 0 : if (r->attribute_name) {
11976 0 : ndr_print_string(ndr, "attribute_name", r->attribute_name);
11977 : }
11978 0 : ndr->depth--;
11979 0 : ndr_print_uint32(ndr, "version", r->version);
11980 0 : ndr_print_NTTIME(ndr, "originating_change_time", r->originating_change_time);
11981 0 : ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
11982 0 : ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
11983 0 : ndr_print_hyper(ndr, "local_usn", r->local_usn);
11984 0 : ndr->depth--;
11985 : }
11986 :
11987 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjMetaDataCtr *r)
11988 : {
11989 0 : uint32_t cntr_array_0;
11990 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11991 0 : if (ndr_flags & NDR_SCALARS) {
11992 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
11993 0 : NDR_CHECK(ndr_push_align(ndr, 8));
11994 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11995 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
11996 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
11997 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
11998 : }
11999 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
12000 : }
12001 0 : if (ndr_flags & NDR_BUFFERS) {
12002 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12003 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
12004 : }
12005 : }
12006 0 : return NDR_ERR_SUCCESS;
12007 : }
12008 :
12009 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjMetaDataCtr *r)
12010 : {
12011 0 : uint32_t size_array_0 = 0;
12012 0 : uint32_t cntr_array_0;
12013 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
12014 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12015 0 : if (ndr_flags & NDR_SCALARS) {
12016 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12017 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
12018 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12019 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
12020 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12021 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
12022 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12023 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12024 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12025 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12026 : }
12027 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12028 0 : if (r->array) {
12029 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12030 : }
12031 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
12032 : }
12033 0 : if (ndr_flags & NDR_BUFFERS) {
12034 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12035 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12036 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12037 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12038 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
12039 : }
12040 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12041 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12042 : }
12043 : }
12044 0 : return NDR_ERR_SUCCESS;
12045 : }
12046 :
12047 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaDataCtr *r)
12048 : {
12049 0 : uint32_t cntr_array_0;
12050 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjMetaDataCtr");
12051 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12052 0 : ndr->depth++;
12053 0 : ndr_print_uint32(ndr, "count", r->count);
12054 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
12055 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
12056 0 : ndr->depth++;
12057 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12058 0 : ndr_print_drsuapi_DsReplicaObjMetaData(ndr, "array", &r->array[cntr_array_0]);
12059 : }
12060 0 : ndr->depth--;
12061 0 : ndr->depth--;
12062 : }
12063 :
12064 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaKccDsaFailure(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaKccDsaFailure *r)
12065 : {
12066 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12067 0 : if (ndr_flags & NDR_SCALARS) {
12068 0 : NDR_CHECK(ndr_push_align(ndr, 5));
12069 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dsa_obj_dn));
12070 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->dsa_obj_guid));
12071 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->first_failure));
12072 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_failures));
12073 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->last_result));
12074 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12075 : }
12076 0 : if (ndr_flags & NDR_BUFFERS) {
12077 0 : if (r->dsa_obj_dn) {
12078 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dsa_obj_dn, CH_UTF16)));
12079 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12080 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dsa_obj_dn, CH_UTF16)));
12081 0 : 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));
12082 : }
12083 : }
12084 0 : return NDR_ERR_SUCCESS;
12085 : }
12086 :
12087 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaKccDsaFailure(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaKccDsaFailure *r)
12088 : {
12089 0 : uint32_t _ptr_dsa_obj_dn;
12090 0 : uint32_t size_dsa_obj_dn_1 = 0;
12091 0 : uint32_t length_dsa_obj_dn_1 = 0;
12092 0 : TALLOC_CTX *_mem_save_dsa_obj_dn_0 = NULL;
12093 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12094 0 : if (ndr_flags & NDR_SCALARS) {
12095 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
12096 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dsa_obj_dn));
12097 0 : if (_ptr_dsa_obj_dn) {
12098 0 : NDR_PULL_ALLOC(ndr, r->dsa_obj_dn);
12099 : } else {
12100 0 : r->dsa_obj_dn = NULL;
12101 : }
12102 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->dsa_obj_guid));
12103 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->first_failure));
12104 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_failures));
12105 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->last_result));
12106 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12107 : }
12108 0 : if (ndr_flags & NDR_BUFFERS) {
12109 0 : if (r->dsa_obj_dn) {
12110 0 : _mem_save_dsa_obj_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
12111 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dsa_obj_dn, 0);
12112 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dsa_obj_dn));
12113 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dsa_obj_dn));
12114 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dsa_obj_dn, &size_dsa_obj_dn_1));
12115 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dsa_obj_dn, &length_dsa_obj_dn_1));
12116 0 : if (length_dsa_obj_dn_1 > size_dsa_obj_dn_1) {
12117 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dsa_obj_dn_1, length_dsa_obj_dn_1);
12118 : }
12119 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dsa_obj_dn_1, sizeof(uint16_t)));
12120 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dsa_obj_dn, length_dsa_obj_dn_1, sizeof(uint16_t), CH_UTF16));
12121 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dsa_obj_dn_0, 0);
12122 : }
12123 : }
12124 0 : return NDR_ERR_SUCCESS;
12125 : }
12126 :
12127 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaKccDsaFailure(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaKccDsaFailure *r)
12128 : {
12129 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaKccDsaFailure");
12130 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12131 0 : ndr->depth++;
12132 0 : ndr_print_ptr(ndr, "dsa_obj_dn", r->dsa_obj_dn);
12133 0 : ndr->depth++;
12134 0 : if (r->dsa_obj_dn) {
12135 0 : ndr_print_string(ndr, "dsa_obj_dn", r->dsa_obj_dn);
12136 : }
12137 0 : ndr->depth--;
12138 0 : ndr_print_GUID(ndr, "dsa_obj_guid", &r->dsa_obj_guid);
12139 0 : ndr_print_NTTIME(ndr, "first_failure", r->first_failure);
12140 0 : ndr_print_uint32(ndr, "num_failures", r->num_failures);
12141 0 : ndr_print_WERROR(ndr, "last_result", r->last_result);
12142 0 : ndr->depth--;
12143 : }
12144 :
12145 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaKccDsaFailuresCtr *r)
12146 : {
12147 0 : uint32_t cntr_array_0;
12148 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12149 0 : if (ndr_flags & NDR_SCALARS) {
12150 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12151 0 : NDR_CHECK(ndr_push_align(ndr, 5));
12152 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12153 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
12154 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12155 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailure(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12156 : }
12157 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12158 : }
12159 0 : if (ndr_flags & NDR_BUFFERS) {
12160 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12161 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailure(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
12162 : }
12163 : }
12164 0 : return NDR_ERR_SUCCESS;
12165 : }
12166 :
12167 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaKccDsaFailuresCtr *r)
12168 : {
12169 0 : uint32_t size_array_0 = 0;
12170 0 : uint32_t cntr_array_0;
12171 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
12172 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12173 0 : if (ndr_flags & NDR_SCALARS) {
12174 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12175 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
12176 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12177 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
12178 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12179 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
12180 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12181 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12182 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12183 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailure(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12184 : }
12185 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12186 0 : if (r->array) {
12187 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12188 : }
12189 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12190 : }
12191 0 : if (ndr_flags & NDR_BUFFERS) {
12192 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12193 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12194 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12195 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12196 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailure(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
12197 : }
12198 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12199 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12200 : }
12201 : }
12202 0 : return NDR_ERR_SUCCESS;
12203 : }
12204 :
12205 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaKccDsaFailuresCtr *r)
12206 : {
12207 0 : uint32_t cntr_array_0;
12208 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaKccDsaFailuresCtr");
12209 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12210 0 : ndr->depth++;
12211 0 : ndr_print_uint32(ndr, "count", r->count);
12212 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
12213 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
12214 0 : ndr->depth++;
12215 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12216 0 : ndr_print_drsuapi_DsReplicaKccDsaFailure(ndr, "array", &r->array[cntr_array_0]);
12217 : }
12218 0 : ndr->depth--;
12219 0 : ndr->depth--;
12220 : }
12221 :
12222 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOpType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaOpType r)
12223 : {
12224 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
12225 0 : return NDR_ERR_SUCCESS;
12226 : }
12227 :
12228 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOpType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaOpType *r)
12229 : {
12230 0 : uint16_t v;
12231 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
12232 0 : *r = v;
12233 0 : return NDR_ERR_SUCCESS;
12234 : }
12235 :
12236 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOpType(struct ndr_print *ndr, const char *name, enum drsuapi_DsReplicaOpType r)
12237 : {
12238 0 : const char *val = NULL;
12239 :
12240 0 : switch (r) {
12241 0 : case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC: val = "DRSUAPI_DS_REPLICA_OP_TYPE_SYNC"; break;
12242 0 : case DRSUAPI_DS_REPLICA_OP_TYPE_ADD: val = "DRSUAPI_DS_REPLICA_OP_TYPE_ADD"; break;
12243 0 : case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE: val = "DRSUAPI_DS_REPLICA_OP_TYPE_DELETE"; break;
12244 0 : case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY: val = "DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY"; break;
12245 0 : case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS: val = "DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS"; break;
12246 : }
12247 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
12248 0 : }
12249 :
12250 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOp(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaOp *r)
12251 : {
12252 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12253 0 : if (ndr_flags & NDR_SCALARS) {
12254 0 : NDR_CHECK(ndr_push_align(ndr, 5));
12255 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->operation_start));
12256 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_num));
12257 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
12258 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOpType(ndr, NDR_SCALARS, r->operation_type));
12259 0 : NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
12260 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->nc_dn));
12261 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote_dsa_obj_dn));
12262 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote_dsa_address));
12263 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->nc_obj_guid));
12264 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->remote_dsa_obj_guid));
12265 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12266 : }
12267 0 : if (ndr_flags & NDR_BUFFERS) {
12268 0 : if (r->nc_dn) {
12269 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->nc_dn, CH_UTF16)));
12270 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12271 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->nc_dn, CH_UTF16)));
12272 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->nc_dn, ndr_charset_length(r->nc_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12273 : }
12274 0 : if (r->remote_dsa_obj_dn) {
12275 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_dsa_obj_dn, CH_UTF16)));
12276 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12277 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_dsa_obj_dn, CH_UTF16)));
12278 0 : 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));
12279 : }
12280 0 : if (r->remote_dsa_address) {
12281 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_dsa_address, CH_UTF16)));
12282 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12283 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_dsa_address, CH_UTF16)));
12284 0 : 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));
12285 : }
12286 : }
12287 0 : return NDR_ERR_SUCCESS;
12288 : }
12289 :
12290 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOp(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaOp *r)
12291 : {
12292 0 : uint32_t _ptr_nc_dn;
12293 0 : uint32_t size_nc_dn_1 = 0;
12294 0 : uint32_t length_nc_dn_1 = 0;
12295 0 : TALLOC_CTX *_mem_save_nc_dn_0 = NULL;
12296 0 : uint32_t _ptr_remote_dsa_obj_dn;
12297 0 : uint32_t size_remote_dsa_obj_dn_1 = 0;
12298 0 : uint32_t length_remote_dsa_obj_dn_1 = 0;
12299 0 : TALLOC_CTX *_mem_save_remote_dsa_obj_dn_0 = NULL;
12300 0 : uint32_t _ptr_remote_dsa_address;
12301 0 : uint32_t size_remote_dsa_address_1 = 0;
12302 0 : uint32_t length_remote_dsa_address_1 = 0;
12303 0 : TALLOC_CTX *_mem_save_remote_dsa_address_0 = NULL;
12304 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12305 0 : if (ndr_flags & NDR_SCALARS) {
12306 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
12307 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->operation_start));
12308 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_num));
12309 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
12310 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOpType(ndr, NDR_SCALARS, &r->operation_type));
12311 0 : NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
12312 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nc_dn));
12313 0 : if (_ptr_nc_dn) {
12314 0 : NDR_PULL_ALLOC(ndr, r->nc_dn);
12315 : } else {
12316 0 : r->nc_dn = NULL;
12317 : }
12318 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_remote_dsa_obj_dn));
12319 0 : if (_ptr_remote_dsa_obj_dn) {
12320 0 : NDR_PULL_ALLOC(ndr, r->remote_dsa_obj_dn);
12321 : } else {
12322 0 : r->remote_dsa_obj_dn = NULL;
12323 : }
12324 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_remote_dsa_address));
12325 0 : if (_ptr_remote_dsa_address) {
12326 0 : NDR_PULL_ALLOC(ndr, r->remote_dsa_address);
12327 : } else {
12328 0 : r->remote_dsa_address = NULL;
12329 : }
12330 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->nc_obj_guid));
12331 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->remote_dsa_obj_guid));
12332 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12333 : }
12334 0 : if (ndr_flags & NDR_BUFFERS) {
12335 0 : if (r->nc_dn) {
12336 0 : _mem_save_nc_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
12337 0 : NDR_PULL_SET_MEM_CTX(ndr, r->nc_dn, 0);
12338 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->nc_dn));
12339 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->nc_dn));
12340 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->nc_dn, &size_nc_dn_1));
12341 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->nc_dn, &length_nc_dn_1));
12342 0 : if (length_nc_dn_1 > size_nc_dn_1) {
12343 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_nc_dn_1, length_nc_dn_1);
12344 : }
12345 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_nc_dn_1, sizeof(uint16_t)));
12346 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->nc_dn, length_nc_dn_1, sizeof(uint16_t), CH_UTF16));
12347 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nc_dn_0, 0);
12348 : }
12349 0 : if (r->remote_dsa_obj_dn) {
12350 0 : _mem_save_remote_dsa_obj_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
12351 0 : NDR_PULL_SET_MEM_CTX(ndr, r->remote_dsa_obj_dn, 0);
12352 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_dsa_obj_dn));
12353 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_dsa_obj_dn));
12354 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_dsa_obj_dn, &size_remote_dsa_obj_dn_1));
12355 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_dsa_obj_dn, &length_remote_dsa_obj_dn_1));
12356 0 : if (length_remote_dsa_obj_dn_1 > size_remote_dsa_obj_dn_1) {
12357 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_remote_dsa_obj_dn_1, length_remote_dsa_obj_dn_1);
12358 : }
12359 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_dsa_obj_dn_1, sizeof(uint16_t)));
12360 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_dsa_obj_dn, length_remote_dsa_obj_dn_1, sizeof(uint16_t), CH_UTF16));
12361 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_remote_dsa_obj_dn_0, 0);
12362 : }
12363 0 : if (r->remote_dsa_address) {
12364 0 : _mem_save_remote_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
12365 0 : NDR_PULL_SET_MEM_CTX(ndr, r->remote_dsa_address, 0);
12366 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_dsa_address));
12367 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_dsa_address));
12368 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_dsa_address, &size_remote_dsa_address_1));
12369 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_dsa_address, &length_remote_dsa_address_1));
12370 0 : if (length_remote_dsa_address_1 > size_remote_dsa_address_1) {
12371 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_remote_dsa_address_1, length_remote_dsa_address_1);
12372 : }
12373 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_dsa_address_1, sizeof(uint16_t)));
12374 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_dsa_address, length_remote_dsa_address_1, sizeof(uint16_t), CH_UTF16));
12375 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_remote_dsa_address_0, 0);
12376 : }
12377 : }
12378 0 : return NDR_ERR_SUCCESS;
12379 : }
12380 :
12381 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOp(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOp *r)
12382 : {
12383 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaOp");
12384 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12385 0 : ndr->depth++;
12386 0 : ndr_print_NTTIME(ndr, "operation_start", r->operation_start);
12387 0 : ndr_print_uint32(ndr, "serial_num", r->serial_num);
12388 0 : ndr_print_uint32(ndr, "priority", r->priority);
12389 0 : ndr_print_drsuapi_DsReplicaOpType(ndr, "operation_type", r->operation_type);
12390 0 : ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
12391 0 : ndr_print_ptr(ndr, "nc_dn", r->nc_dn);
12392 0 : ndr->depth++;
12393 0 : if (r->nc_dn) {
12394 0 : ndr_print_string(ndr, "nc_dn", r->nc_dn);
12395 : }
12396 0 : ndr->depth--;
12397 0 : ndr_print_ptr(ndr, "remote_dsa_obj_dn", r->remote_dsa_obj_dn);
12398 0 : ndr->depth++;
12399 0 : if (r->remote_dsa_obj_dn) {
12400 0 : ndr_print_string(ndr, "remote_dsa_obj_dn", r->remote_dsa_obj_dn);
12401 : }
12402 0 : ndr->depth--;
12403 0 : ndr_print_ptr(ndr, "remote_dsa_address", r->remote_dsa_address);
12404 0 : ndr->depth++;
12405 0 : if (r->remote_dsa_address) {
12406 0 : ndr_print_string(ndr, "remote_dsa_address", r->remote_dsa_address);
12407 : }
12408 0 : ndr->depth--;
12409 0 : ndr_print_GUID(ndr, "nc_obj_guid", &r->nc_obj_guid);
12410 0 : ndr_print_GUID(ndr, "remote_dsa_obj_guid", &r->remote_dsa_obj_guid);
12411 0 : ndr->depth--;
12412 : }
12413 :
12414 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOpCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaOpCtr *r)
12415 : {
12416 0 : uint32_t cntr_array_0;
12417 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12418 0 : if (ndr_flags & NDR_SCALARS) {
12419 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12420 0 : NDR_CHECK(ndr_push_align(ndr, 5));
12421 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
12422 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12423 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12424 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOp(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12425 : }
12426 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12427 : }
12428 0 : if (ndr_flags & NDR_BUFFERS) {
12429 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12430 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOp(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
12431 : }
12432 : }
12433 0 : return NDR_ERR_SUCCESS;
12434 : }
12435 :
12436 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOpCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaOpCtr *r)
12437 : {
12438 0 : uint32_t size_array_0 = 0;
12439 0 : uint32_t cntr_array_0;
12440 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
12441 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12442 0 : if (ndr_flags & NDR_SCALARS) {
12443 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12444 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
12445 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
12446 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12447 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12448 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
12449 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12450 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12451 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12452 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOp(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12453 : }
12454 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12455 0 : if (r->array) {
12456 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12457 : }
12458 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12459 : }
12460 0 : if (ndr_flags & NDR_BUFFERS) {
12461 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12462 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12463 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12464 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12465 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOp(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
12466 : }
12467 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12468 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12469 : }
12470 : }
12471 0 : return NDR_ERR_SUCCESS;
12472 : }
12473 :
12474 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOpCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOpCtr *r)
12475 : {
12476 0 : uint32_t cntr_array_0;
12477 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaOpCtr");
12478 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12479 0 : ndr->depth++;
12480 0 : ndr_print_NTTIME(ndr, "time", r->time);
12481 0 : ndr_print_uint32(ndr, "count", r->count);
12482 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
12483 0 : ndr->depth++;
12484 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12485 0 : ndr_print_drsuapi_DsReplicaOp(ndr, "array", &r->array[cntr_array_0]);
12486 : }
12487 0 : ndr->depth--;
12488 0 : ndr->depth--;
12489 : }
12490 :
12491 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttrValMetaData *r)
12492 : {
12493 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12494 0 : if (ndr_flags & NDR_SCALARS) {
12495 0 : NDR_CHECK(ndr_push_align(ndr, 8));
12496 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribute_name));
12497 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
12498 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_DATA_BLOB(0, r->binary, 0)));
12499 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->binary));
12500 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->deleted));
12501 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->created));
12502 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
12503 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->originating_change_time));
12504 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
12505 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
12506 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
12507 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
12508 : }
12509 0 : if (ndr_flags & NDR_BUFFERS) {
12510 0 : if (r->attribute_name) {
12511 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
12512 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12513 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
12514 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->attribute_name, ndr_charset_length(r->attribute_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12515 : }
12516 0 : if (r->object_dn) {
12517 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
12518 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12519 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
12520 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_dn, ndr_charset_length(r->object_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12521 : }
12522 0 : if (r->binary) {
12523 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->binary));
12524 : }
12525 : }
12526 0 : return NDR_ERR_SUCCESS;
12527 : }
12528 :
12529 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttrValMetaData *r)
12530 : {
12531 0 : uint32_t _ptr_attribute_name;
12532 0 : uint32_t size_attribute_name_1 = 0;
12533 0 : uint32_t length_attribute_name_1 = 0;
12534 0 : TALLOC_CTX *_mem_save_attribute_name_0 = NULL;
12535 0 : uint32_t _ptr_object_dn;
12536 0 : uint32_t size_object_dn_1 = 0;
12537 0 : uint32_t length_object_dn_1 = 0;
12538 0 : TALLOC_CTX *_mem_save_object_dn_0 = NULL;
12539 0 : uint32_t _ptr_binary;
12540 0 : TALLOC_CTX *_mem_save_binary_0 = NULL;
12541 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12542 0 : if (ndr_flags & NDR_SCALARS) {
12543 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
12544 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribute_name));
12545 0 : if (_ptr_attribute_name) {
12546 0 : NDR_PULL_ALLOC(ndr, r->attribute_name);
12547 : } else {
12548 0 : r->attribute_name = NULL;
12549 : }
12550 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
12551 0 : if (_ptr_object_dn) {
12552 0 : NDR_PULL_ALLOC(ndr, r->object_dn);
12553 : } else {
12554 0 : r->object_dn = NULL;
12555 : }
12556 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_binary));
12557 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary));
12558 0 : if (_ptr_binary) {
12559 0 : NDR_PULL_ALLOC(ndr, r->binary);
12560 : } else {
12561 0 : r->binary = NULL;
12562 : }
12563 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->deleted));
12564 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->created));
12565 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
12566 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->originating_change_time));
12567 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
12568 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
12569 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
12570 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
12571 : }
12572 0 : if (ndr_flags & NDR_BUFFERS) {
12573 0 : if (r->attribute_name) {
12574 0 : _mem_save_attribute_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12575 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attribute_name, 0);
12576 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->attribute_name));
12577 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->attribute_name));
12578 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->attribute_name, &size_attribute_name_1));
12579 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->attribute_name, &length_attribute_name_1));
12580 0 : if (length_attribute_name_1 > size_attribute_name_1) {
12581 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_attribute_name_1, length_attribute_name_1);
12582 : }
12583 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_attribute_name_1, sizeof(uint16_t)));
12584 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->attribute_name, length_attribute_name_1, sizeof(uint16_t), CH_UTF16));
12585 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribute_name_0, 0);
12586 : }
12587 0 : if (r->object_dn) {
12588 0 : _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
12589 0 : NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
12590 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
12591 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
12592 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
12593 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
12594 0 : if (length_object_dn_1 > size_object_dn_1) {
12595 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_object_dn_1, length_object_dn_1);
12596 : }
12597 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
12598 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
12599 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
12600 : }
12601 0 : if (r->binary) {
12602 0 : _mem_save_binary_0 = NDR_PULL_GET_MEM_CTX(ndr);
12603 0 : NDR_PULL_SET_MEM_CTX(ndr, r->binary, 0);
12604 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->binary));
12605 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_0, 0);
12606 : }
12607 : }
12608 0 : return NDR_ERR_SUCCESS;
12609 : }
12610 :
12611 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttrValMetaData(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaData *r)
12612 : {
12613 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttrValMetaData");
12614 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12615 0 : ndr->depth++;
12616 0 : ndr_print_ptr(ndr, "attribute_name", r->attribute_name);
12617 0 : ndr->depth++;
12618 0 : if (r->attribute_name) {
12619 0 : ndr_print_string(ndr, "attribute_name", r->attribute_name);
12620 : }
12621 0 : ndr->depth--;
12622 0 : ndr_print_ptr(ndr, "object_dn", r->object_dn);
12623 0 : ndr->depth++;
12624 0 : if (r->object_dn) {
12625 0 : ndr_print_string(ndr, "object_dn", r->object_dn);
12626 : }
12627 0 : ndr->depth--;
12628 0 : 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);
12629 0 : ndr_print_ptr(ndr, "binary", r->binary);
12630 0 : ndr->depth++;
12631 0 : if (r->binary) {
12632 0 : ndr_print_DATA_BLOB(ndr, "binary", *r->binary);
12633 : }
12634 0 : ndr->depth--;
12635 0 : ndr_print_NTTIME(ndr, "deleted", r->deleted);
12636 0 : ndr_print_NTTIME(ndr, "created", r->created);
12637 0 : ndr_print_uint32(ndr, "version", r->version);
12638 0 : ndr_print_NTTIME(ndr, "originating_change_time", r->originating_change_time);
12639 0 : ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
12640 0 : ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
12641 0 : ndr_print_hyper(ndr, "local_usn", r->local_usn);
12642 0 : ndr->depth--;
12643 : }
12644 :
12645 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttrValMetaDataCtr *r)
12646 : {
12647 0 : uint32_t cntr_array_0;
12648 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12649 0 : if (ndr_flags & NDR_SCALARS) {
12650 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12651 0 : NDR_CHECK(ndr_push_align(ndr, 8));
12652 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12653 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
12654 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12655 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12656 : }
12657 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
12658 : }
12659 0 : if (ndr_flags & NDR_BUFFERS) {
12660 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12661 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
12662 : }
12663 : }
12664 0 : return NDR_ERR_SUCCESS;
12665 : }
12666 :
12667 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttrValMetaDataCtr *r)
12668 : {
12669 0 : uint32_t size_array_0 = 0;
12670 0 : uint32_t cntr_array_0;
12671 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
12672 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12673 0 : if (ndr_flags & NDR_SCALARS) {
12674 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12675 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
12676 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12677 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
12678 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12679 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
12680 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12681 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12682 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12683 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12684 : }
12685 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12686 0 : if (r->array) {
12687 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12688 : }
12689 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
12690 : }
12691 0 : if (ndr_flags & NDR_BUFFERS) {
12692 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12693 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12694 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12695 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12696 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
12697 : }
12698 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12699 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12700 : }
12701 : }
12702 0 : return NDR_ERR_SUCCESS;
12703 : }
12704 :
12705 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaDataCtr *r)
12706 : {
12707 0 : uint32_t cntr_array_0;
12708 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttrValMetaDataCtr");
12709 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12710 0 : ndr->depth++;
12711 0 : ndr_print_uint32(ndr, "count", r->count);
12712 0 : ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
12713 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
12714 0 : ndr->depth++;
12715 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12716 0 : ndr_print_drsuapi_DsReplicaAttrValMetaData(ndr, "array", &r->array[cntr_array_0]);
12717 : }
12718 0 : ndr->depth--;
12719 0 : ndr->depth--;
12720 : }
12721 :
12722 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor2Ctr *r)
12723 : {
12724 0 : uint32_t cntr_array_0;
12725 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12726 0 : if (ndr_flags & NDR_SCALARS) {
12727 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12728 0 : NDR_CHECK(ndr_push_align(ndr, 8));
12729 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12730 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
12731 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12732 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12733 : }
12734 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
12735 : }
12736 0 : if (ndr_flags & NDR_BUFFERS) {
12737 0 : }
12738 0 : return NDR_ERR_SUCCESS;
12739 : }
12740 :
12741 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor2Ctr *r)
12742 : {
12743 0 : uint32_t size_array_0 = 0;
12744 0 : uint32_t cntr_array_0;
12745 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
12746 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12747 0 : if (ndr_flags & NDR_SCALARS) {
12748 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12749 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
12750 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12751 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
12752 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12753 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
12754 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12755 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12756 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12757 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12758 : }
12759 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12760 0 : if (r->array) {
12761 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->count));
12762 : }
12763 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
12764 : }
12765 0 : if (ndr_flags & NDR_BUFFERS) {
12766 0 : }
12767 0 : return NDR_ERR_SUCCESS;
12768 : }
12769 :
12770 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor2Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2Ctr *r)
12771 : {
12772 0 : uint32_t cntr_array_0;
12773 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor2Ctr");
12774 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12775 0 : ndr->depth++;
12776 0 : ndr_print_uint32(ndr, "count", r->count);
12777 0 : ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
12778 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
12779 0 : ndr->depth++;
12780 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12781 0 : ndr_print_drsuapi_DsReplicaCursor2(ndr, "array", &r->array[cntr_array_0]);
12782 : }
12783 0 : ndr->depth--;
12784 0 : ndr->depth--;
12785 : }
12786 :
12787 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor3 *r)
12788 : {
12789 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12790 0 : if (ndr_flags & NDR_SCALARS) {
12791 0 : NDR_CHECK(ndr_push_align(ndr, 8));
12792 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
12793 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
12794 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_sync_success));
12795 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_obj_dn));
12796 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
12797 : }
12798 0 : if (ndr_flags & NDR_BUFFERS) {
12799 0 : if (r->source_dsa_obj_dn) {
12800 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_obj_dn, CH_UTF16)));
12801 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12802 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_obj_dn, CH_UTF16)));
12803 0 : 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));
12804 : }
12805 : }
12806 0 : return NDR_ERR_SUCCESS;
12807 : }
12808 :
12809 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor3 *r)
12810 : {
12811 0 : uint32_t _ptr_source_dsa_obj_dn;
12812 0 : uint32_t size_source_dsa_obj_dn_1 = 0;
12813 0 : uint32_t length_source_dsa_obj_dn_1 = 0;
12814 0 : TALLOC_CTX *_mem_save_source_dsa_obj_dn_0 = NULL;
12815 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12816 0 : if (ndr_flags & NDR_SCALARS) {
12817 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
12818 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
12819 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
12820 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_sync_success));
12821 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_obj_dn));
12822 0 : if (_ptr_source_dsa_obj_dn) {
12823 0 : NDR_PULL_ALLOC(ndr, r->source_dsa_obj_dn);
12824 : } else {
12825 0 : r->source_dsa_obj_dn = NULL;
12826 : }
12827 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
12828 : }
12829 0 : if (ndr_flags & NDR_BUFFERS) {
12830 0 : if (r->source_dsa_obj_dn) {
12831 0 : _mem_save_source_dsa_obj_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
12832 0 : NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_obj_dn, 0);
12833 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_obj_dn));
12834 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_obj_dn));
12835 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_obj_dn, &size_source_dsa_obj_dn_1));
12836 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_obj_dn, &length_source_dsa_obj_dn_1));
12837 0 : if (length_source_dsa_obj_dn_1 > size_source_dsa_obj_dn_1) {
12838 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_obj_dn_1, length_source_dsa_obj_dn_1);
12839 : }
12840 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_obj_dn_1, sizeof(uint16_t)));
12841 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_obj_dn, length_source_dsa_obj_dn_1, sizeof(uint16_t), CH_UTF16));
12842 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_obj_dn_0, 0);
12843 : }
12844 : }
12845 0 : return NDR_ERR_SUCCESS;
12846 : }
12847 :
12848 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor3 *r)
12849 : {
12850 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor3");
12851 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12852 0 : ndr->depth++;
12853 0 : ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
12854 0 : ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
12855 0 : ndr_print_NTTIME(ndr, "last_sync_success", r->last_sync_success);
12856 0 : ndr_print_ptr(ndr, "source_dsa_obj_dn", r->source_dsa_obj_dn);
12857 0 : ndr->depth++;
12858 0 : if (r->source_dsa_obj_dn) {
12859 0 : ndr_print_string(ndr, "source_dsa_obj_dn", r->source_dsa_obj_dn);
12860 : }
12861 0 : ndr->depth--;
12862 0 : ndr->depth--;
12863 : }
12864 :
12865 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor3Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor3Ctr *r)
12866 : {
12867 0 : uint32_t cntr_array_0;
12868 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12869 0 : if (ndr_flags & NDR_SCALARS) {
12870 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12871 0 : NDR_CHECK(ndr_push_align(ndr, 8));
12872 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12873 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
12874 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12875 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12876 : }
12877 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
12878 : }
12879 0 : if (ndr_flags & NDR_BUFFERS) {
12880 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12881 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
12882 : }
12883 : }
12884 0 : return NDR_ERR_SUCCESS;
12885 : }
12886 :
12887 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor3Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor3Ctr *r)
12888 : {
12889 0 : uint32_t size_array_0 = 0;
12890 0 : uint32_t cntr_array_0;
12891 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
12892 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12893 0 : if (ndr_flags & NDR_SCALARS) {
12894 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12895 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
12896 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12897 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
12898 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12899 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
12900 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12901 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12902 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12903 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
12904 : }
12905 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12906 0 : if (r->array) {
12907 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12908 : }
12909 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
12910 : }
12911 0 : if (ndr_flags & NDR_BUFFERS) {
12912 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
12913 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12914 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12915 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12916 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
12917 : }
12918 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12919 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
12920 : }
12921 : }
12922 0 : return NDR_ERR_SUCCESS;
12923 : }
12924 :
12925 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor3Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor3Ctr *r)
12926 : {
12927 0 : uint32_t cntr_array_0;
12928 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor3Ctr");
12929 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12930 0 : ndr->depth++;
12931 0 : ndr_print_uint32(ndr, "count", r->count);
12932 0 : ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
12933 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
12934 0 : ndr->depth++;
12935 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
12936 0 : ndr_print_drsuapi_DsReplicaCursor3(ndr, "array", &r->array[cntr_array_0]);
12937 : }
12938 0 : ndr->depth--;
12939 0 : ndr->depth--;
12940 : }
12941 :
12942 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaData2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjMetaData2 *r)
12943 : {
12944 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12945 0 : if (ndr_flags & NDR_SCALARS) {
12946 0 : NDR_CHECK(ndr_push_align(ndr, 8));
12947 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribute_name));
12948 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
12949 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->originating_change_time));
12950 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
12951 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
12952 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
12953 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->originating_dsa_dn));
12954 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
12955 : }
12956 0 : if (ndr_flags & NDR_BUFFERS) {
12957 0 : if (r->attribute_name) {
12958 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
12959 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12960 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
12961 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->attribute_name, ndr_charset_length(r->attribute_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12962 : }
12963 0 : if (r->originating_dsa_dn) {
12964 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->originating_dsa_dn, CH_UTF16)));
12965 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12966 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->originating_dsa_dn, CH_UTF16)));
12967 0 : 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));
12968 : }
12969 : }
12970 0 : return NDR_ERR_SUCCESS;
12971 : }
12972 :
12973 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaData2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjMetaData2 *r)
12974 : {
12975 0 : uint32_t _ptr_attribute_name;
12976 0 : uint32_t size_attribute_name_1 = 0;
12977 0 : uint32_t length_attribute_name_1 = 0;
12978 0 : TALLOC_CTX *_mem_save_attribute_name_0 = NULL;
12979 0 : uint32_t _ptr_originating_dsa_dn;
12980 0 : uint32_t size_originating_dsa_dn_1 = 0;
12981 0 : uint32_t length_originating_dsa_dn_1 = 0;
12982 0 : TALLOC_CTX *_mem_save_originating_dsa_dn_0 = NULL;
12983 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12984 0 : if (ndr_flags & NDR_SCALARS) {
12985 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
12986 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribute_name));
12987 0 : if (_ptr_attribute_name) {
12988 0 : NDR_PULL_ALLOC(ndr, r->attribute_name);
12989 : } else {
12990 0 : r->attribute_name = NULL;
12991 : }
12992 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
12993 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->originating_change_time));
12994 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
12995 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
12996 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
12997 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_originating_dsa_dn));
12998 0 : if (_ptr_originating_dsa_dn) {
12999 0 : NDR_PULL_ALLOC(ndr, r->originating_dsa_dn);
13000 : } else {
13001 0 : r->originating_dsa_dn = NULL;
13002 : }
13003 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
13004 : }
13005 0 : if (ndr_flags & NDR_BUFFERS) {
13006 0 : if (r->attribute_name) {
13007 0 : _mem_save_attribute_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13008 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attribute_name, 0);
13009 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->attribute_name));
13010 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->attribute_name));
13011 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->attribute_name, &size_attribute_name_1));
13012 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->attribute_name, &length_attribute_name_1));
13013 0 : if (length_attribute_name_1 > size_attribute_name_1) {
13014 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_attribute_name_1, length_attribute_name_1);
13015 : }
13016 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_attribute_name_1, sizeof(uint16_t)));
13017 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->attribute_name, length_attribute_name_1, sizeof(uint16_t), CH_UTF16));
13018 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribute_name_0, 0);
13019 : }
13020 0 : if (r->originating_dsa_dn) {
13021 0 : _mem_save_originating_dsa_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
13022 0 : NDR_PULL_SET_MEM_CTX(ndr, r->originating_dsa_dn, 0);
13023 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->originating_dsa_dn));
13024 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->originating_dsa_dn));
13025 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->originating_dsa_dn, &size_originating_dsa_dn_1));
13026 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->originating_dsa_dn, &length_originating_dsa_dn_1));
13027 0 : if (length_originating_dsa_dn_1 > size_originating_dsa_dn_1) {
13028 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_originating_dsa_dn_1, length_originating_dsa_dn_1);
13029 : }
13030 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_originating_dsa_dn_1, sizeof(uint16_t)));
13031 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->originating_dsa_dn, length_originating_dsa_dn_1, sizeof(uint16_t), CH_UTF16));
13032 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_originating_dsa_dn_0, 0);
13033 : }
13034 : }
13035 0 : return NDR_ERR_SUCCESS;
13036 : }
13037 :
13038 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjMetaData2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaData2 *r)
13039 : {
13040 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjMetaData2");
13041 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13042 0 : ndr->depth++;
13043 0 : ndr_print_ptr(ndr, "attribute_name", r->attribute_name);
13044 0 : ndr->depth++;
13045 0 : if (r->attribute_name) {
13046 0 : ndr_print_string(ndr, "attribute_name", r->attribute_name);
13047 : }
13048 0 : ndr->depth--;
13049 0 : ndr_print_uint32(ndr, "version", r->version);
13050 0 : ndr_print_NTTIME(ndr, "originating_change_time", r->originating_change_time);
13051 0 : ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
13052 0 : ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
13053 0 : ndr_print_hyper(ndr, "local_usn", r->local_usn);
13054 0 : ndr_print_ptr(ndr, "originating_dsa_dn", r->originating_dsa_dn);
13055 0 : ndr->depth++;
13056 0 : if (r->originating_dsa_dn) {
13057 0 : ndr_print_string(ndr, "originating_dsa_dn", r->originating_dsa_dn);
13058 : }
13059 0 : ndr->depth--;
13060 0 : ndr->depth--;
13061 : }
13062 :
13063 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjMetaData2Ctr *r)
13064 : {
13065 0 : uint32_t cntr_array_0;
13066 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13067 0 : if (ndr_flags & NDR_SCALARS) {
13068 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
13069 0 : NDR_CHECK(ndr_push_align(ndr, 8));
13070 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
13071 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
13072 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13073 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
13074 : }
13075 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
13076 : }
13077 0 : if (ndr_flags & NDR_BUFFERS) {
13078 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13079 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
13080 : }
13081 : }
13082 0 : return NDR_ERR_SUCCESS;
13083 : }
13084 :
13085 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjMetaData2Ctr *r)
13086 : {
13087 0 : uint32_t size_array_0 = 0;
13088 0 : uint32_t cntr_array_0;
13089 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
13090 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
13091 0 : if (ndr_flags & NDR_SCALARS) {
13092 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
13093 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
13094 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
13095 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
13096 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
13097 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
13098 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13099 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13100 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
13101 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
13102 : }
13103 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
13104 0 : if (r->array) {
13105 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
13106 : }
13107 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
13108 : }
13109 0 : if (ndr_flags & NDR_BUFFERS) {
13110 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
13111 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13112 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13113 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
13114 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
13115 : }
13116 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
13117 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
13118 : }
13119 : }
13120 0 : return NDR_ERR_SUCCESS;
13121 : }
13122 :
13123 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaData2Ctr *r)
13124 : {
13125 0 : uint32_t cntr_array_0;
13126 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjMetaData2Ctr");
13127 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13128 0 : ndr->depth++;
13129 0 : ndr_print_uint32(ndr, "count", r->count);
13130 0 : ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
13131 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
13132 0 : ndr->depth++;
13133 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13134 0 : ndr_print_drsuapi_DsReplicaObjMetaData2(ndr, "array", &r->array[cntr_array_0]);
13135 : }
13136 0 : ndr->depth--;
13137 0 : ndr->depth--;
13138 : }
13139 :
13140 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaData2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttrValMetaData2 *r)
13141 : {
13142 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13143 0 : if (ndr_flags & NDR_SCALARS) {
13144 0 : NDR_CHECK(ndr_push_align(ndr, 8));
13145 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribute_name));
13146 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
13147 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_DATA_BLOB(0, r->binary, 0)));
13148 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->binary));
13149 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->deleted));
13150 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->created));
13151 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
13152 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->originating_change_time));
13153 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
13154 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
13155 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
13156 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->originating_dsa_dn));
13157 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
13158 : }
13159 0 : if (ndr_flags & NDR_BUFFERS) {
13160 0 : if (r->attribute_name) {
13161 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
13162 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13163 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
13164 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->attribute_name, ndr_charset_length(r->attribute_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13165 : }
13166 0 : if (r->object_dn) {
13167 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
13168 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13169 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
13170 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_dn, ndr_charset_length(r->object_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13171 : }
13172 0 : if (r->binary) {
13173 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->binary));
13174 : }
13175 0 : if (r->originating_dsa_dn) {
13176 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->originating_dsa_dn, CH_UTF16)));
13177 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13178 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->originating_dsa_dn, CH_UTF16)));
13179 0 : 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));
13180 : }
13181 : }
13182 0 : return NDR_ERR_SUCCESS;
13183 : }
13184 :
13185 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaData2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttrValMetaData2 *r)
13186 : {
13187 0 : uint32_t _ptr_attribute_name;
13188 0 : uint32_t size_attribute_name_1 = 0;
13189 0 : uint32_t length_attribute_name_1 = 0;
13190 0 : TALLOC_CTX *_mem_save_attribute_name_0 = NULL;
13191 0 : uint32_t _ptr_object_dn;
13192 0 : uint32_t size_object_dn_1 = 0;
13193 0 : uint32_t length_object_dn_1 = 0;
13194 0 : TALLOC_CTX *_mem_save_object_dn_0 = NULL;
13195 0 : uint32_t _ptr_binary;
13196 0 : TALLOC_CTX *_mem_save_binary_0 = NULL;
13197 0 : uint32_t _ptr_originating_dsa_dn;
13198 0 : uint32_t size_originating_dsa_dn_1 = 0;
13199 0 : uint32_t length_originating_dsa_dn_1 = 0;
13200 0 : TALLOC_CTX *_mem_save_originating_dsa_dn_0 = NULL;
13201 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
13202 0 : if (ndr_flags & NDR_SCALARS) {
13203 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
13204 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribute_name));
13205 0 : if (_ptr_attribute_name) {
13206 0 : NDR_PULL_ALLOC(ndr, r->attribute_name);
13207 : } else {
13208 0 : r->attribute_name = NULL;
13209 : }
13210 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
13211 0 : if (_ptr_object_dn) {
13212 0 : NDR_PULL_ALLOC(ndr, r->object_dn);
13213 : } else {
13214 0 : r->object_dn = NULL;
13215 : }
13216 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_binary));
13217 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary));
13218 0 : if (_ptr_binary) {
13219 0 : NDR_PULL_ALLOC(ndr, r->binary);
13220 : } else {
13221 0 : r->binary = NULL;
13222 : }
13223 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->deleted));
13224 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->created));
13225 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
13226 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->originating_change_time));
13227 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
13228 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
13229 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
13230 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_originating_dsa_dn));
13231 0 : if (_ptr_originating_dsa_dn) {
13232 0 : NDR_PULL_ALLOC(ndr, r->originating_dsa_dn);
13233 : } else {
13234 0 : r->originating_dsa_dn = NULL;
13235 : }
13236 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
13237 : }
13238 0 : if (ndr_flags & NDR_BUFFERS) {
13239 0 : if (r->attribute_name) {
13240 0 : _mem_save_attribute_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13241 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attribute_name, 0);
13242 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->attribute_name));
13243 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->attribute_name));
13244 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->attribute_name, &size_attribute_name_1));
13245 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->attribute_name, &length_attribute_name_1));
13246 0 : if (length_attribute_name_1 > size_attribute_name_1) {
13247 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_attribute_name_1, length_attribute_name_1);
13248 : }
13249 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_attribute_name_1, sizeof(uint16_t)));
13250 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->attribute_name, length_attribute_name_1, sizeof(uint16_t), CH_UTF16));
13251 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribute_name_0, 0);
13252 : }
13253 0 : if (r->object_dn) {
13254 0 : _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
13255 0 : NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
13256 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
13257 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
13258 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
13259 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
13260 0 : if (length_object_dn_1 > size_object_dn_1) {
13261 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_object_dn_1, length_object_dn_1);
13262 : }
13263 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
13264 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
13265 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
13266 : }
13267 0 : if (r->binary) {
13268 0 : _mem_save_binary_0 = NDR_PULL_GET_MEM_CTX(ndr);
13269 0 : NDR_PULL_SET_MEM_CTX(ndr, r->binary, 0);
13270 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->binary));
13271 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_0, 0);
13272 : }
13273 0 : if (r->originating_dsa_dn) {
13274 0 : _mem_save_originating_dsa_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
13275 0 : NDR_PULL_SET_MEM_CTX(ndr, r->originating_dsa_dn, 0);
13276 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->originating_dsa_dn));
13277 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->originating_dsa_dn));
13278 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->originating_dsa_dn, &size_originating_dsa_dn_1));
13279 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->originating_dsa_dn, &length_originating_dsa_dn_1));
13280 0 : if (length_originating_dsa_dn_1 > size_originating_dsa_dn_1) {
13281 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_originating_dsa_dn_1, length_originating_dsa_dn_1);
13282 : }
13283 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_originating_dsa_dn_1, sizeof(uint16_t)));
13284 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->originating_dsa_dn, length_originating_dsa_dn_1, sizeof(uint16_t), CH_UTF16));
13285 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_originating_dsa_dn_0, 0);
13286 : }
13287 : }
13288 0 : return NDR_ERR_SUCCESS;
13289 : }
13290 :
13291 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttrValMetaData2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaData2 *r)
13292 : {
13293 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttrValMetaData2");
13294 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13295 0 : ndr->depth++;
13296 0 : ndr_print_ptr(ndr, "attribute_name", r->attribute_name);
13297 0 : ndr->depth++;
13298 0 : if (r->attribute_name) {
13299 0 : ndr_print_string(ndr, "attribute_name", r->attribute_name);
13300 : }
13301 0 : ndr->depth--;
13302 0 : ndr_print_ptr(ndr, "object_dn", r->object_dn);
13303 0 : ndr->depth++;
13304 0 : if (r->object_dn) {
13305 0 : ndr_print_string(ndr, "object_dn", r->object_dn);
13306 : }
13307 0 : ndr->depth--;
13308 0 : 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);
13309 0 : ndr_print_ptr(ndr, "binary", r->binary);
13310 0 : ndr->depth++;
13311 0 : if (r->binary) {
13312 0 : ndr_print_DATA_BLOB(ndr, "binary", *r->binary);
13313 : }
13314 0 : ndr->depth--;
13315 0 : ndr_print_NTTIME(ndr, "deleted", r->deleted);
13316 0 : ndr_print_NTTIME(ndr, "created", r->created);
13317 0 : ndr_print_uint32(ndr, "version", r->version);
13318 0 : ndr_print_NTTIME(ndr, "originating_change_time", r->originating_change_time);
13319 0 : ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
13320 0 : ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
13321 0 : ndr_print_hyper(ndr, "local_usn", r->local_usn);
13322 0 : ndr_print_ptr(ndr, "originating_dsa_dn", r->originating_dsa_dn);
13323 0 : ndr->depth++;
13324 0 : if (r->originating_dsa_dn) {
13325 0 : ndr_print_string(ndr, "originating_dsa_dn", r->originating_dsa_dn);
13326 : }
13327 0 : ndr->depth--;
13328 0 : ndr->depth--;
13329 : }
13330 :
13331 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttrValMetaData2Ctr *r)
13332 : {
13333 0 : uint32_t cntr_array_0;
13334 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13335 0 : if (ndr_flags & NDR_SCALARS) {
13336 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
13337 0 : NDR_CHECK(ndr_push_align(ndr, 8));
13338 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
13339 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
13340 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13341 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
13342 : }
13343 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
13344 : }
13345 0 : if (ndr_flags & NDR_BUFFERS) {
13346 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13347 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
13348 : }
13349 : }
13350 0 : return NDR_ERR_SUCCESS;
13351 : }
13352 :
13353 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttrValMetaData2Ctr *r)
13354 : {
13355 0 : uint32_t size_array_0 = 0;
13356 0 : uint32_t cntr_array_0;
13357 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
13358 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
13359 0 : if (ndr_flags & NDR_SCALARS) {
13360 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
13361 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
13362 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
13363 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
13364 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
13365 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
13366 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13367 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13368 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
13369 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
13370 : }
13371 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
13372 0 : if (r->array) {
13373 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
13374 : }
13375 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
13376 : }
13377 0 : if (ndr_flags & NDR_BUFFERS) {
13378 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
13379 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13380 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13381 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
13382 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
13383 : }
13384 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
13385 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
13386 : }
13387 : }
13388 0 : return NDR_ERR_SUCCESS;
13389 : }
13390 :
13391 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaData2Ctr *r)
13392 : {
13393 0 : uint32_t cntr_array_0;
13394 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttrValMetaData2Ctr");
13395 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13396 0 : ndr->depth++;
13397 0 : ndr_print_uint32(ndr, "count", r->count);
13398 0 : ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
13399 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
13400 0 : ndr->depth++;
13401 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13402 0 : ndr_print_drsuapi_DsReplicaAttrValMetaData2(ndr, "array", &r->array[cntr_array_0]);
13403 : }
13404 0 : ndr->depth--;
13405 0 : ndr->depth--;
13406 : }
13407 :
13408 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaConnection04(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaConnection04 *r)
13409 : {
13410 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13411 0 : if (ndr_flags & NDR_SCALARS) {
13412 0 : NDR_CHECK(ndr_push_align(ndr, 8));
13413 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->u1));
13414 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
13415 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
13416 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->bind_guid));
13417 0 : NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->bind_time));
13418 : {
13419 0 : libndr_flags _flags_save_ipv4address = ndr->flags;
13420 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
13421 0 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->client_ip_address));
13422 0 : ndr->flags = _flags_save_ipv4address;
13423 : }
13424 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u5));
13425 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
13426 : }
13427 0 : if (ndr_flags & NDR_BUFFERS) {
13428 0 : }
13429 0 : return NDR_ERR_SUCCESS;
13430 : }
13431 :
13432 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaConnection04(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaConnection04 *r)
13433 : {
13434 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
13435 0 : if (ndr_flags & NDR_SCALARS) {
13436 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
13437 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->u1));
13438 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
13439 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
13440 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->bind_guid));
13441 0 : NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->bind_time));
13442 : {
13443 0 : libndr_flags _flags_save_ipv4address = ndr->flags;
13444 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
13445 0 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->client_ip_address));
13446 0 : ndr->flags = _flags_save_ipv4address;
13447 : }
13448 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u5));
13449 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
13450 : }
13451 0 : if (ndr_flags & NDR_BUFFERS) {
13452 0 : }
13453 0 : return NDR_ERR_SUCCESS;
13454 : }
13455 :
13456 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaConnection04(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaConnection04 *r)
13457 : {
13458 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaConnection04");
13459 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13460 0 : ndr->depth++;
13461 0 : ndr_print_hyper(ndr, "u1", r->u1);
13462 0 : ndr_print_uint32(ndr, "u2", r->u2);
13463 0 : ndr_print_uint32(ndr, "u3", r->u3);
13464 0 : ndr_print_GUID(ndr, "bind_guid", &r->bind_guid);
13465 0 : ndr_print_NTTIME_1sec(ndr, "bind_time", r->bind_time);
13466 : {
13467 0 : libndr_flags _flags_save_ipv4address = ndr->flags;
13468 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
13469 0 : ndr_print_ipv4address(ndr, "client_ip_address", r->client_ip_address);
13470 0 : ndr->flags = _flags_save_ipv4address;
13471 : }
13472 0 : ndr_print_uint32(ndr, "u5", r->u5);
13473 0 : ndr->depth--;
13474 : }
13475 :
13476 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaConnection04Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaConnection04Ctr *r)
13477 : {
13478 0 : uint32_t cntr_array_0;
13479 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13480 0 : if (ndr_flags & NDR_SCALARS) {
13481 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
13482 0 : NDR_CHECK(ndr_push_align(ndr, 8));
13483 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
13484 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
13485 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13486 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaConnection04(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
13487 : }
13488 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
13489 : }
13490 0 : if (ndr_flags & NDR_BUFFERS) {
13491 0 : }
13492 0 : return NDR_ERR_SUCCESS;
13493 : }
13494 :
13495 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaConnection04Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaConnection04Ctr *r)
13496 : {
13497 0 : uint32_t size_array_0 = 0;
13498 0 : uint32_t cntr_array_0;
13499 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
13500 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
13501 0 : if (ndr_flags & NDR_SCALARS) {
13502 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
13503 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
13504 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
13505 0 : if (r->count > 10000) {
13506 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
13507 : }
13508 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
13509 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
13510 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
13511 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13512 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13513 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
13514 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaConnection04(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
13515 : }
13516 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
13517 0 : if (r->array) {
13518 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->count));
13519 : }
13520 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
13521 : }
13522 0 : if (ndr_flags & NDR_BUFFERS) {
13523 0 : }
13524 0 : return NDR_ERR_SUCCESS;
13525 : }
13526 :
13527 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaConnection04Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaConnection04Ctr *r)
13528 : {
13529 0 : uint32_t cntr_array_0;
13530 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaConnection04Ctr");
13531 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13532 0 : ndr->depth++;
13533 0 : ndr_print_uint32(ndr, "count", r->count);
13534 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
13535 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
13536 0 : ndr->depth++;
13537 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13538 0 : ndr_print_drsuapi_DsReplicaConnection04(ndr, "array", &r->array[cntr_array_0]);
13539 : }
13540 0 : ndr->depth--;
13541 0 : ndr->depth--;
13542 : }
13543 :
13544 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplica06(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplica06 *r)
13545 : {
13546 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13547 0 : if (ndr_flags & NDR_SCALARS) {
13548 0 : NDR_CHECK(ndr_push_align(ndr, 8));
13549 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->str1));
13550 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u1));
13551 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
13552 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
13553 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u4));
13554 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u5));
13555 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->u6));
13556 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u7));
13557 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
13558 : }
13559 0 : if (ndr_flags & NDR_BUFFERS) {
13560 0 : if (r->str1) {
13561 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->str1, CH_UTF16)));
13562 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13563 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->str1, CH_UTF16)));
13564 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->str1, ndr_charset_length(r->str1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13565 : }
13566 : }
13567 0 : return NDR_ERR_SUCCESS;
13568 : }
13569 :
13570 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplica06(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplica06 *r)
13571 : {
13572 0 : uint32_t _ptr_str1;
13573 0 : uint32_t size_str1_1 = 0;
13574 0 : uint32_t length_str1_1 = 0;
13575 0 : TALLOC_CTX *_mem_save_str1_0 = NULL;
13576 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
13577 0 : if (ndr_flags & NDR_SCALARS) {
13578 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
13579 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_str1));
13580 0 : if (_ptr_str1) {
13581 0 : NDR_PULL_ALLOC(ndr, r->str1);
13582 : } else {
13583 0 : r->str1 = NULL;
13584 : }
13585 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u1));
13586 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
13587 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
13588 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u4));
13589 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u5));
13590 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->u6));
13591 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u7));
13592 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
13593 : }
13594 0 : if (ndr_flags & NDR_BUFFERS) {
13595 0 : if (r->str1) {
13596 0 : _mem_save_str1_0 = NDR_PULL_GET_MEM_CTX(ndr);
13597 0 : NDR_PULL_SET_MEM_CTX(ndr, r->str1, 0);
13598 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->str1));
13599 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->str1));
13600 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->str1, &size_str1_1));
13601 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->str1, &length_str1_1));
13602 0 : if (length_str1_1 > size_str1_1) {
13603 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_str1_1, length_str1_1);
13604 : }
13605 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_str1_1, sizeof(uint16_t)));
13606 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->str1, length_str1_1, sizeof(uint16_t), CH_UTF16));
13607 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_str1_0, 0);
13608 : }
13609 : }
13610 0 : return NDR_ERR_SUCCESS;
13611 : }
13612 :
13613 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplica06(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplica06 *r)
13614 : {
13615 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplica06");
13616 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13617 0 : ndr->depth++;
13618 0 : ndr_print_ptr(ndr, "str1", r->str1);
13619 0 : ndr->depth++;
13620 0 : if (r->str1) {
13621 0 : ndr_print_string(ndr, "str1", r->str1);
13622 : }
13623 0 : ndr->depth--;
13624 0 : ndr_print_uint32(ndr, "u1", r->u1);
13625 0 : ndr_print_uint32(ndr, "u2", r->u2);
13626 0 : ndr_print_uint32(ndr, "u3", r->u3);
13627 0 : ndr_print_uint32(ndr, "u4", r->u4);
13628 0 : ndr_print_uint32(ndr, "u5", r->u5);
13629 0 : ndr_print_hyper(ndr, "u6", r->u6);
13630 0 : ndr_print_uint32(ndr, "u7", r->u7);
13631 0 : ndr->depth--;
13632 : }
13633 :
13634 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplica06Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplica06Ctr *r)
13635 : {
13636 0 : uint32_t cntr_array_0;
13637 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13638 0 : if (ndr_flags & NDR_SCALARS) {
13639 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
13640 0 : NDR_CHECK(ndr_push_align(ndr, 8));
13641 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
13642 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
13643 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13644 0 : NDR_CHECK(ndr_push_drsuapi_DsReplica06(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
13645 : }
13646 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
13647 : }
13648 0 : if (ndr_flags & NDR_BUFFERS) {
13649 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13650 0 : NDR_CHECK(ndr_push_drsuapi_DsReplica06(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
13651 : }
13652 : }
13653 0 : return NDR_ERR_SUCCESS;
13654 : }
13655 :
13656 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplica06Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplica06Ctr *r)
13657 : {
13658 0 : uint32_t size_array_0 = 0;
13659 0 : uint32_t cntr_array_0;
13660 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
13661 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
13662 0 : if (ndr_flags & NDR_SCALARS) {
13663 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
13664 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
13665 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
13666 0 : if (r->count > 256) {
13667 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(256));
13668 : }
13669 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
13670 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
13671 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
13672 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13673 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13674 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
13675 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplica06(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
13676 : }
13677 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
13678 0 : if (r->array) {
13679 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
13680 : }
13681 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
13682 : }
13683 0 : if (ndr_flags & NDR_BUFFERS) {
13684 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
13685 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13686 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13687 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
13688 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplica06(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
13689 : }
13690 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
13691 0 : for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
13692 : }
13693 : }
13694 0 : return NDR_ERR_SUCCESS;
13695 : }
13696 :
13697 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplica06Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplica06Ctr *r)
13698 : {
13699 0 : uint32_t cntr_array_0;
13700 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplica06Ctr");
13701 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13702 0 : ndr->depth++;
13703 0 : ndr_print_uint32(ndr, "count", r->count);
13704 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
13705 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
13706 0 : ndr->depth++;
13707 0 : for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
13708 0 : ndr_print_drsuapi_DsReplica06(ndr, "array", &r->array[cntr_array_0]);
13709 : }
13710 0 : ndr->depth--;
13711 0 : ndr->depth--;
13712 : }
13713 :
13714 60 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaInfo *r)
13715 : {
13716 0 : uint32_t level;
13717 60 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13718 60 : if (ndr_flags & NDR_SCALARS) {
13719 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
13720 60 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
13721 60 : NDR_CHECK(ndr_push_union_align(ndr, 5));
13722 60 : NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, level));
13723 60 : NDR_CHECK(ndr_push_union_align(ndr, 5));
13724 60 : switch (level) {
13725 30 : case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS: {
13726 30 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->neighbours));
13727 30 : break; }
13728 :
13729 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS: {
13730 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->cursors));
13731 0 : break; }
13732 :
13733 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA: {
13734 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->objmetadata));
13735 0 : break; }
13736 :
13737 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES: {
13738 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->connectfailures));
13739 0 : break; }
13740 :
13741 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES: {
13742 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->linkfailures));
13743 0 : break; }
13744 :
13745 0 : case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS: {
13746 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pendingops));
13747 0 : break; }
13748 :
13749 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA: {
13750 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attrvalmetadata));
13751 0 : break; }
13752 :
13753 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS2: {
13754 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->cursors2));
13755 0 : break; }
13756 :
13757 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS3: {
13758 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->cursors3));
13759 0 : break; }
13760 :
13761 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2: {
13762 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->objmetadata2));
13763 0 : break; }
13764 :
13765 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2: {
13766 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attrvalmetadata2));
13767 0 : break; }
13768 :
13769 30 : case DRSUAPI_DS_REPLICA_INFO_REPSTO: {
13770 30 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->repsto));
13771 30 : break; }
13772 :
13773 0 : case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS: {
13774 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->clientctx));
13775 0 : break; }
13776 :
13777 0 : case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1: {
13778 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->udv1));
13779 0 : break; }
13780 :
13781 0 : case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS: {
13782 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvoutgoingcalls));
13783 0 : break; }
13784 :
13785 0 : default:
13786 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
13787 : }
13788 : }
13789 60 : if (ndr_flags & NDR_BUFFERS) {
13790 60 : if (!(ndr_flags & NDR_SCALARS)) {
13791 : /* We didn't get it above, and the token is not needed after this. */
13792 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
13793 : }
13794 60 : switch (level) {
13795 30 : case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
13796 30 : if (r->neighbours) {
13797 30 : NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->neighbours));
13798 : }
13799 30 : break;
13800 :
13801 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS:
13802 0 : if (r->cursors) {
13803 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtr(ndr, NDR_SCALARS, r->cursors));
13804 : }
13805 0 : break;
13806 :
13807 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
13808 0 : if (r->objmetadata) {
13809 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaDataCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->objmetadata));
13810 : }
13811 0 : break;
13812 :
13813 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
13814 0 : if (r->connectfailures) {
13815 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->connectfailures));
13816 : }
13817 0 : break;
13818 :
13819 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
13820 0 : if (r->linkfailures) {
13821 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->linkfailures));
13822 : }
13823 0 : break;
13824 :
13825 0 : case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
13826 0 : if (r->pendingops) {
13827 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaOpCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->pendingops));
13828 : }
13829 0 : break;
13830 :
13831 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
13832 0 : if (r->attrvalmetadata) {
13833 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaDataCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->attrvalmetadata));
13834 : }
13835 0 : break;
13836 :
13837 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
13838 0 : if (r->cursors2) {
13839 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2Ctr(ndr, NDR_SCALARS, r->cursors2));
13840 : }
13841 0 : break;
13842 :
13843 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
13844 0 : if (r->cursors3) {
13845 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->cursors3));
13846 : }
13847 0 : break;
13848 :
13849 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
13850 0 : if (r->objmetadata2) {
13851 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->objmetadata2));
13852 : }
13853 0 : break;
13854 :
13855 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
13856 0 : if (r->attrvalmetadata2) {
13857 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->attrvalmetadata2));
13858 : }
13859 0 : break;
13860 :
13861 30 : case DRSUAPI_DS_REPLICA_INFO_REPSTO:
13862 30 : if (r->repsto) {
13863 30 : NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->repsto));
13864 : }
13865 30 : break;
13866 :
13867 0 : case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
13868 0 : if (r->clientctx) {
13869 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaConnection04Ctr(ndr, NDR_SCALARS, r->clientctx));
13870 : }
13871 0 : break;
13872 :
13873 0 : case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
13874 0 : if (r->udv1) {
13875 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->udv1));
13876 : }
13877 0 : break;
13878 :
13879 0 : case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
13880 0 : if (r->srvoutgoingcalls) {
13881 0 : NDR_CHECK(ndr_push_drsuapi_DsReplica06Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->srvoutgoingcalls));
13882 : }
13883 0 : break;
13884 :
13885 0 : default:
13886 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
13887 : }
13888 : }
13889 60 : return NDR_ERR_SUCCESS;
13890 : }
13891 :
13892 60 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaInfo *r)
13893 : {
13894 0 : uint32_t level;
13895 0 : uint32_t _level;
13896 60 : TALLOC_CTX *_mem_save_neighbours_0 = NULL;
13897 0 : uint32_t _ptr_neighbours;
13898 60 : TALLOC_CTX *_mem_save_cursors_0 = NULL;
13899 0 : uint32_t _ptr_cursors;
13900 60 : TALLOC_CTX *_mem_save_objmetadata_0 = NULL;
13901 0 : uint32_t _ptr_objmetadata;
13902 60 : TALLOC_CTX *_mem_save_connectfailures_0 = NULL;
13903 0 : uint32_t _ptr_connectfailures;
13904 60 : TALLOC_CTX *_mem_save_linkfailures_0 = NULL;
13905 0 : uint32_t _ptr_linkfailures;
13906 60 : TALLOC_CTX *_mem_save_pendingops_0 = NULL;
13907 0 : uint32_t _ptr_pendingops;
13908 60 : TALLOC_CTX *_mem_save_attrvalmetadata_0 = NULL;
13909 0 : uint32_t _ptr_attrvalmetadata;
13910 60 : TALLOC_CTX *_mem_save_cursors2_0 = NULL;
13911 0 : uint32_t _ptr_cursors2;
13912 60 : TALLOC_CTX *_mem_save_cursors3_0 = NULL;
13913 0 : uint32_t _ptr_cursors3;
13914 60 : TALLOC_CTX *_mem_save_objmetadata2_0 = NULL;
13915 0 : uint32_t _ptr_objmetadata2;
13916 60 : TALLOC_CTX *_mem_save_attrvalmetadata2_0 = NULL;
13917 0 : uint32_t _ptr_attrvalmetadata2;
13918 60 : TALLOC_CTX *_mem_save_repsto_0 = NULL;
13919 0 : uint32_t _ptr_repsto;
13920 60 : TALLOC_CTX *_mem_save_clientctx_0 = NULL;
13921 0 : uint32_t _ptr_clientctx;
13922 60 : TALLOC_CTX *_mem_save_udv1_0 = NULL;
13923 0 : uint32_t _ptr_udv1;
13924 60 : TALLOC_CTX *_mem_save_srvoutgoingcalls_0 = NULL;
13925 0 : uint32_t _ptr_srvoutgoingcalls;
13926 60 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
13927 60 : if (ndr_flags & NDR_SCALARS) {
13928 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
13929 60 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
13930 60 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
13931 60 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
13932 60 : if (_level != level) {
13933 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
13934 : }
13935 60 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
13936 60 : switch (level) {
13937 30 : case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS: {
13938 30 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_neighbours));
13939 30 : if (_ptr_neighbours) {
13940 30 : NDR_PULL_ALLOC(ndr, r->neighbours);
13941 : } else {
13942 0 : r->neighbours = NULL;
13943 : }
13944 30 : break; }
13945 :
13946 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS: {
13947 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cursors));
13948 0 : if (_ptr_cursors) {
13949 0 : NDR_PULL_ALLOC(ndr, r->cursors);
13950 : } else {
13951 0 : r->cursors = NULL;
13952 : }
13953 0 : break; }
13954 :
13955 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA: {
13956 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_objmetadata));
13957 0 : if (_ptr_objmetadata) {
13958 0 : NDR_PULL_ALLOC(ndr, r->objmetadata);
13959 : } else {
13960 0 : r->objmetadata = NULL;
13961 : }
13962 0 : break; }
13963 :
13964 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES: {
13965 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_connectfailures));
13966 0 : if (_ptr_connectfailures) {
13967 0 : NDR_PULL_ALLOC(ndr, r->connectfailures);
13968 : } else {
13969 0 : r->connectfailures = NULL;
13970 : }
13971 0 : break; }
13972 :
13973 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES: {
13974 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_linkfailures));
13975 0 : if (_ptr_linkfailures) {
13976 0 : NDR_PULL_ALLOC(ndr, r->linkfailures);
13977 : } else {
13978 0 : r->linkfailures = NULL;
13979 : }
13980 0 : break; }
13981 :
13982 0 : case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS: {
13983 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pendingops));
13984 0 : if (_ptr_pendingops) {
13985 0 : NDR_PULL_ALLOC(ndr, r->pendingops);
13986 : } else {
13987 0 : r->pendingops = NULL;
13988 : }
13989 0 : break; }
13990 :
13991 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA: {
13992 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attrvalmetadata));
13993 0 : if (_ptr_attrvalmetadata) {
13994 0 : NDR_PULL_ALLOC(ndr, r->attrvalmetadata);
13995 : } else {
13996 0 : r->attrvalmetadata = NULL;
13997 : }
13998 0 : break; }
13999 :
14000 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS2: {
14001 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cursors2));
14002 0 : if (_ptr_cursors2) {
14003 0 : NDR_PULL_ALLOC(ndr, r->cursors2);
14004 : } else {
14005 0 : r->cursors2 = NULL;
14006 : }
14007 0 : break; }
14008 :
14009 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS3: {
14010 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cursors3));
14011 0 : if (_ptr_cursors3) {
14012 0 : NDR_PULL_ALLOC(ndr, r->cursors3);
14013 : } else {
14014 0 : r->cursors3 = NULL;
14015 : }
14016 0 : break; }
14017 :
14018 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2: {
14019 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_objmetadata2));
14020 0 : if (_ptr_objmetadata2) {
14021 0 : NDR_PULL_ALLOC(ndr, r->objmetadata2);
14022 : } else {
14023 0 : r->objmetadata2 = NULL;
14024 : }
14025 0 : break; }
14026 :
14027 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2: {
14028 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attrvalmetadata2));
14029 0 : if (_ptr_attrvalmetadata2) {
14030 0 : NDR_PULL_ALLOC(ndr, r->attrvalmetadata2);
14031 : } else {
14032 0 : r->attrvalmetadata2 = NULL;
14033 : }
14034 0 : break; }
14035 :
14036 30 : case DRSUAPI_DS_REPLICA_INFO_REPSTO: {
14037 30 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_repsto));
14038 30 : if (_ptr_repsto) {
14039 30 : NDR_PULL_ALLOC(ndr, r->repsto);
14040 : } else {
14041 0 : r->repsto = NULL;
14042 : }
14043 30 : break; }
14044 :
14045 0 : case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS: {
14046 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_clientctx));
14047 0 : if (_ptr_clientctx) {
14048 0 : NDR_PULL_ALLOC(ndr, r->clientctx);
14049 : } else {
14050 0 : r->clientctx = NULL;
14051 : }
14052 0 : break; }
14053 :
14054 0 : case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1: {
14055 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_udv1));
14056 0 : if (_ptr_udv1) {
14057 0 : NDR_PULL_ALLOC(ndr, r->udv1);
14058 : } else {
14059 0 : r->udv1 = NULL;
14060 : }
14061 0 : break; }
14062 :
14063 0 : case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS: {
14064 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvoutgoingcalls));
14065 0 : if (_ptr_srvoutgoingcalls) {
14066 0 : NDR_PULL_ALLOC(ndr, r->srvoutgoingcalls);
14067 : } else {
14068 0 : r->srvoutgoingcalls = NULL;
14069 : }
14070 0 : break; }
14071 :
14072 0 : default:
14073 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
14074 : }
14075 : }
14076 60 : if (ndr_flags & NDR_BUFFERS) {
14077 60 : if (!(ndr_flags & NDR_SCALARS)) {
14078 : /* We didn't get it above, and the token is not needed after this. */
14079 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
14080 : }
14081 60 : switch (level) {
14082 30 : case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
14083 30 : if (r->neighbours) {
14084 30 : _mem_save_neighbours_0 = NDR_PULL_GET_MEM_CTX(ndr);
14085 30 : NDR_PULL_SET_MEM_CTX(ndr, r->neighbours, 0);
14086 30 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->neighbours));
14087 30 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_neighbours_0, 0);
14088 : }
14089 30 : break;
14090 :
14091 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS:
14092 0 : if (r->cursors) {
14093 0 : _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
14094 0 : NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
14095 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtr(ndr, NDR_SCALARS, r->cursors));
14096 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
14097 : }
14098 0 : break;
14099 :
14100 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
14101 0 : if (r->objmetadata) {
14102 0 : _mem_save_objmetadata_0 = NDR_PULL_GET_MEM_CTX(ndr);
14103 0 : NDR_PULL_SET_MEM_CTX(ndr, r->objmetadata, 0);
14104 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaDataCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->objmetadata));
14105 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objmetadata_0, 0);
14106 : }
14107 0 : break;
14108 :
14109 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
14110 0 : if (r->connectfailures) {
14111 0 : _mem_save_connectfailures_0 = NDR_PULL_GET_MEM_CTX(ndr);
14112 0 : NDR_PULL_SET_MEM_CTX(ndr, r->connectfailures, 0);
14113 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->connectfailures));
14114 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connectfailures_0, 0);
14115 : }
14116 0 : break;
14117 :
14118 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
14119 0 : if (r->linkfailures) {
14120 0 : _mem_save_linkfailures_0 = NDR_PULL_GET_MEM_CTX(ndr);
14121 0 : NDR_PULL_SET_MEM_CTX(ndr, r->linkfailures, 0);
14122 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->linkfailures));
14123 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_linkfailures_0, 0);
14124 : }
14125 0 : break;
14126 :
14127 0 : case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
14128 0 : if (r->pendingops) {
14129 0 : _mem_save_pendingops_0 = NDR_PULL_GET_MEM_CTX(ndr);
14130 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pendingops, 0);
14131 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaOpCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->pendingops));
14132 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pendingops_0, 0);
14133 : }
14134 0 : break;
14135 :
14136 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
14137 0 : if (r->attrvalmetadata) {
14138 0 : _mem_save_attrvalmetadata_0 = NDR_PULL_GET_MEM_CTX(ndr);
14139 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attrvalmetadata, 0);
14140 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaDataCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->attrvalmetadata));
14141 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attrvalmetadata_0, 0);
14142 : }
14143 0 : break;
14144 :
14145 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
14146 0 : if (r->cursors2) {
14147 0 : _mem_save_cursors2_0 = NDR_PULL_GET_MEM_CTX(ndr);
14148 0 : NDR_PULL_SET_MEM_CTX(ndr, r->cursors2, 0);
14149 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2Ctr(ndr, NDR_SCALARS, r->cursors2));
14150 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors2_0, 0);
14151 : }
14152 0 : break;
14153 :
14154 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
14155 0 : if (r->cursors3) {
14156 0 : _mem_save_cursors3_0 = NDR_PULL_GET_MEM_CTX(ndr);
14157 0 : NDR_PULL_SET_MEM_CTX(ndr, r->cursors3, 0);
14158 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->cursors3));
14159 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors3_0, 0);
14160 : }
14161 0 : break;
14162 :
14163 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
14164 0 : if (r->objmetadata2) {
14165 0 : _mem_save_objmetadata2_0 = NDR_PULL_GET_MEM_CTX(ndr);
14166 0 : NDR_PULL_SET_MEM_CTX(ndr, r->objmetadata2, 0);
14167 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->objmetadata2));
14168 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objmetadata2_0, 0);
14169 : }
14170 0 : break;
14171 :
14172 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
14173 0 : if (r->attrvalmetadata2) {
14174 0 : _mem_save_attrvalmetadata2_0 = NDR_PULL_GET_MEM_CTX(ndr);
14175 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attrvalmetadata2, 0);
14176 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->attrvalmetadata2));
14177 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attrvalmetadata2_0, 0);
14178 : }
14179 0 : break;
14180 :
14181 30 : case DRSUAPI_DS_REPLICA_INFO_REPSTO:
14182 30 : if (r->repsto) {
14183 30 : _mem_save_repsto_0 = NDR_PULL_GET_MEM_CTX(ndr);
14184 30 : NDR_PULL_SET_MEM_CTX(ndr, r->repsto, 0);
14185 30 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->repsto));
14186 30 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_repsto_0, 0);
14187 : }
14188 30 : break;
14189 :
14190 0 : case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
14191 0 : if (r->clientctx) {
14192 0 : _mem_save_clientctx_0 = NDR_PULL_GET_MEM_CTX(ndr);
14193 0 : NDR_PULL_SET_MEM_CTX(ndr, r->clientctx, 0);
14194 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaConnection04Ctr(ndr, NDR_SCALARS, r->clientctx));
14195 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_clientctx_0, 0);
14196 : }
14197 0 : break;
14198 :
14199 0 : case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
14200 0 : if (r->udv1) {
14201 0 : _mem_save_udv1_0 = NDR_PULL_GET_MEM_CTX(ndr);
14202 0 : NDR_PULL_SET_MEM_CTX(ndr, r->udv1, 0);
14203 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->udv1));
14204 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_udv1_0, 0);
14205 : }
14206 0 : break;
14207 :
14208 0 : case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
14209 0 : if (r->srvoutgoingcalls) {
14210 0 : _mem_save_srvoutgoingcalls_0 = NDR_PULL_GET_MEM_CTX(ndr);
14211 0 : NDR_PULL_SET_MEM_CTX(ndr, r->srvoutgoingcalls, 0);
14212 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplica06Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->srvoutgoingcalls));
14213 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvoutgoingcalls_0, 0);
14214 : }
14215 0 : break;
14216 :
14217 0 : default:
14218 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
14219 : }
14220 : }
14221 60 : return NDR_ERR_SUCCESS;
14222 : }
14223 :
14224 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaInfo *r)
14225 : {
14226 0 : uint32_t level;
14227 0 : level = ndr_print_steal_switch_value(ndr, r);
14228 0 : ndr_print_union(ndr, name, level, "drsuapi_DsReplicaInfo");
14229 0 : switch (level) {
14230 0 : case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
14231 0 : ndr_print_ptr(ndr, "neighbours", r->neighbours);
14232 0 : ndr->depth++;
14233 0 : if (r->neighbours) {
14234 0 : ndr_print_drsuapi_DsReplicaNeighbourCtr(ndr, "neighbours", r->neighbours);
14235 : }
14236 0 : ndr->depth--;
14237 0 : break;
14238 :
14239 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS:
14240 0 : ndr_print_ptr(ndr, "cursors", r->cursors);
14241 0 : ndr->depth++;
14242 0 : if (r->cursors) {
14243 0 : ndr_print_drsuapi_DsReplicaCursorCtr(ndr, "cursors", r->cursors);
14244 : }
14245 0 : ndr->depth--;
14246 0 : break;
14247 :
14248 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
14249 0 : ndr_print_ptr(ndr, "objmetadata", r->objmetadata);
14250 0 : ndr->depth++;
14251 0 : if (r->objmetadata) {
14252 0 : ndr_print_drsuapi_DsReplicaObjMetaDataCtr(ndr, "objmetadata", r->objmetadata);
14253 : }
14254 0 : ndr->depth--;
14255 0 : break;
14256 :
14257 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
14258 0 : ndr_print_ptr(ndr, "connectfailures", r->connectfailures);
14259 0 : ndr->depth++;
14260 0 : if (r->connectfailures) {
14261 0 : ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, "connectfailures", r->connectfailures);
14262 : }
14263 0 : ndr->depth--;
14264 0 : break;
14265 :
14266 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
14267 0 : ndr_print_ptr(ndr, "linkfailures", r->linkfailures);
14268 0 : ndr->depth++;
14269 0 : if (r->linkfailures) {
14270 0 : ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, "linkfailures", r->linkfailures);
14271 : }
14272 0 : ndr->depth--;
14273 0 : break;
14274 :
14275 0 : case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
14276 0 : ndr_print_ptr(ndr, "pendingops", r->pendingops);
14277 0 : ndr->depth++;
14278 0 : if (r->pendingops) {
14279 0 : ndr_print_drsuapi_DsReplicaOpCtr(ndr, "pendingops", r->pendingops);
14280 : }
14281 0 : ndr->depth--;
14282 0 : break;
14283 :
14284 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
14285 0 : ndr_print_ptr(ndr, "attrvalmetadata", r->attrvalmetadata);
14286 0 : ndr->depth++;
14287 0 : if (r->attrvalmetadata) {
14288 0 : ndr_print_drsuapi_DsReplicaAttrValMetaDataCtr(ndr, "attrvalmetadata", r->attrvalmetadata);
14289 : }
14290 0 : ndr->depth--;
14291 0 : break;
14292 :
14293 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
14294 0 : ndr_print_ptr(ndr, "cursors2", r->cursors2);
14295 0 : ndr->depth++;
14296 0 : if (r->cursors2) {
14297 0 : ndr_print_drsuapi_DsReplicaCursor2Ctr(ndr, "cursors2", r->cursors2);
14298 : }
14299 0 : ndr->depth--;
14300 0 : break;
14301 :
14302 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
14303 0 : ndr_print_ptr(ndr, "cursors3", r->cursors3);
14304 0 : ndr->depth++;
14305 0 : if (r->cursors3) {
14306 0 : ndr_print_drsuapi_DsReplicaCursor3Ctr(ndr, "cursors3", r->cursors3);
14307 : }
14308 0 : ndr->depth--;
14309 0 : break;
14310 :
14311 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
14312 0 : ndr_print_ptr(ndr, "objmetadata2", r->objmetadata2);
14313 0 : ndr->depth++;
14314 0 : if (r->objmetadata2) {
14315 0 : ndr_print_drsuapi_DsReplicaObjMetaData2Ctr(ndr, "objmetadata2", r->objmetadata2);
14316 : }
14317 0 : ndr->depth--;
14318 0 : break;
14319 :
14320 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
14321 0 : ndr_print_ptr(ndr, "attrvalmetadata2", r->attrvalmetadata2);
14322 0 : ndr->depth++;
14323 0 : if (r->attrvalmetadata2) {
14324 0 : ndr_print_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr, "attrvalmetadata2", r->attrvalmetadata2);
14325 : }
14326 0 : ndr->depth--;
14327 0 : break;
14328 :
14329 0 : case DRSUAPI_DS_REPLICA_INFO_REPSTO:
14330 0 : ndr_print_ptr(ndr, "repsto", r->repsto);
14331 0 : ndr->depth++;
14332 0 : if (r->repsto) {
14333 0 : ndr_print_drsuapi_DsReplicaNeighbourCtr(ndr, "repsto", r->repsto);
14334 : }
14335 0 : ndr->depth--;
14336 0 : break;
14337 :
14338 0 : case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
14339 0 : ndr_print_ptr(ndr, "clientctx", r->clientctx);
14340 0 : ndr->depth++;
14341 0 : if (r->clientctx) {
14342 0 : ndr_print_drsuapi_DsReplicaConnection04Ctr(ndr, "clientctx", r->clientctx);
14343 : }
14344 0 : ndr->depth--;
14345 0 : break;
14346 :
14347 0 : case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
14348 0 : ndr_print_ptr(ndr, "udv1", r->udv1);
14349 0 : ndr->depth++;
14350 0 : if (r->udv1) {
14351 0 : ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "udv1", r->udv1);
14352 : }
14353 0 : ndr->depth--;
14354 0 : break;
14355 :
14356 0 : case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
14357 0 : ndr_print_ptr(ndr, "srvoutgoingcalls", r->srvoutgoingcalls);
14358 0 : ndr->depth++;
14359 0 : if (r->srvoutgoingcalls) {
14360 0 : ndr_print_drsuapi_DsReplica06Ctr(ndr, "srvoutgoingcalls", r->srvoutgoingcalls);
14361 : }
14362 0 : ndr->depth--;
14363 0 : break;
14364 :
14365 0 : default:
14366 0 : ndr_print_bad_level(ndr, name, level);
14367 : }
14368 0 : }
14369 :
14370 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetMemberships2Ctr *r)
14371 : {
14372 0 : uint32_t level;
14373 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14374 0 : if (ndr_flags & NDR_SCALARS) {
14375 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
14376 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
14377 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
14378 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
14379 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
14380 0 : switch (level) {
14381 0 : case 1: {
14382 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1));
14383 0 : break; }
14384 :
14385 0 : default:
14386 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
14387 : }
14388 : }
14389 0 : if (ndr_flags & NDR_BUFFERS) {
14390 0 : if (!(ndr_flags & NDR_SCALARS)) {
14391 : /* We didn't get it above, and the token is not needed after this. */
14392 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
14393 : }
14394 0 : switch (level) {
14395 0 : case 1:
14396 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_BUFFERS, &r->ctr1));
14397 0 : break;
14398 :
14399 0 : default:
14400 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
14401 : }
14402 : }
14403 0 : return NDR_ERR_SUCCESS;
14404 : }
14405 :
14406 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetMemberships2Ctr *r)
14407 : {
14408 0 : uint32_t level;
14409 0 : uint32_t _level;
14410 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
14411 0 : if (ndr_flags & NDR_SCALARS) {
14412 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
14413 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
14414 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
14415 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
14416 0 : if (_level != level) {
14417 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
14418 : }
14419 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
14420 0 : switch (level) {
14421 0 : case 1: {
14422 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1));
14423 0 : break; }
14424 :
14425 0 : default:
14426 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
14427 : }
14428 : }
14429 0 : if (ndr_flags & NDR_BUFFERS) {
14430 0 : if (!(ndr_flags & NDR_SCALARS)) {
14431 : /* We didn't get it above, and the token is not needed after this. */
14432 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
14433 : }
14434 0 : switch (level) {
14435 0 : case 1:
14436 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_BUFFERS, &r->ctr1));
14437 0 : break;
14438 :
14439 0 : default:
14440 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
14441 : }
14442 : }
14443 0 : return NDR_ERR_SUCCESS;
14444 : }
14445 :
14446 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMemberships2Ctr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMemberships2Ctr *r)
14447 : {
14448 0 : uint32_t level;
14449 0 : level = ndr_print_steal_switch_value(ndr, r);
14450 0 : ndr_print_union(ndr, name, level, "drsuapi_DsGetMemberships2Ctr");
14451 0 : switch (level) {
14452 0 : case 1:
14453 0 : ndr_print_drsuapi_DsGetMembershipsCtr1(ndr, "ctr1", &r->ctr1);
14454 0 : break;
14455 :
14456 0 : default:
14457 0 : ndr_print_bad_level(ndr, name, level);
14458 : }
14459 0 : }
14460 :
14461 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2Request1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetMemberships2Request1 *r)
14462 : {
14463 0 : uint32_t cntr_req_array_1;
14464 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14465 0 : if (ndr_flags & NDR_SCALARS) {
14466 0 : NDR_CHECK(ndr_push_align(ndr, 5));
14467 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_req));
14468 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->req_array));
14469 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
14470 : }
14471 0 : if (ndr_flags & NDR_BUFFERS) {
14472 0 : if (r->req_array) {
14473 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_req));
14474 0 : for (cntr_req_array_1 = 0; cntr_req_array_1 < (r->num_req); cntr_req_array_1++) {
14475 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->req_array[cntr_req_array_1]));
14476 : }
14477 0 : for (cntr_req_array_1 = 0; cntr_req_array_1 < (r->num_req); cntr_req_array_1++) {
14478 0 : if (r->req_array[cntr_req_array_1]) {
14479 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS|NDR_BUFFERS, r->req_array[cntr_req_array_1]));
14480 : }
14481 : }
14482 : }
14483 : }
14484 0 : return NDR_ERR_SUCCESS;
14485 : }
14486 :
14487 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2Request1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetMemberships2Request1 *r)
14488 : {
14489 0 : uint32_t _ptr_req_array;
14490 0 : uint32_t size_req_array_1 = 0;
14491 0 : uint32_t cntr_req_array_1;
14492 0 : TALLOC_CTX *_mem_save_req_array_0 = NULL;
14493 0 : TALLOC_CTX *_mem_save_req_array_1 = NULL;
14494 0 : TALLOC_CTX *_mem_save_req_array_2 = NULL;
14495 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
14496 0 : if (ndr_flags & NDR_SCALARS) {
14497 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
14498 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_req));
14499 0 : if (r->num_req < 1 || r->num_req > 10000) {
14500 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_req), (uint32_t)(1), (uint32_t)(10000));
14501 : }
14502 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_req_array));
14503 0 : if (_ptr_req_array) {
14504 0 : NDR_PULL_ALLOC(ndr, r->req_array);
14505 : } else {
14506 0 : r->req_array = NULL;
14507 : }
14508 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
14509 : }
14510 0 : if (ndr_flags & NDR_BUFFERS) {
14511 0 : if (r->req_array) {
14512 0 : _mem_save_req_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
14513 0 : NDR_PULL_SET_MEM_CTX(ndr, r->req_array, 0);
14514 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->req_array));
14515 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->req_array, &size_req_array_1));
14516 0 : NDR_PULL_ALLOC_N(ndr, r->req_array, size_req_array_1);
14517 0 : _mem_save_req_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
14518 0 : NDR_PULL_SET_MEM_CTX(ndr, r->req_array, 0);
14519 0 : for (cntr_req_array_1 = 0; cntr_req_array_1 < (size_req_array_1); cntr_req_array_1++) {
14520 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_req_array));
14521 0 : if (_ptr_req_array) {
14522 0 : NDR_PULL_ALLOC(ndr, r->req_array[cntr_req_array_1]);
14523 : } else {
14524 0 : r->req_array[cntr_req_array_1] = NULL;
14525 : }
14526 : }
14527 0 : for (cntr_req_array_1 = 0; cntr_req_array_1 < (size_req_array_1); cntr_req_array_1++) {
14528 0 : if (r->req_array[cntr_req_array_1]) {
14529 0 : _mem_save_req_array_2 = NDR_PULL_GET_MEM_CTX(ndr);
14530 0 : NDR_PULL_SET_MEM_CTX(ndr, r->req_array[cntr_req_array_1], 0);
14531 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS|NDR_BUFFERS, r->req_array[cntr_req_array_1]));
14532 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_array_2, 0);
14533 : }
14534 : }
14535 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_array_1, 0);
14536 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_array_0, 0);
14537 : }
14538 0 : if (r->req_array) {
14539 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->req_array, r->num_req));
14540 : }
14541 0 : for (cntr_req_array_1 = 0; cntr_req_array_1 < (size_req_array_1); cntr_req_array_1++) {
14542 0 : }
14543 : }
14544 0 : return NDR_ERR_SUCCESS;
14545 : }
14546 :
14547 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMemberships2Request1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMemberships2Request1 *r)
14548 : {
14549 0 : uint32_t cntr_req_array_1;
14550 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetMemberships2Request1");
14551 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14552 0 : ndr->depth++;
14553 0 : ndr_print_uint32(ndr, "num_req", r->num_req);
14554 0 : ndr_print_ptr(ndr, "req_array", r->req_array);
14555 0 : ndr->depth++;
14556 0 : if (r->req_array) {
14557 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "req_array", (uint32_t)(r->num_req));
14558 0 : ndr->depth++;
14559 0 : for (cntr_req_array_1 = 0; cntr_req_array_1 < (r->num_req); cntr_req_array_1++) {
14560 0 : ndr_print_ptr(ndr, "req_array", r->req_array[cntr_req_array_1]);
14561 0 : ndr->depth++;
14562 0 : if (r->req_array[cntr_req_array_1]) {
14563 0 : ndr_print_drsuapi_DsGetMembershipsRequest1(ndr, "req_array", r->req_array[cntr_req_array_1]);
14564 : }
14565 0 : ndr->depth--;
14566 : }
14567 0 : ndr->depth--;
14568 : }
14569 0 : ndr->depth--;
14570 0 : ndr->depth--;
14571 : }
14572 :
14573 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2Request(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetMemberships2Request *r)
14574 : {
14575 0 : uint32_t level;
14576 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14577 0 : if (ndr_flags & NDR_SCALARS) {
14578 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
14579 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
14580 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
14581 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
14582 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
14583 0 : switch (level) {
14584 0 : case 1: {
14585 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request1(ndr, NDR_SCALARS, &r->req1));
14586 0 : break; }
14587 :
14588 0 : default:
14589 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
14590 : }
14591 : }
14592 0 : if (ndr_flags & NDR_BUFFERS) {
14593 0 : if (!(ndr_flags & NDR_SCALARS)) {
14594 : /* We didn't get it above, and the token is not needed after this. */
14595 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
14596 : }
14597 0 : switch (level) {
14598 0 : case 1:
14599 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request1(ndr, NDR_BUFFERS, &r->req1));
14600 0 : break;
14601 :
14602 0 : default:
14603 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
14604 : }
14605 : }
14606 0 : return NDR_ERR_SUCCESS;
14607 : }
14608 :
14609 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2Request(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetMemberships2Request *r)
14610 : {
14611 0 : uint32_t level;
14612 0 : uint32_t _level;
14613 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
14614 0 : if (ndr_flags & NDR_SCALARS) {
14615 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
14616 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
14617 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
14618 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
14619 0 : if (_level != level) {
14620 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
14621 : }
14622 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
14623 0 : switch (level) {
14624 0 : case 1: {
14625 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request1(ndr, NDR_SCALARS, &r->req1));
14626 0 : break; }
14627 :
14628 0 : default:
14629 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
14630 : }
14631 : }
14632 0 : if (ndr_flags & NDR_BUFFERS) {
14633 0 : if (!(ndr_flags & NDR_SCALARS)) {
14634 : /* We didn't get it above, and the token is not needed after this. */
14635 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
14636 : }
14637 0 : switch (level) {
14638 0 : case 1:
14639 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request1(ndr, NDR_BUFFERS, &r->req1));
14640 0 : break;
14641 :
14642 0 : default:
14643 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
14644 : }
14645 : }
14646 0 : return NDR_ERR_SUCCESS;
14647 : }
14648 :
14649 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMemberships2Request(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMemberships2Request *r)
14650 : {
14651 0 : uint32_t level;
14652 0 : level = ndr_print_steal_switch_value(ndr, r);
14653 0 : ndr_print_union(ndr, name, level, "drsuapi_DsGetMemberships2Request");
14654 0 : switch (level) {
14655 0 : case 1:
14656 0 : ndr_print_drsuapi_DsGetMemberships2Request1(ndr, "req1", &r->req1);
14657 0 : break;
14658 :
14659 0 : default:
14660 0 : ndr_print_bad_level(ndr, name, level);
14661 : }
14662 0 : }
14663 :
14664 0 : static enum ndr_err_code ndr_push_drsuapi_DsSiteCostInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsSiteCostInfo *r)
14665 : {
14666 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14667 0 : if (ndr_flags & NDR_SCALARS) {
14668 0 : NDR_CHECK(ndr_push_align(ndr, 4));
14669 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->error_code));
14670 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->site_cost));
14671 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
14672 : }
14673 0 : if (ndr_flags & NDR_BUFFERS) {
14674 0 : }
14675 0 : return NDR_ERR_SUCCESS;
14676 : }
14677 :
14678 0 : static enum ndr_err_code ndr_pull_drsuapi_DsSiteCostInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsSiteCostInfo *r)
14679 : {
14680 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
14681 0 : if (ndr_flags & NDR_SCALARS) {
14682 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
14683 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->error_code));
14684 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->site_cost));
14685 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
14686 : }
14687 0 : if (ndr_flags & NDR_BUFFERS) {
14688 0 : }
14689 0 : return NDR_ERR_SUCCESS;
14690 : }
14691 :
14692 0 : _PUBLIC_ void ndr_print_drsuapi_DsSiteCostInfo(struct ndr_print *ndr, const char *name, const struct drsuapi_DsSiteCostInfo *r)
14693 : {
14694 0 : ndr_print_struct(ndr, name, "drsuapi_DsSiteCostInfo");
14695 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14696 0 : ndr->depth++;
14697 0 : ndr_print_WERROR(ndr, "error_code", r->error_code);
14698 0 : ndr_print_uint32(ndr, "site_cost", r->site_cost);
14699 0 : ndr->depth--;
14700 : }
14701 :
14702 0 : static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_QuerySitesByCostCtr1 *r)
14703 : {
14704 0 : uint32_t cntr_info_1;
14705 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14706 0 : if (ndr_flags & NDR_SCALARS) {
14707 0 : NDR_CHECK(ndr_push_align(ndr, 5));
14708 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_info));
14709 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
14710 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14711 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
14712 : }
14713 0 : if (ndr_flags & NDR_BUFFERS) {
14714 0 : if (r->info) {
14715 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_info));
14716 0 : for (cntr_info_1 = 0; cntr_info_1 < (r->num_info); cntr_info_1++) {
14717 0 : NDR_CHECK(ndr_push_drsuapi_DsSiteCostInfo(ndr, NDR_SCALARS, &r->info[cntr_info_1]));
14718 : }
14719 : }
14720 : }
14721 0 : return NDR_ERR_SUCCESS;
14722 : }
14723 :
14724 0 : static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_QuerySitesByCostCtr1 *r)
14725 : {
14726 0 : uint32_t _ptr_info;
14727 0 : uint32_t size_info_1 = 0;
14728 0 : uint32_t cntr_info_1;
14729 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
14730 0 : TALLOC_CTX *_mem_save_info_1 = NULL;
14731 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
14732 0 : if (ndr_flags & NDR_SCALARS) {
14733 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
14734 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_info));
14735 0 : if (r->num_info > 10000) {
14736 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_info), (uint32_t)(0), (uint32_t)(10000));
14737 : }
14738 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
14739 0 : if (_ptr_info) {
14740 0 : NDR_PULL_ALLOC(ndr, r->info);
14741 : } else {
14742 0 : r->info = NULL;
14743 : }
14744 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags_reserved));
14745 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
14746 : }
14747 0 : if (ndr_flags & NDR_BUFFERS) {
14748 0 : if (r->info) {
14749 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
14750 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
14751 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->info));
14752 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->info, &size_info_1));
14753 0 : NDR_PULL_ALLOC_N(ndr, r->info, size_info_1);
14754 0 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
14755 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
14756 0 : for (cntr_info_1 = 0; cntr_info_1 < (size_info_1); cntr_info_1++) {
14757 0 : NDR_CHECK(ndr_pull_drsuapi_DsSiteCostInfo(ndr, NDR_SCALARS, &r->info[cntr_info_1]));
14758 : }
14759 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
14760 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
14761 : }
14762 0 : if (r->info) {
14763 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->info, r->num_info));
14764 : }
14765 : }
14766 0 : return NDR_ERR_SUCCESS;
14767 : }
14768 :
14769 0 : _PUBLIC_ void ndr_print_drsuapi_QuerySitesByCostCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_QuerySitesByCostCtr1 *r)
14770 : {
14771 0 : uint32_t cntr_info_1;
14772 0 : ndr_print_struct(ndr, name, "drsuapi_QuerySitesByCostCtr1");
14773 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14774 0 : ndr->depth++;
14775 0 : ndr_print_uint32(ndr, "num_info", r->num_info);
14776 0 : ndr_print_ptr(ndr, "info", r->info);
14777 0 : ndr->depth++;
14778 0 : if (r->info) {
14779 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(r->num_info));
14780 0 : ndr->depth++;
14781 0 : for (cntr_info_1 = 0; cntr_info_1 < (r->num_info); cntr_info_1++) {
14782 0 : ndr_print_drsuapi_DsSiteCostInfo(ndr, "info", &r->info[cntr_info_1]);
14783 : }
14784 0 : ndr->depth--;
14785 : }
14786 0 : ndr->depth--;
14787 0 : ndr_print_uint32(ndr, "flags_reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->flags_reserved);
14788 0 : ndr->depth--;
14789 : }
14790 :
14791 0 : static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_QuerySitesByCostCtr *r)
14792 : {
14793 0 : uint32_t level;
14794 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14795 0 : if (ndr_flags & NDR_SCALARS) {
14796 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
14797 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
14798 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
14799 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
14800 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
14801 0 : switch (level) {
14802 0 : case 1: {
14803 0 : NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr1(ndr, NDR_SCALARS, &r->ctr1));
14804 0 : break; }
14805 :
14806 0 : default:
14807 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
14808 : }
14809 : }
14810 0 : if (ndr_flags & NDR_BUFFERS) {
14811 0 : if (!(ndr_flags & NDR_SCALARS)) {
14812 : /* We didn't get it above, and the token is not needed after this. */
14813 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
14814 : }
14815 0 : switch (level) {
14816 0 : case 1:
14817 0 : NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr1(ndr, NDR_BUFFERS, &r->ctr1));
14818 0 : break;
14819 :
14820 0 : default:
14821 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
14822 : }
14823 : }
14824 0 : return NDR_ERR_SUCCESS;
14825 : }
14826 :
14827 0 : static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_QuerySitesByCostCtr *r)
14828 : {
14829 0 : uint32_t level;
14830 0 : uint32_t _level;
14831 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
14832 0 : if (ndr_flags & NDR_SCALARS) {
14833 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
14834 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
14835 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
14836 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
14837 0 : if (_level != level) {
14838 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
14839 : }
14840 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
14841 0 : switch (level) {
14842 0 : case 1: {
14843 0 : NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr1(ndr, NDR_SCALARS, &r->ctr1));
14844 0 : break; }
14845 :
14846 0 : default:
14847 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
14848 : }
14849 : }
14850 0 : if (ndr_flags & NDR_BUFFERS) {
14851 0 : if (!(ndr_flags & NDR_SCALARS)) {
14852 : /* We didn't get it above, and the token is not needed after this. */
14853 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
14854 : }
14855 0 : switch (level) {
14856 0 : case 1:
14857 0 : NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr1(ndr, NDR_BUFFERS, &r->ctr1));
14858 0 : break;
14859 :
14860 0 : default:
14861 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
14862 : }
14863 : }
14864 0 : return NDR_ERR_SUCCESS;
14865 : }
14866 :
14867 0 : _PUBLIC_ void ndr_print_drsuapi_QuerySitesByCostCtr(struct ndr_print *ndr, const char *name, const union drsuapi_QuerySitesByCostCtr *r)
14868 : {
14869 0 : uint32_t level;
14870 0 : level = ndr_print_steal_switch_value(ndr, r);
14871 0 : ndr_print_union(ndr, name, level, "drsuapi_QuerySitesByCostCtr");
14872 0 : switch (level) {
14873 0 : case 1:
14874 0 : ndr_print_drsuapi_QuerySitesByCostCtr1(ndr, "ctr1", &r->ctr1);
14875 0 : break;
14876 :
14877 0 : default:
14878 0 : ndr_print_bad_level(ndr, name, level);
14879 : }
14880 0 : }
14881 :
14882 0 : static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_QuerySitesByCostRequest1 *r)
14883 : {
14884 0 : uint32_t cntr_site_to_1;
14885 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14886 0 : if (ndr_flags & NDR_SCALARS) {
14887 0 : NDR_CHECK(ndr_push_align(ndr, 5));
14888 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_from));
14889 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_req));
14890 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_to));
14891 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
14892 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
14893 : }
14894 0 : if (ndr_flags & NDR_BUFFERS) {
14895 0 : if (r->site_from) {
14896 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_from, CH_UTF16)));
14897 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14898 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_from, CH_UTF16)));
14899 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_from, ndr_charset_length(r->site_from, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14900 : }
14901 0 : if (r->site_to) {
14902 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_req));
14903 0 : for (cntr_site_to_1 = 0; cntr_site_to_1 < (r->num_req); cntr_site_to_1++) {
14904 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_to[cntr_site_to_1]));
14905 : }
14906 0 : for (cntr_site_to_1 = 0; cntr_site_to_1 < (r->num_req); cntr_site_to_1++) {
14907 0 : if (r->site_to[cntr_site_to_1]) {
14908 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_to[cntr_site_to_1], CH_UTF16)));
14909 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14910 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_to[cntr_site_to_1], CH_UTF16)));
14911 0 : 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));
14912 : }
14913 : }
14914 : }
14915 : }
14916 0 : return NDR_ERR_SUCCESS;
14917 : }
14918 :
14919 0 : static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_QuerySitesByCostRequest1 *r)
14920 : {
14921 0 : uint32_t _ptr_site_from;
14922 0 : uint32_t size_site_from_1 = 0;
14923 0 : uint32_t length_site_from_1 = 0;
14924 0 : TALLOC_CTX *_mem_save_site_from_0 = NULL;
14925 0 : uint32_t _ptr_site_to;
14926 0 : uint32_t size_site_to_1 = 0;
14927 0 : uint32_t cntr_site_to_1;
14928 0 : uint32_t size_site_to_3 = 0;
14929 0 : uint32_t length_site_to_3 = 0;
14930 0 : TALLOC_CTX *_mem_save_site_to_0 = NULL;
14931 0 : TALLOC_CTX *_mem_save_site_to_1 = NULL;
14932 0 : TALLOC_CTX *_mem_save_site_to_2 = NULL;
14933 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
14934 0 : if (ndr_flags & NDR_SCALARS) {
14935 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
14936 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_from));
14937 0 : if (_ptr_site_from) {
14938 0 : NDR_PULL_ALLOC(ndr, r->site_from);
14939 : } else {
14940 0 : r->site_from = NULL;
14941 : }
14942 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_req));
14943 0 : if (r->num_req < 1 || r->num_req > 10000) {
14944 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_req), (uint32_t)(1), (uint32_t)(10000));
14945 : }
14946 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_to));
14947 0 : if (_ptr_site_to) {
14948 0 : NDR_PULL_ALLOC(ndr, r->site_to);
14949 : } else {
14950 0 : r->site_to = NULL;
14951 : }
14952 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
14953 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
14954 : }
14955 0 : if (ndr_flags & NDR_BUFFERS) {
14956 0 : if (r->site_from) {
14957 0 : _mem_save_site_from_0 = NDR_PULL_GET_MEM_CTX(ndr);
14958 0 : NDR_PULL_SET_MEM_CTX(ndr, r->site_from, 0);
14959 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->site_from));
14960 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->site_from));
14961 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_from, &size_site_from_1));
14962 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_from, &length_site_from_1));
14963 0 : if (length_site_from_1 > size_site_from_1) {
14964 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_from_1, length_site_from_1);
14965 : }
14966 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_from_1, sizeof(uint16_t)));
14967 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_from, length_site_from_1, sizeof(uint16_t), CH_UTF16));
14968 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_from_0, 0);
14969 : }
14970 0 : if (r->site_to) {
14971 0 : _mem_save_site_to_0 = NDR_PULL_GET_MEM_CTX(ndr);
14972 0 : NDR_PULL_SET_MEM_CTX(ndr, r->site_to, 0);
14973 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->site_to));
14974 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->site_to, &size_site_to_1));
14975 0 : NDR_PULL_ALLOC_N(ndr, r->site_to, size_site_to_1);
14976 0 : _mem_save_site_to_1 = NDR_PULL_GET_MEM_CTX(ndr);
14977 0 : NDR_PULL_SET_MEM_CTX(ndr, r->site_to, 0);
14978 0 : for (cntr_site_to_1 = 0; cntr_site_to_1 < (size_site_to_1); cntr_site_to_1++) {
14979 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_to));
14980 0 : if (_ptr_site_to) {
14981 0 : NDR_PULL_ALLOC(ndr, r->site_to[cntr_site_to_1]);
14982 : } else {
14983 0 : r->site_to[cntr_site_to_1] = NULL;
14984 : }
14985 : }
14986 0 : for (cntr_site_to_1 = 0; cntr_site_to_1 < (size_site_to_1); cntr_site_to_1++) {
14987 0 : if (r->site_to[cntr_site_to_1]) {
14988 0 : _mem_save_site_to_2 = NDR_PULL_GET_MEM_CTX(ndr);
14989 0 : NDR_PULL_SET_MEM_CTX(ndr, r->site_to[cntr_site_to_1], 0);
14990 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->site_to[cntr_site_to_1]));
14991 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->site_to[cntr_site_to_1]));
14992 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_to[cntr_site_to_1], &size_site_to_3));
14993 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_to[cntr_site_to_1], &length_site_to_3));
14994 0 : if (length_site_to_3 > size_site_to_3) {
14995 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_to_3, length_site_to_3);
14996 : }
14997 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_to_3, sizeof(uint16_t)));
14998 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_to[cntr_site_to_1], length_site_to_3, sizeof(uint16_t), CH_UTF16));
14999 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_to_2, 0);
15000 : }
15001 : }
15002 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_to_1, 0);
15003 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_to_0, 0);
15004 : }
15005 0 : if (r->site_to) {
15006 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->site_to, r->num_req));
15007 : }
15008 0 : for (cntr_site_to_1 = 0; cntr_site_to_1 < (size_site_to_1); cntr_site_to_1++) {
15009 0 : }
15010 : }
15011 0 : return NDR_ERR_SUCCESS;
15012 : }
15013 :
15014 0 : _PUBLIC_ void ndr_print_drsuapi_QuerySitesByCostRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_QuerySitesByCostRequest1 *r)
15015 : {
15016 0 : uint32_t cntr_site_to_1;
15017 0 : ndr_print_struct(ndr, name, "drsuapi_QuerySitesByCostRequest1");
15018 0 : if (r == NULL) { ndr_print_null(ndr); return; }
15019 0 : ndr->depth++;
15020 0 : ndr_print_ptr(ndr, "site_from", r->site_from);
15021 0 : ndr->depth++;
15022 0 : if (r->site_from) {
15023 0 : ndr_print_string(ndr, "site_from", r->site_from);
15024 : }
15025 0 : ndr->depth--;
15026 0 : ndr_print_uint32(ndr, "num_req", r->num_req);
15027 0 : ndr_print_ptr(ndr, "site_to", r->site_to);
15028 0 : ndr->depth++;
15029 0 : if (r->site_to) {
15030 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "site_to", (uint32_t)(r->num_req));
15031 0 : ndr->depth++;
15032 0 : for (cntr_site_to_1 = 0; cntr_site_to_1 < (r->num_req); cntr_site_to_1++) {
15033 0 : ndr_print_ptr(ndr, "site_to", r->site_to[cntr_site_to_1]);
15034 0 : ndr->depth++;
15035 0 : if (r->site_to[cntr_site_to_1]) {
15036 0 : ndr_print_string(ndr, "site_to", r->site_to[cntr_site_to_1]);
15037 : }
15038 0 : ndr->depth--;
15039 : }
15040 0 : ndr->depth--;
15041 : }
15042 0 : ndr->depth--;
15043 0 : ndr_print_uint32(ndr, "flags", r->flags);
15044 0 : ndr->depth--;
15045 : }
15046 :
15047 0 : static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_QuerySitesByCostRequest *r)
15048 : {
15049 0 : uint32_t level;
15050 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
15051 0 : if (ndr_flags & NDR_SCALARS) {
15052 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
15053 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
15054 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
15055 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
15056 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
15057 0 : switch (level) {
15058 0 : case 1: {
15059 0 : NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest1(ndr, NDR_SCALARS, &r->req1));
15060 0 : break; }
15061 :
15062 0 : default:
15063 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
15064 : }
15065 : }
15066 0 : if (ndr_flags & NDR_BUFFERS) {
15067 0 : if (!(ndr_flags & NDR_SCALARS)) {
15068 : /* We didn't get it above, and the token is not needed after this. */
15069 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
15070 : }
15071 0 : switch (level) {
15072 0 : case 1:
15073 0 : NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest1(ndr, NDR_BUFFERS, &r->req1));
15074 0 : break;
15075 :
15076 0 : default:
15077 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
15078 : }
15079 : }
15080 0 : return NDR_ERR_SUCCESS;
15081 : }
15082 :
15083 0 : static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_QuerySitesByCostRequest *r)
15084 : {
15085 0 : uint32_t level;
15086 0 : uint32_t _level;
15087 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
15088 0 : if (ndr_flags & NDR_SCALARS) {
15089 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
15090 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
15091 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
15092 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
15093 0 : if (_level != level) {
15094 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
15095 : }
15096 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
15097 0 : switch (level) {
15098 0 : case 1: {
15099 0 : NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest1(ndr, NDR_SCALARS, &r->req1));
15100 0 : break; }
15101 :
15102 0 : default:
15103 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
15104 : }
15105 : }
15106 0 : if (ndr_flags & NDR_BUFFERS) {
15107 0 : if (!(ndr_flags & NDR_SCALARS)) {
15108 : /* We didn't get it above, and the token is not needed after this. */
15109 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
15110 : }
15111 0 : switch (level) {
15112 0 : case 1:
15113 0 : NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest1(ndr, NDR_BUFFERS, &r->req1));
15114 0 : break;
15115 :
15116 0 : default:
15117 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
15118 : }
15119 : }
15120 0 : return NDR_ERR_SUCCESS;
15121 : }
15122 :
15123 0 : _PUBLIC_ void ndr_print_drsuapi_QuerySitesByCostRequest(struct ndr_print *ndr, const char *name, const union drsuapi_QuerySitesByCostRequest *r)
15124 : {
15125 0 : uint32_t level;
15126 0 : level = ndr_print_steal_switch_value(ndr, r);
15127 0 : ndr_print_union(ndr, name, level, "drsuapi_QuerySitesByCostRequest");
15128 0 : switch (level) {
15129 0 : case 1:
15130 0 : ndr_print_drsuapi_QuerySitesByCostRequest1(ndr, "req1", &r->req1);
15131 0 : break;
15132 :
15133 0 : default:
15134 0 : ndr_print_bad_level(ndr, name, level);
15135 : }
15136 0 : }
15137 :
15138 4788 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBind(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsBind *r)
15139 : {
15140 4788 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15141 4788 : if (flags & NDR_IN) {
15142 2324 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.bind_guid));
15143 2324 : if (r->in.bind_guid) {
15144 2324 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.bind_guid));
15145 : }
15146 2324 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.bind_info));
15147 2324 : if (r->in.bind_info) {
15148 1679 : NDR_CHECK(ndr_push_drsuapi_DsBindInfoCtr(ndr, NDR_SCALARS, r->in.bind_info));
15149 : }
15150 : }
15151 4788 : if (flags & NDR_OUT) {
15152 2464 : if (r->out.bind_handle == NULL) {
15153 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15154 : }
15155 2464 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.bind_info));
15156 2464 : if (r->out.bind_info) {
15157 2464 : NDR_CHECK(ndr_push_drsuapi_DsBindInfoCtr(ndr, NDR_SCALARS, r->out.bind_info));
15158 : }
15159 2464 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.bind_handle));
15160 2464 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15161 : }
15162 4585 : return NDR_ERR_SUCCESS;
15163 : }
15164 :
15165 4654 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBind(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsBind *r)
15166 : {
15167 187 : uint32_t _ptr_bind_guid;
15168 187 : uint32_t _ptr_bind_info;
15169 4654 : TALLOC_CTX *_mem_save_bind_guid_0 = NULL;
15170 4654 : TALLOC_CTX *_mem_save_bind_info_0 = NULL;
15171 4654 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
15172 4654 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15173 4654 : if (flags & NDR_IN) {
15174 2344 : NDR_ZERO_STRUCT(r->out);
15175 :
15176 2344 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bind_guid));
15177 2344 : if (_ptr_bind_guid) {
15178 2344 : NDR_PULL_ALLOC(ndr, r->in.bind_guid);
15179 : } else {
15180 0 : r->in.bind_guid = NULL;
15181 : }
15182 2344 : if (r->in.bind_guid) {
15183 2344 : _mem_save_bind_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
15184 2344 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_guid, 0);
15185 2344 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.bind_guid));
15186 2344 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_guid_0, 0);
15187 : }
15188 2344 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bind_info));
15189 2344 : if (_ptr_bind_info) {
15190 1707 : NDR_PULL_ALLOC(ndr, r->in.bind_info);
15191 : } else {
15192 637 : r->in.bind_info = NULL;
15193 : }
15194 2344 : if (r->in.bind_info) {
15195 1707 : _mem_save_bind_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15196 1707 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_info, 0);
15197 1707 : NDR_CHECK(ndr_pull_drsuapi_DsBindInfoCtr(ndr, NDR_SCALARS, r->in.bind_info));
15198 1707 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_info_0, 0);
15199 : }
15200 2344 : NDR_PULL_ALLOC(ndr, r->out.bind_handle);
15201 2344 : NDR_ZERO_STRUCTP(r->out.bind_handle);
15202 : }
15203 4654 : if (flags & NDR_OUT) {
15204 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15205 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15206 2310 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bind_info));
15207 2310 : if (_ptr_bind_info) {
15208 2310 : NDR_PULL_ALLOC(ndr, r->out.bind_info);
15209 : } else {
15210 0 : r->out.bind_info = NULL;
15211 : }
15212 2310 : if (r->out.bind_info) {
15213 2310 : _mem_save_bind_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15214 2310 : NDR_PULL_SET_MEM_CTX(ndr, r->out.bind_info, 0);
15215 2310 : NDR_CHECK(ndr_pull_drsuapi_DsBindInfoCtr(ndr, NDR_SCALARS, r->out.bind_info));
15216 2310 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_info_0, 0);
15217 : }
15218 2310 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15219 1750 : NDR_PULL_ALLOC(ndr, r->out.bind_handle);
15220 : }
15221 2310 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15222 2310 : NDR_PULL_SET_MEM_CTX(ndr, r->out.bind_handle, LIBNDR_FLAG_REF_ALLOC);
15223 2310 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.bind_handle));
15224 2310 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
15225 2310 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15226 : }
15227 4467 : return NDR_ERR_SUCCESS;
15228 : }
15229 :
15230 256 : _PUBLIC_ void ndr_print_drsuapi_DsBind(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsBind *r)
15231 : {
15232 256 : ndr_print_struct(ndr, name, "drsuapi_DsBind");
15233 256 : if (r == NULL) { ndr_print_null(ndr); return; }
15234 256 : ndr->depth++;
15235 256 : if (flags & NDR_SET_VALUES) {
15236 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15237 : }
15238 256 : if (flags & NDR_IN) {
15239 0 : ndr_print_struct(ndr, "in", "drsuapi_DsBind");
15240 0 : ndr->depth++;
15241 0 : ndr_print_ptr(ndr, "bind_guid", r->in.bind_guid);
15242 0 : ndr->depth++;
15243 0 : if (r->in.bind_guid) {
15244 0 : ndr_print_GUID(ndr, "bind_guid", r->in.bind_guid);
15245 : }
15246 0 : ndr->depth--;
15247 0 : ndr_print_ptr(ndr, "bind_info", r->in.bind_info);
15248 0 : ndr->depth++;
15249 0 : if (r->in.bind_info) {
15250 0 : ndr_print_drsuapi_DsBindInfoCtr(ndr, "bind_info", r->in.bind_info);
15251 : }
15252 0 : ndr->depth--;
15253 0 : ndr->depth--;
15254 : }
15255 256 : if (flags & NDR_OUT) {
15256 256 : ndr_print_struct(ndr, "out", "drsuapi_DsBind");
15257 256 : ndr->depth++;
15258 256 : ndr_print_ptr(ndr, "bind_info", r->out.bind_info);
15259 256 : ndr->depth++;
15260 256 : if (r->out.bind_info) {
15261 256 : ndr_print_drsuapi_DsBindInfoCtr(ndr, "bind_info", r->out.bind_info);
15262 : }
15263 256 : ndr->depth--;
15264 256 : ndr_print_ptr(ndr, "bind_handle", r->out.bind_handle);
15265 256 : ndr->depth++;
15266 256 : ndr_print_policy_handle(ndr, "bind_handle", r->out.bind_handle);
15267 256 : ndr->depth--;
15268 256 : ndr_print_WERROR(ndr, "result", r->out.result);
15269 256 : ndr->depth--;
15270 : }
15271 256 : ndr->depth--;
15272 : }
15273 :
15274 54 : static enum ndr_err_code ndr_push_drsuapi_DsUnbind(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsUnbind *r)
15275 : {
15276 54 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15277 54 : if (flags & NDR_IN) {
15278 29 : if (r->in.bind_handle == NULL) {
15279 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15280 : }
15281 29 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15282 : }
15283 54 : if (flags & NDR_OUT) {
15284 25 : if (r->out.bind_handle == NULL) {
15285 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15286 : }
15287 25 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.bind_handle));
15288 25 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15289 : }
15290 50 : return NDR_ERR_SUCCESS;
15291 : }
15292 :
15293 50 : static enum ndr_err_code ndr_pull_drsuapi_DsUnbind(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsUnbind *r)
15294 : {
15295 50 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
15296 50 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15297 50 : if (flags & NDR_IN) {
15298 29 : NDR_ZERO_STRUCT(r->out);
15299 :
15300 29 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15301 29 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15302 : }
15303 29 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15304 29 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
15305 29 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15306 29 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
15307 29 : NDR_PULL_ALLOC(ndr, r->out.bind_handle);
15308 29 : *r->out.bind_handle = *r->in.bind_handle;
15309 : }
15310 50 : if (flags & NDR_OUT) {
15311 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15312 : if (r->in.bind_handle == NULL) {
15313 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15314 : NDR_ZERO_STRUCTP(r->in.bind_handle);
15315 : }
15316 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15317 21 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15318 5 : NDR_PULL_ALLOC(ndr, r->out.bind_handle);
15319 : }
15320 21 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15321 21 : NDR_PULL_SET_MEM_CTX(ndr, r->out.bind_handle, LIBNDR_FLAG_REF_ALLOC);
15322 21 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.bind_handle));
15323 21 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
15324 21 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15325 : }
15326 46 : return NDR_ERR_SUCCESS;
15327 : }
15328 :
15329 8 : _PUBLIC_ void ndr_print_drsuapi_DsUnbind(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsUnbind *r)
15330 : {
15331 8 : ndr_print_struct(ndr, name, "drsuapi_DsUnbind");
15332 8 : if (r == NULL) { ndr_print_null(ndr); return; }
15333 8 : ndr->depth++;
15334 8 : if (flags & NDR_SET_VALUES) {
15335 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15336 : }
15337 8 : if (flags & NDR_IN) {
15338 0 : ndr_print_struct(ndr, "in", "drsuapi_DsUnbind");
15339 0 : ndr->depth++;
15340 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
15341 0 : ndr->depth++;
15342 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
15343 0 : ndr->depth--;
15344 0 : ndr->depth--;
15345 : }
15346 8 : if (flags & NDR_OUT) {
15347 8 : ndr_print_struct(ndr, "out", "drsuapi_DsUnbind");
15348 8 : ndr->depth++;
15349 8 : ndr_print_ptr(ndr, "bind_handle", r->out.bind_handle);
15350 8 : ndr->depth++;
15351 8 : ndr_print_policy_handle(ndr, "bind_handle", r->out.bind_handle);
15352 8 : ndr->depth--;
15353 8 : ndr_print_WERROR(ndr, "result", r->out.result);
15354 8 : ndr->depth--;
15355 : }
15356 8 : ndr->depth--;
15357 : }
15358 :
15359 8856 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaSync(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaSync *r)
15360 : {
15361 8856 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15362 8856 : if (flags & NDR_IN) {
15363 4428 : if (r->in.bind_handle == NULL) {
15364 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15365 : }
15366 4428 : if (r->in.req == NULL) {
15367 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15368 : }
15369 4428 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15370 4428 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15371 4428 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
15372 4428 : NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
15373 : }
15374 8856 : if (flags & NDR_OUT) {
15375 4428 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15376 : }
15377 8856 : return NDR_ERR_SUCCESS;
15378 : }
15379 :
15380 8856 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaSync(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaSync *r)
15381 : {
15382 8856 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
15383 8856 : TALLOC_CTX *_mem_save_req_0 = NULL;
15384 8856 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15385 8856 : if (flags & NDR_IN) {
15386 4428 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15387 4428 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15388 : }
15389 4428 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15390 4428 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
15391 4428 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15392 4428 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
15393 4428 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15394 4428 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15395 4428 : NDR_PULL_ALLOC(ndr, r->in.req);
15396 : }
15397 4428 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
15398 4428 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
15399 4428 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
15400 4428 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
15401 4428 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
15402 : }
15403 8856 : if (flags & NDR_OUT) {
15404 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15405 : if (r->in.bind_handle == NULL) {
15406 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15407 : NDR_ZERO_STRUCTP(r->in.bind_handle);
15408 : }
15409 : if (r->in.req == NULL) {
15410 : NDR_PULL_ALLOC(ndr, r->in.req);
15411 : NDR_ZERO_STRUCTP(r->in.req);
15412 : }
15413 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15414 4428 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15415 : }
15416 8856 : return NDR_ERR_SUCCESS;
15417 : }
15418 :
15419 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaSync(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaSync *r)
15420 : {
15421 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaSync");
15422 0 : if (r == NULL) { ndr_print_null(ndr); return; }
15423 0 : ndr->depth++;
15424 0 : if (flags & NDR_SET_VALUES) {
15425 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15426 : }
15427 0 : if (flags & NDR_IN) {
15428 0 : ndr_print_struct(ndr, "in", "drsuapi_DsReplicaSync");
15429 0 : ndr->depth++;
15430 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
15431 0 : ndr->depth++;
15432 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
15433 0 : ndr->depth--;
15434 0 : ndr_print_uint32(ndr, "level", r->in.level);
15435 0 : ndr_print_ptr(ndr, "req", r->in.req);
15436 0 : ndr->depth++;
15437 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
15438 0 : ndr_print_drsuapi_DsReplicaSyncRequest(ndr, "req", r->in.req);
15439 0 : ndr->depth--;
15440 0 : ndr->depth--;
15441 : }
15442 0 : if (flags & NDR_OUT) {
15443 0 : ndr_print_struct(ndr, "out", "drsuapi_DsReplicaSync");
15444 0 : ndr->depth++;
15445 0 : ndr_print_WERROR(ndr, "result", r->out.result);
15446 0 : ndr->depth--;
15447 : }
15448 0 : ndr->depth--;
15449 : }
15450 :
15451 20182 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChanges(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsGetNCChanges *r)
15452 : {
15453 20182 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15454 20182 : if (flags & NDR_IN) {
15455 10065 : if (r->in.bind_handle == NULL) {
15456 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15457 : }
15458 10065 : if (r->in.req == NULL) {
15459 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15460 : }
15461 10065 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15462 10065 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15463 10065 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
15464 10065 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
15465 : }
15466 20182 : if (flags & NDR_OUT) {
15467 10117 : if (r->out.level_out == NULL) {
15468 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15469 : }
15470 10117 : if (r->out.ctr == NULL) {
15471 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15472 : }
15473 10117 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
15474 10117 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
15475 10117 : NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
15476 10117 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15477 : }
15478 20182 : return NDR_ERR_SUCCESS;
15479 : }
15480 :
15481 20164 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChanges(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsGetNCChanges *r)
15482 : {
15483 20164 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
15484 20164 : TALLOC_CTX *_mem_save_req_0 = NULL;
15485 20164 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
15486 20164 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
15487 20164 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15488 20164 : if (flags & NDR_IN) {
15489 10097 : NDR_ZERO_STRUCT(r->out);
15490 :
15491 10097 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15492 10097 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15493 : }
15494 10097 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15495 10097 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
15496 10097 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15497 10097 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
15498 10097 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15499 10097 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15500 10097 : NDR_PULL_ALLOC(ndr, r->in.req);
15501 : }
15502 10097 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
15503 10097 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
15504 10097 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
15505 10097 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
15506 10097 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
15507 10097 : NDR_PULL_ALLOC(ndr, r->out.level_out);
15508 10097 : NDR_ZERO_STRUCTP(r->out.level_out);
15509 10097 : NDR_PULL_ALLOC(ndr, r->out.ctr);
15510 10097 : NDR_ZERO_STRUCTP(r->out.ctr);
15511 : }
15512 20164 : if (flags & NDR_OUT) {
15513 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15514 : if (r->in.bind_handle == NULL) {
15515 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15516 : NDR_ZERO_STRUCTP(r->in.bind_handle);
15517 : }
15518 : if (r->in.req == NULL) {
15519 : NDR_PULL_ALLOC(ndr, r->in.req);
15520 : NDR_ZERO_STRUCTP(r->in.req);
15521 : }
15522 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15523 10067 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15524 5469 : NDR_PULL_ALLOC(ndr, r->out.level_out);
15525 : }
15526 10067 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
15527 10067 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
15528 10067 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
15529 10067 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
15530 10067 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15531 5469 : NDR_PULL_ALLOC(ndr, r->out.ctr);
15532 : }
15533 10067 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15534 10067 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
15535 10067 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
15536 10067 : NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
15537 10066 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15538 10066 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15539 : }
15540 20162 : return NDR_ERR_SUCCESS;
15541 : }
15542 :
15543 41 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChanges(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsGetNCChanges *r)
15544 : {
15545 41 : ndr_print_struct(ndr, name, "drsuapi_DsGetNCChanges");
15546 41 : if (r == NULL) { ndr_print_null(ndr); return; }
15547 41 : ndr->depth++;
15548 41 : if (flags & NDR_SET_VALUES) {
15549 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15550 : }
15551 41 : if (flags & NDR_IN) {
15552 0 : ndr_print_struct(ndr, "in", "drsuapi_DsGetNCChanges");
15553 0 : ndr->depth++;
15554 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
15555 0 : ndr->depth++;
15556 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
15557 0 : ndr->depth--;
15558 0 : ndr_print_uint32(ndr, "level", r->in.level);
15559 0 : ndr_print_ptr(ndr, "req", r->in.req);
15560 0 : ndr->depth++;
15561 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
15562 0 : ndr_print_drsuapi_DsGetNCChangesRequest(ndr, "req", r->in.req);
15563 0 : ndr->depth--;
15564 0 : ndr->depth--;
15565 : }
15566 41 : if (flags & NDR_OUT) {
15567 41 : ndr_print_struct(ndr, "out", "drsuapi_DsGetNCChanges");
15568 41 : ndr->depth++;
15569 41 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
15570 41 : ndr->depth++;
15571 41 : ndr_print_uint32(ndr, "level_out", *r->out.level_out);
15572 41 : ndr->depth--;
15573 41 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
15574 41 : ndr->depth++;
15575 41 : ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
15576 41 : ndr_print_drsuapi_DsGetNCChangesCtr(ndr, "ctr", r->out.ctr);
15577 41 : ndr->depth--;
15578 41 : ndr_print_WERROR(ndr, "result", r->out.result);
15579 41 : ndr->depth--;
15580 : }
15581 41 : ndr->depth--;
15582 : }
15583 :
15584 3400 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaUpdateRefs(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaUpdateRefs *r)
15585 : {
15586 3400 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15587 3400 : if (flags & NDR_IN) {
15588 1700 : if (r->in.bind_handle == NULL) {
15589 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15590 : }
15591 1700 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15592 1700 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15593 1700 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level));
15594 1700 : NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
15595 : }
15596 3400 : if (flags & NDR_OUT) {
15597 1700 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15598 : }
15599 3400 : return NDR_ERR_SUCCESS;
15600 : }
15601 :
15602 3400 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaUpdateRefs(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaUpdateRefs *r)
15603 : {
15604 3400 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
15605 3400 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15606 3400 : if (flags & NDR_IN) {
15607 1700 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15608 1700 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15609 : }
15610 1700 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15611 1700 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
15612 1700 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15613 1700 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
15614 1700 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15615 1700 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level));
15616 1700 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
15617 : }
15618 3400 : if (flags & NDR_OUT) {
15619 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15620 : if (r->in.bind_handle == NULL) {
15621 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15622 : NDR_ZERO_STRUCTP(r->in.bind_handle);
15623 : }
15624 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15625 1700 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15626 : }
15627 3400 : return NDR_ERR_SUCCESS;
15628 : }
15629 :
15630 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaUpdateRefs(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaUpdateRefs *r)
15631 : {
15632 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaUpdateRefs");
15633 0 : if (r == NULL) { ndr_print_null(ndr); return; }
15634 0 : ndr->depth++;
15635 0 : if (flags & NDR_SET_VALUES) {
15636 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15637 : }
15638 0 : if (flags & NDR_IN) {
15639 0 : ndr_print_struct(ndr, "in", "drsuapi_DsReplicaUpdateRefs");
15640 0 : ndr->depth++;
15641 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
15642 0 : ndr->depth++;
15643 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
15644 0 : ndr->depth--;
15645 0 : ndr_print_uint32(ndr, "level", r->in.level);
15646 0 : ndr_print_set_switch_value(ndr, &r->in.req, r->in.level);
15647 0 : ndr_print_drsuapi_DsReplicaUpdateRefsRequest(ndr, "req", &r->in.req);
15648 0 : ndr->depth--;
15649 : }
15650 0 : if (flags & NDR_OUT) {
15651 0 : ndr_print_struct(ndr, "out", "drsuapi_DsReplicaUpdateRefs");
15652 0 : ndr->depth++;
15653 0 : ndr_print_WERROR(ndr, "result", r->out.result);
15654 0 : ndr->depth--;
15655 : }
15656 0 : ndr->depth--;
15657 : }
15658 :
15659 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAdd(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaAdd *r)
15660 : {
15661 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15662 0 : if (flags & NDR_IN) {
15663 0 : if (r->in.bind_handle == NULL) {
15664 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15665 : }
15666 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15667 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15668 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level));
15669 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
15670 : }
15671 0 : if (flags & NDR_OUT) {
15672 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15673 : }
15674 0 : return NDR_ERR_SUCCESS;
15675 : }
15676 :
15677 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAdd(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaAdd *r)
15678 : {
15679 0 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
15680 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15681 0 : if (flags & NDR_IN) {
15682 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15683 0 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15684 : }
15685 0 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15686 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
15687 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15688 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
15689 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15690 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level));
15691 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
15692 : }
15693 0 : if (flags & NDR_OUT) {
15694 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15695 : if (r->in.bind_handle == NULL) {
15696 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15697 : NDR_ZERO_STRUCTP(r->in.bind_handle);
15698 : }
15699 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15700 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15701 : }
15702 0 : return NDR_ERR_SUCCESS;
15703 : }
15704 :
15705 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAdd(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaAdd *r)
15706 : {
15707 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaAdd");
15708 0 : if (r == NULL) { ndr_print_null(ndr); return; }
15709 0 : ndr->depth++;
15710 0 : if (flags & NDR_SET_VALUES) {
15711 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15712 : }
15713 0 : if (flags & NDR_IN) {
15714 0 : ndr_print_struct(ndr, "in", "drsuapi_DsReplicaAdd");
15715 0 : ndr->depth++;
15716 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
15717 0 : ndr->depth++;
15718 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
15719 0 : ndr->depth--;
15720 0 : ndr_print_uint32(ndr, "level", r->in.level);
15721 0 : ndr_print_set_switch_value(ndr, &r->in.req, r->in.level);
15722 0 : ndr_print_drsuapi_DsReplicaAddRequest(ndr, "req", &r->in.req);
15723 0 : ndr->depth--;
15724 : }
15725 0 : if (flags & NDR_OUT) {
15726 0 : ndr_print_struct(ndr, "out", "drsuapi_DsReplicaAdd");
15727 0 : ndr->depth++;
15728 0 : ndr_print_WERROR(ndr, "result", r->out.result);
15729 0 : ndr->depth--;
15730 : }
15731 0 : ndr->depth--;
15732 : }
15733 :
15734 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaDel(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaDel *r)
15735 : {
15736 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15737 0 : if (flags & NDR_IN) {
15738 0 : if (r->in.bind_handle == NULL) {
15739 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15740 : }
15741 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15742 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15743 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level));
15744 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
15745 : }
15746 0 : if (flags & NDR_OUT) {
15747 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15748 : }
15749 0 : return NDR_ERR_SUCCESS;
15750 : }
15751 :
15752 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDel(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaDel *r)
15753 : {
15754 0 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
15755 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15756 0 : if (flags & NDR_IN) {
15757 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15758 0 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15759 : }
15760 0 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15761 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
15762 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15763 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
15764 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15765 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level));
15766 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
15767 : }
15768 0 : if (flags & NDR_OUT) {
15769 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15770 : if (r->in.bind_handle == NULL) {
15771 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15772 : NDR_ZERO_STRUCTP(r->in.bind_handle);
15773 : }
15774 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15775 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15776 : }
15777 0 : return NDR_ERR_SUCCESS;
15778 : }
15779 :
15780 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaDel(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaDel *r)
15781 : {
15782 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaDel");
15783 0 : if (r == NULL) { ndr_print_null(ndr); return; }
15784 0 : ndr->depth++;
15785 0 : if (flags & NDR_SET_VALUES) {
15786 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15787 : }
15788 0 : if (flags & NDR_IN) {
15789 0 : ndr_print_struct(ndr, "in", "drsuapi_DsReplicaDel");
15790 0 : ndr->depth++;
15791 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
15792 0 : ndr->depth++;
15793 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
15794 0 : ndr->depth--;
15795 0 : ndr_print_uint32(ndr, "level", r->in.level);
15796 0 : ndr_print_set_switch_value(ndr, &r->in.req, r->in.level);
15797 0 : ndr_print_drsuapi_DsReplicaDelRequest(ndr, "req", &r->in.req);
15798 0 : ndr->depth--;
15799 : }
15800 0 : if (flags & NDR_OUT) {
15801 0 : ndr_print_struct(ndr, "out", "drsuapi_DsReplicaDel");
15802 0 : ndr->depth++;
15803 0 : ndr_print_WERROR(ndr, "result", r->out.result);
15804 0 : ndr->depth--;
15805 : }
15806 0 : ndr->depth--;
15807 : }
15808 :
15809 0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaMod(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaMod *r)
15810 : {
15811 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15812 0 : if (flags & NDR_IN) {
15813 0 : if (r->in.bind_handle == NULL) {
15814 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15815 : }
15816 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15817 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15818 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level));
15819 0 : NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
15820 : }
15821 0 : if (flags & NDR_OUT) {
15822 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15823 : }
15824 0 : return NDR_ERR_SUCCESS;
15825 : }
15826 :
15827 0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaMod(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaMod *r)
15828 : {
15829 0 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
15830 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15831 0 : if (flags & NDR_IN) {
15832 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15833 0 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15834 : }
15835 0 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15836 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
15837 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15838 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
15839 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15840 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level));
15841 0 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
15842 : }
15843 0 : if (flags & NDR_OUT) {
15844 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15845 : if (r->in.bind_handle == NULL) {
15846 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15847 : NDR_ZERO_STRUCTP(r->in.bind_handle);
15848 : }
15849 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15850 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15851 : }
15852 0 : return NDR_ERR_SUCCESS;
15853 : }
15854 :
15855 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaMod(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaMod *r)
15856 : {
15857 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaMod");
15858 0 : if (r == NULL) { ndr_print_null(ndr); return; }
15859 0 : ndr->depth++;
15860 0 : if (flags & NDR_SET_VALUES) {
15861 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15862 : }
15863 0 : if (flags & NDR_IN) {
15864 0 : ndr_print_struct(ndr, "in", "drsuapi_DsReplicaMod");
15865 0 : ndr->depth++;
15866 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
15867 0 : ndr->depth++;
15868 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
15869 0 : ndr->depth--;
15870 0 : ndr_print_uint32(ndr, "level", r->in.level);
15871 0 : ndr_print_set_switch_value(ndr, &r->in.req, r->in.level);
15872 0 : ndr_print_drsuapi_DsReplicaModRequest(ndr, "req", &r->in.req);
15873 0 : ndr->depth--;
15874 : }
15875 0 : if (flags & NDR_OUT) {
15876 0 : ndr_print_struct(ndr, "out", "drsuapi_DsReplicaMod");
15877 0 : ndr->depth++;
15878 0 : ndr_print_WERROR(ndr, "result", r->out.result);
15879 0 : ndr->depth--;
15880 : }
15881 0 : ndr->depth--;
15882 : }
15883 :
15884 0 : static enum ndr_err_code ndr_push_DRSUAPI_VERIFY_NAMES(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_VERIFY_NAMES *r)
15885 : {
15886 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15887 0 : if (flags & NDR_IN) {
15888 0 : }
15889 0 : if (flags & NDR_OUT) {
15890 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15891 : }
15892 0 : return NDR_ERR_SUCCESS;
15893 : }
15894 :
15895 0 : static enum ndr_err_code ndr_pull_DRSUAPI_VERIFY_NAMES(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_VERIFY_NAMES *r)
15896 : {
15897 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15898 0 : if (flags & NDR_IN) {
15899 0 : }
15900 0 : if (flags & NDR_OUT) {
15901 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15902 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15903 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15904 : }
15905 0 : return NDR_ERR_SUCCESS;
15906 : }
15907 :
15908 0 : _PUBLIC_ void ndr_print_DRSUAPI_VERIFY_NAMES(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_VERIFY_NAMES *r)
15909 : {
15910 0 : ndr_print_struct(ndr, name, "DRSUAPI_VERIFY_NAMES");
15911 0 : if (r == NULL) { ndr_print_null(ndr); return; }
15912 0 : ndr->depth++;
15913 0 : if (flags & NDR_SET_VALUES) {
15914 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15915 : }
15916 0 : if (flags & NDR_IN) {
15917 0 : ndr_print_struct(ndr, "in", "DRSUAPI_VERIFY_NAMES");
15918 0 : ndr->depth++;
15919 0 : ndr->depth--;
15920 : }
15921 0 : if (flags & NDR_OUT) {
15922 0 : ndr_print_struct(ndr, "out", "DRSUAPI_VERIFY_NAMES");
15923 0 : ndr->depth++;
15924 0 : ndr_print_WERROR(ndr, "result", r->out.result);
15925 0 : ndr->depth--;
15926 : }
15927 0 : ndr->depth--;
15928 : }
15929 :
15930 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsGetMemberships *r)
15931 : {
15932 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15933 0 : if (flags & NDR_IN) {
15934 0 : if (r->in.bind_handle == NULL) {
15935 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15936 : }
15937 0 : if (r->in.req == NULL) {
15938 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15939 : }
15940 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15941 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15942 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
15943 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
15944 : }
15945 0 : if (flags & NDR_OUT) {
15946 0 : if (r->out.level_out == NULL) {
15947 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15948 : }
15949 0 : if (r->out.ctr == NULL) {
15950 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15951 : }
15952 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
15953 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
15954 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
15955 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15956 : }
15957 0 : return NDR_ERR_SUCCESS;
15958 : }
15959 :
15960 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsGetMemberships *r)
15961 : {
15962 0 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
15963 0 : TALLOC_CTX *_mem_save_req_0 = NULL;
15964 0 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
15965 0 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
15966 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15967 0 : if (flags & NDR_IN) {
15968 0 : NDR_ZERO_STRUCT(r->out);
15969 :
15970 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15971 0 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15972 : }
15973 0 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15974 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
15975 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
15976 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
15977 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15978 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15979 0 : NDR_PULL_ALLOC(ndr, r->in.req);
15980 : }
15981 0 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
15982 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
15983 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
15984 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
15985 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
15986 0 : NDR_PULL_ALLOC(ndr, r->out.level_out);
15987 0 : NDR_ZERO_STRUCTP(r->out.level_out);
15988 0 : NDR_PULL_ALLOC(ndr, r->out.ctr);
15989 0 : NDR_ZERO_STRUCTP(r->out.ctr);
15990 : }
15991 0 : if (flags & NDR_OUT) {
15992 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15993 : if (r->in.bind_handle == NULL) {
15994 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
15995 : NDR_ZERO_STRUCTP(r->in.bind_handle);
15996 : }
15997 : if (r->in.req == NULL) {
15998 : NDR_PULL_ALLOC(ndr, r->in.req);
15999 : NDR_ZERO_STRUCTP(r->in.req);
16000 : }
16001 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16002 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16003 0 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16004 : }
16005 0 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
16006 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
16007 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
16008 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
16009 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16010 0 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16011 : }
16012 0 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16013 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
16014 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
16015 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
16016 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16017 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16018 : }
16019 0 : return NDR_ERR_SUCCESS;
16020 : }
16021 :
16022 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMemberships(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsGetMemberships *r)
16023 : {
16024 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetMemberships");
16025 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16026 0 : ndr->depth++;
16027 0 : if (flags & NDR_SET_VALUES) {
16028 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16029 : }
16030 0 : if (flags & NDR_IN) {
16031 0 : ndr_print_struct(ndr, "in", "drsuapi_DsGetMemberships");
16032 0 : ndr->depth++;
16033 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
16034 0 : ndr->depth++;
16035 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
16036 0 : ndr->depth--;
16037 0 : ndr_print_uint32(ndr, "level", r->in.level);
16038 0 : ndr_print_ptr(ndr, "req", r->in.req);
16039 0 : ndr->depth++;
16040 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
16041 0 : ndr_print_drsuapi_DsGetMembershipsRequest(ndr, "req", r->in.req);
16042 0 : ndr->depth--;
16043 0 : ndr->depth--;
16044 : }
16045 0 : if (flags & NDR_OUT) {
16046 0 : ndr_print_struct(ndr, "out", "drsuapi_DsGetMemberships");
16047 0 : ndr->depth++;
16048 0 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
16049 0 : ndr->depth++;
16050 0 : ndr_print_uint32(ndr, "level_out", *r->out.level_out);
16051 0 : ndr->depth--;
16052 0 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
16053 0 : ndr->depth++;
16054 0 : ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
16055 0 : ndr_print_drsuapi_DsGetMembershipsCtr(ndr, "ctr", r->out.ctr);
16056 0 : ndr->depth--;
16057 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16058 0 : ndr->depth--;
16059 : }
16060 0 : ndr->depth--;
16061 : }
16062 :
16063 0 : static enum ndr_err_code ndr_push_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_INTER_DOMAIN_MOVE *r)
16064 : {
16065 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16066 0 : if (flags & NDR_IN) {
16067 0 : }
16068 0 : if (flags & NDR_OUT) {
16069 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16070 : }
16071 0 : return NDR_ERR_SUCCESS;
16072 : }
16073 :
16074 0 : static enum ndr_err_code ndr_pull_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_INTER_DOMAIN_MOVE *r)
16075 : {
16076 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16077 0 : if (flags & NDR_IN) {
16078 0 : }
16079 0 : if (flags & NDR_OUT) {
16080 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16081 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16082 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16083 : }
16084 0 : return NDR_ERR_SUCCESS;
16085 : }
16086 :
16087 0 : _PUBLIC_ void ndr_print_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_INTER_DOMAIN_MOVE *r)
16088 : {
16089 0 : ndr_print_struct(ndr, name, "DRSUAPI_INTER_DOMAIN_MOVE");
16090 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16091 0 : ndr->depth++;
16092 0 : if (flags & NDR_SET_VALUES) {
16093 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16094 : }
16095 0 : if (flags & NDR_IN) {
16096 0 : ndr_print_struct(ndr, "in", "DRSUAPI_INTER_DOMAIN_MOVE");
16097 0 : ndr->depth++;
16098 0 : ndr->depth--;
16099 : }
16100 0 : if (flags & NDR_OUT) {
16101 0 : ndr_print_struct(ndr, "out", "DRSUAPI_INTER_DOMAIN_MOVE");
16102 0 : ndr->depth++;
16103 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16104 0 : ndr->depth--;
16105 : }
16106 0 : ndr->depth--;
16107 : }
16108 :
16109 4 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLog(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsGetNT4ChangeLog *r)
16110 : {
16111 4 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16112 4 : if (flags & NDR_IN) {
16113 4 : if (r->in.bind_handle == NULL) {
16114 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16115 : }
16116 4 : if (r->in.req == NULL) {
16117 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16118 : }
16119 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16120 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16121 4 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
16122 4 : NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16123 : }
16124 4 : if (flags & NDR_OUT) {
16125 0 : if (r->out.level_out == NULL) {
16126 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16127 : }
16128 0 : if (r->out.info == NULL) {
16129 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16130 : }
16131 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
16132 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, *r->out.level_out));
16133 0 : NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16134 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16135 : }
16136 4 : return NDR_ERR_SUCCESS;
16137 : }
16138 :
16139 4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLog(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsGetNT4ChangeLog *r)
16140 : {
16141 4 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
16142 4 : TALLOC_CTX *_mem_save_req_0 = NULL;
16143 4 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
16144 4 : TALLOC_CTX *_mem_save_info_0 = NULL;
16145 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16146 4 : if (flags & NDR_IN) {
16147 4 : NDR_ZERO_STRUCT(r->out);
16148 :
16149 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16150 4 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16151 : }
16152 4 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16153 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
16154 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16155 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
16156 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16157 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16158 4 : NDR_PULL_ALLOC(ndr, r->in.req);
16159 : }
16160 4 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
16161 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
16162 4 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
16163 4 : NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16164 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
16165 4 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16166 4 : NDR_ZERO_STRUCTP(r->out.level_out);
16167 4 : NDR_PULL_ALLOC(ndr, r->out.info);
16168 4 : NDR_ZERO_STRUCTP(r->out.info);
16169 : }
16170 4 : if (flags & NDR_OUT) {
16171 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16172 : if (r->in.bind_handle == NULL) {
16173 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16174 : NDR_ZERO_STRUCTP(r->in.bind_handle);
16175 : }
16176 : if (r->in.req == NULL) {
16177 : NDR_PULL_ALLOC(ndr, r->in.req);
16178 : NDR_ZERO_STRUCTP(r->in.req);
16179 : }
16180 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16181 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16182 0 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16183 : }
16184 0 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
16185 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
16186 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
16187 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
16188 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16189 0 : NDR_PULL_ALLOC(ndr, r->out.info);
16190 : }
16191 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16192 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16193 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, *r->out.level_out));
16194 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16195 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16196 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16197 : }
16198 4 : return NDR_ERR_SUCCESS;
16199 : }
16200 :
16201 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLog(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsGetNT4ChangeLog *r)
16202 : {
16203 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetNT4ChangeLog");
16204 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16205 0 : ndr->depth++;
16206 0 : if (flags & NDR_SET_VALUES) {
16207 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16208 : }
16209 0 : if (flags & NDR_IN) {
16210 0 : ndr_print_struct(ndr, "in", "drsuapi_DsGetNT4ChangeLog");
16211 0 : ndr->depth++;
16212 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
16213 0 : ndr->depth++;
16214 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
16215 0 : ndr->depth--;
16216 0 : ndr_print_uint32(ndr, "level", r->in.level);
16217 0 : ndr_print_ptr(ndr, "req", r->in.req);
16218 0 : ndr->depth++;
16219 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
16220 0 : ndr_print_drsuapi_DsGetNT4ChangeLogRequest(ndr, "req", r->in.req);
16221 0 : ndr->depth--;
16222 0 : ndr->depth--;
16223 : }
16224 0 : if (flags & NDR_OUT) {
16225 0 : ndr_print_struct(ndr, "out", "drsuapi_DsGetNT4ChangeLog");
16226 0 : ndr->depth++;
16227 0 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
16228 0 : ndr->depth++;
16229 0 : ndr_print_uint32(ndr, "level_out", *r->out.level_out);
16230 0 : ndr->depth--;
16231 0 : ndr_print_ptr(ndr, "info", r->out.info);
16232 0 : ndr->depth++;
16233 0 : ndr_print_set_switch_value(ndr, r->out.info, *r->out.level_out);
16234 0 : ndr_print_drsuapi_DsGetNT4ChangeLogInfo(ndr, "info", r->out.info);
16235 0 : ndr->depth--;
16236 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16237 0 : ndr->depth--;
16238 : }
16239 0 : ndr->depth--;
16240 : }
16241 :
16242 3522 : static enum ndr_err_code ndr_push_drsuapi_DsCrackNames(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsCrackNames *r)
16243 : {
16244 3522 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16245 3522 : if (flags & NDR_IN) {
16246 1639 : if (r->in.bind_handle == NULL) {
16247 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16248 : }
16249 1639 : if (r->in.req == NULL) {
16250 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16251 : }
16252 1639 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16253 1639 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16254 1639 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
16255 1639 : NDR_CHECK(ndr_push_drsuapi_DsNameRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16256 : }
16257 3522 : if (flags & NDR_OUT) {
16258 1883 : if (r->out.level_out == NULL) {
16259 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16260 : }
16261 1883 : if (r->out.ctr == NULL) {
16262 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16263 : }
16264 1883 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
16265 1883 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
16266 1883 : NDR_CHECK(ndr_push_drsuapi_DsNameCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
16267 1883 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16268 : }
16269 3126 : return NDR_ERR_SUCCESS;
16270 : }
16271 :
16272 3278 : static enum ndr_err_code ndr_pull_drsuapi_DsCrackNames(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsCrackNames *r)
16273 : {
16274 3278 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
16275 3278 : TALLOC_CTX *_mem_save_req_0 = NULL;
16276 3278 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
16277 3278 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
16278 3278 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16279 3278 : if (flags & NDR_IN) {
16280 1639 : NDR_ZERO_STRUCT(r->out);
16281 :
16282 1639 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16283 1639 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16284 : }
16285 1639 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16286 1639 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
16287 1639 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16288 1639 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
16289 1639 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16290 1639 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16291 1639 : NDR_PULL_ALLOC(ndr, r->in.req);
16292 : }
16293 1639 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
16294 1639 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
16295 1639 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
16296 1639 : NDR_CHECK(ndr_pull_drsuapi_DsNameRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16297 1639 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
16298 1639 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16299 1639 : NDR_ZERO_STRUCTP(r->out.level_out);
16300 1639 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16301 1639 : NDR_ZERO_STRUCTP(r->out.ctr);
16302 : }
16303 3278 : if (flags & NDR_OUT) {
16304 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16305 : if (r->in.bind_handle == NULL) {
16306 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16307 : NDR_ZERO_STRUCTP(r->in.bind_handle);
16308 : }
16309 : if (r->in.req == NULL) {
16310 : NDR_PULL_ALLOC(ndr, r->in.req);
16311 : NDR_ZERO_STRUCTP(r->in.req);
16312 : }
16313 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16314 1639 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16315 268 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16316 : }
16317 1639 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
16318 1639 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
16319 1639 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
16320 1639 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
16321 1639 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16322 268 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16323 : }
16324 1639 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16325 1639 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
16326 1639 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
16327 1639 : NDR_CHECK(ndr_pull_drsuapi_DsNameCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
16328 1639 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16329 1639 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16330 : }
16331 2918 : return NDR_ERR_SUCCESS;
16332 : }
16333 :
16334 488 : _PUBLIC_ void ndr_print_drsuapi_DsCrackNames(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsCrackNames *r)
16335 : {
16336 488 : ndr_print_struct(ndr, name, "drsuapi_DsCrackNames");
16337 488 : if (r == NULL) { ndr_print_null(ndr); return; }
16338 488 : ndr->depth++;
16339 488 : if (flags & NDR_SET_VALUES) {
16340 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16341 : }
16342 488 : if (flags & NDR_IN) {
16343 0 : ndr_print_struct(ndr, "in", "drsuapi_DsCrackNames");
16344 0 : ndr->depth++;
16345 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
16346 0 : ndr->depth++;
16347 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
16348 0 : ndr->depth--;
16349 0 : ndr_print_uint32(ndr, "level", r->in.level);
16350 0 : ndr_print_ptr(ndr, "req", r->in.req);
16351 0 : ndr->depth++;
16352 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
16353 0 : ndr_print_drsuapi_DsNameRequest(ndr, "req", r->in.req);
16354 0 : ndr->depth--;
16355 0 : ndr->depth--;
16356 : }
16357 488 : if (flags & NDR_OUT) {
16358 488 : ndr_print_struct(ndr, "out", "drsuapi_DsCrackNames");
16359 488 : ndr->depth++;
16360 488 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
16361 488 : ndr->depth++;
16362 488 : ndr_print_uint32(ndr, "level_out", *r->out.level_out);
16363 488 : ndr->depth--;
16364 488 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
16365 488 : ndr->depth++;
16366 488 : ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
16367 488 : ndr_print_drsuapi_DsNameCtr(ndr, "ctr", r->out.ctr);
16368 488 : ndr->depth--;
16369 488 : ndr_print_WERROR(ndr, "result", r->out.result);
16370 488 : ndr->depth--;
16371 : }
16372 488 : ndr->depth--;
16373 : }
16374 :
16375 8 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpn(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsWriteAccountSpn *r)
16376 : {
16377 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16378 8 : if (flags & NDR_IN) {
16379 4 : if (r->in.bind_handle == NULL) {
16380 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16381 : }
16382 4 : if (r->in.req == NULL) {
16383 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16384 : }
16385 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16386 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16387 4 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
16388 4 : NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16389 : }
16390 8 : if (flags & NDR_OUT) {
16391 4 : if (r->out.level_out == NULL) {
16392 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16393 : }
16394 4 : if (r->out.res == NULL) {
16395 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16396 : }
16397 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
16398 4 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.res, *r->out.level_out));
16399 4 : NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnResult(ndr, NDR_SCALARS, r->out.res));
16400 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16401 : }
16402 8 : return NDR_ERR_SUCCESS;
16403 : }
16404 :
16405 8 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpn(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsWriteAccountSpn *r)
16406 : {
16407 8 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
16408 8 : TALLOC_CTX *_mem_save_req_0 = NULL;
16409 8 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
16410 8 : TALLOC_CTX *_mem_save_res_0 = NULL;
16411 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16412 8 : if (flags & NDR_IN) {
16413 4 : NDR_ZERO_STRUCT(r->out);
16414 :
16415 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16416 4 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16417 : }
16418 4 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16419 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
16420 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16421 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
16422 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16423 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16424 4 : NDR_PULL_ALLOC(ndr, r->in.req);
16425 : }
16426 4 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
16427 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
16428 4 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
16429 4 : NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16430 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
16431 4 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16432 4 : NDR_ZERO_STRUCTP(r->out.level_out);
16433 4 : NDR_PULL_ALLOC(ndr, r->out.res);
16434 4 : NDR_ZERO_STRUCTP(r->out.res);
16435 : }
16436 8 : if (flags & NDR_OUT) {
16437 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16438 : if (r->in.bind_handle == NULL) {
16439 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16440 : NDR_ZERO_STRUCTP(r->in.bind_handle);
16441 : }
16442 : if (r->in.req == NULL) {
16443 : NDR_PULL_ALLOC(ndr, r->in.req);
16444 : NDR_ZERO_STRUCTP(r->in.req);
16445 : }
16446 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16447 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16448 2 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16449 : }
16450 4 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
16451 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
16452 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
16453 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
16454 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16455 2 : NDR_PULL_ALLOC(ndr, r->out.res);
16456 : }
16457 4 : _mem_save_res_0 = NDR_PULL_GET_MEM_CTX(ndr);
16458 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.res, LIBNDR_FLAG_REF_ALLOC);
16459 4 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.res, *r->out.level_out));
16460 4 : NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnResult(ndr, NDR_SCALARS, r->out.res));
16461 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_0, LIBNDR_FLAG_REF_ALLOC);
16462 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16463 : }
16464 8 : return NDR_ERR_SUCCESS;
16465 : }
16466 :
16467 0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpn(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsWriteAccountSpn *r)
16468 : {
16469 0 : ndr_print_struct(ndr, name, "drsuapi_DsWriteAccountSpn");
16470 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16471 0 : ndr->depth++;
16472 0 : if (flags & NDR_SET_VALUES) {
16473 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16474 : }
16475 0 : if (flags & NDR_IN) {
16476 0 : ndr_print_struct(ndr, "in", "drsuapi_DsWriteAccountSpn");
16477 0 : ndr->depth++;
16478 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
16479 0 : ndr->depth++;
16480 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
16481 0 : ndr->depth--;
16482 0 : ndr_print_uint32(ndr, "level", r->in.level);
16483 0 : ndr_print_ptr(ndr, "req", r->in.req);
16484 0 : ndr->depth++;
16485 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
16486 0 : ndr_print_drsuapi_DsWriteAccountSpnRequest(ndr, "req", r->in.req);
16487 0 : ndr->depth--;
16488 0 : ndr->depth--;
16489 : }
16490 0 : if (flags & NDR_OUT) {
16491 0 : ndr_print_struct(ndr, "out", "drsuapi_DsWriteAccountSpn");
16492 0 : ndr->depth++;
16493 0 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
16494 0 : ndr->depth++;
16495 0 : ndr_print_uint32(ndr, "level_out", *r->out.level_out);
16496 0 : ndr->depth--;
16497 0 : ndr_print_ptr(ndr, "res", r->out.res);
16498 0 : ndr->depth++;
16499 0 : ndr_print_set_switch_value(ndr, r->out.res, *r->out.level_out);
16500 0 : ndr_print_drsuapi_DsWriteAccountSpnResult(ndr, "res", r->out.res);
16501 0 : ndr->depth--;
16502 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16503 0 : ndr->depth--;
16504 : }
16505 0 : ndr->depth--;
16506 : }
16507 :
16508 14 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServer(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsRemoveDSServer *r)
16509 : {
16510 14 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16511 14 : if (flags & NDR_IN) {
16512 7 : if (r->in.bind_handle == NULL) {
16513 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16514 : }
16515 7 : if (r->in.req == NULL) {
16516 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16517 : }
16518 7 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16519 7 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16520 7 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
16521 7 : NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16522 : }
16523 14 : if (flags & NDR_OUT) {
16524 7 : if (r->out.level_out == NULL) {
16525 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16526 : }
16527 7 : if (r->out.res == NULL) {
16528 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16529 : }
16530 7 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
16531 7 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.res, *r->out.level_out));
16532 7 : NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerResult(ndr, NDR_SCALARS, r->out.res));
16533 7 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16534 : }
16535 14 : return NDR_ERR_SUCCESS;
16536 : }
16537 :
16538 14 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServer(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsRemoveDSServer *r)
16539 : {
16540 14 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
16541 14 : TALLOC_CTX *_mem_save_req_0 = NULL;
16542 14 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
16543 14 : TALLOC_CTX *_mem_save_res_0 = NULL;
16544 14 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16545 14 : if (flags & NDR_IN) {
16546 7 : NDR_ZERO_STRUCT(r->out);
16547 :
16548 7 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16549 7 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16550 : }
16551 7 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16552 7 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
16553 7 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16554 7 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
16555 7 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16556 7 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16557 7 : NDR_PULL_ALLOC(ndr, r->in.req);
16558 : }
16559 7 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
16560 7 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
16561 7 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
16562 7 : NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16563 7 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
16564 7 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16565 7 : NDR_ZERO_STRUCTP(r->out.level_out);
16566 7 : NDR_PULL_ALLOC(ndr, r->out.res);
16567 7 : NDR_ZERO_STRUCTP(r->out.res);
16568 : }
16569 14 : if (flags & NDR_OUT) {
16570 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16571 : if (r->in.bind_handle == NULL) {
16572 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16573 : NDR_ZERO_STRUCTP(r->in.bind_handle);
16574 : }
16575 : if (r->in.req == NULL) {
16576 : NDR_PULL_ALLOC(ndr, r->in.req);
16577 : NDR_ZERO_STRUCTP(r->in.req);
16578 : }
16579 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16580 7 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16581 3 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16582 : }
16583 7 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
16584 7 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
16585 7 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
16586 7 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
16587 7 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16588 3 : NDR_PULL_ALLOC(ndr, r->out.res);
16589 : }
16590 7 : _mem_save_res_0 = NDR_PULL_GET_MEM_CTX(ndr);
16591 7 : NDR_PULL_SET_MEM_CTX(ndr, r->out.res, LIBNDR_FLAG_REF_ALLOC);
16592 7 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.res, *r->out.level_out));
16593 7 : NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerResult(ndr, NDR_SCALARS, r->out.res));
16594 7 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_0, LIBNDR_FLAG_REF_ALLOC);
16595 7 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16596 : }
16597 14 : return NDR_ERR_SUCCESS;
16598 : }
16599 :
16600 0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServer(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsRemoveDSServer *r)
16601 : {
16602 0 : ndr_print_struct(ndr, name, "drsuapi_DsRemoveDSServer");
16603 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16604 0 : ndr->depth++;
16605 0 : if (flags & NDR_SET_VALUES) {
16606 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16607 : }
16608 0 : if (flags & NDR_IN) {
16609 0 : ndr_print_struct(ndr, "in", "drsuapi_DsRemoveDSServer");
16610 0 : ndr->depth++;
16611 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
16612 0 : ndr->depth++;
16613 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
16614 0 : ndr->depth--;
16615 0 : ndr_print_uint32(ndr, "level", r->in.level);
16616 0 : ndr_print_ptr(ndr, "req", r->in.req);
16617 0 : ndr->depth++;
16618 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
16619 0 : ndr_print_drsuapi_DsRemoveDSServerRequest(ndr, "req", r->in.req);
16620 0 : ndr->depth--;
16621 0 : ndr->depth--;
16622 : }
16623 0 : if (flags & NDR_OUT) {
16624 0 : ndr_print_struct(ndr, "out", "drsuapi_DsRemoveDSServer");
16625 0 : ndr->depth++;
16626 0 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
16627 0 : ndr->depth++;
16628 0 : ndr_print_uint32(ndr, "level_out", *r->out.level_out);
16629 0 : ndr->depth--;
16630 0 : ndr_print_ptr(ndr, "res", r->out.res);
16631 0 : ndr->depth++;
16632 0 : ndr_print_set_switch_value(ndr, r->out.res, *r->out.level_out);
16633 0 : ndr_print_drsuapi_DsRemoveDSServerResult(ndr, "res", r->out.res);
16634 0 : ndr->depth--;
16635 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16636 0 : ndr->depth--;
16637 : }
16638 0 : ndr->depth--;
16639 : }
16640 :
16641 0 : static enum ndr_err_code ndr_push_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_REMOVE_DS_DOMAIN *r)
16642 : {
16643 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16644 0 : if (flags & NDR_IN) {
16645 0 : }
16646 0 : if (flags & NDR_OUT) {
16647 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16648 : }
16649 0 : return NDR_ERR_SUCCESS;
16650 : }
16651 :
16652 0 : static enum ndr_err_code ndr_pull_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_REMOVE_DS_DOMAIN *r)
16653 : {
16654 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16655 0 : if (flags & NDR_IN) {
16656 0 : }
16657 0 : if (flags & NDR_OUT) {
16658 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16659 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16660 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16661 : }
16662 0 : return NDR_ERR_SUCCESS;
16663 : }
16664 :
16665 0 : _PUBLIC_ void ndr_print_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_REMOVE_DS_DOMAIN *r)
16666 : {
16667 0 : ndr_print_struct(ndr, name, "DRSUAPI_REMOVE_DS_DOMAIN");
16668 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16669 0 : ndr->depth++;
16670 0 : if (flags & NDR_SET_VALUES) {
16671 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16672 : }
16673 0 : if (flags & NDR_IN) {
16674 0 : ndr_print_struct(ndr, "in", "DRSUAPI_REMOVE_DS_DOMAIN");
16675 0 : ndr->depth++;
16676 0 : ndr->depth--;
16677 : }
16678 0 : if (flags & NDR_OUT) {
16679 0 : ndr_print_struct(ndr, "out", "DRSUAPI_REMOVE_DS_DOMAIN");
16680 0 : ndr->depth++;
16681 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16682 0 : ndr->depth--;
16683 : }
16684 0 : ndr->depth--;
16685 : }
16686 :
16687 12 : static enum ndr_err_code ndr_push_drsuapi_DsGetDomainControllerInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsGetDomainControllerInfo *r)
16688 : {
16689 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16690 12 : if (flags & NDR_IN) {
16691 6 : if (r->in.bind_handle == NULL) {
16692 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16693 : }
16694 6 : if (r->in.req == NULL) {
16695 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16696 : }
16697 6 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16698 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16699 6 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
16700 6 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16701 : }
16702 12 : if (flags & NDR_OUT) {
16703 6 : if (r->out.level_out == NULL) {
16704 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16705 : }
16706 6 : if (r->out.ctr == NULL) {
16707 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16708 : }
16709 6 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, *r->out.level_out));
16710 6 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
16711 6 : NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
16712 6 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16713 : }
16714 12 : return NDR_ERR_SUCCESS;
16715 : }
16716 :
16717 12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDomainControllerInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsGetDomainControllerInfo *r)
16718 : {
16719 12 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
16720 12 : TALLOC_CTX *_mem_save_req_0 = NULL;
16721 12 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
16722 12 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
16723 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16724 12 : if (flags & NDR_IN) {
16725 6 : NDR_ZERO_STRUCT(r->out);
16726 :
16727 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16728 6 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16729 : }
16730 6 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16731 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
16732 6 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16733 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
16734 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16735 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16736 6 : NDR_PULL_ALLOC(ndr, r->in.req);
16737 : }
16738 6 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
16739 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
16740 6 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
16741 6 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16742 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
16743 6 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16744 6 : NDR_ZERO_STRUCTP(r->out.level_out);
16745 6 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16746 6 : NDR_ZERO_STRUCTP(r->out.ctr);
16747 : }
16748 12 : if (flags & NDR_OUT) {
16749 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16750 : if (r->in.bind_handle == NULL) {
16751 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16752 : NDR_ZERO_STRUCTP(r->in.bind_handle);
16753 : }
16754 : if (r->in.req == NULL) {
16755 : NDR_PULL_ALLOC(ndr, r->in.req);
16756 : NDR_ZERO_STRUCTP(r->in.req);
16757 : }
16758 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16759 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16760 0 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16761 : }
16762 6 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
16763 6 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
16764 6 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, r->out.level_out));
16765 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
16766 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16767 0 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16768 : }
16769 6 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16770 6 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
16771 6 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
16772 6 : NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
16773 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16774 6 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16775 : }
16776 12 : return NDR_ERR_SUCCESS;
16777 : }
16778 :
16779 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDomainControllerInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsGetDomainControllerInfo *r)
16780 : {
16781 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetDomainControllerInfo");
16782 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16783 0 : ndr->depth++;
16784 0 : if (flags & NDR_SET_VALUES) {
16785 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16786 : }
16787 0 : if (flags & NDR_IN) {
16788 0 : ndr_print_struct(ndr, "in", "drsuapi_DsGetDomainControllerInfo");
16789 0 : ndr->depth++;
16790 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
16791 0 : ndr->depth++;
16792 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
16793 0 : ndr->depth--;
16794 0 : ndr_print_uint32(ndr, "level", r->in.level);
16795 0 : ndr_print_ptr(ndr, "req", r->in.req);
16796 0 : ndr->depth++;
16797 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
16798 0 : ndr_print_drsuapi_DsGetDCInfoRequest(ndr, "req", r->in.req);
16799 0 : ndr->depth--;
16800 0 : ndr->depth--;
16801 : }
16802 0 : if (flags & NDR_OUT) {
16803 0 : ndr_print_struct(ndr, "out", "drsuapi_DsGetDomainControllerInfo");
16804 0 : ndr->depth++;
16805 0 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
16806 0 : ndr->depth++;
16807 0 : ndr_print_drsuapi_DsGetDCInfoCtrLevels(ndr, "level_out", *r->out.level_out);
16808 0 : ndr->depth--;
16809 0 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
16810 0 : ndr->depth++;
16811 0 : ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
16812 0 : ndr_print_drsuapi_DsGetDCInfoCtr(ndr, "ctr", r->out.ctr);
16813 0 : ndr->depth--;
16814 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16815 0 : ndr->depth--;
16816 : }
16817 0 : ndr->depth--;
16818 : }
16819 :
16820 189 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsAddEntry(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsAddEntry *r)
16821 : {
16822 189 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16823 189 : if (flags & NDR_IN) {
16824 95 : if (r->in.bind_handle == NULL) {
16825 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16826 : }
16827 95 : if (r->in.req == NULL) {
16828 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16829 : }
16830 95 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16831 95 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16832 95 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
16833 95 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16834 : }
16835 189 : if (flags & NDR_OUT) {
16836 94 : if (r->out.level_out == NULL) {
16837 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16838 : }
16839 94 : if (r->out.ctr == NULL) {
16840 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16841 : }
16842 94 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
16843 94 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
16844 94 : NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
16845 94 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16846 : }
16847 188 : return NDR_ERR_SUCCESS;
16848 : }
16849 :
16850 195 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsAddEntry(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsAddEntry *r)
16851 : {
16852 195 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
16853 195 : TALLOC_CTX *_mem_save_req_0 = NULL;
16854 195 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
16855 195 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
16856 195 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16857 195 : if (flags & NDR_IN) {
16858 98 : NDR_ZERO_STRUCT(r->out);
16859 :
16860 98 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16861 98 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16862 : }
16863 98 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16864 98 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
16865 98 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16866 98 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
16867 98 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16868 98 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16869 98 : NDR_PULL_ALLOC(ndr, r->in.req);
16870 : }
16871 98 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
16872 98 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
16873 98 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
16874 98 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
16875 98 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
16876 98 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16877 98 : NDR_ZERO_STRUCTP(r->out.level_out);
16878 98 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16879 98 : NDR_ZERO_STRUCTP(r->out.ctr);
16880 : }
16881 195 : if (flags & NDR_OUT) {
16882 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16883 : if (r->in.bind_handle == NULL) {
16884 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16885 : NDR_ZERO_STRUCTP(r->in.bind_handle);
16886 : }
16887 : if (r->in.req == NULL) {
16888 : NDR_PULL_ALLOC(ndr, r->in.req);
16889 : NDR_ZERO_STRUCTP(r->in.req);
16890 : }
16891 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16892 97 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16893 93 : NDR_PULL_ALLOC(ndr, r->out.level_out);
16894 : }
16895 97 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
16896 97 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
16897 97 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
16898 97 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
16899 97 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16900 93 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16901 : }
16902 97 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16903 97 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
16904 97 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
16905 97 : NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
16906 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16907 96 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16908 : }
16909 188 : return NDR_ERR_SUCCESS;
16910 : }
16911 :
16912 6 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsAddEntry *r)
16913 : {
16914 6 : ndr_print_struct(ndr, name, "drsuapi_DsAddEntry");
16915 6 : if (r == NULL) { ndr_print_null(ndr); return; }
16916 6 : ndr->depth++;
16917 6 : if (flags & NDR_SET_VALUES) {
16918 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16919 : }
16920 6 : if (flags & NDR_IN) {
16921 4 : ndr_print_struct(ndr, "in", "drsuapi_DsAddEntry");
16922 4 : ndr->depth++;
16923 4 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
16924 4 : ndr->depth++;
16925 4 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
16926 4 : ndr->depth--;
16927 4 : ndr_print_uint32(ndr, "level", r->in.level);
16928 4 : ndr_print_ptr(ndr, "req", r->in.req);
16929 4 : ndr->depth++;
16930 4 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
16931 4 : ndr_print_drsuapi_DsAddEntryRequest(ndr, "req", r->in.req);
16932 4 : ndr->depth--;
16933 4 : ndr->depth--;
16934 : }
16935 6 : if (flags & NDR_OUT) {
16936 2 : ndr_print_struct(ndr, "out", "drsuapi_DsAddEntry");
16937 2 : ndr->depth++;
16938 2 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
16939 2 : ndr->depth++;
16940 2 : ndr_print_uint32(ndr, "level_out", *r->out.level_out);
16941 2 : ndr->depth--;
16942 2 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
16943 2 : ndr->depth++;
16944 2 : ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
16945 2 : ndr_print_drsuapi_DsAddEntryCtr(ndr, "ctr", r->out.ctr);
16946 2 : ndr->depth--;
16947 2 : ndr_print_WERROR(ndr, "result", r->out.result);
16948 2 : ndr->depth--;
16949 : }
16950 6 : ndr->depth--;
16951 : }
16952 :
16953 8 : static enum ndr_err_code ndr_push_drsuapi_DsExecuteKCC(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsExecuteKCC *r)
16954 : {
16955 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16956 8 : if (flags & NDR_IN) {
16957 4 : if (r->in.bind_handle == NULL) {
16958 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16959 : }
16960 4 : if (r->in.req == NULL) {
16961 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16962 : }
16963 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16964 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16965 4 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
16966 4 : NDR_CHECK(ndr_push_drsuapi_DsExecuteKCCRequest(ndr, NDR_SCALARS, r->in.req));
16967 : }
16968 8 : if (flags & NDR_OUT) {
16969 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16970 : }
16971 8 : return NDR_ERR_SUCCESS;
16972 : }
16973 :
16974 8 : static enum ndr_err_code ndr_pull_drsuapi_DsExecuteKCC(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsExecuteKCC *r)
16975 : {
16976 8 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
16977 8 : TALLOC_CTX *_mem_save_req_0 = NULL;
16978 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16979 8 : if (flags & NDR_IN) {
16980 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16981 4 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
16982 : }
16983 4 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16984 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
16985 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
16986 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
16987 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16988 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16989 4 : NDR_PULL_ALLOC(ndr, r->in.req);
16990 : }
16991 4 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
16992 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
16993 4 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
16994 4 : NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCCRequest(ndr, NDR_SCALARS, r->in.req));
16995 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
16996 : }
16997 8 : if (flags & NDR_OUT) {
16998 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16999 : if (r->in.bind_handle == NULL) {
17000 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
17001 : NDR_ZERO_STRUCTP(r->in.bind_handle);
17002 : }
17003 : if (r->in.req == NULL) {
17004 : NDR_PULL_ALLOC(ndr, r->in.req);
17005 : NDR_ZERO_STRUCTP(r->in.req);
17006 : }
17007 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17008 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17009 : }
17010 8 : return NDR_ERR_SUCCESS;
17011 : }
17012 :
17013 0 : _PUBLIC_ void ndr_print_drsuapi_DsExecuteKCC(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsExecuteKCC *r)
17014 : {
17015 0 : ndr_print_struct(ndr, name, "drsuapi_DsExecuteKCC");
17016 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17017 0 : ndr->depth++;
17018 0 : if (flags & NDR_SET_VALUES) {
17019 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17020 : }
17021 0 : if (flags & NDR_IN) {
17022 0 : ndr_print_struct(ndr, "in", "drsuapi_DsExecuteKCC");
17023 0 : ndr->depth++;
17024 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
17025 0 : ndr->depth++;
17026 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
17027 0 : ndr->depth--;
17028 0 : ndr_print_uint32(ndr, "level", r->in.level);
17029 0 : ndr_print_ptr(ndr, "req", r->in.req);
17030 0 : ndr->depth++;
17031 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
17032 0 : ndr_print_drsuapi_DsExecuteKCCRequest(ndr, "req", r->in.req);
17033 0 : ndr->depth--;
17034 0 : ndr->depth--;
17035 : }
17036 0 : if (flags & NDR_OUT) {
17037 0 : ndr_print_struct(ndr, "out", "drsuapi_DsExecuteKCC");
17038 0 : ndr->depth++;
17039 0 : ndr_print_WERROR(ndr, "result", r->out.result);
17040 0 : ndr->depth--;
17041 : }
17042 0 : ndr->depth--;
17043 : }
17044 :
17045 120 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaGetInfo *r)
17046 : {
17047 120 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17048 120 : if (flags & NDR_IN) {
17049 60 : if (r->in.bind_handle == NULL) {
17050 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17051 : }
17052 60 : if (r->in.req == NULL) {
17053 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17054 : }
17055 60 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
17056 60 : NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoLevel(ndr, NDR_SCALARS, r->in.level));
17057 60 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
17058 60 : NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
17059 : }
17060 120 : if (flags & NDR_OUT) {
17061 60 : if (r->out.info_type == NULL) {
17062 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17063 : }
17064 60 : if (r->out.info == NULL) {
17065 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17066 : }
17067 60 : NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, *r->out.info_type));
17068 60 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, *r->out.info_type));
17069 60 : NDR_CHECK(ndr_push_drsuapi_DsReplicaInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
17070 60 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17071 : }
17072 120 : return NDR_ERR_SUCCESS;
17073 : }
17074 :
17075 120 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaGetInfo *r)
17076 : {
17077 120 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
17078 120 : TALLOC_CTX *_mem_save_req_0 = NULL;
17079 120 : TALLOC_CTX *_mem_save_info_type_0 = NULL;
17080 120 : TALLOC_CTX *_mem_save_info_0 = NULL;
17081 120 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17082 120 : if (flags & NDR_IN) {
17083 60 : NDR_ZERO_STRUCT(r->out);
17084 :
17085 60 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17086 60 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
17087 : }
17088 60 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17089 60 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
17090 60 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
17091 60 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
17092 60 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoLevel(ndr, NDR_SCALARS, &r->in.level));
17093 60 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17094 60 : NDR_PULL_ALLOC(ndr, r->in.req);
17095 : }
17096 60 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
17097 60 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
17098 60 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
17099 60 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
17100 60 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
17101 60 : NDR_PULL_ALLOC(ndr, r->out.info_type);
17102 60 : NDR_ZERO_STRUCTP(r->out.info_type);
17103 60 : NDR_PULL_ALLOC(ndr, r->out.info);
17104 60 : NDR_ZERO_STRUCTP(r->out.info);
17105 : }
17106 120 : if (flags & NDR_OUT) {
17107 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17108 : if (r->in.bind_handle == NULL) {
17109 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
17110 : NDR_ZERO_STRUCTP(r->in.bind_handle);
17111 : }
17112 : if (r->in.req == NULL) {
17113 : NDR_PULL_ALLOC(ndr, r->in.req);
17114 : NDR_ZERO_STRUCTP(r->in.req);
17115 : }
17116 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17117 60 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17118 60 : NDR_PULL_ALLOC(ndr, r->out.info_type);
17119 : }
17120 60 : _mem_save_info_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
17121 60 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info_type, LIBNDR_FLAG_REF_ALLOC);
17122 60 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, r->out.info_type));
17123 60 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_type_0, LIBNDR_FLAG_REF_ALLOC);
17124 60 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17125 60 : NDR_PULL_ALLOC(ndr, r->out.info);
17126 : }
17127 60 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
17128 60 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
17129 60 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, *r->out.info_type));
17130 60 : NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
17131 60 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
17132 60 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17133 : }
17134 120 : return NDR_ERR_SUCCESS;
17135 : }
17136 :
17137 0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaGetInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaGetInfo *r)
17138 : {
17139 0 : ndr_print_struct(ndr, name, "drsuapi_DsReplicaGetInfo");
17140 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17141 0 : ndr->depth++;
17142 0 : if (flags & NDR_SET_VALUES) {
17143 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17144 : }
17145 0 : if (flags & NDR_IN) {
17146 0 : ndr_print_struct(ndr, "in", "drsuapi_DsReplicaGetInfo");
17147 0 : ndr->depth++;
17148 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
17149 0 : ndr->depth++;
17150 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
17151 0 : ndr->depth--;
17152 0 : ndr_print_drsuapi_DsReplicaGetInfoLevel(ndr, "level", r->in.level);
17153 0 : ndr_print_ptr(ndr, "req", r->in.req);
17154 0 : ndr->depth++;
17155 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
17156 0 : ndr_print_drsuapi_DsReplicaGetInfoRequest(ndr, "req", r->in.req);
17157 0 : ndr->depth--;
17158 0 : ndr->depth--;
17159 : }
17160 0 : if (flags & NDR_OUT) {
17161 0 : ndr_print_struct(ndr, "out", "drsuapi_DsReplicaGetInfo");
17162 0 : ndr->depth++;
17163 0 : ndr_print_ptr(ndr, "info_type", r->out.info_type);
17164 0 : ndr->depth++;
17165 0 : ndr_print_drsuapi_DsReplicaInfoType(ndr, "info_type", *r->out.info_type);
17166 0 : ndr->depth--;
17167 0 : ndr_print_ptr(ndr, "info", r->out.info);
17168 0 : ndr->depth++;
17169 0 : ndr_print_set_switch_value(ndr, r->out.info, *r->out.info_type);
17170 0 : ndr_print_drsuapi_DsReplicaInfo(ndr, "info", r->out.info);
17171 0 : ndr->depth--;
17172 0 : ndr_print_WERROR(ndr, "result", r->out.result);
17173 0 : ndr->depth--;
17174 : }
17175 0 : ndr->depth--;
17176 : }
17177 :
17178 0 : static enum ndr_err_code ndr_push_DRSUAPI_ADD_SID_HISTORY(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_ADD_SID_HISTORY *r)
17179 : {
17180 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17181 0 : if (flags & NDR_IN) {
17182 0 : }
17183 0 : if (flags & NDR_OUT) {
17184 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17185 : }
17186 0 : return NDR_ERR_SUCCESS;
17187 : }
17188 :
17189 0 : static enum ndr_err_code ndr_pull_DRSUAPI_ADD_SID_HISTORY(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_ADD_SID_HISTORY *r)
17190 : {
17191 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17192 0 : if (flags & NDR_IN) {
17193 0 : }
17194 0 : if (flags & NDR_OUT) {
17195 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17196 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17197 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17198 : }
17199 0 : return NDR_ERR_SUCCESS;
17200 : }
17201 :
17202 0 : _PUBLIC_ void ndr_print_DRSUAPI_ADD_SID_HISTORY(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_ADD_SID_HISTORY *r)
17203 : {
17204 0 : ndr_print_struct(ndr, name, "DRSUAPI_ADD_SID_HISTORY");
17205 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17206 0 : ndr->depth++;
17207 0 : if (flags & NDR_SET_VALUES) {
17208 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17209 : }
17210 0 : if (flags & NDR_IN) {
17211 0 : ndr_print_struct(ndr, "in", "DRSUAPI_ADD_SID_HISTORY");
17212 0 : ndr->depth++;
17213 0 : ndr->depth--;
17214 : }
17215 0 : if (flags & NDR_OUT) {
17216 0 : ndr_print_struct(ndr, "out", "DRSUAPI_ADD_SID_HISTORY");
17217 0 : ndr->depth++;
17218 0 : ndr_print_WERROR(ndr, "result", r->out.result);
17219 0 : ndr->depth--;
17220 : }
17221 0 : ndr->depth--;
17222 : }
17223 :
17224 0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsGetMemberships2 *r)
17225 : {
17226 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17227 0 : if (flags & NDR_IN) {
17228 0 : if (r->in.bind_handle == NULL) {
17229 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17230 : }
17231 0 : if (r->in.req == NULL) {
17232 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17233 : }
17234 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
17235 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
17236 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
17237 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
17238 : }
17239 0 : if (flags & NDR_OUT) {
17240 0 : if (r->out.level_out == NULL) {
17241 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17242 : }
17243 0 : if (r->out.ctr == NULL) {
17244 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17245 : }
17246 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
17247 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
17248 0 : NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
17249 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17250 : }
17251 0 : return NDR_ERR_SUCCESS;
17252 : }
17253 :
17254 0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsGetMemberships2 *r)
17255 : {
17256 0 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
17257 0 : TALLOC_CTX *_mem_save_req_0 = NULL;
17258 0 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
17259 0 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
17260 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17261 0 : if (flags & NDR_IN) {
17262 0 : NDR_ZERO_STRUCT(r->out);
17263 :
17264 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17265 0 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
17266 : }
17267 0 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17268 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
17269 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
17270 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
17271 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17272 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17273 0 : NDR_PULL_ALLOC(ndr, r->in.req);
17274 : }
17275 0 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
17276 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
17277 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
17278 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
17279 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
17280 0 : NDR_PULL_ALLOC(ndr, r->out.level_out);
17281 0 : NDR_ZERO_STRUCTP(r->out.level_out);
17282 0 : NDR_PULL_ALLOC(ndr, r->out.ctr);
17283 0 : NDR_ZERO_STRUCTP(r->out.ctr);
17284 : }
17285 0 : if (flags & NDR_OUT) {
17286 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17287 : if (r->in.bind_handle == NULL) {
17288 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
17289 : NDR_ZERO_STRUCTP(r->in.bind_handle);
17290 : }
17291 : if (r->in.req == NULL) {
17292 : NDR_PULL_ALLOC(ndr, r->in.req);
17293 : NDR_ZERO_STRUCTP(r->in.req);
17294 : }
17295 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17296 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17297 0 : NDR_PULL_ALLOC(ndr, r->out.level_out);
17298 : }
17299 0 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
17300 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
17301 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
17302 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
17303 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17304 0 : NDR_PULL_ALLOC(ndr, r->out.ctr);
17305 : }
17306 0 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
17307 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
17308 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
17309 0 : NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
17310 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
17311 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17312 : }
17313 0 : return NDR_ERR_SUCCESS;
17314 : }
17315 :
17316 0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMemberships2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsGetMemberships2 *r)
17317 : {
17318 0 : ndr_print_struct(ndr, name, "drsuapi_DsGetMemberships2");
17319 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17320 0 : ndr->depth++;
17321 0 : if (flags & NDR_SET_VALUES) {
17322 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17323 : }
17324 0 : if (flags & NDR_IN) {
17325 0 : ndr_print_struct(ndr, "in", "drsuapi_DsGetMemberships2");
17326 0 : ndr->depth++;
17327 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
17328 0 : ndr->depth++;
17329 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
17330 0 : ndr->depth--;
17331 0 : ndr_print_uint32(ndr, "level", r->in.level);
17332 0 : ndr_print_ptr(ndr, "req", r->in.req);
17333 0 : ndr->depth++;
17334 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
17335 0 : ndr_print_drsuapi_DsGetMemberships2Request(ndr, "req", r->in.req);
17336 0 : ndr->depth--;
17337 0 : ndr->depth--;
17338 : }
17339 0 : if (flags & NDR_OUT) {
17340 0 : ndr_print_struct(ndr, "out", "drsuapi_DsGetMemberships2");
17341 0 : ndr->depth++;
17342 0 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
17343 0 : ndr->depth++;
17344 0 : ndr_print_uint32(ndr, "level_out", *r->out.level_out);
17345 0 : ndr->depth--;
17346 0 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
17347 0 : ndr->depth++;
17348 0 : ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
17349 0 : ndr_print_drsuapi_DsGetMemberships2Ctr(ndr, "ctr", r->out.ctr);
17350 0 : ndr->depth--;
17351 0 : ndr_print_WERROR(ndr, "result", r->out.result);
17352 0 : ndr->depth--;
17353 : }
17354 0 : ndr->depth--;
17355 : }
17356 :
17357 0 : static enum ndr_err_code ndr_push_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_REPLICA_VERIFY_OBJECTS *r)
17358 : {
17359 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17360 0 : if (flags & NDR_IN) {
17361 0 : }
17362 0 : if (flags & NDR_OUT) {
17363 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17364 : }
17365 0 : return NDR_ERR_SUCCESS;
17366 : }
17367 :
17368 0 : static enum ndr_err_code ndr_pull_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_REPLICA_VERIFY_OBJECTS *r)
17369 : {
17370 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17371 0 : if (flags & NDR_IN) {
17372 0 : }
17373 0 : if (flags & NDR_OUT) {
17374 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17375 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17376 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17377 : }
17378 0 : return NDR_ERR_SUCCESS;
17379 : }
17380 :
17381 0 : _PUBLIC_ void ndr_print_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_REPLICA_VERIFY_OBJECTS *r)
17382 : {
17383 0 : ndr_print_struct(ndr, name, "DRSUAPI_REPLICA_VERIFY_OBJECTS");
17384 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17385 0 : ndr->depth++;
17386 0 : if (flags & NDR_SET_VALUES) {
17387 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17388 : }
17389 0 : if (flags & NDR_IN) {
17390 0 : ndr_print_struct(ndr, "in", "DRSUAPI_REPLICA_VERIFY_OBJECTS");
17391 0 : ndr->depth++;
17392 0 : ndr->depth--;
17393 : }
17394 0 : if (flags & NDR_OUT) {
17395 0 : ndr_print_struct(ndr, "out", "DRSUAPI_REPLICA_VERIFY_OBJECTS");
17396 0 : ndr->depth++;
17397 0 : ndr_print_WERROR(ndr, "result", r->out.result);
17398 0 : ndr->depth--;
17399 : }
17400 0 : ndr->depth--;
17401 : }
17402 :
17403 0 : static enum ndr_err_code ndr_push_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_GET_OBJECT_EXISTENCE *r)
17404 : {
17405 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17406 0 : if (flags & NDR_IN) {
17407 0 : }
17408 0 : if (flags & NDR_OUT) {
17409 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17410 : }
17411 0 : return NDR_ERR_SUCCESS;
17412 : }
17413 :
17414 0 : static enum ndr_err_code ndr_pull_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_GET_OBJECT_EXISTENCE *r)
17415 : {
17416 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17417 0 : if (flags & NDR_IN) {
17418 0 : }
17419 0 : if (flags & NDR_OUT) {
17420 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17421 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17422 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17423 : }
17424 0 : return NDR_ERR_SUCCESS;
17425 : }
17426 :
17427 0 : _PUBLIC_ void ndr_print_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_GET_OBJECT_EXISTENCE *r)
17428 : {
17429 0 : ndr_print_struct(ndr, name, "DRSUAPI_GET_OBJECT_EXISTENCE");
17430 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17431 0 : ndr->depth++;
17432 0 : if (flags & NDR_SET_VALUES) {
17433 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17434 : }
17435 0 : if (flags & NDR_IN) {
17436 0 : ndr_print_struct(ndr, "in", "DRSUAPI_GET_OBJECT_EXISTENCE");
17437 0 : ndr->depth++;
17438 0 : ndr->depth--;
17439 : }
17440 0 : if (flags & NDR_OUT) {
17441 0 : ndr_print_struct(ndr, "out", "DRSUAPI_GET_OBJECT_EXISTENCE");
17442 0 : ndr->depth++;
17443 0 : ndr_print_WERROR(ndr, "result", r->out.result);
17444 0 : ndr->depth--;
17445 : }
17446 0 : ndr->depth--;
17447 : }
17448 :
17449 0 : static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCost(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_QuerySitesByCost *r)
17450 : {
17451 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17452 0 : if (flags & NDR_IN) {
17453 0 : if (r->in.bind_handle == NULL) {
17454 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17455 : }
17456 0 : if (r->in.req == NULL) {
17457 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17458 : }
17459 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
17460 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
17461 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
17462 0 : NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
17463 : }
17464 0 : if (flags & NDR_OUT) {
17465 0 : if (r->out.level_out == NULL) {
17466 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17467 : }
17468 0 : if (r->out.ctr == NULL) {
17469 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17470 : }
17471 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
17472 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
17473 0 : NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
17474 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17475 : }
17476 0 : return NDR_ERR_SUCCESS;
17477 : }
17478 :
17479 0 : static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCost(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_QuerySitesByCost *r)
17480 : {
17481 0 : TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
17482 0 : TALLOC_CTX *_mem_save_req_0 = NULL;
17483 0 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
17484 0 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
17485 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17486 0 : if (flags & NDR_IN) {
17487 0 : NDR_ZERO_STRUCT(r->out);
17488 :
17489 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17490 0 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
17491 : }
17492 0 : _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17493 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
17494 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
17495 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
17496 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17497 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17498 0 : NDR_PULL_ALLOC(ndr, r->in.req);
17499 : }
17500 0 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
17501 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
17502 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
17503 0 : NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
17504 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
17505 0 : NDR_PULL_ALLOC(ndr, r->out.level_out);
17506 0 : NDR_ZERO_STRUCTP(r->out.level_out);
17507 0 : NDR_PULL_ALLOC(ndr, r->out.ctr);
17508 0 : NDR_ZERO_STRUCTP(r->out.ctr);
17509 : }
17510 0 : if (flags & NDR_OUT) {
17511 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17512 : if (r->in.bind_handle == NULL) {
17513 : NDR_PULL_ALLOC(ndr, r->in.bind_handle);
17514 : NDR_ZERO_STRUCTP(r->in.bind_handle);
17515 : }
17516 : if (r->in.req == NULL) {
17517 : NDR_PULL_ALLOC(ndr, r->in.req);
17518 : NDR_ZERO_STRUCTP(r->in.req);
17519 : }
17520 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17521 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17522 0 : NDR_PULL_ALLOC(ndr, r->out.level_out);
17523 : }
17524 0 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
17525 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
17526 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
17527 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
17528 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17529 0 : NDR_PULL_ALLOC(ndr, r->out.ctr);
17530 : }
17531 0 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
17532 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
17533 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
17534 0 : NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
17535 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
17536 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17537 : }
17538 0 : return NDR_ERR_SUCCESS;
17539 : }
17540 :
17541 0 : _PUBLIC_ void ndr_print_drsuapi_QuerySitesByCost(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_QuerySitesByCost *r)
17542 : {
17543 0 : ndr_print_struct(ndr, name, "drsuapi_QuerySitesByCost");
17544 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17545 0 : ndr->depth++;
17546 0 : if (flags & NDR_SET_VALUES) {
17547 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17548 : }
17549 0 : if (flags & NDR_IN) {
17550 0 : ndr_print_struct(ndr, "in", "drsuapi_QuerySitesByCost");
17551 0 : ndr->depth++;
17552 0 : ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
17553 0 : ndr->depth++;
17554 0 : ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
17555 0 : ndr->depth--;
17556 0 : ndr_print_uint32(ndr, "level", r->in.level);
17557 0 : ndr_print_ptr(ndr, "req", r->in.req);
17558 0 : ndr->depth++;
17559 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
17560 0 : ndr_print_drsuapi_QuerySitesByCostRequest(ndr, "req", r->in.req);
17561 0 : ndr->depth--;
17562 0 : ndr->depth--;
17563 : }
17564 0 : if (flags & NDR_OUT) {
17565 0 : ndr_print_struct(ndr, "out", "drsuapi_QuerySitesByCost");
17566 0 : ndr->depth++;
17567 0 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
17568 0 : ndr->depth++;
17569 0 : ndr_print_uint32(ndr, "level_out", *r->out.level_out);
17570 0 : ndr->depth--;
17571 0 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
17572 0 : ndr->depth++;
17573 0 : ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
17574 0 : ndr_print_drsuapi_QuerySitesByCostCtr(ndr, "ctr", r->out.ctr);
17575 0 : ndr->depth--;
17576 0 : ndr_print_WERROR(ndr, "result", r->out.result);
17577 0 : ndr->depth--;
17578 : }
17579 0 : ndr->depth--;
17580 : }
17581 :
17582 : #ifndef SKIP_NDR_TABLE_drsuapi
17583 : static const struct ndr_interface_public_struct drsuapi_public_structs[] = {
17584 : {
17585 : .name = "drsuapi_DsBindInfo24",
17586 : .struct_size = sizeof(struct drsuapi_DsBindInfo24 ),
17587 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfo24,
17588 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfo24,
17589 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfo24,
17590 : },
17591 : {
17592 : .name = "drsuapi_DsBindInfo28",
17593 : .struct_size = sizeof(struct drsuapi_DsBindInfo28 ),
17594 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfo28,
17595 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfo28,
17596 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfo28,
17597 : },
17598 : {
17599 : .name = "drsuapi_DsBindInfo32",
17600 : .struct_size = sizeof(struct drsuapi_DsBindInfo32 ),
17601 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfo32,
17602 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfo32,
17603 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfo32,
17604 : },
17605 : {
17606 : .name = "drsuapi_DsBindInfo48",
17607 : .struct_size = sizeof(struct drsuapi_DsBindInfo48 ),
17608 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfo48,
17609 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfo48,
17610 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfo48,
17611 : },
17612 : {
17613 : .name = "drsuapi_DsBindInfo52",
17614 : .struct_size = sizeof(struct drsuapi_DsBindInfo52 ),
17615 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfo52,
17616 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfo52,
17617 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfo52,
17618 : },
17619 : {
17620 : .name = "drsuapi_DsBindInfoFallBack",
17621 : .struct_size = sizeof(struct drsuapi_DsBindInfoFallBack ),
17622 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfoFallBack,
17623 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfoFallBack,
17624 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfoFallBack,
17625 : },
17626 : {
17627 : .name = "drsuapi_DsReplicaObjectIdentifier",
17628 : .struct_size = sizeof(struct drsuapi_DsReplicaObjectIdentifier ),
17629 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObjectIdentifier,
17630 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObjectIdentifier,
17631 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObjectIdentifier,
17632 : },
17633 : {
17634 : .name = "drsuapi_DsReplicaHighWaterMark",
17635 : .struct_size = sizeof(struct drsuapi_DsReplicaHighWaterMark ),
17636 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaHighWaterMark,
17637 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaHighWaterMark,
17638 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaHighWaterMark,
17639 : },
17640 : {
17641 : .name = "drsuapi_DsReplicaCursor",
17642 : .struct_size = sizeof(struct drsuapi_DsReplicaCursor ),
17643 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaCursor,
17644 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaCursor,
17645 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaCursor,
17646 : },
17647 : {
17648 : .name = "drsuapi_DsReplicaOIDMapping_Ctr",
17649 : .struct_size = sizeof(struct drsuapi_DsReplicaOIDMapping_Ctr ),
17650 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaOIDMapping_Ctr,
17651 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr,
17652 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaOIDMapping_Ctr,
17653 : },
17654 : {
17655 : .name = "drsuapi_DsGetNCChangesRequest8",
17656 : .struct_size = sizeof(struct drsuapi_DsGetNCChangesRequest8 ),
17657 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesRequest8,
17658 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesRequest8,
17659 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesRequest8,
17660 : },
17661 : {
17662 : .name = "drsuapi_DsGetNCChangesRequest10",
17663 : .struct_size = sizeof(struct drsuapi_DsGetNCChangesRequest10 ),
17664 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesRequest10,
17665 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesRequest10,
17666 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesRequest10,
17667 : },
17668 : {
17669 : .name = "drsuapi_DsReplicaCursor2",
17670 : .struct_size = sizeof(struct drsuapi_DsReplicaCursor2 ),
17671 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaCursor2,
17672 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaCursor2,
17673 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaCursor2,
17674 : },
17675 : {
17676 : .name = "drsuapi_DsReplicaObjectIdentifier3",
17677 : .struct_size = sizeof(struct drsuapi_DsReplicaObjectIdentifier3 ),
17678 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObjectIdentifier3,
17679 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObjectIdentifier3,
17680 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObjectIdentifier3,
17681 : },
17682 : {
17683 : .name = "drsuapi_DsReplicaObjectIdentifier3Binary",
17684 : .struct_size = sizeof(struct drsuapi_DsReplicaObjectIdentifier3Binary ),
17685 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary,
17686 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary,
17687 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObjectIdentifier3Binary,
17688 : },
17689 : {
17690 : .name = "drsuapi_DsReplicaAttribute",
17691 : .struct_size = sizeof(struct drsuapi_DsReplicaAttribute ),
17692 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaAttribute,
17693 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaAttribute,
17694 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaAttribute,
17695 : },
17696 : {
17697 : .name = "drsuapi_DsReplicaObject",
17698 : .struct_size = sizeof(struct drsuapi_DsReplicaObject ),
17699 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObject,
17700 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObject,
17701 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObject,
17702 : },
17703 : {
17704 : .name = "drsuapi_DsReplicaMetaDataCtr",
17705 : .struct_size = sizeof(struct drsuapi_DsReplicaMetaDataCtr ),
17706 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaMetaDataCtr,
17707 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaMetaDataCtr,
17708 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaMetaDataCtr,
17709 : },
17710 : {
17711 : .name = "drsuapi_DsReplicaObjectListItemEx",
17712 : .struct_size = sizeof(struct drsuapi_DsReplicaObjectListItemEx ),
17713 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObjectListItemEx,
17714 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObjectListItemEx,
17715 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObjectListItemEx,
17716 : },
17717 : {
17718 : .name = "drsuapi_DsGetNCChangesCtr1",
17719 : .struct_size = sizeof(struct drsuapi_DsGetNCChangesCtr1 ),
17720 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesCtr1,
17721 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesCtr1,
17722 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesCtr1,
17723 : },
17724 : {
17725 : .name = "drsuapi_DsReplicaLinkedAttribute",
17726 : .struct_size = sizeof(struct drsuapi_DsReplicaLinkedAttribute ),
17727 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaLinkedAttribute,
17728 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaLinkedAttribute,
17729 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaLinkedAttribute,
17730 : },
17731 : {
17732 : .name = "drsuapi_DsGetNCChangesCtr6",
17733 : .struct_size = sizeof(struct drsuapi_DsGetNCChangesCtr6 ),
17734 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesCtr6,
17735 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesCtr6,
17736 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesCtr6,
17737 : },
17738 : {
17739 : .name = "drsuapi_DsGetNCChangesCtr1TS",
17740 : .struct_size = sizeof(struct drsuapi_DsGetNCChangesCtr1TS ),
17741 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesCtr1TS,
17742 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesCtr1TS,
17743 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesCtr1TS,
17744 : },
17745 : {
17746 : .name = "drsuapi_DsGetNCChangesCtr6TS",
17747 : .struct_size = sizeof(struct drsuapi_DsGetNCChangesCtr6TS ),
17748 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesCtr6TS,
17749 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesCtr6TS,
17750 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesCtr6TS,
17751 : },
17752 : {
17753 : .name = "drsuapi_DsReplicaObjectListItem",
17754 : .struct_size = sizeof(struct drsuapi_DsReplicaObjectListItem ),
17755 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObjectListItem,
17756 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObjectListItem,
17757 : .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObjectListItem,
17758 : },
17759 : { .name = NULL }
17760 : };
17761 :
17762 : static const struct ndr_interface_call drsuapi_calls[] = {
17763 : {
17764 : "drsuapi_DsBind",
17765 : sizeof(struct drsuapi_DsBind),
17766 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBind,
17767 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBind,
17768 : (ndr_print_function_t) ndr_print_drsuapi_DsBind,
17769 : { 0, NULL },
17770 : { 0, NULL },
17771 : },
17772 : {
17773 : "drsuapi_DsUnbind",
17774 : sizeof(struct drsuapi_DsUnbind),
17775 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsUnbind,
17776 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsUnbind,
17777 : (ndr_print_function_t) ndr_print_drsuapi_DsUnbind,
17778 : { 0, NULL },
17779 : { 0, NULL },
17780 : },
17781 : {
17782 : "drsuapi_DsReplicaSync",
17783 : sizeof(struct drsuapi_DsReplicaSync),
17784 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaSync,
17785 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaSync,
17786 : (ndr_print_function_t) ndr_print_drsuapi_DsReplicaSync,
17787 : { 0, NULL },
17788 : { 0, NULL },
17789 : },
17790 : {
17791 : "drsuapi_DsGetNCChanges",
17792 : sizeof(struct drsuapi_DsGetNCChanges),
17793 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChanges,
17794 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChanges,
17795 : (ndr_print_function_t) ndr_print_drsuapi_DsGetNCChanges,
17796 : { 0, NULL },
17797 : { 0, NULL },
17798 : },
17799 : {
17800 : "drsuapi_DsReplicaUpdateRefs",
17801 : sizeof(struct drsuapi_DsReplicaUpdateRefs),
17802 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaUpdateRefs,
17803 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaUpdateRefs,
17804 : (ndr_print_function_t) ndr_print_drsuapi_DsReplicaUpdateRefs,
17805 : { 0, NULL },
17806 : { 0, NULL },
17807 : },
17808 : {
17809 : "drsuapi_DsReplicaAdd",
17810 : sizeof(struct drsuapi_DsReplicaAdd),
17811 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaAdd,
17812 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaAdd,
17813 : (ndr_print_function_t) ndr_print_drsuapi_DsReplicaAdd,
17814 : { 0, NULL },
17815 : { 0, NULL },
17816 : },
17817 : {
17818 : "drsuapi_DsReplicaDel",
17819 : sizeof(struct drsuapi_DsReplicaDel),
17820 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaDel,
17821 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaDel,
17822 : (ndr_print_function_t) ndr_print_drsuapi_DsReplicaDel,
17823 : { 0, NULL },
17824 : { 0, NULL },
17825 : },
17826 : {
17827 : "drsuapi_DsReplicaMod",
17828 : sizeof(struct drsuapi_DsReplicaMod),
17829 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaMod,
17830 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaMod,
17831 : (ndr_print_function_t) ndr_print_drsuapi_DsReplicaMod,
17832 : { 0, NULL },
17833 : { 0, NULL },
17834 : },
17835 : {
17836 : "DRSUAPI_VERIFY_NAMES",
17837 : sizeof(struct DRSUAPI_VERIFY_NAMES),
17838 : (ndr_push_flags_fn_t) ndr_push_DRSUAPI_VERIFY_NAMES,
17839 : (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_VERIFY_NAMES,
17840 : (ndr_print_function_t) ndr_print_DRSUAPI_VERIFY_NAMES,
17841 : { 0, NULL },
17842 : { 0, NULL },
17843 : },
17844 : {
17845 : "drsuapi_DsGetMemberships",
17846 : sizeof(struct drsuapi_DsGetMemberships),
17847 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetMemberships,
17848 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetMemberships,
17849 : (ndr_print_function_t) ndr_print_drsuapi_DsGetMemberships,
17850 : { 0, NULL },
17851 : { 0, NULL },
17852 : },
17853 : {
17854 : "DRSUAPI_INTER_DOMAIN_MOVE",
17855 : sizeof(struct DRSUAPI_INTER_DOMAIN_MOVE),
17856 : (ndr_push_flags_fn_t) ndr_push_DRSUAPI_INTER_DOMAIN_MOVE,
17857 : (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_INTER_DOMAIN_MOVE,
17858 : (ndr_print_function_t) ndr_print_DRSUAPI_INTER_DOMAIN_MOVE,
17859 : { 0, NULL },
17860 : { 0, NULL },
17861 : },
17862 : {
17863 : "drsuapi_DsGetNT4ChangeLog",
17864 : sizeof(struct drsuapi_DsGetNT4ChangeLog),
17865 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNT4ChangeLog,
17866 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNT4ChangeLog,
17867 : (ndr_print_function_t) ndr_print_drsuapi_DsGetNT4ChangeLog,
17868 : { 0, NULL },
17869 : { 0, NULL },
17870 : },
17871 : {
17872 : "drsuapi_DsCrackNames",
17873 : sizeof(struct drsuapi_DsCrackNames),
17874 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsCrackNames,
17875 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsCrackNames,
17876 : (ndr_print_function_t) ndr_print_drsuapi_DsCrackNames,
17877 : { 0, NULL },
17878 : { 0, NULL },
17879 : },
17880 : {
17881 : "drsuapi_DsWriteAccountSpn",
17882 : sizeof(struct drsuapi_DsWriteAccountSpn),
17883 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsWriteAccountSpn,
17884 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsWriteAccountSpn,
17885 : (ndr_print_function_t) ndr_print_drsuapi_DsWriteAccountSpn,
17886 : { 0, NULL },
17887 : { 0, NULL },
17888 : },
17889 : {
17890 : "drsuapi_DsRemoveDSServer",
17891 : sizeof(struct drsuapi_DsRemoveDSServer),
17892 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsRemoveDSServer,
17893 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsRemoveDSServer,
17894 : (ndr_print_function_t) ndr_print_drsuapi_DsRemoveDSServer,
17895 : { 0, NULL },
17896 : { 0, NULL },
17897 : },
17898 : {
17899 : "DRSUAPI_REMOVE_DS_DOMAIN",
17900 : sizeof(struct DRSUAPI_REMOVE_DS_DOMAIN),
17901 : (ndr_push_flags_fn_t) ndr_push_DRSUAPI_REMOVE_DS_DOMAIN,
17902 : (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_REMOVE_DS_DOMAIN,
17903 : (ndr_print_function_t) ndr_print_DRSUAPI_REMOVE_DS_DOMAIN,
17904 : { 0, NULL },
17905 : { 0, NULL },
17906 : },
17907 : {
17908 : "drsuapi_DsGetDomainControllerInfo",
17909 : sizeof(struct drsuapi_DsGetDomainControllerInfo),
17910 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetDomainControllerInfo,
17911 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetDomainControllerInfo,
17912 : (ndr_print_function_t) ndr_print_drsuapi_DsGetDomainControllerInfo,
17913 : { 0, NULL },
17914 : { 0, NULL },
17915 : },
17916 : {
17917 : "drsuapi_DsAddEntry",
17918 : sizeof(struct drsuapi_DsAddEntry),
17919 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsAddEntry,
17920 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsAddEntry,
17921 : (ndr_print_function_t) ndr_print_drsuapi_DsAddEntry,
17922 : { 0, NULL },
17923 : { 0, NULL },
17924 : },
17925 : {
17926 : "drsuapi_DsExecuteKCC",
17927 : sizeof(struct drsuapi_DsExecuteKCC),
17928 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsExecuteKCC,
17929 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsExecuteKCC,
17930 : (ndr_print_function_t) ndr_print_drsuapi_DsExecuteKCC,
17931 : { 0, NULL },
17932 : { 0, NULL },
17933 : },
17934 : {
17935 : "drsuapi_DsReplicaGetInfo",
17936 : sizeof(struct drsuapi_DsReplicaGetInfo),
17937 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaGetInfo,
17938 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaGetInfo,
17939 : (ndr_print_function_t) ndr_print_drsuapi_DsReplicaGetInfo,
17940 : { 0, NULL },
17941 : { 0, NULL },
17942 : },
17943 : {
17944 : "DRSUAPI_ADD_SID_HISTORY",
17945 : sizeof(struct DRSUAPI_ADD_SID_HISTORY),
17946 : (ndr_push_flags_fn_t) ndr_push_DRSUAPI_ADD_SID_HISTORY,
17947 : (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_ADD_SID_HISTORY,
17948 : (ndr_print_function_t) ndr_print_DRSUAPI_ADD_SID_HISTORY,
17949 : { 0, NULL },
17950 : { 0, NULL },
17951 : },
17952 : {
17953 : "drsuapi_DsGetMemberships2",
17954 : sizeof(struct drsuapi_DsGetMemberships2),
17955 : (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetMemberships2,
17956 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetMemberships2,
17957 : (ndr_print_function_t) ndr_print_drsuapi_DsGetMemberships2,
17958 : { 0, NULL },
17959 : { 0, NULL },
17960 : },
17961 : {
17962 : "DRSUAPI_REPLICA_VERIFY_OBJECTS",
17963 : sizeof(struct DRSUAPI_REPLICA_VERIFY_OBJECTS),
17964 : (ndr_push_flags_fn_t) ndr_push_DRSUAPI_REPLICA_VERIFY_OBJECTS,
17965 : (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_REPLICA_VERIFY_OBJECTS,
17966 : (ndr_print_function_t) ndr_print_DRSUAPI_REPLICA_VERIFY_OBJECTS,
17967 : { 0, NULL },
17968 : { 0, NULL },
17969 : },
17970 : {
17971 : "DRSUAPI_GET_OBJECT_EXISTENCE",
17972 : sizeof(struct DRSUAPI_GET_OBJECT_EXISTENCE),
17973 : (ndr_push_flags_fn_t) ndr_push_DRSUAPI_GET_OBJECT_EXISTENCE,
17974 : (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_GET_OBJECT_EXISTENCE,
17975 : (ndr_print_function_t) ndr_print_DRSUAPI_GET_OBJECT_EXISTENCE,
17976 : { 0, NULL },
17977 : { 0, NULL },
17978 : },
17979 : {
17980 : "drsuapi_QuerySitesByCost",
17981 : sizeof(struct drsuapi_QuerySitesByCost),
17982 : (ndr_push_flags_fn_t) ndr_push_drsuapi_QuerySitesByCost,
17983 : (ndr_pull_flags_fn_t) ndr_pull_drsuapi_QuerySitesByCost,
17984 : (ndr_print_function_t) ndr_print_drsuapi_QuerySitesByCost,
17985 : { 0, NULL },
17986 : { 0, NULL },
17987 : },
17988 : { .name = NULL }
17989 : };
17990 :
17991 : static const char * const drsuapi_endpoint_strings[] = {
17992 : "ncacn_np:[\\pipe\\lsass]",
17993 : "ncacn_np:[\\pipe\\protected_storage]",
17994 : "ncacn_ip_tcp:",
17995 : "ncalrpc:",
17996 : };
17997 :
17998 : static const struct ndr_interface_string_array drsuapi_endpoints = {
17999 : .count = 4,
18000 : .names = drsuapi_endpoint_strings
18001 : };
18002 :
18003 : static const char * const drsuapi_authservice_strings[] = {
18004 : "ldap",
18005 : };
18006 :
18007 : static const struct ndr_interface_string_array drsuapi_authservices = {
18008 : .count = 1,
18009 : .names = drsuapi_authservice_strings
18010 : };
18011 :
18012 :
18013 : const struct ndr_interface_table ndr_table_drsuapi = {
18014 : .name = "drsuapi",
18015 : .syntax_id = {
18016 : {0xe3514235,0x4b06,0x11d1,{0xab,0x04},{0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},
18017 : NDR_DRSUAPI_VERSION
18018 : },
18019 : .helpstring = NDR_DRSUAPI_HELPSTRING,
18020 : .num_calls = 25,
18021 : .calls = drsuapi_calls,
18022 : .num_public_structs = 25,
18023 : .public_structs = drsuapi_public_structs,
18024 : .endpoints = &drsuapi_endpoints,
18025 : .authservices = &drsuapi_authservices
18026 : };
18027 :
18028 : #endif /* SKIP_NDR_TABLE_drsuapi */
|