Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_nbt.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 10253 : static enum ndr_err_code ndr_push_nbt_operation(struct ndr_push *ndr, int ndr_flags, uint16_t r)
9 : {
10 10253 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
11 10253 : return NDR_ERR_SUCCESS;
12 : }
13 :
14 12489 : static enum ndr_err_code ndr_pull_nbt_operation(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
15 : {
16 : uint16_t v;
17 12489 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
18 12489 : *r = v;
19 12489 : return NDR_ERR_SUCCESS;
20 : }
21 :
22 0 : _PUBLIC_ void ndr_print_nbt_operation(struct ndr_print *ndr, const char *name, uint16_t r)
23 : {
24 0 : ndr_print_uint16(ndr, name, r);
25 0 : ndr->depth++;
26 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_RCODE", NBT_RCODE, r);
27 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_BROADCAST", NBT_FLAG_BROADCAST, r);
28 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_RECURSION_AVAIL", NBT_FLAG_RECURSION_AVAIL, r);
29 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_RECURSION_DESIRED", NBT_FLAG_RECURSION_DESIRED, r);
30 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_TRUNCATION", NBT_FLAG_TRUNCATION, r);
31 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_AUTHORITATIVE", NBT_FLAG_AUTHORITATIVE, r);
32 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_OPCODE", NBT_OPCODE, r);
33 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_REPLY", NBT_FLAG_REPLY, r);
34 0 : ndr->depth--;
35 0 : }
36 :
37 198 : static enum ndr_err_code ndr_push_nbt_name_type(struct ndr_push *ndr, int ndr_flags, enum nbt_name_type r)
38 : {
39 198 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
40 198 : return NDR_ERR_SUCCESS;
41 : }
42 :
43 0 : static enum ndr_err_code ndr_pull_nbt_name_type(struct ndr_pull *ndr, int ndr_flags, enum nbt_name_type *r)
44 : {
45 : uint8_t v;
46 0 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
47 0 : *r = v;
48 0 : return NDR_ERR_SUCCESS;
49 : }
50 :
51 0 : _PUBLIC_ void ndr_print_nbt_name_type(struct ndr_print *ndr, const char *name, enum nbt_name_type r)
52 : {
53 0 : const char *val = NULL;
54 :
55 0 : switch (r) {
56 0 : case NBT_NAME_CLIENT: val = "NBT_NAME_CLIENT"; break;
57 0 : case NBT_NAME_MS: val = "NBT_NAME_MS"; break;
58 0 : case NBT_NAME_USER: val = "NBT_NAME_USER"; break;
59 0 : case NBT_NAME_SERVER: val = "NBT_NAME_SERVER"; break;
60 0 : case NBT_NAME_PDC: val = "NBT_NAME_PDC"; break;
61 0 : case NBT_NAME_LOGON: val = "NBT_NAME_LOGON"; break;
62 0 : case NBT_NAME_MASTER: val = "NBT_NAME_MASTER"; break;
63 0 : case NBT_NAME_BROWSER: val = "NBT_NAME_BROWSER"; break;
64 : }
65 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
66 0 : }
67 :
68 0 : static void ndr_print_flags_nbt_name(struct ndr_print *ndr, const char *name, int unused, const struct nbt_name *r)
69 : {
70 0 : ndr_print_nbt_name(ndr, name, r);
71 0 : }
72 :
73 0 : _PUBLIC_ void ndr_print_nbt_name(struct ndr_print *ndr, const char *name, const struct nbt_name *r)
74 : {
75 0 : ndr_print_struct(ndr, name, "nbt_name");
76 0 : if (r == NULL) { ndr_print_null(ndr); return; }
77 0 : ndr->depth++;
78 0 : ndr_print_string(ndr, "name", r->name);
79 0 : ndr_print_string(ndr, "scope", r->scope);
80 0 : ndr_print_nbt_name_type(ndr, "type", r->type);
81 0 : ndr->depth--;
82 : }
83 :
84 11663 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_qclass(struct ndr_push *ndr, int ndr_flags, enum nbt_qclass r)
85 : {
86 11663 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
87 11663 : return NDR_ERR_SUCCESS;
88 : }
89 :
90 17373 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_qclass(struct ndr_pull *ndr, int ndr_flags, enum nbt_qclass *r)
91 : {
92 : uint16_t v;
93 17373 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
94 17373 : *r = v;
95 17373 : return NDR_ERR_SUCCESS;
96 : }
97 :
98 0 : _PUBLIC_ void ndr_print_nbt_qclass(struct ndr_print *ndr, const char *name, enum nbt_qclass r)
99 : {
100 0 : const char *val = NULL;
101 :
102 0 : switch (r) {
103 0 : case NBT_QCLASS_IP: val = "NBT_QCLASS_IP"; break;
104 : }
105 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
106 0 : }
107 :
108 11663 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_qtype(struct ndr_push *ndr, int ndr_flags, enum nbt_qtype r)
109 : {
110 11663 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
111 11663 : return NDR_ERR_SUCCESS;
112 : }
113 :
114 17373 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_qtype(struct ndr_pull *ndr, int ndr_flags, enum nbt_qtype *r)
115 : {
116 : uint16_t v;
117 17373 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
118 17373 : *r = v;
119 17373 : return NDR_ERR_SUCCESS;
120 : }
121 :
122 0 : _PUBLIC_ void ndr_print_nbt_qtype(struct ndr_print *ndr, const char *name, enum nbt_qtype r)
123 : {
124 0 : const char *val = NULL;
125 :
126 0 : switch (r) {
127 0 : case NBT_QTYPE_ADDRESS: val = "NBT_QTYPE_ADDRESS"; break;
128 0 : case NBT_QTYPE_NAMESERVICE: val = "NBT_QTYPE_NAMESERVICE"; break;
129 0 : case NBT_QTYPE_NULL: val = "NBT_QTYPE_NULL"; break;
130 0 : case NBT_QTYPE_NETBIOS: val = "NBT_QTYPE_NETBIOS"; break;
131 0 : case NBT_QTYPE_STATUS: val = "NBT_QTYPE_STATUS"; break;
132 : }
133 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
134 0 : }
135 :
136 8649 : static enum ndr_err_code ndr_push_nbt_name_question(struct ndr_push *ndr, int ndr_flags, const struct nbt_name_question *r)
137 : {
138 8649 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
139 8649 : if (ndr_flags & NDR_SCALARS) {
140 8649 : NDR_CHECK(ndr_push_align(ndr, 4));
141 8649 : NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->name));
142 8649 : NDR_CHECK(ndr_push_nbt_qtype(ndr, NDR_SCALARS, r->question_type));
143 8649 : NDR_CHECK(ndr_push_nbt_qclass(ndr, NDR_SCALARS, r->question_class));
144 8649 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
145 : }
146 8649 : if (ndr_flags & NDR_BUFFERS) {
147 : }
148 8649 : return NDR_ERR_SUCCESS;
149 : }
150 :
151 11098 : static enum ndr_err_code ndr_pull_nbt_name_question(struct ndr_pull *ndr, int ndr_flags, struct nbt_name_question *r)
152 : {
153 11098 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
154 11098 : if (ndr_flags & NDR_SCALARS) {
155 11098 : NDR_CHECK(ndr_pull_align(ndr, 4));
156 11098 : NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->name));
157 11098 : NDR_CHECK(ndr_pull_nbt_qtype(ndr, NDR_SCALARS, &r->question_type));
158 11098 : NDR_CHECK(ndr_pull_nbt_qclass(ndr, NDR_SCALARS, &r->question_class));
159 11098 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
160 : }
161 11098 : if (ndr_flags & NDR_BUFFERS) {
162 : }
163 11098 : return NDR_ERR_SUCCESS;
164 : }
165 :
166 0 : _PUBLIC_ void ndr_print_nbt_name_question(struct ndr_print *ndr, const char *name, const struct nbt_name_question *r)
167 : {
168 0 : ndr_print_struct(ndr, name, "nbt_name_question");
169 0 : if (r == NULL) { ndr_print_null(ndr); return; }
170 0 : ndr->depth++;
171 0 : ndr_print_nbt_name(ndr, "name", &r->name);
172 0 : ndr_print_nbt_qtype(ndr, "question_type", r->question_type);
173 0 : ndr_print_nbt_qclass(ndr, "question_class", r->question_class);
174 0 : ndr->depth--;
175 : }
176 :
177 3169 : static enum ndr_err_code ndr_push_nb_flags(struct ndr_push *ndr, int ndr_flags, uint16_t r)
178 : {
179 3169 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
180 3169 : return NDR_ERR_SUCCESS;
181 : }
182 :
183 6257 : static enum ndr_err_code ndr_pull_nb_flags(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
184 : {
185 : uint16_t v;
186 6257 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
187 6257 : *r = v;
188 6257 : return NDR_ERR_SUCCESS;
189 : }
190 :
191 0 : _PUBLIC_ void ndr_print_nb_flags(struct ndr_print *ndr, const char *name, uint16_t r)
192 : {
193 0 : ndr_print_uint16(ndr, name, r);
194 0 : ndr->depth++;
195 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_PERMANENT", NBT_NM_PERMANENT, r);
196 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_ACTIVE", NBT_NM_ACTIVE, r);
197 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_CONFLICT", NBT_NM_CONFLICT, r);
198 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_DEREGISTER", NBT_NM_DEREGISTER, r);
199 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_OWNER_TYPE", NBT_NM_OWNER_TYPE, r);
200 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_GROUP", NBT_NM_GROUP, r);
201 0 : ndr->depth--;
202 0 : }
203 :
204 2971 : static enum ndr_err_code ndr_push_nbt_rdata_address(struct ndr_push *ndr, int ndr_flags, const struct nbt_rdata_address *r)
205 : {
206 2971 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
207 2971 : if (ndr_flags & NDR_SCALARS) {
208 2971 : NDR_CHECK(ndr_push_align(ndr, 4));
209 2971 : NDR_CHECK(ndr_push_nb_flags(ndr, NDR_SCALARS, r->nb_flags));
210 2971 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ipaddr));
211 2971 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
212 : }
213 2971 : if (ndr_flags & NDR_BUFFERS) {
214 : }
215 2971 : return NDR_ERR_SUCCESS;
216 : }
217 :
218 6257 : static enum ndr_err_code ndr_pull_nbt_rdata_address(struct ndr_pull *ndr, int ndr_flags, struct nbt_rdata_address *r)
219 : {
220 6257 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
221 6257 : if (ndr_flags & NDR_SCALARS) {
222 6257 : NDR_CHECK(ndr_pull_align(ndr, 4));
223 6257 : NDR_CHECK(ndr_pull_nb_flags(ndr, NDR_SCALARS, &r->nb_flags));
224 6257 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ipaddr));
225 6257 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
226 : }
227 6257 : if (ndr_flags & NDR_BUFFERS) {
228 : }
229 6257 : return NDR_ERR_SUCCESS;
230 : }
231 :
232 0 : _PUBLIC_ void ndr_print_nbt_rdata_address(struct ndr_print *ndr, const char *name, const struct nbt_rdata_address *r)
233 : {
234 0 : ndr_print_struct(ndr, name, "nbt_rdata_address");
235 0 : if (r == NULL) { ndr_print_null(ndr); return; }
236 0 : ndr->depth++;
237 0 : ndr_print_nb_flags(ndr, "nb_flags", r->nb_flags);
238 0 : ndr_print_ipv4address(ndr, "ipaddr", r->ipaddr);
239 0 : ndr->depth--;
240 : }
241 :
242 2941 : static enum ndr_err_code ndr_push_nbt_rdata_netbios(struct ndr_push *ndr, int ndr_flags, const struct nbt_rdata_netbios *r)
243 : {
244 : uint32_t cntr_addresses_0;
245 2941 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
246 2941 : if (ndr_flags & NDR_SCALARS) {
247 2941 : NDR_CHECK(ndr_push_align(ndr, 4));
248 2941 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
249 5912 : for (cntr_addresses_0 = 0; cntr_addresses_0 < (r->length / 6); cntr_addresses_0++) {
250 2971 : NDR_CHECK(ndr_push_nbt_rdata_address(ndr, NDR_SCALARS, &r->addresses[cntr_addresses_0]));
251 : }
252 2941 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
253 : }
254 2941 : if (ndr_flags & NDR_BUFFERS) {
255 : }
256 2941 : return NDR_ERR_SUCCESS;
257 : }
258 :
259 6245 : static enum ndr_err_code ndr_pull_nbt_rdata_netbios(struct ndr_pull *ndr, int ndr_flags, struct nbt_rdata_netbios *r)
260 : {
261 6245 : uint32_t size_addresses_0 = 0;
262 : uint32_t cntr_addresses_0;
263 6245 : TALLOC_CTX *_mem_save_addresses_0 = NULL;
264 6245 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
265 6245 : if (ndr_flags & NDR_SCALARS) {
266 6245 : NDR_CHECK(ndr_pull_align(ndr, 4));
267 6245 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
268 6245 : size_addresses_0 = r->length / 6;
269 6245 : NDR_PULL_ALLOC_N(ndr, r->addresses, size_addresses_0);
270 6245 : _mem_save_addresses_0 = NDR_PULL_GET_MEM_CTX(ndr);
271 6245 : NDR_PULL_SET_MEM_CTX(ndr, r->addresses, 0);
272 12502 : for (cntr_addresses_0 = 0; cntr_addresses_0 < (size_addresses_0); cntr_addresses_0++) {
273 6257 : NDR_CHECK(ndr_pull_nbt_rdata_address(ndr, NDR_SCALARS, &r->addresses[cntr_addresses_0]));
274 : }
275 6245 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_0, 0);
276 6245 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
277 : }
278 6245 : if (ndr_flags & NDR_BUFFERS) {
279 : }
280 6245 : return NDR_ERR_SUCCESS;
281 : }
282 :
283 0 : _PUBLIC_ void ndr_print_nbt_rdata_netbios(struct ndr_print *ndr, const char *name, const struct nbt_rdata_netbios *r)
284 : {
285 : uint32_t cntr_addresses_0;
286 0 : ndr_print_struct(ndr, name, "nbt_rdata_netbios");
287 0 : if (r == NULL) { ndr_print_null(ndr); return; }
288 0 : ndr->depth++;
289 0 : ndr_print_uint16(ndr, "length", r->length);
290 0 : ndr->print(ndr, "%s: ARRAY(%d)", "addresses", (int)r->length / 6);
291 0 : ndr->depth++;
292 0 : for (cntr_addresses_0 = 0; cntr_addresses_0 < (r->length / 6); cntr_addresses_0++) {
293 0 : ndr_print_nbt_rdata_address(ndr, "addresses", &r->addresses[cntr_addresses_0]);
294 : }
295 0 : ndr->depth--;
296 0 : ndr->depth--;
297 : }
298 :
299 25 : static enum ndr_err_code ndr_push_nbt_statistics(struct ndr_push *ndr, int ndr_flags, const struct nbt_statistics *r)
300 : {
301 25 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
302 25 : if (ndr_flags & NDR_SCALARS) {
303 25 : NDR_CHECK(ndr_push_align(ndr, 4));
304 25 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->unit_id, 6));
305 25 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->jumpers));
306 25 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->test_result));
307 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version_number));
308 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->period_of_statistics));
309 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_of_crcs));
310 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_alignment_errors));
311 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_of_collisions));
312 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_send_aborts));
313 25 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->number_good_sends));
314 25 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->number_good_receives));
315 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_retransmits));
316 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_no_resource_conditions));
317 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_free_command_blocks));
318 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->total_number_command_blocks));
319 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_total_number_command_blocks));
320 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_pending_sessions));
321 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_number_pending_sessions));
322 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_total_sessions_possible));
323 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->session_data_packet_size));
324 25 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
325 : }
326 25 : if (ndr_flags & NDR_BUFFERS) {
327 : }
328 25 : return NDR_ERR_SUCCESS;
329 : }
330 :
331 0 : static enum ndr_err_code ndr_pull_nbt_statistics(struct ndr_pull *ndr, int ndr_flags, struct nbt_statistics *r)
332 : {
333 0 : uint32_t size_unit_id_0 = 0;
334 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
335 0 : if (ndr_flags & NDR_SCALARS) {
336 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
337 0 : size_unit_id_0 = 6;
338 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->unit_id, size_unit_id_0));
339 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->jumpers));
340 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->test_result));
341 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version_number));
342 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->period_of_statistics));
343 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_of_crcs));
344 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_alignment_errors));
345 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_of_collisions));
346 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_send_aborts));
347 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->number_good_sends));
348 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->number_good_receives));
349 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_retransmits));
350 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_no_resource_conditions));
351 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_free_command_blocks));
352 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->total_number_command_blocks));
353 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_total_number_command_blocks));
354 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_pending_sessions));
355 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_number_pending_sessions));
356 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_total_sessions_possible));
357 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->session_data_packet_size));
358 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
359 : }
360 0 : if (ndr_flags & NDR_BUFFERS) {
361 : }
362 0 : return NDR_ERR_SUCCESS;
363 : }
364 :
365 0 : _PUBLIC_ void ndr_print_nbt_statistics(struct ndr_print *ndr, const char *name, const struct nbt_statistics *r)
366 : {
367 0 : ndr_print_struct(ndr, name, "nbt_statistics");
368 0 : if (r == NULL) { ndr_print_null(ndr); return; }
369 0 : ndr->depth++;
370 0 : ndr_print_array_uint8(ndr, "unit_id", r->unit_id, 6);
371 0 : ndr_print_uint8(ndr, "jumpers", r->jumpers);
372 0 : ndr_print_uint8(ndr, "test_result", r->test_result);
373 0 : ndr_print_uint16(ndr, "version_number", r->version_number);
374 0 : ndr_print_uint16(ndr, "period_of_statistics", r->period_of_statistics);
375 0 : ndr_print_uint16(ndr, "number_of_crcs", r->number_of_crcs);
376 0 : ndr_print_uint16(ndr, "number_alignment_errors", r->number_alignment_errors);
377 0 : ndr_print_uint16(ndr, "number_of_collisions", r->number_of_collisions);
378 0 : ndr_print_uint16(ndr, "number_send_aborts", r->number_send_aborts);
379 0 : ndr_print_uint32(ndr, "number_good_sends", r->number_good_sends);
380 0 : ndr_print_uint32(ndr, "number_good_receives", r->number_good_receives);
381 0 : ndr_print_uint16(ndr, "number_retransmits", r->number_retransmits);
382 0 : ndr_print_uint16(ndr, "number_no_resource_conditions", r->number_no_resource_conditions);
383 0 : ndr_print_uint16(ndr, "number_free_command_blocks", r->number_free_command_blocks);
384 0 : ndr_print_uint16(ndr, "total_number_command_blocks", r->total_number_command_blocks);
385 0 : ndr_print_uint16(ndr, "max_total_number_command_blocks", r->max_total_number_command_blocks);
386 0 : ndr_print_uint16(ndr, "number_pending_sessions", r->number_pending_sessions);
387 0 : ndr_print_uint16(ndr, "max_number_pending_sessions", r->max_number_pending_sessions);
388 0 : ndr_print_uint16(ndr, "max_total_sessions_possible", r->max_total_sessions_possible);
389 0 : ndr_print_uint16(ndr, "session_data_packet_size", r->session_data_packet_size);
390 0 : ndr->depth--;
391 : }
392 :
393 198 : static enum ndr_err_code ndr_push_nbt_status_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_status_name *r)
394 : {
395 198 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
396 198 : if (ndr_flags & NDR_SCALARS) {
397 198 : NDR_CHECK(ndr_push_align(ndr, 2));
398 198 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, 15, sizeof(uint8_t), CH_DOS));
399 198 : NDR_CHECK(ndr_push_nbt_name_type(ndr, NDR_SCALARS, r->type));
400 198 : NDR_CHECK(ndr_push_nb_flags(ndr, NDR_SCALARS, r->nb_flags));
401 198 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
402 : }
403 198 : if (ndr_flags & NDR_BUFFERS) {
404 : }
405 198 : return NDR_ERR_SUCCESS;
406 : }
407 :
408 0 : static enum ndr_err_code ndr_pull_nbt_status_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_status_name *r)
409 : {
410 0 : uint32_t size_name_0 = 0;
411 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
412 0 : if (ndr_flags & NDR_SCALARS) {
413 0 : NDR_CHECK(ndr_pull_align(ndr, 2));
414 0 : size_name_0 = 15;
415 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, size_name_0, sizeof(uint8_t), CH_DOS));
416 0 : NDR_CHECK(ndr_pull_nbt_name_type(ndr, NDR_SCALARS, &r->type));
417 0 : NDR_CHECK(ndr_pull_nb_flags(ndr, NDR_SCALARS, &r->nb_flags));
418 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
419 : }
420 0 : if (ndr_flags & NDR_BUFFERS) {
421 : }
422 0 : return NDR_ERR_SUCCESS;
423 : }
424 :
425 0 : _PUBLIC_ void ndr_print_nbt_status_name(struct ndr_print *ndr, const char *name, const struct nbt_status_name *r)
426 : {
427 0 : ndr_print_struct(ndr, name, "nbt_status_name");
428 0 : if (r == NULL) { ndr_print_null(ndr); return; }
429 0 : ndr->depth++;
430 0 : ndr_print_string(ndr, "name", r->name);
431 0 : ndr_print_nbt_name_type(ndr, "type", r->type);
432 0 : ndr_print_nb_flags(ndr, "nb_flags", r->nb_flags);
433 0 : ndr->depth--;
434 : }
435 :
436 25 : static enum ndr_err_code ndr_push_nbt_rdata_status(struct ndr_push *ndr, int ndr_flags, const struct nbt_rdata_status *r)
437 : {
438 : uint32_t cntr_names_0;
439 25 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
440 25 : if (ndr_flags & NDR_SCALARS) {
441 25 : NDR_CHECK(ndr_push_align(ndr, 4));
442 25 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_names * 18 + 47));
443 25 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_names));
444 223 : for (cntr_names_0 = 0; cntr_names_0 < (r->num_names); cntr_names_0++) {
445 198 : NDR_CHECK(ndr_push_nbt_status_name(ndr, NDR_SCALARS, &r->names[cntr_names_0]));
446 : }
447 25 : NDR_CHECK(ndr_push_nbt_statistics(ndr, NDR_SCALARS, &r->statistics));
448 25 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
449 : }
450 25 : if (ndr_flags & NDR_BUFFERS) {
451 : }
452 25 : return NDR_ERR_SUCCESS;
453 : }
454 :
455 0 : static enum ndr_err_code ndr_pull_nbt_rdata_status(struct ndr_pull *ndr, int ndr_flags, struct nbt_rdata_status *r)
456 : {
457 0 : uint32_t size_names_0 = 0;
458 : uint32_t cntr_names_0;
459 0 : TALLOC_CTX *_mem_save_names_0 = NULL;
460 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
461 0 : if (ndr_flags & NDR_SCALARS) {
462 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
463 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
464 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_names));
465 0 : size_names_0 = r->num_names;
466 0 : NDR_PULL_ALLOC_N(ndr, r->names, size_names_0);
467 0 : _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
468 0 : NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
469 0 : for (cntr_names_0 = 0; cntr_names_0 < (size_names_0); cntr_names_0++) {
470 0 : NDR_CHECK(ndr_pull_nbt_status_name(ndr, NDR_SCALARS, &r->names[cntr_names_0]));
471 : }
472 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
473 0 : NDR_CHECK(ndr_pull_nbt_statistics(ndr, NDR_SCALARS, &r->statistics));
474 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
475 : }
476 0 : if (ndr_flags & NDR_BUFFERS) {
477 : }
478 0 : return NDR_ERR_SUCCESS;
479 : }
480 :
481 0 : _PUBLIC_ void ndr_print_nbt_rdata_status(struct ndr_print *ndr, const char *name, const struct nbt_rdata_status *r)
482 : {
483 : uint32_t cntr_names_0;
484 0 : ndr_print_struct(ndr, name, "nbt_rdata_status");
485 0 : if (r == NULL) { ndr_print_null(ndr); return; }
486 0 : ndr->depth++;
487 0 : ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->num_names * 18 + 47:r->length);
488 0 : ndr_print_uint8(ndr, "num_names", r->num_names);
489 0 : ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->num_names);
490 0 : ndr->depth++;
491 0 : for (cntr_names_0 = 0; cntr_names_0 < (r->num_names); cntr_names_0++) {
492 0 : ndr_print_nbt_status_name(ndr, "names", &r->names[cntr_names_0]);
493 : }
494 0 : ndr->depth--;
495 0 : ndr_print_nbt_statistics(ndr, "statistics", &r->statistics);
496 0 : ndr->depth--;
497 : }
498 :
499 48 : static enum ndr_err_code ndr_push_nbt_rdata_data(struct ndr_push *ndr, int ndr_flags, const struct nbt_rdata_data *r)
500 : {
501 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
502 48 : if (ndr_flags & NDR_SCALARS) {
503 48 : NDR_CHECK(ndr_push_align(ndr, 2));
504 48 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
505 48 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
506 48 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
507 : }
508 48 : if (ndr_flags & NDR_BUFFERS) {
509 : }
510 48 : return NDR_ERR_SUCCESS;
511 : }
512 :
513 30 : static enum ndr_err_code ndr_pull_nbt_rdata_data(struct ndr_pull *ndr, int ndr_flags, struct nbt_rdata_data *r)
514 : {
515 30 : uint32_t size_data_0 = 0;
516 30 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
517 30 : if (ndr_flags & NDR_SCALARS) {
518 30 : NDR_CHECK(ndr_pull_align(ndr, 2));
519 30 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
520 30 : size_data_0 = r->length;
521 30 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_0);
522 30 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
523 30 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
524 : }
525 30 : if (ndr_flags & NDR_BUFFERS) {
526 : }
527 30 : return NDR_ERR_SUCCESS;
528 : }
529 :
530 0 : _PUBLIC_ void ndr_print_nbt_rdata_data(struct ndr_print *ndr, const char *name, const struct nbt_rdata_data *r)
531 : {
532 0 : ndr_print_struct(ndr, name, "nbt_rdata_data");
533 0 : if (r == NULL) { ndr_print_null(ndr); return; }
534 0 : ndr->depth++;
535 0 : ndr_print_uint16(ndr, "length", r->length);
536 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
537 0 : ndr->depth--;
538 : }
539 :
540 3014 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_rdata(struct ndr_push *ndr, int ndr_flags, const union nbt_rdata *r)
541 : {
542 : uint32_t level;
543 3014 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
544 3014 : if (ndr_flags & NDR_SCALARS) {
545 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
546 3014 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
547 3014 : NDR_CHECK(ndr_push_union_align(ndr, 4));
548 3014 : switch (level) {
549 2941 : case NBT_QTYPE_NETBIOS: {
550 2941 : NDR_CHECK(ndr_push_nbt_rdata_netbios(ndr, NDR_SCALARS, &r->netbios));
551 2941 : break; }
552 :
553 25 : case NBT_QTYPE_STATUS: {
554 25 : NDR_CHECK(ndr_push_nbt_rdata_status(ndr, NDR_SCALARS, &r->status));
555 25 : break; }
556 :
557 48 : default: {
558 48 : NDR_CHECK(ndr_push_nbt_rdata_data(ndr, NDR_SCALARS, &r->data));
559 48 : break; }
560 :
561 : }
562 0 : }
563 3014 : return NDR_ERR_SUCCESS;
564 : }
565 :
566 6275 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_rdata(struct ndr_pull *ndr, int ndr_flags, union nbt_rdata *r)
567 : {
568 : uint32_t level;
569 6275 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
570 6275 : if (ndr_flags & NDR_SCALARS) {
571 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
572 6275 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
573 6275 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
574 6275 : switch (level) {
575 6245 : case NBT_QTYPE_NETBIOS: {
576 6245 : NDR_CHECK(ndr_pull_nbt_rdata_netbios(ndr, NDR_SCALARS, &r->netbios));
577 6245 : break; }
578 :
579 0 : case NBT_QTYPE_STATUS: {
580 0 : NDR_CHECK(ndr_pull_nbt_rdata_status(ndr, NDR_SCALARS, &r->status));
581 0 : break; }
582 :
583 30 : default: {
584 30 : NDR_CHECK(ndr_pull_nbt_rdata_data(ndr, NDR_SCALARS, &r->data));
585 30 : break; }
586 :
587 : }
588 0 : }
589 6275 : return NDR_ERR_SUCCESS;
590 : }
591 :
592 0 : _PUBLIC_ void ndr_print_nbt_rdata(struct ndr_print *ndr, const char *name, const union nbt_rdata *r)
593 : {
594 : uint32_t level;
595 0 : level = ndr_print_steal_switch_value(ndr, r);
596 0 : ndr_print_union(ndr, name, level, "nbt_rdata");
597 0 : switch (level) {
598 0 : case NBT_QTYPE_NETBIOS:
599 0 : ndr_print_nbt_rdata_netbios(ndr, "netbios", &r->netbios);
600 0 : break;
601 :
602 0 : case NBT_QTYPE_STATUS:
603 0 : ndr_print_nbt_rdata_status(ndr, "status", &r->status);
604 0 : break;
605 :
606 0 : default:
607 0 : ndr_print_nbt_rdata_data(ndr, "data", &r->data);
608 0 : break;
609 :
610 : }
611 0 : }
612 :
613 6275 : static enum ndr_err_code ndr_pull_nbt_res_rec(struct ndr_pull *ndr, int ndr_flags, struct nbt_res_rec *r)
614 : {
615 : {
616 6275 : uint32_t _flags_save_STRUCT = ndr->flags;
617 6275 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
618 6275 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
619 6275 : if (ndr_flags & NDR_SCALARS) {
620 6275 : NDR_CHECK(ndr_pull_align(ndr, 4));
621 6275 : NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->name));
622 6275 : NDR_CHECK(ndr_pull_nbt_qtype(ndr, NDR_SCALARS, &r->rr_type));
623 6275 : NDR_CHECK(ndr_pull_nbt_qclass(ndr, NDR_SCALARS, &r->rr_class));
624 6275 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ttl));
625 6275 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->rdata, r->rr_type));
626 6275 : NDR_CHECK(ndr_pull_nbt_rdata(ndr, NDR_SCALARS, &r->rdata));
627 6275 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
628 : }
629 6275 : if (ndr_flags & NDR_BUFFERS) {
630 : }
631 6275 : ndr->flags = _flags_save_STRUCT;
632 : }
633 6275 : return NDR_ERR_SUCCESS;
634 : }
635 :
636 0 : _PUBLIC_ void ndr_print_nbt_res_rec(struct ndr_print *ndr, const char *name, const struct nbt_res_rec *r)
637 : {
638 0 : ndr_print_struct(ndr, name, "nbt_res_rec");
639 0 : if (r == NULL) { ndr_print_null(ndr); return; }
640 : {
641 0 : uint32_t _flags_save_STRUCT = ndr->flags;
642 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
643 0 : ndr->depth++;
644 0 : ndr_print_nbt_name(ndr, "name", &r->name);
645 0 : ndr_print_nbt_qtype(ndr, "rr_type", r->rr_type);
646 0 : ndr_print_nbt_qclass(ndr, "rr_class", r->rr_class);
647 0 : ndr_print_uint32(ndr, "ttl", r->ttl);
648 0 : ndr_print_set_switch_value(ndr, &r->rdata, r->rr_type);
649 0 : ndr_print_nbt_rdata(ndr, "rdata", &r->rdata);
650 0 : ndr->depth--;
651 0 : ndr->flags = _flags_save_STRUCT;
652 : }
653 : }
654 :
655 10253 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_name_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_name_packet *r)
656 : {
657 : uint32_t cntr_questions_0;
658 : uint32_t cntr_answers_0;
659 : uint32_t cntr_nsrecs_0;
660 : uint32_t cntr_additional_0;
661 : {
662 10253 : uint32_t _flags_save_STRUCT = ndr->flags;
663 10253 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
664 10253 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
665 10253 : if (ndr_flags & NDR_SCALARS) {
666 10253 : NDR_CHECK(ndr_push_align(ndr, 4));
667 10253 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->name_trn_id));
668 10253 : NDR_CHECK(ndr_push_nbt_operation(ndr, NDR_SCALARS, r->operation));
669 10253 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->qdcount));
670 10253 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ancount));
671 10253 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nscount));
672 10253 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->arcount));
673 18902 : for (cntr_questions_0 = 0; cntr_questions_0 < (r->qdcount); cntr_questions_0++) {
674 8649 : NDR_CHECK(ndr_push_nbt_name_question(ndr, NDR_SCALARS, &r->questions[cntr_questions_0]));
675 : }
676 11857 : for (cntr_answers_0 = 0; cntr_answers_0 < (r->ancount); cntr_answers_0++) {
677 1604 : NDR_CHECK(ndr_push_nbt_res_rec(ndr, NDR_SCALARS, &r->answers[cntr_answers_0]));
678 : }
679 10253 : for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (r->nscount); cntr_nsrecs_0++) {
680 0 : NDR_CHECK(ndr_push_nbt_res_rec(ndr, NDR_SCALARS, &r->nsrecs[cntr_nsrecs_0]));
681 : }
682 11663 : for (cntr_additional_0 = 0; cntr_additional_0 < (r->arcount); cntr_additional_0++) {
683 1410 : NDR_CHECK(ndr_push_nbt_res_rec(ndr, NDR_SCALARS, &r->additional[cntr_additional_0]));
684 : }
685 : {
686 10253 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
687 10253 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
688 10253 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->padding));
689 10253 : ndr->flags = _flags_save_DATA_BLOB;
690 : }
691 10253 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
692 : }
693 10253 : if (ndr_flags & NDR_BUFFERS) {
694 : }
695 10253 : ndr->flags = _flags_save_STRUCT;
696 : }
697 10253 : return NDR_ERR_SUCCESS;
698 : }
699 :
700 12489 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_name_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_name_packet *r)
701 : {
702 12489 : uint32_t size_questions_0 = 0;
703 : uint32_t cntr_questions_0;
704 12489 : TALLOC_CTX *_mem_save_questions_0 = NULL;
705 12489 : uint32_t size_answers_0 = 0;
706 : uint32_t cntr_answers_0;
707 12489 : TALLOC_CTX *_mem_save_answers_0 = NULL;
708 12489 : uint32_t size_nsrecs_0 = 0;
709 : uint32_t cntr_nsrecs_0;
710 12489 : TALLOC_CTX *_mem_save_nsrecs_0 = NULL;
711 12489 : uint32_t size_additional_0 = 0;
712 : uint32_t cntr_additional_0;
713 12489 : TALLOC_CTX *_mem_save_additional_0 = NULL;
714 : {
715 12489 : uint32_t _flags_save_STRUCT = ndr->flags;
716 12489 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
717 12489 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
718 12489 : if (ndr_flags & NDR_SCALARS) {
719 12489 : NDR_CHECK(ndr_pull_align(ndr, 4));
720 12489 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_trn_id));
721 12489 : NDR_CHECK(ndr_pull_nbt_operation(ndr, NDR_SCALARS, &r->operation));
722 12489 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->qdcount));
723 12489 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ancount));
724 12489 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nscount));
725 12489 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->arcount));
726 12489 : size_questions_0 = r->qdcount;
727 12489 : NDR_PULL_ALLOC_N(ndr, r->questions, size_questions_0);
728 12489 : _mem_save_questions_0 = NDR_PULL_GET_MEM_CTX(ndr);
729 12489 : NDR_PULL_SET_MEM_CTX(ndr, r->questions, 0);
730 23587 : for (cntr_questions_0 = 0; cntr_questions_0 < (size_questions_0); cntr_questions_0++) {
731 11098 : NDR_CHECK(ndr_pull_nbt_name_question(ndr, NDR_SCALARS, &r->questions[cntr_questions_0]));
732 : }
733 12489 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_questions_0, 0);
734 12489 : size_answers_0 = r->ancount;
735 12489 : NDR_PULL_ALLOC_N(ndr, r->answers, size_answers_0);
736 12489 : _mem_save_answers_0 = NDR_PULL_GET_MEM_CTX(ndr);
737 12489 : NDR_PULL_SET_MEM_CTX(ndr, r->answers, 0);
738 13880 : for (cntr_answers_0 = 0; cntr_answers_0 < (size_answers_0); cntr_answers_0++) {
739 1391 : NDR_CHECK(ndr_pull_nbt_res_rec(ndr, NDR_SCALARS, &r->answers[cntr_answers_0]));
740 : }
741 12489 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_answers_0, 0);
742 12489 : size_nsrecs_0 = r->nscount;
743 12489 : NDR_PULL_ALLOC_N(ndr, r->nsrecs, size_nsrecs_0);
744 12489 : _mem_save_nsrecs_0 = NDR_PULL_GET_MEM_CTX(ndr);
745 12489 : NDR_PULL_SET_MEM_CTX(ndr, r->nsrecs, 0);
746 12489 : for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (size_nsrecs_0); cntr_nsrecs_0++) {
747 0 : NDR_CHECK(ndr_pull_nbt_res_rec(ndr, NDR_SCALARS, &r->nsrecs[cntr_nsrecs_0]));
748 : }
749 12489 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nsrecs_0, 0);
750 12489 : size_additional_0 = r->arcount;
751 12489 : NDR_PULL_ALLOC_N(ndr, r->additional, size_additional_0);
752 12489 : _mem_save_additional_0 = NDR_PULL_GET_MEM_CTX(ndr);
753 12489 : NDR_PULL_SET_MEM_CTX(ndr, r->additional, 0);
754 17373 : for (cntr_additional_0 = 0; cntr_additional_0 < (size_additional_0); cntr_additional_0++) {
755 4884 : NDR_CHECK(ndr_pull_nbt_res_rec(ndr, NDR_SCALARS, &r->additional[cntr_additional_0]));
756 : }
757 12489 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_additional_0, 0);
758 : {
759 12489 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
760 12489 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
761 12489 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->padding));
762 12489 : ndr->flags = _flags_save_DATA_BLOB;
763 : }
764 12489 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
765 : }
766 12489 : if (ndr_flags & NDR_BUFFERS) {
767 : }
768 12489 : ndr->flags = _flags_save_STRUCT;
769 : }
770 12489 : return NDR_ERR_SUCCESS;
771 : }
772 :
773 0 : static void ndr_print_flags_nbt_name_packet(struct ndr_print *ndr, const char *name, int unused, const struct nbt_name_packet *r)
774 : {
775 0 : ndr_print_nbt_name_packet(ndr, name, r);
776 0 : }
777 :
778 0 : _PUBLIC_ void ndr_print_nbt_name_packet(struct ndr_print *ndr, const char *name, const struct nbt_name_packet *r)
779 : {
780 : uint32_t cntr_questions_0;
781 : uint32_t cntr_answers_0;
782 : uint32_t cntr_nsrecs_0;
783 : uint32_t cntr_additional_0;
784 0 : ndr_print_struct(ndr, name, "nbt_name_packet");
785 0 : if (r == NULL) { ndr_print_null(ndr); return; }
786 : {
787 0 : uint32_t _flags_save_STRUCT = ndr->flags;
788 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
789 0 : ndr->depth++;
790 0 : ndr_print_uint16(ndr, "name_trn_id", r->name_trn_id);
791 0 : ndr_print_nbt_operation(ndr, "operation", r->operation);
792 0 : ndr_print_uint16(ndr, "qdcount", r->qdcount);
793 0 : ndr_print_uint16(ndr, "ancount", r->ancount);
794 0 : ndr_print_uint16(ndr, "nscount", r->nscount);
795 0 : ndr_print_uint16(ndr, "arcount", r->arcount);
796 0 : ndr->print(ndr, "%s: ARRAY(%d)", "questions", (int)r->qdcount);
797 0 : ndr->depth++;
798 0 : for (cntr_questions_0 = 0; cntr_questions_0 < (r->qdcount); cntr_questions_0++) {
799 0 : ndr_print_nbt_name_question(ndr, "questions", &r->questions[cntr_questions_0]);
800 : }
801 0 : ndr->depth--;
802 0 : ndr->print(ndr, "%s: ARRAY(%d)", "answers", (int)r->ancount);
803 0 : ndr->depth++;
804 0 : for (cntr_answers_0 = 0; cntr_answers_0 < (r->ancount); cntr_answers_0++) {
805 0 : ndr_print_nbt_res_rec(ndr, "answers", &r->answers[cntr_answers_0]);
806 : }
807 0 : ndr->depth--;
808 0 : ndr->print(ndr, "%s: ARRAY(%d)", "nsrecs", (int)r->nscount);
809 0 : ndr->depth++;
810 0 : for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (r->nscount); cntr_nsrecs_0++) {
811 0 : ndr_print_nbt_res_rec(ndr, "nsrecs", &r->nsrecs[cntr_nsrecs_0]);
812 : }
813 0 : ndr->depth--;
814 0 : ndr->print(ndr, "%s: ARRAY(%d)", "additional", (int)r->arcount);
815 0 : ndr->depth++;
816 0 : for (cntr_additional_0 = 0; cntr_additional_0 < (r->arcount); cntr_additional_0++) {
817 0 : ndr_print_nbt_res_rec(ndr, "additional", &r->additional[cntr_additional_0]);
818 : }
819 0 : ndr->depth--;
820 : {
821 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
822 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
823 0 : ndr_print_DATA_BLOB(ndr, "padding", r->padding);
824 0 : ndr->flags = _flags_save_DATA_BLOB;
825 : }
826 0 : ndr->depth--;
827 0 : ndr->flags = _flags_save_STRUCT;
828 : }
829 : }
830 :
831 20 : static enum ndr_err_code ndr_push_dgram_msg_type(struct ndr_push *ndr, int ndr_flags, enum dgram_msg_type r)
832 : {
833 20 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
834 20 : return NDR_ERR_SUCCESS;
835 : }
836 :
837 613 : static enum ndr_err_code ndr_pull_dgram_msg_type(struct ndr_pull *ndr, int ndr_flags, enum dgram_msg_type *r)
838 : {
839 : uint8_t v;
840 613 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
841 613 : *r = v;
842 613 : return NDR_ERR_SUCCESS;
843 : }
844 :
845 0 : _PUBLIC_ void ndr_print_dgram_msg_type(struct ndr_print *ndr, const char *name, enum dgram_msg_type r)
846 : {
847 0 : const char *val = NULL;
848 :
849 0 : switch (r) {
850 0 : case DGRAM_DIRECT_UNIQUE: val = "DGRAM_DIRECT_UNIQUE"; break;
851 0 : case DGRAM_DIRECT_GROUP: val = "DGRAM_DIRECT_GROUP"; break;
852 0 : case DGRAM_BCAST: val = "DGRAM_BCAST"; break;
853 0 : case DGRAM_ERROR: val = "DGRAM_ERROR"; break;
854 0 : case DGRAM_QUERY: val = "DGRAM_QUERY"; break;
855 0 : case DGRAM_QUERY_POSITIVE: val = "DGRAM_QUERY_POSITIVE"; break;
856 0 : case DGRAM_QUERY_NEGATIVE: val = "DGRAM_QUERY_NEGATIVE"; break;
857 : }
858 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
859 0 : }
860 :
861 20 : static enum ndr_err_code ndr_push_dgram_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r)
862 : {
863 20 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
864 20 : return NDR_ERR_SUCCESS;
865 : }
866 :
867 613 : static enum ndr_err_code ndr_pull_dgram_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
868 : {
869 : uint8_t v;
870 613 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
871 613 : *r = v;
872 613 : return NDR_ERR_SUCCESS;
873 : }
874 :
875 0 : _PUBLIC_ void ndr_print_dgram_flags(struct ndr_print *ndr, const char *name, uint8_t r)
876 : {
877 0 : ndr_print_uint8(ndr, name, r);
878 0 : ndr->depth++;
879 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DGRAM_FLAG_MORE", DGRAM_FLAG_MORE, r);
880 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DGRAM_FLAG_FIRST", DGRAM_FLAG_FIRST, r);
881 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DGRAM_FLAG_NODE_TYPE", DGRAM_FLAG_NODE_TYPE, r);
882 0 : ndr->depth--;
883 0 : }
884 :
885 20 : static enum ndr_err_code ndr_push_smb_command(struct ndr_push *ndr, int ndr_flags, enum smb_command r)
886 : {
887 20 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
888 20 : return NDR_ERR_SUCCESS;
889 : }
890 :
891 614 : static enum ndr_err_code ndr_pull_smb_command(struct ndr_pull *ndr, int ndr_flags, enum smb_command *r)
892 : {
893 : uint8_t v;
894 614 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
895 614 : *r = v;
896 614 : return NDR_ERR_SUCCESS;
897 : }
898 :
899 0 : _PUBLIC_ void ndr_print_smb_command(struct ndr_print *ndr, const char *name, enum smb_command r)
900 : {
901 0 : const char *val = NULL;
902 :
903 0 : switch (r) {
904 0 : case SMB_TRANSACTION: val = "SMB_TRANSACTION"; break;
905 : }
906 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
907 0 : }
908 :
909 20 : static enum ndr_err_code ndr_push_smb_trans_body(struct ndr_push *ndr, int ndr_flags, const struct smb_trans_body *r)
910 : {
911 20 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
912 20 : if (ndr_flags & NDR_SCALARS) {
913 20 : NDR_CHECK(ndr_push_align(ndr, 4));
914 20 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 17));
915 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->total_param_count));
916 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->total_data_count));
917 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_param_count));
918 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_data_count));
919 20 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->max_setup_count));
920 20 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pad));
921 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->trans_flags));
922 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
923 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
924 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->param_count));
925 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->param_offset));
926 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->data_count));
927 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->data_offset));
928 20 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 3));
929 20 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pad2));
930 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->opcode));
931 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->priority));
932 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->_class));
933 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->mailslot_name) + 1 + r->data.length));
934 : {
935 20 : uint32_t _flags_save_string = ndr->flags;
936 20 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
937 20 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name));
938 20 : ndr->flags = _flags_save_string;
939 : }
940 : {
941 20 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
942 20 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
943 20 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
944 20 : ndr->flags = _flags_save_DATA_BLOB;
945 : }
946 20 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
947 : }
948 20 : if (ndr_flags & NDR_BUFFERS) {
949 : }
950 20 : return NDR_ERR_SUCCESS;
951 : }
952 :
953 614 : static enum ndr_err_code ndr_pull_smb_trans_body(struct ndr_pull *ndr, int ndr_flags, struct smb_trans_body *r)
954 : {
955 614 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
956 614 : if (ndr_flags & NDR_SCALARS) {
957 614 : NDR_CHECK(ndr_pull_align(ndr, 4));
958 614 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->wct));
959 614 : if (r->wct < 17 || r->wct > 17) {
960 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
961 : }
962 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->total_param_count));
963 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->total_data_count));
964 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_param_count));
965 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_data_count));
966 614 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->max_setup_count));
967 614 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pad));
968 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->trans_flags));
969 614 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
970 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
971 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->param_count));
972 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->param_offset));
973 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data_count));
974 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data_offset));
975 614 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->setup_count));
976 614 : if (r->setup_count < 3 || r->setup_count > 3) {
977 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
978 : }
979 614 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pad2));
980 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->opcode));
981 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->priority));
982 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->_class));
983 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->byte_count));
984 : {
985 614 : uint32_t _flags_save_string = ndr->flags;
986 614 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
987 614 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name));
988 614 : ndr->flags = _flags_save_string;
989 : }
990 : {
991 614 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
992 614 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
993 614 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
994 614 : ndr->flags = _flags_save_DATA_BLOB;
995 : }
996 614 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
997 : }
998 614 : if (ndr_flags & NDR_BUFFERS) {
999 : }
1000 614 : return NDR_ERR_SUCCESS;
1001 : }
1002 :
1003 0 : _PUBLIC_ void ndr_print_smb_trans_body(struct ndr_print *ndr, const char *name, const struct smb_trans_body *r)
1004 : {
1005 0 : ndr_print_struct(ndr, name, "smb_trans_body");
1006 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1007 0 : ndr->depth++;
1008 0 : ndr_print_uint8(ndr, "wct", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?17:r->wct);
1009 0 : ndr_print_uint16(ndr, "total_param_count", r->total_param_count);
1010 0 : ndr_print_uint16(ndr, "total_data_count", r->total_data_count);
1011 0 : ndr_print_uint16(ndr, "max_param_count", r->max_param_count);
1012 0 : ndr_print_uint16(ndr, "max_data_count", r->max_data_count);
1013 0 : ndr_print_uint8(ndr, "max_setup_count", r->max_setup_count);
1014 0 : ndr_print_uint8(ndr, "pad", r->pad);
1015 0 : ndr_print_uint16(ndr, "trans_flags", r->trans_flags);
1016 0 : ndr_print_uint32(ndr, "timeout", r->timeout);
1017 0 : ndr_print_uint16(ndr, "reserved", r->reserved);
1018 0 : ndr_print_uint16(ndr, "param_count", r->param_count);
1019 0 : ndr_print_uint16(ndr, "param_offset", r->param_offset);
1020 0 : ndr_print_uint16(ndr, "data_count", r->data_count);
1021 0 : ndr_print_uint16(ndr, "data_offset", r->data_offset);
1022 0 : ndr_print_uint8(ndr, "setup_count", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->setup_count);
1023 0 : ndr_print_uint8(ndr, "pad2", r->pad2);
1024 0 : ndr_print_uint16(ndr, "opcode", r->opcode);
1025 0 : ndr_print_uint16(ndr, "priority", r->priority);
1026 0 : ndr_print_uint16(ndr, "_class", r->_class);
1027 0 : ndr_print_uint16(ndr, "byte_count", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->mailslot_name) + 1 + r->data.length:r->byte_count);
1028 : {
1029 0 : uint32_t _flags_save_string = ndr->flags;
1030 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1031 0 : ndr_print_string(ndr, "mailslot_name", r->mailslot_name);
1032 0 : ndr->flags = _flags_save_string;
1033 : }
1034 : {
1035 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
1036 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1037 0 : ndr_print_DATA_BLOB(ndr, "data", r->data);
1038 0 : ndr->flags = _flags_save_DATA_BLOB;
1039 : }
1040 0 : ndr->depth--;
1041 : }
1042 :
1043 20 : static enum ndr_err_code ndr_push_smb_body(struct ndr_push *ndr, int ndr_flags, const union smb_body *r)
1044 : {
1045 : uint32_t level;
1046 20 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1047 20 : if (ndr_flags & NDR_SCALARS) {
1048 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1049 20 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1050 20 : NDR_CHECK(ndr_push_union_align(ndr, 4));
1051 20 : switch (level) {
1052 20 : case SMB_TRANSACTION: {
1053 20 : NDR_CHECK(ndr_push_smb_trans_body(ndr, NDR_SCALARS, &r->trans));
1054 20 : break; }
1055 :
1056 0 : default:
1057 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1058 : }
1059 0 : }
1060 20 : if (ndr_flags & NDR_BUFFERS) {
1061 0 : if (!(ndr_flags & NDR_SCALARS)) {
1062 : /* We didn't get it above, and the token is not needed after this. */
1063 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1064 : }
1065 0 : switch (level) {
1066 0 : case SMB_TRANSACTION:
1067 0 : break;
1068 :
1069 0 : default:
1070 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1071 : }
1072 20 : }
1073 20 : return NDR_ERR_SUCCESS;
1074 : }
1075 :
1076 614 : static enum ndr_err_code ndr_pull_smb_body(struct ndr_pull *ndr, int ndr_flags, union smb_body *r)
1077 : {
1078 : uint32_t level;
1079 614 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1080 614 : if (ndr_flags & NDR_SCALARS) {
1081 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1082 614 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1083 614 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
1084 614 : switch (level) {
1085 614 : case SMB_TRANSACTION: {
1086 614 : NDR_CHECK(ndr_pull_smb_trans_body(ndr, NDR_SCALARS, &r->trans));
1087 614 : break; }
1088 :
1089 0 : default:
1090 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1091 : }
1092 0 : }
1093 614 : if (ndr_flags & NDR_BUFFERS) {
1094 0 : if (!(ndr_flags & NDR_SCALARS)) {
1095 : /* We didn't get it above, and the token is not needed after this. */
1096 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1097 : }
1098 0 : switch (level) {
1099 0 : case SMB_TRANSACTION:
1100 0 : break;
1101 :
1102 0 : default:
1103 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1104 : }
1105 322 : }
1106 614 : return NDR_ERR_SUCCESS;
1107 : }
1108 :
1109 0 : _PUBLIC_ void ndr_print_smb_body(struct ndr_print *ndr, const char *name, const union smb_body *r)
1110 : {
1111 : uint32_t level;
1112 0 : level = ndr_print_steal_switch_value(ndr, r);
1113 0 : ndr_print_union(ndr, name, level, "smb_body");
1114 0 : switch (level) {
1115 0 : case SMB_TRANSACTION:
1116 0 : ndr_print_smb_trans_body(ndr, "trans", &r->trans);
1117 0 : break;
1118 :
1119 0 : default:
1120 0 : ndr_print_bad_level(ndr, name, level);
1121 : }
1122 0 : }
1123 :
1124 20 : _PUBLIC_ enum ndr_err_code ndr_push_dgram_smb_packet(struct ndr_push *ndr, int ndr_flags, const struct dgram_smb_packet *r)
1125 : {
1126 : {
1127 20 : uint32_t _flags_save_STRUCT = ndr->flags;
1128 20 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1129 20 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1130 20 : if (ndr_flags & NDR_SCALARS) {
1131 20 : NDR_CHECK(ndr_push_align(ndr, 4));
1132 20 : NDR_CHECK(ndr_push_smb_command(ndr, NDR_SCALARS, r->smb_command));
1133 20 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->err_class));
1134 20 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pad));
1135 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->err_code));
1136 20 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->flags));
1137 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags2));
1138 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->pid_high));
1139 20 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->signature, 8));
1140 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
1141 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->tid));
1142 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->pid));
1143 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->vuid));
1144 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->mid));
1145 20 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->body, r->smb_command));
1146 20 : NDR_CHECK(ndr_push_smb_body(ndr, NDR_SCALARS, &r->body));
1147 20 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1148 : }
1149 20 : if (ndr_flags & NDR_BUFFERS) {
1150 : }
1151 20 : ndr->flags = _flags_save_STRUCT;
1152 : }
1153 20 : return NDR_ERR_SUCCESS;
1154 : }
1155 :
1156 614 : _PUBLIC_ enum ndr_err_code ndr_pull_dgram_smb_packet(struct ndr_pull *ndr, int ndr_flags, struct dgram_smb_packet *r)
1157 : {
1158 614 : uint32_t size_signature_0 = 0;
1159 : {
1160 614 : uint32_t _flags_save_STRUCT = ndr->flags;
1161 614 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1162 614 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1163 614 : if (ndr_flags & NDR_SCALARS) {
1164 614 : NDR_CHECK(ndr_pull_align(ndr, 4));
1165 614 : NDR_CHECK(ndr_pull_smb_command(ndr, NDR_SCALARS, &r->smb_command));
1166 614 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->err_class));
1167 614 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pad));
1168 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->err_code));
1169 614 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->flags));
1170 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags2));
1171 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->pid_high));
1172 614 : size_signature_0 = 8;
1173 614 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->signature, size_signature_0));
1174 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
1175 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->tid));
1176 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->pid));
1177 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->vuid));
1178 614 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->mid));
1179 614 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->body, r->smb_command));
1180 614 : NDR_CHECK(ndr_pull_smb_body(ndr, NDR_SCALARS, &r->body));
1181 614 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1182 : }
1183 614 : if (ndr_flags & NDR_BUFFERS) {
1184 : }
1185 614 : ndr->flags = _flags_save_STRUCT;
1186 : }
1187 614 : return NDR_ERR_SUCCESS;
1188 : }
1189 :
1190 0 : static void ndr_print_flags_dgram_smb_packet(struct ndr_print *ndr, const char *name, int unused, const struct dgram_smb_packet *r)
1191 : {
1192 0 : ndr_print_dgram_smb_packet(ndr, name, r);
1193 0 : }
1194 :
1195 0 : _PUBLIC_ void ndr_print_dgram_smb_packet(struct ndr_print *ndr, const char *name, const struct dgram_smb_packet *r)
1196 : {
1197 0 : ndr_print_struct(ndr, name, "dgram_smb_packet");
1198 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1199 : {
1200 0 : uint32_t _flags_save_STRUCT = ndr->flags;
1201 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1202 0 : ndr->depth++;
1203 0 : ndr_print_smb_command(ndr, "smb_command", r->smb_command);
1204 0 : ndr_print_uint8(ndr, "err_class", r->err_class);
1205 0 : ndr_print_uint8(ndr, "pad", r->pad);
1206 0 : ndr_print_uint16(ndr, "err_code", r->err_code);
1207 0 : ndr_print_uint8(ndr, "flags", r->flags);
1208 0 : ndr_print_uint16(ndr, "flags2", r->flags2);
1209 0 : ndr_print_uint16(ndr, "pid_high", r->pid_high);
1210 0 : ndr_print_array_uint8(ndr, "signature", r->signature, 8);
1211 0 : ndr_print_uint16(ndr, "reserved", r->reserved);
1212 0 : ndr_print_uint16(ndr, "tid", r->tid);
1213 0 : ndr_print_uint16(ndr, "pid", r->pid);
1214 0 : ndr_print_uint16(ndr, "vuid", r->vuid);
1215 0 : ndr_print_uint16(ndr, "mid", r->mid);
1216 0 : ndr_print_set_switch_value(ndr, &r->body, r->smb_command);
1217 0 : ndr_print_smb_body(ndr, "body", &r->body);
1218 0 : ndr->depth--;
1219 0 : ndr->flags = _flags_save_STRUCT;
1220 : }
1221 : }
1222 :
1223 20 : static enum ndr_err_code ndr_push_dgram_message_body(struct ndr_push *ndr, int ndr_flags, const union dgram_message_body *r)
1224 : {
1225 : uint32_t level;
1226 20 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1227 20 : if (ndr_flags & NDR_SCALARS) {
1228 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1229 20 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1230 20 : NDR_CHECK(ndr_push_union_align(ndr, 4));
1231 20 : switch (level) {
1232 20 : case DGRAM_SMB: {
1233 20 : NDR_CHECK(ndr_push_dgram_smb_packet(ndr, NDR_SCALARS, &r->smb));
1234 20 : break; }
1235 :
1236 0 : default:
1237 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1238 : }
1239 0 : }
1240 20 : if (ndr_flags & NDR_BUFFERS) {
1241 0 : if (!(ndr_flags & NDR_SCALARS)) {
1242 : /* We didn't get it above, and the token is not needed after this. */
1243 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1244 : }
1245 0 : switch (level) {
1246 0 : case DGRAM_SMB:
1247 0 : break;
1248 :
1249 0 : default:
1250 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1251 : }
1252 20 : }
1253 20 : return NDR_ERR_SUCCESS;
1254 : }
1255 :
1256 613 : static enum ndr_err_code ndr_pull_dgram_message_body(struct ndr_pull *ndr, int ndr_flags, union dgram_message_body *r)
1257 : {
1258 : uint32_t level;
1259 613 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1260 613 : if (ndr_flags & NDR_SCALARS) {
1261 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1262 613 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1263 613 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
1264 613 : switch (level) {
1265 613 : case DGRAM_SMB: {
1266 613 : NDR_CHECK(ndr_pull_dgram_smb_packet(ndr, NDR_SCALARS, &r->smb));
1267 613 : break; }
1268 :
1269 0 : default:
1270 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1271 : }
1272 0 : }
1273 613 : if (ndr_flags & NDR_BUFFERS) {
1274 0 : if (!(ndr_flags & NDR_SCALARS)) {
1275 : /* We didn't get it above, and the token is not needed after this. */
1276 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1277 : }
1278 0 : switch (level) {
1279 0 : case DGRAM_SMB:
1280 0 : break;
1281 :
1282 0 : default:
1283 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1284 : }
1285 321 : }
1286 613 : return NDR_ERR_SUCCESS;
1287 : }
1288 :
1289 0 : _PUBLIC_ void ndr_print_dgram_message_body(struct ndr_print *ndr, const char *name, const union dgram_message_body *r)
1290 : {
1291 : uint32_t level;
1292 0 : level = ndr_print_steal_switch_value(ndr, r);
1293 0 : ndr_print_union(ndr, name, level, "dgram_message_body");
1294 0 : switch (level) {
1295 0 : case DGRAM_SMB:
1296 0 : ndr_print_dgram_smb_packet(ndr, "smb", &r->smb);
1297 0 : break;
1298 :
1299 0 : default:
1300 0 : ndr_print_bad_level(ndr, name, level);
1301 : }
1302 0 : }
1303 :
1304 20 : static enum ndr_err_code ndr_push_dgram_message(struct ndr_push *ndr, int ndr_flags, const struct dgram_message *r)
1305 : {
1306 20 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1307 20 : if (ndr_flags & NDR_SCALARS) {
1308 20 : NDR_CHECK(ndr_push_align(ndr, 4));
1309 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
1310 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->offset));
1311 20 : NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->source_name));
1312 20 : NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
1313 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dgram_body_type));
1314 20 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->body, r->dgram_body_type));
1315 20 : NDR_CHECK(ndr_push_dgram_message_body(ndr, NDR_SCALARS, &r->body));
1316 20 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1317 : }
1318 20 : if (ndr_flags & NDR_BUFFERS) {
1319 : }
1320 20 : return NDR_ERR_SUCCESS;
1321 : }
1322 :
1323 613 : static enum ndr_err_code ndr_pull_dgram_message(struct ndr_pull *ndr, int ndr_flags, struct dgram_message *r)
1324 : {
1325 613 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1326 613 : if (ndr_flags & NDR_SCALARS) {
1327 613 : NDR_CHECK(ndr_pull_align(ndr, 4));
1328 613 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
1329 613 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->offset));
1330 613 : NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->source_name));
1331 613 : NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
1332 613 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dgram_body_type));
1333 613 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->body, r->dgram_body_type));
1334 613 : NDR_CHECK(ndr_pull_dgram_message_body(ndr, NDR_SCALARS, &r->body));
1335 613 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1336 : }
1337 613 : if (ndr_flags & NDR_BUFFERS) {
1338 : }
1339 613 : return NDR_ERR_SUCCESS;
1340 : }
1341 :
1342 0 : _PUBLIC_ void ndr_print_dgram_message(struct ndr_print *ndr, const char *name, const struct dgram_message *r)
1343 : {
1344 0 : ndr_print_struct(ndr, name, "dgram_message");
1345 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1346 0 : ndr->depth++;
1347 0 : ndr_print_uint16(ndr, "length", r->length);
1348 0 : ndr_print_uint16(ndr, "offset", r->offset);
1349 0 : ndr_print_nbt_name(ndr, "source_name", &r->source_name);
1350 0 : ndr_print_nbt_name(ndr, "dest_name", &r->dest_name);
1351 0 : ndr_print_uint32(ndr, "dgram_body_type", r->dgram_body_type);
1352 0 : ndr_print_set_switch_value(ndr, &r->body, r->dgram_body_type);
1353 0 : ndr_print_dgram_message_body(ndr, "body", &r->body);
1354 0 : ndr->depth--;
1355 : }
1356 :
1357 0 : static enum ndr_err_code ndr_push_dgram_err_code(struct ndr_push *ndr, int ndr_flags, enum dgram_err_code r)
1358 : {
1359 0 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
1360 0 : return NDR_ERR_SUCCESS;
1361 : }
1362 :
1363 0 : static enum ndr_err_code ndr_pull_dgram_err_code(struct ndr_pull *ndr, int ndr_flags, enum dgram_err_code *r)
1364 : {
1365 : uint8_t v;
1366 0 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
1367 0 : *r = v;
1368 0 : return NDR_ERR_SUCCESS;
1369 : }
1370 :
1371 0 : _PUBLIC_ void ndr_print_dgram_err_code(struct ndr_print *ndr, const char *name, enum dgram_err_code r)
1372 : {
1373 0 : const char *val = NULL;
1374 :
1375 0 : switch (r) {
1376 0 : case DGRAM_ERROR_NAME_NOT_PRESENT: val = "DGRAM_ERROR_NAME_NOT_PRESENT"; break;
1377 0 : case DGRAM_ERROR_INVALID_SOURCE: val = "DGRAM_ERROR_INVALID_SOURCE"; break;
1378 0 : case DGRAM_ERROR_INVALID_DEST: val = "DGRAM_ERROR_INVALID_DEST"; break;
1379 : }
1380 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1381 0 : }
1382 :
1383 20 : static enum ndr_err_code ndr_push_dgram_data(struct ndr_push *ndr, int ndr_flags, const union dgram_data *r)
1384 : {
1385 : uint32_t level;
1386 20 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1387 20 : if (ndr_flags & NDR_SCALARS) {
1388 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1389 20 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1390 20 : NDR_CHECK(ndr_push_union_align(ndr, 4));
1391 20 : switch (level) {
1392 20 : case DGRAM_DIRECT_UNIQUE: {
1393 20 : NDR_CHECK(ndr_push_dgram_message(ndr, NDR_SCALARS, &r->msg));
1394 20 : break; }
1395 :
1396 0 : case DGRAM_DIRECT_GROUP: {
1397 0 : NDR_CHECK(ndr_push_dgram_message(ndr, NDR_SCALARS, &r->msg));
1398 0 : break; }
1399 :
1400 0 : case DGRAM_BCAST: {
1401 0 : NDR_CHECK(ndr_push_dgram_message(ndr, NDR_SCALARS, &r->msg));
1402 0 : break; }
1403 :
1404 0 : case DGRAM_ERROR: {
1405 0 : NDR_CHECK(ndr_push_dgram_err_code(ndr, NDR_SCALARS, r->error));
1406 0 : break; }
1407 :
1408 0 : case DGRAM_QUERY: {
1409 0 : NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
1410 0 : break; }
1411 :
1412 0 : case DGRAM_QUERY_POSITIVE: {
1413 0 : NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
1414 0 : break; }
1415 :
1416 0 : case DGRAM_QUERY_NEGATIVE: {
1417 0 : NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
1418 0 : break; }
1419 :
1420 0 : default:
1421 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1422 : }
1423 0 : }
1424 20 : if (ndr_flags & NDR_BUFFERS) {
1425 0 : if (!(ndr_flags & NDR_SCALARS)) {
1426 : /* We didn't get it above, and the token is not needed after this. */
1427 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1428 : }
1429 0 : switch (level) {
1430 0 : case DGRAM_DIRECT_UNIQUE:
1431 0 : break;
1432 :
1433 0 : case DGRAM_DIRECT_GROUP:
1434 0 : break;
1435 :
1436 0 : case DGRAM_BCAST:
1437 0 : break;
1438 :
1439 0 : case DGRAM_ERROR:
1440 0 : break;
1441 :
1442 0 : case DGRAM_QUERY:
1443 0 : break;
1444 :
1445 0 : case DGRAM_QUERY_POSITIVE:
1446 0 : break;
1447 :
1448 0 : case DGRAM_QUERY_NEGATIVE:
1449 0 : break;
1450 :
1451 0 : default:
1452 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1453 : }
1454 20 : }
1455 20 : return NDR_ERR_SUCCESS;
1456 : }
1457 :
1458 613 : static enum ndr_err_code ndr_pull_dgram_data(struct ndr_pull *ndr, int ndr_flags, union dgram_data *r)
1459 : {
1460 : uint32_t level;
1461 613 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1462 613 : if (ndr_flags & NDR_SCALARS) {
1463 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1464 613 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1465 613 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
1466 613 : switch (level) {
1467 20 : case DGRAM_DIRECT_UNIQUE: {
1468 20 : NDR_CHECK(ndr_pull_dgram_message(ndr, NDR_SCALARS, &r->msg));
1469 20 : break; }
1470 :
1471 593 : case DGRAM_DIRECT_GROUP: {
1472 593 : NDR_CHECK(ndr_pull_dgram_message(ndr, NDR_SCALARS, &r->msg));
1473 593 : break; }
1474 :
1475 0 : case DGRAM_BCAST: {
1476 0 : NDR_CHECK(ndr_pull_dgram_message(ndr, NDR_SCALARS, &r->msg));
1477 0 : break; }
1478 :
1479 0 : case DGRAM_ERROR: {
1480 0 : NDR_CHECK(ndr_pull_dgram_err_code(ndr, NDR_SCALARS, &r->error));
1481 0 : break; }
1482 :
1483 0 : case DGRAM_QUERY: {
1484 0 : NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
1485 0 : break; }
1486 :
1487 0 : case DGRAM_QUERY_POSITIVE: {
1488 0 : NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
1489 0 : break; }
1490 :
1491 0 : case DGRAM_QUERY_NEGATIVE: {
1492 0 : NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
1493 0 : break; }
1494 :
1495 0 : default:
1496 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1497 : }
1498 0 : }
1499 613 : if (ndr_flags & NDR_BUFFERS) {
1500 0 : if (!(ndr_flags & NDR_SCALARS)) {
1501 : /* We didn't get it above, and the token is not needed after this. */
1502 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1503 : }
1504 0 : switch (level) {
1505 0 : case DGRAM_DIRECT_UNIQUE:
1506 0 : break;
1507 :
1508 0 : case DGRAM_DIRECT_GROUP:
1509 0 : break;
1510 :
1511 0 : case DGRAM_BCAST:
1512 0 : break;
1513 :
1514 0 : case DGRAM_ERROR:
1515 0 : break;
1516 :
1517 0 : case DGRAM_QUERY:
1518 0 : break;
1519 :
1520 0 : case DGRAM_QUERY_POSITIVE:
1521 0 : break;
1522 :
1523 0 : case DGRAM_QUERY_NEGATIVE:
1524 0 : break;
1525 :
1526 0 : default:
1527 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1528 : }
1529 321 : }
1530 613 : return NDR_ERR_SUCCESS;
1531 : }
1532 :
1533 0 : _PUBLIC_ void ndr_print_dgram_data(struct ndr_print *ndr, const char *name, const union dgram_data *r)
1534 : {
1535 : uint32_t level;
1536 0 : level = ndr_print_steal_switch_value(ndr, r);
1537 0 : ndr_print_union(ndr, name, level, "dgram_data");
1538 0 : switch (level) {
1539 0 : case DGRAM_DIRECT_UNIQUE:
1540 0 : ndr_print_dgram_message(ndr, "msg", &r->msg);
1541 0 : break;
1542 :
1543 0 : case DGRAM_DIRECT_GROUP:
1544 0 : ndr_print_dgram_message(ndr, "msg", &r->msg);
1545 0 : break;
1546 :
1547 0 : case DGRAM_BCAST:
1548 0 : ndr_print_dgram_message(ndr, "msg", &r->msg);
1549 0 : break;
1550 :
1551 0 : case DGRAM_ERROR:
1552 0 : ndr_print_dgram_err_code(ndr, "error", r->error);
1553 0 : break;
1554 :
1555 0 : case DGRAM_QUERY:
1556 0 : ndr_print_nbt_name(ndr, "dest_name", &r->dest_name);
1557 0 : break;
1558 :
1559 0 : case DGRAM_QUERY_POSITIVE:
1560 0 : ndr_print_nbt_name(ndr, "dest_name", &r->dest_name);
1561 0 : break;
1562 :
1563 0 : case DGRAM_QUERY_NEGATIVE:
1564 0 : ndr_print_nbt_name(ndr, "dest_name", &r->dest_name);
1565 0 : break;
1566 :
1567 0 : default:
1568 0 : ndr_print_bad_level(ndr, name, level);
1569 : }
1570 0 : }
1571 :
1572 20 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_dgram_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_dgram_packet *r)
1573 : {
1574 : {
1575 20 : uint32_t _flags_save_STRUCT = ndr->flags;
1576 20 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1577 20 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1578 20 : if (ndr_flags & NDR_SCALARS) {
1579 20 : NDR_CHECK(ndr_push_align(ndr, 4));
1580 20 : NDR_CHECK(ndr_push_dgram_msg_type(ndr, NDR_SCALARS, r->msg_type));
1581 20 : NDR_CHECK(ndr_push_dgram_flags(ndr, NDR_SCALARS, r->flags));
1582 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->dgram_id));
1583 20 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->src_addr));
1584 20 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->src_port));
1585 20 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->data, r->msg_type));
1586 20 : NDR_CHECK(ndr_push_dgram_data(ndr, NDR_SCALARS, &r->data));
1587 20 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1588 : }
1589 20 : if (ndr_flags & NDR_BUFFERS) {
1590 : }
1591 20 : ndr->flags = _flags_save_STRUCT;
1592 : }
1593 20 : return NDR_ERR_SUCCESS;
1594 : }
1595 :
1596 613 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_dgram_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_dgram_packet *r)
1597 : {
1598 : {
1599 613 : uint32_t _flags_save_STRUCT = ndr->flags;
1600 613 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1601 613 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1602 613 : if (ndr_flags & NDR_SCALARS) {
1603 613 : NDR_CHECK(ndr_pull_align(ndr, 4));
1604 613 : NDR_CHECK(ndr_pull_dgram_msg_type(ndr, NDR_SCALARS, &r->msg_type));
1605 613 : NDR_CHECK(ndr_pull_dgram_flags(ndr, NDR_SCALARS, &r->flags));
1606 613 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->dgram_id));
1607 613 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->src_addr));
1608 613 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->src_port));
1609 613 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->data, r->msg_type));
1610 613 : NDR_CHECK(ndr_pull_dgram_data(ndr, NDR_SCALARS, &r->data));
1611 613 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1612 : }
1613 613 : if (ndr_flags & NDR_BUFFERS) {
1614 : }
1615 613 : ndr->flags = _flags_save_STRUCT;
1616 : }
1617 613 : return NDR_ERR_SUCCESS;
1618 : }
1619 :
1620 0 : static void ndr_print_flags_nbt_dgram_packet(struct ndr_print *ndr, const char *name, int unused, const struct nbt_dgram_packet *r)
1621 : {
1622 0 : ndr_print_nbt_dgram_packet(ndr, name, r);
1623 0 : }
1624 :
1625 0 : _PUBLIC_ void ndr_print_nbt_dgram_packet(struct ndr_print *ndr, const char *name, const struct nbt_dgram_packet *r)
1626 : {
1627 0 : ndr_print_struct(ndr, name, "nbt_dgram_packet");
1628 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1629 : {
1630 0 : uint32_t _flags_save_STRUCT = ndr->flags;
1631 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1632 0 : ndr->depth++;
1633 0 : ndr_print_dgram_msg_type(ndr, "msg_type", r->msg_type);
1634 0 : ndr_print_dgram_flags(ndr, "flags", r->flags);
1635 0 : ndr_print_uint16(ndr, "dgram_id", r->dgram_id);
1636 0 : ndr_print_ipv4address(ndr, "src_addr", r->src_addr);
1637 0 : ndr_print_uint16(ndr, "src_port", r->src_port);
1638 0 : ndr_print_set_switch_value(ndr, &r->data, r->msg_type);
1639 0 : ndr_print_dgram_data(ndr, "data", &r->data);
1640 0 : ndr->depth--;
1641 0 : ndr->flags = _flags_save_STRUCT;
1642 : }
1643 : }
1644 :
1645 1140 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_sockaddr(struct ndr_push *ndr, int ndr_flags, const struct nbt_sockaddr *r)
1646 : {
1647 1140 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1648 1140 : if (ndr_flags & NDR_SCALARS) {
1649 1140 : NDR_CHECK(ndr_push_align(ndr, 4));
1650 1140 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sockaddr_family));
1651 : {
1652 1140 : uint32_t _flags_save_ipv4address = ndr->flags;
1653 1140 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
1654 1140 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->pdc_ip));
1655 1140 : ndr->flags = _flags_save_ipv4address;
1656 : }
1657 : {
1658 1140 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
1659 1140 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1660 1140 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->remaining));
1661 1140 : ndr->flags = _flags_save_DATA_BLOB;
1662 : }
1663 1140 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1664 : }
1665 1140 : if (ndr_flags & NDR_BUFFERS) {
1666 : }
1667 1140 : return NDR_ERR_SUCCESS;
1668 : }
1669 :
1670 264 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_sockaddr(struct ndr_pull *ndr, int ndr_flags, struct nbt_sockaddr *r)
1671 : {
1672 264 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1673 264 : if (ndr_flags & NDR_SCALARS) {
1674 264 : NDR_CHECK(ndr_pull_align(ndr, 4));
1675 264 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sockaddr_family));
1676 : {
1677 264 : uint32_t _flags_save_ipv4address = ndr->flags;
1678 264 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
1679 264 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->pdc_ip));
1680 264 : ndr->flags = _flags_save_ipv4address;
1681 : }
1682 : {
1683 264 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
1684 264 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1685 264 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->remaining));
1686 264 : ndr->flags = _flags_save_DATA_BLOB;
1687 : }
1688 264 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1689 : }
1690 264 : if (ndr_flags & NDR_BUFFERS) {
1691 : }
1692 264 : return NDR_ERR_SUCCESS;
1693 : }
1694 :
1695 0 : static void ndr_print_flags_nbt_sockaddr(struct ndr_print *ndr, const char *name, int unused, const struct nbt_sockaddr *r)
1696 : {
1697 0 : ndr_print_nbt_sockaddr(ndr, name, r);
1698 0 : }
1699 :
1700 2 : _PUBLIC_ void ndr_print_nbt_sockaddr(struct ndr_print *ndr, const char *name, const struct nbt_sockaddr *r)
1701 : {
1702 2 : ndr_print_struct(ndr, name, "nbt_sockaddr");
1703 2 : if (r == NULL) { ndr_print_null(ndr); return; }
1704 2 : ndr->depth++;
1705 2 : ndr_print_uint32(ndr, "sockaddr_family", r->sockaddr_family);
1706 : {
1707 2 : uint32_t _flags_save_ipv4address = ndr->flags;
1708 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
1709 2 : ndr_print_ipv4address(ndr, "pdc_ip", r->pdc_ip);
1710 2 : ndr->flags = _flags_save_ipv4address;
1711 : }
1712 : {
1713 2 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
1714 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1715 2 : ndr_print_DATA_BLOB(ndr, "remaining", r->remaining);
1716 2 : ndr->flags = _flags_save_DATA_BLOB;
1717 : }
1718 2 : ndr->depth--;
1719 : }
1720 :
1721 855 : _PUBLIC_ size_t ndr_size_nbt_sockaddr(const struct nbt_sockaddr *r, int flags)
1722 : {
1723 855 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_nbt_sockaddr);
1724 : }
1725 :
1726 1464 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_server_type(struct ndr_push *ndr, int ndr_flags, uint32_t r)
1727 : {
1728 1464 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1729 1464 : return NDR_ERR_SUCCESS;
1730 : }
1731 :
1732 1267 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_server_type(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
1733 : {
1734 : uint32_t v;
1735 1267 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1736 1267 : *r = v;
1737 1267 : return NDR_ERR_SUCCESS;
1738 : }
1739 :
1740 2 : _PUBLIC_ void ndr_print_nbt_server_type(struct ndr_print *ndr, const char *name, uint32_t r)
1741 : {
1742 2 : ndr_print_uint32(ndr, name, r);
1743 2 : ndr->depth++;
1744 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_PDC", NBT_SERVER_PDC, r);
1745 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_GC", NBT_SERVER_GC, r);
1746 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_LDAP", NBT_SERVER_LDAP, r);
1747 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_DS", NBT_SERVER_DS, r);
1748 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_KDC", NBT_SERVER_KDC, r);
1749 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_TIMESERV", NBT_SERVER_TIMESERV, r);
1750 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_CLOSEST", NBT_SERVER_CLOSEST, r);
1751 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_WRITABLE", NBT_SERVER_WRITABLE, r);
1752 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_GOOD_TIMESERV", NBT_SERVER_GOOD_TIMESERV, r);
1753 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_NDNC", NBT_SERVER_NDNC, r);
1754 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_SELECT_SECRET_DOMAIN_6", NBT_SERVER_SELECT_SECRET_DOMAIN_6, r);
1755 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_FULL_SECRET_DOMAIN_6", NBT_SERVER_FULL_SECRET_DOMAIN_6, r);
1756 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_ADS_WEB_SERVICE", NBT_SERVER_ADS_WEB_SERVICE, r);
1757 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_DS_8", NBT_SERVER_DS_8, r);
1758 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_HAS_DNS_NAME", NBT_SERVER_HAS_DNS_NAME, r);
1759 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_IS_DEFAULT_NC", NBT_SERVER_IS_DEFAULT_NC, r);
1760 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_FOREST_ROOT", NBT_SERVER_FOREST_ROOT, r);
1761 2 : ndr->depth--;
1762 2 : }
1763 :
1764 1606 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_nt_version_flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
1765 : {
1766 1606 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1767 1606 : return NDR_ERR_SUCCESS;
1768 : }
1769 :
1770 1409 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_nt_version_flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
1771 : {
1772 : uint32_t v;
1773 1409 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1774 1409 : *r = v;
1775 1409 : return NDR_ERR_SUCCESS;
1776 : }
1777 :
1778 2 : _PUBLIC_ void ndr_print_netlogon_nt_version_flags(struct ndr_print *ndr, const char *name, uint32_t r)
1779 : {
1780 2 : ndr_print_uint32(ndr, name, r);
1781 2 : ndr->depth++;
1782 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_1", NETLOGON_NT_VERSION_1, r);
1783 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_5", NETLOGON_NT_VERSION_5, r);
1784 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_5EX", NETLOGON_NT_VERSION_5EX, r);
1785 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_5EX_WITH_IP", NETLOGON_NT_VERSION_5EX_WITH_IP, r);
1786 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_WITH_CLOSEST_SITE", NETLOGON_NT_VERSION_WITH_CLOSEST_SITE, r);
1787 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_AVOID_NT4EMUL", NETLOGON_NT_VERSION_AVOID_NT4EMUL, r);
1788 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_PDC", NETLOGON_NT_VERSION_PDC, r);
1789 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_IP", NETLOGON_NT_VERSION_IP, r);
1790 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_LOCAL", NETLOGON_NT_VERSION_LOCAL, r);
1791 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_GC", NETLOGON_NT_VERSION_GC, r);
1792 2 : ndr->depth--;
1793 2 : }
1794 :
1795 1606 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_command(struct ndr_push *ndr, int ndr_flags, enum netlogon_command r)
1796 : {
1797 1606 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
1798 1606 : return NDR_ERR_SUCCESS;
1799 : }
1800 :
1801 1409 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_command(struct ndr_pull *ndr, int ndr_flags, enum netlogon_command *r)
1802 : {
1803 : uint16_t v;
1804 1409 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
1805 1409 : *r = v;
1806 1409 : return NDR_ERR_SUCCESS;
1807 : }
1808 :
1809 2 : _PUBLIC_ void ndr_print_netlogon_command(struct ndr_print *ndr, const char *name, enum netlogon_command r)
1810 : {
1811 2 : const char *val = NULL;
1812 :
1813 2 : switch (r) {
1814 0 : case LOGON_REQUEST: val = "LOGON_REQUEST"; break;
1815 0 : case LOGON_RESPONSE2: val = "LOGON_RESPONSE2"; break;
1816 0 : case LOGON_PRIMARY_QUERY: val = "LOGON_PRIMARY_QUERY"; break;
1817 0 : case NETLOGON_ANNOUNCE_UAS: val = "NETLOGON_ANNOUNCE_UAS"; break;
1818 0 : case NETLOGON_RESPONSE_FROM_PDC: val = "NETLOGON_RESPONSE_FROM_PDC"; break;
1819 0 : case LOGON_SAM_LOGON_REQUEST: val = "LOGON_SAM_LOGON_REQUEST"; break;
1820 0 : case LOGON_SAM_LOGON_RESPONSE: val = "LOGON_SAM_LOGON_RESPONSE"; break;
1821 0 : case LOGON_SAM_LOGON_PAUSE_RESPONSE: val = "LOGON_SAM_LOGON_PAUSE_RESPONSE"; break;
1822 0 : case LOGON_SAM_LOGON_USER_UNKNOWN: val = "LOGON_SAM_LOGON_USER_UNKNOWN"; break;
1823 2 : case LOGON_SAM_LOGON_RESPONSE_EX: val = "LOGON_SAM_LOGON_RESPONSE_EX"; break;
1824 0 : case LOGON_SAM_LOGON_PAUSE_RESPONSE_EX: val = "LOGON_SAM_LOGON_PAUSE_RESPONSE_EX"; break;
1825 0 : case LOGON_SAM_LOGON_USER_UNKNOWN_EX: val = "LOGON_SAM_LOGON_USER_UNKNOWN_EX"; break;
1826 : }
1827 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
1828 2 : }
1829 :
1830 0 : _PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_REQUEST(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_REQUEST *r)
1831 : {
1832 0 : ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_REQUEST");
1833 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1834 0 : ndr->depth++;
1835 0 : ndr_print_uint16(ndr, "request_count", r->request_count);
1836 : {
1837 0 : uint32_t _flags_save_string = ndr->flags;
1838 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1839 0 : ndr_print_string(ndr, "computer_name", r->computer_name);
1840 0 : ndr->flags = _flags_save_string;
1841 : }
1842 : {
1843 0 : uint32_t _flags_save_string = ndr->flags;
1844 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1845 0 : ndr_print_string(ndr, "user_name", r->user_name);
1846 0 : ndr->flags = _flags_save_string;
1847 : }
1848 : {
1849 0 : uint32_t _flags_save_string = ndr->flags;
1850 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1851 0 : ndr_print_string(ndr, "mailslot_name", r->mailslot_name);
1852 0 : ndr->flags = _flags_save_string;
1853 : }
1854 0 : ndr_print_uint32(ndr, "acct_control", r->acct_control);
1855 0 : ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size);
1856 : {
1857 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
1858 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
1859 0 : ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
1860 0 : ndr->flags = _flags_save_DATA_BLOB;
1861 : }
1862 0 : ndr_print_dom_sid0(ndr, "sid", &r->sid);
1863 0 : ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
1864 0 : ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
1865 0 : ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
1866 0 : ndr->depth--;
1867 : }
1868 :
1869 0 : static enum ndr_err_code ndr_push_NETLOGON_LOGON_REQUEST(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_LOGON_REQUEST *r)
1870 : {
1871 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1872 0 : if (ndr_flags & NDR_SCALARS) {
1873 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1874 : {
1875 0 : uint32_t _flags_save_string = ndr->flags;
1876 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1877 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name));
1878 0 : ndr->flags = _flags_save_string;
1879 : }
1880 : {
1881 0 : uint32_t _flags_save_string = ndr->flags;
1882 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1883 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
1884 0 : ndr->flags = _flags_save_string;
1885 : }
1886 : {
1887 0 : uint32_t _flags_save_string = ndr->flags;
1888 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1889 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name));
1890 0 : ndr->flags = _flags_save_string;
1891 : }
1892 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->request_count));
1893 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
1894 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
1895 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1896 : }
1897 0 : if (ndr_flags & NDR_BUFFERS) {
1898 : }
1899 0 : return NDR_ERR_SUCCESS;
1900 : }
1901 :
1902 0 : static enum ndr_err_code ndr_pull_NETLOGON_LOGON_REQUEST(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_LOGON_REQUEST *r)
1903 : {
1904 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1905 0 : if (ndr_flags & NDR_SCALARS) {
1906 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1907 : {
1908 0 : uint32_t _flags_save_string = ndr->flags;
1909 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1910 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name));
1911 0 : ndr->flags = _flags_save_string;
1912 : }
1913 : {
1914 0 : uint32_t _flags_save_string = ndr->flags;
1915 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1916 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
1917 0 : ndr->flags = _flags_save_string;
1918 : }
1919 : {
1920 0 : uint32_t _flags_save_string = ndr->flags;
1921 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1922 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name));
1923 0 : ndr->flags = _flags_save_string;
1924 : }
1925 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->request_count));
1926 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
1927 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
1928 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1929 : }
1930 0 : if (ndr_flags & NDR_BUFFERS) {
1931 : }
1932 0 : return NDR_ERR_SUCCESS;
1933 : }
1934 :
1935 0 : _PUBLIC_ void ndr_print_NETLOGON_LOGON_REQUEST(struct ndr_print *ndr, const char *name, const struct NETLOGON_LOGON_REQUEST *r)
1936 : {
1937 0 : ndr_print_struct(ndr, name, "NETLOGON_LOGON_REQUEST");
1938 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1939 0 : ndr->depth++;
1940 : {
1941 0 : uint32_t _flags_save_string = ndr->flags;
1942 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1943 0 : ndr_print_string(ndr, "computer_name", r->computer_name);
1944 0 : ndr->flags = _flags_save_string;
1945 : }
1946 : {
1947 0 : uint32_t _flags_save_string = ndr->flags;
1948 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1949 0 : ndr_print_string(ndr, "user_name", r->user_name);
1950 0 : ndr->flags = _flags_save_string;
1951 : }
1952 : {
1953 0 : uint32_t _flags_save_string = ndr->flags;
1954 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1955 0 : ndr_print_string(ndr, "mailslot_name", r->mailslot_name);
1956 0 : ndr->flags = _flags_save_string;
1957 : }
1958 0 : ndr_print_uint8(ndr, "request_count", r->request_count);
1959 0 : ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
1960 0 : ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
1961 0 : ndr->depth--;
1962 : }
1963 :
1964 128 : _PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r)
1965 : {
1966 : {
1967 128 : uint32_t _flags_save_STRUCT = ndr->flags;
1968 128 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
1969 128 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1970 128 : if (ndr_flags & NDR_SCALARS) {
1971 128 : NDR_CHECK(ndr_push_align(ndr, 4));
1972 128 : NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
1973 : {
1974 128 : uint32_t _flags_save_string = ndr->flags;
1975 128 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1976 128 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name));
1977 128 : ndr->flags = _flags_save_string;
1978 : }
1979 : {
1980 128 : uint32_t _flags_save_string = ndr->flags;
1981 128 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1982 128 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
1983 128 : ndr->flags = _flags_save_string;
1984 : }
1985 : {
1986 128 : uint32_t _flags_save_string = ndr->flags;
1987 128 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1988 128 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name));
1989 128 : ndr->flags = _flags_save_string;
1990 : }
1991 128 : NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
1992 128 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
1993 128 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
1994 128 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1995 : }
1996 128 : if (ndr_flags & NDR_BUFFERS) {
1997 : }
1998 128 : ndr->flags = _flags_save_STRUCT;
1999 : }
2000 128 : return NDR_ERR_SUCCESS;
2001 : }
2002 :
2003 127 : _PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r)
2004 : {
2005 : {
2006 127 : uint32_t _flags_save_STRUCT = ndr->flags;
2007 127 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2008 127 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2009 127 : if (ndr_flags & NDR_SCALARS) {
2010 127 : NDR_CHECK(ndr_pull_align(ndr, 4));
2011 127 : NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
2012 : {
2013 127 : uint32_t _flags_save_string = ndr->flags;
2014 127 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2015 127 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name));
2016 127 : ndr->flags = _flags_save_string;
2017 : }
2018 : {
2019 127 : uint32_t _flags_save_string = ndr->flags;
2020 127 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2021 127 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
2022 127 : ndr->flags = _flags_save_string;
2023 : }
2024 : {
2025 127 : uint32_t _flags_save_string = ndr->flags;
2026 127 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2027 127 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name));
2028 127 : ndr->flags = _flags_save_string;
2029 : }
2030 127 : NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version));
2031 127 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
2032 127 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
2033 127 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2034 : }
2035 127 : if (ndr_flags & NDR_BUFFERS) {
2036 : }
2037 127 : ndr->flags = _flags_save_STRUCT;
2038 : }
2039 127 : return NDR_ERR_SUCCESS;
2040 : }
2041 :
2042 0 : static void ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_print *ndr, const char *name, int unused, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r)
2043 : {
2044 0 : ndr_print_NETLOGON_SAM_LOGON_RESPONSE_NT40(ndr, name, r);
2045 0 : }
2046 :
2047 0 : _PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r)
2048 : {
2049 0 : ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_RESPONSE_NT40");
2050 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2051 : {
2052 0 : uint32_t _flags_save_STRUCT = ndr->flags;
2053 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2054 0 : ndr->depth++;
2055 0 : ndr_print_netlogon_command(ndr, "command", r->command);
2056 : {
2057 0 : uint32_t _flags_save_string = ndr->flags;
2058 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2059 0 : ndr_print_string(ndr, "pdc_name", r->pdc_name);
2060 0 : ndr->flags = _flags_save_string;
2061 : }
2062 : {
2063 0 : uint32_t _flags_save_string = ndr->flags;
2064 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2065 0 : ndr_print_string(ndr, "user_name", r->user_name);
2066 0 : ndr->flags = _flags_save_string;
2067 : }
2068 : {
2069 0 : uint32_t _flags_save_string = ndr->flags;
2070 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2071 0 : ndr_print_string(ndr, "domain_name", r->domain_name);
2072 0 : ndr->flags = _flags_save_string;
2073 : }
2074 0 : ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
2075 0 : ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
2076 0 : ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
2077 0 : ndr->depth--;
2078 0 : ndr->flags = _flags_save_STRUCT;
2079 : }
2080 : }
2081 :
2082 73 : _PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE *r)
2083 : {
2084 : {
2085 73 : uint32_t _flags_save_STRUCT = ndr->flags;
2086 73 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2087 73 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2088 73 : if (ndr_flags & NDR_SCALARS) {
2089 73 : NDR_CHECK(ndr_push_align(ndr, 4));
2090 73 : NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
2091 : {
2092 73 : uint32_t _flags_save_string = ndr->flags;
2093 73 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2094 73 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name));
2095 73 : ndr->flags = _flags_save_string;
2096 : }
2097 : {
2098 73 : uint32_t _flags_save_string = ndr->flags;
2099 73 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2100 73 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
2101 73 : ndr->flags = _flags_save_string;
2102 : }
2103 : {
2104 73 : uint32_t _flags_save_string = ndr->flags;
2105 73 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2106 73 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name));
2107 73 : ndr->flags = _flags_save_string;
2108 : }
2109 73 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid));
2110 73 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->zero_uuid));
2111 73 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest));
2112 73 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain));
2113 73 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name));
2114 73 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->pdc_ip));
2115 73 : NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type));
2116 73 : NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
2117 73 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
2118 73 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
2119 73 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2120 : }
2121 73 : if (ndr_flags & NDR_BUFFERS) {
2122 : }
2123 73 : ndr->flags = _flags_save_STRUCT;
2124 : }
2125 73 : return NDR_ERR_SUCCESS;
2126 : }
2127 :
2128 73 : _PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE *r)
2129 : {
2130 : {
2131 73 : uint32_t _flags_save_STRUCT = ndr->flags;
2132 73 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2133 73 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2134 73 : if (ndr_flags & NDR_SCALARS) {
2135 73 : NDR_CHECK(ndr_pull_align(ndr, 4));
2136 73 : NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
2137 : {
2138 73 : uint32_t _flags_save_string = ndr->flags;
2139 73 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2140 73 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name));
2141 73 : ndr->flags = _flags_save_string;
2142 : }
2143 : {
2144 73 : uint32_t _flags_save_string = ndr->flags;
2145 73 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2146 73 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
2147 73 : ndr->flags = _flags_save_string;
2148 : }
2149 : {
2150 73 : uint32_t _flags_save_string = ndr->flags;
2151 73 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2152 73 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name));
2153 73 : ndr->flags = _flags_save_string;
2154 : }
2155 73 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid));
2156 73 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->zero_uuid));
2157 73 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest));
2158 73 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain));
2159 73 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name));
2160 73 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->pdc_ip));
2161 73 : NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type));
2162 73 : NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version));
2163 73 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
2164 73 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
2165 73 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2166 : }
2167 73 : if (ndr_flags & NDR_BUFFERS) {
2168 : }
2169 73 : ndr->flags = _flags_save_STRUCT;
2170 : }
2171 73 : return NDR_ERR_SUCCESS;
2172 : }
2173 :
2174 0 : static void ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_print *ndr, const char *name, int unused, const struct NETLOGON_SAM_LOGON_RESPONSE *r)
2175 : {
2176 0 : ndr_print_NETLOGON_SAM_LOGON_RESPONSE(ndr, name, r);
2177 0 : }
2178 :
2179 0 : _PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE *r)
2180 : {
2181 0 : ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_RESPONSE");
2182 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2183 : {
2184 0 : uint32_t _flags_save_STRUCT = ndr->flags;
2185 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2186 0 : ndr->depth++;
2187 0 : ndr_print_netlogon_command(ndr, "command", r->command);
2188 : {
2189 0 : uint32_t _flags_save_string = ndr->flags;
2190 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2191 0 : ndr_print_string(ndr, "pdc_name", r->pdc_name);
2192 0 : ndr->flags = _flags_save_string;
2193 : }
2194 : {
2195 0 : uint32_t _flags_save_string = ndr->flags;
2196 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2197 0 : ndr_print_string(ndr, "user_name", r->user_name);
2198 0 : ndr->flags = _flags_save_string;
2199 : }
2200 : {
2201 0 : uint32_t _flags_save_string = ndr->flags;
2202 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2203 0 : ndr_print_string(ndr, "domain_name", r->domain_name);
2204 0 : ndr->flags = _flags_save_string;
2205 : }
2206 0 : ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid);
2207 0 : ndr_print_GUID(ndr, "zero_uuid", &r->zero_uuid);
2208 0 : ndr_print_nbt_string(ndr, "forest", r->forest);
2209 0 : ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain);
2210 0 : ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name);
2211 0 : ndr_print_ipv4address(ndr, "pdc_ip", r->pdc_ip);
2212 0 : ndr_print_nbt_server_type(ndr, "server_type", r->server_type);
2213 0 : ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
2214 0 : ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
2215 0 : ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
2216 0 : ndr->depth--;
2217 0 : ndr->flags = _flags_save_STRUCT;
2218 : }
2219 : }
2220 :
2221 26 : _PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r)
2222 : {
2223 : {
2224 26 : uint32_t _flags_save_STRUCT = ndr->flags;
2225 26 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2226 26 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2227 26 : if (ndr_flags & NDR_SCALARS) {
2228 26 : NDR_CHECK(ndr_push_align(ndr, 4));
2229 26 : NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
2230 26 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->sbz));
2231 26 : NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type));
2232 26 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid));
2233 26 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest));
2234 26 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain));
2235 26 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name));
2236 26 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->domain_name));
2237 26 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_name));
2238 26 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->user_name));
2239 26 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site));
2240 26 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site));
2241 26 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
2242 : {
2243 : struct ndr_push *_ndr_sockaddr;
2244 26 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
2245 26 : NDR_CHECK(ndr_push_nbt_sockaddr(_ndr_sockaddr, NDR_SCALARS, &r->sockaddr));
2246 26 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
2247 : }
2248 26 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->next_closest_site));
2249 26 : NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
2250 26 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
2251 26 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
2252 26 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2253 : }
2254 26 : if (ndr_flags & NDR_BUFFERS) {
2255 : }
2256 26 : ndr->flags = _flags_save_STRUCT;
2257 : }
2258 26 : return NDR_ERR_SUCCESS;
2259 : }
2260 :
2261 5 : _PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_EX *r)
2262 : {
2263 : {
2264 5 : uint32_t _flags_save_STRUCT = ndr->flags;
2265 5 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2266 5 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2267 5 : if (ndr_flags & NDR_SCALARS) {
2268 5 : NDR_CHECK(ndr_pull_align(ndr, 4));
2269 5 : NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
2270 5 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->sbz));
2271 5 : NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type));
2272 5 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid));
2273 5 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest));
2274 5 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain));
2275 5 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name));
2276 5 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->domain_name));
2277 5 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_name));
2278 5 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->user_name));
2279 5 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->server_site));
2280 5 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->client_site));
2281 5 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sockaddr_size));
2282 : {
2283 : struct ndr_pull *_ndr_sockaddr;
2284 5 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sockaddr, 0, r->sockaddr_size));
2285 5 : NDR_CHECK(ndr_pull_nbt_sockaddr(_ndr_sockaddr, NDR_SCALARS, &r->sockaddr));
2286 5 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sockaddr, 0, r->sockaddr_size));
2287 : }
2288 5 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->next_closest_site));
2289 5 : NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version));
2290 5 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
2291 5 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
2292 5 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2293 : }
2294 5 : if (ndr_flags & NDR_BUFFERS) {
2295 : }
2296 5 : ndr->flags = _flags_save_STRUCT;
2297 : }
2298 5 : return NDR_ERR_SUCCESS;
2299 : }
2300 :
2301 0 : static void ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_print *ndr, const char *name, int unused, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r)
2302 : {
2303 0 : ndr_print_NETLOGON_SAM_LOGON_RESPONSE_EX(ndr, name, r);
2304 0 : }
2305 :
2306 2 : _PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r)
2307 : {
2308 2 : ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_RESPONSE_EX");
2309 2 : if (r == NULL) { ndr_print_null(ndr); return; }
2310 : {
2311 2 : uint32_t _flags_save_STRUCT = ndr->flags;
2312 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2313 2 : ndr->depth++;
2314 2 : ndr_print_netlogon_command(ndr, "command", r->command);
2315 2 : ndr_print_uint16(ndr, "sbz", r->sbz);
2316 2 : ndr_print_nbt_server_type(ndr, "server_type", r->server_type);
2317 2 : ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid);
2318 2 : ndr_print_nbt_string(ndr, "forest", r->forest);
2319 2 : ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain);
2320 2 : ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name);
2321 2 : ndr_print_nbt_string(ndr, "domain_name", r->domain_name);
2322 2 : ndr_print_nbt_string(ndr, "pdc_name", r->pdc_name);
2323 2 : ndr_print_nbt_string(ndr, "user_name", r->user_name);
2324 2 : ndr_print_nbt_string(ndr, "server_site", r->server_site);
2325 2 : ndr_print_nbt_string(ndr, "client_site", r->client_site);
2326 2 : ndr_print_uint8(ndr, "sockaddr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags):r->sockaddr_size);
2327 2 : ndr_print_nbt_sockaddr(ndr, "sockaddr", &r->sockaddr);
2328 2 : ndr_print_nbt_string(ndr, "next_closest_site", r->next_closest_site);
2329 2 : ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
2330 2 : ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
2331 2 : ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
2332 2 : ndr->depth--;
2333 2 : ndr->flags = _flags_save_STRUCT;
2334 : }
2335 : }
2336 :
2337 3 : static enum ndr_err_code ndr_push_nbt_netlogon_query_for_pdc(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_query_for_pdc *r)
2338 : {
2339 3 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2340 3 : if (ndr_flags & NDR_SCALARS) {
2341 3 : NDR_CHECK(ndr_push_align(ndr, 4));
2342 : {
2343 3 : uint32_t _flags_save_string = ndr->flags;
2344 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2345 3 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name));
2346 3 : ndr->flags = _flags_save_string;
2347 : }
2348 : {
2349 3 : uint32_t _flags_save_string = ndr->flags;
2350 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2351 3 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name));
2352 3 : ndr->flags = _flags_save_string;
2353 : }
2354 : {
2355 3 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
2356 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
2357 3 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2358 3 : ndr->flags = _flags_save_DATA_BLOB;
2359 : }
2360 : {
2361 3 : uint32_t _flags_save_string = ndr->flags;
2362 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2363 3 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_name));
2364 3 : ndr->flags = _flags_save_string;
2365 : }
2366 3 : NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
2367 3 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
2368 3 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
2369 3 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2370 : }
2371 3 : if (ndr_flags & NDR_BUFFERS) {
2372 : }
2373 3 : return NDR_ERR_SUCCESS;
2374 : }
2375 :
2376 3 : static enum ndr_err_code ndr_pull_nbt_netlogon_query_for_pdc(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_query_for_pdc *r)
2377 : {
2378 3 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2379 3 : if (ndr_flags & NDR_SCALARS) {
2380 3 : NDR_CHECK(ndr_pull_align(ndr, 4));
2381 : {
2382 3 : uint32_t _flags_save_string = ndr->flags;
2383 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2384 3 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name));
2385 3 : ndr->flags = _flags_save_string;
2386 : }
2387 : {
2388 3 : uint32_t _flags_save_string = ndr->flags;
2389 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2390 3 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name));
2391 3 : ndr->flags = _flags_save_string;
2392 : }
2393 : {
2394 3 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
2395 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
2396 3 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2397 3 : ndr->flags = _flags_save_DATA_BLOB;
2398 : }
2399 : {
2400 3 : uint32_t _flags_save_string = ndr->flags;
2401 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2402 3 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_name));
2403 3 : ndr->flags = _flags_save_string;
2404 : }
2405 3 : NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version));
2406 3 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
2407 3 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
2408 3 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2409 : }
2410 3 : if (ndr_flags & NDR_BUFFERS) {
2411 : }
2412 3 : return NDR_ERR_SUCCESS;
2413 : }
2414 :
2415 0 : _PUBLIC_ void ndr_print_nbt_netlogon_query_for_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc *r)
2416 : {
2417 0 : ndr_print_struct(ndr, name, "nbt_netlogon_query_for_pdc");
2418 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2419 0 : ndr->depth++;
2420 : {
2421 0 : uint32_t _flags_save_string = ndr->flags;
2422 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2423 0 : ndr_print_string(ndr, "computer_name", r->computer_name);
2424 0 : ndr->flags = _flags_save_string;
2425 : }
2426 : {
2427 0 : uint32_t _flags_save_string = ndr->flags;
2428 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2429 0 : ndr_print_string(ndr, "mailslot_name", r->mailslot_name);
2430 0 : ndr->flags = _flags_save_string;
2431 : }
2432 : {
2433 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
2434 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
2435 0 : ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2436 0 : ndr->flags = _flags_save_DATA_BLOB;
2437 : }
2438 : {
2439 0 : uint32_t _flags_save_string = ndr->flags;
2440 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2441 0 : ndr_print_string(ndr, "unicode_name", r->unicode_name);
2442 0 : ndr->flags = _flags_save_string;
2443 : }
2444 0 : ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
2445 0 : ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
2446 0 : ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
2447 0 : ndr->depth--;
2448 : }
2449 :
2450 3 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_response_from_pdc(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_response_from_pdc *r)
2451 : {
2452 3 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2453 3 : if (ndr_flags & NDR_SCALARS) {
2454 3 : NDR_CHECK(ndr_push_align(ndr, 4));
2455 3 : NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
2456 : {
2457 3 : uint32_t _flags_save_string = ndr->flags;
2458 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2459 3 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name));
2460 3 : ndr->flags = _flags_save_string;
2461 : }
2462 : {
2463 3 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
2464 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
2465 3 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2466 3 : ndr->flags = _flags_save_DATA_BLOB;
2467 : }
2468 : {
2469 3 : uint32_t _flags_save_string = ndr->flags;
2470 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2471 3 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_pdc_name));
2472 3 : ndr->flags = _flags_save_string;
2473 : }
2474 : {
2475 3 : uint32_t _flags_save_string = ndr->flags;
2476 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2477 3 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name));
2478 3 : ndr->flags = _flags_save_string;
2479 : }
2480 3 : NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
2481 3 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
2482 3 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
2483 3 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2484 : }
2485 3 : if (ndr_flags & NDR_BUFFERS) {
2486 : }
2487 3 : return NDR_ERR_SUCCESS;
2488 : }
2489 :
2490 3 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_response_from_pdc(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_response_from_pdc *r)
2491 : {
2492 3 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2493 3 : if (ndr_flags & NDR_SCALARS) {
2494 3 : NDR_CHECK(ndr_pull_align(ndr, 4));
2495 3 : NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
2496 : {
2497 3 : uint32_t _flags_save_string = ndr->flags;
2498 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2499 3 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name));
2500 3 : ndr->flags = _flags_save_string;
2501 : }
2502 : {
2503 3 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
2504 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
2505 3 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2506 3 : ndr->flags = _flags_save_DATA_BLOB;
2507 : }
2508 : {
2509 3 : uint32_t _flags_save_string = ndr->flags;
2510 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2511 3 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_pdc_name));
2512 3 : ndr->flags = _flags_save_string;
2513 : }
2514 : {
2515 3 : uint32_t _flags_save_string = ndr->flags;
2516 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2517 3 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name));
2518 3 : ndr->flags = _flags_save_string;
2519 : }
2520 3 : NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version));
2521 3 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
2522 3 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
2523 3 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2524 : }
2525 3 : if (ndr_flags & NDR_BUFFERS) {
2526 : }
2527 3 : return NDR_ERR_SUCCESS;
2528 : }
2529 :
2530 0 : static void ndr_print_flags_nbt_netlogon_response_from_pdc(struct ndr_print *ndr, const char *name, int unused, const struct nbt_netlogon_response_from_pdc *r)
2531 : {
2532 0 : ndr_print_nbt_netlogon_response_from_pdc(ndr, name, r);
2533 0 : }
2534 :
2535 0 : _PUBLIC_ void ndr_print_nbt_netlogon_response_from_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc *r)
2536 : {
2537 0 : ndr_print_struct(ndr, name, "nbt_netlogon_response_from_pdc");
2538 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2539 0 : ndr->depth++;
2540 0 : ndr_print_netlogon_command(ndr, "command", r->command);
2541 : {
2542 0 : uint32_t _flags_save_string = ndr->flags;
2543 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2544 0 : ndr_print_string(ndr, "pdc_name", r->pdc_name);
2545 0 : ndr->flags = _flags_save_string;
2546 : }
2547 : {
2548 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
2549 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
2550 0 : ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2551 0 : ndr->flags = _flags_save_DATA_BLOB;
2552 : }
2553 : {
2554 0 : uint32_t _flags_save_string = ndr->flags;
2555 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2556 0 : ndr_print_string(ndr, "unicode_pdc_name", r->unicode_pdc_name);
2557 0 : ndr->flags = _flags_save_string;
2558 : }
2559 : {
2560 0 : uint32_t _flags_save_string = ndr->flags;
2561 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2562 0 : ndr_print_string(ndr, "domain_name", r->domain_name);
2563 0 : ndr->flags = _flags_save_string;
2564 : }
2565 0 : ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
2566 0 : ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
2567 0 : ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
2568 0 : ndr->depth--;
2569 : }
2570 :
2571 0 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_response2(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_response2 *r)
2572 : {
2573 : {
2574 0 : uint32_t _flags_save_STRUCT = ndr->flags;
2575 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2576 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2577 0 : if (ndr_flags & NDR_SCALARS) {
2578 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2579 0 : NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
2580 : {
2581 0 : uint32_t _flags_save_string = ndr->flags;
2582 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2583 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name));
2584 0 : ndr->flags = _flags_save_string;
2585 : }
2586 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
2587 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2588 : }
2589 0 : if (ndr_flags & NDR_BUFFERS) {
2590 : }
2591 0 : ndr->flags = _flags_save_STRUCT;
2592 : }
2593 0 : return NDR_ERR_SUCCESS;
2594 : }
2595 :
2596 0 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_response2(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_response2 *r)
2597 : {
2598 : {
2599 0 : uint32_t _flags_save_STRUCT = ndr->flags;
2600 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2601 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2602 0 : if (ndr_flags & NDR_SCALARS) {
2603 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2604 0 : NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
2605 : {
2606 0 : uint32_t _flags_save_string = ndr->flags;
2607 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2608 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name));
2609 0 : ndr->flags = _flags_save_string;
2610 : }
2611 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
2612 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2613 : }
2614 0 : if (ndr_flags & NDR_BUFFERS) {
2615 : }
2616 0 : ndr->flags = _flags_save_STRUCT;
2617 : }
2618 0 : return NDR_ERR_SUCCESS;
2619 : }
2620 :
2621 0 : static void ndr_print_flags_nbt_netlogon_response2(struct ndr_print *ndr, const char *name, int unused, const struct nbt_netlogon_response2 *r)
2622 : {
2623 0 : ndr_print_nbt_netlogon_response2(ndr, name, r);
2624 0 : }
2625 :
2626 0 : _PUBLIC_ void ndr_print_nbt_netlogon_response2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response2 *r)
2627 : {
2628 0 : ndr_print_struct(ndr, name, "nbt_netlogon_response2");
2629 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2630 : {
2631 0 : uint32_t _flags_save_STRUCT = ndr->flags;
2632 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
2633 0 : ndr->depth++;
2634 0 : ndr_print_netlogon_command(ndr, "command", r->command);
2635 : {
2636 0 : uint32_t _flags_save_string = ndr->flags;
2637 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2638 0 : ndr_print_string(ndr, "pdc_name", r->pdc_name);
2639 0 : ndr->flags = _flags_save_string;
2640 : }
2641 0 : ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
2642 0 : ndr->depth--;
2643 0 : ndr->flags = _flags_save_STRUCT;
2644 : }
2645 : }
2646 :
2647 0 : static enum ndr_err_code ndr_push_nbt_db_change_info(struct ndr_push *ndr, int ndr_flags, const struct nbt_db_change_info *r)
2648 : {
2649 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2650 0 : if (ndr_flags & NDR_SCALARS) {
2651 0 : NDR_CHECK(ndr_push_align(ndr, 8));
2652 0 : NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->db_index));
2653 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->serial));
2654 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->timestamp));
2655 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2656 : }
2657 0 : if (ndr_flags & NDR_BUFFERS) {
2658 : }
2659 0 : return NDR_ERR_SUCCESS;
2660 : }
2661 :
2662 0 : static enum ndr_err_code ndr_pull_nbt_db_change_info(struct ndr_pull *ndr, int ndr_flags, struct nbt_db_change_info *r)
2663 : {
2664 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2665 0 : if (ndr_flags & NDR_SCALARS) {
2666 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
2667 0 : NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->db_index));
2668 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->serial));
2669 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->timestamp));
2670 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2671 : }
2672 0 : if (ndr_flags & NDR_BUFFERS) {
2673 : }
2674 0 : return NDR_ERR_SUCCESS;
2675 : }
2676 :
2677 0 : _PUBLIC_ void ndr_print_nbt_db_change_info(struct ndr_print *ndr, const char *name, const struct nbt_db_change_info *r)
2678 : {
2679 0 : ndr_print_struct(ndr, name, "nbt_db_change_info");
2680 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2681 0 : ndr->depth++;
2682 0 : ndr_print_netr_SamDatabaseID(ndr, "db_index", r->db_index);
2683 0 : ndr_print_hyper(ndr, "serial", r->serial);
2684 0 : ndr_print_NTTIME(ndr, "timestamp", r->timestamp);
2685 0 : ndr->depth--;
2686 : }
2687 :
2688 0 : static enum ndr_err_code ndr_push_NETLOGON_DB_CHANGE(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_DB_CHANGE *r)
2689 : {
2690 : uint32_t cntr_dbchange_0;
2691 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2692 0 : if (ndr_flags & NDR_SCALARS) {
2693 0 : NDR_CHECK(ndr_push_align(ndr, 8));
2694 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_lo));
2695 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp));
2696 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pulse));
2697 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->random));
2698 : {
2699 0 : uint32_t _flags_save_string = ndr->flags;
2700 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2701 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name));
2702 0 : ndr->flags = _flags_save_string;
2703 : }
2704 : {
2705 0 : uint32_t _flags_save_string = ndr->flags;
2706 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2707 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain));
2708 0 : ndr->flags = _flags_save_string;
2709 : }
2710 : {
2711 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
2712 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
2713 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2714 0 : ndr->flags = _flags_save_DATA_BLOB;
2715 : }
2716 : {
2717 0 : uint32_t _flags_save_string = ndr->flags;
2718 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2719 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_pdc_name));
2720 0 : ndr->flags = _flags_save_string;
2721 : }
2722 : {
2723 0 : uint32_t _flags_save_string = ndr->flags;
2724 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2725 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_domain));
2726 0 : ndr->flags = _flags_save_string;
2727 : }
2728 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->db_count));
2729 0 : for (cntr_dbchange_0 = 0; cntr_dbchange_0 < (r->db_count); cntr_dbchange_0++) {
2730 0 : NDR_CHECK(ndr_push_nbt_db_change_info(ndr, NDR_SCALARS, &r->dbchange[cntr_dbchange_0]));
2731 : }
2732 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->sid, ndr->flags)));
2733 : {
2734 : struct ndr_push *_ndr_sid;
2735 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
2736 0 : NDR_CHECK(ndr_push_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
2737 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
2738 : }
2739 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_format_version));
2740 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_token));
2741 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2742 : }
2743 0 : if (ndr_flags & NDR_BUFFERS) {
2744 : }
2745 0 : return NDR_ERR_SUCCESS;
2746 : }
2747 :
2748 0 : static enum ndr_err_code ndr_pull_NETLOGON_DB_CHANGE(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_DB_CHANGE *r)
2749 : {
2750 0 : uint32_t size_dbchange_0 = 0;
2751 : uint32_t cntr_dbchange_0;
2752 0 : TALLOC_CTX *_mem_save_dbchange_0 = NULL;
2753 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2754 0 : if (ndr_flags & NDR_SCALARS) {
2755 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
2756 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_lo));
2757 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp));
2758 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pulse));
2759 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->random));
2760 : {
2761 0 : uint32_t _flags_save_string = ndr->flags;
2762 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2763 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name));
2764 0 : ndr->flags = _flags_save_string;
2765 : }
2766 : {
2767 0 : uint32_t _flags_save_string = ndr->flags;
2768 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2769 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain));
2770 0 : ndr->flags = _flags_save_string;
2771 : }
2772 : {
2773 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
2774 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
2775 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2776 0 : ndr->flags = _flags_save_DATA_BLOB;
2777 : }
2778 : {
2779 0 : uint32_t _flags_save_string = ndr->flags;
2780 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2781 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_pdc_name));
2782 0 : ndr->flags = _flags_save_string;
2783 : }
2784 : {
2785 0 : uint32_t _flags_save_string = ndr->flags;
2786 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2787 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_domain));
2788 0 : ndr->flags = _flags_save_string;
2789 : }
2790 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->db_count));
2791 0 : size_dbchange_0 = r->db_count;
2792 0 : NDR_PULL_ALLOC_N(ndr, r->dbchange, size_dbchange_0);
2793 0 : _mem_save_dbchange_0 = NDR_PULL_GET_MEM_CTX(ndr);
2794 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dbchange, 0);
2795 0 : for (cntr_dbchange_0 = 0; cntr_dbchange_0 < (size_dbchange_0); cntr_dbchange_0++) {
2796 0 : NDR_CHECK(ndr_pull_nbt_db_change_info(ndr, NDR_SCALARS, &r->dbchange[cntr_dbchange_0]));
2797 : }
2798 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dbchange_0, 0);
2799 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_size));
2800 : {
2801 : struct ndr_pull *_ndr_sid;
2802 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sid, 0, r->sid_size));
2803 0 : NDR_CHECK(ndr_pull_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
2804 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sid, 0, r->sid_size));
2805 : }
2806 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_format_version));
2807 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_token));
2808 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2809 : }
2810 0 : if (ndr_flags & NDR_BUFFERS) {
2811 : }
2812 0 : return NDR_ERR_SUCCESS;
2813 : }
2814 :
2815 0 : _PUBLIC_ void ndr_print_NETLOGON_DB_CHANGE(struct ndr_print *ndr, const char *name, const struct NETLOGON_DB_CHANGE *r)
2816 : {
2817 : uint32_t cntr_dbchange_0;
2818 0 : ndr_print_struct(ndr, name, "NETLOGON_DB_CHANGE");
2819 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2820 0 : ndr->depth++;
2821 0 : ndr_print_uint32(ndr, "serial_lo", r->serial_lo);
2822 0 : ndr_print_time_t(ndr, "timestamp", r->timestamp);
2823 0 : ndr_print_uint32(ndr, "pulse", r->pulse);
2824 0 : ndr_print_uint32(ndr, "random", r->random);
2825 : {
2826 0 : uint32_t _flags_save_string = ndr->flags;
2827 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2828 0 : ndr_print_string(ndr, "pdc_name", r->pdc_name);
2829 0 : ndr->flags = _flags_save_string;
2830 : }
2831 : {
2832 0 : uint32_t _flags_save_string = ndr->flags;
2833 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
2834 0 : ndr_print_string(ndr, "domain", r->domain);
2835 0 : ndr->flags = _flags_save_string;
2836 : }
2837 : {
2838 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
2839 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
2840 0 : ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2841 0 : ndr->flags = _flags_save_DATA_BLOB;
2842 : }
2843 : {
2844 0 : uint32_t _flags_save_string = ndr->flags;
2845 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2846 0 : ndr_print_string(ndr, "unicode_pdc_name", r->unicode_pdc_name);
2847 0 : ndr->flags = _flags_save_string;
2848 : }
2849 : {
2850 0 : uint32_t _flags_save_string = ndr->flags;
2851 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2852 0 : ndr_print_string(ndr, "unicode_domain", r->unicode_domain);
2853 0 : ndr->flags = _flags_save_string;
2854 : }
2855 0 : ndr_print_uint32(ndr, "db_count", r->db_count);
2856 0 : ndr->print(ndr, "%s: ARRAY(%d)", "dbchange", (int)r->db_count);
2857 0 : ndr->depth++;
2858 0 : for (cntr_dbchange_0 = 0; cntr_dbchange_0 < (r->db_count); cntr_dbchange_0++) {
2859 0 : ndr_print_nbt_db_change_info(ndr, "dbchange", &r->dbchange[cntr_dbchange_0]);
2860 : }
2861 0 : ndr->depth--;
2862 0 : ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size);
2863 0 : ndr_print_dom_sid0(ndr, "sid", &r->sid);
2864 0 : ndr_print_uint32(ndr, "message_format_version", r->message_format_version);
2865 0 : ndr_print_uint32(ndr, "message_token", r->message_token);
2866 0 : ndr->depth--;
2867 : }
2868 :
2869 22 : static enum ndr_err_code ndr_push_nbt_netlogon_request(struct ndr_push *ndr, int ndr_flags, const union nbt_netlogon_request *r)
2870 : {
2871 : uint32_t level;
2872 22 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2873 22 : if (ndr_flags & NDR_SCALARS) {
2874 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2875 11 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2876 11 : NDR_CHECK(ndr_push_union_align(ndr, 8));
2877 11 : switch (level) {
2878 0 : case LOGON_REQUEST: {
2879 0 : NDR_CHECK(ndr_push_NETLOGON_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon0));
2880 0 : break; }
2881 :
2882 8 : case LOGON_SAM_LOGON_REQUEST: {
2883 8 : NDR_CHECK(ndr_push_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon));
2884 8 : break; }
2885 :
2886 3 : case LOGON_PRIMARY_QUERY: {
2887 3 : NDR_CHECK(ndr_push_nbt_netlogon_query_for_pdc(ndr, NDR_SCALARS, &r->pdc));
2888 3 : break; }
2889 :
2890 0 : case NETLOGON_ANNOUNCE_UAS: {
2891 0 : NDR_CHECK(ndr_push_NETLOGON_DB_CHANGE(ndr, NDR_SCALARS, &r->uas));
2892 0 : break; }
2893 :
2894 0 : default:
2895 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2896 : }
2897 11 : }
2898 22 : if (ndr_flags & NDR_BUFFERS) {
2899 11 : if (!(ndr_flags & NDR_SCALARS)) {
2900 : /* We didn't get it above, and the token is not needed after this. */
2901 11 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2902 : }
2903 11 : switch (level) {
2904 0 : case LOGON_REQUEST:
2905 0 : break;
2906 :
2907 8 : case LOGON_SAM_LOGON_REQUEST:
2908 8 : NDR_CHECK(ndr_push_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_BUFFERS, &r->logon));
2909 8 : break;
2910 :
2911 3 : case LOGON_PRIMARY_QUERY:
2912 3 : break;
2913 :
2914 0 : case NETLOGON_ANNOUNCE_UAS:
2915 0 : NDR_CHECK(ndr_push_NETLOGON_DB_CHANGE(ndr, NDR_BUFFERS, &r->uas));
2916 0 : break;
2917 :
2918 0 : default:
2919 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2920 : }
2921 11 : }
2922 22 : return NDR_ERR_SUCCESS;
2923 : }
2924 :
2925 24 : static enum ndr_err_code ndr_pull_nbt_netlogon_request(struct ndr_pull *ndr, int ndr_flags, union nbt_netlogon_request *r)
2926 : {
2927 : uint32_t level;
2928 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2929 24 : if (ndr_flags & NDR_SCALARS) {
2930 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2931 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2932 12 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
2933 12 : switch (level) {
2934 0 : case LOGON_REQUEST: {
2935 0 : NDR_CHECK(ndr_pull_NETLOGON_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon0));
2936 0 : break; }
2937 :
2938 9 : case LOGON_SAM_LOGON_REQUEST: {
2939 9 : NDR_CHECK(ndr_pull_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon));
2940 9 : break; }
2941 :
2942 3 : case LOGON_PRIMARY_QUERY: {
2943 3 : NDR_CHECK(ndr_pull_nbt_netlogon_query_for_pdc(ndr, NDR_SCALARS, &r->pdc));
2944 3 : break; }
2945 :
2946 0 : case NETLOGON_ANNOUNCE_UAS: {
2947 0 : NDR_CHECK(ndr_pull_NETLOGON_DB_CHANGE(ndr, NDR_SCALARS, &r->uas));
2948 0 : break; }
2949 :
2950 0 : default:
2951 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2952 : }
2953 12 : }
2954 24 : if (ndr_flags & NDR_BUFFERS) {
2955 12 : if (!(ndr_flags & NDR_SCALARS)) {
2956 : /* We didn't get it above, and the token is not needed after this. */
2957 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2958 : }
2959 12 : switch (level) {
2960 0 : case LOGON_REQUEST:
2961 0 : break;
2962 :
2963 9 : case LOGON_SAM_LOGON_REQUEST:
2964 9 : NDR_CHECK(ndr_pull_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_BUFFERS, &r->logon));
2965 9 : break;
2966 :
2967 3 : case LOGON_PRIMARY_QUERY:
2968 3 : break;
2969 :
2970 0 : case NETLOGON_ANNOUNCE_UAS:
2971 0 : NDR_CHECK(ndr_pull_NETLOGON_DB_CHANGE(ndr, NDR_BUFFERS, &r->uas));
2972 0 : break;
2973 :
2974 0 : default:
2975 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2976 : }
2977 12 : }
2978 24 : return NDR_ERR_SUCCESS;
2979 : }
2980 :
2981 0 : _PUBLIC_ void ndr_print_nbt_netlogon_request(struct ndr_print *ndr, const char *name, const union nbt_netlogon_request *r)
2982 : {
2983 : uint32_t level;
2984 0 : level = ndr_print_steal_switch_value(ndr, r);
2985 0 : ndr_print_union(ndr, name, level, "nbt_netlogon_request");
2986 0 : switch (level) {
2987 0 : case LOGON_REQUEST:
2988 0 : ndr_print_NETLOGON_LOGON_REQUEST(ndr, "logon0", &r->logon0);
2989 0 : break;
2990 :
2991 0 : case LOGON_SAM_LOGON_REQUEST:
2992 0 : ndr_print_NETLOGON_SAM_LOGON_REQUEST(ndr, "logon", &r->logon);
2993 0 : break;
2994 :
2995 0 : case LOGON_PRIMARY_QUERY:
2996 0 : ndr_print_nbt_netlogon_query_for_pdc(ndr, "pdc", &r->pdc);
2997 0 : break;
2998 :
2999 0 : case NETLOGON_ANNOUNCE_UAS:
3000 0 : ndr_print_NETLOGON_DB_CHANGE(ndr, "uas", &r->uas);
3001 0 : break;
3002 :
3003 0 : default:
3004 0 : ndr_print_bad_level(ndr, name, level);
3005 : }
3006 0 : }
3007 :
3008 11 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_packet *r)
3009 : {
3010 : {
3011 11 : uint32_t _flags_save_STRUCT = ndr->flags;
3012 11 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
3013 11 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3014 11 : if (ndr_flags & NDR_SCALARS) {
3015 11 : NDR_CHECK(ndr_push_align(ndr, 8));
3016 11 : NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
3017 11 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->req, r->command));
3018 11 : NDR_CHECK(ndr_push_nbt_netlogon_request(ndr, NDR_SCALARS, &r->req));
3019 11 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3020 : }
3021 11 : if (ndr_flags & NDR_BUFFERS) {
3022 11 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->req, r->command));
3023 11 : NDR_CHECK(ndr_push_nbt_netlogon_request(ndr, NDR_BUFFERS, &r->req));
3024 : }
3025 11 : ndr->flags = _flags_save_STRUCT;
3026 : }
3027 11 : return NDR_ERR_SUCCESS;
3028 : }
3029 :
3030 12 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_packet *r)
3031 : {
3032 : {
3033 12 : uint32_t _flags_save_STRUCT = ndr->flags;
3034 12 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
3035 12 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3036 12 : if (ndr_flags & NDR_SCALARS) {
3037 12 : NDR_CHECK(ndr_pull_align(ndr, 8));
3038 12 : NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
3039 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->req, r->command));
3040 12 : NDR_CHECK(ndr_pull_nbt_netlogon_request(ndr, NDR_SCALARS, &r->req));
3041 12 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3042 : }
3043 12 : if (ndr_flags & NDR_BUFFERS) {
3044 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->req, r->command));
3045 12 : NDR_CHECK(ndr_pull_nbt_netlogon_request(ndr, NDR_BUFFERS, &r->req));
3046 : }
3047 12 : ndr->flags = _flags_save_STRUCT;
3048 : }
3049 12 : return NDR_ERR_SUCCESS;
3050 : }
3051 :
3052 0 : static void ndr_print_flags_nbt_netlogon_packet(struct ndr_print *ndr, const char *name, int unused, const struct nbt_netlogon_packet *r)
3053 : {
3054 0 : ndr_print_nbt_netlogon_packet(ndr, name, r);
3055 0 : }
3056 :
3057 0 : _PUBLIC_ void ndr_print_nbt_netlogon_packet(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_packet *r)
3058 : {
3059 0 : ndr_print_struct(ndr, name, "nbt_netlogon_packet");
3060 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3061 : {
3062 0 : uint32_t _flags_save_STRUCT = ndr->flags;
3063 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
3064 0 : ndr->depth++;
3065 0 : ndr_print_netlogon_command(ndr, "command", r->command);
3066 0 : ndr_print_set_switch_value(ndr, &r->req, r->command);
3067 0 : ndr_print_nbt_netlogon_request(ndr, "req", &r->req);
3068 0 : ndr->depth--;
3069 0 : ndr->flags = _flags_save_STRUCT;
3070 : }
3071 : }
3072 :
3073 0 : static enum ndr_err_code ndr_push_nbt_browse_opcode(struct ndr_push *ndr, int ndr_flags, enum nbt_browse_opcode r)
3074 : {
3075 0 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
3076 0 : return NDR_ERR_SUCCESS;
3077 : }
3078 :
3079 593 : static enum ndr_err_code ndr_pull_nbt_browse_opcode(struct ndr_pull *ndr, int ndr_flags, enum nbt_browse_opcode *r)
3080 : {
3081 : uint8_t v;
3082 593 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
3083 593 : *r = v;
3084 593 : return NDR_ERR_SUCCESS;
3085 : }
3086 :
3087 0 : _PUBLIC_ void ndr_print_nbt_browse_opcode(struct ndr_print *ndr, const char *name, enum nbt_browse_opcode r)
3088 : {
3089 0 : const char *val = NULL;
3090 :
3091 0 : switch (r) {
3092 0 : case HostAnnouncement: val = "HostAnnouncement"; break;
3093 0 : case AnnouncementRequest: val = "AnnouncementRequest"; break;
3094 0 : case Election: val = "Election"; break;
3095 0 : case GetBackupListReq: val = "GetBackupListReq"; break;
3096 0 : case GetBackupListResp: val = "GetBackupListResp"; break;
3097 0 : case BecomeBackup: val = "BecomeBackup"; break;
3098 0 : case DomainAnnouncement: val = "DomainAnnouncement"; break;
3099 0 : case MasterAnnouncement: val = "MasterAnnouncement"; break;
3100 0 : case ResetBrowserState: val = "ResetBrowserState"; break;
3101 0 : case LocalMasterAnnouncement: val = "LocalMasterAnnouncement"; break;
3102 : }
3103 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
3104 0 : }
3105 :
3106 0 : static enum ndr_err_code ndr_push_nbt_browse_host_announcement(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_host_announcement *r)
3107 : {
3108 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3109 0 : if (ndr_flags & NDR_SCALARS) {
3110 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3111 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->UpdateCount));
3112 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Periodicity));
3113 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ServerName, 16, sizeof(uint8_t), CH_DOS));
3114 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMajor));
3115 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMinor));
3116 0 : NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->ServerType));
3117 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->BroMajorVer));
3118 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->BroMinorVer));
3119 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Signature));
3120 : {
3121 0 : uint32_t _flags_save_string = ndr->flags;
3122 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3123 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Comment));
3124 0 : ndr->flags = _flags_save_string;
3125 : }
3126 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3127 : }
3128 0 : if (ndr_flags & NDR_BUFFERS) {
3129 : }
3130 0 : return NDR_ERR_SUCCESS;
3131 : }
3132 :
3133 218 : static enum ndr_err_code ndr_pull_nbt_browse_host_announcement(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_host_announcement *r)
3134 : {
3135 218 : uint32_t size_ServerName_0 = 0;
3136 218 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3137 218 : if (ndr_flags & NDR_SCALARS) {
3138 218 : NDR_CHECK(ndr_pull_align(ndr, 4));
3139 218 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->UpdateCount));
3140 218 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Periodicity));
3141 218 : size_ServerName_0 = 16;
3142 218 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ServerName, size_ServerName_0, sizeof(uint8_t), CH_DOS));
3143 218 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMajor));
3144 218 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMinor));
3145 218 : NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->ServerType));
3146 218 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->BroMajorVer));
3147 218 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->BroMinorVer));
3148 218 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Signature));
3149 : {
3150 218 : uint32_t _flags_save_string = ndr->flags;
3151 218 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3152 218 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Comment));
3153 218 : ndr->flags = _flags_save_string;
3154 : }
3155 218 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3156 : }
3157 218 : if (ndr_flags & NDR_BUFFERS) {
3158 : }
3159 218 : return NDR_ERR_SUCCESS;
3160 : }
3161 :
3162 0 : _PUBLIC_ void ndr_print_nbt_browse_host_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_host_announcement *r)
3163 : {
3164 0 : ndr_print_struct(ndr, name, "nbt_browse_host_announcement");
3165 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3166 0 : ndr->depth++;
3167 0 : ndr_print_uint8(ndr, "UpdateCount", r->UpdateCount);
3168 0 : ndr_print_uint32(ndr, "Periodicity", r->Periodicity);
3169 0 : ndr_print_string(ndr, "ServerName", r->ServerName);
3170 0 : ndr_print_uint8(ndr, "OSMajor", r->OSMajor);
3171 0 : ndr_print_uint8(ndr, "OSMinor", r->OSMinor);
3172 0 : ndr_print_svcctl_ServerType(ndr, "ServerType", r->ServerType);
3173 0 : ndr_print_uint8(ndr, "BroMajorVer", r->BroMajorVer);
3174 0 : ndr_print_uint8(ndr, "BroMinorVer", r->BroMinorVer);
3175 0 : ndr_print_uint16(ndr, "Signature", r->Signature);
3176 : {
3177 0 : uint32_t _flags_save_string = ndr->flags;
3178 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3179 0 : ndr_print_string(ndr, "Comment", r->Comment);
3180 0 : ndr->flags = _flags_save_string;
3181 : }
3182 0 : ndr->depth--;
3183 : }
3184 :
3185 0 : static enum ndr_err_code ndr_push_nbt_browse_announcement_request(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_announcement_request *r)
3186 : {
3187 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3188 0 : if (ndr_flags & NDR_SCALARS) {
3189 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3190 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Unused));
3191 : {
3192 0 : uint32_t _flags_save_string = ndr->flags;
3193 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3194 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->ResponseName));
3195 0 : ndr->flags = _flags_save_string;
3196 : }
3197 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3198 : }
3199 0 : if (ndr_flags & NDR_BUFFERS) {
3200 : }
3201 0 : return NDR_ERR_SUCCESS;
3202 : }
3203 :
3204 31 : static enum ndr_err_code ndr_pull_nbt_browse_announcement_request(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_announcement_request *r)
3205 : {
3206 31 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3207 31 : if (ndr_flags & NDR_SCALARS) {
3208 31 : NDR_CHECK(ndr_pull_align(ndr, 4));
3209 31 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Unused));
3210 : {
3211 31 : uint32_t _flags_save_string = ndr->flags;
3212 31 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3213 31 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->ResponseName));
3214 31 : ndr->flags = _flags_save_string;
3215 : }
3216 31 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3217 : }
3218 31 : if (ndr_flags & NDR_BUFFERS) {
3219 : }
3220 31 : return NDR_ERR_SUCCESS;
3221 : }
3222 :
3223 0 : _PUBLIC_ void ndr_print_nbt_browse_announcement_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_announcement_request *r)
3224 : {
3225 0 : ndr_print_struct(ndr, name, "nbt_browse_announcement_request");
3226 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3227 0 : ndr->depth++;
3228 0 : ndr_print_uint8(ndr, "Unused", r->Unused);
3229 : {
3230 0 : uint32_t _flags_save_string = ndr->flags;
3231 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3232 0 : ndr_print_string(ndr, "ResponseName", r->ResponseName);
3233 0 : ndr->flags = _flags_save_string;
3234 : }
3235 0 : ndr->depth--;
3236 : }
3237 :
3238 0 : static enum ndr_err_code ndr_push_nbt_browse_election_request(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_election_request *r)
3239 : {
3240 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3241 0 : if (ndr_flags & NDR_SCALARS) {
3242 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3243 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Version));
3244 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Criteria));
3245 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->UpTime));
3246 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Reserved));
3247 : {
3248 0 : uint32_t _flags_save_string = ndr->flags;
3249 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3250 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->ServerName));
3251 0 : ndr->flags = _flags_save_string;
3252 : }
3253 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3254 : }
3255 0 : if (ndr_flags & NDR_BUFFERS) {
3256 : }
3257 0 : return NDR_ERR_SUCCESS;
3258 : }
3259 :
3260 150 : static enum ndr_err_code ndr_pull_nbt_browse_election_request(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_election_request *r)
3261 : {
3262 150 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3263 150 : if (ndr_flags & NDR_SCALARS) {
3264 150 : NDR_CHECK(ndr_pull_align(ndr, 4));
3265 150 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Version));
3266 150 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Criteria));
3267 150 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UpTime));
3268 150 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Reserved));
3269 : {
3270 150 : uint32_t _flags_save_string = ndr->flags;
3271 150 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3272 150 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->ServerName));
3273 150 : ndr->flags = _flags_save_string;
3274 : }
3275 150 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3276 : }
3277 150 : if (ndr_flags & NDR_BUFFERS) {
3278 : }
3279 150 : return NDR_ERR_SUCCESS;
3280 : }
3281 :
3282 0 : _PUBLIC_ void ndr_print_nbt_browse_election_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_election_request *r)
3283 : {
3284 0 : ndr_print_struct(ndr, name, "nbt_browse_election_request");
3285 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3286 0 : ndr->depth++;
3287 0 : ndr_print_uint8(ndr, "Version", r->Version);
3288 0 : ndr_print_uint32(ndr, "Criteria", r->Criteria);
3289 0 : ndr_print_uint32(ndr, "UpTime", r->UpTime);
3290 0 : ndr_print_uint32(ndr, "Reserved", r->Reserved);
3291 : {
3292 0 : uint32_t _flags_save_string = ndr->flags;
3293 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3294 0 : ndr_print_string(ndr, "ServerName", r->ServerName);
3295 0 : ndr->flags = _flags_save_string;
3296 : }
3297 0 : ndr->depth--;
3298 : }
3299 :
3300 0 : static enum ndr_err_code ndr_push_nbt_browse_backup_list_request(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_backup_list_request *r)
3301 : {
3302 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3303 0 : if (ndr_flags & NDR_SCALARS) {
3304 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3305 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->ReqCount));
3306 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Token));
3307 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3308 : }
3309 0 : if (ndr_flags & NDR_BUFFERS) {
3310 : }
3311 0 : return NDR_ERR_SUCCESS;
3312 : }
3313 :
3314 0 : static enum ndr_err_code ndr_pull_nbt_browse_backup_list_request(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_backup_list_request *r)
3315 : {
3316 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3317 0 : if (ndr_flags & NDR_SCALARS) {
3318 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
3319 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->ReqCount));
3320 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Token));
3321 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3322 : }
3323 0 : if (ndr_flags & NDR_BUFFERS) {
3324 : }
3325 0 : return NDR_ERR_SUCCESS;
3326 : }
3327 :
3328 0 : _PUBLIC_ void ndr_print_nbt_browse_backup_list_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_backup_list_request *r)
3329 : {
3330 0 : ndr_print_struct(ndr, name, "nbt_browse_backup_list_request");
3331 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3332 0 : ndr->depth++;
3333 0 : ndr_print_uint8(ndr, "ReqCount", r->ReqCount);
3334 0 : ndr_print_uint32(ndr, "Token", r->Token);
3335 0 : ndr->depth--;
3336 : }
3337 :
3338 0 : static enum ndr_err_code ndr_push_nbt_browse_backup_list_response(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_backup_list_response *r)
3339 : {
3340 : uint32_t cntr_BackupServerList_0;
3341 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3342 0 : if (ndr_flags & NDR_SCALARS) {
3343 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3344 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->BackupCount));
3345 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Token));
3346 0 : for (cntr_BackupServerList_0 = 0; cntr_BackupServerList_0 < (r->BackupCount); cntr_BackupServerList_0++) {
3347 0 : NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->BackupServerList[cntr_BackupServerList_0]));
3348 : }
3349 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3350 : }
3351 0 : if (ndr_flags & NDR_BUFFERS) {
3352 : }
3353 0 : return NDR_ERR_SUCCESS;
3354 : }
3355 :
3356 0 : static enum ndr_err_code ndr_pull_nbt_browse_backup_list_response(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_backup_list_response *r)
3357 : {
3358 0 : uint32_t size_BackupServerList_0 = 0;
3359 : uint32_t cntr_BackupServerList_0;
3360 0 : TALLOC_CTX *_mem_save_BackupServerList_0 = NULL;
3361 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3362 0 : if (ndr_flags & NDR_SCALARS) {
3363 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
3364 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->BackupCount));
3365 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Token));
3366 0 : size_BackupServerList_0 = r->BackupCount;
3367 0 : NDR_PULL_ALLOC_N(ndr, r->BackupServerList, size_BackupServerList_0);
3368 0 : _mem_save_BackupServerList_0 = NDR_PULL_GET_MEM_CTX(ndr);
3369 0 : NDR_PULL_SET_MEM_CTX(ndr, r->BackupServerList, 0);
3370 0 : for (cntr_BackupServerList_0 = 0; cntr_BackupServerList_0 < (size_BackupServerList_0); cntr_BackupServerList_0++) {
3371 0 : NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->BackupServerList[cntr_BackupServerList_0]));
3372 : }
3373 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_BackupServerList_0, 0);
3374 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3375 : }
3376 0 : if (ndr_flags & NDR_BUFFERS) {
3377 : }
3378 0 : return NDR_ERR_SUCCESS;
3379 : }
3380 :
3381 0 : _PUBLIC_ void ndr_print_nbt_browse_backup_list_response(struct ndr_print *ndr, const char *name, const struct nbt_browse_backup_list_response *r)
3382 : {
3383 : uint32_t cntr_BackupServerList_0;
3384 0 : ndr_print_struct(ndr, name, "nbt_browse_backup_list_response");
3385 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3386 0 : ndr->depth++;
3387 0 : ndr_print_uint8(ndr, "BackupCount", r->BackupCount);
3388 0 : ndr_print_uint32(ndr, "Token", r->Token);
3389 0 : ndr->print(ndr, "%s: ARRAY(%d)", "BackupServerList", (int)r->BackupCount);
3390 0 : ndr->depth++;
3391 0 : for (cntr_BackupServerList_0 = 0; cntr_BackupServerList_0 < (r->BackupCount); cntr_BackupServerList_0++) {
3392 0 : ndr_print_nbt_name(ndr, "BackupServerList", &r->BackupServerList[cntr_BackupServerList_0]);
3393 : }
3394 0 : ndr->depth--;
3395 0 : ndr->depth--;
3396 : }
3397 :
3398 0 : static enum ndr_err_code ndr_push_nbt_browse_become_backup(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_become_backup *r)
3399 : {
3400 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3401 0 : if (ndr_flags & NDR_SCALARS) {
3402 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3403 : {
3404 0 : uint32_t _flags_save_string = ndr->flags;
3405 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3406 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->BrowserName));
3407 0 : ndr->flags = _flags_save_string;
3408 : }
3409 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3410 : }
3411 0 : if (ndr_flags & NDR_BUFFERS) {
3412 : }
3413 0 : return NDR_ERR_SUCCESS;
3414 : }
3415 :
3416 0 : static enum ndr_err_code ndr_pull_nbt_browse_become_backup(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_become_backup *r)
3417 : {
3418 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3419 0 : if (ndr_flags & NDR_SCALARS) {
3420 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
3421 : {
3422 0 : uint32_t _flags_save_string = ndr->flags;
3423 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3424 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->BrowserName));
3425 0 : ndr->flags = _flags_save_string;
3426 : }
3427 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3428 : }
3429 0 : if (ndr_flags & NDR_BUFFERS) {
3430 : }
3431 0 : return NDR_ERR_SUCCESS;
3432 : }
3433 :
3434 0 : _PUBLIC_ void ndr_print_nbt_browse_become_backup(struct ndr_print *ndr, const char *name, const struct nbt_browse_become_backup *r)
3435 : {
3436 0 : ndr_print_struct(ndr, name, "nbt_browse_become_backup");
3437 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3438 0 : ndr->depth++;
3439 : {
3440 0 : uint32_t _flags_save_string = ndr->flags;
3441 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3442 0 : ndr_print_string(ndr, "BrowserName", r->BrowserName);
3443 0 : ndr->flags = _flags_save_string;
3444 : }
3445 0 : ndr->depth--;
3446 : }
3447 :
3448 0 : static enum ndr_err_code ndr_push_nbt_browse_domain_announcement(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_domain_announcement *r)
3449 : {
3450 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3451 0 : if (ndr_flags & NDR_SCALARS) {
3452 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3453 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->UpdateCount));
3454 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Periodicity));
3455 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ServerName, 16, sizeof(uint8_t), CH_DOS));
3456 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMajor));
3457 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMinor));
3458 0 : NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->ServerType));
3459 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MysteriousField));
3460 : {
3461 0 : uint32_t _flags_save_string = ndr->flags;
3462 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3463 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Comment));
3464 0 : ndr->flags = _flags_save_string;
3465 : }
3466 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3467 : }
3468 0 : if (ndr_flags & NDR_BUFFERS) {
3469 : }
3470 0 : return NDR_ERR_SUCCESS;
3471 : }
3472 :
3473 67 : static enum ndr_err_code ndr_pull_nbt_browse_domain_announcement(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_domain_announcement *r)
3474 : {
3475 67 : uint32_t size_ServerName_0 = 0;
3476 67 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3477 67 : if (ndr_flags & NDR_SCALARS) {
3478 67 : NDR_CHECK(ndr_pull_align(ndr, 4));
3479 67 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->UpdateCount));
3480 67 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Periodicity));
3481 67 : size_ServerName_0 = 16;
3482 67 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ServerName, size_ServerName_0, sizeof(uint8_t), CH_DOS));
3483 67 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMajor));
3484 67 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMinor));
3485 67 : NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->ServerType));
3486 67 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MysteriousField));
3487 : {
3488 67 : uint32_t _flags_save_string = ndr->flags;
3489 67 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3490 67 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Comment));
3491 67 : ndr->flags = _flags_save_string;
3492 : }
3493 67 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3494 : }
3495 67 : if (ndr_flags & NDR_BUFFERS) {
3496 : }
3497 67 : return NDR_ERR_SUCCESS;
3498 : }
3499 :
3500 0 : _PUBLIC_ void ndr_print_nbt_browse_domain_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_domain_announcement *r)
3501 : {
3502 0 : ndr_print_struct(ndr, name, "nbt_browse_domain_announcement");
3503 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3504 0 : ndr->depth++;
3505 0 : ndr_print_uint8(ndr, "UpdateCount", r->UpdateCount);
3506 0 : ndr_print_uint32(ndr, "Periodicity", r->Periodicity);
3507 0 : ndr_print_string(ndr, "ServerName", r->ServerName);
3508 0 : ndr_print_uint8(ndr, "OSMajor", r->OSMajor);
3509 0 : ndr_print_uint8(ndr, "OSMinor", r->OSMinor);
3510 0 : ndr_print_svcctl_ServerType(ndr, "ServerType", r->ServerType);
3511 0 : ndr_print_uint32(ndr, "MysteriousField", r->MysteriousField);
3512 : {
3513 0 : uint32_t _flags_save_string = ndr->flags;
3514 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3515 0 : ndr_print_string(ndr, "Comment", r->Comment);
3516 0 : ndr->flags = _flags_save_string;
3517 : }
3518 0 : ndr->depth--;
3519 : }
3520 :
3521 0 : static enum ndr_err_code ndr_push_nbt_browse_master_announcement(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_master_announcement *r)
3522 : {
3523 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3524 0 : if (ndr_flags & NDR_SCALARS) {
3525 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3526 : {
3527 0 : uint32_t _flags_save_string = ndr->flags;
3528 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3529 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->ServerName));
3530 0 : ndr->flags = _flags_save_string;
3531 : }
3532 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3533 : }
3534 0 : if (ndr_flags & NDR_BUFFERS) {
3535 : }
3536 0 : return NDR_ERR_SUCCESS;
3537 : }
3538 :
3539 0 : static enum ndr_err_code ndr_pull_nbt_browse_master_announcement(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_master_announcement *r)
3540 : {
3541 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3542 0 : if (ndr_flags & NDR_SCALARS) {
3543 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
3544 : {
3545 0 : uint32_t _flags_save_string = ndr->flags;
3546 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3547 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->ServerName));
3548 0 : ndr->flags = _flags_save_string;
3549 : }
3550 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3551 : }
3552 0 : if (ndr_flags & NDR_BUFFERS) {
3553 : }
3554 0 : return NDR_ERR_SUCCESS;
3555 : }
3556 :
3557 0 : _PUBLIC_ void ndr_print_nbt_browse_master_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_master_announcement *r)
3558 : {
3559 0 : ndr_print_struct(ndr, name, "nbt_browse_master_announcement");
3560 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3561 0 : ndr->depth++;
3562 : {
3563 0 : uint32_t _flags_save_string = ndr->flags;
3564 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3565 0 : ndr_print_string(ndr, "ServerName", r->ServerName);
3566 0 : ndr->flags = _flags_save_string;
3567 : }
3568 0 : ndr->depth--;
3569 : }
3570 :
3571 0 : static enum ndr_err_code ndr_push_nbt_browse_reset_state(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_reset_state *r)
3572 : {
3573 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3574 0 : if (ndr_flags & NDR_SCALARS) {
3575 0 : NDR_CHECK(ndr_push_align(ndr, 1));
3576 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Command));
3577 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3578 : }
3579 0 : if (ndr_flags & NDR_BUFFERS) {
3580 : }
3581 0 : return NDR_ERR_SUCCESS;
3582 : }
3583 :
3584 0 : static enum ndr_err_code ndr_pull_nbt_browse_reset_state(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_reset_state *r)
3585 : {
3586 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3587 0 : if (ndr_flags & NDR_SCALARS) {
3588 0 : NDR_CHECK(ndr_pull_align(ndr, 1));
3589 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Command));
3590 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3591 : }
3592 0 : if (ndr_flags & NDR_BUFFERS) {
3593 : }
3594 0 : return NDR_ERR_SUCCESS;
3595 : }
3596 :
3597 0 : _PUBLIC_ void ndr_print_nbt_browse_reset_state(struct ndr_print *ndr, const char *name, const struct nbt_browse_reset_state *r)
3598 : {
3599 0 : ndr_print_struct(ndr, name, "nbt_browse_reset_state");
3600 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3601 0 : ndr->depth++;
3602 0 : ndr_print_uint8(ndr, "Command", r->Command);
3603 0 : ndr->depth--;
3604 : }
3605 :
3606 0 : static enum ndr_err_code ndr_push_nbt_browse_local_master_announcement(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_local_master_announcement *r)
3607 : {
3608 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3609 0 : if (ndr_flags & NDR_SCALARS) {
3610 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3611 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->UpdateCount));
3612 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Periodicity));
3613 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ServerName, 16, sizeof(uint8_t), CH_DOS));
3614 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMajor));
3615 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMinor));
3616 0 : NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->ServerType));
3617 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->BroMajorVer));
3618 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->BroMinorVer));
3619 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Signature));
3620 : {
3621 0 : uint32_t _flags_save_string = ndr->flags;
3622 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3623 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Comment));
3624 0 : ndr->flags = _flags_save_string;
3625 : }
3626 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3627 : }
3628 0 : if (ndr_flags & NDR_BUFFERS) {
3629 : }
3630 0 : return NDR_ERR_SUCCESS;
3631 : }
3632 :
3633 127 : static enum ndr_err_code ndr_pull_nbt_browse_local_master_announcement(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_local_master_announcement *r)
3634 : {
3635 127 : uint32_t size_ServerName_0 = 0;
3636 127 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3637 127 : if (ndr_flags & NDR_SCALARS) {
3638 127 : NDR_CHECK(ndr_pull_align(ndr, 4));
3639 127 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->UpdateCount));
3640 127 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Periodicity));
3641 127 : size_ServerName_0 = 16;
3642 127 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ServerName, size_ServerName_0, sizeof(uint8_t), CH_DOS));
3643 127 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMajor));
3644 127 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMinor));
3645 127 : NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->ServerType));
3646 127 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->BroMajorVer));
3647 127 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->BroMinorVer));
3648 127 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Signature));
3649 : {
3650 127 : uint32_t _flags_save_string = ndr->flags;
3651 127 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3652 127 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Comment));
3653 127 : ndr->flags = _flags_save_string;
3654 : }
3655 127 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3656 : }
3657 127 : if (ndr_flags & NDR_BUFFERS) {
3658 : }
3659 127 : return NDR_ERR_SUCCESS;
3660 : }
3661 :
3662 0 : _PUBLIC_ void ndr_print_nbt_browse_local_master_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_local_master_announcement *r)
3663 : {
3664 0 : ndr_print_struct(ndr, name, "nbt_browse_local_master_announcement");
3665 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3666 0 : ndr->depth++;
3667 0 : ndr_print_uint8(ndr, "UpdateCount", r->UpdateCount);
3668 0 : ndr_print_uint32(ndr, "Periodicity", r->Periodicity);
3669 0 : ndr_print_string(ndr, "ServerName", r->ServerName);
3670 0 : ndr_print_uint8(ndr, "OSMajor", r->OSMajor);
3671 0 : ndr_print_uint8(ndr, "OSMinor", r->OSMinor);
3672 0 : ndr_print_svcctl_ServerType(ndr, "ServerType", r->ServerType);
3673 0 : ndr_print_uint8(ndr, "BroMajorVer", r->BroMajorVer);
3674 0 : ndr_print_uint8(ndr, "BroMinorVer", r->BroMinorVer);
3675 0 : ndr_print_uint16(ndr, "Signature", r->Signature);
3676 : {
3677 0 : uint32_t _flags_save_string = ndr->flags;
3678 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
3679 0 : ndr_print_string(ndr, "Comment", r->Comment);
3680 0 : ndr->flags = _flags_save_string;
3681 : }
3682 0 : ndr->depth--;
3683 : }
3684 :
3685 0 : static enum ndr_err_code ndr_push_nbt_browse_payload(struct ndr_push *ndr, int ndr_flags, const union nbt_browse_payload *r)
3686 : {
3687 : uint32_t level;
3688 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3689 0 : if (ndr_flags & NDR_SCALARS) {
3690 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3691 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3692 0 : NDR_CHECK(ndr_push_union_align(ndr, 4));
3693 0 : switch (level) {
3694 0 : case HostAnnouncement: {
3695 0 : NDR_CHECK(ndr_push_nbt_browse_host_announcement(ndr, NDR_SCALARS, &r->host_annoucement));
3696 0 : break; }
3697 :
3698 0 : case AnnouncementRequest: {
3699 0 : NDR_CHECK(ndr_push_nbt_browse_announcement_request(ndr, NDR_SCALARS, &r->announcement_request));
3700 0 : break; }
3701 :
3702 0 : case Election: {
3703 0 : NDR_CHECK(ndr_push_nbt_browse_election_request(ndr, NDR_SCALARS, &r->election_request));
3704 0 : break; }
3705 :
3706 0 : case GetBackupListReq: {
3707 0 : NDR_CHECK(ndr_push_nbt_browse_backup_list_request(ndr, NDR_SCALARS, &r->backup_list_request));
3708 0 : break; }
3709 :
3710 0 : case GetBackupListResp: {
3711 0 : NDR_CHECK(ndr_push_nbt_browse_backup_list_response(ndr, NDR_SCALARS, &r->backup_list_response));
3712 0 : break; }
3713 :
3714 0 : case BecomeBackup: {
3715 0 : NDR_CHECK(ndr_push_nbt_browse_become_backup(ndr, NDR_SCALARS, &r->become_backup));
3716 0 : break; }
3717 :
3718 0 : case DomainAnnouncement: {
3719 0 : NDR_CHECK(ndr_push_nbt_browse_domain_announcement(ndr, NDR_SCALARS, &r->domain_announcement));
3720 0 : break; }
3721 :
3722 0 : case MasterAnnouncement: {
3723 0 : NDR_CHECK(ndr_push_nbt_browse_master_announcement(ndr, NDR_SCALARS, &r->master_announcement));
3724 0 : break; }
3725 :
3726 0 : case ResetBrowserState: {
3727 0 : NDR_CHECK(ndr_push_nbt_browse_reset_state(ndr, NDR_SCALARS, &r->reset_browser_state));
3728 0 : break; }
3729 :
3730 0 : case LocalMasterAnnouncement: {
3731 0 : NDR_CHECK(ndr_push_nbt_browse_local_master_announcement(ndr, NDR_SCALARS, &r->local_master_announcement));
3732 0 : break; }
3733 :
3734 0 : default:
3735 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3736 : }
3737 0 : }
3738 0 : if (ndr_flags & NDR_BUFFERS) {
3739 0 : if (!(ndr_flags & NDR_SCALARS)) {
3740 : /* We didn't get it above, and the token is not needed after this. */
3741 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3742 : }
3743 0 : switch (level) {
3744 0 : case HostAnnouncement:
3745 0 : break;
3746 :
3747 0 : case AnnouncementRequest:
3748 0 : break;
3749 :
3750 0 : case Election:
3751 0 : break;
3752 :
3753 0 : case GetBackupListReq:
3754 0 : break;
3755 :
3756 0 : case GetBackupListResp:
3757 0 : break;
3758 :
3759 0 : case BecomeBackup:
3760 0 : break;
3761 :
3762 0 : case DomainAnnouncement:
3763 0 : break;
3764 :
3765 0 : case MasterAnnouncement:
3766 0 : break;
3767 :
3768 0 : case ResetBrowserState:
3769 0 : break;
3770 :
3771 0 : case LocalMasterAnnouncement:
3772 0 : break;
3773 :
3774 0 : default:
3775 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3776 : }
3777 0 : }
3778 0 : return NDR_ERR_SUCCESS;
3779 : }
3780 :
3781 593 : static enum ndr_err_code ndr_pull_nbt_browse_payload(struct ndr_pull *ndr, int ndr_flags, union nbt_browse_payload *r)
3782 : {
3783 : uint32_t level;
3784 593 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3785 593 : if (ndr_flags & NDR_SCALARS) {
3786 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3787 593 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3788 593 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
3789 593 : switch (level) {
3790 218 : case HostAnnouncement: {
3791 218 : NDR_CHECK(ndr_pull_nbt_browse_host_announcement(ndr, NDR_SCALARS, &r->host_annoucement));
3792 218 : break; }
3793 :
3794 31 : case AnnouncementRequest: {
3795 31 : NDR_CHECK(ndr_pull_nbt_browse_announcement_request(ndr, NDR_SCALARS, &r->announcement_request));
3796 31 : break; }
3797 :
3798 150 : case Election: {
3799 150 : NDR_CHECK(ndr_pull_nbt_browse_election_request(ndr, NDR_SCALARS, &r->election_request));
3800 150 : break; }
3801 :
3802 0 : case GetBackupListReq: {
3803 0 : NDR_CHECK(ndr_pull_nbt_browse_backup_list_request(ndr, NDR_SCALARS, &r->backup_list_request));
3804 0 : break; }
3805 :
3806 0 : case GetBackupListResp: {
3807 0 : NDR_CHECK(ndr_pull_nbt_browse_backup_list_response(ndr, NDR_SCALARS, &r->backup_list_response));
3808 0 : break; }
3809 :
3810 0 : case BecomeBackup: {
3811 0 : NDR_CHECK(ndr_pull_nbt_browse_become_backup(ndr, NDR_SCALARS, &r->become_backup));
3812 0 : break; }
3813 :
3814 67 : case DomainAnnouncement: {
3815 67 : NDR_CHECK(ndr_pull_nbt_browse_domain_announcement(ndr, NDR_SCALARS, &r->domain_announcement));
3816 67 : break; }
3817 :
3818 0 : case MasterAnnouncement: {
3819 0 : NDR_CHECK(ndr_pull_nbt_browse_master_announcement(ndr, NDR_SCALARS, &r->master_announcement));
3820 0 : break; }
3821 :
3822 0 : case ResetBrowserState: {
3823 0 : NDR_CHECK(ndr_pull_nbt_browse_reset_state(ndr, NDR_SCALARS, &r->reset_browser_state));
3824 0 : break; }
3825 :
3826 127 : case LocalMasterAnnouncement: {
3827 127 : NDR_CHECK(ndr_pull_nbt_browse_local_master_announcement(ndr, NDR_SCALARS, &r->local_master_announcement));
3828 127 : break; }
3829 :
3830 0 : default:
3831 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3832 : }
3833 0 : }
3834 593 : if (ndr_flags & NDR_BUFFERS) {
3835 0 : if (!(ndr_flags & NDR_SCALARS)) {
3836 : /* We didn't get it above, and the token is not needed after this. */
3837 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3838 : }
3839 0 : switch (level) {
3840 0 : case HostAnnouncement:
3841 0 : break;
3842 :
3843 0 : case AnnouncementRequest:
3844 0 : break;
3845 :
3846 0 : case Election:
3847 0 : break;
3848 :
3849 0 : case GetBackupListReq:
3850 0 : break;
3851 :
3852 0 : case GetBackupListResp:
3853 0 : break;
3854 :
3855 0 : case BecomeBackup:
3856 0 : break;
3857 :
3858 0 : case DomainAnnouncement:
3859 0 : break;
3860 :
3861 0 : case MasterAnnouncement:
3862 0 : break;
3863 :
3864 0 : case ResetBrowserState:
3865 0 : break;
3866 :
3867 0 : case LocalMasterAnnouncement:
3868 0 : break;
3869 :
3870 0 : default:
3871 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3872 : }
3873 301 : }
3874 593 : return NDR_ERR_SUCCESS;
3875 : }
3876 :
3877 0 : _PUBLIC_ void ndr_print_nbt_browse_payload(struct ndr_print *ndr, const char *name, const union nbt_browse_payload *r)
3878 : {
3879 : uint32_t level;
3880 0 : level = ndr_print_steal_switch_value(ndr, r);
3881 0 : ndr_print_union(ndr, name, level, "nbt_browse_payload");
3882 0 : switch (level) {
3883 0 : case HostAnnouncement:
3884 0 : ndr_print_nbt_browse_host_announcement(ndr, "host_annoucement", &r->host_annoucement);
3885 0 : break;
3886 :
3887 0 : case AnnouncementRequest:
3888 0 : ndr_print_nbt_browse_announcement_request(ndr, "announcement_request", &r->announcement_request);
3889 0 : break;
3890 :
3891 0 : case Election:
3892 0 : ndr_print_nbt_browse_election_request(ndr, "election_request", &r->election_request);
3893 0 : break;
3894 :
3895 0 : case GetBackupListReq:
3896 0 : ndr_print_nbt_browse_backup_list_request(ndr, "backup_list_request", &r->backup_list_request);
3897 0 : break;
3898 :
3899 0 : case GetBackupListResp:
3900 0 : ndr_print_nbt_browse_backup_list_response(ndr, "backup_list_response", &r->backup_list_response);
3901 0 : break;
3902 :
3903 0 : case BecomeBackup:
3904 0 : ndr_print_nbt_browse_become_backup(ndr, "become_backup", &r->become_backup);
3905 0 : break;
3906 :
3907 0 : case DomainAnnouncement:
3908 0 : ndr_print_nbt_browse_domain_announcement(ndr, "domain_announcement", &r->domain_announcement);
3909 0 : break;
3910 :
3911 0 : case MasterAnnouncement:
3912 0 : ndr_print_nbt_browse_master_announcement(ndr, "master_announcement", &r->master_announcement);
3913 0 : break;
3914 :
3915 0 : case ResetBrowserState:
3916 0 : ndr_print_nbt_browse_reset_state(ndr, "reset_browser_state", &r->reset_browser_state);
3917 0 : break;
3918 :
3919 0 : case LocalMasterAnnouncement:
3920 0 : ndr_print_nbt_browse_local_master_announcement(ndr, "local_master_announcement", &r->local_master_announcement);
3921 0 : break;
3922 :
3923 0 : default:
3924 0 : ndr_print_bad_level(ndr, name, level);
3925 : }
3926 0 : }
3927 :
3928 0 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_browse_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_packet *r)
3929 : {
3930 : {
3931 0 : uint32_t _flags_save_STRUCT = ndr->flags;
3932 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
3933 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3934 0 : if (ndr_flags & NDR_SCALARS) {
3935 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3936 0 : NDR_CHECK(ndr_push_nbt_browse_opcode(ndr, NDR_SCALARS, r->opcode));
3937 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->payload, r->opcode));
3938 0 : NDR_CHECK(ndr_push_nbt_browse_payload(ndr, NDR_SCALARS, &r->payload));
3939 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3940 : }
3941 0 : if (ndr_flags & NDR_BUFFERS) {
3942 : }
3943 0 : ndr->flags = _flags_save_STRUCT;
3944 : }
3945 0 : return NDR_ERR_SUCCESS;
3946 : }
3947 :
3948 593 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_browse_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_packet *r)
3949 : {
3950 : {
3951 593 : uint32_t _flags_save_STRUCT = ndr->flags;
3952 593 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
3953 593 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3954 593 : if (ndr_flags & NDR_SCALARS) {
3955 593 : NDR_CHECK(ndr_pull_align(ndr, 4));
3956 593 : NDR_CHECK(ndr_pull_nbt_browse_opcode(ndr, NDR_SCALARS, &r->opcode));
3957 593 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->payload, r->opcode));
3958 593 : NDR_CHECK(ndr_pull_nbt_browse_payload(ndr, NDR_SCALARS, &r->payload));
3959 593 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3960 : }
3961 593 : if (ndr_flags & NDR_BUFFERS) {
3962 : }
3963 593 : ndr->flags = _flags_save_STRUCT;
3964 : }
3965 593 : return NDR_ERR_SUCCESS;
3966 : }
3967 :
3968 0 : static void ndr_print_flags_nbt_browse_packet(struct ndr_print *ndr, const char *name, int unused, const struct nbt_browse_packet *r)
3969 : {
3970 0 : ndr_print_nbt_browse_packet(ndr, name, r);
3971 0 : }
3972 :
3973 0 : _PUBLIC_ void ndr_print_nbt_browse_packet(struct ndr_print *ndr, const char *name, const struct nbt_browse_packet *r)
3974 : {
3975 0 : ndr_print_struct(ndr, name, "nbt_browse_packet");
3976 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3977 : {
3978 0 : uint32_t _flags_save_STRUCT = ndr->flags;
3979 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
3980 0 : ndr->depth++;
3981 0 : ndr_print_nbt_browse_opcode(ndr, "opcode", r->opcode);
3982 0 : ndr_print_set_switch_value(ndr, &r->payload, r->opcode);
3983 0 : ndr_print_nbt_browse_payload(ndr, "payload", &r->payload);
3984 0 : ndr->depth--;
3985 0 : ndr->flags = _flags_save_STRUCT;
3986 : }
3987 : }
3988 :
3989 : #ifndef SKIP_NDR_TABLE_nbt
3990 : static const struct ndr_interface_public_struct nbt_public_structs[] = {
3991 : {
3992 : .name = "nbt_name",
3993 : .struct_size = sizeof(struct nbt_name ),
3994 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_name,
3995 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_name,
3996 : .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_name,
3997 : },
3998 : {
3999 : .name = "nbt_name_packet",
4000 : .struct_size = sizeof(struct nbt_name_packet ),
4001 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_name_packet,
4002 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_name_packet,
4003 : .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_name_packet,
4004 : },
4005 : {
4006 : .name = "dgram_smb_packet",
4007 : .struct_size = sizeof(struct dgram_smb_packet ),
4008 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dgram_smb_packet,
4009 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dgram_smb_packet,
4010 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dgram_smb_packet,
4011 : },
4012 : {
4013 : .name = "nbt_dgram_packet",
4014 : .struct_size = sizeof(struct nbt_dgram_packet ),
4015 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_dgram_packet,
4016 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_dgram_packet,
4017 : .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_dgram_packet,
4018 : },
4019 : {
4020 : .name = "nbt_sockaddr",
4021 : .struct_size = sizeof(struct nbt_sockaddr ),
4022 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_sockaddr,
4023 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_sockaddr,
4024 : .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_sockaddr,
4025 : },
4026 : {
4027 : .name = "NETLOGON_SAM_LOGON_RESPONSE_NT40",
4028 : .struct_size = sizeof(struct NETLOGON_SAM_LOGON_RESPONSE_NT40 ),
4029 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_NETLOGON_SAM_LOGON_RESPONSE_NT40,
4030 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_NT40,
4031 : .ndr_print = (ndr_print_function_t) ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE_NT40,
4032 : },
4033 : {
4034 : .name = "NETLOGON_SAM_LOGON_RESPONSE",
4035 : .struct_size = sizeof(struct NETLOGON_SAM_LOGON_RESPONSE ),
4036 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_NETLOGON_SAM_LOGON_RESPONSE,
4037 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NETLOGON_SAM_LOGON_RESPONSE,
4038 : .ndr_print = (ndr_print_function_t) ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE,
4039 : },
4040 : {
4041 : .name = "NETLOGON_SAM_LOGON_RESPONSE_EX",
4042 : .struct_size = sizeof(struct NETLOGON_SAM_LOGON_RESPONSE_EX ),
4043 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX,
4044 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX,
4045 : .ndr_print = (ndr_print_function_t) ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE_EX,
4046 : },
4047 : {
4048 : .name = "nbt_netlogon_response_from_pdc",
4049 : .struct_size = sizeof(struct nbt_netlogon_response_from_pdc ),
4050 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_netlogon_response_from_pdc,
4051 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_netlogon_response_from_pdc,
4052 : .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_netlogon_response_from_pdc,
4053 : },
4054 : {
4055 : .name = "nbt_netlogon_response2",
4056 : .struct_size = sizeof(struct nbt_netlogon_response2 ),
4057 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_netlogon_response2,
4058 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_netlogon_response2,
4059 : .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_netlogon_response2,
4060 : },
4061 : {
4062 : .name = "nbt_netlogon_packet",
4063 : .struct_size = sizeof(struct nbt_netlogon_packet ),
4064 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_netlogon_packet,
4065 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_netlogon_packet,
4066 : .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_netlogon_packet,
4067 : },
4068 : {
4069 : .name = "nbt_browse_packet",
4070 : .struct_size = sizeof(struct nbt_browse_packet ),
4071 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_browse_packet,
4072 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_browse_packet,
4073 : .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_browse_packet,
4074 : },
4075 : { .name = NULL }
4076 : };
4077 :
4078 : static const struct ndr_interface_call nbt_calls[] = {
4079 : { .name = NULL }
4080 : };
4081 :
4082 : static const char * const nbt_endpoint_strings[] = {
4083 : "ncacn_np:[\\pipe\\nbt]",
4084 : };
4085 :
4086 : static const struct ndr_interface_string_array nbt_endpoints = {
4087 : .count = 1,
4088 : .names = nbt_endpoint_strings
4089 : };
4090 :
4091 : static const char * const nbt_authservice_strings[] = {
4092 : "host",
4093 : };
4094 :
4095 : static const struct ndr_interface_string_array nbt_authservices = {
4096 : .count = 1,
4097 : .names = nbt_authservice_strings
4098 : };
4099 :
4100 :
4101 : const struct ndr_interface_table ndr_table_nbt = {
4102 : .name = "nbt",
4103 : .syntax_id = {
4104 : {0x6def41b6,0x86e4,0x4c32,{0x99,0x7c},{0xed,0x33,0xaf,0x7b,0xcd,0x8e}},
4105 : NDR_NBT_VERSION
4106 : },
4107 : .helpstring = NDR_NBT_HELPSTRING,
4108 : .num_calls = 0,
4109 : .calls = nbt_calls,
4110 : .num_public_structs = 12,
4111 : .public_structs = nbt_public_structs,
4112 : .endpoints = &nbt_endpoints,
4113 : .authservices = &nbt_authservices
4114 : };
4115 :
4116 : #endif /* SKIP_NDR_TABLE_nbt */
|