Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/source4/librpc/gen_ndr/ndr_winsrepl.h"
5 :
6 : #include "librpc/gen_ndr/ndr_nbt.h"
7 1682 : static enum ndr_err_code ndr_push_wrepl_ip(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_ip *r)
8 : {
9 : {
10 1682 : libndr_flags _flags_save_STRUCT = ndr->flags;
11 1682 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
12 1682 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13 1682 : if (ndr_flags & NDR_SCALARS) {
14 1682 : NDR_CHECK(ndr_push_align(ndr, 4));
15 1682 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->owner));
16 1682 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ip));
17 1682 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
18 : }
19 1682 : if (ndr_flags & NDR_BUFFERS) {
20 0 : }
21 1682 : ndr->flags = _flags_save_STRUCT;
22 : }
23 1682 : return NDR_ERR_SUCCESS;
24 : }
25 :
26 841 : static enum ndr_err_code ndr_pull_wrepl_ip(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_ip *r)
27 : {
28 : {
29 841 : libndr_flags _flags_save_STRUCT = ndr->flags;
30 841 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
31 841 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
32 841 : if (ndr_flags & NDR_SCALARS) {
33 841 : NDR_CHECK(ndr_pull_align(ndr, 4));
34 841 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->owner));
35 841 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ip));
36 841 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
37 : }
38 841 : if (ndr_flags & NDR_BUFFERS) {
39 0 : }
40 841 : ndr->flags = _flags_save_STRUCT;
41 : }
42 841 : return NDR_ERR_SUCCESS;
43 : }
44 :
45 0 : _PUBLIC_ void ndr_print_wrepl_ip(struct ndr_print *ndr, const char *name, const struct wrepl_ip *r)
46 : {
47 0 : ndr_print_struct(ndr, name, "wrepl_ip");
48 0 : if (r == NULL) { ndr_print_null(ndr); return; }
49 : {
50 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
51 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
52 0 : ndr->depth++;
53 0 : ndr_print_ipv4address(ndr, "owner", r->owner);
54 0 : ndr_print_ipv4address(ndr, "ip", r->ip);
55 0 : ndr->depth--;
56 0 : ndr->flags = _flags_save_STRUCT;
57 : }
58 : }
59 :
60 1154 : static enum ndr_err_code ndr_push_wrepl_address_list(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_address_list *r)
61 : {
62 0 : uint32_t cntr_ips_0;
63 : {
64 1154 : libndr_flags _flags_save_STRUCT = ndr->flags;
65 1154 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
66 1154 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
67 1154 : if (ndr_flags & NDR_SCALARS) {
68 1154 : NDR_CHECK(ndr_push_align(ndr, 4));
69 1154 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ips));
70 2836 : for (cntr_ips_0 = 0; cntr_ips_0 < (r->num_ips); cntr_ips_0++) {
71 1682 : NDR_CHECK(ndr_push_wrepl_ip(ndr, NDR_SCALARS, &r->ips[cntr_ips_0]));
72 : }
73 1154 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
74 : }
75 1154 : if (ndr_flags & NDR_BUFFERS) {
76 0 : }
77 1154 : ndr->flags = _flags_save_STRUCT;
78 : }
79 1154 : return NDR_ERR_SUCCESS;
80 : }
81 :
82 577 : static enum ndr_err_code ndr_pull_wrepl_address_list(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_address_list *r)
83 : {
84 577 : uint32_t size_ips_0 = 0;
85 0 : uint32_t cntr_ips_0;
86 577 : TALLOC_CTX *_mem_save_ips_0 = NULL;
87 : {
88 577 : libndr_flags _flags_save_STRUCT = ndr->flags;
89 577 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
90 577 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
91 577 : if (ndr_flags & NDR_SCALARS) {
92 577 : NDR_CHECK(ndr_pull_align(ndr, 4));
93 577 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ips));
94 577 : size_ips_0 = r->num_ips;
95 577 : NDR_PULL_ALLOC_N(ndr, r->ips, size_ips_0);
96 577 : _mem_save_ips_0 = NDR_PULL_GET_MEM_CTX(ndr);
97 577 : NDR_PULL_SET_MEM_CTX(ndr, r->ips, 0);
98 1418 : for (cntr_ips_0 = 0; cntr_ips_0 < (size_ips_0); cntr_ips_0++) {
99 841 : NDR_CHECK(ndr_pull_wrepl_ip(ndr, NDR_SCALARS, &r->ips[cntr_ips_0]));
100 : }
101 577 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ips_0, 0);
102 577 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
103 : }
104 577 : if (ndr_flags & NDR_BUFFERS) {
105 0 : }
106 577 : ndr->flags = _flags_save_STRUCT;
107 : }
108 577 : return NDR_ERR_SUCCESS;
109 : }
110 :
111 0 : _PUBLIC_ void ndr_print_wrepl_address_list(struct ndr_print *ndr, const char *name, const struct wrepl_address_list *r)
112 : {
113 0 : uint32_t cntr_ips_0;
114 0 : ndr_print_struct(ndr, name, "wrepl_address_list");
115 0 : if (r == NULL) { ndr_print_null(ndr); return; }
116 : {
117 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
118 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
119 0 : ndr->depth++;
120 0 : ndr_print_uint32(ndr, "num_ips", r->num_ips);
121 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "ips", (uint32_t)(r->num_ips));
122 0 : ndr->depth++;
123 0 : for (cntr_ips_0 = 0; cntr_ips_0 < (r->num_ips); cntr_ips_0++) {
124 0 : ndr_print_wrepl_ip(ndr, "ips", &r->ips[cntr_ips_0]);
125 : }
126 0 : ndr->depth--;
127 0 : ndr->depth--;
128 0 : ndr->flags = _flags_save_STRUCT;
129 : }
130 : }
131 :
132 2404 : static enum ndr_err_code ndr_push_wrepl_addresses(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union wrepl_addresses *r)
133 : {
134 0 : uint32_t level;
135 2404 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
136 2404 : if (ndr_flags & NDR_SCALARS) {
137 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
138 2404 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
139 2404 : NDR_CHECK(ndr_push_union_align(ndr, 4));
140 2404 : switch (level) {
141 1250 : case 0: {
142 1250 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ip));
143 1250 : break; }
144 :
145 1154 : case 2: {
146 1154 : NDR_CHECK(ndr_push_wrepl_address_list(ndr, NDR_SCALARS, &r->addresses));
147 1154 : break; }
148 :
149 0 : default:
150 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
151 : }
152 : }
153 2404 : if (ndr_flags & NDR_BUFFERS) {
154 0 : if (!(ndr_flags & NDR_SCALARS)) {
155 : /* We didn't get it above, and the token is not needed after this. */
156 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
157 : }
158 0 : switch (level) {
159 0 : case 0:
160 0 : break;
161 :
162 0 : case 2:
163 0 : break;
164 :
165 0 : default:
166 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
167 : }
168 : }
169 2404 : return NDR_ERR_SUCCESS;
170 : }
171 :
172 1202 : static enum ndr_err_code ndr_pull_wrepl_addresses(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union wrepl_addresses *r)
173 : {
174 0 : uint32_t level;
175 1202 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
176 1202 : if (ndr_flags & NDR_SCALARS) {
177 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
178 1202 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
179 1202 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
180 1202 : switch (level) {
181 625 : case 0: {
182 625 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ip));
183 625 : break; }
184 :
185 577 : case 2: {
186 577 : NDR_CHECK(ndr_pull_wrepl_address_list(ndr, NDR_SCALARS, &r->addresses));
187 577 : break; }
188 :
189 0 : default:
190 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
191 : }
192 : }
193 1202 : if (ndr_flags & NDR_BUFFERS) {
194 0 : if (!(ndr_flags & NDR_SCALARS)) {
195 : /* We didn't get it above, and the token is not needed after this. */
196 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
197 : }
198 0 : switch (level) {
199 0 : case 0:
200 0 : break;
201 :
202 0 : case 2:
203 0 : break;
204 :
205 0 : default:
206 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
207 : }
208 : }
209 1202 : return NDR_ERR_SUCCESS;
210 : }
211 :
212 0 : _PUBLIC_ void ndr_print_wrepl_addresses(struct ndr_print *ndr, const char *name, const union wrepl_addresses *r)
213 : {
214 0 : uint32_t level;
215 0 : level = ndr_print_steal_switch_value(ndr, r);
216 0 : ndr_print_union(ndr, name, level, "wrepl_addresses");
217 0 : switch (level) {
218 0 : case 0:
219 0 : ndr_print_ipv4address(ndr, "ip", r->ip);
220 0 : break;
221 :
222 0 : case 2:
223 0 : ndr_print_wrepl_address_list(ndr, "addresses", &r->addresses);
224 0 : break;
225 :
226 0 : default:
227 0 : ndr_print_bad_level(ndr, name, level);
228 : }
229 0 : }
230 :
231 2404 : static enum ndr_err_code ndr_push_wrepl_flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
232 : {
233 2404 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
234 2404 : return NDR_ERR_SUCCESS;
235 : }
236 :
237 1202 : static enum ndr_err_code ndr_pull_wrepl_flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
238 : {
239 0 : uint32_t v;
240 1202 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
241 1202 : *r = v;
242 1202 : return NDR_ERR_SUCCESS;
243 : }
244 :
245 0 : _PUBLIC_ void ndr_print_wrepl_flags(struct ndr_print *ndr, const char *name, uint32_t r)
246 : {
247 0 : ndr_print_uint32(ndr, name, r);
248 0 : ndr->depth++;
249 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WREPL_FLAGS_RECORD_TYPE", WREPL_FLAGS_RECORD_TYPE, r);
250 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WREPL_FLAGS_RECORD_STATE", WREPL_FLAGS_RECORD_STATE, r);
251 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WREPL_FLAGS_REGISTERED_LOCAL", WREPL_FLAGS_REGISTERED_LOCAL, r);
252 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WREPL_FLAGS_NODE_TYPE", WREPL_FLAGS_NODE_TYPE, r);
253 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WREPL_FLAGS_IS_STATIC", WREPL_FLAGS_IS_STATIC, r);
254 0 : ndr->depth--;
255 0 : }
256 :
257 2404 : static enum ndr_err_code ndr_push_wrepl_group_flag(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum wrepl_group_flag r)
258 : {
259 2404 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
260 2404 : return NDR_ERR_SUCCESS;
261 : }
262 :
263 1202 : static enum ndr_err_code ndr_pull_wrepl_group_flag(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum wrepl_group_flag *r)
264 : {
265 0 : uint32_t v;
266 1202 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
267 1202 : *r = v;
268 1202 : return NDR_ERR_SUCCESS;
269 : }
270 :
271 0 : _PUBLIC_ void ndr_print_wrepl_group_flag(struct ndr_print *ndr, const char *name, enum wrepl_group_flag r)
272 : {
273 0 : const char *val = NULL;
274 :
275 0 : switch (r) {
276 0 : case WREPL_GROUP_FLAG_NO_GROUP: val = "WREPL_GROUP_FLAG_NO_GROUP"; break;
277 0 : case WREPL_GROUP_FLAG_IS_GROUP: val = "WREPL_GROUP_FLAG_IS_GROUP"; break;
278 : }
279 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
280 0 : }
281 :
282 2404 : static enum ndr_err_code ndr_push_wrepl_wins_name(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_wins_name *r)
283 : {
284 2404 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
285 2404 : if (ndr_flags & NDR_SCALARS) {
286 2404 : NDR_CHECK(ndr_push_align(ndr, 4));
287 2404 : NDR_CHECK(ndr_push_wrepl_nbt_name(ndr, NDR_SCALARS, r->name));
288 2404 : NDR_CHECK(ndr_push_wrepl_flags(ndr, NDR_SCALARS, r->flags));
289 : {
290 2404 : libndr_flags _flags_save_wrepl_group_flag = ndr->flags;
291 2404 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
292 2404 : NDR_CHECK(ndr_push_wrepl_group_flag(ndr, NDR_SCALARS, (((((r->flags) & WREPL_FLAGS_RECORD_TYPE) == WREPL_TYPE_GROUP) || (((r->flags) & WREPL_FLAGS_RECORD_TYPE) == WREPL_TYPE_SGROUP))?WREPL_GROUP_FLAG_IS_GROUP:WREPL_GROUP_FLAG_NO_GROUP)));
293 2404 : ndr->flags = _flags_save_wrepl_group_flag;
294 : }
295 2404 : NDR_CHECK(ndr_push_udlongr(ndr, NDR_SCALARS, r->id));
296 2404 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->addresses, r->flags & 2));
297 2404 : NDR_CHECK(ndr_push_wrepl_addresses(ndr, NDR_SCALARS, &r->addresses));
298 2404 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->unknown));
299 2404 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
300 : }
301 2404 : if (ndr_flags & NDR_BUFFERS) {
302 0 : }
303 2404 : return NDR_ERR_SUCCESS;
304 : }
305 :
306 1202 : static enum ndr_err_code ndr_pull_wrepl_wins_name(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_wins_name *r)
307 : {
308 1202 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
309 1202 : if (ndr_flags & NDR_SCALARS) {
310 1202 : NDR_CHECK(ndr_pull_align(ndr, 4));
311 1202 : NDR_CHECK(ndr_pull_wrepl_nbt_name(ndr, NDR_SCALARS, &r->name));
312 1202 : NDR_CHECK(ndr_pull_wrepl_flags(ndr, NDR_SCALARS, &r->flags));
313 : {
314 1202 : libndr_flags _flags_save_wrepl_group_flag = ndr->flags;
315 1202 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
316 1202 : NDR_CHECK(ndr_pull_wrepl_group_flag(ndr, NDR_SCALARS, &r->is_group));
317 1202 : ndr->flags = _flags_save_wrepl_group_flag;
318 : }
319 1202 : NDR_CHECK(ndr_pull_udlongr(ndr, NDR_SCALARS, &r->id));
320 1202 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->addresses, r->flags & 2));
321 1202 : NDR_CHECK(ndr_pull_wrepl_addresses(ndr, NDR_SCALARS, &r->addresses));
322 1202 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->unknown));
323 1202 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
324 : }
325 1202 : if (ndr_flags & NDR_BUFFERS) {
326 0 : }
327 1202 : return NDR_ERR_SUCCESS;
328 : }
329 :
330 0 : _PUBLIC_ void ndr_print_wrepl_wins_name(struct ndr_print *ndr, const char *name, const struct wrepl_wins_name *r)
331 : {
332 0 : ndr_print_struct(ndr, name, "wrepl_wins_name");
333 0 : if (r == NULL) { ndr_print_null(ndr); return; }
334 0 : ndr->depth++;
335 0 : ndr_print_wrepl_nbt_name(ndr, "name", r->name);
336 0 : ndr_print_wrepl_flags(ndr, "flags", r->flags);
337 : {
338 0 : libndr_flags _flags_save_wrepl_group_flag = ndr->flags;
339 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
340 0 : ndr_print_wrepl_group_flag(ndr, "is_group", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(((((r->flags) & WREPL_FLAGS_RECORD_TYPE) == WREPL_TYPE_GROUP) || (((r->flags) & WREPL_FLAGS_RECORD_TYPE) == WREPL_TYPE_SGROUP))?WREPL_GROUP_FLAG_IS_GROUP:WREPL_GROUP_FLAG_NO_GROUP):r->is_group);
341 0 : ndr->flags = _flags_save_wrepl_group_flag;
342 : }
343 0 : ndr_print_udlongr(ndr, "id", r->id);
344 0 : ndr_print_set_switch_value(ndr, &r->addresses, r->flags & 2);
345 0 : ndr_print_wrepl_addresses(ndr, "addresses", &r->addresses);
346 0 : ndr_print_ipv4address(ndr, "unknown", r->unknown);
347 0 : ndr->depth--;
348 : }
349 :
350 2910 : static enum ndr_err_code ndr_push_wrepl_send_reply(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_send_reply *r)
351 : {
352 0 : uint32_t cntr_names_0;
353 2910 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
354 2910 : if (ndr_flags & NDR_SCALARS) {
355 2910 : NDR_CHECK(ndr_push_align(ndr, 4));
356 2910 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_names));
357 5314 : for (cntr_names_0 = 0; cntr_names_0 < (r->num_names); cntr_names_0++) {
358 2404 : NDR_CHECK(ndr_push_wrepl_wins_name(ndr, NDR_SCALARS, &r->names[cntr_names_0]));
359 : }
360 2910 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
361 : }
362 2910 : if (ndr_flags & NDR_BUFFERS) {
363 0 : }
364 2910 : return NDR_ERR_SUCCESS;
365 : }
366 :
367 1455 : static enum ndr_err_code ndr_pull_wrepl_send_reply(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_send_reply *r)
368 : {
369 1455 : uint32_t size_names_0 = 0;
370 0 : uint32_t cntr_names_0;
371 1455 : TALLOC_CTX *_mem_save_names_0 = NULL;
372 1455 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
373 1455 : if (ndr_flags & NDR_SCALARS) {
374 1455 : NDR_CHECK(ndr_pull_align(ndr, 4));
375 1455 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_names));
376 1455 : size_names_0 = r->num_names;
377 1455 : NDR_PULL_ALLOC_N(ndr, r->names, size_names_0);
378 1455 : _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
379 1455 : NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
380 2657 : for (cntr_names_0 = 0; cntr_names_0 < (size_names_0); cntr_names_0++) {
381 1202 : NDR_CHECK(ndr_pull_wrepl_wins_name(ndr, NDR_SCALARS, &r->names[cntr_names_0]));
382 : }
383 1455 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
384 1455 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
385 : }
386 1455 : if (ndr_flags & NDR_BUFFERS) {
387 0 : }
388 1455 : return NDR_ERR_SUCCESS;
389 : }
390 :
391 0 : _PUBLIC_ void ndr_print_wrepl_send_reply(struct ndr_print *ndr, const char *name, const struct wrepl_send_reply *r)
392 : {
393 0 : uint32_t cntr_names_0;
394 0 : ndr_print_struct(ndr, name, "wrepl_send_reply");
395 0 : if (r == NULL) { ndr_print_null(ndr); return; }
396 0 : ndr->depth++;
397 0 : ndr_print_uint32(ndr, "num_names", r->num_names);
398 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "names", (uint32_t)(r->num_names));
399 0 : ndr->depth++;
400 0 : for (cntr_names_0 = 0; cntr_names_0 < (r->num_names); cntr_names_0++) {
401 0 : ndr_print_wrepl_wins_name(ndr, "names", &r->names[cntr_names_0]);
402 : }
403 0 : ndr->depth--;
404 0 : ndr->depth--;
405 : }
406 :
407 4272 : static enum ndr_err_code ndr_push_wrepl_wins_owner(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_wins_owner *r)
408 : {
409 4272 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
410 4272 : if (ndr_flags & NDR_SCALARS) {
411 4272 : NDR_CHECK(ndr_push_align(ndr, 4));
412 4272 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->address));
413 4272 : NDR_CHECK(ndr_push_udlongr(ndr, NDR_SCALARS, r->max_version));
414 4272 : NDR_CHECK(ndr_push_udlongr(ndr, NDR_SCALARS, r->min_version));
415 4272 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
416 4272 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
417 : }
418 4272 : if (ndr_flags & NDR_BUFFERS) {
419 0 : }
420 4272 : return NDR_ERR_SUCCESS;
421 : }
422 :
423 2136 : static enum ndr_err_code ndr_pull_wrepl_wins_owner(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_wins_owner *r)
424 : {
425 2136 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
426 2136 : if (ndr_flags & NDR_SCALARS) {
427 2136 : NDR_CHECK(ndr_pull_align(ndr, 4));
428 2136 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->address));
429 2136 : NDR_CHECK(ndr_pull_udlongr(ndr, NDR_SCALARS, &r->max_version));
430 2136 : NDR_CHECK(ndr_pull_udlongr(ndr, NDR_SCALARS, &r->min_version));
431 2136 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
432 2136 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
433 : }
434 2136 : if (ndr_flags & NDR_BUFFERS) {
435 0 : }
436 2136 : return NDR_ERR_SUCCESS;
437 : }
438 :
439 0 : _PUBLIC_ void ndr_print_wrepl_wins_owner(struct ndr_print *ndr, const char *name, const struct wrepl_wins_owner *r)
440 : {
441 0 : ndr_print_struct(ndr, name, "wrepl_wins_owner");
442 0 : if (r == NULL) { ndr_print_null(ndr); return; }
443 0 : ndr->depth++;
444 0 : ndr_print_ipv4address(ndr, "address", r->address);
445 0 : ndr_print_udlongr(ndr, "max_version", r->max_version);
446 0 : ndr_print_udlongr(ndr, "min_version", r->min_version);
447 0 : ndr_print_uint32(ndr, "type", r->type);
448 0 : ndr->depth--;
449 : }
450 :
451 1356 : static enum ndr_err_code ndr_push_wrepl_table(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_table *r)
452 : {
453 0 : uint32_t cntr_partners_0;
454 1356 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
455 1356 : if (ndr_flags & NDR_SCALARS) {
456 1356 : NDR_CHECK(ndr_push_align(ndr, 4));
457 1356 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->partner_count));
458 2718 : for (cntr_partners_0 = 0; cntr_partners_0 < (r->partner_count); cntr_partners_0++) {
459 1362 : NDR_CHECK(ndr_push_wrepl_wins_owner(ndr, NDR_SCALARS, &r->partners[cntr_partners_0]));
460 : }
461 1356 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->initiator));
462 1356 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
463 : }
464 1356 : if (ndr_flags & NDR_BUFFERS) {
465 0 : }
466 1356 : return NDR_ERR_SUCCESS;
467 : }
468 :
469 678 : static enum ndr_err_code ndr_pull_wrepl_table(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_table *r)
470 : {
471 678 : uint32_t size_partners_0 = 0;
472 0 : uint32_t cntr_partners_0;
473 678 : TALLOC_CTX *_mem_save_partners_0 = NULL;
474 678 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
475 678 : if (ndr_flags & NDR_SCALARS) {
476 678 : NDR_CHECK(ndr_pull_align(ndr, 4));
477 678 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->partner_count));
478 678 : size_partners_0 = r->partner_count;
479 678 : NDR_PULL_ALLOC_N(ndr, r->partners, size_partners_0);
480 678 : _mem_save_partners_0 = NDR_PULL_GET_MEM_CTX(ndr);
481 678 : NDR_PULL_SET_MEM_CTX(ndr, r->partners, 0);
482 1359 : for (cntr_partners_0 = 0; cntr_partners_0 < (size_partners_0); cntr_partners_0++) {
483 681 : NDR_CHECK(ndr_pull_wrepl_wins_owner(ndr, NDR_SCALARS, &r->partners[cntr_partners_0]));
484 : }
485 678 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partners_0, 0);
486 678 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->initiator));
487 678 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
488 : }
489 678 : if (ndr_flags & NDR_BUFFERS) {
490 0 : }
491 678 : return NDR_ERR_SUCCESS;
492 : }
493 :
494 0 : _PUBLIC_ void ndr_print_wrepl_table(struct ndr_print *ndr, const char *name, const struct wrepl_table *r)
495 : {
496 0 : uint32_t cntr_partners_0;
497 0 : ndr_print_struct(ndr, name, "wrepl_table");
498 0 : if (r == NULL) { ndr_print_null(ndr); return; }
499 0 : ndr->depth++;
500 0 : ndr_print_uint32(ndr, "partner_count", r->partner_count);
501 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "partners", (uint32_t)(r->partner_count));
502 0 : ndr->depth++;
503 0 : for (cntr_partners_0 = 0; cntr_partners_0 < (r->partner_count); cntr_partners_0++) {
504 0 : ndr_print_wrepl_wins_owner(ndr, "partners", &r->partners[cntr_partners_0]);
505 : }
506 0 : ndr->depth--;
507 0 : ndr_print_ipv4address(ndr, "initiator", r->initiator);
508 0 : ndr->depth--;
509 : }
510 :
511 7182 : static enum ndr_err_code ndr_push_wrepl_replication_cmd(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum wrepl_replication_cmd r)
512 : {
513 7182 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
514 7182 : return NDR_ERR_SUCCESS;
515 : }
516 :
517 3591 : static enum ndr_err_code ndr_pull_wrepl_replication_cmd(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum wrepl_replication_cmd *r)
518 : {
519 0 : uint32_t v;
520 3591 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
521 3591 : *r = v;
522 3591 : return NDR_ERR_SUCCESS;
523 : }
524 :
525 0 : _PUBLIC_ void ndr_print_wrepl_replication_cmd(struct ndr_print *ndr, const char *name, enum wrepl_replication_cmd r)
526 : {
527 0 : const char *val = NULL;
528 :
529 0 : switch (r) {
530 0 : case WREPL_REPL_TABLE_QUERY: val = "WREPL_REPL_TABLE_QUERY"; break;
531 0 : case WREPL_REPL_TABLE_REPLY: val = "WREPL_REPL_TABLE_REPLY"; break;
532 0 : case WREPL_REPL_SEND_REQUEST: val = "WREPL_REPL_SEND_REQUEST"; break;
533 0 : case WREPL_REPL_SEND_REPLY: val = "WREPL_REPL_SEND_REPLY"; break;
534 0 : case WREPL_REPL_UPDATE: val = "WREPL_REPL_UPDATE"; break;
535 0 : case WREPL_REPL_UPDATE2: val = "WREPL_REPL_UPDATE2"; break;
536 0 : case WREPL_REPL_INFORM: val = "WREPL_REPL_INFORM"; break;
537 0 : case WREPL_REPL_INFORM2: val = "WREPL_REPL_INFORM2"; break;
538 : }
539 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
540 0 : }
541 :
542 14364 : static enum ndr_err_code ndr_push_wrepl_replication_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union wrepl_replication_info *r)
543 : {
544 0 : uint32_t level;
545 14364 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
546 14364 : if (ndr_flags & NDR_SCALARS) {
547 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
548 7182 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
549 7182 : NDR_CHECK(ndr_push_union_align(ndr, 4));
550 7182 : switch (level) {
551 6 : case WREPL_REPL_TABLE_QUERY: {
552 6 : break; }
553 :
554 6 : case WREPL_REPL_TABLE_REPLY: {
555 6 : NDR_CHECK(ndr_push_wrepl_table(ndr, NDR_SCALARS, &r->table));
556 6 : break; }
557 :
558 2910 : case WREPL_REPL_SEND_REQUEST: {
559 2910 : NDR_CHECK(ndr_push_wrepl_wins_owner(ndr, NDR_SCALARS, &r->owner));
560 2910 : break; }
561 :
562 2910 : case WREPL_REPL_SEND_REPLY: {
563 2910 : NDR_CHECK(ndr_push_wrepl_send_reply(ndr, NDR_SCALARS, &r->reply));
564 2910 : break; }
565 :
566 1350 : case WREPL_REPL_UPDATE: {
567 1350 : NDR_CHECK(ndr_push_wrepl_table(ndr, NDR_SCALARS, &r->table));
568 1350 : break; }
569 :
570 0 : case WREPL_REPL_UPDATE2: {
571 0 : NDR_CHECK(ndr_push_wrepl_table(ndr, NDR_SCALARS, &r->table));
572 0 : break; }
573 :
574 0 : case WREPL_REPL_INFORM: {
575 0 : NDR_CHECK(ndr_push_wrepl_table(ndr, NDR_SCALARS, &r->table));
576 0 : break; }
577 :
578 0 : case WREPL_REPL_INFORM2: {
579 0 : NDR_CHECK(ndr_push_wrepl_table(ndr, NDR_SCALARS, &r->table));
580 0 : break; }
581 :
582 0 : default:
583 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
584 : }
585 : }
586 14364 : if (ndr_flags & NDR_BUFFERS) {
587 7182 : if (!(ndr_flags & NDR_SCALARS)) {
588 : /* We didn't get it above, and the token is not needed after this. */
589 7182 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
590 : }
591 7182 : switch (level) {
592 6 : case WREPL_REPL_TABLE_QUERY:
593 6 : break;
594 :
595 6 : case WREPL_REPL_TABLE_REPLY:
596 6 : break;
597 :
598 2910 : case WREPL_REPL_SEND_REQUEST:
599 2910 : break;
600 :
601 2910 : case WREPL_REPL_SEND_REPLY:
602 2910 : break;
603 :
604 1350 : case WREPL_REPL_UPDATE:
605 1350 : break;
606 :
607 0 : case WREPL_REPL_UPDATE2:
608 0 : break;
609 :
610 0 : case WREPL_REPL_INFORM:
611 0 : break;
612 :
613 0 : case WREPL_REPL_INFORM2:
614 0 : break;
615 :
616 0 : default:
617 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
618 : }
619 : }
620 14364 : return NDR_ERR_SUCCESS;
621 : }
622 :
623 7182 : static enum ndr_err_code ndr_pull_wrepl_replication_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union wrepl_replication_info *r)
624 : {
625 0 : uint32_t level;
626 7182 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
627 7182 : if (ndr_flags & NDR_SCALARS) {
628 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
629 3591 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
630 3591 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
631 3591 : switch (level) {
632 3 : case WREPL_REPL_TABLE_QUERY: {
633 3 : break; }
634 :
635 3 : case WREPL_REPL_TABLE_REPLY: {
636 3 : NDR_CHECK(ndr_pull_wrepl_table(ndr, NDR_SCALARS, &r->table));
637 3 : break; }
638 :
639 1455 : case WREPL_REPL_SEND_REQUEST: {
640 1455 : NDR_CHECK(ndr_pull_wrepl_wins_owner(ndr, NDR_SCALARS, &r->owner));
641 1455 : break; }
642 :
643 1455 : case WREPL_REPL_SEND_REPLY: {
644 1455 : NDR_CHECK(ndr_pull_wrepl_send_reply(ndr, NDR_SCALARS, &r->reply));
645 1455 : break; }
646 :
647 675 : case WREPL_REPL_UPDATE: {
648 675 : NDR_CHECK(ndr_pull_wrepl_table(ndr, NDR_SCALARS, &r->table));
649 675 : break; }
650 :
651 0 : case WREPL_REPL_UPDATE2: {
652 0 : NDR_CHECK(ndr_pull_wrepl_table(ndr, NDR_SCALARS, &r->table));
653 0 : break; }
654 :
655 0 : case WREPL_REPL_INFORM: {
656 0 : NDR_CHECK(ndr_pull_wrepl_table(ndr, NDR_SCALARS, &r->table));
657 0 : break; }
658 :
659 0 : case WREPL_REPL_INFORM2: {
660 0 : NDR_CHECK(ndr_pull_wrepl_table(ndr, NDR_SCALARS, &r->table));
661 0 : break; }
662 :
663 0 : default:
664 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
665 : }
666 : }
667 7182 : if (ndr_flags & NDR_BUFFERS) {
668 3591 : if (!(ndr_flags & NDR_SCALARS)) {
669 : /* We didn't get it above, and the token is not needed after this. */
670 3591 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
671 : }
672 3591 : switch (level) {
673 3 : case WREPL_REPL_TABLE_QUERY:
674 3 : break;
675 :
676 3 : case WREPL_REPL_TABLE_REPLY:
677 3 : break;
678 :
679 1455 : case WREPL_REPL_SEND_REQUEST:
680 1455 : break;
681 :
682 1455 : case WREPL_REPL_SEND_REPLY:
683 1455 : break;
684 :
685 675 : case WREPL_REPL_UPDATE:
686 675 : break;
687 :
688 0 : case WREPL_REPL_UPDATE2:
689 0 : break;
690 :
691 0 : case WREPL_REPL_INFORM:
692 0 : break;
693 :
694 0 : case WREPL_REPL_INFORM2:
695 0 : break;
696 :
697 0 : default:
698 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
699 : }
700 : }
701 7182 : return NDR_ERR_SUCCESS;
702 : }
703 :
704 0 : _PUBLIC_ void ndr_print_wrepl_replication_info(struct ndr_print *ndr, const char *name, const union wrepl_replication_info *r)
705 : {
706 0 : uint32_t level;
707 0 : level = ndr_print_steal_switch_value(ndr, r);
708 0 : ndr_print_union(ndr, name, level, "wrepl_replication_info");
709 0 : switch (level) {
710 0 : case WREPL_REPL_TABLE_QUERY:
711 0 : break;
712 :
713 0 : case WREPL_REPL_TABLE_REPLY:
714 0 : ndr_print_wrepl_table(ndr, "table", &r->table);
715 0 : break;
716 :
717 0 : case WREPL_REPL_SEND_REQUEST:
718 0 : ndr_print_wrepl_wins_owner(ndr, "owner", &r->owner);
719 0 : break;
720 :
721 0 : case WREPL_REPL_SEND_REPLY:
722 0 : ndr_print_wrepl_send_reply(ndr, "reply", &r->reply);
723 0 : break;
724 :
725 0 : case WREPL_REPL_UPDATE:
726 0 : ndr_print_wrepl_table(ndr, "table", &r->table);
727 0 : break;
728 :
729 0 : case WREPL_REPL_UPDATE2:
730 0 : ndr_print_wrepl_table(ndr, "table", &r->table);
731 0 : break;
732 :
733 0 : case WREPL_REPL_INFORM:
734 0 : ndr_print_wrepl_table(ndr, "table", &r->table);
735 0 : break;
736 :
737 0 : case WREPL_REPL_INFORM2:
738 0 : ndr_print_wrepl_table(ndr, "table", &r->table);
739 0 : break;
740 :
741 0 : default:
742 0 : ndr_print_bad_level(ndr, name, level);
743 : }
744 0 : }
745 :
746 14364 : static enum ndr_err_code ndr_push_wrepl_replication(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_replication *r)
747 : {
748 14364 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
749 14364 : if (ndr_flags & NDR_SCALARS) {
750 7182 : NDR_CHECK(ndr_push_align(ndr, 4));
751 7182 : NDR_CHECK(ndr_push_wrepl_replication_cmd(ndr, NDR_SCALARS, r->command));
752 7182 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->command));
753 7182 : NDR_CHECK(ndr_push_wrepl_replication_info(ndr, NDR_SCALARS, &r->info));
754 7182 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
755 : }
756 14364 : if (ndr_flags & NDR_BUFFERS) {
757 7182 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->command));
758 7182 : NDR_CHECK(ndr_push_wrepl_replication_info(ndr, NDR_BUFFERS, &r->info));
759 : }
760 14364 : return NDR_ERR_SUCCESS;
761 : }
762 :
763 7182 : static enum ndr_err_code ndr_pull_wrepl_replication(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_replication *r)
764 : {
765 7182 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
766 7182 : if (ndr_flags & NDR_SCALARS) {
767 3591 : NDR_CHECK(ndr_pull_align(ndr, 4));
768 3591 : NDR_CHECK(ndr_pull_wrepl_replication_cmd(ndr, NDR_SCALARS, &r->command));
769 3591 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->command));
770 3591 : NDR_CHECK(ndr_pull_wrepl_replication_info(ndr, NDR_SCALARS, &r->info));
771 3591 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
772 : }
773 7182 : if (ndr_flags & NDR_BUFFERS) {
774 3591 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->command));
775 3591 : NDR_CHECK(ndr_pull_wrepl_replication_info(ndr, NDR_BUFFERS, &r->info));
776 : }
777 7182 : return NDR_ERR_SUCCESS;
778 : }
779 :
780 0 : _PUBLIC_ void ndr_print_wrepl_replication(struct ndr_print *ndr, const char *name, const struct wrepl_replication *r)
781 : {
782 0 : ndr_print_struct(ndr, name, "wrepl_replication");
783 0 : if (r == NULL) { ndr_print_null(ndr); return; }
784 0 : ndr->depth++;
785 0 : ndr_print_wrepl_replication_cmd(ndr, "command", r->command);
786 0 : ndr_print_set_switch_value(ndr, &r->info, r->command);
787 0 : ndr_print_wrepl_replication_info(ndr, "info", &r->info);
788 0 : ndr->depth--;
789 : }
790 :
791 2724 : static enum ndr_err_code ndr_push_wrepl_start(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_start *r)
792 : {
793 2724 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
794 2724 : if (ndr_flags & NDR_SCALARS) {
795 2724 : NDR_CHECK(ndr_push_align(ndr, 4));
796 2724 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->assoc_ctx));
797 2724 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minor_version));
798 2724 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->major_version));
799 2724 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
800 : }
801 2724 : if (ndr_flags & NDR_BUFFERS) {
802 0 : }
803 2724 : return NDR_ERR_SUCCESS;
804 : }
805 :
806 1362 : static enum ndr_err_code ndr_pull_wrepl_start(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_start *r)
807 : {
808 1362 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
809 1362 : if (ndr_flags & NDR_SCALARS) {
810 1362 : NDR_CHECK(ndr_pull_align(ndr, 4));
811 1362 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->assoc_ctx));
812 1362 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minor_version));
813 1362 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->major_version));
814 1362 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
815 : }
816 1362 : if (ndr_flags & NDR_BUFFERS) {
817 0 : }
818 1362 : return NDR_ERR_SUCCESS;
819 : }
820 :
821 0 : _PUBLIC_ void ndr_print_wrepl_start(struct ndr_print *ndr, const char *name, const struct wrepl_start *r)
822 : {
823 0 : ndr_print_struct(ndr, name, "wrepl_start");
824 0 : if (r == NULL) { ndr_print_null(ndr); return; }
825 0 : ndr->depth++;
826 0 : ndr_print_uint32(ndr, "assoc_ctx", r->assoc_ctx);
827 0 : ndr_print_uint16(ndr, "minor_version", r->minor_version);
828 0 : ndr_print_uint16(ndr, "major_version", r->major_version);
829 0 : ndr->depth--;
830 : }
831 :
832 1350 : static enum ndr_err_code ndr_push_wrepl_stop(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_stop *r)
833 : {
834 1350 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
835 1350 : if (ndr_flags & NDR_SCALARS) {
836 1350 : NDR_CHECK(ndr_push_align(ndr, 4));
837 1350 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reason));
838 1350 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
839 : }
840 1350 : if (ndr_flags & NDR_BUFFERS) {
841 0 : }
842 1350 : return NDR_ERR_SUCCESS;
843 : }
844 :
845 675 : static enum ndr_err_code ndr_pull_wrepl_stop(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_stop *r)
846 : {
847 675 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
848 675 : if (ndr_flags & NDR_SCALARS) {
849 675 : NDR_CHECK(ndr_pull_align(ndr, 4));
850 675 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reason));
851 675 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
852 : }
853 675 : if (ndr_flags & NDR_BUFFERS) {
854 0 : }
855 675 : return NDR_ERR_SUCCESS;
856 : }
857 :
858 0 : _PUBLIC_ void ndr_print_wrepl_stop(struct ndr_print *ndr, const char *name, const struct wrepl_stop *r)
859 : {
860 0 : ndr_print_struct(ndr, name, "wrepl_stop");
861 0 : if (r == NULL) { ndr_print_null(ndr); return; }
862 0 : ndr->depth++;
863 0 : ndr_print_uint32(ndr, "reason", r->reason);
864 0 : ndr->depth--;
865 : }
866 :
867 11256 : static enum ndr_err_code ndr_push_wrepl_mess_type(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum wrepl_mess_type r)
868 : {
869 11256 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
870 11256 : return NDR_ERR_SUCCESS;
871 : }
872 :
873 5628 : static enum ndr_err_code ndr_pull_wrepl_mess_type(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum wrepl_mess_type *r)
874 : {
875 0 : uint32_t v;
876 5628 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
877 5628 : *r = v;
878 5628 : return NDR_ERR_SUCCESS;
879 : }
880 :
881 0 : _PUBLIC_ void ndr_print_wrepl_mess_type(struct ndr_print *ndr, const char *name, enum wrepl_mess_type r)
882 : {
883 0 : const char *val = NULL;
884 :
885 0 : switch (r) {
886 0 : case WREPL_START_ASSOCIATION: val = "WREPL_START_ASSOCIATION"; break;
887 0 : case WREPL_START_ASSOCIATION_REPLY: val = "WREPL_START_ASSOCIATION_REPLY"; break;
888 0 : case WREPL_STOP_ASSOCIATION: val = "WREPL_STOP_ASSOCIATION"; break;
889 0 : case WREPL_REPLICATION: val = "WREPL_REPLICATION"; break;
890 : }
891 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
892 0 : }
893 :
894 22512 : static enum ndr_err_code ndr_push_wrepl_message(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union wrepl_message *r)
895 : {
896 0 : uint32_t level;
897 22512 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
898 22512 : if (ndr_flags & NDR_SCALARS) {
899 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
900 11256 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
901 11256 : NDR_CHECK(ndr_push_union_align(ndr, 4));
902 11256 : switch (level) {
903 1362 : case WREPL_START_ASSOCIATION: {
904 1362 : NDR_CHECK(ndr_push_wrepl_start(ndr, NDR_SCALARS, &r->start));
905 1362 : break; }
906 :
907 1362 : case WREPL_START_ASSOCIATION_REPLY: {
908 1362 : NDR_CHECK(ndr_push_wrepl_start(ndr, NDR_SCALARS, &r->start_reply));
909 1362 : break; }
910 :
911 1350 : case WREPL_STOP_ASSOCIATION: {
912 1350 : NDR_CHECK(ndr_push_wrepl_stop(ndr, NDR_SCALARS, &r->stop));
913 1350 : break; }
914 :
915 7182 : case WREPL_REPLICATION: {
916 7182 : NDR_CHECK(ndr_push_wrepl_replication(ndr, NDR_SCALARS, &r->replication));
917 7182 : break; }
918 :
919 0 : default:
920 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
921 : }
922 : }
923 22512 : if (ndr_flags & NDR_BUFFERS) {
924 11256 : if (!(ndr_flags & NDR_SCALARS)) {
925 : /* We didn't get it above, and the token is not needed after this. */
926 11256 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
927 : }
928 11256 : switch (level) {
929 1362 : case WREPL_START_ASSOCIATION:
930 1362 : break;
931 :
932 1362 : case WREPL_START_ASSOCIATION_REPLY:
933 1362 : break;
934 :
935 1350 : case WREPL_STOP_ASSOCIATION:
936 1350 : break;
937 :
938 7182 : case WREPL_REPLICATION:
939 7182 : NDR_CHECK(ndr_push_wrepl_replication(ndr, NDR_BUFFERS, &r->replication));
940 7182 : break;
941 :
942 0 : default:
943 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
944 : }
945 : }
946 22512 : return NDR_ERR_SUCCESS;
947 : }
948 :
949 11256 : static enum ndr_err_code ndr_pull_wrepl_message(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union wrepl_message *r)
950 : {
951 0 : uint32_t level;
952 11256 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
953 11256 : if (ndr_flags & NDR_SCALARS) {
954 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
955 5628 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
956 5628 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
957 5628 : switch (level) {
958 681 : case WREPL_START_ASSOCIATION: {
959 681 : NDR_CHECK(ndr_pull_wrepl_start(ndr, NDR_SCALARS, &r->start));
960 681 : break; }
961 :
962 681 : case WREPL_START_ASSOCIATION_REPLY: {
963 681 : NDR_CHECK(ndr_pull_wrepl_start(ndr, NDR_SCALARS, &r->start_reply));
964 681 : break; }
965 :
966 675 : case WREPL_STOP_ASSOCIATION: {
967 675 : NDR_CHECK(ndr_pull_wrepl_stop(ndr, NDR_SCALARS, &r->stop));
968 675 : break; }
969 :
970 3591 : case WREPL_REPLICATION: {
971 3591 : NDR_CHECK(ndr_pull_wrepl_replication(ndr, NDR_SCALARS, &r->replication));
972 3591 : break; }
973 :
974 0 : default:
975 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
976 : }
977 : }
978 11256 : if (ndr_flags & NDR_BUFFERS) {
979 5628 : if (!(ndr_flags & NDR_SCALARS)) {
980 : /* We didn't get it above, and the token is not needed after this. */
981 5628 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
982 : }
983 5628 : switch (level) {
984 681 : case WREPL_START_ASSOCIATION:
985 681 : break;
986 :
987 681 : case WREPL_START_ASSOCIATION_REPLY:
988 681 : break;
989 :
990 675 : case WREPL_STOP_ASSOCIATION:
991 675 : break;
992 :
993 3591 : case WREPL_REPLICATION:
994 3591 : NDR_CHECK(ndr_pull_wrepl_replication(ndr, NDR_BUFFERS, &r->replication));
995 3591 : break;
996 :
997 0 : default:
998 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
999 : }
1000 : }
1001 11256 : return NDR_ERR_SUCCESS;
1002 : }
1003 :
1004 0 : _PUBLIC_ void ndr_print_wrepl_message(struct ndr_print *ndr, const char *name, const union wrepl_message *r)
1005 : {
1006 0 : uint32_t level;
1007 0 : level = ndr_print_steal_switch_value(ndr, r);
1008 0 : ndr_print_union(ndr, name, level, "wrepl_message");
1009 0 : switch (level) {
1010 0 : case WREPL_START_ASSOCIATION:
1011 0 : ndr_print_wrepl_start(ndr, "start", &r->start);
1012 0 : break;
1013 :
1014 0 : case WREPL_START_ASSOCIATION_REPLY:
1015 0 : ndr_print_wrepl_start(ndr, "start_reply", &r->start_reply);
1016 0 : break;
1017 :
1018 0 : case WREPL_STOP_ASSOCIATION:
1019 0 : ndr_print_wrepl_stop(ndr, "stop", &r->stop);
1020 0 : break;
1021 :
1022 0 : case WREPL_REPLICATION:
1023 0 : ndr_print_wrepl_replication(ndr, "replication", &r->replication);
1024 0 : break;
1025 :
1026 0 : default:
1027 0 : ndr_print_bad_level(ndr, name, level);
1028 : }
1029 0 : }
1030 :
1031 16884 : _PUBLIC_ enum ndr_err_code ndr_push_wrepl_packet(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_packet *r)
1032 : {
1033 : {
1034 16884 : libndr_flags _flags_save_STRUCT = ndr->flags;
1035 16884 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1036 16884 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1037 16884 : if (ndr_flags & NDR_SCALARS) {
1038 11256 : NDR_CHECK(ndr_push_align(ndr, 4));
1039 11256 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opcode));
1040 11256 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->assoc_ctx));
1041 11256 : NDR_CHECK(ndr_push_wrepl_mess_type(ndr, NDR_SCALARS, r->mess_type));
1042 11256 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->message, r->mess_type));
1043 11256 : NDR_CHECK(ndr_push_wrepl_message(ndr, NDR_SCALARS, &r->message));
1044 : {
1045 11256 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1046 11256 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1047 11256 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->padding));
1048 11256 : ndr->flags = _flags_save_DATA_BLOB;
1049 : }
1050 11256 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1051 : }
1052 16884 : if (ndr_flags & NDR_BUFFERS) {
1053 11256 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->message, r->mess_type));
1054 11256 : NDR_CHECK(ndr_push_wrepl_message(ndr, NDR_BUFFERS, &r->message));
1055 : }
1056 16884 : ndr->flags = _flags_save_STRUCT;
1057 : }
1058 16884 : return NDR_ERR_SUCCESS;
1059 : }
1060 :
1061 5628 : _PUBLIC_ enum ndr_err_code ndr_pull_wrepl_packet(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_packet *r)
1062 : {
1063 : {
1064 5628 : libndr_flags _flags_save_STRUCT = ndr->flags;
1065 5628 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1066 5628 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1067 5628 : if (ndr_flags & NDR_SCALARS) {
1068 5628 : NDR_CHECK(ndr_pull_align(ndr, 4));
1069 5628 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opcode));
1070 5628 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->assoc_ctx));
1071 5628 : NDR_CHECK(ndr_pull_wrepl_mess_type(ndr, NDR_SCALARS, &r->mess_type));
1072 5628 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->message, r->mess_type));
1073 5628 : NDR_CHECK(ndr_pull_wrepl_message(ndr, NDR_SCALARS, &r->message));
1074 : {
1075 5628 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1076 5628 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1077 5628 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->padding));
1078 5628 : ndr->flags = _flags_save_DATA_BLOB;
1079 : }
1080 5628 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1081 : }
1082 5628 : if (ndr_flags & NDR_BUFFERS) {
1083 5628 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->message, r->mess_type));
1084 5628 : NDR_CHECK(ndr_pull_wrepl_message(ndr, NDR_BUFFERS, &r->message));
1085 : }
1086 5628 : ndr->flags = _flags_save_STRUCT;
1087 : }
1088 5628 : return NDR_ERR_SUCCESS;
1089 : }
1090 :
1091 0 : static void ndr_print_flags_wrepl_packet(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct wrepl_packet *r)
1092 : {
1093 0 : ndr_print_wrepl_packet(ndr, name, r);
1094 0 : }
1095 :
1096 0 : _PUBLIC_ void ndr_print_wrepl_packet(struct ndr_print *ndr, const char *name, const struct wrepl_packet *r)
1097 : {
1098 0 : ndr_print_struct(ndr, name, "wrepl_packet");
1099 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1100 : {
1101 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
1102 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1103 0 : ndr->depth++;
1104 0 : ndr_print_uint32(ndr, "opcode", r->opcode);
1105 0 : ndr_print_uint32(ndr, "assoc_ctx", r->assoc_ctx);
1106 0 : ndr_print_wrepl_mess_type(ndr, "mess_type", r->mess_type);
1107 0 : ndr_print_set_switch_value(ndr, &r->message, r->mess_type);
1108 0 : ndr_print_wrepl_message(ndr, "message", &r->message);
1109 : {
1110 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1111 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1112 0 : ndr_print_DATA_BLOB(ndr, "padding", r->padding);
1113 0 : ndr->flags = _flags_save_DATA_BLOB;
1114 : }
1115 0 : ndr->depth--;
1116 0 : ndr->flags = _flags_save_STRUCT;
1117 : }
1118 : }
1119 :
1120 5628 : _PUBLIC_ size_t ndr_size_wrepl_packet(const struct wrepl_packet *r, libndr_flags flags)
1121 : {
1122 5628 : flags |= LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX;
1123 5628 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_wrepl_packet);
1124 : }
1125 :
1126 5628 : _PUBLIC_ enum ndr_err_code ndr_push_wrepl_wrap(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wrepl_wrap *r)
1127 : {
1128 : {
1129 5628 : libndr_flags _flags_save_STRUCT = ndr->flags;
1130 5628 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1131 5628 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1132 5628 : if (ndr_flags & NDR_SCALARS) {
1133 5628 : NDR_CHECK(ndr_push_align(ndr, 4));
1134 5628 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_wrepl_packet(&r->packet, ndr->flags)));
1135 5628 : NDR_CHECK(ndr_push_wrepl_packet(ndr, NDR_SCALARS, &r->packet));
1136 5628 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1137 : }
1138 5628 : if (ndr_flags & NDR_BUFFERS) {
1139 5628 : NDR_CHECK(ndr_push_wrepl_packet(ndr, NDR_BUFFERS, &r->packet));
1140 : }
1141 5628 : ndr->flags = _flags_save_STRUCT;
1142 : }
1143 5628 : return NDR_ERR_SUCCESS;
1144 : }
1145 :
1146 0 : _PUBLIC_ enum ndr_err_code ndr_pull_wrepl_wrap(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wrepl_wrap *r)
1147 : {
1148 : {
1149 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
1150 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1151 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1152 0 : if (ndr_flags & NDR_SCALARS) {
1153 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1154 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
1155 0 : NDR_CHECK(ndr_pull_wrepl_packet(ndr, NDR_SCALARS, &r->packet));
1156 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1157 : }
1158 0 : if (ndr_flags & NDR_BUFFERS) {
1159 0 : NDR_CHECK(ndr_pull_wrepl_packet(ndr, NDR_BUFFERS, &r->packet));
1160 : }
1161 0 : ndr->flags = _flags_save_STRUCT;
1162 : }
1163 0 : return NDR_ERR_SUCCESS;
1164 : }
1165 :
1166 0 : static void ndr_print_flags_wrepl_wrap(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct wrepl_wrap *r)
1167 : {
1168 0 : ndr_print_wrepl_wrap(ndr, name, r);
1169 0 : }
1170 :
1171 0 : _PUBLIC_ void ndr_print_wrepl_wrap(struct ndr_print *ndr, const char *name, const struct wrepl_wrap *r)
1172 : {
1173 0 : ndr_print_struct(ndr, name, "wrepl_wrap");
1174 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1175 : {
1176 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
1177 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1178 0 : ndr->depth++;
1179 0 : ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_wrepl_packet(&r->packet, ndr->flags):r->size);
1180 0 : ndr_print_wrepl_packet(ndr, "packet", &r->packet);
1181 0 : ndr->depth--;
1182 0 : ndr->flags = _flags_save_STRUCT;
1183 : }
1184 : }
1185 :
1186 : #ifndef SKIP_NDR_TABLE_winsrepl
1187 : static const struct ndr_interface_public_struct winsrepl_public_structs[] = {
1188 : {
1189 : .name = "wrepl_packet",
1190 : .struct_size = sizeof(struct wrepl_packet ),
1191 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_wrepl_packet,
1192 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_wrepl_packet,
1193 : .ndr_print = (ndr_print_function_t) ndr_print_flags_wrepl_packet,
1194 : },
1195 : {
1196 : .name = "wrepl_wrap",
1197 : .struct_size = sizeof(struct wrepl_wrap ),
1198 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_wrepl_wrap,
1199 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_wrepl_wrap,
1200 : .ndr_print = (ndr_print_function_t) ndr_print_flags_wrepl_wrap,
1201 : },
1202 : { .name = NULL }
1203 : };
1204 :
1205 : static const struct ndr_interface_call winsrepl_calls[] = {
1206 : { .name = NULL }
1207 : };
1208 :
1209 : static const char * const winsrepl_endpoint_strings[] = {
1210 : "ncacn_np:[\\pipe\\winsrepl]",
1211 : };
1212 :
1213 : static const struct ndr_interface_string_array winsrepl_endpoints = {
1214 : .count = 1,
1215 : .names = winsrepl_endpoint_strings
1216 : };
1217 :
1218 : static const char * const winsrepl_authservice_strings[] = {
1219 : "host",
1220 : };
1221 :
1222 : static const struct ndr_interface_string_array winsrepl_authservices = {
1223 : .count = 1,
1224 : .names = winsrepl_authservice_strings
1225 : };
1226 :
1227 :
1228 : const struct ndr_interface_table ndr_table_winsrepl = {
1229 : .name = "winsrepl",
1230 : .syntax_id = {
1231 : {0x915f5653,0xbac1,0x431c,{0x97,0xee},{0x9f,0xfb,0x34,0x52,0x69,0x21}},
1232 : NDR_WINSREPL_VERSION
1233 : },
1234 : .helpstring = NDR_WINSREPL_HELPSTRING,
1235 : .num_calls = 0,
1236 : .calls = winsrepl_calls,
1237 : .num_public_structs = 2,
1238 : .public_structs = winsrepl_public_structs,
1239 : .endpoints = &winsrepl_endpoints,
1240 : .authservices = &winsrepl_authservices
1241 : };
1242 :
1243 : #endif /* SKIP_NDR_TABLE_winsrepl */
|