Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_dnsserver.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_dnsp.h"
8 7046 : static enum ndr_err_code ndr_push_DNS_RPC_CLIENT_VERSION(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum DNS_RPC_CLIENT_VERSION r)
9 : {
10 7046 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
11 7046 : return NDR_ERR_SUCCESS;
12 : }
13 :
14 6958 : static enum ndr_err_code ndr_pull_DNS_RPC_CLIENT_VERSION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum DNS_RPC_CLIENT_VERSION *r)
15 : {
16 0 : uint32_t v;
17 6958 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
18 6958 : *r = v;
19 6958 : return NDR_ERR_SUCCESS;
20 : }
21 :
22 2 : _PUBLIC_ void ndr_print_DNS_RPC_CLIENT_VERSION(struct ndr_print *ndr, const char *name, enum DNS_RPC_CLIENT_VERSION r)
23 : {
24 2 : const char *val = NULL;
25 :
26 2 : switch (r) {
27 0 : case DNS_CLIENT_VERSION_W2K: val = "DNS_CLIENT_VERSION_W2K"; break;
28 0 : case DNS_CLIENT_VERSION_DOTNET: val = "DNS_CLIENT_VERSION_DOTNET"; break;
29 2 : case DNS_CLIENT_VERSION_LONGHORN: val = "DNS_CLIENT_VERSION_LONGHORN"; break;
30 : }
31 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
32 2 : }
33 :
34 0 : static enum ndr_err_code ndr_push_DNS_RPC_BUFFER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_BUFFER *r)
35 : {
36 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
37 0 : if (ndr_flags & NDR_SCALARS) {
38 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->dwLength));
39 0 : NDR_CHECK(ndr_push_align(ndr, 4));
40 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLength));
41 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Buffer, r->dwLength));
42 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
43 : }
44 0 : if (ndr_flags & NDR_BUFFERS) {
45 0 : }
46 0 : return NDR_ERR_SUCCESS;
47 : }
48 :
49 0 : static enum ndr_err_code ndr_pull_DNS_RPC_BUFFER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_BUFFER *r)
50 : {
51 0 : uint32_t size_Buffer_0 = 0;
52 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
53 0 : if (ndr_flags & NDR_SCALARS) {
54 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->Buffer));
55 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
56 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLength));
57 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->Buffer, &size_Buffer_0));
58 0 : NDR_PULL_ALLOC_N(ndr, r->Buffer, size_Buffer_0);
59 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Buffer, size_Buffer_0));
60 0 : if (r->Buffer) {
61 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->Buffer, r->dwLength));
62 : }
63 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
64 : }
65 0 : if (ndr_flags & NDR_BUFFERS) {
66 0 : }
67 0 : return NDR_ERR_SUCCESS;
68 : }
69 :
70 0 : _PUBLIC_ void ndr_print_DNS_RPC_BUFFER(struct ndr_print *ndr, const char *name, const struct DNS_RPC_BUFFER *r)
71 : {
72 0 : ndr_print_struct(ndr, name, "DNS_RPC_BUFFER");
73 0 : if (r == NULL) { ndr_print_null(ndr); return; }
74 0 : ndr->depth++;
75 0 : ndr_print_uint32(ndr, "dwLength", r->dwLength);
76 0 : ndr_print_array_uint8(ndr, "Buffer", r->Buffer, r->dwLength);
77 0 : ndr->depth--;
78 : }
79 :
80 0 : static enum ndr_err_code ndr_push_DNS_RPC_UTF8_STRING_LIST(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_UTF8_STRING_LIST *r)
81 : {
82 0 : uint32_t cntr_pszStrings_0;
83 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
84 0 : if (ndr_flags & NDR_SCALARS) {
85 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->dwCount));
86 0 : NDR_CHECK(ndr_push_align(ndr, 5));
87 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwCount));
88 0 : for (cntr_pszStrings_0 = 0; cntr_pszStrings_0 < (r->dwCount); cntr_pszStrings_0++) {
89 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszStrings[cntr_pszStrings_0]));
90 : }
91 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
92 : }
93 0 : if (ndr_flags & NDR_BUFFERS) {
94 0 : for (cntr_pszStrings_0 = 0; cntr_pszStrings_0 < (r->dwCount); cntr_pszStrings_0++) {
95 0 : if (r->pszStrings[cntr_pszStrings_0]) {
96 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszStrings[cntr_pszStrings_0], CH_UTF8)));
97 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
98 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszStrings[cntr_pszStrings_0], CH_UTF8)));
99 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszStrings[cntr_pszStrings_0], ndr_charset_length(r->pszStrings[cntr_pszStrings_0], CH_UTF8), sizeof(uint8_t), CH_UTF8));
100 : }
101 : }
102 : }
103 0 : return NDR_ERR_SUCCESS;
104 : }
105 :
106 0 : static enum ndr_err_code ndr_pull_DNS_RPC_UTF8_STRING_LIST(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_UTF8_STRING_LIST *r)
107 : {
108 0 : uint32_t _ptr_pszStrings;
109 0 : uint32_t size_pszStrings_0 = 0;
110 0 : uint32_t cntr_pszStrings_0;
111 0 : uint32_t size_pszStrings_2 = 0;
112 0 : uint32_t length_pszStrings_2 = 0;
113 0 : TALLOC_CTX *_mem_save_pszStrings_0 = NULL;
114 0 : TALLOC_CTX *_mem_save_pszStrings_1 = NULL;
115 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
116 0 : if (ndr_flags & NDR_SCALARS) {
117 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszStrings));
118 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
119 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwCount));
120 0 : if (r->dwCount > 10000) {
121 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->dwCount), (uint32_t)(0), (uint32_t)(10000));
122 : }
123 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pszStrings, &size_pszStrings_0));
124 0 : NDR_PULL_ALLOC_N(ndr, r->pszStrings, size_pszStrings_0);
125 0 : _mem_save_pszStrings_0 = NDR_PULL_GET_MEM_CTX(ndr);
126 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszStrings, 0);
127 0 : for (cntr_pszStrings_0 = 0; cntr_pszStrings_0 < (size_pszStrings_0); cntr_pszStrings_0++) {
128 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszStrings));
129 0 : if (_ptr_pszStrings) {
130 0 : NDR_PULL_ALLOC(ndr, r->pszStrings[cntr_pszStrings_0]);
131 : } else {
132 0 : r->pszStrings[cntr_pszStrings_0] = NULL;
133 : }
134 : }
135 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszStrings_0, 0);
136 0 : if (r->pszStrings) {
137 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->pszStrings, r->dwCount));
138 : }
139 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
140 : }
141 0 : if (ndr_flags & NDR_BUFFERS) {
142 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pszStrings, &size_pszStrings_0));
143 0 : _mem_save_pszStrings_0 = NDR_PULL_GET_MEM_CTX(ndr);
144 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszStrings, 0);
145 0 : for (cntr_pszStrings_0 = 0; cntr_pszStrings_0 < (size_pszStrings_0); cntr_pszStrings_0++) {
146 0 : if (r->pszStrings[cntr_pszStrings_0]) {
147 0 : _mem_save_pszStrings_1 = NDR_PULL_GET_MEM_CTX(ndr);
148 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszStrings[cntr_pszStrings_0], 0);
149 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszStrings[cntr_pszStrings_0]));
150 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszStrings[cntr_pszStrings_0]));
151 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszStrings[cntr_pszStrings_0], &size_pszStrings_2));
152 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszStrings[cntr_pszStrings_0], &length_pszStrings_2));
153 0 : if (length_pszStrings_2 > size_pszStrings_2) {
154 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszStrings_2, length_pszStrings_2);
155 : }
156 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszStrings_2, sizeof(uint8_t)));
157 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszStrings[cntr_pszStrings_0], length_pszStrings_2, sizeof(uint8_t), CH_UTF8));
158 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszStrings_1, 0);
159 : }
160 : }
161 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszStrings_0, 0);
162 0 : for (cntr_pszStrings_0 = 0; cntr_pszStrings_0 < (size_pszStrings_0); cntr_pszStrings_0++) {
163 : }
164 : }
165 0 : return NDR_ERR_SUCCESS;
166 : }
167 :
168 0 : _PUBLIC_ void ndr_print_DNS_RPC_UTF8_STRING_LIST(struct ndr_print *ndr, const char *name, const struct DNS_RPC_UTF8_STRING_LIST *r)
169 : {
170 0 : uint32_t cntr_pszStrings_0;
171 0 : ndr_print_struct(ndr, name, "DNS_RPC_UTF8_STRING_LIST");
172 0 : if (r == NULL) { ndr_print_null(ndr); return; }
173 0 : ndr->depth++;
174 0 : ndr_print_uint32(ndr, "dwCount", r->dwCount);
175 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pszStrings", (uint32_t)(r->dwCount));
176 0 : ndr->depth++;
177 0 : for (cntr_pszStrings_0 = 0; cntr_pszStrings_0 < (r->dwCount); cntr_pszStrings_0++) {
178 0 : ndr_print_ptr(ndr, "pszStrings", r->pszStrings[cntr_pszStrings_0]);
179 0 : ndr->depth++;
180 0 : if (r->pszStrings[cntr_pszStrings_0]) {
181 0 : ndr_print_string(ndr, "pszStrings", r->pszStrings[cntr_pszStrings_0]);
182 : }
183 0 : ndr->depth--;
184 : }
185 0 : ndr->depth--;
186 0 : ndr->depth--;
187 : }
188 :
189 799 : static enum ndr_err_code ndr_push_DNS_RPC_NAME_AND_PARAM(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_NAME_AND_PARAM *r)
190 : {
191 799 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
192 799 : if (ndr_flags & NDR_SCALARS) {
193 799 : NDR_CHECK(ndr_push_align(ndr, 5));
194 799 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwParam));
195 799 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszNodeName));
196 799 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
197 : }
198 799 : if (ndr_flags & NDR_BUFFERS) {
199 799 : if (r->pszNodeName) {
200 799 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszNodeName, CH_UTF8)));
201 799 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
202 799 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszNodeName, CH_UTF8)));
203 799 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszNodeName, ndr_charset_length(r->pszNodeName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
204 : }
205 : }
206 799 : return NDR_ERR_SUCCESS;
207 : }
208 :
209 799 : static enum ndr_err_code ndr_pull_DNS_RPC_NAME_AND_PARAM(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_NAME_AND_PARAM *r)
210 : {
211 0 : uint32_t _ptr_pszNodeName;
212 799 : uint32_t size_pszNodeName_1 = 0;
213 799 : uint32_t length_pszNodeName_1 = 0;
214 799 : TALLOC_CTX *_mem_save_pszNodeName_0 = NULL;
215 799 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
216 799 : if (ndr_flags & NDR_SCALARS) {
217 799 : NDR_CHECK(ndr_pull_align(ndr, 5));
218 799 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwParam));
219 799 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszNodeName));
220 799 : if (_ptr_pszNodeName) {
221 799 : NDR_PULL_ALLOC(ndr, r->pszNodeName);
222 : } else {
223 0 : r->pszNodeName = NULL;
224 : }
225 799 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
226 : }
227 799 : if (ndr_flags & NDR_BUFFERS) {
228 799 : if (r->pszNodeName) {
229 799 : _mem_save_pszNodeName_0 = NDR_PULL_GET_MEM_CTX(ndr);
230 799 : NDR_PULL_SET_MEM_CTX(ndr, r->pszNodeName, 0);
231 799 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszNodeName));
232 799 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszNodeName));
233 799 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszNodeName, &size_pszNodeName_1));
234 799 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszNodeName, &length_pszNodeName_1));
235 799 : if (length_pszNodeName_1 > size_pszNodeName_1) {
236 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszNodeName_1, length_pszNodeName_1);
237 : }
238 799 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNodeName_1, sizeof(uint8_t)));
239 799 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszNodeName, length_pszNodeName_1, sizeof(uint8_t), CH_UTF8));
240 799 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszNodeName_0, 0);
241 : }
242 : }
243 799 : return NDR_ERR_SUCCESS;
244 : }
245 :
246 0 : _PUBLIC_ void ndr_print_DNS_RPC_NAME_AND_PARAM(struct ndr_print *ndr, const char *name, const struct DNS_RPC_NAME_AND_PARAM *r)
247 : {
248 0 : ndr_print_struct(ndr, name, "DNS_RPC_NAME_AND_PARAM");
249 0 : if (r == NULL) { ndr_print_null(ndr); return; }
250 0 : ndr->depth++;
251 0 : ndr_print_uint32(ndr, "dwParam", r->dwParam);
252 0 : ndr_print_ptr(ndr, "pszNodeName", r->pszNodeName);
253 0 : ndr->depth++;
254 0 : if (r->pszNodeName) {
255 0 : ndr_print_string(ndr, "pszNodeName", r->pszNodeName);
256 : }
257 0 : ndr->depth--;
258 0 : ndr->depth--;
259 : }
260 :
261 27304 : _PUBLIC_ enum ndr_err_code ndr_push_DNS_RPC_NAME(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_NAME *r)
262 : {
263 27304 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
264 27304 : if (ndr_flags & NDR_SCALARS) {
265 27304 : NDR_CHECK(ndr_push_align(ndr, 1));
266 27304 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, strlen(r->str)));
267 27304 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->str, strlen(r->str), sizeof(uint8_t), CH_UNIX));
268 27304 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
269 : }
270 27304 : if (ndr_flags & NDR_BUFFERS) {
271 0 : }
272 27304 : return NDR_ERR_SUCCESS;
273 : }
274 :
275 5063 : _PUBLIC_ enum ndr_err_code ndr_pull_DNS_RPC_NAME(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_NAME *r)
276 : {
277 5063 : uint32_t size_str_0 = 0;
278 5063 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
279 5063 : if (ndr_flags & NDR_SCALARS) {
280 5063 : NDR_CHECK(ndr_pull_align(ndr, 1));
281 5063 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->len));
282 5063 : size_str_0 = r->len;
283 5063 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->str, size_str_0, sizeof(uint8_t), CH_UNIX));
284 5063 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
285 : }
286 5063 : if (ndr_flags & NDR_BUFFERS) {
287 0 : }
288 5063 : return NDR_ERR_SUCCESS;
289 : }
290 :
291 0 : static void ndr_print_flags_DNS_RPC_NAME(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct DNS_RPC_NAME *r)
292 : {
293 0 : ndr_print_DNS_RPC_NAME(ndr, name, r);
294 0 : }
295 :
296 0 : _PUBLIC_ void ndr_print_DNS_RPC_NAME(struct ndr_print *ndr, const char *name, const struct DNS_RPC_NAME *r)
297 : {
298 0 : ndr_print_struct(ndr, name, "DNS_RPC_NAME");
299 0 : if (r == NULL) { ndr_print_null(ndr); return; }
300 0 : ndr->depth++;
301 0 : ndr_print_uint8(ndr, "len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->str):r->len);
302 0 : ndr_print_string(ndr, "str", r->str);
303 0 : ndr->depth--;
304 : }
305 :
306 2364 : _PUBLIC_ size_t ndr_size_DNS_RPC_NAME(const struct DNS_RPC_NAME *r, libndr_flags flags)
307 : {
308 2364 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_NAME);
309 : }
310 :
311 0 : static enum ndr_err_code ndr_push_DNS_RPC_RECORD_SOA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_RECORD_SOA *r)
312 : {
313 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
314 0 : if (ndr_flags & NDR_SCALARS) {
315 0 : NDR_CHECK(ndr_push_align(ndr, 4));
316 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwSerialNo));
317 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRefresh));
318 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRetry));
319 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwExpire));
320 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwMinimumTtl));
321 0 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->NamePrimaryServer));
322 0 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->ZoneAdministratorEmail));
323 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
324 : }
325 0 : if (ndr_flags & NDR_BUFFERS) {
326 0 : }
327 0 : return NDR_ERR_SUCCESS;
328 : }
329 :
330 0 : static enum ndr_err_code ndr_pull_DNS_RPC_RECORD_SOA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_RECORD_SOA *r)
331 : {
332 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
333 0 : if (ndr_flags & NDR_SCALARS) {
334 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
335 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwSerialNo));
336 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRefresh));
337 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRetry));
338 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwExpire));
339 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwMinimumTtl));
340 0 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->NamePrimaryServer));
341 0 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->ZoneAdministratorEmail));
342 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
343 : }
344 0 : if (ndr_flags & NDR_BUFFERS) {
345 0 : }
346 0 : return NDR_ERR_SUCCESS;
347 : }
348 :
349 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORD_SOA(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORD_SOA *r)
350 : {
351 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORD_SOA");
352 0 : if (r == NULL) { ndr_print_null(ndr); return; }
353 0 : ndr->depth++;
354 0 : ndr_print_uint32(ndr, "dwSerialNo", r->dwSerialNo);
355 0 : ndr_print_uint32(ndr, "dwRefresh", r->dwRefresh);
356 0 : ndr_print_uint32(ndr, "dwRetry", r->dwRetry);
357 0 : ndr_print_uint32(ndr, "dwExpire", r->dwExpire);
358 0 : ndr_print_uint32(ndr, "dwMinimumTtl", r->dwMinimumTtl);
359 0 : ndr_print_DNS_RPC_NAME(ndr, "NamePrimaryServer", &r->NamePrimaryServer);
360 0 : ndr_print_DNS_RPC_NAME(ndr, "ZoneAdministratorEmail", &r->ZoneAdministratorEmail);
361 0 : ndr->depth--;
362 : }
363 :
364 3435 : static enum ndr_err_code ndr_push_DNS_RPC_RECORD_NAME_PREFERENCE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_RECORD_NAME_PREFERENCE *r)
365 : {
366 3435 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
367 3435 : if (ndr_flags & NDR_SCALARS) {
368 3435 : NDR_CHECK(ndr_push_align(ndr, 2));
369 3435 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wPreference));
370 3435 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->nameExchange));
371 3435 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
372 : }
373 3435 : if (ndr_flags & NDR_BUFFERS) {
374 0 : }
375 3435 : return NDR_ERR_SUCCESS;
376 : }
377 :
378 591 : static enum ndr_err_code ndr_pull_DNS_RPC_RECORD_NAME_PREFERENCE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_RECORD_NAME_PREFERENCE *r)
379 : {
380 591 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
381 591 : if (ndr_flags & NDR_SCALARS) {
382 591 : NDR_CHECK(ndr_pull_align(ndr, 2));
383 591 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wPreference));
384 591 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->nameExchange));
385 591 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
386 : }
387 591 : if (ndr_flags & NDR_BUFFERS) {
388 0 : }
389 591 : return NDR_ERR_SUCCESS;
390 : }
391 :
392 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORD_NAME_PREFERENCE(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORD_NAME_PREFERENCE *r)
393 : {
394 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORD_NAME_PREFERENCE");
395 0 : if (r == NULL) { ndr_print_null(ndr); return; }
396 0 : ndr->depth++;
397 0 : ndr_print_uint16(ndr, "wPreference", r->wPreference);
398 0 : ndr_print_DNS_RPC_NAME(ndr, "nameExchange", &r->nameExchange);
399 0 : ndr->depth--;
400 : }
401 :
402 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORD_STRING(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORD_STRING *r)
403 : {
404 0 : uint32_t cntr_str_0;
405 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORD_STRING");
406 0 : if (r == NULL) { ndr_print_null(ndr); return; }
407 0 : ndr->depth++;
408 0 : ndr_print_uint8(ndr, "count", r->count);
409 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "str", (uint32_t)(r->count));
410 0 : ndr->depth++;
411 0 : for (cntr_str_0 = 0; cntr_str_0 < (r->count); cntr_str_0++) {
412 0 : ndr_print_DNS_RPC_NAME(ndr, "str", &r->str[cntr_str_0]);
413 : }
414 0 : ndr->depth--;
415 0 : ndr->depth--;
416 : }
417 :
418 4834 : static enum ndr_err_code ndr_push_DNS_RPC_RECORD_SRV(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_RECORD_SRV *r)
419 : {
420 4834 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
421 4834 : if (ndr_flags & NDR_SCALARS) {
422 4834 : NDR_CHECK(ndr_push_align(ndr, 2));
423 4834 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wPriority));
424 4834 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wWeight));
425 4834 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wPort));
426 4834 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->nameTarget));
427 4834 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
428 : }
429 4834 : if (ndr_flags & NDR_BUFFERS) {
430 0 : }
431 4834 : return NDR_ERR_SUCCESS;
432 : }
433 :
434 821 : static enum ndr_err_code ndr_pull_DNS_RPC_RECORD_SRV(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_RECORD_SRV *r)
435 : {
436 821 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
437 821 : if (ndr_flags & NDR_SCALARS) {
438 821 : NDR_CHECK(ndr_pull_align(ndr, 2));
439 821 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wPriority));
440 821 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wWeight));
441 821 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wPort));
442 821 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->nameTarget));
443 821 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
444 : }
445 821 : if (ndr_flags & NDR_BUFFERS) {
446 0 : }
447 821 : return NDR_ERR_SUCCESS;
448 : }
449 :
450 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORD_SRV(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORD_SRV *r)
451 : {
452 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORD_SRV");
453 0 : if (r == NULL) { ndr_print_null(ndr); return; }
454 0 : ndr->depth++;
455 0 : ndr_print_uint16(ndr, "wPriority", r->wPriority);
456 0 : ndr_print_uint16(ndr, "wWeight", r->wWeight);
457 0 : ndr_print_uint16(ndr, "wPort", r->wPort);
458 0 : ndr_print_DNS_RPC_NAME(ndr, "nameTarget", &r->nameTarget);
459 0 : ndr->depth--;
460 : }
461 :
462 33128 : static enum ndr_err_code ndr_push_DNS_RPC_RECORD_DATA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union DNS_RPC_RECORD_DATA *r)
463 : {
464 0 : uint32_t level;
465 : {
466 33128 : libndr_flags _flags_save_UNION = ndr->flags;
467 33128 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
468 33128 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
469 33128 : if (ndr_flags & NDR_SCALARS) {
470 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
471 33128 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
472 33128 : NDR_CHECK(ndr_push_union_align(ndr, 4));
473 33128 : switch (level) {
474 0 : case DNS_TYPE_TOMBSTONE: {
475 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->EntombedTime));
476 0 : break; }
477 :
478 5185 : case DNS_TYPE_A: {
479 : {
480 5185 : libndr_flags _flags_save_ipv4address = ndr->flags;
481 5185 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
482 5185 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ipv4));
483 5097 : ndr->flags = _flags_save_ipv4address;
484 : }
485 5097 : break; }
486 :
487 4102 : case DNS_TYPE_NS: {
488 4102 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
489 4102 : break; }
490 :
491 0 : case DNS_TYPE_MD: {
492 0 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
493 0 : break; }
494 :
495 0 : case DNS_TYPE_MF: {
496 0 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
497 0 : break; }
498 :
499 3120 : case DNS_TYPE_CNAME: {
500 3120 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
501 3120 : break; }
502 :
503 0 : case DNS_TYPE_SOA: {
504 0 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_SOA(ndr, NDR_SCALARS, &r->soa));
505 0 : break; }
506 :
507 0 : case DNS_TYPE_MB: {
508 0 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
509 0 : break; }
510 :
511 0 : case DNS_TYPE_MG: {
512 0 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
513 0 : break; }
514 :
515 0 : case DNS_TYPE_MR: {
516 0 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
517 0 : break; }
518 :
519 3832 : case DNS_TYPE_PTR: {
520 3832 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->ptr));
521 3832 : break; }
522 :
523 0 : case DNS_TYPE_HINFO: {
524 0 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->hinfo));
525 0 : break; }
526 :
527 3435 : case DNS_TYPE_MX: {
528 3435 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_NAME_PREFERENCE(ndr, NDR_SCALARS, &r->mx));
529 3435 : break; }
530 :
531 2988 : case DNS_TYPE_TXT: {
532 2988 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_STRING(ndr, NDR_SCALARS, &r->txt));
533 2988 : break; }
534 :
535 5632 : case DNS_TYPE_AAAA: {
536 5632 : NDR_CHECK(ndr_push_ipv6address(ndr, NDR_SCALARS, r->ipv6));
537 5368 : break; }
538 :
539 4834 : case DNS_TYPE_SRV: {
540 4834 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_SRV(ndr, NDR_SCALARS, &r->srv));
541 4834 : break; }
542 :
543 0 : case DNS_TYPE_DNAME: {
544 0 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
545 0 : break; }
546 :
547 0 : default:
548 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
549 : }
550 : }
551 32776 : if (ndr_flags & NDR_BUFFERS) {
552 25616 : if (!(ndr_flags & NDR_SCALARS)) {
553 : /* We didn't get it above, and the token is not needed after this. */
554 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
555 : }
556 25616 : switch (level) {
557 0 : case DNS_TYPE_TOMBSTONE:
558 0 : break;
559 :
560 3986 : case DNS_TYPE_A:
561 3986 : break;
562 :
563 3196 : case DNS_TYPE_NS:
564 3196 : break;
565 :
566 0 : case DNS_TYPE_MD:
567 0 : break;
568 :
569 0 : case DNS_TYPE_MF:
570 0 : break;
571 :
572 2450 : case DNS_TYPE_CNAME:
573 2450 : break;
574 :
575 0 : case DNS_TYPE_SOA:
576 0 : break;
577 :
578 0 : case DNS_TYPE_MB:
579 0 : break;
580 :
581 0 : case DNS_TYPE_MG:
582 0 : break;
583 :
584 0 : case DNS_TYPE_MR:
585 0 : break;
586 :
587 2992 : case DNS_TYPE_PTR:
588 2992 : break;
589 :
590 0 : case DNS_TYPE_HINFO:
591 0 : break;
592 :
593 2684 : case DNS_TYPE_MX:
594 2684 : break;
595 :
596 2340 : case DNS_TYPE_TXT:
597 2340 : break;
598 :
599 4198 : case DNS_TYPE_AAAA:
600 4198 : break;
601 :
602 3770 : case DNS_TYPE_SRV:
603 3770 : break;
604 :
605 0 : case DNS_TYPE_DNAME:
606 0 : break;
607 :
608 0 : default:
609 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
610 : }
611 : }
612 32776 : ndr->flags = _flags_save_UNION;
613 : }
614 32776 : return NDR_ERR_SUCCESS;
615 : }
616 :
617 5648 : static enum ndr_err_code ndr_pull_DNS_RPC_RECORD_DATA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union DNS_RPC_RECORD_DATA *r)
618 : {
619 0 : uint32_t level;
620 : {
621 5648 : libndr_flags _flags_save_UNION = ndr->flags;
622 5648 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
623 5648 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
624 5648 : if (ndr_flags & NDR_SCALARS) {
625 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
626 5648 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
627 5648 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
628 5648 : switch (level) {
629 0 : case DNS_TYPE_TOMBSTONE: {
630 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->EntombedTime));
631 0 : break; }
632 :
633 882 : case DNS_TYPE_A: {
634 : {
635 882 : libndr_flags _flags_save_ipv4address = ndr->flags;
636 882 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
637 882 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ipv4));
638 882 : ndr->flags = _flags_save_ipv4address;
639 : }
640 882 : break; }
641 :
642 692 : case DNS_TYPE_NS: {
643 692 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
644 692 : break; }
645 :
646 0 : case DNS_TYPE_MD: {
647 0 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
648 0 : break; }
649 :
650 0 : case DNS_TYPE_MF: {
651 0 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
652 0 : break; }
653 :
654 555 : case DNS_TYPE_CNAME: {
655 555 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
656 555 : break; }
657 :
658 0 : case DNS_TYPE_SOA: {
659 0 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_SOA(ndr, NDR_SCALARS, &r->soa));
660 0 : break; }
661 :
662 0 : case DNS_TYPE_MB: {
663 0 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
664 0 : break; }
665 :
666 0 : case DNS_TYPE_MG: {
667 0 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
668 0 : break; }
669 :
670 0 : case DNS_TYPE_MR: {
671 0 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
672 0 : break; }
673 :
674 656 : case DNS_TYPE_PTR: {
675 656 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->ptr));
676 656 : break; }
677 :
678 0 : case DNS_TYPE_HINFO: {
679 0 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->hinfo));
680 0 : break; }
681 :
682 591 : case DNS_TYPE_MX: {
683 591 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_NAME_PREFERENCE(ndr, NDR_SCALARS, &r->mx));
684 591 : break; }
685 :
686 522 : case DNS_TYPE_TXT: {
687 522 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_STRING(ndr, NDR_SCALARS, &r->txt));
688 522 : break; }
689 :
690 929 : case DNS_TYPE_AAAA: {
691 929 : NDR_CHECK(ndr_pull_ipv6address(ndr, NDR_SCALARS, &r->ipv6));
692 929 : break; }
693 :
694 821 : case DNS_TYPE_SRV: {
695 821 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_SRV(ndr, NDR_SCALARS, &r->srv));
696 821 : break; }
697 :
698 0 : case DNS_TYPE_DNAME: {
699 0 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
700 0 : break; }
701 :
702 0 : default:
703 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
704 : }
705 : }
706 5648 : if (ndr_flags & NDR_BUFFERS) {
707 0 : if (!(ndr_flags & NDR_SCALARS)) {
708 : /* We didn't get it above, and the token is not needed after this. */
709 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
710 : }
711 0 : switch (level) {
712 0 : case DNS_TYPE_TOMBSTONE:
713 0 : break;
714 :
715 0 : case DNS_TYPE_A:
716 0 : break;
717 :
718 0 : case DNS_TYPE_NS:
719 0 : break;
720 :
721 0 : case DNS_TYPE_MD:
722 0 : break;
723 :
724 0 : case DNS_TYPE_MF:
725 0 : break;
726 :
727 0 : case DNS_TYPE_CNAME:
728 0 : break;
729 :
730 0 : case DNS_TYPE_SOA:
731 0 : break;
732 :
733 0 : case DNS_TYPE_MB:
734 0 : break;
735 :
736 0 : case DNS_TYPE_MG:
737 0 : break;
738 :
739 0 : case DNS_TYPE_MR:
740 0 : break;
741 :
742 0 : case DNS_TYPE_PTR:
743 0 : break;
744 :
745 0 : case DNS_TYPE_HINFO:
746 0 : break;
747 :
748 0 : case DNS_TYPE_MX:
749 0 : break;
750 :
751 0 : case DNS_TYPE_TXT:
752 0 : break;
753 :
754 0 : case DNS_TYPE_AAAA:
755 0 : break;
756 :
757 0 : case DNS_TYPE_SRV:
758 0 : break;
759 :
760 0 : case DNS_TYPE_DNAME:
761 0 : break;
762 :
763 0 : default:
764 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
765 : }
766 : }
767 5648 : ndr->flags = _flags_save_UNION;
768 : }
769 5648 : return NDR_ERR_SUCCESS;
770 : }
771 :
772 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORD_DATA(struct ndr_print *ndr, const char *name, const union DNS_RPC_RECORD_DATA *r)
773 : {
774 0 : uint32_t level;
775 : {
776 0 : libndr_flags _flags_save_UNION = ndr->flags;
777 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
778 0 : level = ndr_print_steal_switch_value(ndr, r);
779 0 : ndr_print_union(ndr, name, level, "DNS_RPC_RECORD_DATA");
780 0 : switch (level) {
781 0 : case DNS_TYPE_TOMBSTONE:
782 0 : ndr_print_NTTIME(ndr, "EntombedTime", r->EntombedTime);
783 0 : break;
784 :
785 0 : case DNS_TYPE_A:
786 : {
787 0 : libndr_flags _flags_save_ipv4address = ndr->flags;
788 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
789 0 : ndr_print_ipv4address(ndr, "ipv4", r->ipv4);
790 0 : ndr->flags = _flags_save_ipv4address;
791 : }
792 0 : break;
793 :
794 0 : case DNS_TYPE_NS:
795 0 : ndr_print_DNS_RPC_NAME(ndr, "name", &r->name);
796 0 : break;
797 :
798 0 : case DNS_TYPE_MD:
799 0 : ndr_print_DNS_RPC_NAME(ndr, "name", &r->name);
800 0 : break;
801 :
802 0 : case DNS_TYPE_MF:
803 0 : ndr_print_DNS_RPC_NAME(ndr, "name", &r->name);
804 0 : break;
805 :
806 0 : case DNS_TYPE_CNAME:
807 0 : ndr_print_DNS_RPC_NAME(ndr, "name", &r->name);
808 0 : break;
809 :
810 0 : case DNS_TYPE_SOA:
811 0 : ndr_print_DNS_RPC_RECORD_SOA(ndr, "soa", &r->soa);
812 0 : break;
813 :
814 0 : case DNS_TYPE_MB:
815 0 : ndr_print_DNS_RPC_NAME(ndr, "name", &r->name);
816 0 : break;
817 :
818 0 : case DNS_TYPE_MG:
819 0 : ndr_print_DNS_RPC_NAME(ndr, "name", &r->name);
820 0 : break;
821 :
822 0 : case DNS_TYPE_MR:
823 0 : ndr_print_DNS_RPC_NAME(ndr, "name", &r->name);
824 0 : break;
825 :
826 0 : case DNS_TYPE_PTR:
827 0 : ndr_print_DNS_RPC_NAME(ndr, "ptr", &r->ptr);
828 0 : break;
829 :
830 0 : case DNS_TYPE_HINFO:
831 0 : ndr_print_DNS_RPC_NAME(ndr, "hinfo", &r->hinfo);
832 0 : break;
833 :
834 0 : case DNS_TYPE_MX:
835 0 : ndr_print_DNS_RPC_RECORD_NAME_PREFERENCE(ndr, "mx", &r->mx);
836 0 : break;
837 :
838 0 : case DNS_TYPE_TXT:
839 0 : ndr_print_DNS_RPC_RECORD_STRING(ndr, "txt", &r->txt);
840 0 : break;
841 :
842 0 : case DNS_TYPE_AAAA:
843 0 : ndr_print_ipv6address(ndr, "ipv6", r->ipv6);
844 0 : break;
845 :
846 0 : case DNS_TYPE_SRV:
847 0 : ndr_print_DNS_RPC_RECORD_SRV(ndr, "srv", &r->srv);
848 0 : break;
849 :
850 0 : case DNS_TYPE_DNAME:
851 0 : ndr_print_DNS_RPC_NAME(ndr, "name", &r->name);
852 0 : break;
853 :
854 0 : default:
855 0 : ndr_print_bad_level(ndr, name, level);
856 : }
857 0 : ndr->flags = _flags_save_UNION;
858 : }
859 0 : }
860 :
861 25880 : static size_t ndr_size_DNS_RPC_RECORD_DATA(const union DNS_RPC_RECORD_DATA *r, uint32_t level, libndr_flags flags)
862 : {
863 25880 : flags |= LIBNDR_FLAG_NOALIGN;
864 25880 : return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORD_DATA);
865 : }
866 :
867 7248 : _PUBLIC_ enum ndr_err_code ndr_push_DNS_RPC_RECORD(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_RECORD *r)
868 : {
869 7248 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
870 7248 : if (ndr_flags & NDR_SCALARS) {
871 7248 : NDR_CHECK(ndr_push_align(ndr, 4));
872 7248 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_DNS_RPC_RECORD_DATA(&r->data, r->wType, 0)));
873 7248 : NDR_CHECK(ndr_push_dns_record_type(ndr, NDR_SCALARS, r->wType));
874 7248 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
875 7248 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwSerial));
876 7248 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwTtlSeconds));
877 7248 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwTimeStamp));
878 7248 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved));
879 : {
880 0 : struct ndr_push *_ndr_data;
881 7336 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_data, 0, ndr_size_DNS_RPC_RECORD_DATA(&r->data, r->wType, 0)));
882 7248 : NDR_CHECK(ndr_push_set_switch_value(_ndr_data, &r->data, r->wType));
883 7248 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_DATA(_ndr_data, NDR_SCALARS, &r->data));
884 7160 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_data, 0, ndr_size_DNS_RPC_RECORD_DATA(&r->data, r->wType, 0)));
885 : }
886 7160 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
887 : }
888 7160 : if (ndr_flags & NDR_BUFFERS) {
889 0 : }
890 7160 : return NDR_ERR_SUCCESS;
891 : }
892 :
893 5648 : _PUBLIC_ enum ndr_err_code ndr_pull_DNS_RPC_RECORD(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_RECORD *r)
894 : {
895 5648 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
896 5648 : if (ndr_flags & NDR_SCALARS) {
897 5648 : NDR_CHECK(ndr_pull_align(ndr, 4));
898 5648 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wDataLength));
899 5648 : NDR_CHECK(ndr_pull_dns_record_type(ndr, NDR_SCALARS, &r->wType));
900 5648 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
901 5648 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwSerial));
902 5648 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwTtlSeconds));
903 5648 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwTimeStamp));
904 5648 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved));
905 : {
906 0 : struct ndr_pull *_ndr_data;
907 5648 : ssize_t sub_size = r->wDataLength;
908 5648 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_data, 0, sub_size));
909 5648 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_data, &r->data, r->wType));
910 5648 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_DATA(_ndr_data, NDR_SCALARS, &r->data));
911 5648 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_data, 0, sub_size));
912 : }
913 5648 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
914 : }
915 5648 : if (ndr_flags & NDR_BUFFERS) {
916 0 : }
917 5648 : return NDR_ERR_SUCCESS;
918 : }
919 :
920 0 : static void ndr_print_flags_DNS_RPC_RECORD(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct DNS_RPC_RECORD *r)
921 : {
922 0 : ndr_print_DNS_RPC_RECORD(ndr, name, r);
923 0 : }
924 :
925 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORD(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORD *r)
926 : {
927 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORD");
928 0 : if (r == NULL) { ndr_print_null(ndr); return; }
929 0 : ndr->depth++;
930 0 : ndr_print_uint16(ndr, "wDataLength", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_DNS_RPC_RECORD_DATA(&r->data, r->wType, 0):r->wDataLength);
931 0 : ndr_print_dns_record_type(ndr, "wType", r->wType);
932 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
933 0 : ndr_print_uint32(ndr, "dwSerial", r->dwSerial);
934 0 : ndr_print_uint32(ndr, "dwTtlSeconds", r->dwTtlSeconds);
935 0 : ndr_print_uint32(ndr, "dwTimeStamp", r->dwTimeStamp);
936 0 : ndr_print_uint32(ndr, "dwReserved", r->dwReserved);
937 0 : ndr_print_set_switch_value(ndr, &r->data, r->wType);
938 0 : ndr_print_DNS_RPC_RECORD_DATA(ndr, "data", &r->data);
939 0 : ndr->depth--;
940 : }
941 :
942 4224 : static enum ndr_err_code ndr_push_DNS_RPC_RECORD_BUF(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_RECORD_BUF *r)
943 : {
944 4224 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
945 4224 : if (ndr_flags & NDR_SCALARS) {
946 4224 : NDR_CHECK(ndr_push_align(ndr, 5));
947 4224 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_size_DNS_RPC_RECORD_DATA(&r->rec.data, r->rec.wType, 0)));
948 4224 : NDR_CHECK(ndr_push_DNS_RPC_RECORD(ndr, NDR_SCALARS, &r->rec));
949 4136 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
950 : }
951 4136 : if (ndr_flags & NDR_BUFFERS) {
952 0 : }
953 4136 : return NDR_ERR_SUCCESS;
954 : }
955 :
956 4136 : static enum ndr_err_code ndr_pull_DNS_RPC_RECORD_BUF(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_RECORD_BUF *r)
957 : {
958 4136 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
959 4136 : if (ndr_flags & NDR_SCALARS) {
960 4136 : NDR_CHECK(ndr_pull_align(ndr, 5));
961 4136 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->wContextLength));
962 4136 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD(ndr, NDR_SCALARS, &r->rec));
963 4136 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
964 : }
965 4136 : if (ndr_flags & NDR_BUFFERS) {
966 0 : }
967 4136 : return NDR_ERR_SUCCESS;
968 : }
969 :
970 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORD_BUF(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORD_BUF *r)
971 : {
972 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORD_BUF");
973 0 : if (r == NULL) { ndr_print_null(ndr); return; }
974 0 : ndr->depth++;
975 0 : ndr_print_uint3264(ndr, "wContextLength", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_DNS_RPC_RECORD_DATA(&r->rec.data, r->rec.wType, 0):r->wContextLength);
976 0 : ndr_print_DNS_RPC_RECORD(ndr, "rec", &r->rec);
977 0 : ndr->depth--;
978 : }
979 :
980 16 : static enum ndr_err_code ndr_push_IP4_ARRAY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct IP4_ARRAY *r)
981 : {
982 0 : uint32_t cntr_AddrArray_0;
983 16 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
984 16 : if (ndr_flags & NDR_SCALARS) {
985 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->AddrCount));
986 16 : NDR_CHECK(ndr_push_align(ndr, 4));
987 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->AddrCount));
988 32 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (r->AddrCount); cntr_AddrArray_0++) {
989 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->AddrArray[cntr_AddrArray_0]));
990 : }
991 16 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
992 : }
993 16 : if (ndr_flags & NDR_BUFFERS) {
994 0 : }
995 16 : return NDR_ERR_SUCCESS;
996 : }
997 :
998 16 : static enum ndr_err_code ndr_pull_IP4_ARRAY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct IP4_ARRAY *r)
999 : {
1000 16 : uint32_t size_AddrArray_0 = 0;
1001 0 : uint32_t cntr_AddrArray_0;
1002 16 : TALLOC_CTX *_mem_save_AddrArray_0 = NULL;
1003 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1004 16 : if (ndr_flags & NDR_SCALARS) {
1005 16 : NDR_CHECK(ndr_pull_array_size(ndr, &r->AddrArray));
1006 16 : NDR_CHECK(ndr_pull_align(ndr, 4));
1007 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->AddrCount));
1008 16 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->AddrArray, &size_AddrArray_0));
1009 16 : NDR_PULL_ALLOC_N(ndr, r->AddrArray, size_AddrArray_0);
1010 16 : _mem_save_AddrArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
1011 16 : NDR_PULL_SET_MEM_CTX(ndr, r->AddrArray, 0);
1012 32 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (size_AddrArray_0); cntr_AddrArray_0++) {
1013 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->AddrArray[cntr_AddrArray_0]));
1014 : }
1015 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_AddrArray_0, 0);
1016 16 : if (r->AddrArray) {
1017 16 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->AddrArray, r->AddrCount));
1018 : }
1019 16 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1020 : }
1021 16 : if (ndr_flags & NDR_BUFFERS) {
1022 0 : }
1023 16 : return NDR_ERR_SUCCESS;
1024 : }
1025 :
1026 0 : _PUBLIC_ void ndr_print_IP4_ARRAY(struct ndr_print *ndr, const char *name, const struct IP4_ARRAY *r)
1027 : {
1028 0 : uint32_t cntr_AddrArray_0;
1029 0 : ndr_print_struct(ndr, name, "IP4_ARRAY");
1030 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1031 0 : ndr->depth++;
1032 0 : ndr_print_uint32(ndr, "AddrCount", r->AddrCount);
1033 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "AddrArray", (uint32_t)(r->AddrCount));
1034 0 : ndr->depth++;
1035 0 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (r->AddrCount); cntr_AddrArray_0++) {
1036 0 : ndr_print_uint32(ndr, "AddrArray", r->AddrArray[cntr_AddrArray_0]);
1037 : }
1038 0 : ndr->depth--;
1039 0 : ndr->depth--;
1040 : }
1041 :
1042 16 : static enum ndr_err_code ndr_push_DNS_ADDR(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_ADDR *r)
1043 : {
1044 0 : uint32_t cntr_DnsAddrUserDword_0;
1045 16 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1046 16 : if (ndr_flags & NDR_SCALARS) {
1047 16 : NDR_CHECK(ndr_push_align(ndr, 4));
1048 16 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->MaxSa, 32));
1049 144 : for (cntr_DnsAddrUserDword_0 = 0; cntr_DnsAddrUserDword_0 < (8); cntr_DnsAddrUserDword_0++) {
1050 128 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DnsAddrUserDword[cntr_DnsAddrUserDword_0]));
1051 : }
1052 16 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1053 : }
1054 16 : if (ndr_flags & NDR_BUFFERS) {
1055 0 : }
1056 16 : return NDR_ERR_SUCCESS;
1057 : }
1058 :
1059 16 : static enum ndr_err_code ndr_pull_DNS_ADDR(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_ADDR *r)
1060 : {
1061 16 : uint32_t size_MaxSa_0 = 0;
1062 16 : uint32_t size_DnsAddrUserDword_0 = 0;
1063 0 : uint32_t cntr_DnsAddrUserDword_0;
1064 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1065 16 : if (ndr_flags & NDR_SCALARS) {
1066 16 : NDR_CHECK(ndr_pull_align(ndr, 4));
1067 16 : size_MaxSa_0 = 32;
1068 16 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->MaxSa, size_MaxSa_0));
1069 16 : size_DnsAddrUserDword_0 = 8;
1070 144 : for (cntr_DnsAddrUserDword_0 = 0; cntr_DnsAddrUserDword_0 < (size_DnsAddrUserDword_0); cntr_DnsAddrUserDword_0++) {
1071 128 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DnsAddrUserDword[cntr_DnsAddrUserDword_0]));
1072 : }
1073 16 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1074 : }
1075 16 : if (ndr_flags & NDR_BUFFERS) {
1076 0 : }
1077 16 : return NDR_ERR_SUCCESS;
1078 : }
1079 :
1080 0 : _PUBLIC_ void ndr_print_DNS_ADDR(struct ndr_print *ndr, const char *name, const struct DNS_ADDR *r)
1081 : {
1082 0 : uint32_t cntr_DnsAddrUserDword_0;
1083 0 : ndr_print_struct(ndr, name, "DNS_ADDR");
1084 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1085 0 : ndr->depth++;
1086 0 : ndr_print_array_uint8(ndr, "MaxSa", r->MaxSa, 32);
1087 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "DnsAddrUserDword", (uint32_t)(8));
1088 0 : ndr->depth++;
1089 0 : for (cntr_DnsAddrUserDword_0 = 0; cntr_DnsAddrUserDword_0 < (8); cntr_DnsAddrUserDword_0++) {
1090 0 : ndr_print_uint32(ndr, "DnsAddrUserDword", r->DnsAddrUserDword[cntr_DnsAddrUserDword_0]);
1091 : }
1092 0 : ndr->depth--;
1093 0 : ndr->depth--;
1094 : }
1095 :
1096 8 : static enum ndr_err_code ndr_push_DNS_ADDR_ARRAY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_ADDR_ARRAY *r)
1097 : {
1098 0 : uint32_t cntr_AddrArray_0;
1099 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1100 8 : if (ndr_flags & NDR_SCALARS) {
1101 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->AddrCount));
1102 8 : NDR_CHECK(ndr_push_align(ndr, 4));
1103 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MaxCount));
1104 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->AddrCount));
1105 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Tag));
1106 8 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Family));
1107 8 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->WordReserved));
1108 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Flags));
1109 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MatchFlag));
1110 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Reserved1));
1111 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Reserved2));
1112 24 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (r->AddrCount); cntr_AddrArray_0++) {
1113 16 : NDR_CHECK(ndr_push_DNS_ADDR(ndr, NDR_SCALARS, &r->AddrArray[cntr_AddrArray_0]));
1114 : }
1115 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1116 : }
1117 8 : if (ndr_flags & NDR_BUFFERS) {
1118 0 : }
1119 8 : return NDR_ERR_SUCCESS;
1120 : }
1121 :
1122 8 : static enum ndr_err_code ndr_pull_DNS_ADDR_ARRAY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_ADDR_ARRAY *r)
1123 : {
1124 8 : uint32_t size_AddrArray_0 = 0;
1125 0 : uint32_t cntr_AddrArray_0;
1126 8 : TALLOC_CTX *_mem_save_AddrArray_0 = NULL;
1127 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1128 8 : if (ndr_flags & NDR_SCALARS) {
1129 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->AddrArray));
1130 8 : NDR_CHECK(ndr_pull_align(ndr, 4));
1131 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MaxCount));
1132 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->AddrCount));
1133 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Tag));
1134 8 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Family));
1135 8 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->WordReserved));
1136 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Flags));
1137 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MatchFlag));
1138 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Reserved1));
1139 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Reserved2));
1140 8 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->AddrArray, &size_AddrArray_0));
1141 8 : NDR_PULL_ALLOC_N(ndr, r->AddrArray, size_AddrArray_0);
1142 8 : _mem_save_AddrArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
1143 8 : NDR_PULL_SET_MEM_CTX(ndr, r->AddrArray, 0);
1144 24 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (size_AddrArray_0); cntr_AddrArray_0++) {
1145 16 : NDR_CHECK(ndr_pull_DNS_ADDR(ndr, NDR_SCALARS, &r->AddrArray[cntr_AddrArray_0]));
1146 : }
1147 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_AddrArray_0, 0);
1148 8 : if (r->AddrArray) {
1149 8 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->AddrArray, r->AddrCount));
1150 : }
1151 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1152 : }
1153 8 : if (ndr_flags & NDR_BUFFERS) {
1154 0 : }
1155 8 : return NDR_ERR_SUCCESS;
1156 : }
1157 :
1158 0 : _PUBLIC_ void ndr_print_DNS_ADDR_ARRAY(struct ndr_print *ndr, const char *name, const struct DNS_ADDR_ARRAY *r)
1159 : {
1160 0 : uint32_t cntr_AddrArray_0;
1161 0 : ndr_print_struct(ndr, name, "DNS_ADDR_ARRAY");
1162 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1163 0 : ndr->depth++;
1164 0 : ndr_print_uint32(ndr, "MaxCount", r->MaxCount);
1165 0 : ndr_print_uint32(ndr, "AddrCount", r->AddrCount);
1166 0 : ndr_print_uint32(ndr, "Tag", r->Tag);
1167 0 : ndr_print_uint16(ndr, "Family", r->Family);
1168 0 : ndr_print_uint16(ndr, "WordReserved", r->WordReserved);
1169 0 : ndr_print_uint32(ndr, "Flags", r->Flags);
1170 0 : ndr_print_uint32(ndr, "MatchFlag", r->MatchFlag);
1171 0 : ndr_print_uint32(ndr, "Reserved1", r->Reserved1);
1172 0 : ndr_print_uint32(ndr, "Reserved2", r->Reserved2);
1173 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "AddrArray", (uint32_t)(r->AddrCount));
1174 0 : ndr->depth++;
1175 0 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (r->AddrCount); cntr_AddrArray_0++) {
1176 0 : ndr_print_DNS_ADDR(ndr, "AddrArray", &r->AddrArray[cntr_AddrArray_0]);
1177 : }
1178 0 : ndr->depth--;
1179 0 : ndr->depth--;
1180 : }
1181 :
1182 0 : static enum ndr_err_code ndr_push_DNS_RPC_IP_VALIDATE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_IP_VALIDATE *r)
1183 : {
1184 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1185 0 : if (ndr_flags & NDR_SCALARS) {
1186 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1187 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
1188 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
1189 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwContext));
1190 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved1));
1191 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszContextName));
1192 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipValidateAddrs));
1193 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1194 : }
1195 0 : if (ndr_flags & NDR_BUFFERS) {
1196 0 : if (r->pszContextName) {
1197 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszContextName, CH_UTF8)));
1198 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1199 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszContextName, CH_UTF8)));
1200 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszContextName, ndr_charset_length(r->pszContextName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1201 : }
1202 0 : if (r->aipValidateAddrs) {
1203 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipValidateAddrs));
1204 : }
1205 : }
1206 0 : return NDR_ERR_SUCCESS;
1207 : }
1208 :
1209 0 : static enum ndr_err_code ndr_pull_DNS_RPC_IP_VALIDATE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_IP_VALIDATE *r)
1210 : {
1211 0 : uint32_t _ptr_pszContextName;
1212 0 : uint32_t size_pszContextName_1 = 0;
1213 0 : uint32_t length_pszContextName_1 = 0;
1214 0 : TALLOC_CTX *_mem_save_pszContextName_0 = NULL;
1215 0 : uint32_t _ptr_aipValidateAddrs;
1216 0 : TALLOC_CTX *_mem_save_aipValidateAddrs_0 = NULL;
1217 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1218 0 : if (ndr_flags & NDR_SCALARS) {
1219 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1220 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
1221 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
1222 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwContext));
1223 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved1));
1224 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszContextName));
1225 0 : if (_ptr_pszContextName) {
1226 0 : NDR_PULL_ALLOC(ndr, r->pszContextName);
1227 : } else {
1228 0 : r->pszContextName = NULL;
1229 : }
1230 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipValidateAddrs));
1231 0 : if (_ptr_aipValidateAddrs) {
1232 0 : NDR_PULL_ALLOC(ndr, r->aipValidateAddrs);
1233 : } else {
1234 0 : r->aipValidateAddrs = NULL;
1235 : }
1236 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1237 : }
1238 0 : if (ndr_flags & NDR_BUFFERS) {
1239 0 : if (r->pszContextName) {
1240 0 : _mem_save_pszContextName_0 = NDR_PULL_GET_MEM_CTX(ndr);
1241 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszContextName, 0);
1242 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszContextName));
1243 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszContextName));
1244 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszContextName, &size_pszContextName_1));
1245 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszContextName, &length_pszContextName_1));
1246 0 : if (length_pszContextName_1 > size_pszContextName_1) {
1247 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszContextName_1, length_pszContextName_1);
1248 : }
1249 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszContextName_1, sizeof(uint8_t)));
1250 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszContextName, length_pszContextName_1, sizeof(uint8_t), CH_UTF8));
1251 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszContextName_0, 0);
1252 : }
1253 0 : if (r->aipValidateAddrs) {
1254 0 : _mem_save_aipValidateAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1255 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipValidateAddrs, 0);
1256 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipValidateAddrs));
1257 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipValidateAddrs_0, 0);
1258 : }
1259 : }
1260 0 : return NDR_ERR_SUCCESS;
1261 : }
1262 :
1263 0 : _PUBLIC_ void ndr_print_DNS_RPC_IP_VALIDATE(struct ndr_print *ndr, const char *name, const struct DNS_RPC_IP_VALIDATE *r)
1264 : {
1265 0 : ndr_print_struct(ndr, name, "DNS_RPC_IP_VALIDATE");
1266 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1267 0 : ndr->depth++;
1268 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
1269 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
1270 0 : ndr_print_uint32(ndr, "dwContext", r->dwContext);
1271 0 : ndr_print_uint32(ndr, "dwReserved1", r->dwReserved1);
1272 0 : ndr_print_ptr(ndr, "pszContextName", r->pszContextName);
1273 0 : ndr->depth++;
1274 0 : if (r->pszContextName) {
1275 0 : ndr_print_string(ndr, "pszContextName", r->pszContextName);
1276 : }
1277 0 : ndr->depth--;
1278 0 : ndr_print_ptr(ndr, "aipValidateAddrs", r->aipValidateAddrs);
1279 0 : ndr->depth++;
1280 0 : if (r->aipValidateAddrs) {
1281 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipValidateAddrs", r->aipValidateAddrs);
1282 : }
1283 0 : ndr->depth--;
1284 0 : ndr->depth--;
1285 : }
1286 :
1287 12 : static enum ndr_err_code ndr_push_DNS_BOOT_METHOD(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum DNS_BOOT_METHOD r)
1288 : {
1289 12 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
1290 12 : return NDR_ERR_SUCCESS;
1291 : }
1292 :
1293 12 : static enum ndr_err_code ndr_pull_DNS_BOOT_METHOD(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum DNS_BOOT_METHOD *r)
1294 : {
1295 0 : uint8_t v;
1296 12 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
1297 12 : *r = v;
1298 12 : return NDR_ERR_SUCCESS;
1299 : }
1300 :
1301 0 : _PUBLIC_ void ndr_print_DNS_BOOT_METHOD(struct ndr_print *ndr, const char *name, enum DNS_BOOT_METHOD r)
1302 : {
1303 0 : const char *val = NULL;
1304 :
1305 0 : switch (r) {
1306 0 : case DNS_BOOT_METHOD_UNINITIALIZED: val = "DNS_BOOT_METHOD_UNINITIALIZED"; break;
1307 0 : case DNS_BOOT_METHOD_FILE: val = "DNS_BOOT_METHOD_FILE"; break;
1308 0 : case DNS_BOOT_METHOD_REGISTRY: val = "DNS_BOOT_METHOD_REGISTRY"; break;
1309 0 : case DNS_BOOT_METHOD_DIRECTORY: val = "DNS_BOOT_METHOD_DIRECTORY"; break;
1310 : }
1311 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1312 0 : }
1313 :
1314 12 : static enum ndr_err_code ndr_push_DNS_NAME_CHECK_FLAG(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum DNS_NAME_CHECK_FLAG r)
1315 : {
1316 12 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1317 12 : return NDR_ERR_SUCCESS;
1318 : }
1319 :
1320 12 : static enum ndr_err_code ndr_pull_DNS_NAME_CHECK_FLAG(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum DNS_NAME_CHECK_FLAG *r)
1321 : {
1322 0 : uint32_t v;
1323 12 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1324 12 : *r = v;
1325 12 : return NDR_ERR_SUCCESS;
1326 : }
1327 :
1328 0 : _PUBLIC_ void ndr_print_DNS_NAME_CHECK_FLAG(struct ndr_print *ndr, const char *name, enum DNS_NAME_CHECK_FLAG r)
1329 : {
1330 0 : const char *val = NULL;
1331 :
1332 0 : switch (r) {
1333 0 : case DNS_ALLOW_RFC_NAMES_ONLY: val = "DNS_ALLOW_RFC_NAMES_ONLY"; break;
1334 0 : case DNS_ALLOW_NONRFC_NAMES: val = "DNS_ALLOW_NONRFC_NAMES"; break;
1335 0 : case DNS_ALLOW_MULTIBYTE_NAMES: val = "DNS_ALLOW_MULTIBYTE_NAMES"; break;
1336 0 : case DNS_ALLOW_ALL_NAMES: val = "DNS_ALLOW_ALL_NAMES"; break;
1337 : }
1338 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1339 0 : }
1340 :
1341 4 : static enum ndr_err_code ndr_push_DNS_RPC_SERVER_INFO_W2K(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_SERVER_INFO_W2K *r)
1342 : {
1343 0 : uint32_t cntr_dwReserveArray_0;
1344 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1345 4 : if (ndr_flags & NDR_SCALARS) {
1346 4 : NDR_CHECK(ndr_push_align(ndr, 5));
1347 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwVersion));
1348 4 : NDR_CHECK(ndr_push_DNS_BOOT_METHOD(ndr, NDR_SCALARS, r->fBootMethod));
1349 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAdminConfigured));
1350 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAllowUpdate));
1351 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDsAvailable));
1352 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszServerName));
1353 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDsContainer));
1354 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipServerAddrs));
1355 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipListenAddrs));
1356 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
1357 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtension1));
1358 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtension2));
1359 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtension3));
1360 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtension4));
1361 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtension5));
1362 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLogLevel));
1363 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDebugLevel));
1364 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
1365 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcProtocol));
1366 4 : NDR_CHECK(ndr_push_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, r->dwNameCheckFlag));
1367 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cAddressAnswerLimit));
1368 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionRetry));
1369 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionTimeout));
1370 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwMaxCacheTtl));
1371 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsPollingInterval));
1372 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwScavengingInterval));
1373 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultRefreshInterval));
1374 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultNoRefreshInterval));
1375 44 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (10); cntr_dwReserveArray_0++) {
1376 40 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserveArray[cntr_dwReserveArray_0]));
1377 : }
1378 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoReverseZones));
1379 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoCacheUpdate));
1380 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
1381 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fForwardDelegations));
1382 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fNoRecursion));
1383 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fSecureResponses));
1384 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRoundRobin));
1385 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLocalNetPriority));
1386 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fBindSecondaries));
1387 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fWriteAuthorityNs));
1388 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fStrictFileParsing));
1389 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLooseWildcarding));
1390 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDefaultAgingState));
1391 4 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, 15));
1392 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1393 : }
1394 4 : if (ndr_flags & NDR_BUFFERS) {
1395 4 : if (r->pszServerName) {
1396 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
1397 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1398 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
1399 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszServerName, ndr_charset_length(r->pszServerName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1400 : }
1401 4 : if (r->pszDsContainer) {
1402 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
1403 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1404 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
1405 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDsContainer, ndr_charset_length(r->pszDsContainer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1406 : }
1407 4 : if (r->aipServerAddrs) {
1408 4 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
1409 : }
1410 4 : if (r->aipListenAddrs) {
1411 4 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
1412 : }
1413 4 : if (r->aipForwarders) {
1414 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
1415 : }
1416 4 : if (r->pExtension1) {
1417 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->pExtension1));
1418 : }
1419 4 : if (r->pExtension2) {
1420 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->pExtension2));
1421 : }
1422 4 : if (r->pExtension3) {
1423 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->pExtension3));
1424 : }
1425 4 : if (r->pExtension4) {
1426 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->pExtension4));
1427 : }
1428 4 : if (r->pExtension5) {
1429 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->pExtension5));
1430 : }
1431 : }
1432 4 : return NDR_ERR_SUCCESS;
1433 : }
1434 :
1435 4 : static enum ndr_err_code ndr_pull_DNS_RPC_SERVER_INFO_W2K(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_SERVER_INFO_W2K *r)
1436 : {
1437 0 : uint32_t _ptr_pszServerName;
1438 4 : uint32_t size_pszServerName_1 = 0;
1439 4 : uint32_t length_pszServerName_1 = 0;
1440 4 : TALLOC_CTX *_mem_save_pszServerName_0 = NULL;
1441 0 : uint32_t _ptr_pszDsContainer;
1442 4 : uint32_t size_pszDsContainer_1 = 0;
1443 4 : uint32_t length_pszDsContainer_1 = 0;
1444 4 : TALLOC_CTX *_mem_save_pszDsContainer_0 = NULL;
1445 0 : uint32_t _ptr_aipServerAddrs;
1446 4 : TALLOC_CTX *_mem_save_aipServerAddrs_0 = NULL;
1447 0 : uint32_t _ptr_aipListenAddrs;
1448 4 : TALLOC_CTX *_mem_save_aipListenAddrs_0 = NULL;
1449 0 : uint32_t _ptr_aipForwarders;
1450 4 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
1451 0 : uint32_t _ptr_pExtension1;
1452 4 : TALLOC_CTX *_mem_save_pExtension1_0 = NULL;
1453 0 : uint32_t _ptr_pExtension2;
1454 4 : TALLOC_CTX *_mem_save_pExtension2_0 = NULL;
1455 0 : uint32_t _ptr_pExtension3;
1456 4 : TALLOC_CTX *_mem_save_pExtension3_0 = NULL;
1457 0 : uint32_t _ptr_pExtension4;
1458 4 : TALLOC_CTX *_mem_save_pExtension4_0 = NULL;
1459 0 : uint32_t _ptr_pExtension5;
1460 4 : TALLOC_CTX *_mem_save_pExtension5_0 = NULL;
1461 4 : uint32_t size_dwReserveArray_0 = 0;
1462 0 : uint32_t cntr_dwReserveArray_0;
1463 4 : uint32_t size_fReserveArray_0 = 0;
1464 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1465 4 : if (ndr_flags & NDR_SCALARS) {
1466 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
1467 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwVersion));
1468 4 : NDR_CHECK(ndr_pull_DNS_BOOT_METHOD(ndr, NDR_SCALARS, &r->fBootMethod));
1469 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAdminConfigured));
1470 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAllowUpdate));
1471 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDsAvailable));
1472 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServerName));
1473 4 : if (_ptr_pszServerName) {
1474 4 : NDR_PULL_ALLOC(ndr, r->pszServerName);
1475 : } else {
1476 0 : r->pszServerName = NULL;
1477 : }
1478 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDsContainer));
1479 4 : if (_ptr_pszDsContainer) {
1480 4 : NDR_PULL_ALLOC(ndr, r->pszDsContainer);
1481 : } else {
1482 0 : r->pszDsContainer = NULL;
1483 : }
1484 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipServerAddrs));
1485 4 : if (_ptr_aipServerAddrs) {
1486 4 : NDR_PULL_ALLOC(ndr, r->aipServerAddrs);
1487 : } else {
1488 0 : r->aipServerAddrs = NULL;
1489 : }
1490 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipListenAddrs));
1491 4 : if (_ptr_aipListenAddrs) {
1492 4 : NDR_PULL_ALLOC(ndr, r->aipListenAddrs);
1493 : } else {
1494 0 : r->aipListenAddrs = NULL;
1495 : }
1496 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
1497 4 : if (_ptr_aipForwarders) {
1498 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
1499 : } else {
1500 4 : r->aipForwarders = NULL;
1501 : }
1502 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtension1));
1503 4 : if (_ptr_pExtension1) {
1504 0 : NDR_PULL_ALLOC(ndr, r->pExtension1);
1505 : } else {
1506 4 : r->pExtension1 = NULL;
1507 : }
1508 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtension2));
1509 4 : if (_ptr_pExtension2) {
1510 0 : NDR_PULL_ALLOC(ndr, r->pExtension2);
1511 : } else {
1512 4 : r->pExtension2 = NULL;
1513 : }
1514 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtension3));
1515 4 : if (_ptr_pExtension3) {
1516 0 : NDR_PULL_ALLOC(ndr, r->pExtension3);
1517 : } else {
1518 4 : r->pExtension3 = NULL;
1519 : }
1520 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtension4));
1521 4 : if (_ptr_pExtension4) {
1522 0 : NDR_PULL_ALLOC(ndr, r->pExtension4);
1523 : } else {
1524 4 : r->pExtension4 = NULL;
1525 : }
1526 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtension5));
1527 4 : if (_ptr_pExtension5) {
1528 0 : NDR_PULL_ALLOC(ndr, r->pExtension5);
1529 : } else {
1530 4 : r->pExtension5 = NULL;
1531 : }
1532 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLogLevel));
1533 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDebugLevel));
1534 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
1535 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcProtocol));
1536 4 : NDR_CHECK(ndr_pull_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, &r->dwNameCheckFlag));
1537 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cAddressAnswerLimit));
1538 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionRetry));
1539 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionTimeout));
1540 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwMaxCacheTtl));
1541 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsPollingInterval));
1542 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwScavengingInterval));
1543 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultRefreshInterval));
1544 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultNoRefreshInterval));
1545 4 : size_dwReserveArray_0 = 10;
1546 44 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (size_dwReserveArray_0); cntr_dwReserveArray_0++) {
1547 40 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserveArray[cntr_dwReserveArray_0]));
1548 : }
1549 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoReverseZones));
1550 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoCacheUpdate));
1551 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
1552 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fForwardDelegations));
1553 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fNoRecursion));
1554 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fSecureResponses));
1555 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRoundRobin));
1556 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLocalNetPriority));
1557 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fBindSecondaries));
1558 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fWriteAuthorityNs));
1559 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fStrictFileParsing));
1560 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLooseWildcarding));
1561 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDefaultAgingState));
1562 4 : size_fReserveArray_0 = 15;
1563 4 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, size_fReserveArray_0));
1564 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1565 : }
1566 4 : if (ndr_flags & NDR_BUFFERS) {
1567 4 : if (r->pszServerName) {
1568 4 : _mem_save_pszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
1569 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszServerName, 0);
1570 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszServerName));
1571 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszServerName));
1572 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszServerName, &size_pszServerName_1));
1573 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszServerName, &length_pszServerName_1));
1574 4 : if (length_pszServerName_1 > size_pszServerName_1) {
1575 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszServerName_1, length_pszServerName_1);
1576 : }
1577 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServerName_1, sizeof(uint8_t)));
1578 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszServerName, length_pszServerName_1, sizeof(uint8_t), CH_UTF8));
1579 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServerName_0, 0);
1580 : }
1581 4 : if (r->pszDsContainer) {
1582 4 : _mem_save_pszDsContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
1583 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDsContainer, 0);
1584 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDsContainer));
1585 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDsContainer));
1586 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDsContainer, &size_pszDsContainer_1));
1587 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDsContainer, &length_pszDsContainer_1));
1588 4 : if (length_pszDsContainer_1 > size_pszDsContainer_1) {
1589 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDsContainer_1, length_pszDsContainer_1);
1590 : }
1591 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDsContainer_1, sizeof(uint16_t)));
1592 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDsContainer, length_pszDsContainer_1, sizeof(uint16_t), CH_UTF16));
1593 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDsContainer_0, 0);
1594 : }
1595 4 : if (r->aipServerAddrs) {
1596 4 : _mem_save_aipServerAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1597 4 : NDR_PULL_SET_MEM_CTX(ndr, r->aipServerAddrs, 0);
1598 4 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
1599 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipServerAddrs_0, 0);
1600 : }
1601 4 : if (r->aipListenAddrs) {
1602 4 : _mem_save_aipListenAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1603 4 : NDR_PULL_SET_MEM_CTX(ndr, r->aipListenAddrs, 0);
1604 4 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
1605 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipListenAddrs_0, 0);
1606 : }
1607 4 : if (r->aipForwarders) {
1608 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
1609 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
1610 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
1611 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
1612 : }
1613 4 : if (r->pExtension1) {
1614 0 : _mem_save_pExtension1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1615 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtension1, 0);
1616 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->pExtension1));
1617 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtension1_0, 0);
1618 : }
1619 4 : if (r->pExtension2) {
1620 0 : _mem_save_pExtension2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1621 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtension2, 0);
1622 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->pExtension2));
1623 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtension2_0, 0);
1624 : }
1625 4 : if (r->pExtension3) {
1626 0 : _mem_save_pExtension3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1627 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtension3, 0);
1628 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->pExtension3));
1629 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtension3_0, 0);
1630 : }
1631 4 : if (r->pExtension4) {
1632 0 : _mem_save_pExtension4_0 = NDR_PULL_GET_MEM_CTX(ndr);
1633 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtension4, 0);
1634 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->pExtension4));
1635 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtension4_0, 0);
1636 : }
1637 4 : if (r->pExtension5) {
1638 0 : _mem_save_pExtension5_0 = NDR_PULL_GET_MEM_CTX(ndr);
1639 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtension5, 0);
1640 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->pExtension5));
1641 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtension5_0, 0);
1642 : }
1643 : }
1644 4 : return NDR_ERR_SUCCESS;
1645 : }
1646 :
1647 0 : _PUBLIC_ void ndr_print_DNS_RPC_SERVER_INFO_W2K(struct ndr_print *ndr, const char *name, const struct DNS_RPC_SERVER_INFO_W2K *r)
1648 : {
1649 0 : uint32_t cntr_dwReserveArray_0;
1650 0 : ndr_print_struct(ndr, name, "DNS_RPC_SERVER_INFO_W2K");
1651 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1652 0 : ndr->depth++;
1653 0 : ndr_print_uint32(ndr, "dwVersion", r->dwVersion);
1654 0 : ndr_print_DNS_BOOT_METHOD(ndr, "fBootMethod", r->fBootMethod);
1655 0 : ndr_print_uint8(ndr, "fAdminConfigured", r->fAdminConfigured);
1656 0 : ndr_print_uint8(ndr, "fAllowUpdate", r->fAllowUpdate);
1657 0 : ndr_print_uint8(ndr, "fDsAvailable", r->fDsAvailable);
1658 0 : ndr_print_ptr(ndr, "pszServerName", r->pszServerName);
1659 0 : ndr->depth++;
1660 0 : if (r->pszServerName) {
1661 0 : ndr_print_string(ndr, "pszServerName", r->pszServerName);
1662 : }
1663 0 : ndr->depth--;
1664 0 : ndr_print_ptr(ndr, "pszDsContainer", r->pszDsContainer);
1665 0 : ndr->depth++;
1666 0 : if (r->pszDsContainer) {
1667 0 : ndr_print_string(ndr, "pszDsContainer", r->pszDsContainer);
1668 : }
1669 0 : ndr->depth--;
1670 0 : ndr_print_ptr(ndr, "aipServerAddrs", r->aipServerAddrs);
1671 0 : ndr->depth++;
1672 0 : if (r->aipServerAddrs) {
1673 0 : ndr_print_IP4_ARRAY(ndr, "aipServerAddrs", r->aipServerAddrs);
1674 : }
1675 0 : ndr->depth--;
1676 0 : ndr_print_ptr(ndr, "aipListenAddrs", r->aipListenAddrs);
1677 0 : ndr->depth++;
1678 0 : if (r->aipListenAddrs) {
1679 0 : ndr_print_IP4_ARRAY(ndr, "aipListenAddrs", r->aipListenAddrs);
1680 : }
1681 0 : ndr->depth--;
1682 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
1683 0 : ndr->depth++;
1684 0 : if (r->aipForwarders) {
1685 0 : ndr_print_IP4_ARRAY(ndr, "aipForwarders", r->aipForwarders);
1686 : }
1687 0 : ndr->depth--;
1688 0 : ndr_print_ptr(ndr, "pExtension1", r->pExtension1);
1689 0 : ndr->depth++;
1690 0 : if (r->pExtension1) {
1691 0 : ndr_print_uint32(ndr, "pExtension1", *r->pExtension1);
1692 : }
1693 0 : ndr->depth--;
1694 0 : ndr_print_ptr(ndr, "pExtension2", r->pExtension2);
1695 0 : ndr->depth++;
1696 0 : if (r->pExtension2) {
1697 0 : ndr_print_uint32(ndr, "pExtension2", *r->pExtension2);
1698 : }
1699 0 : ndr->depth--;
1700 0 : ndr_print_ptr(ndr, "pExtension3", r->pExtension3);
1701 0 : ndr->depth++;
1702 0 : if (r->pExtension3) {
1703 0 : ndr_print_uint32(ndr, "pExtension3", *r->pExtension3);
1704 : }
1705 0 : ndr->depth--;
1706 0 : ndr_print_ptr(ndr, "pExtension4", r->pExtension4);
1707 0 : ndr->depth++;
1708 0 : if (r->pExtension4) {
1709 0 : ndr_print_uint32(ndr, "pExtension4", *r->pExtension4);
1710 : }
1711 0 : ndr->depth--;
1712 0 : ndr_print_ptr(ndr, "pExtension5", r->pExtension5);
1713 0 : ndr->depth++;
1714 0 : if (r->pExtension5) {
1715 0 : ndr_print_uint32(ndr, "pExtension5", *r->pExtension5);
1716 : }
1717 0 : ndr->depth--;
1718 0 : ndr_print_uint32(ndr, "dwLogLevel", r->dwLogLevel);
1719 0 : ndr_print_uint32(ndr, "dwDebugLevel", r->dwDebugLevel);
1720 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
1721 0 : ndr_print_uint32(ndr, "dwRpcProtocol", r->dwRpcProtocol);
1722 0 : ndr_print_DNS_NAME_CHECK_FLAG(ndr, "dwNameCheckFlag", r->dwNameCheckFlag);
1723 0 : ndr_print_uint32(ndr, "cAddressAnswerLimit", r->cAddressAnswerLimit);
1724 0 : ndr_print_uint32(ndr, "dwRecursionRetry", r->dwRecursionRetry);
1725 0 : ndr_print_uint32(ndr, "dwRecursionTimeout", r->dwRecursionTimeout);
1726 0 : ndr_print_uint32(ndr, "dwMaxCacheTtl", r->dwMaxCacheTtl);
1727 0 : ndr_print_uint32(ndr, "dwDsPollingInterval", r->dwDsPollingInterval);
1728 0 : ndr_print_uint32(ndr, "dwScavengingInterval", r->dwScavengingInterval);
1729 0 : ndr_print_uint32(ndr, "dwDefaultRefreshInterval", r->dwDefaultRefreshInterval);
1730 0 : ndr_print_uint32(ndr, "dwDefaultNoRefreshInterval", r->dwDefaultNoRefreshInterval);
1731 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "dwReserveArray", (uint32_t)(10));
1732 0 : ndr->depth++;
1733 0 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (10); cntr_dwReserveArray_0++) {
1734 0 : ndr_print_uint32(ndr, "dwReserveArray", r->dwReserveArray[cntr_dwReserveArray_0]);
1735 : }
1736 0 : ndr->depth--;
1737 0 : ndr_print_uint8(ndr, "fAutoReverseZones", r->fAutoReverseZones);
1738 0 : ndr_print_uint8(ndr, "fAutoCacheUpdate", r->fAutoCacheUpdate);
1739 0 : ndr_print_uint8(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
1740 0 : ndr_print_uint8(ndr, "fForwardDelegations", r->fForwardDelegations);
1741 0 : ndr_print_uint8(ndr, "fNoRecursion", r->fNoRecursion);
1742 0 : ndr_print_uint8(ndr, "fSecureResponses", r->fSecureResponses);
1743 0 : ndr_print_uint8(ndr, "fRoundRobin", r->fRoundRobin);
1744 0 : ndr_print_uint8(ndr, "fLocalNetPriority", r->fLocalNetPriority);
1745 0 : ndr_print_uint8(ndr, "fBindSecondaries", r->fBindSecondaries);
1746 0 : ndr_print_uint8(ndr, "fWriteAuthorityNs", r->fWriteAuthorityNs);
1747 0 : ndr_print_uint8(ndr, "fStrictFileParsing", r->fStrictFileParsing);
1748 0 : ndr_print_uint8(ndr, "fLooseWildcarding", r->fLooseWildcarding);
1749 0 : ndr_print_uint8(ndr, "fDefaultAgingState", r->fDefaultAgingState);
1750 0 : ndr_print_array_uint8(ndr, "fReserveArray", r->fReserveArray, 15);
1751 0 : ndr->depth--;
1752 : }
1753 :
1754 96 : static enum ndr_err_code ndr_push_DNS_EXTENSION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_EXTENSION *r)
1755 : {
1756 96 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1757 96 : if (ndr_flags & NDR_SCALARS) {
1758 48 : NDR_CHECK(ndr_push_align(ndr, 5));
1759 48 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->extension));
1760 48 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1761 : }
1762 96 : if (ndr_flags & NDR_BUFFERS) {
1763 48 : if (r->extension) {
1764 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->extension, CH_UTF8)));
1765 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1766 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->extension, CH_UTF8)));
1767 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->extension, ndr_charset_length(r->extension, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1768 : }
1769 : }
1770 96 : return NDR_ERR_SUCCESS;
1771 : }
1772 :
1773 96 : static enum ndr_err_code ndr_pull_DNS_EXTENSION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_EXTENSION *r)
1774 : {
1775 0 : uint32_t _ptr_extension;
1776 96 : uint32_t size_extension_1 = 0;
1777 96 : uint32_t length_extension_1 = 0;
1778 96 : TALLOC_CTX *_mem_save_extension_0 = NULL;
1779 96 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1780 96 : if (ndr_flags & NDR_SCALARS) {
1781 48 : NDR_CHECK(ndr_pull_align(ndr, 5));
1782 48 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_extension));
1783 48 : if (_ptr_extension) {
1784 0 : NDR_PULL_ALLOC(ndr, r->extension);
1785 : } else {
1786 48 : r->extension = NULL;
1787 : }
1788 48 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1789 : }
1790 96 : if (ndr_flags & NDR_BUFFERS) {
1791 48 : if (r->extension) {
1792 0 : _mem_save_extension_0 = NDR_PULL_GET_MEM_CTX(ndr);
1793 0 : NDR_PULL_SET_MEM_CTX(ndr, r->extension, 0);
1794 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->extension));
1795 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->extension));
1796 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->extension, &size_extension_1));
1797 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->extension, &length_extension_1));
1798 0 : if (length_extension_1 > size_extension_1) {
1799 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_extension_1, length_extension_1);
1800 : }
1801 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_extension_1, sizeof(uint8_t)));
1802 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->extension, length_extension_1, sizeof(uint8_t), CH_UTF8));
1803 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_extension_0, 0);
1804 : }
1805 : }
1806 96 : return NDR_ERR_SUCCESS;
1807 : }
1808 :
1809 0 : _PUBLIC_ void ndr_print_DNS_EXTENSION(struct ndr_print *ndr, const char *name, const struct DNS_EXTENSION *r)
1810 : {
1811 0 : ndr_print_struct(ndr, name, "DNS_EXTENSION");
1812 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1813 0 : ndr->depth++;
1814 0 : ndr_print_ptr(ndr, "extension", r->extension);
1815 0 : ndr->depth++;
1816 0 : if (r->extension) {
1817 0 : ndr_print_string(ndr, "extension", r->extension);
1818 : }
1819 0 : ndr->depth--;
1820 0 : ndr->depth--;
1821 : }
1822 :
1823 4 : _PUBLIC_ enum ndr_err_code ndr_push_DNS_RPC_SERVER_INFO_DOTNET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_SERVER_INFO_DOTNET *r)
1824 : {
1825 0 : uint32_t cntr_pExtensions_0;
1826 0 : uint32_t cntr_dwReserveArray_0;
1827 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1828 4 : if (ndr_flags & NDR_SCALARS) {
1829 4 : NDR_CHECK(ndr_push_align(ndr, 5));
1830 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
1831 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
1832 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwVersion));
1833 4 : NDR_CHECK(ndr_push_DNS_BOOT_METHOD(ndr, NDR_SCALARS, r->fBootMethod));
1834 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAdminConfigured));
1835 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAllowUpdate));
1836 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDsAvailable));
1837 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszServerName));
1838 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDsContainer));
1839 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipServerAddrs));
1840 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipListenAddrs));
1841 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
1842 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipLogFilter));
1843 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwszLogFilePath));
1844 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDomainName));
1845 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszForestName));
1846 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDomainDirectoryPartition));
1847 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszForestDirectoryPartition));
1848 28 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
1849 24 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pExtensions[cntr_pExtensions_0]));
1850 : }
1851 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLogLevel));
1852 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDebugLevel));
1853 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
1854 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcProtocol));
1855 4 : NDR_CHECK(ndr_push_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, r->dwNameCheckFlag));
1856 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cAddressAnswerLimit));
1857 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionRetry));
1858 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionTimeout));
1859 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwMaxCacheTtl));
1860 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsPollingInterval));
1861 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLocalNetPriorityNetMask));
1862 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwScavengingInterval));
1863 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultRefreshInterval));
1864 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultNoRefreshInterval));
1865 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastScavengeTime));
1866 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwEventLogLevel));
1867 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLogFileMaxSize));
1868 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsForestVersion));
1869 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsDomainVersion));
1870 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsDsaVersion));
1871 20 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (4); cntr_dwReserveArray_0++) {
1872 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserveArray[cntr_dwReserveArray_0]));
1873 : }
1874 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoReverseZones));
1875 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoCacheUpdate));
1876 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
1877 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fForwardDelegations));
1878 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fNoRecursion));
1879 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fSecureResponses));
1880 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRoundRobin));
1881 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLocalNetPriority));
1882 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fBindSecondaries));
1883 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fWriteAuthorityNs));
1884 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fStrictFileParsing));
1885 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLooseWildcarding));
1886 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDefaultAgingState));
1887 4 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, 15));
1888 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1889 : }
1890 4 : if (ndr_flags & NDR_BUFFERS) {
1891 4 : if (r->pszServerName) {
1892 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
1893 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1894 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
1895 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszServerName, ndr_charset_length(r->pszServerName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1896 : }
1897 4 : if (r->pszDsContainer) {
1898 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
1899 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1900 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
1901 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDsContainer, ndr_charset_length(r->pszDsContainer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1902 : }
1903 4 : if (r->aipServerAddrs) {
1904 4 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
1905 : }
1906 4 : if (r->aipListenAddrs) {
1907 4 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
1908 : }
1909 4 : if (r->aipForwarders) {
1910 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
1911 : }
1912 4 : if (r->aipLogFilter) {
1913 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipLogFilter));
1914 : }
1915 4 : if (r->pwszLogFilePath) {
1916 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszLogFilePath, CH_UTF16)));
1917 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1918 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszLogFilePath, CH_UTF16)));
1919 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pwszLogFilePath, ndr_charset_length(r->pwszLogFilePath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1920 : }
1921 4 : if (r->pszDomainName) {
1922 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainName, CH_UTF8)));
1923 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1924 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainName, CH_UTF8)));
1925 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDomainName, ndr_charset_length(r->pszDomainName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1926 : }
1927 4 : if (r->pszForestName) {
1928 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestName, CH_UTF8)));
1929 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1930 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestName, CH_UTF8)));
1931 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszForestName, ndr_charset_length(r->pszForestName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1932 : }
1933 4 : if (r->pszDomainDirectoryPartition) {
1934 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8)));
1935 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1936 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8)));
1937 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDomainDirectoryPartition, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1938 : }
1939 4 : if (r->pszForestDirectoryPartition) {
1940 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8)));
1941 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1942 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8)));
1943 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszForestDirectoryPartition, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1944 : }
1945 28 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
1946 24 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pExtensions[cntr_pExtensions_0]));
1947 : }
1948 : }
1949 4 : return NDR_ERR_SUCCESS;
1950 : }
1951 :
1952 4 : _PUBLIC_ enum ndr_err_code ndr_pull_DNS_RPC_SERVER_INFO_DOTNET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_SERVER_INFO_DOTNET *r)
1953 : {
1954 0 : uint32_t _ptr_pszServerName;
1955 4 : uint32_t size_pszServerName_1 = 0;
1956 4 : uint32_t length_pszServerName_1 = 0;
1957 4 : TALLOC_CTX *_mem_save_pszServerName_0 = NULL;
1958 0 : uint32_t _ptr_pszDsContainer;
1959 4 : uint32_t size_pszDsContainer_1 = 0;
1960 4 : uint32_t length_pszDsContainer_1 = 0;
1961 4 : TALLOC_CTX *_mem_save_pszDsContainer_0 = NULL;
1962 0 : uint32_t _ptr_aipServerAddrs;
1963 4 : TALLOC_CTX *_mem_save_aipServerAddrs_0 = NULL;
1964 0 : uint32_t _ptr_aipListenAddrs;
1965 4 : TALLOC_CTX *_mem_save_aipListenAddrs_0 = NULL;
1966 0 : uint32_t _ptr_aipForwarders;
1967 4 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
1968 0 : uint32_t _ptr_aipLogFilter;
1969 4 : TALLOC_CTX *_mem_save_aipLogFilter_0 = NULL;
1970 0 : uint32_t _ptr_pwszLogFilePath;
1971 4 : uint32_t size_pwszLogFilePath_1 = 0;
1972 4 : uint32_t length_pwszLogFilePath_1 = 0;
1973 4 : TALLOC_CTX *_mem_save_pwszLogFilePath_0 = NULL;
1974 0 : uint32_t _ptr_pszDomainName;
1975 4 : uint32_t size_pszDomainName_1 = 0;
1976 4 : uint32_t length_pszDomainName_1 = 0;
1977 4 : TALLOC_CTX *_mem_save_pszDomainName_0 = NULL;
1978 0 : uint32_t _ptr_pszForestName;
1979 4 : uint32_t size_pszForestName_1 = 0;
1980 4 : uint32_t length_pszForestName_1 = 0;
1981 4 : TALLOC_CTX *_mem_save_pszForestName_0 = NULL;
1982 0 : uint32_t _ptr_pszDomainDirectoryPartition;
1983 4 : uint32_t size_pszDomainDirectoryPartition_1 = 0;
1984 4 : uint32_t length_pszDomainDirectoryPartition_1 = 0;
1985 4 : TALLOC_CTX *_mem_save_pszDomainDirectoryPartition_0 = NULL;
1986 0 : uint32_t _ptr_pszForestDirectoryPartition;
1987 4 : uint32_t size_pszForestDirectoryPartition_1 = 0;
1988 4 : uint32_t length_pszForestDirectoryPartition_1 = 0;
1989 4 : TALLOC_CTX *_mem_save_pszForestDirectoryPartition_0 = NULL;
1990 4 : uint32_t size_pExtensions_0 = 0;
1991 0 : uint32_t cntr_pExtensions_0;
1992 4 : uint32_t size_dwReserveArray_0 = 0;
1993 0 : uint32_t cntr_dwReserveArray_0;
1994 4 : uint32_t size_fReserveArray_0 = 0;
1995 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1996 4 : if (ndr_flags & NDR_SCALARS) {
1997 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
1998 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
1999 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
2000 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwVersion));
2001 4 : NDR_CHECK(ndr_pull_DNS_BOOT_METHOD(ndr, NDR_SCALARS, &r->fBootMethod));
2002 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAdminConfigured));
2003 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAllowUpdate));
2004 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDsAvailable));
2005 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServerName));
2006 4 : if (_ptr_pszServerName) {
2007 4 : NDR_PULL_ALLOC(ndr, r->pszServerName);
2008 : } else {
2009 0 : r->pszServerName = NULL;
2010 : }
2011 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDsContainer));
2012 4 : if (_ptr_pszDsContainer) {
2013 4 : NDR_PULL_ALLOC(ndr, r->pszDsContainer);
2014 : } else {
2015 0 : r->pszDsContainer = NULL;
2016 : }
2017 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipServerAddrs));
2018 4 : if (_ptr_aipServerAddrs) {
2019 4 : NDR_PULL_ALLOC(ndr, r->aipServerAddrs);
2020 : } else {
2021 0 : r->aipServerAddrs = NULL;
2022 : }
2023 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipListenAddrs));
2024 4 : if (_ptr_aipListenAddrs) {
2025 4 : NDR_PULL_ALLOC(ndr, r->aipListenAddrs);
2026 : } else {
2027 0 : r->aipListenAddrs = NULL;
2028 : }
2029 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
2030 4 : if (_ptr_aipForwarders) {
2031 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
2032 : } else {
2033 4 : r->aipForwarders = NULL;
2034 : }
2035 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipLogFilter));
2036 4 : if (_ptr_aipLogFilter) {
2037 0 : NDR_PULL_ALLOC(ndr, r->aipLogFilter);
2038 : } else {
2039 4 : r->aipLogFilter = NULL;
2040 : }
2041 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszLogFilePath));
2042 4 : if (_ptr_pwszLogFilePath) {
2043 0 : NDR_PULL_ALLOC(ndr, r->pwszLogFilePath);
2044 : } else {
2045 4 : r->pwszLogFilePath = NULL;
2046 : }
2047 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDomainName));
2048 4 : if (_ptr_pszDomainName) {
2049 4 : NDR_PULL_ALLOC(ndr, r->pszDomainName);
2050 : } else {
2051 0 : r->pszDomainName = NULL;
2052 : }
2053 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszForestName));
2054 4 : if (_ptr_pszForestName) {
2055 4 : NDR_PULL_ALLOC(ndr, r->pszForestName);
2056 : } else {
2057 0 : r->pszForestName = NULL;
2058 : }
2059 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDomainDirectoryPartition));
2060 4 : if (_ptr_pszDomainDirectoryPartition) {
2061 4 : NDR_PULL_ALLOC(ndr, r->pszDomainDirectoryPartition);
2062 : } else {
2063 0 : r->pszDomainDirectoryPartition = NULL;
2064 : }
2065 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszForestDirectoryPartition));
2066 4 : if (_ptr_pszForestDirectoryPartition) {
2067 4 : NDR_PULL_ALLOC(ndr, r->pszForestDirectoryPartition);
2068 : } else {
2069 0 : r->pszForestDirectoryPartition = NULL;
2070 : }
2071 4 : size_pExtensions_0 = 6;
2072 28 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2073 24 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pExtensions[cntr_pExtensions_0]));
2074 : }
2075 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLogLevel));
2076 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDebugLevel));
2077 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
2078 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcProtocol));
2079 4 : NDR_CHECK(ndr_pull_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, &r->dwNameCheckFlag));
2080 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cAddressAnswerLimit));
2081 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionRetry));
2082 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionTimeout));
2083 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwMaxCacheTtl));
2084 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsPollingInterval));
2085 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLocalNetPriorityNetMask));
2086 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwScavengingInterval));
2087 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultRefreshInterval));
2088 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultNoRefreshInterval));
2089 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastScavengeTime));
2090 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwEventLogLevel));
2091 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLogFileMaxSize));
2092 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsForestVersion));
2093 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsDomainVersion));
2094 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsDsaVersion));
2095 4 : size_dwReserveArray_0 = 4;
2096 20 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (size_dwReserveArray_0); cntr_dwReserveArray_0++) {
2097 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserveArray[cntr_dwReserveArray_0]));
2098 : }
2099 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoReverseZones));
2100 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoCacheUpdate));
2101 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
2102 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fForwardDelegations));
2103 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fNoRecursion));
2104 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fSecureResponses));
2105 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRoundRobin));
2106 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLocalNetPriority));
2107 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fBindSecondaries));
2108 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fWriteAuthorityNs));
2109 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fStrictFileParsing));
2110 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLooseWildcarding));
2111 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDefaultAgingState));
2112 4 : size_fReserveArray_0 = 15;
2113 4 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, size_fReserveArray_0));
2114 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2115 : }
2116 4 : if (ndr_flags & NDR_BUFFERS) {
2117 4 : if (r->pszServerName) {
2118 4 : _mem_save_pszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2119 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszServerName, 0);
2120 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszServerName));
2121 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszServerName));
2122 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszServerName, &size_pszServerName_1));
2123 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszServerName, &length_pszServerName_1));
2124 4 : if (length_pszServerName_1 > size_pszServerName_1) {
2125 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszServerName_1, length_pszServerName_1);
2126 : }
2127 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServerName_1, sizeof(uint8_t)));
2128 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszServerName, length_pszServerName_1, sizeof(uint8_t), CH_UTF8));
2129 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServerName_0, 0);
2130 : }
2131 4 : if (r->pszDsContainer) {
2132 4 : _mem_save_pszDsContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
2133 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDsContainer, 0);
2134 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDsContainer));
2135 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDsContainer));
2136 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDsContainer, &size_pszDsContainer_1));
2137 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDsContainer, &length_pszDsContainer_1));
2138 4 : if (length_pszDsContainer_1 > size_pszDsContainer_1) {
2139 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDsContainer_1, length_pszDsContainer_1);
2140 : }
2141 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDsContainer_1, sizeof(uint16_t)));
2142 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDsContainer, length_pszDsContainer_1, sizeof(uint16_t), CH_UTF16));
2143 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDsContainer_0, 0);
2144 : }
2145 4 : if (r->aipServerAddrs) {
2146 4 : _mem_save_aipServerAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
2147 4 : NDR_PULL_SET_MEM_CTX(ndr, r->aipServerAddrs, 0);
2148 4 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
2149 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipServerAddrs_0, 0);
2150 : }
2151 4 : if (r->aipListenAddrs) {
2152 4 : _mem_save_aipListenAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
2153 4 : NDR_PULL_SET_MEM_CTX(ndr, r->aipListenAddrs, 0);
2154 4 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
2155 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipListenAddrs_0, 0);
2156 : }
2157 4 : if (r->aipForwarders) {
2158 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
2159 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
2160 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
2161 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
2162 : }
2163 4 : if (r->aipLogFilter) {
2164 0 : _mem_save_aipLogFilter_0 = NDR_PULL_GET_MEM_CTX(ndr);
2165 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipLogFilter, 0);
2166 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipLogFilter));
2167 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipLogFilter_0, 0);
2168 : }
2169 4 : if (r->pwszLogFilePath) {
2170 0 : _mem_save_pwszLogFilePath_0 = NDR_PULL_GET_MEM_CTX(ndr);
2171 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pwszLogFilePath, 0);
2172 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pwszLogFilePath));
2173 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pwszLogFilePath));
2174 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pwszLogFilePath, &size_pwszLogFilePath_1));
2175 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pwszLogFilePath, &length_pwszLogFilePath_1));
2176 0 : if (length_pwszLogFilePath_1 > size_pwszLogFilePath_1) {
2177 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszLogFilePath_1, length_pwszLogFilePath_1);
2178 : }
2179 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszLogFilePath_1, sizeof(uint16_t)));
2180 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pwszLogFilePath, length_pwszLogFilePath_1, sizeof(uint16_t), CH_UTF16));
2181 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszLogFilePath_0, 0);
2182 : }
2183 4 : if (r->pszDomainName) {
2184 4 : _mem_save_pszDomainName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2185 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDomainName, 0);
2186 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDomainName));
2187 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDomainName));
2188 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDomainName, &size_pszDomainName_1));
2189 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDomainName, &length_pszDomainName_1));
2190 4 : if (length_pszDomainName_1 > size_pszDomainName_1) {
2191 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDomainName_1, length_pszDomainName_1);
2192 : }
2193 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDomainName_1, sizeof(uint8_t)));
2194 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDomainName, length_pszDomainName_1, sizeof(uint8_t), CH_UTF8));
2195 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDomainName_0, 0);
2196 : }
2197 4 : if (r->pszForestName) {
2198 4 : _mem_save_pszForestName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2199 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszForestName, 0);
2200 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszForestName));
2201 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszForestName));
2202 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszForestName, &size_pszForestName_1));
2203 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszForestName, &length_pszForestName_1));
2204 4 : if (length_pszForestName_1 > size_pszForestName_1) {
2205 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszForestName_1, length_pszForestName_1);
2206 : }
2207 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszForestName_1, sizeof(uint8_t)));
2208 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszForestName, length_pszForestName_1, sizeof(uint8_t), CH_UTF8));
2209 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszForestName_0, 0);
2210 : }
2211 4 : if (r->pszDomainDirectoryPartition) {
2212 4 : _mem_save_pszDomainDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
2213 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDomainDirectoryPartition, 0);
2214 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDomainDirectoryPartition));
2215 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDomainDirectoryPartition));
2216 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDomainDirectoryPartition, &size_pszDomainDirectoryPartition_1));
2217 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDomainDirectoryPartition, &length_pszDomainDirectoryPartition_1));
2218 4 : if (length_pszDomainDirectoryPartition_1 > size_pszDomainDirectoryPartition_1) {
2219 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDomainDirectoryPartition_1, length_pszDomainDirectoryPartition_1);
2220 : }
2221 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDomainDirectoryPartition_1, sizeof(uint8_t)));
2222 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDomainDirectoryPartition, length_pszDomainDirectoryPartition_1, sizeof(uint8_t), CH_UTF8));
2223 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDomainDirectoryPartition_0, 0);
2224 : }
2225 4 : if (r->pszForestDirectoryPartition) {
2226 4 : _mem_save_pszForestDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
2227 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszForestDirectoryPartition, 0);
2228 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszForestDirectoryPartition));
2229 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszForestDirectoryPartition));
2230 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszForestDirectoryPartition, &size_pszForestDirectoryPartition_1));
2231 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszForestDirectoryPartition, &length_pszForestDirectoryPartition_1));
2232 4 : if (length_pszForestDirectoryPartition_1 > size_pszForestDirectoryPartition_1) {
2233 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszForestDirectoryPartition_1, length_pszForestDirectoryPartition_1);
2234 : }
2235 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszForestDirectoryPartition_1, sizeof(uint8_t)));
2236 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszForestDirectoryPartition, length_pszForestDirectoryPartition_1, sizeof(uint8_t), CH_UTF8));
2237 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszForestDirectoryPartition_0, 0);
2238 : }
2239 4 : size_pExtensions_0 = 6;
2240 28 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2241 24 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pExtensions[cntr_pExtensions_0]));
2242 : }
2243 28 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2244 : }
2245 : }
2246 4 : return NDR_ERR_SUCCESS;
2247 : }
2248 :
2249 0 : static void ndr_print_flags_DNS_RPC_SERVER_INFO_DOTNET(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct DNS_RPC_SERVER_INFO_DOTNET *r)
2250 : {
2251 0 : ndr_print_DNS_RPC_SERVER_INFO_DOTNET(ndr, name, r);
2252 0 : }
2253 :
2254 0 : _PUBLIC_ void ndr_print_DNS_RPC_SERVER_INFO_DOTNET(struct ndr_print *ndr, const char *name, const struct DNS_RPC_SERVER_INFO_DOTNET *r)
2255 : {
2256 0 : uint32_t cntr_pExtensions_0;
2257 0 : uint32_t cntr_dwReserveArray_0;
2258 0 : ndr_print_struct(ndr, name, "DNS_RPC_SERVER_INFO_DOTNET");
2259 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2260 0 : ndr->depth++;
2261 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
2262 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
2263 0 : ndr_print_uint32(ndr, "dwVersion", r->dwVersion);
2264 0 : ndr_print_DNS_BOOT_METHOD(ndr, "fBootMethod", r->fBootMethod);
2265 0 : ndr_print_uint8(ndr, "fAdminConfigured", r->fAdminConfigured);
2266 0 : ndr_print_uint8(ndr, "fAllowUpdate", r->fAllowUpdate);
2267 0 : ndr_print_uint8(ndr, "fDsAvailable", r->fDsAvailable);
2268 0 : ndr_print_ptr(ndr, "pszServerName", r->pszServerName);
2269 0 : ndr->depth++;
2270 0 : if (r->pszServerName) {
2271 0 : ndr_print_string(ndr, "pszServerName", r->pszServerName);
2272 : }
2273 0 : ndr->depth--;
2274 0 : ndr_print_ptr(ndr, "pszDsContainer", r->pszDsContainer);
2275 0 : ndr->depth++;
2276 0 : if (r->pszDsContainer) {
2277 0 : ndr_print_string(ndr, "pszDsContainer", r->pszDsContainer);
2278 : }
2279 0 : ndr->depth--;
2280 0 : ndr_print_ptr(ndr, "aipServerAddrs", r->aipServerAddrs);
2281 0 : ndr->depth++;
2282 0 : if (r->aipServerAddrs) {
2283 0 : ndr_print_IP4_ARRAY(ndr, "aipServerAddrs", r->aipServerAddrs);
2284 : }
2285 0 : ndr->depth--;
2286 0 : ndr_print_ptr(ndr, "aipListenAddrs", r->aipListenAddrs);
2287 0 : ndr->depth++;
2288 0 : if (r->aipListenAddrs) {
2289 0 : ndr_print_IP4_ARRAY(ndr, "aipListenAddrs", r->aipListenAddrs);
2290 : }
2291 0 : ndr->depth--;
2292 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
2293 0 : ndr->depth++;
2294 0 : if (r->aipForwarders) {
2295 0 : ndr_print_IP4_ARRAY(ndr, "aipForwarders", r->aipForwarders);
2296 : }
2297 0 : ndr->depth--;
2298 0 : ndr_print_ptr(ndr, "aipLogFilter", r->aipLogFilter);
2299 0 : ndr->depth++;
2300 0 : if (r->aipLogFilter) {
2301 0 : ndr_print_IP4_ARRAY(ndr, "aipLogFilter", r->aipLogFilter);
2302 : }
2303 0 : ndr->depth--;
2304 0 : ndr_print_ptr(ndr, "pwszLogFilePath", r->pwszLogFilePath);
2305 0 : ndr->depth++;
2306 0 : if (r->pwszLogFilePath) {
2307 0 : ndr_print_string(ndr, "pwszLogFilePath", r->pwszLogFilePath);
2308 : }
2309 0 : ndr->depth--;
2310 0 : ndr_print_ptr(ndr, "pszDomainName", r->pszDomainName);
2311 0 : ndr->depth++;
2312 0 : if (r->pszDomainName) {
2313 0 : ndr_print_string(ndr, "pszDomainName", r->pszDomainName);
2314 : }
2315 0 : ndr->depth--;
2316 0 : ndr_print_ptr(ndr, "pszForestName", r->pszForestName);
2317 0 : ndr->depth++;
2318 0 : if (r->pszForestName) {
2319 0 : ndr_print_string(ndr, "pszForestName", r->pszForestName);
2320 : }
2321 0 : ndr->depth--;
2322 0 : ndr_print_ptr(ndr, "pszDomainDirectoryPartition", r->pszDomainDirectoryPartition);
2323 0 : ndr->depth++;
2324 0 : if (r->pszDomainDirectoryPartition) {
2325 0 : ndr_print_string(ndr, "pszDomainDirectoryPartition", r->pszDomainDirectoryPartition);
2326 : }
2327 0 : ndr->depth--;
2328 0 : ndr_print_ptr(ndr, "pszForestDirectoryPartition", r->pszForestDirectoryPartition);
2329 0 : ndr->depth++;
2330 0 : if (r->pszForestDirectoryPartition) {
2331 0 : ndr_print_string(ndr, "pszForestDirectoryPartition", r->pszForestDirectoryPartition);
2332 : }
2333 0 : ndr->depth--;
2334 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pExtensions", (uint32_t)(6));
2335 0 : ndr->depth++;
2336 0 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
2337 0 : ndr_print_DNS_EXTENSION(ndr, "pExtensions", &r->pExtensions[cntr_pExtensions_0]);
2338 : }
2339 0 : ndr->depth--;
2340 0 : ndr_print_uint32(ndr, "dwLogLevel", r->dwLogLevel);
2341 0 : ndr_print_uint32(ndr, "dwDebugLevel", r->dwDebugLevel);
2342 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
2343 0 : ndr_print_uint32(ndr, "dwRpcProtocol", r->dwRpcProtocol);
2344 0 : ndr_print_DNS_NAME_CHECK_FLAG(ndr, "dwNameCheckFlag", r->dwNameCheckFlag);
2345 0 : ndr_print_uint32(ndr, "cAddressAnswerLimit", r->cAddressAnswerLimit);
2346 0 : ndr_print_uint32(ndr, "dwRecursionRetry", r->dwRecursionRetry);
2347 0 : ndr_print_uint32(ndr, "dwRecursionTimeout", r->dwRecursionTimeout);
2348 0 : ndr_print_uint32(ndr, "dwMaxCacheTtl", r->dwMaxCacheTtl);
2349 0 : ndr_print_uint32(ndr, "dwDsPollingInterval", r->dwDsPollingInterval);
2350 0 : ndr_print_uint32(ndr, "dwLocalNetPriorityNetMask", r->dwLocalNetPriorityNetMask);
2351 0 : ndr_print_uint32(ndr, "dwScavengingInterval", r->dwScavengingInterval);
2352 0 : ndr_print_uint32(ndr, "dwDefaultRefreshInterval", r->dwDefaultRefreshInterval);
2353 0 : ndr_print_uint32(ndr, "dwDefaultNoRefreshInterval", r->dwDefaultNoRefreshInterval);
2354 0 : ndr_print_uint32(ndr, "dwLastScavengeTime", r->dwLastScavengeTime);
2355 0 : ndr_print_uint32(ndr, "dwEventLogLevel", r->dwEventLogLevel);
2356 0 : ndr_print_uint32(ndr, "dwLogFileMaxSize", r->dwLogFileMaxSize);
2357 0 : ndr_print_uint32(ndr, "dwDsForestVersion", r->dwDsForestVersion);
2358 0 : ndr_print_uint32(ndr, "dwDsDomainVersion", r->dwDsDomainVersion);
2359 0 : ndr_print_uint32(ndr, "dwDsDsaVersion", r->dwDsDsaVersion);
2360 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "dwReserveArray", (uint32_t)(4));
2361 0 : ndr->depth++;
2362 0 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (4); cntr_dwReserveArray_0++) {
2363 0 : ndr_print_uint32(ndr, "dwReserveArray", r->dwReserveArray[cntr_dwReserveArray_0]);
2364 : }
2365 0 : ndr->depth--;
2366 0 : ndr_print_uint8(ndr, "fAutoReverseZones", r->fAutoReverseZones);
2367 0 : ndr_print_uint8(ndr, "fAutoCacheUpdate", r->fAutoCacheUpdate);
2368 0 : ndr_print_uint8(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
2369 0 : ndr_print_uint8(ndr, "fForwardDelegations", r->fForwardDelegations);
2370 0 : ndr_print_uint8(ndr, "fNoRecursion", r->fNoRecursion);
2371 0 : ndr_print_uint8(ndr, "fSecureResponses", r->fSecureResponses);
2372 0 : ndr_print_uint8(ndr, "fRoundRobin", r->fRoundRobin);
2373 0 : ndr_print_uint8(ndr, "fLocalNetPriority", r->fLocalNetPriority);
2374 0 : ndr_print_uint8(ndr, "fBindSecondaries", r->fBindSecondaries);
2375 0 : ndr_print_uint8(ndr, "fWriteAuthorityNs", r->fWriteAuthorityNs);
2376 0 : ndr_print_uint8(ndr, "fStrictFileParsing", r->fStrictFileParsing);
2377 0 : ndr_print_uint8(ndr, "fLooseWildcarding", r->fLooseWildcarding);
2378 0 : ndr_print_uint8(ndr, "fDefaultAgingState", r->fDefaultAgingState);
2379 0 : ndr_print_array_uint8(ndr, "fReserveArray", r->fReserveArray, 15);
2380 0 : ndr->depth--;
2381 : }
2382 :
2383 4 : _PUBLIC_ enum ndr_err_code ndr_push_DNS_RPC_SERVER_INFO_LONGHORN(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_SERVER_INFO_LONGHORN *r)
2384 : {
2385 0 : uint32_t cntr_pExtensions_0;
2386 0 : uint32_t cntr_dwReserveArray_0;
2387 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2388 4 : if (ndr_flags & NDR_SCALARS) {
2389 4 : NDR_CHECK(ndr_push_align(ndr, 5));
2390 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
2391 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
2392 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwVersion));
2393 4 : NDR_CHECK(ndr_push_DNS_BOOT_METHOD(ndr, NDR_SCALARS, r->fBootMethod));
2394 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAdminConfigured));
2395 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAllowUpdate));
2396 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDsAvailable));
2397 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszServerName));
2398 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDsContainer));
2399 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipServerAddrs));
2400 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipListenAddrs));
2401 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
2402 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipLogFilter));
2403 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwszLogFilePath));
2404 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDomainName));
2405 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszForestName));
2406 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDomainDirectoryPartition));
2407 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszForestDirectoryPartition));
2408 28 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
2409 24 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pExtensions[cntr_pExtensions_0]));
2410 : }
2411 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLogLevel));
2412 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDebugLevel));
2413 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
2414 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcProtocol));
2415 4 : NDR_CHECK(ndr_push_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, r->dwNameCheckFlag));
2416 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cAddressAnswerLimit));
2417 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionRetry));
2418 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionTimeout));
2419 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwMaxCacheTtl));
2420 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsPollingInterval));
2421 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLocalNetPriorityNetMask));
2422 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwScavengingInterval));
2423 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultRefreshInterval));
2424 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultNoRefreshInterval));
2425 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastScavengeTime));
2426 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwEventLogLevel));
2427 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLogFileMaxSize));
2428 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsForestVersion));
2429 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsDomainVersion));
2430 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsDsaVersion));
2431 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fReadOnlyDC));
2432 16 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (3); cntr_dwReserveArray_0++) {
2433 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserveArray[cntr_dwReserveArray_0]));
2434 : }
2435 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoReverseZones));
2436 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoCacheUpdate));
2437 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
2438 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fForwardDelegations));
2439 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fNoRecursion));
2440 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fSecureResponses));
2441 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRoundRobin));
2442 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLocalNetPriority));
2443 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fBindSecondaries));
2444 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fWriteAuthorityNs));
2445 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fStrictFileParsing));
2446 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLooseWildcarding));
2447 4 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDefaultAgingState));
2448 4 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, 15));
2449 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2450 : }
2451 4 : if (ndr_flags & NDR_BUFFERS) {
2452 4 : if (r->pszServerName) {
2453 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
2454 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2455 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
2456 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszServerName, ndr_charset_length(r->pszServerName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2457 : }
2458 4 : if (r->pszDsContainer) {
2459 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
2460 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2461 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
2462 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDsContainer, ndr_charset_length(r->pszDsContainer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2463 : }
2464 4 : if (r->aipServerAddrs) {
2465 4 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
2466 : }
2467 4 : if (r->aipListenAddrs) {
2468 4 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
2469 : }
2470 4 : if (r->aipForwarders) {
2471 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
2472 : }
2473 4 : if (r->aipLogFilter) {
2474 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipLogFilter));
2475 : }
2476 4 : if (r->pwszLogFilePath) {
2477 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszLogFilePath, CH_UTF16)));
2478 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2479 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszLogFilePath, CH_UTF16)));
2480 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pwszLogFilePath, ndr_charset_length(r->pwszLogFilePath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2481 : }
2482 4 : if (r->pszDomainName) {
2483 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainName, CH_UTF8)));
2484 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2485 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainName, CH_UTF8)));
2486 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDomainName, ndr_charset_length(r->pszDomainName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2487 : }
2488 4 : if (r->pszForestName) {
2489 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestName, CH_UTF8)));
2490 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2491 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestName, CH_UTF8)));
2492 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszForestName, ndr_charset_length(r->pszForestName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2493 : }
2494 4 : if (r->pszDomainDirectoryPartition) {
2495 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8)));
2496 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2497 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8)));
2498 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDomainDirectoryPartition, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2499 : }
2500 4 : if (r->pszForestDirectoryPartition) {
2501 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8)));
2502 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2503 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8)));
2504 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszForestDirectoryPartition, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2505 : }
2506 28 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
2507 24 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pExtensions[cntr_pExtensions_0]));
2508 : }
2509 : }
2510 4 : return NDR_ERR_SUCCESS;
2511 : }
2512 :
2513 4 : _PUBLIC_ enum ndr_err_code ndr_pull_DNS_RPC_SERVER_INFO_LONGHORN(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_SERVER_INFO_LONGHORN *r)
2514 : {
2515 0 : uint32_t _ptr_pszServerName;
2516 4 : uint32_t size_pszServerName_1 = 0;
2517 4 : uint32_t length_pszServerName_1 = 0;
2518 4 : TALLOC_CTX *_mem_save_pszServerName_0 = NULL;
2519 0 : uint32_t _ptr_pszDsContainer;
2520 4 : uint32_t size_pszDsContainer_1 = 0;
2521 4 : uint32_t length_pszDsContainer_1 = 0;
2522 4 : TALLOC_CTX *_mem_save_pszDsContainer_0 = NULL;
2523 0 : uint32_t _ptr_aipServerAddrs;
2524 4 : TALLOC_CTX *_mem_save_aipServerAddrs_0 = NULL;
2525 0 : uint32_t _ptr_aipListenAddrs;
2526 4 : TALLOC_CTX *_mem_save_aipListenAddrs_0 = NULL;
2527 0 : uint32_t _ptr_aipForwarders;
2528 4 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
2529 0 : uint32_t _ptr_aipLogFilter;
2530 4 : TALLOC_CTX *_mem_save_aipLogFilter_0 = NULL;
2531 0 : uint32_t _ptr_pwszLogFilePath;
2532 4 : uint32_t size_pwszLogFilePath_1 = 0;
2533 4 : uint32_t length_pwszLogFilePath_1 = 0;
2534 4 : TALLOC_CTX *_mem_save_pwszLogFilePath_0 = NULL;
2535 0 : uint32_t _ptr_pszDomainName;
2536 4 : uint32_t size_pszDomainName_1 = 0;
2537 4 : uint32_t length_pszDomainName_1 = 0;
2538 4 : TALLOC_CTX *_mem_save_pszDomainName_0 = NULL;
2539 0 : uint32_t _ptr_pszForestName;
2540 4 : uint32_t size_pszForestName_1 = 0;
2541 4 : uint32_t length_pszForestName_1 = 0;
2542 4 : TALLOC_CTX *_mem_save_pszForestName_0 = NULL;
2543 0 : uint32_t _ptr_pszDomainDirectoryPartition;
2544 4 : uint32_t size_pszDomainDirectoryPartition_1 = 0;
2545 4 : uint32_t length_pszDomainDirectoryPartition_1 = 0;
2546 4 : TALLOC_CTX *_mem_save_pszDomainDirectoryPartition_0 = NULL;
2547 0 : uint32_t _ptr_pszForestDirectoryPartition;
2548 4 : uint32_t size_pszForestDirectoryPartition_1 = 0;
2549 4 : uint32_t length_pszForestDirectoryPartition_1 = 0;
2550 4 : TALLOC_CTX *_mem_save_pszForestDirectoryPartition_0 = NULL;
2551 4 : uint32_t size_pExtensions_0 = 0;
2552 0 : uint32_t cntr_pExtensions_0;
2553 4 : uint32_t size_dwReserveArray_0 = 0;
2554 0 : uint32_t cntr_dwReserveArray_0;
2555 4 : uint32_t size_fReserveArray_0 = 0;
2556 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2557 4 : if (ndr_flags & NDR_SCALARS) {
2558 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
2559 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
2560 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
2561 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwVersion));
2562 4 : NDR_CHECK(ndr_pull_DNS_BOOT_METHOD(ndr, NDR_SCALARS, &r->fBootMethod));
2563 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAdminConfigured));
2564 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAllowUpdate));
2565 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDsAvailable));
2566 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServerName));
2567 4 : if (_ptr_pszServerName) {
2568 4 : NDR_PULL_ALLOC(ndr, r->pszServerName);
2569 : } else {
2570 0 : r->pszServerName = NULL;
2571 : }
2572 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDsContainer));
2573 4 : if (_ptr_pszDsContainer) {
2574 4 : NDR_PULL_ALLOC(ndr, r->pszDsContainer);
2575 : } else {
2576 0 : r->pszDsContainer = NULL;
2577 : }
2578 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipServerAddrs));
2579 4 : if (_ptr_aipServerAddrs) {
2580 4 : NDR_PULL_ALLOC(ndr, r->aipServerAddrs);
2581 : } else {
2582 0 : r->aipServerAddrs = NULL;
2583 : }
2584 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipListenAddrs));
2585 4 : if (_ptr_aipListenAddrs) {
2586 4 : NDR_PULL_ALLOC(ndr, r->aipListenAddrs);
2587 : } else {
2588 0 : r->aipListenAddrs = NULL;
2589 : }
2590 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
2591 4 : if (_ptr_aipForwarders) {
2592 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
2593 : } else {
2594 4 : r->aipForwarders = NULL;
2595 : }
2596 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipLogFilter));
2597 4 : if (_ptr_aipLogFilter) {
2598 0 : NDR_PULL_ALLOC(ndr, r->aipLogFilter);
2599 : } else {
2600 4 : r->aipLogFilter = NULL;
2601 : }
2602 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszLogFilePath));
2603 4 : if (_ptr_pwszLogFilePath) {
2604 0 : NDR_PULL_ALLOC(ndr, r->pwszLogFilePath);
2605 : } else {
2606 4 : r->pwszLogFilePath = NULL;
2607 : }
2608 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDomainName));
2609 4 : if (_ptr_pszDomainName) {
2610 4 : NDR_PULL_ALLOC(ndr, r->pszDomainName);
2611 : } else {
2612 0 : r->pszDomainName = NULL;
2613 : }
2614 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszForestName));
2615 4 : if (_ptr_pszForestName) {
2616 4 : NDR_PULL_ALLOC(ndr, r->pszForestName);
2617 : } else {
2618 0 : r->pszForestName = NULL;
2619 : }
2620 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDomainDirectoryPartition));
2621 4 : if (_ptr_pszDomainDirectoryPartition) {
2622 4 : NDR_PULL_ALLOC(ndr, r->pszDomainDirectoryPartition);
2623 : } else {
2624 0 : r->pszDomainDirectoryPartition = NULL;
2625 : }
2626 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszForestDirectoryPartition));
2627 4 : if (_ptr_pszForestDirectoryPartition) {
2628 4 : NDR_PULL_ALLOC(ndr, r->pszForestDirectoryPartition);
2629 : } else {
2630 0 : r->pszForestDirectoryPartition = NULL;
2631 : }
2632 4 : size_pExtensions_0 = 6;
2633 28 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2634 24 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pExtensions[cntr_pExtensions_0]));
2635 : }
2636 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLogLevel));
2637 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDebugLevel));
2638 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
2639 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcProtocol));
2640 4 : NDR_CHECK(ndr_pull_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, &r->dwNameCheckFlag));
2641 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cAddressAnswerLimit));
2642 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionRetry));
2643 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionTimeout));
2644 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwMaxCacheTtl));
2645 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsPollingInterval));
2646 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLocalNetPriorityNetMask));
2647 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwScavengingInterval));
2648 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultRefreshInterval));
2649 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultNoRefreshInterval));
2650 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastScavengeTime));
2651 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwEventLogLevel));
2652 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLogFileMaxSize));
2653 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsForestVersion));
2654 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsDomainVersion));
2655 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsDsaVersion));
2656 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fReadOnlyDC));
2657 4 : size_dwReserveArray_0 = 3;
2658 16 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (size_dwReserveArray_0); cntr_dwReserveArray_0++) {
2659 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserveArray[cntr_dwReserveArray_0]));
2660 : }
2661 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoReverseZones));
2662 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoCacheUpdate));
2663 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
2664 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fForwardDelegations));
2665 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fNoRecursion));
2666 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fSecureResponses));
2667 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRoundRobin));
2668 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLocalNetPriority));
2669 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fBindSecondaries));
2670 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fWriteAuthorityNs));
2671 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fStrictFileParsing));
2672 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLooseWildcarding));
2673 4 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDefaultAgingState));
2674 4 : size_fReserveArray_0 = 15;
2675 4 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, size_fReserveArray_0));
2676 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2677 : }
2678 4 : if (ndr_flags & NDR_BUFFERS) {
2679 4 : if (r->pszServerName) {
2680 4 : _mem_save_pszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2681 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszServerName, 0);
2682 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszServerName));
2683 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszServerName));
2684 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszServerName, &size_pszServerName_1));
2685 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszServerName, &length_pszServerName_1));
2686 4 : if (length_pszServerName_1 > size_pszServerName_1) {
2687 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszServerName_1, length_pszServerName_1);
2688 : }
2689 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServerName_1, sizeof(uint8_t)));
2690 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszServerName, length_pszServerName_1, sizeof(uint8_t), CH_UTF8));
2691 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServerName_0, 0);
2692 : }
2693 4 : if (r->pszDsContainer) {
2694 4 : _mem_save_pszDsContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
2695 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDsContainer, 0);
2696 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDsContainer));
2697 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDsContainer));
2698 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDsContainer, &size_pszDsContainer_1));
2699 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDsContainer, &length_pszDsContainer_1));
2700 4 : if (length_pszDsContainer_1 > size_pszDsContainer_1) {
2701 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDsContainer_1, length_pszDsContainer_1);
2702 : }
2703 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDsContainer_1, sizeof(uint16_t)));
2704 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDsContainer, length_pszDsContainer_1, sizeof(uint16_t), CH_UTF16));
2705 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDsContainer_0, 0);
2706 : }
2707 4 : if (r->aipServerAddrs) {
2708 4 : _mem_save_aipServerAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
2709 4 : NDR_PULL_SET_MEM_CTX(ndr, r->aipServerAddrs, 0);
2710 4 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
2711 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipServerAddrs_0, 0);
2712 : }
2713 4 : if (r->aipListenAddrs) {
2714 4 : _mem_save_aipListenAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
2715 4 : NDR_PULL_SET_MEM_CTX(ndr, r->aipListenAddrs, 0);
2716 4 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
2717 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipListenAddrs_0, 0);
2718 : }
2719 4 : if (r->aipForwarders) {
2720 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
2721 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
2722 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
2723 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
2724 : }
2725 4 : if (r->aipLogFilter) {
2726 0 : _mem_save_aipLogFilter_0 = NDR_PULL_GET_MEM_CTX(ndr);
2727 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipLogFilter, 0);
2728 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipLogFilter));
2729 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipLogFilter_0, 0);
2730 : }
2731 4 : if (r->pwszLogFilePath) {
2732 0 : _mem_save_pwszLogFilePath_0 = NDR_PULL_GET_MEM_CTX(ndr);
2733 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pwszLogFilePath, 0);
2734 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pwszLogFilePath));
2735 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pwszLogFilePath));
2736 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pwszLogFilePath, &size_pwszLogFilePath_1));
2737 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pwszLogFilePath, &length_pwszLogFilePath_1));
2738 0 : if (length_pwszLogFilePath_1 > size_pwszLogFilePath_1) {
2739 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszLogFilePath_1, length_pwszLogFilePath_1);
2740 : }
2741 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszLogFilePath_1, sizeof(uint16_t)));
2742 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pwszLogFilePath, length_pwszLogFilePath_1, sizeof(uint16_t), CH_UTF16));
2743 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszLogFilePath_0, 0);
2744 : }
2745 4 : if (r->pszDomainName) {
2746 4 : _mem_save_pszDomainName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2747 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDomainName, 0);
2748 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDomainName));
2749 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDomainName));
2750 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDomainName, &size_pszDomainName_1));
2751 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDomainName, &length_pszDomainName_1));
2752 4 : if (length_pszDomainName_1 > size_pszDomainName_1) {
2753 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDomainName_1, length_pszDomainName_1);
2754 : }
2755 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDomainName_1, sizeof(uint8_t)));
2756 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDomainName, length_pszDomainName_1, sizeof(uint8_t), CH_UTF8));
2757 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDomainName_0, 0);
2758 : }
2759 4 : if (r->pszForestName) {
2760 4 : _mem_save_pszForestName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2761 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszForestName, 0);
2762 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszForestName));
2763 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszForestName));
2764 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszForestName, &size_pszForestName_1));
2765 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszForestName, &length_pszForestName_1));
2766 4 : if (length_pszForestName_1 > size_pszForestName_1) {
2767 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszForestName_1, length_pszForestName_1);
2768 : }
2769 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszForestName_1, sizeof(uint8_t)));
2770 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszForestName, length_pszForestName_1, sizeof(uint8_t), CH_UTF8));
2771 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszForestName_0, 0);
2772 : }
2773 4 : if (r->pszDomainDirectoryPartition) {
2774 4 : _mem_save_pszDomainDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
2775 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDomainDirectoryPartition, 0);
2776 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDomainDirectoryPartition));
2777 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDomainDirectoryPartition));
2778 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDomainDirectoryPartition, &size_pszDomainDirectoryPartition_1));
2779 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDomainDirectoryPartition, &length_pszDomainDirectoryPartition_1));
2780 4 : if (length_pszDomainDirectoryPartition_1 > size_pszDomainDirectoryPartition_1) {
2781 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDomainDirectoryPartition_1, length_pszDomainDirectoryPartition_1);
2782 : }
2783 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDomainDirectoryPartition_1, sizeof(uint8_t)));
2784 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDomainDirectoryPartition, length_pszDomainDirectoryPartition_1, sizeof(uint8_t), CH_UTF8));
2785 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDomainDirectoryPartition_0, 0);
2786 : }
2787 4 : if (r->pszForestDirectoryPartition) {
2788 4 : _mem_save_pszForestDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
2789 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszForestDirectoryPartition, 0);
2790 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszForestDirectoryPartition));
2791 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszForestDirectoryPartition));
2792 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszForestDirectoryPartition, &size_pszForestDirectoryPartition_1));
2793 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszForestDirectoryPartition, &length_pszForestDirectoryPartition_1));
2794 4 : if (length_pszForestDirectoryPartition_1 > size_pszForestDirectoryPartition_1) {
2795 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszForestDirectoryPartition_1, length_pszForestDirectoryPartition_1);
2796 : }
2797 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszForestDirectoryPartition_1, sizeof(uint8_t)));
2798 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszForestDirectoryPartition, length_pszForestDirectoryPartition_1, sizeof(uint8_t), CH_UTF8));
2799 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszForestDirectoryPartition_0, 0);
2800 : }
2801 4 : size_pExtensions_0 = 6;
2802 28 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2803 24 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pExtensions[cntr_pExtensions_0]));
2804 : }
2805 28 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2806 : }
2807 : }
2808 4 : return NDR_ERR_SUCCESS;
2809 : }
2810 :
2811 0 : static void ndr_print_flags_DNS_RPC_SERVER_INFO_LONGHORN(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct DNS_RPC_SERVER_INFO_LONGHORN *r)
2812 : {
2813 0 : ndr_print_DNS_RPC_SERVER_INFO_LONGHORN(ndr, name, r);
2814 0 : }
2815 :
2816 0 : _PUBLIC_ void ndr_print_DNS_RPC_SERVER_INFO_LONGHORN(struct ndr_print *ndr, const char *name, const struct DNS_RPC_SERVER_INFO_LONGHORN *r)
2817 : {
2818 0 : uint32_t cntr_pExtensions_0;
2819 0 : uint32_t cntr_dwReserveArray_0;
2820 0 : ndr_print_struct(ndr, name, "DNS_RPC_SERVER_INFO_LONGHORN");
2821 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2822 0 : ndr->depth++;
2823 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
2824 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
2825 0 : ndr_print_uint32(ndr, "dwVersion", r->dwVersion);
2826 0 : ndr_print_DNS_BOOT_METHOD(ndr, "fBootMethod", r->fBootMethod);
2827 0 : ndr_print_uint8(ndr, "fAdminConfigured", r->fAdminConfigured);
2828 0 : ndr_print_uint8(ndr, "fAllowUpdate", r->fAllowUpdate);
2829 0 : ndr_print_uint8(ndr, "fDsAvailable", r->fDsAvailable);
2830 0 : ndr_print_ptr(ndr, "pszServerName", r->pszServerName);
2831 0 : ndr->depth++;
2832 0 : if (r->pszServerName) {
2833 0 : ndr_print_string(ndr, "pszServerName", r->pszServerName);
2834 : }
2835 0 : ndr->depth--;
2836 0 : ndr_print_ptr(ndr, "pszDsContainer", r->pszDsContainer);
2837 0 : ndr->depth++;
2838 0 : if (r->pszDsContainer) {
2839 0 : ndr_print_string(ndr, "pszDsContainer", r->pszDsContainer);
2840 : }
2841 0 : ndr->depth--;
2842 0 : ndr_print_ptr(ndr, "aipServerAddrs", r->aipServerAddrs);
2843 0 : ndr->depth++;
2844 0 : if (r->aipServerAddrs) {
2845 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipServerAddrs", r->aipServerAddrs);
2846 : }
2847 0 : ndr->depth--;
2848 0 : ndr_print_ptr(ndr, "aipListenAddrs", r->aipListenAddrs);
2849 0 : ndr->depth++;
2850 0 : if (r->aipListenAddrs) {
2851 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipListenAddrs", r->aipListenAddrs);
2852 : }
2853 0 : ndr->depth--;
2854 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
2855 0 : ndr->depth++;
2856 0 : if (r->aipForwarders) {
2857 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipForwarders", r->aipForwarders);
2858 : }
2859 0 : ndr->depth--;
2860 0 : ndr_print_ptr(ndr, "aipLogFilter", r->aipLogFilter);
2861 0 : ndr->depth++;
2862 0 : if (r->aipLogFilter) {
2863 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipLogFilter", r->aipLogFilter);
2864 : }
2865 0 : ndr->depth--;
2866 0 : ndr_print_ptr(ndr, "pwszLogFilePath", r->pwszLogFilePath);
2867 0 : ndr->depth++;
2868 0 : if (r->pwszLogFilePath) {
2869 0 : ndr_print_string(ndr, "pwszLogFilePath", r->pwszLogFilePath);
2870 : }
2871 0 : ndr->depth--;
2872 0 : ndr_print_ptr(ndr, "pszDomainName", r->pszDomainName);
2873 0 : ndr->depth++;
2874 0 : if (r->pszDomainName) {
2875 0 : ndr_print_string(ndr, "pszDomainName", r->pszDomainName);
2876 : }
2877 0 : ndr->depth--;
2878 0 : ndr_print_ptr(ndr, "pszForestName", r->pszForestName);
2879 0 : ndr->depth++;
2880 0 : if (r->pszForestName) {
2881 0 : ndr_print_string(ndr, "pszForestName", r->pszForestName);
2882 : }
2883 0 : ndr->depth--;
2884 0 : ndr_print_ptr(ndr, "pszDomainDirectoryPartition", r->pszDomainDirectoryPartition);
2885 0 : ndr->depth++;
2886 0 : if (r->pszDomainDirectoryPartition) {
2887 0 : ndr_print_string(ndr, "pszDomainDirectoryPartition", r->pszDomainDirectoryPartition);
2888 : }
2889 0 : ndr->depth--;
2890 0 : ndr_print_ptr(ndr, "pszForestDirectoryPartition", r->pszForestDirectoryPartition);
2891 0 : ndr->depth++;
2892 0 : if (r->pszForestDirectoryPartition) {
2893 0 : ndr_print_string(ndr, "pszForestDirectoryPartition", r->pszForestDirectoryPartition);
2894 : }
2895 0 : ndr->depth--;
2896 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pExtensions", (uint32_t)(6));
2897 0 : ndr->depth++;
2898 0 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
2899 0 : ndr_print_DNS_EXTENSION(ndr, "pExtensions", &r->pExtensions[cntr_pExtensions_0]);
2900 : }
2901 0 : ndr->depth--;
2902 0 : ndr_print_uint32(ndr, "dwLogLevel", r->dwLogLevel);
2903 0 : ndr_print_uint32(ndr, "dwDebugLevel", r->dwDebugLevel);
2904 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
2905 0 : ndr_print_uint32(ndr, "dwRpcProtocol", r->dwRpcProtocol);
2906 0 : ndr_print_DNS_NAME_CHECK_FLAG(ndr, "dwNameCheckFlag", r->dwNameCheckFlag);
2907 0 : ndr_print_uint32(ndr, "cAddressAnswerLimit", r->cAddressAnswerLimit);
2908 0 : ndr_print_uint32(ndr, "dwRecursionRetry", r->dwRecursionRetry);
2909 0 : ndr_print_uint32(ndr, "dwRecursionTimeout", r->dwRecursionTimeout);
2910 0 : ndr_print_uint32(ndr, "dwMaxCacheTtl", r->dwMaxCacheTtl);
2911 0 : ndr_print_uint32(ndr, "dwDsPollingInterval", r->dwDsPollingInterval);
2912 0 : ndr_print_uint32(ndr, "dwLocalNetPriorityNetMask", r->dwLocalNetPriorityNetMask);
2913 0 : ndr_print_uint32(ndr, "dwScavengingInterval", r->dwScavengingInterval);
2914 0 : ndr_print_uint32(ndr, "dwDefaultRefreshInterval", r->dwDefaultRefreshInterval);
2915 0 : ndr_print_uint32(ndr, "dwDefaultNoRefreshInterval", r->dwDefaultNoRefreshInterval);
2916 0 : ndr_print_uint32(ndr, "dwLastScavengeTime", r->dwLastScavengeTime);
2917 0 : ndr_print_uint32(ndr, "dwEventLogLevel", r->dwEventLogLevel);
2918 0 : ndr_print_uint32(ndr, "dwLogFileMaxSize", r->dwLogFileMaxSize);
2919 0 : ndr_print_uint32(ndr, "dwDsForestVersion", r->dwDsForestVersion);
2920 0 : ndr_print_uint32(ndr, "dwDsDomainVersion", r->dwDsDomainVersion);
2921 0 : ndr_print_uint32(ndr, "dwDsDsaVersion", r->dwDsDsaVersion);
2922 0 : ndr_print_uint8(ndr, "fReadOnlyDC", r->fReadOnlyDC);
2923 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "dwReserveArray", (uint32_t)(3));
2924 0 : ndr->depth++;
2925 0 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (3); cntr_dwReserveArray_0++) {
2926 0 : ndr_print_uint32(ndr, "dwReserveArray", r->dwReserveArray[cntr_dwReserveArray_0]);
2927 : }
2928 0 : ndr->depth--;
2929 0 : ndr_print_uint8(ndr, "fAutoReverseZones", r->fAutoReverseZones);
2930 0 : ndr_print_uint8(ndr, "fAutoCacheUpdate", r->fAutoCacheUpdate);
2931 0 : ndr_print_uint8(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
2932 0 : ndr_print_uint8(ndr, "fForwardDelegations", r->fForwardDelegations);
2933 0 : ndr_print_uint8(ndr, "fNoRecursion", r->fNoRecursion);
2934 0 : ndr_print_uint8(ndr, "fSecureResponses", r->fSecureResponses);
2935 0 : ndr_print_uint8(ndr, "fRoundRobin", r->fRoundRobin);
2936 0 : ndr_print_uint8(ndr, "fLocalNetPriority", r->fLocalNetPriority);
2937 0 : ndr_print_uint8(ndr, "fBindSecondaries", r->fBindSecondaries);
2938 0 : ndr_print_uint8(ndr, "fWriteAuthorityNs", r->fWriteAuthorityNs);
2939 0 : ndr_print_uint8(ndr, "fStrictFileParsing", r->fStrictFileParsing);
2940 0 : ndr_print_uint8(ndr, "fLooseWildcarding", r->fLooseWildcarding);
2941 0 : ndr_print_uint8(ndr, "fDefaultAgingState", r->fDefaultAgingState);
2942 0 : ndr_print_array_uint8(ndr, "fReserveArray", r->fReserveArray, 15);
2943 0 : ndr->depth--;
2944 : }
2945 :
2946 39 : static enum ndr_err_code ndr_push_DNS_RPC_DP_FLAGS(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
2947 : {
2948 39 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2949 39 : return NDR_ERR_SUCCESS;
2950 : }
2951 :
2952 39 : static enum ndr_err_code ndr_pull_DNS_RPC_DP_FLAGS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
2953 : {
2954 0 : uint32_t v;
2955 39 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2956 39 : *r = v;
2957 39 : return NDR_ERR_SUCCESS;
2958 : }
2959 :
2960 0 : _PUBLIC_ void ndr_print_DNS_RPC_DP_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r)
2961 : {
2962 0 : ndr_print_uint32(ndr, name, r);
2963 0 : ndr->depth++;
2964 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_AUTOCREATED", DNS_DP_AUTOCREATED, r);
2965 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_LEGACY", DNS_DP_LEGACY, r);
2966 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_DOMAIN_DEFAULT", DNS_DP_DOMAIN_DEFAULT, r);
2967 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_FOREST_DEFAULT", DNS_DP_FOREST_DEFAULT, r);
2968 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_ENLISTED", DNS_DP_ENLISTED, r);
2969 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_DELETED", DNS_DP_DELETED, r);
2970 0 : ndr->depth--;
2971 0 : }
2972 :
2973 0 : static enum ndr_err_code ndr_push_DNS_RPC_DP_REPLICA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_DP_REPLICA *r)
2974 : {
2975 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2976 0 : if (ndr_flags & NDR_SCALARS) {
2977 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2978 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszReplicaDn));
2979 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2980 : }
2981 0 : if (ndr_flags & NDR_BUFFERS) {
2982 0 : if (r->pszReplicaDn) {
2983 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszReplicaDn, CH_UTF16)));
2984 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2985 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszReplicaDn, CH_UTF16)));
2986 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszReplicaDn, ndr_charset_length(r->pszReplicaDn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2987 : }
2988 : }
2989 0 : return NDR_ERR_SUCCESS;
2990 : }
2991 :
2992 0 : static enum ndr_err_code ndr_pull_DNS_RPC_DP_REPLICA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_DP_REPLICA *r)
2993 : {
2994 0 : uint32_t _ptr_pszReplicaDn;
2995 0 : uint32_t size_pszReplicaDn_1 = 0;
2996 0 : uint32_t length_pszReplicaDn_1 = 0;
2997 0 : TALLOC_CTX *_mem_save_pszReplicaDn_0 = NULL;
2998 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2999 0 : if (ndr_flags & NDR_SCALARS) {
3000 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3001 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszReplicaDn));
3002 0 : if (_ptr_pszReplicaDn) {
3003 0 : NDR_PULL_ALLOC(ndr, r->pszReplicaDn);
3004 : } else {
3005 0 : r->pszReplicaDn = NULL;
3006 : }
3007 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3008 : }
3009 0 : if (ndr_flags & NDR_BUFFERS) {
3010 0 : if (r->pszReplicaDn) {
3011 0 : _mem_save_pszReplicaDn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3012 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszReplicaDn, 0);
3013 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszReplicaDn));
3014 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszReplicaDn));
3015 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszReplicaDn, &size_pszReplicaDn_1));
3016 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszReplicaDn, &length_pszReplicaDn_1));
3017 0 : if (length_pszReplicaDn_1 > size_pszReplicaDn_1) {
3018 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszReplicaDn_1, length_pszReplicaDn_1);
3019 : }
3020 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszReplicaDn_1, sizeof(uint16_t)));
3021 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszReplicaDn, length_pszReplicaDn_1, sizeof(uint16_t), CH_UTF16));
3022 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszReplicaDn_0, 0);
3023 : }
3024 : }
3025 0 : return NDR_ERR_SUCCESS;
3026 : }
3027 :
3028 0 : _PUBLIC_ void ndr_print_DNS_RPC_DP_REPLICA(struct ndr_print *ndr, const char *name, const struct DNS_RPC_DP_REPLICA *r)
3029 : {
3030 0 : ndr_print_struct(ndr, name, "DNS_RPC_DP_REPLICA");
3031 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3032 0 : ndr->depth++;
3033 0 : ndr_print_ptr(ndr, "pszReplicaDn", r->pszReplicaDn);
3034 0 : ndr->depth++;
3035 0 : if (r->pszReplicaDn) {
3036 0 : ndr_print_string(ndr, "pszReplicaDn", r->pszReplicaDn);
3037 : }
3038 0 : ndr->depth--;
3039 0 : ndr->depth--;
3040 : }
3041 :
3042 0 : static enum ndr_err_code ndr_push_DNS_DP_STATE(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum DNS_DP_STATE r)
3043 : {
3044 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
3045 0 : return NDR_ERR_SUCCESS;
3046 : }
3047 :
3048 0 : static enum ndr_err_code ndr_pull_DNS_DP_STATE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum DNS_DP_STATE *r)
3049 : {
3050 0 : uint32_t v;
3051 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
3052 0 : *r = v;
3053 0 : return NDR_ERR_SUCCESS;
3054 : }
3055 :
3056 0 : _PUBLIC_ void ndr_print_DNS_DP_STATE(struct ndr_print *ndr, const char *name, enum DNS_DP_STATE r)
3057 : {
3058 0 : const char *val = NULL;
3059 :
3060 0 : switch (r) {
3061 0 : case DNS_DP_OKAY: val = "DNS_DP_OKAY"; break;
3062 0 : case DNS_DP_STATE_REPL_INCOMING: val = "DNS_DP_STATE_REPL_INCOMING"; break;
3063 0 : case DNS_DP_STATE_REPL_OUTGOING: val = "DNS_DP_STATE_REPL_OUTGOING"; break;
3064 0 : case DNS_DP_STATE_UNKNOWN: val = "DNS_DP_STATE_UNKNOWN"; break;
3065 : }
3066 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
3067 0 : }
3068 :
3069 0 : static enum ndr_err_code ndr_push_DNS_RPC_DP_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_DP_INFO *r)
3070 : {
3071 0 : uint32_t cntr_dwReserved_0;
3072 0 : uint32_t cntr_pwszReserved_0;
3073 0 : uint32_t cntr_ReplicaArray_0;
3074 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3075 0 : if (ndr_flags & NDR_SCALARS) {
3076 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->dwReplicaCount));
3077 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3078 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3079 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3080 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
3081 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpDn));
3082 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszCrDn));
3083 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
3084 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneCount));
3085 0 : NDR_CHECK(ndr_push_DNS_DP_STATE(ndr, NDR_SCALARS, r->dwState));
3086 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (3); cntr_dwReserved_0++) {
3087 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved[cntr_dwReserved_0]));
3088 : }
3089 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (3); cntr_pwszReserved_0++) {
3090 0 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pwszReserved[cntr_pwszReserved_0]));
3091 : }
3092 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReplicaCount));
3093 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (r->dwReplicaCount); cntr_ReplicaArray_0++) {
3094 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ReplicaArray[cntr_ReplicaArray_0]));
3095 : }
3096 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3097 : }
3098 0 : if (ndr_flags & NDR_BUFFERS) {
3099 0 : if (r->pszDpFqdn) {
3100 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3101 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3102 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3103 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
3104 : }
3105 0 : if (r->pszDpDn) {
3106 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpDn, CH_UTF16)));
3107 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3108 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpDn, CH_UTF16)));
3109 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpDn, ndr_charset_length(r->pszDpDn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3110 : }
3111 0 : if (r->pszCrDn) {
3112 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszCrDn, CH_UTF16)));
3113 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3114 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszCrDn, CH_UTF16)));
3115 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszCrDn, ndr_charset_length(r->pszCrDn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3116 : }
3117 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (3); cntr_pwszReserved_0++) {
3118 0 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pwszReserved[cntr_pwszReserved_0]));
3119 : }
3120 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (r->dwReplicaCount); cntr_ReplicaArray_0++) {
3121 0 : if (r->ReplicaArray[cntr_ReplicaArray_0]) {
3122 0 : NDR_CHECK(ndr_push_DNS_RPC_DP_REPLICA(ndr, NDR_SCALARS|NDR_BUFFERS, r->ReplicaArray[cntr_ReplicaArray_0]));
3123 : }
3124 : }
3125 : }
3126 0 : return NDR_ERR_SUCCESS;
3127 : }
3128 :
3129 0 : static enum ndr_err_code ndr_pull_DNS_RPC_DP_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_DP_INFO *r)
3130 : {
3131 0 : uint32_t _ptr_pszDpFqdn;
3132 0 : uint32_t size_pszDpFqdn_1 = 0;
3133 0 : uint32_t length_pszDpFqdn_1 = 0;
3134 0 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
3135 0 : uint32_t _ptr_pszDpDn;
3136 0 : uint32_t size_pszDpDn_1 = 0;
3137 0 : uint32_t length_pszDpDn_1 = 0;
3138 0 : TALLOC_CTX *_mem_save_pszDpDn_0 = NULL;
3139 0 : uint32_t _ptr_pszCrDn;
3140 0 : uint32_t size_pszCrDn_1 = 0;
3141 0 : uint32_t length_pszCrDn_1 = 0;
3142 0 : TALLOC_CTX *_mem_save_pszCrDn_0 = NULL;
3143 0 : uint32_t size_dwReserved_0 = 0;
3144 0 : uint32_t cntr_dwReserved_0;
3145 0 : uint32_t size_pwszReserved_0 = 0;
3146 0 : uint32_t cntr_pwszReserved_0;
3147 0 : uint32_t _ptr_ReplicaArray;
3148 0 : uint32_t size_ReplicaArray_0 = 0;
3149 0 : uint32_t cntr_ReplicaArray_0;
3150 0 : TALLOC_CTX *_mem_save_ReplicaArray_0 = NULL;
3151 0 : TALLOC_CTX *_mem_save_ReplicaArray_1 = NULL;
3152 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3153 0 : if (ndr_flags & NDR_SCALARS) {
3154 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->ReplicaArray));
3155 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3156 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3157 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3158 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
3159 0 : if (_ptr_pszDpFqdn) {
3160 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
3161 : } else {
3162 0 : r->pszDpFqdn = NULL;
3163 : }
3164 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpDn));
3165 0 : if (_ptr_pszDpDn) {
3166 0 : NDR_PULL_ALLOC(ndr, r->pszDpDn);
3167 : } else {
3168 0 : r->pszDpDn = NULL;
3169 : }
3170 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszCrDn));
3171 0 : if (_ptr_pszCrDn) {
3172 0 : NDR_PULL_ALLOC(ndr, r->pszCrDn);
3173 : } else {
3174 0 : r->pszCrDn = NULL;
3175 : }
3176 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
3177 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneCount));
3178 0 : NDR_CHECK(ndr_pull_DNS_DP_STATE(ndr, NDR_SCALARS, &r->dwState));
3179 0 : size_dwReserved_0 = 3;
3180 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (size_dwReserved_0); cntr_dwReserved_0++) {
3181 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved[cntr_dwReserved_0]));
3182 : }
3183 0 : size_pwszReserved_0 = 3;
3184 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (size_pwszReserved_0); cntr_pwszReserved_0++) {
3185 0 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pwszReserved[cntr_pwszReserved_0]));
3186 : }
3187 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReplicaCount));
3188 0 : if (r->dwReplicaCount > 10000) {
3189 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->dwReplicaCount), (uint32_t)(0), (uint32_t)(10000));
3190 : }
3191 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ReplicaArray, &size_ReplicaArray_0));
3192 0 : NDR_PULL_ALLOC_N(ndr, r->ReplicaArray, size_ReplicaArray_0);
3193 0 : _mem_save_ReplicaArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
3194 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ReplicaArray, 0);
3195 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (size_ReplicaArray_0); cntr_ReplicaArray_0++) {
3196 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ReplicaArray));
3197 0 : if (_ptr_ReplicaArray) {
3198 0 : NDR_PULL_ALLOC(ndr, r->ReplicaArray[cntr_ReplicaArray_0]);
3199 : } else {
3200 0 : r->ReplicaArray[cntr_ReplicaArray_0] = NULL;
3201 : }
3202 : }
3203 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ReplicaArray_0, 0);
3204 0 : if (r->ReplicaArray) {
3205 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ReplicaArray, r->dwReplicaCount));
3206 : }
3207 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3208 : }
3209 0 : if (ndr_flags & NDR_BUFFERS) {
3210 0 : if (r->pszDpFqdn) {
3211 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3212 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
3213 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
3214 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
3215 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
3216 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
3217 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
3218 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDpFqdn_1, length_pszDpFqdn_1);
3219 : }
3220 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
3221 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
3222 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
3223 : }
3224 0 : if (r->pszDpDn) {
3225 0 : _mem_save_pszDpDn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3226 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpDn, 0);
3227 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpDn));
3228 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpDn));
3229 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpDn, &size_pszDpDn_1));
3230 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpDn, &length_pszDpDn_1));
3231 0 : if (length_pszDpDn_1 > size_pszDpDn_1) {
3232 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDpDn_1, length_pszDpDn_1);
3233 : }
3234 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpDn_1, sizeof(uint16_t)));
3235 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpDn, length_pszDpDn_1, sizeof(uint16_t), CH_UTF16));
3236 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpDn_0, 0);
3237 : }
3238 0 : if (r->pszCrDn) {
3239 0 : _mem_save_pszCrDn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3240 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszCrDn, 0);
3241 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszCrDn));
3242 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszCrDn));
3243 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszCrDn, &size_pszCrDn_1));
3244 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszCrDn, &length_pszCrDn_1));
3245 0 : if (length_pszCrDn_1 > size_pszCrDn_1) {
3246 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszCrDn_1, length_pszCrDn_1);
3247 : }
3248 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszCrDn_1, sizeof(uint16_t)));
3249 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszCrDn, length_pszCrDn_1, sizeof(uint16_t), CH_UTF16));
3250 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszCrDn_0, 0);
3251 : }
3252 0 : size_pwszReserved_0 = 3;
3253 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (size_pwszReserved_0); cntr_pwszReserved_0++) {
3254 0 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pwszReserved[cntr_pwszReserved_0]));
3255 : }
3256 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ReplicaArray, &size_ReplicaArray_0));
3257 0 : _mem_save_ReplicaArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
3258 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ReplicaArray, 0);
3259 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (size_ReplicaArray_0); cntr_ReplicaArray_0++) {
3260 0 : if (r->ReplicaArray[cntr_ReplicaArray_0]) {
3261 0 : _mem_save_ReplicaArray_1 = NDR_PULL_GET_MEM_CTX(ndr);
3262 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ReplicaArray[cntr_ReplicaArray_0], 0);
3263 0 : NDR_CHECK(ndr_pull_DNS_RPC_DP_REPLICA(ndr, NDR_SCALARS|NDR_BUFFERS, r->ReplicaArray[cntr_ReplicaArray_0]));
3264 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ReplicaArray_1, 0);
3265 : }
3266 : }
3267 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ReplicaArray_0, 0);
3268 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (size_pwszReserved_0); cntr_pwszReserved_0++) {
3269 : }
3270 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (size_ReplicaArray_0); cntr_ReplicaArray_0++) {
3271 : }
3272 : }
3273 0 : return NDR_ERR_SUCCESS;
3274 : }
3275 :
3276 0 : _PUBLIC_ void ndr_print_DNS_RPC_DP_INFO(struct ndr_print *ndr, const char *name, const struct DNS_RPC_DP_INFO *r)
3277 : {
3278 0 : uint32_t cntr_dwReserved_0;
3279 0 : uint32_t cntr_pwszReserved_0;
3280 0 : uint32_t cntr_ReplicaArray_0;
3281 0 : ndr_print_struct(ndr, name, "DNS_RPC_DP_INFO");
3282 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3283 0 : ndr->depth++;
3284 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3285 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3286 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
3287 0 : ndr->depth++;
3288 0 : if (r->pszDpFqdn) {
3289 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
3290 : }
3291 0 : ndr->depth--;
3292 0 : ndr_print_ptr(ndr, "pszDpDn", r->pszDpDn);
3293 0 : ndr->depth++;
3294 0 : if (r->pszDpDn) {
3295 0 : ndr_print_string(ndr, "pszDpDn", r->pszDpDn);
3296 : }
3297 0 : ndr->depth--;
3298 0 : ndr_print_ptr(ndr, "pszCrDn", r->pszCrDn);
3299 0 : ndr->depth++;
3300 0 : if (r->pszCrDn) {
3301 0 : ndr_print_string(ndr, "pszCrDn", r->pszCrDn);
3302 : }
3303 0 : ndr->depth--;
3304 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
3305 0 : ndr_print_uint32(ndr, "dwZoneCount", r->dwZoneCount);
3306 0 : ndr_print_DNS_DP_STATE(ndr, "dwState", r->dwState);
3307 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "dwReserved", (uint32_t)(3));
3308 0 : ndr->depth++;
3309 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (3); cntr_dwReserved_0++) {
3310 0 : ndr_print_uint32(ndr, "dwReserved", r->dwReserved[cntr_dwReserved_0]);
3311 : }
3312 0 : ndr->depth--;
3313 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pwszReserved", (uint32_t)(3));
3314 0 : ndr->depth++;
3315 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (3); cntr_pwszReserved_0++) {
3316 0 : ndr_print_DNS_EXTENSION(ndr, "pwszReserved", &r->pwszReserved[cntr_pwszReserved_0]);
3317 : }
3318 0 : ndr->depth--;
3319 0 : ndr_print_uint32(ndr, "dwReplicaCount", r->dwReplicaCount);
3320 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "ReplicaArray", (uint32_t)(r->dwReplicaCount));
3321 0 : ndr->depth++;
3322 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (r->dwReplicaCount); cntr_ReplicaArray_0++) {
3323 0 : ndr_print_ptr(ndr, "ReplicaArray", r->ReplicaArray[cntr_ReplicaArray_0]);
3324 0 : ndr->depth++;
3325 0 : if (r->ReplicaArray[cntr_ReplicaArray_0]) {
3326 0 : ndr_print_DNS_RPC_DP_REPLICA(ndr, "ReplicaArray", r->ReplicaArray[cntr_ReplicaArray_0]);
3327 : }
3328 0 : ndr->depth--;
3329 : }
3330 0 : ndr->depth--;
3331 0 : ndr->depth--;
3332 : }
3333 :
3334 0 : static enum ndr_err_code ndr_push_DNS_RPC_DP_ENUM(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_DP_ENUM *r)
3335 : {
3336 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3337 0 : if (ndr_flags & NDR_SCALARS) {
3338 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3339 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3340 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3341 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
3342 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
3343 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneCount));
3344 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3345 : }
3346 0 : if (ndr_flags & NDR_BUFFERS) {
3347 0 : if (r->pszDpFqdn) {
3348 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3349 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3350 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3351 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
3352 : }
3353 : }
3354 0 : return NDR_ERR_SUCCESS;
3355 : }
3356 :
3357 0 : static enum ndr_err_code ndr_pull_DNS_RPC_DP_ENUM(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_DP_ENUM *r)
3358 : {
3359 0 : uint32_t _ptr_pszDpFqdn;
3360 0 : uint32_t size_pszDpFqdn_1 = 0;
3361 0 : uint32_t length_pszDpFqdn_1 = 0;
3362 0 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
3363 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3364 0 : if (ndr_flags & NDR_SCALARS) {
3365 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3366 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3367 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3368 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
3369 0 : if (_ptr_pszDpFqdn) {
3370 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
3371 : } else {
3372 0 : r->pszDpFqdn = NULL;
3373 : }
3374 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
3375 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneCount));
3376 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3377 : }
3378 0 : if (ndr_flags & NDR_BUFFERS) {
3379 0 : if (r->pszDpFqdn) {
3380 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3381 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
3382 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
3383 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
3384 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
3385 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
3386 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
3387 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDpFqdn_1, length_pszDpFqdn_1);
3388 : }
3389 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
3390 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
3391 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
3392 : }
3393 : }
3394 0 : return NDR_ERR_SUCCESS;
3395 : }
3396 :
3397 0 : _PUBLIC_ void ndr_print_DNS_RPC_DP_ENUM(struct ndr_print *ndr, const char *name, const struct DNS_RPC_DP_ENUM *r)
3398 : {
3399 0 : ndr_print_struct(ndr, name, "DNS_RPC_DP_ENUM");
3400 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3401 0 : ndr->depth++;
3402 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3403 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3404 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
3405 0 : ndr->depth++;
3406 0 : if (r->pszDpFqdn) {
3407 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
3408 : }
3409 0 : ndr->depth--;
3410 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
3411 0 : ndr_print_uint32(ndr, "dwZoneCount", r->dwZoneCount);
3412 0 : ndr->depth--;
3413 : }
3414 :
3415 0 : static enum ndr_err_code ndr_push_DNS_RPC_DP_LIST(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_DP_LIST *r)
3416 : {
3417 0 : uint32_t cntr_DpArray_0;
3418 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3419 0 : if (ndr_flags & NDR_SCALARS) {
3420 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->dwDpCount));
3421 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3422 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3423 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3424 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDpCount));
3425 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (r->dwDpCount); cntr_DpArray_0++) {
3426 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->DpArray[cntr_DpArray_0]));
3427 : }
3428 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3429 : }
3430 0 : if (ndr_flags & NDR_BUFFERS) {
3431 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (r->dwDpCount); cntr_DpArray_0++) {
3432 0 : if (r->DpArray[cntr_DpArray_0]) {
3433 0 : NDR_CHECK(ndr_push_DNS_RPC_DP_ENUM(ndr, NDR_SCALARS|NDR_BUFFERS, r->DpArray[cntr_DpArray_0]));
3434 : }
3435 : }
3436 : }
3437 0 : return NDR_ERR_SUCCESS;
3438 : }
3439 :
3440 0 : static enum ndr_err_code ndr_pull_DNS_RPC_DP_LIST(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_DP_LIST *r)
3441 : {
3442 0 : uint32_t _ptr_DpArray;
3443 0 : uint32_t size_DpArray_0 = 0;
3444 0 : uint32_t cntr_DpArray_0;
3445 0 : TALLOC_CTX *_mem_save_DpArray_0 = NULL;
3446 0 : TALLOC_CTX *_mem_save_DpArray_1 = NULL;
3447 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3448 0 : if (ndr_flags & NDR_SCALARS) {
3449 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->DpArray));
3450 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3451 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3452 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3453 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDpCount));
3454 0 : if (r->dwDpCount > 5000) {
3455 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->dwDpCount), (uint32_t)(0), (uint32_t)(5000));
3456 : }
3457 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->DpArray, &size_DpArray_0));
3458 0 : NDR_PULL_ALLOC_N(ndr, r->DpArray, size_DpArray_0);
3459 0 : _mem_save_DpArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
3460 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DpArray, 0);
3461 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (size_DpArray_0); cntr_DpArray_0++) {
3462 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DpArray));
3463 0 : if (_ptr_DpArray) {
3464 0 : NDR_PULL_ALLOC(ndr, r->DpArray[cntr_DpArray_0]);
3465 : } else {
3466 0 : r->DpArray[cntr_DpArray_0] = NULL;
3467 : }
3468 : }
3469 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DpArray_0, 0);
3470 0 : if (r->DpArray) {
3471 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->DpArray, r->dwDpCount));
3472 : }
3473 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3474 : }
3475 0 : if (ndr_flags & NDR_BUFFERS) {
3476 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->DpArray, &size_DpArray_0));
3477 0 : _mem_save_DpArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
3478 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DpArray, 0);
3479 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (size_DpArray_0); cntr_DpArray_0++) {
3480 0 : if (r->DpArray[cntr_DpArray_0]) {
3481 0 : _mem_save_DpArray_1 = NDR_PULL_GET_MEM_CTX(ndr);
3482 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DpArray[cntr_DpArray_0], 0);
3483 0 : NDR_CHECK(ndr_pull_DNS_RPC_DP_ENUM(ndr, NDR_SCALARS|NDR_BUFFERS, r->DpArray[cntr_DpArray_0]));
3484 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DpArray_1, 0);
3485 : }
3486 : }
3487 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DpArray_0, 0);
3488 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (size_DpArray_0); cntr_DpArray_0++) {
3489 : }
3490 : }
3491 0 : return NDR_ERR_SUCCESS;
3492 : }
3493 :
3494 0 : _PUBLIC_ void ndr_print_DNS_RPC_DP_LIST(struct ndr_print *ndr, const char *name, const struct DNS_RPC_DP_LIST *r)
3495 : {
3496 0 : uint32_t cntr_DpArray_0;
3497 0 : ndr_print_struct(ndr, name, "DNS_RPC_DP_LIST");
3498 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3499 0 : ndr->depth++;
3500 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3501 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3502 0 : ndr_print_uint32(ndr, "dwDpCount", r->dwDpCount);
3503 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "DpArray", (uint32_t)(r->dwDpCount));
3504 0 : ndr->depth++;
3505 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (r->dwDpCount); cntr_DpArray_0++) {
3506 0 : ndr_print_ptr(ndr, "DpArray", r->DpArray[cntr_DpArray_0]);
3507 0 : ndr->depth++;
3508 0 : if (r->DpArray[cntr_DpArray_0]) {
3509 0 : ndr_print_DNS_RPC_DP_ENUM(ndr, "DpArray", r->DpArray[cntr_DpArray_0]);
3510 : }
3511 0 : ndr->depth--;
3512 : }
3513 0 : ndr->depth--;
3514 0 : ndr->depth--;
3515 : }
3516 :
3517 0 : static enum ndr_err_code ndr_push_DNS_RPC_ENLIST_DP(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ENLIST_DP *r)
3518 : {
3519 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3520 0 : if (ndr_flags & NDR_SCALARS) {
3521 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3522 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3523 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3524 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
3525 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwOperation));
3526 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3527 : }
3528 0 : if (ndr_flags & NDR_BUFFERS) {
3529 0 : if (r->pszDpFqdn) {
3530 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3531 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3532 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3533 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
3534 : }
3535 : }
3536 0 : return NDR_ERR_SUCCESS;
3537 : }
3538 :
3539 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ENLIST_DP(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ENLIST_DP *r)
3540 : {
3541 0 : uint32_t _ptr_pszDpFqdn;
3542 0 : uint32_t size_pszDpFqdn_1 = 0;
3543 0 : uint32_t length_pszDpFqdn_1 = 0;
3544 0 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
3545 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3546 0 : if (ndr_flags & NDR_SCALARS) {
3547 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3548 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3549 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3550 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
3551 0 : if (_ptr_pszDpFqdn) {
3552 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
3553 : } else {
3554 0 : r->pszDpFqdn = NULL;
3555 : }
3556 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwOperation));
3557 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3558 : }
3559 0 : if (ndr_flags & NDR_BUFFERS) {
3560 0 : if (r->pszDpFqdn) {
3561 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3562 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
3563 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
3564 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
3565 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
3566 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
3567 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
3568 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDpFqdn_1, length_pszDpFqdn_1);
3569 : }
3570 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
3571 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
3572 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
3573 : }
3574 : }
3575 0 : return NDR_ERR_SUCCESS;
3576 : }
3577 :
3578 0 : _PUBLIC_ void ndr_print_DNS_RPC_ENLIST_DP(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ENLIST_DP *r)
3579 : {
3580 0 : ndr_print_struct(ndr, name, "DNS_RPC_ENLIST_DP");
3581 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3582 0 : ndr->depth++;
3583 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3584 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3585 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
3586 0 : ndr->depth++;
3587 0 : if (r->pszDpFqdn) {
3588 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
3589 : }
3590 0 : ndr->depth--;
3591 0 : ndr_print_uint32(ndr, "dwOperation", r->dwOperation);
3592 0 : ndr->depth--;
3593 : }
3594 :
3595 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_CHANGE_DP(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_CHANGE_DP *r)
3596 : {
3597 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3598 0 : if (ndr_flags & NDR_SCALARS) {
3599 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3600 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3601 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3602 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDestPartition));
3603 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3604 : }
3605 0 : if (ndr_flags & NDR_BUFFERS) {
3606 0 : if (r->pszDestPartition) {
3607 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDestPartition, CH_UTF8)));
3608 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3609 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDestPartition, CH_UTF8)));
3610 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDestPartition, ndr_charset_length(r->pszDestPartition, CH_UTF8), sizeof(uint8_t), CH_UTF8));
3611 : }
3612 : }
3613 0 : return NDR_ERR_SUCCESS;
3614 : }
3615 :
3616 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_CHANGE_DP(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_CHANGE_DP *r)
3617 : {
3618 0 : uint32_t _ptr_pszDestPartition;
3619 0 : uint32_t size_pszDestPartition_1 = 0;
3620 0 : uint32_t length_pszDestPartition_1 = 0;
3621 0 : TALLOC_CTX *_mem_save_pszDestPartition_0 = NULL;
3622 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3623 0 : if (ndr_flags & NDR_SCALARS) {
3624 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3625 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3626 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3627 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDestPartition));
3628 0 : if (_ptr_pszDestPartition) {
3629 0 : NDR_PULL_ALLOC(ndr, r->pszDestPartition);
3630 : } else {
3631 0 : r->pszDestPartition = NULL;
3632 : }
3633 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3634 : }
3635 0 : if (ndr_flags & NDR_BUFFERS) {
3636 0 : if (r->pszDestPartition) {
3637 0 : _mem_save_pszDestPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
3638 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDestPartition, 0);
3639 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDestPartition));
3640 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDestPartition));
3641 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDestPartition, &size_pszDestPartition_1));
3642 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDestPartition, &length_pszDestPartition_1));
3643 0 : if (length_pszDestPartition_1 > size_pszDestPartition_1) {
3644 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDestPartition_1, length_pszDestPartition_1);
3645 : }
3646 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDestPartition_1, sizeof(uint8_t)));
3647 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDestPartition, length_pszDestPartition_1, sizeof(uint8_t), CH_UTF8));
3648 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDestPartition_0, 0);
3649 : }
3650 : }
3651 0 : return NDR_ERR_SUCCESS;
3652 : }
3653 :
3654 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_CHANGE_DP(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_CHANGE_DP *r)
3655 : {
3656 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_CHANGE_DP");
3657 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3658 0 : ndr->depth++;
3659 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3660 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3661 0 : ndr_print_ptr(ndr, "pszDestPartition", r->pszDestPartition);
3662 0 : ndr->depth++;
3663 0 : if (r->pszDestPartition) {
3664 0 : ndr_print_string(ndr, "pszDestPartition", r->pszDestPartition);
3665 : }
3666 0 : ndr->depth--;
3667 0 : ndr->depth--;
3668 : }
3669 :
3670 444 : static enum ndr_err_code ndr_push_DNS_ZONE_SECONDARY_SECURITY(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum DNS_ZONE_SECONDARY_SECURITY r)
3671 : {
3672 444 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
3673 444 : return NDR_ERR_SUCCESS;
3674 : }
3675 :
3676 444 : static enum ndr_err_code ndr_pull_DNS_ZONE_SECONDARY_SECURITY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum DNS_ZONE_SECONDARY_SECURITY *r)
3677 : {
3678 0 : uint32_t v;
3679 444 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
3680 444 : *r = v;
3681 444 : return NDR_ERR_SUCCESS;
3682 : }
3683 :
3684 0 : _PUBLIC_ void ndr_print_DNS_ZONE_SECONDARY_SECURITY(struct ndr_print *ndr, const char *name, enum DNS_ZONE_SECONDARY_SECURITY r)
3685 : {
3686 0 : const char *val = NULL;
3687 :
3688 0 : switch (r) {
3689 0 : case DNS_ZONE_SECSECURE_NO_SECURITY: val = "DNS_ZONE_SECSECURE_NO_SECURITY"; break;
3690 0 : case DNS_ZONE_SECSECURE_NS_ONLY: val = "DNS_ZONE_SECSECURE_NS_ONLY"; break;
3691 0 : case DNS_ZONE_SECSECURE_LIST_ONLY: val = "DNS_ZONE_SECSECURE_LIST_ONLY"; break;
3692 0 : case DNS_ZONE_SECSECURE_NO_XFER: val = "DNS_ZONE_SECSECURE_NO_XFER"; break;
3693 : }
3694 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
3695 0 : }
3696 :
3697 444 : static enum ndr_err_code ndr_push_DNS_ZONE_NOTIFY_LEVEL(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum DNS_ZONE_NOTIFY_LEVEL r)
3698 : {
3699 444 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
3700 444 : return NDR_ERR_SUCCESS;
3701 : }
3702 :
3703 444 : static enum ndr_err_code ndr_pull_DNS_ZONE_NOTIFY_LEVEL(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum DNS_ZONE_NOTIFY_LEVEL *r)
3704 : {
3705 0 : uint32_t v;
3706 444 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
3707 444 : *r = v;
3708 444 : return NDR_ERR_SUCCESS;
3709 : }
3710 :
3711 0 : _PUBLIC_ void ndr_print_DNS_ZONE_NOTIFY_LEVEL(struct ndr_print *ndr, const char *name, enum DNS_ZONE_NOTIFY_LEVEL r)
3712 : {
3713 0 : const char *val = NULL;
3714 :
3715 0 : switch (r) {
3716 0 : case DNS_ZONE_NOTIFY_OFF: val = "DNS_ZONE_NOTIFY_OFF"; break;
3717 0 : case DNS_ZONE_NOTIFY_ALL_SECONDARIES: val = "DNS_ZONE_NOTIFY_ALL_SECONDARIES"; break;
3718 0 : case DNS_ZONE_NOTIFY_LIST_ONLY: val = "DNS_ZONE_NOTIFY_LIST_ONLY"; break;
3719 : }
3720 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
3721 0 : }
3722 :
3723 39 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_FLAGS(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
3724 : {
3725 39 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
3726 39 : return NDR_ERR_SUCCESS;
3727 : }
3728 :
3729 39 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_FLAGS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
3730 : {
3731 0 : uint32_t v;
3732 39 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
3733 39 : *r = v;
3734 39 : return NDR_ERR_SUCCESS;
3735 : }
3736 :
3737 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r)
3738 : {
3739 0 : ndr_print_uint32(ndr, name, r);
3740 0 : ndr->depth++;
3741 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_PAUSED", DNS_RPC_ZONE_PAUSED, r);
3742 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_SHUTDOWN", DNS_RPC_ZONE_SHUTDOWN, r);
3743 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_REVERSE", DNS_RPC_ZONE_REVERSE, r);
3744 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_AUTOCREATED", DNS_RPC_ZONE_AUTOCREATED, r);
3745 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_DSINTEGRATED", DNS_RPC_ZONE_DSINTEGRATED, r);
3746 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_AGING", DNS_RPC_ZONE_AGING, r);
3747 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_UPDATE_UNSECURE", DNS_RPC_ZONE_UPDATE_UNSECURE, r);
3748 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_UPDATE_SECURE", DNS_RPC_ZONE_UPDATE_SECURE, r);
3749 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_READONLY", DNS_RPC_ZONE_READONLY, r);
3750 0 : ndr->depth--;
3751 0 : }
3752 :
3753 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_W2K(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_W2K *r)
3754 : {
3755 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3756 0 : if (ndr_flags & NDR_SCALARS) {
3757 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3758 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
3759 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_FLAGS(ndr, NDR_SCALARS, r->Flags));
3760 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->ZoneType));
3761 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Version));
3762 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3763 : }
3764 0 : if (ndr_flags & NDR_BUFFERS) {
3765 0 : if (r->pszZoneName) {
3766 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF16)));
3767 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3768 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF16)));
3769 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3770 : }
3771 : }
3772 0 : return NDR_ERR_SUCCESS;
3773 : }
3774 :
3775 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_W2K(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_W2K *r)
3776 : {
3777 0 : uint32_t _ptr_pszZoneName;
3778 0 : uint32_t size_pszZoneName_1 = 0;
3779 0 : uint32_t length_pszZoneName_1 = 0;
3780 0 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
3781 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3782 0 : if (ndr_flags & NDR_SCALARS) {
3783 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3784 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
3785 0 : if (_ptr_pszZoneName) {
3786 0 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
3787 : } else {
3788 0 : r->pszZoneName = NULL;
3789 : }
3790 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_FLAGS(ndr, NDR_SCALARS, &r->Flags));
3791 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->ZoneType));
3792 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Version));
3793 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3794 : }
3795 0 : if (ndr_flags & NDR_BUFFERS) {
3796 0 : if (r->pszZoneName) {
3797 0 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3798 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
3799 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
3800 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
3801 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
3802 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
3803 0 : if (length_pszZoneName_1 > size_pszZoneName_1) {
3804 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZoneName_1, length_pszZoneName_1);
3805 : }
3806 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint16_t)));
3807 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint16_t), CH_UTF16));
3808 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
3809 : }
3810 : }
3811 0 : return NDR_ERR_SUCCESS;
3812 : }
3813 :
3814 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_W2K(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_W2K *r)
3815 : {
3816 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_W2K");
3817 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3818 0 : ndr->depth++;
3819 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
3820 0 : ndr->depth++;
3821 0 : if (r->pszZoneName) {
3822 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
3823 : }
3824 0 : ndr->depth--;
3825 0 : ndr_print_DNS_RPC_ZONE_FLAGS(ndr, "Flags", r->Flags);
3826 0 : ndr_print_uint8(ndr, "ZoneType", r->ZoneType);
3827 0 : ndr_print_uint8(ndr, "Version", r->Version);
3828 0 : ndr->depth--;
3829 : }
3830 :
3831 39 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_DOTNET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_DOTNET *r)
3832 : {
3833 39 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3834 39 : if (ndr_flags & NDR_SCALARS) {
3835 39 : NDR_CHECK(ndr_push_align(ndr, 5));
3836 39 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3837 39 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3838 39 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
3839 39 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_FLAGS(ndr, NDR_SCALARS, r->Flags));
3840 39 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->ZoneType));
3841 39 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Version));
3842 39 : NDR_CHECK(ndr_push_DNS_RPC_DP_FLAGS(ndr, NDR_SCALARS, r->dwDpFlags));
3843 39 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
3844 39 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3845 : }
3846 39 : if (ndr_flags & NDR_BUFFERS) {
3847 39 : if (r->pszZoneName) {
3848 39 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF16)));
3849 39 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3850 39 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF16)));
3851 39 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3852 : }
3853 39 : if (r->pszDpFqdn) {
3854 39 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3855 39 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3856 39 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3857 39 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
3858 : }
3859 : }
3860 39 : return NDR_ERR_SUCCESS;
3861 : }
3862 :
3863 39 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_DOTNET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_DOTNET *r)
3864 : {
3865 0 : uint32_t _ptr_pszZoneName;
3866 39 : uint32_t size_pszZoneName_1 = 0;
3867 39 : uint32_t length_pszZoneName_1 = 0;
3868 39 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
3869 0 : uint32_t _ptr_pszDpFqdn;
3870 39 : uint32_t size_pszDpFqdn_1 = 0;
3871 39 : uint32_t length_pszDpFqdn_1 = 0;
3872 39 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
3873 39 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3874 39 : if (ndr_flags & NDR_SCALARS) {
3875 39 : NDR_CHECK(ndr_pull_align(ndr, 5));
3876 39 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3877 39 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3878 39 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
3879 39 : if (_ptr_pszZoneName) {
3880 39 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
3881 : } else {
3882 0 : r->pszZoneName = NULL;
3883 : }
3884 39 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_FLAGS(ndr, NDR_SCALARS, &r->Flags));
3885 39 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->ZoneType));
3886 39 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Version));
3887 39 : NDR_CHECK(ndr_pull_DNS_RPC_DP_FLAGS(ndr, NDR_SCALARS, &r->dwDpFlags));
3888 39 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
3889 39 : if (_ptr_pszDpFqdn) {
3890 39 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
3891 : } else {
3892 0 : r->pszDpFqdn = NULL;
3893 : }
3894 39 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3895 : }
3896 39 : if (ndr_flags & NDR_BUFFERS) {
3897 39 : if (r->pszZoneName) {
3898 39 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3899 39 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
3900 39 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
3901 39 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
3902 39 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
3903 39 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
3904 39 : if (length_pszZoneName_1 > size_pszZoneName_1) {
3905 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZoneName_1, length_pszZoneName_1);
3906 : }
3907 39 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint16_t)));
3908 39 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint16_t), CH_UTF16));
3909 39 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
3910 : }
3911 39 : if (r->pszDpFqdn) {
3912 39 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3913 39 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
3914 39 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
3915 39 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
3916 39 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
3917 39 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
3918 39 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
3919 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDpFqdn_1, length_pszDpFqdn_1);
3920 : }
3921 39 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
3922 39 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
3923 39 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
3924 : }
3925 : }
3926 39 : return NDR_ERR_SUCCESS;
3927 : }
3928 :
3929 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_DOTNET(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_DOTNET *r)
3930 : {
3931 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_DOTNET");
3932 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3933 0 : ndr->depth++;
3934 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3935 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3936 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
3937 0 : ndr->depth++;
3938 0 : if (r->pszZoneName) {
3939 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
3940 : }
3941 0 : ndr->depth--;
3942 0 : ndr_print_DNS_RPC_ZONE_FLAGS(ndr, "Flags", r->Flags);
3943 0 : ndr_print_uint8(ndr, "ZoneType", r->ZoneType);
3944 0 : ndr_print_uint8(ndr, "Version", r->Version);
3945 0 : ndr_print_DNS_RPC_DP_FLAGS(ndr, "dwDpFlags", r->dwDpFlags);
3946 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
3947 0 : ndr->depth++;
3948 0 : if (r->pszDpFqdn) {
3949 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
3950 : }
3951 0 : ndr->depth--;
3952 0 : ndr->depth--;
3953 : }
3954 :
3955 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_LIST_W2K(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_LIST_W2K *r)
3956 : {
3957 0 : uint32_t cntr_ZoneArray_0;
3958 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3959 0 : if (ndr_flags & NDR_SCALARS) {
3960 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->dwZoneCount));
3961 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3962 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneCount));
3963 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
3964 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneArray[cntr_ZoneArray_0]));
3965 : }
3966 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3967 : }
3968 0 : if (ndr_flags & NDR_BUFFERS) {
3969 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
3970 0 : if (r->ZoneArray[cntr_ZoneArray_0]) {
3971 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneArray[cntr_ZoneArray_0]));
3972 : }
3973 : }
3974 : }
3975 0 : return NDR_ERR_SUCCESS;
3976 : }
3977 :
3978 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_LIST_W2K(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_LIST_W2K *r)
3979 : {
3980 0 : uint32_t _ptr_ZoneArray;
3981 0 : uint32_t size_ZoneArray_0 = 0;
3982 0 : uint32_t cntr_ZoneArray_0;
3983 0 : TALLOC_CTX *_mem_save_ZoneArray_0 = NULL;
3984 0 : TALLOC_CTX *_mem_save_ZoneArray_1 = NULL;
3985 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3986 0 : if (ndr_flags & NDR_SCALARS) {
3987 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->ZoneArray));
3988 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3989 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneCount));
3990 0 : if (r->dwZoneCount > 500000) {
3991 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->dwZoneCount), (uint32_t)(0), (uint32_t)(500000));
3992 : }
3993 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ZoneArray, &size_ZoneArray_0));
3994 0 : NDR_PULL_ALLOC_N(ndr, r->ZoneArray, size_ZoneArray_0);
3995 0 : _mem_save_ZoneArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
3996 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray, 0);
3997 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
3998 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneArray));
3999 0 : if (_ptr_ZoneArray) {
4000 0 : NDR_PULL_ALLOC(ndr, r->ZoneArray[cntr_ZoneArray_0]);
4001 : } else {
4002 0 : r->ZoneArray[cntr_ZoneArray_0] = NULL;
4003 : }
4004 : }
4005 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_0, 0);
4006 0 : if (r->ZoneArray) {
4007 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ZoneArray, r->dwZoneCount));
4008 : }
4009 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4010 : }
4011 0 : if (ndr_flags & NDR_BUFFERS) {
4012 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ZoneArray, &size_ZoneArray_0));
4013 0 : _mem_save_ZoneArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
4014 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray, 0);
4015 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
4016 0 : if (r->ZoneArray[cntr_ZoneArray_0]) {
4017 0 : _mem_save_ZoneArray_1 = NDR_PULL_GET_MEM_CTX(ndr);
4018 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray[cntr_ZoneArray_0], 0);
4019 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneArray[cntr_ZoneArray_0]));
4020 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_1, 0);
4021 : }
4022 : }
4023 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_0, 0);
4024 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
4025 : }
4026 : }
4027 0 : return NDR_ERR_SUCCESS;
4028 : }
4029 :
4030 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_LIST_W2K(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_LIST_W2K *r)
4031 : {
4032 0 : uint32_t cntr_ZoneArray_0;
4033 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_LIST_W2K");
4034 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4035 0 : ndr->depth++;
4036 0 : ndr_print_uint32(ndr, "dwZoneCount", r->dwZoneCount);
4037 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "ZoneArray", (uint32_t)(r->dwZoneCount));
4038 0 : ndr->depth++;
4039 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
4040 0 : ndr_print_ptr(ndr, "ZoneArray", r->ZoneArray[cntr_ZoneArray_0]);
4041 0 : ndr->depth++;
4042 0 : if (r->ZoneArray[cntr_ZoneArray_0]) {
4043 0 : ndr_print_DNS_RPC_ZONE_W2K(ndr, "ZoneArray", r->ZoneArray[cntr_ZoneArray_0]);
4044 : }
4045 0 : ndr->depth--;
4046 : }
4047 0 : ndr->depth--;
4048 0 : ndr->depth--;
4049 : }
4050 :
4051 20 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_LIST_DOTNET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_LIST_DOTNET *r)
4052 : {
4053 0 : uint32_t cntr_ZoneArray_0;
4054 20 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4055 20 : if (ndr_flags & NDR_SCALARS) {
4056 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->dwZoneCount));
4057 20 : NDR_CHECK(ndr_push_align(ndr, 5));
4058 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
4059 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
4060 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneCount));
4061 59 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
4062 39 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneArray[cntr_ZoneArray_0]));
4063 : }
4064 20 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4065 : }
4066 20 : if (ndr_flags & NDR_BUFFERS) {
4067 59 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
4068 39 : if (r->ZoneArray[cntr_ZoneArray_0]) {
4069 39 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneArray[cntr_ZoneArray_0]));
4070 : }
4071 : }
4072 : }
4073 20 : return NDR_ERR_SUCCESS;
4074 : }
4075 :
4076 20 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_LIST_DOTNET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_LIST_DOTNET *r)
4077 : {
4078 0 : uint32_t _ptr_ZoneArray;
4079 20 : uint32_t size_ZoneArray_0 = 0;
4080 0 : uint32_t cntr_ZoneArray_0;
4081 20 : TALLOC_CTX *_mem_save_ZoneArray_0 = NULL;
4082 20 : TALLOC_CTX *_mem_save_ZoneArray_1 = NULL;
4083 20 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4084 20 : if (ndr_flags & NDR_SCALARS) {
4085 20 : NDR_CHECK(ndr_pull_array_size(ndr, &r->ZoneArray));
4086 20 : NDR_CHECK(ndr_pull_align(ndr, 5));
4087 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
4088 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
4089 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneCount));
4090 20 : if (r->dwZoneCount > 500000) {
4091 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->dwZoneCount), (uint32_t)(0), (uint32_t)(500000));
4092 : }
4093 20 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ZoneArray, &size_ZoneArray_0));
4094 20 : NDR_PULL_ALLOC_N(ndr, r->ZoneArray, size_ZoneArray_0);
4095 20 : _mem_save_ZoneArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
4096 20 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray, 0);
4097 59 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
4098 39 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneArray));
4099 39 : if (_ptr_ZoneArray) {
4100 39 : NDR_PULL_ALLOC(ndr, r->ZoneArray[cntr_ZoneArray_0]);
4101 : } else {
4102 0 : r->ZoneArray[cntr_ZoneArray_0] = NULL;
4103 : }
4104 : }
4105 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_0, 0);
4106 20 : if (r->ZoneArray) {
4107 20 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ZoneArray, r->dwZoneCount));
4108 : }
4109 20 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4110 : }
4111 20 : if (ndr_flags & NDR_BUFFERS) {
4112 20 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ZoneArray, &size_ZoneArray_0));
4113 20 : _mem_save_ZoneArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
4114 20 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray, 0);
4115 59 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
4116 39 : if (r->ZoneArray[cntr_ZoneArray_0]) {
4117 39 : _mem_save_ZoneArray_1 = NDR_PULL_GET_MEM_CTX(ndr);
4118 39 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray[cntr_ZoneArray_0], 0);
4119 39 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneArray[cntr_ZoneArray_0]));
4120 39 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_1, 0);
4121 : }
4122 : }
4123 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_0, 0);
4124 59 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
4125 : }
4126 : }
4127 20 : return NDR_ERR_SUCCESS;
4128 : }
4129 :
4130 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_LIST_DOTNET(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_LIST_DOTNET *r)
4131 : {
4132 0 : uint32_t cntr_ZoneArray_0;
4133 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_LIST_DOTNET");
4134 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4135 0 : ndr->depth++;
4136 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
4137 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
4138 0 : ndr_print_uint32(ndr, "dwZoneCount", r->dwZoneCount);
4139 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "ZoneArray", (uint32_t)(r->dwZoneCount));
4140 0 : ndr->depth++;
4141 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
4142 0 : ndr_print_ptr(ndr, "ZoneArray", r->ZoneArray[cntr_ZoneArray_0]);
4143 0 : ndr->depth++;
4144 0 : if (r->ZoneArray[cntr_ZoneArray_0]) {
4145 0 : ndr_print_DNS_RPC_ZONE_DOTNET(ndr, "ZoneArray", r->ZoneArray[cntr_ZoneArray_0]);
4146 : }
4147 0 : ndr->depth--;
4148 : }
4149 0 : ndr->depth--;
4150 0 : ndr->depth--;
4151 : }
4152 :
4153 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_INFO_W2K(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_INFO_W2K *r)
4154 : {
4155 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4156 0 : if (ndr_flags & NDR_SCALARS) {
4157 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4158 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
4159 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
4160 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fReverse));
4161 0 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
4162 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fPaused));
4163 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fShutdown));
4164 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAutoCreated));
4165 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseDatabase));
4166 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
4167 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
4168 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
4169 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
4170 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
4171 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
4172 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseWins));
4173 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseNbstat));
4174 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
4175 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNoRefreshInterval));
4176 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRefreshInterval));
4177 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwAvailForScavengeTime));
4178 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipScavengeServers));
4179 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pvReserved1));
4180 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pvReserved2));
4181 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pvReserved3));
4182 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pvReserved4));
4183 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4184 : }
4185 0 : if (ndr_flags & NDR_BUFFERS) {
4186 0 : if (r->pszZoneName) {
4187 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4188 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4189 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4190 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4191 : }
4192 0 : if (r->pszDataFile) {
4193 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4194 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4195 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4196 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4197 : }
4198 0 : if (r->aipMasters) {
4199 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
4200 : }
4201 0 : if (r->aipSecondaries) {
4202 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
4203 : }
4204 0 : if (r->aipNotify) {
4205 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
4206 : }
4207 0 : if (r->aipScavengeServers) {
4208 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
4209 : }
4210 : }
4211 0 : return NDR_ERR_SUCCESS;
4212 : }
4213 :
4214 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_INFO_W2K(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_INFO_W2K *r)
4215 : {
4216 0 : uint32_t _ptr_pszZoneName;
4217 0 : uint32_t size_pszZoneName_1 = 0;
4218 0 : uint32_t length_pszZoneName_1 = 0;
4219 0 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
4220 0 : uint32_t _ptr_pszDataFile;
4221 0 : uint32_t size_pszDataFile_1 = 0;
4222 0 : uint32_t length_pszDataFile_1 = 0;
4223 0 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
4224 0 : uint32_t _ptr_aipMasters;
4225 0 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
4226 0 : uint32_t _ptr_aipSecondaries;
4227 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
4228 0 : uint32_t _ptr_aipNotify;
4229 0 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
4230 0 : uint32_t _ptr_aipScavengeServers;
4231 0 : TALLOC_CTX *_mem_save_aipScavengeServers_0 = NULL;
4232 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4233 0 : if (ndr_flags & NDR_SCALARS) {
4234 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4235 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
4236 0 : if (_ptr_pszZoneName) {
4237 0 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
4238 : } else {
4239 0 : r->pszZoneName = NULL;
4240 : }
4241 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
4242 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fReverse));
4243 0 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
4244 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fPaused));
4245 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fShutdown));
4246 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAutoCreated));
4247 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseDatabase));
4248 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
4249 0 : if (_ptr_pszDataFile) {
4250 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
4251 : } else {
4252 0 : r->pszDataFile = NULL;
4253 : }
4254 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
4255 0 : if (_ptr_aipMasters) {
4256 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
4257 : } else {
4258 0 : r->aipMasters = NULL;
4259 : }
4260 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
4261 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
4262 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
4263 0 : if (_ptr_aipSecondaries) {
4264 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
4265 : } else {
4266 0 : r->aipSecondaries = NULL;
4267 : }
4268 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
4269 0 : if (_ptr_aipNotify) {
4270 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
4271 : } else {
4272 0 : r->aipNotify = NULL;
4273 : }
4274 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseWins));
4275 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseNbstat));
4276 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
4277 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNoRefreshInterval));
4278 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRefreshInterval));
4279 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwAvailForScavengeTime));
4280 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipScavengeServers));
4281 0 : if (_ptr_aipScavengeServers) {
4282 0 : NDR_PULL_ALLOC(ndr, r->aipScavengeServers);
4283 : } else {
4284 0 : r->aipScavengeServers = NULL;
4285 : }
4286 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pvReserved1));
4287 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pvReserved2));
4288 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pvReserved3));
4289 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pvReserved4));
4290 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4291 : }
4292 0 : if (ndr_flags & NDR_BUFFERS) {
4293 0 : if (r->pszZoneName) {
4294 0 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4295 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
4296 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
4297 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
4298 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
4299 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
4300 0 : if (length_pszZoneName_1 > size_pszZoneName_1) {
4301 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZoneName_1, length_pszZoneName_1);
4302 : }
4303 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
4304 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
4305 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
4306 : }
4307 0 : if (r->pszDataFile) {
4308 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
4309 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
4310 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
4311 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
4312 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
4313 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
4314 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
4315 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDataFile_1, length_pszDataFile_1);
4316 : }
4317 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
4318 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
4319 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
4320 : }
4321 0 : if (r->aipMasters) {
4322 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
4323 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
4324 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
4325 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
4326 : }
4327 0 : if (r->aipSecondaries) {
4328 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4329 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
4330 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
4331 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
4332 : }
4333 0 : if (r->aipNotify) {
4334 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
4335 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
4336 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
4337 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
4338 : }
4339 0 : if (r->aipScavengeServers) {
4340 0 : _mem_save_aipScavengeServers_0 = NDR_PULL_GET_MEM_CTX(ndr);
4341 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipScavengeServers, 0);
4342 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
4343 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipScavengeServers_0, 0);
4344 : }
4345 : }
4346 0 : return NDR_ERR_SUCCESS;
4347 : }
4348 :
4349 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_INFO_W2K(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_INFO_W2K *r)
4350 : {
4351 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_INFO_W2K");
4352 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4353 0 : ndr->depth++;
4354 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
4355 0 : ndr->depth++;
4356 0 : if (r->pszZoneName) {
4357 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
4358 : }
4359 0 : ndr->depth--;
4360 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
4361 0 : ndr_print_uint32(ndr, "fReverse", r->fReverse);
4362 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
4363 0 : ndr_print_uint32(ndr, "fPaused", r->fPaused);
4364 0 : ndr_print_uint32(ndr, "fShutdown", r->fShutdown);
4365 0 : ndr_print_uint32(ndr, "fAutoCreated", r->fAutoCreated);
4366 0 : ndr_print_uint32(ndr, "fUseDatabase", r->fUseDatabase);
4367 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
4368 0 : ndr->depth++;
4369 0 : if (r->pszDataFile) {
4370 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
4371 : }
4372 0 : ndr->depth--;
4373 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
4374 0 : ndr->depth++;
4375 0 : if (r->aipMasters) {
4376 0 : ndr_print_IP4_ARRAY(ndr, "aipMasters", r->aipMasters);
4377 : }
4378 0 : ndr->depth--;
4379 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
4380 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
4381 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
4382 0 : ndr->depth++;
4383 0 : if (r->aipSecondaries) {
4384 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
4385 : }
4386 0 : ndr->depth--;
4387 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
4388 0 : ndr->depth++;
4389 0 : if (r->aipNotify) {
4390 0 : ndr_print_IP4_ARRAY(ndr, "aipNotify", r->aipNotify);
4391 : }
4392 0 : ndr->depth--;
4393 0 : ndr_print_uint32(ndr, "fUseWins", r->fUseWins);
4394 0 : ndr_print_uint32(ndr, "fUseNbstat", r->fUseNbstat);
4395 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
4396 0 : ndr_print_uint32(ndr, "dwNoRefreshInterval", r->dwNoRefreshInterval);
4397 0 : ndr_print_uint32(ndr, "dwRefreshInterval", r->dwRefreshInterval);
4398 0 : ndr_print_uint32(ndr, "dwAvailForScavengeTime", r->dwAvailForScavengeTime);
4399 0 : ndr_print_ptr(ndr, "aipScavengeServers", r->aipScavengeServers);
4400 0 : ndr->depth++;
4401 0 : if (r->aipScavengeServers) {
4402 0 : ndr_print_IP4_ARRAY(ndr, "aipScavengeServers", r->aipScavengeServers);
4403 : }
4404 0 : ndr->depth--;
4405 0 : ndr_print_uint32(ndr, "pvReserved1", r->pvReserved1);
4406 0 : ndr_print_uint32(ndr, "pvReserved2", r->pvReserved2);
4407 0 : ndr_print_uint32(ndr, "pvReserved3", r->pvReserved3);
4408 0 : ndr_print_uint32(ndr, "pvReserved4", r->pvReserved4);
4409 0 : ndr->depth--;
4410 : }
4411 :
4412 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_INFO_DOTNET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_INFO_DOTNET *r)
4413 : {
4414 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4415 0 : if (ndr_flags & NDR_SCALARS) {
4416 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4417 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
4418 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
4419 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
4420 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
4421 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fReverse));
4422 0 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
4423 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fPaused));
4424 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fShutdown));
4425 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAutoCreated));
4426 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseDatabase));
4427 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
4428 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
4429 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
4430 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
4431 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
4432 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
4433 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseWins));
4434 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseNbstat));
4435 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
4436 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNoRefreshInterval));
4437 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRefreshInterval));
4438 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwAvailForScavengeTime));
4439 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipScavengeServers));
4440 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwarderTimeout));
4441 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fForwarderSlave));
4442 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipLocalMasters));
4443 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDpFlags));
4444 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
4445 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwszZoneDn));
4446 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastSuccessfulSoaCheck));
4447 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastSuccessfulXfr));
4448 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved1));
4449 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved2));
4450 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved3));
4451 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved4));
4452 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved5));
4453 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pReserved1));
4454 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pReserved2));
4455 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pReserved3));
4456 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pReserved4));
4457 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4458 : }
4459 0 : if (ndr_flags & NDR_BUFFERS) {
4460 0 : if (r->pszZoneName) {
4461 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4462 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4463 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4464 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4465 : }
4466 0 : if (r->pszDataFile) {
4467 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4468 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4469 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4470 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4471 : }
4472 0 : if (r->aipMasters) {
4473 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
4474 : }
4475 0 : if (r->aipSecondaries) {
4476 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
4477 : }
4478 0 : if (r->aipNotify) {
4479 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
4480 : }
4481 0 : if (r->aipScavengeServers) {
4482 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
4483 : }
4484 0 : if (r->aipLocalMasters) {
4485 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipLocalMasters));
4486 : }
4487 0 : if (r->pszDpFqdn) {
4488 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
4489 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4490 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
4491 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4492 : }
4493 0 : if (r->pwszZoneDn) {
4494 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszZoneDn, CH_UTF16)));
4495 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4496 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszZoneDn, CH_UTF16)));
4497 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pwszZoneDn, ndr_charset_length(r->pwszZoneDn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4498 : }
4499 0 : if (r->pReserved1) {
4500 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved1, CH_UTF8)));
4501 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4502 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved1, CH_UTF8)));
4503 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pReserved1, ndr_charset_length(r->pReserved1, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4504 : }
4505 0 : if (r->pReserved2) {
4506 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved2, CH_UTF8)));
4507 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4508 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved2, CH_UTF8)));
4509 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pReserved2, ndr_charset_length(r->pReserved2, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4510 : }
4511 0 : if (r->pReserved3) {
4512 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved3, CH_UTF8)));
4513 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4514 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved3, CH_UTF8)));
4515 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pReserved3, ndr_charset_length(r->pReserved3, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4516 : }
4517 0 : if (r->pReserved4) {
4518 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved4, CH_UTF8)));
4519 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4520 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved4, CH_UTF8)));
4521 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pReserved4, ndr_charset_length(r->pReserved4, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4522 : }
4523 : }
4524 0 : return NDR_ERR_SUCCESS;
4525 : }
4526 :
4527 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_INFO_DOTNET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_INFO_DOTNET *r)
4528 : {
4529 0 : uint32_t _ptr_pszZoneName;
4530 0 : uint32_t size_pszZoneName_1 = 0;
4531 0 : uint32_t length_pszZoneName_1 = 0;
4532 0 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
4533 0 : uint32_t _ptr_pszDataFile;
4534 0 : uint32_t size_pszDataFile_1 = 0;
4535 0 : uint32_t length_pszDataFile_1 = 0;
4536 0 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
4537 0 : uint32_t _ptr_aipMasters;
4538 0 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
4539 0 : uint32_t _ptr_aipSecondaries;
4540 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
4541 0 : uint32_t _ptr_aipNotify;
4542 0 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
4543 0 : uint32_t _ptr_aipScavengeServers;
4544 0 : TALLOC_CTX *_mem_save_aipScavengeServers_0 = NULL;
4545 0 : uint32_t _ptr_aipLocalMasters;
4546 0 : TALLOC_CTX *_mem_save_aipLocalMasters_0 = NULL;
4547 0 : uint32_t _ptr_pszDpFqdn;
4548 0 : uint32_t size_pszDpFqdn_1 = 0;
4549 0 : uint32_t length_pszDpFqdn_1 = 0;
4550 0 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
4551 0 : uint32_t _ptr_pwszZoneDn;
4552 0 : uint32_t size_pwszZoneDn_1 = 0;
4553 0 : uint32_t length_pwszZoneDn_1 = 0;
4554 0 : TALLOC_CTX *_mem_save_pwszZoneDn_0 = NULL;
4555 0 : uint32_t _ptr_pReserved1;
4556 0 : uint32_t size_pReserved1_1 = 0;
4557 0 : uint32_t length_pReserved1_1 = 0;
4558 0 : TALLOC_CTX *_mem_save_pReserved1_0 = NULL;
4559 0 : uint32_t _ptr_pReserved2;
4560 0 : uint32_t size_pReserved2_1 = 0;
4561 0 : uint32_t length_pReserved2_1 = 0;
4562 0 : TALLOC_CTX *_mem_save_pReserved2_0 = NULL;
4563 0 : uint32_t _ptr_pReserved3;
4564 0 : uint32_t size_pReserved3_1 = 0;
4565 0 : uint32_t length_pReserved3_1 = 0;
4566 0 : TALLOC_CTX *_mem_save_pReserved3_0 = NULL;
4567 0 : uint32_t _ptr_pReserved4;
4568 0 : uint32_t size_pReserved4_1 = 0;
4569 0 : uint32_t length_pReserved4_1 = 0;
4570 0 : TALLOC_CTX *_mem_save_pReserved4_0 = NULL;
4571 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4572 0 : if (ndr_flags & NDR_SCALARS) {
4573 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4574 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
4575 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
4576 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
4577 0 : if (_ptr_pszZoneName) {
4578 0 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
4579 : } else {
4580 0 : r->pszZoneName = NULL;
4581 : }
4582 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
4583 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fReverse));
4584 0 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
4585 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fPaused));
4586 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fShutdown));
4587 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAutoCreated));
4588 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseDatabase));
4589 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
4590 0 : if (_ptr_pszDataFile) {
4591 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
4592 : } else {
4593 0 : r->pszDataFile = NULL;
4594 : }
4595 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
4596 0 : if (_ptr_aipMasters) {
4597 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
4598 : } else {
4599 0 : r->aipMasters = NULL;
4600 : }
4601 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
4602 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
4603 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
4604 0 : if (_ptr_aipSecondaries) {
4605 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
4606 : } else {
4607 0 : r->aipSecondaries = NULL;
4608 : }
4609 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
4610 0 : if (_ptr_aipNotify) {
4611 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
4612 : } else {
4613 0 : r->aipNotify = NULL;
4614 : }
4615 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseWins));
4616 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseNbstat));
4617 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
4618 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNoRefreshInterval));
4619 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRefreshInterval));
4620 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwAvailForScavengeTime));
4621 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipScavengeServers));
4622 0 : if (_ptr_aipScavengeServers) {
4623 0 : NDR_PULL_ALLOC(ndr, r->aipScavengeServers);
4624 : } else {
4625 0 : r->aipScavengeServers = NULL;
4626 : }
4627 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwarderTimeout));
4628 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fForwarderSlave));
4629 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipLocalMasters));
4630 0 : if (_ptr_aipLocalMasters) {
4631 0 : NDR_PULL_ALLOC(ndr, r->aipLocalMasters);
4632 : } else {
4633 0 : r->aipLocalMasters = NULL;
4634 : }
4635 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDpFlags));
4636 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
4637 0 : if (_ptr_pszDpFqdn) {
4638 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
4639 : } else {
4640 0 : r->pszDpFqdn = NULL;
4641 : }
4642 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszZoneDn));
4643 0 : if (_ptr_pwszZoneDn) {
4644 0 : NDR_PULL_ALLOC(ndr, r->pwszZoneDn);
4645 : } else {
4646 0 : r->pwszZoneDn = NULL;
4647 : }
4648 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastSuccessfulSoaCheck));
4649 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastSuccessfulXfr));
4650 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved1));
4651 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved2));
4652 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved3));
4653 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved4));
4654 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved5));
4655 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pReserved1));
4656 0 : if (_ptr_pReserved1) {
4657 0 : NDR_PULL_ALLOC(ndr, r->pReserved1);
4658 : } else {
4659 0 : r->pReserved1 = NULL;
4660 : }
4661 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pReserved2));
4662 0 : if (_ptr_pReserved2) {
4663 0 : NDR_PULL_ALLOC(ndr, r->pReserved2);
4664 : } else {
4665 0 : r->pReserved2 = NULL;
4666 : }
4667 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pReserved3));
4668 0 : if (_ptr_pReserved3) {
4669 0 : NDR_PULL_ALLOC(ndr, r->pReserved3);
4670 : } else {
4671 0 : r->pReserved3 = NULL;
4672 : }
4673 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pReserved4));
4674 0 : if (_ptr_pReserved4) {
4675 0 : NDR_PULL_ALLOC(ndr, r->pReserved4);
4676 : } else {
4677 0 : r->pReserved4 = NULL;
4678 : }
4679 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4680 : }
4681 0 : if (ndr_flags & NDR_BUFFERS) {
4682 0 : if (r->pszZoneName) {
4683 0 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4684 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
4685 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
4686 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
4687 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
4688 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
4689 0 : if (length_pszZoneName_1 > size_pszZoneName_1) {
4690 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZoneName_1, length_pszZoneName_1);
4691 : }
4692 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
4693 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
4694 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
4695 : }
4696 0 : if (r->pszDataFile) {
4697 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
4698 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
4699 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
4700 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
4701 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
4702 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
4703 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
4704 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDataFile_1, length_pszDataFile_1);
4705 : }
4706 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
4707 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
4708 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
4709 : }
4710 0 : if (r->aipMasters) {
4711 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
4712 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
4713 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
4714 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
4715 : }
4716 0 : if (r->aipSecondaries) {
4717 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4718 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
4719 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
4720 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
4721 : }
4722 0 : if (r->aipNotify) {
4723 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
4724 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
4725 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
4726 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
4727 : }
4728 0 : if (r->aipScavengeServers) {
4729 0 : _mem_save_aipScavengeServers_0 = NDR_PULL_GET_MEM_CTX(ndr);
4730 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipScavengeServers, 0);
4731 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
4732 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipScavengeServers_0, 0);
4733 : }
4734 0 : if (r->aipLocalMasters) {
4735 0 : _mem_save_aipLocalMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
4736 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipLocalMasters, 0);
4737 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipLocalMasters));
4738 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipLocalMasters_0, 0);
4739 : }
4740 0 : if (r->pszDpFqdn) {
4741 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
4742 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
4743 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
4744 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
4745 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
4746 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
4747 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
4748 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDpFqdn_1, length_pszDpFqdn_1);
4749 : }
4750 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
4751 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
4752 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
4753 : }
4754 0 : if (r->pwszZoneDn) {
4755 0 : _mem_save_pwszZoneDn_0 = NDR_PULL_GET_MEM_CTX(ndr);
4756 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pwszZoneDn, 0);
4757 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pwszZoneDn));
4758 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pwszZoneDn));
4759 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pwszZoneDn, &size_pwszZoneDn_1));
4760 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pwszZoneDn, &length_pwszZoneDn_1));
4761 0 : if (length_pwszZoneDn_1 > size_pwszZoneDn_1) {
4762 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszZoneDn_1, length_pwszZoneDn_1);
4763 : }
4764 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszZoneDn_1, sizeof(uint16_t)));
4765 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pwszZoneDn, length_pwszZoneDn_1, sizeof(uint16_t), CH_UTF16));
4766 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszZoneDn_0, 0);
4767 : }
4768 0 : if (r->pReserved1) {
4769 0 : _mem_save_pReserved1_0 = NDR_PULL_GET_MEM_CTX(ndr);
4770 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pReserved1, 0);
4771 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pReserved1));
4772 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pReserved1));
4773 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pReserved1, &size_pReserved1_1));
4774 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pReserved1, &length_pReserved1_1));
4775 0 : if (length_pReserved1_1 > size_pReserved1_1) {
4776 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pReserved1_1, length_pReserved1_1);
4777 : }
4778 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pReserved1_1, sizeof(uint8_t)));
4779 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pReserved1, length_pReserved1_1, sizeof(uint8_t), CH_UTF8));
4780 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReserved1_0, 0);
4781 : }
4782 0 : if (r->pReserved2) {
4783 0 : _mem_save_pReserved2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4784 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pReserved2, 0);
4785 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pReserved2));
4786 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pReserved2));
4787 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pReserved2, &size_pReserved2_1));
4788 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pReserved2, &length_pReserved2_1));
4789 0 : if (length_pReserved2_1 > size_pReserved2_1) {
4790 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pReserved2_1, length_pReserved2_1);
4791 : }
4792 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pReserved2_1, sizeof(uint8_t)));
4793 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pReserved2, length_pReserved2_1, sizeof(uint8_t), CH_UTF8));
4794 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReserved2_0, 0);
4795 : }
4796 0 : if (r->pReserved3) {
4797 0 : _mem_save_pReserved3_0 = NDR_PULL_GET_MEM_CTX(ndr);
4798 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pReserved3, 0);
4799 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pReserved3));
4800 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pReserved3));
4801 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pReserved3, &size_pReserved3_1));
4802 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pReserved3, &length_pReserved3_1));
4803 0 : if (length_pReserved3_1 > size_pReserved3_1) {
4804 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pReserved3_1, length_pReserved3_1);
4805 : }
4806 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pReserved3_1, sizeof(uint8_t)));
4807 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pReserved3, length_pReserved3_1, sizeof(uint8_t), CH_UTF8));
4808 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReserved3_0, 0);
4809 : }
4810 0 : if (r->pReserved4) {
4811 0 : _mem_save_pReserved4_0 = NDR_PULL_GET_MEM_CTX(ndr);
4812 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pReserved4, 0);
4813 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pReserved4));
4814 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pReserved4));
4815 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pReserved4, &size_pReserved4_1));
4816 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pReserved4, &length_pReserved4_1));
4817 0 : if (length_pReserved4_1 > size_pReserved4_1) {
4818 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pReserved4_1, length_pReserved4_1);
4819 : }
4820 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pReserved4_1, sizeof(uint8_t)));
4821 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pReserved4, length_pReserved4_1, sizeof(uint8_t), CH_UTF8));
4822 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReserved4_0, 0);
4823 : }
4824 : }
4825 0 : return NDR_ERR_SUCCESS;
4826 : }
4827 :
4828 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_INFO_DOTNET(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_INFO_DOTNET *r)
4829 : {
4830 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_INFO_DOTNET");
4831 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4832 0 : ndr->depth++;
4833 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
4834 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
4835 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
4836 0 : ndr->depth++;
4837 0 : if (r->pszZoneName) {
4838 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
4839 : }
4840 0 : ndr->depth--;
4841 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
4842 0 : ndr_print_uint32(ndr, "fReverse", r->fReverse);
4843 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
4844 0 : ndr_print_uint32(ndr, "fPaused", r->fPaused);
4845 0 : ndr_print_uint32(ndr, "fShutdown", r->fShutdown);
4846 0 : ndr_print_uint32(ndr, "fAutoCreated", r->fAutoCreated);
4847 0 : ndr_print_uint32(ndr, "fUseDatabase", r->fUseDatabase);
4848 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
4849 0 : ndr->depth++;
4850 0 : if (r->pszDataFile) {
4851 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
4852 : }
4853 0 : ndr->depth--;
4854 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
4855 0 : ndr->depth++;
4856 0 : if (r->aipMasters) {
4857 0 : ndr_print_IP4_ARRAY(ndr, "aipMasters", r->aipMasters);
4858 : }
4859 0 : ndr->depth--;
4860 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
4861 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
4862 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
4863 0 : ndr->depth++;
4864 0 : if (r->aipSecondaries) {
4865 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
4866 : }
4867 0 : ndr->depth--;
4868 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
4869 0 : ndr->depth++;
4870 0 : if (r->aipNotify) {
4871 0 : ndr_print_IP4_ARRAY(ndr, "aipNotify", r->aipNotify);
4872 : }
4873 0 : ndr->depth--;
4874 0 : ndr_print_uint32(ndr, "fUseWins", r->fUseWins);
4875 0 : ndr_print_uint32(ndr, "fUseNbstat", r->fUseNbstat);
4876 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
4877 0 : ndr_print_uint32(ndr, "dwNoRefreshInterval", r->dwNoRefreshInterval);
4878 0 : ndr_print_uint32(ndr, "dwRefreshInterval", r->dwRefreshInterval);
4879 0 : ndr_print_uint32(ndr, "dwAvailForScavengeTime", r->dwAvailForScavengeTime);
4880 0 : ndr_print_ptr(ndr, "aipScavengeServers", r->aipScavengeServers);
4881 0 : ndr->depth++;
4882 0 : if (r->aipScavengeServers) {
4883 0 : ndr_print_IP4_ARRAY(ndr, "aipScavengeServers", r->aipScavengeServers);
4884 : }
4885 0 : ndr->depth--;
4886 0 : ndr_print_uint32(ndr, "dwForwarderTimeout", r->dwForwarderTimeout);
4887 0 : ndr_print_uint32(ndr, "fForwarderSlave", r->fForwarderSlave);
4888 0 : ndr_print_ptr(ndr, "aipLocalMasters", r->aipLocalMasters);
4889 0 : ndr->depth++;
4890 0 : if (r->aipLocalMasters) {
4891 0 : ndr_print_IP4_ARRAY(ndr, "aipLocalMasters", r->aipLocalMasters);
4892 : }
4893 0 : ndr->depth--;
4894 0 : ndr_print_uint32(ndr, "dwDpFlags", r->dwDpFlags);
4895 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
4896 0 : ndr->depth++;
4897 0 : if (r->pszDpFqdn) {
4898 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
4899 : }
4900 0 : ndr->depth--;
4901 0 : ndr_print_ptr(ndr, "pwszZoneDn", r->pwszZoneDn);
4902 0 : ndr->depth++;
4903 0 : if (r->pwszZoneDn) {
4904 0 : ndr_print_string(ndr, "pwszZoneDn", r->pwszZoneDn);
4905 : }
4906 0 : ndr->depth--;
4907 0 : ndr_print_uint32(ndr, "dwLastSuccessfulSoaCheck", r->dwLastSuccessfulSoaCheck);
4908 0 : ndr_print_uint32(ndr, "dwLastSuccessfulXfr", r->dwLastSuccessfulXfr);
4909 0 : ndr_print_uint32(ndr, "dwReserved1", r->dwReserved1);
4910 0 : ndr_print_uint32(ndr, "dwReserved2", r->dwReserved2);
4911 0 : ndr_print_uint32(ndr, "dwReserved3", r->dwReserved3);
4912 0 : ndr_print_uint32(ndr, "dwReserved4", r->dwReserved4);
4913 0 : ndr_print_uint32(ndr, "dwReserved5", r->dwReserved5);
4914 0 : ndr_print_ptr(ndr, "pReserved1", r->pReserved1);
4915 0 : ndr->depth++;
4916 0 : if (r->pReserved1) {
4917 0 : ndr_print_string(ndr, "pReserved1", r->pReserved1);
4918 : }
4919 0 : ndr->depth--;
4920 0 : ndr_print_ptr(ndr, "pReserved2", r->pReserved2);
4921 0 : ndr->depth++;
4922 0 : if (r->pReserved2) {
4923 0 : ndr_print_string(ndr, "pReserved2", r->pReserved2);
4924 : }
4925 0 : ndr->depth--;
4926 0 : ndr_print_ptr(ndr, "pReserved3", r->pReserved3);
4927 0 : ndr->depth++;
4928 0 : if (r->pReserved3) {
4929 0 : ndr_print_string(ndr, "pReserved3", r->pReserved3);
4930 : }
4931 0 : ndr->depth--;
4932 0 : ndr_print_ptr(ndr, "pReserved4", r->pReserved4);
4933 0 : ndr->depth++;
4934 0 : if (r->pReserved4) {
4935 0 : ndr_print_string(ndr, "pReserved4", r->pReserved4);
4936 : }
4937 0 : ndr->depth--;
4938 0 : ndr->depth--;
4939 : }
4940 :
4941 17 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_INFO_LONGHORN(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_INFO_LONGHORN *r)
4942 : {
4943 17 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4944 17 : if (ndr_flags & NDR_SCALARS) {
4945 17 : NDR_CHECK(ndr_push_align(ndr, 5));
4946 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
4947 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
4948 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
4949 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
4950 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fReverse));
4951 17 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
4952 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fPaused));
4953 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fShutdown));
4954 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAutoCreated));
4955 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseDatabase));
4956 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
4957 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
4958 17 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
4959 17 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
4960 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
4961 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
4962 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseWins));
4963 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseNbstat));
4964 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
4965 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNoRefreshInterval));
4966 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRefreshInterval));
4967 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwAvailForScavengeTime));
4968 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipScavengeServers));
4969 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwarderTimeout));
4970 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fForwarderSlave));
4971 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipLocalMasters));
4972 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDpFlags));
4973 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
4974 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwszZoneDn));
4975 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastSuccessfulSoaCheck));
4976 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastSuccessfulXfr));
4977 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fQueuedForBackgroundLoad));
4978 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fBackgroundLoadInProgress));
4979 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fReadOnlyZone));
4980 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastXfrAttempt));
4981 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastXfrResult));
4982 17 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4983 : }
4984 17 : if (ndr_flags & NDR_BUFFERS) {
4985 17 : if (r->pszZoneName) {
4986 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4987 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4988 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4989 17 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4990 : }
4991 17 : if (r->pszDataFile) {
4992 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4993 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4994 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4995 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4996 : }
4997 17 : if (r->aipMasters) {
4998 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
4999 : }
5000 17 : if (r->aipSecondaries) {
5001 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5002 : }
5003 17 : if (r->aipNotify) {
5004 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5005 : }
5006 17 : if (r->aipScavengeServers) {
5007 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
5008 : }
5009 17 : if (r->aipLocalMasters) {
5010 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipLocalMasters));
5011 : }
5012 17 : if (r->pszDpFqdn) {
5013 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
5014 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5015 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
5016 17 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5017 : }
5018 17 : if (r->pwszZoneDn) {
5019 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszZoneDn, CH_UTF16)));
5020 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5021 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszZoneDn, CH_UTF16)));
5022 17 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pwszZoneDn, ndr_charset_length(r->pwszZoneDn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5023 : }
5024 : }
5025 17 : return NDR_ERR_SUCCESS;
5026 : }
5027 :
5028 17 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_INFO_LONGHORN(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_INFO_LONGHORN *r)
5029 : {
5030 0 : uint32_t _ptr_pszZoneName;
5031 17 : uint32_t size_pszZoneName_1 = 0;
5032 17 : uint32_t length_pszZoneName_1 = 0;
5033 17 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
5034 0 : uint32_t _ptr_pszDataFile;
5035 17 : uint32_t size_pszDataFile_1 = 0;
5036 17 : uint32_t length_pszDataFile_1 = 0;
5037 17 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
5038 0 : uint32_t _ptr_aipMasters;
5039 17 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
5040 0 : uint32_t _ptr_aipSecondaries;
5041 17 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
5042 0 : uint32_t _ptr_aipNotify;
5043 17 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
5044 0 : uint32_t _ptr_aipScavengeServers;
5045 17 : TALLOC_CTX *_mem_save_aipScavengeServers_0 = NULL;
5046 0 : uint32_t _ptr_aipLocalMasters;
5047 17 : TALLOC_CTX *_mem_save_aipLocalMasters_0 = NULL;
5048 0 : uint32_t _ptr_pszDpFqdn;
5049 17 : uint32_t size_pszDpFqdn_1 = 0;
5050 17 : uint32_t length_pszDpFqdn_1 = 0;
5051 17 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
5052 0 : uint32_t _ptr_pwszZoneDn;
5053 17 : uint32_t size_pwszZoneDn_1 = 0;
5054 17 : uint32_t length_pwszZoneDn_1 = 0;
5055 17 : TALLOC_CTX *_mem_save_pwszZoneDn_0 = NULL;
5056 17 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5057 17 : if (ndr_flags & NDR_SCALARS) {
5058 17 : NDR_CHECK(ndr_pull_align(ndr, 5));
5059 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
5060 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
5061 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
5062 17 : if (_ptr_pszZoneName) {
5063 17 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
5064 : } else {
5065 0 : r->pszZoneName = NULL;
5066 : }
5067 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
5068 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fReverse));
5069 17 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
5070 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fPaused));
5071 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fShutdown));
5072 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAutoCreated));
5073 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseDatabase));
5074 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
5075 17 : if (_ptr_pszDataFile) {
5076 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
5077 : } else {
5078 17 : r->pszDataFile = NULL;
5079 : }
5080 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
5081 17 : if (_ptr_aipMasters) {
5082 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
5083 : } else {
5084 17 : r->aipMasters = NULL;
5085 : }
5086 17 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
5087 17 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
5088 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
5089 17 : if (_ptr_aipSecondaries) {
5090 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
5091 : } else {
5092 17 : r->aipSecondaries = NULL;
5093 : }
5094 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
5095 17 : if (_ptr_aipNotify) {
5096 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
5097 : } else {
5098 17 : r->aipNotify = NULL;
5099 : }
5100 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseWins));
5101 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseNbstat));
5102 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
5103 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNoRefreshInterval));
5104 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRefreshInterval));
5105 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwAvailForScavengeTime));
5106 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipScavengeServers));
5107 17 : if (_ptr_aipScavengeServers) {
5108 0 : NDR_PULL_ALLOC(ndr, r->aipScavengeServers);
5109 : } else {
5110 17 : r->aipScavengeServers = NULL;
5111 : }
5112 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwarderTimeout));
5113 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fForwarderSlave));
5114 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipLocalMasters));
5115 17 : if (_ptr_aipLocalMasters) {
5116 0 : NDR_PULL_ALLOC(ndr, r->aipLocalMasters);
5117 : } else {
5118 17 : r->aipLocalMasters = NULL;
5119 : }
5120 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDpFlags));
5121 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
5122 17 : if (_ptr_pszDpFqdn) {
5123 17 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
5124 : } else {
5125 0 : r->pszDpFqdn = NULL;
5126 : }
5127 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszZoneDn));
5128 17 : if (_ptr_pwszZoneDn) {
5129 17 : NDR_PULL_ALLOC(ndr, r->pwszZoneDn);
5130 : } else {
5131 0 : r->pwszZoneDn = NULL;
5132 : }
5133 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastSuccessfulSoaCheck));
5134 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastSuccessfulXfr));
5135 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fQueuedForBackgroundLoad));
5136 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fBackgroundLoadInProgress));
5137 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fReadOnlyZone));
5138 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastXfrAttempt));
5139 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastXfrResult));
5140 17 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5141 : }
5142 17 : if (ndr_flags & NDR_BUFFERS) {
5143 17 : if (r->pszZoneName) {
5144 17 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5145 17 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
5146 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
5147 17 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
5148 17 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
5149 17 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
5150 17 : if (length_pszZoneName_1 > size_pszZoneName_1) {
5151 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZoneName_1, length_pszZoneName_1);
5152 : }
5153 17 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
5154 17 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
5155 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
5156 : }
5157 17 : if (r->pszDataFile) {
5158 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
5159 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
5160 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
5161 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
5162 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
5163 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
5164 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
5165 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDataFile_1, length_pszDataFile_1);
5166 : }
5167 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
5168 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
5169 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
5170 : }
5171 17 : if (r->aipMasters) {
5172 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
5173 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
5174 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
5175 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
5176 : }
5177 17 : if (r->aipSecondaries) {
5178 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5179 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
5180 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5181 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
5182 : }
5183 17 : if (r->aipNotify) {
5184 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
5185 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
5186 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5187 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
5188 : }
5189 17 : if (r->aipScavengeServers) {
5190 0 : _mem_save_aipScavengeServers_0 = NDR_PULL_GET_MEM_CTX(ndr);
5191 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipScavengeServers, 0);
5192 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
5193 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipScavengeServers_0, 0);
5194 : }
5195 17 : if (r->aipLocalMasters) {
5196 0 : _mem_save_aipLocalMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
5197 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipLocalMasters, 0);
5198 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipLocalMasters));
5199 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipLocalMasters_0, 0);
5200 : }
5201 17 : if (r->pszDpFqdn) {
5202 17 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
5203 17 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
5204 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
5205 17 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
5206 17 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
5207 17 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
5208 17 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
5209 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDpFqdn_1, length_pszDpFqdn_1);
5210 : }
5211 17 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
5212 17 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
5213 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
5214 : }
5215 17 : if (r->pwszZoneDn) {
5216 17 : _mem_save_pwszZoneDn_0 = NDR_PULL_GET_MEM_CTX(ndr);
5217 17 : NDR_PULL_SET_MEM_CTX(ndr, r->pwszZoneDn, 0);
5218 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pwszZoneDn));
5219 17 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pwszZoneDn));
5220 17 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pwszZoneDn, &size_pwszZoneDn_1));
5221 17 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pwszZoneDn, &length_pwszZoneDn_1));
5222 17 : if (length_pwszZoneDn_1 > size_pwszZoneDn_1) {
5223 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszZoneDn_1, length_pwszZoneDn_1);
5224 : }
5225 17 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszZoneDn_1, sizeof(uint16_t)));
5226 17 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pwszZoneDn, length_pwszZoneDn_1, sizeof(uint16_t), CH_UTF16));
5227 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszZoneDn_0, 0);
5228 : }
5229 : }
5230 17 : return NDR_ERR_SUCCESS;
5231 : }
5232 :
5233 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_INFO_LONGHORN(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_INFO_LONGHORN *r)
5234 : {
5235 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_INFO_LONGHORN");
5236 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5237 0 : ndr->depth++;
5238 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
5239 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
5240 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
5241 0 : ndr->depth++;
5242 0 : if (r->pszZoneName) {
5243 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
5244 : }
5245 0 : ndr->depth--;
5246 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
5247 0 : ndr_print_uint32(ndr, "fReverse", r->fReverse);
5248 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
5249 0 : ndr_print_uint32(ndr, "fPaused", r->fPaused);
5250 0 : ndr_print_uint32(ndr, "fShutdown", r->fShutdown);
5251 0 : ndr_print_uint32(ndr, "fAutoCreated", r->fAutoCreated);
5252 0 : ndr_print_uint32(ndr, "fUseDatabase", r->fUseDatabase);
5253 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
5254 0 : ndr->depth++;
5255 0 : if (r->pszDataFile) {
5256 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
5257 : }
5258 0 : ndr->depth--;
5259 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
5260 0 : ndr->depth++;
5261 0 : if (r->aipMasters) {
5262 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipMasters", r->aipMasters);
5263 : }
5264 0 : ndr->depth--;
5265 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
5266 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
5267 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
5268 0 : ndr->depth++;
5269 0 : if (r->aipSecondaries) {
5270 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
5271 : }
5272 0 : ndr->depth--;
5273 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
5274 0 : ndr->depth++;
5275 0 : if (r->aipNotify) {
5276 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipNotify", r->aipNotify);
5277 : }
5278 0 : ndr->depth--;
5279 0 : ndr_print_uint32(ndr, "fUseWins", r->fUseWins);
5280 0 : ndr_print_uint32(ndr, "fUseNbstat", r->fUseNbstat);
5281 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
5282 0 : ndr_print_uint32(ndr, "dwNoRefreshInterval", r->dwNoRefreshInterval);
5283 0 : ndr_print_uint32(ndr, "dwRefreshInterval", r->dwRefreshInterval);
5284 0 : ndr_print_uint32(ndr, "dwAvailForScavengeTime", r->dwAvailForScavengeTime);
5285 0 : ndr_print_ptr(ndr, "aipScavengeServers", r->aipScavengeServers);
5286 0 : ndr->depth++;
5287 0 : if (r->aipScavengeServers) {
5288 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipScavengeServers", r->aipScavengeServers);
5289 : }
5290 0 : ndr->depth--;
5291 0 : ndr_print_uint32(ndr, "dwForwarderTimeout", r->dwForwarderTimeout);
5292 0 : ndr_print_uint32(ndr, "fForwarderSlave", r->fForwarderSlave);
5293 0 : ndr_print_ptr(ndr, "aipLocalMasters", r->aipLocalMasters);
5294 0 : ndr->depth++;
5295 0 : if (r->aipLocalMasters) {
5296 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipLocalMasters", r->aipLocalMasters);
5297 : }
5298 0 : ndr->depth--;
5299 0 : ndr_print_uint32(ndr, "dwDpFlags", r->dwDpFlags);
5300 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
5301 0 : ndr->depth++;
5302 0 : if (r->pszDpFqdn) {
5303 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
5304 : }
5305 0 : ndr->depth--;
5306 0 : ndr_print_ptr(ndr, "pwszZoneDn", r->pwszZoneDn);
5307 0 : ndr->depth++;
5308 0 : if (r->pwszZoneDn) {
5309 0 : ndr_print_string(ndr, "pwszZoneDn", r->pwszZoneDn);
5310 : }
5311 0 : ndr->depth--;
5312 0 : ndr_print_uint32(ndr, "dwLastSuccessfulSoaCheck", r->dwLastSuccessfulSoaCheck);
5313 0 : ndr_print_uint32(ndr, "dwLastSuccessfulXfr", r->dwLastSuccessfulXfr);
5314 0 : ndr_print_uint32(ndr, "fQueuedForBackgroundLoad", r->fQueuedForBackgroundLoad);
5315 0 : ndr_print_uint32(ndr, "fBackgroundLoadInProgress", r->fBackgroundLoadInProgress);
5316 0 : ndr_print_uint32(ndr, "fReadOnlyZone", r->fReadOnlyZone);
5317 0 : ndr_print_uint32(ndr, "dwLastXfrAttempt", r->dwLastXfrAttempt);
5318 0 : ndr_print_uint32(ndr, "dwLastXfrResult", r->dwLastXfrResult);
5319 0 : ndr->depth--;
5320 : }
5321 :
5322 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_SECONDARIES_W2K(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_SECONDARIES_W2K *r)
5323 : {
5324 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5325 0 : if (ndr_flags & NDR_SCALARS) {
5326 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5327 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
5328 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
5329 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
5330 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
5331 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5332 : }
5333 0 : if (ndr_flags & NDR_BUFFERS) {
5334 0 : if (r->aipSecondaries) {
5335 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5336 : }
5337 0 : if (r->aipNotify) {
5338 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5339 : }
5340 : }
5341 0 : return NDR_ERR_SUCCESS;
5342 : }
5343 :
5344 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_SECONDARIES_W2K(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_SECONDARIES_W2K *r)
5345 : {
5346 0 : uint32_t _ptr_aipSecondaries;
5347 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
5348 0 : uint32_t _ptr_aipNotify;
5349 0 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
5350 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5351 0 : if (ndr_flags & NDR_SCALARS) {
5352 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5353 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
5354 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
5355 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
5356 0 : if (_ptr_aipSecondaries) {
5357 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
5358 : } else {
5359 0 : r->aipSecondaries = NULL;
5360 : }
5361 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
5362 0 : if (_ptr_aipNotify) {
5363 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
5364 : } else {
5365 0 : r->aipNotify = NULL;
5366 : }
5367 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5368 : }
5369 0 : if (ndr_flags & NDR_BUFFERS) {
5370 0 : if (r->aipSecondaries) {
5371 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5372 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
5373 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5374 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
5375 : }
5376 0 : if (r->aipNotify) {
5377 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
5378 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
5379 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5380 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
5381 : }
5382 : }
5383 0 : return NDR_ERR_SUCCESS;
5384 : }
5385 :
5386 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_SECONDARIES_W2K(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_SECONDARIES_W2K *r)
5387 : {
5388 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_SECONDARIES_W2K");
5389 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5390 0 : ndr->depth++;
5391 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
5392 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
5393 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
5394 0 : ndr->depth++;
5395 0 : if (r->aipSecondaries) {
5396 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
5397 : }
5398 0 : ndr->depth--;
5399 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
5400 0 : ndr->depth++;
5401 0 : if (r->aipNotify) {
5402 0 : ndr_print_IP4_ARRAY(ndr, "aipNotify", r->aipNotify);
5403 : }
5404 0 : ndr->depth--;
5405 0 : ndr->depth--;
5406 : }
5407 :
5408 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_SECONDARIES_DOTNET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_SECONDARIES_DOTNET *r)
5409 : {
5410 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5411 0 : if (ndr_flags & NDR_SCALARS) {
5412 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5413 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
5414 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
5415 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
5416 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
5417 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
5418 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
5419 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5420 : }
5421 0 : if (ndr_flags & NDR_BUFFERS) {
5422 0 : if (r->aipSecondaries) {
5423 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5424 : }
5425 0 : if (r->aipNotify) {
5426 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5427 : }
5428 : }
5429 0 : return NDR_ERR_SUCCESS;
5430 : }
5431 :
5432 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_SECONDARIES_DOTNET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_SECONDARIES_DOTNET *r)
5433 : {
5434 0 : uint32_t _ptr_aipSecondaries;
5435 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
5436 0 : uint32_t _ptr_aipNotify;
5437 0 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
5438 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5439 0 : if (ndr_flags & NDR_SCALARS) {
5440 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5441 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
5442 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
5443 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
5444 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
5445 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
5446 0 : if (_ptr_aipSecondaries) {
5447 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
5448 : } else {
5449 0 : r->aipSecondaries = NULL;
5450 : }
5451 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
5452 0 : if (_ptr_aipNotify) {
5453 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
5454 : } else {
5455 0 : r->aipNotify = NULL;
5456 : }
5457 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5458 : }
5459 0 : if (ndr_flags & NDR_BUFFERS) {
5460 0 : if (r->aipSecondaries) {
5461 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5462 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
5463 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5464 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
5465 : }
5466 0 : if (r->aipNotify) {
5467 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
5468 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
5469 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5470 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
5471 : }
5472 : }
5473 0 : return NDR_ERR_SUCCESS;
5474 : }
5475 :
5476 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_SECONDARIES_DOTNET(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_SECONDARIES_DOTNET *r)
5477 : {
5478 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_SECONDARIES_DOTNET");
5479 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5480 0 : ndr->depth++;
5481 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
5482 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
5483 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
5484 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
5485 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
5486 0 : ndr->depth++;
5487 0 : if (r->aipSecondaries) {
5488 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
5489 : }
5490 0 : ndr->depth--;
5491 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
5492 0 : ndr->depth++;
5493 0 : if (r->aipNotify) {
5494 0 : ndr_print_IP4_ARRAY(ndr, "aipNotify", r->aipNotify);
5495 : }
5496 0 : ndr->depth--;
5497 0 : ndr->depth--;
5498 : }
5499 :
5500 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_SECONDARIES_LONGHORN(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *r)
5501 : {
5502 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5503 0 : if (ndr_flags & NDR_SCALARS) {
5504 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5505 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
5506 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
5507 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
5508 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
5509 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
5510 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
5511 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5512 : }
5513 0 : if (ndr_flags & NDR_BUFFERS) {
5514 0 : if (r->aipSecondaries) {
5515 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5516 : }
5517 0 : if (r->aipNotify) {
5518 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5519 : }
5520 : }
5521 0 : return NDR_ERR_SUCCESS;
5522 : }
5523 :
5524 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_SECONDARIES_LONGHORN(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *r)
5525 : {
5526 0 : uint32_t _ptr_aipSecondaries;
5527 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
5528 0 : uint32_t _ptr_aipNotify;
5529 0 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
5530 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5531 0 : if (ndr_flags & NDR_SCALARS) {
5532 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5533 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
5534 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
5535 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
5536 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
5537 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
5538 0 : if (_ptr_aipSecondaries) {
5539 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
5540 : } else {
5541 0 : r->aipSecondaries = NULL;
5542 : }
5543 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
5544 0 : if (_ptr_aipNotify) {
5545 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
5546 : } else {
5547 0 : r->aipNotify = NULL;
5548 : }
5549 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5550 : }
5551 0 : if (ndr_flags & NDR_BUFFERS) {
5552 0 : if (r->aipSecondaries) {
5553 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5554 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
5555 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5556 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
5557 : }
5558 0 : if (r->aipNotify) {
5559 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
5560 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
5561 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5562 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
5563 : }
5564 : }
5565 0 : return NDR_ERR_SUCCESS;
5566 : }
5567 :
5568 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_SECONDARIES_LONGHORN(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *r)
5569 : {
5570 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_SECONDARIES_LONGHORN");
5571 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5572 0 : ndr->depth++;
5573 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
5574 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
5575 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
5576 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
5577 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
5578 0 : ndr->depth++;
5579 0 : if (r->aipSecondaries) {
5580 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
5581 : }
5582 0 : ndr->depth--;
5583 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
5584 0 : ndr->depth++;
5585 0 : if (r->aipNotify) {
5586 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipNotify", r->aipNotify);
5587 : }
5588 0 : ndr->depth--;
5589 0 : ndr->depth--;
5590 : }
5591 :
5592 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_DATABASE_W2K(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_DATABASE_W2K *r)
5593 : {
5594 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5595 0 : if (ndr_flags & NDR_SCALARS) {
5596 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5597 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDsIntegrated));
5598 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszFileName));
5599 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5600 : }
5601 0 : if (ndr_flags & NDR_BUFFERS) {
5602 0 : if (r->pszFileName) {
5603 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszFileName, CH_UTF8)));
5604 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5605 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszFileName, CH_UTF8)));
5606 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszFileName, ndr_charset_length(r->pszFileName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5607 : }
5608 : }
5609 0 : return NDR_ERR_SUCCESS;
5610 : }
5611 :
5612 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_DATABASE_W2K(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_DATABASE_W2K *r)
5613 : {
5614 0 : uint32_t _ptr_pszFileName;
5615 0 : uint32_t size_pszFileName_1 = 0;
5616 0 : uint32_t length_pszFileName_1 = 0;
5617 0 : TALLOC_CTX *_mem_save_pszFileName_0 = NULL;
5618 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5619 0 : if (ndr_flags & NDR_SCALARS) {
5620 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5621 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDsIntegrated));
5622 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFileName));
5623 0 : if (_ptr_pszFileName) {
5624 0 : NDR_PULL_ALLOC(ndr, r->pszFileName);
5625 : } else {
5626 0 : r->pszFileName = NULL;
5627 : }
5628 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5629 : }
5630 0 : if (ndr_flags & NDR_BUFFERS) {
5631 0 : if (r->pszFileName) {
5632 0 : _mem_save_pszFileName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5633 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszFileName, 0);
5634 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszFileName));
5635 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszFileName));
5636 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszFileName, &size_pszFileName_1));
5637 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszFileName, &length_pszFileName_1));
5638 0 : if (length_pszFileName_1 > size_pszFileName_1) {
5639 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszFileName_1, length_pszFileName_1);
5640 : }
5641 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFileName_1, sizeof(uint8_t)));
5642 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszFileName, length_pszFileName_1, sizeof(uint8_t), CH_UTF8));
5643 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFileName_0, 0);
5644 : }
5645 : }
5646 0 : return NDR_ERR_SUCCESS;
5647 : }
5648 :
5649 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_DATABASE_W2K(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_DATABASE_W2K *r)
5650 : {
5651 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_DATABASE_W2K");
5652 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5653 0 : ndr->depth++;
5654 0 : ndr_print_uint32(ndr, "fDsIntegrated", r->fDsIntegrated);
5655 0 : ndr_print_ptr(ndr, "pszFileName", r->pszFileName);
5656 0 : ndr->depth++;
5657 0 : if (r->pszFileName) {
5658 0 : ndr_print_string(ndr, "pszFileName", r->pszFileName);
5659 : }
5660 0 : ndr->depth--;
5661 0 : ndr->depth--;
5662 : }
5663 :
5664 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_DATABASE_DOTNET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_DATABASE_DOTNET *r)
5665 : {
5666 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5667 0 : if (ndr_flags & NDR_SCALARS) {
5668 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5669 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
5670 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
5671 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDsIntegrated));
5672 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszFileName));
5673 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5674 : }
5675 0 : if (ndr_flags & NDR_BUFFERS) {
5676 0 : if (r->pszFileName) {
5677 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszFileName, CH_UTF8)));
5678 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5679 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszFileName, CH_UTF8)));
5680 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszFileName, ndr_charset_length(r->pszFileName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5681 : }
5682 : }
5683 0 : return NDR_ERR_SUCCESS;
5684 : }
5685 :
5686 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_DATABASE_DOTNET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_DATABASE_DOTNET *r)
5687 : {
5688 0 : uint32_t _ptr_pszFileName;
5689 0 : uint32_t size_pszFileName_1 = 0;
5690 0 : uint32_t length_pszFileName_1 = 0;
5691 0 : TALLOC_CTX *_mem_save_pszFileName_0 = NULL;
5692 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5693 0 : if (ndr_flags & NDR_SCALARS) {
5694 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5695 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
5696 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
5697 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDsIntegrated));
5698 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFileName));
5699 0 : if (_ptr_pszFileName) {
5700 0 : NDR_PULL_ALLOC(ndr, r->pszFileName);
5701 : } else {
5702 0 : r->pszFileName = NULL;
5703 : }
5704 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5705 : }
5706 0 : if (ndr_flags & NDR_BUFFERS) {
5707 0 : if (r->pszFileName) {
5708 0 : _mem_save_pszFileName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5709 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszFileName, 0);
5710 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszFileName));
5711 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszFileName));
5712 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszFileName, &size_pszFileName_1));
5713 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszFileName, &length_pszFileName_1));
5714 0 : if (length_pszFileName_1 > size_pszFileName_1) {
5715 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszFileName_1, length_pszFileName_1);
5716 : }
5717 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFileName_1, sizeof(uint8_t)));
5718 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszFileName, length_pszFileName_1, sizeof(uint8_t), CH_UTF8));
5719 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFileName_0, 0);
5720 : }
5721 : }
5722 0 : return NDR_ERR_SUCCESS;
5723 : }
5724 :
5725 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_DATABASE_DOTNET(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_DATABASE_DOTNET *r)
5726 : {
5727 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_DATABASE_DOTNET");
5728 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5729 0 : ndr->depth++;
5730 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
5731 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
5732 0 : ndr_print_uint32(ndr, "fDsIntegrated", r->fDsIntegrated);
5733 0 : ndr_print_ptr(ndr, "pszFileName", r->pszFileName);
5734 0 : ndr->depth++;
5735 0 : if (r->pszFileName) {
5736 0 : ndr_print_string(ndr, "pszFileName", r->pszFileName);
5737 : }
5738 0 : ndr->depth--;
5739 0 : ndr->depth--;
5740 : }
5741 :
5742 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_CREATE_INFO_W2K(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_CREATE_INFO_W2K *r)
5743 : {
5744 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5745 0 : if (ndr_flags & NDR_SCALARS) {
5746 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5747 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
5748 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
5749 0 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
5750 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
5751 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
5752 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
5753 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDsIntegrated));
5754 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fLoadExisting));
5755 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszAdmin));
5756 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
5757 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
5758 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
5759 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
5760 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved1));
5761 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved2));
5762 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved3));
5763 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved4));
5764 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved5));
5765 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved6));
5766 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved7));
5767 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved8));
5768 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved1));
5769 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved2));
5770 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved3));
5771 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved4));
5772 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved5));
5773 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved6));
5774 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved7));
5775 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved8));
5776 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5777 : }
5778 0 : if (ndr_flags & NDR_BUFFERS) {
5779 0 : if (r->pszZoneName) {
5780 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
5781 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5782 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
5783 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5784 : }
5785 0 : if (r->pszDataFile) {
5786 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
5787 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5788 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
5789 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5790 : }
5791 0 : if (r->pszAdmin) {
5792 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
5793 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5794 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
5795 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszAdmin, ndr_charset_length(r->pszAdmin, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5796 : }
5797 0 : if (r->aipMasters) {
5798 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
5799 : }
5800 0 : if (r->aipSecondaries) {
5801 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5802 : }
5803 0 : if (r->pvReserved1) {
5804 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved1, CH_UTF8)));
5805 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5806 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved1, CH_UTF8)));
5807 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved1, ndr_charset_length(r->pvReserved1, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5808 : }
5809 0 : if (r->pvReserved2) {
5810 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved2, CH_UTF8)));
5811 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5812 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved2, CH_UTF8)));
5813 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved2, ndr_charset_length(r->pvReserved2, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5814 : }
5815 0 : if (r->pvReserved3) {
5816 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved3, CH_UTF8)));
5817 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5818 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved3, CH_UTF8)));
5819 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved3, ndr_charset_length(r->pvReserved3, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5820 : }
5821 0 : if (r->pvReserved4) {
5822 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved4, CH_UTF8)));
5823 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5824 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved4, CH_UTF8)));
5825 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved4, ndr_charset_length(r->pvReserved4, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5826 : }
5827 0 : if (r->pvReserved5) {
5828 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved5, CH_UTF8)));
5829 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5830 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved5, CH_UTF8)));
5831 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved5, ndr_charset_length(r->pvReserved5, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5832 : }
5833 0 : if (r->pvReserved6) {
5834 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved6, CH_UTF8)));
5835 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5836 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved6, CH_UTF8)));
5837 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved6, ndr_charset_length(r->pvReserved6, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5838 : }
5839 0 : if (r->pvReserved7) {
5840 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved7, CH_UTF8)));
5841 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5842 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved7, CH_UTF8)));
5843 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved7, ndr_charset_length(r->pvReserved7, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5844 : }
5845 0 : if (r->pvReserved8) {
5846 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved8, CH_UTF8)));
5847 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5848 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved8, CH_UTF8)));
5849 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved8, ndr_charset_length(r->pvReserved8, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5850 : }
5851 : }
5852 0 : return NDR_ERR_SUCCESS;
5853 : }
5854 :
5855 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_CREATE_INFO_W2K(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_CREATE_INFO_W2K *r)
5856 : {
5857 0 : uint32_t _ptr_pszZoneName;
5858 0 : uint32_t size_pszZoneName_1 = 0;
5859 0 : uint32_t length_pszZoneName_1 = 0;
5860 0 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
5861 0 : uint32_t _ptr_pszDataFile;
5862 0 : uint32_t size_pszDataFile_1 = 0;
5863 0 : uint32_t length_pszDataFile_1 = 0;
5864 0 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
5865 0 : uint32_t _ptr_pszAdmin;
5866 0 : uint32_t size_pszAdmin_1 = 0;
5867 0 : uint32_t length_pszAdmin_1 = 0;
5868 0 : TALLOC_CTX *_mem_save_pszAdmin_0 = NULL;
5869 0 : uint32_t _ptr_aipMasters;
5870 0 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
5871 0 : uint32_t _ptr_aipSecondaries;
5872 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
5873 0 : uint32_t _ptr_pvReserved1;
5874 0 : uint32_t size_pvReserved1_1 = 0;
5875 0 : uint32_t length_pvReserved1_1 = 0;
5876 0 : TALLOC_CTX *_mem_save_pvReserved1_0 = NULL;
5877 0 : uint32_t _ptr_pvReserved2;
5878 0 : uint32_t size_pvReserved2_1 = 0;
5879 0 : uint32_t length_pvReserved2_1 = 0;
5880 0 : TALLOC_CTX *_mem_save_pvReserved2_0 = NULL;
5881 0 : uint32_t _ptr_pvReserved3;
5882 0 : uint32_t size_pvReserved3_1 = 0;
5883 0 : uint32_t length_pvReserved3_1 = 0;
5884 0 : TALLOC_CTX *_mem_save_pvReserved3_0 = NULL;
5885 0 : uint32_t _ptr_pvReserved4;
5886 0 : uint32_t size_pvReserved4_1 = 0;
5887 0 : uint32_t length_pvReserved4_1 = 0;
5888 0 : TALLOC_CTX *_mem_save_pvReserved4_0 = NULL;
5889 0 : uint32_t _ptr_pvReserved5;
5890 0 : uint32_t size_pvReserved5_1 = 0;
5891 0 : uint32_t length_pvReserved5_1 = 0;
5892 0 : TALLOC_CTX *_mem_save_pvReserved5_0 = NULL;
5893 0 : uint32_t _ptr_pvReserved6;
5894 0 : uint32_t size_pvReserved6_1 = 0;
5895 0 : uint32_t length_pvReserved6_1 = 0;
5896 0 : TALLOC_CTX *_mem_save_pvReserved6_0 = NULL;
5897 0 : uint32_t _ptr_pvReserved7;
5898 0 : uint32_t size_pvReserved7_1 = 0;
5899 0 : uint32_t length_pvReserved7_1 = 0;
5900 0 : TALLOC_CTX *_mem_save_pvReserved7_0 = NULL;
5901 0 : uint32_t _ptr_pvReserved8;
5902 0 : uint32_t size_pvReserved8_1 = 0;
5903 0 : uint32_t length_pvReserved8_1 = 0;
5904 0 : TALLOC_CTX *_mem_save_pvReserved8_0 = NULL;
5905 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5906 0 : if (ndr_flags & NDR_SCALARS) {
5907 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5908 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
5909 0 : if (_ptr_pszZoneName) {
5910 0 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
5911 : } else {
5912 0 : r->pszZoneName = NULL;
5913 : }
5914 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
5915 0 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
5916 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
5917 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
5918 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
5919 0 : if (_ptr_pszDataFile) {
5920 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
5921 : } else {
5922 0 : r->pszDataFile = NULL;
5923 : }
5924 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDsIntegrated));
5925 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fLoadExisting));
5926 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszAdmin));
5927 0 : if (_ptr_pszAdmin) {
5928 0 : NDR_PULL_ALLOC(ndr, r->pszAdmin);
5929 : } else {
5930 0 : r->pszAdmin = NULL;
5931 : }
5932 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
5933 0 : if (_ptr_aipMasters) {
5934 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
5935 : } else {
5936 0 : r->aipMasters = NULL;
5937 : }
5938 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
5939 0 : if (_ptr_aipSecondaries) {
5940 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
5941 : } else {
5942 0 : r->aipSecondaries = NULL;
5943 : }
5944 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
5945 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
5946 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved1));
5947 0 : if (_ptr_pvReserved1) {
5948 0 : NDR_PULL_ALLOC(ndr, r->pvReserved1);
5949 : } else {
5950 0 : r->pvReserved1 = NULL;
5951 : }
5952 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved2));
5953 0 : if (_ptr_pvReserved2) {
5954 0 : NDR_PULL_ALLOC(ndr, r->pvReserved2);
5955 : } else {
5956 0 : r->pvReserved2 = NULL;
5957 : }
5958 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved3));
5959 0 : if (_ptr_pvReserved3) {
5960 0 : NDR_PULL_ALLOC(ndr, r->pvReserved3);
5961 : } else {
5962 0 : r->pvReserved3 = NULL;
5963 : }
5964 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved4));
5965 0 : if (_ptr_pvReserved4) {
5966 0 : NDR_PULL_ALLOC(ndr, r->pvReserved4);
5967 : } else {
5968 0 : r->pvReserved4 = NULL;
5969 : }
5970 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved5));
5971 0 : if (_ptr_pvReserved5) {
5972 0 : NDR_PULL_ALLOC(ndr, r->pvReserved5);
5973 : } else {
5974 0 : r->pvReserved5 = NULL;
5975 : }
5976 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved6));
5977 0 : if (_ptr_pvReserved6) {
5978 0 : NDR_PULL_ALLOC(ndr, r->pvReserved6);
5979 : } else {
5980 0 : r->pvReserved6 = NULL;
5981 : }
5982 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved7));
5983 0 : if (_ptr_pvReserved7) {
5984 0 : NDR_PULL_ALLOC(ndr, r->pvReserved7);
5985 : } else {
5986 0 : r->pvReserved7 = NULL;
5987 : }
5988 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved8));
5989 0 : if (_ptr_pvReserved8) {
5990 0 : NDR_PULL_ALLOC(ndr, r->pvReserved8);
5991 : } else {
5992 0 : r->pvReserved8 = NULL;
5993 : }
5994 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved1));
5995 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved2));
5996 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved3));
5997 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved4));
5998 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved5));
5999 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved6));
6000 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved7));
6001 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved8));
6002 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6003 : }
6004 0 : if (ndr_flags & NDR_BUFFERS) {
6005 0 : if (r->pszZoneName) {
6006 0 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6007 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
6008 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
6009 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
6010 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
6011 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
6012 0 : if (length_pszZoneName_1 > size_pszZoneName_1) {
6013 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZoneName_1, length_pszZoneName_1);
6014 : }
6015 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
6016 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
6017 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
6018 : }
6019 0 : if (r->pszDataFile) {
6020 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
6021 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
6022 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
6023 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
6024 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
6025 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
6026 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
6027 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDataFile_1, length_pszDataFile_1);
6028 : }
6029 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
6030 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
6031 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
6032 : }
6033 0 : if (r->pszAdmin) {
6034 0 : _mem_save_pszAdmin_0 = NDR_PULL_GET_MEM_CTX(ndr);
6035 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszAdmin, 0);
6036 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszAdmin));
6037 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszAdmin));
6038 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszAdmin, &size_pszAdmin_1));
6039 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszAdmin, &length_pszAdmin_1));
6040 0 : if (length_pszAdmin_1 > size_pszAdmin_1) {
6041 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszAdmin_1, length_pszAdmin_1);
6042 : }
6043 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszAdmin_1, sizeof(uint8_t)));
6044 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszAdmin, length_pszAdmin_1, sizeof(uint8_t), CH_UTF8));
6045 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszAdmin_0, 0);
6046 : }
6047 0 : if (r->aipMasters) {
6048 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
6049 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
6050 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
6051 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
6052 : }
6053 0 : if (r->aipSecondaries) {
6054 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6055 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
6056 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
6057 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
6058 : }
6059 0 : if (r->pvReserved1) {
6060 0 : _mem_save_pvReserved1_0 = NDR_PULL_GET_MEM_CTX(ndr);
6061 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved1, 0);
6062 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved1));
6063 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved1));
6064 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved1, &size_pvReserved1_1));
6065 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved1, &length_pvReserved1_1));
6066 0 : if (length_pvReserved1_1 > size_pvReserved1_1) {
6067 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pvReserved1_1, length_pvReserved1_1);
6068 : }
6069 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved1_1, sizeof(uint8_t)));
6070 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved1, length_pvReserved1_1, sizeof(uint8_t), CH_UTF8));
6071 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved1_0, 0);
6072 : }
6073 0 : if (r->pvReserved2) {
6074 0 : _mem_save_pvReserved2_0 = NDR_PULL_GET_MEM_CTX(ndr);
6075 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved2, 0);
6076 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved2));
6077 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved2));
6078 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved2, &size_pvReserved2_1));
6079 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved2, &length_pvReserved2_1));
6080 0 : if (length_pvReserved2_1 > size_pvReserved2_1) {
6081 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pvReserved2_1, length_pvReserved2_1);
6082 : }
6083 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved2_1, sizeof(uint8_t)));
6084 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved2, length_pvReserved2_1, sizeof(uint8_t), CH_UTF8));
6085 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved2_0, 0);
6086 : }
6087 0 : if (r->pvReserved3) {
6088 0 : _mem_save_pvReserved3_0 = NDR_PULL_GET_MEM_CTX(ndr);
6089 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved3, 0);
6090 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved3));
6091 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved3));
6092 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved3, &size_pvReserved3_1));
6093 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved3, &length_pvReserved3_1));
6094 0 : if (length_pvReserved3_1 > size_pvReserved3_1) {
6095 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pvReserved3_1, length_pvReserved3_1);
6096 : }
6097 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved3_1, sizeof(uint8_t)));
6098 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved3, length_pvReserved3_1, sizeof(uint8_t), CH_UTF8));
6099 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved3_0, 0);
6100 : }
6101 0 : if (r->pvReserved4) {
6102 0 : _mem_save_pvReserved4_0 = NDR_PULL_GET_MEM_CTX(ndr);
6103 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved4, 0);
6104 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved4));
6105 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved4));
6106 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved4, &size_pvReserved4_1));
6107 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved4, &length_pvReserved4_1));
6108 0 : if (length_pvReserved4_1 > size_pvReserved4_1) {
6109 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pvReserved4_1, length_pvReserved4_1);
6110 : }
6111 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved4_1, sizeof(uint8_t)));
6112 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved4, length_pvReserved4_1, sizeof(uint8_t), CH_UTF8));
6113 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved4_0, 0);
6114 : }
6115 0 : if (r->pvReserved5) {
6116 0 : _mem_save_pvReserved5_0 = NDR_PULL_GET_MEM_CTX(ndr);
6117 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved5, 0);
6118 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved5));
6119 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved5));
6120 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved5, &size_pvReserved5_1));
6121 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved5, &length_pvReserved5_1));
6122 0 : if (length_pvReserved5_1 > size_pvReserved5_1) {
6123 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pvReserved5_1, length_pvReserved5_1);
6124 : }
6125 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved5_1, sizeof(uint8_t)));
6126 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved5, length_pvReserved5_1, sizeof(uint8_t), CH_UTF8));
6127 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved5_0, 0);
6128 : }
6129 0 : if (r->pvReserved6) {
6130 0 : _mem_save_pvReserved6_0 = NDR_PULL_GET_MEM_CTX(ndr);
6131 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved6, 0);
6132 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved6));
6133 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved6));
6134 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved6, &size_pvReserved6_1));
6135 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved6, &length_pvReserved6_1));
6136 0 : if (length_pvReserved6_1 > size_pvReserved6_1) {
6137 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pvReserved6_1, length_pvReserved6_1);
6138 : }
6139 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved6_1, sizeof(uint8_t)));
6140 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved6, length_pvReserved6_1, sizeof(uint8_t), CH_UTF8));
6141 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved6_0, 0);
6142 : }
6143 0 : if (r->pvReserved7) {
6144 0 : _mem_save_pvReserved7_0 = NDR_PULL_GET_MEM_CTX(ndr);
6145 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved7, 0);
6146 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved7));
6147 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved7));
6148 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved7, &size_pvReserved7_1));
6149 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved7, &length_pvReserved7_1));
6150 0 : if (length_pvReserved7_1 > size_pvReserved7_1) {
6151 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pvReserved7_1, length_pvReserved7_1);
6152 : }
6153 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved7_1, sizeof(uint8_t)));
6154 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved7, length_pvReserved7_1, sizeof(uint8_t), CH_UTF8));
6155 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved7_0, 0);
6156 : }
6157 0 : if (r->pvReserved8) {
6158 0 : _mem_save_pvReserved8_0 = NDR_PULL_GET_MEM_CTX(ndr);
6159 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved8, 0);
6160 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved8));
6161 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved8));
6162 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved8, &size_pvReserved8_1));
6163 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved8, &length_pvReserved8_1));
6164 0 : if (length_pvReserved8_1 > size_pvReserved8_1) {
6165 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pvReserved8_1, length_pvReserved8_1);
6166 : }
6167 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved8_1, sizeof(uint8_t)));
6168 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved8, length_pvReserved8_1, sizeof(uint8_t), CH_UTF8));
6169 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved8_0, 0);
6170 : }
6171 : }
6172 0 : return NDR_ERR_SUCCESS;
6173 : }
6174 :
6175 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_CREATE_INFO_W2K(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_CREATE_INFO_W2K *r)
6176 : {
6177 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_CREATE_INFO_W2K");
6178 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6179 0 : ndr->depth++;
6180 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
6181 0 : ndr->depth++;
6182 0 : if (r->pszZoneName) {
6183 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
6184 : }
6185 0 : ndr->depth--;
6186 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
6187 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
6188 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
6189 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
6190 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
6191 0 : ndr->depth++;
6192 0 : if (r->pszDataFile) {
6193 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
6194 : }
6195 0 : ndr->depth--;
6196 0 : ndr_print_uint32(ndr, "fDsIntegrated", r->fDsIntegrated);
6197 0 : ndr_print_uint32(ndr, "fLoadExisting", r->fLoadExisting);
6198 0 : ndr_print_ptr(ndr, "pszAdmin", r->pszAdmin);
6199 0 : ndr->depth++;
6200 0 : if (r->pszAdmin) {
6201 0 : ndr_print_string(ndr, "pszAdmin", r->pszAdmin);
6202 : }
6203 0 : ndr->depth--;
6204 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
6205 0 : ndr->depth++;
6206 0 : if (r->aipMasters) {
6207 0 : ndr_print_IP4_ARRAY(ndr, "aipMasters", r->aipMasters);
6208 : }
6209 0 : ndr->depth--;
6210 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
6211 0 : ndr->depth++;
6212 0 : if (r->aipSecondaries) {
6213 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
6214 : }
6215 0 : ndr->depth--;
6216 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
6217 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
6218 0 : ndr_print_ptr(ndr, "pvReserved1", r->pvReserved1);
6219 0 : ndr->depth++;
6220 0 : if (r->pvReserved1) {
6221 0 : ndr_print_string(ndr, "pvReserved1", r->pvReserved1);
6222 : }
6223 0 : ndr->depth--;
6224 0 : ndr_print_ptr(ndr, "pvReserved2", r->pvReserved2);
6225 0 : ndr->depth++;
6226 0 : if (r->pvReserved2) {
6227 0 : ndr_print_string(ndr, "pvReserved2", r->pvReserved2);
6228 : }
6229 0 : ndr->depth--;
6230 0 : ndr_print_ptr(ndr, "pvReserved3", r->pvReserved3);
6231 0 : ndr->depth++;
6232 0 : if (r->pvReserved3) {
6233 0 : ndr_print_string(ndr, "pvReserved3", r->pvReserved3);
6234 : }
6235 0 : ndr->depth--;
6236 0 : ndr_print_ptr(ndr, "pvReserved4", r->pvReserved4);
6237 0 : ndr->depth++;
6238 0 : if (r->pvReserved4) {
6239 0 : ndr_print_string(ndr, "pvReserved4", r->pvReserved4);
6240 : }
6241 0 : ndr->depth--;
6242 0 : ndr_print_ptr(ndr, "pvReserved5", r->pvReserved5);
6243 0 : ndr->depth++;
6244 0 : if (r->pvReserved5) {
6245 0 : ndr_print_string(ndr, "pvReserved5", r->pvReserved5);
6246 : }
6247 0 : ndr->depth--;
6248 0 : ndr_print_ptr(ndr, "pvReserved6", r->pvReserved6);
6249 0 : ndr->depth++;
6250 0 : if (r->pvReserved6) {
6251 0 : ndr_print_string(ndr, "pvReserved6", r->pvReserved6);
6252 : }
6253 0 : ndr->depth--;
6254 0 : ndr_print_ptr(ndr, "pvReserved7", r->pvReserved7);
6255 0 : ndr->depth++;
6256 0 : if (r->pvReserved7) {
6257 0 : ndr_print_string(ndr, "pvReserved7", r->pvReserved7);
6258 : }
6259 0 : ndr->depth--;
6260 0 : ndr_print_ptr(ndr, "pvReserved8", r->pvReserved8);
6261 0 : ndr->depth++;
6262 0 : if (r->pvReserved8) {
6263 0 : ndr_print_string(ndr, "pvReserved8", r->pvReserved8);
6264 : }
6265 0 : ndr->depth--;
6266 0 : ndr_print_uint32(ndr, "dwReserved1", r->dwReserved1);
6267 0 : ndr_print_uint32(ndr, "dwReserved2", r->dwReserved2);
6268 0 : ndr_print_uint32(ndr, "dwReserved3", r->dwReserved3);
6269 0 : ndr_print_uint32(ndr, "dwReserved4", r->dwReserved4);
6270 0 : ndr_print_uint32(ndr, "dwReserved5", r->dwReserved5);
6271 0 : ndr_print_uint32(ndr, "dwReserved6", r->dwReserved6);
6272 0 : ndr_print_uint32(ndr, "dwReserved7", r->dwReserved7);
6273 0 : ndr_print_uint32(ndr, "dwReserved8", r->dwReserved8);
6274 0 : ndr->depth--;
6275 : }
6276 :
6277 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_CREATE_INFO_DOTNET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *r)
6278 : {
6279 0 : uint32_t cntr_dwReserved_0;
6280 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6281 0 : if (ndr_flags & NDR_SCALARS) {
6282 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6283 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
6284 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
6285 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
6286 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
6287 0 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
6288 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
6289 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
6290 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
6291 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDsIntegrated));
6292 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fLoadExisting));
6293 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszAdmin));
6294 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
6295 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
6296 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
6297 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
6298 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwTimeout));
6299 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
6300 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDpFlags));
6301 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
6302 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (32); cntr_dwReserved_0++) {
6303 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved[cntr_dwReserved_0]));
6304 : }
6305 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6306 : }
6307 0 : if (ndr_flags & NDR_BUFFERS) {
6308 0 : if (r->pszZoneName) {
6309 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
6310 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6311 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
6312 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6313 : }
6314 0 : if (r->pszDataFile) {
6315 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
6316 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6317 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
6318 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6319 : }
6320 0 : if (r->pszAdmin) {
6321 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
6322 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6323 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
6324 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszAdmin, ndr_charset_length(r->pszAdmin, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6325 : }
6326 0 : if (r->aipMasters) {
6327 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
6328 : }
6329 0 : if (r->aipSecondaries) {
6330 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
6331 : }
6332 0 : if (r->pszDpFqdn) {
6333 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
6334 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6335 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
6336 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6337 : }
6338 : }
6339 0 : return NDR_ERR_SUCCESS;
6340 : }
6341 :
6342 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_CREATE_INFO_DOTNET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *r)
6343 : {
6344 0 : uint32_t _ptr_pszZoneName;
6345 0 : uint32_t size_pszZoneName_1 = 0;
6346 0 : uint32_t length_pszZoneName_1 = 0;
6347 0 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
6348 0 : uint32_t _ptr_pszDataFile;
6349 0 : uint32_t size_pszDataFile_1 = 0;
6350 0 : uint32_t length_pszDataFile_1 = 0;
6351 0 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
6352 0 : uint32_t _ptr_pszAdmin;
6353 0 : uint32_t size_pszAdmin_1 = 0;
6354 0 : uint32_t length_pszAdmin_1 = 0;
6355 0 : TALLOC_CTX *_mem_save_pszAdmin_0 = NULL;
6356 0 : uint32_t _ptr_aipMasters;
6357 0 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
6358 0 : uint32_t _ptr_aipSecondaries;
6359 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
6360 0 : uint32_t _ptr_pszDpFqdn;
6361 0 : uint32_t size_pszDpFqdn_1 = 0;
6362 0 : uint32_t length_pszDpFqdn_1 = 0;
6363 0 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
6364 0 : uint32_t size_dwReserved_0 = 0;
6365 0 : uint32_t cntr_dwReserved_0;
6366 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6367 0 : if (ndr_flags & NDR_SCALARS) {
6368 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6369 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
6370 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
6371 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
6372 0 : if (_ptr_pszZoneName) {
6373 0 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
6374 : } else {
6375 0 : r->pszZoneName = NULL;
6376 : }
6377 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
6378 0 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
6379 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
6380 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
6381 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
6382 0 : if (_ptr_pszDataFile) {
6383 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
6384 : } else {
6385 0 : r->pszDataFile = NULL;
6386 : }
6387 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDsIntegrated));
6388 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fLoadExisting));
6389 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszAdmin));
6390 0 : if (_ptr_pszAdmin) {
6391 0 : NDR_PULL_ALLOC(ndr, r->pszAdmin);
6392 : } else {
6393 0 : r->pszAdmin = NULL;
6394 : }
6395 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
6396 0 : if (_ptr_aipMasters) {
6397 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
6398 : } else {
6399 0 : r->aipMasters = NULL;
6400 : }
6401 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
6402 0 : if (_ptr_aipSecondaries) {
6403 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
6404 : } else {
6405 0 : r->aipSecondaries = NULL;
6406 : }
6407 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
6408 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
6409 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwTimeout));
6410 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
6411 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDpFlags));
6412 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
6413 0 : if (_ptr_pszDpFqdn) {
6414 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
6415 : } else {
6416 0 : r->pszDpFqdn = NULL;
6417 : }
6418 0 : size_dwReserved_0 = 32;
6419 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (size_dwReserved_0); cntr_dwReserved_0++) {
6420 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved[cntr_dwReserved_0]));
6421 : }
6422 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6423 : }
6424 0 : if (ndr_flags & NDR_BUFFERS) {
6425 0 : if (r->pszZoneName) {
6426 0 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6427 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
6428 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
6429 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
6430 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
6431 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
6432 0 : if (length_pszZoneName_1 > size_pszZoneName_1) {
6433 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZoneName_1, length_pszZoneName_1);
6434 : }
6435 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
6436 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
6437 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
6438 : }
6439 0 : if (r->pszDataFile) {
6440 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
6441 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
6442 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
6443 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
6444 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
6445 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
6446 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
6447 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDataFile_1, length_pszDataFile_1);
6448 : }
6449 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
6450 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
6451 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
6452 : }
6453 0 : if (r->pszAdmin) {
6454 0 : _mem_save_pszAdmin_0 = NDR_PULL_GET_MEM_CTX(ndr);
6455 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszAdmin, 0);
6456 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszAdmin));
6457 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszAdmin));
6458 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszAdmin, &size_pszAdmin_1));
6459 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszAdmin, &length_pszAdmin_1));
6460 0 : if (length_pszAdmin_1 > size_pszAdmin_1) {
6461 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszAdmin_1, length_pszAdmin_1);
6462 : }
6463 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszAdmin_1, sizeof(uint8_t)));
6464 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszAdmin, length_pszAdmin_1, sizeof(uint8_t), CH_UTF8));
6465 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszAdmin_0, 0);
6466 : }
6467 0 : if (r->aipMasters) {
6468 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
6469 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
6470 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
6471 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
6472 : }
6473 0 : if (r->aipSecondaries) {
6474 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6475 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
6476 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
6477 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
6478 : }
6479 0 : if (r->pszDpFqdn) {
6480 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
6481 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
6482 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
6483 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
6484 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
6485 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
6486 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
6487 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDpFqdn_1, length_pszDpFqdn_1);
6488 : }
6489 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
6490 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
6491 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
6492 : }
6493 : }
6494 0 : return NDR_ERR_SUCCESS;
6495 : }
6496 :
6497 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_CREATE_INFO_DOTNET(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *r)
6498 : {
6499 0 : uint32_t cntr_dwReserved_0;
6500 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_CREATE_INFO_DOTNET");
6501 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6502 0 : ndr->depth++;
6503 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
6504 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
6505 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
6506 0 : ndr->depth++;
6507 0 : if (r->pszZoneName) {
6508 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
6509 : }
6510 0 : ndr->depth--;
6511 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
6512 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
6513 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
6514 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
6515 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
6516 0 : ndr->depth++;
6517 0 : if (r->pszDataFile) {
6518 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
6519 : }
6520 0 : ndr->depth--;
6521 0 : ndr_print_uint32(ndr, "fDsIntegrated", r->fDsIntegrated);
6522 0 : ndr_print_uint32(ndr, "fLoadExisting", r->fLoadExisting);
6523 0 : ndr_print_ptr(ndr, "pszAdmin", r->pszAdmin);
6524 0 : ndr->depth++;
6525 0 : if (r->pszAdmin) {
6526 0 : ndr_print_string(ndr, "pszAdmin", r->pszAdmin);
6527 : }
6528 0 : ndr->depth--;
6529 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
6530 0 : ndr->depth++;
6531 0 : if (r->aipMasters) {
6532 0 : ndr_print_IP4_ARRAY(ndr, "aipMasters", r->aipMasters);
6533 : }
6534 0 : ndr->depth--;
6535 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
6536 0 : ndr->depth++;
6537 0 : if (r->aipSecondaries) {
6538 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
6539 : }
6540 0 : ndr->depth--;
6541 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
6542 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
6543 0 : ndr_print_uint32(ndr, "dwTimeout", r->dwTimeout);
6544 0 : ndr_print_uint32(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
6545 0 : ndr_print_uint32(ndr, "dwDpFlags", r->dwDpFlags);
6546 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
6547 0 : ndr->depth++;
6548 0 : if (r->pszDpFqdn) {
6549 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
6550 : }
6551 0 : ndr->depth--;
6552 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "dwReserved", (uint32_t)(32));
6553 0 : ndr->depth++;
6554 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (32); cntr_dwReserved_0++) {
6555 0 : ndr_print_uint32(ndr, "dwReserved", r->dwReserved[cntr_dwReserved_0]);
6556 : }
6557 0 : ndr->depth--;
6558 0 : ndr->depth--;
6559 : }
6560 :
6561 427 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *r)
6562 : {
6563 0 : uint32_t cntr_dwReserved_0;
6564 427 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6565 427 : if (ndr_flags & NDR_SCALARS) {
6566 427 : NDR_CHECK(ndr_push_align(ndr, 5));
6567 427 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
6568 427 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
6569 427 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
6570 427 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
6571 427 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
6572 427 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
6573 427 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
6574 427 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
6575 427 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDsIntegrated));
6576 427 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fLoadExisting));
6577 427 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszAdmin));
6578 427 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
6579 427 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
6580 427 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
6581 427 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
6582 427 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwTimeout));
6583 427 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
6584 427 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDpFlags));
6585 427 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
6586 14091 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (32); cntr_dwReserved_0++) {
6587 13664 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved[cntr_dwReserved_0]));
6588 : }
6589 427 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6590 : }
6591 427 : if (ndr_flags & NDR_BUFFERS) {
6592 427 : if (r->pszZoneName) {
6593 427 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
6594 427 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6595 427 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
6596 427 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6597 : }
6598 427 : if (r->pszDataFile) {
6599 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
6600 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6601 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
6602 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6603 : }
6604 427 : if (r->pszAdmin) {
6605 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
6606 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6607 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
6608 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszAdmin, ndr_charset_length(r->pszAdmin, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6609 : }
6610 427 : if (r->aipMasters) {
6611 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
6612 : }
6613 427 : if (r->aipSecondaries) {
6614 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
6615 : }
6616 427 : if (r->pszDpFqdn) {
6617 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
6618 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6619 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
6620 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6621 : }
6622 : }
6623 427 : return NDR_ERR_SUCCESS;
6624 : }
6625 :
6626 427 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *r)
6627 : {
6628 0 : uint32_t _ptr_pszZoneName;
6629 427 : uint32_t size_pszZoneName_1 = 0;
6630 427 : uint32_t length_pszZoneName_1 = 0;
6631 427 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
6632 0 : uint32_t _ptr_pszDataFile;
6633 427 : uint32_t size_pszDataFile_1 = 0;
6634 427 : uint32_t length_pszDataFile_1 = 0;
6635 427 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
6636 0 : uint32_t _ptr_pszAdmin;
6637 427 : uint32_t size_pszAdmin_1 = 0;
6638 427 : uint32_t length_pszAdmin_1 = 0;
6639 427 : TALLOC_CTX *_mem_save_pszAdmin_0 = NULL;
6640 0 : uint32_t _ptr_aipMasters;
6641 427 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
6642 0 : uint32_t _ptr_aipSecondaries;
6643 427 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
6644 0 : uint32_t _ptr_pszDpFqdn;
6645 427 : uint32_t size_pszDpFqdn_1 = 0;
6646 427 : uint32_t length_pszDpFqdn_1 = 0;
6647 427 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
6648 427 : uint32_t size_dwReserved_0 = 0;
6649 0 : uint32_t cntr_dwReserved_0;
6650 427 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6651 427 : if (ndr_flags & NDR_SCALARS) {
6652 427 : NDR_CHECK(ndr_pull_align(ndr, 5));
6653 427 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
6654 427 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
6655 427 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
6656 427 : if (_ptr_pszZoneName) {
6657 427 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
6658 : } else {
6659 0 : r->pszZoneName = NULL;
6660 : }
6661 427 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
6662 427 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
6663 427 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
6664 427 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
6665 427 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
6666 427 : if (_ptr_pszDataFile) {
6667 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
6668 : } else {
6669 427 : r->pszDataFile = NULL;
6670 : }
6671 427 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDsIntegrated));
6672 427 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fLoadExisting));
6673 427 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszAdmin));
6674 427 : if (_ptr_pszAdmin) {
6675 0 : NDR_PULL_ALLOC(ndr, r->pszAdmin);
6676 : } else {
6677 427 : r->pszAdmin = NULL;
6678 : }
6679 427 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
6680 427 : if (_ptr_aipMasters) {
6681 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
6682 : } else {
6683 427 : r->aipMasters = NULL;
6684 : }
6685 427 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
6686 427 : if (_ptr_aipSecondaries) {
6687 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
6688 : } else {
6689 427 : r->aipSecondaries = NULL;
6690 : }
6691 427 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
6692 427 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
6693 427 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwTimeout));
6694 427 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
6695 427 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDpFlags));
6696 427 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
6697 427 : if (_ptr_pszDpFqdn) {
6698 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
6699 : } else {
6700 427 : r->pszDpFqdn = NULL;
6701 : }
6702 427 : size_dwReserved_0 = 32;
6703 14091 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (size_dwReserved_0); cntr_dwReserved_0++) {
6704 13664 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved[cntr_dwReserved_0]));
6705 : }
6706 427 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6707 : }
6708 427 : if (ndr_flags & NDR_BUFFERS) {
6709 427 : if (r->pszZoneName) {
6710 427 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6711 427 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
6712 427 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
6713 427 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
6714 427 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
6715 427 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
6716 427 : if (length_pszZoneName_1 > size_pszZoneName_1) {
6717 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZoneName_1, length_pszZoneName_1);
6718 : }
6719 427 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
6720 427 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
6721 427 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
6722 : }
6723 427 : if (r->pszDataFile) {
6724 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
6725 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
6726 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
6727 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
6728 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
6729 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
6730 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
6731 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDataFile_1, length_pszDataFile_1);
6732 : }
6733 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
6734 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
6735 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
6736 : }
6737 427 : if (r->pszAdmin) {
6738 0 : _mem_save_pszAdmin_0 = NDR_PULL_GET_MEM_CTX(ndr);
6739 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszAdmin, 0);
6740 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszAdmin));
6741 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszAdmin));
6742 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszAdmin, &size_pszAdmin_1));
6743 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszAdmin, &length_pszAdmin_1));
6744 0 : if (length_pszAdmin_1 > size_pszAdmin_1) {
6745 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszAdmin_1, length_pszAdmin_1);
6746 : }
6747 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszAdmin_1, sizeof(uint8_t)));
6748 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszAdmin, length_pszAdmin_1, sizeof(uint8_t), CH_UTF8));
6749 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszAdmin_0, 0);
6750 : }
6751 427 : if (r->aipMasters) {
6752 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
6753 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
6754 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
6755 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
6756 : }
6757 427 : if (r->aipSecondaries) {
6758 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6759 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
6760 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
6761 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
6762 : }
6763 427 : if (r->pszDpFqdn) {
6764 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
6765 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
6766 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
6767 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
6768 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
6769 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
6770 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
6771 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDpFqdn_1, length_pszDpFqdn_1);
6772 : }
6773 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
6774 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
6775 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
6776 : }
6777 : }
6778 427 : return NDR_ERR_SUCCESS;
6779 : }
6780 :
6781 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *r)
6782 : {
6783 0 : uint32_t cntr_dwReserved_0;
6784 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_CREATE_INFO_LONGHORN");
6785 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6786 0 : ndr->depth++;
6787 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
6788 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
6789 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
6790 0 : ndr->depth++;
6791 0 : if (r->pszZoneName) {
6792 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
6793 : }
6794 0 : ndr->depth--;
6795 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
6796 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
6797 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
6798 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
6799 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
6800 0 : ndr->depth++;
6801 0 : if (r->pszDataFile) {
6802 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
6803 : }
6804 0 : ndr->depth--;
6805 0 : ndr_print_uint32(ndr, "fDsIntegrated", r->fDsIntegrated);
6806 0 : ndr_print_uint32(ndr, "fLoadExisting", r->fLoadExisting);
6807 0 : ndr_print_ptr(ndr, "pszAdmin", r->pszAdmin);
6808 0 : ndr->depth++;
6809 0 : if (r->pszAdmin) {
6810 0 : ndr_print_string(ndr, "pszAdmin", r->pszAdmin);
6811 : }
6812 0 : ndr->depth--;
6813 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
6814 0 : ndr->depth++;
6815 0 : if (r->aipMasters) {
6816 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipMasters", r->aipMasters);
6817 : }
6818 0 : ndr->depth--;
6819 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
6820 0 : ndr->depth++;
6821 0 : if (r->aipSecondaries) {
6822 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
6823 : }
6824 0 : ndr->depth--;
6825 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
6826 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
6827 0 : ndr_print_uint32(ndr, "dwTimeout", r->dwTimeout);
6828 0 : ndr_print_uint32(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
6829 0 : ndr_print_uint32(ndr, "dwDpFlags", r->dwDpFlags);
6830 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
6831 0 : ndr->depth++;
6832 0 : if (r->pszDpFqdn) {
6833 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
6834 : }
6835 0 : ndr->depth--;
6836 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "dwReserved", (uint32_t)(32));
6837 0 : ndr->depth++;
6838 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (32); cntr_dwReserved_0++) {
6839 0 : ndr_print_uint32(ndr, "dwReserved", r->dwReserved[cntr_dwReserved_0]);
6840 : }
6841 0 : ndr->depth--;
6842 0 : ndr->depth--;
6843 : }
6844 :
6845 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_EXPORT_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ZONE_EXPORT_INFO *r)
6846 : {
6847 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6848 0 : if (ndr_flags & NDR_SCALARS) {
6849 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6850 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
6851 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
6852 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneExportFile));
6853 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6854 : }
6855 0 : if (ndr_flags & NDR_BUFFERS) {
6856 0 : if (r->pszZoneExportFile) {
6857 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneExportFile, CH_UTF8)));
6858 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6859 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneExportFile, CH_UTF8)));
6860 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneExportFile, ndr_charset_length(r->pszZoneExportFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6861 : }
6862 : }
6863 0 : return NDR_ERR_SUCCESS;
6864 : }
6865 :
6866 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_EXPORT_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ZONE_EXPORT_INFO *r)
6867 : {
6868 0 : uint32_t _ptr_pszZoneExportFile;
6869 0 : uint32_t size_pszZoneExportFile_1 = 0;
6870 0 : uint32_t length_pszZoneExportFile_1 = 0;
6871 0 : TALLOC_CTX *_mem_save_pszZoneExportFile_0 = NULL;
6872 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6873 0 : if (ndr_flags & NDR_SCALARS) {
6874 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6875 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
6876 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
6877 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneExportFile));
6878 0 : if (_ptr_pszZoneExportFile) {
6879 0 : NDR_PULL_ALLOC(ndr, r->pszZoneExportFile);
6880 : } else {
6881 0 : r->pszZoneExportFile = NULL;
6882 : }
6883 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6884 : }
6885 0 : if (ndr_flags & NDR_BUFFERS) {
6886 0 : if (r->pszZoneExportFile) {
6887 0 : _mem_save_pszZoneExportFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
6888 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneExportFile, 0);
6889 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneExportFile));
6890 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneExportFile));
6891 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneExportFile, &size_pszZoneExportFile_1));
6892 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneExportFile, &length_pszZoneExportFile_1));
6893 0 : if (length_pszZoneExportFile_1 > size_pszZoneExportFile_1) {
6894 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZoneExportFile_1, length_pszZoneExportFile_1);
6895 : }
6896 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneExportFile_1, sizeof(uint8_t)));
6897 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneExportFile, length_pszZoneExportFile_1, sizeof(uint8_t), CH_UTF8));
6898 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneExportFile_0, 0);
6899 : }
6900 : }
6901 0 : return NDR_ERR_SUCCESS;
6902 : }
6903 :
6904 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_EXPORT_INFO(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_EXPORT_INFO *r)
6905 : {
6906 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_EXPORT_INFO");
6907 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6908 0 : ndr->depth++;
6909 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
6910 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
6911 0 : ndr_print_ptr(ndr, "pszZoneExportFile", r->pszZoneExportFile);
6912 0 : ndr->depth++;
6913 0 : if (r->pszZoneExportFile) {
6914 0 : ndr_print_string(ndr, "pszZoneExportFile", r->pszZoneExportFile);
6915 : }
6916 0 : ndr->depth--;
6917 0 : ndr->depth--;
6918 : }
6919 :
6920 0 : static enum ndr_err_code ndr_push_DNS_RPC_ENUM_ZONES_FILTER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_ENUM_ZONES_FILTER *r)
6921 : {
6922 0 : uint32_t cntr_pszReserved_0;
6923 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6924 0 : if (ndr_flags & NDR_SCALARS) {
6925 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6926 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
6927 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
6928 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFilter));
6929 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszPartitionFqdn));
6930 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszQueryString));
6931 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (6); cntr_pszReserved_0++) {
6932 0 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pszReserved[cntr_pszReserved_0]));
6933 : }
6934 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6935 : }
6936 0 : if (ndr_flags & NDR_BUFFERS) {
6937 0 : if (r->pszPartitionFqdn) {
6938 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszPartitionFqdn, CH_UTF8)));
6939 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6940 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszPartitionFqdn, CH_UTF8)));
6941 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszPartitionFqdn, ndr_charset_length(r->pszPartitionFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6942 : }
6943 0 : if (r->pszQueryString) {
6944 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszQueryString, CH_UTF8)));
6945 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6946 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszQueryString, CH_UTF8)));
6947 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszQueryString, ndr_charset_length(r->pszQueryString, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6948 : }
6949 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (6); cntr_pszReserved_0++) {
6950 0 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pszReserved[cntr_pszReserved_0]));
6951 : }
6952 : }
6953 0 : return NDR_ERR_SUCCESS;
6954 : }
6955 :
6956 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ENUM_ZONES_FILTER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_ENUM_ZONES_FILTER *r)
6957 : {
6958 0 : uint32_t _ptr_pszPartitionFqdn;
6959 0 : uint32_t size_pszPartitionFqdn_1 = 0;
6960 0 : uint32_t length_pszPartitionFqdn_1 = 0;
6961 0 : TALLOC_CTX *_mem_save_pszPartitionFqdn_0 = NULL;
6962 0 : uint32_t _ptr_pszQueryString;
6963 0 : uint32_t size_pszQueryString_1 = 0;
6964 0 : uint32_t length_pszQueryString_1 = 0;
6965 0 : TALLOC_CTX *_mem_save_pszQueryString_0 = NULL;
6966 0 : uint32_t size_pszReserved_0 = 0;
6967 0 : uint32_t cntr_pszReserved_0;
6968 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6969 0 : if (ndr_flags & NDR_SCALARS) {
6970 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6971 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
6972 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
6973 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFilter));
6974 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszPartitionFqdn));
6975 0 : if (_ptr_pszPartitionFqdn) {
6976 0 : NDR_PULL_ALLOC(ndr, r->pszPartitionFqdn);
6977 : } else {
6978 0 : r->pszPartitionFqdn = NULL;
6979 : }
6980 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszQueryString));
6981 0 : if (_ptr_pszQueryString) {
6982 0 : NDR_PULL_ALLOC(ndr, r->pszQueryString);
6983 : } else {
6984 0 : r->pszQueryString = NULL;
6985 : }
6986 0 : size_pszReserved_0 = 6;
6987 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (size_pszReserved_0); cntr_pszReserved_0++) {
6988 0 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pszReserved[cntr_pszReserved_0]));
6989 : }
6990 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6991 : }
6992 0 : if (ndr_flags & NDR_BUFFERS) {
6993 0 : if (r->pszPartitionFqdn) {
6994 0 : _mem_save_pszPartitionFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
6995 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszPartitionFqdn, 0);
6996 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszPartitionFqdn));
6997 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszPartitionFqdn));
6998 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszPartitionFqdn, &size_pszPartitionFqdn_1));
6999 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszPartitionFqdn, &length_pszPartitionFqdn_1));
7000 0 : if (length_pszPartitionFqdn_1 > size_pszPartitionFqdn_1) {
7001 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszPartitionFqdn_1, length_pszPartitionFqdn_1);
7002 : }
7003 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszPartitionFqdn_1, sizeof(uint8_t)));
7004 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszPartitionFqdn, length_pszPartitionFqdn_1, sizeof(uint8_t), CH_UTF8));
7005 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszPartitionFqdn_0, 0);
7006 : }
7007 0 : if (r->pszQueryString) {
7008 0 : _mem_save_pszQueryString_0 = NDR_PULL_GET_MEM_CTX(ndr);
7009 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszQueryString, 0);
7010 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszQueryString));
7011 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszQueryString));
7012 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszQueryString, &size_pszQueryString_1));
7013 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszQueryString, &length_pszQueryString_1));
7014 0 : if (length_pszQueryString_1 > size_pszQueryString_1) {
7015 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszQueryString_1, length_pszQueryString_1);
7016 : }
7017 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszQueryString_1, sizeof(uint8_t)));
7018 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszQueryString, length_pszQueryString_1, sizeof(uint8_t), CH_UTF8));
7019 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszQueryString_0, 0);
7020 : }
7021 0 : size_pszReserved_0 = 6;
7022 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (size_pszReserved_0); cntr_pszReserved_0++) {
7023 0 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pszReserved[cntr_pszReserved_0]));
7024 : }
7025 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (size_pszReserved_0); cntr_pszReserved_0++) {
7026 : }
7027 : }
7028 0 : return NDR_ERR_SUCCESS;
7029 : }
7030 :
7031 0 : _PUBLIC_ void ndr_print_DNS_RPC_ENUM_ZONES_FILTER(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ENUM_ZONES_FILTER *r)
7032 : {
7033 0 : uint32_t cntr_pszReserved_0;
7034 0 : ndr_print_struct(ndr, name, "DNS_RPC_ENUM_ZONES_FILTER");
7035 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7036 0 : ndr->depth++;
7037 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
7038 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
7039 0 : ndr_print_uint32(ndr, "dwFilter", r->dwFilter);
7040 0 : ndr_print_ptr(ndr, "pszPartitionFqdn", r->pszPartitionFqdn);
7041 0 : ndr->depth++;
7042 0 : if (r->pszPartitionFqdn) {
7043 0 : ndr_print_string(ndr, "pszPartitionFqdn", r->pszPartitionFqdn);
7044 : }
7045 0 : ndr->depth--;
7046 0 : ndr_print_ptr(ndr, "pszQueryString", r->pszQueryString);
7047 0 : ndr->depth++;
7048 0 : if (r->pszQueryString) {
7049 0 : ndr_print_string(ndr, "pszQueryString", r->pszQueryString);
7050 : }
7051 0 : ndr->depth--;
7052 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pszReserved", (uint32_t)(6));
7053 0 : ndr->depth++;
7054 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (6); cntr_pszReserved_0++) {
7055 0 : ndr_print_DNS_EXTENSION(ndr, "pszReserved", &r->pszReserved[cntr_pszReserved_0]);
7056 : }
7057 0 : ndr->depth--;
7058 0 : ndr->depth--;
7059 : }
7060 :
7061 0 : static enum ndr_err_code ndr_push_DNS_RPC_FORWARDERS_W2K(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_FORWARDERS_W2K *r)
7062 : {
7063 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7064 0 : if (ndr_flags & NDR_SCALARS) {
7065 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7066 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
7067 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
7068 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
7069 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7070 : }
7071 0 : if (ndr_flags & NDR_BUFFERS) {
7072 0 : if (r->aipForwarders) {
7073 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7074 : }
7075 : }
7076 0 : return NDR_ERR_SUCCESS;
7077 : }
7078 :
7079 0 : static enum ndr_err_code ndr_pull_DNS_RPC_FORWARDERS_W2K(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_FORWARDERS_W2K *r)
7080 : {
7081 0 : uint32_t _ptr_aipForwarders;
7082 0 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
7083 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7084 0 : if (ndr_flags & NDR_SCALARS) {
7085 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7086 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
7087 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
7088 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
7089 0 : if (_ptr_aipForwarders) {
7090 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
7091 : } else {
7092 0 : r->aipForwarders = NULL;
7093 : }
7094 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7095 : }
7096 0 : if (ndr_flags & NDR_BUFFERS) {
7097 0 : if (r->aipForwarders) {
7098 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
7099 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
7100 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7101 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
7102 : }
7103 : }
7104 0 : return NDR_ERR_SUCCESS;
7105 : }
7106 :
7107 0 : _PUBLIC_ void ndr_print_DNS_RPC_FORWARDERS_W2K(struct ndr_print *ndr, const char *name, const struct DNS_RPC_FORWARDERS_W2K *r)
7108 : {
7109 0 : ndr_print_struct(ndr, name, "DNS_RPC_FORWARDERS_W2K");
7110 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7111 0 : ndr->depth++;
7112 0 : ndr_print_uint32(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
7113 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
7114 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
7115 0 : ndr->depth++;
7116 0 : if (r->aipForwarders) {
7117 0 : ndr_print_IP4_ARRAY(ndr, "aipForwarders", r->aipForwarders);
7118 : }
7119 0 : ndr->depth--;
7120 0 : ndr->depth--;
7121 : }
7122 :
7123 0 : static enum ndr_err_code ndr_push_DNS_RPC_FORWARDERS_DOTNET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_FORWARDERS_DOTNET *r)
7124 : {
7125 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7126 0 : if (ndr_flags & NDR_SCALARS) {
7127 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7128 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
7129 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
7130 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
7131 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
7132 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
7133 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7134 : }
7135 0 : if (ndr_flags & NDR_BUFFERS) {
7136 0 : if (r->aipForwarders) {
7137 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7138 : }
7139 : }
7140 0 : return NDR_ERR_SUCCESS;
7141 : }
7142 :
7143 0 : static enum ndr_err_code ndr_pull_DNS_RPC_FORWARDERS_DOTNET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_FORWARDERS_DOTNET *r)
7144 : {
7145 0 : uint32_t _ptr_aipForwarders;
7146 0 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
7147 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7148 0 : if (ndr_flags & NDR_SCALARS) {
7149 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7150 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
7151 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
7152 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
7153 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
7154 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
7155 0 : if (_ptr_aipForwarders) {
7156 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
7157 : } else {
7158 0 : r->aipForwarders = NULL;
7159 : }
7160 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7161 : }
7162 0 : if (ndr_flags & NDR_BUFFERS) {
7163 0 : if (r->aipForwarders) {
7164 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
7165 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
7166 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7167 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
7168 : }
7169 : }
7170 0 : return NDR_ERR_SUCCESS;
7171 : }
7172 :
7173 0 : _PUBLIC_ void ndr_print_DNS_RPC_FORWARDERS_DOTNET(struct ndr_print *ndr, const char *name, const struct DNS_RPC_FORWARDERS_DOTNET *r)
7174 : {
7175 0 : ndr_print_struct(ndr, name, "DNS_RPC_FORWARDERS_DOTNET");
7176 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7177 0 : ndr->depth++;
7178 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
7179 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
7180 0 : ndr_print_uint32(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
7181 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
7182 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
7183 0 : ndr->depth++;
7184 0 : if (r->aipForwarders) {
7185 0 : ndr_print_IP4_ARRAY(ndr, "aipForwarders", r->aipForwarders);
7186 : }
7187 0 : ndr->depth--;
7188 0 : ndr->depth--;
7189 : }
7190 :
7191 0 : static enum ndr_err_code ndr_push_DNS_RPC_FORWARDERS_LONGHORN(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_FORWARDERS_LONGHORN *r)
7192 : {
7193 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7194 0 : if (ndr_flags & NDR_SCALARS) {
7195 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7196 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
7197 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
7198 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
7199 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
7200 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
7201 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7202 : }
7203 0 : if (ndr_flags & NDR_BUFFERS) {
7204 0 : if (r->aipForwarders) {
7205 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7206 : }
7207 : }
7208 0 : return NDR_ERR_SUCCESS;
7209 : }
7210 :
7211 0 : static enum ndr_err_code ndr_pull_DNS_RPC_FORWARDERS_LONGHORN(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_FORWARDERS_LONGHORN *r)
7212 : {
7213 0 : uint32_t _ptr_aipForwarders;
7214 0 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
7215 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7216 0 : if (ndr_flags & NDR_SCALARS) {
7217 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7218 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
7219 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
7220 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
7221 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
7222 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
7223 0 : if (_ptr_aipForwarders) {
7224 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
7225 : } else {
7226 0 : r->aipForwarders = NULL;
7227 : }
7228 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7229 : }
7230 0 : if (ndr_flags & NDR_BUFFERS) {
7231 0 : if (r->aipForwarders) {
7232 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
7233 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
7234 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7235 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
7236 : }
7237 : }
7238 0 : return NDR_ERR_SUCCESS;
7239 : }
7240 :
7241 0 : _PUBLIC_ void ndr_print_DNS_RPC_FORWARDERS_LONGHORN(struct ndr_print *ndr, const char *name, const struct DNS_RPC_FORWARDERS_LONGHORN *r)
7242 : {
7243 0 : ndr_print_struct(ndr, name, "DNS_RPC_FORWARDERS_LONGHORN");
7244 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7245 0 : ndr->depth++;
7246 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
7247 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
7248 0 : ndr_print_uint32(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
7249 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
7250 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
7251 0 : ndr->depth++;
7252 0 : if (r->aipForwarders) {
7253 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipForwarders", r->aipForwarders);
7254 : }
7255 0 : ndr->depth--;
7256 0 : ndr->depth--;
7257 : }
7258 :
7259 0 : static enum ndr_err_code ndr_push_DNS_RPC_AUTOCONFIG(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum DNS_RPC_AUTOCONFIG r)
7260 : {
7261 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
7262 0 : return NDR_ERR_SUCCESS;
7263 : }
7264 :
7265 0 : static enum ndr_err_code ndr_pull_DNS_RPC_AUTOCONFIG(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum DNS_RPC_AUTOCONFIG *r)
7266 : {
7267 0 : uint32_t v;
7268 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
7269 0 : *r = v;
7270 0 : return NDR_ERR_SUCCESS;
7271 : }
7272 :
7273 0 : _PUBLIC_ void ndr_print_DNS_RPC_AUTOCONFIG(struct ndr_print *ndr, const char *name, enum DNS_RPC_AUTOCONFIG r)
7274 : {
7275 0 : const char *val = NULL;
7276 :
7277 0 : switch (r) {
7278 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS: val = "DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS"; break;
7279 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS: val = "DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS"; break;
7280 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_ZONES: val = "DNS_RPC_AUTOCONFIG_INTERNAL_ZONES"; break;
7281 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT: val = "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT"; break;
7282 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND: val = "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND"; break;
7283 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND: val = "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND"; break;
7284 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR: val = "DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR"; break;
7285 0 : case DNS_RPC_AUTOCONFIG_ALL: val = "DNS_RPC_AUTOCONFIG_ALL"; break;
7286 : }
7287 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
7288 0 : }
7289 :
7290 0 : static enum ndr_err_code ndr_push_DNS_RPC_AUTOCONFIGURE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_AUTOCONFIGURE *r)
7291 : {
7292 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7293 0 : if (ndr_flags & NDR_SCALARS) {
7294 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7295 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
7296 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
7297 0 : NDR_CHECK(ndr_push_DNS_RPC_AUTOCONFIG(ndr, NDR_SCALARS, r->dwAutoConfigFlags));
7298 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved1));
7299 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszNewDomainName));
7300 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7301 : }
7302 0 : if (ndr_flags & NDR_BUFFERS) {
7303 0 : if (r->pszNewDomainName) {
7304 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszNewDomainName, CH_UTF8)));
7305 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7306 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszNewDomainName, CH_UTF8)));
7307 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszNewDomainName, ndr_charset_length(r->pszNewDomainName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
7308 : }
7309 : }
7310 0 : return NDR_ERR_SUCCESS;
7311 : }
7312 :
7313 0 : static enum ndr_err_code ndr_pull_DNS_RPC_AUTOCONFIGURE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_AUTOCONFIGURE *r)
7314 : {
7315 0 : uint32_t _ptr_pszNewDomainName;
7316 0 : uint32_t size_pszNewDomainName_1 = 0;
7317 0 : uint32_t length_pszNewDomainName_1 = 0;
7318 0 : TALLOC_CTX *_mem_save_pszNewDomainName_0 = NULL;
7319 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7320 0 : if (ndr_flags & NDR_SCALARS) {
7321 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7322 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
7323 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
7324 0 : NDR_CHECK(ndr_pull_DNS_RPC_AUTOCONFIG(ndr, NDR_SCALARS, &r->dwAutoConfigFlags));
7325 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved1));
7326 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszNewDomainName));
7327 0 : if (_ptr_pszNewDomainName) {
7328 0 : NDR_PULL_ALLOC(ndr, r->pszNewDomainName);
7329 : } else {
7330 0 : r->pszNewDomainName = NULL;
7331 : }
7332 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7333 : }
7334 0 : if (ndr_flags & NDR_BUFFERS) {
7335 0 : if (r->pszNewDomainName) {
7336 0 : _mem_save_pszNewDomainName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7337 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszNewDomainName, 0);
7338 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszNewDomainName));
7339 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszNewDomainName));
7340 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszNewDomainName, &size_pszNewDomainName_1));
7341 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszNewDomainName, &length_pszNewDomainName_1));
7342 0 : if (length_pszNewDomainName_1 > size_pszNewDomainName_1) {
7343 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszNewDomainName_1, length_pszNewDomainName_1);
7344 : }
7345 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNewDomainName_1, sizeof(uint8_t)));
7346 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszNewDomainName, length_pszNewDomainName_1, sizeof(uint8_t), CH_UTF8));
7347 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszNewDomainName_0, 0);
7348 : }
7349 : }
7350 0 : return NDR_ERR_SUCCESS;
7351 : }
7352 :
7353 0 : _PUBLIC_ void ndr_print_DNS_RPC_AUTOCONFIGURE(struct ndr_print *ndr, const char *name, const struct DNS_RPC_AUTOCONFIGURE *r)
7354 : {
7355 0 : ndr_print_struct(ndr, name, "DNS_RPC_AUTOCONFIGURE");
7356 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7357 0 : ndr->depth++;
7358 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
7359 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
7360 0 : ndr_print_DNS_RPC_AUTOCONFIG(ndr, "dwAutoConfigFlags", r->dwAutoConfigFlags);
7361 0 : ndr_print_uint32(ndr, "dwReserved1", r->dwReserved1);
7362 0 : ndr_print_ptr(ndr, "pszNewDomainName", r->pszNewDomainName);
7363 0 : ndr->depth++;
7364 0 : if (r->pszNewDomainName) {
7365 0 : ndr_print_string(ndr, "pszNewDomainName", r->pszNewDomainName);
7366 : }
7367 0 : ndr->depth--;
7368 0 : ndr->depth--;
7369 : }
7370 :
7371 1262 : static enum ndr_err_code ndr_push_DNS_SELECT_FLAGS(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
7372 : {
7373 1262 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
7374 1262 : return NDR_ERR_SUCCESS;
7375 : }
7376 :
7377 1262 : static enum ndr_err_code ndr_pull_DNS_SELECT_FLAGS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
7378 : {
7379 0 : uint32_t v;
7380 1262 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
7381 1262 : *r = v;
7382 1262 : return NDR_ERR_SUCCESS;
7383 : }
7384 :
7385 0 : _PUBLIC_ void ndr_print_DNS_SELECT_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r)
7386 : {
7387 0 : ndr_print_uint32(ndr, name, r);
7388 0 : ndr->depth++;
7389 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_AUTHORITY_DATA", DNS_RPC_VIEW_AUTHORITY_DATA, r);
7390 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_CACHE_DATA", DNS_RPC_VIEW_CACHE_DATA, r);
7391 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_GLUE_DATA", DNS_RPC_VIEW_GLUE_DATA, r);
7392 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_ROOT_HINT_DATA", DNS_RPC_VIEW_ROOT_HINT_DATA, r);
7393 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_ADDITIONAL_DATA", DNS_RPC_VIEW_ADDITIONAL_DATA, r);
7394 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_NO_CHILDREN", DNS_RPC_VIEW_NO_CHILDREN, r);
7395 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_ONLY_CHILDREN", DNS_RPC_VIEW_ONLY_CHILDREN, r);
7396 0 : ndr->depth--;
7397 0 : }
7398 :
7399 0 : static enum ndr_err_code ndr_push_DNSSRV_STAT_HEADER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNSSRV_STAT_HEADER *r)
7400 : {
7401 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7402 0 : if (ndr_flags & NDR_SCALARS) {
7403 0 : NDR_CHECK(ndr_push_align(ndr, 4));
7404 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->StatId));
7405 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wLength));
7406 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fClear));
7407 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fReserved));
7408 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7409 : }
7410 0 : if (ndr_flags & NDR_BUFFERS) {
7411 0 : }
7412 0 : return NDR_ERR_SUCCESS;
7413 : }
7414 :
7415 0 : static enum ndr_err_code ndr_pull_DNSSRV_STAT_HEADER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNSSRV_STAT_HEADER *r)
7416 : {
7417 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7418 0 : if (ndr_flags & NDR_SCALARS) {
7419 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
7420 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->StatId));
7421 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wLength));
7422 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fClear));
7423 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fReserved));
7424 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7425 : }
7426 0 : if (ndr_flags & NDR_BUFFERS) {
7427 0 : }
7428 0 : return NDR_ERR_SUCCESS;
7429 : }
7430 :
7431 0 : _PUBLIC_ void ndr_print_DNSSRV_STAT_HEADER(struct ndr_print *ndr, const char *name, const struct DNSSRV_STAT_HEADER *r)
7432 : {
7433 0 : ndr_print_struct(ndr, name, "DNSSRV_STAT_HEADER");
7434 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7435 0 : ndr->depth++;
7436 0 : ndr_print_uint32(ndr, "StatId", r->StatId);
7437 0 : ndr_print_uint16(ndr, "wLength", r->wLength);
7438 0 : ndr_print_uint8(ndr, "fClear", r->fClear);
7439 0 : ndr_print_uint8(ndr, "fReserved", r->fReserved);
7440 0 : ndr->depth--;
7441 : }
7442 :
7443 0 : static enum ndr_err_code ndr_push_DNSSRV_STAT(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNSSRV_STAT *r)
7444 : {
7445 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7446 0 : if (ndr_flags & NDR_SCALARS) {
7447 0 : NDR_CHECK(ndr_push_align(ndr, 4));
7448 0 : NDR_CHECK(ndr_push_DNSSRV_STAT_HEADER(ndr, NDR_SCALARS, &r->Header));
7449 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Buffer, 1));
7450 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7451 : }
7452 0 : if (ndr_flags & NDR_BUFFERS) {
7453 0 : }
7454 0 : return NDR_ERR_SUCCESS;
7455 : }
7456 :
7457 0 : static enum ndr_err_code ndr_pull_DNSSRV_STAT(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNSSRV_STAT *r)
7458 : {
7459 0 : uint32_t size_Buffer_0 = 0;
7460 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7461 0 : if (ndr_flags & NDR_SCALARS) {
7462 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
7463 0 : NDR_CHECK(ndr_pull_DNSSRV_STAT_HEADER(ndr, NDR_SCALARS, &r->Header));
7464 0 : size_Buffer_0 = 1;
7465 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Buffer, size_Buffer_0));
7466 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7467 : }
7468 0 : if (ndr_flags & NDR_BUFFERS) {
7469 0 : }
7470 0 : return NDR_ERR_SUCCESS;
7471 : }
7472 :
7473 0 : _PUBLIC_ void ndr_print_DNSSRV_STAT(struct ndr_print *ndr, const char *name, const struct DNSSRV_STAT *r)
7474 : {
7475 0 : ndr_print_struct(ndr, name, "DNSSRV_STAT");
7476 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7477 0 : ndr->depth++;
7478 0 : ndr_print_DNSSRV_STAT_HEADER(ndr, "Header", &r->Header);
7479 0 : ndr_print_array_uint8(ndr, "Buffer", r->Buffer, 1);
7480 0 : ndr->depth--;
7481 : }
7482 :
7483 1724 : static enum ndr_err_code ndr_push_DNS_RPC_TYPEID(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum DNS_RPC_TYPEID r)
7484 : {
7485 1724 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
7486 1724 : return NDR_ERR_SUCCESS;
7487 : }
7488 :
7489 1724 : static enum ndr_err_code ndr_pull_DNS_RPC_TYPEID(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum DNS_RPC_TYPEID *r)
7490 : {
7491 0 : uint32_t v;
7492 1724 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
7493 1724 : *r = v;
7494 1724 : return NDR_ERR_SUCCESS;
7495 : }
7496 :
7497 2 : _PUBLIC_ void ndr_print_DNS_RPC_TYPEID(struct ndr_print *ndr, const char *name, enum DNS_RPC_TYPEID r)
7498 : {
7499 2 : const char *val = NULL;
7500 :
7501 2 : switch (r) {
7502 2 : case DNSSRV_TYPEID_NULL: val = "DNSSRV_TYPEID_NULL"; break;
7503 0 : case DNSSRV_TYPEID_DWORD: val = "DNSSRV_TYPEID_DWORD"; break;
7504 0 : case DNSSRV_TYPEID_LPSTR: val = "DNSSRV_TYPEID_LPSTR"; break;
7505 0 : case DNSSRV_TYPEID_LPWSTR: val = "DNSSRV_TYPEID_LPWSTR"; break;
7506 0 : case DNSSRV_TYPEID_IPARRAY: val = "DNSSRV_TYPEID_IPARRAY"; break;
7507 0 : case DNSSRV_TYPEID_BUFFER: val = "DNSSRV_TYPEID_BUFFER"; break;
7508 0 : case DNSSRV_TYPEID_SERVER_INFO_W2K: val = "DNSSRV_TYPEID_SERVER_INFO_W2K"; break;
7509 0 : case DNSSRV_TYPEID_STATS: val = "DNSSRV_TYPEID_STATS"; break;
7510 0 : case DNSSRV_TYPEID_FORWARDERS_W2K: val = "DNSSRV_TYPEID_FORWARDERS_W2K"; break;
7511 0 : case DNSSRV_TYPEID_ZONE_W2K: val = "DNSSRV_TYPEID_ZONE_W2K"; break;
7512 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K: val = "DNSSRV_TYPEID_ZONE_INFO_W2K"; break;
7513 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K: val = "DNSSRV_TYPEID_ZONE_SECONDARIES_W2K"; break;
7514 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K: val = "DNSSRV_TYPEID_ZONE_DATABASE_W2K"; break;
7515 0 : case DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K: val = "DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K"; break;
7516 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K: val = "DNSSRV_TYPEID_ZONE_CREATE_W2K"; break;
7517 0 : case DNSSRV_TYPEID_NAME_AND_PARAM: val = "DNSSRV_TYPEID_NAME_AND_PARAM"; break;
7518 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K: val = "DNSSRV_TYPEID_ZONE_LIST_W2K"; break;
7519 0 : case DNSSRV_TYPEID_ZONE_RENAME: val = "DNSSRV_TYPEID_ZONE_RENAME"; break;
7520 0 : case DNSSRV_TYPEID_ZONE_EXPORT: val = "DNSSRV_TYPEID_ZONE_EXPORT"; break;
7521 0 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET: val = "DNSSRV_TYPEID_SERVER_INFO_DOTNET"; break;
7522 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET: val = "DNSSRV_TYPEID_FORWARDERS_DOTNET"; break;
7523 0 : case DNSSRV_TYPEID_ZONE: val = "DNSSRV_TYPEID_ZONE"; break;
7524 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET: val = "DNSSRV_TYPEID_ZONE_INFO_DOTNET"; break;
7525 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET: val = "DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET"; break;
7526 0 : case DNSSRV_TYPEID_ZONE_DATABASE: val = "DNSSRV_TYPEID_ZONE_DATABASE"; break;
7527 0 : case DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET: val = "DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET"; break;
7528 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET: val = "DNSSRV_TYPEID_ZONE_CREATE_DOTNET"; break;
7529 0 : case DNSSRV_TYPEID_ZONE_LIST: val = "DNSSRV_TYPEID_ZONE_LIST"; break;
7530 0 : case DNSSRV_TYPEID_DP_ENUM: val = "DNSSRV_TYPEID_DP_ENUM"; break;
7531 0 : case DNSSRV_TYPEID_DP_INFO: val = "DNSSRV_TYPEID_DP_INFO"; break;
7532 0 : case DNSSRV_TYPEID_DP_LIST: val = "DNSSRV_TYPEID_DP_LIST"; break;
7533 0 : case DNSSRV_TYPEID_ENLIST_DP: val = "DNSSRV_TYPEID_ENLIST_DP"; break;
7534 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP: val = "DNSSRV_TYPEID_ZONE_CHANGE_DP"; break;
7535 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER: val = "DNSSRV_TYPEID_ENUM_ZONES_FILTER"; break;
7536 0 : case DNSSRV_TYPEID_ADDRARRAY: val = "DNSSRV_TYPEID_ADDRARRAY"; break;
7537 0 : case DNSSRV_TYPEID_SERVER_INFO: val = "DNSSRV_TYPEID_SERVER_INFO"; break;
7538 0 : case DNSSRV_TYPEID_ZONE_INFO: val = "DNSSRV_TYPEID_ZONE_INFO"; break;
7539 0 : case DNSSRV_TYPEID_FORWARDERS: val = "DNSSRV_TYPEID_FORWARDERS"; break;
7540 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES: val = "DNSSRV_TYPEID_ZONE_SECONDARIES"; break;
7541 0 : case DNSSRV_TYPEID_ZONE_TYPE_RESET: val = "DNSSRV_TYPEID_ZONE_TYPE_RESET"; break;
7542 0 : case DNSSRV_TYPEID_ZONE_CREATE: val = "DNSSRV_TYPEID_ZONE_CREATE"; break;
7543 0 : case DNSSRV_TYPEID_IP_VALIDATE: val = "DNSSRV_TYPEID_IP_VALIDATE"; break;
7544 0 : case DNSSRV_TYPEID_AUTOCONFIGURE: val = "DNSSRV_TYPEID_AUTOCONFIGURE"; break;
7545 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST: val = "DNSSRV_TYPEID_UTF8_STRING_LIST"; break;
7546 0 : case DNSSRV_TYPEID_UNICODE_STRING_LIST: val = "DNSSRV_TYPEID_UNICODE_STRING_LIST"; break;
7547 : }
7548 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
7549 2 : }
7550 :
7551 1724 : static enum ndr_err_code ndr_push_DNSSRV_RPC_UNION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union DNSSRV_RPC_UNION *r)
7552 : {
7553 0 : uint32_t level;
7554 1724 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7555 1724 : if (ndr_flags & NDR_SCALARS) {
7556 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7557 1724 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7558 1724 : NDR_CHECK(ndr_push_union_align(ndr, 5));
7559 1724 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, level));
7560 1724 : NDR_CHECK(ndr_push_union_align(ndr, 5));
7561 1724 : switch (level) {
7562 429 : case DNSSRV_TYPEID_NULL: {
7563 429 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Null));
7564 429 : break; }
7565 :
7566 20 : case DNSSRV_TYPEID_DWORD: {
7567 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Dword));
7568 20 : break; }
7569 :
7570 0 : case DNSSRV_TYPEID_LPSTR: {
7571 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->String));
7572 0 : break; }
7573 :
7574 0 : case DNSSRV_TYPEID_LPWSTR: {
7575 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->WideString));
7576 0 : break; }
7577 :
7578 0 : case DNSSRV_TYPEID_IPARRAY: {
7579 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->IpArray));
7580 0 : break; }
7581 :
7582 0 : case DNSSRV_TYPEID_BUFFER: {
7583 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Buffer));
7584 0 : break; }
7585 :
7586 4 : case DNSSRV_TYPEID_SERVER_INFO_W2K: {
7587 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ServerInfoW2K));
7588 4 : break; }
7589 :
7590 0 : case DNSSRV_TYPEID_STATS: {
7591 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Stats));
7592 0 : break; }
7593 :
7594 0 : case DNSSRV_TYPEID_FORWARDERS_W2K: {
7595 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ForwardersW2K));
7596 0 : break; }
7597 :
7598 0 : case DNSSRV_TYPEID_ZONE_W2K: {
7599 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneW2K));
7600 0 : break; }
7601 :
7602 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K: {
7603 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneInfoW2K));
7604 0 : break; }
7605 :
7606 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K: {
7607 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->SecondariesW2K));
7608 0 : break; }
7609 :
7610 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K: {
7611 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->DatabaseW2K));
7612 0 : break; }
7613 :
7614 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K: {
7615 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneCreateW2K));
7616 0 : break; }
7617 :
7618 799 : case DNSSRV_TYPEID_NAME_AND_PARAM: {
7619 799 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->NameAndParam));
7620 799 : break; }
7621 :
7622 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K: {
7623 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneListW2K));
7624 0 : break; }
7625 :
7626 4 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET: {
7627 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ServerInfoDotNet));
7628 4 : break; }
7629 :
7630 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET: {
7631 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ForwardersDotNet));
7632 0 : break; }
7633 :
7634 0 : case DNSSRV_TYPEID_ZONE: {
7635 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Zone));
7636 0 : break; }
7637 :
7638 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET: {
7639 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneInfoDotNet));
7640 0 : break; }
7641 :
7642 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET: {
7643 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->SecondariesDotNet));
7644 0 : break; }
7645 :
7646 0 : case DNSSRV_TYPEID_ZONE_DATABASE: {
7647 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Database));
7648 0 : break; }
7649 :
7650 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET: {
7651 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneCreateDotNet));
7652 0 : break; }
7653 :
7654 20 : case DNSSRV_TYPEID_ZONE_LIST: {
7655 20 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneList));
7656 20 : break; }
7657 :
7658 0 : case DNSSRV_TYPEID_ZONE_EXPORT: {
7659 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneExport));
7660 0 : break; }
7661 :
7662 0 : case DNSSRV_TYPEID_DP_INFO: {
7663 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->DirectoryPartition));
7664 0 : break; }
7665 :
7666 0 : case DNSSRV_TYPEID_DP_ENUM: {
7667 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->DirectoryPartitionEnum));
7668 0 : break; }
7669 :
7670 0 : case DNSSRV_TYPEID_DP_LIST: {
7671 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->DirectoryPartitionList));
7672 0 : break; }
7673 :
7674 0 : case DNSSRV_TYPEID_ENLIST_DP: {
7675 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->EnlistDirectoryPartition));
7676 0 : break; }
7677 :
7678 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP: {
7679 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneChangeDirectoryPartition));
7680 0 : break; }
7681 :
7682 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER: {
7683 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->EnumZonesFilter));
7684 0 : break; }
7685 :
7686 0 : case DNSSRV_TYPEID_ADDRARRAY: {
7687 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->AddrArray));
7688 0 : break; }
7689 :
7690 4 : case DNSSRV_TYPEID_SERVER_INFO: {
7691 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ServerInfo));
7692 4 : break; }
7693 :
7694 427 : case DNSSRV_TYPEID_ZONE_CREATE: {
7695 427 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneCreate));
7696 427 : break; }
7697 :
7698 0 : case DNSSRV_TYPEID_FORWARDERS: {
7699 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Forwarders));
7700 0 : break; }
7701 :
7702 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES: {
7703 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Secondaries));
7704 0 : break; }
7705 :
7706 0 : case DNSSRV_TYPEID_IP_VALIDATE: {
7707 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->IpValidate));
7708 0 : break; }
7709 :
7710 17 : case DNSSRV_TYPEID_ZONE_INFO: {
7711 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneInfo));
7712 17 : break; }
7713 :
7714 0 : case DNSSRV_TYPEID_AUTOCONFIGURE: {
7715 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->AutoConfigure));
7716 0 : break; }
7717 :
7718 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST: {
7719 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Utf8StringList));
7720 0 : break; }
7721 :
7722 0 : default:
7723 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7724 : }
7725 : }
7726 1724 : if (ndr_flags & NDR_BUFFERS) {
7727 1724 : if (!(ndr_flags & NDR_SCALARS)) {
7728 : /* We didn't get it above, and the token is not needed after this. */
7729 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7730 : }
7731 1724 : switch (level) {
7732 429 : case DNSSRV_TYPEID_NULL:
7733 429 : if (r->Null) {
7734 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->Null));
7735 : }
7736 429 : break;
7737 :
7738 20 : case DNSSRV_TYPEID_DWORD:
7739 20 : break;
7740 :
7741 0 : case DNSSRV_TYPEID_LPSTR:
7742 0 : if (r->String) {
7743 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->String, CH_UTF8)));
7744 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7745 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->String, CH_UTF8)));
7746 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->String, ndr_charset_length(r->String, CH_UTF8), sizeof(uint8_t), CH_UTF8));
7747 : }
7748 0 : break;
7749 :
7750 0 : case DNSSRV_TYPEID_LPWSTR:
7751 0 : if (r->WideString) {
7752 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->WideString, CH_UTF16)));
7753 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7754 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->WideString, CH_UTF16)));
7755 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->WideString, ndr_charset_length(r->WideString, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7756 : }
7757 0 : break;
7758 :
7759 0 : case DNSSRV_TYPEID_IPARRAY:
7760 0 : if (r->IpArray) {
7761 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->IpArray));
7762 : }
7763 0 : break;
7764 :
7765 0 : case DNSSRV_TYPEID_BUFFER:
7766 0 : if (r->Buffer) {
7767 0 : NDR_CHECK(ndr_push_DNS_RPC_BUFFER(ndr, NDR_SCALARS, r->Buffer));
7768 : }
7769 0 : break;
7770 :
7771 4 : case DNSSRV_TYPEID_SERVER_INFO_W2K:
7772 4 : if (r->ServerInfoW2K) {
7773 4 : NDR_CHECK(ndr_push_DNS_RPC_SERVER_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfoW2K));
7774 : }
7775 4 : break;
7776 :
7777 0 : case DNSSRV_TYPEID_STATS:
7778 0 : if (r->Stats) {
7779 0 : NDR_CHECK(ndr_push_DNSSRV_STAT(ndr, NDR_SCALARS, r->Stats));
7780 : }
7781 0 : break;
7782 :
7783 0 : case DNSSRV_TYPEID_FORWARDERS_W2K:
7784 0 : if (r->ForwardersW2K) {
7785 0 : NDR_CHECK(ndr_push_DNS_RPC_FORWARDERS_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ForwardersW2K));
7786 : }
7787 0 : break;
7788 :
7789 0 : case DNSSRV_TYPEID_ZONE_W2K:
7790 0 : if (r->ZoneW2K) {
7791 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneW2K));
7792 : }
7793 0 : break;
7794 :
7795 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K:
7796 0 : if (r->ZoneInfoW2K) {
7797 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfoW2K));
7798 : }
7799 0 : break;
7800 :
7801 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
7802 0 : if (r->SecondariesW2K) {
7803 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_SECONDARIES_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->SecondariesW2K));
7804 : }
7805 0 : break;
7806 :
7807 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
7808 0 : if (r->DatabaseW2K) {
7809 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_DATABASE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->DatabaseW2K));
7810 : }
7811 0 : break;
7812 :
7813 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K:
7814 0 : if (r->ZoneCreateW2K) {
7815 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_CREATE_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreateW2K));
7816 : }
7817 0 : break;
7818 :
7819 799 : case DNSSRV_TYPEID_NAME_AND_PARAM:
7820 799 : if (r->NameAndParam) {
7821 799 : NDR_CHECK(ndr_push_DNS_RPC_NAME_AND_PARAM(ndr, NDR_SCALARS|NDR_BUFFERS, r->NameAndParam));
7822 : }
7823 799 : break;
7824 :
7825 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K:
7826 0 : if (r->ZoneListW2K) {
7827 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_LIST_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneListW2K));
7828 : }
7829 0 : break;
7830 :
7831 4 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
7832 4 : if (r->ServerInfoDotNet) {
7833 4 : NDR_CHECK(ndr_push_DNS_RPC_SERVER_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfoDotNet));
7834 : }
7835 4 : break;
7836 :
7837 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET:
7838 0 : if (r->ForwardersDotNet) {
7839 0 : NDR_CHECK(ndr_push_DNS_RPC_FORWARDERS_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ForwardersDotNet));
7840 : }
7841 0 : break;
7842 :
7843 0 : case DNSSRV_TYPEID_ZONE:
7844 0 : if (r->Zone) {
7845 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->Zone));
7846 : }
7847 0 : break;
7848 :
7849 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
7850 0 : if (r->ZoneInfoDotNet) {
7851 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfoDotNet));
7852 : }
7853 0 : break;
7854 :
7855 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
7856 0 : if (r->SecondariesDotNet) {
7857 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_SECONDARIES_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->SecondariesDotNet));
7858 : }
7859 0 : break;
7860 :
7861 0 : case DNSSRV_TYPEID_ZONE_DATABASE:
7862 0 : if (r->Database) {
7863 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_DATABASE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->Database));
7864 : }
7865 0 : break;
7866 :
7867 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
7868 0 : if (r->ZoneCreateDotNet) {
7869 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_CREATE_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreateDotNet));
7870 : }
7871 0 : break;
7872 :
7873 20 : case DNSSRV_TYPEID_ZONE_LIST:
7874 20 : if (r->ZoneList) {
7875 20 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_LIST_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneList));
7876 : }
7877 20 : break;
7878 :
7879 0 : case DNSSRV_TYPEID_ZONE_EXPORT:
7880 0 : if (r->ZoneExport) {
7881 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_EXPORT_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneExport));
7882 : }
7883 0 : break;
7884 :
7885 0 : case DNSSRV_TYPEID_DP_INFO:
7886 0 : if (r->DirectoryPartition) {
7887 0 : NDR_CHECK(ndr_push_DNS_RPC_DP_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartition));
7888 : }
7889 0 : break;
7890 :
7891 0 : case DNSSRV_TYPEID_DP_ENUM:
7892 0 : if (r->DirectoryPartitionEnum) {
7893 0 : NDR_CHECK(ndr_push_DNS_RPC_DP_ENUM(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartitionEnum));
7894 : }
7895 0 : break;
7896 :
7897 0 : case DNSSRV_TYPEID_DP_LIST:
7898 0 : if (r->DirectoryPartitionList) {
7899 0 : NDR_CHECK(ndr_push_DNS_RPC_DP_LIST(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartitionList));
7900 : }
7901 0 : break;
7902 :
7903 0 : case DNSSRV_TYPEID_ENLIST_DP:
7904 0 : if (r->EnlistDirectoryPartition) {
7905 0 : NDR_CHECK(ndr_push_DNS_RPC_ENLIST_DP(ndr, NDR_SCALARS|NDR_BUFFERS, r->EnlistDirectoryPartition));
7906 : }
7907 0 : break;
7908 :
7909 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP:
7910 0 : if (r->ZoneChangeDirectoryPartition) {
7911 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_CHANGE_DP(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneChangeDirectoryPartition));
7912 : }
7913 0 : break;
7914 :
7915 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
7916 0 : if (r->EnumZonesFilter) {
7917 0 : NDR_CHECK(ndr_push_DNS_RPC_ENUM_ZONES_FILTER(ndr, NDR_SCALARS|NDR_BUFFERS, r->EnumZonesFilter));
7918 : }
7919 0 : break;
7920 :
7921 0 : case DNSSRV_TYPEID_ADDRARRAY:
7922 0 : if (r->AddrArray) {
7923 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->AddrArray));
7924 : }
7925 0 : break;
7926 :
7927 4 : case DNSSRV_TYPEID_SERVER_INFO:
7928 4 : if (r->ServerInfo) {
7929 4 : NDR_CHECK(ndr_push_DNS_RPC_SERVER_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfo));
7930 : }
7931 4 : break;
7932 :
7933 427 : case DNSSRV_TYPEID_ZONE_CREATE:
7934 427 : if (r->ZoneCreate) {
7935 427 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreate));
7936 : }
7937 427 : break;
7938 :
7939 0 : case DNSSRV_TYPEID_FORWARDERS:
7940 0 : if (r->Forwarders) {
7941 0 : NDR_CHECK(ndr_push_DNS_RPC_FORWARDERS_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->Forwarders));
7942 : }
7943 0 : break;
7944 :
7945 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES:
7946 0 : if (r->Secondaries) {
7947 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_SECONDARIES_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->Secondaries));
7948 : }
7949 0 : break;
7950 :
7951 0 : case DNSSRV_TYPEID_IP_VALIDATE:
7952 0 : if (r->IpValidate) {
7953 0 : NDR_CHECK(ndr_push_DNS_RPC_IP_VALIDATE(ndr, NDR_SCALARS|NDR_BUFFERS, r->IpValidate));
7954 : }
7955 0 : break;
7956 :
7957 17 : case DNSSRV_TYPEID_ZONE_INFO:
7958 17 : if (r->ZoneInfo) {
7959 17 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfo));
7960 : }
7961 17 : break;
7962 :
7963 0 : case DNSSRV_TYPEID_AUTOCONFIGURE:
7964 0 : if (r->AutoConfigure) {
7965 0 : NDR_CHECK(ndr_push_DNS_RPC_AUTOCONFIGURE(ndr, NDR_SCALARS|NDR_BUFFERS, r->AutoConfigure));
7966 : }
7967 0 : break;
7968 :
7969 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST:
7970 0 : if (r->Utf8StringList) {
7971 0 : NDR_CHECK(ndr_push_DNS_RPC_UTF8_STRING_LIST(ndr, NDR_SCALARS|NDR_BUFFERS, r->Utf8StringList));
7972 : }
7973 0 : break;
7974 :
7975 0 : default:
7976 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7977 : }
7978 : }
7979 1724 : return NDR_ERR_SUCCESS;
7980 : }
7981 :
7982 1724 : static enum ndr_err_code ndr_pull_DNSSRV_RPC_UNION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union DNSSRV_RPC_UNION *r)
7983 : {
7984 0 : uint32_t level;
7985 0 : uint32_t _level;
7986 1724 : TALLOC_CTX *_mem_save_Null_0 = NULL;
7987 0 : uint32_t _ptr_Null;
7988 1724 : TALLOC_CTX *_mem_save_String_0 = NULL;
7989 0 : uint32_t _ptr_String;
7990 1724 : uint32_t size_String_1 = 0;
7991 1724 : uint32_t length_String_1 = 0;
7992 1724 : TALLOC_CTX *_mem_save_WideString_0 = NULL;
7993 0 : uint32_t _ptr_WideString;
7994 1724 : uint32_t size_WideString_1 = 0;
7995 1724 : uint32_t length_WideString_1 = 0;
7996 1724 : TALLOC_CTX *_mem_save_IpArray_0 = NULL;
7997 0 : uint32_t _ptr_IpArray;
7998 1724 : TALLOC_CTX *_mem_save_Buffer_0 = NULL;
7999 0 : uint32_t _ptr_Buffer;
8000 1724 : TALLOC_CTX *_mem_save_ServerInfoW2K_0 = NULL;
8001 0 : uint32_t _ptr_ServerInfoW2K;
8002 1724 : TALLOC_CTX *_mem_save_Stats_0 = NULL;
8003 0 : uint32_t _ptr_Stats;
8004 1724 : TALLOC_CTX *_mem_save_ForwardersW2K_0 = NULL;
8005 0 : uint32_t _ptr_ForwardersW2K;
8006 1724 : TALLOC_CTX *_mem_save_ZoneW2K_0 = NULL;
8007 0 : uint32_t _ptr_ZoneW2K;
8008 1724 : TALLOC_CTX *_mem_save_ZoneInfoW2K_0 = NULL;
8009 0 : uint32_t _ptr_ZoneInfoW2K;
8010 1724 : TALLOC_CTX *_mem_save_SecondariesW2K_0 = NULL;
8011 0 : uint32_t _ptr_SecondariesW2K;
8012 1724 : TALLOC_CTX *_mem_save_DatabaseW2K_0 = NULL;
8013 0 : uint32_t _ptr_DatabaseW2K;
8014 1724 : TALLOC_CTX *_mem_save_ZoneCreateW2K_0 = NULL;
8015 0 : uint32_t _ptr_ZoneCreateW2K;
8016 1724 : TALLOC_CTX *_mem_save_NameAndParam_0 = NULL;
8017 0 : uint32_t _ptr_NameAndParam;
8018 1724 : TALLOC_CTX *_mem_save_ZoneListW2K_0 = NULL;
8019 0 : uint32_t _ptr_ZoneListW2K;
8020 1724 : TALLOC_CTX *_mem_save_ServerInfoDotNet_0 = NULL;
8021 0 : uint32_t _ptr_ServerInfoDotNet;
8022 1724 : TALLOC_CTX *_mem_save_ForwardersDotNet_0 = NULL;
8023 0 : uint32_t _ptr_ForwardersDotNet;
8024 1724 : TALLOC_CTX *_mem_save_Zone_0 = NULL;
8025 0 : uint32_t _ptr_Zone;
8026 1724 : TALLOC_CTX *_mem_save_ZoneInfoDotNet_0 = NULL;
8027 0 : uint32_t _ptr_ZoneInfoDotNet;
8028 1724 : TALLOC_CTX *_mem_save_SecondariesDotNet_0 = NULL;
8029 0 : uint32_t _ptr_SecondariesDotNet;
8030 1724 : TALLOC_CTX *_mem_save_Database_0 = NULL;
8031 0 : uint32_t _ptr_Database;
8032 1724 : TALLOC_CTX *_mem_save_ZoneCreateDotNet_0 = NULL;
8033 0 : uint32_t _ptr_ZoneCreateDotNet;
8034 1724 : TALLOC_CTX *_mem_save_ZoneList_0 = NULL;
8035 0 : uint32_t _ptr_ZoneList;
8036 1724 : TALLOC_CTX *_mem_save_ZoneExport_0 = NULL;
8037 0 : uint32_t _ptr_ZoneExport;
8038 1724 : TALLOC_CTX *_mem_save_DirectoryPartition_0 = NULL;
8039 0 : uint32_t _ptr_DirectoryPartition;
8040 1724 : TALLOC_CTX *_mem_save_DirectoryPartitionEnum_0 = NULL;
8041 0 : uint32_t _ptr_DirectoryPartitionEnum;
8042 1724 : TALLOC_CTX *_mem_save_DirectoryPartitionList_0 = NULL;
8043 0 : uint32_t _ptr_DirectoryPartitionList;
8044 1724 : TALLOC_CTX *_mem_save_EnlistDirectoryPartition_0 = NULL;
8045 0 : uint32_t _ptr_EnlistDirectoryPartition;
8046 1724 : TALLOC_CTX *_mem_save_ZoneChangeDirectoryPartition_0 = NULL;
8047 0 : uint32_t _ptr_ZoneChangeDirectoryPartition;
8048 1724 : TALLOC_CTX *_mem_save_EnumZonesFilter_0 = NULL;
8049 0 : uint32_t _ptr_EnumZonesFilter;
8050 1724 : TALLOC_CTX *_mem_save_AddrArray_0 = NULL;
8051 0 : uint32_t _ptr_AddrArray;
8052 1724 : TALLOC_CTX *_mem_save_ServerInfo_0 = NULL;
8053 0 : uint32_t _ptr_ServerInfo;
8054 1724 : TALLOC_CTX *_mem_save_ZoneCreate_0 = NULL;
8055 0 : uint32_t _ptr_ZoneCreate;
8056 1724 : TALLOC_CTX *_mem_save_Forwarders_0 = NULL;
8057 0 : uint32_t _ptr_Forwarders;
8058 1724 : TALLOC_CTX *_mem_save_Secondaries_0 = NULL;
8059 0 : uint32_t _ptr_Secondaries;
8060 1724 : TALLOC_CTX *_mem_save_IpValidate_0 = NULL;
8061 0 : uint32_t _ptr_IpValidate;
8062 1724 : TALLOC_CTX *_mem_save_ZoneInfo_0 = NULL;
8063 0 : uint32_t _ptr_ZoneInfo;
8064 1724 : TALLOC_CTX *_mem_save_AutoConfigure_0 = NULL;
8065 0 : uint32_t _ptr_AutoConfigure;
8066 1724 : TALLOC_CTX *_mem_save_Utf8StringList_0 = NULL;
8067 0 : uint32_t _ptr_Utf8StringList;
8068 1724 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8069 1724 : if (ndr_flags & NDR_SCALARS) {
8070 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8071 1724 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8072 1724 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
8073 1724 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_level));
8074 1724 : if (_level != level) {
8075 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
8076 : }
8077 1724 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
8078 1724 : switch (level) {
8079 429 : case DNSSRV_TYPEID_NULL: {
8080 429 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Null));
8081 429 : if (_ptr_Null) {
8082 0 : NDR_PULL_ALLOC(ndr, r->Null);
8083 : } else {
8084 429 : r->Null = NULL;
8085 : }
8086 429 : break; }
8087 :
8088 20 : case DNSSRV_TYPEID_DWORD: {
8089 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Dword));
8090 20 : break; }
8091 :
8092 0 : case DNSSRV_TYPEID_LPSTR: {
8093 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_String));
8094 0 : if (_ptr_String) {
8095 0 : NDR_PULL_ALLOC(ndr, r->String);
8096 : } else {
8097 0 : r->String = NULL;
8098 : }
8099 0 : break; }
8100 :
8101 0 : case DNSSRV_TYPEID_LPWSTR: {
8102 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_WideString));
8103 0 : if (_ptr_WideString) {
8104 0 : NDR_PULL_ALLOC(ndr, r->WideString);
8105 : } else {
8106 0 : r->WideString = NULL;
8107 : }
8108 0 : break; }
8109 :
8110 0 : case DNSSRV_TYPEID_IPARRAY: {
8111 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_IpArray));
8112 0 : if (_ptr_IpArray) {
8113 0 : NDR_PULL_ALLOC(ndr, r->IpArray);
8114 : } else {
8115 0 : r->IpArray = NULL;
8116 : }
8117 0 : break; }
8118 :
8119 0 : case DNSSRV_TYPEID_BUFFER: {
8120 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Buffer));
8121 0 : if (_ptr_Buffer) {
8122 0 : NDR_PULL_ALLOC(ndr, r->Buffer);
8123 : } else {
8124 0 : r->Buffer = NULL;
8125 : }
8126 0 : break; }
8127 :
8128 4 : case DNSSRV_TYPEID_SERVER_INFO_W2K: {
8129 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServerInfoW2K));
8130 4 : if (_ptr_ServerInfoW2K) {
8131 4 : NDR_PULL_ALLOC(ndr, r->ServerInfoW2K);
8132 : } else {
8133 0 : r->ServerInfoW2K = NULL;
8134 : }
8135 4 : break; }
8136 :
8137 0 : case DNSSRV_TYPEID_STATS: {
8138 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Stats));
8139 0 : if (_ptr_Stats) {
8140 0 : NDR_PULL_ALLOC(ndr, r->Stats);
8141 : } else {
8142 0 : r->Stats = NULL;
8143 : }
8144 0 : break; }
8145 :
8146 0 : case DNSSRV_TYPEID_FORWARDERS_W2K: {
8147 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ForwardersW2K));
8148 0 : if (_ptr_ForwardersW2K) {
8149 0 : NDR_PULL_ALLOC(ndr, r->ForwardersW2K);
8150 : } else {
8151 0 : r->ForwardersW2K = NULL;
8152 : }
8153 0 : break; }
8154 :
8155 0 : case DNSSRV_TYPEID_ZONE_W2K: {
8156 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneW2K));
8157 0 : if (_ptr_ZoneW2K) {
8158 0 : NDR_PULL_ALLOC(ndr, r->ZoneW2K);
8159 : } else {
8160 0 : r->ZoneW2K = NULL;
8161 : }
8162 0 : break; }
8163 :
8164 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K: {
8165 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneInfoW2K));
8166 0 : if (_ptr_ZoneInfoW2K) {
8167 0 : NDR_PULL_ALLOC(ndr, r->ZoneInfoW2K);
8168 : } else {
8169 0 : r->ZoneInfoW2K = NULL;
8170 : }
8171 0 : break; }
8172 :
8173 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K: {
8174 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_SecondariesW2K));
8175 0 : if (_ptr_SecondariesW2K) {
8176 0 : NDR_PULL_ALLOC(ndr, r->SecondariesW2K);
8177 : } else {
8178 0 : r->SecondariesW2K = NULL;
8179 : }
8180 0 : break; }
8181 :
8182 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K: {
8183 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseW2K));
8184 0 : if (_ptr_DatabaseW2K) {
8185 0 : NDR_PULL_ALLOC(ndr, r->DatabaseW2K);
8186 : } else {
8187 0 : r->DatabaseW2K = NULL;
8188 : }
8189 0 : break; }
8190 :
8191 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K: {
8192 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneCreateW2K));
8193 0 : if (_ptr_ZoneCreateW2K) {
8194 0 : NDR_PULL_ALLOC(ndr, r->ZoneCreateW2K);
8195 : } else {
8196 0 : r->ZoneCreateW2K = NULL;
8197 : }
8198 0 : break; }
8199 :
8200 799 : case DNSSRV_TYPEID_NAME_AND_PARAM: {
8201 799 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_NameAndParam));
8202 799 : if (_ptr_NameAndParam) {
8203 799 : NDR_PULL_ALLOC(ndr, r->NameAndParam);
8204 : } else {
8205 0 : r->NameAndParam = NULL;
8206 : }
8207 799 : break; }
8208 :
8209 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K: {
8210 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneListW2K));
8211 0 : if (_ptr_ZoneListW2K) {
8212 0 : NDR_PULL_ALLOC(ndr, r->ZoneListW2K);
8213 : } else {
8214 0 : r->ZoneListW2K = NULL;
8215 : }
8216 0 : break; }
8217 :
8218 4 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET: {
8219 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServerInfoDotNet));
8220 4 : if (_ptr_ServerInfoDotNet) {
8221 4 : NDR_PULL_ALLOC(ndr, r->ServerInfoDotNet);
8222 : } else {
8223 0 : r->ServerInfoDotNet = NULL;
8224 : }
8225 4 : break; }
8226 :
8227 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET: {
8228 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ForwardersDotNet));
8229 0 : if (_ptr_ForwardersDotNet) {
8230 0 : NDR_PULL_ALLOC(ndr, r->ForwardersDotNet);
8231 : } else {
8232 0 : r->ForwardersDotNet = NULL;
8233 : }
8234 0 : break; }
8235 :
8236 0 : case DNSSRV_TYPEID_ZONE: {
8237 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Zone));
8238 0 : if (_ptr_Zone) {
8239 0 : NDR_PULL_ALLOC(ndr, r->Zone);
8240 : } else {
8241 0 : r->Zone = NULL;
8242 : }
8243 0 : break; }
8244 :
8245 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET: {
8246 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneInfoDotNet));
8247 0 : if (_ptr_ZoneInfoDotNet) {
8248 0 : NDR_PULL_ALLOC(ndr, r->ZoneInfoDotNet);
8249 : } else {
8250 0 : r->ZoneInfoDotNet = NULL;
8251 : }
8252 0 : break; }
8253 :
8254 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET: {
8255 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_SecondariesDotNet));
8256 0 : if (_ptr_SecondariesDotNet) {
8257 0 : NDR_PULL_ALLOC(ndr, r->SecondariesDotNet);
8258 : } else {
8259 0 : r->SecondariesDotNet = NULL;
8260 : }
8261 0 : break; }
8262 :
8263 0 : case DNSSRV_TYPEID_ZONE_DATABASE: {
8264 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Database));
8265 0 : if (_ptr_Database) {
8266 0 : NDR_PULL_ALLOC(ndr, r->Database);
8267 : } else {
8268 0 : r->Database = NULL;
8269 : }
8270 0 : break; }
8271 :
8272 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET: {
8273 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneCreateDotNet));
8274 0 : if (_ptr_ZoneCreateDotNet) {
8275 0 : NDR_PULL_ALLOC(ndr, r->ZoneCreateDotNet);
8276 : } else {
8277 0 : r->ZoneCreateDotNet = NULL;
8278 : }
8279 0 : break; }
8280 :
8281 20 : case DNSSRV_TYPEID_ZONE_LIST: {
8282 20 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneList));
8283 20 : if (_ptr_ZoneList) {
8284 20 : NDR_PULL_ALLOC(ndr, r->ZoneList);
8285 : } else {
8286 0 : r->ZoneList = NULL;
8287 : }
8288 20 : break; }
8289 :
8290 0 : case DNSSRV_TYPEID_ZONE_EXPORT: {
8291 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneExport));
8292 0 : if (_ptr_ZoneExport) {
8293 0 : NDR_PULL_ALLOC(ndr, r->ZoneExport);
8294 : } else {
8295 0 : r->ZoneExport = NULL;
8296 : }
8297 0 : break; }
8298 :
8299 0 : case DNSSRV_TYPEID_DP_INFO: {
8300 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DirectoryPartition));
8301 0 : if (_ptr_DirectoryPartition) {
8302 0 : NDR_PULL_ALLOC(ndr, r->DirectoryPartition);
8303 : } else {
8304 0 : r->DirectoryPartition = NULL;
8305 : }
8306 0 : break; }
8307 :
8308 0 : case DNSSRV_TYPEID_DP_ENUM: {
8309 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DirectoryPartitionEnum));
8310 0 : if (_ptr_DirectoryPartitionEnum) {
8311 0 : NDR_PULL_ALLOC(ndr, r->DirectoryPartitionEnum);
8312 : } else {
8313 0 : r->DirectoryPartitionEnum = NULL;
8314 : }
8315 0 : break; }
8316 :
8317 0 : case DNSSRV_TYPEID_DP_LIST: {
8318 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DirectoryPartitionList));
8319 0 : if (_ptr_DirectoryPartitionList) {
8320 0 : NDR_PULL_ALLOC(ndr, r->DirectoryPartitionList);
8321 : } else {
8322 0 : r->DirectoryPartitionList = NULL;
8323 : }
8324 0 : break; }
8325 :
8326 0 : case DNSSRV_TYPEID_ENLIST_DP: {
8327 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EnlistDirectoryPartition));
8328 0 : if (_ptr_EnlistDirectoryPartition) {
8329 0 : NDR_PULL_ALLOC(ndr, r->EnlistDirectoryPartition);
8330 : } else {
8331 0 : r->EnlistDirectoryPartition = NULL;
8332 : }
8333 0 : break; }
8334 :
8335 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP: {
8336 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneChangeDirectoryPartition));
8337 0 : if (_ptr_ZoneChangeDirectoryPartition) {
8338 0 : NDR_PULL_ALLOC(ndr, r->ZoneChangeDirectoryPartition);
8339 : } else {
8340 0 : r->ZoneChangeDirectoryPartition = NULL;
8341 : }
8342 0 : break; }
8343 :
8344 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER: {
8345 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EnumZonesFilter));
8346 0 : if (_ptr_EnumZonesFilter) {
8347 0 : NDR_PULL_ALLOC(ndr, r->EnumZonesFilter);
8348 : } else {
8349 0 : r->EnumZonesFilter = NULL;
8350 : }
8351 0 : break; }
8352 :
8353 0 : case DNSSRV_TYPEID_ADDRARRAY: {
8354 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_AddrArray));
8355 0 : if (_ptr_AddrArray) {
8356 0 : NDR_PULL_ALLOC(ndr, r->AddrArray);
8357 : } else {
8358 0 : r->AddrArray = NULL;
8359 : }
8360 0 : break; }
8361 :
8362 4 : case DNSSRV_TYPEID_SERVER_INFO: {
8363 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServerInfo));
8364 4 : if (_ptr_ServerInfo) {
8365 4 : NDR_PULL_ALLOC(ndr, r->ServerInfo);
8366 : } else {
8367 0 : r->ServerInfo = NULL;
8368 : }
8369 4 : break; }
8370 :
8371 427 : case DNSSRV_TYPEID_ZONE_CREATE: {
8372 427 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneCreate));
8373 427 : if (_ptr_ZoneCreate) {
8374 427 : NDR_PULL_ALLOC(ndr, r->ZoneCreate);
8375 : } else {
8376 0 : r->ZoneCreate = NULL;
8377 : }
8378 427 : break; }
8379 :
8380 0 : case DNSSRV_TYPEID_FORWARDERS: {
8381 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Forwarders));
8382 0 : if (_ptr_Forwarders) {
8383 0 : NDR_PULL_ALLOC(ndr, r->Forwarders);
8384 : } else {
8385 0 : r->Forwarders = NULL;
8386 : }
8387 0 : break; }
8388 :
8389 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES: {
8390 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Secondaries));
8391 0 : if (_ptr_Secondaries) {
8392 0 : NDR_PULL_ALLOC(ndr, r->Secondaries);
8393 : } else {
8394 0 : r->Secondaries = NULL;
8395 : }
8396 0 : break; }
8397 :
8398 0 : case DNSSRV_TYPEID_IP_VALIDATE: {
8399 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_IpValidate));
8400 0 : if (_ptr_IpValidate) {
8401 0 : NDR_PULL_ALLOC(ndr, r->IpValidate);
8402 : } else {
8403 0 : r->IpValidate = NULL;
8404 : }
8405 0 : break; }
8406 :
8407 17 : case DNSSRV_TYPEID_ZONE_INFO: {
8408 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneInfo));
8409 17 : if (_ptr_ZoneInfo) {
8410 17 : NDR_PULL_ALLOC(ndr, r->ZoneInfo);
8411 : } else {
8412 0 : r->ZoneInfo = NULL;
8413 : }
8414 17 : break; }
8415 :
8416 0 : case DNSSRV_TYPEID_AUTOCONFIGURE: {
8417 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_AutoConfigure));
8418 0 : if (_ptr_AutoConfigure) {
8419 0 : NDR_PULL_ALLOC(ndr, r->AutoConfigure);
8420 : } else {
8421 0 : r->AutoConfigure = NULL;
8422 : }
8423 0 : break; }
8424 :
8425 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST: {
8426 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Utf8StringList));
8427 0 : if (_ptr_Utf8StringList) {
8428 0 : NDR_PULL_ALLOC(ndr, r->Utf8StringList);
8429 : } else {
8430 0 : r->Utf8StringList = NULL;
8431 : }
8432 0 : break; }
8433 :
8434 0 : default:
8435 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
8436 : }
8437 : }
8438 1724 : if (ndr_flags & NDR_BUFFERS) {
8439 1724 : if (!(ndr_flags & NDR_SCALARS)) {
8440 : /* We didn't get it above, and the token is not needed after this. */
8441 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8442 : }
8443 1724 : switch (level) {
8444 429 : case DNSSRV_TYPEID_NULL:
8445 429 : if (r->Null) {
8446 0 : _mem_save_Null_0 = NDR_PULL_GET_MEM_CTX(ndr);
8447 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Null, 0);
8448 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->Null));
8449 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Null_0, 0);
8450 : }
8451 429 : break;
8452 :
8453 20 : case DNSSRV_TYPEID_DWORD:
8454 20 : break;
8455 :
8456 0 : case DNSSRV_TYPEID_LPSTR:
8457 0 : if (r->String) {
8458 0 : _mem_save_String_0 = NDR_PULL_GET_MEM_CTX(ndr);
8459 0 : NDR_PULL_SET_MEM_CTX(ndr, r->String, 0);
8460 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->String));
8461 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->String));
8462 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->String, &size_String_1));
8463 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->String, &length_String_1));
8464 0 : if (length_String_1 > size_String_1) {
8465 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_String_1, length_String_1);
8466 : }
8467 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_String_1, sizeof(uint8_t)));
8468 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->String, length_String_1, sizeof(uint8_t), CH_UTF8));
8469 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_String_0, 0);
8470 : }
8471 0 : break;
8472 :
8473 0 : case DNSSRV_TYPEID_LPWSTR:
8474 0 : if (r->WideString) {
8475 0 : _mem_save_WideString_0 = NDR_PULL_GET_MEM_CTX(ndr);
8476 0 : NDR_PULL_SET_MEM_CTX(ndr, r->WideString, 0);
8477 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->WideString));
8478 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->WideString));
8479 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->WideString, &size_WideString_1));
8480 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->WideString, &length_WideString_1));
8481 0 : if (length_WideString_1 > size_WideString_1) {
8482 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_WideString_1, length_WideString_1);
8483 : }
8484 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_WideString_1, sizeof(uint16_t)));
8485 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->WideString, length_WideString_1, sizeof(uint16_t), CH_UTF16));
8486 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_WideString_0, 0);
8487 : }
8488 0 : break;
8489 :
8490 0 : case DNSSRV_TYPEID_IPARRAY:
8491 0 : if (r->IpArray) {
8492 0 : _mem_save_IpArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
8493 0 : NDR_PULL_SET_MEM_CTX(ndr, r->IpArray, 0);
8494 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->IpArray));
8495 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_IpArray_0, 0);
8496 : }
8497 0 : break;
8498 :
8499 0 : case DNSSRV_TYPEID_BUFFER:
8500 0 : if (r->Buffer) {
8501 0 : _mem_save_Buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
8502 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Buffer, 0);
8503 0 : NDR_CHECK(ndr_pull_DNS_RPC_BUFFER(ndr, NDR_SCALARS, r->Buffer));
8504 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Buffer_0, 0);
8505 : }
8506 0 : break;
8507 :
8508 4 : case DNSSRV_TYPEID_SERVER_INFO_W2K:
8509 4 : if (r->ServerInfoW2K) {
8510 4 : _mem_save_ServerInfoW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8511 4 : NDR_PULL_SET_MEM_CTX(ndr, r->ServerInfoW2K, 0);
8512 4 : NDR_CHECK(ndr_pull_DNS_RPC_SERVER_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfoW2K));
8513 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServerInfoW2K_0, 0);
8514 : }
8515 4 : break;
8516 :
8517 0 : case DNSSRV_TYPEID_STATS:
8518 0 : if (r->Stats) {
8519 0 : _mem_save_Stats_0 = NDR_PULL_GET_MEM_CTX(ndr);
8520 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Stats, 0);
8521 0 : NDR_CHECK(ndr_pull_DNSSRV_STAT(ndr, NDR_SCALARS, r->Stats));
8522 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Stats_0, 0);
8523 : }
8524 0 : break;
8525 :
8526 0 : case DNSSRV_TYPEID_FORWARDERS_W2K:
8527 0 : if (r->ForwardersW2K) {
8528 0 : _mem_save_ForwardersW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8529 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ForwardersW2K, 0);
8530 0 : NDR_CHECK(ndr_pull_DNS_RPC_FORWARDERS_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ForwardersW2K));
8531 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ForwardersW2K_0, 0);
8532 : }
8533 0 : break;
8534 :
8535 0 : case DNSSRV_TYPEID_ZONE_W2K:
8536 0 : if (r->ZoneW2K) {
8537 0 : _mem_save_ZoneW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8538 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneW2K, 0);
8539 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneW2K));
8540 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneW2K_0, 0);
8541 : }
8542 0 : break;
8543 :
8544 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K:
8545 0 : if (r->ZoneInfoW2K) {
8546 0 : _mem_save_ZoneInfoW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8547 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneInfoW2K, 0);
8548 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfoW2K));
8549 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneInfoW2K_0, 0);
8550 : }
8551 0 : break;
8552 :
8553 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
8554 0 : if (r->SecondariesW2K) {
8555 0 : _mem_save_SecondariesW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8556 0 : NDR_PULL_SET_MEM_CTX(ndr, r->SecondariesW2K, 0);
8557 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_SECONDARIES_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->SecondariesW2K));
8558 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SecondariesW2K_0, 0);
8559 : }
8560 0 : break;
8561 :
8562 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
8563 0 : if (r->DatabaseW2K) {
8564 0 : _mem_save_DatabaseW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8565 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DatabaseW2K, 0);
8566 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_DATABASE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->DatabaseW2K));
8567 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseW2K_0, 0);
8568 : }
8569 0 : break;
8570 :
8571 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K:
8572 0 : if (r->ZoneCreateW2K) {
8573 0 : _mem_save_ZoneCreateW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8574 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneCreateW2K, 0);
8575 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_CREATE_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreateW2K));
8576 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneCreateW2K_0, 0);
8577 : }
8578 0 : break;
8579 :
8580 799 : case DNSSRV_TYPEID_NAME_AND_PARAM:
8581 799 : if (r->NameAndParam) {
8582 799 : _mem_save_NameAndParam_0 = NDR_PULL_GET_MEM_CTX(ndr);
8583 799 : NDR_PULL_SET_MEM_CTX(ndr, r->NameAndParam, 0);
8584 799 : NDR_CHECK(ndr_pull_DNS_RPC_NAME_AND_PARAM(ndr, NDR_SCALARS|NDR_BUFFERS, r->NameAndParam));
8585 799 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_NameAndParam_0, 0);
8586 : }
8587 799 : break;
8588 :
8589 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K:
8590 0 : if (r->ZoneListW2K) {
8591 0 : _mem_save_ZoneListW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8592 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneListW2K, 0);
8593 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_LIST_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneListW2K));
8594 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneListW2K_0, 0);
8595 : }
8596 0 : break;
8597 :
8598 4 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
8599 4 : if (r->ServerInfoDotNet) {
8600 4 : _mem_save_ServerInfoDotNet_0 = NDR_PULL_GET_MEM_CTX(ndr);
8601 4 : NDR_PULL_SET_MEM_CTX(ndr, r->ServerInfoDotNet, 0);
8602 4 : NDR_CHECK(ndr_pull_DNS_RPC_SERVER_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfoDotNet));
8603 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServerInfoDotNet_0, 0);
8604 : }
8605 4 : break;
8606 :
8607 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET:
8608 0 : if (r->ForwardersDotNet) {
8609 0 : _mem_save_ForwardersDotNet_0 = NDR_PULL_GET_MEM_CTX(ndr);
8610 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ForwardersDotNet, 0);
8611 0 : NDR_CHECK(ndr_pull_DNS_RPC_FORWARDERS_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ForwardersDotNet));
8612 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ForwardersDotNet_0, 0);
8613 : }
8614 0 : break;
8615 :
8616 0 : case DNSSRV_TYPEID_ZONE:
8617 0 : if (r->Zone) {
8618 0 : _mem_save_Zone_0 = NDR_PULL_GET_MEM_CTX(ndr);
8619 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Zone, 0);
8620 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->Zone));
8621 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Zone_0, 0);
8622 : }
8623 0 : break;
8624 :
8625 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
8626 0 : if (r->ZoneInfoDotNet) {
8627 0 : _mem_save_ZoneInfoDotNet_0 = NDR_PULL_GET_MEM_CTX(ndr);
8628 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneInfoDotNet, 0);
8629 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfoDotNet));
8630 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneInfoDotNet_0, 0);
8631 : }
8632 0 : break;
8633 :
8634 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
8635 0 : if (r->SecondariesDotNet) {
8636 0 : _mem_save_SecondariesDotNet_0 = NDR_PULL_GET_MEM_CTX(ndr);
8637 0 : NDR_PULL_SET_MEM_CTX(ndr, r->SecondariesDotNet, 0);
8638 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_SECONDARIES_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->SecondariesDotNet));
8639 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SecondariesDotNet_0, 0);
8640 : }
8641 0 : break;
8642 :
8643 0 : case DNSSRV_TYPEID_ZONE_DATABASE:
8644 0 : if (r->Database) {
8645 0 : _mem_save_Database_0 = NDR_PULL_GET_MEM_CTX(ndr);
8646 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Database, 0);
8647 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_DATABASE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->Database));
8648 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Database_0, 0);
8649 : }
8650 0 : break;
8651 :
8652 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
8653 0 : if (r->ZoneCreateDotNet) {
8654 0 : _mem_save_ZoneCreateDotNet_0 = NDR_PULL_GET_MEM_CTX(ndr);
8655 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneCreateDotNet, 0);
8656 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_CREATE_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreateDotNet));
8657 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneCreateDotNet_0, 0);
8658 : }
8659 0 : break;
8660 :
8661 20 : case DNSSRV_TYPEID_ZONE_LIST:
8662 20 : if (r->ZoneList) {
8663 20 : _mem_save_ZoneList_0 = NDR_PULL_GET_MEM_CTX(ndr);
8664 20 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneList, 0);
8665 20 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_LIST_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneList));
8666 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneList_0, 0);
8667 : }
8668 20 : break;
8669 :
8670 0 : case DNSSRV_TYPEID_ZONE_EXPORT:
8671 0 : if (r->ZoneExport) {
8672 0 : _mem_save_ZoneExport_0 = NDR_PULL_GET_MEM_CTX(ndr);
8673 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneExport, 0);
8674 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_EXPORT_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneExport));
8675 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneExport_0, 0);
8676 : }
8677 0 : break;
8678 :
8679 0 : case DNSSRV_TYPEID_DP_INFO:
8680 0 : if (r->DirectoryPartition) {
8681 0 : _mem_save_DirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
8682 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DirectoryPartition, 0);
8683 0 : NDR_CHECK(ndr_pull_DNS_RPC_DP_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartition));
8684 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DirectoryPartition_0, 0);
8685 : }
8686 0 : break;
8687 :
8688 0 : case DNSSRV_TYPEID_DP_ENUM:
8689 0 : if (r->DirectoryPartitionEnum) {
8690 0 : _mem_save_DirectoryPartitionEnum_0 = NDR_PULL_GET_MEM_CTX(ndr);
8691 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DirectoryPartitionEnum, 0);
8692 0 : NDR_CHECK(ndr_pull_DNS_RPC_DP_ENUM(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartitionEnum));
8693 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DirectoryPartitionEnum_0, 0);
8694 : }
8695 0 : break;
8696 :
8697 0 : case DNSSRV_TYPEID_DP_LIST:
8698 0 : if (r->DirectoryPartitionList) {
8699 0 : _mem_save_DirectoryPartitionList_0 = NDR_PULL_GET_MEM_CTX(ndr);
8700 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DirectoryPartitionList, 0);
8701 0 : NDR_CHECK(ndr_pull_DNS_RPC_DP_LIST(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartitionList));
8702 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DirectoryPartitionList_0, 0);
8703 : }
8704 0 : break;
8705 :
8706 0 : case DNSSRV_TYPEID_ENLIST_DP:
8707 0 : if (r->EnlistDirectoryPartition) {
8708 0 : _mem_save_EnlistDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
8709 0 : NDR_PULL_SET_MEM_CTX(ndr, r->EnlistDirectoryPartition, 0);
8710 0 : NDR_CHECK(ndr_pull_DNS_RPC_ENLIST_DP(ndr, NDR_SCALARS|NDR_BUFFERS, r->EnlistDirectoryPartition));
8711 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EnlistDirectoryPartition_0, 0);
8712 : }
8713 0 : break;
8714 :
8715 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP:
8716 0 : if (r->ZoneChangeDirectoryPartition) {
8717 0 : _mem_save_ZoneChangeDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
8718 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneChangeDirectoryPartition, 0);
8719 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_CHANGE_DP(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneChangeDirectoryPartition));
8720 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneChangeDirectoryPartition_0, 0);
8721 : }
8722 0 : break;
8723 :
8724 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
8725 0 : if (r->EnumZonesFilter) {
8726 0 : _mem_save_EnumZonesFilter_0 = NDR_PULL_GET_MEM_CTX(ndr);
8727 0 : NDR_PULL_SET_MEM_CTX(ndr, r->EnumZonesFilter, 0);
8728 0 : NDR_CHECK(ndr_pull_DNS_RPC_ENUM_ZONES_FILTER(ndr, NDR_SCALARS|NDR_BUFFERS, r->EnumZonesFilter));
8729 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EnumZonesFilter_0, 0);
8730 : }
8731 0 : break;
8732 :
8733 0 : case DNSSRV_TYPEID_ADDRARRAY:
8734 0 : if (r->AddrArray) {
8735 0 : _mem_save_AddrArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
8736 0 : NDR_PULL_SET_MEM_CTX(ndr, r->AddrArray, 0);
8737 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->AddrArray));
8738 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_AddrArray_0, 0);
8739 : }
8740 0 : break;
8741 :
8742 4 : case DNSSRV_TYPEID_SERVER_INFO:
8743 4 : if (r->ServerInfo) {
8744 4 : _mem_save_ServerInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
8745 4 : NDR_PULL_SET_MEM_CTX(ndr, r->ServerInfo, 0);
8746 4 : NDR_CHECK(ndr_pull_DNS_RPC_SERVER_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfo));
8747 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServerInfo_0, 0);
8748 : }
8749 4 : break;
8750 :
8751 427 : case DNSSRV_TYPEID_ZONE_CREATE:
8752 427 : if (r->ZoneCreate) {
8753 427 : _mem_save_ZoneCreate_0 = NDR_PULL_GET_MEM_CTX(ndr);
8754 427 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneCreate, 0);
8755 427 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreate));
8756 427 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneCreate_0, 0);
8757 : }
8758 427 : break;
8759 :
8760 0 : case DNSSRV_TYPEID_FORWARDERS:
8761 0 : if (r->Forwarders) {
8762 0 : _mem_save_Forwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
8763 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Forwarders, 0);
8764 0 : NDR_CHECK(ndr_pull_DNS_RPC_FORWARDERS_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->Forwarders));
8765 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Forwarders_0, 0);
8766 : }
8767 0 : break;
8768 :
8769 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES:
8770 0 : if (r->Secondaries) {
8771 0 : _mem_save_Secondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
8772 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Secondaries, 0);
8773 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_SECONDARIES_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->Secondaries));
8774 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Secondaries_0, 0);
8775 : }
8776 0 : break;
8777 :
8778 0 : case DNSSRV_TYPEID_IP_VALIDATE:
8779 0 : if (r->IpValidate) {
8780 0 : _mem_save_IpValidate_0 = NDR_PULL_GET_MEM_CTX(ndr);
8781 0 : NDR_PULL_SET_MEM_CTX(ndr, r->IpValidate, 0);
8782 0 : NDR_CHECK(ndr_pull_DNS_RPC_IP_VALIDATE(ndr, NDR_SCALARS|NDR_BUFFERS, r->IpValidate));
8783 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_IpValidate_0, 0);
8784 : }
8785 0 : break;
8786 :
8787 17 : case DNSSRV_TYPEID_ZONE_INFO:
8788 17 : if (r->ZoneInfo) {
8789 17 : _mem_save_ZoneInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
8790 17 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneInfo, 0);
8791 17 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfo));
8792 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneInfo_0, 0);
8793 : }
8794 17 : break;
8795 :
8796 0 : case DNSSRV_TYPEID_AUTOCONFIGURE:
8797 0 : if (r->AutoConfigure) {
8798 0 : _mem_save_AutoConfigure_0 = NDR_PULL_GET_MEM_CTX(ndr);
8799 0 : NDR_PULL_SET_MEM_CTX(ndr, r->AutoConfigure, 0);
8800 0 : NDR_CHECK(ndr_pull_DNS_RPC_AUTOCONFIGURE(ndr, NDR_SCALARS|NDR_BUFFERS, r->AutoConfigure));
8801 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_AutoConfigure_0, 0);
8802 : }
8803 0 : break;
8804 :
8805 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST:
8806 0 : if (r->Utf8StringList) {
8807 0 : _mem_save_Utf8StringList_0 = NDR_PULL_GET_MEM_CTX(ndr);
8808 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Utf8StringList, 0);
8809 0 : NDR_CHECK(ndr_pull_DNS_RPC_UTF8_STRING_LIST(ndr, NDR_SCALARS|NDR_BUFFERS, r->Utf8StringList));
8810 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Utf8StringList_0, 0);
8811 : }
8812 0 : break;
8813 :
8814 0 : default:
8815 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
8816 : }
8817 : }
8818 1724 : return NDR_ERR_SUCCESS;
8819 : }
8820 :
8821 2 : _PUBLIC_ void ndr_print_DNSSRV_RPC_UNION(struct ndr_print *ndr, const char *name, const union DNSSRV_RPC_UNION *r)
8822 : {
8823 0 : uint32_t level;
8824 2 : level = ndr_print_steal_switch_value(ndr, r);
8825 2 : ndr_print_union(ndr, name, level, "DNSSRV_RPC_UNION");
8826 2 : switch (level) {
8827 2 : case DNSSRV_TYPEID_NULL:
8828 2 : ndr_print_ptr(ndr, "Null", r->Null);
8829 2 : ndr->depth++;
8830 2 : if (r->Null) {
8831 0 : ndr_print_uint8(ndr, "Null", *r->Null);
8832 : }
8833 2 : ndr->depth--;
8834 2 : break;
8835 :
8836 0 : case DNSSRV_TYPEID_DWORD:
8837 0 : ndr_print_uint32(ndr, "Dword", r->Dword);
8838 0 : break;
8839 :
8840 0 : case DNSSRV_TYPEID_LPSTR:
8841 0 : ndr_print_ptr(ndr, "String", r->String);
8842 0 : ndr->depth++;
8843 0 : if (r->String) {
8844 0 : ndr_print_string(ndr, "String", r->String);
8845 : }
8846 0 : ndr->depth--;
8847 0 : break;
8848 :
8849 0 : case DNSSRV_TYPEID_LPWSTR:
8850 0 : ndr_print_ptr(ndr, "WideString", r->WideString);
8851 0 : ndr->depth++;
8852 0 : if (r->WideString) {
8853 0 : ndr_print_string(ndr, "WideString", r->WideString);
8854 : }
8855 0 : ndr->depth--;
8856 0 : break;
8857 :
8858 0 : case DNSSRV_TYPEID_IPARRAY:
8859 0 : ndr_print_ptr(ndr, "IpArray", r->IpArray);
8860 0 : ndr->depth++;
8861 0 : if (r->IpArray) {
8862 0 : ndr_print_IP4_ARRAY(ndr, "IpArray", r->IpArray);
8863 : }
8864 0 : ndr->depth--;
8865 0 : break;
8866 :
8867 0 : case DNSSRV_TYPEID_BUFFER:
8868 0 : ndr_print_ptr(ndr, "Buffer", r->Buffer);
8869 0 : ndr->depth++;
8870 0 : if (r->Buffer) {
8871 0 : ndr_print_DNS_RPC_BUFFER(ndr, "Buffer", r->Buffer);
8872 : }
8873 0 : ndr->depth--;
8874 0 : break;
8875 :
8876 0 : case DNSSRV_TYPEID_SERVER_INFO_W2K:
8877 0 : ndr_print_ptr(ndr, "ServerInfoW2K", r->ServerInfoW2K);
8878 0 : ndr->depth++;
8879 0 : if (r->ServerInfoW2K) {
8880 0 : ndr_print_DNS_RPC_SERVER_INFO_W2K(ndr, "ServerInfoW2K", r->ServerInfoW2K);
8881 : }
8882 0 : ndr->depth--;
8883 0 : break;
8884 :
8885 0 : case DNSSRV_TYPEID_STATS:
8886 0 : ndr_print_ptr(ndr, "Stats", r->Stats);
8887 0 : ndr->depth++;
8888 0 : if (r->Stats) {
8889 0 : ndr_print_DNSSRV_STAT(ndr, "Stats", r->Stats);
8890 : }
8891 0 : ndr->depth--;
8892 0 : break;
8893 :
8894 0 : case DNSSRV_TYPEID_FORWARDERS_W2K:
8895 0 : ndr_print_ptr(ndr, "ForwardersW2K", r->ForwardersW2K);
8896 0 : ndr->depth++;
8897 0 : if (r->ForwardersW2K) {
8898 0 : ndr_print_DNS_RPC_FORWARDERS_W2K(ndr, "ForwardersW2K", r->ForwardersW2K);
8899 : }
8900 0 : ndr->depth--;
8901 0 : break;
8902 :
8903 0 : case DNSSRV_TYPEID_ZONE_W2K:
8904 0 : ndr_print_ptr(ndr, "ZoneW2K", r->ZoneW2K);
8905 0 : ndr->depth++;
8906 0 : if (r->ZoneW2K) {
8907 0 : ndr_print_DNS_RPC_ZONE_W2K(ndr, "ZoneW2K", r->ZoneW2K);
8908 : }
8909 0 : ndr->depth--;
8910 0 : break;
8911 :
8912 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K:
8913 0 : ndr_print_ptr(ndr, "ZoneInfoW2K", r->ZoneInfoW2K);
8914 0 : ndr->depth++;
8915 0 : if (r->ZoneInfoW2K) {
8916 0 : ndr_print_DNS_RPC_ZONE_INFO_W2K(ndr, "ZoneInfoW2K", r->ZoneInfoW2K);
8917 : }
8918 0 : ndr->depth--;
8919 0 : break;
8920 :
8921 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
8922 0 : ndr_print_ptr(ndr, "SecondariesW2K", r->SecondariesW2K);
8923 0 : ndr->depth++;
8924 0 : if (r->SecondariesW2K) {
8925 0 : ndr_print_DNS_RPC_ZONE_SECONDARIES_W2K(ndr, "SecondariesW2K", r->SecondariesW2K);
8926 : }
8927 0 : ndr->depth--;
8928 0 : break;
8929 :
8930 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
8931 0 : ndr_print_ptr(ndr, "DatabaseW2K", r->DatabaseW2K);
8932 0 : ndr->depth++;
8933 0 : if (r->DatabaseW2K) {
8934 0 : ndr_print_DNS_RPC_ZONE_DATABASE_W2K(ndr, "DatabaseW2K", r->DatabaseW2K);
8935 : }
8936 0 : ndr->depth--;
8937 0 : break;
8938 :
8939 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K:
8940 0 : ndr_print_ptr(ndr, "ZoneCreateW2K", r->ZoneCreateW2K);
8941 0 : ndr->depth++;
8942 0 : if (r->ZoneCreateW2K) {
8943 0 : ndr_print_DNS_RPC_ZONE_CREATE_INFO_W2K(ndr, "ZoneCreateW2K", r->ZoneCreateW2K);
8944 : }
8945 0 : ndr->depth--;
8946 0 : break;
8947 :
8948 0 : case DNSSRV_TYPEID_NAME_AND_PARAM:
8949 0 : ndr_print_ptr(ndr, "NameAndParam", r->NameAndParam);
8950 0 : ndr->depth++;
8951 0 : if (r->NameAndParam) {
8952 0 : ndr_print_DNS_RPC_NAME_AND_PARAM(ndr, "NameAndParam", r->NameAndParam);
8953 : }
8954 0 : ndr->depth--;
8955 0 : break;
8956 :
8957 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K:
8958 0 : ndr_print_ptr(ndr, "ZoneListW2K", r->ZoneListW2K);
8959 0 : ndr->depth++;
8960 0 : if (r->ZoneListW2K) {
8961 0 : ndr_print_DNS_RPC_ZONE_LIST_W2K(ndr, "ZoneListW2K", r->ZoneListW2K);
8962 : }
8963 0 : ndr->depth--;
8964 0 : break;
8965 :
8966 0 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
8967 0 : ndr_print_ptr(ndr, "ServerInfoDotNet", r->ServerInfoDotNet);
8968 0 : ndr->depth++;
8969 0 : if (r->ServerInfoDotNet) {
8970 0 : ndr_print_DNS_RPC_SERVER_INFO_DOTNET(ndr, "ServerInfoDotNet", r->ServerInfoDotNet);
8971 : }
8972 0 : ndr->depth--;
8973 0 : break;
8974 :
8975 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET:
8976 0 : ndr_print_ptr(ndr, "ForwardersDotNet", r->ForwardersDotNet);
8977 0 : ndr->depth++;
8978 0 : if (r->ForwardersDotNet) {
8979 0 : ndr_print_DNS_RPC_FORWARDERS_DOTNET(ndr, "ForwardersDotNet", r->ForwardersDotNet);
8980 : }
8981 0 : ndr->depth--;
8982 0 : break;
8983 :
8984 0 : case DNSSRV_TYPEID_ZONE:
8985 0 : ndr_print_ptr(ndr, "Zone", r->Zone);
8986 0 : ndr->depth++;
8987 0 : if (r->Zone) {
8988 0 : ndr_print_DNS_RPC_ZONE_DOTNET(ndr, "Zone", r->Zone);
8989 : }
8990 0 : ndr->depth--;
8991 0 : break;
8992 :
8993 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
8994 0 : ndr_print_ptr(ndr, "ZoneInfoDotNet", r->ZoneInfoDotNet);
8995 0 : ndr->depth++;
8996 0 : if (r->ZoneInfoDotNet) {
8997 0 : ndr_print_DNS_RPC_ZONE_INFO_DOTNET(ndr, "ZoneInfoDotNet", r->ZoneInfoDotNet);
8998 : }
8999 0 : ndr->depth--;
9000 0 : break;
9001 :
9002 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
9003 0 : ndr_print_ptr(ndr, "SecondariesDotNet", r->SecondariesDotNet);
9004 0 : ndr->depth++;
9005 0 : if (r->SecondariesDotNet) {
9006 0 : ndr_print_DNS_RPC_ZONE_SECONDARIES_DOTNET(ndr, "SecondariesDotNet", r->SecondariesDotNet);
9007 : }
9008 0 : ndr->depth--;
9009 0 : break;
9010 :
9011 0 : case DNSSRV_TYPEID_ZONE_DATABASE:
9012 0 : ndr_print_ptr(ndr, "Database", r->Database);
9013 0 : ndr->depth++;
9014 0 : if (r->Database) {
9015 0 : ndr_print_DNS_RPC_ZONE_DATABASE_DOTNET(ndr, "Database", r->Database);
9016 : }
9017 0 : ndr->depth--;
9018 0 : break;
9019 :
9020 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
9021 0 : ndr_print_ptr(ndr, "ZoneCreateDotNet", r->ZoneCreateDotNet);
9022 0 : ndr->depth++;
9023 0 : if (r->ZoneCreateDotNet) {
9024 0 : ndr_print_DNS_RPC_ZONE_CREATE_INFO_DOTNET(ndr, "ZoneCreateDotNet", r->ZoneCreateDotNet);
9025 : }
9026 0 : ndr->depth--;
9027 0 : break;
9028 :
9029 0 : case DNSSRV_TYPEID_ZONE_LIST:
9030 0 : ndr_print_ptr(ndr, "ZoneList", r->ZoneList);
9031 0 : ndr->depth++;
9032 0 : if (r->ZoneList) {
9033 0 : ndr_print_DNS_RPC_ZONE_LIST_DOTNET(ndr, "ZoneList", r->ZoneList);
9034 : }
9035 0 : ndr->depth--;
9036 0 : break;
9037 :
9038 0 : case DNSSRV_TYPEID_ZONE_EXPORT:
9039 0 : ndr_print_ptr(ndr, "ZoneExport", r->ZoneExport);
9040 0 : ndr->depth++;
9041 0 : if (r->ZoneExport) {
9042 0 : ndr_print_DNS_RPC_ZONE_EXPORT_INFO(ndr, "ZoneExport", r->ZoneExport);
9043 : }
9044 0 : ndr->depth--;
9045 0 : break;
9046 :
9047 0 : case DNSSRV_TYPEID_DP_INFO:
9048 0 : ndr_print_ptr(ndr, "DirectoryPartition", r->DirectoryPartition);
9049 0 : ndr->depth++;
9050 0 : if (r->DirectoryPartition) {
9051 0 : ndr_print_DNS_RPC_DP_INFO(ndr, "DirectoryPartition", r->DirectoryPartition);
9052 : }
9053 0 : ndr->depth--;
9054 0 : break;
9055 :
9056 0 : case DNSSRV_TYPEID_DP_ENUM:
9057 0 : ndr_print_ptr(ndr, "DirectoryPartitionEnum", r->DirectoryPartitionEnum);
9058 0 : ndr->depth++;
9059 0 : if (r->DirectoryPartitionEnum) {
9060 0 : ndr_print_DNS_RPC_DP_ENUM(ndr, "DirectoryPartitionEnum", r->DirectoryPartitionEnum);
9061 : }
9062 0 : ndr->depth--;
9063 0 : break;
9064 :
9065 0 : case DNSSRV_TYPEID_DP_LIST:
9066 0 : ndr_print_ptr(ndr, "DirectoryPartitionList", r->DirectoryPartitionList);
9067 0 : ndr->depth++;
9068 0 : if (r->DirectoryPartitionList) {
9069 0 : ndr_print_DNS_RPC_DP_LIST(ndr, "DirectoryPartitionList", r->DirectoryPartitionList);
9070 : }
9071 0 : ndr->depth--;
9072 0 : break;
9073 :
9074 0 : case DNSSRV_TYPEID_ENLIST_DP:
9075 0 : ndr_print_ptr(ndr, "EnlistDirectoryPartition", r->EnlistDirectoryPartition);
9076 0 : ndr->depth++;
9077 0 : if (r->EnlistDirectoryPartition) {
9078 0 : ndr_print_DNS_RPC_ENLIST_DP(ndr, "EnlistDirectoryPartition", r->EnlistDirectoryPartition);
9079 : }
9080 0 : ndr->depth--;
9081 0 : break;
9082 :
9083 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP:
9084 0 : ndr_print_ptr(ndr, "ZoneChangeDirectoryPartition", r->ZoneChangeDirectoryPartition);
9085 0 : ndr->depth++;
9086 0 : if (r->ZoneChangeDirectoryPartition) {
9087 0 : ndr_print_DNS_RPC_ZONE_CHANGE_DP(ndr, "ZoneChangeDirectoryPartition", r->ZoneChangeDirectoryPartition);
9088 : }
9089 0 : ndr->depth--;
9090 0 : break;
9091 :
9092 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
9093 0 : ndr_print_ptr(ndr, "EnumZonesFilter", r->EnumZonesFilter);
9094 0 : ndr->depth++;
9095 0 : if (r->EnumZonesFilter) {
9096 0 : ndr_print_DNS_RPC_ENUM_ZONES_FILTER(ndr, "EnumZonesFilter", r->EnumZonesFilter);
9097 : }
9098 0 : ndr->depth--;
9099 0 : break;
9100 :
9101 0 : case DNSSRV_TYPEID_ADDRARRAY:
9102 0 : ndr_print_ptr(ndr, "AddrArray", r->AddrArray);
9103 0 : ndr->depth++;
9104 0 : if (r->AddrArray) {
9105 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "AddrArray", r->AddrArray);
9106 : }
9107 0 : ndr->depth--;
9108 0 : break;
9109 :
9110 0 : case DNSSRV_TYPEID_SERVER_INFO:
9111 0 : ndr_print_ptr(ndr, "ServerInfo", r->ServerInfo);
9112 0 : ndr->depth++;
9113 0 : if (r->ServerInfo) {
9114 0 : ndr_print_DNS_RPC_SERVER_INFO_LONGHORN(ndr, "ServerInfo", r->ServerInfo);
9115 : }
9116 0 : ndr->depth--;
9117 0 : break;
9118 :
9119 0 : case DNSSRV_TYPEID_ZONE_CREATE:
9120 0 : ndr_print_ptr(ndr, "ZoneCreate", r->ZoneCreate);
9121 0 : ndr->depth++;
9122 0 : if (r->ZoneCreate) {
9123 0 : ndr_print_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(ndr, "ZoneCreate", r->ZoneCreate);
9124 : }
9125 0 : ndr->depth--;
9126 0 : break;
9127 :
9128 0 : case DNSSRV_TYPEID_FORWARDERS:
9129 0 : ndr_print_ptr(ndr, "Forwarders", r->Forwarders);
9130 0 : ndr->depth++;
9131 0 : if (r->Forwarders) {
9132 0 : ndr_print_DNS_RPC_FORWARDERS_LONGHORN(ndr, "Forwarders", r->Forwarders);
9133 : }
9134 0 : ndr->depth--;
9135 0 : break;
9136 :
9137 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES:
9138 0 : ndr_print_ptr(ndr, "Secondaries", r->Secondaries);
9139 0 : ndr->depth++;
9140 0 : if (r->Secondaries) {
9141 0 : ndr_print_DNS_RPC_ZONE_SECONDARIES_LONGHORN(ndr, "Secondaries", r->Secondaries);
9142 : }
9143 0 : ndr->depth--;
9144 0 : break;
9145 :
9146 0 : case DNSSRV_TYPEID_IP_VALIDATE:
9147 0 : ndr_print_ptr(ndr, "IpValidate", r->IpValidate);
9148 0 : ndr->depth++;
9149 0 : if (r->IpValidate) {
9150 0 : ndr_print_DNS_RPC_IP_VALIDATE(ndr, "IpValidate", r->IpValidate);
9151 : }
9152 0 : ndr->depth--;
9153 0 : break;
9154 :
9155 0 : case DNSSRV_TYPEID_ZONE_INFO:
9156 0 : ndr_print_ptr(ndr, "ZoneInfo", r->ZoneInfo);
9157 0 : ndr->depth++;
9158 0 : if (r->ZoneInfo) {
9159 0 : ndr_print_DNS_RPC_ZONE_INFO_LONGHORN(ndr, "ZoneInfo", r->ZoneInfo);
9160 : }
9161 0 : ndr->depth--;
9162 0 : break;
9163 :
9164 0 : case DNSSRV_TYPEID_AUTOCONFIGURE:
9165 0 : ndr_print_ptr(ndr, "AutoConfigure", r->AutoConfigure);
9166 0 : ndr->depth++;
9167 0 : if (r->AutoConfigure) {
9168 0 : ndr_print_DNS_RPC_AUTOCONFIGURE(ndr, "AutoConfigure", r->AutoConfigure);
9169 : }
9170 0 : ndr->depth--;
9171 0 : break;
9172 :
9173 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST:
9174 0 : ndr_print_ptr(ndr, "Utf8StringList", r->Utf8StringList);
9175 0 : ndr->depth++;
9176 0 : if (r->Utf8StringList) {
9177 0 : ndr_print_DNS_RPC_UTF8_STRING_LIST(ndr, "Utf8StringList", r->Utf8StringList);
9178 : }
9179 0 : ndr->depth--;
9180 0 : break;
9181 :
9182 0 : default:
9183 0 : ndr_print_bad_level(ndr, name, level);
9184 : }
9185 2 : }
9186 :
9187 2364 : _PUBLIC_ enum ndr_err_code ndr_push_DNS_RPC_RECORDS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DNS_RPC_RECORDS *r)
9188 : {
9189 0 : uint32_t cntr_records_0;
9190 2364 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9191 2364 : if (ndr_flags & NDR_SCALARS) {
9192 2364 : NDR_CHECK(ndr_push_align(ndr, 4));
9193 2364 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, (12 + ndr_size_DNS_RPC_NAME(&r->dnsNodeName, 0) + 3) & ~3));
9194 2364 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wRecordCount));
9195 2364 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
9196 2364 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwChildCount));
9197 2364 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->dnsNodeName));
9198 5388 : for (cntr_records_0 = 0; cntr_records_0 < (r->wRecordCount); cntr_records_0++) {
9199 3024 : NDR_CHECK(ndr_push_DNS_RPC_RECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
9200 : }
9201 2364 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9202 : }
9203 2364 : if (ndr_flags & NDR_BUFFERS) {
9204 0 : }
9205 2364 : return NDR_ERR_SUCCESS;
9206 : }
9207 :
9208 1182 : _PUBLIC_ enum ndr_err_code ndr_pull_DNS_RPC_RECORDS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DNS_RPC_RECORDS *r)
9209 : {
9210 1182 : uint32_t size_records_0 = 0;
9211 0 : uint32_t cntr_records_0;
9212 1182 : TALLOC_CTX *_mem_save_records_0 = NULL;
9213 1182 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9214 1182 : if (ndr_flags & NDR_SCALARS) {
9215 1182 : NDR_CHECK(ndr_pull_align(ndr, 4));
9216 1182 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wLength));
9217 1182 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wRecordCount));
9218 1182 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
9219 1182 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwChildCount));
9220 1182 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->dnsNodeName));
9221 1182 : size_records_0 = r->wRecordCount;
9222 1182 : NDR_PULL_ALLOC_N(ndr, r->records, size_records_0);
9223 1182 : _mem_save_records_0 = NDR_PULL_GET_MEM_CTX(ndr);
9224 1182 : NDR_PULL_SET_MEM_CTX(ndr, r->records, 0);
9225 2694 : for (cntr_records_0 = 0; cntr_records_0 < (size_records_0); cntr_records_0++) {
9226 1512 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
9227 : }
9228 1182 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_records_0, 0);
9229 1182 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9230 : }
9231 1182 : if (ndr_flags & NDR_BUFFERS) {
9232 0 : }
9233 1182 : return NDR_ERR_SUCCESS;
9234 : }
9235 :
9236 0 : static void ndr_print_flags_DNS_RPC_RECORDS(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct DNS_RPC_RECORDS *r)
9237 : {
9238 0 : ndr_print_DNS_RPC_RECORDS(ndr, name, r);
9239 0 : }
9240 :
9241 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORDS(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORDS *r)
9242 : {
9243 0 : uint32_t cntr_records_0;
9244 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORDS");
9245 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9246 0 : ndr->depth++;
9247 0 : ndr_print_uint16(ndr, "wLength", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(12 + ndr_size_DNS_RPC_NAME(&r->dnsNodeName, 0) + 3) & ~3:r->wLength);
9248 0 : ndr_print_uint16(ndr, "wRecordCount", r->wRecordCount);
9249 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
9250 0 : ndr_print_uint32(ndr, "dwChildCount", r->dwChildCount);
9251 0 : ndr_print_DNS_RPC_NAME(ndr, "dnsNodeName", &r->dnsNodeName);
9252 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "records", (uint32_t)(r->wRecordCount));
9253 0 : ndr->depth++;
9254 0 : for (cntr_records_0 = 0; cntr_records_0 < (r->wRecordCount); cntr_records_0++) {
9255 0 : ndr_print_DNS_RPC_RECORD(ndr, "records", &r->records[cntr_records_0]);
9256 : }
9257 0 : ndr->depth--;
9258 0 : ndr->depth--;
9259 : }
9260 :
9261 0 : _PUBLIC_ size_t ndr_size_DNS_RPC_RECORDS(const struct DNS_RPC_RECORDS *r, libndr_flags flags)
9262 : {
9263 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORDS);
9264 : }
9265 :
9266 0 : static void ndr_print_flags_DNS_RPC_RECORDS_ARRAY(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct DNS_RPC_RECORDS_ARRAY *r)
9267 : {
9268 0 : ndr_print_DNS_RPC_RECORDS_ARRAY(ndr, name, r);
9269 0 : }
9270 :
9271 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORDS_ARRAY(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORDS_ARRAY *r)
9272 : {
9273 0 : uint32_t cntr_rec_0;
9274 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORDS_ARRAY");
9275 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9276 0 : ndr->depth++;
9277 0 : ndr_print_uint32(ndr, "count", r->count);
9278 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "rec", (uint32_t)(r->count));
9279 0 : ndr->depth++;
9280 0 : for (cntr_rec_0 = 0; cntr_rec_0 < (r->count); cntr_rec_0++) {
9281 0 : ndr_print_DNS_RPC_RECORDS(ndr, "rec", &r->rec[cntr_rec_0]);
9282 : }
9283 0 : ndr->depth--;
9284 0 : ndr->depth--;
9285 : }
9286 :
9287 1080 : _PUBLIC_ size_t ndr_size_DNS_RPC_RECORDS_ARRAY(const struct DNS_RPC_RECORDS_ARRAY *r, libndr_flags flags)
9288 : {
9289 1080 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORDS_ARRAY);
9290 : }
9291 :
9292 6 : static enum ndr_err_code ndr_push_DnssrvOperation(struct ndr_push *ndr, ndr_flags_type flags, const struct DnssrvOperation *r)
9293 : {
9294 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9295 6 : if (flags & NDR_IN) {
9296 3 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
9297 3 : if (r->in.pwszServerName) {
9298 3 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9299 3 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9300 3 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9301 3 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9302 : }
9303 3 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
9304 3 : if (r->in.pszZone) {
9305 3 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9306 3 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9307 3 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9308 3 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9309 : }
9310 3 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwContext));
9311 3 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
9312 3 : if (r->in.pszOperation) {
9313 3 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9314 3 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9315 3 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9316 3 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszOperation, ndr_charset_length(r->in.pszOperation, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9317 : }
9318 3 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->in.dwTypeId));
9319 3 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId));
9320 3 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pData));
9321 : }
9322 6 : if (flags & NDR_OUT) {
9323 3 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9324 : }
9325 6 : return NDR_ERR_SUCCESS;
9326 : }
9327 :
9328 6 : static enum ndr_err_code ndr_pull_DnssrvOperation(struct ndr_pull *ndr, ndr_flags_type flags, struct DnssrvOperation *r)
9329 : {
9330 0 : uint32_t _ptr_pwszServerName;
9331 6 : uint32_t size_pwszServerName_1 = 0;
9332 6 : uint32_t length_pwszServerName_1 = 0;
9333 0 : uint32_t _ptr_pszZone;
9334 6 : uint32_t size_pszZone_1 = 0;
9335 6 : uint32_t length_pszZone_1 = 0;
9336 0 : uint32_t _ptr_pszOperation;
9337 6 : uint32_t size_pszOperation_1 = 0;
9338 6 : uint32_t length_pszOperation_1 = 0;
9339 6 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
9340 6 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
9341 6 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
9342 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9343 6 : if (flags & NDR_IN) {
9344 3 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
9345 3 : if (_ptr_pwszServerName) {
9346 3 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
9347 : } else {
9348 0 : r->in.pwszServerName = NULL;
9349 : }
9350 3 : if (r->in.pwszServerName) {
9351 3 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
9352 3 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
9353 3 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
9354 3 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
9355 3 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
9356 3 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
9357 3 : if (length_pwszServerName_1 > size_pwszServerName_1) {
9358 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszServerName_1, length_pwszServerName_1);
9359 : }
9360 3 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
9361 3 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
9362 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
9363 : }
9364 3 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
9365 3 : if (_ptr_pszZone) {
9366 3 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
9367 : } else {
9368 0 : r->in.pszZone = NULL;
9369 : }
9370 3 : if (r->in.pszZone) {
9371 3 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
9372 3 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
9373 3 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
9374 3 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
9375 3 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
9376 3 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
9377 3 : if (length_pszZone_1 > size_pszZone_1) {
9378 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZone_1, length_pszZone_1);
9379 : }
9380 3 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
9381 3 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
9382 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
9383 : }
9384 3 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwContext));
9385 3 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
9386 3 : if (_ptr_pszOperation) {
9387 3 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
9388 : } else {
9389 0 : r->in.pszOperation = NULL;
9390 : }
9391 3 : if (r->in.pszOperation) {
9392 3 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
9393 3 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
9394 3 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
9395 3 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
9396 3 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
9397 3 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
9398 3 : if (length_pszOperation_1 > size_pszOperation_1) {
9399 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszOperation_1, length_pszOperation_1);
9400 : }
9401 3 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
9402 3 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
9403 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
9404 : }
9405 3 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, &r->in.dwTypeId));
9406 3 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId));
9407 3 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pData));
9408 : }
9409 6 : if (flags & NDR_OUT) {
9410 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9411 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9412 3 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9413 : }
9414 6 : return NDR_ERR_SUCCESS;
9415 : }
9416 :
9417 0 : _PUBLIC_ void ndr_print_DnssrvOperation(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DnssrvOperation *r)
9418 : {
9419 0 : ndr_print_struct(ndr, name, "DnssrvOperation");
9420 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9421 0 : ndr->depth++;
9422 0 : if (flags & NDR_SET_VALUES) {
9423 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9424 : }
9425 0 : if (flags & NDR_IN) {
9426 0 : ndr_print_struct(ndr, "in", "DnssrvOperation");
9427 0 : ndr->depth++;
9428 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
9429 0 : ndr->depth++;
9430 0 : if (r->in.pwszServerName) {
9431 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
9432 : }
9433 0 : ndr->depth--;
9434 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
9435 0 : ndr->depth++;
9436 0 : if (r->in.pszZone) {
9437 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
9438 : }
9439 0 : ndr->depth--;
9440 0 : ndr_print_uint32(ndr, "dwContext", r->in.dwContext);
9441 0 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
9442 0 : ndr->depth++;
9443 0 : if (r->in.pszOperation) {
9444 0 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
9445 : }
9446 0 : ndr->depth--;
9447 0 : ndr_print_DNS_RPC_TYPEID(ndr, "dwTypeId", r->in.dwTypeId);
9448 0 : ndr_print_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId);
9449 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "pData", &r->in.pData);
9450 0 : ndr->depth--;
9451 : }
9452 0 : if (flags & NDR_OUT) {
9453 0 : ndr_print_struct(ndr, "out", "DnssrvOperation");
9454 0 : ndr->depth++;
9455 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9456 0 : ndr->depth--;
9457 : }
9458 0 : ndr->depth--;
9459 : }
9460 :
9461 0 : static enum ndr_err_code ndr_push_DnssrvQuery(struct ndr_push *ndr, ndr_flags_type flags, const struct DnssrvQuery *r)
9462 : {
9463 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9464 0 : if (flags & NDR_IN) {
9465 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
9466 0 : if (r->in.pwszServerName) {
9467 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9468 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9469 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9470 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9471 : }
9472 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
9473 0 : if (r->in.pszZone) {
9474 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9475 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9476 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9477 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9478 : }
9479 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
9480 0 : if (r->in.pszOperation) {
9481 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9482 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9483 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9484 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszOperation, ndr_charset_length(r->in.pszOperation, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9485 : }
9486 : }
9487 0 : if (flags & NDR_OUT) {
9488 0 : if (r->out.pdwTypeId == NULL) {
9489 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9490 : }
9491 0 : if (r->out.ppData == NULL) {
9492 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9493 : }
9494 0 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, *r->out.pdwTypeId));
9495 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId));
9496 0 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppData));
9497 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9498 : }
9499 0 : return NDR_ERR_SUCCESS;
9500 : }
9501 :
9502 0 : static enum ndr_err_code ndr_pull_DnssrvQuery(struct ndr_pull *ndr, ndr_flags_type flags, struct DnssrvQuery *r)
9503 : {
9504 0 : uint32_t _ptr_pwszServerName;
9505 0 : uint32_t size_pwszServerName_1 = 0;
9506 0 : uint32_t length_pwszServerName_1 = 0;
9507 0 : uint32_t _ptr_pszZone;
9508 0 : uint32_t size_pszZone_1 = 0;
9509 0 : uint32_t length_pszZone_1 = 0;
9510 0 : uint32_t _ptr_pszOperation;
9511 0 : uint32_t size_pszOperation_1 = 0;
9512 0 : uint32_t length_pszOperation_1 = 0;
9513 0 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
9514 0 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
9515 0 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
9516 0 : TALLOC_CTX *_mem_save_pdwTypeId_0 = NULL;
9517 0 : TALLOC_CTX *_mem_save_ppData_0 = NULL;
9518 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9519 0 : if (flags & NDR_IN) {
9520 0 : NDR_ZERO_STRUCT(r->out);
9521 :
9522 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
9523 0 : if (_ptr_pwszServerName) {
9524 0 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
9525 : } else {
9526 0 : r->in.pwszServerName = NULL;
9527 : }
9528 0 : if (r->in.pwszServerName) {
9529 0 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
9530 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
9531 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
9532 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
9533 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
9534 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
9535 0 : if (length_pwszServerName_1 > size_pwszServerName_1) {
9536 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszServerName_1, length_pwszServerName_1);
9537 : }
9538 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
9539 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
9540 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
9541 : }
9542 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
9543 0 : if (_ptr_pszZone) {
9544 0 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
9545 : } else {
9546 0 : r->in.pszZone = NULL;
9547 : }
9548 0 : if (r->in.pszZone) {
9549 0 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
9550 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
9551 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
9552 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
9553 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
9554 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
9555 0 : if (length_pszZone_1 > size_pszZone_1) {
9556 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZone_1, length_pszZone_1);
9557 : }
9558 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
9559 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
9560 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
9561 : }
9562 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
9563 0 : if (_ptr_pszOperation) {
9564 0 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
9565 : } else {
9566 0 : r->in.pszOperation = NULL;
9567 : }
9568 0 : if (r->in.pszOperation) {
9569 0 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
9570 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
9571 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
9572 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
9573 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
9574 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
9575 0 : if (length_pszOperation_1 > size_pszOperation_1) {
9576 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszOperation_1, length_pszOperation_1);
9577 : }
9578 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
9579 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
9580 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
9581 : }
9582 0 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeId);
9583 0 : NDR_ZERO_STRUCTP(r->out.pdwTypeId);
9584 0 : NDR_PULL_ALLOC(ndr, r->out.ppData);
9585 0 : NDR_ZERO_STRUCTP(r->out.ppData);
9586 : }
9587 0 : if (flags & NDR_OUT) {
9588 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9589 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9590 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9591 0 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeId);
9592 : }
9593 0 : _mem_save_pdwTypeId_0 = NDR_PULL_GET_MEM_CTX(ndr);
9594 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwTypeId, LIBNDR_FLAG_REF_ALLOC);
9595 0 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->out.pdwTypeId));
9596 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwTypeId_0, LIBNDR_FLAG_REF_ALLOC);
9597 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9598 0 : NDR_PULL_ALLOC(ndr, r->out.ppData);
9599 : }
9600 0 : _mem_save_ppData_0 = NDR_PULL_GET_MEM_CTX(ndr);
9601 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppData, LIBNDR_FLAG_REF_ALLOC);
9602 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId));
9603 0 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppData));
9604 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppData_0, LIBNDR_FLAG_REF_ALLOC);
9605 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9606 : }
9607 0 : return NDR_ERR_SUCCESS;
9608 : }
9609 :
9610 0 : _PUBLIC_ void ndr_print_DnssrvQuery(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DnssrvQuery *r)
9611 : {
9612 0 : ndr_print_struct(ndr, name, "DnssrvQuery");
9613 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9614 0 : ndr->depth++;
9615 0 : if (flags & NDR_SET_VALUES) {
9616 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9617 : }
9618 0 : if (flags & NDR_IN) {
9619 0 : ndr_print_struct(ndr, "in", "DnssrvQuery");
9620 0 : ndr->depth++;
9621 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
9622 0 : ndr->depth++;
9623 0 : if (r->in.pwszServerName) {
9624 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
9625 : }
9626 0 : ndr->depth--;
9627 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
9628 0 : ndr->depth++;
9629 0 : if (r->in.pszZone) {
9630 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
9631 : }
9632 0 : ndr->depth--;
9633 0 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
9634 0 : ndr->depth++;
9635 0 : if (r->in.pszOperation) {
9636 0 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
9637 : }
9638 0 : ndr->depth--;
9639 0 : ndr->depth--;
9640 : }
9641 0 : if (flags & NDR_OUT) {
9642 0 : ndr_print_struct(ndr, "out", "DnssrvQuery");
9643 0 : ndr->depth++;
9644 0 : ndr_print_ptr(ndr, "pdwTypeId", r->out.pdwTypeId);
9645 0 : ndr->depth++;
9646 0 : ndr_print_DNS_RPC_TYPEID(ndr, "pdwTypeId", *r->out.pdwTypeId);
9647 0 : ndr->depth--;
9648 0 : ndr_print_ptr(ndr, "ppData", r->out.ppData);
9649 0 : ndr->depth++;
9650 0 : ndr_print_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId);
9651 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "ppData", r->out.ppData);
9652 0 : ndr->depth--;
9653 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9654 0 : ndr->depth--;
9655 : }
9656 0 : ndr->depth--;
9657 : }
9658 :
9659 0 : static enum ndr_err_code ndr_push_DnssrvComplexOperation(struct ndr_push *ndr, ndr_flags_type flags, const struct DnssrvComplexOperation *r)
9660 : {
9661 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9662 0 : if (flags & NDR_IN) {
9663 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
9664 0 : if (r->in.pwszServerName) {
9665 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9666 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9667 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9668 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9669 : }
9670 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
9671 0 : if (r->in.pszZone) {
9672 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9673 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9674 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9675 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9676 : }
9677 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
9678 0 : if (r->in.pszOperation) {
9679 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9680 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9681 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9682 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszOperation, ndr_charset_length(r->in.pszOperation, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9683 : }
9684 0 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->in.dwTypeIn));
9685 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn));
9686 0 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pDataIn));
9687 : }
9688 0 : if (flags & NDR_OUT) {
9689 0 : if (r->out.pdwTypeOut == NULL) {
9690 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9691 : }
9692 0 : if (r->out.ppDataOut == NULL) {
9693 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9694 : }
9695 0 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, *r->out.pdwTypeOut));
9696 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut));
9697 0 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppDataOut));
9698 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9699 : }
9700 0 : return NDR_ERR_SUCCESS;
9701 : }
9702 :
9703 0 : static enum ndr_err_code ndr_pull_DnssrvComplexOperation(struct ndr_pull *ndr, ndr_flags_type flags, struct DnssrvComplexOperation *r)
9704 : {
9705 0 : uint32_t _ptr_pwszServerName;
9706 0 : uint32_t size_pwszServerName_1 = 0;
9707 0 : uint32_t length_pwszServerName_1 = 0;
9708 0 : uint32_t _ptr_pszZone;
9709 0 : uint32_t size_pszZone_1 = 0;
9710 0 : uint32_t length_pszZone_1 = 0;
9711 0 : uint32_t _ptr_pszOperation;
9712 0 : uint32_t size_pszOperation_1 = 0;
9713 0 : uint32_t length_pszOperation_1 = 0;
9714 0 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
9715 0 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
9716 0 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
9717 0 : TALLOC_CTX *_mem_save_pdwTypeOut_0 = NULL;
9718 0 : TALLOC_CTX *_mem_save_ppDataOut_0 = NULL;
9719 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9720 0 : if (flags & NDR_IN) {
9721 0 : NDR_ZERO_STRUCT(r->out);
9722 :
9723 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
9724 0 : if (_ptr_pwszServerName) {
9725 0 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
9726 : } else {
9727 0 : r->in.pwszServerName = NULL;
9728 : }
9729 0 : if (r->in.pwszServerName) {
9730 0 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
9731 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
9732 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
9733 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
9734 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
9735 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
9736 0 : if (length_pwszServerName_1 > size_pwszServerName_1) {
9737 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszServerName_1, length_pwszServerName_1);
9738 : }
9739 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
9740 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
9741 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
9742 : }
9743 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
9744 0 : if (_ptr_pszZone) {
9745 0 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
9746 : } else {
9747 0 : r->in.pszZone = NULL;
9748 : }
9749 0 : if (r->in.pszZone) {
9750 0 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
9751 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
9752 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
9753 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
9754 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
9755 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
9756 0 : if (length_pszZone_1 > size_pszZone_1) {
9757 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZone_1, length_pszZone_1);
9758 : }
9759 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
9760 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
9761 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
9762 : }
9763 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
9764 0 : if (_ptr_pszOperation) {
9765 0 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
9766 : } else {
9767 0 : r->in.pszOperation = NULL;
9768 : }
9769 0 : if (r->in.pszOperation) {
9770 0 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
9771 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
9772 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
9773 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
9774 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
9775 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
9776 0 : if (length_pszOperation_1 > size_pszOperation_1) {
9777 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszOperation_1, length_pszOperation_1);
9778 : }
9779 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
9780 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
9781 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
9782 : }
9783 0 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, &r->in.dwTypeIn));
9784 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn));
9785 0 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pDataIn));
9786 0 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeOut);
9787 0 : NDR_ZERO_STRUCTP(r->out.pdwTypeOut);
9788 0 : NDR_PULL_ALLOC(ndr, r->out.ppDataOut);
9789 0 : NDR_ZERO_STRUCTP(r->out.ppDataOut);
9790 : }
9791 0 : if (flags & NDR_OUT) {
9792 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9793 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9794 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9795 0 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeOut);
9796 : }
9797 0 : _mem_save_pdwTypeOut_0 = NDR_PULL_GET_MEM_CTX(ndr);
9798 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwTypeOut, LIBNDR_FLAG_REF_ALLOC);
9799 0 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->out.pdwTypeOut));
9800 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwTypeOut_0, LIBNDR_FLAG_REF_ALLOC);
9801 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9802 0 : NDR_PULL_ALLOC(ndr, r->out.ppDataOut);
9803 : }
9804 0 : _mem_save_ppDataOut_0 = NDR_PULL_GET_MEM_CTX(ndr);
9805 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppDataOut, LIBNDR_FLAG_REF_ALLOC);
9806 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut));
9807 0 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppDataOut));
9808 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppDataOut_0, LIBNDR_FLAG_REF_ALLOC);
9809 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9810 : }
9811 0 : return NDR_ERR_SUCCESS;
9812 : }
9813 :
9814 0 : _PUBLIC_ void ndr_print_DnssrvComplexOperation(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DnssrvComplexOperation *r)
9815 : {
9816 0 : ndr_print_struct(ndr, name, "DnssrvComplexOperation");
9817 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9818 0 : ndr->depth++;
9819 0 : if (flags & NDR_SET_VALUES) {
9820 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9821 : }
9822 0 : if (flags & NDR_IN) {
9823 0 : ndr_print_struct(ndr, "in", "DnssrvComplexOperation");
9824 0 : ndr->depth++;
9825 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
9826 0 : ndr->depth++;
9827 0 : if (r->in.pwszServerName) {
9828 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
9829 : }
9830 0 : ndr->depth--;
9831 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
9832 0 : ndr->depth++;
9833 0 : if (r->in.pszZone) {
9834 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
9835 : }
9836 0 : ndr->depth--;
9837 0 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
9838 0 : ndr->depth++;
9839 0 : if (r->in.pszOperation) {
9840 0 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
9841 : }
9842 0 : ndr->depth--;
9843 0 : ndr_print_DNS_RPC_TYPEID(ndr, "dwTypeIn", r->in.dwTypeIn);
9844 0 : ndr_print_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn);
9845 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "pDataIn", &r->in.pDataIn);
9846 0 : ndr->depth--;
9847 : }
9848 0 : if (flags & NDR_OUT) {
9849 0 : ndr_print_struct(ndr, "out", "DnssrvComplexOperation");
9850 0 : ndr->depth++;
9851 0 : ndr_print_ptr(ndr, "pdwTypeOut", r->out.pdwTypeOut);
9852 0 : ndr->depth++;
9853 0 : ndr_print_DNS_RPC_TYPEID(ndr, "pdwTypeOut", *r->out.pdwTypeOut);
9854 0 : ndr->depth--;
9855 0 : ndr_print_ptr(ndr, "ppDataOut", r->out.ppDataOut);
9856 0 : ndr->depth++;
9857 0 : ndr_print_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut);
9858 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "ppDataOut", r->out.ppDataOut);
9859 0 : ndr->depth--;
9860 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9861 0 : ndr->depth--;
9862 : }
9863 0 : ndr->depth--;
9864 : }
9865 :
9866 0 : static enum ndr_err_code ndr_push_DnssrvEnumRecords(struct ndr_push *ndr, ndr_flags_type flags, const struct DnssrvEnumRecords *r)
9867 : {
9868 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9869 0 : if (flags & NDR_IN) {
9870 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
9871 0 : if (r->in.pwszServerName) {
9872 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9873 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9874 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9875 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9876 : }
9877 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
9878 0 : if (r->in.pszZone) {
9879 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9880 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9881 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9882 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9883 : }
9884 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszNodeName));
9885 0 : if (r->in.pszNodeName) {
9886 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
9887 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9888 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
9889 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszNodeName, ndr_charset_length(r->in.pszNodeName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9890 : }
9891 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszStartChild));
9892 0 : if (r->in.pszStartChild) {
9893 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszStartChild, CH_UTF8)));
9894 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9895 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszStartChild, CH_UTF8)));
9896 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszStartChild, ndr_charset_length(r->in.pszStartChild, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9897 : }
9898 0 : NDR_CHECK(ndr_push_dns_record_type(ndr, NDR_SCALARS, r->in.wRecordType));
9899 0 : NDR_CHECK(ndr_push_DNS_SELECT_FLAGS(ndr, NDR_SCALARS, r->in.fSelectFlag));
9900 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszFilterStart));
9901 0 : if (r->in.pszFilterStart) {
9902 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStart, CH_UTF8)));
9903 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9904 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStart, CH_UTF8)));
9905 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszFilterStart, ndr_charset_length(r->in.pszFilterStart, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9906 : }
9907 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszFilterStop));
9908 0 : if (r->in.pszFilterStop) {
9909 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStop, CH_UTF8)));
9910 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9911 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStop, CH_UTF8)));
9912 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszFilterStop, ndr_charset_length(r->in.pszFilterStop, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9913 : }
9914 : }
9915 0 : if (flags & NDR_OUT) {
9916 0 : if (r->out.pdwBufferLength == NULL) {
9917 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9918 : }
9919 0 : if (r->out.pBuffer == NULL) {
9920 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9921 : }
9922 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pdwBufferLength));
9923 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.pBuffer));
9924 0 : if (*r->out.pBuffer) {
9925 : {
9926 0 : struct ndr_push *_ndr_pBuffer;
9927 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_pBuffer, 4, *r->out.pdwBufferLength));
9928 0 : NDR_CHECK(ndr_push_DNS_RPC_RECORDS_ARRAY(_ndr_pBuffer, NDR_SCALARS, *r->out.pBuffer));
9929 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_pBuffer, 4, *r->out.pdwBufferLength));
9930 : }
9931 : }
9932 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9933 : }
9934 0 : return NDR_ERR_SUCCESS;
9935 : }
9936 :
9937 0 : static enum ndr_err_code ndr_pull_DnssrvEnumRecords(struct ndr_pull *ndr, ndr_flags_type flags, struct DnssrvEnumRecords *r)
9938 : {
9939 0 : uint32_t _ptr_pwszServerName;
9940 0 : uint32_t size_pwszServerName_1 = 0;
9941 0 : uint32_t length_pwszServerName_1 = 0;
9942 0 : uint32_t _ptr_pszZone;
9943 0 : uint32_t size_pszZone_1 = 0;
9944 0 : uint32_t length_pszZone_1 = 0;
9945 0 : uint32_t _ptr_pszNodeName;
9946 0 : uint32_t size_pszNodeName_1 = 0;
9947 0 : uint32_t length_pszNodeName_1 = 0;
9948 0 : uint32_t _ptr_pszStartChild;
9949 0 : uint32_t size_pszStartChild_1 = 0;
9950 0 : uint32_t length_pszStartChild_1 = 0;
9951 0 : uint32_t _ptr_pszFilterStart;
9952 0 : uint32_t size_pszFilterStart_1 = 0;
9953 0 : uint32_t length_pszFilterStart_1 = 0;
9954 0 : uint32_t _ptr_pszFilterStop;
9955 0 : uint32_t size_pszFilterStop_1 = 0;
9956 0 : uint32_t length_pszFilterStop_1 = 0;
9957 0 : uint32_t _ptr_pBuffer;
9958 0 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
9959 0 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
9960 0 : TALLOC_CTX *_mem_save_pszNodeName_0 = NULL;
9961 0 : TALLOC_CTX *_mem_save_pszStartChild_0 = NULL;
9962 0 : TALLOC_CTX *_mem_save_pszFilterStart_0 = NULL;
9963 0 : TALLOC_CTX *_mem_save_pszFilterStop_0 = NULL;
9964 0 : TALLOC_CTX *_mem_save_pdwBufferLength_0 = NULL;
9965 0 : TALLOC_CTX *_mem_save_pBuffer_0 = NULL;
9966 0 : TALLOC_CTX *_mem_save_pBuffer_1 = NULL;
9967 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9968 0 : if (flags & NDR_IN) {
9969 0 : NDR_ZERO_STRUCT(r->out);
9970 :
9971 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
9972 0 : if (_ptr_pwszServerName) {
9973 0 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
9974 : } else {
9975 0 : r->in.pwszServerName = NULL;
9976 : }
9977 0 : if (r->in.pwszServerName) {
9978 0 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
9979 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
9980 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
9981 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
9982 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
9983 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
9984 0 : if (length_pwszServerName_1 > size_pwszServerName_1) {
9985 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszServerName_1, length_pwszServerName_1);
9986 : }
9987 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
9988 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
9989 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
9990 : }
9991 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
9992 0 : if (_ptr_pszZone) {
9993 0 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
9994 : } else {
9995 0 : r->in.pszZone = NULL;
9996 : }
9997 0 : if (r->in.pszZone) {
9998 0 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
9999 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
10000 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
10001 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
10002 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
10003 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
10004 0 : if (length_pszZone_1 > size_pszZone_1) {
10005 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZone_1, length_pszZone_1);
10006 : }
10007 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
10008 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
10009 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
10010 : }
10011 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszNodeName));
10012 0 : if (_ptr_pszNodeName) {
10013 0 : NDR_PULL_ALLOC(ndr, r->in.pszNodeName);
10014 : } else {
10015 0 : r->in.pszNodeName = NULL;
10016 : }
10017 0 : if (r->in.pszNodeName) {
10018 0 : _mem_save_pszNodeName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10019 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszNodeName, 0);
10020 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszNodeName));
10021 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszNodeName));
10022 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszNodeName, &size_pszNodeName_1));
10023 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszNodeName, &length_pszNodeName_1));
10024 0 : if (length_pszNodeName_1 > size_pszNodeName_1) {
10025 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszNodeName_1, length_pszNodeName_1);
10026 : }
10027 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNodeName_1, sizeof(uint8_t)));
10028 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszNodeName, length_pszNodeName_1, sizeof(uint8_t), CH_UTF8));
10029 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszNodeName_0, 0);
10030 : }
10031 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszStartChild));
10032 0 : if (_ptr_pszStartChild) {
10033 0 : NDR_PULL_ALLOC(ndr, r->in.pszStartChild);
10034 : } else {
10035 0 : r->in.pszStartChild = NULL;
10036 : }
10037 0 : if (r->in.pszStartChild) {
10038 0 : _mem_save_pszStartChild_0 = NDR_PULL_GET_MEM_CTX(ndr);
10039 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszStartChild, 0);
10040 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszStartChild));
10041 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszStartChild));
10042 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszStartChild, &size_pszStartChild_1));
10043 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszStartChild, &length_pszStartChild_1));
10044 0 : if (length_pszStartChild_1 > size_pszStartChild_1) {
10045 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszStartChild_1, length_pszStartChild_1);
10046 : }
10047 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszStartChild_1, sizeof(uint8_t)));
10048 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszStartChild, length_pszStartChild_1, sizeof(uint8_t), CH_UTF8));
10049 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszStartChild_0, 0);
10050 : }
10051 0 : NDR_CHECK(ndr_pull_dns_record_type(ndr, NDR_SCALARS, &r->in.wRecordType));
10052 0 : NDR_CHECK(ndr_pull_DNS_SELECT_FLAGS(ndr, NDR_SCALARS, &r->in.fSelectFlag));
10053 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFilterStart));
10054 0 : if (_ptr_pszFilterStart) {
10055 0 : NDR_PULL_ALLOC(ndr, r->in.pszFilterStart);
10056 : } else {
10057 0 : r->in.pszFilterStart = NULL;
10058 : }
10059 0 : if (r->in.pszFilterStart) {
10060 0 : _mem_save_pszFilterStart_0 = NDR_PULL_GET_MEM_CTX(ndr);
10061 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszFilterStart, 0);
10062 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszFilterStart));
10063 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszFilterStart));
10064 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszFilterStart, &size_pszFilterStart_1));
10065 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszFilterStart, &length_pszFilterStart_1));
10066 0 : if (length_pszFilterStart_1 > size_pszFilterStart_1) {
10067 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszFilterStart_1, length_pszFilterStart_1);
10068 : }
10069 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFilterStart_1, sizeof(uint8_t)));
10070 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszFilterStart, length_pszFilterStart_1, sizeof(uint8_t), CH_UTF8));
10071 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFilterStart_0, 0);
10072 : }
10073 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFilterStop));
10074 0 : if (_ptr_pszFilterStop) {
10075 0 : NDR_PULL_ALLOC(ndr, r->in.pszFilterStop);
10076 : } else {
10077 0 : r->in.pszFilterStop = NULL;
10078 : }
10079 0 : if (r->in.pszFilterStop) {
10080 0 : _mem_save_pszFilterStop_0 = NDR_PULL_GET_MEM_CTX(ndr);
10081 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszFilterStop, 0);
10082 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszFilterStop));
10083 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszFilterStop));
10084 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszFilterStop, &size_pszFilterStop_1));
10085 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszFilterStop, &length_pszFilterStop_1));
10086 0 : if (length_pszFilterStop_1 > size_pszFilterStop_1) {
10087 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszFilterStop_1, length_pszFilterStop_1);
10088 : }
10089 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFilterStop_1, sizeof(uint8_t)));
10090 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszFilterStop, length_pszFilterStop_1, sizeof(uint8_t), CH_UTF8));
10091 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFilterStop_0, 0);
10092 : }
10093 0 : NDR_PULL_ALLOC(ndr, r->out.pdwBufferLength);
10094 0 : NDR_ZERO_STRUCTP(r->out.pdwBufferLength);
10095 0 : NDR_PULL_ALLOC(ndr, r->out.pBuffer);
10096 0 : NDR_ZERO_STRUCTP(r->out.pBuffer);
10097 : }
10098 0 : if (flags & NDR_OUT) {
10099 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10100 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10101 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10102 0 : NDR_PULL_ALLOC(ndr, r->out.pdwBufferLength);
10103 : }
10104 0 : _mem_save_pdwBufferLength_0 = NDR_PULL_GET_MEM_CTX(ndr);
10105 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwBufferLength, LIBNDR_FLAG_REF_ALLOC);
10106 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pdwBufferLength));
10107 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwBufferLength_0, LIBNDR_FLAG_REF_ALLOC);
10108 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10109 0 : NDR_PULL_ALLOC(ndr, r->out.pBuffer);
10110 : }
10111 0 : _mem_save_pBuffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
10112 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pBuffer, LIBNDR_FLAG_REF_ALLOC);
10113 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pBuffer));
10114 0 : if (_ptr_pBuffer) {
10115 0 : NDR_PULL_ALLOC(ndr, *r->out.pBuffer);
10116 : } else {
10117 0 : *r->out.pBuffer = NULL;
10118 : }
10119 0 : if (*r->out.pBuffer) {
10120 0 : _mem_save_pBuffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
10121 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.pBuffer, 0);
10122 : {
10123 0 : struct ndr_pull *_ndr_pBuffer;
10124 0 : ssize_t sub_size = *r->out.pdwBufferLength;
10125 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_pBuffer, 4, sub_size));
10126 0 : NDR_CHECK(ndr_pull_DNS_RPC_RECORDS_ARRAY(_ndr_pBuffer, NDR_SCALARS, *r->out.pBuffer));
10127 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_pBuffer, 4, sub_size));
10128 : }
10129 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBuffer_1, 0);
10130 : }
10131 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBuffer_0, LIBNDR_FLAG_REF_ALLOC);
10132 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10133 : }
10134 0 : return NDR_ERR_SUCCESS;
10135 : }
10136 :
10137 0 : _PUBLIC_ void ndr_print_DnssrvEnumRecords(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DnssrvEnumRecords *r)
10138 : {
10139 0 : ndr_print_struct(ndr, name, "DnssrvEnumRecords");
10140 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10141 0 : ndr->depth++;
10142 0 : if (flags & NDR_SET_VALUES) {
10143 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10144 : }
10145 0 : if (flags & NDR_IN) {
10146 0 : ndr_print_struct(ndr, "in", "DnssrvEnumRecords");
10147 0 : ndr->depth++;
10148 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
10149 0 : ndr->depth++;
10150 0 : if (r->in.pwszServerName) {
10151 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
10152 : }
10153 0 : ndr->depth--;
10154 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
10155 0 : ndr->depth++;
10156 0 : if (r->in.pszZone) {
10157 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
10158 : }
10159 0 : ndr->depth--;
10160 0 : ndr_print_ptr(ndr, "pszNodeName", r->in.pszNodeName);
10161 0 : ndr->depth++;
10162 0 : if (r->in.pszNodeName) {
10163 0 : ndr_print_string(ndr, "pszNodeName", r->in.pszNodeName);
10164 : }
10165 0 : ndr->depth--;
10166 0 : ndr_print_ptr(ndr, "pszStartChild", r->in.pszStartChild);
10167 0 : ndr->depth++;
10168 0 : if (r->in.pszStartChild) {
10169 0 : ndr_print_string(ndr, "pszStartChild", r->in.pszStartChild);
10170 : }
10171 0 : ndr->depth--;
10172 0 : ndr_print_dns_record_type(ndr, "wRecordType", r->in.wRecordType);
10173 0 : ndr_print_DNS_SELECT_FLAGS(ndr, "fSelectFlag", r->in.fSelectFlag);
10174 0 : ndr_print_ptr(ndr, "pszFilterStart", r->in.pszFilterStart);
10175 0 : ndr->depth++;
10176 0 : if (r->in.pszFilterStart) {
10177 0 : ndr_print_string(ndr, "pszFilterStart", r->in.pszFilterStart);
10178 : }
10179 0 : ndr->depth--;
10180 0 : ndr_print_ptr(ndr, "pszFilterStop", r->in.pszFilterStop);
10181 0 : ndr->depth++;
10182 0 : if (r->in.pszFilterStop) {
10183 0 : ndr_print_string(ndr, "pszFilterStop", r->in.pszFilterStop);
10184 : }
10185 0 : ndr->depth--;
10186 0 : ndr->depth--;
10187 : }
10188 0 : if (flags & NDR_OUT) {
10189 0 : ndr_print_struct(ndr, "out", "DnssrvEnumRecords");
10190 0 : ndr->depth++;
10191 0 : ndr_print_ptr(ndr, "pdwBufferLength", r->out.pdwBufferLength);
10192 0 : ndr->depth++;
10193 0 : ndr_print_uint32(ndr, "pdwBufferLength", *r->out.pdwBufferLength);
10194 0 : ndr->depth--;
10195 0 : ndr_print_ptr(ndr, "pBuffer", r->out.pBuffer);
10196 0 : ndr->depth++;
10197 0 : ndr_print_ptr(ndr, "pBuffer", *r->out.pBuffer);
10198 0 : ndr->depth++;
10199 0 : if (*r->out.pBuffer) {
10200 0 : ndr_print_DNS_RPC_RECORDS_ARRAY(ndr, "pBuffer", *r->out.pBuffer);
10201 : }
10202 0 : ndr->depth--;
10203 0 : ndr->depth--;
10204 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10205 0 : ndr->depth--;
10206 : }
10207 0 : ndr->depth--;
10208 : }
10209 :
10210 0 : static enum ndr_err_code ndr_push_DnssrvUpdateRecord(struct ndr_push *ndr, ndr_flags_type flags, const struct DnssrvUpdateRecord *r)
10211 : {
10212 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10213 0 : if (flags & NDR_IN) {
10214 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
10215 0 : if (r->in.pwszServerName) {
10216 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10217 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10218 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10219 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10220 : }
10221 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
10222 0 : if (r->in.pszZone) {
10223 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10224 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10225 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10226 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10227 : }
10228 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszNodeName));
10229 0 : if (r->in.pszNodeName) {
10230 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
10231 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10232 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
10233 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszNodeName, ndr_charset_length(r->in.pszNodeName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10234 : }
10235 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pAddRecord));
10236 0 : if (r->in.pAddRecord) {
10237 0 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pAddRecord));
10238 : }
10239 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDeleteRecord));
10240 0 : if (r->in.pDeleteRecord) {
10241 0 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pDeleteRecord));
10242 : }
10243 : }
10244 0 : if (flags & NDR_OUT) {
10245 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10246 : }
10247 0 : return NDR_ERR_SUCCESS;
10248 : }
10249 :
10250 0 : static enum ndr_err_code ndr_pull_DnssrvUpdateRecord(struct ndr_pull *ndr, ndr_flags_type flags, struct DnssrvUpdateRecord *r)
10251 : {
10252 0 : uint32_t _ptr_pwszServerName;
10253 0 : uint32_t size_pwszServerName_1 = 0;
10254 0 : uint32_t length_pwszServerName_1 = 0;
10255 0 : uint32_t _ptr_pszZone;
10256 0 : uint32_t size_pszZone_1 = 0;
10257 0 : uint32_t length_pszZone_1 = 0;
10258 0 : uint32_t _ptr_pszNodeName;
10259 0 : uint32_t size_pszNodeName_1 = 0;
10260 0 : uint32_t length_pszNodeName_1 = 0;
10261 0 : uint32_t _ptr_pAddRecord;
10262 0 : uint32_t _ptr_pDeleteRecord;
10263 0 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
10264 0 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
10265 0 : TALLOC_CTX *_mem_save_pszNodeName_0 = NULL;
10266 0 : TALLOC_CTX *_mem_save_pAddRecord_0 = NULL;
10267 0 : TALLOC_CTX *_mem_save_pDeleteRecord_0 = NULL;
10268 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10269 0 : if (flags & NDR_IN) {
10270 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
10271 0 : if (_ptr_pwszServerName) {
10272 0 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
10273 : } else {
10274 0 : r->in.pwszServerName = NULL;
10275 : }
10276 0 : if (r->in.pwszServerName) {
10277 0 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10278 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
10279 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
10280 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
10281 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
10282 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
10283 0 : if (length_pwszServerName_1 > size_pwszServerName_1) {
10284 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszServerName_1, length_pwszServerName_1);
10285 : }
10286 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
10287 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
10288 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
10289 : }
10290 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
10291 0 : if (_ptr_pszZone) {
10292 0 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
10293 : } else {
10294 0 : r->in.pszZone = NULL;
10295 : }
10296 0 : if (r->in.pszZone) {
10297 0 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
10298 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
10299 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
10300 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
10301 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
10302 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
10303 0 : if (length_pszZone_1 > size_pszZone_1) {
10304 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZone_1, length_pszZone_1);
10305 : }
10306 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
10307 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
10308 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
10309 : }
10310 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszNodeName));
10311 0 : if (_ptr_pszNodeName) {
10312 0 : NDR_PULL_ALLOC(ndr, r->in.pszNodeName);
10313 : } else {
10314 0 : r->in.pszNodeName = NULL;
10315 : }
10316 0 : if (r->in.pszNodeName) {
10317 0 : _mem_save_pszNodeName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10318 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszNodeName, 0);
10319 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszNodeName));
10320 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszNodeName));
10321 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszNodeName, &size_pszNodeName_1));
10322 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszNodeName, &length_pszNodeName_1));
10323 0 : if (length_pszNodeName_1 > size_pszNodeName_1) {
10324 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszNodeName_1, length_pszNodeName_1);
10325 : }
10326 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNodeName_1, sizeof(uint8_t)));
10327 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszNodeName, length_pszNodeName_1, sizeof(uint8_t), CH_UTF8));
10328 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszNodeName_0, 0);
10329 : }
10330 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pAddRecord));
10331 0 : if (_ptr_pAddRecord) {
10332 0 : NDR_PULL_ALLOC(ndr, r->in.pAddRecord);
10333 : } else {
10334 0 : r->in.pAddRecord = NULL;
10335 : }
10336 0 : if (r->in.pAddRecord) {
10337 0 : _mem_save_pAddRecord_0 = NDR_PULL_GET_MEM_CTX(ndr);
10338 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pAddRecord, 0);
10339 0 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pAddRecord));
10340 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pAddRecord_0, 0);
10341 : }
10342 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDeleteRecord));
10343 0 : if (_ptr_pDeleteRecord) {
10344 0 : NDR_PULL_ALLOC(ndr, r->in.pDeleteRecord);
10345 : } else {
10346 0 : r->in.pDeleteRecord = NULL;
10347 : }
10348 0 : if (r->in.pDeleteRecord) {
10349 0 : _mem_save_pDeleteRecord_0 = NDR_PULL_GET_MEM_CTX(ndr);
10350 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDeleteRecord, 0);
10351 0 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pDeleteRecord));
10352 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDeleteRecord_0, 0);
10353 : }
10354 : }
10355 0 : if (flags & NDR_OUT) {
10356 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10357 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10358 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10359 : }
10360 0 : return NDR_ERR_SUCCESS;
10361 : }
10362 :
10363 0 : _PUBLIC_ void ndr_print_DnssrvUpdateRecord(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DnssrvUpdateRecord *r)
10364 : {
10365 0 : ndr_print_struct(ndr, name, "DnssrvUpdateRecord");
10366 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10367 0 : ndr->depth++;
10368 0 : if (flags & NDR_SET_VALUES) {
10369 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10370 : }
10371 0 : if (flags & NDR_IN) {
10372 0 : ndr_print_struct(ndr, "in", "DnssrvUpdateRecord");
10373 0 : ndr->depth++;
10374 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
10375 0 : ndr->depth++;
10376 0 : if (r->in.pwszServerName) {
10377 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
10378 : }
10379 0 : ndr->depth--;
10380 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
10381 0 : ndr->depth++;
10382 0 : if (r->in.pszZone) {
10383 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
10384 : }
10385 0 : ndr->depth--;
10386 0 : ndr_print_ptr(ndr, "pszNodeName", r->in.pszNodeName);
10387 0 : ndr->depth++;
10388 0 : if (r->in.pszNodeName) {
10389 0 : ndr_print_string(ndr, "pszNodeName", r->in.pszNodeName);
10390 : }
10391 0 : ndr->depth--;
10392 0 : ndr_print_ptr(ndr, "pAddRecord", r->in.pAddRecord);
10393 0 : ndr->depth++;
10394 0 : if (r->in.pAddRecord) {
10395 0 : ndr_print_DNS_RPC_RECORD_BUF(ndr, "pAddRecord", r->in.pAddRecord);
10396 : }
10397 0 : ndr->depth--;
10398 0 : ndr_print_ptr(ndr, "pDeleteRecord", r->in.pDeleteRecord);
10399 0 : ndr->depth++;
10400 0 : if (r->in.pDeleteRecord) {
10401 0 : ndr_print_DNS_RPC_RECORD_BUF(ndr, "pDeleteRecord", r->in.pDeleteRecord);
10402 : }
10403 0 : ndr->depth--;
10404 0 : ndr->depth--;
10405 : }
10406 0 : if (flags & NDR_OUT) {
10407 0 : ndr_print_struct(ndr, "out", "DnssrvUpdateRecord");
10408 0 : ndr->depth++;
10409 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10410 0 : ndr->depth--;
10411 : }
10412 0 : ndr->depth--;
10413 : }
10414 :
10415 3304 : static enum ndr_err_code ndr_push_DnssrvOperation2(struct ndr_push *ndr, ndr_flags_type flags, const struct DnssrvOperation2 *r)
10416 : {
10417 3304 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10418 3304 : if (flags & NDR_IN) {
10419 1652 : NDR_CHECK(ndr_push_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, r->in.dwClientVersion));
10420 1652 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwSettingFlags));
10421 1652 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
10422 1652 : if (r->in.pwszServerName) {
10423 1652 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10424 1652 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10425 1652 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10426 1652 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10427 : }
10428 1652 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
10429 1652 : if (r->in.pszZone) {
10430 1223 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10431 1223 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10432 1223 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10433 1223 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10434 : }
10435 1652 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwContext));
10436 1652 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
10437 1652 : if (r->in.pszOperation) {
10438 1652 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10439 1652 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10440 1652 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10441 1652 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszOperation, ndr_charset_length(r->in.pszOperation, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10442 : }
10443 1652 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->in.dwTypeId));
10444 1652 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId));
10445 1652 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pData));
10446 : }
10447 3304 : if (flags & NDR_OUT) {
10448 1652 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10449 : }
10450 3304 : return NDR_ERR_SUCCESS;
10451 : }
10452 :
10453 3304 : static enum ndr_err_code ndr_pull_DnssrvOperation2(struct ndr_pull *ndr, ndr_flags_type flags, struct DnssrvOperation2 *r)
10454 : {
10455 0 : uint32_t _ptr_pwszServerName;
10456 3304 : uint32_t size_pwszServerName_1 = 0;
10457 3304 : uint32_t length_pwszServerName_1 = 0;
10458 0 : uint32_t _ptr_pszZone;
10459 3304 : uint32_t size_pszZone_1 = 0;
10460 3304 : uint32_t length_pszZone_1 = 0;
10461 0 : uint32_t _ptr_pszOperation;
10462 3304 : uint32_t size_pszOperation_1 = 0;
10463 3304 : uint32_t length_pszOperation_1 = 0;
10464 3304 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
10465 3304 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
10466 3304 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
10467 3304 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10468 3304 : if (flags & NDR_IN) {
10469 1652 : NDR_CHECK(ndr_pull_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, &r->in.dwClientVersion));
10470 1652 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwSettingFlags));
10471 1652 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
10472 1652 : if (_ptr_pwszServerName) {
10473 1652 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
10474 : } else {
10475 0 : r->in.pwszServerName = NULL;
10476 : }
10477 1652 : if (r->in.pwszServerName) {
10478 1652 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10479 1652 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
10480 1652 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
10481 1652 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
10482 1652 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
10483 1652 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
10484 1652 : if (length_pwszServerName_1 > size_pwszServerName_1) {
10485 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszServerName_1, length_pwszServerName_1);
10486 : }
10487 1652 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
10488 1652 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
10489 1652 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
10490 : }
10491 1652 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
10492 1652 : if (_ptr_pszZone) {
10493 1223 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
10494 : } else {
10495 429 : r->in.pszZone = NULL;
10496 : }
10497 1652 : if (r->in.pszZone) {
10498 1223 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
10499 1223 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
10500 1223 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
10501 1223 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
10502 1223 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
10503 1223 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
10504 1223 : if (length_pszZone_1 > size_pszZone_1) {
10505 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZone_1, length_pszZone_1);
10506 : }
10507 1223 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
10508 1223 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
10509 1223 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
10510 : }
10511 1652 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwContext));
10512 1652 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
10513 1652 : if (_ptr_pszOperation) {
10514 1652 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
10515 : } else {
10516 0 : r->in.pszOperation = NULL;
10517 : }
10518 1652 : if (r->in.pszOperation) {
10519 1652 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
10520 1652 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
10521 1652 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
10522 1652 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
10523 1652 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
10524 1652 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
10525 1652 : if (length_pszOperation_1 > size_pszOperation_1) {
10526 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszOperation_1, length_pszOperation_1);
10527 : }
10528 1652 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
10529 1652 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
10530 1652 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
10531 : }
10532 1652 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, &r->in.dwTypeId));
10533 1652 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId));
10534 1652 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pData));
10535 : }
10536 3304 : if (flags & NDR_OUT) {
10537 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10538 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10539 1652 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10540 : }
10541 3304 : return NDR_ERR_SUCCESS;
10542 : }
10543 :
10544 2 : _PUBLIC_ void ndr_print_DnssrvOperation2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DnssrvOperation2 *r)
10545 : {
10546 2 : ndr_print_struct(ndr, name, "DnssrvOperation2");
10547 2 : if (r == NULL) { ndr_print_null(ndr); return; }
10548 2 : ndr->depth++;
10549 2 : if (flags & NDR_SET_VALUES) {
10550 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10551 : }
10552 2 : if (flags & NDR_IN) {
10553 2 : ndr_print_struct(ndr, "in", "DnssrvOperation2");
10554 2 : ndr->depth++;
10555 2 : ndr_print_DNS_RPC_CLIENT_VERSION(ndr, "dwClientVersion", r->in.dwClientVersion);
10556 2 : ndr_print_uint32(ndr, "dwSettingFlags", r->in.dwSettingFlags);
10557 2 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
10558 2 : ndr->depth++;
10559 2 : if (r->in.pwszServerName) {
10560 2 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
10561 : }
10562 2 : ndr->depth--;
10563 2 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
10564 2 : ndr->depth++;
10565 2 : if (r->in.pszZone) {
10566 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
10567 : }
10568 2 : ndr->depth--;
10569 2 : ndr_print_uint32(ndr, "dwContext", r->in.dwContext);
10570 2 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
10571 2 : ndr->depth++;
10572 2 : if (r->in.pszOperation) {
10573 2 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
10574 : }
10575 2 : ndr->depth--;
10576 2 : ndr_print_DNS_RPC_TYPEID(ndr, "dwTypeId", r->in.dwTypeId);
10577 2 : ndr_print_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId);
10578 2 : ndr_print_DNSSRV_RPC_UNION(ndr, "pData", &r->in.pData);
10579 2 : ndr->depth--;
10580 : }
10581 2 : if (flags & NDR_OUT) {
10582 0 : ndr_print_struct(ndr, "out", "DnssrvOperation2");
10583 0 : ndr->depth++;
10584 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10585 0 : ndr->depth--;
10586 : }
10587 2 : ndr->depth--;
10588 : }
10589 :
10590 58 : static enum ndr_err_code ndr_push_DnssrvQuery2(struct ndr_push *ndr, ndr_flags_type flags, const struct DnssrvQuery2 *r)
10591 : {
10592 58 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10593 58 : if (flags & NDR_IN) {
10594 29 : NDR_CHECK(ndr_push_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, r->in.dwClientVersion));
10595 29 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwSettingFlags));
10596 29 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
10597 29 : if (r->in.pwszServerName) {
10598 29 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10599 29 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10600 29 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10601 29 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10602 : }
10603 29 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
10604 29 : if (r->in.pszZone) {
10605 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10606 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10607 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10608 17 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10609 : }
10610 29 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
10611 29 : if (r->in.pszOperation) {
10612 29 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10613 29 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10614 29 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10615 29 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszOperation, ndr_charset_length(r->in.pszOperation, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10616 : }
10617 : }
10618 58 : if (flags & NDR_OUT) {
10619 29 : if (r->out.pdwTypeId == NULL) {
10620 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10621 : }
10622 29 : if (r->out.ppData == NULL) {
10623 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10624 : }
10625 29 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, *r->out.pdwTypeId));
10626 29 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId));
10627 29 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppData));
10628 29 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10629 : }
10630 58 : return NDR_ERR_SUCCESS;
10631 : }
10632 :
10633 58 : static enum ndr_err_code ndr_pull_DnssrvQuery2(struct ndr_pull *ndr, ndr_flags_type flags, struct DnssrvQuery2 *r)
10634 : {
10635 0 : uint32_t _ptr_pwszServerName;
10636 58 : uint32_t size_pwszServerName_1 = 0;
10637 58 : uint32_t length_pwszServerName_1 = 0;
10638 0 : uint32_t _ptr_pszZone;
10639 58 : uint32_t size_pszZone_1 = 0;
10640 58 : uint32_t length_pszZone_1 = 0;
10641 0 : uint32_t _ptr_pszOperation;
10642 58 : uint32_t size_pszOperation_1 = 0;
10643 58 : uint32_t length_pszOperation_1 = 0;
10644 58 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
10645 58 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
10646 58 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
10647 58 : TALLOC_CTX *_mem_save_pdwTypeId_0 = NULL;
10648 58 : TALLOC_CTX *_mem_save_ppData_0 = NULL;
10649 58 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10650 58 : if (flags & NDR_IN) {
10651 29 : NDR_ZERO_STRUCT(r->out);
10652 :
10653 29 : NDR_CHECK(ndr_pull_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, &r->in.dwClientVersion));
10654 29 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwSettingFlags));
10655 29 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
10656 29 : if (_ptr_pwszServerName) {
10657 29 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
10658 : } else {
10659 0 : r->in.pwszServerName = NULL;
10660 : }
10661 29 : if (r->in.pwszServerName) {
10662 29 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10663 29 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
10664 29 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
10665 29 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
10666 29 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
10667 29 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
10668 29 : if (length_pwszServerName_1 > size_pwszServerName_1) {
10669 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszServerName_1, length_pwszServerName_1);
10670 : }
10671 29 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
10672 29 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
10673 29 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
10674 : }
10675 29 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
10676 29 : if (_ptr_pszZone) {
10677 17 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
10678 : } else {
10679 12 : r->in.pszZone = NULL;
10680 : }
10681 29 : if (r->in.pszZone) {
10682 17 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
10683 17 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
10684 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
10685 17 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
10686 17 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
10687 17 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
10688 17 : if (length_pszZone_1 > size_pszZone_1) {
10689 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZone_1, length_pszZone_1);
10690 : }
10691 17 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
10692 17 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
10693 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
10694 : }
10695 29 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
10696 29 : if (_ptr_pszOperation) {
10697 29 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
10698 : } else {
10699 0 : r->in.pszOperation = NULL;
10700 : }
10701 29 : if (r->in.pszOperation) {
10702 29 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
10703 29 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
10704 29 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
10705 29 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
10706 29 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
10707 29 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
10708 29 : if (length_pszOperation_1 > size_pszOperation_1) {
10709 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszOperation_1, length_pszOperation_1);
10710 : }
10711 29 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
10712 29 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
10713 29 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
10714 : }
10715 29 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeId);
10716 29 : NDR_ZERO_STRUCTP(r->out.pdwTypeId);
10717 29 : NDR_PULL_ALLOC(ndr, r->out.ppData);
10718 29 : NDR_ZERO_STRUCTP(r->out.ppData);
10719 : }
10720 58 : if (flags & NDR_OUT) {
10721 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10722 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10723 29 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10724 29 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeId);
10725 : }
10726 29 : _mem_save_pdwTypeId_0 = NDR_PULL_GET_MEM_CTX(ndr);
10727 29 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwTypeId, LIBNDR_FLAG_REF_ALLOC);
10728 29 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->out.pdwTypeId));
10729 29 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwTypeId_0, LIBNDR_FLAG_REF_ALLOC);
10730 29 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10731 29 : NDR_PULL_ALLOC(ndr, r->out.ppData);
10732 : }
10733 29 : _mem_save_ppData_0 = NDR_PULL_GET_MEM_CTX(ndr);
10734 29 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppData, LIBNDR_FLAG_REF_ALLOC);
10735 29 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId));
10736 29 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppData));
10737 29 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppData_0, LIBNDR_FLAG_REF_ALLOC);
10738 29 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10739 : }
10740 58 : return NDR_ERR_SUCCESS;
10741 : }
10742 :
10743 0 : _PUBLIC_ void ndr_print_DnssrvQuery2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DnssrvQuery2 *r)
10744 : {
10745 0 : ndr_print_struct(ndr, name, "DnssrvQuery2");
10746 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10747 0 : ndr->depth++;
10748 0 : if (flags & NDR_SET_VALUES) {
10749 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10750 : }
10751 0 : if (flags & NDR_IN) {
10752 0 : ndr_print_struct(ndr, "in", "DnssrvQuery2");
10753 0 : ndr->depth++;
10754 0 : ndr_print_DNS_RPC_CLIENT_VERSION(ndr, "dwClientVersion", r->in.dwClientVersion);
10755 0 : ndr_print_uint32(ndr, "dwSettingFlags", r->in.dwSettingFlags);
10756 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
10757 0 : ndr->depth++;
10758 0 : if (r->in.pwszServerName) {
10759 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
10760 : }
10761 0 : ndr->depth--;
10762 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
10763 0 : ndr->depth++;
10764 0 : if (r->in.pszZone) {
10765 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
10766 : }
10767 0 : ndr->depth--;
10768 0 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
10769 0 : ndr->depth++;
10770 0 : if (r->in.pszOperation) {
10771 0 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
10772 : }
10773 0 : ndr->depth--;
10774 0 : ndr->depth--;
10775 : }
10776 0 : if (flags & NDR_OUT) {
10777 0 : ndr_print_struct(ndr, "out", "DnssrvQuery2");
10778 0 : ndr->depth++;
10779 0 : ndr_print_ptr(ndr, "pdwTypeId", r->out.pdwTypeId);
10780 0 : ndr->depth++;
10781 0 : ndr_print_DNS_RPC_TYPEID(ndr, "pdwTypeId", *r->out.pdwTypeId);
10782 0 : ndr->depth--;
10783 0 : ndr_print_ptr(ndr, "ppData", r->out.ppData);
10784 0 : ndr->depth++;
10785 0 : ndr_print_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId);
10786 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "ppData", r->out.ppData);
10787 0 : ndr->depth--;
10788 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10789 0 : ndr->depth--;
10790 : }
10791 0 : ndr->depth--;
10792 : }
10793 :
10794 40 : static enum ndr_err_code ndr_push_DnssrvComplexOperation2(struct ndr_push *ndr, ndr_flags_type flags, const struct DnssrvComplexOperation2 *r)
10795 : {
10796 40 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10797 40 : if (flags & NDR_IN) {
10798 20 : NDR_CHECK(ndr_push_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, r->in.dwClientVersion));
10799 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwSettingFlags));
10800 20 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
10801 20 : if (r->in.pwszServerName) {
10802 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10803 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10804 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10805 20 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10806 : }
10807 20 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
10808 20 : if (r->in.pszZone) {
10809 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10810 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10811 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10812 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10813 : }
10814 20 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
10815 20 : if (r->in.pszOperation) {
10816 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10817 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10818 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10819 20 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszOperation, ndr_charset_length(r->in.pszOperation, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10820 : }
10821 20 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->in.dwTypeIn));
10822 20 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn));
10823 20 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pDataIn));
10824 : }
10825 40 : if (flags & NDR_OUT) {
10826 20 : if (r->out.pdwTypeOut == NULL) {
10827 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10828 : }
10829 20 : if (r->out.ppDataOut == NULL) {
10830 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10831 : }
10832 20 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, *r->out.pdwTypeOut));
10833 20 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut));
10834 20 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppDataOut));
10835 20 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10836 : }
10837 40 : return NDR_ERR_SUCCESS;
10838 : }
10839 :
10840 40 : static enum ndr_err_code ndr_pull_DnssrvComplexOperation2(struct ndr_pull *ndr, ndr_flags_type flags, struct DnssrvComplexOperation2 *r)
10841 : {
10842 0 : uint32_t _ptr_pwszServerName;
10843 40 : uint32_t size_pwszServerName_1 = 0;
10844 40 : uint32_t length_pwszServerName_1 = 0;
10845 0 : uint32_t _ptr_pszZone;
10846 40 : uint32_t size_pszZone_1 = 0;
10847 40 : uint32_t length_pszZone_1 = 0;
10848 0 : uint32_t _ptr_pszOperation;
10849 40 : uint32_t size_pszOperation_1 = 0;
10850 40 : uint32_t length_pszOperation_1 = 0;
10851 40 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
10852 40 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
10853 40 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
10854 40 : TALLOC_CTX *_mem_save_pdwTypeOut_0 = NULL;
10855 40 : TALLOC_CTX *_mem_save_ppDataOut_0 = NULL;
10856 40 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10857 40 : if (flags & NDR_IN) {
10858 20 : NDR_ZERO_STRUCT(r->out);
10859 :
10860 20 : NDR_CHECK(ndr_pull_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, &r->in.dwClientVersion));
10861 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwSettingFlags));
10862 20 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
10863 20 : if (_ptr_pwszServerName) {
10864 20 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
10865 : } else {
10866 0 : r->in.pwszServerName = NULL;
10867 : }
10868 20 : if (r->in.pwszServerName) {
10869 20 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10870 20 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
10871 20 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
10872 20 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
10873 20 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
10874 20 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
10875 20 : if (length_pwszServerName_1 > size_pwszServerName_1) {
10876 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszServerName_1, length_pwszServerName_1);
10877 : }
10878 20 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
10879 20 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
10880 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
10881 : }
10882 20 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
10883 20 : if (_ptr_pszZone) {
10884 0 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
10885 : } else {
10886 20 : r->in.pszZone = NULL;
10887 : }
10888 20 : if (r->in.pszZone) {
10889 0 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
10890 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
10891 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
10892 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
10893 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
10894 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
10895 0 : if (length_pszZone_1 > size_pszZone_1) {
10896 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZone_1, length_pszZone_1);
10897 : }
10898 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
10899 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
10900 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
10901 : }
10902 20 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
10903 20 : if (_ptr_pszOperation) {
10904 20 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
10905 : } else {
10906 0 : r->in.pszOperation = NULL;
10907 : }
10908 20 : if (r->in.pszOperation) {
10909 20 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
10910 20 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
10911 20 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
10912 20 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
10913 20 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
10914 20 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
10915 20 : if (length_pszOperation_1 > size_pszOperation_1) {
10916 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszOperation_1, length_pszOperation_1);
10917 : }
10918 20 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
10919 20 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
10920 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
10921 : }
10922 20 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, &r->in.dwTypeIn));
10923 20 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn));
10924 20 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pDataIn));
10925 20 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeOut);
10926 20 : NDR_ZERO_STRUCTP(r->out.pdwTypeOut);
10927 20 : NDR_PULL_ALLOC(ndr, r->out.ppDataOut);
10928 20 : NDR_ZERO_STRUCTP(r->out.ppDataOut);
10929 : }
10930 40 : if (flags & NDR_OUT) {
10931 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10932 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10933 20 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10934 20 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeOut);
10935 : }
10936 20 : _mem_save_pdwTypeOut_0 = NDR_PULL_GET_MEM_CTX(ndr);
10937 20 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwTypeOut, LIBNDR_FLAG_REF_ALLOC);
10938 20 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->out.pdwTypeOut));
10939 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwTypeOut_0, LIBNDR_FLAG_REF_ALLOC);
10940 20 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10941 20 : NDR_PULL_ALLOC(ndr, r->out.ppDataOut);
10942 : }
10943 20 : _mem_save_ppDataOut_0 = NDR_PULL_GET_MEM_CTX(ndr);
10944 20 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppDataOut, LIBNDR_FLAG_REF_ALLOC);
10945 20 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut));
10946 20 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppDataOut));
10947 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppDataOut_0, LIBNDR_FLAG_REF_ALLOC);
10948 20 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10949 : }
10950 40 : return NDR_ERR_SUCCESS;
10951 : }
10952 :
10953 0 : _PUBLIC_ void ndr_print_DnssrvComplexOperation2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DnssrvComplexOperation2 *r)
10954 : {
10955 0 : ndr_print_struct(ndr, name, "DnssrvComplexOperation2");
10956 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10957 0 : ndr->depth++;
10958 0 : if (flags & NDR_SET_VALUES) {
10959 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10960 : }
10961 0 : if (flags & NDR_IN) {
10962 0 : ndr_print_struct(ndr, "in", "DnssrvComplexOperation2");
10963 0 : ndr->depth++;
10964 0 : ndr_print_DNS_RPC_CLIENT_VERSION(ndr, "dwClientVersion", r->in.dwClientVersion);
10965 0 : ndr_print_uint32(ndr, "dwSettingFlags", r->in.dwSettingFlags);
10966 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
10967 0 : ndr->depth++;
10968 0 : if (r->in.pwszServerName) {
10969 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
10970 : }
10971 0 : ndr->depth--;
10972 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
10973 0 : ndr->depth++;
10974 0 : if (r->in.pszZone) {
10975 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
10976 : }
10977 0 : ndr->depth--;
10978 0 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
10979 0 : ndr->depth++;
10980 0 : if (r->in.pszOperation) {
10981 0 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
10982 : }
10983 0 : ndr->depth--;
10984 0 : ndr_print_DNS_RPC_TYPEID(ndr, "dwTypeIn", r->in.dwTypeIn);
10985 0 : ndr_print_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn);
10986 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "pDataIn", &r->in.pDataIn);
10987 0 : ndr->depth--;
10988 : }
10989 0 : if (flags & NDR_OUT) {
10990 0 : ndr_print_struct(ndr, "out", "DnssrvComplexOperation2");
10991 0 : ndr->depth++;
10992 0 : ndr_print_ptr(ndr, "pdwTypeOut", r->out.pdwTypeOut);
10993 0 : ndr->depth++;
10994 0 : ndr_print_DNS_RPC_TYPEID(ndr, "pdwTypeOut", *r->out.pdwTypeOut);
10995 0 : ndr->depth--;
10996 0 : ndr_print_ptr(ndr, "ppDataOut", r->out.ppDataOut);
10997 0 : ndr->depth++;
10998 0 : ndr_print_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut);
10999 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "ppDataOut", r->out.ppDataOut);
11000 0 : ndr->depth--;
11001 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11002 0 : ndr->depth--;
11003 : }
11004 0 : ndr->depth--;
11005 : }
11006 :
11007 2524 : static enum ndr_err_code ndr_push_DnssrvEnumRecords2(struct ndr_push *ndr, ndr_flags_type flags, const struct DnssrvEnumRecords2 *r)
11008 : {
11009 2524 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11010 2524 : if (flags & NDR_IN) {
11011 1262 : NDR_CHECK(ndr_push_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, r->in.dwClientVersion));
11012 1262 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwSettingFlags));
11013 1262 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
11014 1262 : if (r->in.pwszServerName) {
11015 1262 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
11016 1262 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11017 1262 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
11018 1262 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11019 : }
11020 1262 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
11021 1262 : if (r->in.pszZone) {
11022 1262 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
11023 1262 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11024 1262 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
11025 1262 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11026 : }
11027 1262 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszNodeName));
11028 1262 : if (r->in.pszNodeName) {
11029 1262 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
11030 1262 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11031 1262 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
11032 1262 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszNodeName, ndr_charset_length(r->in.pszNodeName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11033 : }
11034 1262 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszStartChild));
11035 1262 : if (r->in.pszStartChild) {
11036 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszStartChild, CH_UTF8)));
11037 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11038 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszStartChild, CH_UTF8)));
11039 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszStartChild, ndr_charset_length(r->in.pszStartChild, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11040 : }
11041 1262 : NDR_CHECK(ndr_push_dns_record_type(ndr, NDR_SCALARS, r->in.wRecordType));
11042 1262 : NDR_CHECK(ndr_push_DNS_SELECT_FLAGS(ndr, NDR_SCALARS, r->in.fSelectFlag));
11043 1262 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszFilterStart));
11044 1262 : if (r->in.pszFilterStart) {
11045 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStart, CH_UTF8)));
11046 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11047 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStart, CH_UTF8)));
11048 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszFilterStart, ndr_charset_length(r->in.pszFilterStart, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11049 : }
11050 1262 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszFilterStop));
11051 1262 : if (r->in.pszFilterStop) {
11052 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStop, CH_UTF8)));
11053 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11054 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStop, CH_UTF8)));
11055 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszFilterStop, ndr_charset_length(r->in.pszFilterStop, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11056 : }
11057 : }
11058 2524 : if (flags & NDR_OUT) {
11059 1262 : if (r->out.pdwBufferLength == NULL) {
11060 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11061 : }
11062 1262 : if (r->out.pBuffer == NULL) {
11063 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11064 : }
11065 1262 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pdwBufferLength));
11066 1262 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.pBuffer));
11067 1262 : if (*r->out.pBuffer) {
11068 : {
11069 0 : struct ndr_push *_ndr_pBuffer;
11070 1080 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_pBuffer, 4, *r->out.pdwBufferLength));
11071 1080 : NDR_CHECK(ndr_push_DNS_RPC_RECORDS_ARRAY(_ndr_pBuffer, NDR_SCALARS, *r->out.pBuffer));
11072 1080 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_pBuffer, 4, *r->out.pdwBufferLength));
11073 : }
11074 : }
11075 1262 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
11076 : }
11077 2524 : return NDR_ERR_SUCCESS;
11078 : }
11079 :
11080 2524 : static enum ndr_err_code ndr_pull_DnssrvEnumRecords2(struct ndr_pull *ndr, ndr_flags_type flags, struct DnssrvEnumRecords2 *r)
11081 : {
11082 0 : uint32_t _ptr_pwszServerName;
11083 2524 : uint32_t size_pwszServerName_1 = 0;
11084 2524 : uint32_t length_pwszServerName_1 = 0;
11085 0 : uint32_t _ptr_pszZone;
11086 2524 : uint32_t size_pszZone_1 = 0;
11087 2524 : uint32_t length_pszZone_1 = 0;
11088 0 : uint32_t _ptr_pszNodeName;
11089 2524 : uint32_t size_pszNodeName_1 = 0;
11090 2524 : uint32_t length_pszNodeName_1 = 0;
11091 0 : uint32_t _ptr_pszStartChild;
11092 2524 : uint32_t size_pszStartChild_1 = 0;
11093 2524 : uint32_t length_pszStartChild_1 = 0;
11094 0 : uint32_t _ptr_pszFilterStart;
11095 2524 : uint32_t size_pszFilterStart_1 = 0;
11096 2524 : uint32_t length_pszFilterStart_1 = 0;
11097 0 : uint32_t _ptr_pszFilterStop;
11098 2524 : uint32_t size_pszFilterStop_1 = 0;
11099 2524 : uint32_t length_pszFilterStop_1 = 0;
11100 0 : uint32_t _ptr_pBuffer;
11101 2524 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
11102 2524 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
11103 2524 : TALLOC_CTX *_mem_save_pszNodeName_0 = NULL;
11104 2524 : TALLOC_CTX *_mem_save_pszStartChild_0 = NULL;
11105 2524 : TALLOC_CTX *_mem_save_pszFilterStart_0 = NULL;
11106 2524 : TALLOC_CTX *_mem_save_pszFilterStop_0 = NULL;
11107 2524 : TALLOC_CTX *_mem_save_pdwBufferLength_0 = NULL;
11108 2524 : TALLOC_CTX *_mem_save_pBuffer_0 = NULL;
11109 2524 : TALLOC_CTX *_mem_save_pBuffer_1 = NULL;
11110 2524 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11111 2524 : if (flags & NDR_IN) {
11112 1262 : NDR_ZERO_STRUCT(r->out);
11113 :
11114 1262 : NDR_CHECK(ndr_pull_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, &r->in.dwClientVersion));
11115 1262 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwSettingFlags));
11116 1262 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
11117 1262 : if (_ptr_pwszServerName) {
11118 1262 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
11119 : } else {
11120 0 : r->in.pwszServerName = NULL;
11121 : }
11122 1262 : if (r->in.pwszServerName) {
11123 1262 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
11124 1262 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
11125 1262 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
11126 1262 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
11127 1262 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
11128 1262 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
11129 1262 : if (length_pwszServerName_1 > size_pwszServerName_1) {
11130 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszServerName_1, length_pwszServerName_1);
11131 : }
11132 1262 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
11133 1262 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
11134 1262 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
11135 : }
11136 1262 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
11137 1262 : if (_ptr_pszZone) {
11138 1262 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
11139 : } else {
11140 0 : r->in.pszZone = NULL;
11141 : }
11142 1262 : if (r->in.pszZone) {
11143 1262 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
11144 1262 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
11145 1262 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
11146 1262 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
11147 1262 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
11148 1262 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
11149 1262 : if (length_pszZone_1 > size_pszZone_1) {
11150 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZone_1, length_pszZone_1);
11151 : }
11152 1262 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
11153 1262 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
11154 1262 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
11155 : }
11156 1262 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszNodeName));
11157 1262 : if (_ptr_pszNodeName) {
11158 1262 : NDR_PULL_ALLOC(ndr, r->in.pszNodeName);
11159 : } else {
11160 0 : r->in.pszNodeName = NULL;
11161 : }
11162 1262 : if (r->in.pszNodeName) {
11163 1262 : _mem_save_pszNodeName_0 = NDR_PULL_GET_MEM_CTX(ndr);
11164 1262 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszNodeName, 0);
11165 1262 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszNodeName));
11166 1262 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszNodeName));
11167 1262 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszNodeName, &size_pszNodeName_1));
11168 1262 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszNodeName, &length_pszNodeName_1));
11169 1262 : if (length_pszNodeName_1 > size_pszNodeName_1) {
11170 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszNodeName_1, length_pszNodeName_1);
11171 : }
11172 1262 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNodeName_1, sizeof(uint8_t)));
11173 1262 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszNodeName, length_pszNodeName_1, sizeof(uint8_t), CH_UTF8));
11174 1262 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszNodeName_0, 0);
11175 : }
11176 1262 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszStartChild));
11177 1262 : if (_ptr_pszStartChild) {
11178 0 : NDR_PULL_ALLOC(ndr, r->in.pszStartChild);
11179 : } else {
11180 1262 : r->in.pszStartChild = NULL;
11181 : }
11182 1262 : if (r->in.pszStartChild) {
11183 0 : _mem_save_pszStartChild_0 = NDR_PULL_GET_MEM_CTX(ndr);
11184 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszStartChild, 0);
11185 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszStartChild));
11186 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszStartChild));
11187 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszStartChild, &size_pszStartChild_1));
11188 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszStartChild, &length_pszStartChild_1));
11189 0 : if (length_pszStartChild_1 > size_pszStartChild_1) {
11190 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszStartChild_1, length_pszStartChild_1);
11191 : }
11192 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszStartChild_1, sizeof(uint8_t)));
11193 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszStartChild, length_pszStartChild_1, sizeof(uint8_t), CH_UTF8));
11194 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszStartChild_0, 0);
11195 : }
11196 1262 : NDR_CHECK(ndr_pull_dns_record_type(ndr, NDR_SCALARS, &r->in.wRecordType));
11197 1262 : NDR_CHECK(ndr_pull_DNS_SELECT_FLAGS(ndr, NDR_SCALARS, &r->in.fSelectFlag));
11198 1262 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFilterStart));
11199 1262 : if (_ptr_pszFilterStart) {
11200 0 : NDR_PULL_ALLOC(ndr, r->in.pszFilterStart);
11201 : } else {
11202 1262 : r->in.pszFilterStart = NULL;
11203 : }
11204 1262 : if (r->in.pszFilterStart) {
11205 0 : _mem_save_pszFilterStart_0 = NDR_PULL_GET_MEM_CTX(ndr);
11206 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszFilterStart, 0);
11207 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszFilterStart));
11208 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszFilterStart));
11209 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszFilterStart, &size_pszFilterStart_1));
11210 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszFilterStart, &length_pszFilterStart_1));
11211 0 : if (length_pszFilterStart_1 > size_pszFilterStart_1) {
11212 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszFilterStart_1, length_pszFilterStart_1);
11213 : }
11214 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFilterStart_1, sizeof(uint8_t)));
11215 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszFilterStart, length_pszFilterStart_1, sizeof(uint8_t), CH_UTF8));
11216 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFilterStart_0, 0);
11217 : }
11218 1262 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFilterStop));
11219 1262 : if (_ptr_pszFilterStop) {
11220 0 : NDR_PULL_ALLOC(ndr, r->in.pszFilterStop);
11221 : } else {
11222 1262 : r->in.pszFilterStop = NULL;
11223 : }
11224 1262 : if (r->in.pszFilterStop) {
11225 0 : _mem_save_pszFilterStop_0 = NDR_PULL_GET_MEM_CTX(ndr);
11226 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszFilterStop, 0);
11227 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszFilterStop));
11228 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszFilterStop));
11229 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszFilterStop, &size_pszFilterStop_1));
11230 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszFilterStop, &length_pszFilterStop_1));
11231 0 : if (length_pszFilterStop_1 > size_pszFilterStop_1) {
11232 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszFilterStop_1, length_pszFilterStop_1);
11233 : }
11234 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFilterStop_1, sizeof(uint8_t)));
11235 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszFilterStop, length_pszFilterStop_1, sizeof(uint8_t), CH_UTF8));
11236 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFilterStop_0, 0);
11237 : }
11238 1262 : NDR_PULL_ALLOC(ndr, r->out.pdwBufferLength);
11239 1262 : NDR_ZERO_STRUCTP(r->out.pdwBufferLength);
11240 1262 : NDR_PULL_ALLOC(ndr, r->out.pBuffer);
11241 1262 : NDR_ZERO_STRUCTP(r->out.pBuffer);
11242 : }
11243 2524 : if (flags & NDR_OUT) {
11244 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11245 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11246 1262 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11247 1262 : NDR_PULL_ALLOC(ndr, r->out.pdwBufferLength);
11248 : }
11249 1262 : _mem_save_pdwBufferLength_0 = NDR_PULL_GET_MEM_CTX(ndr);
11250 1262 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwBufferLength, LIBNDR_FLAG_REF_ALLOC);
11251 1262 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pdwBufferLength));
11252 1262 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwBufferLength_0, LIBNDR_FLAG_REF_ALLOC);
11253 1262 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11254 1262 : NDR_PULL_ALLOC(ndr, r->out.pBuffer);
11255 : }
11256 1262 : _mem_save_pBuffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
11257 1262 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pBuffer, LIBNDR_FLAG_REF_ALLOC);
11258 1262 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pBuffer));
11259 1262 : if (_ptr_pBuffer) {
11260 1080 : NDR_PULL_ALLOC(ndr, *r->out.pBuffer);
11261 : } else {
11262 182 : *r->out.pBuffer = NULL;
11263 : }
11264 1262 : if (*r->out.pBuffer) {
11265 1080 : _mem_save_pBuffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
11266 1080 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.pBuffer, 0);
11267 : {
11268 0 : struct ndr_pull *_ndr_pBuffer;
11269 1080 : ssize_t sub_size = *r->out.pdwBufferLength;
11270 1080 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_pBuffer, 4, sub_size));
11271 1080 : NDR_CHECK(ndr_pull_DNS_RPC_RECORDS_ARRAY(_ndr_pBuffer, NDR_SCALARS, *r->out.pBuffer));
11272 1080 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_pBuffer, 4, sub_size));
11273 : }
11274 1080 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBuffer_1, 0);
11275 : }
11276 1262 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBuffer_0, LIBNDR_FLAG_REF_ALLOC);
11277 1262 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11278 : }
11279 2524 : return NDR_ERR_SUCCESS;
11280 : }
11281 :
11282 0 : _PUBLIC_ void ndr_print_DnssrvEnumRecords2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DnssrvEnumRecords2 *r)
11283 : {
11284 0 : ndr_print_struct(ndr, name, "DnssrvEnumRecords2");
11285 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11286 0 : ndr->depth++;
11287 0 : if (flags & NDR_SET_VALUES) {
11288 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11289 : }
11290 0 : if (flags & NDR_IN) {
11291 0 : ndr_print_struct(ndr, "in", "DnssrvEnumRecords2");
11292 0 : ndr->depth++;
11293 0 : ndr_print_DNS_RPC_CLIENT_VERSION(ndr, "dwClientVersion", r->in.dwClientVersion);
11294 0 : ndr_print_uint32(ndr, "dwSettingFlags", r->in.dwSettingFlags);
11295 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
11296 0 : ndr->depth++;
11297 0 : if (r->in.pwszServerName) {
11298 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
11299 : }
11300 0 : ndr->depth--;
11301 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
11302 0 : ndr->depth++;
11303 0 : if (r->in.pszZone) {
11304 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
11305 : }
11306 0 : ndr->depth--;
11307 0 : ndr_print_ptr(ndr, "pszNodeName", r->in.pszNodeName);
11308 0 : ndr->depth++;
11309 0 : if (r->in.pszNodeName) {
11310 0 : ndr_print_string(ndr, "pszNodeName", r->in.pszNodeName);
11311 : }
11312 0 : ndr->depth--;
11313 0 : ndr_print_ptr(ndr, "pszStartChild", r->in.pszStartChild);
11314 0 : ndr->depth++;
11315 0 : if (r->in.pszStartChild) {
11316 0 : ndr_print_string(ndr, "pszStartChild", r->in.pszStartChild);
11317 : }
11318 0 : ndr->depth--;
11319 0 : ndr_print_dns_record_type(ndr, "wRecordType", r->in.wRecordType);
11320 0 : ndr_print_DNS_SELECT_FLAGS(ndr, "fSelectFlag", r->in.fSelectFlag);
11321 0 : ndr_print_ptr(ndr, "pszFilterStart", r->in.pszFilterStart);
11322 0 : ndr->depth++;
11323 0 : if (r->in.pszFilterStart) {
11324 0 : ndr_print_string(ndr, "pszFilterStart", r->in.pszFilterStart);
11325 : }
11326 0 : ndr->depth--;
11327 0 : ndr_print_ptr(ndr, "pszFilterStop", r->in.pszFilterStop);
11328 0 : ndr->depth++;
11329 0 : if (r->in.pszFilterStop) {
11330 0 : ndr_print_string(ndr, "pszFilterStop", r->in.pszFilterStop);
11331 : }
11332 0 : ndr->depth--;
11333 0 : ndr->depth--;
11334 : }
11335 0 : if (flags & NDR_OUT) {
11336 0 : ndr_print_struct(ndr, "out", "DnssrvEnumRecords2");
11337 0 : ndr->depth++;
11338 0 : ndr_print_ptr(ndr, "pdwBufferLength", r->out.pdwBufferLength);
11339 0 : ndr->depth++;
11340 0 : ndr_print_uint32(ndr, "pdwBufferLength", *r->out.pdwBufferLength);
11341 0 : ndr->depth--;
11342 0 : ndr_print_ptr(ndr, "pBuffer", r->out.pBuffer);
11343 0 : ndr->depth++;
11344 0 : ndr_print_ptr(ndr, "pBuffer", *r->out.pBuffer);
11345 0 : ndr->depth++;
11346 0 : if (*r->out.pBuffer) {
11347 0 : ndr_print_DNS_RPC_RECORDS_ARRAY(ndr, "pBuffer", *r->out.pBuffer);
11348 : }
11349 0 : ndr->depth--;
11350 0 : ndr->depth--;
11351 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11352 0 : ndr->depth--;
11353 : }
11354 0 : ndr->depth--;
11355 : }
11356 :
11357 8078 : static enum ndr_err_code ndr_push_DnssrvUpdateRecord2(struct ndr_push *ndr, ndr_flags_type flags, const struct DnssrvUpdateRecord2 *r)
11358 : {
11359 8078 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11360 8078 : if (flags & NDR_IN) {
11361 4083 : if (r->in.pszNodeName == NULL) {
11362 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11363 : }
11364 4083 : NDR_CHECK(ndr_push_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, r->in.dwClientVersion));
11365 4083 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwSettingFlags));
11366 4083 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
11367 4083 : if (r->in.pwszServerName) {
11368 4083 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
11369 4083 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11370 4083 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
11371 4083 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11372 : }
11373 4083 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
11374 4083 : if (r->in.pszZone) {
11375 4083 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
11376 4083 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11377 4083 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
11378 4083 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11379 : }
11380 4083 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
11381 4083 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11382 4083 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
11383 4083 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszNodeName, ndr_charset_length(r->in.pszNodeName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11384 4083 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pAddRecord));
11385 4083 : if (r->in.pAddRecord) {
11386 2430 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pAddRecord));
11387 : }
11388 4027 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDeleteRecord));
11389 4027 : if (r->in.pDeleteRecord) {
11390 1794 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pDeleteRecord));
11391 : }
11392 : }
11393 7990 : if (flags & NDR_OUT) {
11394 3995 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
11395 : }
11396 7990 : return NDR_ERR_SUCCESS;
11397 : }
11398 :
11399 7990 : static enum ndr_err_code ndr_pull_DnssrvUpdateRecord2(struct ndr_pull *ndr, ndr_flags_type flags, struct DnssrvUpdateRecord2 *r)
11400 : {
11401 0 : uint32_t _ptr_pwszServerName;
11402 7990 : uint32_t size_pwszServerName_1 = 0;
11403 7990 : uint32_t length_pwszServerName_1 = 0;
11404 0 : uint32_t _ptr_pszZone;
11405 7990 : uint32_t size_pszZone_1 = 0;
11406 7990 : uint32_t length_pszZone_1 = 0;
11407 7990 : uint32_t size_pszNodeName_1 = 0;
11408 7990 : uint32_t length_pszNodeName_1 = 0;
11409 0 : uint32_t _ptr_pAddRecord;
11410 0 : uint32_t _ptr_pDeleteRecord;
11411 7990 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
11412 7990 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
11413 7990 : TALLOC_CTX *_mem_save_pAddRecord_0 = NULL;
11414 7990 : TALLOC_CTX *_mem_save_pDeleteRecord_0 = NULL;
11415 7990 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11416 7990 : if (flags & NDR_IN) {
11417 3995 : NDR_CHECK(ndr_pull_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, &r->in.dwClientVersion));
11418 3995 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwSettingFlags));
11419 3995 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
11420 3995 : if (_ptr_pwszServerName) {
11421 3995 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
11422 : } else {
11423 0 : r->in.pwszServerName = NULL;
11424 : }
11425 3995 : if (r->in.pwszServerName) {
11426 3995 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
11427 3995 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
11428 3995 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
11429 3995 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
11430 3995 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
11431 3995 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
11432 3995 : if (length_pwszServerName_1 > size_pwszServerName_1) {
11433 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pwszServerName_1, length_pwszServerName_1);
11434 : }
11435 3995 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
11436 3995 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
11437 3995 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
11438 : }
11439 3995 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
11440 3995 : if (_ptr_pszZone) {
11441 3995 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
11442 : } else {
11443 0 : r->in.pszZone = NULL;
11444 : }
11445 3995 : if (r->in.pszZone) {
11446 3995 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
11447 3995 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
11448 3995 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
11449 3995 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
11450 3995 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
11451 3995 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
11452 3995 : if (length_pszZone_1 > size_pszZone_1) {
11453 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszZone_1, length_pszZone_1);
11454 : }
11455 3995 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
11456 3995 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
11457 3995 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
11458 : }
11459 3995 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszNodeName));
11460 3995 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszNodeName));
11461 3995 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszNodeName, &size_pszNodeName_1));
11462 3995 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszNodeName, &length_pszNodeName_1));
11463 3995 : if (length_pszNodeName_1 > size_pszNodeName_1) {
11464 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszNodeName_1, length_pszNodeName_1);
11465 : }
11466 3995 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNodeName_1, sizeof(uint8_t)));
11467 3995 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszNodeName, length_pszNodeName_1, sizeof(uint8_t), CH_UTF8));
11468 3995 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pAddRecord));
11469 3995 : if (_ptr_pAddRecord) {
11470 2374 : NDR_PULL_ALLOC(ndr, r->in.pAddRecord);
11471 : } else {
11472 1621 : r->in.pAddRecord = NULL;
11473 : }
11474 3995 : if (r->in.pAddRecord) {
11475 2374 : _mem_save_pAddRecord_0 = NDR_PULL_GET_MEM_CTX(ndr);
11476 2374 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pAddRecord, 0);
11477 2374 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pAddRecord));
11478 2374 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pAddRecord_0, 0);
11479 : }
11480 3995 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDeleteRecord));
11481 3995 : if (_ptr_pDeleteRecord) {
11482 1762 : NDR_PULL_ALLOC(ndr, r->in.pDeleteRecord);
11483 : } else {
11484 2233 : r->in.pDeleteRecord = NULL;
11485 : }
11486 3995 : if (r->in.pDeleteRecord) {
11487 1762 : _mem_save_pDeleteRecord_0 = NDR_PULL_GET_MEM_CTX(ndr);
11488 1762 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDeleteRecord, 0);
11489 1762 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pDeleteRecord));
11490 1762 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDeleteRecord_0, 0);
11491 : }
11492 : }
11493 7990 : if (flags & NDR_OUT) {
11494 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11495 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11496 3995 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11497 : }
11498 7990 : return NDR_ERR_SUCCESS;
11499 : }
11500 :
11501 0 : _PUBLIC_ void ndr_print_DnssrvUpdateRecord2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DnssrvUpdateRecord2 *r)
11502 : {
11503 0 : ndr_print_struct(ndr, name, "DnssrvUpdateRecord2");
11504 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11505 0 : ndr->depth++;
11506 0 : if (flags & NDR_SET_VALUES) {
11507 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11508 : }
11509 0 : if (flags & NDR_IN) {
11510 0 : ndr_print_struct(ndr, "in", "DnssrvUpdateRecord2");
11511 0 : ndr->depth++;
11512 0 : ndr_print_DNS_RPC_CLIENT_VERSION(ndr, "dwClientVersion", r->in.dwClientVersion);
11513 0 : ndr_print_uint32(ndr, "dwSettingFlags", r->in.dwSettingFlags);
11514 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
11515 0 : ndr->depth++;
11516 0 : if (r->in.pwszServerName) {
11517 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
11518 : }
11519 0 : ndr->depth--;
11520 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
11521 0 : ndr->depth++;
11522 0 : if (r->in.pszZone) {
11523 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
11524 : }
11525 0 : ndr->depth--;
11526 0 : ndr_print_ptr(ndr, "pszNodeName", r->in.pszNodeName);
11527 0 : ndr->depth++;
11528 0 : ndr_print_string(ndr, "pszNodeName", r->in.pszNodeName);
11529 0 : ndr->depth--;
11530 0 : ndr_print_ptr(ndr, "pAddRecord", r->in.pAddRecord);
11531 0 : ndr->depth++;
11532 0 : if (r->in.pAddRecord) {
11533 0 : ndr_print_DNS_RPC_RECORD_BUF(ndr, "pAddRecord", r->in.pAddRecord);
11534 : }
11535 0 : ndr->depth--;
11536 0 : ndr_print_ptr(ndr, "pDeleteRecord", r->in.pDeleteRecord);
11537 0 : ndr->depth++;
11538 0 : if (r->in.pDeleteRecord) {
11539 0 : ndr_print_DNS_RPC_RECORD_BUF(ndr, "pDeleteRecord", r->in.pDeleteRecord);
11540 : }
11541 0 : ndr->depth--;
11542 0 : ndr->depth--;
11543 : }
11544 0 : if (flags & NDR_OUT) {
11545 0 : ndr_print_struct(ndr, "out", "DnssrvUpdateRecord2");
11546 0 : ndr->depth++;
11547 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11548 0 : ndr->depth--;
11549 : }
11550 0 : ndr->depth--;
11551 : }
11552 :
11553 : #ifndef SKIP_NDR_TABLE_dnsserver
11554 : static const struct ndr_interface_public_struct dnsserver_public_structs[] = {
11555 : {
11556 : .name = "DNS_RPC_NAME",
11557 : .struct_size = sizeof(struct DNS_RPC_NAME ),
11558 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_NAME,
11559 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_NAME,
11560 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_NAME,
11561 : },
11562 : {
11563 : .name = "DNS_RPC_RECORD",
11564 : .struct_size = sizeof(struct DNS_RPC_RECORD ),
11565 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_RECORD,
11566 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_RECORD,
11567 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_RECORD,
11568 : },
11569 : {
11570 : .name = "DNS_RPC_SERVER_INFO_DOTNET",
11571 : .struct_size = sizeof(struct DNS_RPC_SERVER_INFO_DOTNET ),
11572 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_SERVER_INFO_DOTNET,
11573 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_SERVER_INFO_DOTNET,
11574 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_SERVER_INFO_DOTNET,
11575 : },
11576 : {
11577 : .name = "DNS_RPC_SERVER_INFO_LONGHORN",
11578 : .struct_size = sizeof(struct DNS_RPC_SERVER_INFO_LONGHORN ),
11579 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_SERVER_INFO_LONGHORN,
11580 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_SERVER_INFO_LONGHORN,
11581 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_SERVER_INFO_LONGHORN,
11582 : },
11583 : {
11584 : .name = "DNS_RPC_RECORDS",
11585 : .struct_size = sizeof(struct DNS_RPC_RECORDS ),
11586 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_RECORDS,
11587 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_RECORDS,
11588 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_RECORDS,
11589 : },
11590 : {
11591 : .name = "DNS_RPC_RECORDS_ARRAY",
11592 : .struct_size = sizeof(struct DNS_RPC_RECORDS_ARRAY ),
11593 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_RECORDS_ARRAY,
11594 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_RECORDS_ARRAY,
11595 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_RECORDS_ARRAY,
11596 : },
11597 : { .name = NULL }
11598 : };
11599 :
11600 : static const struct ndr_interface_call dnsserver_calls[] = {
11601 : {
11602 : "DnssrvOperation",
11603 : sizeof(struct DnssrvOperation),
11604 : (ndr_push_flags_fn_t) ndr_push_DnssrvOperation,
11605 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvOperation,
11606 : (ndr_print_function_t) ndr_print_DnssrvOperation,
11607 : { 0, NULL },
11608 : { 0, NULL },
11609 : },
11610 : {
11611 : "DnssrvQuery",
11612 : sizeof(struct DnssrvQuery),
11613 : (ndr_push_flags_fn_t) ndr_push_DnssrvQuery,
11614 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvQuery,
11615 : (ndr_print_function_t) ndr_print_DnssrvQuery,
11616 : { 0, NULL },
11617 : { 0, NULL },
11618 : },
11619 : {
11620 : "DnssrvComplexOperation",
11621 : sizeof(struct DnssrvComplexOperation),
11622 : (ndr_push_flags_fn_t) ndr_push_DnssrvComplexOperation,
11623 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvComplexOperation,
11624 : (ndr_print_function_t) ndr_print_DnssrvComplexOperation,
11625 : { 0, NULL },
11626 : { 0, NULL },
11627 : },
11628 : {
11629 : "DnssrvEnumRecords",
11630 : sizeof(struct DnssrvEnumRecords),
11631 : (ndr_push_flags_fn_t) ndr_push_DnssrvEnumRecords,
11632 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvEnumRecords,
11633 : (ndr_print_function_t) ndr_print_DnssrvEnumRecords,
11634 : { 0, NULL },
11635 : { 0, NULL },
11636 : },
11637 : {
11638 : "DnssrvUpdateRecord",
11639 : sizeof(struct DnssrvUpdateRecord),
11640 : (ndr_push_flags_fn_t) ndr_push_DnssrvUpdateRecord,
11641 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvUpdateRecord,
11642 : (ndr_print_function_t) ndr_print_DnssrvUpdateRecord,
11643 : { 0, NULL },
11644 : { 0, NULL },
11645 : },
11646 : {
11647 : "DnssrvOperation2",
11648 : sizeof(struct DnssrvOperation2),
11649 : (ndr_push_flags_fn_t) ndr_push_DnssrvOperation2,
11650 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvOperation2,
11651 : (ndr_print_function_t) ndr_print_DnssrvOperation2,
11652 : { 0, NULL },
11653 : { 0, NULL },
11654 : },
11655 : {
11656 : "DnssrvQuery2",
11657 : sizeof(struct DnssrvQuery2),
11658 : (ndr_push_flags_fn_t) ndr_push_DnssrvQuery2,
11659 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvQuery2,
11660 : (ndr_print_function_t) ndr_print_DnssrvQuery2,
11661 : { 0, NULL },
11662 : { 0, NULL },
11663 : },
11664 : {
11665 : "DnssrvComplexOperation2",
11666 : sizeof(struct DnssrvComplexOperation2),
11667 : (ndr_push_flags_fn_t) ndr_push_DnssrvComplexOperation2,
11668 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvComplexOperation2,
11669 : (ndr_print_function_t) ndr_print_DnssrvComplexOperation2,
11670 : { 0, NULL },
11671 : { 0, NULL },
11672 : },
11673 : {
11674 : "DnssrvEnumRecords2",
11675 : sizeof(struct DnssrvEnumRecords2),
11676 : (ndr_push_flags_fn_t) ndr_push_DnssrvEnumRecords2,
11677 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvEnumRecords2,
11678 : (ndr_print_function_t) ndr_print_DnssrvEnumRecords2,
11679 : { 0, NULL },
11680 : { 0, NULL },
11681 : },
11682 : {
11683 : "DnssrvUpdateRecord2",
11684 : sizeof(struct DnssrvUpdateRecord2),
11685 : (ndr_push_flags_fn_t) ndr_push_DnssrvUpdateRecord2,
11686 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvUpdateRecord2,
11687 : (ndr_print_function_t) ndr_print_DnssrvUpdateRecord2,
11688 : { 0, NULL },
11689 : { 0, NULL },
11690 : },
11691 : { .name = NULL }
11692 : };
11693 :
11694 : static const char * const dnsserver_endpoint_strings[] = {
11695 : "ncacn_ip_tcp:",
11696 : "ncacn_np:[\\pipe\\dnsserver]",
11697 : };
11698 :
11699 : static const struct ndr_interface_string_array dnsserver_endpoints = {
11700 : .count = 2,
11701 : .names = dnsserver_endpoint_strings
11702 : };
11703 :
11704 : static const char * const dnsserver_authservice_strings[] = {
11705 : "host",
11706 : };
11707 :
11708 : static const struct ndr_interface_string_array dnsserver_authservices = {
11709 : .count = 1,
11710 : .names = dnsserver_authservice_strings
11711 : };
11712 :
11713 :
11714 : const struct ndr_interface_table ndr_table_dnsserver = {
11715 : .name = "dnsserver",
11716 : .syntax_id = {
11717 : {0x50abc2a4,0x574d,0x40b3,{0x9d,0x66},{0xee,0x4f,0xd5,0xfb,0xa0,0x76}},
11718 : NDR_DNSSERVER_VERSION
11719 : },
11720 : .helpstring = NDR_DNSSERVER_HELPSTRING,
11721 : .num_calls = 10,
11722 : .calls = dnsserver_calls,
11723 : .num_public_structs = 6,
11724 : .public_structs = dnsserver_public_structs,
11725 : .endpoints = &dnsserver_endpoints,
11726 : .authservices = &dnsserver_authservices
11727 : };
11728 :
11729 : #endif /* SKIP_NDR_TABLE_dnsserver */
|