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 4258 : static enum ndr_err_code ndr_push_DNS_RPC_CLIENT_VERSION(struct ndr_push *ndr, int ndr_flags, enum DNS_RPC_CLIENT_VERSION r)
9 : {
10 4258 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
11 4258 : return NDR_ERR_SUCCESS;
12 : }
13 :
14 4218 : static enum ndr_err_code ndr_pull_DNS_RPC_CLIENT_VERSION(struct ndr_pull *ndr, int ndr_flags, enum DNS_RPC_CLIENT_VERSION *r)
15 : {
16 : uint32_t v;
17 4218 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
18 4218 : *r = v;
19 4218 : 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, int 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 : }
46 0 : return NDR_ERR_SUCCESS;
47 : }
48 :
49 0 : static enum ndr_err_code ndr_pull_DNS_RPC_BUFFER(struct ndr_pull *ndr, int 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 : }
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, int ndr_flags, const struct DNS_RPC_UTF8_STRING_LIST *r)
81 : {
82 : 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, int ndr_flags, struct DNS_RPC_UTF8_STRING_LIST *r)
107 : {
108 : uint32_t _ptr_pszStrings;
109 0 : uint32_t size_pszStrings_0 = 0;
110 : 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 out of range");
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 %u should exceed array length %u", 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 : 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(%d)", "pszStrings", (int)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 791 : static enum ndr_err_code ndr_push_DNS_RPC_NAME_AND_PARAM(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_NAME_AND_PARAM *r)
190 : {
191 791 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
192 791 : if (ndr_flags & NDR_SCALARS) {
193 791 : NDR_CHECK(ndr_push_align(ndr, 5));
194 791 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwParam));
195 791 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszNodeName));
196 791 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
197 : }
198 791 : if (ndr_flags & NDR_BUFFERS) {
199 791 : if (r->pszNodeName) {
200 791 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszNodeName, CH_UTF8)));
201 791 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
202 791 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszNodeName, CH_UTF8)));
203 791 : 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 791 : return NDR_ERR_SUCCESS;
207 : }
208 :
209 791 : static enum ndr_err_code ndr_pull_DNS_RPC_NAME_AND_PARAM(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_NAME_AND_PARAM *r)
210 : {
211 : uint32_t _ptr_pszNodeName;
212 791 : uint32_t size_pszNodeName_1 = 0;
213 791 : uint32_t length_pszNodeName_1 = 0;
214 791 : TALLOC_CTX *_mem_save_pszNodeName_0 = NULL;
215 791 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
216 791 : if (ndr_flags & NDR_SCALARS) {
217 791 : NDR_CHECK(ndr_pull_align(ndr, 5));
218 791 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwParam));
219 791 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszNodeName));
220 791 : if (_ptr_pszNodeName) {
221 791 : NDR_PULL_ALLOC(ndr, r->pszNodeName);
222 : } else {
223 0 : r->pszNodeName = NULL;
224 : }
225 791 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
226 : }
227 791 : if (ndr_flags & NDR_BUFFERS) {
228 791 : if (r->pszNodeName) {
229 791 : _mem_save_pszNodeName_0 = NDR_PULL_GET_MEM_CTX(ndr);
230 791 : NDR_PULL_SET_MEM_CTX(ndr, r->pszNodeName, 0);
231 791 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszNodeName));
232 791 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszNodeName));
233 791 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszNodeName, &size_pszNodeName_1));
234 791 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszNodeName, &length_pszNodeName_1));
235 791 : if (length_pszNodeName_1 > size_pszNodeName_1) {
236 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszNodeName_1, length_pszNodeName_1);
237 : }
238 791 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNodeName_1, sizeof(uint8_t)));
239 791 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszNodeName, length_pszNodeName_1, sizeof(uint8_t), CH_UTF8));
240 791 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszNodeName_0, 0);
241 : }
242 : }
243 791 : 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 13968 : _PUBLIC_ enum ndr_err_code ndr_push_DNS_RPC_NAME(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_NAME *r)
262 : {
263 13968 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
264 13968 : if (ndr_flags & NDR_SCALARS) {
265 13968 : NDR_CHECK(ndr_push_align(ndr, 1));
266 13968 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, strlen(r->str)));
267 13968 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->str, strlen(r->str), sizeof(uint8_t), CH_UNIX));
268 13968 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
269 : }
270 13968 : if (ndr_flags & NDR_BUFFERS) {
271 : }
272 13968 : return NDR_ERR_SUCCESS;
273 : }
274 :
275 2605 : _PUBLIC_ enum ndr_err_code ndr_pull_DNS_RPC_NAME(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_NAME *r)
276 : {
277 2605 : uint32_t size_str_0 = 0;
278 2605 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
279 2605 : if (ndr_flags & NDR_SCALARS) {
280 2605 : NDR_CHECK(ndr_pull_align(ndr, 1));
281 2605 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->len));
282 2605 : size_str_0 = r->len;
283 2605 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->str, size_str_0, sizeof(uint8_t), CH_UNIX));
284 2605 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
285 : }
286 2605 : if (ndr_flags & NDR_BUFFERS) {
287 : }
288 2605 : return NDR_ERR_SUCCESS;
289 : }
290 :
291 0 : static void ndr_print_flags_DNS_RPC_NAME(struct ndr_print *ndr, const char *name, int 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 1120 : _PUBLIC_ size_t ndr_size_DNS_RPC_NAME(const struct DNS_RPC_NAME *r, int flags)
307 : {
308 1120 : 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, int 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 : }
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, int 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 : }
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 1661 : static enum ndr_err_code ndr_push_DNS_RPC_RECORD_NAME_PREFERENCE(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_RECORD_NAME_PREFERENCE *r)
365 : {
366 1661 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
367 1661 : if (ndr_flags & NDR_SCALARS) {
368 1661 : NDR_CHECK(ndr_push_align(ndr, 2));
369 1661 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wPreference));
370 1661 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->nameExchange));
371 1661 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
372 : }
373 1661 : if (ndr_flags & NDR_BUFFERS) {
374 : }
375 1661 : return NDR_ERR_SUCCESS;
376 : }
377 :
378 289 : static enum ndr_err_code ndr_pull_DNS_RPC_RECORD_NAME_PREFERENCE(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_RECORD_NAME_PREFERENCE *r)
379 : {
380 289 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
381 289 : if (ndr_flags & NDR_SCALARS) {
382 289 : NDR_CHECK(ndr_pull_align(ndr, 2));
383 289 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wPreference));
384 289 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->nameExchange));
385 289 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
386 : }
387 289 : if (ndr_flags & NDR_BUFFERS) {
388 : }
389 289 : 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 : 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(%d)", "str", (int)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 2543 : static enum ndr_err_code ndr_push_DNS_RPC_RECORD_SRV(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_RECORD_SRV *r)
419 : {
420 2543 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
421 2543 : if (ndr_flags & NDR_SCALARS) {
422 2543 : NDR_CHECK(ndr_push_align(ndr, 2));
423 2543 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wPriority));
424 2543 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wWeight));
425 2543 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wPort));
426 2543 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->nameTarget));
427 2543 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
428 : }
429 2543 : if (ndr_flags & NDR_BUFFERS) {
430 : }
431 2543 : return NDR_ERR_SUCCESS;
432 : }
433 :
434 436 : static enum ndr_err_code ndr_pull_DNS_RPC_RECORD_SRV(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_RECORD_SRV *r)
435 : {
436 436 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
437 436 : if (ndr_flags & NDR_SCALARS) {
438 436 : NDR_CHECK(ndr_pull_align(ndr, 2));
439 436 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wPriority));
440 436 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wWeight));
441 436 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wPort));
442 436 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->nameTarget));
443 436 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
444 : }
445 436 : if (ndr_flags & NDR_BUFFERS) {
446 : }
447 436 : 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 16398 : static enum ndr_err_code ndr_push_DNS_RPC_RECORD_DATA(struct ndr_push *ndr, int ndr_flags, const union DNS_RPC_RECORD_DATA *r)
463 : {
464 : uint32_t level;
465 : {
466 16398 : uint32_t _flags_save_UNION = ndr->flags;
467 16398 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
468 16398 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
469 16398 : if (ndr_flags & NDR_SCALARS) {
470 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
471 16398 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
472 16398 : NDR_CHECK(ndr_push_union_align(ndr, 4));
473 16398 : 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 2403 : case DNS_TYPE_A: {
479 : {
480 2403 : uint32_t _flags_save_ipv4address = ndr->flags;
481 2403 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
482 2403 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ipv4));
483 2363 : ndr->flags = _flags_save_ipv4address;
484 : }
485 2363 : break; }
486 :
487 1824 : case DNS_TYPE_NS: {
488 1824 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
489 1824 : 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 1677 : case DNS_TYPE_CNAME: {
500 1677 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
501 1677 : 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 1724 : case DNS_TYPE_PTR: {
520 1724 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->ptr));
521 1724 : 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 1661 : case DNS_TYPE_MX: {
528 1661 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_NAME_PREFERENCE(ndr, NDR_SCALARS, &r->mx));
529 1661 : break; }
530 :
531 2050 : case DNS_TYPE_TXT: {
532 2050 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_STRING(ndr, NDR_SCALARS, &r->txt));
533 2050 : break; }
534 :
535 2516 : case DNS_TYPE_AAAA: {
536 2516 : NDR_CHECK(ndr_push_ipv6address(ndr, NDR_SCALARS, r->ipv6));
537 2396 : break; }
538 :
539 2543 : case DNS_TYPE_SRV: {
540 2543 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_SRV(ndr, NDR_SCALARS, &r->srv));
541 2543 : 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 %u", level);
549 : }
550 0 : }
551 16238 : if (ndr_flags & NDR_BUFFERS) {
552 12720 : 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 12720 : switch (level) {
557 0 : case DNS_TYPE_TOMBSTONE:
558 0 : break;
559 :
560 1854 : case DNS_TYPE_A:
561 1854 : break;
562 :
563 1424 : case DNS_TYPE_NS:
564 1424 : break;
565 :
566 0 : case DNS_TYPE_MD:
567 0 : break;
568 :
569 0 : case DNS_TYPE_MF:
570 0 : break;
571 :
572 1318 : case DNS_TYPE_CNAME:
573 1318 : 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 1348 : case DNS_TYPE_PTR:
588 1348 : break;
589 :
590 0 : case DNS_TYPE_HINFO:
591 0 : break;
592 :
593 1300 : case DNS_TYPE_MX:
594 1300 : break;
595 :
596 1612 : case DNS_TYPE_TXT:
597 1612 : break;
598 :
599 1878 : case DNS_TYPE_AAAA:
600 1878 : break;
601 :
602 1986 : case DNS_TYPE_SRV:
603 1986 : 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 %u", level);
610 : }
611 3400 : }
612 16238 : ndr->flags = _flags_save_UNION;
613 : }
614 16238 : return NDR_ERR_SUCCESS;
615 : }
616 :
617 2842 : static enum ndr_err_code ndr_pull_DNS_RPC_RECORD_DATA(struct ndr_pull *ndr, int ndr_flags, union DNS_RPC_RECORD_DATA *r)
618 : {
619 : uint32_t level;
620 : {
621 2842 : uint32_t _flags_save_UNION = ndr->flags;
622 2842 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
623 2842 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
624 2842 : if (ndr_flags & NDR_SCALARS) {
625 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
626 2842 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
627 2842 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
628 2842 : 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 418 : case DNS_TYPE_A: {
634 : {
635 418 : uint32_t _flags_save_ipv4address = ndr->flags;
636 418 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
637 418 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ipv4));
638 418 : ndr->flags = _flags_save_ipv4address;
639 : }
640 418 : break; }
641 :
642 312 : case DNS_TYPE_NS: {
643 312 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
644 312 : 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 300 : case DNS_TYPE_CNAME: {
655 300 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->name));
656 300 : 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 298 : case DNS_TYPE_PTR: {
675 298 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->ptr));
676 298 : 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 289 : case DNS_TYPE_MX: {
683 289 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_NAME_PREFERENCE(ndr, NDR_SCALARS, &r->mx));
684 289 : break; }
685 :
686 368 : case DNS_TYPE_TXT: {
687 368 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_STRING(ndr, NDR_SCALARS, &r->txt));
688 368 : break; }
689 :
690 421 : case DNS_TYPE_AAAA: {
691 421 : NDR_CHECK(ndr_pull_ipv6address(ndr, NDR_SCALARS, &r->ipv6));
692 421 : break; }
693 :
694 436 : case DNS_TYPE_SRV: {
695 436 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_SRV(ndr, NDR_SCALARS, &r->srv));
696 436 : 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 %u at %s", level, __location__);
704 : }
705 0 : }
706 2842 : 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 %u at %s", level, __location__);
765 : }
766 2738 : }
767 2842 : ndr->flags = _flags_save_UNION;
768 : }
769 2842 : 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 : uint32_t level;
775 : {
776 0 : uint32_t _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 : uint32_t _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 12840 : static size_t ndr_size_DNS_RPC_RECORD_DATA(const union DNS_RPC_RECORD_DATA *r, uint32_t level, int flags)
862 : {
863 12840 : flags |= LIBNDR_FLAG_NOALIGN;
864 12840 : return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORD_DATA);
865 : }
866 :
867 3558 : _PUBLIC_ enum ndr_err_code ndr_push_DNS_RPC_RECORD(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_RECORD *r)
868 : {
869 3558 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
870 3558 : if (ndr_flags & NDR_SCALARS) {
871 3558 : NDR_CHECK(ndr_push_align(ndr, 4));
872 3558 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_DNS_RPC_RECORD_DATA(&r->data, r->wType, 0)));
873 3558 : NDR_CHECK(ndr_push_dns_record_type(ndr, NDR_SCALARS, r->wType));
874 3558 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
875 3558 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwSerial));
876 3558 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwTtlSeconds));
877 3558 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwTimeStamp));
878 3558 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved));
879 : {
880 : struct ndr_push *_ndr_data;
881 3598 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_data, 0, ndr_size_DNS_RPC_RECORD_DATA(&r->data, r->wType, 0)));
882 3558 : NDR_CHECK(ndr_push_set_switch_value(_ndr_data, &r->data, r->wType));
883 3558 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_DATA(_ndr_data, NDR_SCALARS, &r->data));
884 3518 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_data, 0, ndr_size_DNS_RPC_RECORD_DATA(&r->data, r->wType, 0)));
885 : }
886 3518 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
887 : }
888 3518 : if (ndr_flags & NDR_BUFFERS) {
889 : }
890 3518 : return NDR_ERR_SUCCESS;
891 : }
892 :
893 2842 : _PUBLIC_ enum ndr_err_code ndr_pull_DNS_RPC_RECORD(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_RECORD *r)
894 : {
895 2842 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
896 2842 : if (ndr_flags & NDR_SCALARS) {
897 2842 : NDR_CHECK(ndr_pull_align(ndr, 4));
898 2842 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wDataLength));
899 2842 : NDR_CHECK(ndr_pull_dns_record_type(ndr, NDR_SCALARS, &r->wType));
900 2842 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
901 2842 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwSerial));
902 2842 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwTtlSeconds));
903 2842 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwTimeStamp));
904 2842 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved));
905 : {
906 : struct ndr_pull *_ndr_data;
907 2842 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_data, 0, r->wDataLength));
908 2842 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_data, &r->data, r->wType));
909 2842 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_DATA(_ndr_data, NDR_SCALARS, &r->data));
910 2842 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_data, 0, r->wDataLength));
911 : }
912 2842 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
913 : }
914 2842 : if (ndr_flags & NDR_BUFFERS) {
915 : }
916 2842 : return NDR_ERR_SUCCESS;
917 : }
918 :
919 0 : static void ndr_print_flags_DNS_RPC_RECORD(struct ndr_print *ndr, const char *name, int unused, const struct DNS_RPC_RECORD *r)
920 : {
921 0 : ndr_print_DNS_RPC_RECORD(ndr, name, r);
922 0 : }
923 :
924 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORD(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORD *r)
925 : {
926 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORD");
927 0 : if (r == NULL) { ndr_print_null(ndr); return; }
928 0 : ndr->depth++;
929 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);
930 0 : ndr_print_dns_record_type(ndr, "wType", r->wType);
931 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
932 0 : ndr_print_uint32(ndr, "dwSerial", r->dwSerial);
933 0 : ndr_print_uint32(ndr, "dwTtlSeconds", r->dwTtlSeconds);
934 0 : ndr_print_uint32(ndr, "dwTimeStamp", r->dwTimeStamp);
935 0 : ndr_print_uint32(ndr, "dwReserved", r->dwReserved);
936 0 : ndr_print_set_switch_value(ndr, &r->data, r->wType);
937 0 : ndr_print_DNS_RPC_RECORD_DATA(ndr, "data", &r->data);
938 0 : ndr->depth--;
939 : }
940 :
941 2206 : static enum ndr_err_code ndr_push_DNS_RPC_RECORD_BUF(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_RECORD_BUF *r)
942 : {
943 2206 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
944 2206 : if (ndr_flags & NDR_SCALARS) {
945 2206 : NDR_CHECK(ndr_push_align(ndr, 5));
946 2206 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_size_DNS_RPC_RECORD_DATA(&r->rec.data, r->rec.wType, 0)));
947 2206 : NDR_CHECK(ndr_push_DNS_RPC_RECORD(ndr, NDR_SCALARS, &r->rec));
948 2166 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
949 : }
950 2166 : if (ndr_flags & NDR_BUFFERS) {
951 : }
952 2166 : return NDR_ERR_SUCCESS;
953 : }
954 :
955 2166 : static enum ndr_err_code ndr_pull_DNS_RPC_RECORD_BUF(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_RECORD_BUF *r)
956 : {
957 2166 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
958 2166 : if (ndr_flags & NDR_SCALARS) {
959 2166 : NDR_CHECK(ndr_pull_align(ndr, 5));
960 2166 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->wContextLength));
961 2166 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD(ndr, NDR_SCALARS, &r->rec));
962 2166 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
963 : }
964 2166 : if (ndr_flags & NDR_BUFFERS) {
965 : }
966 2166 : return NDR_ERR_SUCCESS;
967 : }
968 :
969 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORD_BUF(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORD_BUF *r)
970 : {
971 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORD_BUF");
972 0 : if (r == NULL) { ndr_print_null(ndr); return; }
973 0 : ndr->depth++;
974 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);
975 0 : ndr_print_DNS_RPC_RECORD(ndr, "rec", &r->rec);
976 0 : ndr->depth--;
977 : }
978 :
979 8 : static enum ndr_err_code ndr_push_IP4_ARRAY(struct ndr_push *ndr, int ndr_flags, const struct IP4_ARRAY *r)
980 : {
981 : uint32_t cntr_AddrArray_0;
982 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
983 8 : if (ndr_flags & NDR_SCALARS) {
984 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->AddrCount));
985 8 : NDR_CHECK(ndr_push_align(ndr, 4));
986 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->AddrCount));
987 16 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (r->AddrCount); cntr_AddrArray_0++) {
988 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->AddrArray[cntr_AddrArray_0]));
989 : }
990 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
991 : }
992 8 : if (ndr_flags & NDR_BUFFERS) {
993 : }
994 8 : return NDR_ERR_SUCCESS;
995 : }
996 :
997 8 : static enum ndr_err_code ndr_pull_IP4_ARRAY(struct ndr_pull *ndr, int ndr_flags, struct IP4_ARRAY *r)
998 : {
999 8 : uint32_t size_AddrArray_0 = 0;
1000 : uint32_t cntr_AddrArray_0;
1001 8 : TALLOC_CTX *_mem_save_AddrArray_0 = NULL;
1002 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1003 8 : if (ndr_flags & NDR_SCALARS) {
1004 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->AddrArray));
1005 8 : NDR_CHECK(ndr_pull_align(ndr, 4));
1006 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->AddrCount));
1007 8 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->AddrArray, &size_AddrArray_0));
1008 8 : NDR_PULL_ALLOC_N(ndr, r->AddrArray, size_AddrArray_0);
1009 8 : _mem_save_AddrArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
1010 8 : NDR_PULL_SET_MEM_CTX(ndr, r->AddrArray, 0);
1011 16 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (size_AddrArray_0); cntr_AddrArray_0++) {
1012 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->AddrArray[cntr_AddrArray_0]));
1013 : }
1014 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_AddrArray_0, 0);
1015 8 : if (r->AddrArray) {
1016 8 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->AddrArray, r->AddrCount));
1017 : }
1018 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1019 : }
1020 8 : if (ndr_flags & NDR_BUFFERS) {
1021 : }
1022 8 : return NDR_ERR_SUCCESS;
1023 : }
1024 :
1025 0 : _PUBLIC_ void ndr_print_IP4_ARRAY(struct ndr_print *ndr, const char *name, const struct IP4_ARRAY *r)
1026 : {
1027 : uint32_t cntr_AddrArray_0;
1028 0 : ndr_print_struct(ndr, name, "IP4_ARRAY");
1029 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1030 0 : ndr->depth++;
1031 0 : ndr_print_uint32(ndr, "AddrCount", r->AddrCount);
1032 0 : ndr->print(ndr, "%s: ARRAY(%d)", "AddrArray", (int)r->AddrCount);
1033 0 : ndr->depth++;
1034 0 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (r->AddrCount); cntr_AddrArray_0++) {
1035 0 : ndr_print_uint32(ndr, "AddrArray", r->AddrArray[cntr_AddrArray_0]);
1036 : }
1037 0 : ndr->depth--;
1038 0 : ndr->depth--;
1039 : }
1040 :
1041 8 : static enum ndr_err_code ndr_push_DNS_ADDR(struct ndr_push *ndr, int ndr_flags, const struct DNS_ADDR *r)
1042 : {
1043 : uint32_t cntr_DnsAddrUserDword_0;
1044 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1045 8 : if (ndr_flags & NDR_SCALARS) {
1046 8 : NDR_CHECK(ndr_push_align(ndr, 4));
1047 8 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->MaxSa, 32));
1048 72 : for (cntr_DnsAddrUserDword_0 = 0; cntr_DnsAddrUserDword_0 < (8); cntr_DnsAddrUserDword_0++) {
1049 64 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DnsAddrUserDword[cntr_DnsAddrUserDword_0]));
1050 : }
1051 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1052 : }
1053 8 : if (ndr_flags & NDR_BUFFERS) {
1054 : }
1055 8 : return NDR_ERR_SUCCESS;
1056 : }
1057 :
1058 8 : static enum ndr_err_code ndr_pull_DNS_ADDR(struct ndr_pull *ndr, int ndr_flags, struct DNS_ADDR *r)
1059 : {
1060 8 : uint32_t size_MaxSa_0 = 0;
1061 8 : uint32_t size_DnsAddrUserDword_0 = 0;
1062 : uint32_t cntr_DnsAddrUserDword_0;
1063 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1064 8 : if (ndr_flags & NDR_SCALARS) {
1065 8 : NDR_CHECK(ndr_pull_align(ndr, 4));
1066 8 : size_MaxSa_0 = 32;
1067 8 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->MaxSa, size_MaxSa_0));
1068 8 : size_DnsAddrUserDword_0 = 8;
1069 72 : for (cntr_DnsAddrUserDword_0 = 0; cntr_DnsAddrUserDword_0 < (size_DnsAddrUserDword_0); cntr_DnsAddrUserDword_0++) {
1070 64 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DnsAddrUserDword[cntr_DnsAddrUserDword_0]));
1071 : }
1072 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1073 : }
1074 8 : if (ndr_flags & NDR_BUFFERS) {
1075 : }
1076 8 : return NDR_ERR_SUCCESS;
1077 : }
1078 :
1079 0 : _PUBLIC_ void ndr_print_DNS_ADDR(struct ndr_print *ndr, const char *name, const struct DNS_ADDR *r)
1080 : {
1081 : uint32_t cntr_DnsAddrUserDword_0;
1082 0 : ndr_print_struct(ndr, name, "DNS_ADDR");
1083 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1084 0 : ndr->depth++;
1085 0 : ndr_print_array_uint8(ndr, "MaxSa", r->MaxSa, 32);
1086 0 : ndr->print(ndr, "%s: ARRAY(%d)", "DnsAddrUserDword", (int)8);
1087 0 : ndr->depth++;
1088 0 : for (cntr_DnsAddrUserDword_0 = 0; cntr_DnsAddrUserDword_0 < (8); cntr_DnsAddrUserDword_0++) {
1089 0 : ndr_print_uint32(ndr, "DnsAddrUserDword", r->DnsAddrUserDword[cntr_DnsAddrUserDword_0]);
1090 : }
1091 0 : ndr->depth--;
1092 0 : ndr->depth--;
1093 : }
1094 :
1095 4 : static enum ndr_err_code ndr_push_DNS_ADDR_ARRAY(struct ndr_push *ndr, int ndr_flags, const struct DNS_ADDR_ARRAY *r)
1096 : {
1097 : uint32_t cntr_AddrArray_0;
1098 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1099 4 : if (ndr_flags & NDR_SCALARS) {
1100 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->AddrCount));
1101 4 : NDR_CHECK(ndr_push_align(ndr, 4));
1102 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MaxCount));
1103 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->AddrCount));
1104 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Tag));
1105 4 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Family));
1106 4 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->WordReserved));
1107 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Flags));
1108 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MatchFlag));
1109 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Reserved1));
1110 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Reserved2));
1111 12 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (r->AddrCount); cntr_AddrArray_0++) {
1112 8 : NDR_CHECK(ndr_push_DNS_ADDR(ndr, NDR_SCALARS, &r->AddrArray[cntr_AddrArray_0]));
1113 : }
1114 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1115 : }
1116 4 : if (ndr_flags & NDR_BUFFERS) {
1117 : }
1118 4 : return NDR_ERR_SUCCESS;
1119 : }
1120 :
1121 4 : static enum ndr_err_code ndr_pull_DNS_ADDR_ARRAY(struct ndr_pull *ndr, int ndr_flags, struct DNS_ADDR_ARRAY *r)
1122 : {
1123 4 : uint32_t size_AddrArray_0 = 0;
1124 : uint32_t cntr_AddrArray_0;
1125 4 : TALLOC_CTX *_mem_save_AddrArray_0 = NULL;
1126 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1127 4 : if (ndr_flags & NDR_SCALARS) {
1128 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->AddrArray));
1129 4 : NDR_CHECK(ndr_pull_align(ndr, 4));
1130 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MaxCount));
1131 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->AddrCount));
1132 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Tag));
1133 4 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Family));
1134 4 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->WordReserved));
1135 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Flags));
1136 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MatchFlag));
1137 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Reserved1));
1138 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Reserved2));
1139 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->AddrArray, &size_AddrArray_0));
1140 4 : NDR_PULL_ALLOC_N(ndr, r->AddrArray, size_AddrArray_0);
1141 4 : _mem_save_AddrArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
1142 4 : NDR_PULL_SET_MEM_CTX(ndr, r->AddrArray, 0);
1143 12 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (size_AddrArray_0); cntr_AddrArray_0++) {
1144 8 : NDR_CHECK(ndr_pull_DNS_ADDR(ndr, NDR_SCALARS, &r->AddrArray[cntr_AddrArray_0]));
1145 : }
1146 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_AddrArray_0, 0);
1147 4 : if (r->AddrArray) {
1148 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->AddrArray, r->AddrCount));
1149 : }
1150 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1151 : }
1152 4 : if (ndr_flags & NDR_BUFFERS) {
1153 : }
1154 4 : return NDR_ERR_SUCCESS;
1155 : }
1156 :
1157 0 : _PUBLIC_ void ndr_print_DNS_ADDR_ARRAY(struct ndr_print *ndr, const char *name, const struct DNS_ADDR_ARRAY *r)
1158 : {
1159 : uint32_t cntr_AddrArray_0;
1160 0 : ndr_print_struct(ndr, name, "DNS_ADDR_ARRAY");
1161 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1162 0 : ndr->depth++;
1163 0 : ndr_print_uint32(ndr, "MaxCount", r->MaxCount);
1164 0 : ndr_print_uint32(ndr, "AddrCount", r->AddrCount);
1165 0 : ndr_print_uint32(ndr, "Tag", r->Tag);
1166 0 : ndr_print_uint16(ndr, "Family", r->Family);
1167 0 : ndr_print_uint16(ndr, "WordReserved", r->WordReserved);
1168 0 : ndr_print_uint32(ndr, "Flags", r->Flags);
1169 0 : ndr_print_uint32(ndr, "MatchFlag", r->MatchFlag);
1170 0 : ndr_print_uint32(ndr, "Reserved1", r->Reserved1);
1171 0 : ndr_print_uint32(ndr, "Reserved2", r->Reserved2);
1172 0 : ndr->print(ndr, "%s: ARRAY(%d)", "AddrArray", (int)r->AddrCount);
1173 0 : ndr->depth++;
1174 0 : for (cntr_AddrArray_0 = 0; cntr_AddrArray_0 < (r->AddrCount); cntr_AddrArray_0++) {
1175 0 : ndr_print_DNS_ADDR(ndr, "AddrArray", &r->AddrArray[cntr_AddrArray_0]);
1176 : }
1177 0 : ndr->depth--;
1178 0 : ndr->depth--;
1179 : }
1180 :
1181 0 : static enum ndr_err_code ndr_push_DNS_RPC_IP_VALIDATE(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_IP_VALIDATE *r)
1182 : {
1183 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1184 0 : if (ndr_flags & NDR_SCALARS) {
1185 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1186 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
1187 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
1188 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwContext));
1189 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved1));
1190 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszContextName));
1191 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipValidateAddrs));
1192 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1193 : }
1194 0 : if (ndr_flags & NDR_BUFFERS) {
1195 0 : if (r->pszContextName) {
1196 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszContextName, CH_UTF8)));
1197 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1198 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszContextName, CH_UTF8)));
1199 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszContextName, ndr_charset_length(r->pszContextName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1200 : }
1201 0 : if (r->aipValidateAddrs) {
1202 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipValidateAddrs));
1203 : }
1204 : }
1205 0 : return NDR_ERR_SUCCESS;
1206 : }
1207 :
1208 0 : static enum ndr_err_code ndr_pull_DNS_RPC_IP_VALIDATE(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_IP_VALIDATE *r)
1209 : {
1210 : uint32_t _ptr_pszContextName;
1211 0 : uint32_t size_pszContextName_1 = 0;
1212 0 : uint32_t length_pszContextName_1 = 0;
1213 0 : TALLOC_CTX *_mem_save_pszContextName_0 = NULL;
1214 : uint32_t _ptr_aipValidateAddrs;
1215 0 : TALLOC_CTX *_mem_save_aipValidateAddrs_0 = NULL;
1216 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1217 0 : if (ndr_flags & NDR_SCALARS) {
1218 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1219 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
1220 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
1221 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwContext));
1222 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved1));
1223 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszContextName));
1224 0 : if (_ptr_pszContextName) {
1225 0 : NDR_PULL_ALLOC(ndr, r->pszContextName);
1226 : } else {
1227 0 : r->pszContextName = NULL;
1228 : }
1229 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipValidateAddrs));
1230 0 : if (_ptr_aipValidateAddrs) {
1231 0 : NDR_PULL_ALLOC(ndr, r->aipValidateAddrs);
1232 : } else {
1233 0 : r->aipValidateAddrs = NULL;
1234 : }
1235 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1236 : }
1237 0 : if (ndr_flags & NDR_BUFFERS) {
1238 0 : if (r->pszContextName) {
1239 0 : _mem_save_pszContextName_0 = NDR_PULL_GET_MEM_CTX(ndr);
1240 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszContextName, 0);
1241 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszContextName));
1242 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszContextName));
1243 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszContextName, &size_pszContextName_1));
1244 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszContextName, &length_pszContextName_1));
1245 0 : if (length_pszContextName_1 > size_pszContextName_1) {
1246 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszContextName_1, length_pszContextName_1);
1247 : }
1248 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszContextName_1, sizeof(uint8_t)));
1249 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszContextName, length_pszContextName_1, sizeof(uint8_t), CH_UTF8));
1250 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszContextName_0, 0);
1251 : }
1252 0 : if (r->aipValidateAddrs) {
1253 0 : _mem_save_aipValidateAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1254 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipValidateAddrs, 0);
1255 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipValidateAddrs));
1256 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipValidateAddrs_0, 0);
1257 : }
1258 : }
1259 0 : return NDR_ERR_SUCCESS;
1260 : }
1261 :
1262 0 : _PUBLIC_ void ndr_print_DNS_RPC_IP_VALIDATE(struct ndr_print *ndr, const char *name, const struct DNS_RPC_IP_VALIDATE *r)
1263 : {
1264 0 : ndr_print_struct(ndr, name, "DNS_RPC_IP_VALIDATE");
1265 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1266 0 : ndr->depth++;
1267 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
1268 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
1269 0 : ndr_print_uint32(ndr, "dwContext", r->dwContext);
1270 0 : ndr_print_uint32(ndr, "dwReserved1", r->dwReserved1);
1271 0 : ndr_print_ptr(ndr, "pszContextName", r->pszContextName);
1272 0 : ndr->depth++;
1273 0 : if (r->pszContextName) {
1274 0 : ndr_print_string(ndr, "pszContextName", r->pszContextName);
1275 : }
1276 0 : ndr->depth--;
1277 0 : ndr_print_ptr(ndr, "aipValidateAddrs", r->aipValidateAddrs);
1278 0 : ndr->depth++;
1279 0 : if (r->aipValidateAddrs) {
1280 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipValidateAddrs", r->aipValidateAddrs);
1281 : }
1282 0 : ndr->depth--;
1283 0 : ndr->depth--;
1284 : }
1285 :
1286 6 : static enum ndr_err_code ndr_push_DNS_BOOT_METHOD(struct ndr_push *ndr, int ndr_flags, enum DNS_BOOT_METHOD r)
1287 : {
1288 6 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
1289 6 : return NDR_ERR_SUCCESS;
1290 : }
1291 :
1292 6 : static enum ndr_err_code ndr_pull_DNS_BOOT_METHOD(struct ndr_pull *ndr, int ndr_flags, enum DNS_BOOT_METHOD *r)
1293 : {
1294 : uint8_t v;
1295 6 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
1296 6 : *r = v;
1297 6 : return NDR_ERR_SUCCESS;
1298 : }
1299 :
1300 0 : _PUBLIC_ void ndr_print_DNS_BOOT_METHOD(struct ndr_print *ndr, const char *name, enum DNS_BOOT_METHOD r)
1301 : {
1302 0 : const char *val = NULL;
1303 :
1304 0 : switch (r) {
1305 0 : case DNS_BOOT_METHOD_UNINITIALIZED: val = "DNS_BOOT_METHOD_UNINITIALIZED"; break;
1306 0 : case DNS_BOOT_METHOD_FILE: val = "DNS_BOOT_METHOD_FILE"; break;
1307 0 : case DNS_BOOT_METHOD_REGISTRY: val = "DNS_BOOT_METHOD_REGISTRY"; break;
1308 0 : case DNS_BOOT_METHOD_DIRECTORY: val = "DNS_BOOT_METHOD_DIRECTORY"; break;
1309 : }
1310 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1311 0 : }
1312 :
1313 6 : static enum ndr_err_code ndr_push_DNS_NAME_CHECK_FLAG(struct ndr_push *ndr, int ndr_flags, enum DNS_NAME_CHECK_FLAG r)
1314 : {
1315 6 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1316 6 : return NDR_ERR_SUCCESS;
1317 : }
1318 :
1319 6 : static enum ndr_err_code ndr_pull_DNS_NAME_CHECK_FLAG(struct ndr_pull *ndr, int ndr_flags, enum DNS_NAME_CHECK_FLAG *r)
1320 : {
1321 : uint32_t v;
1322 6 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1323 6 : *r = v;
1324 6 : return NDR_ERR_SUCCESS;
1325 : }
1326 :
1327 0 : _PUBLIC_ void ndr_print_DNS_NAME_CHECK_FLAG(struct ndr_print *ndr, const char *name, enum DNS_NAME_CHECK_FLAG r)
1328 : {
1329 0 : const char *val = NULL;
1330 :
1331 0 : switch (r) {
1332 0 : case DNS_ALLOW_RFC_NAMES_ONLY: val = "DNS_ALLOW_RFC_NAMES_ONLY"; break;
1333 0 : case DNS_ALLOW_NONRFC_NAMES: val = "DNS_ALLOW_NONRFC_NAMES"; break;
1334 0 : case DNS_ALLOW_MULTIBYTE_NAMES: val = "DNS_ALLOW_MULTIBYTE_NAMES"; break;
1335 0 : case DNS_ALLOW_ALL_NAMES: val = "DNS_ALLOW_ALL_NAMES"; break;
1336 : }
1337 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1338 0 : }
1339 :
1340 2 : static enum ndr_err_code ndr_push_DNS_RPC_SERVER_INFO_W2K(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_SERVER_INFO_W2K *r)
1341 : {
1342 : uint32_t cntr_dwReserveArray_0;
1343 2 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1344 2 : if (ndr_flags & NDR_SCALARS) {
1345 2 : NDR_CHECK(ndr_push_align(ndr, 5));
1346 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwVersion));
1347 2 : NDR_CHECK(ndr_push_DNS_BOOT_METHOD(ndr, NDR_SCALARS, r->fBootMethod));
1348 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAdminConfigured));
1349 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAllowUpdate));
1350 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDsAvailable));
1351 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszServerName));
1352 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDsContainer));
1353 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipServerAddrs));
1354 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipListenAddrs));
1355 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
1356 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtension1));
1357 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtension2));
1358 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtension3));
1359 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtension4));
1360 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtension5));
1361 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLogLevel));
1362 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDebugLevel));
1363 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
1364 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcProtocol));
1365 2 : NDR_CHECK(ndr_push_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, r->dwNameCheckFlag));
1366 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cAddressAnswerLimit));
1367 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionRetry));
1368 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionTimeout));
1369 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwMaxCacheTtl));
1370 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsPollingInterval));
1371 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwScavengingInterval));
1372 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultRefreshInterval));
1373 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultNoRefreshInterval));
1374 22 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (10); cntr_dwReserveArray_0++) {
1375 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserveArray[cntr_dwReserveArray_0]));
1376 : }
1377 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoReverseZones));
1378 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoCacheUpdate));
1379 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
1380 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fForwardDelegations));
1381 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fNoRecursion));
1382 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fSecureResponses));
1383 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRoundRobin));
1384 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLocalNetPriority));
1385 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fBindSecondaries));
1386 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fWriteAuthorityNs));
1387 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fStrictFileParsing));
1388 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLooseWildcarding));
1389 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDefaultAgingState));
1390 2 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, 15));
1391 2 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1392 : }
1393 2 : if (ndr_flags & NDR_BUFFERS) {
1394 2 : if (r->pszServerName) {
1395 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
1396 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1397 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
1398 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszServerName, ndr_charset_length(r->pszServerName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1399 : }
1400 2 : if (r->pszDsContainer) {
1401 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
1402 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1403 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
1404 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDsContainer, ndr_charset_length(r->pszDsContainer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1405 : }
1406 2 : if (r->aipServerAddrs) {
1407 2 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
1408 : }
1409 2 : if (r->aipListenAddrs) {
1410 2 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
1411 : }
1412 2 : if (r->aipForwarders) {
1413 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
1414 : }
1415 2 : if (r->pExtension1) {
1416 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->pExtension1));
1417 : }
1418 2 : if (r->pExtension2) {
1419 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->pExtension2));
1420 : }
1421 2 : if (r->pExtension3) {
1422 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->pExtension3));
1423 : }
1424 2 : if (r->pExtension4) {
1425 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->pExtension4));
1426 : }
1427 2 : if (r->pExtension5) {
1428 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->pExtension5));
1429 : }
1430 : }
1431 2 : return NDR_ERR_SUCCESS;
1432 : }
1433 :
1434 2 : static enum ndr_err_code ndr_pull_DNS_RPC_SERVER_INFO_W2K(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_SERVER_INFO_W2K *r)
1435 : {
1436 : uint32_t _ptr_pszServerName;
1437 2 : uint32_t size_pszServerName_1 = 0;
1438 2 : uint32_t length_pszServerName_1 = 0;
1439 2 : TALLOC_CTX *_mem_save_pszServerName_0 = NULL;
1440 : uint32_t _ptr_pszDsContainer;
1441 2 : uint32_t size_pszDsContainer_1 = 0;
1442 2 : uint32_t length_pszDsContainer_1 = 0;
1443 2 : TALLOC_CTX *_mem_save_pszDsContainer_0 = NULL;
1444 : uint32_t _ptr_aipServerAddrs;
1445 2 : TALLOC_CTX *_mem_save_aipServerAddrs_0 = NULL;
1446 : uint32_t _ptr_aipListenAddrs;
1447 2 : TALLOC_CTX *_mem_save_aipListenAddrs_0 = NULL;
1448 : uint32_t _ptr_aipForwarders;
1449 2 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
1450 : uint32_t _ptr_pExtension1;
1451 2 : TALLOC_CTX *_mem_save_pExtension1_0 = NULL;
1452 : uint32_t _ptr_pExtension2;
1453 2 : TALLOC_CTX *_mem_save_pExtension2_0 = NULL;
1454 : uint32_t _ptr_pExtension3;
1455 2 : TALLOC_CTX *_mem_save_pExtension3_0 = NULL;
1456 : uint32_t _ptr_pExtension4;
1457 2 : TALLOC_CTX *_mem_save_pExtension4_0 = NULL;
1458 : uint32_t _ptr_pExtension5;
1459 2 : TALLOC_CTX *_mem_save_pExtension5_0 = NULL;
1460 2 : uint32_t size_dwReserveArray_0 = 0;
1461 : uint32_t cntr_dwReserveArray_0;
1462 2 : uint32_t size_fReserveArray_0 = 0;
1463 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1464 2 : if (ndr_flags & NDR_SCALARS) {
1465 2 : NDR_CHECK(ndr_pull_align(ndr, 5));
1466 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwVersion));
1467 2 : NDR_CHECK(ndr_pull_DNS_BOOT_METHOD(ndr, NDR_SCALARS, &r->fBootMethod));
1468 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAdminConfigured));
1469 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAllowUpdate));
1470 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDsAvailable));
1471 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServerName));
1472 2 : if (_ptr_pszServerName) {
1473 2 : NDR_PULL_ALLOC(ndr, r->pszServerName);
1474 : } else {
1475 0 : r->pszServerName = NULL;
1476 : }
1477 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDsContainer));
1478 2 : if (_ptr_pszDsContainer) {
1479 2 : NDR_PULL_ALLOC(ndr, r->pszDsContainer);
1480 : } else {
1481 0 : r->pszDsContainer = NULL;
1482 : }
1483 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipServerAddrs));
1484 2 : if (_ptr_aipServerAddrs) {
1485 2 : NDR_PULL_ALLOC(ndr, r->aipServerAddrs);
1486 : } else {
1487 0 : r->aipServerAddrs = NULL;
1488 : }
1489 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipListenAddrs));
1490 2 : if (_ptr_aipListenAddrs) {
1491 2 : NDR_PULL_ALLOC(ndr, r->aipListenAddrs);
1492 : } else {
1493 0 : r->aipListenAddrs = NULL;
1494 : }
1495 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
1496 2 : if (_ptr_aipForwarders) {
1497 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
1498 : } else {
1499 2 : r->aipForwarders = NULL;
1500 : }
1501 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtension1));
1502 2 : if (_ptr_pExtension1) {
1503 0 : NDR_PULL_ALLOC(ndr, r->pExtension1);
1504 : } else {
1505 2 : r->pExtension1 = NULL;
1506 : }
1507 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtension2));
1508 2 : if (_ptr_pExtension2) {
1509 0 : NDR_PULL_ALLOC(ndr, r->pExtension2);
1510 : } else {
1511 2 : r->pExtension2 = NULL;
1512 : }
1513 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtension3));
1514 2 : if (_ptr_pExtension3) {
1515 0 : NDR_PULL_ALLOC(ndr, r->pExtension3);
1516 : } else {
1517 2 : r->pExtension3 = NULL;
1518 : }
1519 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtension4));
1520 2 : if (_ptr_pExtension4) {
1521 0 : NDR_PULL_ALLOC(ndr, r->pExtension4);
1522 : } else {
1523 2 : r->pExtension4 = NULL;
1524 : }
1525 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtension5));
1526 2 : if (_ptr_pExtension5) {
1527 0 : NDR_PULL_ALLOC(ndr, r->pExtension5);
1528 : } else {
1529 2 : r->pExtension5 = NULL;
1530 : }
1531 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLogLevel));
1532 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDebugLevel));
1533 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
1534 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcProtocol));
1535 2 : NDR_CHECK(ndr_pull_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, &r->dwNameCheckFlag));
1536 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cAddressAnswerLimit));
1537 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionRetry));
1538 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionTimeout));
1539 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwMaxCacheTtl));
1540 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsPollingInterval));
1541 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwScavengingInterval));
1542 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultRefreshInterval));
1543 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultNoRefreshInterval));
1544 2 : size_dwReserveArray_0 = 10;
1545 22 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (size_dwReserveArray_0); cntr_dwReserveArray_0++) {
1546 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserveArray[cntr_dwReserveArray_0]));
1547 : }
1548 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoReverseZones));
1549 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoCacheUpdate));
1550 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
1551 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fForwardDelegations));
1552 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fNoRecursion));
1553 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fSecureResponses));
1554 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRoundRobin));
1555 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLocalNetPriority));
1556 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fBindSecondaries));
1557 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fWriteAuthorityNs));
1558 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fStrictFileParsing));
1559 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLooseWildcarding));
1560 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDefaultAgingState));
1561 2 : size_fReserveArray_0 = 15;
1562 2 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, size_fReserveArray_0));
1563 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1564 : }
1565 2 : if (ndr_flags & NDR_BUFFERS) {
1566 2 : if (r->pszServerName) {
1567 2 : _mem_save_pszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
1568 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszServerName, 0);
1569 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszServerName));
1570 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszServerName));
1571 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszServerName, &size_pszServerName_1));
1572 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszServerName, &length_pszServerName_1));
1573 2 : if (length_pszServerName_1 > size_pszServerName_1) {
1574 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszServerName_1, length_pszServerName_1);
1575 : }
1576 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServerName_1, sizeof(uint8_t)));
1577 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszServerName, length_pszServerName_1, sizeof(uint8_t), CH_UTF8));
1578 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServerName_0, 0);
1579 : }
1580 2 : if (r->pszDsContainer) {
1581 2 : _mem_save_pszDsContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
1582 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDsContainer, 0);
1583 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDsContainer));
1584 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDsContainer));
1585 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDsContainer, &size_pszDsContainer_1));
1586 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDsContainer, &length_pszDsContainer_1));
1587 2 : if (length_pszDsContainer_1 > size_pszDsContainer_1) {
1588 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDsContainer_1, length_pszDsContainer_1);
1589 : }
1590 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDsContainer_1, sizeof(uint16_t)));
1591 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDsContainer, length_pszDsContainer_1, sizeof(uint16_t), CH_UTF16));
1592 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDsContainer_0, 0);
1593 : }
1594 2 : if (r->aipServerAddrs) {
1595 2 : _mem_save_aipServerAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1596 2 : NDR_PULL_SET_MEM_CTX(ndr, r->aipServerAddrs, 0);
1597 2 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
1598 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipServerAddrs_0, 0);
1599 : }
1600 2 : if (r->aipListenAddrs) {
1601 2 : _mem_save_aipListenAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1602 2 : NDR_PULL_SET_MEM_CTX(ndr, r->aipListenAddrs, 0);
1603 2 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
1604 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipListenAddrs_0, 0);
1605 : }
1606 2 : if (r->aipForwarders) {
1607 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
1608 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
1609 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
1610 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
1611 : }
1612 2 : if (r->pExtension1) {
1613 0 : _mem_save_pExtension1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1614 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtension1, 0);
1615 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->pExtension1));
1616 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtension1_0, 0);
1617 : }
1618 2 : if (r->pExtension2) {
1619 0 : _mem_save_pExtension2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1620 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtension2, 0);
1621 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->pExtension2));
1622 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtension2_0, 0);
1623 : }
1624 2 : if (r->pExtension3) {
1625 0 : _mem_save_pExtension3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1626 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtension3, 0);
1627 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->pExtension3));
1628 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtension3_0, 0);
1629 : }
1630 2 : if (r->pExtension4) {
1631 0 : _mem_save_pExtension4_0 = NDR_PULL_GET_MEM_CTX(ndr);
1632 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtension4, 0);
1633 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->pExtension4));
1634 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtension4_0, 0);
1635 : }
1636 2 : if (r->pExtension5) {
1637 0 : _mem_save_pExtension5_0 = NDR_PULL_GET_MEM_CTX(ndr);
1638 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtension5, 0);
1639 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->pExtension5));
1640 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtension5_0, 0);
1641 : }
1642 : }
1643 2 : return NDR_ERR_SUCCESS;
1644 : }
1645 :
1646 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)
1647 : {
1648 : uint32_t cntr_dwReserveArray_0;
1649 0 : ndr_print_struct(ndr, name, "DNS_RPC_SERVER_INFO_W2K");
1650 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1651 0 : ndr->depth++;
1652 0 : ndr_print_uint32(ndr, "dwVersion", r->dwVersion);
1653 0 : ndr_print_DNS_BOOT_METHOD(ndr, "fBootMethod", r->fBootMethod);
1654 0 : ndr_print_uint8(ndr, "fAdminConfigured", r->fAdminConfigured);
1655 0 : ndr_print_uint8(ndr, "fAllowUpdate", r->fAllowUpdate);
1656 0 : ndr_print_uint8(ndr, "fDsAvailable", r->fDsAvailable);
1657 0 : ndr_print_ptr(ndr, "pszServerName", r->pszServerName);
1658 0 : ndr->depth++;
1659 0 : if (r->pszServerName) {
1660 0 : ndr_print_string(ndr, "pszServerName", r->pszServerName);
1661 : }
1662 0 : ndr->depth--;
1663 0 : ndr_print_ptr(ndr, "pszDsContainer", r->pszDsContainer);
1664 0 : ndr->depth++;
1665 0 : if (r->pszDsContainer) {
1666 0 : ndr_print_string(ndr, "pszDsContainer", r->pszDsContainer);
1667 : }
1668 0 : ndr->depth--;
1669 0 : ndr_print_ptr(ndr, "aipServerAddrs", r->aipServerAddrs);
1670 0 : ndr->depth++;
1671 0 : if (r->aipServerAddrs) {
1672 0 : ndr_print_IP4_ARRAY(ndr, "aipServerAddrs", r->aipServerAddrs);
1673 : }
1674 0 : ndr->depth--;
1675 0 : ndr_print_ptr(ndr, "aipListenAddrs", r->aipListenAddrs);
1676 0 : ndr->depth++;
1677 0 : if (r->aipListenAddrs) {
1678 0 : ndr_print_IP4_ARRAY(ndr, "aipListenAddrs", r->aipListenAddrs);
1679 : }
1680 0 : ndr->depth--;
1681 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
1682 0 : ndr->depth++;
1683 0 : if (r->aipForwarders) {
1684 0 : ndr_print_IP4_ARRAY(ndr, "aipForwarders", r->aipForwarders);
1685 : }
1686 0 : ndr->depth--;
1687 0 : ndr_print_ptr(ndr, "pExtension1", r->pExtension1);
1688 0 : ndr->depth++;
1689 0 : if (r->pExtension1) {
1690 0 : ndr_print_uint32(ndr, "pExtension1", *r->pExtension1);
1691 : }
1692 0 : ndr->depth--;
1693 0 : ndr_print_ptr(ndr, "pExtension2", r->pExtension2);
1694 0 : ndr->depth++;
1695 0 : if (r->pExtension2) {
1696 0 : ndr_print_uint32(ndr, "pExtension2", *r->pExtension2);
1697 : }
1698 0 : ndr->depth--;
1699 0 : ndr_print_ptr(ndr, "pExtension3", r->pExtension3);
1700 0 : ndr->depth++;
1701 0 : if (r->pExtension3) {
1702 0 : ndr_print_uint32(ndr, "pExtension3", *r->pExtension3);
1703 : }
1704 0 : ndr->depth--;
1705 0 : ndr_print_ptr(ndr, "pExtension4", r->pExtension4);
1706 0 : ndr->depth++;
1707 0 : if (r->pExtension4) {
1708 0 : ndr_print_uint32(ndr, "pExtension4", *r->pExtension4);
1709 : }
1710 0 : ndr->depth--;
1711 0 : ndr_print_ptr(ndr, "pExtension5", r->pExtension5);
1712 0 : ndr->depth++;
1713 0 : if (r->pExtension5) {
1714 0 : ndr_print_uint32(ndr, "pExtension5", *r->pExtension5);
1715 : }
1716 0 : ndr->depth--;
1717 0 : ndr_print_uint32(ndr, "dwLogLevel", r->dwLogLevel);
1718 0 : ndr_print_uint32(ndr, "dwDebugLevel", r->dwDebugLevel);
1719 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
1720 0 : ndr_print_uint32(ndr, "dwRpcProtocol", r->dwRpcProtocol);
1721 0 : ndr_print_DNS_NAME_CHECK_FLAG(ndr, "dwNameCheckFlag", r->dwNameCheckFlag);
1722 0 : ndr_print_uint32(ndr, "cAddressAnswerLimit", r->cAddressAnswerLimit);
1723 0 : ndr_print_uint32(ndr, "dwRecursionRetry", r->dwRecursionRetry);
1724 0 : ndr_print_uint32(ndr, "dwRecursionTimeout", r->dwRecursionTimeout);
1725 0 : ndr_print_uint32(ndr, "dwMaxCacheTtl", r->dwMaxCacheTtl);
1726 0 : ndr_print_uint32(ndr, "dwDsPollingInterval", r->dwDsPollingInterval);
1727 0 : ndr_print_uint32(ndr, "dwScavengingInterval", r->dwScavengingInterval);
1728 0 : ndr_print_uint32(ndr, "dwDefaultRefreshInterval", r->dwDefaultRefreshInterval);
1729 0 : ndr_print_uint32(ndr, "dwDefaultNoRefreshInterval", r->dwDefaultNoRefreshInterval);
1730 0 : ndr->print(ndr, "%s: ARRAY(%d)", "dwReserveArray", (int)10);
1731 0 : ndr->depth++;
1732 0 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (10); cntr_dwReserveArray_0++) {
1733 0 : ndr_print_uint32(ndr, "dwReserveArray", r->dwReserveArray[cntr_dwReserveArray_0]);
1734 : }
1735 0 : ndr->depth--;
1736 0 : ndr_print_uint8(ndr, "fAutoReverseZones", r->fAutoReverseZones);
1737 0 : ndr_print_uint8(ndr, "fAutoCacheUpdate", r->fAutoCacheUpdate);
1738 0 : ndr_print_uint8(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
1739 0 : ndr_print_uint8(ndr, "fForwardDelegations", r->fForwardDelegations);
1740 0 : ndr_print_uint8(ndr, "fNoRecursion", r->fNoRecursion);
1741 0 : ndr_print_uint8(ndr, "fSecureResponses", r->fSecureResponses);
1742 0 : ndr_print_uint8(ndr, "fRoundRobin", r->fRoundRobin);
1743 0 : ndr_print_uint8(ndr, "fLocalNetPriority", r->fLocalNetPriority);
1744 0 : ndr_print_uint8(ndr, "fBindSecondaries", r->fBindSecondaries);
1745 0 : ndr_print_uint8(ndr, "fWriteAuthorityNs", r->fWriteAuthorityNs);
1746 0 : ndr_print_uint8(ndr, "fStrictFileParsing", r->fStrictFileParsing);
1747 0 : ndr_print_uint8(ndr, "fLooseWildcarding", r->fLooseWildcarding);
1748 0 : ndr_print_uint8(ndr, "fDefaultAgingState", r->fDefaultAgingState);
1749 0 : ndr_print_array_uint8(ndr, "fReserveArray", r->fReserveArray, 15);
1750 0 : ndr->depth--;
1751 : }
1752 :
1753 48 : static enum ndr_err_code ndr_push_DNS_EXTENSION(struct ndr_push *ndr, int ndr_flags, const struct DNS_EXTENSION *r)
1754 : {
1755 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1756 48 : if (ndr_flags & NDR_SCALARS) {
1757 24 : NDR_CHECK(ndr_push_align(ndr, 5));
1758 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->extension));
1759 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1760 : }
1761 48 : if (ndr_flags & NDR_BUFFERS) {
1762 24 : if (r->extension) {
1763 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->extension, CH_UTF8)));
1764 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1765 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->extension, CH_UTF8)));
1766 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->extension, ndr_charset_length(r->extension, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1767 : }
1768 : }
1769 48 : return NDR_ERR_SUCCESS;
1770 : }
1771 :
1772 48 : static enum ndr_err_code ndr_pull_DNS_EXTENSION(struct ndr_pull *ndr, int ndr_flags, struct DNS_EXTENSION *r)
1773 : {
1774 : uint32_t _ptr_extension;
1775 48 : uint32_t size_extension_1 = 0;
1776 48 : uint32_t length_extension_1 = 0;
1777 48 : TALLOC_CTX *_mem_save_extension_0 = NULL;
1778 48 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1779 48 : if (ndr_flags & NDR_SCALARS) {
1780 24 : NDR_CHECK(ndr_pull_align(ndr, 5));
1781 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_extension));
1782 24 : if (_ptr_extension) {
1783 0 : NDR_PULL_ALLOC(ndr, r->extension);
1784 : } else {
1785 24 : r->extension = NULL;
1786 : }
1787 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1788 : }
1789 48 : if (ndr_flags & NDR_BUFFERS) {
1790 24 : if (r->extension) {
1791 0 : _mem_save_extension_0 = NDR_PULL_GET_MEM_CTX(ndr);
1792 0 : NDR_PULL_SET_MEM_CTX(ndr, r->extension, 0);
1793 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->extension));
1794 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->extension));
1795 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->extension, &size_extension_1));
1796 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->extension, &length_extension_1));
1797 0 : if (length_extension_1 > size_extension_1) {
1798 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_extension_1, length_extension_1);
1799 : }
1800 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_extension_1, sizeof(uint8_t)));
1801 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->extension, length_extension_1, sizeof(uint8_t), CH_UTF8));
1802 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_extension_0, 0);
1803 : }
1804 : }
1805 48 : return NDR_ERR_SUCCESS;
1806 : }
1807 :
1808 0 : _PUBLIC_ void ndr_print_DNS_EXTENSION(struct ndr_print *ndr, const char *name, const struct DNS_EXTENSION *r)
1809 : {
1810 0 : ndr_print_struct(ndr, name, "DNS_EXTENSION");
1811 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1812 0 : ndr->depth++;
1813 0 : ndr_print_ptr(ndr, "extension", r->extension);
1814 0 : ndr->depth++;
1815 0 : if (r->extension) {
1816 0 : ndr_print_string(ndr, "extension", r->extension);
1817 : }
1818 0 : ndr->depth--;
1819 0 : ndr->depth--;
1820 : }
1821 :
1822 2 : _PUBLIC_ enum ndr_err_code ndr_push_DNS_RPC_SERVER_INFO_DOTNET(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_SERVER_INFO_DOTNET *r)
1823 : {
1824 : uint32_t cntr_pExtensions_0;
1825 : uint32_t cntr_dwReserveArray_0;
1826 2 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1827 2 : if (ndr_flags & NDR_SCALARS) {
1828 2 : NDR_CHECK(ndr_push_align(ndr, 5));
1829 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
1830 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
1831 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwVersion));
1832 2 : NDR_CHECK(ndr_push_DNS_BOOT_METHOD(ndr, NDR_SCALARS, r->fBootMethod));
1833 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAdminConfigured));
1834 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAllowUpdate));
1835 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDsAvailable));
1836 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszServerName));
1837 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDsContainer));
1838 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipServerAddrs));
1839 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipListenAddrs));
1840 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
1841 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipLogFilter));
1842 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwszLogFilePath));
1843 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDomainName));
1844 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszForestName));
1845 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDomainDirectoryPartition));
1846 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszForestDirectoryPartition));
1847 14 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
1848 12 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pExtensions[cntr_pExtensions_0]));
1849 : }
1850 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLogLevel));
1851 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDebugLevel));
1852 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
1853 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcProtocol));
1854 2 : NDR_CHECK(ndr_push_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, r->dwNameCheckFlag));
1855 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cAddressAnswerLimit));
1856 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionRetry));
1857 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionTimeout));
1858 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwMaxCacheTtl));
1859 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsPollingInterval));
1860 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLocalNetPriorityNetMask));
1861 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwScavengingInterval));
1862 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultRefreshInterval));
1863 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultNoRefreshInterval));
1864 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastScavengeTime));
1865 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwEventLogLevel));
1866 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLogFileMaxSize));
1867 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsForestVersion));
1868 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsDomainVersion));
1869 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsDsaVersion));
1870 10 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (4); cntr_dwReserveArray_0++) {
1871 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserveArray[cntr_dwReserveArray_0]));
1872 : }
1873 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoReverseZones));
1874 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoCacheUpdate));
1875 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
1876 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fForwardDelegations));
1877 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fNoRecursion));
1878 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fSecureResponses));
1879 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRoundRobin));
1880 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLocalNetPriority));
1881 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fBindSecondaries));
1882 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fWriteAuthorityNs));
1883 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fStrictFileParsing));
1884 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLooseWildcarding));
1885 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDefaultAgingState));
1886 2 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, 15));
1887 2 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1888 : }
1889 2 : if (ndr_flags & NDR_BUFFERS) {
1890 2 : if (r->pszServerName) {
1891 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
1892 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1893 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
1894 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszServerName, ndr_charset_length(r->pszServerName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1895 : }
1896 2 : if (r->pszDsContainer) {
1897 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
1898 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1899 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
1900 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDsContainer, ndr_charset_length(r->pszDsContainer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1901 : }
1902 2 : if (r->aipServerAddrs) {
1903 2 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
1904 : }
1905 2 : if (r->aipListenAddrs) {
1906 2 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
1907 : }
1908 2 : if (r->aipForwarders) {
1909 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
1910 : }
1911 2 : if (r->aipLogFilter) {
1912 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipLogFilter));
1913 : }
1914 2 : if (r->pwszLogFilePath) {
1915 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszLogFilePath, CH_UTF16)));
1916 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1917 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszLogFilePath, CH_UTF16)));
1918 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pwszLogFilePath, ndr_charset_length(r->pwszLogFilePath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1919 : }
1920 2 : if (r->pszDomainName) {
1921 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainName, CH_UTF8)));
1922 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1923 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainName, CH_UTF8)));
1924 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDomainName, ndr_charset_length(r->pszDomainName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1925 : }
1926 2 : if (r->pszForestName) {
1927 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestName, CH_UTF8)));
1928 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1929 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestName, CH_UTF8)));
1930 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszForestName, ndr_charset_length(r->pszForestName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1931 : }
1932 2 : if (r->pszDomainDirectoryPartition) {
1933 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8)));
1934 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1935 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8)));
1936 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDomainDirectoryPartition, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1937 : }
1938 2 : if (r->pszForestDirectoryPartition) {
1939 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8)));
1940 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1941 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8)));
1942 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszForestDirectoryPartition, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1943 : }
1944 14 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
1945 12 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pExtensions[cntr_pExtensions_0]));
1946 : }
1947 : }
1948 2 : return NDR_ERR_SUCCESS;
1949 : }
1950 :
1951 2 : _PUBLIC_ enum ndr_err_code ndr_pull_DNS_RPC_SERVER_INFO_DOTNET(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_SERVER_INFO_DOTNET *r)
1952 : {
1953 : uint32_t _ptr_pszServerName;
1954 2 : uint32_t size_pszServerName_1 = 0;
1955 2 : uint32_t length_pszServerName_1 = 0;
1956 2 : TALLOC_CTX *_mem_save_pszServerName_0 = NULL;
1957 : uint32_t _ptr_pszDsContainer;
1958 2 : uint32_t size_pszDsContainer_1 = 0;
1959 2 : uint32_t length_pszDsContainer_1 = 0;
1960 2 : TALLOC_CTX *_mem_save_pszDsContainer_0 = NULL;
1961 : uint32_t _ptr_aipServerAddrs;
1962 2 : TALLOC_CTX *_mem_save_aipServerAddrs_0 = NULL;
1963 : uint32_t _ptr_aipListenAddrs;
1964 2 : TALLOC_CTX *_mem_save_aipListenAddrs_0 = NULL;
1965 : uint32_t _ptr_aipForwarders;
1966 2 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
1967 : uint32_t _ptr_aipLogFilter;
1968 2 : TALLOC_CTX *_mem_save_aipLogFilter_0 = NULL;
1969 : uint32_t _ptr_pwszLogFilePath;
1970 2 : uint32_t size_pwszLogFilePath_1 = 0;
1971 2 : uint32_t length_pwszLogFilePath_1 = 0;
1972 2 : TALLOC_CTX *_mem_save_pwszLogFilePath_0 = NULL;
1973 : uint32_t _ptr_pszDomainName;
1974 2 : uint32_t size_pszDomainName_1 = 0;
1975 2 : uint32_t length_pszDomainName_1 = 0;
1976 2 : TALLOC_CTX *_mem_save_pszDomainName_0 = NULL;
1977 : uint32_t _ptr_pszForestName;
1978 2 : uint32_t size_pszForestName_1 = 0;
1979 2 : uint32_t length_pszForestName_1 = 0;
1980 2 : TALLOC_CTX *_mem_save_pszForestName_0 = NULL;
1981 : uint32_t _ptr_pszDomainDirectoryPartition;
1982 2 : uint32_t size_pszDomainDirectoryPartition_1 = 0;
1983 2 : uint32_t length_pszDomainDirectoryPartition_1 = 0;
1984 2 : TALLOC_CTX *_mem_save_pszDomainDirectoryPartition_0 = NULL;
1985 : uint32_t _ptr_pszForestDirectoryPartition;
1986 2 : uint32_t size_pszForestDirectoryPartition_1 = 0;
1987 2 : uint32_t length_pszForestDirectoryPartition_1 = 0;
1988 2 : TALLOC_CTX *_mem_save_pszForestDirectoryPartition_0 = NULL;
1989 2 : uint32_t size_pExtensions_0 = 0;
1990 : uint32_t cntr_pExtensions_0;
1991 2 : uint32_t size_dwReserveArray_0 = 0;
1992 : uint32_t cntr_dwReserveArray_0;
1993 2 : uint32_t size_fReserveArray_0 = 0;
1994 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1995 2 : if (ndr_flags & NDR_SCALARS) {
1996 2 : NDR_CHECK(ndr_pull_align(ndr, 5));
1997 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
1998 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
1999 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwVersion));
2000 2 : NDR_CHECK(ndr_pull_DNS_BOOT_METHOD(ndr, NDR_SCALARS, &r->fBootMethod));
2001 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAdminConfigured));
2002 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAllowUpdate));
2003 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDsAvailable));
2004 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServerName));
2005 2 : if (_ptr_pszServerName) {
2006 2 : NDR_PULL_ALLOC(ndr, r->pszServerName);
2007 : } else {
2008 0 : r->pszServerName = NULL;
2009 : }
2010 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDsContainer));
2011 2 : if (_ptr_pszDsContainer) {
2012 2 : NDR_PULL_ALLOC(ndr, r->pszDsContainer);
2013 : } else {
2014 0 : r->pszDsContainer = NULL;
2015 : }
2016 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipServerAddrs));
2017 2 : if (_ptr_aipServerAddrs) {
2018 2 : NDR_PULL_ALLOC(ndr, r->aipServerAddrs);
2019 : } else {
2020 0 : r->aipServerAddrs = NULL;
2021 : }
2022 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipListenAddrs));
2023 2 : if (_ptr_aipListenAddrs) {
2024 2 : NDR_PULL_ALLOC(ndr, r->aipListenAddrs);
2025 : } else {
2026 0 : r->aipListenAddrs = NULL;
2027 : }
2028 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
2029 2 : if (_ptr_aipForwarders) {
2030 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
2031 : } else {
2032 2 : r->aipForwarders = NULL;
2033 : }
2034 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipLogFilter));
2035 2 : if (_ptr_aipLogFilter) {
2036 0 : NDR_PULL_ALLOC(ndr, r->aipLogFilter);
2037 : } else {
2038 2 : r->aipLogFilter = NULL;
2039 : }
2040 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszLogFilePath));
2041 2 : if (_ptr_pwszLogFilePath) {
2042 0 : NDR_PULL_ALLOC(ndr, r->pwszLogFilePath);
2043 : } else {
2044 2 : r->pwszLogFilePath = NULL;
2045 : }
2046 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDomainName));
2047 2 : if (_ptr_pszDomainName) {
2048 2 : NDR_PULL_ALLOC(ndr, r->pszDomainName);
2049 : } else {
2050 0 : r->pszDomainName = NULL;
2051 : }
2052 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszForestName));
2053 2 : if (_ptr_pszForestName) {
2054 2 : NDR_PULL_ALLOC(ndr, r->pszForestName);
2055 : } else {
2056 0 : r->pszForestName = NULL;
2057 : }
2058 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDomainDirectoryPartition));
2059 2 : if (_ptr_pszDomainDirectoryPartition) {
2060 2 : NDR_PULL_ALLOC(ndr, r->pszDomainDirectoryPartition);
2061 : } else {
2062 0 : r->pszDomainDirectoryPartition = NULL;
2063 : }
2064 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszForestDirectoryPartition));
2065 2 : if (_ptr_pszForestDirectoryPartition) {
2066 2 : NDR_PULL_ALLOC(ndr, r->pszForestDirectoryPartition);
2067 : } else {
2068 0 : r->pszForestDirectoryPartition = NULL;
2069 : }
2070 2 : size_pExtensions_0 = 6;
2071 14 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2072 12 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pExtensions[cntr_pExtensions_0]));
2073 : }
2074 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLogLevel));
2075 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDebugLevel));
2076 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
2077 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcProtocol));
2078 2 : NDR_CHECK(ndr_pull_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, &r->dwNameCheckFlag));
2079 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cAddressAnswerLimit));
2080 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionRetry));
2081 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionTimeout));
2082 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwMaxCacheTtl));
2083 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsPollingInterval));
2084 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLocalNetPriorityNetMask));
2085 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwScavengingInterval));
2086 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultRefreshInterval));
2087 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultNoRefreshInterval));
2088 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastScavengeTime));
2089 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwEventLogLevel));
2090 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLogFileMaxSize));
2091 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsForestVersion));
2092 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsDomainVersion));
2093 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsDsaVersion));
2094 2 : size_dwReserveArray_0 = 4;
2095 10 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (size_dwReserveArray_0); cntr_dwReserveArray_0++) {
2096 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserveArray[cntr_dwReserveArray_0]));
2097 : }
2098 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoReverseZones));
2099 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoCacheUpdate));
2100 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
2101 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fForwardDelegations));
2102 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fNoRecursion));
2103 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fSecureResponses));
2104 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRoundRobin));
2105 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLocalNetPriority));
2106 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fBindSecondaries));
2107 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fWriteAuthorityNs));
2108 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fStrictFileParsing));
2109 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLooseWildcarding));
2110 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDefaultAgingState));
2111 2 : size_fReserveArray_0 = 15;
2112 2 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, size_fReserveArray_0));
2113 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2114 : }
2115 2 : if (ndr_flags & NDR_BUFFERS) {
2116 2 : if (r->pszServerName) {
2117 2 : _mem_save_pszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2118 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszServerName, 0);
2119 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszServerName));
2120 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszServerName));
2121 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszServerName, &size_pszServerName_1));
2122 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszServerName, &length_pszServerName_1));
2123 2 : if (length_pszServerName_1 > size_pszServerName_1) {
2124 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszServerName_1, length_pszServerName_1);
2125 : }
2126 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServerName_1, sizeof(uint8_t)));
2127 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszServerName, length_pszServerName_1, sizeof(uint8_t), CH_UTF8));
2128 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServerName_0, 0);
2129 : }
2130 2 : if (r->pszDsContainer) {
2131 2 : _mem_save_pszDsContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
2132 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDsContainer, 0);
2133 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDsContainer));
2134 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDsContainer));
2135 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDsContainer, &size_pszDsContainer_1));
2136 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDsContainer, &length_pszDsContainer_1));
2137 2 : if (length_pszDsContainer_1 > size_pszDsContainer_1) {
2138 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDsContainer_1, length_pszDsContainer_1);
2139 : }
2140 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDsContainer_1, sizeof(uint16_t)));
2141 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDsContainer, length_pszDsContainer_1, sizeof(uint16_t), CH_UTF16));
2142 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDsContainer_0, 0);
2143 : }
2144 2 : if (r->aipServerAddrs) {
2145 2 : _mem_save_aipServerAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
2146 2 : NDR_PULL_SET_MEM_CTX(ndr, r->aipServerAddrs, 0);
2147 2 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
2148 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipServerAddrs_0, 0);
2149 : }
2150 2 : if (r->aipListenAddrs) {
2151 2 : _mem_save_aipListenAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
2152 2 : NDR_PULL_SET_MEM_CTX(ndr, r->aipListenAddrs, 0);
2153 2 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
2154 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipListenAddrs_0, 0);
2155 : }
2156 2 : if (r->aipForwarders) {
2157 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
2158 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
2159 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
2160 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
2161 : }
2162 2 : if (r->aipLogFilter) {
2163 0 : _mem_save_aipLogFilter_0 = NDR_PULL_GET_MEM_CTX(ndr);
2164 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipLogFilter, 0);
2165 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipLogFilter));
2166 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipLogFilter_0, 0);
2167 : }
2168 2 : if (r->pwszLogFilePath) {
2169 0 : _mem_save_pwszLogFilePath_0 = NDR_PULL_GET_MEM_CTX(ndr);
2170 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pwszLogFilePath, 0);
2171 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pwszLogFilePath));
2172 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pwszLogFilePath));
2173 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pwszLogFilePath, &size_pwszLogFilePath_1));
2174 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pwszLogFilePath, &length_pwszLogFilePath_1));
2175 0 : if (length_pwszLogFilePath_1 > size_pwszLogFilePath_1) {
2176 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszLogFilePath_1, length_pwszLogFilePath_1);
2177 : }
2178 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszLogFilePath_1, sizeof(uint16_t)));
2179 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pwszLogFilePath, length_pwszLogFilePath_1, sizeof(uint16_t), CH_UTF16));
2180 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszLogFilePath_0, 0);
2181 : }
2182 2 : if (r->pszDomainName) {
2183 2 : _mem_save_pszDomainName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2184 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDomainName, 0);
2185 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDomainName));
2186 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDomainName));
2187 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDomainName, &size_pszDomainName_1));
2188 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDomainName, &length_pszDomainName_1));
2189 2 : if (length_pszDomainName_1 > size_pszDomainName_1) {
2190 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDomainName_1, length_pszDomainName_1);
2191 : }
2192 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDomainName_1, sizeof(uint8_t)));
2193 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDomainName, length_pszDomainName_1, sizeof(uint8_t), CH_UTF8));
2194 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDomainName_0, 0);
2195 : }
2196 2 : if (r->pszForestName) {
2197 2 : _mem_save_pszForestName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2198 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszForestName, 0);
2199 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszForestName));
2200 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszForestName));
2201 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszForestName, &size_pszForestName_1));
2202 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszForestName, &length_pszForestName_1));
2203 2 : if (length_pszForestName_1 > size_pszForestName_1) {
2204 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszForestName_1, length_pszForestName_1);
2205 : }
2206 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszForestName_1, sizeof(uint8_t)));
2207 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszForestName, length_pszForestName_1, sizeof(uint8_t), CH_UTF8));
2208 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszForestName_0, 0);
2209 : }
2210 2 : if (r->pszDomainDirectoryPartition) {
2211 2 : _mem_save_pszDomainDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
2212 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDomainDirectoryPartition, 0);
2213 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDomainDirectoryPartition));
2214 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDomainDirectoryPartition));
2215 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDomainDirectoryPartition, &size_pszDomainDirectoryPartition_1));
2216 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDomainDirectoryPartition, &length_pszDomainDirectoryPartition_1));
2217 2 : if (length_pszDomainDirectoryPartition_1 > size_pszDomainDirectoryPartition_1) {
2218 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDomainDirectoryPartition_1, length_pszDomainDirectoryPartition_1);
2219 : }
2220 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDomainDirectoryPartition_1, sizeof(uint8_t)));
2221 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDomainDirectoryPartition, length_pszDomainDirectoryPartition_1, sizeof(uint8_t), CH_UTF8));
2222 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDomainDirectoryPartition_0, 0);
2223 : }
2224 2 : if (r->pszForestDirectoryPartition) {
2225 2 : _mem_save_pszForestDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
2226 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszForestDirectoryPartition, 0);
2227 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszForestDirectoryPartition));
2228 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszForestDirectoryPartition));
2229 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszForestDirectoryPartition, &size_pszForestDirectoryPartition_1));
2230 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszForestDirectoryPartition, &length_pszForestDirectoryPartition_1));
2231 2 : if (length_pszForestDirectoryPartition_1 > size_pszForestDirectoryPartition_1) {
2232 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszForestDirectoryPartition_1, length_pszForestDirectoryPartition_1);
2233 : }
2234 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszForestDirectoryPartition_1, sizeof(uint8_t)));
2235 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszForestDirectoryPartition, length_pszForestDirectoryPartition_1, sizeof(uint8_t), CH_UTF8));
2236 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszForestDirectoryPartition_0, 0);
2237 : }
2238 2 : size_pExtensions_0 = 6;
2239 14 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2240 12 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pExtensions[cntr_pExtensions_0]));
2241 : }
2242 2 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2243 : }
2244 : }
2245 2 : return NDR_ERR_SUCCESS;
2246 : }
2247 :
2248 0 : static void ndr_print_flags_DNS_RPC_SERVER_INFO_DOTNET(struct ndr_print *ndr, const char *name, int unused, const struct DNS_RPC_SERVER_INFO_DOTNET *r)
2249 : {
2250 0 : ndr_print_DNS_RPC_SERVER_INFO_DOTNET(ndr, name, r);
2251 0 : }
2252 :
2253 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)
2254 : {
2255 : uint32_t cntr_pExtensions_0;
2256 : uint32_t cntr_dwReserveArray_0;
2257 0 : ndr_print_struct(ndr, name, "DNS_RPC_SERVER_INFO_DOTNET");
2258 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2259 0 : ndr->depth++;
2260 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
2261 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
2262 0 : ndr_print_uint32(ndr, "dwVersion", r->dwVersion);
2263 0 : ndr_print_DNS_BOOT_METHOD(ndr, "fBootMethod", r->fBootMethod);
2264 0 : ndr_print_uint8(ndr, "fAdminConfigured", r->fAdminConfigured);
2265 0 : ndr_print_uint8(ndr, "fAllowUpdate", r->fAllowUpdate);
2266 0 : ndr_print_uint8(ndr, "fDsAvailable", r->fDsAvailable);
2267 0 : ndr_print_ptr(ndr, "pszServerName", r->pszServerName);
2268 0 : ndr->depth++;
2269 0 : if (r->pszServerName) {
2270 0 : ndr_print_string(ndr, "pszServerName", r->pszServerName);
2271 : }
2272 0 : ndr->depth--;
2273 0 : ndr_print_ptr(ndr, "pszDsContainer", r->pszDsContainer);
2274 0 : ndr->depth++;
2275 0 : if (r->pszDsContainer) {
2276 0 : ndr_print_string(ndr, "pszDsContainer", r->pszDsContainer);
2277 : }
2278 0 : ndr->depth--;
2279 0 : ndr_print_ptr(ndr, "aipServerAddrs", r->aipServerAddrs);
2280 0 : ndr->depth++;
2281 0 : if (r->aipServerAddrs) {
2282 0 : ndr_print_IP4_ARRAY(ndr, "aipServerAddrs", r->aipServerAddrs);
2283 : }
2284 0 : ndr->depth--;
2285 0 : ndr_print_ptr(ndr, "aipListenAddrs", r->aipListenAddrs);
2286 0 : ndr->depth++;
2287 0 : if (r->aipListenAddrs) {
2288 0 : ndr_print_IP4_ARRAY(ndr, "aipListenAddrs", r->aipListenAddrs);
2289 : }
2290 0 : ndr->depth--;
2291 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
2292 0 : ndr->depth++;
2293 0 : if (r->aipForwarders) {
2294 0 : ndr_print_IP4_ARRAY(ndr, "aipForwarders", r->aipForwarders);
2295 : }
2296 0 : ndr->depth--;
2297 0 : ndr_print_ptr(ndr, "aipLogFilter", r->aipLogFilter);
2298 0 : ndr->depth++;
2299 0 : if (r->aipLogFilter) {
2300 0 : ndr_print_IP4_ARRAY(ndr, "aipLogFilter", r->aipLogFilter);
2301 : }
2302 0 : ndr->depth--;
2303 0 : ndr_print_ptr(ndr, "pwszLogFilePath", r->pwszLogFilePath);
2304 0 : ndr->depth++;
2305 0 : if (r->pwszLogFilePath) {
2306 0 : ndr_print_string(ndr, "pwszLogFilePath", r->pwszLogFilePath);
2307 : }
2308 0 : ndr->depth--;
2309 0 : ndr_print_ptr(ndr, "pszDomainName", r->pszDomainName);
2310 0 : ndr->depth++;
2311 0 : if (r->pszDomainName) {
2312 0 : ndr_print_string(ndr, "pszDomainName", r->pszDomainName);
2313 : }
2314 0 : ndr->depth--;
2315 0 : ndr_print_ptr(ndr, "pszForestName", r->pszForestName);
2316 0 : ndr->depth++;
2317 0 : if (r->pszForestName) {
2318 0 : ndr_print_string(ndr, "pszForestName", r->pszForestName);
2319 : }
2320 0 : ndr->depth--;
2321 0 : ndr_print_ptr(ndr, "pszDomainDirectoryPartition", r->pszDomainDirectoryPartition);
2322 0 : ndr->depth++;
2323 0 : if (r->pszDomainDirectoryPartition) {
2324 0 : ndr_print_string(ndr, "pszDomainDirectoryPartition", r->pszDomainDirectoryPartition);
2325 : }
2326 0 : ndr->depth--;
2327 0 : ndr_print_ptr(ndr, "pszForestDirectoryPartition", r->pszForestDirectoryPartition);
2328 0 : ndr->depth++;
2329 0 : if (r->pszForestDirectoryPartition) {
2330 0 : ndr_print_string(ndr, "pszForestDirectoryPartition", r->pszForestDirectoryPartition);
2331 : }
2332 0 : ndr->depth--;
2333 0 : ndr->print(ndr, "%s: ARRAY(%d)", "pExtensions", (int)6);
2334 0 : ndr->depth++;
2335 0 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
2336 0 : ndr_print_DNS_EXTENSION(ndr, "pExtensions", &r->pExtensions[cntr_pExtensions_0]);
2337 : }
2338 0 : ndr->depth--;
2339 0 : ndr_print_uint32(ndr, "dwLogLevel", r->dwLogLevel);
2340 0 : ndr_print_uint32(ndr, "dwDebugLevel", r->dwDebugLevel);
2341 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
2342 0 : ndr_print_uint32(ndr, "dwRpcProtocol", r->dwRpcProtocol);
2343 0 : ndr_print_DNS_NAME_CHECK_FLAG(ndr, "dwNameCheckFlag", r->dwNameCheckFlag);
2344 0 : ndr_print_uint32(ndr, "cAddressAnswerLimit", r->cAddressAnswerLimit);
2345 0 : ndr_print_uint32(ndr, "dwRecursionRetry", r->dwRecursionRetry);
2346 0 : ndr_print_uint32(ndr, "dwRecursionTimeout", r->dwRecursionTimeout);
2347 0 : ndr_print_uint32(ndr, "dwMaxCacheTtl", r->dwMaxCacheTtl);
2348 0 : ndr_print_uint32(ndr, "dwDsPollingInterval", r->dwDsPollingInterval);
2349 0 : ndr_print_uint32(ndr, "dwLocalNetPriorityNetMask", r->dwLocalNetPriorityNetMask);
2350 0 : ndr_print_uint32(ndr, "dwScavengingInterval", r->dwScavengingInterval);
2351 0 : ndr_print_uint32(ndr, "dwDefaultRefreshInterval", r->dwDefaultRefreshInterval);
2352 0 : ndr_print_uint32(ndr, "dwDefaultNoRefreshInterval", r->dwDefaultNoRefreshInterval);
2353 0 : ndr_print_uint32(ndr, "dwLastScavengeTime", r->dwLastScavengeTime);
2354 0 : ndr_print_uint32(ndr, "dwEventLogLevel", r->dwEventLogLevel);
2355 0 : ndr_print_uint32(ndr, "dwLogFileMaxSize", r->dwLogFileMaxSize);
2356 0 : ndr_print_uint32(ndr, "dwDsForestVersion", r->dwDsForestVersion);
2357 0 : ndr_print_uint32(ndr, "dwDsDomainVersion", r->dwDsDomainVersion);
2358 0 : ndr_print_uint32(ndr, "dwDsDsaVersion", r->dwDsDsaVersion);
2359 0 : ndr->print(ndr, "%s: ARRAY(%d)", "dwReserveArray", (int)4);
2360 0 : ndr->depth++;
2361 0 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (4); cntr_dwReserveArray_0++) {
2362 0 : ndr_print_uint32(ndr, "dwReserveArray", r->dwReserveArray[cntr_dwReserveArray_0]);
2363 : }
2364 0 : ndr->depth--;
2365 0 : ndr_print_uint8(ndr, "fAutoReverseZones", r->fAutoReverseZones);
2366 0 : ndr_print_uint8(ndr, "fAutoCacheUpdate", r->fAutoCacheUpdate);
2367 0 : ndr_print_uint8(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
2368 0 : ndr_print_uint8(ndr, "fForwardDelegations", r->fForwardDelegations);
2369 0 : ndr_print_uint8(ndr, "fNoRecursion", r->fNoRecursion);
2370 0 : ndr_print_uint8(ndr, "fSecureResponses", r->fSecureResponses);
2371 0 : ndr_print_uint8(ndr, "fRoundRobin", r->fRoundRobin);
2372 0 : ndr_print_uint8(ndr, "fLocalNetPriority", r->fLocalNetPriority);
2373 0 : ndr_print_uint8(ndr, "fBindSecondaries", r->fBindSecondaries);
2374 0 : ndr_print_uint8(ndr, "fWriteAuthorityNs", r->fWriteAuthorityNs);
2375 0 : ndr_print_uint8(ndr, "fStrictFileParsing", r->fStrictFileParsing);
2376 0 : ndr_print_uint8(ndr, "fLooseWildcarding", r->fLooseWildcarding);
2377 0 : ndr_print_uint8(ndr, "fDefaultAgingState", r->fDefaultAgingState);
2378 0 : ndr_print_array_uint8(ndr, "fReserveArray", r->fReserveArray, 15);
2379 0 : ndr->depth--;
2380 : }
2381 :
2382 2 : _PUBLIC_ enum ndr_err_code ndr_push_DNS_RPC_SERVER_INFO_LONGHORN(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_SERVER_INFO_LONGHORN *r)
2383 : {
2384 : uint32_t cntr_pExtensions_0;
2385 : uint32_t cntr_dwReserveArray_0;
2386 2 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2387 2 : if (ndr_flags & NDR_SCALARS) {
2388 2 : NDR_CHECK(ndr_push_align(ndr, 5));
2389 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
2390 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
2391 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwVersion));
2392 2 : NDR_CHECK(ndr_push_DNS_BOOT_METHOD(ndr, NDR_SCALARS, r->fBootMethod));
2393 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAdminConfigured));
2394 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAllowUpdate));
2395 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDsAvailable));
2396 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszServerName));
2397 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDsContainer));
2398 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipServerAddrs));
2399 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipListenAddrs));
2400 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
2401 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipLogFilter));
2402 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwszLogFilePath));
2403 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDomainName));
2404 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszForestName));
2405 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDomainDirectoryPartition));
2406 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszForestDirectoryPartition));
2407 14 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
2408 12 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pExtensions[cntr_pExtensions_0]));
2409 : }
2410 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLogLevel));
2411 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDebugLevel));
2412 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
2413 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcProtocol));
2414 2 : NDR_CHECK(ndr_push_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, r->dwNameCheckFlag));
2415 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cAddressAnswerLimit));
2416 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionRetry));
2417 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRecursionTimeout));
2418 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwMaxCacheTtl));
2419 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsPollingInterval));
2420 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLocalNetPriorityNetMask));
2421 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwScavengingInterval));
2422 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultRefreshInterval));
2423 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDefaultNoRefreshInterval));
2424 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastScavengeTime));
2425 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwEventLogLevel));
2426 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLogFileMaxSize));
2427 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsForestVersion));
2428 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsDomainVersion));
2429 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDsDsaVersion));
2430 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fReadOnlyDC));
2431 8 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (3); cntr_dwReserveArray_0++) {
2432 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserveArray[cntr_dwReserveArray_0]));
2433 : }
2434 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoReverseZones));
2435 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fAutoCacheUpdate));
2436 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
2437 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fForwardDelegations));
2438 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fNoRecursion));
2439 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fSecureResponses));
2440 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fRoundRobin));
2441 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLocalNetPriority));
2442 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fBindSecondaries));
2443 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fWriteAuthorityNs));
2444 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fStrictFileParsing));
2445 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fLooseWildcarding));
2446 2 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fDefaultAgingState));
2447 2 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, 15));
2448 2 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2449 : }
2450 2 : if (ndr_flags & NDR_BUFFERS) {
2451 2 : if (r->pszServerName) {
2452 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
2453 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2454 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServerName, CH_UTF8)));
2455 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszServerName, ndr_charset_length(r->pszServerName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2456 : }
2457 2 : if (r->pszDsContainer) {
2458 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
2459 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2460 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDsContainer, CH_UTF16)));
2461 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDsContainer, ndr_charset_length(r->pszDsContainer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2462 : }
2463 2 : if (r->aipServerAddrs) {
2464 2 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
2465 : }
2466 2 : if (r->aipListenAddrs) {
2467 2 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
2468 : }
2469 2 : if (r->aipForwarders) {
2470 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
2471 : }
2472 2 : if (r->aipLogFilter) {
2473 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipLogFilter));
2474 : }
2475 2 : if (r->pwszLogFilePath) {
2476 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszLogFilePath, CH_UTF16)));
2477 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2478 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszLogFilePath, CH_UTF16)));
2479 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pwszLogFilePath, ndr_charset_length(r->pwszLogFilePath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2480 : }
2481 2 : if (r->pszDomainName) {
2482 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainName, CH_UTF8)));
2483 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2484 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainName, CH_UTF8)));
2485 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDomainName, ndr_charset_length(r->pszDomainName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2486 : }
2487 2 : if (r->pszForestName) {
2488 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestName, CH_UTF8)));
2489 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2490 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestName, CH_UTF8)));
2491 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszForestName, ndr_charset_length(r->pszForestName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2492 : }
2493 2 : if (r->pszDomainDirectoryPartition) {
2494 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8)));
2495 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2496 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8)));
2497 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDomainDirectoryPartition, ndr_charset_length(r->pszDomainDirectoryPartition, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2498 : }
2499 2 : if (r->pszForestDirectoryPartition) {
2500 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8)));
2501 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2502 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8)));
2503 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszForestDirectoryPartition, ndr_charset_length(r->pszForestDirectoryPartition, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2504 : }
2505 14 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
2506 12 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pExtensions[cntr_pExtensions_0]));
2507 : }
2508 : }
2509 2 : return NDR_ERR_SUCCESS;
2510 : }
2511 :
2512 2 : _PUBLIC_ enum ndr_err_code ndr_pull_DNS_RPC_SERVER_INFO_LONGHORN(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_SERVER_INFO_LONGHORN *r)
2513 : {
2514 : uint32_t _ptr_pszServerName;
2515 2 : uint32_t size_pszServerName_1 = 0;
2516 2 : uint32_t length_pszServerName_1 = 0;
2517 2 : TALLOC_CTX *_mem_save_pszServerName_0 = NULL;
2518 : uint32_t _ptr_pszDsContainer;
2519 2 : uint32_t size_pszDsContainer_1 = 0;
2520 2 : uint32_t length_pszDsContainer_1 = 0;
2521 2 : TALLOC_CTX *_mem_save_pszDsContainer_0 = NULL;
2522 : uint32_t _ptr_aipServerAddrs;
2523 2 : TALLOC_CTX *_mem_save_aipServerAddrs_0 = NULL;
2524 : uint32_t _ptr_aipListenAddrs;
2525 2 : TALLOC_CTX *_mem_save_aipListenAddrs_0 = NULL;
2526 : uint32_t _ptr_aipForwarders;
2527 2 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
2528 : uint32_t _ptr_aipLogFilter;
2529 2 : TALLOC_CTX *_mem_save_aipLogFilter_0 = NULL;
2530 : uint32_t _ptr_pwszLogFilePath;
2531 2 : uint32_t size_pwszLogFilePath_1 = 0;
2532 2 : uint32_t length_pwszLogFilePath_1 = 0;
2533 2 : TALLOC_CTX *_mem_save_pwszLogFilePath_0 = NULL;
2534 : uint32_t _ptr_pszDomainName;
2535 2 : uint32_t size_pszDomainName_1 = 0;
2536 2 : uint32_t length_pszDomainName_1 = 0;
2537 2 : TALLOC_CTX *_mem_save_pszDomainName_0 = NULL;
2538 : uint32_t _ptr_pszForestName;
2539 2 : uint32_t size_pszForestName_1 = 0;
2540 2 : uint32_t length_pszForestName_1 = 0;
2541 2 : TALLOC_CTX *_mem_save_pszForestName_0 = NULL;
2542 : uint32_t _ptr_pszDomainDirectoryPartition;
2543 2 : uint32_t size_pszDomainDirectoryPartition_1 = 0;
2544 2 : uint32_t length_pszDomainDirectoryPartition_1 = 0;
2545 2 : TALLOC_CTX *_mem_save_pszDomainDirectoryPartition_0 = NULL;
2546 : uint32_t _ptr_pszForestDirectoryPartition;
2547 2 : uint32_t size_pszForestDirectoryPartition_1 = 0;
2548 2 : uint32_t length_pszForestDirectoryPartition_1 = 0;
2549 2 : TALLOC_CTX *_mem_save_pszForestDirectoryPartition_0 = NULL;
2550 2 : uint32_t size_pExtensions_0 = 0;
2551 : uint32_t cntr_pExtensions_0;
2552 2 : uint32_t size_dwReserveArray_0 = 0;
2553 : uint32_t cntr_dwReserveArray_0;
2554 2 : uint32_t size_fReserveArray_0 = 0;
2555 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2556 2 : if (ndr_flags & NDR_SCALARS) {
2557 2 : NDR_CHECK(ndr_pull_align(ndr, 5));
2558 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
2559 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
2560 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwVersion));
2561 2 : NDR_CHECK(ndr_pull_DNS_BOOT_METHOD(ndr, NDR_SCALARS, &r->fBootMethod));
2562 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAdminConfigured));
2563 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAllowUpdate));
2564 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDsAvailable));
2565 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServerName));
2566 2 : if (_ptr_pszServerName) {
2567 2 : NDR_PULL_ALLOC(ndr, r->pszServerName);
2568 : } else {
2569 0 : r->pszServerName = NULL;
2570 : }
2571 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDsContainer));
2572 2 : if (_ptr_pszDsContainer) {
2573 2 : NDR_PULL_ALLOC(ndr, r->pszDsContainer);
2574 : } else {
2575 0 : r->pszDsContainer = NULL;
2576 : }
2577 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipServerAddrs));
2578 2 : if (_ptr_aipServerAddrs) {
2579 2 : NDR_PULL_ALLOC(ndr, r->aipServerAddrs);
2580 : } else {
2581 0 : r->aipServerAddrs = NULL;
2582 : }
2583 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipListenAddrs));
2584 2 : if (_ptr_aipListenAddrs) {
2585 2 : NDR_PULL_ALLOC(ndr, r->aipListenAddrs);
2586 : } else {
2587 0 : r->aipListenAddrs = NULL;
2588 : }
2589 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
2590 2 : if (_ptr_aipForwarders) {
2591 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
2592 : } else {
2593 2 : r->aipForwarders = NULL;
2594 : }
2595 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipLogFilter));
2596 2 : if (_ptr_aipLogFilter) {
2597 0 : NDR_PULL_ALLOC(ndr, r->aipLogFilter);
2598 : } else {
2599 2 : r->aipLogFilter = NULL;
2600 : }
2601 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszLogFilePath));
2602 2 : if (_ptr_pwszLogFilePath) {
2603 0 : NDR_PULL_ALLOC(ndr, r->pwszLogFilePath);
2604 : } else {
2605 2 : r->pwszLogFilePath = NULL;
2606 : }
2607 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDomainName));
2608 2 : if (_ptr_pszDomainName) {
2609 2 : NDR_PULL_ALLOC(ndr, r->pszDomainName);
2610 : } else {
2611 0 : r->pszDomainName = NULL;
2612 : }
2613 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszForestName));
2614 2 : if (_ptr_pszForestName) {
2615 2 : NDR_PULL_ALLOC(ndr, r->pszForestName);
2616 : } else {
2617 0 : r->pszForestName = NULL;
2618 : }
2619 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDomainDirectoryPartition));
2620 2 : if (_ptr_pszDomainDirectoryPartition) {
2621 2 : NDR_PULL_ALLOC(ndr, r->pszDomainDirectoryPartition);
2622 : } else {
2623 0 : r->pszDomainDirectoryPartition = NULL;
2624 : }
2625 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszForestDirectoryPartition));
2626 2 : if (_ptr_pszForestDirectoryPartition) {
2627 2 : NDR_PULL_ALLOC(ndr, r->pszForestDirectoryPartition);
2628 : } else {
2629 0 : r->pszForestDirectoryPartition = NULL;
2630 : }
2631 2 : size_pExtensions_0 = 6;
2632 14 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2633 12 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pExtensions[cntr_pExtensions_0]));
2634 : }
2635 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLogLevel));
2636 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDebugLevel));
2637 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
2638 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcProtocol));
2639 2 : NDR_CHECK(ndr_pull_DNS_NAME_CHECK_FLAG(ndr, NDR_SCALARS, &r->dwNameCheckFlag));
2640 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cAddressAnswerLimit));
2641 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionRetry));
2642 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRecursionTimeout));
2643 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwMaxCacheTtl));
2644 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsPollingInterval));
2645 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLocalNetPriorityNetMask));
2646 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwScavengingInterval));
2647 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultRefreshInterval));
2648 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDefaultNoRefreshInterval));
2649 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastScavengeTime));
2650 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwEventLogLevel));
2651 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLogFileMaxSize));
2652 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsForestVersion));
2653 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsDomainVersion));
2654 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDsDsaVersion));
2655 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fReadOnlyDC));
2656 2 : size_dwReserveArray_0 = 3;
2657 8 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (size_dwReserveArray_0); cntr_dwReserveArray_0++) {
2658 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserveArray[cntr_dwReserveArray_0]));
2659 : }
2660 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoReverseZones));
2661 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fAutoCacheUpdate));
2662 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
2663 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fForwardDelegations));
2664 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fNoRecursion));
2665 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fSecureResponses));
2666 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fRoundRobin));
2667 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLocalNetPriority));
2668 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fBindSecondaries));
2669 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fWriteAuthorityNs));
2670 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fStrictFileParsing));
2671 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fLooseWildcarding));
2672 2 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fDefaultAgingState));
2673 2 : size_fReserveArray_0 = 15;
2674 2 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->fReserveArray, size_fReserveArray_0));
2675 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2676 : }
2677 2 : if (ndr_flags & NDR_BUFFERS) {
2678 2 : if (r->pszServerName) {
2679 2 : _mem_save_pszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2680 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszServerName, 0);
2681 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszServerName));
2682 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszServerName));
2683 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszServerName, &size_pszServerName_1));
2684 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszServerName, &length_pszServerName_1));
2685 2 : if (length_pszServerName_1 > size_pszServerName_1) {
2686 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszServerName_1, length_pszServerName_1);
2687 : }
2688 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServerName_1, sizeof(uint8_t)));
2689 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszServerName, length_pszServerName_1, sizeof(uint8_t), CH_UTF8));
2690 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServerName_0, 0);
2691 : }
2692 2 : if (r->pszDsContainer) {
2693 2 : _mem_save_pszDsContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
2694 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDsContainer, 0);
2695 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDsContainer));
2696 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDsContainer));
2697 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDsContainer, &size_pszDsContainer_1));
2698 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDsContainer, &length_pszDsContainer_1));
2699 2 : if (length_pszDsContainer_1 > size_pszDsContainer_1) {
2700 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDsContainer_1, length_pszDsContainer_1);
2701 : }
2702 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDsContainer_1, sizeof(uint16_t)));
2703 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDsContainer, length_pszDsContainer_1, sizeof(uint16_t), CH_UTF16));
2704 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDsContainer_0, 0);
2705 : }
2706 2 : if (r->aipServerAddrs) {
2707 2 : _mem_save_aipServerAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
2708 2 : NDR_PULL_SET_MEM_CTX(ndr, r->aipServerAddrs, 0);
2709 2 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipServerAddrs));
2710 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipServerAddrs_0, 0);
2711 : }
2712 2 : if (r->aipListenAddrs) {
2713 2 : _mem_save_aipListenAddrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
2714 2 : NDR_PULL_SET_MEM_CTX(ndr, r->aipListenAddrs, 0);
2715 2 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipListenAddrs));
2716 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipListenAddrs_0, 0);
2717 : }
2718 2 : if (r->aipForwarders) {
2719 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
2720 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
2721 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
2722 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
2723 : }
2724 2 : if (r->aipLogFilter) {
2725 0 : _mem_save_aipLogFilter_0 = NDR_PULL_GET_MEM_CTX(ndr);
2726 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipLogFilter, 0);
2727 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipLogFilter));
2728 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipLogFilter_0, 0);
2729 : }
2730 2 : if (r->pwszLogFilePath) {
2731 0 : _mem_save_pwszLogFilePath_0 = NDR_PULL_GET_MEM_CTX(ndr);
2732 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pwszLogFilePath, 0);
2733 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pwszLogFilePath));
2734 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pwszLogFilePath));
2735 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pwszLogFilePath, &size_pwszLogFilePath_1));
2736 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pwszLogFilePath, &length_pwszLogFilePath_1));
2737 0 : if (length_pwszLogFilePath_1 > size_pwszLogFilePath_1) {
2738 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszLogFilePath_1, length_pwszLogFilePath_1);
2739 : }
2740 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszLogFilePath_1, sizeof(uint16_t)));
2741 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pwszLogFilePath, length_pwszLogFilePath_1, sizeof(uint16_t), CH_UTF16));
2742 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszLogFilePath_0, 0);
2743 : }
2744 2 : if (r->pszDomainName) {
2745 2 : _mem_save_pszDomainName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2746 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDomainName, 0);
2747 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDomainName));
2748 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDomainName));
2749 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDomainName, &size_pszDomainName_1));
2750 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDomainName, &length_pszDomainName_1));
2751 2 : if (length_pszDomainName_1 > size_pszDomainName_1) {
2752 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDomainName_1, length_pszDomainName_1);
2753 : }
2754 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDomainName_1, sizeof(uint8_t)));
2755 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDomainName, length_pszDomainName_1, sizeof(uint8_t), CH_UTF8));
2756 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDomainName_0, 0);
2757 : }
2758 2 : if (r->pszForestName) {
2759 2 : _mem_save_pszForestName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2760 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszForestName, 0);
2761 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszForestName));
2762 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszForestName));
2763 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszForestName, &size_pszForestName_1));
2764 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszForestName, &length_pszForestName_1));
2765 2 : if (length_pszForestName_1 > size_pszForestName_1) {
2766 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszForestName_1, length_pszForestName_1);
2767 : }
2768 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszForestName_1, sizeof(uint8_t)));
2769 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszForestName, length_pszForestName_1, sizeof(uint8_t), CH_UTF8));
2770 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszForestName_0, 0);
2771 : }
2772 2 : if (r->pszDomainDirectoryPartition) {
2773 2 : _mem_save_pszDomainDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
2774 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDomainDirectoryPartition, 0);
2775 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDomainDirectoryPartition));
2776 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDomainDirectoryPartition));
2777 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDomainDirectoryPartition, &size_pszDomainDirectoryPartition_1));
2778 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDomainDirectoryPartition, &length_pszDomainDirectoryPartition_1));
2779 2 : if (length_pszDomainDirectoryPartition_1 > size_pszDomainDirectoryPartition_1) {
2780 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDomainDirectoryPartition_1, length_pszDomainDirectoryPartition_1);
2781 : }
2782 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDomainDirectoryPartition_1, sizeof(uint8_t)));
2783 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDomainDirectoryPartition, length_pszDomainDirectoryPartition_1, sizeof(uint8_t), CH_UTF8));
2784 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDomainDirectoryPartition_0, 0);
2785 : }
2786 2 : if (r->pszForestDirectoryPartition) {
2787 2 : _mem_save_pszForestDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
2788 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pszForestDirectoryPartition, 0);
2789 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszForestDirectoryPartition));
2790 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszForestDirectoryPartition));
2791 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszForestDirectoryPartition, &size_pszForestDirectoryPartition_1));
2792 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszForestDirectoryPartition, &length_pszForestDirectoryPartition_1));
2793 2 : if (length_pszForestDirectoryPartition_1 > size_pszForestDirectoryPartition_1) {
2794 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszForestDirectoryPartition_1, length_pszForestDirectoryPartition_1);
2795 : }
2796 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszForestDirectoryPartition_1, sizeof(uint8_t)));
2797 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszForestDirectoryPartition, length_pszForestDirectoryPartition_1, sizeof(uint8_t), CH_UTF8));
2798 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszForestDirectoryPartition_0, 0);
2799 : }
2800 2 : size_pExtensions_0 = 6;
2801 14 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2802 12 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pExtensions[cntr_pExtensions_0]));
2803 : }
2804 2 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (size_pExtensions_0); cntr_pExtensions_0++) {
2805 : }
2806 : }
2807 2 : return NDR_ERR_SUCCESS;
2808 : }
2809 :
2810 0 : static void ndr_print_flags_DNS_RPC_SERVER_INFO_LONGHORN(struct ndr_print *ndr, const char *name, int unused, const struct DNS_RPC_SERVER_INFO_LONGHORN *r)
2811 : {
2812 0 : ndr_print_DNS_RPC_SERVER_INFO_LONGHORN(ndr, name, r);
2813 0 : }
2814 :
2815 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)
2816 : {
2817 : uint32_t cntr_pExtensions_0;
2818 : uint32_t cntr_dwReserveArray_0;
2819 0 : ndr_print_struct(ndr, name, "DNS_RPC_SERVER_INFO_LONGHORN");
2820 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2821 0 : ndr->depth++;
2822 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
2823 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
2824 0 : ndr_print_uint32(ndr, "dwVersion", r->dwVersion);
2825 0 : ndr_print_DNS_BOOT_METHOD(ndr, "fBootMethod", r->fBootMethod);
2826 0 : ndr_print_uint8(ndr, "fAdminConfigured", r->fAdminConfigured);
2827 0 : ndr_print_uint8(ndr, "fAllowUpdate", r->fAllowUpdate);
2828 0 : ndr_print_uint8(ndr, "fDsAvailable", r->fDsAvailable);
2829 0 : ndr_print_ptr(ndr, "pszServerName", r->pszServerName);
2830 0 : ndr->depth++;
2831 0 : if (r->pszServerName) {
2832 0 : ndr_print_string(ndr, "pszServerName", r->pszServerName);
2833 : }
2834 0 : ndr->depth--;
2835 0 : ndr_print_ptr(ndr, "pszDsContainer", r->pszDsContainer);
2836 0 : ndr->depth++;
2837 0 : if (r->pszDsContainer) {
2838 0 : ndr_print_string(ndr, "pszDsContainer", r->pszDsContainer);
2839 : }
2840 0 : ndr->depth--;
2841 0 : ndr_print_ptr(ndr, "aipServerAddrs", r->aipServerAddrs);
2842 0 : ndr->depth++;
2843 0 : if (r->aipServerAddrs) {
2844 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipServerAddrs", r->aipServerAddrs);
2845 : }
2846 0 : ndr->depth--;
2847 0 : ndr_print_ptr(ndr, "aipListenAddrs", r->aipListenAddrs);
2848 0 : ndr->depth++;
2849 0 : if (r->aipListenAddrs) {
2850 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipListenAddrs", r->aipListenAddrs);
2851 : }
2852 0 : ndr->depth--;
2853 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
2854 0 : ndr->depth++;
2855 0 : if (r->aipForwarders) {
2856 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipForwarders", r->aipForwarders);
2857 : }
2858 0 : ndr->depth--;
2859 0 : ndr_print_ptr(ndr, "aipLogFilter", r->aipLogFilter);
2860 0 : ndr->depth++;
2861 0 : if (r->aipLogFilter) {
2862 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipLogFilter", r->aipLogFilter);
2863 : }
2864 0 : ndr->depth--;
2865 0 : ndr_print_ptr(ndr, "pwszLogFilePath", r->pwszLogFilePath);
2866 0 : ndr->depth++;
2867 0 : if (r->pwszLogFilePath) {
2868 0 : ndr_print_string(ndr, "pwszLogFilePath", r->pwszLogFilePath);
2869 : }
2870 0 : ndr->depth--;
2871 0 : ndr_print_ptr(ndr, "pszDomainName", r->pszDomainName);
2872 0 : ndr->depth++;
2873 0 : if (r->pszDomainName) {
2874 0 : ndr_print_string(ndr, "pszDomainName", r->pszDomainName);
2875 : }
2876 0 : ndr->depth--;
2877 0 : ndr_print_ptr(ndr, "pszForestName", r->pszForestName);
2878 0 : ndr->depth++;
2879 0 : if (r->pszForestName) {
2880 0 : ndr_print_string(ndr, "pszForestName", r->pszForestName);
2881 : }
2882 0 : ndr->depth--;
2883 0 : ndr_print_ptr(ndr, "pszDomainDirectoryPartition", r->pszDomainDirectoryPartition);
2884 0 : ndr->depth++;
2885 0 : if (r->pszDomainDirectoryPartition) {
2886 0 : ndr_print_string(ndr, "pszDomainDirectoryPartition", r->pszDomainDirectoryPartition);
2887 : }
2888 0 : ndr->depth--;
2889 0 : ndr_print_ptr(ndr, "pszForestDirectoryPartition", r->pszForestDirectoryPartition);
2890 0 : ndr->depth++;
2891 0 : if (r->pszForestDirectoryPartition) {
2892 0 : ndr_print_string(ndr, "pszForestDirectoryPartition", r->pszForestDirectoryPartition);
2893 : }
2894 0 : ndr->depth--;
2895 0 : ndr->print(ndr, "%s: ARRAY(%d)", "pExtensions", (int)6);
2896 0 : ndr->depth++;
2897 0 : for (cntr_pExtensions_0 = 0; cntr_pExtensions_0 < (6); cntr_pExtensions_0++) {
2898 0 : ndr_print_DNS_EXTENSION(ndr, "pExtensions", &r->pExtensions[cntr_pExtensions_0]);
2899 : }
2900 0 : ndr->depth--;
2901 0 : ndr_print_uint32(ndr, "dwLogLevel", r->dwLogLevel);
2902 0 : ndr_print_uint32(ndr, "dwDebugLevel", r->dwDebugLevel);
2903 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
2904 0 : ndr_print_uint32(ndr, "dwRpcProtocol", r->dwRpcProtocol);
2905 0 : ndr_print_DNS_NAME_CHECK_FLAG(ndr, "dwNameCheckFlag", r->dwNameCheckFlag);
2906 0 : ndr_print_uint32(ndr, "cAddressAnswerLimit", r->cAddressAnswerLimit);
2907 0 : ndr_print_uint32(ndr, "dwRecursionRetry", r->dwRecursionRetry);
2908 0 : ndr_print_uint32(ndr, "dwRecursionTimeout", r->dwRecursionTimeout);
2909 0 : ndr_print_uint32(ndr, "dwMaxCacheTtl", r->dwMaxCacheTtl);
2910 0 : ndr_print_uint32(ndr, "dwDsPollingInterval", r->dwDsPollingInterval);
2911 0 : ndr_print_uint32(ndr, "dwLocalNetPriorityNetMask", r->dwLocalNetPriorityNetMask);
2912 0 : ndr_print_uint32(ndr, "dwScavengingInterval", r->dwScavengingInterval);
2913 0 : ndr_print_uint32(ndr, "dwDefaultRefreshInterval", r->dwDefaultRefreshInterval);
2914 0 : ndr_print_uint32(ndr, "dwDefaultNoRefreshInterval", r->dwDefaultNoRefreshInterval);
2915 0 : ndr_print_uint32(ndr, "dwLastScavengeTime", r->dwLastScavengeTime);
2916 0 : ndr_print_uint32(ndr, "dwEventLogLevel", r->dwEventLogLevel);
2917 0 : ndr_print_uint32(ndr, "dwLogFileMaxSize", r->dwLogFileMaxSize);
2918 0 : ndr_print_uint32(ndr, "dwDsForestVersion", r->dwDsForestVersion);
2919 0 : ndr_print_uint32(ndr, "dwDsDomainVersion", r->dwDsDomainVersion);
2920 0 : ndr_print_uint32(ndr, "dwDsDsaVersion", r->dwDsDsaVersion);
2921 0 : ndr_print_uint8(ndr, "fReadOnlyDC", r->fReadOnlyDC);
2922 0 : ndr->print(ndr, "%s: ARRAY(%d)", "dwReserveArray", (int)3);
2923 0 : ndr->depth++;
2924 0 : for (cntr_dwReserveArray_0 = 0; cntr_dwReserveArray_0 < (3); cntr_dwReserveArray_0++) {
2925 0 : ndr_print_uint32(ndr, "dwReserveArray", r->dwReserveArray[cntr_dwReserveArray_0]);
2926 : }
2927 0 : ndr->depth--;
2928 0 : ndr_print_uint8(ndr, "fAutoReverseZones", r->fAutoReverseZones);
2929 0 : ndr_print_uint8(ndr, "fAutoCacheUpdate", r->fAutoCacheUpdate);
2930 0 : ndr_print_uint8(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
2931 0 : ndr_print_uint8(ndr, "fForwardDelegations", r->fForwardDelegations);
2932 0 : ndr_print_uint8(ndr, "fNoRecursion", r->fNoRecursion);
2933 0 : ndr_print_uint8(ndr, "fSecureResponses", r->fSecureResponses);
2934 0 : ndr_print_uint8(ndr, "fRoundRobin", r->fRoundRobin);
2935 0 : ndr_print_uint8(ndr, "fLocalNetPriority", r->fLocalNetPriority);
2936 0 : ndr_print_uint8(ndr, "fBindSecondaries", r->fBindSecondaries);
2937 0 : ndr_print_uint8(ndr, "fWriteAuthorityNs", r->fWriteAuthorityNs);
2938 0 : ndr_print_uint8(ndr, "fStrictFileParsing", r->fStrictFileParsing);
2939 0 : ndr_print_uint8(ndr, "fLooseWildcarding", r->fLooseWildcarding);
2940 0 : ndr_print_uint8(ndr, "fDefaultAgingState", r->fDefaultAgingState);
2941 0 : ndr_print_array_uint8(ndr, "fReserveArray", r->fReserveArray, 15);
2942 0 : ndr->depth--;
2943 : }
2944 :
2945 25 : static enum ndr_err_code ndr_push_DNS_RPC_DP_FLAGS(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2946 : {
2947 25 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2948 25 : return NDR_ERR_SUCCESS;
2949 : }
2950 :
2951 25 : static enum ndr_err_code ndr_pull_DNS_RPC_DP_FLAGS(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2952 : {
2953 : uint32_t v;
2954 25 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2955 25 : *r = v;
2956 25 : return NDR_ERR_SUCCESS;
2957 : }
2958 :
2959 0 : _PUBLIC_ void ndr_print_DNS_RPC_DP_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r)
2960 : {
2961 0 : ndr_print_uint32(ndr, name, r);
2962 0 : ndr->depth++;
2963 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_AUTOCREATED", DNS_DP_AUTOCREATED, r);
2964 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_LEGACY", DNS_DP_LEGACY, r);
2965 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_DOMAIN_DEFAULT", DNS_DP_DOMAIN_DEFAULT, r);
2966 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_FOREST_DEFAULT", DNS_DP_FOREST_DEFAULT, r);
2967 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_ENLISTED", DNS_DP_ENLISTED, r);
2968 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_DP_DELETED", DNS_DP_DELETED, r);
2969 0 : ndr->depth--;
2970 0 : }
2971 :
2972 0 : static enum ndr_err_code ndr_push_DNS_RPC_DP_REPLICA(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_DP_REPLICA *r)
2973 : {
2974 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2975 0 : if (ndr_flags & NDR_SCALARS) {
2976 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2977 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszReplicaDn));
2978 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2979 : }
2980 0 : if (ndr_flags & NDR_BUFFERS) {
2981 0 : if (r->pszReplicaDn) {
2982 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszReplicaDn, CH_UTF16)));
2983 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2984 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszReplicaDn, CH_UTF16)));
2985 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszReplicaDn, ndr_charset_length(r->pszReplicaDn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2986 : }
2987 : }
2988 0 : return NDR_ERR_SUCCESS;
2989 : }
2990 :
2991 0 : static enum ndr_err_code ndr_pull_DNS_RPC_DP_REPLICA(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_DP_REPLICA *r)
2992 : {
2993 : uint32_t _ptr_pszReplicaDn;
2994 0 : uint32_t size_pszReplicaDn_1 = 0;
2995 0 : uint32_t length_pszReplicaDn_1 = 0;
2996 0 : TALLOC_CTX *_mem_save_pszReplicaDn_0 = NULL;
2997 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2998 0 : if (ndr_flags & NDR_SCALARS) {
2999 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3000 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszReplicaDn));
3001 0 : if (_ptr_pszReplicaDn) {
3002 0 : NDR_PULL_ALLOC(ndr, r->pszReplicaDn);
3003 : } else {
3004 0 : r->pszReplicaDn = NULL;
3005 : }
3006 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3007 : }
3008 0 : if (ndr_flags & NDR_BUFFERS) {
3009 0 : if (r->pszReplicaDn) {
3010 0 : _mem_save_pszReplicaDn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3011 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszReplicaDn, 0);
3012 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszReplicaDn));
3013 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszReplicaDn));
3014 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszReplicaDn, &size_pszReplicaDn_1));
3015 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszReplicaDn, &length_pszReplicaDn_1));
3016 0 : if (length_pszReplicaDn_1 > size_pszReplicaDn_1) {
3017 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszReplicaDn_1, length_pszReplicaDn_1);
3018 : }
3019 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszReplicaDn_1, sizeof(uint16_t)));
3020 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszReplicaDn, length_pszReplicaDn_1, sizeof(uint16_t), CH_UTF16));
3021 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszReplicaDn_0, 0);
3022 : }
3023 : }
3024 0 : return NDR_ERR_SUCCESS;
3025 : }
3026 :
3027 0 : _PUBLIC_ void ndr_print_DNS_RPC_DP_REPLICA(struct ndr_print *ndr, const char *name, const struct DNS_RPC_DP_REPLICA *r)
3028 : {
3029 0 : ndr_print_struct(ndr, name, "DNS_RPC_DP_REPLICA");
3030 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3031 0 : ndr->depth++;
3032 0 : ndr_print_ptr(ndr, "pszReplicaDn", r->pszReplicaDn);
3033 0 : ndr->depth++;
3034 0 : if (r->pszReplicaDn) {
3035 0 : ndr_print_string(ndr, "pszReplicaDn", r->pszReplicaDn);
3036 : }
3037 0 : ndr->depth--;
3038 0 : ndr->depth--;
3039 : }
3040 :
3041 0 : static enum ndr_err_code ndr_push_DNS_DP_STATE(struct ndr_push *ndr, int ndr_flags, enum DNS_DP_STATE r)
3042 : {
3043 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
3044 0 : return NDR_ERR_SUCCESS;
3045 : }
3046 :
3047 0 : static enum ndr_err_code ndr_pull_DNS_DP_STATE(struct ndr_pull *ndr, int ndr_flags, enum DNS_DP_STATE *r)
3048 : {
3049 : uint32_t v;
3050 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
3051 0 : *r = v;
3052 0 : return NDR_ERR_SUCCESS;
3053 : }
3054 :
3055 0 : _PUBLIC_ void ndr_print_DNS_DP_STATE(struct ndr_print *ndr, const char *name, enum DNS_DP_STATE r)
3056 : {
3057 0 : const char *val = NULL;
3058 :
3059 0 : switch (r) {
3060 0 : case DNS_DP_OKAY: val = "DNS_DP_OKAY"; break;
3061 0 : case DNS_DP_STATE_REPL_INCOMING: val = "DNS_DP_STATE_REPL_INCOMING"; break;
3062 0 : case DNS_DP_STATE_REPL_OUTGOING: val = "DNS_DP_STATE_REPL_OUTGOING"; break;
3063 0 : case DNS_DP_STATE_UNKNOWN: val = "DNS_DP_STATE_UNKNOWN"; break;
3064 : }
3065 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
3066 0 : }
3067 :
3068 0 : static enum ndr_err_code ndr_push_DNS_RPC_DP_INFO(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_DP_INFO *r)
3069 : {
3070 : uint32_t cntr_dwReserved_0;
3071 : uint32_t cntr_pwszReserved_0;
3072 : uint32_t cntr_ReplicaArray_0;
3073 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3074 0 : if (ndr_flags & NDR_SCALARS) {
3075 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->dwReplicaCount));
3076 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3077 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3078 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3079 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
3080 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpDn));
3081 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszCrDn));
3082 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
3083 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneCount));
3084 0 : NDR_CHECK(ndr_push_DNS_DP_STATE(ndr, NDR_SCALARS, r->dwState));
3085 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (3); cntr_dwReserved_0++) {
3086 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved[cntr_dwReserved_0]));
3087 : }
3088 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (3); cntr_pwszReserved_0++) {
3089 0 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pwszReserved[cntr_pwszReserved_0]));
3090 : }
3091 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReplicaCount));
3092 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (r->dwReplicaCount); cntr_ReplicaArray_0++) {
3093 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ReplicaArray[cntr_ReplicaArray_0]));
3094 : }
3095 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3096 : }
3097 0 : if (ndr_flags & NDR_BUFFERS) {
3098 0 : if (r->pszDpFqdn) {
3099 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3100 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3101 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3102 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
3103 : }
3104 0 : if (r->pszDpDn) {
3105 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpDn, CH_UTF16)));
3106 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3107 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpDn, CH_UTF16)));
3108 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpDn, ndr_charset_length(r->pszDpDn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3109 : }
3110 0 : if (r->pszCrDn) {
3111 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszCrDn, CH_UTF16)));
3112 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3113 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszCrDn, CH_UTF16)));
3114 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszCrDn, ndr_charset_length(r->pszCrDn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3115 : }
3116 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (3); cntr_pwszReserved_0++) {
3117 0 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pwszReserved[cntr_pwszReserved_0]));
3118 : }
3119 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (r->dwReplicaCount); cntr_ReplicaArray_0++) {
3120 0 : if (r->ReplicaArray[cntr_ReplicaArray_0]) {
3121 0 : NDR_CHECK(ndr_push_DNS_RPC_DP_REPLICA(ndr, NDR_SCALARS|NDR_BUFFERS, r->ReplicaArray[cntr_ReplicaArray_0]));
3122 : }
3123 : }
3124 : }
3125 0 : return NDR_ERR_SUCCESS;
3126 : }
3127 :
3128 0 : static enum ndr_err_code ndr_pull_DNS_RPC_DP_INFO(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_DP_INFO *r)
3129 : {
3130 : uint32_t _ptr_pszDpFqdn;
3131 0 : uint32_t size_pszDpFqdn_1 = 0;
3132 0 : uint32_t length_pszDpFqdn_1 = 0;
3133 0 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
3134 : uint32_t _ptr_pszDpDn;
3135 0 : uint32_t size_pszDpDn_1 = 0;
3136 0 : uint32_t length_pszDpDn_1 = 0;
3137 0 : TALLOC_CTX *_mem_save_pszDpDn_0 = NULL;
3138 : uint32_t _ptr_pszCrDn;
3139 0 : uint32_t size_pszCrDn_1 = 0;
3140 0 : uint32_t length_pszCrDn_1 = 0;
3141 0 : TALLOC_CTX *_mem_save_pszCrDn_0 = NULL;
3142 0 : uint32_t size_dwReserved_0 = 0;
3143 : uint32_t cntr_dwReserved_0;
3144 0 : uint32_t size_pwszReserved_0 = 0;
3145 : uint32_t cntr_pwszReserved_0;
3146 : uint32_t _ptr_ReplicaArray;
3147 0 : uint32_t size_ReplicaArray_0 = 0;
3148 : uint32_t cntr_ReplicaArray_0;
3149 0 : TALLOC_CTX *_mem_save_ReplicaArray_0 = NULL;
3150 0 : TALLOC_CTX *_mem_save_ReplicaArray_1 = NULL;
3151 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3152 0 : if (ndr_flags & NDR_SCALARS) {
3153 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->ReplicaArray));
3154 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3155 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3156 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3157 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
3158 0 : if (_ptr_pszDpFqdn) {
3159 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
3160 : } else {
3161 0 : r->pszDpFqdn = NULL;
3162 : }
3163 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpDn));
3164 0 : if (_ptr_pszDpDn) {
3165 0 : NDR_PULL_ALLOC(ndr, r->pszDpDn);
3166 : } else {
3167 0 : r->pszDpDn = NULL;
3168 : }
3169 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszCrDn));
3170 0 : if (_ptr_pszCrDn) {
3171 0 : NDR_PULL_ALLOC(ndr, r->pszCrDn);
3172 : } else {
3173 0 : r->pszCrDn = NULL;
3174 : }
3175 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
3176 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneCount));
3177 0 : NDR_CHECK(ndr_pull_DNS_DP_STATE(ndr, NDR_SCALARS, &r->dwState));
3178 0 : size_dwReserved_0 = 3;
3179 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (size_dwReserved_0); cntr_dwReserved_0++) {
3180 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved[cntr_dwReserved_0]));
3181 : }
3182 0 : size_pwszReserved_0 = 3;
3183 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (size_pwszReserved_0); cntr_pwszReserved_0++) {
3184 0 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pwszReserved[cntr_pwszReserved_0]));
3185 : }
3186 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReplicaCount));
3187 0 : if (r->dwReplicaCount > 10000) {
3188 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3189 : }
3190 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ReplicaArray, &size_ReplicaArray_0));
3191 0 : NDR_PULL_ALLOC_N(ndr, r->ReplicaArray, size_ReplicaArray_0);
3192 0 : _mem_save_ReplicaArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
3193 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ReplicaArray, 0);
3194 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (size_ReplicaArray_0); cntr_ReplicaArray_0++) {
3195 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ReplicaArray));
3196 0 : if (_ptr_ReplicaArray) {
3197 0 : NDR_PULL_ALLOC(ndr, r->ReplicaArray[cntr_ReplicaArray_0]);
3198 : } else {
3199 0 : r->ReplicaArray[cntr_ReplicaArray_0] = NULL;
3200 : }
3201 : }
3202 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ReplicaArray_0, 0);
3203 0 : if (r->ReplicaArray) {
3204 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ReplicaArray, r->dwReplicaCount));
3205 : }
3206 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3207 : }
3208 0 : if (ndr_flags & NDR_BUFFERS) {
3209 0 : if (r->pszDpFqdn) {
3210 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3211 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
3212 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
3213 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
3214 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
3215 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
3216 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
3217 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDpFqdn_1, length_pszDpFqdn_1);
3218 : }
3219 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
3220 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
3221 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
3222 : }
3223 0 : if (r->pszDpDn) {
3224 0 : _mem_save_pszDpDn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3225 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpDn, 0);
3226 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpDn));
3227 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpDn));
3228 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpDn, &size_pszDpDn_1));
3229 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpDn, &length_pszDpDn_1));
3230 0 : if (length_pszDpDn_1 > size_pszDpDn_1) {
3231 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDpDn_1, length_pszDpDn_1);
3232 : }
3233 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpDn_1, sizeof(uint16_t)));
3234 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpDn, length_pszDpDn_1, sizeof(uint16_t), CH_UTF16));
3235 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpDn_0, 0);
3236 : }
3237 0 : if (r->pszCrDn) {
3238 0 : _mem_save_pszCrDn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3239 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszCrDn, 0);
3240 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszCrDn));
3241 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszCrDn));
3242 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszCrDn, &size_pszCrDn_1));
3243 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszCrDn, &length_pszCrDn_1));
3244 0 : if (length_pszCrDn_1 > size_pszCrDn_1) {
3245 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszCrDn_1, length_pszCrDn_1);
3246 : }
3247 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszCrDn_1, sizeof(uint16_t)));
3248 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszCrDn, length_pszCrDn_1, sizeof(uint16_t), CH_UTF16));
3249 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszCrDn_0, 0);
3250 : }
3251 0 : size_pwszReserved_0 = 3;
3252 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (size_pwszReserved_0); cntr_pwszReserved_0++) {
3253 0 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pwszReserved[cntr_pwszReserved_0]));
3254 : }
3255 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ReplicaArray, &size_ReplicaArray_0));
3256 0 : _mem_save_ReplicaArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
3257 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ReplicaArray, 0);
3258 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (size_ReplicaArray_0); cntr_ReplicaArray_0++) {
3259 0 : if (r->ReplicaArray[cntr_ReplicaArray_0]) {
3260 0 : _mem_save_ReplicaArray_1 = NDR_PULL_GET_MEM_CTX(ndr);
3261 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ReplicaArray[cntr_ReplicaArray_0], 0);
3262 0 : NDR_CHECK(ndr_pull_DNS_RPC_DP_REPLICA(ndr, NDR_SCALARS|NDR_BUFFERS, r->ReplicaArray[cntr_ReplicaArray_0]));
3263 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ReplicaArray_1, 0);
3264 : }
3265 : }
3266 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ReplicaArray_0, 0);
3267 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (size_pwszReserved_0); cntr_pwszReserved_0++) {
3268 : }
3269 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (size_ReplicaArray_0); cntr_ReplicaArray_0++) {
3270 : }
3271 : }
3272 0 : return NDR_ERR_SUCCESS;
3273 : }
3274 :
3275 0 : _PUBLIC_ void ndr_print_DNS_RPC_DP_INFO(struct ndr_print *ndr, const char *name, const struct DNS_RPC_DP_INFO *r)
3276 : {
3277 : uint32_t cntr_dwReserved_0;
3278 : uint32_t cntr_pwszReserved_0;
3279 : uint32_t cntr_ReplicaArray_0;
3280 0 : ndr_print_struct(ndr, name, "DNS_RPC_DP_INFO");
3281 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3282 0 : ndr->depth++;
3283 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3284 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3285 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
3286 0 : ndr->depth++;
3287 0 : if (r->pszDpFqdn) {
3288 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
3289 : }
3290 0 : ndr->depth--;
3291 0 : ndr_print_ptr(ndr, "pszDpDn", r->pszDpDn);
3292 0 : ndr->depth++;
3293 0 : if (r->pszDpDn) {
3294 0 : ndr_print_string(ndr, "pszDpDn", r->pszDpDn);
3295 : }
3296 0 : ndr->depth--;
3297 0 : ndr_print_ptr(ndr, "pszCrDn", r->pszCrDn);
3298 0 : ndr->depth++;
3299 0 : if (r->pszCrDn) {
3300 0 : ndr_print_string(ndr, "pszCrDn", r->pszCrDn);
3301 : }
3302 0 : ndr->depth--;
3303 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
3304 0 : ndr_print_uint32(ndr, "dwZoneCount", r->dwZoneCount);
3305 0 : ndr_print_DNS_DP_STATE(ndr, "dwState", r->dwState);
3306 0 : ndr->print(ndr, "%s: ARRAY(%d)", "dwReserved", (int)3);
3307 0 : ndr->depth++;
3308 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (3); cntr_dwReserved_0++) {
3309 0 : ndr_print_uint32(ndr, "dwReserved", r->dwReserved[cntr_dwReserved_0]);
3310 : }
3311 0 : ndr->depth--;
3312 0 : ndr->print(ndr, "%s: ARRAY(%d)", "pwszReserved", (int)3);
3313 0 : ndr->depth++;
3314 0 : for (cntr_pwszReserved_0 = 0; cntr_pwszReserved_0 < (3); cntr_pwszReserved_0++) {
3315 0 : ndr_print_DNS_EXTENSION(ndr, "pwszReserved", &r->pwszReserved[cntr_pwszReserved_0]);
3316 : }
3317 0 : ndr->depth--;
3318 0 : ndr_print_uint32(ndr, "dwReplicaCount", r->dwReplicaCount);
3319 0 : ndr->print(ndr, "%s: ARRAY(%d)", "ReplicaArray", (int)r->dwReplicaCount);
3320 0 : ndr->depth++;
3321 0 : for (cntr_ReplicaArray_0 = 0; cntr_ReplicaArray_0 < (r->dwReplicaCount); cntr_ReplicaArray_0++) {
3322 0 : ndr_print_ptr(ndr, "ReplicaArray", r->ReplicaArray[cntr_ReplicaArray_0]);
3323 0 : ndr->depth++;
3324 0 : if (r->ReplicaArray[cntr_ReplicaArray_0]) {
3325 0 : ndr_print_DNS_RPC_DP_REPLICA(ndr, "ReplicaArray", r->ReplicaArray[cntr_ReplicaArray_0]);
3326 : }
3327 0 : ndr->depth--;
3328 : }
3329 0 : ndr->depth--;
3330 0 : ndr->depth--;
3331 : }
3332 :
3333 0 : static enum ndr_err_code ndr_push_DNS_RPC_DP_ENUM(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_DP_ENUM *r)
3334 : {
3335 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3336 0 : if (ndr_flags & NDR_SCALARS) {
3337 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3338 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3339 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3340 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
3341 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
3342 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneCount));
3343 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3344 : }
3345 0 : if (ndr_flags & NDR_BUFFERS) {
3346 0 : if (r->pszDpFqdn) {
3347 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3348 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3349 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3350 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
3351 : }
3352 : }
3353 0 : return NDR_ERR_SUCCESS;
3354 : }
3355 :
3356 0 : static enum ndr_err_code ndr_pull_DNS_RPC_DP_ENUM(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_DP_ENUM *r)
3357 : {
3358 : uint32_t _ptr_pszDpFqdn;
3359 0 : uint32_t size_pszDpFqdn_1 = 0;
3360 0 : uint32_t length_pszDpFqdn_1 = 0;
3361 0 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
3362 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3363 0 : if (ndr_flags & NDR_SCALARS) {
3364 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3365 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3366 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3367 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
3368 0 : if (_ptr_pszDpFqdn) {
3369 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
3370 : } else {
3371 0 : r->pszDpFqdn = NULL;
3372 : }
3373 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
3374 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneCount));
3375 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3376 : }
3377 0 : if (ndr_flags & NDR_BUFFERS) {
3378 0 : if (r->pszDpFqdn) {
3379 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3380 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
3381 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
3382 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
3383 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
3384 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
3385 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
3386 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDpFqdn_1, length_pszDpFqdn_1);
3387 : }
3388 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
3389 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
3390 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
3391 : }
3392 : }
3393 0 : return NDR_ERR_SUCCESS;
3394 : }
3395 :
3396 0 : _PUBLIC_ void ndr_print_DNS_RPC_DP_ENUM(struct ndr_print *ndr, const char *name, const struct DNS_RPC_DP_ENUM *r)
3397 : {
3398 0 : ndr_print_struct(ndr, name, "DNS_RPC_DP_ENUM");
3399 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3400 0 : ndr->depth++;
3401 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3402 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3403 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
3404 0 : ndr->depth++;
3405 0 : if (r->pszDpFqdn) {
3406 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
3407 : }
3408 0 : ndr->depth--;
3409 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
3410 0 : ndr_print_uint32(ndr, "dwZoneCount", r->dwZoneCount);
3411 0 : ndr->depth--;
3412 : }
3413 :
3414 0 : static enum ndr_err_code ndr_push_DNS_RPC_DP_LIST(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_DP_LIST *r)
3415 : {
3416 : uint32_t cntr_DpArray_0;
3417 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3418 0 : if (ndr_flags & NDR_SCALARS) {
3419 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->dwDpCount));
3420 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3421 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3422 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3423 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDpCount));
3424 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (r->dwDpCount); cntr_DpArray_0++) {
3425 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->DpArray[cntr_DpArray_0]));
3426 : }
3427 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3428 : }
3429 0 : if (ndr_flags & NDR_BUFFERS) {
3430 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (r->dwDpCount); cntr_DpArray_0++) {
3431 0 : if (r->DpArray[cntr_DpArray_0]) {
3432 0 : NDR_CHECK(ndr_push_DNS_RPC_DP_ENUM(ndr, NDR_SCALARS|NDR_BUFFERS, r->DpArray[cntr_DpArray_0]));
3433 : }
3434 : }
3435 : }
3436 0 : return NDR_ERR_SUCCESS;
3437 : }
3438 :
3439 0 : static enum ndr_err_code ndr_pull_DNS_RPC_DP_LIST(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_DP_LIST *r)
3440 : {
3441 : uint32_t _ptr_DpArray;
3442 0 : uint32_t size_DpArray_0 = 0;
3443 : uint32_t cntr_DpArray_0;
3444 0 : TALLOC_CTX *_mem_save_DpArray_0 = NULL;
3445 0 : TALLOC_CTX *_mem_save_DpArray_1 = NULL;
3446 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3447 0 : if (ndr_flags & NDR_SCALARS) {
3448 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->DpArray));
3449 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3450 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3451 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3452 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDpCount));
3453 0 : if (r->dwDpCount > 5000) {
3454 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3455 : }
3456 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->DpArray, &size_DpArray_0));
3457 0 : NDR_PULL_ALLOC_N(ndr, r->DpArray, size_DpArray_0);
3458 0 : _mem_save_DpArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
3459 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DpArray, 0);
3460 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (size_DpArray_0); cntr_DpArray_0++) {
3461 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DpArray));
3462 0 : if (_ptr_DpArray) {
3463 0 : NDR_PULL_ALLOC(ndr, r->DpArray[cntr_DpArray_0]);
3464 : } else {
3465 0 : r->DpArray[cntr_DpArray_0] = NULL;
3466 : }
3467 : }
3468 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DpArray_0, 0);
3469 0 : if (r->DpArray) {
3470 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->DpArray, r->dwDpCount));
3471 : }
3472 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3473 : }
3474 0 : if (ndr_flags & NDR_BUFFERS) {
3475 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->DpArray, &size_DpArray_0));
3476 0 : _mem_save_DpArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
3477 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DpArray, 0);
3478 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (size_DpArray_0); cntr_DpArray_0++) {
3479 0 : if (r->DpArray[cntr_DpArray_0]) {
3480 0 : _mem_save_DpArray_1 = NDR_PULL_GET_MEM_CTX(ndr);
3481 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DpArray[cntr_DpArray_0], 0);
3482 0 : NDR_CHECK(ndr_pull_DNS_RPC_DP_ENUM(ndr, NDR_SCALARS|NDR_BUFFERS, r->DpArray[cntr_DpArray_0]));
3483 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DpArray_1, 0);
3484 : }
3485 : }
3486 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DpArray_0, 0);
3487 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (size_DpArray_0); cntr_DpArray_0++) {
3488 : }
3489 : }
3490 0 : return NDR_ERR_SUCCESS;
3491 : }
3492 :
3493 0 : _PUBLIC_ void ndr_print_DNS_RPC_DP_LIST(struct ndr_print *ndr, const char *name, const struct DNS_RPC_DP_LIST *r)
3494 : {
3495 : uint32_t cntr_DpArray_0;
3496 0 : ndr_print_struct(ndr, name, "DNS_RPC_DP_LIST");
3497 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3498 0 : ndr->depth++;
3499 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3500 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3501 0 : ndr_print_uint32(ndr, "dwDpCount", r->dwDpCount);
3502 0 : ndr->print(ndr, "%s: ARRAY(%d)", "DpArray", (int)r->dwDpCount);
3503 0 : ndr->depth++;
3504 0 : for (cntr_DpArray_0 = 0; cntr_DpArray_0 < (r->dwDpCount); cntr_DpArray_0++) {
3505 0 : ndr_print_ptr(ndr, "DpArray", r->DpArray[cntr_DpArray_0]);
3506 0 : ndr->depth++;
3507 0 : if (r->DpArray[cntr_DpArray_0]) {
3508 0 : ndr_print_DNS_RPC_DP_ENUM(ndr, "DpArray", r->DpArray[cntr_DpArray_0]);
3509 : }
3510 0 : ndr->depth--;
3511 : }
3512 0 : ndr->depth--;
3513 0 : ndr->depth--;
3514 : }
3515 :
3516 0 : static enum ndr_err_code ndr_push_DNS_RPC_ENLIST_DP(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ENLIST_DP *r)
3517 : {
3518 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3519 0 : if (ndr_flags & NDR_SCALARS) {
3520 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3521 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3522 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3523 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
3524 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwOperation));
3525 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3526 : }
3527 0 : if (ndr_flags & NDR_BUFFERS) {
3528 0 : if (r->pszDpFqdn) {
3529 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3530 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3531 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3532 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
3533 : }
3534 : }
3535 0 : return NDR_ERR_SUCCESS;
3536 : }
3537 :
3538 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ENLIST_DP(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ENLIST_DP *r)
3539 : {
3540 : uint32_t _ptr_pszDpFqdn;
3541 0 : uint32_t size_pszDpFqdn_1 = 0;
3542 0 : uint32_t length_pszDpFqdn_1 = 0;
3543 0 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
3544 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3545 0 : if (ndr_flags & NDR_SCALARS) {
3546 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3547 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3548 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3549 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
3550 0 : if (_ptr_pszDpFqdn) {
3551 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
3552 : } else {
3553 0 : r->pszDpFqdn = NULL;
3554 : }
3555 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwOperation));
3556 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3557 : }
3558 0 : if (ndr_flags & NDR_BUFFERS) {
3559 0 : if (r->pszDpFqdn) {
3560 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3561 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
3562 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
3563 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
3564 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
3565 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
3566 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
3567 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDpFqdn_1, length_pszDpFqdn_1);
3568 : }
3569 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
3570 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
3571 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
3572 : }
3573 : }
3574 0 : return NDR_ERR_SUCCESS;
3575 : }
3576 :
3577 0 : _PUBLIC_ void ndr_print_DNS_RPC_ENLIST_DP(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ENLIST_DP *r)
3578 : {
3579 0 : ndr_print_struct(ndr, name, "DNS_RPC_ENLIST_DP");
3580 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3581 0 : ndr->depth++;
3582 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3583 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3584 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
3585 0 : ndr->depth++;
3586 0 : if (r->pszDpFqdn) {
3587 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
3588 : }
3589 0 : ndr->depth--;
3590 0 : ndr_print_uint32(ndr, "dwOperation", r->dwOperation);
3591 0 : ndr->depth--;
3592 : }
3593 :
3594 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_CHANGE_DP(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_CHANGE_DP *r)
3595 : {
3596 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3597 0 : if (ndr_flags & NDR_SCALARS) {
3598 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3599 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3600 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3601 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDestPartition));
3602 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3603 : }
3604 0 : if (ndr_flags & NDR_BUFFERS) {
3605 0 : if (r->pszDestPartition) {
3606 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDestPartition, CH_UTF8)));
3607 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3608 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDestPartition, CH_UTF8)));
3609 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDestPartition, ndr_charset_length(r->pszDestPartition, CH_UTF8), sizeof(uint8_t), CH_UTF8));
3610 : }
3611 : }
3612 0 : return NDR_ERR_SUCCESS;
3613 : }
3614 :
3615 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_CHANGE_DP(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_CHANGE_DP *r)
3616 : {
3617 : uint32_t _ptr_pszDestPartition;
3618 0 : uint32_t size_pszDestPartition_1 = 0;
3619 0 : uint32_t length_pszDestPartition_1 = 0;
3620 0 : TALLOC_CTX *_mem_save_pszDestPartition_0 = NULL;
3621 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3622 0 : if (ndr_flags & NDR_SCALARS) {
3623 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3624 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3625 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3626 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDestPartition));
3627 0 : if (_ptr_pszDestPartition) {
3628 0 : NDR_PULL_ALLOC(ndr, r->pszDestPartition);
3629 : } else {
3630 0 : r->pszDestPartition = NULL;
3631 : }
3632 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3633 : }
3634 0 : if (ndr_flags & NDR_BUFFERS) {
3635 0 : if (r->pszDestPartition) {
3636 0 : _mem_save_pszDestPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
3637 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDestPartition, 0);
3638 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDestPartition));
3639 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDestPartition));
3640 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDestPartition, &size_pszDestPartition_1));
3641 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDestPartition, &length_pszDestPartition_1));
3642 0 : if (length_pszDestPartition_1 > size_pszDestPartition_1) {
3643 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDestPartition_1, length_pszDestPartition_1);
3644 : }
3645 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDestPartition_1, sizeof(uint8_t)));
3646 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDestPartition, length_pszDestPartition_1, sizeof(uint8_t), CH_UTF8));
3647 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDestPartition_0, 0);
3648 : }
3649 : }
3650 0 : return NDR_ERR_SUCCESS;
3651 : }
3652 :
3653 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)
3654 : {
3655 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_CHANGE_DP");
3656 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3657 0 : ndr->depth++;
3658 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3659 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3660 0 : ndr_print_ptr(ndr, "pszDestPartition", r->pszDestPartition);
3661 0 : ndr->depth++;
3662 0 : if (r->pszDestPartition) {
3663 0 : ndr_print_string(ndr, "pszDestPartition", r->pszDestPartition);
3664 : }
3665 0 : ndr->depth--;
3666 0 : ndr->depth--;
3667 : }
3668 :
3669 386 : static enum ndr_err_code ndr_push_DNS_ZONE_SECONDARY_SECURITY(struct ndr_push *ndr, int ndr_flags, enum DNS_ZONE_SECONDARY_SECURITY r)
3670 : {
3671 386 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
3672 386 : return NDR_ERR_SUCCESS;
3673 : }
3674 :
3675 386 : static enum ndr_err_code ndr_pull_DNS_ZONE_SECONDARY_SECURITY(struct ndr_pull *ndr, int ndr_flags, enum DNS_ZONE_SECONDARY_SECURITY *r)
3676 : {
3677 : uint32_t v;
3678 386 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
3679 386 : *r = v;
3680 386 : return NDR_ERR_SUCCESS;
3681 : }
3682 :
3683 0 : _PUBLIC_ void ndr_print_DNS_ZONE_SECONDARY_SECURITY(struct ndr_print *ndr, const char *name, enum DNS_ZONE_SECONDARY_SECURITY r)
3684 : {
3685 0 : const char *val = NULL;
3686 :
3687 0 : switch (r) {
3688 0 : case DNS_ZONE_SECSECURE_NO_SECURITY: val = "DNS_ZONE_SECSECURE_NO_SECURITY"; break;
3689 0 : case DNS_ZONE_SECSECURE_NS_ONLY: val = "DNS_ZONE_SECSECURE_NS_ONLY"; break;
3690 0 : case DNS_ZONE_SECSECURE_LIST_ONLY: val = "DNS_ZONE_SECSECURE_LIST_ONLY"; break;
3691 0 : case DNS_ZONE_SECSECURE_NO_XFER: val = "DNS_ZONE_SECSECURE_NO_XFER"; break;
3692 : }
3693 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
3694 0 : }
3695 :
3696 386 : static enum ndr_err_code ndr_push_DNS_ZONE_NOTIFY_LEVEL(struct ndr_push *ndr, int ndr_flags, enum DNS_ZONE_NOTIFY_LEVEL r)
3697 : {
3698 386 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
3699 386 : return NDR_ERR_SUCCESS;
3700 : }
3701 :
3702 386 : static enum ndr_err_code ndr_pull_DNS_ZONE_NOTIFY_LEVEL(struct ndr_pull *ndr, int ndr_flags, enum DNS_ZONE_NOTIFY_LEVEL *r)
3703 : {
3704 : uint32_t v;
3705 386 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
3706 386 : *r = v;
3707 386 : return NDR_ERR_SUCCESS;
3708 : }
3709 :
3710 0 : _PUBLIC_ void ndr_print_DNS_ZONE_NOTIFY_LEVEL(struct ndr_print *ndr, const char *name, enum DNS_ZONE_NOTIFY_LEVEL r)
3711 : {
3712 0 : const char *val = NULL;
3713 :
3714 0 : switch (r) {
3715 0 : case DNS_ZONE_NOTIFY_OFF: val = "DNS_ZONE_NOTIFY_OFF"; break;
3716 0 : case DNS_ZONE_NOTIFY_ALL_SECONDARIES: val = "DNS_ZONE_NOTIFY_ALL_SECONDARIES"; break;
3717 0 : case DNS_ZONE_NOTIFY_LIST_ONLY: val = "DNS_ZONE_NOTIFY_LIST_ONLY"; break;
3718 : }
3719 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
3720 0 : }
3721 :
3722 25 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_FLAGS(struct ndr_push *ndr, int ndr_flags, uint32_t r)
3723 : {
3724 25 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
3725 25 : return NDR_ERR_SUCCESS;
3726 : }
3727 :
3728 25 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_FLAGS(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
3729 : {
3730 : uint32_t v;
3731 25 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
3732 25 : *r = v;
3733 25 : return NDR_ERR_SUCCESS;
3734 : }
3735 :
3736 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r)
3737 : {
3738 0 : ndr_print_uint32(ndr, name, r);
3739 0 : ndr->depth++;
3740 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_PAUSED", DNS_RPC_ZONE_PAUSED, r);
3741 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_SHUTDOWN", DNS_RPC_ZONE_SHUTDOWN, r);
3742 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_REVERSE", DNS_RPC_ZONE_REVERSE, r);
3743 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_AUTOCREATED", DNS_RPC_ZONE_AUTOCREATED, r);
3744 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_DSINTEGRATED", DNS_RPC_ZONE_DSINTEGRATED, r);
3745 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_AGING", DNS_RPC_ZONE_AGING, r);
3746 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_UPDATE_UNSECURE", DNS_RPC_ZONE_UPDATE_UNSECURE, r);
3747 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_UPDATE_SECURE", DNS_RPC_ZONE_UPDATE_SECURE, r);
3748 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_ZONE_READONLY", DNS_RPC_ZONE_READONLY, r);
3749 0 : ndr->depth--;
3750 0 : }
3751 :
3752 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_W2K(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_W2K *r)
3753 : {
3754 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3755 0 : if (ndr_flags & NDR_SCALARS) {
3756 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3757 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
3758 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_FLAGS(ndr, NDR_SCALARS, r->Flags));
3759 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->ZoneType));
3760 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Version));
3761 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3762 : }
3763 0 : if (ndr_flags & NDR_BUFFERS) {
3764 0 : if (r->pszZoneName) {
3765 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF16)));
3766 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3767 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF16)));
3768 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3769 : }
3770 : }
3771 0 : return NDR_ERR_SUCCESS;
3772 : }
3773 :
3774 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_W2K(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_W2K *r)
3775 : {
3776 : uint32_t _ptr_pszZoneName;
3777 0 : uint32_t size_pszZoneName_1 = 0;
3778 0 : uint32_t length_pszZoneName_1 = 0;
3779 0 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
3780 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3781 0 : if (ndr_flags & NDR_SCALARS) {
3782 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3783 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
3784 0 : if (_ptr_pszZoneName) {
3785 0 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
3786 : } else {
3787 0 : r->pszZoneName = NULL;
3788 : }
3789 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_FLAGS(ndr, NDR_SCALARS, &r->Flags));
3790 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->ZoneType));
3791 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Version));
3792 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3793 : }
3794 0 : if (ndr_flags & NDR_BUFFERS) {
3795 0 : if (r->pszZoneName) {
3796 0 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3797 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
3798 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
3799 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
3800 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
3801 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
3802 0 : if (length_pszZoneName_1 > size_pszZoneName_1) {
3803 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZoneName_1, length_pszZoneName_1);
3804 : }
3805 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint16_t)));
3806 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint16_t), CH_UTF16));
3807 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
3808 : }
3809 : }
3810 0 : return NDR_ERR_SUCCESS;
3811 : }
3812 :
3813 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_W2K(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_W2K *r)
3814 : {
3815 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_W2K");
3816 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3817 0 : ndr->depth++;
3818 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
3819 0 : ndr->depth++;
3820 0 : if (r->pszZoneName) {
3821 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
3822 : }
3823 0 : ndr->depth--;
3824 0 : ndr_print_DNS_RPC_ZONE_FLAGS(ndr, "Flags", r->Flags);
3825 0 : ndr_print_uint8(ndr, "ZoneType", r->ZoneType);
3826 0 : ndr_print_uint8(ndr, "Version", r->Version);
3827 0 : ndr->depth--;
3828 : }
3829 :
3830 25 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_DOTNET(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_DOTNET *r)
3831 : {
3832 25 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3833 25 : if (ndr_flags & NDR_SCALARS) {
3834 25 : NDR_CHECK(ndr_push_align(ndr, 5));
3835 25 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
3836 25 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
3837 25 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
3838 25 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_FLAGS(ndr, NDR_SCALARS, r->Flags));
3839 25 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->ZoneType));
3840 25 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Version));
3841 25 : NDR_CHECK(ndr_push_DNS_RPC_DP_FLAGS(ndr, NDR_SCALARS, r->dwDpFlags));
3842 25 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
3843 25 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3844 : }
3845 25 : if (ndr_flags & NDR_BUFFERS) {
3846 25 : if (r->pszZoneName) {
3847 25 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF16)));
3848 25 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3849 25 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF16)));
3850 25 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3851 : }
3852 25 : if (r->pszDpFqdn) {
3853 25 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3854 25 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3855 25 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
3856 25 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
3857 : }
3858 : }
3859 25 : return NDR_ERR_SUCCESS;
3860 : }
3861 :
3862 25 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_DOTNET(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_DOTNET *r)
3863 : {
3864 : uint32_t _ptr_pszZoneName;
3865 25 : uint32_t size_pszZoneName_1 = 0;
3866 25 : uint32_t length_pszZoneName_1 = 0;
3867 25 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
3868 : uint32_t _ptr_pszDpFqdn;
3869 25 : uint32_t size_pszDpFqdn_1 = 0;
3870 25 : uint32_t length_pszDpFqdn_1 = 0;
3871 25 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
3872 25 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3873 25 : if (ndr_flags & NDR_SCALARS) {
3874 25 : NDR_CHECK(ndr_pull_align(ndr, 5));
3875 25 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
3876 25 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
3877 25 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
3878 25 : if (_ptr_pszZoneName) {
3879 25 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
3880 : } else {
3881 0 : r->pszZoneName = NULL;
3882 : }
3883 25 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_FLAGS(ndr, NDR_SCALARS, &r->Flags));
3884 25 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->ZoneType));
3885 25 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Version));
3886 25 : NDR_CHECK(ndr_pull_DNS_RPC_DP_FLAGS(ndr, NDR_SCALARS, &r->dwDpFlags));
3887 25 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
3888 25 : if (_ptr_pszDpFqdn) {
3889 25 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
3890 : } else {
3891 0 : r->pszDpFqdn = NULL;
3892 : }
3893 25 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3894 : }
3895 25 : if (ndr_flags & NDR_BUFFERS) {
3896 25 : if (r->pszZoneName) {
3897 25 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3898 25 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
3899 25 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
3900 25 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
3901 25 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
3902 25 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
3903 25 : if (length_pszZoneName_1 > size_pszZoneName_1) {
3904 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZoneName_1, length_pszZoneName_1);
3905 : }
3906 25 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint16_t)));
3907 25 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint16_t), CH_UTF16));
3908 25 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
3909 : }
3910 25 : if (r->pszDpFqdn) {
3911 25 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3912 25 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
3913 25 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
3914 25 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
3915 25 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
3916 25 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
3917 25 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
3918 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDpFqdn_1, length_pszDpFqdn_1);
3919 : }
3920 25 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
3921 25 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
3922 25 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
3923 : }
3924 : }
3925 25 : return NDR_ERR_SUCCESS;
3926 : }
3927 :
3928 0 : _PUBLIC_ void ndr_print_DNS_RPC_ZONE_DOTNET(struct ndr_print *ndr, const char *name, const struct DNS_RPC_ZONE_DOTNET *r)
3929 : {
3930 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_DOTNET");
3931 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3932 0 : ndr->depth++;
3933 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
3934 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
3935 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
3936 0 : ndr->depth++;
3937 0 : if (r->pszZoneName) {
3938 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
3939 : }
3940 0 : ndr->depth--;
3941 0 : ndr_print_DNS_RPC_ZONE_FLAGS(ndr, "Flags", r->Flags);
3942 0 : ndr_print_uint8(ndr, "ZoneType", r->ZoneType);
3943 0 : ndr_print_uint8(ndr, "Version", r->Version);
3944 0 : ndr_print_DNS_RPC_DP_FLAGS(ndr, "dwDpFlags", r->dwDpFlags);
3945 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
3946 0 : ndr->depth++;
3947 0 : if (r->pszDpFqdn) {
3948 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
3949 : }
3950 0 : ndr->depth--;
3951 0 : ndr->depth--;
3952 : }
3953 :
3954 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_LIST_W2K(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_LIST_W2K *r)
3955 : {
3956 : uint32_t cntr_ZoneArray_0;
3957 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3958 0 : if (ndr_flags & NDR_SCALARS) {
3959 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->dwZoneCount));
3960 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3961 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneCount));
3962 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
3963 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneArray[cntr_ZoneArray_0]));
3964 : }
3965 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3966 : }
3967 0 : if (ndr_flags & NDR_BUFFERS) {
3968 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
3969 0 : if (r->ZoneArray[cntr_ZoneArray_0]) {
3970 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneArray[cntr_ZoneArray_0]));
3971 : }
3972 : }
3973 : }
3974 0 : return NDR_ERR_SUCCESS;
3975 : }
3976 :
3977 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_LIST_W2K(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_LIST_W2K *r)
3978 : {
3979 : uint32_t _ptr_ZoneArray;
3980 0 : uint32_t size_ZoneArray_0 = 0;
3981 : uint32_t cntr_ZoneArray_0;
3982 0 : TALLOC_CTX *_mem_save_ZoneArray_0 = NULL;
3983 0 : TALLOC_CTX *_mem_save_ZoneArray_1 = NULL;
3984 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3985 0 : if (ndr_flags & NDR_SCALARS) {
3986 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->ZoneArray));
3987 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3988 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneCount));
3989 0 : if (r->dwZoneCount > 500000) {
3990 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3991 : }
3992 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ZoneArray, &size_ZoneArray_0));
3993 0 : NDR_PULL_ALLOC_N(ndr, r->ZoneArray, size_ZoneArray_0);
3994 0 : _mem_save_ZoneArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
3995 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray, 0);
3996 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
3997 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneArray));
3998 0 : if (_ptr_ZoneArray) {
3999 0 : NDR_PULL_ALLOC(ndr, r->ZoneArray[cntr_ZoneArray_0]);
4000 : } else {
4001 0 : r->ZoneArray[cntr_ZoneArray_0] = NULL;
4002 : }
4003 : }
4004 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_0, 0);
4005 0 : if (r->ZoneArray) {
4006 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ZoneArray, r->dwZoneCount));
4007 : }
4008 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4009 : }
4010 0 : if (ndr_flags & NDR_BUFFERS) {
4011 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ZoneArray, &size_ZoneArray_0));
4012 0 : _mem_save_ZoneArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
4013 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray, 0);
4014 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
4015 0 : if (r->ZoneArray[cntr_ZoneArray_0]) {
4016 0 : _mem_save_ZoneArray_1 = NDR_PULL_GET_MEM_CTX(ndr);
4017 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray[cntr_ZoneArray_0], 0);
4018 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneArray[cntr_ZoneArray_0]));
4019 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_1, 0);
4020 : }
4021 : }
4022 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_0, 0);
4023 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
4024 : }
4025 : }
4026 0 : return NDR_ERR_SUCCESS;
4027 : }
4028 :
4029 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)
4030 : {
4031 : uint32_t cntr_ZoneArray_0;
4032 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_LIST_W2K");
4033 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4034 0 : ndr->depth++;
4035 0 : ndr_print_uint32(ndr, "dwZoneCount", r->dwZoneCount);
4036 0 : ndr->print(ndr, "%s: ARRAY(%d)", "ZoneArray", (int)r->dwZoneCount);
4037 0 : ndr->depth++;
4038 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
4039 0 : ndr_print_ptr(ndr, "ZoneArray", r->ZoneArray[cntr_ZoneArray_0]);
4040 0 : ndr->depth++;
4041 0 : if (r->ZoneArray[cntr_ZoneArray_0]) {
4042 0 : ndr_print_DNS_RPC_ZONE_W2K(ndr, "ZoneArray", r->ZoneArray[cntr_ZoneArray_0]);
4043 : }
4044 0 : ndr->depth--;
4045 : }
4046 0 : ndr->depth--;
4047 0 : ndr->depth--;
4048 : }
4049 :
4050 10 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_LIST_DOTNET(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_LIST_DOTNET *r)
4051 : {
4052 : uint32_t cntr_ZoneArray_0;
4053 10 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4054 10 : if (ndr_flags & NDR_SCALARS) {
4055 10 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->dwZoneCount));
4056 10 : NDR_CHECK(ndr_push_align(ndr, 5));
4057 10 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
4058 10 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
4059 10 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneCount));
4060 35 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
4061 25 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneArray[cntr_ZoneArray_0]));
4062 : }
4063 10 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4064 : }
4065 10 : if (ndr_flags & NDR_BUFFERS) {
4066 35 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
4067 25 : if (r->ZoneArray[cntr_ZoneArray_0]) {
4068 25 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneArray[cntr_ZoneArray_0]));
4069 : }
4070 : }
4071 : }
4072 10 : return NDR_ERR_SUCCESS;
4073 : }
4074 :
4075 10 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_LIST_DOTNET(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_LIST_DOTNET *r)
4076 : {
4077 : uint32_t _ptr_ZoneArray;
4078 10 : uint32_t size_ZoneArray_0 = 0;
4079 : uint32_t cntr_ZoneArray_0;
4080 10 : TALLOC_CTX *_mem_save_ZoneArray_0 = NULL;
4081 10 : TALLOC_CTX *_mem_save_ZoneArray_1 = NULL;
4082 10 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4083 10 : if (ndr_flags & NDR_SCALARS) {
4084 10 : NDR_CHECK(ndr_pull_array_size(ndr, &r->ZoneArray));
4085 10 : NDR_CHECK(ndr_pull_align(ndr, 5));
4086 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
4087 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
4088 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneCount));
4089 10 : if (r->dwZoneCount > 500000) {
4090 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4091 : }
4092 10 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ZoneArray, &size_ZoneArray_0));
4093 10 : NDR_PULL_ALLOC_N(ndr, r->ZoneArray, size_ZoneArray_0);
4094 10 : _mem_save_ZoneArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
4095 10 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray, 0);
4096 35 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
4097 25 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneArray));
4098 25 : if (_ptr_ZoneArray) {
4099 25 : NDR_PULL_ALLOC(ndr, r->ZoneArray[cntr_ZoneArray_0]);
4100 : } else {
4101 0 : r->ZoneArray[cntr_ZoneArray_0] = NULL;
4102 : }
4103 : }
4104 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_0, 0);
4105 10 : if (r->ZoneArray) {
4106 10 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ZoneArray, r->dwZoneCount));
4107 : }
4108 10 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4109 : }
4110 10 : if (ndr_flags & NDR_BUFFERS) {
4111 10 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ZoneArray, &size_ZoneArray_0));
4112 10 : _mem_save_ZoneArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
4113 10 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray, 0);
4114 35 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
4115 25 : if (r->ZoneArray[cntr_ZoneArray_0]) {
4116 25 : _mem_save_ZoneArray_1 = NDR_PULL_GET_MEM_CTX(ndr);
4117 25 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneArray[cntr_ZoneArray_0], 0);
4118 25 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneArray[cntr_ZoneArray_0]));
4119 25 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_1, 0);
4120 : }
4121 : }
4122 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneArray_0, 0);
4123 17 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (size_ZoneArray_0); cntr_ZoneArray_0++) {
4124 : }
4125 : }
4126 10 : return NDR_ERR_SUCCESS;
4127 : }
4128 :
4129 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)
4130 : {
4131 : uint32_t cntr_ZoneArray_0;
4132 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_LIST_DOTNET");
4133 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4134 0 : ndr->depth++;
4135 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
4136 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
4137 0 : ndr_print_uint32(ndr, "dwZoneCount", r->dwZoneCount);
4138 0 : ndr->print(ndr, "%s: ARRAY(%d)", "ZoneArray", (int)r->dwZoneCount);
4139 0 : ndr->depth++;
4140 0 : for (cntr_ZoneArray_0 = 0; cntr_ZoneArray_0 < (r->dwZoneCount); cntr_ZoneArray_0++) {
4141 0 : ndr_print_ptr(ndr, "ZoneArray", r->ZoneArray[cntr_ZoneArray_0]);
4142 0 : ndr->depth++;
4143 0 : if (r->ZoneArray[cntr_ZoneArray_0]) {
4144 0 : ndr_print_DNS_RPC_ZONE_DOTNET(ndr, "ZoneArray", r->ZoneArray[cntr_ZoneArray_0]);
4145 : }
4146 0 : ndr->depth--;
4147 : }
4148 0 : ndr->depth--;
4149 0 : ndr->depth--;
4150 : }
4151 :
4152 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_INFO_W2K(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_INFO_W2K *r)
4153 : {
4154 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4155 0 : if (ndr_flags & NDR_SCALARS) {
4156 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4157 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
4158 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
4159 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fReverse));
4160 0 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
4161 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fPaused));
4162 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fShutdown));
4163 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAutoCreated));
4164 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseDatabase));
4165 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
4166 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
4167 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
4168 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
4169 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
4170 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
4171 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseWins));
4172 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseNbstat));
4173 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
4174 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNoRefreshInterval));
4175 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRefreshInterval));
4176 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwAvailForScavengeTime));
4177 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipScavengeServers));
4178 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pvReserved1));
4179 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pvReserved2));
4180 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pvReserved3));
4181 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pvReserved4));
4182 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4183 : }
4184 0 : if (ndr_flags & NDR_BUFFERS) {
4185 0 : if (r->pszZoneName) {
4186 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4187 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4188 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4189 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4190 : }
4191 0 : if (r->pszDataFile) {
4192 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4193 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4194 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4195 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4196 : }
4197 0 : if (r->aipMasters) {
4198 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
4199 : }
4200 0 : if (r->aipSecondaries) {
4201 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
4202 : }
4203 0 : if (r->aipNotify) {
4204 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
4205 : }
4206 0 : if (r->aipScavengeServers) {
4207 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
4208 : }
4209 : }
4210 0 : return NDR_ERR_SUCCESS;
4211 : }
4212 :
4213 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_INFO_W2K(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_INFO_W2K *r)
4214 : {
4215 : uint32_t _ptr_pszZoneName;
4216 0 : uint32_t size_pszZoneName_1 = 0;
4217 0 : uint32_t length_pszZoneName_1 = 0;
4218 0 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
4219 : uint32_t _ptr_pszDataFile;
4220 0 : uint32_t size_pszDataFile_1 = 0;
4221 0 : uint32_t length_pszDataFile_1 = 0;
4222 0 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
4223 : uint32_t _ptr_aipMasters;
4224 0 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
4225 : uint32_t _ptr_aipSecondaries;
4226 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
4227 : uint32_t _ptr_aipNotify;
4228 0 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
4229 : uint32_t _ptr_aipScavengeServers;
4230 0 : TALLOC_CTX *_mem_save_aipScavengeServers_0 = NULL;
4231 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4232 0 : if (ndr_flags & NDR_SCALARS) {
4233 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4234 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
4235 0 : if (_ptr_pszZoneName) {
4236 0 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
4237 : } else {
4238 0 : r->pszZoneName = NULL;
4239 : }
4240 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
4241 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fReverse));
4242 0 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
4243 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fPaused));
4244 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fShutdown));
4245 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAutoCreated));
4246 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseDatabase));
4247 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
4248 0 : if (_ptr_pszDataFile) {
4249 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
4250 : } else {
4251 0 : r->pszDataFile = NULL;
4252 : }
4253 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
4254 0 : if (_ptr_aipMasters) {
4255 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
4256 : } else {
4257 0 : r->aipMasters = NULL;
4258 : }
4259 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
4260 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
4261 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
4262 0 : if (_ptr_aipSecondaries) {
4263 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
4264 : } else {
4265 0 : r->aipSecondaries = NULL;
4266 : }
4267 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
4268 0 : if (_ptr_aipNotify) {
4269 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
4270 : } else {
4271 0 : r->aipNotify = NULL;
4272 : }
4273 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseWins));
4274 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseNbstat));
4275 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
4276 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNoRefreshInterval));
4277 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRefreshInterval));
4278 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwAvailForScavengeTime));
4279 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipScavengeServers));
4280 0 : if (_ptr_aipScavengeServers) {
4281 0 : NDR_PULL_ALLOC(ndr, r->aipScavengeServers);
4282 : } else {
4283 0 : r->aipScavengeServers = NULL;
4284 : }
4285 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pvReserved1));
4286 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pvReserved2));
4287 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pvReserved3));
4288 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pvReserved4));
4289 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4290 : }
4291 0 : if (ndr_flags & NDR_BUFFERS) {
4292 0 : if (r->pszZoneName) {
4293 0 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4294 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
4295 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
4296 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
4297 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
4298 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
4299 0 : if (length_pszZoneName_1 > size_pszZoneName_1) {
4300 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZoneName_1, length_pszZoneName_1);
4301 : }
4302 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
4303 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
4304 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
4305 : }
4306 0 : if (r->pszDataFile) {
4307 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
4308 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
4309 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
4310 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
4311 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
4312 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
4313 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
4314 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDataFile_1, length_pszDataFile_1);
4315 : }
4316 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
4317 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
4318 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
4319 : }
4320 0 : if (r->aipMasters) {
4321 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
4322 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
4323 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
4324 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
4325 : }
4326 0 : if (r->aipSecondaries) {
4327 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4328 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
4329 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
4330 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
4331 : }
4332 0 : if (r->aipNotify) {
4333 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
4334 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
4335 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
4336 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
4337 : }
4338 0 : if (r->aipScavengeServers) {
4339 0 : _mem_save_aipScavengeServers_0 = NDR_PULL_GET_MEM_CTX(ndr);
4340 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipScavengeServers, 0);
4341 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
4342 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipScavengeServers_0, 0);
4343 : }
4344 : }
4345 0 : return NDR_ERR_SUCCESS;
4346 : }
4347 :
4348 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)
4349 : {
4350 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_INFO_W2K");
4351 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4352 0 : ndr->depth++;
4353 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
4354 0 : ndr->depth++;
4355 0 : if (r->pszZoneName) {
4356 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
4357 : }
4358 0 : ndr->depth--;
4359 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
4360 0 : ndr_print_uint32(ndr, "fReverse", r->fReverse);
4361 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
4362 0 : ndr_print_uint32(ndr, "fPaused", r->fPaused);
4363 0 : ndr_print_uint32(ndr, "fShutdown", r->fShutdown);
4364 0 : ndr_print_uint32(ndr, "fAutoCreated", r->fAutoCreated);
4365 0 : ndr_print_uint32(ndr, "fUseDatabase", r->fUseDatabase);
4366 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
4367 0 : ndr->depth++;
4368 0 : if (r->pszDataFile) {
4369 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
4370 : }
4371 0 : ndr->depth--;
4372 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
4373 0 : ndr->depth++;
4374 0 : if (r->aipMasters) {
4375 0 : ndr_print_IP4_ARRAY(ndr, "aipMasters", r->aipMasters);
4376 : }
4377 0 : ndr->depth--;
4378 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
4379 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
4380 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
4381 0 : ndr->depth++;
4382 0 : if (r->aipSecondaries) {
4383 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
4384 : }
4385 0 : ndr->depth--;
4386 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
4387 0 : ndr->depth++;
4388 0 : if (r->aipNotify) {
4389 0 : ndr_print_IP4_ARRAY(ndr, "aipNotify", r->aipNotify);
4390 : }
4391 0 : ndr->depth--;
4392 0 : ndr_print_uint32(ndr, "fUseWins", r->fUseWins);
4393 0 : ndr_print_uint32(ndr, "fUseNbstat", r->fUseNbstat);
4394 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
4395 0 : ndr_print_uint32(ndr, "dwNoRefreshInterval", r->dwNoRefreshInterval);
4396 0 : ndr_print_uint32(ndr, "dwRefreshInterval", r->dwRefreshInterval);
4397 0 : ndr_print_uint32(ndr, "dwAvailForScavengeTime", r->dwAvailForScavengeTime);
4398 0 : ndr_print_ptr(ndr, "aipScavengeServers", r->aipScavengeServers);
4399 0 : ndr->depth++;
4400 0 : if (r->aipScavengeServers) {
4401 0 : ndr_print_IP4_ARRAY(ndr, "aipScavengeServers", r->aipScavengeServers);
4402 : }
4403 0 : ndr->depth--;
4404 0 : ndr_print_uint32(ndr, "pvReserved1", r->pvReserved1);
4405 0 : ndr_print_uint32(ndr, "pvReserved2", r->pvReserved2);
4406 0 : ndr_print_uint32(ndr, "pvReserved3", r->pvReserved3);
4407 0 : ndr_print_uint32(ndr, "pvReserved4", r->pvReserved4);
4408 0 : ndr->depth--;
4409 : }
4410 :
4411 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_INFO_DOTNET(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_INFO_DOTNET *r)
4412 : {
4413 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4414 0 : if (ndr_flags & NDR_SCALARS) {
4415 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4416 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
4417 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
4418 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
4419 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
4420 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fReverse));
4421 0 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
4422 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fPaused));
4423 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fShutdown));
4424 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAutoCreated));
4425 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseDatabase));
4426 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
4427 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
4428 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
4429 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
4430 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
4431 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
4432 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseWins));
4433 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseNbstat));
4434 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
4435 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNoRefreshInterval));
4436 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRefreshInterval));
4437 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwAvailForScavengeTime));
4438 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipScavengeServers));
4439 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwarderTimeout));
4440 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fForwarderSlave));
4441 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipLocalMasters));
4442 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDpFlags));
4443 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
4444 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwszZoneDn));
4445 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastSuccessfulSoaCheck));
4446 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastSuccessfulXfr));
4447 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved1));
4448 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved2));
4449 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved3));
4450 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved4));
4451 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved5));
4452 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pReserved1));
4453 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pReserved2));
4454 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pReserved3));
4455 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pReserved4));
4456 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4457 : }
4458 0 : if (ndr_flags & NDR_BUFFERS) {
4459 0 : if (r->pszZoneName) {
4460 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4461 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4462 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4463 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4464 : }
4465 0 : if (r->pszDataFile) {
4466 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4467 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4468 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4469 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4470 : }
4471 0 : if (r->aipMasters) {
4472 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
4473 : }
4474 0 : if (r->aipSecondaries) {
4475 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
4476 : }
4477 0 : if (r->aipNotify) {
4478 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
4479 : }
4480 0 : if (r->aipScavengeServers) {
4481 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
4482 : }
4483 0 : if (r->aipLocalMasters) {
4484 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipLocalMasters));
4485 : }
4486 0 : if (r->pszDpFqdn) {
4487 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
4488 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4489 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
4490 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4491 : }
4492 0 : if (r->pwszZoneDn) {
4493 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszZoneDn, CH_UTF16)));
4494 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4495 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszZoneDn, CH_UTF16)));
4496 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pwszZoneDn, ndr_charset_length(r->pwszZoneDn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4497 : }
4498 0 : if (r->pReserved1) {
4499 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved1, CH_UTF8)));
4500 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4501 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved1, CH_UTF8)));
4502 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pReserved1, ndr_charset_length(r->pReserved1, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4503 : }
4504 0 : if (r->pReserved2) {
4505 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved2, CH_UTF8)));
4506 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4507 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved2, CH_UTF8)));
4508 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pReserved2, ndr_charset_length(r->pReserved2, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4509 : }
4510 0 : if (r->pReserved3) {
4511 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved3, CH_UTF8)));
4512 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4513 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved3, CH_UTF8)));
4514 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pReserved3, ndr_charset_length(r->pReserved3, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4515 : }
4516 0 : if (r->pReserved4) {
4517 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved4, CH_UTF8)));
4518 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4519 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pReserved4, CH_UTF8)));
4520 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pReserved4, ndr_charset_length(r->pReserved4, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4521 : }
4522 : }
4523 0 : return NDR_ERR_SUCCESS;
4524 : }
4525 :
4526 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_INFO_DOTNET(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_INFO_DOTNET *r)
4527 : {
4528 : uint32_t _ptr_pszZoneName;
4529 0 : uint32_t size_pszZoneName_1 = 0;
4530 0 : uint32_t length_pszZoneName_1 = 0;
4531 0 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
4532 : uint32_t _ptr_pszDataFile;
4533 0 : uint32_t size_pszDataFile_1 = 0;
4534 0 : uint32_t length_pszDataFile_1 = 0;
4535 0 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
4536 : uint32_t _ptr_aipMasters;
4537 0 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
4538 : uint32_t _ptr_aipSecondaries;
4539 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
4540 : uint32_t _ptr_aipNotify;
4541 0 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
4542 : uint32_t _ptr_aipScavengeServers;
4543 0 : TALLOC_CTX *_mem_save_aipScavengeServers_0 = NULL;
4544 : uint32_t _ptr_aipLocalMasters;
4545 0 : TALLOC_CTX *_mem_save_aipLocalMasters_0 = NULL;
4546 : uint32_t _ptr_pszDpFqdn;
4547 0 : uint32_t size_pszDpFqdn_1 = 0;
4548 0 : uint32_t length_pszDpFqdn_1 = 0;
4549 0 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
4550 : uint32_t _ptr_pwszZoneDn;
4551 0 : uint32_t size_pwszZoneDn_1 = 0;
4552 0 : uint32_t length_pwszZoneDn_1 = 0;
4553 0 : TALLOC_CTX *_mem_save_pwszZoneDn_0 = NULL;
4554 : uint32_t _ptr_pReserved1;
4555 0 : uint32_t size_pReserved1_1 = 0;
4556 0 : uint32_t length_pReserved1_1 = 0;
4557 0 : TALLOC_CTX *_mem_save_pReserved1_0 = NULL;
4558 : uint32_t _ptr_pReserved2;
4559 0 : uint32_t size_pReserved2_1 = 0;
4560 0 : uint32_t length_pReserved2_1 = 0;
4561 0 : TALLOC_CTX *_mem_save_pReserved2_0 = NULL;
4562 : uint32_t _ptr_pReserved3;
4563 0 : uint32_t size_pReserved3_1 = 0;
4564 0 : uint32_t length_pReserved3_1 = 0;
4565 0 : TALLOC_CTX *_mem_save_pReserved3_0 = NULL;
4566 : uint32_t _ptr_pReserved4;
4567 0 : uint32_t size_pReserved4_1 = 0;
4568 0 : uint32_t length_pReserved4_1 = 0;
4569 0 : TALLOC_CTX *_mem_save_pReserved4_0 = NULL;
4570 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4571 0 : if (ndr_flags & NDR_SCALARS) {
4572 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4573 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
4574 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
4575 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
4576 0 : if (_ptr_pszZoneName) {
4577 0 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
4578 : } else {
4579 0 : r->pszZoneName = NULL;
4580 : }
4581 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
4582 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fReverse));
4583 0 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
4584 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fPaused));
4585 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fShutdown));
4586 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAutoCreated));
4587 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseDatabase));
4588 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
4589 0 : if (_ptr_pszDataFile) {
4590 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
4591 : } else {
4592 0 : r->pszDataFile = NULL;
4593 : }
4594 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
4595 0 : if (_ptr_aipMasters) {
4596 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
4597 : } else {
4598 0 : r->aipMasters = NULL;
4599 : }
4600 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
4601 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
4602 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
4603 0 : if (_ptr_aipSecondaries) {
4604 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
4605 : } else {
4606 0 : r->aipSecondaries = NULL;
4607 : }
4608 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
4609 0 : if (_ptr_aipNotify) {
4610 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
4611 : } else {
4612 0 : r->aipNotify = NULL;
4613 : }
4614 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseWins));
4615 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseNbstat));
4616 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
4617 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNoRefreshInterval));
4618 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRefreshInterval));
4619 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwAvailForScavengeTime));
4620 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipScavengeServers));
4621 0 : if (_ptr_aipScavengeServers) {
4622 0 : NDR_PULL_ALLOC(ndr, r->aipScavengeServers);
4623 : } else {
4624 0 : r->aipScavengeServers = NULL;
4625 : }
4626 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwarderTimeout));
4627 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fForwarderSlave));
4628 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipLocalMasters));
4629 0 : if (_ptr_aipLocalMasters) {
4630 0 : NDR_PULL_ALLOC(ndr, r->aipLocalMasters);
4631 : } else {
4632 0 : r->aipLocalMasters = NULL;
4633 : }
4634 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDpFlags));
4635 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
4636 0 : if (_ptr_pszDpFqdn) {
4637 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
4638 : } else {
4639 0 : r->pszDpFqdn = NULL;
4640 : }
4641 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszZoneDn));
4642 0 : if (_ptr_pwszZoneDn) {
4643 0 : NDR_PULL_ALLOC(ndr, r->pwszZoneDn);
4644 : } else {
4645 0 : r->pwszZoneDn = NULL;
4646 : }
4647 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastSuccessfulSoaCheck));
4648 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastSuccessfulXfr));
4649 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved1));
4650 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved2));
4651 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved3));
4652 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved4));
4653 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved5));
4654 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pReserved1));
4655 0 : if (_ptr_pReserved1) {
4656 0 : NDR_PULL_ALLOC(ndr, r->pReserved1);
4657 : } else {
4658 0 : r->pReserved1 = NULL;
4659 : }
4660 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pReserved2));
4661 0 : if (_ptr_pReserved2) {
4662 0 : NDR_PULL_ALLOC(ndr, r->pReserved2);
4663 : } else {
4664 0 : r->pReserved2 = NULL;
4665 : }
4666 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pReserved3));
4667 0 : if (_ptr_pReserved3) {
4668 0 : NDR_PULL_ALLOC(ndr, r->pReserved3);
4669 : } else {
4670 0 : r->pReserved3 = NULL;
4671 : }
4672 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pReserved4));
4673 0 : if (_ptr_pReserved4) {
4674 0 : NDR_PULL_ALLOC(ndr, r->pReserved4);
4675 : } else {
4676 0 : r->pReserved4 = NULL;
4677 : }
4678 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4679 : }
4680 0 : if (ndr_flags & NDR_BUFFERS) {
4681 0 : if (r->pszZoneName) {
4682 0 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4683 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
4684 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
4685 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
4686 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
4687 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
4688 0 : if (length_pszZoneName_1 > size_pszZoneName_1) {
4689 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZoneName_1, length_pszZoneName_1);
4690 : }
4691 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
4692 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
4693 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
4694 : }
4695 0 : if (r->pszDataFile) {
4696 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
4697 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
4698 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
4699 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
4700 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
4701 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
4702 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
4703 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDataFile_1, length_pszDataFile_1);
4704 : }
4705 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
4706 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
4707 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
4708 : }
4709 0 : if (r->aipMasters) {
4710 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
4711 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
4712 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
4713 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
4714 : }
4715 0 : if (r->aipSecondaries) {
4716 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4717 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
4718 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
4719 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
4720 : }
4721 0 : if (r->aipNotify) {
4722 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
4723 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
4724 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
4725 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
4726 : }
4727 0 : if (r->aipScavengeServers) {
4728 0 : _mem_save_aipScavengeServers_0 = NDR_PULL_GET_MEM_CTX(ndr);
4729 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipScavengeServers, 0);
4730 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
4731 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipScavengeServers_0, 0);
4732 : }
4733 0 : if (r->aipLocalMasters) {
4734 0 : _mem_save_aipLocalMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
4735 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipLocalMasters, 0);
4736 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipLocalMasters));
4737 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipLocalMasters_0, 0);
4738 : }
4739 0 : if (r->pszDpFqdn) {
4740 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
4741 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
4742 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
4743 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
4744 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
4745 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
4746 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
4747 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDpFqdn_1, length_pszDpFqdn_1);
4748 : }
4749 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
4750 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
4751 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
4752 : }
4753 0 : if (r->pwszZoneDn) {
4754 0 : _mem_save_pwszZoneDn_0 = NDR_PULL_GET_MEM_CTX(ndr);
4755 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pwszZoneDn, 0);
4756 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pwszZoneDn));
4757 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pwszZoneDn));
4758 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pwszZoneDn, &size_pwszZoneDn_1));
4759 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pwszZoneDn, &length_pwszZoneDn_1));
4760 0 : if (length_pwszZoneDn_1 > size_pwszZoneDn_1) {
4761 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszZoneDn_1, length_pwszZoneDn_1);
4762 : }
4763 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszZoneDn_1, sizeof(uint16_t)));
4764 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pwszZoneDn, length_pwszZoneDn_1, sizeof(uint16_t), CH_UTF16));
4765 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszZoneDn_0, 0);
4766 : }
4767 0 : if (r->pReserved1) {
4768 0 : _mem_save_pReserved1_0 = NDR_PULL_GET_MEM_CTX(ndr);
4769 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pReserved1, 0);
4770 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pReserved1));
4771 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pReserved1));
4772 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pReserved1, &size_pReserved1_1));
4773 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pReserved1, &length_pReserved1_1));
4774 0 : if (length_pReserved1_1 > size_pReserved1_1) {
4775 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pReserved1_1, length_pReserved1_1);
4776 : }
4777 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pReserved1_1, sizeof(uint8_t)));
4778 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pReserved1, length_pReserved1_1, sizeof(uint8_t), CH_UTF8));
4779 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReserved1_0, 0);
4780 : }
4781 0 : if (r->pReserved2) {
4782 0 : _mem_save_pReserved2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4783 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pReserved2, 0);
4784 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pReserved2));
4785 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pReserved2));
4786 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pReserved2, &size_pReserved2_1));
4787 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pReserved2, &length_pReserved2_1));
4788 0 : if (length_pReserved2_1 > size_pReserved2_1) {
4789 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pReserved2_1, length_pReserved2_1);
4790 : }
4791 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pReserved2_1, sizeof(uint8_t)));
4792 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pReserved2, length_pReserved2_1, sizeof(uint8_t), CH_UTF8));
4793 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReserved2_0, 0);
4794 : }
4795 0 : if (r->pReserved3) {
4796 0 : _mem_save_pReserved3_0 = NDR_PULL_GET_MEM_CTX(ndr);
4797 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pReserved3, 0);
4798 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pReserved3));
4799 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pReserved3));
4800 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pReserved3, &size_pReserved3_1));
4801 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pReserved3, &length_pReserved3_1));
4802 0 : if (length_pReserved3_1 > size_pReserved3_1) {
4803 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pReserved3_1, length_pReserved3_1);
4804 : }
4805 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pReserved3_1, sizeof(uint8_t)));
4806 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pReserved3, length_pReserved3_1, sizeof(uint8_t), CH_UTF8));
4807 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReserved3_0, 0);
4808 : }
4809 0 : if (r->pReserved4) {
4810 0 : _mem_save_pReserved4_0 = NDR_PULL_GET_MEM_CTX(ndr);
4811 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pReserved4, 0);
4812 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pReserved4));
4813 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pReserved4));
4814 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pReserved4, &size_pReserved4_1));
4815 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pReserved4, &length_pReserved4_1));
4816 0 : if (length_pReserved4_1 > size_pReserved4_1) {
4817 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pReserved4_1, length_pReserved4_1);
4818 : }
4819 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pReserved4_1, sizeof(uint8_t)));
4820 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pReserved4, length_pReserved4_1, sizeof(uint8_t), CH_UTF8));
4821 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReserved4_0, 0);
4822 : }
4823 : }
4824 0 : return NDR_ERR_SUCCESS;
4825 : }
4826 :
4827 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)
4828 : {
4829 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_INFO_DOTNET");
4830 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4831 0 : ndr->depth++;
4832 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
4833 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
4834 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
4835 0 : ndr->depth++;
4836 0 : if (r->pszZoneName) {
4837 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
4838 : }
4839 0 : ndr->depth--;
4840 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
4841 0 : ndr_print_uint32(ndr, "fReverse", r->fReverse);
4842 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
4843 0 : ndr_print_uint32(ndr, "fPaused", r->fPaused);
4844 0 : ndr_print_uint32(ndr, "fShutdown", r->fShutdown);
4845 0 : ndr_print_uint32(ndr, "fAutoCreated", r->fAutoCreated);
4846 0 : ndr_print_uint32(ndr, "fUseDatabase", r->fUseDatabase);
4847 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
4848 0 : ndr->depth++;
4849 0 : if (r->pszDataFile) {
4850 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
4851 : }
4852 0 : ndr->depth--;
4853 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
4854 0 : ndr->depth++;
4855 0 : if (r->aipMasters) {
4856 0 : ndr_print_IP4_ARRAY(ndr, "aipMasters", r->aipMasters);
4857 : }
4858 0 : ndr->depth--;
4859 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
4860 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
4861 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
4862 0 : ndr->depth++;
4863 0 : if (r->aipSecondaries) {
4864 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
4865 : }
4866 0 : ndr->depth--;
4867 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
4868 0 : ndr->depth++;
4869 0 : if (r->aipNotify) {
4870 0 : ndr_print_IP4_ARRAY(ndr, "aipNotify", r->aipNotify);
4871 : }
4872 0 : ndr->depth--;
4873 0 : ndr_print_uint32(ndr, "fUseWins", r->fUseWins);
4874 0 : ndr_print_uint32(ndr, "fUseNbstat", r->fUseNbstat);
4875 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
4876 0 : ndr_print_uint32(ndr, "dwNoRefreshInterval", r->dwNoRefreshInterval);
4877 0 : ndr_print_uint32(ndr, "dwRefreshInterval", r->dwRefreshInterval);
4878 0 : ndr_print_uint32(ndr, "dwAvailForScavengeTime", r->dwAvailForScavengeTime);
4879 0 : ndr_print_ptr(ndr, "aipScavengeServers", r->aipScavengeServers);
4880 0 : ndr->depth++;
4881 0 : if (r->aipScavengeServers) {
4882 0 : ndr_print_IP4_ARRAY(ndr, "aipScavengeServers", r->aipScavengeServers);
4883 : }
4884 0 : ndr->depth--;
4885 0 : ndr_print_uint32(ndr, "dwForwarderTimeout", r->dwForwarderTimeout);
4886 0 : ndr_print_uint32(ndr, "fForwarderSlave", r->fForwarderSlave);
4887 0 : ndr_print_ptr(ndr, "aipLocalMasters", r->aipLocalMasters);
4888 0 : ndr->depth++;
4889 0 : if (r->aipLocalMasters) {
4890 0 : ndr_print_IP4_ARRAY(ndr, "aipLocalMasters", r->aipLocalMasters);
4891 : }
4892 0 : ndr->depth--;
4893 0 : ndr_print_uint32(ndr, "dwDpFlags", r->dwDpFlags);
4894 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
4895 0 : ndr->depth++;
4896 0 : if (r->pszDpFqdn) {
4897 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
4898 : }
4899 0 : ndr->depth--;
4900 0 : ndr_print_ptr(ndr, "pwszZoneDn", r->pwszZoneDn);
4901 0 : ndr->depth++;
4902 0 : if (r->pwszZoneDn) {
4903 0 : ndr_print_string(ndr, "pwszZoneDn", r->pwszZoneDn);
4904 : }
4905 0 : ndr->depth--;
4906 0 : ndr_print_uint32(ndr, "dwLastSuccessfulSoaCheck", r->dwLastSuccessfulSoaCheck);
4907 0 : ndr_print_uint32(ndr, "dwLastSuccessfulXfr", r->dwLastSuccessfulXfr);
4908 0 : ndr_print_uint32(ndr, "dwReserved1", r->dwReserved1);
4909 0 : ndr_print_uint32(ndr, "dwReserved2", r->dwReserved2);
4910 0 : ndr_print_uint32(ndr, "dwReserved3", r->dwReserved3);
4911 0 : ndr_print_uint32(ndr, "dwReserved4", r->dwReserved4);
4912 0 : ndr_print_uint32(ndr, "dwReserved5", r->dwReserved5);
4913 0 : ndr_print_ptr(ndr, "pReserved1", r->pReserved1);
4914 0 : ndr->depth++;
4915 0 : if (r->pReserved1) {
4916 0 : ndr_print_string(ndr, "pReserved1", r->pReserved1);
4917 : }
4918 0 : ndr->depth--;
4919 0 : ndr_print_ptr(ndr, "pReserved2", r->pReserved2);
4920 0 : ndr->depth++;
4921 0 : if (r->pReserved2) {
4922 0 : ndr_print_string(ndr, "pReserved2", r->pReserved2);
4923 : }
4924 0 : ndr->depth--;
4925 0 : ndr_print_ptr(ndr, "pReserved3", r->pReserved3);
4926 0 : ndr->depth++;
4927 0 : if (r->pReserved3) {
4928 0 : ndr_print_string(ndr, "pReserved3", r->pReserved3);
4929 : }
4930 0 : ndr->depth--;
4931 0 : ndr_print_ptr(ndr, "pReserved4", r->pReserved4);
4932 0 : ndr->depth++;
4933 0 : if (r->pReserved4) {
4934 0 : ndr_print_string(ndr, "pReserved4", r->pReserved4);
4935 : }
4936 0 : ndr->depth--;
4937 0 : ndr->depth--;
4938 : }
4939 :
4940 15 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_INFO_LONGHORN(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_INFO_LONGHORN *r)
4941 : {
4942 15 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4943 15 : if (ndr_flags & NDR_SCALARS) {
4944 15 : NDR_CHECK(ndr_push_align(ndr, 5));
4945 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
4946 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
4947 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
4948 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
4949 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fReverse));
4950 15 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
4951 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fPaused));
4952 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fShutdown));
4953 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAutoCreated));
4954 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseDatabase));
4955 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
4956 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
4957 15 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
4958 15 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
4959 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
4960 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
4961 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseWins));
4962 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fUseNbstat));
4963 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
4964 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNoRefreshInterval));
4965 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRefreshInterval));
4966 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwAvailForScavengeTime));
4967 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipScavengeServers));
4968 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwarderTimeout));
4969 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fForwarderSlave));
4970 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipLocalMasters));
4971 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDpFlags));
4972 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
4973 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwszZoneDn));
4974 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastSuccessfulSoaCheck));
4975 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastSuccessfulXfr));
4976 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fQueuedForBackgroundLoad));
4977 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fBackgroundLoadInProgress));
4978 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fReadOnlyZone));
4979 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastXfrAttempt));
4980 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwLastXfrResult));
4981 15 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4982 : }
4983 15 : if (ndr_flags & NDR_BUFFERS) {
4984 15 : if (r->pszZoneName) {
4985 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4986 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4987 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
4988 15 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4989 : }
4990 15 : if (r->pszDataFile) {
4991 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4992 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4993 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
4994 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
4995 : }
4996 15 : if (r->aipMasters) {
4997 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
4998 : }
4999 15 : if (r->aipSecondaries) {
5000 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5001 : }
5002 15 : if (r->aipNotify) {
5003 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5004 : }
5005 15 : if (r->aipScavengeServers) {
5006 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
5007 : }
5008 15 : if (r->aipLocalMasters) {
5009 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipLocalMasters));
5010 : }
5011 15 : if (r->pszDpFqdn) {
5012 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
5013 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5014 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
5015 15 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5016 : }
5017 15 : if (r->pwszZoneDn) {
5018 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszZoneDn, CH_UTF16)));
5019 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5020 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pwszZoneDn, CH_UTF16)));
5021 15 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pwszZoneDn, ndr_charset_length(r->pwszZoneDn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5022 : }
5023 : }
5024 15 : return NDR_ERR_SUCCESS;
5025 : }
5026 :
5027 15 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_INFO_LONGHORN(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_INFO_LONGHORN *r)
5028 : {
5029 : uint32_t _ptr_pszZoneName;
5030 15 : uint32_t size_pszZoneName_1 = 0;
5031 15 : uint32_t length_pszZoneName_1 = 0;
5032 15 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
5033 : uint32_t _ptr_pszDataFile;
5034 15 : uint32_t size_pszDataFile_1 = 0;
5035 15 : uint32_t length_pszDataFile_1 = 0;
5036 15 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
5037 : uint32_t _ptr_aipMasters;
5038 15 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
5039 : uint32_t _ptr_aipSecondaries;
5040 15 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
5041 : uint32_t _ptr_aipNotify;
5042 15 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
5043 : uint32_t _ptr_aipScavengeServers;
5044 15 : TALLOC_CTX *_mem_save_aipScavengeServers_0 = NULL;
5045 : uint32_t _ptr_aipLocalMasters;
5046 15 : TALLOC_CTX *_mem_save_aipLocalMasters_0 = NULL;
5047 : uint32_t _ptr_pszDpFqdn;
5048 15 : uint32_t size_pszDpFqdn_1 = 0;
5049 15 : uint32_t length_pszDpFqdn_1 = 0;
5050 15 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
5051 : uint32_t _ptr_pwszZoneDn;
5052 15 : uint32_t size_pwszZoneDn_1 = 0;
5053 15 : uint32_t length_pwszZoneDn_1 = 0;
5054 15 : TALLOC_CTX *_mem_save_pwszZoneDn_0 = NULL;
5055 15 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5056 15 : if (ndr_flags & NDR_SCALARS) {
5057 15 : NDR_CHECK(ndr_pull_align(ndr, 5));
5058 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
5059 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
5060 15 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
5061 15 : if (_ptr_pszZoneName) {
5062 15 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
5063 : } else {
5064 0 : r->pszZoneName = NULL;
5065 : }
5066 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
5067 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fReverse));
5068 15 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
5069 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fPaused));
5070 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fShutdown));
5071 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAutoCreated));
5072 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseDatabase));
5073 15 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
5074 15 : if (_ptr_pszDataFile) {
5075 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
5076 : } else {
5077 15 : r->pszDataFile = NULL;
5078 : }
5079 15 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
5080 15 : if (_ptr_aipMasters) {
5081 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
5082 : } else {
5083 15 : r->aipMasters = NULL;
5084 : }
5085 15 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
5086 15 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
5087 15 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
5088 15 : if (_ptr_aipSecondaries) {
5089 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
5090 : } else {
5091 15 : r->aipSecondaries = NULL;
5092 : }
5093 15 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
5094 15 : if (_ptr_aipNotify) {
5095 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
5096 : } else {
5097 15 : r->aipNotify = NULL;
5098 : }
5099 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseWins));
5100 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fUseNbstat));
5101 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
5102 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNoRefreshInterval));
5103 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRefreshInterval));
5104 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwAvailForScavengeTime));
5105 15 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipScavengeServers));
5106 15 : if (_ptr_aipScavengeServers) {
5107 0 : NDR_PULL_ALLOC(ndr, r->aipScavengeServers);
5108 : } else {
5109 15 : r->aipScavengeServers = NULL;
5110 : }
5111 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwarderTimeout));
5112 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fForwarderSlave));
5113 15 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipLocalMasters));
5114 15 : if (_ptr_aipLocalMasters) {
5115 0 : NDR_PULL_ALLOC(ndr, r->aipLocalMasters);
5116 : } else {
5117 15 : r->aipLocalMasters = NULL;
5118 : }
5119 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDpFlags));
5120 15 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
5121 15 : if (_ptr_pszDpFqdn) {
5122 15 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
5123 : } else {
5124 0 : r->pszDpFqdn = NULL;
5125 : }
5126 15 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszZoneDn));
5127 15 : if (_ptr_pwszZoneDn) {
5128 15 : NDR_PULL_ALLOC(ndr, r->pwszZoneDn);
5129 : } else {
5130 0 : r->pwszZoneDn = NULL;
5131 : }
5132 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastSuccessfulSoaCheck));
5133 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastSuccessfulXfr));
5134 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fQueuedForBackgroundLoad));
5135 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fBackgroundLoadInProgress));
5136 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fReadOnlyZone));
5137 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastXfrAttempt));
5138 15 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwLastXfrResult));
5139 15 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5140 : }
5141 15 : if (ndr_flags & NDR_BUFFERS) {
5142 15 : if (r->pszZoneName) {
5143 15 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5144 15 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
5145 15 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
5146 15 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
5147 15 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
5148 15 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
5149 15 : if (length_pszZoneName_1 > size_pszZoneName_1) {
5150 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZoneName_1, length_pszZoneName_1);
5151 : }
5152 15 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
5153 15 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
5154 15 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
5155 : }
5156 15 : if (r->pszDataFile) {
5157 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
5158 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
5159 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
5160 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
5161 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
5162 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
5163 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
5164 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDataFile_1, length_pszDataFile_1);
5165 : }
5166 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
5167 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
5168 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
5169 : }
5170 15 : if (r->aipMasters) {
5171 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
5172 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
5173 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
5174 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
5175 : }
5176 15 : if (r->aipSecondaries) {
5177 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5178 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
5179 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5180 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
5181 : }
5182 15 : if (r->aipNotify) {
5183 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
5184 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
5185 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5186 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
5187 : }
5188 15 : if (r->aipScavengeServers) {
5189 0 : _mem_save_aipScavengeServers_0 = NDR_PULL_GET_MEM_CTX(ndr);
5190 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipScavengeServers, 0);
5191 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipScavengeServers));
5192 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipScavengeServers_0, 0);
5193 : }
5194 15 : if (r->aipLocalMasters) {
5195 0 : _mem_save_aipLocalMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
5196 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipLocalMasters, 0);
5197 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipLocalMasters));
5198 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipLocalMasters_0, 0);
5199 : }
5200 15 : if (r->pszDpFqdn) {
5201 15 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
5202 15 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
5203 15 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
5204 15 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
5205 15 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
5206 15 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
5207 15 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
5208 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDpFqdn_1, length_pszDpFqdn_1);
5209 : }
5210 15 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
5211 15 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
5212 15 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
5213 : }
5214 15 : if (r->pwszZoneDn) {
5215 15 : _mem_save_pwszZoneDn_0 = NDR_PULL_GET_MEM_CTX(ndr);
5216 15 : NDR_PULL_SET_MEM_CTX(ndr, r->pwszZoneDn, 0);
5217 15 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pwszZoneDn));
5218 15 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pwszZoneDn));
5219 15 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pwszZoneDn, &size_pwszZoneDn_1));
5220 15 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pwszZoneDn, &length_pwszZoneDn_1));
5221 15 : if (length_pwszZoneDn_1 > size_pwszZoneDn_1) {
5222 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszZoneDn_1, length_pwszZoneDn_1);
5223 : }
5224 15 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszZoneDn_1, sizeof(uint16_t)));
5225 15 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pwszZoneDn, length_pwszZoneDn_1, sizeof(uint16_t), CH_UTF16));
5226 15 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszZoneDn_0, 0);
5227 : }
5228 : }
5229 15 : return NDR_ERR_SUCCESS;
5230 : }
5231 :
5232 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)
5233 : {
5234 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_INFO_LONGHORN");
5235 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5236 0 : ndr->depth++;
5237 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
5238 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
5239 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
5240 0 : ndr->depth++;
5241 0 : if (r->pszZoneName) {
5242 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
5243 : }
5244 0 : ndr->depth--;
5245 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
5246 0 : ndr_print_uint32(ndr, "fReverse", r->fReverse);
5247 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
5248 0 : ndr_print_uint32(ndr, "fPaused", r->fPaused);
5249 0 : ndr_print_uint32(ndr, "fShutdown", r->fShutdown);
5250 0 : ndr_print_uint32(ndr, "fAutoCreated", r->fAutoCreated);
5251 0 : ndr_print_uint32(ndr, "fUseDatabase", r->fUseDatabase);
5252 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
5253 0 : ndr->depth++;
5254 0 : if (r->pszDataFile) {
5255 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
5256 : }
5257 0 : ndr->depth--;
5258 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
5259 0 : ndr->depth++;
5260 0 : if (r->aipMasters) {
5261 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipMasters", r->aipMasters);
5262 : }
5263 0 : ndr->depth--;
5264 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
5265 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
5266 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
5267 0 : ndr->depth++;
5268 0 : if (r->aipSecondaries) {
5269 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
5270 : }
5271 0 : ndr->depth--;
5272 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
5273 0 : ndr->depth++;
5274 0 : if (r->aipNotify) {
5275 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipNotify", r->aipNotify);
5276 : }
5277 0 : ndr->depth--;
5278 0 : ndr_print_uint32(ndr, "fUseWins", r->fUseWins);
5279 0 : ndr_print_uint32(ndr, "fUseNbstat", r->fUseNbstat);
5280 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
5281 0 : ndr_print_uint32(ndr, "dwNoRefreshInterval", r->dwNoRefreshInterval);
5282 0 : ndr_print_uint32(ndr, "dwRefreshInterval", r->dwRefreshInterval);
5283 0 : ndr_print_uint32(ndr, "dwAvailForScavengeTime", r->dwAvailForScavengeTime);
5284 0 : ndr_print_ptr(ndr, "aipScavengeServers", r->aipScavengeServers);
5285 0 : ndr->depth++;
5286 0 : if (r->aipScavengeServers) {
5287 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipScavengeServers", r->aipScavengeServers);
5288 : }
5289 0 : ndr->depth--;
5290 0 : ndr_print_uint32(ndr, "dwForwarderTimeout", r->dwForwarderTimeout);
5291 0 : ndr_print_uint32(ndr, "fForwarderSlave", r->fForwarderSlave);
5292 0 : ndr_print_ptr(ndr, "aipLocalMasters", r->aipLocalMasters);
5293 0 : ndr->depth++;
5294 0 : if (r->aipLocalMasters) {
5295 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipLocalMasters", r->aipLocalMasters);
5296 : }
5297 0 : ndr->depth--;
5298 0 : ndr_print_uint32(ndr, "dwDpFlags", r->dwDpFlags);
5299 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
5300 0 : ndr->depth++;
5301 0 : if (r->pszDpFqdn) {
5302 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
5303 : }
5304 0 : ndr->depth--;
5305 0 : ndr_print_ptr(ndr, "pwszZoneDn", r->pwszZoneDn);
5306 0 : ndr->depth++;
5307 0 : if (r->pwszZoneDn) {
5308 0 : ndr_print_string(ndr, "pwszZoneDn", r->pwszZoneDn);
5309 : }
5310 0 : ndr->depth--;
5311 0 : ndr_print_uint32(ndr, "dwLastSuccessfulSoaCheck", r->dwLastSuccessfulSoaCheck);
5312 0 : ndr_print_uint32(ndr, "dwLastSuccessfulXfr", r->dwLastSuccessfulXfr);
5313 0 : ndr_print_uint32(ndr, "fQueuedForBackgroundLoad", r->fQueuedForBackgroundLoad);
5314 0 : ndr_print_uint32(ndr, "fBackgroundLoadInProgress", r->fBackgroundLoadInProgress);
5315 0 : ndr_print_uint32(ndr, "fReadOnlyZone", r->fReadOnlyZone);
5316 0 : ndr_print_uint32(ndr, "dwLastXfrAttempt", r->dwLastXfrAttempt);
5317 0 : ndr_print_uint32(ndr, "dwLastXfrResult", r->dwLastXfrResult);
5318 0 : ndr->depth--;
5319 : }
5320 :
5321 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_SECONDARIES_W2K(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_SECONDARIES_W2K *r)
5322 : {
5323 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5324 0 : if (ndr_flags & NDR_SCALARS) {
5325 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5326 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
5327 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
5328 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
5329 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
5330 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5331 : }
5332 0 : if (ndr_flags & NDR_BUFFERS) {
5333 0 : if (r->aipSecondaries) {
5334 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5335 : }
5336 0 : if (r->aipNotify) {
5337 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5338 : }
5339 : }
5340 0 : return NDR_ERR_SUCCESS;
5341 : }
5342 :
5343 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_SECONDARIES_W2K(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_SECONDARIES_W2K *r)
5344 : {
5345 : uint32_t _ptr_aipSecondaries;
5346 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
5347 : uint32_t _ptr_aipNotify;
5348 0 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
5349 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5350 0 : if (ndr_flags & NDR_SCALARS) {
5351 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5352 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
5353 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
5354 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
5355 0 : if (_ptr_aipSecondaries) {
5356 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
5357 : } else {
5358 0 : r->aipSecondaries = NULL;
5359 : }
5360 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
5361 0 : if (_ptr_aipNotify) {
5362 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
5363 : } else {
5364 0 : r->aipNotify = NULL;
5365 : }
5366 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5367 : }
5368 0 : if (ndr_flags & NDR_BUFFERS) {
5369 0 : if (r->aipSecondaries) {
5370 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5371 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
5372 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5373 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
5374 : }
5375 0 : if (r->aipNotify) {
5376 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
5377 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
5378 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5379 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
5380 : }
5381 : }
5382 0 : return NDR_ERR_SUCCESS;
5383 : }
5384 :
5385 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)
5386 : {
5387 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_SECONDARIES_W2K");
5388 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5389 0 : ndr->depth++;
5390 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
5391 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
5392 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
5393 0 : ndr->depth++;
5394 0 : if (r->aipSecondaries) {
5395 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
5396 : }
5397 0 : ndr->depth--;
5398 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
5399 0 : ndr->depth++;
5400 0 : if (r->aipNotify) {
5401 0 : ndr_print_IP4_ARRAY(ndr, "aipNotify", r->aipNotify);
5402 : }
5403 0 : ndr->depth--;
5404 0 : ndr->depth--;
5405 : }
5406 :
5407 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_SECONDARIES_DOTNET(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_SECONDARIES_DOTNET *r)
5408 : {
5409 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5410 0 : if (ndr_flags & NDR_SCALARS) {
5411 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5412 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
5413 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
5414 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
5415 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
5416 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
5417 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
5418 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5419 : }
5420 0 : if (ndr_flags & NDR_BUFFERS) {
5421 0 : if (r->aipSecondaries) {
5422 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5423 : }
5424 0 : if (r->aipNotify) {
5425 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5426 : }
5427 : }
5428 0 : return NDR_ERR_SUCCESS;
5429 : }
5430 :
5431 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_SECONDARIES_DOTNET(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_SECONDARIES_DOTNET *r)
5432 : {
5433 : uint32_t _ptr_aipSecondaries;
5434 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
5435 : uint32_t _ptr_aipNotify;
5436 0 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
5437 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5438 0 : if (ndr_flags & NDR_SCALARS) {
5439 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5440 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
5441 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
5442 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
5443 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
5444 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
5445 0 : if (_ptr_aipSecondaries) {
5446 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
5447 : } else {
5448 0 : r->aipSecondaries = NULL;
5449 : }
5450 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
5451 0 : if (_ptr_aipNotify) {
5452 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
5453 : } else {
5454 0 : r->aipNotify = NULL;
5455 : }
5456 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5457 : }
5458 0 : if (ndr_flags & NDR_BUFFERS) {
5459 0 : if (r->aipSecondaries) {
5460 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5461 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
5462 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5463 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
5464 : }
5465 0 : if (r->aipNotify) {
5466 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
5467 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
5468 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5469 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
5470 : }
5471 : }
5472 0 : return NDR_ERR_SUCCESS;
5473 : }
5474 :
5475 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)
5476 : {
5477 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_SECONDARIES_DOTNET");
5478 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5479 0 : ndr->depth++;
5480 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
5481 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
5482 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
5483 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
5484 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
5485 0 : ndr->depth++;
5486 0 : if (r->aipSecondaries) {
5487 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
5488 : }
5489 0 : ndr->depth--;
5490 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
5491 0 : ndr->depth++;
5492 0 : if (r->aipNotify) {
5493 0 : ndr_print_IP4_ARRAY(ndr, "aipNotify", r->aipNotify);
5494 : }
5495 0 : ndr->depth--;
5496 0 : ndr->depth--;
5497 : }
5498 :
5499 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_SECONDARIES_LONGHORN(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *r)
5500 : {
5501 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5502 0 : if (ndr_flags & NDR_SCALARS) {
5503 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5504 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
5505 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
5506 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
5507 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
5508 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
5509 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipNotify));
5510 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5511 : }
5512 0 : if (ndr_flags & NDR_BUFFERS) {
5513 0 : if (r->aipSecondaries) {
5514 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5515 : }
5516 0 : if (r->aipNotify) {
5517 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5518 : }
5519 : }
5520 0 : return NDR_ERR_SUCCESS;
5521 : }
5522 :
5523 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_SECONDARIES_LONGHORN(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *r)
5524 : {
5525 : uint32_t _ptr_aipSecondaries;
5526 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
5527 : uint32_t _ptr_aipNotify;
5528 0 : TALLOC_CTX *_mem_save_aipNotify_0 = NULL;
5529 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5530 0 : if (ndr_flags & NDR_SCALARS) {
5531 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5532 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
5533 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
5534 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
5535 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
5536 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
5537 0 : if (_ptr_aipSecondaries) {
5538 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
5539 : } else {
5540 0 : r->aipSecondaries = NULL;
5541 : }
5542 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipNotify));
5543 0 : if (_ptr_aipNotify) {
5544 0 : NDR_PULL_ALLOC(ndr, r->aipNotify);
5545 : } else {
5546 0 : r->aipNotify = NULL;
5547 : }
5548 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5549 : }
5550 0 : if (ndr_flags & NDR_BUFFERS) {
5551 0 : if (r->aipSecondaries) {
5552 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5553 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
5554 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5555 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
5556 : }
5557 0 : if (r->aipNotify) {
5558 0 : _mem_save_aipNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
5559 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipNotify, 0);
5560 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipNotify));
5561 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipNotify_0, 0);
5562 : }
5563 : }
5564 0 : return NDR_ERR_SUCCESS;
5565 : }
5566 :
5567 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)
5568 : {
5569 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_SECONDARIES_LONGHORN");
5570 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5571 0 : ndr->depth++;
5572 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
5573 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
5574 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
5575 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
5576 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
5577 0 : ndr->depth++;
5578 0 : if (r->aipSecondaries) {
5579 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
5580 : }
5581 0 : ndr->depth--;
5582 0 : ndr_print_ptr(ndr, "aipNotify", r->aipNotify);
5583 0 : ndr->depth++;
5584 0 : if (r->aipNotify) {
5585 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipNotify", r->aipNotify);
5586 : }
5587 0 : ndr->depth--;
5588 0 : ndr->depth--;
5589 : }
5590 :
5591 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_DATABASE_W2K(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_DATABASE_W2K *r)
5592 : {
5593 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5594 0 : if (ndr_flags & NDR_SCALARS) {
5595 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5596 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDsIntegrated));
5597 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszFileName));
5598 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5599 : }
5600 0 : if (ndr_flags & NDR_BUFFERS) {
5601 0 : if (r->pszFileName) {
5602 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszFileName, CH_UTF8)));
5603 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5604 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszFileName, CH_UTF8)));
5605 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszFileName, ndr_charset_length(r->pszFileName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5606 : }
5607 : }
5608 0 : return NDR_ERR_SUCCESS;
5609 : }
5610 :
5611 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_DATABASE_W2K(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_DATABASE_W2K *r)
5612 : {
5613 : uint32_t _ptr_pszFileName;
5614 0 : uint32_t size_pszFileName_1 = 0;
5615 0 : uint32_t length_pszFileName_1 = 0;
5616 0 : TALLOC_CTX *_mem_save_pszFileName_0 = NULL;
5617 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5618 0 : if (ndr_flags & NDR_SCALARS) {
5619 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5620 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDsIntegrated));
5621 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFileName));
5622 0 : if (_ptr_pszFileName) {
5623 0 : NDR_PULL_ALLOC(ndr, r->pszFileName);
5624 : } else {
5625 0 : r->pszFileName = NULL;
5626 : }
5627 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5628 : }
5629 0 : if (ndr_flags & NDR_BUFFERS) {
5630 0 : if (r->pszFileName) {
5631 0 : _mem_save_pszFileName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5632 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszFileName, 0);
5633 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszFileName));
5634 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszFileName));
5635 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszFileName, &size_pszFileName_1));
5636 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszFileName, &length_pszFileName_1));
5637 0 : if (length_pszFileName_1 > size_pszFileName_1) {
5638 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszFileName_1, length_pszFileName_1);
5639 : }
5640 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFileName_1, sizeof(uint8_t)));
5641 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszFileName, length_pszFileName_1, sizeof(uint8_t), CH_UTF8));
5642 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFileName_0, 0);
5643 : }
5644 : }
5645 0 : return NDR_ERR_SUCCESS;
5646 : }
5647 :
5648 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)
5649 : {
5650 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_DATABASE_W2K");
5651 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5652 0 : ndr->depth++;
5653 0 : ndr_print_uint32(ndr, "fDsIntegrated", r->fDsIntegrated);
5654 0 : ndr_print_ptr(ndr, "pszFileName", r->pszFileName);
5655 0 : ndr->depth++;
5656 0 : if (r->pszFileName) {
5657 0 : ndr_print_string(ndr, "pszFileName", r->pszFileName);
5658 : }
5659 0 : ndr->depth--;
5660 0 : ndr->depth--;
5661 : }
5662 :
5663 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_DATABASE_DOTNET(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_DATABASE_DOTNET *r)
5664 : {
5665 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5666 0 : if (ndr_flags & NDR_SCALARS) {
5667 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5668 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
5669 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
5670 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDsIntegrated));
5671 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszFileName));
5672 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5673 : }
5674 0 : if (ndr_flags & NDR_BUFFERS) {
5675 0 : if (r->pszFileName) {
5676 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszFileName, CH_UTF8)));
5677 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5678 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszFileName, CH_UTF8)));
5679 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszFileName, ndr_charset_length(r->pszFileName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5680 : }
5681 : }
5682 0 : return NDR_ERR_SUCCESS;
5683 : }
5684 :
5685 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_DATABASE_DOTNET(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_DATABASE_DOTNET *r)
5686 : {
5687 : uint32_t _ptr_pszFileName;
5688 0 : uint32_t size_pszFileName_1 = 0;
5689 0 : uint32_t length_pszFileName_1 = 0;
5690 0 : TALLOC_CTX *_mem_save_pszFileName_0 = NULL;
5691 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5692 0 : if (ndr_flags & NDR_SCALARS) {
5693 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5694 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
5695 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
5696 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDsIntegrated));
5697 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFileName));
5698 0 : if (_ptr_pszFileName) {
5699 0 : NDR_PULL_ALLOC(ndr, r->pszFileName);
5700 : } else {
5701 0 : r->pszFileName = NULL;
5702 : }
5703 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5704 : }
5705 0 : if (ndr_flags & NDR_BUFFERS) {
5706 0 : if (r->pszFileName) {
5707 0 : _mem_save_pszFileName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5708 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszFileName, 0);
5709 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszFileName));
5710 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszFileName));
5711 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszFileName, &size_pszFileName_1));
5712 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszFileName, &length_pszFileName_1));
5713 0 : if (length_pszFileName_1 > size_pszFileName_1) {
5714 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszFileName_1, length_pszFileName_1);
5715 : }
5716 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFileName_1, sizeof(uint8_t)));
5717 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszFileName, length_pszFileName_1, sizeof(uint8_t), CH_UTF8));
5718 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFileName_0, 0);
5719 : }
5720 : }
5721 0 : return NDR_ERR_SUCCESS;
5722 : }
5723 :
5724 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)
5725 : {
5726 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_DATABASE_DOTNET");
5727 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5728 0 : ndr->depth++;
5729 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
5730 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
5731 0 : ndr_print_uint32(ndr, "fDsIntegrated", r->fDsIntegrated);
5732 0 : ndr_print_ptr(ndr, "pszFileName", r->pszFileName);
5733 0 : ndr->depth++;
5734 0 : if (r->pszFileName) {
5735 0 : ndr_print_string(ndr, "pszFileName", r->pszFileName);
5736 : }
5737 0 : ndr->depth--;
5738 0 : ndr->depth--;
5739 : }
5740 :
5741 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_CREATE_INFO_W2K(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_CREATE_INFO_W2K *r)
5742 : {
5743 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5744 0 : if (ndr_flags & NDR_SCALARS) {
5745 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5746 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
5747 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
5748 0 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
5749 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
5750 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
5751 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
5752 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDsIntegrated));
5753 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fLoadExisting));
5754 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszAdmin));
5755 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
5756 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
5757 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
5758 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
5759 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved1));
5760 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved2));
5761 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved3));
5762 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved4));
5763 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved5));
5764 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved6));
5765 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved7));
5766 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pvReserved8));
5767 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved1));
5768 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved2));
5769 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved3));
5770 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved4));
5771 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved5));
5772 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved6));
5773 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved7));
5774 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved8));
5775 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5776 : }
5777 0 : if (ndr_flags & NDR_BUFFERS) {
5778 0 : if (r->pszZoneName) {
5779 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
5780 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5781 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
5782 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5783 : }
5784 0 : if (r->pszDataFile) {
5785 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
5786 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5787 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
5788 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5789 : }
5790 0 : if (r->pszAdmin) {
5791 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
5792 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5793 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
5794 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszAdmin, ndr_charset_length(r->pszAdmin, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5795 : }
5796 0 : if (r->aipMasters) {
5797 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
5798 : }
5799 0 : if (r->aipSecondaries) {
5800 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
5801 : }
5802 0 : if (r->pvReserved1) {
5803 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved1, CH_UTF8)));
5804 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5805 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved1, CH_UTF8)));
5806 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved1, ndr_charset_length(r->pvReserved1, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5807 : }
5808 0 : if (r->pvReserved2) {
5809 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved2, CH_UTF8)));
5810 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5811 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved2, CH_UTF8)));
5812 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved2, ndr_charset_length(r->pvReserved2, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5813 : }
5814 0 : if (r->pvReserved3) {
5815 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved3, CH_UTF8)));
5816 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5817 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved3, CH_UTF8)));
5818 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved3, ndr_charset_length(r->pvReserved3, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5819 : }
5820 0 : if (r->pvReserved4) {
5821 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved4, CH_UTF8)));
5822 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5823 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved4, CH_UTF8)));
5824 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved4, ndr_charset_length(r->pvReserved4, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5825 : }
5826 0 : if (r->pvReserved5) {
5827 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved5, CH_UTF8)));
5828 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5829 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved5, CH_UTF8)));
5830 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved5, ndr_charset_length(r->pvReserved5, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5831 : }
5832 0 : if (r->pvReserved6) {
5833 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved6, CH_UTF8)));
5834 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5835 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved6, CH_UTF8)));
5836 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved6, ndr_charset_length(r->pvReserved6, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5837 : }
5838 0 : if (r->pvReserved7) {
5839 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved7, CH_UTF8)));
5840 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5841 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved7, CH_UTF8)));
5842 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved7, ndr_charset_length(r->pvReserved7, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5843 : }
5844 0 : if (r->pvReserved8) {
5845 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved8, CH_UTF8)));
5846 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5847 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pvReserved8, CH_UTF8)));
5848 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pvReserved8, ndr_charset_length(r->pvReserved8, CH_UTF8), sizeof(uint8_t), CH_UTF8));
5849 : }
5850 : }
5851 0 : return NDR_ERR_SUCCESS;
5852 : }
5853 :
5854 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_CREATE_INFO_W2K(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_CREATE_INFO_W2K *r)
5855 : {
5856 : uint32_t _ptr_pszZoneName;
5857 0 : uint32_t size_pszZoneName_1 = 0;
5858 0 : uint32_t length_pszZoneName_1 = 0;
5859 0 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
5860 : uint32_t _ptr_pszDataFile;
5861 0 : uint32_t size_pszDataFile_1 = 0;
5862 0 : uint32_t length_pszDataFile_1 = 0;
5863 0 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
5864 : uint32_t _ptr_pszAdmin;
5865 0 : uint32_t size_pszAdmin_1 = 0;
5866 0 : uint32_t length_pszAdmin_1 = 0;
5867 0 : TALLOC_CTX *_mem_save_pszAdmin_0 = NULL;
5868 : uint32_t _ptr_aipMasters;
5869 0 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
5870 : uint32_t _ptr_aipSecondaries;
5871 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
5872 : uint32_t _ptr_pvReserved1;
5873 0 : uint32_t size_pvReserved1_1 = 0;
5874 0 : uint32_t length_pvReserved1_1 = 0;
5875 0 : TALLOC_CTX *_mem_save_pvReserved1_0 = NULL;
5876 : uint32_t _ptr_pvReserved2;
5877 0 : uint32_t size_pvReserved2_1 = 0;
5878 0 : uint32_t length_pvReserved2_1 = 0;
5879 0 : TALLOC_CTX *_mem_save_pvReserved2_0 = NULL;
5880 : uint32_t _ptr_pvReserved3;
5881 0 : uint32_t size_pvReserved3_1 = 0;
5882 0 : uint32_t length_pvReserved3_1 = 0;
5883 0 : TALLOC_CTX *_mem_save_pvReserved3_0 = NULL;
5884 : uint32_t _ptr_pvReserved4;
5885 0 : uint32_t size_pvReserved4_1 = 0;
5886 0 : uint32_t length_pvReserved4_1 = 0;
5887 0 : TALLOC_CTX *_mem_save_pvReserved4_0 = NULL;
5888 : uint32_t _ptr_pvReserved5;
5889 0 : uint32_t size_pvReserved5_1 = 0;
5890 0 : uint32_t length_pvReserved5_1 = 0;
5891 0 : TALLOC_CTX *_mem_save_pvReserved5_0 = NULL;
5892 : uint32_t _ptr_pvReserved6;
5893 0 : uint32_t size_pvReserved6_1 = 0;
5894 0 : uint32_t length_pvReserved6_1 = 0;
5895 0 : TALLOC_CTX *_mem_save_pvReserved6_0 = NULL;
5896 : uint32_t _ptr_pvReserved7;
5897 0 : uint32_t size_pvReserved7_1 = 0;
5898 0 : uint32_t length_pvReserved7_1 = 0;
5899 0 : TALLOC_CTX *_mem_save_pvReserved7_0 = NULL;
5900 : uint32_t _ptr_pvReserved8;
5901 0 : uint32_t size_pvReserved8_1 = 0;
5902 0 : uint32_t length_pvReserved8_1 = 0;
5903 0 : TALLOC_CTX *_mem_save_pvReserved8_0 = NULL;
5904 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5905 0 : if (ndr_flags & NDR_SCALARS) {
5906 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5907 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
5908 0 : if (_ptr_pszZoneName) {
5909 0 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
5910 : } else {
5911 0 : r->pszZoneName = NULL;
5912 : }
5913 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
5914 0 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
5915 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
5916 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
5917 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
5918 0 : if (_ptr_pszDataFile) {
5919 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
5920 : } else {
5921 0 : r->pszDataFile = NULL;
5922 : }
5923 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDsIntegrated));
5924 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fLoadExisting));
5925 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszAdmin));
5926 0 : if (_ptr_pszAdmin) {
5927 0 : NDR_PULL_ALLOC(ndr, r->pszAdmin);
5928 : } else {
5929 0 : r->pszAdmin = NULL;
5930 : }
5931 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
5932 0 : if (_ptr_aipMasters) {
5933 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
5934 : } else {
5935 0 : r->aipMasters = NULL;
5936 : }
5937 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
5938 0 : if (_ptr_aipSecondaries) {
5939 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
5940 : } else {
5941 0 : r->aipSecondaries = NULL;
5942 : }
5943 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
5944 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
5945 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved1));
5946 0 : if (_ptr_pvReserved1) {
5947 0 : NDR_PULL_ALLOC(ndr, r->pvReserved1);
5948 : } else {
5949 0 : r->pvReserved1 = NULL;
5950 : }
5951 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved2));
5952 0 : if (_ptr_pvReserved2) {
5953 0 : NDR_PULL_ALLOC(ndr, r->pvReserved2);
5954 : } else {
5955 0 : r->pvReserved2 = NULL;
5956 : }
5957 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved3));
5958 0 : if (_ptr_pvReserved3) {
5959 0 : NDR_PULL_ALLOC(ndr, r->pvReserved3);
5960 : } else {
5961 0 : r->pvReserved3 = NULL;
5962 : }
5963 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved4));
5964 0 : if (_ptr_pvReserved4) {
5965 0 : NDR_PULL_ALLOC(ndr, r->pvReserved4);
5966 : } else {
5967 0 : r->pvReserved4 = NULL;
5968 : }
5969 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved5));
5970 0 : if (_ptr_pvReserved5) {
5971 0 : NDR_PULL_ALLOC(ndr, r->pvReserved5);
5972 : } else {
5973 0 : r->pvReserved5 = NULL;
5974 : }
5975 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved6));
5976 0 : if (_ptr_pvReserved6) {
5977 0 : NDR_PULL_ALLOC(ndr, r->pvReserved6);
5978 : } else {
5979 0 : r->pvReserved6 = NULL;
5980 : }
5981 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved7));
5982 0 : if (_ptr_pvReserved7) {
5983 0 : NDR_PULL_ALLOC(ndr, r->pvReserved7);
5984 : } else {
5985 0 : r->pvReserved7 = NULL;
5986 : }
5987 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pvReserved8));
5988 0 : if (_ptr_pvReserved8) {
5989 0 : NDR_PULL_ALLOC(ndr, r->pvReserved8);
5990 : } else {
5991 0 : r->pvReserved8 = NULL;
5992 : }
5993 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved1));
5994 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved2));
5995 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved3));
5996 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved4));
5997 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved5));
5998 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved6));
5999 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved7));
6000 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved8));
6001 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6002 : }
6003 0 : if (ndr_flags & NDR_BUFFERS) {
6004 0 : if (r->pszZoneName) {
6005 0 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6006 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
6007 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
6008 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
6009 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
6010 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
6011 0 : if (length_pszZoneName_1 > size_pszZoneName_1) {
6012 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZoneName_1, length_pszZoneName_1);
6013 : }
6014 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
6015 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
6016 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
6017 : }
6018 0 : if (r->pszDataFile) {
6019 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
6020 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
6021 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
6022 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
6023 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
6024 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
6025 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
6026 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDataFile_1, length_pszDataFile_1);
6027 : }
6028 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
6029 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
6030 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
6031 : }
6032 0 : if (r->pszAdmin) {
6033 0 : _mem_save_pszAdmin_0 = NDR_PULL_GET_MEM_CTX(ndr);
6034 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszAdmin, 0);
6035 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszAdmin));
6036 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszAdmin));
6037 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszAdmin, &size_pszAdmin_1));
6038 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszAdmin, &length_pszAdmin_1));
6039 0 : if (length_pszAdmin_1 > size_pszAdmin_1) {
6040 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszAdmin_1, length_pszAdmin_1);
6041 : }
6042 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszAdmin_1, sizeof(uint8_t)));
6043 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszAdmin, length_pszAdmin_1, sizeof(uint8_t), CH_UTF8));
6044 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszAdmin_0, 0);
6045 : }
6046 0 : if (r->aipMasters) {
6047 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
6048 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
6049 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
6050 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
6051 : }
6052 0 : if (r->aipSecondaries) {
6053 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6054 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
6055 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
6056 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
6057 : }
6058 0 : if (r->pvReserved1) {
6059 0 : _mem_save_pvReserved1_0 = NDR_PULL_GET_MEM_CTX(ndr);
6060 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved1, 0);
6061 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved1));
6062 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved1));
6063 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved1, &size_pvReserved1_1));
6064 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved1, &length_pvReserved1_1));
6065 0 : if (length_pvReserved1_1 > size_pvReserved1_1) {
6066 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pvReserved1_1, length_pvReserved1_1);
6067 : }
6068 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved1_1, sizeof(uint8_t)));
6069 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved1, length_pvReserved1_1, sizeof(uint8_t), CH_UTF8));
6070 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved1_0, 0);
6071 : }
6072 0 : if (r->pvReserved2) {
6073 0 : _mem_save_pvReserved2_0 = NDR_PULL_GET_MEM_CTX(ndr);
6074 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved2, 0);
6075 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved2));
6076 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved2));
6077 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved2, &size_pvReserved2_1));
6078 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved2, &length_pvReserved2_1));
6079 0 : if (length_pvReserved2_1 > size_pvReserved2_1) {
6080 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pvReserved2_1, length_pvReserved2_1);
6081 : }
6082 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved2_1, sizeof(uint8_t)));
6083 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved2, length_pvReserved2_1, sizeof(uint8_t), CH_UTF8));
6084 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved2_0, 0);
6085 : }
6086 0 : if (r->pvReserved3) {
6087 0 : _mem_save_pvReserved3_0 = NDR_PULL_GET_MEM_CTX(ndr);
6088 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved3, 0);
6089 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved3));
6090 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved3));
6091 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved3, &size_pvReserved3_1));
6092 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved3, &length_pvReserved3_1));
6093 0 : if (length_pvReserved3_1 > size_pvReserved3_1) {
6094 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pvReserved3_1, length_pvReserved3_1);
6095 : }
6096 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved3_1, sizeof(uint8_t)));
6097 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved3, length_pvReserved3_1, sizeof(uint8_t), CH_UTF8));
6098 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved3_0, 0);
6099 : }
6100 0 : if (r->pvReserved4) {
6101 0 : _mem_save_pvReserved4_0 = NDR_PULL_GET_MEM_CTX(ndr);
6102 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved4, 0);
6103 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved4));
6104 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved4));
6105 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved4, &size_pvReserved4_1));
6106 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved4, &length_pvReserved4_1));
6107 0 : if (length_pvReserved4_1 > size_pvReserved4_1) {
6108 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pvReserved4_1, length_pvReserved4_1);
6109 : }
6110 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved4_1, sizeof(uint8_t)));
6111 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved4, length_pvReserved4_1, sizeof(uint8_t), CH_UTF8));
6112 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved4_0, 0);
6113 : }
6114 0 : if (r->pvReserved5) {
6115 0 : _mem_save_pvReserved5_0 = NDR_PULL_GET_MEM_CTX(ndr);
6116 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved5, 0);
6117 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved5));
6118 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved5));
6119 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved5, &size_pvReserved5_1));
6120 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved5, &length_pvReserved5_1));
6121 0 : if (length_pvReserved5_1 > size_pvReserved5_1) {
6122 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pvReserved5_1, length_pvReserved5_1);
6123 : }
6124 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved5_1, sizeof(uint8_t)));
6125 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved5, length_pvReserved5_1, sizeof(uint8_t), CH_UTF8));
6126 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved5_0, 0);
6127 : }
6128 0 : if (r->pvReserved6) {
6129 0 : _mem_save_pvReserved6_0 = NDR_PULL_GET_MEM_CTX(ndr);
6130 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved6, 0);
6131 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved6));
6132 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved6));
6133 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved6, &size_pvReserved6_1));
6134 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved6, &length_pvReserved6_1));
6135 0 : if (length_pvReserved6_1 > size_pvReserved6_1) {
6136 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pvReserved6_1, length_pvReserved6_1);
6137 : }
6138 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved6_1, sizeof(uint8_t)));
6139 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved6, length_pvReserved6_1, sizeof(uint8_t), CH_UTF8));
6140 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved6_0, 0);
6141 : }
6142 0 : if (r->pvReserved7) {
6143 0 : _mem_save_pvReserved7_0 = NDR_PULL_GET_MEM_CTX(ndr);
6144 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved7, 0);
6145 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved7));
6146 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved7));
6147 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved7, &size_pvReserved7_1));
6148 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved7, &length_pvReserved7_1));
6149 0 : if (length_pvReserved7_1 > size_pvReserved7_1) {
6150 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pvReserved7_1, length_pvReserved7_1);
6151 : }
6152 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved7_1, sizeof(uint8_t)));
6153 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved7, length_pvReserved7_1, sizeof(uint8_t), CH_UTF8));
6154 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved7_0, 0);
6155 : }
6156 0 : if (r->pvReserved8) {
6157 0 : _mem_save_pvReserved8_0 = NDR_PULL_GET_MEM_CTX(ndr);
6158 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pvReserved8, 0);
6159 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pvReserved8));
6160 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pvReserved8));
6161 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pvReserved8, &size_pvReserved8_1));
6162 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pvReserved8, &length_pvReserved8_1));
6163 0 : if (length_pvReserved8_1 > size_pvReserved8_1) {
6164 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pvReserved8_1, length_pvReserved8_1);
6165 : }
6166 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pvReserved8_1, sizeof(uint8_t)));
6167 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pvReserved8, length_pvReserved8_1, sizeof(uint8_t), CH_UTF8));
6168 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pvReserved8_0, 0);
6169 : }
6170 : }
6171 0 : return NDR_ERR_SUCCESS;
6172 : }
6173 :
6174 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)
6175 : {
6176 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_CREATE_INFO_W2K");
6177 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6178 0 : ndr->depth++;
6179 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
6180 0 : ndr->depth++;
6181 0 : if (r->pszZoneName) {
6182 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
6183 : }
6184 0 : ndr->depth--;
6185 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
6186 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
6187 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
6188 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
6189 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
6190 0 : ndr->depth++;
6191 0 : if (r->pszDataFile) {
6192 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
6193 : }
6194 0 : ndr->depth--;
6195 0 : ndr_print_uint32(ndr, "fDsIntegrated", r->fDsIntegrated);
6196 0 : ndr_print_uint32(ndr, "fLoadExisting", r->fLoadExisting);
6197 0 : ndr_print_ptr(ndr, "pszAdmin", r->pszAdmin);
6198 0 : ndr->depth++;
6199 0 : if (r->pszAdmin) {
6200 0 : ndr_print_string(ndr, "pszAdmin", r->pszAdmin);
6201 : }
6202 0 : ndr->depth--;
6203 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
6204 0 : ndr->depth++;
6205 0 : if (r->aipMasters) {
6206 0 : ndr_print_IP4_ARRAY(ndr, "aipMasters", r->aipMasters);
6207 : }
6208 0 : ndr->depth--;
6209 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
6210 0 : ndr->depth++;
6211 0 : if (r->aipSecondaries) {
6212 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
6213 : }
6214 0 : ndr->depth--;
6215 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
6216 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
6217 0 : ndr_print_ptr(ndr, "pvReserved1", r->pvReserved1);
6218 0 : ndr->depth++;
6219 0 : if (r->pvReserved1) {
6220 0 : ndr_print_string(ndr, "pvReserved1", r->pvReserved1);
6221 : }
6222 0 : ndr->depth--;
6223 0 : ndr_print_ptr(ndr, "pvReserved2", r->pvReserved2);
6224 0 : ndr->depth++;
6225 0 : if (r->pvReserved2) {
6226 0 : ndr_print_string(ndr, "pvReserved2", r->pvReserved2);
6227 : }
6228 0 : ndr->depth--;
6229 0 : ndr_print_ptr(ndr, "pvReserved3", r->pvReserved3);
6230 0 : ndr->depth++;
6231 0 : if (r->pvReserved3) {
6232 0 : ndr_print_string(ndr, "pvReserved3", r->pvReserved3);
6233 : }
6234 0 : ndr->depth--;
6235 0 : ndr_print_ptr(ndr, "pvReserved4", r->pvReserved4);
6236 0 : ndr->depth++;
6237 0 : if (r->pvReserved4) {
6238 0 : ndr_print_string(ndr, "pvReserved4", r->pvReserved4);
6239 : }
6240 0 : ndr->depth--;
6241 0 : ndr_print_ptr(ndr, "pvReserved5", r->pvReserved5);
6242 0 : ndr->depth++;
6243 0 : if (r->pvReserved5) {
6244 0 : ndr_print_string(ndr, "pvReserved5", r->pvReserved5);
6245 : }
6246 0 : ndr->depth--;
6247 0 : ndr_print_ptr(ndr, "pvReserved6", r->pvReserved6);
6248 0 : ndr->depth++;
6249 0 : if (r->pvReserved6) {
6250 0 : ndr_print_string(ndr, "pvReserved6", r->pvReserved6);
6251 : }
6252 0 : ndr->depth--;
6253 0 : ndr_print_ptr(ndr, "pvReserved7", r->pvReserved7);
6254 0 : ndr->depth++;
6255 0 : if (r->pvReserved7) {
6256 0 : ndr_print_string(ndr, "pvReserved7", r->pvReserved7);
6257 : }
6258 0 : ndr->depth--;
6259 0 : ndr_print_ptr(ndr, "pvReserved8", r->pvReserved8);
6260 0 : ndr->depth++;
6261 0 : if (r->pvReserved8) {
6262 0 : ndr_print_string(ndr, "pvReserved8", r->pvReserved8);
6263 : }
6264 0 : ndr->depth--;
6265 0 : ndr_print_uint32(ndr, "dwReserved1", r->dwReserved1);
6266 0 : ndr_print_uint32(ndr, "dwReserved2", r->dwReserved2);
6267 0 : ndr_print_uint32(ndr, "dwReserved3", r->dwReserved3);
6268 0 : ndr_print_uint32(ndr, "dwReserved4", r->dwReserved4);
6269 0 : ndr_print_uint32(ndr, "dwReserved5", r->dwReserved5);
6270 0 : ndr_print_uint32(ndr, "dwReserved6", r->dwReserved6);
6271 0 : ndr_print_uint32(ndr, "dwReserved7", r->dwReserved7);
6272 0 : ndr_print_uint32(ndr, "dwReserved8", r->dwReserved8);
6273 0 : ndr->depth--;
6274 : }
6275 :
6276 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_CREATE_INFO_DOTNET(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *r)
6277 : {
6278 : uint32_t cntr_dwReserved_0;
6279 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6280 0 : if (ndr_flags & NDR_SCALARS) {
6281 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6282 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
6283 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
6284 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
6285 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
6286 0 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
6287 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
6288 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
6289 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
6290 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDsIntegrated));
6291 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fLoadExisting));
6292 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszAdmin));
6293 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
6294 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
6295 0 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
6296 0 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
6297 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwTimeout));
6298 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
6299 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDpFlags));
6300 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
6301 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (32); cntr_dwReserved_0++) {
6302 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved[cntr_dwReserved_0]));
6303 : }
6304 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6305 : }
6306 0 : if (ndr_flags & NDR_BUFFERS) {
6307 0 : if (r->pszZoneName) {
6308 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
6309 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6310 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
6311 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6312 : }
6313 0 : if (r->pszDataFile) {
6314 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
6315 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6316 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
6317 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6318 : }
6319 0 : if (r->pszAdmin) {
6320 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
6321 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6322 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
6323 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszAdmin, ndr_charset_length(r->pszAdmin, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6324 : }
6325 0 : if (r->aipMasters) {
6326 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
6327 : }
6328 0 : if (r->aipSecondaries) {
6329 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
6330 : }
6331 0 : if (r->pszDpFqdn) {
6332 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
6333 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6334 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
6335 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6336 : }
6337 : }
6338 0 : return NDR_ERR_SUCCESS;
6339 : }
6340 :
6341 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_CREATE_INFO_DOTNET(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *r)
6342 : {
6343 : uint32_t _ptr_pszZoneName;
6344 0 : uint32_t size_pszZoneName_1 = 0;
6345 0 : uint32_t length_pszZoneName_1 = 0;
6346 0 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
6347 : uint32_t _ptr_pszDataFile;
6348 0 : uint32_t size_pszDataFile_1 = 0;
6349 0 : uint32_t length_pszDataFile_1 = 0;
6350 0 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
6351 : uint32_t _ptr_pszAdmin;
6352 0 : uint32_t size_pszAdmin_1 = 0;
6353 0 : uint32_t length_pszAdmin_1 = 0;
6354 0 : TALLOC_CTX *_mem_save_pszAdmin_0 = NULL;
6355 : uint32_t _ptr_aipMasters;
6356 0 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
6357 : uint32_t _ptr_aipSecondaries;
6358 0 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
6359 : uint32_t _ptr_pszDpFqdn;
6360 0 : uint32_t size_pszDpFqdn_1 = 0;
6361 0 : uint32_t length_pszDpFqdn_1 = 0;
6362 0 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
6363 0 : uint32_t size_dwReserved_0 = 0;
6364 : uint32_t cntr_dwReserved_0;
6365 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6366 0 : if (ndr_flags & NDR_SCALARS) {
6367 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6368 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
6369 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
6370 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
6371 0 : if (_ptr_pszZoneName) {
6372 0 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
6373 : } else {
6374 0 : r->pszZoneName = NULL;
6375 : }
6376 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
6377 0 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
6378 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
6379 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
6380 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
6381 0 : if (_ptr_pszDataFile) {
6382 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
6383 : } else {
6384 0 : r->pszDataFile = NULL;
6385 : }
6386 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDsIntegrated));
6387 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fLoadExisting));
6388 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszAdmin));
6389 0 : if (_ptr_pszAdmin) {
6390 0 : NDR_PULL_ALLOC(ndr, r->pszAdmin);
6391 : } else {
6392 0 : r->pszAdmin = NULL;
6393 : }
6394 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
6395 0 : if (_ptr_aipMasters) {
6396 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
6397 : } else {
6398 0 : r->aipMasters = NULL;
6399 : }
6400 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
6401 0 : if (_ptr_aipSecondaries) {
6402 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
6403 : } else {
6404 0 : r->aipSecondaries = NULL;
6405 : }
6406 0 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
6407 0 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
6408 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwTimeout));
6409 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
6410 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDpFlags));
6411 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
6412 0 : if (_ptr_pszDpFqdn) {
6413 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
6414 : } else {
6415 0 : r->pszDpFqdn = NULL;
6416 : }
6417 0 : size_dwReserved_0 = 32;
6418 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (size_dwReserved_0); cntr_dwReserved_0++) {
6419 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved[cntr_dwReserved_0]));
6420 : }
6421 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6422 : }
6423 0 : if (ndr_flags & NDR_BUFFERS) {
6424 0 : if (r->pszZoneName) {
6425 0 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6426 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
6427 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
6428 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
6429 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
6430 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
6431 0 : if (length_pszZoneName_1 > size_pszZoneName_1) {
6432 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZoneName_1, length_pszZoneName_1);
6433 : }
6434 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
6435 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
6436 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
6437 : }
6438 0 : if (r->pszDataFile) {
6439 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
6440 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
6441 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
6442 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
6443 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
6444 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
6445 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
6446 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDataFile_1, length_pszDataFile_1);
6447 : }
6448 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
6449 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
6450 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
6451 : }
6452 0 : if (r->pszAdmin) {
6453 0 : _mem_save_pszAdmin_0 = NDR_PULL_GET_MEM_CTX(ndr);
6454 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszAdmin, 0);
6455 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszAdmin));
6456 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszAdmin));
6457 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszAdmin, &size_pszAdmin_1));
6458 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszAdmin, &length_pszAdmin_1));
6459 0 : if (length_pszAdmin_1 > size_pszAdmin_1) {
6460 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszAdmin_1, length_pszAdmin_1);
6461 : }
6462 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszAdmin_1, sizeof(uint8_t)));
6463 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszAdmin, length_pszAdmin_1, sizeof(uint8_t), CH_UTF8));
6464 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszAdmin_0, 0);
6465 : }
6466 0 : if (r->aipMasters) {
6467 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
6468 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
6469 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
6470 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
6471 : }
6472 0 : if (r->aipSecondaries) {
6473 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6474 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
6475 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
6476 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
6477 : }
6478 0 : if (r->pszDpFqdn) {
6479 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
6480 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
6481 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
6482 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
6483 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
6484 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
6485 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
6486 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDpFqdn_1, length_pszDpFqdn_1);
6487 : }
6488 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
6489 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
6490 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
6491 : }
6492 : }
6493 0 : return NDR_ERR_SUCCESS;
6494 : }
6495 :
6496 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)
6497 : {
6498 : uint32_t cntr_dwReserved_0;
6499 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_CREATE_INFO_DOTNET");
6500 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6501 0 : ndr->depth++;
6502 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
6503 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
6504 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
6505 0 : ndr->depth++;
6506 0 : if (r->pszZoneName) {
6507 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
6508 : }
6509 0 : ndr->depth--;
6510 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
6511 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
6512 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
6513 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
6514 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
6515 0 : ndr->depth++;
6516 0 : if (r->pszDataFile) {
6517 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
6518 : }
6519 0 : ndr->depth--;
6520 0 : ndr_print_uint32(ndr, "fDsIntegrated", r->fDsIntegrated);
6521 0 : ndr_print_uint32(ndr, "fLoadExisting", r->fLoadExisting);
6522 0 : ndr_print_ptr(ndr, "pszAdmin", r->pszAdmin);
6523 0 : ndr->depth++;
6524 0 : if (r->pszAdmin) {
6525 0 : ndr_print_string(ndr, "pszAdmin", r->pszAdmin);
6526 : }
6527 0 : ndr->depth--;
6528 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
6529 0 : ndr->depth++;
6530 0 : if (r->aipMasters) {
6531 0 : ndr_print_IP4_ARRAY(ndr, "aipMasters", r->aipMasters);
6532 : }
6533 0 : ndr->depth--;
6534 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
6535 0 : ndr->depth++;
6536 0 : if (r->aipSecondaries) {
6537 0 : ndr_print_IP4_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
6538 : }
6539 0 : ndr->depth--;
6540 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
6541 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
6542 0 : ndr_print_uint32(ndr, "dwTimeout", r->dwTimeout);
6543 0 : ndr_print_uint32(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
6544 0 : ndr_print_uint32(ndr, "dwDpFlags", r->dwDpFlags);
6545 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
6546 0 : ndr->depth++;
6547 0 : if (r->pszDpFqdn) {
6548 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
6549 : }
6550 0 : ndr->depth--;
6551 0 : ndr->print(ndr, "%s: ARRAY(%d)", "dwReserved", (int)32);
6552 0 : ndr->depth++;
6553 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (32); cntr_dwReserved_0++) {
6554 0 : ndr_print_uint32(ndr, "dwReserved", r->dwReserved[cntr_dwReserved_0]);
6555 : }
6556 0 : ndr->depth--;
6557 0 : ndr->depth--;
6558 : }
6559 :
6560 371 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *r)
6561 : {
6562 : uint32_t cntr_dwReserved_0;
6563 371 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6564 371 : if (ndr_flags & NDR_SCALARS) {
6565 371 : NDR_CHECK(ndr_push_align(ndr, 5));
6566 371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
6567 371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
6568 371 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneName));
6569 371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwZoneType));
6570 371 : NDR_CHECK(ndr_push_dns_zone_update(ndr, NDR_SCALARS, r->fAllowUpdate));
6571 371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fAging));
6572 371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
6573 371 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDataFile));
6574 371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDsIntegrated));
6575 371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fLoadExisting));
6576 371 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszAdmin));
6577 371 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipMasters));
6578 371 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipSecondaries));
6579 371 : NDR_CHECK(ndr_push_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, r->fSecureSecondaries));
6580 371 : NDR_CHECK(ndr_push_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, r->fNotifyLevel));
6581 371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwTimeout));
6582 371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
6583 371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDpFlags));
6584 371 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszDpFqdn));
6585 12243 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (32); cntr_dwReserved_0++) {
6586 11872 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved[cntr_dwReserved_0]));
6587 : }
6588 371 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6589 : }
6590 371 : if (ndr_flags & NDR_BUFFERS) {
6591 371 : if (r->pszZoneName) {
6592 371 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
6593 371 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6594 371 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneName, CH_UTF8)));
6595 371 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneName, ndr_charset_length(r->pszZoneName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6596 : }
6597 371 : if (r->pszDataFile) {
6598 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
6599 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6600 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDataFile, CH_UTF8)));
6601 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDataFile, ndr_charset_length(r->pszDataFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6602 : }
6603 371 : if (r->pszAdmin) {
6604 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
6605 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6606 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszAdmin, CH_UTF8)));
6607 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszAdmin, ndr_charset_length(r->pszAdmin, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6608 : }
6609 371 : if (r->aipMasters) {
6610 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
6611 : }
6612 371 : if (r->aipSecondaries) {
6613 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
6614 : }
6615 371 : if (r->pszDpFqdn) {
6616 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
6617 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6618 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszDpFqdn, CH_UTF8)));
6619 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszDpFqdn, ndr_charset_length(r->pszDpFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6620 : }
6621 : }
6622 371 : return NDR_ERR_SUCCESS;
6623 : }
6624 :
6625 371 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *r)
6626 : {
6627 : uint32_t _ptr_pszZoneName;
6628 371 : uint32_t size_pszZoneName_1 = 0;
6629 371 : uint32_t length_pszZoneName_1 = 0;
6630 371 : TALLOC_CTX *_mem_save_pszZoneName_0 = NULL;
6631 : uint32_t _ptr_pszDataFile;
6632 371 : uint32_t size_pszDataFile_1 = 0;
6633 371 : uint32_t length_pszDataFile_1 = 0;
6634 371 : TALLOC_CTX *_mem_save_pszDataFile_0 = NULL;
6635 : uint32_t _ptr_pszAdmin;
6636 371 : uint32_t size_pszAdmin_1 = 0;
6637 371 : uint32_t length_pszAdmin_1 = 0;
6638 371 : TALLOC_CTX *_mem_save_pszAdmin_0 = NULL;
6639 : uint32_t _ptr_aipMasters;
6640 371 : TALLOC_CTX *_mem_save_aipMasters_0 = NULL;
6641 : uint32_t _ptr_aipSecondaries;
6642 371 : TALLOC_CTX *_mem_save_aipSecondaries_0 = NULL;
6643 : uint32_t _ptr_pszDpFqdn;
6644 371 : uint32_t size_pszDpFqdn_1 = 0;
6645 371 : uint32_t length_pszDpFqdn_1 = 0;
6646 371 : TALLOC_CTX *_mem_save_pszDpFqdn_0 = NULL;
6647 371 : uint32_t size_dwReserved_0 = 0;
6648 : uint32_t cntr_dwReserved_0;
6649 371 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6650 371 : if (ndr_flags & NDR_SCALARS) {
6651 371 : NDR_CHECK(ndr_pull_align(ndr, 5));
6652 371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
6653 371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
6654 371 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneName));
6655 371 : if (_ptr_pszZoneName) {
6656 371 : NDR_PULL_ALLOC(ndr, r->pszZoneName);
6657 : } else {
6658 0 : r->pszZoneName = NULL;
6659 : }
6660 371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwZoneType));
6661 371 : NDR_CHECK(ndr_pull_dns_zone_update(ndr, NDR_SCALARS, &r->fAllowUpdate));
6662 371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fAging));
6663 371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
6664 371 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDataFile));
6665 371 : if (_ptr_pszDataFile) {
6666 0 : NDR_PULL_ALLOC(ndr, r->pszDataFile);
6667 : } else {
6668 371 : r->pszDataFile = NULL;
6669 : }
6670 371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDsIntegrated));
6671 371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fLoadExisting));
6672 371 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszAdmin));
6673 371 : if (_ptr_pszAdmin) {
6674 0 : NDR_PULL_ALLOC(ndr, r->pszAdmin);
6675 : } else {
6676 371 : r->pszAdmin = NULL;
6677 : }
6678 371 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipMasters));
6679 371 : if (_ptr_aipMasters) {
6680 0 : NDR_PULL_ALLOC(ndr, r->aipMasters);
6681 : } else {
6682 371 : r->aipMasters = NULL;
6683 : }
6684 371 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipSecondaries));
6685 371 : if (_ptr_aipSecondaries) {
6686 0 : NDR_PULL_ALLOC(ndr, r->aipSecondaries);
6687 : } else {
6688 371 : r->aipSecondaries = NULL;
6689 : }
6690 371 : NDR_CHECK(ndr_pull_DNS_ZONE_SECONDARY_SECURITY(ndr, NDR_SCALARS, &r->fSecureSecondaries));
6691 371 : NDR_CHECK(ndr_pull_DNS_ZONE_NOTIFY_LEVEL(ndr, NDR_SCALARS, &r->fNotifyLevel));
6692 371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwTimeout));
6693 371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
6694 371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDpFlags));
6695 371 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDpFqdn));
6696 371 : if (_ptr_pszDpFqdn) {
6697 0 : NDR_PULL_ALLOC(ndr, r->pszDpFqdn);
6698 : } else {
6699 371 : r->pszDpFqdn = NULL;
6700 : }
6701 371 : size_dwReserved_0 = 32;
6702 12243 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (size_dwReserved_0); cntr_dwReserved_0++) {
6703 11872 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved[cntr_dwReserved_0]));
6704 : }
6705 371 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6706 : }
6707 371 : if (ndr_flags & NDR_BUFFERS) {
6708 371 : if (r->pszZoneName) {
6709 371 : _mem_save_pszZoneName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6710 371 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneName, 0);
6711 371 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneName));
6712 371 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneName));
6713 371 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneName, &size_pszZoneName_1));
6714 371 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneName, &length_pszZoneName_1));
6715 371 : if (length_pszZoneName_1 > size_pszZoneName_1) {
6716 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZoneName_1, length_pszZoneName_1);
6717 : }
6718 371 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneName_1, sizeof(uint8_t)));
6719 371 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneName, length_pszZoneName_1, sizeof(uint8_t), CH_UTF8));
6720 371 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneName_0, 0);
6721 : }
6722 371 : if (r->pszDataFile) {
6723 0 : _mem_save_pszDataFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
6724 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDataFile, 0);
6725 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDataFile));
6726 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDataFile));
6727 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDataFile, &size_pszDataFile_1));
6728 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDataFile, &length_pszDataFile_1));
6729 0 : if (length_pszDataFile_1 > size_pszDataFile_1) {
6730 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDataFile_1, length_pszDataFile_1);
6731 : }
6732 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataFile_1, sizeof(uint8_t)));
6733 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDataFile, length_pszDataFile_1, sizeof(uint8_t), CH_UTF8));
6734 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDataFile_0, 0);
6735 : }
6736 371 : if (r->pszAdmin) {
6737 0 : _mem_save_pszAdmin_0 = NDR_PULL_GET_MEM_CTX(ndr);
6738 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszAdmin, 0);
6739 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszAdmin));
6740 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszAdmin));
6741 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszAdmin, &size_pszAdmin_1));
6742 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszAdmin, &length_pszAdmin_1));
6743 0 : if (length_pszAdmin_1 > size_pszAdmin_1) {
6744 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszAdmin_1, length_pszAdmin_1);
6745 : }
6746 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszAdmin_1, sizeof(uint8_t)));
6747 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszAdmin, length_pszAdmin_1, sizeof(uint8_t), CH_UTF8));
6748 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszAdmin_0, 0);
6749 : }
6750 371 : if (r->aipMasters) {
6751 0 : _mem_save_aipMasters_0 = NDR_PULL_GET_MEM_CTX(ndr);
6752 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipMasters, 0);
6753 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipMasters));
6754 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipMasters_0, 0);
6755 : }
6756 371 : if (r->aipSecondaries) {
6757 0 : _mem_save_aipSecondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6758 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipSecondaries, 0);
6759 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipSecondaries));
6760 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipSecondaries_0, 0);
6761 : }
6762 371 : if (r->pszDpFqdn) {
6763 0 : _mem_save_pszDpFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
6764 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszDpFqdn, 0);
6765 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszDpFqdn));
6766 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszDpFqdn));
6767 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszDpFqdn, &size_pszDpFqdn_1));
6768 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszDpFqdn, &length_pszDpFqdn_1));
6769 0 : if (length_pszDpFqdn_1 > size_pszDpFqdn_1) {
6770 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszDpFqdn_1, length_pszDpFqdn_1);
6771 : }
6772 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDpFqdn_1, sizeof(uint8_t)));
6773 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszDpFqdn, length_pszDpFqdn_1, sizeof(uint8_t), CH_UTF8));
6774 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDpFqdn_0, 0);
6775 : }
6776 : }
6777 371 : return NDR_ERR_SUCCESS;
6778 : }
6779 :
6780 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)
6781 : {
6782 : uint32_t cntr_dwReserved_0;
6783 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_CREATE_INFO_LONGHORN");
6784 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6785 0 : ndr->depth++;
6786 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
6787 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
6788 0 : ndr_print_ptr(ndr, "pszZoneName", r->pszZoneName);
6789 0 : ndr->depth++;
6790 0 : if (r->pszZoneName) {
6791 0 : ndr_print_string(ndr, "pszZoneName", r->pszZoneName);
6792 : }
6793 0 : ndr->depth--;
6794 0 : ndr_print_uint32(ndr, "dwZoneType", r->dwZoneType);
6795 0 : ndr_print_dns_zone_update(ndr, "fAllowUpdate", r->fAllowUpdate);
6796 0 : ndr_print_uint32(ndr, "fAging", r->fAging);
6797 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
6798 0 : ndr_print_ptr(ndr, "pszDataFile", r->pszDataFile);
6799 0 : ndr->depth++;
6800 0 : if (r->pszDataFile) {
6801 0 : ndr_print_string(ndr, "pszDataFile", r->pszDataFile);
6802 : }
6803 0 : ndr->depth--;
6804 0 : ndr_print_uint32(ndr, "fDsIntegrated", r->fDsIntegrated);
6805 0 : ndr_print_uint32(ndr, "fLoadExisting", r->fLoadExisting);
6806 0 : ndr_print_ptr(ndr, "pszAdmin", r->pszAdmin);
6807 0 : ndr->depth++;
6808 0 : if (r->pszAdmin) {
6809 0 : ndr_print_string(ndr, "pszAdmin", r->pszAdmin);
6810 : }
6811 0 : ndr->depth--;
6812 0 : ndr_print_ptr(ndr, "aipMasters", r->aipMasters);
6813 0 : ndr->depth++;
6814 0 : if (r->aipMasters) {
6815 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipMasters", r->aipMasters);
6816 : }
6817 0 : ndr->depth--;
6818 0 : ndr_print_ptr(ndr, "aipSecondaries", r->aipSecondaries);
6819 0 : ndr->depth++;
6820 0 : if (r->aipSecondaries) {
6821 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipSecondaries", r->aipSecondaries);
6822 : }
6823 0 : ndr->depth--;
6824 0 : ndr_print_DNS_ZONE_SECONDARY_SECURITY(ndr, "fSecureSecondaries", r->fSecureSecondaries);
6825 0 : ndr_print_DNS_ZONE_NOTIFY_LEVEL(ndr, "fNotifyLevel", r->fNotifyLevel);
6826 0 : ndr_print_uint32(ndr, "dwTimeout", r->dwTimeout);
6827 0 : ndr_print_uint32(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
6828 0 : ndr_print_uint32(ndr, "dwDpFlags", r->dwDpFlags);
6829 0 : ndr_print_ptr(ndr, "pszDpFqdn", r->pszDpFqdn);
6830 0 : ndr->depth++;
6831 0 : if (r->pszDpFqdn) {
6832 0 : ndr_print_string(ndr, "pszDpFqdn", r->pszDpFqdn);
6833 : }
6834 0 : ndr->depth--;
6835 0 : ndr->print(ndr, "%s: ARRAY(%d)", "dwReserved", (int)32);
6836 0 : ndr->depth++;
6837 0 : for (cntr_dwReserved_0 = 0; cntr_dwReserved_0 < (32); cntr_dwReserved_0++) {
6838 0 : ndr_print_uint32(ndr, "dwReserved", r->dwReserved[cntr_dwReserved_0]);
6839 : }
6840 0 : ndr->depth--;
6841 0 : ndr->depth--;
6842 : }
6843 :
6844 0 : static enum ndr_err_code ndr_push_DNS_RPC_ZONE_EXPORT_INFO(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ZONE_EXPORT_INFO *r)
6845 : {
6846 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6847 0 : if (ndr_flags & NDR_SCALARS) {
6848 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6849 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
6850 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
6851 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszZoneExportFile));
6852 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6853 : }
6854 0 : if (ndr_flags & NDR_BUFFERS) {
6855 0 : if (r->pszZoneExportFile) {
6856 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneExportFile, CH_UTF8)));
6857 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6858 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszZoneExportFile, CH_UTF8)));
6859 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszZoneExportFile, ndr_charset_length(r->pszZoneExportFile, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6860 : }
6861 : }
6862 0 : return NDR_ERR_SUCCESS;
6863 : }
6864 :
6865 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ZONE_EXPORT_INFO(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ZONE_EXPORT_INFO *r)
6866 : {
6867 : uint32_t _ptr_pszZoneExportFile;
6868 0 : uint32_t size_pszZoneExportFile_1 = 0;
6869 0 : uint32_t length_pszZoneExportFile_1 = 0;
6870 0 : TALLOC_CTX *_mem_save_pszZoneExportFile_0 = NULL;
6871 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6872 0 : if (ndr_flags & NDR_SCALARS) {
6873 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6874 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
6875 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
6876 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZoneExportFile));
6877 0 : if (_ptr_pszZoneExportFile) {
6878 0 : NDR_PULL_ALLOC(ndr, r->pszZoneExportFile);
6879 : } else {
6880 0 : r->pszZoneExportFile = NULL;
6881 : }
6882 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6883 : }
6884 0 : if (ndr_flags & NDR_BUFFERS) {
6885 0 : if (r->pszZoneExportFile) {
6886 0 : _mem_save_pszZoneExportFile_0 = NDR_PULL_GET_MEM_CTX(ndr);
6887 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszZoneExportFile, 0);
6888 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszZoneExportFile));
6889 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszZoneExportFile));
6890 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszZoneExportFile, &size_pszZoneExportFile_1));
6891 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszZoneExportFile, &length_pszZoneExportFile_1));
6892 0 : if (length_pszZoneExportFile_1 > size_pszZoneExportFile_1) {
6893 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZoneExportFile_1, length_pszZoneExportFile_1);
6894 : }
6895 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZoneExportFile_1, sizeof(uint8_t)));
6896 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszZoneExportFile, length_pszZoneExportFile_1, sizeof(uint8_t), CH_UTF8));
6897 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZoneExportFile_0, 0);
6898 : }
6899 : }
6900 0 : return NDR_ERR_SUCCESS;
6901 : }
6902 :
6903 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)
6904 : {
6905 0 : ndr_print_struct(ndr, name, "DNS_RPC_ZONE_EXPORT_INFO");
6906 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6907 0 : ndr->depth++;
6908 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
6909 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
6910 0 : ndr_print_ptr(ndr, "pszZoneExportFile", r->pszZoneExportFile);
6911 0 : ndr->depth++;
6912 0 : if (r->pszZoneExportFile) {
6913 0 : ndr_print_string(ndr, "pszZoneExportFile", r->pszZoneExportFile);
6914 : }
6915 0 : ndr->depth--;
6916 0 : ndr->depth--;
6917 : }
6918 :
6919 0 : static enum ndr_err_code ndr_push_DNS_RPC_ENUM_ZONES_FILTER(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_ENUM_ZONES_FILTER *r)
6920 : {
6921 : uint32_t cntr_pszReserved_0;
6922 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6923 0 : if (ndr_flags & NDR_SCALARS) {
6924 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6925 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
6926 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
6927 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFilter));
6928 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszPartitionFqdn));
6929 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszQueryString));
6930 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (6); cntr_pszReserved_0++) {
6931 0 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pszReserved[cntr_pszReserved_0]));
6932 : }
6933 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6934 : }
6935 0 : if (ndr_flags & NDR_BUFFERS) {
6936 0 : if (r->pszPartitionFqdn) {
6937 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszPartitionFqdn, CH_UTF8)));
6938 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6939 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszPartitionFqdn, CH_UTF8)));
6940 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszPartitionFqdn, ndr_charset_length(r->pszPartitionFqdn, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6941 : }
6942 0 : if (r->pszQueryString) {
6943 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszQueryString, CH_UTF8)));
6944 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6945 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszQueryString, CH_UTF8)));
6946 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszQueryString, ndr_charset_length(r->pszQueryString, CH_UTF8), sizeof(uint8_t), CH_UTF8));
6947 : }
6948 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (6); cntr_pszReserved_0++) {
6949 0 : NDR_CHECK(ndr_push_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pszReserved[cntr_pszReserved_0]));
6950 : }
6951 : }
6952 0 : return NDR_ERR_SUCCESS;
6953 : }
6954 :
6955 0 : static enum ndr_err_code ndr_pull_DNS_RPC_ENUM_ZONES_FILTER(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_ENUM_ZONES_FILTER *r)
6956 : {
6957 : uint32_t _ptr_pszPartitionFqdn;
6958 0 : uint32_t size_pszPartitionFqdn_1 = 0;
6959 0 : uint32_t length_pszPartitionFqdn_1 = 0;
6960 0 : TALLOC_CTX *_mem_save_pszPartitionFqdn_0 = NULL;
6961 : uint32_t _ptr_pszQueryString;
6962 0 : uint32_t size_pszQueryString_1 = 0;
6963 0 : uint32_t length_pszQueryString_1 = 0;
6964 0 : TALLOC_CTX *_mem_save_pszQueryString_0 = NULL;
6965 0 : uint32_t size_pszReserved_0 = 0;
6966 : uint32_t cntr_pszReserved_0;
6967 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6968 0 : if (ndr_flags & NDR_SCALARS) {
6969 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6970 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
6971 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
6972 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFilter));
6973 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszPartitionFqdn));
6974 0 : if (_ptr_pszPartitionFqdn) {
6975 0 : NDR_PULL_ALLOC(ndr, r->pszPartitionFqdn);
6976 : } else {
6977 0 : r->pszPartitionFqdn = NULL;
6978 : }
6979 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszQueryString));
6980 0 : if (_ptr_pszQueryString) {
6981 0 : NDR_PULL_ALLOC(ndr, r->pszQueryString);
6982 : } else {
6983 0 : r->pszQueryString = NULL;
6984 : }
6985 0 : size_pszReserved_0 = 6;
6986 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (size_pszReserved_0); cntr_pszReserved_0++) {
6987 0 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_SCALARS, &r->pszReserved[cntr_pszReserved_0]));
6988 : }
6989 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6990 : }
6991 0 : if (ndr_flags & NDR_BUFFERS) {
6992 0 : if (r->pszPartitionFqdn) {
6993 0 : _mem_save_pszPartitionFqdn_0 = NDR_PULL_GET_MEM_CTX(ndr);
6994 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszPartitionFqdn, 0);
6995 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszPartitionFqdn));
6996 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszPartitionFqdn));
6997 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszPartitionFqdn, &size_pszPartitionFqdn_1));
6998 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszPartitionFqdn, &length_pszPartitionFqdn_1));
6999 0 : if (length_pszPartitionFqdn_1 > size_pszPartitionFqdn_1) {
7000 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszPartitionFqdn_1, length_pszPartitionFqdn_1);
7001 : }
7002 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszPartitionFqdn_1, sizeof(uint8_t)));
7003 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszPartitionFqdn, length_pszPartitionFqdn_1, sizeof(uint8_t), CH_UTF8));
7004 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszPartitionFqdn_0, 0);
7005 : }
7006 0 : if (r->pszQueryString) {
7007 0 : _mem_save_pszQueryString_0 = NDR_PULL_GET_MEM_CTX(ndr);
7008 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszQueryString, 0);
7009 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszQueryString));
7010 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszQueryString));
7011 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszQueryString, &size_pszQueryString_1));
7012 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszQueryString, &length_pszQueryString_1));
7013 0 : if (length_pszQueryString_1 > size_pszQueryString_1) {
7014 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszQueryString_1, length_pszQueryString_1);
7015 : }
7016 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszQueryString_1, sizeof(uint8_t)));
7017 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszQueryString, length_pszQueryString_1, sizeof(uint8_t), CH_UTF8));
7018 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszQueryString_0, 0);
7019 : }
7020 0 : size_pszReserved_0 = 6;
7021 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (size_pszReserved_0); cntr_pszReserved_0++) {
7022 0 : NDR_CHECK(ndr_pull_DNS_EXTENSION(ndr, NDR_BUFFERS, &r->pszReserved[cntr_pszReserved_0]));
7023 : }
7024 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (size_pszReserved_0); cntr_pszReserved_0++) {
7025 : }
7026 : }
7027 0 : return NDR_ERR_SUCCESS;
7028 : }
7029 :
7030 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)
7031 : {
7032 : uint32_t cntr_pszReserved_0;
7033 0 : ndr_print_struct(ndr, name, "DNS_RPC_ENUM_ZONES_FILTER");
7034 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7035 0 : ndr->depth++;
7036 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
7037 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
7038 0 : ndr_print_uint32(ndr, "dwFilter", r->dwFilter);
7039 0 : ndr_print_ptr(ndr, "pszPartitionFqdn", r->pszPartitionFqdn);
7040 0 : ndr->depth++;
7041 0 : if (r->pszPartitionFqdn) {
7042 0 : ndr_print_string(ndr, "pszPartitionFqdn", r->pszPartitionFqdn);
7043 : }
7044 0 : ndr->depth--;
7045 0 : ndr_print_ptr(ndr, "pszQueryString", r->pszQueryString);
7046 0 : ndr->depth++;
7047 0 : if (r->pszQueryString) {
7048 0 : ndr_print_string(ndr, "pszQueryString", r->pszQueryString);
7049 : }
7050 0 : ndr->depth--;
7051 0 : ndr->print(ndr, "%s: ARRAY(%d)", "pszReserved", (int)6);
7052 0 : ndr->depth++;
7053 0 : for (cntr_pszReserved_0 = 0; cntr_pszReserved_0 < (6); cntr_pszReserved_0++) {
7054 0 : ndr_print_DNS_EXTENSION(ndr, "pszReserved", &r->pszReserved[cntr_pszReserved_0]);
7055 : }
7056 0 : ndr->depth--;
7057 0 : ndr->depth--;
7058 : }
7059 :
7060 0 : static enum ndr_err_code ndr_push_DNS_RPC_FORWARDERS_W2K(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_FORWARDERS_W2K *r)
7061 : {
7062 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7063 0 : if (ndr_flags & NDR_SCALARS) {
7064 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7065 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
7066 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
7067 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
7068 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7069 : }
7070 0 : if (ndr_flags & NDR_BUFFERS) {
7071 0 : if (r->aipForwarders) {
7072 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7073 : }
7074 : }
7075 0 : return NDR_ERR_SUCCESS;
7076 : }
7077 :
7078 0 : static enum ndr_err_code ndr_pull_DNS_RPC_FORWARDERS_W2K(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_FORWARDERS_W2K *r)
7079 : {
7080 : uint32_t _ptr_aipForwarders;
7081 0 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
7082 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7083 0 : if (ndr_flags & NDR_SCALARS) {
7084 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7085 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
7086 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
7087 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
7088 0 : if (_ptr_aipForwarders) {
7089 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
7090 : } else {
7091 0 : r->aipForwarders = NULL;
7092 : }
7093 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7094 : }
7095 0 : if (ndr_flags & NDR_BUFFERS) {
7096 0 : if (r->aipForwarders) {
7097 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
7098 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
7099 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7100 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
7101 : }
7102 : }
7103 0 : return NDR_ERR_SUCCESS;
7104 : }
7105 :
7106 0 : _PUBLIC_ void ndr_print_DNS_RPC_FORWARDERS_W2K(struct ndr_print *ndr, const char *name, const struct DNS_RPC_FORWARDERS_W2K *r)
7107 : {
7108 0 : ndr_print_struct(ndr, name, "DNS_RPC_FORWARDERS_W2K");
7109 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7110 0 : ndr->depth++;
7111 0 : ndr_print_uint32(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
7112 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
7113 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
7114 0 : ndr->depth++;
7115 0 : if (r->aipForwarders) {
7116 0 : ndr_print_IP4_ARRAY(ndr, "aipForwarders", r->aipForwarders);
7117 : }
7118 0 : ndr->depth--;
7119 0 : ndr->depth--;
7120 : }
7121 :
7122 0 : static enum ndr_err_code ndr_push_DNS_RPC_FORWARDERS_DOTNET(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_FORWARDERS_DOTNET *r)
7123 : {
7124 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7125 0 : if (ndr_flags & NDR_SCALARS) {
7126 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7127 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
7128 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
7129 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
7130 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
7131 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
7132 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7133 : }
7134 0 : if (ndr_flags & NDR_BUFFERS) {
7135 0 : if (r->aipForwarders) {
7136 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7137 : }
7138 : }
7139 0 : return NDR_ERR_SUCCESS;
7140 : }
7141 :
7142 0 : static enum ndr_err_code ndr_pull_DNS_RPC_FORWARDERS_DOTNET(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_FORWARDERS_DOTNET *r)
7143 : {
7144 : uint32_t _ptr_aipForwarders;
7145 0 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
7146 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7147 0 : if (ndr_flags & NDR_SCALARS) {
7148 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7149 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
7150 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
7151 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
7152 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
7153 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
7154 0 : if (_ptr_aipForwarders) {
7155 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
7156 : } else {
7157 0 : r->aipForwarders = NULL;
7158 : }
7159 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7160 : }
7161 0 : if (ndr_flags & NDR_BUFFERS) {
7162 0 : if (r->aipForwarders) {
7163 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
7164 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
7165 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7166 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
7167 : }
7168 : }
7169 0 : return NDR_ERR_SUCCESS;
7170 : }
7171 :
7172 0 : _PUBLIC_ void ndr_print_DNS_RPC_FORWARDERS_DOTNET(struct ndr_print *ndr, const char *name, const struct DNS_RPC_FORWARDERS_DOTNET *r)
7173 : {
7174 0 : ndr_print_struct(ndr, name, "DNS_RPC_FORWARDERS_DOTNET");
7175 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7176 0 : ndr->depth++;
7177 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
7178 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
7179 0 : ndr_print_uint32(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
7180 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
7181 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
7182 0 : ndr->depth++;
7183 0 : if (r->aipForwarders) {
7184 0 : ndr_print_IP4_ARRAY(ndr, "aipForwarders", r->aipForwarders);
7185 : }
7186 0 : ndr->depth--;
7187 0 : ndr->depth--;
7188 : }
7189 :
7190 0 : static enum ndr_err_code ndr_push_DNS_RPC_FORWARDERS_LONGHORN(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_FORWARDERS_LONGHORN *r)
7191 : {
7192 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7193 0 : if (ndr_flags & NDR_SCALARS) {
7194 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7195 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
7196 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
7197 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fRecurseAfterForwarding));
7198 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwForwardTimeout));
7199 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aipForwarders));
7200 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7201 : }
7202 0 : if (ndr_flags & NDR_BUFFERS) {
7203 0 : if (r->aipForwarders) {
7204 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7205 : }
7206 : }
7207 0 : return NDR_ERR_SUCCESS;
7208 : }
7209 :
7210 0 : static enum ndr_err_code ndr_pull_DNS_RPC_FORWARDERS_LONGHORN(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_FORWARDERS_LONGHORN *r)
7211 : {
7212 : uint32_t _ptr_aipForwarders;
7213 0 : TALLOC_CTX *_mem_save_aipForwarders_0 = NULL;
7214 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7215 0 : if (ndr_flags & NDR_SCALARS) {
7216 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7217 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
7218 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
7219 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fRecurseAfterForwarding));
7220 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwForwardTimeout));
7221 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aipForwarders));
7222 0 : if (_ptr_aipForwarders) {
7223 0 : NDR_PULL_ALLOC(ndr, r->aipForwarders);
7224 : } else {
7225 0 : r->aipForwarders = NULL;
7226 : }
7227 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7228 : }
7229 0 : if (ndr_flags & NDR_BUFFERS) {
7230 0 : if (r->aipForwarders) {
7231 0 : _mem_save_aipForwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
7232 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aipForwarders, 0);
7233 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->aipForwarders));
7234 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aipForwarders_0, 0);
7235 : }
7236 : }
7237 0 : return NDR_ERR_SUCCESS;
7238 : }
7239 :
7240 0 : _PUBLIC_ void ndr_print_DNS_RPC_FORWARDERS_LONGHORN(struct ndr_print *ndr, const char *name, const struct DNS_RPC_FORWARDERS_LONGHORN *r)
7241 : {
7242 0 : ndr_print_struct(ndr, name, "DNS_RPC_FORWARDERS_LONGHORN");
7243 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7244 0 : ndr->depth++;
7245 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
7246 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
7247 0 : ndr_print_uint32(ndr, "fRecurseAfterForwarding", r->fRecurseAfterForwarding);
7248 0 : ndr_print_uint32(ndr, "dwForwardTimeout", r->dwForwardTimeout);
7249 0 : ndr_print_ptr(ndr, "aipForwarders", r->aipForwarders);
7250 0 : ndr->depth++;
7251 0 : if (r->aipForwarders) {
7252 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "aipForwarders", r->aipForwarders);
7253 : }
7254 0 : ndr->depth--;
7255 0 : ndr->depth--;
7256 : }
7257 :
7258 0 : static enum ndr_err_code ndr_push_DNS_RPC_AUTOCONFIG(struct ndr_push *ndr, int ndr_flags, enum DNS_RPC_AUTOCONFIG r)
7259 : {
7260 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
7261 0 : return NDR_ERR_SUCCESS;
7262 : }
7263 :
7264 0 : static enum ndr_err_code ndr_pull_DNS_RPC_AUTOCONFIG(struct ndr_pull *ndr, int ndr_flags, enum DNS_RPC_AUTOCONFIG *r)
7265 : {
7266 : uint32_t v;
7267 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
7268 0 : *r = v;
7269 0 : return NDR_ERR_SUCCESS;
7270 : }
7271 :
7272 0 : _PUBLIC_ void ndr_print_DNS_RPC_AUTOCONFIG(struct ndr_print *ndr, const char *name, enum DNS_RPC_AUTOCONFIG r)
7273 : {
7274 0 : const char *val = NULL;
7275 :
7276 0 : switch (r) {
7277 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS: val = "DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS"; break;
7278 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS: val = "DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS"; break;
7279 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_ZONES: val = "DNS_RPC_AUTOCONFIG_INTERNAL_ZONES"; break;
7280 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT: val = "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT"; break;
7281 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND: val = "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND"; break;
7282 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND: val = "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND"; break;
7283 0 : case DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR: val = "DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR"; break;
7284 0 : case DNS_RPC_AUTOCONFIG_ALL: val = "DNS_RPC_AUTOCONFIG_ALL"; break;
7285 : }
7286 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
7287 0 : }
7288 :
7289 0 : static enum ndr_err_code ndr_push_DNS_RPC_AUTOCONFIGURE(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_AUTOCONFIGURE *r)
7290 : {
7291 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7292 0 : if (ndr_flags & NDR_SCALARS) {
7293 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7294 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwRpcStructureVersion));
7295 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved0));
7296 0 : NDR_CHECK(ndr_push_DNS_RPC_AUTOCONFIG(ndr, NDR_SCALARS, r->dwAutoConfigFlags));
7297 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReserved1));
7298 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszNewDomainName));
7299 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7300 : }
7301 0 : if (ndr_flags & NDR_BUFFERS) {
7302 0 : if (r->pszNewDomainName) {
7303 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszNewDomainName, CH_UTF8)));
7304 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7305 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszNewDomainName, CH_UTF8)));
7306 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszNewDomainName, ndr_charset_length(r->pszNewDomainName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
7307 : }
7308 : }
7309 0 : return NDR_ERR_SUCCESS;
7310 : }
7311 :
7312 0 : static enum ndr_err_code ndr_pull_DNS_RPC_AUTOCONFIGURE(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_AUTOCONFIGURE *r)
7313 : {
7314 : uint32_t _ptr_pszNewDomainName;
7315 0 : uint32_t size_pszNewDomainName_1 = 0;
7316 0 : uint32_t length_pszNewDomainName_1 = 0;
7317 0 : TALLOC_CTX *_mem_save_pszNewDomainName_0 = NULL;
7318 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7319 0 : if (ndr_flags & NDR_SCALARS) {
7320 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7321 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwRpcStructureVersion));
7322 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved0));
7323 0 : NDR_CHECK(ndr_pull_DNS_RPC_AUTOCONFIG(ndr, NDR_SCALARS, &r->dwAutoConfigFlags));
7324 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReserved1));
7325 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszNewDomainName));
7326 0 : if (_ptr_pszNewDomainName) {
7327 0 : NDR_PULL_ALLOC(ndr, r->pszNewDomainName);
7328 : } else {
7329 0 : r->pszNewDomainName = NULL;
7330 : }
7331 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7332 : }
7333 0 : if (ndr_flags & NDR_BUFFERS) {
7334 0 : if (r->pszNewDomainName) {
7335 0 : _mem_save_pszNewDomainName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7336 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszNewDomainName, 0);
7337 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszNewDomainName));
7338 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszNewDomainName));
7339 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszNewDomainName, &size_pszNewDomainName_1));
7340 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszNewDomainName, &length_pszNewDomainName_1));
7341 0 : if (length_pszNewDomainName_1 > size_pszNewDomainName_1) {
7342 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszNewDomainName_1, length_pszNewDomainName_1);
7343 : }
7344 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNewDomainName_1, sizeof(uint8_t)));
7345 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszNewDomainName, length_pszNewDomainName_1, sizeof(uint8_t), CH_UTF8));
7346 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszNewDomainName_0, 0);
7347 : }
7348 : }
7349 0 : return NDR_ERR_SUCCESS;
7350 : }
7351 :
7352 0 : _PUBLIC_ void ndr_print_DNS_RPC_AUTOCONFIGURE(struct ndr_print *ndr, const char *name, const struct DNS_RPC_AUTOCONFIGURE *r)
7353 : {
7354 0 : ndr_print_struct(ndr, name, "DNS_RPC_AUTOCONFIGURE");
7355 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7356 0 : ndr->depth++;
7357 0 : ndr_print_uint32(ndr, "dwRpcStructureVersion", r->dwRpcStructureVersion);
7358 0 : ndr_print_uint32(ndr, "dwReserved0", r->dwReserved0);
7359 0 : ndr_print_DNS_RPC_AUTOCONFIG(ndr, "dwAutoConfigFlags", r->dwAutoConfigFlags);
7360 0 : ndr_print_uint32(ndr, "dwReserved1", r->dwReserved1);
7361 0 : ndr_print_ptr(ndr, "pszNewDomainName", r->pszNewDomainName);
7362 0 : ndr->depth++;
7363 0 : if (r->pszNewDomainName) {
7364 0 : ndr_print_string(ndr, "pszNewDomainName", r->pszNewDomainName);
7365 : }
7366 0 : ndr->depth--;
7367 0 : ndr->depth--;
7368 : }
7369 :
7370 626 : static enum ndr_err_code ndr_push_DNS_SELECT_FLAGS(struct ndr_push *ndr, int ndr_flags, uint32_t r)
7371 : {
7372 626 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
7373 626 : return NDR_ERR_SUCCESS;
7374 : }
7375 :
7376 626 : static enum ndr_err_code ndr_pull_DNS_SELECT_FLAGS(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
7377 : {
7378 : uint32_t v;
7379 626 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
7380 626 : *r = v;
7381 626 : return NDR_ERR_SUCCESS;
7382 : }
7383 :
7384 0 : _PUBLIC_ void ndr_print_DNS_SELECT_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r)
7385 : {
7386 0 : ndr_print_uint32(ndr, name, r);
7387 0 : ndr->depth++;
7388 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_AUTHORITY_DATA", DNS_RPC_VIEW_AUTHORITY_DATA, r);
7389 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_CACHE_DATA", DNS_RPC_VIEW_CACHE_DATA, r);
7390 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_GLUE_DATA", DNS_RPC_VIEW_GLUE_DATA, r);
7391 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_ROOT_HINT_DATA", DNS_RPC_VIEW_ROOT_HINT_DATA, r);
7392 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_ADDITIONAL_DATA", DNS_RPC_VIEW_ADDITIONAL_DATA, r);
7393 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_NO_CHILDREN", DNS_RPC_VIEW_NO_CHILDREN, r);
7394 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DNS_RPC_VIEW_ONLY_CHILDREN", DNS_RPC_VIEW_ONLY_CHILDREN, r);
7395 0 : ndr->depth--;
7396 0 : }
7397 :
7398 0 : static enum ndr_err_code ndr_push_DNSSRV_STAT_HEADER(struct ndr_push *ndr, int ndr_flags, const struct DNSSRV_STAT_HEADER *r)
7399 : {
7400 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7401 0 : if (ndr_flags & NDR_SCALARS) {
7402 0 : NDR_CHECK(ndr_push_align(ndr, 4));
7403 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->StatId));
7404 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wLength));
7405 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fClear));
7406 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->fReserved));
7407 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7408 : }
7409 0 : if (ndr_flags & NDR_BUFFERS) {
7410 : }
7411 0 : return NDR_ERR_SUCCESS;
7412 : }
7413 :
7414 0 : static enum ndr_err_code ndr_pull_DNSSRV_STAT_HEADER(struct ndr_pull *ndr, int ndr_flags, struct DNSSRV_STAT_HEADER *r)
7415 : {
7416 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7417 0 : if (ndr_flags & NDR_SCALARS) {
7418 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
7419 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->StatId));
7420 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wLength));
7421 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fClear));
7422 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->fReserved));
7423 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7424 : }
7425 0 : if (ndr_flags & NDR_BUFFERS) {
7426 : }
7427 0 : return NDR_ERR_SUCCESS;
7428 : }
7429 :
7430 0 : _PUBLIC_ void ndr_print_DNSSRV_STAT_HEADER(struct ndr_print *ndr, const char *name, const struct DNSSRV_STAT_HEADER *r)
7431 : {
7432 0 : ndr_print_struct(ndr, name, "DNSSRV_STAT_HEADER");
7433 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7434 0 : ndr->depth++;
7435 0 : ndr_print_uint32(ndr, "StatId", r->StatId);
7436 0 : ndr_print_uint16(ndr, "wLength", r->wLength);
7437 0 : ndr_print_uint8(ndr, "fClear", r->fClear);
7438 0 : ndr_print_uint8(ndr, "fReserved", r->fReserved);
7439 0 : ndr->depth--;
7440 : }
7441 :
7442 0 : static enum ndr_err_code ndr_push_DNSSRV_STAT(struct ndr_push *ndr, int ndr_flags, const struct DNSSRV_STAT *r)
7443 : {
7444 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7445 0 : if (ndr_flags & NDR_SCALARS) {
7446 0 : NDR_CHECK(ndr_push_align(ndr, 4));
7447 0 : NDR_CHECK(ndr_push_DNSSRV_STAT_HEADER(ndr, NDR_SCALARS, &r->Header));
7448 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Buffer, 1));
7449 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7450 : }
7451 0 : if (ndr_flags & NDR_BUFFERS) {
7452 : }
7453 0 : return NDR_ERR_SUCCESS;
7454 : }
7455 :
7456 0 : static enum ndr_err_code ndr_pull_DNSSRV_STAT(struct ndr_pull *ndr, int ndr_flags, struct DNSSRV_STAT *r)
7457 : {
7458 0 : uint32_t size_Buffer_0 = 0;
7459 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7460 0 : if (ndr_flags & NDR_SCALARS) {
7461 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
7462 0 : NDR_CHECK(ndr_pull_DNSSRV_STAT_HEADER(ndr, NDR_SCALARS, &r->Header));
7463 0 : size_Buffer_0 = 1;
7464 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Buffer, size_Buffer_0));
7465 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7466 : }
7467 0 : if (ndr_flags & NDR_BUFFERS) {
7468 : }
7469 0 : return NDR_ERR_SUCCESS;
7470 : }
7471 :
7472 0 : _PUBLIC_ void ndr_print_DNSSRV_STAT(struct ndr_print *ndr, const char *name, const struct DNSSRV_STAT *r)
7473 : {
7474 0 : ndr_print_struct(ndr, name, "DNSSRV_STAT");
7475 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7476 0 : ndr->depth++;
7477 0 : ndr_print_DNSSRV_STAT_HEADER(ndr, "Header", &r->Header);
7478 0 : ndr_print_array_uint8(ndr, "Buffer", r->Buffer, 1);
7479 0 : ndr->depth--;
7480 : }
7481 :
7482 1576 : static enum ndr_err_code ndr_push_DNS_RPC_TYPEID(struct ndr_push *ndr, int ndr_flags, enum DNS_RPC_TYPEID r)
7483 : {
7484 1576 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
7485 1576 : return NDR_ERR_SUCCESS;
7486 : }
7487 :
7488 1576 : static enum ndr_err_code ndr_pull_DNS_RPC_TYPEID(struct ndr_pull *ndr, int ndr_flags, enum DNS_RPC_TYPEID *r)
7489 : {
7490 : uint32_t v;
7491 1576 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
7492 1576 : *r = v;
7493 1576 : return NDR_ERR_SUCCESS;
7494 : }
7495 :
7496 2 : _PUBLIC_ void ndr_print_DNS_RPC_TYPEID(struct ndr_print *ndr, const char *name, enum DNS_RPC_TYPEID r)
7497 : {
7498 2 : const char *val = NULL;
7499 :
7500 2 : switch (r) {
7501 2 : case DNSSRV_TYPEID_NULL: val = "DNSSRV_TYPEID_NULL"; break;
7502 0 : case DNSSRV_TYPEID_DWORD: val = "DNSSRV_TYPEID_DWORD"; break;
7503 0 : case DNSSRV_TYPEID_LPSTR: val = "DNSSRV_TYPEID_LPSTR"; break;
7504 0 : case DNSSRV_TYPEID_LPWSTR: val = "DNSSRV_TYPEID_LPWSTR"; break;
7505 0 : case DNSSRV_TYPEID_IPARRAY: val = "DNSSRV_TYPEID_IPARRAY"; break;
7506 0 : case DNSSRV_TYPEID_BUFFER: val = "DNSSRV_TYPEID_BUFFER"; break;
7507 0 : case DNSSRV_TYPEID_SERVER_INFO_W2K: val = "DNSSRV_TYPEID_SERVER_INFO_W2K"; break;
7508 0 : case DNSSRV_TYPEID_STATS: val = "DNSSRV_TYPEID_STATS"; break;
7509 0 : case DNSSRV_TYPEID_FORWARDERS_W2K: val = "DNSSRV_TYPEID_FORWARDERS_W2K"; break;
7510 0 : case DNSSRV_TYPEID_ZONE_W2K: val = "DNSSRV_TYPEID_ZONE_W2K"; break;
7511 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K: val = "DNSSRV_TYPEID_ZONE_INFO_W2K"; break;
7512 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K: val = "DNSSRV_TYPEID_ZONE_SECONDARIES_W2K"; break;
7513 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K: val = "DNSSRV_TYPEID_ZONE_DATABASE_W2K"; break;
7514 0 : case DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K: val = "DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K"; break;
7515 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K: val = "DNSSRV_TYPEID_ZONE_CREATE_W2K"; break;
7516 0 : case DNSSRV_TYPEID_NAME_AND_PARAM: val = "DNSSRV_TYPEID_NAME_AND_PARAM"; break;
7517 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K: val = "DNSSRV_TYPEID_ZONE_LIST_W2K"; break;
7518 0 : case DNSSRV_TYPEID_ZONE_RENAME: val = "DNSSRV_TYPEID_ZONE_RENAME"; break;
7519 0 : case DNSSRV_TYPEID_ZONE_EXPORT: val = "DNSSRV_TYPEID_ZONE_EXPORT"; break;
7520 0 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET: val = "DNSSRV_TYPEID_SERVER_INFO_DOTNET"; break;
7521 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET: val = "DNSSRV_TYPEID_FORWARDERS_DOTNET"; break;
7522 0 : case DNSSRV_TYPEID_ZONE: val = "DNSSRV_TYPEID_ZONE"; break;
7523 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET: val = "DNSSRV_TYPEID_ZONE_INFO_DOTNET"; break;
7524 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET: val = "DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET"; break;
7525 0 : case DNSSRV_TYPEID_ZONE_DATABASE: val = "DNSSRV_TYPEID_ZONE_DATABASE"; break;
7526 0 : case DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET: val = "DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET"; break;
7527 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET: val = "DNSSRV_TYPEID_ZONE_CREATE_DOTNET"; break;
7528 0 : case DNSSRV_TYPEID_ZONE_LIST: val = "DNSSRV_TYPEID_ZONE_LIST"; break;
7529 0 : case DNSSRV_TYPEID_DP_ENUM: val = "DNSSRV_TYPEID_DP_ENUM"; break;
7530 0 : case DNSSRV_TYPEID_DP_INFO: val = "DNSSRV_TYPEID_DP_INFO"; break;
7531 0 : case DNSSRV_TYPEID_DP_LIST: val = "DNSSRV_TYPEID_DP_LIST"; break;
7532 0 : case DNSSRV_TYPEID_ENLIST_DP: val = "DNSSRV_TYPEID_ENLIST_DP"; break;
7533 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP: val = "DNSSRV_TYPEID_ZONE_CHANGE_DP"; break;
7534 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER: val = "DNSSRV_TYPEID_ENUM_ZONES_FILTER"; break;
7535 0 : case DNSSRV_TYPEID_ADDRARRAY: val = "DNSSRV_TYPEID_ADDRARRAY"; break;
7536 0 : case DNSSRV_TYPEID_SERVER_INFO: val = "DNSSRV_TYPEID_SERVER_INFO"; break;
7537 0 : case DNSSRV_TYPEID_ZONE_INFO: val = "DNSSRV_TYPEID_ZONE_INFO"; break;
7538 0 : case DNSSRV_TYPEID_FORWARDERS: val = "DNSSRV_TYPEID_FORWARDERS"; break;
7539 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES: val = "DNSSRV_TYPEID_ZONE_SECONDARIES"; break;
7540 0 : case DNSSRV_TYPEID_ZONE_TYPE_RESET: val = "DNSSRV_TYPEID_ZONE_TYPE_RESET"; break;
7541 0 : case DNSSRV_TYPEID_ZONE_CREATE: val = "DNSSRV_TYPEID_ZONE_CREATE"; break;
7542 0 : case DNSSRV_TYPEID_IP_VALIDATE: val = "DNSSRV_TYPEID_IP_VALIDATE"; break;
7543 0 : case DNSSRV_TYPEID_AUTOCONFIGURE: val = "DNSSRV_TYPEID_AUTOCONFIGURE"; break;
7544 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST: val = "DNSSRV_TYPEID_UTF8_STRING_LIST"; break;
7545 0 : case DNSSRV_TYPEID_UNICODE_STRING_LIST: val = "DNSSRV_TYPEID_UNICODE_STRING_LIST"; break;
7546 : }
7547 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
7548 2 : }
7549 :
7550 1576 : static enum ndr_err_code ndr_push_DNSSRV_RPC_UNION(struct ndr_push *ndr, int ndr_flags, const union DNSSRV_RPC_UNION *r)
7551 : {
7552 : uint32_t level;
7553 1576 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7554 1576 : if (ndr_flags & NDR_SCALARS) {
7555 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7556 1576 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7557 1576 : NDR_CHECK(ndr_push_union_align(ndr, 5));
7558 1576 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, level));
7559 1576 : NDR_CHECK(ndr_push_union_align(ndr, 5));
7560 1576 : switch (level) {
7561 373 : case DNSSRV_TYPEID_NULL: {
7562 373 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Null));
7563 373 : break; }
7564 :
7565 10 : case DNSSRV_TYPEID_DWORD: {
7566 10 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Dword));
7567 10 : break; }
7568 :
7569 0 : case DNSSRV_TYPEID_LPSTR: {
7570 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->String));
7571 0 : break; }
7572 :
7573 0 : case DNSSRV_TYPEID_LPWSTR: {
7574 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->WideString));
7575 0 : break; }
7576 :
7577 0 : case DNSSRV_TYPEID_IPARRAY: {
7578 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->IpArray));
7579 0 : break; }
7580 :
7581 0 : case DNSSRV_TYPEID_BUFFER: {
7582 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Buffer));
7583 0 : break; }
7584 :
7585 2 : case DNSSRV_TYPEID_SERVER_INFO_W2K: {
7586 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ServerInfoW2K));
7587 2 : break; }
7588 :
7589 0 : case DNSSRV_TYPEID_STATS: {
7590 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Stats));
7591 0 : break; }
7592 :
7593 0 : case DNSSRV_TYPEID_FORWARDERS_W2K: {
7594 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ForwardersW2K));
7595 0 : break; }
7596 :
7597 0 : case DNSSRV_TYPEID_ZONE_W2K: {
7598 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneW2K));
7599 0 : break; }
7600 :
7601 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K: {
7602 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneInfoW2K));
7603 0 : break; }
7604 :
7605 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K: {
7606 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->SecondariesW2K));
7607 0 : break; }
7608 :
7609 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K: {
7610 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->DatabaseW2K));
7611 0 : break; }
7612 :
7613 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K: {
7614 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneCreateW2K));
7615 0 : break; }
7616 :
7617 791 : case DNSSRV_TYPEID_NAME_AND_PARAM: {
7618 791 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->NameAndParam));
7619 791 : break; }
7620 :
7621 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K: {
7622 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneListW2K));
7623 0 : break; }
7624 :
7625 2 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET: {
7626 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ServerInfoDotNet));
7627 2 : break; }
7628 :
7629 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET: {
7630 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ForwardersDotNet));
7631 0 : break; }
7632 :
7633 0 : case DNSSRV_TYPEID_ZONE: {
7634 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Zone));
7635 0 : break; }
7636 :
7637 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET: {
7638 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneInfoDotNet));
7639 0 : break; }
7640 :
7641 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET: {
7642 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->SecondariesDotNet));
7643 0 : break; }
7644 :
7645 0 : case DNSSRV_TYPEID_ZONE_DATABASE: {
7646 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Database));
7647 0 : break; }
7648 :
7649 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET: {
7650 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneCreateDotNet));
7651 0 : break; }
7652 :
7653 10 : case DNSSRV_TYPEID_ZONE_LIST: {
7654 10 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneList));
7655 10 : break; }
7656 :
7657 0 : case DNSSRV_TYPEID_ZONE_EXPORT: {
7658 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneExport));
7659 0 : break; }
7660 :
7661 0 : case DNSSRV_TYPEID_DP_INFO: {
7662 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->DirectoryPartition));
7663 0 : break; }
7664 :
7665 0 : case DNSSRV_TYPEID_DP_ENUM: {
7666 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->DirectoryPartitionEnum));
7667 0 : break; }
7668 :
7669 0 : case DNSSRV_TYPEID_DP_LIST: {
7670 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->DirectoryPartitionList));
7671 0 : break; }
7672 :
7673 0 : case DNSSRV_TYPEID_ENLIST_DP: {
7674 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->EnlistDirectoryPartition));
7675 0 : break; }
7676 :
7677 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP: {
7678 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneChangeDirectoryPartition));
7679 0 : break; }
7680 :
7681 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER: {
7682 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->EnumZonesFilter));
7683 0 : break; }
7684 :
7685 0 : case DNSSRV_TYPEID_ADDRARRAY: {
7686 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->AddrArray));
7687 0 : break; }
7688 :
7689 2 : case DNSSRV_TYPEID_SERVER_INFO: {
7690 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ServerInfo));
7691 2 : break; }
7692 :
7693 371 : case DNSSRV_TYPEID_ZONE_CREATE: {
7694 371 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneCreate));
7695 371 : break; }
7696 :
7697 0 : case DNSSRV_TYPEID_FORWARDERS: {
7698 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Forwarders));
7699 0 : break; }
7700 :
7701 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES: {
7702 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Secondaries));
7703 0 : break; }
7704 :
7705 0 : case DNSSRV_TYPEID_IP_VALIDATE: {
7706 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->IpValidate));
7707 0 : break; }
7708 :
7709 15 : case DNSSRV_TYPEID_ZONE_INFO: {
7710 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ZoneInfo));
7711 15 : break; }
7712 :
7713 0 : case DNSSRV_TYPEID_AUTOCONFIGURE: {
7714 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->AutoConfigure));
7715 0 : break; }
7716 :
7717 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST: {
7718 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->Utf8StringList));
7719 0 : break; }
7720 :
7721 0 : default:
7722 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
7723 : }
7724 0 : }
7725 1576 : if (ndr_flags & NDR_BUFFERS) {
7726 1576 : if (!(ndr_flags & NDR_SCALARS)) {
7727 : /* We didn't get it above, and the token is not needed after this. */
7728 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7729 : }
7730 1576 : switch (level) {
7731 373 : case DNSSRV_TYPEID_NULL:
7732 373 : if (r->Null) {
7733 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->Null));
7734 : }
7735 373 : break;
7736 :
7737 10 : case DNSSRV_TYPEID_DWORD:
7738 10 : break;
7739 :
7740 0 : case DNSSRV_TYPEID_LPSTR:
7741 0 : if (r->String) {
7742 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->String, CH_UTF8)));
7743 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7744 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->String, CH_UTF8)));
7745 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->String, ndr_charset_length(r->String, CH_UTF8), sizeof(uint8_t), CH_UTF8));
7746 : }
7747 0 : break;
7748 :
7749 0 : case DNSSRV_TYPEID_LPWSTR:
7750 0 : if (r->WideString) {
7751 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->WideString, CH_UTF16)));
7752 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7753 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->WideString, CH_UTF16)));
7754 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->WideString, ndr_charset_length(r->WideString, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7755 : }
7756 0 : break;
7757 :
7758 0 : case DNSSRV_TYPEID_IPARRAY:
7759 0 : if (r->IpArray) {
7760 0 : NDR_CHECK(ndr_push_IP4_ARRAY(ndr, NDR_SCALARS, r->IpArray));
7761 : }
7762 0 : break;
7763 :
7764 0 : case DNSSRV_TYPEID_BUFFER:
7765 0 : if (r->Buffer) {
7766 0 : NDR_CHECK(ndr_push_DNS_RPC_BUFFER(ndr, NDR_SCALARS, r->Buffer));
7767 : }
7768 0 : break;
7769 :
7770 2 : case DNSSRV_TYPEID_SERVER_INFO_W2K:
7771 2 : if (r->ServerInfoW2K) {
7772 2 : NDR_CHECK(ndr_push_DNS_RPC_SERVER_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfoW2K));
7773 : }
7774 2 : break;
7775 :
7776 0 : case DNSSRV_TYPEID_STATS:
7777 0 : if (r->Stats) {
7778 0 : NDR_CHECK(ndr_push_DNSSRV_STAT(ndr, NDR_SCALARS, r->Stats));
7779 : }
7780 0 : break;
7781 :
7782 0 : case DNSSRV_TYPEID_FORWARDERS_W2K:
7783 0 : if (r->ForwardersW2K) {
7784 0 : NDR_CHECK(ndr_push_DNS_RPC_FORWARDERS_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ForwardersW2K));
7785 : }
7786 0 : break;
7787 :
7788 0 : case DNSSRV_TYPEID_ZONE_W2K:
7789 0 : if (r->ZoneW2K) {
7790 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneW2K));
7791 : }
7792 0 : break;
7793 :
7794 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K:
7795 0 : if (r->ZoneInfoW2K) {
7796 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfoW2K));
7797 : }
7798 0 : break;
7799 :
7800 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
7801 0 : if (r->SecondariesW2K) {
7802 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_SECONDARIES_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->SecondariesW2K));
7803 : }
7804 0 : break;
7805 :
7806 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
7807 0 : if (r->DatabaseW2K) {
7808 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_DATABASE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->DatabaseW2K));
7809 : }
7810 0 : break;
7811 :
7812 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K:
7813 0 : if (r->ZoneCreateW2K) {
7814 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_CREATE_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreateW2K));
7815 : }
7816 0 : break;
7817 :
7818 791 : case DNSSRV_TYPEID_NAME_AND_PARAM:
7819 791 : if (r->NameAndParam) {
7820 791 : NDR_CHECK(ndr_push_DNS_RPC_NAME_AND_PARAM(ndr, NDR_SCALARS|NDR_BUFFERS, r->NameAndParam));
7821 : }
7822 791 : break;
7823 :
7824 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K:
7825 0 : if (r->ZoneListW2K) {
7826 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_LIST_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneListW2K));
7827 : }
7828 0 : break;
7829 :
7830 2 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
7831 2 : if (r->ServerInfoDotNet) {
7832 2 : NDR_CHECK(ndr_push_DNS_RPC_SERVER_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfoDotNet));
7833 : }
7834 2 : break;
7835 :
7836 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET:
7837 0 : if (r->ForwardersDotNet) {
7838 0 : NDR_CHECK(ndr_push_DNS_RPC_FORWARDERS_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ForwardersDotNet));
7839 : }
7840 0 : break;
7841 :
7842 0 : case DNSSRV_TYPEID_ZONE:
7843 0 : if (r->Zone) {
7844 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->Zone));
7845 : }
7846 0 : break;
7847 :
7848 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
7849 0 : if (r->ZoneInfoDotNet) {
7850 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfoDotNet));
7851 : }
7852 0 : break;
7853 :
7854 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
7855 0 : if (r->SecondariesDotNet) {
7856 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_SECONDARIES_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->SecondariesDotNet));
7857 : }
7858 0 : break;
7859 :
7860 0 : case DNSSRV_TYPEID_ZONE_DATABASE:
7861 0 : if (r->Database) {
7862 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_DATABASE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->Database));
7863 : }
7864 0 : break;
7865 :
7866 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
7867 0 : if (r->ZoneCreateDotNet) {
7868 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_CREATE_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreateDotNet));
7869 : }
7870 0 : break;
7871 :
7872 10 : case DNSSRV_TYPEID_ZONE_LIST:
7873 10 : if (r->ZoneList) {
7874 10 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_LIST_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneList));
7875 : }
7876 10 : break;
7877 :
7878 0 : case DNSSRV_TYPEID_ZONE_EXPORT:
7879 0 : if (r->ZoneExport) {
7880 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_EXPORT_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneExport));
7881 : }
7882 0 : break;
7883 :
7884 0 : case DNSSRV_TYPEID_DP_INFO:
7885 0 : if (r->DirectoryPartition) {
7886 0 : NDR_CHECK(ndr_push_DNS_RPC_DP_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartition));
7887 : }
7888 0 : break;
7889 :
7890 0 : case DNSSRV_TYPEID_DP_ENUM:
7891 0 : if (r->DirectoryPartitionEnum) {
7892 0 : NDR_CHECK(ndr_push_DNS_RPC_DP_ENUM(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartitionEnum));
7893 : }
7894 0 : break;
7895 :
7896 0 : case DNSSRV_TYPEID_DP_LIST:
7897 0 : if (r->DirectoryPartitionList) {
7898 0 : NDR_CHECK(ndr_push_DNS_RPC_DP_LIST(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartitionList));
7899 : }
7900 0 : break;
7901 :
7902 0 : case DNSSRV_TYPEID_ENLIST_DP:
7903 0 : if (r->EnlistDirectoryPartition) {
7904 0 : NDR_CHECK(ndr_push_DNS_RPC_ENLIST_DP(ndr, NDR_SCALARS|NDR_BUFFERS, r->EnlistDirectoryPartition));
7905 : }
7906 0 : break;
7907 :
7908 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP:
7909 0 : if (r->ZoneChangeDirectoryPartition) {
7910 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_CHANGE_DP(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneChangeDirectoryPartition));
7911 : }
7912 0 : break;
7913 :
7914 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
7915 0 : if (r->EnumZonesFilter) {
7916 0 : NDR_CHECK(ndr_push_DNS_RPC_ENUM_ZONES_FILTER(ndr, NDR_SCALARS|NDR_BUFFERS, r->EnumZonesFilter));
7917 : }
7918 0 : break;
7919 :
7920 0 : case DNSSRV_TYPEID_ADDRARRAY:
7921 0 : if (r->AddrArray) {
7922 0 : NDR_CHECK(ndr_push_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->AddrArray));
7923 : }
7924 0 : break;
7925 :
7926 2 : case DNSSRV_TYPEID_SERVER_INFO:
7927 2 : if (r->ServerInfo) {
7928 2 : NDR_CHECK(ndr_push_DNS_RPC_SERVER_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfo));
7929 : }
7930 2 : break;
7931 :
7932 371 : case DNSSRV_TYPEID_ZONE_CREATE:
7933 371 : if (r->ZoneCreate) {
7934 371 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreate));
7935 : }
7936 371 : break;
7937 :
7938 0 : case DNSSRV_TYPEID_FORWARDERS:
7939 0 : if (r->Forwarders) {
7940 0 : NDR_CHECK(ndr_push_DNS_RPC_FORWARDERS_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->Forwarders));
7941 : }
7942 0 : break;
7943 :
7944 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES:
7945 0 : if (r->Secondaries) {
7946 0 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_SECONDARIES_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->Secondaries));
7947 : }
7948 0 : break;
7949 :
7950 0 : case DNSSRV_TYPEID_IP_VALIDATE:
7951 0 : if (r->IpValidate) {
7952 0 : NDR_CHECK(ndr_push_DNS_RPC_IP_VALIDATE(ndr, NDR_SCALARS|NDR_BUFFERS, r->IpValidate));
7953 : }
7954 0 : break;
7955 :
7956 15 : case DNSSRV_TYPEID_ZONE_INFO:
7957 15 : if (r->ZoneInfo) {
7958 15 : NDR_CHECK(ndr_push_DNS_RPC_ZONE_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfo));
7959 : }
7960 15 : break;
7961 :
7962 0 : case DNSSRV_TYPEID_AUTOCONFIGURE:
7963 0 : if (r->AutoConfigure) {
7964 0 : NDR_CHECK(ndr_push_DNS_RPC_AUTOCONFIGURE(ndr, NDR_SCALARS|NDR_BUFFERS, r->AutoConfigure));
7965 : }
7966 0 : break;
7967 :
7968 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST:
7969 0 : if (r->Utf8StringList) {
7970 0 : NDR_CHECK(ndr_push_DNS_RPC_UTF8_STRING_LIST(ndr, NDR_SCALARS|NDR_BUFFERS, r->Utf8StringList));
7971 : }
7972 0 : break;
7973 :
7974 0 : default:
7975 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
7976 : }
7977 0 : }
7978 1576 : return NDR_ERR_SUCCESS;
7979 : }
7980 :
7981 1576 : static enum ndr_err_code ndr_pull_DNSSRV_RPC_UNION(struct ndr_pull *ndr, int ndr_flags, union DNSSRV_RPC_UNION *r)
7982 : {
7983 : uint32_t level;
7984 : uint32_t _level;
7985 1576 : TALLOC_CTX *_mem_save_Null_0 = NULL;
7986 : uint32_t _ptr_Null;
7987 1576 : TALLOC_CTX *_mem_save_String_0 = NULL;
7988 : uint32_t _ptr_String;
7989 1576 : uint32_t size_String_1 = 0;
7990 1576 : uint32_t length_String_1 = 0;
7991 1576 : TALLOC_CTX *_mem_save_WideString_0 = NULL;
7992 : uint32_t _ptr_WideString;
7993 1576 : uint32_t size_WideString_1 = 0;
7994 1576 : uint32_t length_WideString_1 = 0;
7995 1576 : TALLOC_CTX *_mem_save_IpArray_0 = NULL;
7996 : uint32_t _ptr_IpArray;
7997 1576 : TALLOC_CTX *_mem_save_Buffer_0 = NULL;
7998 : uint32_t _ptr_Buffer;
7999 1576 : TALLOC_CTX *_mem_save_ServerInfoW2K_0 = NULL;
8000 : uint32_t _ptr_ServerInfoW2K;
8001 1576 : TALLOC_CTX *_mem_save_Stats_0 = NULL;
8002 : uint32_t _ptr_Stats;
8003 1576 : TALLOC_CTX *_mem_save_ForwardersW2K_0 = NULL;
8004 : uint32_t _ptr_ForwardersW2K;
8005 1576 : TALLOC_CTX *_mem_save_ZoneW2K_0 = NULL;
8006 : uint32_t _ptr_ZoneW2K;
8007 1576 : TALLOC_CTX *_mem_save_ZoneInfoW2K_0 = NULL;
8008 : uint32_t _ptr_ZoneInfoW2K;
8009 1576 : TALLOC_CTX *_mem_save_SecondariesW2K_0 = NULL;
8010 : uint32_t _ptr_SecondariesW2K;
8011 1576 : TALLOC_CTX *_mem_save_DatabaseW2K_0 = NULL;
8012 : uint32_t _ptr_DatabaseW2K;
8013 1576 : TALLOC_CTX *_mem_save_ZoneCreateW2K_0 = NULL;
8014 : uint32_t _ptr_ZoneCreateW2K;
8015 1576 : TALLOC_CTX *_mem_save_NameAndParam_0 = NULL;
8016 : uint32_t _ptr_NameAndParam;
8017 1576 : TALLOC_CTX *_mem_save_ZoneListW2K_0 = NULL;
8018 : uint32_t _ptr_ZoneListW2K;
8019 1576 : TALLOC_CTX *_mem_save_ServerInfoDotNet_0 = NULL;
8020 : uint32_t _ptr_ServerInfoDotNet;
8021 1576 : TALLOC_CTX *_mem_save_ForwardersDotNet_0 = NULL;
8022 : uint32_t _ptr_ForwardersDotNet;
8023 1576 : TALLOC_CTX *_mem_save_Zone_0 = NULL;
8024 : uint32_t _ptr_Zone;
8025 1576 : TALLOC_CTX *_mem_save_ZoneInfoDotNet_0 = NULL;
8026 : uint32_t _ptr_ZoneInfoDotNet;
8027 1576 : TALLOC_CTX *_mem_save_SecondariesDotNet_0 = NULL;
8028 : uint32_t _ptr_SecondariesDotNet;
8029 1576 : TALLOC_CTX *_mem_save_Database_0 = NULL;
8030 : uint32_t _ptr_Database;
8031 1576 : TALLOC_CTX *_mem_save_ZoneCreateDotNet_0 = NULL;
8032 : uint32_t _ptr_ZoneCreateDotNet;
8033 1576 : TALLOC_CTX *_mem_save_ZoneList_0 = NULL;
8034 : uint32_t _ptr_ZoneList;
8035 1576 : TALLOC_CTX *_mem_save_ZoneExport_0 = NULL;
8036 : uint32_t _ptr_ZoneExport;
8037 1576 : TALLOC_CTX *_mem_save_DirectoryPartition_0 = NULL;
8038 : uint32_t _ptr_DirectoryPartition;
8039 1576 : TALLOC_CTX *_mem_save_DirectoryPartitionEnum_0 = NULL;
8040 : uint32_t _ptr_DirectoryPartitionEnum;
8041 1576 : TALLOC_CTX *_mem_save_DirectoryPartitionList_0 = NULL;
8042 : uint32_t _ptr_DirectoryPartitionList;
8043 1576 : TALLOC_CTX *_mem_save_EnlistDirectoryPartition_0 = NULL;
8044 : uint32_t _ptr_EnlistDirectoryPartition;
8045 1576 : TALLOC_CTX *_mem_save_ZoneChangeDirectoryPartition_0 = NULL;
8046 : uint32_t _ptr_ZoneChangeDirectoryPartition;
8047 1576 : TALLOC_CTX *_mem_save_EnumZonesFilter_0 = NULL;
8048 : uint32_t _ptr_EnumZonesFilter;
8049 1576 : TALLOC_CTX *_mem_save_AddrArray_0 = NULL;
8050 : uint32_t _ptr_AddrArray;
8051 1576 : TALLOC_CTX *_mem_save_ServerInfo_0 = NULL;
8052 : uint32_t _ptr_ServerInfo;
8053 1576 : TALLOC_CTX *_mem_save_ZoneCreate_0 = NULL;
8054 : uint32_t _ptr_ZoneCreate;
8055 1576 : TALLOC_CTX *_mem_save_Forwarders_0 = NULL;
8056 : uint32_t _ptr_Forwarders;
8057 1576 : TALLOC_CTX *_mem_save_Secondaries_0 = NULL;
8058 : uint32_t _ptr_Secondaries;
8059 1576 : TALLOC_CTX *_mem_save_IpValidate_0 = NULL;
8060 : uint32_t _ptr_IpValidate;
8061 1576 : TALLOC_CTX *_mem_save_ZoneInfo_0 = NULL;
8062 : uint32_t _ptr_ZoneInfo;
8063 1576 : TALLOC_CTX *_mem_save_AutoConfigure_0 = NULL;
8064 : uint32_t _ptr_AutoConfigure;
8065 1576 : TALLOC_CTX *_mem_save_Utf8StringList_0 = NULL;
8066 : uint32_t _ptr_Utf8StringList;
8067 1576 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8068 1576 : if (ndr_flags & NDR_SCALARS) {
8069 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8070 1576 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8071 1576 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
8072 1576 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_level));
8073 1576 : if (_level != level) {
8074 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
8075 : }
8076 1576 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
8077 1576 : switch (level) {
8078 373 : case DNSSRV_TYPEID_NULL: {
8079 373 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Null));
8080 373 : if (_ptr_Null) {
8081 0 : NDR_PULL_ALLOC(ndr, r->Null);
8082 : } else {
8083 373 : r->Null = NULL;
8084 : }
8085 373 : break; }
8086 :
8087 10 : case DNSSRV_TYPEID_DWORD: {
8088 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Dword));
8089 10 : break; }
8090 :
8091 0 : case DNSSRV_TYPEID_LPSTR: {
8092 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_String));
8093 0 : if (_ptr_String) {
8094 0 : NDR_PULL_ALLOC(ndr, r->String);
8095 : } else {
8096 0 : r->String = NULL;
8097 : }
8098 0 : break; }
8099 :
8100 0 : case DNSSRV_TYPEID_LPWSTR: {
8101 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_WideString));
8102 0 : if (_ptr_WideString) {
8103 0 : NDR_PULL_ALLOC(ndr, r->WideString);
8104 : } else {
8105 0 : r->WideString = NULL;
8106 : }
8107 0 : break; }
8108 :
8109 0 : case DNSSRV_TYPEID_IPARRAY: {
8110 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_IpArray));
8111 0 : if (_ptr_IpArray) {
8112 0 : NDR_PULL_ALLOC(ndr, r->IpArray);
8113 : } else {
8114 0 : r->IpArray = NULL;
8115 : }
8116 0 : break; }
8117 :
8118 0 : case DNSSRV_TYPEID_BUFFER: {
8119 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Buffer));
8120 0 : if (_ptr_Buffer) {
8121 0 : NDR_PULL_ALLOC(ndr, r->Buffer);
8122 : } else {
8123 0 : r->Buffer = NULL;
8124 : }
8125 0 : break; }
8126 :
8127 2 : case DNSSRV_TYPEID_SERVER_INFO_W2K: {
8128 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServerInfoW2K));
8129 2 : if (_ptr_ServerInfoW2K) {
8130 2 : NDR_PULL_ALLOC(ndr, r->ServerInfoW2K);
8131 : } else {
8132 0 : r->ServerInfoW2K = NULL;
8133 : }
8134 2 : break; }
8135 :
8136 0 : case DNSSRV_TYPEID_STATS: {
8137 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Stats));
8138 0 : if (_ptr_Stats) {
8139 0 : NDR_PULL_ALLOC(ndr, r->Stats);
8140 : } else {
8141 0 : r->Stats = NULL;
8142 : }
8143 0 : break; }
8144 :
8145 0 : case DNSSRV_TYPEID_FORWARDERS_W2K: {
8146 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ForwardersW2K));
8147 0 : if (_ptr_ForwardersW2K) {
8148 0 : NDR_PULL_ALLOC(ndr, r->ForwardersW2K);
8149 : } else {
8150 0 : r->ForwardersW2K = NULL;
8151 : }
8152 0 : break; }
8153 :
8154 0 : case DNSSRV_TYPEID_ZONE_W2K: {
8155 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneW2K));
8156 0 : if (_ptr_ZoneW2K) {
8157 0 : NDR_PULL_ALLOC(ndr, r->ZoneW2K);
8158 : } else {
8159 0 : r->ZoneW2K = NULL;
8160 : }
8161 0 : break; }
8162 :
8163 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K: {
8164 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneInfoW2K));
8165 0 : if (_ptr_ZoneInfoW2K) {
8166 0 : NDR_PULL_ALLOC(ndr, r->ZoneInfoW2K);
8167 : } else {
8168 0 : r->ZoneInfoW2K = NULL;
8169 : }
8170 0 : break; }
8171 :
8172 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K: {
8173 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_SecondariesW2K));
8174 0 : if (_ptr_SecondariesW2K) {
8175 0 : NDR_PULL_ALLOC(ndr, r->SecondariesW2K);
8176 : } else {
8177 0 : r->SecondariesW2K = NULL;
8178 : }
8179 0 : break; }
8180 :
8181 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K: {
8182 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseW2K));
8183 0 : if (_ptr_DatabaseW2K) {
8184 0 : NDR_PULL_ALLOC(ndr, r->DatabaseW2K);
8185 : } else {
8186 0 : r->DatabaseW2K = NULL;
8187 : }
8188 0 : break; }
8189 :
8190 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K: {
8191 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneCreateW2K));
8192 0 : if (_ptr_ZoneCreateW2K) {
8193 0 : NDR_PULL_ALLOC(ndr, r->ZoneCreateW2K);
8194 : } else {
8195 0 : r->ZoneCreateW2K = NULL;
8196 : }
8197 0 : break; }
8198 :
8199 791 : case DNSSRV_TYPEID_NAME_AND_PARAM: {
8200 791 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_NameAndParam));
8201 791 : if (_ptr_NameAndParam) {
8202 791 : NDR_PULL_ALLOC(ndr, r->NameAndParam);
8203 : } else {
8204 0 : r->NameAndParam = NULL;
8205 : }
8206 791 : break; }
8207 :
8208 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K: {
8209 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneListW2K));
8210 0 : if (_ptr_ZoneListW2K) {
8211 0 : NDR_PULL_ALLOC(ndr, r->ZoneListW2K);
8212 : } else {
8213 0 : r->ZoneListW2K = NULL;
8214 : }
8215 0 : break; }
8216 :
8217 2 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET: {
8218 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServerInfoDotNet));
8219 2 : if (_ptr_ServerInfoDotNet) {
8220 2 : NDR_PULL_ALLOC(ndr, r->ServerInfoDotNet);
8221 : } else {
8222 0 : r->ServerInfoDotNet = NULL;
8223 : }
8224 2 : break; }
8225 :
8226 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET: {
8227 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ForwardersDotNet));
8228 0 : if (_ptr_ForwardersDotNet) {
8229 0 : NDR_PULL_ALLOC(ndr, r->ForwardersDotNet);
8230 : } else {
8231 0 : r->ForwardersDotNet = NULL;
8232 : }
8233 0 : break; }
8234 :
8235 0 : case DNSSRV_TYPEID_ZONE: {
8236 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Zone));
8237 0 : if (_ptr_Zone) {
8238 0 : NDR_PULL_ALLOC(ndr, r->Zone);
8239 : } else {
8240 0 : r->Zone = NULL;
8241 : }
8242 0 : break; }
8243 :
8244 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET: {
8245 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneInfoDotNet));
8246 0 : if (_ptr_ZoneInfoDotNet) {
8247 0 : NDR_PULL_ALLOC(ndr, r->ZoneInfoDotNet);
8248 : } else {
8249 0 : r->ZoneInfoDotNet = NULL;
8250 : }
8251 0 : break; }
8252 :
8253 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET: {
8254 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_SecondariesDotNet));
8255 0 : if (_ptr_SecondariesDotNet) {
8256 0 : NDR_PULL_ALLOC(ndr, r->SecondariesDotNet);
8257 : } else {
8258 0 : r->SecondariesDotNet = NULL;
8259 : }
8260 0 : break; }
8261 :
8262 0 : case DNSSRV_TYPEID_ZONE_DATABASE: {
8263 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Database));
8264 0 : if (_ptr_Database) {
8265 0 : NDR_PULL_ALLOC(ndr, r->Database);
8266 : } else {
8267 0 : r->Database = NULL;
8268 : }
8269 0 : break; }
8270 :
8271 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET: {
8272 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneCreateDotNet));
8273 0 : if (_ptr_ZoneCreateDotNet) {
8274 0 : NDR_PULL_ALLOC(ndr, r->ZoneCreateDotNet);
8275 : } else {
8276 0 : r->ZoneCreateDotNet = NULL;
8277 : }
8278 0 : break; }
8279 :
8280 10 : case DNSSRV_TYPEID_ZONE_LIST: {
8281 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneList));
8282 10 : if (_ptr_ZoneList) {
8283 10 : NDR_PULL_ALLOC(ndr, r->ZoneList);
8284 : } else {
8285 0 : r->ZoneList = NULL;
8286 : }
8287 10 : break; }
8288 :
8289 0 : case DNSSRV_TYPEID_ZONE_EXPORT: {
8290 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneExport));
8291 0 : if (_ptr_ZoneExport) {
8292 0 : NDR_PULL_ALLOC(ndr, r->ZoneExport);
8293 : } else {
8294 0 : r->ZoneExport = NULL;
8295 : }
8296 0 : break; }
8297 :
8298 0 : case DNSSRV_TYPEID_DP_INFO: {
8299 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DirectoryPartition));
8300 0 : if (_ptr_DirectoryPartition) {
8301 0 : NDR_PULL_ALLOC(ndr, r->DirectoryPartition);
8302 : } else {
8303 0 : r->DirectoryPartition = NULL;
8304 : }
8305 0 : break; }
8306 :
8307 0 : case DNSSRV_TYPEID_DP_ENUM: {
8308 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DirectoryPartitionEnum));
8309 0 : if (_ptr_DirectoryPartitionEnum) {
8310 0 : NDR_PULL_ALLOC(ndr, r->DirectoryPartitionEnum);
8311 : } else {
8312 0 : r->DirectoryPartitionEnum = NULL;
8313 : }
8314 0 : break; }
8315 :
8316 0 : case DNSSRV_TYPEID_DP_LIST: {
8317 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DirectoryPartitionList));
8318 0 : if (_ptr_DirectoryPartitionList) {
8319 0 : NDR_PULL_ALLOC(ndr, r->DirectoryPartitionList);
8320 : } else {
8321 0 : r->DirectoryPartitionList = NULL;
8322 : }
8323 0 : break; }
8324 :
8325 0 : case DNSSRV_TYPEID_ENLIST_DP: {
8326 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EnlistDirectoryPartition));
8327 0 : if (_ptr_EnlistDirectoryPartition) {
8328 0 : NDR_PULL_ALLOC(ndr, r->EnlistDirectoryPartition);
8329 : } else {
8330 0 : r->EnlistDirectoryPartition = NULL;
8331 : }
8332 0 : break; }
8333 :
8334 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP: {
8335 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneChangeDirectoryPartition));
8336 0 : if (_ptr_ZoneChangeDirectoryPartition) {
8337 0 : NDR_PULL_ALLOC(ndr, r->ZoneChangeDirectoryPartition);
8338 : } else {
8339 0 : r->ZoneChangeDirectoryPartition = NULL;
8340 : }
8341 0 : break; }
8342 :
8343 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER: {
8344 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EnumZonesFilter));
8345 0 : if (_ptr_EnumZonesFilter) {
8346 0 : NDR_PULL_ALLOC(ndr, r->EnumZonesFilter);
8347 : } else {
8348 0 : r->EnumZonesFilter = NULL;
8349 : }
8350 0 : break; }
8351 :
8352 0 : case DNSSRV_TYPEID_ADDRARRAY: {
8353 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_AddrArray));
8354 0 : if (_ptr_AddrArray) {
8355 0 : NDR_PULL_ALLOC(ndr, r->AddrArray);
8356 : } else {
8357 0 : r->AddrArray = NULL;
8358 : }
8359 0 : break; }
8360 :
8361 2 : case DNSSRV_TYPEID_SERVER_INFO: {
8362 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServerInfo));
8363 2 : if (_ptr_ServerInfo) {
8364 2 : NDR_PULL_ALLOC(ndr, r->ServerInfo);
8365 : } else {
8366 0 : r->ServerInfo = NULL;
8367 : }
8368 2 : break; }
8369 :
8370 371 : case DNSSRV_TYPEID_ZONE_CREATE: {
8371 371 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneCreate));
8372 371 : if (_ptr_ZoneCreate) {
8373 371 : NDR_PULL_ALLOC(ndr, r->ZoneCreate);
8374 : } else {
8375 0 : r->ZoneCreate = NULL;
8376 : }
8377 371 : break; }
8378 :
8379 0 : case DNSSRV_TYPEID_FORWARDERS: {
8380 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Forwarders));
8381 0 : if (_ptr_Forwarders) {
8382 0 : NDR_PULL_ALLOC(ndr, r->Forwarders);
8383 : } else {
8384 0 : r->Forwarders = NULL;
8385 : }
8386 0 : break; }
8387 :
8388 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES: {
8389 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Secondaries));
8390 0 : if (_ptr_Secondaries) {
8391 0 : NDR_PULL_ALLOC(ndr, r->Secondaries);
8392 : } else {
8393 0 : r->Secondaries = NULL;
8394 : }
8395 0 : break; }
8396 :
8397 0 : case DNSSRV_TYPEID_IP_VALIDATE: {
8398 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_IpValidate));
8399 0 : if (_ptr_IpValidate) {
8400 0 : NDR_PULL_ALLOC(ndr, r->IpValidate);
8401 : } else {
8402 0 : r->IpValidate = NULL;
8403 : }
8404 0 : break; }
8405 :
8406 15 : case DNSSRV_TYPEID_ZONE_INFO: {
8407 15 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ZoneInfo));
8408 15 : if (_ptr_ZoneInfo) {
8409 15 : NDR_PULL_ALLOC(ndr, r->ZoneInfo);
8410 : } else {
8411 0 : r->ZoneInfo = NULL;
8412 : }
8413 15 : break; }
8414 :
8415 0 : case DNSSRV_TYPEID_AUTOCONFIGURE: {
8416 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_AutoConfigure));
8417 0 : if (_ptr_AutoConfigure) {
8418 0 : NDR_PULL_ALLOC(ndr, r->AutoConfigure);
8419 : } else {
8420 0 : r->AutoConfigure = NULL;
8421 : }
8422 0 : break; }
8423 :
8424 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST: {
8425 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Utf8StringList));
8426 0 : if (_ptr_Utf8StringList) {
8427 0 : NDR_PULL_ALLOC(ndr, r->Utf8StringList);
8428 : } else {
8429 0 : r->Utf8StringList = NULL;
8430 : }
8431 0 : break; }
8432 :
8433 0 : default:
8434 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
8435 : }
8436 0 : }
8437 1576 : if (ndr_flags & NDR_BUFFERS) {
8438 1576 : if (!(ndr_flags & NDR_SCALARS)) {
8439 : /* We didn't get it above, and the token is not needed after this. */
8440 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8441 : }
8442 1576 : switch (level) {
8443 373 : case DNSSRV_TYPEID_NULL:
8444 373 : if (r->Null) {
8445 0 : _mem_save_Null_0 = NDR_PULL_GET_MEM_CTX(ndr);
8446 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Null, 0);
8447 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->Null));
8448 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Null_0, 0);
8449 : }
8450 373 : break;
8451 :
8452 10 : case DNSSRV_TYPEID_DWORD:
8453 10 : break;
8454 :
8455 0 : case DNSSRV_TYPEID_LPSTR:
8456 0 : if (r->String) {
8457 0 : _mem_save_String_0 = NDR_PULL_GET_MEM_CTX(ndr);
8458 0 : NDR_PULL_SET_MEM_CTX(ndr, r->String, 0);
8459 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->String));
8460 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->String));
8461 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->String, &size_String_1));
8462 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->String, &length_String_1));
8463 0 : if (length_String_1 > size_String_1) {
8464 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_String_1, length_String_1);
8465 : }
8466 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_String_1, sizeof(uint8_t)));
8467 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->String, length_String_1, sizeof(uint8_t), CH_UTF8));
8468 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_String_0, 0);
8469 : }
8470 0 : break;
8471 :
8472 0 : case DNSSRV_TYPEID_LPWSTR:
8473 0 : if (r->WideString) {
8474 0 : _mem_save_WideString_0 = NDR_PULL_GET_MEM_CTX(ndr);
8475 0 : NDR_PULL_SET_MEM_CTX(ndr, r->WideString, 0);
8476 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->WideString));
8477 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->WideString));
8478 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->WideString, &size_WideString_1));
8479 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->WideString, &length_WideString_1));
8480 0 : if (length_WideString_1 > size_WideString_1) {
8481 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_WideString_1, length_WideString_1);
8482 : }
8483 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_WideString_1, sizeof(uint16_t)));
8484 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->WideString, length_WideString_1, sizeof(uint16_t), CH_UTF16));
8485 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_WideString_0, 0);
8486 : }
8487 0 : break;
8488 :
8489 0 : case DNSSRV_TYPEID_IPARRAY:
8490 0 : if (r->IpArray) {
8491 0 : _mem_save_IpArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
8492 0 : NDR_PULL_SET_MEM_CTX(ndr, r->IpArray, 0);
8493 0 : NDR_CHECK(ndr_pull_IP4_ARRAY(ndr, NDR_SCALARS, r->IpArray));
8494 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_IpArray_0, 0);
8495 : }
8496 0 : break;
8497 :
8498 0 : case DNSSRV_TYPEID_BUFFER:
8499 0 : if (r->Buffer) {
8500 0 : _mem_save_Buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
8501 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Buffer, 0);
8502 0 : NDR_CHECK(ndr_pull_DNS_RPC_BUFFER(ndr, NDR_SCALARS, r->Buffer));
8503 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Buffer_0, 0);
8504 : }
8505 0 : break;
8506 :
8507 2 : case DNSSRV_TYPEID_SERVER_INFO_W2K:
8508 2 : if (r->ServerInfoW2K) {
8509 2 : _mem_save_ServerInfoW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8510 2 : NDR_PULL_SET_MEM_CTX(ndr, r->ServerInfoW2K, 0);
8511 2 : NDR_CHECK(ndr_pull_DNS_RPC_SERVER_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfoW2K));
8512 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServerInfoW2K_0, 0);
8513 : }
8514 2 : break;
8515 :
8516 0 : case DNSSRV_TYPEID_STATS:
8517 0 : if (r->Stats) {
8518 0 : _mem_save_Stats_0 = NDR_PULL_GET_MEM_CTX(ndr);
8519 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Stats, 0);
8520 0 : NDR_CHECK(ndr_pull_DNSSRV_STAT(ndr, NDR_SCALARS, r->Stats));
8521 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Stats_0, 0);
8522 : }
8523 0 : break;
8524 :
8525 0 : case DNSSRV_TYPEID_FORWARDERS_W2K:
8526 0 : if (r->ForwardersW2K) {
8527 0 : _mem_save_ForwardersW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8528 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ForwardersW2K, 0);
8529 0 : NDR_CHECK(ndr_pull_DNS_RPC_FORWARDERS_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ForwardersW2K));
8530 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ForwardersW2K_0, 0);
8531 : }
8532 0 : break;
8533 :
8534 0 : case DNSSRV_TYPEID_ZONE_W2K:
8535 0 : if (r->ZoneW2K) {
8536 0 : _mem_save_ZoneW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8537 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneW2K, 0);
8538 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneW2K));
8539 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneW2K_0, 0);
8540 : }
8541 0 : break;
8542 :
8543 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K:
8544 0 : if (r->ZoneInfoW2K) {
8545 0 : _mem_save_ZoneInfoW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8546 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneInfoW2K, 0);
8547 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfoW2K));
8548 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneInfoW2K_0, 0);
8549 : }
8550 0 : break;
8551 :
8552 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
8553 0 : if (r->SecondariesW2K) {
8554 0 : _mem_save_SecondariesW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8555 0 : NDR_PULL_SET_MEM_CTX(ndr, r->SecondariesW2K, 0);
8556 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_SECONDARIES_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->SecondariesW2K));
8557 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SecondariesW2K_0, 0);
8558 : }
8559 0 : break;
8560 :
8561 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
8562 0 : if (r->DatabaseW2K) {
8563 0 : _mem_save_DatabaseW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8564 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DatabaseW2K, 0);
8565 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_DATABASE_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->DatabaseW2K));
8566 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseW2K_0, 0);
8567 : }
8568 0 : break;
8569 :
8570 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K:
8571 0 : if (r->ZoneCreateW2K) {
8572 0 : _mem_save_ZoneCreateW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8573 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneCreateW2K, 0);
8574 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_CREATE_INFO_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreateW2K));
8575 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneCreateW2K_0, 0);
8576 : }
8577 0 : break;
8578 :
8579 791 : case DNSSRV_TYPEID_NAME_AND_PARAM:
8580 791 : if (r->NameAndParam) {
8581 791 : _mem_save_NameAndParam_0 = NDR_PULL_GET_MEM_CTX(ndr);
8582 791 : NDR_PULL_SET_MEM_CTX(ndr, r->NameAndParam, 0);
8583 791 : NDR_CHECK(ndr_pull_DNS_RPC_NAME_AND_PARAM(ndr, NDR_SCALARS|NDR_BUFFERS, r->NameAndParam));
8584 791 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_NameAndParam_0, 0);
8585 : }
8586 791 : break;
8587 :
8588 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K:
8589 0 : if (r->ZoneListW2K) {
8590 0 : _mem_save_ZoneListW2K_0 = NDR_PULL_GET_MEM_CTX(ndr);
8591 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneListW2K, 0);
8592 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_LIST_W2K(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneListW2K));
8593 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneListW2K_0, 0);
8594 : }
8595 0 : break;
8596 :
8597 2 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
8598 2 : if (r->ServerInfoDotNet) {
8599 2 : _mem_save_ServerInfoDotNet_0 = NDR_PULL_GET_MEM_CTX(ndr);
8600 2 : NDR_PULL_SET_MEM_CTX(ndr, r->ServerInfoDotNet, 0);
8601 2 : NDR_CHECK(ndr_pull_DNS_RPC_SERVER_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfoDotNet));
8602 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServerInfoDotNet_0, 0);
8603 : }
8604 2 : break;
8605 :
8606 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET:
8607 0 : if (r->ForwardersDotNet) {
8608 0 : _mem_save_ForwardersDotNet_0 = NDR_PULL_GET_MEM_CTX(ndr);
8609 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ForwardersDotNet, 0);
8610 0 : NDR_CHECK(ndr_pull_DNS_RPC_FORWARDERS_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ForwardersDotNet));
8611 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ForwardersDotNet_0, 0);
8612 : }
8613 0 : break;
8614 :
8615 0 : case DNSSRV_TYPEID_ZONE:
8616 0 : if (r->Zone) {
8617 0 : _mem_save_Zone_0 = NDR_PULL_GET_MEM_CTX(ndr);
8618 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Zone, 0);
8619 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->Zone));
8620 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Zone_0, 0);
8621 : }
8622 0 : break;
8623 :
8624 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
8625 0 : if (r->ZoneInfoDotNet) {
8626 0 : _mem_save_ZoneInfoDotNet_0 = NDR_PULL_GET_MEM_CTX(ndr);
8627 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneInfoDotNet, 0);
8628 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfoDotNet));
8629 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneInfoDotNet_0, 0);
8630 : }
8631 0 : break;
8632 :
8633 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
8634 0 : if (r->SecondariesDotNet) {
8635 0 : _mem_save_SecondariesDotNet_0 = NDR_PULL_GET_MEM_CTX(ndr);
8636 0 : NDR_PULL_SET_MEM_CTX(ndr, r->SecondariesDotNet, 0);
8637 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_SECONDARIES_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->SecondariesDotNet));
8638 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SecondariesDotNet_0, 0);
8639 : }
8640 0 : break;
8641 :
8642 0 : case DNSSRV_TYPEID_ZONE_DATABASE:
8643 0 : if (r->Database) {
8644 0 : _mem_save_Database_0 = NDR_PULL_GET_MEM_CTX(ndr);
8645 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Database, 0);
8646 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_DATABASE_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->Database));
8647 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Database_0, 0);
8648 : }
8649 0 : break;
8650 :
8651 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
8652 0 : if (r->ZoneCreateDotNet) {
8653 0 : _mem_save_ZoneCreateDotNet_0 = NDR_PULL_GET_MEM_CTX(ndr);
8654 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneCreateDotNet, 0);
8655 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_CREATE_INFO_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreateDotNet));
8656 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneCreateDotNet_0, 0);
8657 : }
8658 0 : break;
8659 :
8660 10 : case DNSSRV_TYPEID_ZONE_LIST:
8661 10 : if (r->ZoneList) {
8662 10 : _mem_save_ZoneList_0 = NDR_PULL_GET_MEM_CTX(ndr);
8663 10 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneList, 0);
8664 10 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_LIST_DOTNET(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneList));
8665 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneList_0, 0);
8666 : }
8667 10 : break;
8668 :
8669 0 : case DNSSRV_TYPEID_ZONE_EXPORT:
8670 0 : if (r->ZoneExport) {
8671 0 : _mem_save_ZoneExport_0 = NDR_PULL_GET_MEM_CTX(ndr);
8672 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneExport, 0);
8673 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_EXPORT_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneExport));
8674 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneExport_0, 0);
8675 : }
8676 0 : break;
8677 :
8678 0 : case DNSSRV_TYPEID_DP_INFO:
8679 0 : if (r->DirectoryPartition) {
8680 0 : _mem_save_DirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
8681 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DirectoryPartition, 0);
8682 0 : NDR_CHECK(ndr_pull_DNS_RPC_DP_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartition));
8683 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DirectoryPartition_0, 0);
8684 : }
8685 0 : break;
8686 :
8687 0 : case DNSSRV_TYPEID_DP_ENUM:
8688 0 : if (r->DirectoryPartitionEnum) {
8689 0 : _mem_save_DirectoryPartitionEnum_0 = NDR_PULL_GET_MEM_CTX(ndr);
8690 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DirectoryPartitionEnum, 0);
8691 0 : NDR_CHECK(ndr_pull_DNS_RPC_DP_ENUM(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartitionEnum));
8692 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DirectoryPartitionEnum_0, 0);
8693 : }
8694 0 : break;
8695 :
8696 0 : case DNSSRV_TYPEID_DP_LIST:
8697 0 : if (r->DirectoryPartitionList) {
8698 0 : _mem_save_DirectoryPartitionList_0 = NDR_PULL_GET_MEM_CTX(ndr);
8699 0 : NDR_PULL_SET_MEM_CTX(ndr, r->DirectoryPartitionList, 0);
8700 0 : NDR_CHECK(ndr_pull_DNS_RPC_DP_LIST(ndr, NDR_SCALARS|NDR_BUFFERS, r->DirectoryPartitionList));
8701 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DirectoryPartitionList_0, 0);
8702 : }
8703 0 : break;
8704 :
8705 0 : case DNSSRV_TYPEID_ENLIST_DP:
8706 0 : if (r->EnlistDirectoryPartition) {
8707 0 : _mem_save_EnlistDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
8708 0 : NDR_PULL_SET_MEM_CTX(ndr, r->EnlistDirectoryPartition, 0);
8709 0 : NDR_CHECK(ndr_pull_DNS_RPC_ENLIST_DP(ndr, NDR_SCALARS|NDR_BUFFERS, r->EnlistDirectoryPartition));
8710 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EnlistDirectoryPartition_0, 0);
8711 : }
8712 0 : break;
8713 :
8714 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP:
8715 0 : if (r->ZoneChangeDirectoryPartition) {
8716 0 : _mem_save_ZoneChangeDirectoryPartition_0 = NDR_PULL_GET_MEM_CTX(ndr);
8717 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneChangeDirectoryPartition, 0);
8718 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_CHANGE_DP(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneChangeDirectoryPartition));
8719 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneChangeDirectoryPartition_0, 0);
8720 : }
8721 0 : break;
8722 :
8723 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
8724 0 : if (r->EnumZonesFilter) {
8725 0 : _mem_save_EnumZonesFilter_0 = NDR_PULL_GET_MEM_CTX(ndr);
8726 0 : NDR_PULL_SET_MEM_CTX(ndr, r->EnumZonesFilter, 0);
8727 0 : NDR_CHECK(ndr_pull_DNS_RPC_ENUM_ZONES_FILTER(ndr, NDR_SCALARS|NDR_BUFFERS, r->EnumZonesFilter));
8728 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EnumZonesFilter_0, 0);
8729 : }
8730 0 : break;
8731 :
8732 0 : case DNSSRV_TYPEID_ADDRARRAY:
8733 0 : if (r->AddrArray) {
8734 0 : _mem_save_AddrArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
8735 0 : NDR_PULL_SET_MEM_CTX(ndr, r->AddrArray, 0);
8736 0 : NDR_CHECK(ndr_pull_DNS_ADDR_ARRAY(ndr, NDR_SCALARS, r->AddrArray));
8737 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_AddrArray_0, 0);
8738 : }
8739 0 : break;
8740 :
8741 2 : case DNSSRV_TYPEID_SERVER_INFO:
8742 2 : if (r->ServerInfo) {
8743 2 : _mem_save_ServerInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
8744 2 : NDR_PULL_SET_MEM_CTX(ndr, r->ServerInfo, 0);
8745 2 : NDR_CHECK(ndr_pull_DNS_RPC_SERVER_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ServerInfo));
8746 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServerInfo_0, 0);
8747 : }
8748 2 : break;
8749 :
8750 371 : case DNSSRV_TYPEID_ZONE_CREATE:
8751 371 : if (r->ZoneCreate) {
8752 371 : _mem_save_ZoneCreate_0 = NDR_PULL_GET_MEM_CTX(ndr);
8753 371 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneCreate, 0);
8754 371 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneCreate));
8755 371 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneCreate_0, 0);
8756 : }
8757 371 : break;
8758 :
8759 0 : case DNSSRV_TYPEID_FORWARDERS:
8760 0 : if (r->Forwarders) {
8761 0 : _mem_save_Forwarders_0 = NDR_PULL_GET_MEM_CTX(ndr);
8762 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Forwarders, 0);
8763 0 : NDR_CHECK(ndr_pull_DNS_RPC_FORWARDERS_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->Forwarders));
8764 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Forwarders_0, 0);
8765 : }
8766 0 : break;
8767 :
8768 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES:
8769 0 : if (r->Secondaries) {
8770 0 : _mem_save_Secondaries_0 = NDR_PULL_GET_MEM_CTX(ndr);
8771 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Secondaries, 0);
8772 0 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_SECONDARIES_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->Secondaries));
8773 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Secondaries_0, 0);
8774 : }
8775 0 : break;
8776 :
8777 0 : case DNSSRV_TYPEID_IP_VALIDATE:
8778 0 : if (r->IpValidate) {
8779 0 : _mem_save_IpValidate_0 = NDR_PULL_GET_MEM_CTX(ndr);
8780 0 : NDR_PULL_SET_MEM_CTX(ndr, r->IpValidate, 0);
8781 0 : NDR_CHECK(ndr_pull_DNS_RPC_IP_VALIDATE(ndr, NDR_SCALARS|NDR_BUFFERS, r->IpValidate));
8782 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_IpValidate_0, 0);
8783 : }
8784 0 : break;
8785 :
8786 15 : case DNSSRV_TYPEID_ZONE_INFO:
8787 15 : if (r->ZoneInfo) {
8788 15 : _mem_save_ZoneInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
8789 15 : NDR_PULL_SET_MEM_CTX(ndr, r->ZoneInfo, 0);
8790 15 : NDR_CHECK(ndr_pull_DNS_RPC_ZONE_INFO_LONGHORN(ndr, NDR_SCALARS|NDR_BUFFERS, r->ZoneInfo));
8791 15 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ZoneInfo_0, 0);
8792 : }
8793 15 : break;
8794 :
8795 0 : case DNSSRV_TYPEID_AUTOCONFIGURE:
8796 0 : if (r->AutoConfigure) {
8797 0 : _mem_save_AutoConfigure_0 = NDR_PULL_GET_MEM_CTX(ndr);
8798 0 : NDR_PULL_SET_MEM_CTX(ndr, r->AutoConfigure, 0);
8799 0 : NDR_CHECK(ndr_pull_DNS_RPC_AUTOCONFIGURE(ndr, NDR_SCALARS|NDR_BUFFERS, r->AutoConfigure));
8800 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_AutoConfigure_0, 0);
8801 : }
8802 0 : break;
8803 :
8804 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST:
8805 0 : if (r->Utf8StringList) {
8806 0 : _mem_save_Utf8StringList_0 = NDR_PULL_GET_MEM_CTX(ndr);
8807 0 : NDR_PULL_SET_MEM_CTX(ndr, r->Utf8StringList, 0);
8808 0 : NDR_CHECK(ndr_pull_DNS_RPC_UTF8_STRING_LIST(ndr, NDR_SCALARS|NDR_BUFFERS, r->Utf8StringList));
8809 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Utf8StringList_0, 0);
8810 : }
8811 0 : break;
8812 :
8813 0 : default:
8814 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
8815 : }
8816 0 : }
8817 1576 : return NDR_ERR_SUCCESS;
8818 : }
8819 :
8820 2 : _PUBLIC_ void ndr_print_DNSSRV_RPC_UNION(struct ndr_print *ndr, const char *name, const union DNSSRV_RPC_UNION *r)
8821 : {
8822 : uint32_t level;
8823 2 : level = ndr_print_steal_switch_value(ndr, r);
8824 2 : ndr_print_union(ndr, name, level, "DNSSRV_RPC_UNION");
8825 2 : switch (level) {
8826 2 : case DNSSRV_TYPEID_NULL:
8827 2 : ndr_print_ptr(ndr, "Null", r->Null);
8828 2 : ndr->depth++;
8829 2 : if (r->Null) {
8830 0 : ndr_print_uint8(ndr, "Null", *r->Null);
8831 : }
8832 2 : ndr->depth--;
8833 2 : break;
8834 :
8835 0 : case DNSSRV_TYPEID_DWORD:
8836 0 : ndr_print_uint32(ndr, "Dword", r->Dword);
8837 0 : break;
8838 :
8839 0 : case DNSSRV_TYPEID_LPSTR:
8840 0 : ndr_print_ptr(ndr, "String", r->String);
8841 0 : ndr->depth++;
8842 0 : if (r->String) {
8843 0 : ndr_print_string(ndr, "String", r->String);
8844 : }
8845 0 : ndr->depth--;
8846 0 : break;
8847 :
8848 0 : case DNSSRV_TYPEID_LPWSTR:
8849 0 : ndr_print_ptr(ndr, "WideString", r->WideString);
8850 0 : ndr->depth++;
8851 0 : if (r->WideString) {
8852 0 : ndr_print_string(ndr, "WideString", r->WideString);
8853 : }
8854 0 : ndr->depth--;
8855 0 : break;
8856 :
8857 0 : case DNSSRV_TYPEID_IPARRAY:
8858 0 : ndr_print_ptr(ndr, "IpArray", r->IpArray);
8859 0 : ndr->depth++;
8860 0 : if (r->IpArray) {
8861 0 : ndr_print_IP4_ARRAY(ndr, "IpArray", r->IpArray);
8862 : }
8863 0 : ndr->depth--;
8864 0 : break;
8865 :
8866 0 : case DNSSRV_TYPEID_BUFFER:
8867 0 : ndr_print_ptr(ndr, "Buffer", r->Buffer);
8868 0 : ndr->depth++;
8869 0 : if (r->Buffer) {
8870 0 : ndr_print_DNS_RPC_BUFFER(ndr, "Buffer", r->Buffer);
8871 : }
8872 0 : ndr->depth--;
8873 0 : break;
8874 :
8875 0 : case DNSSRV_TYPEID_SERVER_INFO_W2K:
8876 0 : ndr_print_ptr(ndr, "ServerInfoW2K", r->ServerInfoW2K);
8877 0 : ndr->depth++;
8878 0 : if (r->ServerInfoW2K) {
8879 0 : ndr_print_DNS_RPC_SERVER_INFO_W2K(ndr, "ServerInfoW2K", r->ServerInfoW2K);
8880 : }
8881 0 : ndr->depth--;
8882 0 : break;
8883 :
8884 0 : case DNSSRV_TYPEID_STATS:
8885 0 : ndr_print_ptr(ndr, "Stats", r->Stats);
8886 0 : ndr->depth++;
8887 0 : if (r->Stats) {
8888 0 : ndr_print_DNSSRV_STAT(ndr, "Stats", r->Stats);
8889 : }
8890 0 : ndr->depth--;
8891 0 : break;
8892 :
8893 0 : case DNSSRV_TYPEID_FORWARDERS_W2K:
8894 0 : ndr_print_ptr(ndr, "ForwardersW2K", r->ForwardersW2K);
8895 0 : ndr->depth++;
8896 0 : if (r->ForwardersW2K) {
8897 0 : ndr_print_DNS_RPC_FORWARDERS_W2K(ndr, "ForwardersW2K", r->ForwardersW2K);
8898 : }
8899 0 : ndr->depth--;
8900 0 : break;
8901 :
8902 0 : case DNSSRV_TYPEID_ZONE_W2K:
8903 0 : ndr_print_ptr(ndr, "ZoneW2K", r->ZoneW2K);
8904 0 : ndr->depth++;
8905 0 : if (r->ZoneW2K) {
8906 0 : ndr_print_DNS_RPC_ZONE_W2K(ndr, "ZoneW2K", r->ZoneW2K);
8907 : }
8908 0 : ndr->depth--;
8909 0 : break;
8910 :
8911 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K:
8912 0 : ndr_print_ptr(ndr, "ZoneInfoW2K", r->ZoneInfoW2K);
8913 0 : ndr->depth++;
8914 0 : if (r->ZoneInfoW2K) {
8915 0 : ndr_print_DNS_RPC_ZONE_INFO_W2K(ndr, "ZoneInfoW2K", r->ZoneInfoW2K);
8916 : }
8917 0 : ndr->depth--;
8918 0 : break;
8919 :
8920 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
8921 0 : ndr_print_ptr(ndr, "SecondariesW2K", r->SecondariesW2K);
8922 0 : ndr->depth++;
8923 0 : if (r->SecondariesW2K) {
8924 0 : ndr_print_DNS_RPC_ZONE_SECONDARIES_W2K(ndr, "SecondariesW2K", r->SecondariesW2K);
8925 : }
8926 0 : ndr->depth--;
8927 0 : break;
8928 :
8929 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
8930 0 : ndr_print_ptr(ndr, "DatabaseW2K", r->DatabaseW2K);
8931 0 : ndr->depth++;
8932 0 : if (r->DatabaseW2K) {
8933 0 : ndr_print_DNS_RPC_ZONE_DATABASE_W2K(ndr, "DatabaseW2K", r->DatabaseW2K);
8934 : }
8935 0 : ndr->depth--;
8936 0 : break;
8937 :
8938 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K:
8939 0 : ndr_print_ptr(ndr, "ZoneCreateW2K", r->ZoneCreateW2K);
8940 0 : ndr->depth++;
8941 0 : if (r->ZoneCreateW2K) {
8942 0 : ndr_print_DNS_RPC_ZONE_CREATE_INFO_W2K(ndr, "ZoneCreateW2K", r->ZoneCreateW2K);
8943 : }
8944 0 : ndr->depth--;
8945 0 : break;
8946 :
8947 0 : case DNSSRV_TYPEID_NAME_AND_PARAM:
8948 0 : ndr_print_ptr(ndr, "NameAndParam", r->NameAndParam);
8949 0 : ndr->depth++;
8950 0 : if (r->NameAndParam) {
8951 0 : ndr_print_DNS_RPC_NAME_AND_PARAM(ndr, "NameAndParam", r->NameAndParam);
8952 : }
8953 0 : ndr->depth--;
8954 0 : break;
8955 :
8956 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K:
8957 0 : ndr_print_ptr(ndr, "ZoneListW2K", r->ZoneListW2K);
8958 0 : ndr->depth++;
8959 0 : if (r->ZoneListW2K) {
8960 0 : ndr_print_DNS_RPC_ZONE_LIST_W2K(ndr, "ZoneListW2K", r->ZoneListW2K);
8961 : }
8962 0 : ndr->depth--;
8963 0 : break;
8964 :
8965 0 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
8966 0 : ndr_print_ptr(ndr, "ServerInfoDotNet", r->ServerInfoDotNet);
8967 0 : ndr->depth++;
8968 0 : if (r->ServerInfoDotNet) {
8969 0 : ndr_print_DNS_RPC_SERVER_INFO_DOTNET(ndr, "ServerInfoDotNet", r->ServerInfoDotNet);
8970 : }
8971 0 : ndr->depth--;
8972 0 : break;
8973 :
8974 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET:
8975 0 : ndr_print_ptr(ndr, "ForwardersDotNet", r->ForwardersDotNet);
8976 0 : ndr->depth++;
8977 0 : if (r->ForwardersDotNet) {
8978 0 : ndr_print_DNS_RPC_FORWARDERS_DOTNET(ndr, "ForwardersDotNet", r->ForwardersDotNet);
8979 : }
8980 0 : ndr->depth--;
8981 0 : break;
8982 :
8983 0 : case DNSSRV_TYPEID_ZONE:
8984 0 : ndr_print_ptr(ndr, "Zone", r->Zone);
8985 0 : ndr->depth++;
8986 0 : if (r->Zone) {
8987 0 : ndr_print_DNS_RPC_ZONE_DOTNET(ndr, "Zone", r->Zone);
8988 : }
8989 0 : ndr->depth--;
8990 0 : break;
8991 :
8992 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
8993 0 : ndr_print_ptr(ndr, "ZoneInfoDotNet", r->ZoneInfoDotNet);
8994 0 : ndr->depth++;
8995 0 : if (r->ZoneInfoDotNet) {
8996 0 : ndr_print_DNS_RPC_ZONE_INFO_DOTNET(ndr, "ZoneInfoDotNet", r->ZoneInfoDotNet);
8997 : }
8998 0 : ndr->depth--;
8999 0 : break;
9000 :
9001 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
9002 0 : ndr_print_ptr(ndr, "SecondariesDotNet", r->SecondariesDotNet);
9003 0 : ndr->depth++;
9004 0 : if (r->SecondariesDotNet) {
9005 0 : ndr_print_DNS_RPC_ZONE_SECONDARIES_DOTNET(ndr, "SecondariesDotNet", r->SecondariesDotNet);
9006 : }
9007 0 : ndr->depth--;
9008 0 : break;
9009 :
9010 0 : case DNSSRV_TYPEID_ZONE_DATABASE:
9011 0 : ndr_print_ptr(ndr, "Database", r->Database);
9012 0 : ndr->depth++;
9013 0 : if (r->Database) {
9014 0 : ndr_print_DNS_RPC_ZONE_DATABASE_DOTNET(ndr, "Database", r->Database);
9015 : }
9016 0 : ndr->depth--;
9017 0 : break;
9018 :
9019 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
9020 0 : ndr_print_ptr(ndr, "ZoneCreateDotNet", r->ZoneCreateDotNet);
9021 0 : ndr->depth++;
9022 0 : if (r->ZoneCreateDotNet) {
9023 0 : ndr_print_DNS_RPC_ZONE_CREATE_INFO_DOTNET(ndr, "ZoneCreateDotNet", r->ZoneCreateDotNet);
9024 : }
9025 0 : ndr->depth--;
9026 0 : break;
9027 :
9028 0 : case DNSSRV_TYPEID_ZONE_LIST:
9029 0 : ndr_print_ptr(ndr, "ZoneList", r->ZoneList);
9030 0 : ndr->depth++;
9031 0 : if (r->ZoneList) {
9032 0 : ndr_print_DNS_RPC_ZONE_LIST_DOTNET(ndr, "ZoneList", r->ZoneList);
9033 : }
9034 0 : ndr->depth--;
9035 0 : break;
9036 :
9037 0 : case DNSSRV_TYPEID_ZONE_EXPORT:
9038 0 : ndr_print_ptr(ndr, "ZoneExport", r->ZoneExport);
9039 0 : ndr->depth++;
9040 0 : if (r->ZoneExport) {
9041 0 : ndr_print_DNS_RPC_ZONE_EXPORT_INFO(ndr, "ZoneExport", r->ZoneExport);
9042 : }
9043 0 : ndr->depth--;
9044 0 : break;
9045 :
9046 0 : case DNSSRV_TYPEID_DP_INFO:
9047 0 : ndr_print_ptr(ndr, "DirectoryPartition", r->DirectoryPartition);
9048 0 : ndr->depth++;
9049 0 : if (r->DirectoryPartition) {
9050 0 : ndr_print_DNS_RPC_DP_INFO(ndr, "DirectoryPartition", r->DirectoryPartition);
9051 : }
9052 0 : ndr->depth--;
9053 0 : break;
9054 :
9055 0 : case DNSSRV_TYPEID_DP_ENUM:
9056 0 : ndr_print_ptr(ndr, "DirectoryPartitionEnum", r->DirectoryPartitionEnum);
9057 0 : ndr->depth++;
9058 0 : if (r->DirectoryPartitionEnum) {
9059 0 : ndr_print_DNS_RPC_DP_ENUM(ndr, "DirectoryPartitionEnum", r->DirectoryPartitionEnum);
9060 : }
9061 0 : ndr->depth--;
9062 0 : break;
9063 :
9064 0 : case DNSSRV_TYPEID_DP_LIST:
9065 0 : ndr_print_ptr(ndr, "DirectoryPartitionList", r->DirectoryPartitionList);
9066 0 : ndr->depth++;
9067 0 : if (r->DirectoryPartitionList) {
9068 0 : ndr_print_DNS_RPC_DP_LIST(ndr, "DirectoryPartitionList", r->DirectoryPartitionList);
9069 : }
9070 0 : ndr->depth--;
9071 0 : break;
9072 :
9073 0 : case DNSSRV_TYPEID_ENLIST_DP:
9074 0 : ndr_print_ptr(ndr, "EnlistDirectoryPartition", r->EnlistDirectoryPartition);
9075 0 : ndr->depth++;
9076 0 : if (r->EnlistDirectoryPartition) {
9077 0 : ndr_print_DNS_RPC_ENLIST_DP(ndr, "EnlistDirectoryPartition", r->EnlistDirectoryPartition);
9078 : }
9079 0 : ndr->depth--;
9080 0 : break;
9081 :
9082 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP:
9083 0 : ndr_print_ptr(ndr, "ZoneChangeDirectoryPartition", r->ZoneChangeDirectoryPartition);
9084 0 : ndr->depth++;
9085 0 : if (r->ZoneChangeDirectoryPartition) {
9086 0 : ndr_print_DNS_RPC_ZONE_CHANGE_DP(ndr, "ZoneChangeDirectoryPartition", r->ZoneChangeDirectoryPartition);
9087 : }
9088 0 : ndr->depth--;
9089 0 : break;
9090 :
9091 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
9092 0 : ndr_print_ptr(ndr, "EnumZonesFilter", r->EnumZonesFilter);
9093 0 : ndr->depth++;
9094 0 : if (r->EnumZonesFilter) {
9095 0 : ndr_print_DNS_RPC_ENUM_ZONES_FILTER(ndr, "EnumZonesFilter", r->EnumZonesFilter);
9096 : }
9097 0 : ndr->depth--;
9098 0 : break;
9099 :
9100 0 : case DNSSRV_TYPEID_ADDRARRAY:
9101 0 : ndr_print_ptr(ndr, "AddrArray", r->AddrArray);
9102 0 : ndr->depth++;
9103 0 : if (r->AddrArray) {
9104 0 : ndr_print_DNS_ADDR_ARRAY(ndr, "AddrArray", r->AddrArray);
9105 : }
9106 0 : ndr->depth--;
9107 0 : break;
9108 :
9109 0 : case DNSSRV_TYPEID_SERVER_INFO:
9110 0 : ndr_print_ptr(ndr, "ServerInfo", r->ServerInfo);
9111 0 : ndr->depth++;
9112 0 : if (r->ServerInfo) {
9113 0 : ndr_print_DNS_RPC_SERVER_INFO_LONGHORN(ndr, "ServerInfo", r->ServerInfo);
9114 : }
9115 0 : ndr->depth--;
9116 0 : break;
9117 :
9118 0 : case DNSSRV_TYPEID_ZONE_CREATE:
9119 0 : ndr_print_ptr(ndr, "ZoneCreate", r->ZoneCreate);
9120 0 : ndr->depth++;
9121 0 : if (r->ZoneCreate) {
9122 0 : ndr_print_DNS_RPC_ZONE_CREATE_INFO_LONGHORN(ndr, "ZoneCreate", r->ZoneCreate);
9123 : }
9124 0 : ndr->depth--;
9125 0 : break;
9126 :
9127 0 : case DNSSRV_TYPEID_FORWARDERS:
9128 0 : ndr_print_ptr(ndr, "Forwarders", r->Forwarders);
9129 0 : ndr->depth++;
9130 0 : if (r->Forwarders) {
9131 0 : ndr_print_DNS_RPC_FORWARDERS_LONGHORN(ndr, "Forwarders", r->Forwarders);
9132 : }
9133 0 : ndr->depth--;
9134 0 : break;
9135 :
9136 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES:
9137 0 : ndr_print_ptr(ndr, "Secondaries", r->Secondaries);
9138 0 : ndr->depth++;
9139 0 : if (r->Secondaries) {
9140 0 : ndr_print_DNS_RPC_ZONE_SECONDARIES_LONGHORN(ndr, "Secondaries", r->Secondaries);
9141 : }
9142 0 : ndr->depth--;
9143 0 : break;
9144 :
9145 0 : case DNSSRV_TYPEID_IP_VALIDATE:
9146 0 : ndr_print_ptr(ndr, "IpValidate", r->IpValidate);
9147 0 : ndr->depth++;
9148 0 : if (r->IpValidate) {
9149 0 : ndr_print_DNS_RPC_IP_VALIDATE(ndr, "IpValidate", r->IpValidate);
9150 : }
9151 0 : ndr->depth--;
9152 0 : break;
9153 :
9154 0 : case DNSSRV_TYPEID_ZONE_INFO:
9155 0 : ndr_print_ptr(ndr, "ZoneInfo", r->ZoneInfo);
9156 0 : ndr->depth++;
9157 0 : if (r->ZoneInfo) {
9158 0 : ndr_print_DNS_RPC_ZONE_INFO_LONGHORN(ndr, "ZoneInfo", r->ZoneInfo);
9159 : }
9160 0 : ndr->depth--;
9161 0 : break;
9162 :
9163 0 : case DNSSRV_TYPEID_AUTOCONFIGURE:
9164 0 : ndr_print_ptr(ndr, "AutoConfigure", r->AutoConfigure);
9165 0 : ndr->depth++;
9166 0 : if (r->AutoConfigure) {
9167 0 : ndr_print_DNS_RPC_AUTOCONFIGURE(ndr, "AutoConfigure", r->AutoConfigure);
9168 : }
9169 0 : ndr->depth--;
9170 0 : break;
9171 :
9172 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST:
9173 0 : ndr_print_ptr(ndr, "Utf8StringList", r->Utf8StringList);
9174 0 : ndr->depth++;
9175 0 : if (r->Utf8StringList) {
9176 0 : ndr_print_DNS_RPC_UTF8_STRING_LIST(ndr, "Utf8StringList", r->Utf8StringList);
9177 : }
9178 0 : ndr->depth--;
9179 0 : break;
9180 :
9181 0 : default:
9182 0 : ndr_print_bad_level(ndr, name, level);
9183 : }
9184 2 : }
9185 :
9186 1120 : _PUBLIC_ enum ndr_err_code ndr_push_DNS_RPC_RECORDS(struct ndr_push *ndr, int ndr_flags, const struct DNS_RPC_RECORDS *r)
9187 : {
9188 : uint32_t cntr_records_0;
9189 1120 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9190 1120 : if (ndr_flags & NDR_SCALARS) {
9191 1120 : NDR_CHECK(ndr_push_align(ndr, 4));
9192 1120 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, (12 + ndr_size_DNS_RPC_NAME(&r->dnsNodeName, 0) + 3) & ~3));
9193 1120 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wRecordCount));
9194 1120 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwFlags));
9195 1120 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwChildCount));
9196 1120 : NDR_CHECK(ndr_push_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->dnsNodeName));
9197 2472 : for (cntr_records_0 = 0; cntr_records_0 < (r->wRecordCount); cntr_records_0++) {
9198 1352 : NDR_CHECK(ndr_push_DNS_RPC_RECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
9199 : }
9200 1120 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9201 : }
9202 1120 : if (ndr_flags & NDR_BUFFERS) {
9203 : }
9204 1120 : return NDR_ERR_SUCCESS;
9205 : }
9206 :
9207 560 : _PUBLIC_ enum ndr_err_code ndr_pull_DNS_RPC_RECORDS(struct ndr_pull *ndr, int ndr_flags, struct DNS_RPC_RECORDS *r)
9208 : {
9209 560 : uint32_t size_records_0 = 0;
9210 : uint32_t cntr_records_0;
9211 560 : TALLOC_CTX *_mem_save_records_0 = NULL;
9212 560 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9213 560 : if (ndr_flags & NDR_SCALARS) {
9214 560 : NDR_CHECK(ndr_pull_align(ndr, 4));
9215 560 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wLength));
9216 560 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wRecordCount));
9217 560 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwFlags));
9218 560 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwChildCount));
9219 560 : NDR_CHECK(ndr_pull_DNS_RPC_NAME(ndr, NDR_SCALARS, &r->dnsNodeName));
9220 560 : size_records_0 = r->wRecordCount;
9221 560 : NDR_PULL_ALLOC_N(ndr, r->records, size_records_0);
9222 560 : _mem_save_records_0 = NDR_PULL_GET_MEM_CTX(ndr);
9223 560 : NDR_PULL_SET_MEM_CTX(ndr, r->records, 0);
9224 1236 : for (cntr_records_0 = 0; cntr_records_0 < (size_records_0); cntr_records_0++) {
9225 676 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
9226 : }
9227 560 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_records_0, 0);
9228 560 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9229 : }
9230 560 : if (ndr_flags & NDR_BUFFERS) {
9231 : }
9232 560 : return NDR_ERR_SUCCESS;
9233 : }
9234 :
9235 0 : static void ndr_print_flags_DNS_RPC_RECORDS(struct ndr_print *ndr, const char *name, int unused, const struct DNS_RPC_RECORDS *r)
9236 : {
9237 0 : ndr_print_DNS_RPC_RECORDS(ndr, name, r);
9238 0 : }
9239 :
9240 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORDS(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORDS *r)
9241 : {
9242 : uint32_t cntr_records_0;
9243 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORDS");
9244 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9245 0 : ndr->depth++;
9246 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);
9247 0 : ndr_print_uint16(ndr, "wRecordCount", r->wRecordCount);
9248 0 : ndr_print_uint32(ndr, "dwFlags", r->dwFlags);
9249 0 : ndr_print_uint32(ndr, "dwChildCount", r->dwChildCount);
9250 0 : ndr_print_DNS_RPC_NAME(ndr, "dnsNodeName", &r->dnsNodeName);
9251 0 : ndr->print(ndr, "%s: ARRAY(%d)", "records", (int)r->wRecordCount);
9252 0 : ndr->depth++;
9253 0 : for (cntr_records_0 = 0; cntr_records_0 < (r->wRecordCount); cntr_records_0++) {
9254 0 : ndr_print_DNS_RPC_RECORD(ndr, "records", &r->records[cntr_records_0]);
9255 : }
9256 0 : ndr->depth--;
9257 0 : ndr->depth--;
9258 : }
9259 :
9260 0 : _PUBLIC_ size_t ndr_size_DNS_RPC_RECORDS(const struct DNS_RPC_RECORDS *r, int flags)
9261 : {
9262 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORDS);
9263 : }
9264 :
9265 0 : static void ndr_print_flags_DNS_RPC_RECORDS_ARRAY(struct ndr_print *ndr, const char *name, int unused, const struct DNS_RPC_RECORDS_ARRAY *r)
9266 : {
9267 0 : ndr_print_DNS_RPC_RECORDS_ARRAY(ndr, name, r);
9268 0 : }
9269 :
9270 0 : _PUBLIC_ void ndr_print_DNS_RPC_RECORDS_ARRAY(struct ndr_print *ndr, const char *name, const struct DNS_RPC_RECORDS_ARRAY *r)
9271 : {
9272 : uint32_t cntr_rec_0;
9273 0 : ndr_print_struct(ndr, name, "DNS_RPC_RECORDS_ARRAY");
9274 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9275 0 : ndr->depth++;
9276 0 : ndr_print_uint32(ndr, "count", r->count);
9277 0 : ndr->print(ndr, "%s: ARRAY(%d)", "rec", (int)r->count);
9278 0 : ndr->depth++;
9279 0 : for (cntr_rec_0 = 0; cntr_rec_0 < (r->count); cntr_rec_0++) {
9280 0 : ndr_print_DNS_RPC_RECORDS(ndr, "rec", &r->rec[cntr_rec_0]);
9281 : }
9282 0 : ndr->depth--;
9283 0 : ndr->depth--;
9284 : }
9285 :
9286 526 : _PUBLIC_ size_t ndr_size_DNS_RPC_RECORDS_ARRAY(const struct DNS_RPC_RECORDS_ARRAY *r, int flags)
9287 : {
9288 526 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORDS_ARRAY);
9289 : }
9290 :
9291 2 : static enum ndr_err_code ndr_push_DnssrvOperation(struct ndr_push *ndr, int flags, const struct DnssrvOperation *r)
9292 : {
9293 2 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9294 2 : if (flags & NDR_IN) {
9295 1 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
9296 1 : if (r->in.pwszServerName) {
9297 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9298 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9299 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9300 1 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9301 : }
9302 1 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
9303 1 : if (r->in.pszZone) {
9304 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9305 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9306 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9307 1 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9308 : }
9309 1 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwContext));
9310 1 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
9311 1 : if (r->in.pszOperation) {
9312 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9313 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9314 1 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9315 1 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszOperation, ndr_charset_length(r->in.pszOperation, CH_UTF8), sizeof(uint8_t), CH_UTF8));
9316 : }
9317 1 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->in.dwTypeId));
9318 1 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId));
9319 1 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pData));
9320 : }
9321 2 : if (flags & NDR_OUT) {
9322 1 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9323 : }
9324 2 : return NDR_ERR_SUCCESS;
9325 : }
9326 :
9327 2 : static enum ndr_err_code ndr_pull_DnssrvOperation(struct ndr_pull *ndr, int flags, struct DnssrvOperation *r)
9328 : {
9329 : uint32_t _ptr_pwszServerName;
9330 2 : uint32_t size_pwszServerName_1 = 0;
9331 2 : uint32_t length_pwszServerName_1 = 0;
9332 : uint32_t _ptr_pszZone;
9333 2 : uint32_t size_pszZone_1 = 0;
9334 2 : uint32_t length_pszZone_1 = 0;
9335 : uint32_t _ptr_pszOperation;
9336 2 : uint32_t size_pszOperation_1 = 0;
9337 2 : uint32_t length_pszOperation_1 = 0;
9338 2 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
9339 2 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
9340 2 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
9341 2 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9342 2 : if (flags & NDR_IN) {
9343 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
9344 1 : if (_ptr_pwszServerName) {
9345 1 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
9346 : } else {
9347 0 : r->in.pwszServerName = NULL;
9348 : }
9349 1 : if (r->in.pwszServerName) {
9350 1 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
9351 1 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
9352 1 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
9353 1 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
9354 1 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
9355 1 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
9356 1 : if (length_pwszServerName_1 > size_pwszServerName_1) {
9357 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszServerName_1, length_pwszServerName_1);
9358 : }
9359 1 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
9360 1 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
9361 1 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
9362 : }
9363 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
9364 1 : if (_ptr_pszZone) {
9365 1 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
9366 : } else {
9367 0 : r->in.pszZone = NULL;
9368 : }
9369 1 : if (r->in.pszZone) {
9370 1 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
9371 1 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
9372 1 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
9373 1 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
9374 1 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
9375 1 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
9376 1 : if (length_pszZone_1 > size_pszZone_1) {
9377 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZone_1, length_pszZone_1);
9378 : }
9379 1 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
9380 1 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
9381 1 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
9382 : }
9383 1 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwContext));
9384 1 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
9385 1 : if (_ptr_pszOperation) {
9386 1 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
9387 : } else {
9388 0 : r->in.pszOperation = NULL;
9389 : }
9390 1 : if (r->in.pszOperation) {
9391 1 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
9392 1 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
9393 1 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
9394 1 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
9395 1 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
9396 1 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
9397 1 : if (length_pszOperation_1 > size_pszOperation_1) {
9398 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszOperation_1, length_pszOperation_1);
9399 : }
9400 1 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
9401 1 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
9402 1 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
9403 : }
9404 1 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, &r->in.dwTypeId));
9405 1 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId));
9406 1 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pData));
9407 : }
9408 2 : if (flags & NDR_OUT) {
9409 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9410 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9411 1 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9412 : }
9413 2 : return NDR_ERR_SUCCESS;
9414 : }
9415 :
9416 0 : _PUBLIC_ void ndr_print_DnssrvOperation(struct ndr_print *ndr, const char *name, int flags, const struct DnssrvOperation *r)
9417 : {
9418 0 : ndr_print_struct(ndr, name, "DnssrvOperation");
9419 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9420 0 : ndr->depth++;
9421 0 : if (flags & NDR_SET_VALUES) {
9422 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9423 : }
9424 0 : if (flags & NDR_IN) {
9425 0 : ndr_print_struct(ndr, "in", "DnssrvOperation");
9426 0 : ndr->depth++;
9427 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
9428 0 : ndr->depth++;
9429 0 : if (r->in.pwszServerName) {
9430 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
9431 : }
9432 0 : ndr->depth--;
9433 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
9434 0 : ndr->depth++;
9435 0 : if (r->in.pszZone) {
9436 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
9437 : }
9438 0 : ndr->depth--;
9439 0 : ndr_print_uint32(ndr, "dwContext", r->in.dwContext);
9440 0 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
9441 0 : ndr->depth++;
9442 0 : if (r->in.pszOperation) {
9443 0 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
9444 : }
9445 0 : ndr->depth--;
9446 0 : ndr_print_DNS_RPC_TYPEID(ndr, "dwTypeId", r->in.dwTypeId);
9447 0 : ndr_print_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId);
9448 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "pData", &r->in.pData);
9449 0 : ndr->depth--;
9450 : }
9451 0 : if (flags & NDR_OUT) {
9452 0 : ndr_print_struct(ndr, "out", "DnssrvOperation");
9453 0 : ndr->depth++;
9454 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9455 0 : ndr->depth--;
9456 : }
9457 0 : ndr->depth--;
9458 : }
9459 :
9460 0 : static enum ndr_err_code ndr_push_DnssrvQuery(struct ndr_push *ndr, int flags, const struct DnssrvQuery *r)
9461 : {
9462 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9463 0 : if (flags & NDR_IN) {
9464 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
9465 0 : if (r->in.pwszServerName) {
9466 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9467 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9468 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9469 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));
9470 : }
9471 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
9472 0 : if (r->in.pszZone) {
9473 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9474 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9475 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9476 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));
9477 : }
9478 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
9479 0 : if (r->in.pszOperation) {
9480 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9481 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9482 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9483 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));
9484 : }
9485 : }
9486 0 : if (flags & NDR_OUT) {
9487 0 : if (r->out.pdwTypeId == NULL) {
9488 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9489 : }
9490 0 : if (r->out.ppData == NULL) {
9491 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9492 : }
9493 0 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, *r->out.pdwTypeId));
9494 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId));
9495 0 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppData));
9496 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9497 : }
9498 0 : return NDR_ERR_SUCCESS;
9499 : }
9500 :
9501 0 : static enum ndr_err_code ndr_pull_DnssrvQuery(struct ndr_pull *ndr, int flags, struct DnssrvQuery *r)
9502 : {
9503 : uint32_t _ptr_pwszServerName;
9504 0 : uint32_t size_pwszServerName_1 = 0;
9505 0 : uint32_t length_pwszServerName_1 = 0;
9506 : uint32_t _ptr_pszZone;
9507 0 : uint32_t size_pszZone_1 = 0;
9508 0 : uint32_t length_pszZone_1 = 0;
9509 : uint32_t _ptr_pszOperation;
9510 0 : uint32_t size_pszOperation_1 = 0;
9511 0 : uint32_t length_pszOperation_1 = 0;
9512 0 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
9513 0 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
9514 0 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
9515 0 : TALLOC_CTX *_mem_save_pdwTypeId_0 = NULL;
9516 0 : TALLOC_CTX *_mem_save_ppData_0 = NULL;
9517 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9518 0 : if (flags & NDR_IN) {
9519 0 : NDR_ZERO_STRUCT(r->out);
9520 :
9521 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
9522 0 : if (_ptr_pwszServerName) {
9523 0 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
9524 : } else {
9525 0 : r->in.pwszServerName = NULL;
9526 : }
9527 0 : if (r->in.pwszServerName) {
9528 0 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
9529 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
9530 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
9531 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
9532 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
9533 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
9534 0 : if (length_pwszServerName_1 > size_pwszServerName_1) {
9535 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszServerName_1, length_pwszServerName_1);
9536 : }
9537 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
9538 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
9539 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
9540 : }
9541 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
9542 0 : if (_ptr_pszZone) {
9543 0 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
9544 : } else {
9545 0 : r->in.pszZone = NULL;
9546 : }
9547 0 : if (r->in.pszZone) {
9548 0 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
9549 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
9550 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
9551 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
9552 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
9553 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
9554 0 : if (length_pszZone_1 > size_pszZone_1) {
9555 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZone_1, length_pszZone_1);
9556 : }
9557 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
9558 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
9559 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
9560 : }
9561 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
9562 0 : if (_ptr_pszOperation) {
9563 0 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
9564 : } else {
9565 0 : r->in.pszOperation = NULL;
9566 : }
9567 0 : if (r->in.pszOperation) {
9568 0 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
9569 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
9570 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
9571 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
9572 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
9573 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
9574 0 : if (length_pszOperation_1 > size_pszOperation_1) {
9575 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszOperation_1, length_pszOperation_1);
9576 : }
9577 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
9578 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
9579 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
9580 : }
9581 0 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeId);
9582 0 : NDR_ZERO_STRUCTP(r->out.pdwTypeId);
9583 0 : NDR_PULL_ALLOC(ndr, r->out.ppData);
9584 0 : NDR_ZERO_STRUCTP(r->out.ppData);
9585 : }
9586 0 : if (flags & NDR_OUT) {
9587 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9588 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9589 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9590 0 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeId);
9591 : }
9592 0 : _mem_save_pdwTypeId_0 = NDR_PULL_GET_MEM_CTX(ndr);
9593 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwTypeId, LIBNDR_FLAG_REF_ALLOC);
9594 0 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->out.pdwTypeId));
9595 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwTypeId_0, LIBNDR_FLAG_REF_ALLOC);
9596 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9597 0 : NDR_PULL_ALLOC(ndr, r->out.ppData);
9598 : }
9599 0 : _mem_save_ppData_0 = NDR_PULL_GET_MEM_CTX(ndr);
9600 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppData, LIBNDR_FLAG_REF_ALLOC);
9601 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId));
9602 0 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppData));
9603 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppData_0, LIBNDR_FLAG_REF_ALLOC);
9604 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9605 : }
9606 0 : return NDR_ERR_SUCCESS;
9607 : }
9608 :
9609 0 : _PUBLIC_ void ndr_print_DnssrvQuery(struct ndr_print *ndr, const char *name, int flags, const struct DnssrvQuery *r)
9610 : {
9611 0 : ndr_print_struct(ndr, name, "DnssrvQuery");
9612 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9613 0 : ndr->depth++;
9614 0 : if (flags & NDR_SET_VALUES) {
9615 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9616 : }
9617 0 : if (flags & NDR_IN) {
9618 0 : ndr_print_struct(ndr, "in", "DnssrvQuery");
9619 0 : ndr->depth++;
9620 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
9621 0 : ndr->depth++;
9622 0 : if (r->in.pwszServerName) {
9623 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
9624 : }
9625 0 : ndr->depth--;
9626 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
9627 0 : ndr->depth++;
9628 0 : if (r->in.pszZone) {
9629 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
9630 : }
9631 0 : ndr->depth--;
9632 0 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
9633 0 : ndr->depth++;
9634 0 : if (r->in.pszOperation) {
9635 0 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
9636 : }
9637 0 : ndr->depth--;
9638 0 : ndr->depth--;
9639 : }
9640 0 : if (flags & NDR_OUT) {
9641 0 : ndr_print_struct(ndr, "out", "DnssrvQuery");
9642 0 : ndr->depth++;
9643 0 : ndr_print_ptr(ndr, "pdwTypeId", r->out.pdwTypeId);
9644 0 : ndr->depth++;
9645 0 : ndr_print_DNS_RPC_TYPEID(ndr, "pdwTypeId", *r->out.pdwTypeId);
9646 0 : ndr->depth--;
9647 0 : ndr_print_ptr(ndr, "ppData", r->out.ppData);
9648 0 : ndr->depth++;
9649 0 : ndr_print_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId);
9650 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "ppData", r->out.ppData);
9651 0 : ndr->depth--;
9652 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9653 0 : ndr->depth--;
9654 : }
9655 0 : ndr->depth--;
9656 : }
9657 :
9658 0 : static enum ndr_err_code ndr_push_DnssrvComplexOperation(struct ndr_push *ndr, int flags, const struct DnssrvComplexOperation *r)
9659 : {
9660 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9661 0 : if (flags & NDR_IN) {
9662 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
9663 0 : if (r->in.pwszServerName) {
9664 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9665 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9666 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9667 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));
9668 : }
9669 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
9670 0 : if (r->in.pszZone) {
9671 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9672 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9673 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9674 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));
9675 : }
9676 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
9677 0 : if (r->in.pszOperation) {
9678 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9679 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9680 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
9681 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));
9682 : }
9683 0 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->in.dwTypeIn));
9684 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn));
9685 0 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pDataIn));
9686 : }
9687 0 : if (flags & NDR_OUT) {
9688 0 : if (r->out.pdwTypeOut == NULL) {
9689 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9690 : }
9691 0 : if (r->out.ppDataOut == NULL) {
9692 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9693 : }
9694 0 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, *r->out.pdwTypeOut));
9695 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut));
9696 0 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppDataOut));
9697 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9698 : }
9699 0 : return NDR_ERR_SUCCESS;
9700 : }
9701 :
9702 0 : static enum ndr_err_code ndr_pull_DnssrvComplexOperation(struct ndr_pull *ndr, int flags, struct DnssrvComplexOperation *r)
9703 : {
9704 : uint32_t _ptr_pwszServerName;
9705 0 : uint32_t size_pwszServerName_1 = 0;
9706 0 : uint32_t length_pwszServerName_1 = 0;
9707 : uint32_t _ptr_pszZone;
9708 0 : uint32_t size_pszZone_1 = 0;
9709 0 : uint32_t length_pszZone_1 = 0;
9710 : uint32_t _ptr_pszOperation;
9711 0 : uint32_t size_pszOperation_1 = 0;
9712 0 : uint32_t length_pszOperation_1 = 0;
9713 0 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
9714 0 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
9715 0 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
9716 0 : TALLOC_CTX *_mem_save_pdwTypeOut_0 = NULL;
9717 0 : TALLOC_CTX *_mem_save_ppDataOut_0 = NULL;
9718 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9719 0 : if (flags & NDR_IN) {
9720 0 : NDR_ZERO_STRUCT(r->out);
9721 :
9722 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
9723 0 : if (_ptr_pwszServerName) {
9724 0 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
9725 : } else {
9726 0 : r->in.pwszServerName = NULL;
9727 : }
9728 0 : if (r->in.pwszServerName) {
9729 0 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
9730 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
9731 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
9732 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
9733 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
9734 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
9735 0 : if (length_pwszServerName_1 > size_pwszServerName_1) {
9736 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszServerName_1, length_pwszServerName_1);
9737 : }
9738 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
9739 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
9740 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
9741 : }
9742 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
9743 0 : if (_ptr_pszZone) {
9744 0 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
9745 : } else {
9746 0 : r->in.pszZone = NULL;
9747 : }
9748 0 : if (r->in.pszZone) {
9749 0 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
9750 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
9751 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
9752 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
9753 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
9754 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
9755 0 : if (length_pszZone_1 > size_pszZone_1) {
9756 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZone_1, length_pszZone_1);
9757 : }
9758 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
9759 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
9760 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
9761 : }
9762 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
9763 0 : if (_ptr_pszOperation) {
9764 0 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
9765 : } else {
9766 0 : r->in.pszOperation = NULL;
9767 : }
9768 0 : if (r->in.pszOperation) {
9769 0 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
9770 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
9771 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
9772 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
9773 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
9774 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
9775 0 : if (length_pszOperation_1 > size_pszOperation_1) {
9776 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszOperation_1, length_pszOperation_1);
9777 : }
9778 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
9779 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
9780 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
9781 : }
9782 0 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, &r->in.dwTypeIn));
9783 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn));
9784 0 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pDataIn));
9785 0 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeOut);
9786 0 : NDR_ZERO_STRUCTP(r->out.pdwTypeOut);
9787 0 : NDR_PULL_ALLOC(ndr, r->out.ppDataOut);
9788 0 : NDR_ZERO_STRUCTP(r->out.ppDataOut);
9789 : }
9790 0 : if (flags & NDR_OUT) {
9791 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9792 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9793 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9794 0 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeOut);
9795 : }
9796 0 : _mem_save_pdwTypeOut_0 = NDR_PULL_GET_MEM_CTX(ndr);
9797 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwTypeOut, LIBNDR_FLAG_REF_ALLOC);
9798 0 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->out.pdwTypeOut));
9799 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwTypeOut_0, LIBNDR_FLAG_REF_ALLOC);
9800 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9801 0 : NDR_PULL_ALLOC(ndr, r->out.ppDataOut);
9802 : }
9803 0 : _mem_save_ppDataOut_0 = NDR_PULL_GET_MEM_CTX(ndr);
9804 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppDataOut, LIBNDR_FLAG_REF_ALLOC);
9805 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut));
9806 0 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppDataOut));
9807 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppDataOut_0, LIBNDR_FLAG_REF_ALLOC);
9808 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9809 : }
9810 0 : return NDR_ERR_SUCCESS;
9811 : }
9812 :
9813 0 : _PUBLIC_ void ndr_print_DnssrvComplexOperation(struct ndr_print *ndr, const char *name, int flags, const struct DnssrvComplexOperation *r)
9814 : {
9815 0 : ndr_print_struct(ndr, name, "DnssrvComplexOperation");
9816 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9817 0 : ndr->depth++;
9818 0 : if (flags & NDR_SET_VALUES) {
9819 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9820 : }
9821 0 : if (flags & NDR_IN) {
9822 0 : ndr_print_struct(ndr, "in", "DnssrvComplexOperation");
9823 0 : ndr->depth++;
9824 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
9825 0 : ndr->depth++;
9826 0 : if (r->in.pwszServerName) {
9827 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
9828 : }
9829 0 : ndr->depth--;
9830 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
9831 0 : ndr->depth++;
9832 0 : if (r->in.pszZone) {
9833 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
9834 : }
9835 0 : ndr->depth--;
9836 0 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
9837 0 : ndr->depth++;
9838 0 : if (r->in.pszOperation) {
9839 0 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
9840 : }
9841 0 : ndr->depth--;
9842 0 : ndr_print_DNS_RPC_TYPEID(ndr, "dwTypeIn", r->in.dwTypeIn);
9843 0 : ndr_print_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn);
9844 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "pDataIn", &r->in.pDataIn);
9845 0 : ndr->depth--;
9846 : }
9847 0 : if (flags & NDR_OUT) {
9848 0 : ndr_print_struct(ndr, "out", "DnssrvComplexOperation");
9849 0 : ndr->depth++;
9850 0 : ndr_print_ptr(ndr, "pdwTypeOut", r->out.pdwTypeOut);
9851 0 : ndr->depth++;
9852 0 : ndr_print_DNS_RPC_TYPEID(ndr, "pdwTypeOut", *r->out.pdwTypeOut);
9853 0 : ndr->depth--;
9854 0 : ndr_print_ptr(ndr, "ppDataOut", r->out.ppDataOut);
9855 0 : ndr->depth++;
9856 0 : ndr_print_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut);
9857 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "ppDataOut", r->out.ppDataOut);
9858 0 : ndr->depth--;
9859 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9860 0 : ndr->depth--;
9861 : }
9862 0 : ndr->depth--;
9863 : }
9864 :
9865 0 : static enum ndr_err_code ndr_push_DnssrvEnumRecords(struct ndr_push *ndr, int flags, const struct DnssrvEnumRecords *r)
9866 : {
9867 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9868 0 : if (flags & NDR_IN) {
9869 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
9870 0 : if (r->in.pwszServerName) {
9871 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9872 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9873 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
9874 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));
9875 : }
9876 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
9877 0 : if (r->in.pszZone) {
9878 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9879 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9880 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
9881 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));
9882 : }
9883 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszNodeName));
9884 0 : if (r->in.pszNodeName) {
9885 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
9886 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9887 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
9888 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));
9889 : }
9890 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszStartChild));
9891 0 : if (r->in.pszStartChild) {
9892 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszStartChild, CH_UTF8)));
9893 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9894 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszStartChild, CH_UTF8)));
9895 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));
9896 : }
9897 0 : NDR_CHECK(ndr_push_dns_record_type(ndr, NDR_SCALARS, r->in.wRecordType));
9898 0 : NDR_CHECK(ndr_push_DNS_SELECT_FLAGS(ndr, NDR_SCALARS, r->in.fSelectFlag));
9899 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszFilterStart));
9900 0 : if (r->in.pszFilterStart) {
9901 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStart, CH_UTF8)));
9902 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9903 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStart, CH_UTF8)));
9904 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));
9905 : }
9906 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszFilterStop));
9907 0 : if (r->in.pszFilterStop) {
9908 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStop, CH_UTF8)));
9909 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9910 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStop, CH_UTF8)));
9911 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));
9912 : }
9913 : }
9914 0 : if (flags & NDR_OUT) {
9915 0 : if (r->out.pdwBufferLength == NULL) {
9916 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9917 : }
9918 0 : if (r->out.pBuffer == NULL) {
9919 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9920 : }
9921 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pdwBufferLength));
9922 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.pBuffer));
9923 0 : if (*r->out.pBuffer) {
9924 : {
9925 : struct ndr_push *_ndr_pBuffer;
9926 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_pBuffer, 4, *r->out.pdwBufferLength));
9927 0 : NDR_CHECK(ndr_push_DNS_RPC_RECORDS_ARRAY(_ndr_pBuffer, NDR_SCALARS, *r->out.pBuffer));
9928 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_pBuffer, 4, *r->out.pdwBufferLength));
9929 : }
9930 : }
9931 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9932 : }
9933 0 : return NDR_ERR_SUCCESS;
9934 : }
9935 :
9936 0 : static enum ndr_err_code ndr_pull_DnssrvEnumRecords(struct ndr_pull *ndr, int flags, struct DnssrvEnumRecords *r)
9937 : {
9938 : uint32_t _ptr_pwszServerName;
9939 0 : uint32_t size_pwszServerName_1 = 0;
9940 0 : uint32_t length_pwszServerName_1 = 0;
9941 : uint32_t _ptr_pszZone;
9942 0 : uint32_t size_pszZone_1 = 0;
9943 0 : uint32_t length_pszZone_1 = 0;
9944 : uint32_t _ptr_pszNodeName;
9945 0 : uint32_t size_pszNodeName_1 = 0;
9946 0 : uint32_t length_pszNodeName_1 = 0;
9947 : uint32_t _ptr_pszStartChild;
9948 0 : uint32_t size_pszStartChild_1 = 0;
9949 0 : uint32_t length_pszStartChild_1 = 0;
9950 : uint32_t _ptr_pszFilterStart;
9951 0 : uint32_t size_pszFilterStart_1 = 0;
9952 0 : uint32_t length_pszFilterStart_1 = 0;
9953 : uint32_t _ptr_pszFilterStop;
9954 0 : uint32_t size_pszFilterStop_1 = 0;
9955 0 : uint32_t length_pszFilterStop_1 = 0;
9956 : uint32_t _ptr_pBuffer;
9957 0 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
9958 0 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
9959 0 : TALLOC_CTX *_mem_save_pszNodeName_0 = NULL;
9960 0 : TALLOC_CTX *_mem_save_pszStartChild_0 = NULL;
9961 0 : TALLOC_CTX *_mem_save_pszFilterStart_0 = NULL;
9962 0 : TALLOC_CTX *_mem_save_pszFilterStop_0 = NULL;
9963 0 : TALLOC_CTX *_mem_save_pdwBufferLength_0 = NULL;
9964 0 : TALLOC_CTX *_mem_save_pBuffer_0 = NULL;
9965 0 : TALLOC_CTX *_mem_save_pBuffer_1 = NULL;
9966 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9967 0 : if (flags & NDR_IN) {
9968 0 : NDR_ZERO_STRUCT(r->out);
9969 :
9970 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
9971 0 : if (_ptr_pwszServerName) {
9972 0 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
9973 : } else {
9974 0 : r->in.pwszServerName = NULL;
9975 : }
9976 0 : if (r->in.pwszServerName) {
9977 0 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
9978 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
9979 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
9980 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
9981 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
9982 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
9983 0 : if (length_pwszServerName_1 > size_pwszServerName_1) {
9984 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszServerName_1, length_pwszServerName_1);
9985 : }
9986 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
9987 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
9988 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
9989 : }
9990 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
9991 0 : if (_ptr_pszZone) {
9992 0 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
9993 : } else {
9994 0 : r->in.pszZone = NULL;
9995 : }
9996 0 : if (r->in.pszZone) {
9997 0 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
9998 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
9999 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
10000 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
10001 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
10002 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
10003 0 : if (length_pszZone_1 > size_pszZone_1) {
10004 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZone_1, length_pszZone_1);
10005 : }
10006 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
10007 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
10008 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
10009 : }
10010 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszNodeName));
10011 0 : if (_ptr_pszNodeName) {
10012 0 : NDR_PULL_ALLOC(ndr, r->in.pszNodeName);
10013 : } else {
10014 0 : r->in.pszNodeName = NULL;
10015 : }
10016 0 : if (r->in.pszNodeName) {
10017 0 : _mem_save_pszNodeName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10018 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszNodeName, 0);
10019 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszNodeName));
10020 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszNodeName));
10021 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszNodeName, &size_pszNodeName_1));
10022 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszNodeName, &length_pszNodeName_1));
10023 0 : if (length_pszNodeName_1 > size_pszNodeName_1) {
10024 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszNodeName_1, length_pszNodeName_1);
10025 : }
10026 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNodeName_1, sizeof(uint8_t)));
10027 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszNodeName, length_pszNodeName_1, sizeof(uint8_t), CH_UTF8));
10028 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszNodeName_0, 0);
10029 : }
10030 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszStartChild));
10031 0 : if (_ptr_pszStartChild) {
10032 0 : NDR_PULL_ALLOC(ndr, r->in.pszStartChild);
10033 : } else {
10034 0 : r->in.pszStartChild = NULL;
10035 : }
10036 0 : if (r->in.pszStartChild) {
10037 0 : _mem_save_pszStartChild_0 = NDR_PULL_GET_MEM_CTX(ndr);
10038 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszStartChild, 0);
10039 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszStartChild));
10040 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszStartChild));
10041 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszStartChild, &size_pszStartChild_1));
10042 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszStartChild, &length_pszStartChild_1));
10043 0 : if (length_pszStartChild_1 > size_pszStartChild_1) {
10044 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszStartChild_1, length_pszStartChild_1);
10045 : }
10046 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszStartChild_1, sizeof(uint8_t)));
10047 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszStartChild, length_pszStartChild_1, sizeof(uint8_t), CH_UTF8));
10048 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszStartChild_0, 0);
10049 : }
10050 0 : NDR_CHECK(ndr_pull_dns_record_type(ndr, NDR_SCALARS, &r->in.wRecordType));
10051 0 : NDR_CHECK(ndr_pull_DNS_SELECT_FLAGS(ndr, NDR_SCALARS, &r->in.fSelectFlag));
10052 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFilterStart));
10053 0 : if (_ptr_pszFilterStart) {
10054 0 : NDR_PULL_ALLOC(ndr, r->in.pszFilterStart);
10055 : } else {
10056 0 : r->in.pszFilterStart = NULL;
10057 : }
10058 0 : if (r->in.pszFilterStart) {
10059 0 : _mem_save_pszFilterStart_0 = NDR_PULL_GET_MEM_CTX(ndr);
10060 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszFilterStart, 0);
10061 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszFilterStart));
10062 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszFilterStart));
10063 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszFilterStart, &size_pszFilterStart_1));
10064 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszFilterStart, &length_pszFilterStart_1));
10065 0 : if (length_pszFilterStart_1 > size_pszFilterStart_1) {
10066 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszFilterStart_1, length_pszFilterStart_1);
10067 : }
10068 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFilterStart_1, sizeof(uint8_t)));
10069 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszFilterStart, length_pszFilterStart_1, sizeof(uint8_t), CH_UTF8));
10070 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFilterStart_0, 0);
10071 : }
10072 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFilterStop));
10073 0 : if (_ptr_pszFilterStop) {
10074 0 : NDR_PULL_ALLOC(ndr, r->in.pszFilterStop);
10075 : } else {
10076 0 : r->in.pszFilterStop = NULL;
10077 : }
10078 0 : if (r->in.pszFilterStop) {
10079 0 : _mem_save_pszFilterStop_0 = NDR_PULL_GET_MEM_CTX(ndr);
10080 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszFilterStop, 0);
10081 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszFilterStop));
10082 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszFilterStop));
10083 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszFilterStop, &size_pszFilterStop_1));
10084 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszFilterStop, &length_pszFilterStop_1));
10085 0 : if (length_pszFilterStop_1 > size_pszFilterStop_1) {
10086 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszFilterStop_1, length_pszFilterStop_1);
10087 : }
10088 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFilterStop_1, sizeof(uint8_t)));
10089 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszFilterStop, length_pszFilterStop_1, sizeof(uint8_t), CH_UTF8));
10090 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFilterStop_0, 0);
10091 : }
10092 0 : NDR_PULL_ALLOC(ndr, r->out.pdwBufferLength);
10093 0 : NDR_ZERO_STRUCTP(r->out.pdwBufferLength);
10094 0 : NDR_PULL_ALLOC(ndr, r->out.pBuffer);
10095 0 : NDR_ZERO_STRUCTP(r->out.pBuffer);
10096 : }
10097 0 : if (flags & NDR_OUT) {
10098 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10099 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10100 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10101 0 : NDR_PULL_ALLOC(ndr, r->out.pdwBufferLength);
10102 : }
10103 0 : _mem_save_pdwBufferLength_0 = NDR_PULL_GET_MEM_CTX(ndr);
10104 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwBufferLength, LIBNDR_FLAG_REF_ALLOC);
10105 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pdwBufferLength));
10106 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwBufferLength_0, LIBNDR_FLAG_REF_ALLOC);
10107 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10108 0 : NDR_PULL_ALLOC(ndr, r->out.pBuffer);
10109 : }
10110 0 : _mem_save_pBuffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
10111 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pBuffer, LIBNDR_FLAG_REF_ALLOC);
10112 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pBuffer));
10113 0 : if (_ptr_pBuffer) {
10114 0 : NDR_PULL_ALLOC(ndr, *r->out.pBuffer);
10115 : } else {
10116 0 : *r->out.pBuffer = NULL;
10117 : }
10118 0 : if (*r->out.pBuffer) {
10119 0 : _mem_save_pBuffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
10120 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.pBuffer, 0);
10121 : {
10122 : struct ndr_pull *_ndr_pBuffer;
10123 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_pBuffer, 4, *r->out.pdwBufferLength));
10124 0 : NDR_CHECK(ndr_pull_DNS_RPC_RECORDS_ARRAY(_ndr_pBuffer, NDR_SCALARS, *r->out.pBuffer));
10125 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_pBuffer, 4, *r->out.pdwBufferLength));
10126 : }
10127 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBuffer_1, 0);
10128 : }
10129 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBuffer_0, LIBNDR_FLAG_REF_ALLOC);
10130 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10131 : }
10132 0 : return NDR_ERR_SUCCESS;
10133 : }
10134 :
10135 0 : _PUBLIC_ void ndr_print_DnssrvEnumRecords(struct ndr_print *ndr, const char *name, int flags, const struct DnssrvEnumRecords *r)
10136 : {
10137 0 : ndr_print_struct(ndr, name, "DnssrvEnumRecords");
10138 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10139 0 : ndr->depth++;
10140 0 : if (flags & NDR_SET_VALUES) {
10141 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10142 : }
10143 0 : if (flags & NDR_IN) {
10144 0 : ndr_print_struct(ndr, "in", "DnssrvEnumRecords");
10145 0 : ndr->depth++;
10146 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
10147 0 : ndr->depth++;
10148 0 : if (r->in.pwszServerName) {
10149 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
10150 : }
10151 0 : ndr->depth--;
10152 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
10153 0 : ndr->depth++;
10154 0 : if (r->in.pszZone) {
10155 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
10156 : }
10157 0 : ndr->depth--;
10158 0 : ndr_print_ptr(ndr, "pszNodeName", r->in.pszNodeName);
10159 0 : ndr->depth++;
10160 0 : if (r->in.pszNodeName) {
10161 0 : ndr_print_string(ndr, "pszNodeName", r->in.pszNodeName);
10162 : }
10163 0 : ndr->depth--;
10164 0 : ndr_print_ptr(ndr, "pszStartChild", r->in.pszStartChild);
10165 0 : ndr->depth++;
10166 0 : if (r->in.pszStartChild) {
10167 0 : ndr_print_string(ndr, "pszStartChild", r->in.pszStartChild);
10168 : }
10169 0 : ndr->depth--;
10170 0 : ndr_print_dns_record_type(ndr, "wRecordType", r->in.wRecordType);
10171 0 : ndr_print_DNS_SELECT_FLAGS(ndr, "fSelectFlag", r->in.fSelectFlag);
10172 0 : ndr_print_ptr(ndr, "pszFilterStart", r->in.pszFilterStart);
10173 0 : ndr->depth++;
10174 0 : if (r->in.pszFilterStart) {
10175 0 : ndr_print_string(ndr, "pszFilterStart", r->in.pszFilterStart);
10176 : }
10177 0 : ndr->depth--;
10178 0 : ndr_print_ptr(ndr, "pszFilterStop", r->in.pszFilterStop);
10179 0 : ndr->depth++;
10180 0 : if (r->in.pszFilterStop) {
10181 0 : ndr_print_string(ndr, "pszFilterStop", r->in.pszFilterStop);
10182 : }
10183 0 : ndr->depth--;
10184 0 : ndr->depth--;
10185 : }
10186 0 : if (flags & NDR_OUT) {
10187 0 : ndr_print_struct(ndr, "out", "DnssrvEnumRecords");
10188 0 : ndr->depth++;
10189 0 : ndr_print_ptr(ndr, "pdwBufferLength", r->out.pdwBufferLength);
10190 0 : ndr->depth++;
10191 0 : ndr_print_uint32(ndr, "pdwBufferLength", *r->out.pdwBufferLength);
10192 0 : ndr->depth--;
10193 0 : ndr_print_ptr(ndr, "pBuffer", r->out.pBuffer);
10194 0 : ndr->depth++;
10195 0 : ndr_print_ptr(ndr, "pBuffer", *r->out.pBuffer);
10196 0 : ndr->depth++;
10197 0 : if (*r->out.pBuffer) {
10198 0 : ndr_print_DNS_RPC_RECORDS_ARRAY(ndr, "pBuffer", *r->out.pBuffer);
10199 : }
10200 0 : ndr->depth--;
10201 0 : ndr->depth--;
10202 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10203 0 : ndr->depth--;
10204 : }
10205 0 : ndr->depth--;
10206 : }
10207 :
10208 0 : static enum ndr_err_code ndr_push_DnssrvUpdateRecord(struct ndr_push *ndr, int flags, const struct DnssrvUpdateRecord *r)
10209 : {
10210 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10211 0 : if (flags & NDR_IN) {
10212 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
10213 0 : if (r->in.pwszServerName) {
10214 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10215 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10216 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10217 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));
10218 : }
10219 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
10220 0 : if (r->in.pszZone) {
10221 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10222 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10223 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10224 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));
10225 : }
10226 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszNodeName));
10227 0 : if (r->in.pszNodeName) {
10228 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
10229 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10230 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
10231 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));
10232 : }
10233 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pAddRecord));
10234 0 : if (r->in.pAddRecord) {
10235 0 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pAddRecord));
10236 : }
10237 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDeleteRecord));
10238 0 : if (r->in.pDeleteRecord) {
10239 0 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pDeleteRecord));
10240 : }
10241 : }
10242 0 : if (flags & NDR_OUT) {
10243 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10244 : }
10245 0 : return NDR_ERR_SUCCESS;
10246 : }
10247 :
10248 0 : static enum ndr_err_code ndr_pull_DnssrvUpdateRecord(struct ndr_pull *ndr, int flags, struct DnssrvUpdateRecord *r)
10249 : {
10250 : uint32_t _ptr_pwszServerName;
10251 0 : uint32_t size_pwszServerName_1 = 0;
10252 0 : uint32_t length_pwszServerName_1 = 0;
10253 : uint32_t _ptr_pszZone;
10254 0 : uint32_t size_pszZone_1 = 0;
10255 0 : uint32_t length_pszZone_1 = 0;
10256 : uint32_t _ptr_pszNodeName;
10257 0 : uint32_t size_pszNodeName_1 = 0;
10258 0 : uint32_t length_pszNodeName_1 = 0;
10259 : uint32_t _ptr_pAddRecord;
10260 : uint32_t _ptr_pDeleteRecord;
10261 0 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
10262 0 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
10263 0 : TALLOC_CTX *_mem_save_pszNodeName_0 = NULL;
10264 0 : TALLOC_CTX *_mem_save_pAddRecord_0 = NULL;
10265 0 : TALLOC_CTX *_mem_save_pDeleteRecord_0 = NULL;
10266 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10267 0 : if (flags & NDR_IN) {
10268 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
10269 0 : if (_ptr_pwszServerName) {
10270 0 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
10271 : } else {
10272 0 : r->in.pwszServerName = NULL;
10273 : }
10274 0 : if (r->in.pwszServerName) {
10275 0 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10276 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
10277 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
10278 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
10279 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
10280 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
10281 0 : if (length_pwszServerName_1 > size_pwszServerName_1) {
10282 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszServerName_1, length_pwszServerName_1);
10283 : }
10284 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
10285 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
10286 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
10287 : }
10288 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
10289 0 : if (_ptr_pszZone) {
10290 0 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
10291 : } else {
10292 0 : r->in.pszZone = NULL;
10293 : }
10294 0 : if (r->in.pszZone) {
10295 0 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
10296 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
10297 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
10298 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
10299 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
10300 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
10301 0 : if (length_pszZone_1 > size_pszZone_1) {
10302 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZone_1, length_pszZone_1);
10303 : }
10304 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
10305 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
10306 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
10307 : }
10308 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszNodeName));
10309 0 : if (_ptr_pszNodeName) {
10310 0 : NDR_PULL_ALLOC(ndr, r->in.pszNodeName);
10311 : } else {
10312 0 : r->in.pszNodeName = NULL;
10313 : }
10314 0 : if (r->in.pszNodeName) {
10315 0 : _mem_save_pszNodeName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10316 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszNodeName, 0);
10317 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszNodeName));
10318 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszNodeName));
10319 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszNodeName, &size_pszNodeName_1));
10320 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszNodeName, &length_pszNodeName_1));
10321 0 : if (length_pszNodeName_1 > size_pszNodeName_1) {
10322 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszNodeName_1, length_pszNodeName_1);
10323 : }
10324 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNodeName_1, sizeof(uint8_t)));
10325 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszNodeName, length_pszNodeName_1, sizeof(uint8_t), CH_UTF8));
10326 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszNodeName_0, 0);
10327 : }
10328 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pAddRecord));
10329 0 : if (_ptr_pAddRecord) {
10330 0 : NDR_PULL_ALLOC(ndr, r->in.pAddRecord);
10331 : } else {
10332 0 : r->in.pAddRecord = NULL;
10333 : }
10334 0 : if (r->in.pAddRecord) {
10335 0 : _mem_save_pAddRecord_0 = NDR_PULL_GET_MEM_CTX(ndr);
10336 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pAddRecord, 0);
10337 0 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pAddRecord));
10338 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pAddRecord_0, 0);
10339 : }
10340 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDeleteRecord));
10341 0 : if (_ptr_pDeleteRecord) {
10342 0 : NDR_PULL_ALLOC(ndr, r->in.pDeleteRecord);
10343 : } else {
10344 0 : r->in.pDeleteRecord = NULL;
10345 : }
10346 0 : if (r->in.pDeleteRecord) {
10347 0 : _mem_save_pDeleteRecord_0 = NDR_PULL_GET_MEM_CTX(ndr);
10348 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDeleteRecord, 0);
10349 0 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pDeleteRecord));
10350 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDeleteRecord_0, 0);
10351 : }
10352 : }
10353 0 : if (flags & NDR_OUT) {
10354 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10355 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10356 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10357 : }
10358 0 : return NDR_ERR_SUCCESS;
10359 : }
10360 :
10361 0 : _PUBLIC_ void ndr_print_DnssrvUpdateRecord(struct ndr_print *ndr, const char *name, int flags, const struct DnssrvUpdateRecord *r)
10362 : {
10363 0 : ndr_print_struct(ndr, name, "DnssrvUpdateRecord");
10364 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10365 0 : ndr->depth++;
10366 0 : if (flags & NDR_SET_VALUES) {
10367 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10368 : }
10369 0 : if (flags & NDR_IN) {
10370 0 : ndr_print_struct(ndr, "in", "DnssrvUpdateRecord");
10371 0 : ndr->depth++;
10372 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
10373 0 : ndr->depth++;
10374 0 : if (r->in.pwszServerName) {
10375 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
10376 : }
10377 0 : ndr->depth--;
10378 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
10379 0 : ndr->depth++;
10380 0 : if (r->in.pszZone) {
10381 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
10382 : }
10383 0 : ndr->depth--;
10384 0 : ndr_print_ptr(ndr, "pszNodeName", r->in.pszNodeName);
10385 0 : ndr->depth++;
10386 0 : if (r->in.pszNodeName) {
10387 0 : ndr_print_string(ndr, "pszNodeName", r->in.pszNodeName);
10388 : }
10389 0 : ndr->depth--;
10390 0 : ndr_print_ptr(ndr, "pAddRecord", r->in.pAddRecord);
10391 0 : ndr->depth++;
10392 0 : if (r->in.pAddRecord) {
10393 0 : ndr_print_DNS_RPC_RECORD_BUF(ndr, "pAddRecord", r->in.pAddRecord);
10394 : }
10395 0 : ndr->depth--;
10396 0 : ndr_print_ptr(ndr, "pDeleteRecord", r->in.pDeleteRecord);
10397 0 : ndr->depth++;
10398 0 : if (r->in.pDeleteRecord) {
10399 0 : ndr_print_DNS_RPC_RECORD_BUF(ndr, "pDeleteRecord", r->in.pDeleteRecord);
10400 : }
10401 0 : ndr->depth--;
10402 0 : ndr->depth--;
10403 : }
10404 0 : if (flags & NDR_OUT) {
10405 0 : ndr_print_struct(ndr, "out", "DnssrvUpdateRecord");
10406 0 : ndr->depth++;
10407 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10408 0 : ndr->depth--;
10409 : }
10410 0 : ndr->depth--;
10411 : }
10412 :
10413 3068 : static enum ndr_err_code ndr_push_DnssrvOperation2(struct ndr_push *ndr, int flags, const struct DnssrvOperation2 *r)
10414 : {
10415 3068 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10416 3068 : if (flags & NDR_IN) {
10417 1534 : NDR_CHECK(ndr_push_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, r->in.dwClientVersion));
10418 1534 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwSettingFlags));
10419 1534 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
10420 1534 : if (r->in.pwszServerName) {
10421 1534 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10422 1534 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10423 1534 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10424 1534 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10425 : }
10426 1534 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
10427 1534 : if (r->in.pszZone) {
10428 1161 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10429 1161 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10430 1161 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10431 1161 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10432 : }
10433 1534 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwContext));
10434 1534 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
10435 1534 : if (r->in.pszOperation) {
10436 1534 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10437 1534 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10438 1534 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10439 1534 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszOperation, ndr_charset_length(r->in.pszOperation, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10440 : }
10441 1534 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->in.dwTypeId));
10442 1534 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId));
10443 1534 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pData));
10444 : }
10445 3068 : if (flags & NDR_OUT) {
10446 1534 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10447 : }
10448 3068 : return NDR_ERR_SUCCESS;
10449 : }
10450 :
10451 3068 : static enum ndr_err_code ndr_pull_DnssrvOperation2(struct ndr_pull *ndr, int flags, struct DnssrvOperation2 *r)
10452 : {
10453 : uint32_t _ptr_pwszServerName;
10454 3068 : uint32_t size_pwszServerName_1 = 0;
10455 3068 : uint32_t length_pwszServerName_1 = 0;
10456 : uint32_t _ptr_pszZone;
10457 3068 : uint32_t size_pszZone_1 = 0;
10458 3068 : uint32_t length_pszZone_1 = 0;
10459 : uint32_t _ptr_pszOperation;
10460 3068 : uint32_t size_pszOperation_1 = 0;
10461 3068 : uint32_t length_pszOperation_1 = 0;
10462 3068 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
10463 3068 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
10464 3068 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
10465 3068 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10466 3068 : if (flags & NDR_IN) {
10467 1534 : NDR_CHECK(ndr_pull_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, &r->in.dwClientVersion));
10468 1534 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwSettingFlags));
10469 1534 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
10470 1534 : if (_ptr_pwszServerName) {
10471 1534 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
10472 : } else {
10473 0 : r->in.pwszServerName = NULL;
10474 : }
10475 1534 : if (r->in.pwszServerName) {
10476 1534 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10477 1534 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
10478 1534 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
10479 1534 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
10480 1534 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
10481 1534 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
10482 1534 : if (length_pwszServerName_1 > size_pwszServerName_1) {
10483 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszServerName_1, length_pwszServerName_1);
10484 : }
10485 1534 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
10486 1534 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
10487 1534 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
10488 : }
10489 1534 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
10490 1534 : if (_ptr_pszZone) {
10491 1161 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
10492 : } else {
10493 373 : r->in.pszZone = NULL;
10494 : }
10495 1534 : if (r->in.pszZone) {
10496 1161 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
10497 1161 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
10498 1161 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
10499 1161 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
10500 1161 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
10501 1161 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
10502 1161 : if (length_pszZone_1 > size_pszZone_1) {
10503 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZone_1, length_pszZone_1);
10504 : }
10505 1161 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
10506 1161 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
10507 1161 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
10508 : }
10509 1534 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwContext));
10510 1534 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
10511 1534 : if (_ptr_pszOperation) {
10512 1534 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
10513 : } else {
10514 0 : r->in.pszOperation = NULL;
10515 : }
10516 1534 : if (r->in.pszOperation) {
10517 1534 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
10518 1534 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
10519 1534 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
10520 1534 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
10521 1534 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
10522 1534 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
10523 1534 : if (length_pszOperation_1 > size_pszOperation_1) {
10524 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszOperation_1, length_pszOperation_1);
10525 : }
10526 1534 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
10527 1534 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
10528 1534 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
10529 : }
10530 1534 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, &r->in.dwTypeId));
10531 1534 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId));
10532 1534 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pData));
10533 : }
10534 3068 : if (flags & NDR_OUT) {
10535 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10536 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10537 1534 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10538 : }
10539 3068 : return NDR_ERR_SUCCESS;
10540 : }
10541 :
10542 2 : _PUBLIC_ void ndr_print_DnssrvOperation2(struct ndr_print *ndr, const char *name, int flags, const struct DnssrvOperation2 *r)
10543 : {
10544 2 : ndr_print_struct(ndr, name, "DnssrvOperation2");
10545 2 : if (r == NULL) { ndr_print_null(ndr); return; }
10546 2 : ndr->depth++;
10547 2 : if (flags & NDR_SET_VALUES) {
10548 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10549 : }
10550 2 : if (flags & NDR_IN) {
10551 2 : ndr_print_struct(ndr, "in", "DnssrvOperation2");
10552 2 : ndr->depth++;
10553 2 : ndr_print_DNS_RPC_CLIENT_VERSION(ndr, "dwClientVersion", r->in.dwClientVersion);
10554 2 : ndr_print_uint32(ndr, "dwSettingFlags", r->in.dwSettingFlags);
10555 2 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
10556 2 : ndr->depth++;
10557 2 : if (r->in.pwszServerName) {
10558 2 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
10559 : }
10560 2 : ndr->depth--;
10561 2 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
10562 2 : ndr->depth++;
10563 2 : if (r->in.pszZone) {
10564 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
10565 : }
10566 2 : ndr->depth--;
10567 2 : ndr_print_uint32(ndr, "dwContext", r->in.dwContext);
10568 2 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
10569 2 : ndr->depth++;
10570 2 : if (r->in.pszOperation) {
10571 2 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
10572 : }
10573 2 : ndr->depth--;
10574 2 : ndr_print_DNS_RPC_TYPEID(ndr, "dwTypeId", r->in.dwTypeId);
10575 2 : ndr_print_set_switch_value(ndr, &r->in.pData, r->in.dwTypeId);
10576 2 : ndr_print_DNSSRV_RPC_UNION(ndr, "pData", &r->in.pData);
10577 2 : ndr->depth--;
10578 : }
10579 2 : if (flags & NDR_OUT) {
10580 0 : ndr_print_struct(ndr, "out", "DnssrvOperation2");
10581 0 : ndr->depth++;
10582 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10583 0 : ndr->depth--;
10584 : }
10585 2 : ndr->depth--;
10586 : }
10587 :
10588 42 : static enum ndr_err_code ndr_push_DnssrvQuery2(struct ndr_push *ndr, int flags, const struct DnssrvQuery2 *r)
10589 : {
10590 42 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10591 42 : if (flags & NDR_IN) {
10592 21 : NDR_CHECK(ndr_push_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, r->in.dwClientVersion));
10593 21 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwSettingFlags));
10594 21 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
10595 21 : if (r->in.pwszServerName) {
10596 21 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10597 21 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10598 21 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10599 21 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10600 : }
10601 21 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
10602 21 : if (r->in.pszZone) {
10603 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10604 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10605 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10606 15 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10607 : }
10608 21 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
10609 21 : if (r->in.pszOperation) {
10610 21 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10611 21 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10612 21 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10613 21 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszOperation, ndr_charset_length(r->in.pszOperation, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10614 : }
10615 : }
10616 42 : if (flags & NDR_OUT) {
10617 21 : if (r->out.pdwTypeId == NULL) {
10618 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10619 : }
10620 21 : if (r->out.ppData == NULL) {
10621 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10622 : }
10623 21 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, *r->out.pdwTypeId));
10624 21 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId));
10625 21 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppData));
10626 21 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10627 : }
10628 42 : return NDR_ERR_SUCCESS;
10629 : }
10630 :
10631 42 : static enum ndr_err_code ndr_pull_DnssrvQuery2(struct ndr_pull *ndr, int flags, struct DnssrvQuery2 *r)
10632 : {
10633 : uint32_t _ptr_pwszServerName;
10634 42 : uint32_t size_pwszServerName_1 = 0;
10635 42 : uint32_t length_pwszServerName_1 = 0;
10636 : uint32_t _ptr_pszZone;
10637 42 : uint32_t size_pszZone_1 = 0;
10638 42 : uint32_t length_pszZone_1 = 0;
10639 : uint32_t _ptr_pszOperation;
10640 42 : uint32_t size_pszOperation_1 = 0;
10641 42 : uint32_t length_pszOperation_1 = 0;
10642 42 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
10643 42 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
10644 42 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
10645 42 : TALLOC_CTX *_mem_save_pdwTypeId_0 = NULL;
10646 42 : TALLOC_CTX *_mem_save_ppData_0 = NULL;
10647 42 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10648 42 : if (flags & NDR_IN) {
10649 21 : NDR_ZERO_STRUCT(r->out);
10650 :
10651 21 : NDR_CHECK(ndr_pull_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, &r->in.dwClientVersion));
10652 21 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwSettingFlags));
10653 21 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
10654 21 : if (_ptr_pwszServerName) {
10655 21 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
10656 : } else {
10657 0 : r->in.pwszServerName = NULL;
10658 : }
10659 21 : if (r->in.pwszServerName) {
10660 21 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10661 21 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
10662 21 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
10663 21 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
10664 21 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
10665 21 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
10666 21 : if (length_pwszServerName_1 > size_pwszServerName_1) {
10667 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszServerName_1, length_pwszServerName_1);
10668 : }
10669 21 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
10670 21 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
10671 21 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
10672 : }
10673 21 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
10674 21 : if (_ptr_pszZone) {
10675 15 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
10676 : } else {
10677 6 : r->in.pszZone = NULL;
10678 : }
10679 21 : if (r->in.pszZone) {
10680 15 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
10681 15 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
10682 15 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
10683 15 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
10684 15 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
10685 15 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
10686 15 : if (length_pszZone_1 > size_pszZone_1) {
10687 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZone_1, length_pszZone_1);
10688 : }
10689 15 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
10690 15 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
10691 15 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
10692 : }
10693 21 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
10694 21 : if (_ptr_pszOperation) {
10695 21 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
10696 : } else {
10697 0 : r->in.pszOperation = NULL;
10698 : }
10699 21 : if (r->in.pszOperation) {
10700 21 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
10701 21 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
10702 21 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
10703 21 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
10704 21 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
10705 21 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
10706 21 : if (length_pszOperation_1 > size_pszOperation_1) {
10707 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszOperation_1, length_pszOperation_1);
10708 : }
10709 21 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
10710 21 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
10711 21 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
10712 : }
10713 21 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeId);
10714 21 : NDR_ZERO_STRUCTP(r->out.pdwTypeId);
10715 21 : NDR_PULL_ALLOC(ndr, r->out.ppData);
10716 21 : NDR_ZERO_STRUCTP(r->out.ppData);
10717 : }
10718 42 : if (flags & NDR_OUT) {
10719 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10720 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10721 21 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10722 21 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeId);
10723 : }
10724 21 : _mem_save_pdwTypeId_0 = NDR_PULL_GET_MEM_CTX(ndr);
10725 21 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwTypeId, LIBNDR_FLAG_REF_ALLOC);
10726 21 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->out.pdwTypeId));
10727 21 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwTypeId_0, LIBNDR_FLAG_REF_ALLOC);
10728 21 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10729 21 : NDR_PULL_ALLOC(ndr, r->out.ppData);
10730 : }
10731 21 : _mem_save_ppData_0 = NDR_PULL_GET_MEM_CTX(ndr);
10732 21 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppData, LIBNDR_FLAG_REF_ALLOC);
10733 21 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId));
10734 21 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppData));
10735 21 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppData_0, LIBNDR_FLAG_REF_ALLOC);
10736 21 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10737 : }
10738 42 : return NDR_ERR_SUCCESS;
10739 : }
10740 :
10741 0 : _PUBLIC_ void ndr_print_DnssrvQuery2(struct ndr_print *ndr, const char *name, int flags, const struct DnssrvQuery2 *r)
10742 : {
10743 0 : ndr_print_struct(ndr, name, "DnssrvQuery2");
10744 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10745 0 : ndr->depth++;
10746 0 : if (flags & NDR_SET_VALUES) {
10747 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10748 : }
10749 0 : if (flags & NDR_IN) {
10750 0 : ndr_print_struct(ndr, "in", "DnssrvQuery2");
10751 0 : ndr->depth++;
10752 0 : ndr_print_DNS_RPC_CLIENT_VERSION(ndr, "dwClientVersion", r->in.dwClientVersion);
10753 0 : ndr_print_uint32(ndr, "dwSettingFlags", r->in.dwSettingFlags);
10754 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
10755 0 : ndr->depth++;
10756 0 : if (r->in.pwszServerName) {
10757 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
10758 : }
10759 0 : ndr->depth--;
10760 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
10761 0 : ndr->depth++;
10762 0 : if (r->in.pszZone) {
10763 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
10764 : }
10765 0 : ndr->depth--;
10766 0 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
10767 0 : ndr->depth++;
10768 0 : if (r->in.pszOperation) {
10769 0 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
10770 : }
10771 0 : ndr->depth--;
10772 0 : ndr->depth--;
10773 : }
10774 0 : if (flags & NDR_OUT) {
10775 0 : ndr_print_struct(ndr, "out", "DnssrvQuery2");
10776 0 : ndr->depth++;
10777 0 : ndr_print_ptr(ndr, "pdwTypeId", r->out.pdwTypeId);
10778 0 : ndr->depth++;
10779 0 : ndr_print_DNS_RPC_TYPEID(ndr, "pdwTypeId", *r->out.pdwTypeId);
10780 0 : ndr->depth--;
10781 0 : ndr_print_ptr(ndr, "ppData", r->out.ppData);
10782 0 : ndr->depth++;
10783 0 : ndr_print_set_switch_value(ndr, r->out.ppData, *r->out.pdwTypeId);
10784 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "ppData", r->out.ppData);
10785 0 : ndr->depth--;
10786 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10787 0 : ndr->depth--;
10788 : }
10789 0 : ndr->depth--;
10790 : }
10791 :
10792 20 : static enum ndr_err_code ndr_push_DnssrvComplexOperation2(struct ndr_push *ndr, int flags, const struct DnssrvComplexOperation2 *r)
10793 : {
10794 20 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10795 20 : if (flags & NDR_IN) {
10796 10 : NDR_CHECK(ndr_push_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, r->in.dwClientVersion));
10797 10 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwSettingFlags));
10798 10 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
10799 10 : if (r->in.pwszServerName) {
10800 10 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10801 10 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10802 10 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
10803 10 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10804 : }
10805 10 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
10806 10 : if (r->in.pszZone) {
10807 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10808 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10809 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
10810 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));
10811 : }
10812 10 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszOperation));
10813 10 : if (r->in.pszOperation) {
10814 10 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10815 10 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10816 10 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszOperation, CH_UTF8)));
10817 10 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszOperation, ndr_charset_length(r->in.pszOperation, CH_UTF8), sizeof(uint8_t), CH_UTF8));
10818 : }
10819 10 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->in.dwTypeIn));
10820 10 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn));
10821 10 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pDataIn));
10822 : }
10823 20 : if (flags & NDR_OUT) {
10824 10 : if (r->out.pdwTypeOut == NULL) {
10825 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10826 : }
10827 10 : if (r->out.ppDataOut == NULL) {
10828 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10829 : }
10830 10 : NDR_CHECK(ndr_push_DNS_RPC_TYPEID(ndr, NDR_SCALARS, *r->out.pdwTypeOut));
10831 10 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut));
10832 10 : NDR_CHECK(ndr_push_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppDataOut));
10833 10 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10834 : }
10835 20 : return NDR_ERR_SUCCESS;
10836 : }
10837 :
10838 20 : static enum ndr_err_code ndr_pull_DnssrvComplexOperation2(struct ndr_pull *ndr, int flags, struct DnssrvComplexOperation2 *r)
10839 : {
10840 : uint32_t _ptr_pwszServerName;
10841 20 : uint32_t size_pwszServerName_1 = 0;
10842 20 : uint32_t length_pwszServerName_1 = 0;
10843 : uint32_t _ptr_pszZone;
10844 20 : uint32_t size_pszZone_1 = 0;
10845 20 : uint32_t length_pszZone_1 = 0;
10846 : uint32_t _ptr_pszOperation;
10847 20 : uint32_t size_pszOperation_1 = 0;
10848 20 : uint32_t length_pszOperation_1 = 0;
10849 20 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
10850 20 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
10851 20 : TALLOC_CTX *_mem_save_pszOperation_0 = NULL;
10852 20 : TALLOC_CTX *_mem_save_pdwTypeOut_0 = NULL;
10853 20 : TALLOC_CTX *_mem_save_ppDataOut_0 = NULL;
10854 20 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10855 20 : if (flags & NDR_IN) {
10856 10 : NDR_ZERO_STRUCT(r->out);
10857 :
10858 10 : NDR_CHECK(ndr_pull_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, &r->in.dwClientVersion));
10859 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwSettingFlags));
10860 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
10861 10 : if (_ptr_pwszServerName) {
10862 10 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
10863 : } else {
10864 0 : r->in.pwszServerName = NULL;
10865 : }
10866 10 : if (r->in.pwszServerName) {
10867 10 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10868 10 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
10869 10 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
10870 10 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
10871 10 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
10872 10 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
10873 10 : if (length_pwszServerName_1 > size_pwszServerName_1) {
10874 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszServerName_1, length_pwszServerName_1);
10875 : }
10876 10 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
10877 10 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
10878 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
10879 : }
10880 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
10881 10 : if (_ptr_pszZone) {
10882 0 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
10883 : } else {
10884 10 : r->in.pszZone = NULL;
10885 : }
10886 10 : if (r->in.pszZone) {
10887 0 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
10888 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
10889 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
10890 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
10891 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
10892 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
10893 0 : if (length_pszZone_1 > size_pszZone_1) {
10894 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZone_1, length_pszZone_1);
10895 : }
10896 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
10897 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
10898 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
10899 : }
10900 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszOperation));
10901 10 : if (_ptr_pszOperation) {
10902 10 : NDR_PULL_ALLOC(ndr, r->in.pszOperation);
10903 : } else {
10904 0 : r->in.pszOperation = NULL;
10905 : }
10906 10 : if (r->in.pszOperation) {
10907 10 : _mem_save_pszOperation_0 = NDR_PULL_GET_MEM_CTX(ndr);
10908 10 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszOperation, 0);
10909 10 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszOperation));
10910 10 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszOperation));
10911 10 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszOperation, &size_pszOperation_1));
10912 10 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszOperation, &length_pszOperation_1));
10913 10 : if (length_pszOperation_1 > size_pszOperation_1) {
10914 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszOperation_1, length_pszOperation_1);
10915 : }
10916 10 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszOperation_1, sizeof(uint8_t)));
10917 10 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszOperation, length_pszOperation_1, sizeof(uint8_t), CH_UTF8));
10918 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszOperation_0, 0);
10919 : }
10920 10 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, &r->in.dwTypeIn));
10921 10 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn));
10922 10 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pDataIn));
10923 10 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeOut);
10924 10 : NDR_ZERO_STRUCTP(r->out.pdwTypeOut);
10925 10 : NDR_PULL_ALLOC(ndr, r->out.ppDataOut);
10926 10 : NDR_ZERO_STRUCTP(r->out.ppDataOut);
10927 : }
10928 20 : if (flags & NDR_OUT) {
10929 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10930 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10931 10 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10932 10 : NDR_PULL_ALLOC(ndr, r->out.pdwTypeOut);
10933 : }
10934 10 : _mem_save_pdwTypeOut_0 = NDR_PULL_GET_MEM_CTX(ndr);
10935 10 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwTypeOut, LIBNDR_FLAG_REF_ALLOC);
10936 10 : NDR_CHECK(ndr_pull_DNS_RPC_TYPEID(ndr, NDR_SCALARS, r->out.pdwTypeOut));
10937 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwTypeOut_0, LIBNDR_FLAG_REF_ALLOC);
10938 10 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10939 10 : NDR_PULL_ALLOC(ndr, r->out.ppDataOut);
10940 : }
10941 10 : _mem_save_ppDataOut_0 = NDR_PULL_GET_MEM_CTX(ndr);
10942 10 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppDataOut, LIBNDR_FLAG_REF_ALLOC);
10943 10 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut));
10944 10 : NDR_CHECK(ndr_pull_DNSSRV_RPC_UNION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppDataOut));
10945 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppDataOut_0, LIBNDR_FLAG_REF_ALLOC);
10946 10 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10947 : }
10948 20 : return NDR_ERR_SUCCESS;
10949 : }
10950 :
10951 0 : _PUBLIC_ void ndr_print_DnssrvComplexOperation2(struct ndr_print *ndr, const char *name, int flags, const struct DnssrvComplexOperation2 *r)
10952 : {
10953 0 : ndr_print_struct(ndr, name, "DnssrvComplexOperation2");
10954 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10955 0 : ndr->depth++;
10956 0 : if (flags & NDR_SET_VALUES) {
10957 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10958 : }
10959 0 : if (flags & NDR_IN) {
10960 0 : ndr_print_struct(ndr, "in", "DnssrvComplexOperation2");
10961 0 : ndr->depth++;
10962 0 : ndr_print_DNS_RPC_CLIENT_VERSION(ndr, "dwClientVersion", r->in.dwClientVersion);
10963 0 : ndr_print_uint32(ndr, "dwSettingFlags", r->in.dwSettingFlags);
10964 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
10965 0 : ndr->depth++;
10966 0 : if (r->in.pwszServerName) {
10967 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
10968 : }
10969 0 : ndr->depth--;
10970 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
10971 0 : ndr->depth++;
10972 0 : if (r->in.pszZone) {
10973 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
10974 : }
10975 0 : ndr->depth--;
10976 0 : ndr_print_ptr(ndr, "pszOperation", r->in.pszOperation);
10977 0 : ndr->depth++;
10978 0 : if (r->in.pszOperation) {
10979 0 : ndr_print_string(ndr, "pszOperation", r->in.pszOperation);
10980 : }
10981 0 : ndr->depth--;
10982 0 : ndr_print_DNS_RPC_TYPEID(ndr, "dwTypeIn", r->in.dwTypeIn);
10983 0 : ndr_print_set_switch_value(ndr, &r->in.pDataIn, r->in.dwTypeIn);
10984 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "pDataIn", &r->in.pDataIn);
10985 0 : ndr->depth--;
10986 : }
10987 0 : if (flags & NDR_OUT) {
10988 0 : ndr_print_struct(ndr, "out", "DnssrvComplexOperation2");
10989 0 : ndr->depth++;
10990 0 : ndr_print_ptr(ndr, "pdwTypeOut", r->out.pdwTypeOut);
10991 0 : ndr->depth++;
10992 0 : ndr_print_DNS_RPC_TYPEID(ndr, "pdwTypeOut", *r->out.pdwTypeOut);
10993 0 : ndr->depth--;
10994 0 : ndr_print_ptr(ndr, "ppDataOut", r->out.ppDataOut);
10995 0 : ndr->depth++;
10996 0 : ndr_print_set_switch_value(ndr, r->out.ppDataOut, *r->out.pdwTypeOut);
10997 0 : ndr_print_DNSSRV_RPC_UNION(ndr, "ppDataOut", r->out.ppDataOut);
10998 0 : ndr->depth--;
10999 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11000 0 : ndr->depth--;
11001 : }
11002 0 : ndr->depth--;
11003 : }
11004 :
11005 1252 : static enum ndr_err_code ndr_push_DnssrvEnumRecords2(struct ndr_push *ndr, int flags, const struct DnssrvEnumRecords2 *r)
11006 : {
11007 1252 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11008 1252 : if (flags & NDR_IN) {
11009 626 : NDR_CHECK(ndr_push_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, r->in.dwClientVersion));
11010 626 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwSettingFlags));
11011 626 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
11012 626 : if (r->in.pwszServerName) {
11013 626 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
11014 626 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11015 626 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
11016 626 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11017 : }
11018 626 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
11019 626 : if (r->in.pszZone) {
11020 626 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
11021 626 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11022 626 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
11023 626 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11024 : }
11025 626 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszNodeName));
11026 626 : if (r->in.pszNodeName) {
11027 626 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
11028 626 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11029 626 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
11030 626 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszNodeName, ndr_charset_length(r->in.pszNodeName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11031 : }
11032 626 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszStartChild));
11033 626 : if (r->in.pszStartChild) {
11034 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszStartChild, CH_UTF8)));
11035 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11036 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszStartChild, CH_UTF8)));
11037 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));
11038 : }
11039 626 : NDR_CHECK(ndr_push_dns_record_type(ndr, NDR_SCALARS, r->in.wRecordType));
11040 626 : NDR_CHECK(ndr_push_DNS_SELECT_FLAGS(ndr, NDR_SCALARS, r->in.fSelectFlag));
11041 626 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszFilterStart));
11042 626 : if (r->in.pszFilterStart) {
11043 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStart, CH_UTF8)));
11044 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11045 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStart, CH_UTF8)));
11046 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));
11047 : }
11048 626 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszFilterStop));
11049 626 : if (r->in.pszFilterStop) {
11050 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStop, CH_UTF8)));
11051 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11052 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszFilterStop, CH_UTF8)));
11053 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));
11054 : }
11055 : }
11056 1252 : if (flags & NDR_OUT) {
11057 626 : if (r->out.pdwBufferLength == NULL) {
11058 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11059 : }
11060 626 : if (r->out.pBuffer == NULL) {
11061 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11062 : }
11063 626 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pdwBufferLength));
11064 626 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.pBuffer));
11065 626 : if (*r->out.pBuffer) {
11066 : {
11067 : struct ndr_push *_ndr_pBuffer;
11068 526 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_pBuffer, 4, *r->out.pdwBufferLength));
11069 526 : NDR_CHECK(ndr_push_DNS_RPC_RECORDS_ARRAY(_ndr_pBuffer, NDR_SCALARS, *r->out.pBuffer));
11070 526 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_pBuffer, 4, *r->out.pdwBufferLength));
11071 : }
11072 : }
11073 626 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
11074 : }
11075 1252 : return NDR_ERR_SUCCESS;
11076 : }
11077 :
11078 1252 : static enum ndr_err_code ndr_pull_DnssrvEnumRecords2(struct ndr_pull *ndr, int flags, struct DnssrvEnumRecords2 *r)
11079 : {
11080 : uint32_t _ptr_pwszServerName;
11081 1252 : uint32_t size_pwszServerName_1 = 0;
11082 1252 : uint32_t length_pwszServerName_1 = 0;
11083 : uint32_t _ptr_pszZone;
11084 1252 : uint32_t size_pszZone_1 = 0;
11085 1252 : uint32_t length_pszZone_1 = 0;
11086 : uint32_t _ptr_pszNodeName;
11087 1252 : uint32_t size_pszNodeName_1 = 0;
11088 1252 : uint32_t length_pszNodeName_1 = 0;
11089 : uint32_t _ptr_pszStartChild;
11090 1252 : uint32_t size_pszStartChild_1 = 0;
11091 1252 : uint32_t length_pszStartChild_1 = 0;
11092 : uint32_t _ptr_pszFilterStart;
11093 1252 : uint32_t size_pszFilterStart_1 = 0;
11094 1252 : uint32_t length_pszFilterStart_1 = 0;
11095 : uint32_t _ptr_pszFilterStop;
11096 1252 : uint32_t size_pszFilterStop_1 = 0;
11097 1252 : uint32_t length_pszFilterStop_1 = 0;
11098 : uint32_t _ptr_pBuffer;
11099 1252 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
11100 1252 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
11101 1252 : TALLOC_CTX *_mem_save_pszNodeName_0 = NULL;
11102 1252 : TALLOC_CTX *_mem_save_pszStartChild_0 = NULL;
11103 1252 : TALLOC_CTX *_mem_save_pszFilterStart_0 = NULL;
11104 1252 : TALLOC_CTX *_mem_save_pszFilterStop_0 = NULL;
11105 1252 : TALLOC_CTX *_mem_save_pdwBufferLength_0 = NULL;
11106 1252 : TALLOC_CTX *_mem_save_pBuffer_0 = NULL;
11107 1252 : TALLOC_CTX *_mem_save_pBuffer_1 = NULL;
11108 1252 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11109 1252 : if (flags & NDR_IN) {
11110 626 : NDR_ZERO_STRUCT(r->out);
11111 :
11112 626 : NDR_CHECK(ndr_pull_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, &r->in.dwClientVersion));
11113 626 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwSettingFlags));
11114 626 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
11115 626 : if (_ptr_pwszServerName) {
11116 626 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
11117 : } else {
11118 0 : r->in.pwszServerName = NULL;
11119 : }
11120 626 : if (r->in.pwszServerName) {
11121 626 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
11122 626 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
11123 626 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
11124 626 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
11125 626 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
11126 626 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
11127 626 : if (length_pwszServerName_1 > size_pwszServerName_1) {
11128 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszServerName_1, length_pwszServerName_1);
11129 : }
11130 626 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
11131 626 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
11132 626 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
11133 : }
11134 626 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
11135 626 : if (_ptr_pszZone) {
11136 626 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
11137 : } else {
11138 0 : r->in.pszZone = NULL;
11139 : }
11140 626 : if (r->in.pszZone) {
11141 626 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
11142 626 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
11143 626 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
11144 626 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
11145 626 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
11146 626 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
11147 626 : if (length_pszZone_1 > size_pszZone_1) {
11148 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZone_1, length_pszZone_1);
11149 : }
11150 626 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
11151 626 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
11152 626 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
11153 : }
11154 626 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszNodeName));
11155 626 : if (_ptr_pszNodeName) {
11156 626 : NDR_PULL_ALLOC(ndr, r->in.pszNodeName);
11157 : } else {
11158 0 : r->in.pszNodeName = NULL;
11159 : }
11160 626 : if (r->in.pszNodeName) {
11161 626 : _mem_save_pszNodeName_0 = NDR_PULL_GET_MEM_CTX(ndr);
11162 626 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszNodeName, 0);
11163 626 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszNodeName));
11164 626 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszNodeName));
11165 626 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszNodeName, &size_pszNodeName_1));
11166 626 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszNodeName, &length_pszNodeName_1));
11167 626 : if (length_pszNodeName_1 > size_pszNodeName_1) {
11168 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszNodeName_1, length_pszNodeName_1);
11169 : }
11170 626 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNodeName_1, sizeof(uint8_t)));
11171 626 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszNodeName, length_pszNodeName_1, sizeof(uint8_t), CH_UTF8));
11172 626 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszNodeName_0, 0);
11173 : }
11174 626 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszStartChild));
11175 626 : if (_ptr_pszStartChild) {
11176 0 : NDR_PULL_ALLOC(ndr, r->in.pszStartChild);
11177 : } else {
11178 626 : r->in.pszStartChild = NULL;
11179 : }
11180 626 : if (r->in.pszStartChild) {
11181 0 : _mem_save_pszStartChild_0 = NDR_PULL_GET_MEM_CTX(ndr);
11182 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszStartChild, 0);
11183 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszStartChild));
11184 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszStartChild));
11185 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszStartChild, &size_pszStartChild_1));
11186 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszStartChild, &length_pszStartChild_1));
11187 0 : if (length_pszStartChild_1 > size_pszStartChild_1) {
11188 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszStartChild_1, length_pszStartChild_1);
11189 : }
11190 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszStartChild_1, sizeof(uint8_t)));
11191 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszStartChild, length_pszStartChild_1, sizeof(uint8_t), CH_UTF8));
11192 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszStartChild_0, 0);
11193 : }
11194 626 : NDR_CHECK(ndr_pull_dns_record_type(ndr, NDR_SCALARS, &r->in.wRecordType));
11195 626 : NDR_CHECK(ndr_pull_DNS_SELECT_FLAGS(ndr, NDR_SCALARS, &r->in.fSelectFlag));
11196 626 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFilterStart));
11197 626 : if (_ptr_pszFilterStart) {
11198 0 : NDR_PULL_ALLOC(ndr, r->in.pszFilterStart);
11199 : } else {
11200 626 : r->in.pszFilterStart = NULL;
11201 : }
11202 626 : if (r->in.pszFilterStart) {
11203 0 : _mem_save_pszFilterStart_0 = NDR_PULL_GET_MEM_CTX(ndr);
11204 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszFilterStart, 0);
11205 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszFilterStart));
11206 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszFilterStart));
11207 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszFilterStart, &size_pszFilterStart_1));
11208 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszFilterStart, &length_pszFilterStart_1));
11209 0 : if (length_pszFilterStart_1 > size_pszFilterStart_1) {
11210 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszFilterStart_1, length_pszFilterStart_1);
11211 : }
11212 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFilterStart_1, sizeof(uint8_t)));
11213 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszFilterStart, length_pszFilterStart_1, sizeof(uint8_t), CH_UTF8));
11214 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFilterStart_0, 0);
11215 : }
11216 626 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszFilterStop));
11217 626 : if (_ptr_pszFilterStop) {
11218 0 : NDR_PULL_ALLOC(ndr, r->in.pszFilterStop);
11219 : } else {
11220 626 : r->in.pszFilterStop = NULL;
11221 : }
11222 626 : if (r->in.pszFilterStop) {
11223 0 : _mem_save_pszFilterStop_0 = NDR_PULL_GET_MEM_CTX(ndr);
11224 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszFilterStop, 0);
11225 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszFilterStop));
11226 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszFilterStop));
11227 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszFilterStop, &size_pszFilterStop_1));
11228 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszFilterStop, &length_pszFilterStop_1));
11229 0 : if (length_pszFilterStop_1 > size_pszFilterStop_1) {
11230 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszFilterStop_1, length_pszFilterStop_1);
11231 : }
11232 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszFilterStop_1, sizeof(uint8_t)));
11233 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszFilterStop, length_pszFilterStop_1, sizeof(uint8_t), CH_UTF8));
11234 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszFilterStop_0, 0);
11235 : }
11236 626 : NDR_PULL_ALLOC(ndr, r->out.pdwBufferLength);
11237 626 : NDR_ZERO_STRUCTP(r->out.pdwBufferLength);
11238 626 : NDR_PULL_ALLOC(ndr, r->out.pBuffer);
11239 626 : NDR_ZERO_STRUCTP(r->out.pBuffer);
11240 : }
11241 1252 : if (flags & NDR_OUT) {
11242 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11243 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11244 626 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11245 626 : NDR_PULL_ALLOC(ndr, r->out.pdwBufferLength);
11246 : }
11247 626 : _mem_save_pdwBufferLength_0 = NDR_PULL_GET_MEM_CTX(ndr);
11248 626 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwBufferLength, LIBNDR_FLAG_REF_ALLOC);
11249 626 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pdwBufferLength));
11250 626 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwBufferLength_0, LIBNDR_FLAG_REF_ALLOC);
11251 626 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11252 626 : NDR_PULL_ALLOC(ndr, r->out.pBuffer);
11253 : }
11254 626 : _mem_save_pBuffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
11255 626 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pBuffer, LIBNDR_FLAG_REF_ALLOC);
11256 626 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pBuffer));
11257 626 : if (_ptr_pBuffer) {
11258 526 : NDR_PULL_ALLOC(ndr, *r->out.pBuffer);
11259 : } else {
11260 100 : *r->out.pBuffer = NULL;
11261 : }
11262 626 : if (*r->out.pBuffer) {
11263 526 : _mem_save_pBuffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
11264 526 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.pBuffer, 0);
11265 : {
11266 : struct ndr_pull *_ndr_pBuffer;
11267 526 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_pBuffer, 4, *r->out.pdwBufferLength));
11268 526 : NDR_CHECK(ndr_pull_DNS_RPC_RECORDS_ARRAY(_ndr_pBuffer, NDR_SCALARS, *r->out.pBuffer));
11269 526 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_pBuffer, 4, *r->out.pdwBufferLength));
11270 : }
11271 526 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBuffer_1, 0);
11272 : }
11273 626 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBuffer_0, LIBNDR_FLAG_REF_ALLOC);
11274 626 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11275 : }
11276 1252 : return NDR_ERR_SUCCESS;
11277 : }
11278 :
11279 0 : _PUBLIC_ void ndr_print_DnssrvEnumRecords2(struct ndr_print *ndr, const char *name, int flags, const struct DnssrvEnumRecords2 *r)
11280 : {
11281 0 : ndr_print_struct(ndr, name, "DnssrvEnumRecords2");
11282 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11283 0 : ndr->depth++;
11284 0 : if (flags & NDR_SET_VALUES) {
11285 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11286 : }
11287 0 : if (flags & NDR_IN) {
11288 0 : ndr_print_struct(ndr, "in", "DnssrvEnumRecords2");
11289 0 : ndr->depth++;
11290 0 : ndr_print_DNS_RPC_CLIENT_VERSION(ndr, "dwClientVersion", r->in.dwClientVersion);
11291 0 : ndr_print_uint32(ndr, "dwSettingFlags", r->in.dwSettingFlags);
11292 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
11293 0 : ndr->depth++;
11294 0 : if (r->in.pwszServerName) {
11295 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
11296 : }
11297 0 : ndr->depth--;
11298 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
11299 0 : ndr->depth++;
11300 0 : if (r->in.pszZone) {
11301 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
11302 : }
11303 0 : ndr->depth--;
11304 0 : ndr_print_ptr(ndr, "pszNodeName", r->in.pszNodeName);
11305 0 : ndr->depth++;
11306 0 : if (r->in.pszNodeName) {
11307 0 : ndr_print_string(ndr, "pszNodeName", r->in.pszNodeName);
11308 : }
11309 0 : ndr->depth--;
11310 0 : ndr_print_ptr(ndr, "pszStartChild", r->in.pszStartChild);
11311 0 : ndr->depth++;
11312 0 : if (r->in.pszStartChild) {
11313 0 : ndr_print_string(ndr, "pszStartChild", r->in.pszStartChild);
11314 : }
11315 0 : ndr->depth--;
11316 0 : ndr_print_dns_record_type(ndr, "wRecordType", r->in.wRecordType);
11317 0 : ndr_print_DNS_SELECT_FLAGS(ndr, "fSelectFlag", r->in.fSelectFlag);
11318 0 : ndr_print_ptr(ndr, "pszFilterStart", r->in.pszFilterStart);
11319 0 : ndr->depth++;
11320 0 : if (r->in.pszFilterStart) {
11321 0 : ndr_print_string(ndr, "pszFilterStart", r->in.pszFilterStart);
11322 : }
11323 0 : ndr->depth--;
11324 0 : ndr_print_ptr(ndr, "pszFilterStop", r->in.pszFilterStop);
11325 0 : ndr->depth++;
11326 0 : if (r->in.pszFilterStop) {
11327 0 : ndr_print_string(ndr, "pszFilterStop", r->in.pszFilterStop);
11328 : }
11329 0 : ndr->depth--;
11330 0 : ndr->depth--;
11331 : }
11332 0 : if (flags & NDR_OUT) {
11333 0 : ndr_print_struct(ndr, "out", "DnssrvEnumRecords2");
11334 0 : ndr->depth++;
11335 0 : ndr_print_ptr(ndr, "pdwBufferLength", r->out.pdwBufferLength);
11336 0 : ndr->depth++;
11337 0 : ndr_print_uint32(ndr, "pdwBufferLength", *r->out.pdwBufferLength);
11338 0 : ndr->depth--;
11339 0 : ndr_print_ptr(ndr, "pBuffer", r->out.pBuffer);
11340 0 : ndr->depth++;
11341 0 : ndr_print_ptr(ndr, "pBuffer", *r->out.pBuffer);
11342 0 : ndr->depth++;
11343 0 : if (*r->out.pBuffer) {
11344 0 : ndr_print_DNS_RPC_RECORDS_ARRAY(ndr, "pBuffer", *r->out.pBuffer);
11345 : }
11346 0 : ndr->depth--;
11347 0 : ndr->depth--;
11348 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11349 0 : ndr->depth--;
11350 : }
11351 0 : ndr->depth--;
11352 : }
11353 :
11354 4094 : static enum ndr_err_code ndr_push_DnssrvUpdateRecord2(struct ndr_push *ndr, int flags, const struct DnssrvUpdateRecord2 *r)
11355 : {
11356 4094 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11357 4094 : if (flags & NDR_IN) {
11358 2067 : if (r->in.pszNodeName == NULL) {
11359 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11360 : }
11361 2067 : NDR_CHECK(ndr_push_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, r->in.dwClientVersion));
11362 2067 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwSettingFlags));
11363 2067 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pwszServerName));
11364 2067 : if (r->in.pwszServerName) {
11365 2067 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
11366 2067 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11367 2067 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pwszServerName, CH_UTF16)));
11368 2067 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pwszServerName, ndr_charset_length(r->in.pwszServerName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11369 : }
11370 2067 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszZone));
11371 2067 : if (r->in.pszZone) {
11372 2067 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
11373 2067 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11374 2067 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszZone, CH_UTF8)));
11375 2067 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszZone, ndr_charset_length(r->in.pszZone, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11376 : }
11377 2067 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
11378 2067 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11379 2067 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszNodeName, CH_UTF8)));
11380 2067 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszNodeName, ndr_charset_length(r->in.pszNodeName, CH_UTF8), sizeof(uint8_t), CH_UTF8));
11381 2067 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pAddRecord));
11382 2067 : if (r->in.pAddRecord) {
11383 1350 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pAddRecord));
11384 : }
11385 2043 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDeleteRecord));
11386 2043 : if (r->in.pDeleteRecord) {
11387 856 : NDR_CHECK(ndr_push_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pDeleteRecord));
11388 : }
11389 : }
11390 4054 : if (flags & NDR_OUT) {
11391 2027 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
11392 : }
11393 4054 : return NDR_ERR_SUCCESS;
11394 : }
11395 :
11396 4054 : static enum ndr_err_code ndr_pull_DnssrvUpdateRecord2(struct ndr_pull *ndr, int flags, struct DnssrvUpdateRecord2 *r)
11397 : {
11398 : uint32_t _ptr_pwszServerName;
11399 4054 : uint32_t size_pwszServerName_1 = 0;
11400 4054 : uint32_t length_pwszServerName_1 = 0;
11401 : uint32_t _ptr_pszZone;
11402 4054 : uint32_t size_pszZone_1 = 0;
11403 4054 : uint32_t length_pszZone_1 = 0;
11404 4054 : uint32_t size_pszNodeName_1 = 0;
11405 4054 : uint32_t length_pszNodeName_1 = 0;
11406 : uint32_t _ptr_pAddRecord;
11407 : uint32_t _ptr_pDeleteRecord;
11408 4054 : TALLOC_CTX *_mem_save_pwszServerName_0 = NULL;
11409 4054 : TALLOC_CTX *_mem_save_pszZone_0 = NULL;
11410 4054 : TALLOC_CTX *_mem_save_pAddRecord_0 = NULL;
11411 4054 : TALLOC_CTX *_mem_save_pDeleteRecord_0 = NULL;
11412 4054 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11413 4054 : if (flags & NDR_IN) {
11414 2027 : NDR_CHECK(ndr_pull_DNS_RPC_CLIENT_VERSION(ndr, NDR_SCALARS, &r->in.dwClientVersion));
11415 2027 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwSettingFlags));
11416 2027 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwszServerName));
11417 2027 : if (_ptr_pwszServerName) {
11418 2027 : NDR_PULL_ALLOC(ndr, r->in.pwszServerName);
11419 : } else {
11420 0 : r->in.pwszServerName = NULL;
11421 : }
11422 2027 : if (r->in.pwszServerName) {
11423 2027 : _mem_save_pwszServerName_0 = NDR_PULL_GET_MEM_CTX(ndr);
11424 2027 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pwszServerName, 0);
11425 2027 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszServerName));
11426 2027 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszServerName));
11427 2027 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pwszServerName, &size_pwszServerName_1));
11428 2027 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pwszServerName, &length_pwszServerName_1));
11429 2027 : if (length_pwszServerName_1 > size_pwszServerName_1) {
11430 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszServerName_1, length_pwszServerName_1);
11431 : }
11432 2027 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszServerName_1, sizeof(uint16_t)));
11433 2027 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszServerName, length_pwszServerName_1, sizeof(uint16_t), CH_UTF16));
11434 2027 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwszServerName_0, 0);
11435 : }
11436 2027 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszZone));
11437 2027 : if (_ptr_pszZone) {
11438 2027 : NDR_PULL_ALLOC(ndr, r->in.pszZone);
11439 : } else {
11440 0 : r->in.pszZone = NULL;
11441 : }
11442 2027 : if (r->in.pszZone) {
11443 2027 : _mem_save_pszZone_0 = NDR_PULL_GET_MEM_CTX(ndr);
11444 2027 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszZone, 0);
11445 2027 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszZone));
11446 2027 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszZone));
11447 2027 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszZone, &size_pszZone_1));
11448 2027 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszZone, &length_pszZone_1));
11449 2027 : if (length_pszZone_1 > size_pszZone_1) {
11450 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszZone_1, length_pszZone_1);
11451 : }
11452 2027 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszZone_1, sizeof(uint8_t)));
11453 2027 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszZone, length_pszZone_1, sizeof(uint8_t), CH_UTF8));
11454 2027 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszZone_0, 0);
11455 : }
11456 2027 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszNodeName));
11457 2027 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszNodeName));
11458 2027 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszNodeName, &size_pszNodeName_1));
11459 2027 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszNodeName, &length_pszNodeName_1));
11460 2027 : if (length_pszNodeName_1 > size_pszNodeName_1) {
11461 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pszNodeName_1, length_pszNodeName_1);
11462 : }
11463 2027 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszNodeName_1, sizeof(uint8_t)));
11464 2027 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszNodeName, length_pszNodeName_1, sizeof(uint8_t), CH_UTF8));
11465 2027 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pAddRecord));
11466 2027 : if (_ptr_pAddRecord) {
11467 1326 : NDR_PULL_ALLOC(ndr, r->in.pAddRecord);
11468 : } else {
11469 701 : r->in.pAddRecord = NULL;
11470 : }
11471 2027 : if (r->in.pAddRecord) {
11472 1326 : _mem_save_pAddRecord_0 = NDR_PULL_GET_MEM_CTX(ndr);
11473 1326 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pAddRecord, 0);
11474 1326 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pAddRecord));
11475 1326 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pAddRecord_0, 0);
11476 : }
11477 2027 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDeleteRecord));
11478 2027 : if (_ptr_pDeleteRecord) {
11479 840 : NDR_PULL_ALLOC(ndr, r->in.pDeleteRecord);
11480 : } else {
11481 1187 : r->in.pDeleteRecord = NULL;
11482 : }
11483 2027 : if (r->in.pDeleteRecord) {
11484 840 : _mem_save_pDeleteRecord_0 = NDR_PULL_GET_MEM_CTX(ndr);
11485 840 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDeleteRecord, 0);
11486 840 : NDR_CHECK(ndr_pull_DNS_RPC_RECORD_BUF(ndr, NDR_SCALARS, r->in.pDeleteRecord));
11487 840 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDeleteRecord_0, 0);
11488 : }
11489 : }
11490 4054 : if (flags & NDR_OUT) {
11491 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11492 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11493 2027 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11494 : }
11495 4054 : return NDR_ERR_SUCCESS;
11496 : }
11497 :
11498 0 : _PUBLIC_ void ndr_print_DnssrvUpdateRecord2(struct ndr_print *ndr, const char *name, int flags, const struct DnssrvUpdateRecord2 *r)
11499 : {
11500 0 : ndr_print_struct(ndr, name, "DnssrvUpdateRecord2");
11501 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11502 0 : ndr->depth++;
11503 0 : if (flags & NDR_SET_VALUES) {
11504 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11505 : }
11506 0 : if (flags & NDR_IN) {
11507 0 : ndr_print_struct(ndr, "in", "DnssrvUpdateRecord2");
11508 0 : ndr->depth++;
11509 0 : ndr_print_DNS_RPC_CLIENT_VERSION(ndr, "dwClientVersion", r->in.dwClientVersion);
11510 0 : ndr_print_uint32(ndr, "dwSettingFlags", r->in.dwSettingFlags);
11511 0 : ndr_print_ptr(ndr, "pwszServerName", r->in.pwszServerName);
11512 0 : ndr->depth++;
11513 0 : if (r->in.pwszServerName) {
11514 0 : ndr_print_string(ndr, "pwszServerName", r->in.pwszServerName);
11515 : }
11516 0 : ndr->depth--;
11517 0 : ndr_print_ptr(ndr, "pszZone", r->in.pszZone);
11518 0 : ndr->depth++;
11519 0 : if (r->in.pszZone) {
11520 0 : ndr_print_string(ndr, "pszZone", r->in.pszZone);
11521 : }
11522 0 : ndr->depth--;
11523 0 : ndr_print_ptr(ndr, "pszNodeName", r->in.pszNodeName);
11524 0 : ndr->depth++;
11525 0 : ndr_print_string(ndr, "pszNodeName", r->in.pszNodeName);
11526 0 : ndr->depth--;
11527 0 : ndr_print_ptr(ndr, "pAddRecord", r->in.pAddRecord);
11528 0 : ndr->depth++;
11529 0 : if (r->in.pAddRecord) {
11530 0 : ndr_print_DNS_RPC_RECORD_BUF(ndr, "pAddRecord", r->in.pAddRecord);
11531 : }
11532 0 : ndr->depth--;
11533 0 : ndr_print_ptr(ndr, "pDeleteRecord", r->in.pDeleteRecord);
11534 0 : ndr->depth++;
11535 0 : if (r->in.pDeleteRecord) {
11536 0 : ndr_print_DNS_RPC_RECORD_BUF(ndr, "pDeleteRecord", r->in.pDeleteRecord);
11537 : }
11538 0 : ndr->depth--;
11539 0 : ndr->depth--;
11540 : }
11541 0 : if (flags & NDR_OUT) {
11542 0 : ndr_print_struct(ndr, "out", "DnssrvUpdateRecord2");
11543 0 : ndr->depth++;
11544 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11545 0 : ndr->depth--;
11546 : }
11547 0 : ndr->depth--;
11548 : }
11549 :
11550 : #ifndef SKIP_NDR_TABLE_dnsserver
11551 : static const struct ndr_interface_public_struct dnsserver_public_structs[] = {
11552 : {
11553 : .name = "DNS_RPC_NAME",
11554 : .struct_size = sizeof(struct DNS_RPC_NAME ),
11555 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_NAME,
11556 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_NAME,
11557 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_NAME,
11558 : },
11559 : {
11560 : .name = "DNS_RPC_RECORD",
11561 : .struct_size = sizeof(struct DNS_RPC_RECORD ),
11562 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_RECORD,
11563 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_RECORD,
11564 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_RECORD,
11565 : },
11566 : {
11567 : .name = "DNS_RPC_SERVER_INFO_DOTNET",
11568 : .struct_size = sizeof(struct DNS_RPC_SERVER_INFO_DOTNET ),
11569 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_SERVER_INFO_DOTNET,
11570 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_SERVER_INFO_DOTNET,
11571 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_SERVER_INFO_DOTNET,
11572 : },
11573 : {
11574 : .name = "DNS_RPC_SERVER_INFO_LONGHORN",
11575 : .struct_size = sizeof(struct DNS_RPC_SERVER_INFO_LONGHORN ),
11576 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_SERVER_INFO_LONGHORN,
11577 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_SERVER_INFO_LONGHORN,
11578 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_SERVER_INFO_LONGHORN,
11579 : },
11580 : {
11581 : .name = "DNS_RPC_RECORDS",
11582 : .struct_size = sizeof(struct DNS_RPC_RECORDS ),
11583 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_RECORDS,
11584 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_RECORDS,
11585 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_RECORDS,
11586 : },
11587 : {
11588 : .name = "DNS_RPC_RECORDS_ARRAY",
11589 : .struct_size = sizeof(struct DNS_RPC_RECORDS_ARRAY ),
11590 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DNS_RPC_RECORDS_ARRAY,
11591 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DNS_RPC_RECORDS_ARRAY,
11592 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DNS_RPC_RECORDS_ARRAY,
11593 : },
11594 : { .name = NULL }
11595 : };
11596 :
11597 : static const struct ndr_interface_call dnsserver_calls[] = {
11598 : {
11599 : "DnssrvOperation",
11600 : sizeof(struct DnssrvOperation),
11601 : (ndr_push_flags_fn_t) ndr_push_DnssrvOperation,
11602 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvOperation,
11603 : (ndr_print_function_t) ndr_print_DnssrvOperation,
11604 : { 0, NULL },
11605 : { 0, NULL },
11606 : },
11607 : {
11608 : "DnssrvQuery",
11609 : sizeof(struct DnssrvQuery),
11610 : (ndr_push_flags_fn_t) ndr_push_DnssrvQuery,
11611 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvQuery,
11612 : (ndr_print_function_t) ndr_print_DnssrvQuery,
11613 : { 0, NULL },
11614 : { 0, NULL },
11615 : },
11616 : {
11617 : "DnssrvComplexOperation",
11618 : sizeof(struct DnssrvComplexOperation),
11619 : (ndr_push_flags_fn_t) ndr_push_DnssrvComplexOperation,
11620 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvComplexOperation,
11621 : (ndr_print_function_t) ndr_print_DnssrvComplexOperation,
11622 : { 0, NULL },
11623 : { 0, NULL },
11624 : },
11625 : {
11626 : "DnssrvEnumRecords",
11627 : sizeof(struct DnssrvEnumRecords),
11628 : (ndr_push_flags_fn_t) ndr_push_DnssrvEnumRecords,
11629 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvEnumRecords,
11630 : (ndr_print_function_t) ndr_print_DnssrvEnumRecords,
11631 : { 0, NULL },
11632 : { 0, NULL },
11633 : },
11634 : {
11635 : "DnssrvUpdateRecord",
11636 : sizeof(struct DnssrvUpdateRecord),
11637 : (ndr_push_flags_fn_t) ndr_push_DnssrvUpdateRecord,
11638 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvUpdateRecord,
11639 : (ndr_print_function_t) ndr_print_DnssrvUpdateRecord,
11640 : { 0, NULL },
11641 : { 0, NULL },
11642 : },
11643 : {
11644 : "DnssrvOperation2",
11645 : sizeof(struct DnssrvOperation2),
11646 : (ndr_push_flags_fn_t) ndr_push_DnssrvOperation2,
11647 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvOperation2,
11648 : (ndr_print_function_t) ndr_print_DnssrvOperation2,
11649 : { 0, NULL },
11650 : { 0, NULL },
11651 : },
11652 : {
11653 : "DnssrvQuery2",
11654 : sizeof(struct DnssrvQuery2),
11655 : (ndr_push_flags_fn_t) ndr_push_DnssrvQuery2,
11656 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvQuery2,
11657 : (ndr_print_function_t) ndr_print_DnssrvQuery2,
11658 : { 0, NULL },
11659 : { 0, NULL },
11660 : },
11661 : {
11662 : "DnssrvComplexOperation2",
11663 : sizeof(struct DnssrvComplexOperation2),
11664 : (ndr_push_flags_fn_t) ndr_push_DnssrvComplexOperation2,
11665 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvComplexOperation2,
11666 : (ndr_print_function_t) ndr_print_DnssrvComplexOperation2,
11667 : { 0, NULL },
11668 : { 0, NULL },
11669 : },
11670 : {
11671 : "DnssrvEnumRecords2",
11672 : sizeof(struct DnssrvEnumRecords2),
11673 : (ndr_push_flags_fn_t) ndr_push_DnssrvEnumRecords2,
11674 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvEnumRecords2,
11675 : (ndr_print_function_t) ndr_print_DnssrvEnumRecords2,
11676 : { 0, NULL },
11677 : { 0, NULL },
11678 : },
11679 : {
11680 : "DnssrvUpdateRecord2",
11681 : sizeof(struct DnssrvUpdateRecord2),
11682 : (ndr_push_flags_fn_t) ndr_push_DnssrvUpdateRecord2,
11683 : (ndr_pull_flags_fn_t) ndr_pull_DnssrvUpdateRecord2,
11684 : (ndr_print_function_t) ndr_print_DnssrvUpdateRecord2,
11685 : { 0, NULL },
11686 : { 0, NULL },
11687 : },
11688 : { .name = NULL }
11689 : };
11690 :
11691 : static const char * const dnsserver_endpoint_strings[] = {
11692 : "ncacn_ip_tcp:",
11693 : "ncacn_np:[\\pipe\\dnsserver]",
11694 : };
11695 :
11696 : static const struct ndr_interface_string_array dnsserver_endpoints = {
11697 : .count = 2,
11698 : .names = dnsserver_endpoint_strings
11699 : };
11700 :
11701 : static const char * const dnsserver_authservice_strings[] = {
11702 : "host",
11703 : };
11704 :
11705 : static const struct ndr_interface_string_array dnsserver_authservices = {
11706 : .count = 1,
11707 : .names = dnsserver_authservice_strings
11708 : };
11709 :
11710 :
11711 : const struct ndr_interface_table ndr_table_dnsserver = {
11712 : .name = "dnsserver",
11713 : .syntax_id = {
11714 : {0x50abc2a4,0x574d,0x40b3,{0x9d,0x66},{0xee,0x4f,0xd5,0xfb,0xa0,0x76}},
11715 : NDR_DNSSERVER_VERSION
11716 : },
11717 : .helpstring = NDR_DNSSERVER_HELPSTRING,
11718 : .num_calls = 10,
11719 : .calls = dnsserver_calls,
11720 : .num_public_structs = 6,
11721 : .public_structs = dnsserver_public_structs,
11722 : .endpoints = &dnsserver_endpoints,
11723 : .authservices = &dnsserver_authservices
11724 : };
11725 :
11726 : #endif /* SKIP_NDR_TABLE_dnsserver */
|