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