Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_dns.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_dnsp.h"
8 13276 : _PUBLIC_ enum ndr_err_code ndr_push_dns_operation(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint16_t r)
9 : {
10 13276 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
11 13276 : return NDR_ERR_SUCCESS;
12 : }
13 :
14 13228 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_operation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint16_t *r)
15 : {
16 2 : uint16_t v;
17 13228 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
18 13228 : *r = v;
19 13228 : return NDR_ERR_SUCCESS;
20 : }
21 :
22 2 : _PUBLIC_ void ndr_print_dns_operation(struct ndr_print *ndr, const char *name, uint16_t r)
23 : {
24 2 : ndr_print_uint16(ndr, name, r);
25 2 : ndr->depth++;
26 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "DNS_RCODE", DNS_RCODE, r);
27 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "DNS_FLAG_RECURSION_AVAIL", DNS_FLAG_RECURSION_AVAIL, r);
28 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "DNS_FLAG_RECURSION_DESIRED", DNS_FLAG_RECURSION_DESIRED, r);
29 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "DNS_FLAG_TRUNCATION", DNS_FLAG_TRUNCATION, r);
30 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "DNS_FLAG_AUTHORITATIVE", DNS_FLAG_AUTHORITATIVE, r);
31 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "DNS_OPCODE", DNS_OPCODE, r);
32 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "DNS_FLAG_REPLY", DNS_FLAG_REPLY, r);
33 2 : ndr->depth--;
34 2 : }
35 :
36 0 : _PUBLIC_ enum ndr_err_code ndr_push_dns_opcode(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum dns_opcode r)
37 : {
38 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
39 0 : return NDR_ERR_SUCCESS;
40 : }
41 :
42 0 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_opcode(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum dns_opcode *r)
43 : {
44 0 : uint16_t v;
45 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
46 0 : *r = v;
47 0 : return NDR_ERR_SUCCESS;
48 : }
49 :
50 0 : _PUBLIC_ void ndr_print_dns_opcode(struct ndr_print *ndr, const char *name, enum dns_opcode r)
51 : {
52 0 : const char *val = NULL;
53 :
54 0 : switch (r) {
55 0 : case DNS_OPCODE_QUERY: val = "DNS_OPCODE_QUERY"; break;
56 0 : case DNS_OPCODE_IQUERY: val = "DNS_OPCODE_IQUERY"; break;
57 0 : case DNS_OPCODE_STATUS: val = "DNS_OPCODE_STATUS"; break;
58 0 : case DNS_OPCODE_UPDATE: val = "DNS_OPCODE_UPDATE"; break;
59 0 : case DNS_OPCODE_RELEASE: val = "DNS_OPCODE_RELEASE"; break;
60 0 : case DNS_OPCODE_WACK: val = "DNS_OPCODE_WACK"; break;
61 0 : case DNS_OPCODE_REFRESH: val = "DNS_OPCODE_REFRESH"; break;
62 0 : case DNS_OPCODE_REFRESH2: val = "DNS_OPCODE_REFRESH2"; break;
63 0 : case DNS_OPCODE_MULTI_HOME_REG: val = "DNS_OPCODE_MULTI_HOME_REG"; break;
64 : }
65 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
66 0 : }
67 :
68 0 : _PUBLIC_ enum ndr_err_code ndr_push_dns_rcode(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum dns_rcode r)
69 : {
70 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
71 0 : return NDR_ERR_SUCCESS;
72 : }
73 :
74 0 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_rcode(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum dns_rcode *r)
75 : {
76 0 : uint16_t v;
77 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
78 0 : *r = v;
79 0 : return NDR_ERR_SUCCESS;
80 : }
81 :
82 0 : _PUBLIC_ void ndr_print_dns_rcode(struct ndr_print *ndr, const char *name, enum dns_rcode r)
83 : {
84 0 : const char *val = NULL;
85 :
86 0 : switch (r) {
87 0 : case DNS_RCODE_OK: val = "DNS_RCODE_OK"; break;
88 0 : case DNS_RCODE_FORMERR: val = "DNS_RCODE_FORMERR"; break;
89 0 : case DNS_RCODE_SERVFAIL: val = "DNS_RCODE_SERVFAIL"; break;
90 0 : case DNS_RCODE_NXDOMAIN: val = "DNS_RCODE_NXDOMAIN"; break;
91 0 : case DNS_RCODE_NOTIMP: val = "DNS_RCODE_NOTIMP"; break;
92 0 : case DNS_RCODE_REFUSED: val = "DNS_RCODE_REFUSED"; break;
93 0 : case DNS_RCODE_YXDOMAIN: val = "DNS_RCODE_YXDOMAIN"; break;
94 0 : case DNS_RCODE_YXRRSET: val = "DNS_RCODE_YXRRSET"; break;
95 0 : case DNS_RCODE_NXRRSET: val = "DNS_RCODE_NXRRSET"; break;
96 0 : case DNS_RCODE_NOTAUTH: val = "DNS_RCODE_NOTAUTH"; break;
97 0 : case DNS_RCODE_NOTZONE: val = "DNS_RCODE_NOTZONE"; break;
98 0 : case DNS_RCODE_BADSIG: val = "DNS_RCODE_BADSIG"; break;
99 0 : case DNS_RCODE_BADKEY: val = "DNS_RCODE_BADKEY"; break;
100 0 : case DNS_RCODE_BADTIME: val = "DNS_RCODE_BADTIME"; break;
101 0 : case DNS_RCODE_BADMODE: val = "DNS_RCODE_BADMODE"; break;
102 0 : case DNS_RCODE_BADNAME: val = "DNS_RCODE_BADNAME"; break;
103 0 : case DNS_RCODE_BADALG: val = "DNS_RCODE_BADALG"; break;
104 : }
105 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
106 0 : }
107 :
108 26529 : _PUBLIC_ enum ndr_err_code ndr_push_dns_qclass(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum dns_qclass r)
109 : {
110 26529 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
111 26529 : return NDR_ERR_SUCCESS;
112 : }
113 :
114 24460 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_qclass(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum dns_qclass *r)
115 : {
116 4 : uint16_t v;
117 24460 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
118 24460 : *r = v;
119 24460 : return NDR_ERR_SUCCESS;
120 : }
121 :
122 4 : _PUBLIC_ void ndr_print_dns_qclass(struct ndr_print *ndr, const char *name, enum dns_qclass r)
123 : {
124 4 : const char *val = NULL;
125 :
126 4 : switch (r) {
127 4 : case DNS_QCLASS_IN: val = "DNS_QCLASS_IN"; break;
128 0 : case DNS_QCLASS_NONE: val = "DNS_QCLASS_NONE"; break;
129 0 : case DNS_QCLASS_ANY: val = "DNS_QCLASS_ANY"; break;
130 : }
131 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
132 4 : }
133 :
134 26300 : _PUBLIC_ enum ndr_err_code ndr_push_dns_qtype(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum dns_qtype r)
135 : {
136 26300 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
137 26300 : return NDR_ERR_SUCCESS;
138 : }
139 :
140 24460 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_qtype(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum dns_qtype *r)
141 : {
142 4 : uint16_t v;
143 24460 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
144 24460 : *r = v;
145 24460 : return NDR_ERR_SUCCESS;
146 : }
147 :
148 4 : _PUBLIC_ void ndr_print_dns_qtype(struct ndr_print *ndr, const char *name, enum dns_qtype r)
149 : {
150 4 : const char *val = NULL;
151 :
152 4 : switch (r) {
153 0 : case DNS_QTYPE_ZERO: val = "DNS_QTYPE_ZERO"; break;
154 0 : case DNS_QTYPE_A: val = "DNS_QTYPE_A"; break;
155 0 : case DNS_QTYPE_NS: val = "DNS_QTYPE_NS"; break;
156 0 : case DNS_QTYPE_MD: val = "DNS_QTYPE_MD"; break;
157 0 : case DNS_QTYPE_MF: val = "DNS_QTYPE_MF"; break;
158 2 : case DNS_QTYPE_CNAME: val = "DNS_QTYPE_CNAME"; break;
159 2 : case DNS_QTYPE_SOA: val = "DNS_QTYPE_SOA"; break;
160 0 : case DNS_QTYPE_MB: val = "DNS_QTYPE_MB"; break;
161 0 : case DNS_QTYPE_MG: val = "DNS_QTYPE_MG"; break;
162 0 : case DNS_QTYPE_MR: val = "DNS_QTYPE_MR"; break;
163 0 : case DNS_QTYPE_NULL: val = "DNS_QTYPE_NULL"; break;
164 0 : case DNS_QTYPE_WKS: val = "DNS_QTYPE_WKS"; break;
165 0 : case DNS_QTYPE_PTR: val = "DNS_QTYPE_PTR"; break;
166 0 : case DNS_QTYPE_HINFO: val = "DNS_QTYPE_HINFO"; break;
167 0 : case DNS_QTYPE_MINFO: val = "DNS_QTYPE_MINFO"; break;
168 0 : case DNS_QTYPE_MX: val = "DNS_QTYPE_MX"; break;
169 0 : case DNS_QTYPE_TXT: val = "DNS_QTYPE_TXT"; break;
170 0 : case DNS_QTYPE_RP: val = "DNS_QTYPE_RP"; break;
171 0 : case DNS_QTYPE_AFSDB: val = "DNS_QTYPE_AFSDB"; break;
172 0 : case DNS_QTYPE_X25: val = "DNS_QTYPE_X25"; break;
173 0 : case DNS_QTYPE_ISDN: val = "DNS_QTYPE_ISDN"; break;
174 0 : case DNS_QTYPE_RT: val = "DNS_QTYPE_RT"; break;
175 0 : case DNS_QTYPE_SIG: val = "DNS_QTYPE_SIG"; break;
176 0 : case DNS_QTYPE_KEY: val = "DNS_QTYPE_KEY"; break;
177 0 : case DNS_QTYPE_AAAA: val = "DNS_QTYPE_AAAA"; break;
178 0 : case DNS_QTYPE_LOC: val = "DNS_QTYPE_LOC"; break;
179 0 : case DNS_QTYPE_NXT: val = "DNS_QTYPE_NXT"; break;
180 0 : case DNS_QTYPE_NETBIOS: val = "DNS_QTYPE_NETBIOS"; break;
181 0 : case DNS_QTYPE_SRV: val = "DNS_QTYPE_SRV"; break;
182 0 : case DNS_QTYPE_ATMA: val = "DNS_QTYPE_ATMA"; break;
183 0 : case DNS_QTYPE_NAPTR: val = "DNS_QTYPE_NAPTR"; break;
184 0 : case DNS_QTYPE_CERT: val = "DNS_QTYPE_CERT"; break;
185 0 : case DNS_QTYPE_DNAME: val = "DNS_QTYPE_DNAME"; break;
186 0 : case DNS_QTYPE_OPT: val = "DNS_QTYPE_OPT"; break;
187 0 : case DNS_QTYPE_DS: val = "DNS_QTYPE_DS"; break;
188 0 : case DNS_QTYPE_SSHFP: val = "DNS_QTYPE_SSHFP"; break;
189 0 : case DNS_QTYPE_IPSECKEY: val = "DNS_QTYPE_IPSECKEY"; break;
190 0 : case DNS_QTYPE_RRSIG: val = "DNS_QTYPE_RRSIG"; break;
191 0 : case DNS_QTYPE_NSEC: val = "DNS_QTYPE_NSEC"; break;
192 0 : case DNS_QTYPE_DNSKEY: val = "DNS_QTYPE_DNSKEY"; break;
193 0 : case DNS_QTYPE_DHCID: val = "DNS_QTYPE_DHCID"; break;
194 0 : case DNS_QTYPE_NSEC3: val = "DNS_QTYPE_NSEC3"; break;
195 0 : case DNS_QTYPE_NSEC3PARAM: val = "DNS_QTYPE_NSEC3PARAM"; break;
196 0 : case DNS_QTYPE_TLSA: val = "DNS_QTYPE_TLSA"; break;
197 0 : case DNS_QTYPE_CDS: val = "DNS_QTYPE_CDS"; break;
198 0 : case DNS_QTYPE_CDNSKEY: val = "DNS_QTYPE_CDNSKEY"; break;
199 0 : case DNS_QTYPE_SVCB: val = "DNS_QTYPE_SVCB"; break;
200 0 : case DNS_QTYPE_HTTPS: val = "DNS_QTYPE_HTTPS"; break;
201 0 : case DNS_QTYPE_TKEY: val = "DNS_QTYPE_TKEY"; break;
202 0 : case DNS_QTYPE_TSIG: val = "DNS_QTYPE_TSIG"; break;
203 0 : case DNS_QTYPE_IXFR: val = "DNS_QTYPE_IXFR"; break;
204 0 : case DNS_QTYPE_AXFR: val = "DNS_QTYPE_AXFR"; break;
205 0 : case DNS_QTYPE_MAILB: val = "DNS_QTYPE_MAILB"; break;
206 0 : case DNS_QTYPE_MAILA: val = "DNS_QTYPE_MAILA"; break;
207 0 : case DNS_QTYPE_ALL: val = "DNS_QTYPE_ALL"; break;
208 0 : case DNS_QTYPE_URI: val = "DNS_QTYPE_URI"; break;
209 0 : case DNS_QTYPE_CAA: val = "DNS_QTYPE_CAA"; break;
210 : }
211 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
212 4 : }
213 :
214 158 : _PUBLIC_ enum ndr_err_code ndr_push_dns_tkey_mode(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum dns_tkey_mode r)
215 : {
216 158 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
217 158 : return NDR_ERR_SUCCESS;
218 : }
219 :
220 79 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_tkey_mode(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum dns_tkey_mode *r)
221 : {
222 0 : uint16_t v;
223 79 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
224 79 : *r = v;
225 79 : return NDR_ERR_SUCCESS;
226 : }
227 :
228 0 : _PUBLIC_ void ndr_print_dns_tkey_mode(struct ndr_print *ndr, const char *name, enum dns_tkey_mode r)
229 : {
230 0 : const char *val = NULL;
231 :
232 0 : switch (r) {
233 0 : case DNS_TKEY_MODE_NULL: val = "DNS_TKEY_MODE_NULL"; break;
234 0 : case DNS_TKEY_MODE_SERVER: val = "DNS_TKEY_MODE_SERVER"; break;
235 0 : case DNS_TKEY_MODE_DH: val = "DNS_TKEY_MODE_DH"; break;
236 0 : case DNS_TKEY_MODE_GSSAPI: val = "DNS_TKEY_MODE_GSSAPI"; break;
237 0 : case DNS_TKEY_MODE_CLIENT: val = "DNS_TKEY_MODE_CLIENT"; break;
238 0 : case DNS_TKEY_MODE_DELETE: val = "DNS_TKEY_MODE_DELETE"; break;
239 0 : case DNS_TKEY_MODE_LAST: val = "DNS_TKEY_MODE_LAST"; break;
240 : }
241 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
242 0 : }
243 :
244 13284 : _PUBLIC_ enum ndr_err_code ndr_push_dns_name_question(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_name_question *r)
245 : {
246 13284 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
247 13284 : if (ndr_flags & NDR_SCALARS) {
248 13284 : NDR_CHECK(ndr_push_align(ndr, 4));
249 13284 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->name));
250 13280 : NDR_CHECK(ndr_push_dns_qtype(ndr, NDR_SCALARS, r->question_type));
251 13280 : NDR_CHECK(ndr_push_dns_qclass(ndr, NDR_SCALARS, r->question_class));
252 13280 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
253 : }
254 13280 : if (ndr_flags & NDR_BUFFERS) {
255 0 : }
256 13280 : return NDR_ERR_SUCCESS;
257 : }
258 :
259 13244 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_name_question(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_name_question *r)
260 : {
261 13244 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
262 13244 : if (ndr_flags & NDR_SCALARS) {
263 13244 : NDR_CHECK(ndr_pull_align(ndr, 4));
264 13244 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->name));
265 13244 : NDR_CHECK(ndr_pull_dns_qtype(ndr, NDR_SCALARS, &r->question_type));
266 13244 : NDR_CHECK(ndr_pull_dns_qclass(ndr, NDR_SCALARS, &r->question_class));
267 13244 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
268 : }
269 13244 : if (ndr_flags & NDR_BUFFERS) {
270 2 : }
271 13244 : return NDR_ERR_SUCCESS;
272 : }
273 :
274 0 : static void ndr_print_flags_dns_name_question(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_name_question *r)
275 : {
276 0 : ndr_print_dns_name_question(ndr, name, r);
277 0 : }
278 :
279 2 : _PUBLIC_ void ndr_print_dns_name_question(struct ndr_print *ndr, const char *name, const struct dns_name_question *r)
280 : {
281 2 : ndr_print_struct(ndr, name, "dns_name_question");
282 2 : if (r == NULL) { ndr_print_null(ndr); return; }
283 2 : ndr->depth++;
284 2 : ndr_print_dns_string(ndr, "name", r->name);
285 2 : ndr_print_dns_qtype(ndr, "question_type", r->question_type);
286 2 : ndr_print_dns_qclass(ndr, "question_class", r->question_class);
287 2 : ndr->depth--;
288 : }
289 :
290 0 : _PUBLIC_ enum ndr_err_code ndr_push_dns_rdata_data(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_rdata_data *r)
291 : {
292 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
293 0 : if (ndr_flags & NDR_SCALARS) {
294 0 : NDR_CHECK(ndr_push_align(ndr, 2));
295 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
296 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
297 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
298 : }
299 0 : if (ndr_flags & NDR_BUFFERS) {
300 0 : }
301 0 : return NDR_ERR_SUCCESS;
302 : }
303 :
304 0 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_rdata_data(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_rdata_data *r)
305 : {
306 0 : uint32_t size_data_0 = 0;
307 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
308 0 : if (ndr_flags & NDR_SCALARS) {
309 0 : NDR_CHECK(ndr_pull_align(ndr, 2));
310 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
311 0 : size_data_0 = r->length;
312 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_0);
313 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
314 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
315 : }
316 0 : if (ndr_flags & NDR_BUFFERS) {
317 0 : }
318 0 : return NDR_ERR_SUCCESS;
319 : }
320 :
321 0 : static void ndr_print_flags_dns_rdata_data(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_rdata_data *r)
322 : {
323 0 : ndr_print_dns_rdata_data(ndr, name, r);
324 0 : }
325 :
326 0 : _PUBLIC_ void ndr_print_dns_rdata_data(struct ndr_print *ndr, const char *name, const struct dns_rdata_data *r)
327 : {
328 0 : ndr_print_struct(ndr, name, "dns_rdata_data");
329 0 : if (r == NULL) { ndr_print_null(ndr); return; }
330 0 : ndr->depth++;
331 0 : ndr_print_uint16(ndr, "length", r->length);
332 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
333 0 : ndr->depth--;
334 : }
335 :
336 4918 : static enum ndr_err_code ndr_push_dns_soa_record(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_soa_record *r)
337 : {
338 4918 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
339 4918 : if (ndr_flags & NDR_SCALARS) {
340 4918 : NDR_CHECK(ndr_push_align(ndr, 4));
341 4918 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->mname));
342 4918 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->rname));
343 4918 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial));
344 4918 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->refresh));
345 4918 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->retry));
346 4918 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->expire));
347 4918 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minimum));
348 4918 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
349 : }
350 4918 : if (ndr_flags & NDR_BUFFERS) {
351 0 : }
352 4918 : return NDR_ERR_SUCCESS;
353 : }
354 :
355 3981 : static enum ndr_err_code ndr_pull_dns_soa_record(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_soa_record *r)
356 : {
357 3981 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
358 3981 : if (ndr_flags & NDR_SCALARS) {
359 3981 : NDR_CHECK(ndr_pull_align(ndr, 4));
360 3981 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->mname));
361 3981 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->rname));
362 3981 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial));
363 3981 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->refresh));
364 3981 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->retry));
365 3981 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->expire));
366 3981 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minimum));
367 3981 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
368 : }
369 3981 : if (ndr_flags & NDR_BUFFERS) {
370 0 : }
371 3981 : return NDR_ERR_SUCCESS;
372 : }
373 :
374 0 : _PUBLIC_ void ndr_print_dns_soa_record(struct ndr_print *ndr, const char *name, const struct dns_soa_record *r)
375 : {
376 0 : ndr_print_struct(ndr, name, "dns_soa_record");
377 0 : if (r == NULL) { ndr_print_null(ndr); return; }
378 0 : ndr->depth++;
379 0 : ndr_print_dns_string(ndr, "mname", r->mname);
380 0 : ndr_print_dns_string(ndr, "rname", r->rname);
381 0 : ndr_print_uint32(ndr, "serial", r->serial);
382 0 : ndr_print_uint32(ndr, "refresh", r->refresh);
383 0 : ndr_print_uint32(ndr, "retry", r->retry);
384 0 : ndr_print_uint32(ndr, "expire", r->expire);
385 0 : ndr_print_uint32(ndr, "minimum", r->minimum);
386 0 : ndr->depth--;
387 : }
388 :
389 8 : _PUBLIC_ enum ndr_err_code ndr_push_dns_mx_record(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_mx_record *r)
390 : {
391 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
392 8 : if (ndr_flags & NDR_SCALARS) {
393 8 : NDR_CHECK(ndr_push_align(ndr, 4));
394 8 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->preference));
395 8 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->exchange));
396 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
397 : }
398 8 : if (ndr_flags & NDR_BUFFERS) {
399 0 : }
400 8 : return NDR_ERR_SUCCESS;
401 : }
402 :
403 10 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_mx_record(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_mx_record *r)
404 : {
405 10 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
406 10 : if (ndr_flags & NDR_SCALARS) {
407 10 : NDR_CHECK(ndr_pull_align(ndr, 4));
408 10 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->preference));
409 10 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->exchange));
410 10 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
411 : }
412 10 : if (ndr_flags & NDR_BUFFERS) {
413 0 : }
414 10 : return NDR_ERR_SUCCESS;
415 : }
416 :
417 0 : static void ndr_print_flags_dns_mx_record(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_mx_record *r)
418 : {
419 0 : ndr_print_dns_mx_record(ndr, name, r);
420 0 : }
421 :
422 0 : _PUBLIC_ void ndr_print_dns_mx_record(struct ndr_print *ndr, const char *name, const struct dns_mx_record *r)
423 : {
424 0 : ndr_print_struct(ndr, name, "dns_mx_record");
425 0 : if (r == NULL) { ndr_print_null(ndr); return; }
426 0 : ndr->depth++;
427 0 : ndr_print_uint16(ndr, "preference", r->preference);
428 0 : ndr_print_dns_string(ndr, "exchange", r->exchange);
429 0 : ndr->depth--;
430 : }
431 :
432 1871 : _PUBLIC_ enum ndr_err_code ndr_push_dns_txt_record(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_txt_record *r)
433 : {
434 1871 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
435 1871 : if (ndr_flags & NDR_SCALARS) {
436 1871 : NDR_CHECK(ndr_push_align(ndr, 1));
437 1871 : NDR_CHECK(ndr_push_dnsp_string_list(ndr, NDR_SCALARS, &r->txt));
438 1871 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
439 : }
440 1871 : if (ndr_flags & NDR_BUFFERS) {
441 0 : }
442 1871 : return NDR_ERR_SUCCESS;
443 : }
444 :
445 0 : static void ndr_print_flags_dns_txt_record(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_txt_record *r)
446 : {
447 0 : ndr_print_dns_txt_record(ndr, name, r);
448 0 : }
449 :
450 0 : _PUBLIC_ void ndr_print_dns_txt_record(struct ndr_print *ndr, const char *name, const struct dns_txt_record *r)
451 : {
452 0 : ndr_print_struct(ndr, name, "dns_txt_record");
453 0 : if (r == NULL) { ndr_print_null(ndr); return; }
454 0 : ndr->depth++;
455 0 : ndr_print_dnsp_string_list(ndr, "txt", &r->txt);
456 0 : ndr->depth--;
457 : }
458 :
459 0 : _PUBLIC_ enum ndr_err_code ndr_push_dns_rp_record(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_rp_record *r)
460 : {
461 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
462 0 : if (ndr_flags & NDR_SCALARS) {
463 0 : NDR_CHECK(ndr_push_align(ndr, 4));
464 0 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->mbox));
465 0 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->txt));
466 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
467 : }
468 0 : if (ndr_flags & NDR_BUFFERS) {
469 0 : }
470 0 : return NDR_ERR_SUCCESS;
471 : }
472 :
473 0 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_rp_record(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_rp_record *r)
474 : {
475 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
476 0 : if (ndr_flags & NDR_SCALARS) {
477 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
478 0 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->mbox));
479 0 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->txt));
480 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
481 : }
482 0 : if (ndr_flags & NDR_BUFFERS) {
483 0 : }
484 0 : return NDR_ERR_SUCCESS;
485 : }
486 :
487 0 : static void ndr_print_flags_dns_rp_record(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_rp_record *r)
488 : {
489 0 : ndr_print_dns_rp_record(ndr, name, r);
490 0 : }
491 :
492 0 : _PUBLIC_ void ndr_print_dns_rp_record(struct ndr_print *ndr, const char *name, const struct dns_rp_record *r)
493 : {
494 0 : ndr_print_struct(ndr, name, "dns_rp_record");
495 0 : if (r == NULL) { ndr_print_null(ndr); return; }
496 0 : ndr->depth++;
497 0 : ndr_print_dns_string(ndr, "mbox", r->mbox);
498 0 : ndr_print_dns_string(ndr, "txt", r->txt);
499 0 : ndr->depth--;
500 : }
501 :
502 2032 : _PUBLIC_ enum ndr_err_code ndr_push_dns_srv_record(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_srv_record *r)
503 : {
504 2032 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
505 2032 : if (ndr_flags & NDR_SCALARS) {
506 2032 : NDR_CHECK(ndr_push_align(ndr, 4));
507 2032 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->priority));
508 2032 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->weight));
509 2032 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
510 2032 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->target));
511 2032 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
512 : }
513 2032 : if (ndr_flags & NDR_BUFFERS) {
514 0 : }
515 2032 : return NDR_ERR_SUCCESS;
516 : }
517 :
518 1539 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_srv_record(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_srv_record *r)
519 : {
520 1539 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
521 1539 : if (ndr_flags & NDR_SCALARS) {
522 1539 : NDR_CHECK(ndr_pull_align(ndr, 4));
523 1539 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->priority));
524 1539 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->weight));
525 1539 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
526 1539 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->target));
527 1539 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
528 : }
529 1539 : if (ndr_flags & NDR_BUFFERS) {
530 0 : }
531 1539 : return NDR_ERR_SUCCESS;
532 : }
533 :
534 0 : static void ndr_print_flags_dns_srv_record(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_srv_record *r)
535 : {
536 0 : ndr_print_dns_srv_record(ndr, name, r);
537 0 : }
538 :
539 0 : _PUBLIC_ void ndr_print_dns_srv_record(struct ndr_print *ndr, const char *name, const struct dns_srv_record *r)
540 : {
541 0 : ndr_print_struct(ndr, name, "dns_srv_record");
542 0 : if (r == NULL) { ndr_print_null(ndr); return; }
543 0 : ndr->depth++;
544 0 : ndr_print_uint16(ndr, "priority", r->priority);
545 0 : ndr_print_uint16(ndr, "weight", r->weight);
546 0 : ndr_print_uint16(ndr, "port", r->port);
547 0 : ndr_print_dns_string(ndr, "target", r->target);
548 0 : ndr->depth--;
549 : }
550 :
551 0 : _PUBLIC_ enum ndr_err_code ndr_push_dns_opt_record(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_opt_record *r)
552 : {
553 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
554 0 : if (ndr_flags & NDR_SCALARS) {
555 0 : NDR_CHECK(ndr_push_align(ndr, 2));
556 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->option_code));
557 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->option_length));
558 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->option_data, r->option_length));
559 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
560 : }
561 0 : if (ndr_flags & NDR_BUFFERS) {
562 0 : }
563 0 : return NDR_ERR_SUCCESS;
564 : }
565 :
566 26 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_opt_record(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_opt_record *r)
567 : {
568 26 : uint32_t size_option_data_0 = 0;
569 26 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
570 26 : if (ndr_flags & NDR_SCALARS) {
571 26 : NDR_CHECK(ndr_pull_align(ndr, 2));
572 26 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->option_code));
573 26 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->option_length));
574 26 : size_option_data_0 = r->option_length;
575 26 : NDR_PULL_ALLOC_N(ndr, r->option_data, size_option_data_0);
576 26 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->option_data, size_option_data_0));
577 26 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
578 : }
579 26 : if (ndr_flags & NDR_BUFFERS) {
580 0 : }
581 26 : return NDR_ERR_SUCCESS;
582 : }
583 :
584 0 : static void ndr_print_flags_dns_opt_record(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_opt_record *r)
585 : {
586 0 : ndr_print_dns_opt_record(ndr, name, r);
587 0 : }
588 :
589 0 : _PUBLIC_ void ndr_print_dns_opt_record(struct ndr_print *ndr, const char *name, const struct dns_opt_record *r)
590 : {
591 0 : ndr_print_struct(ndr, name, "dns_opt_record");
592 0 : if (r == NULL) { ndr_print_null(ndr); return; }
593 0 : ndr->depth++;
594 0 : ndr_print_uint16(ndr, "option_code", r->option_code);
595 0 : ndr_print_uint16(ndr, "option_length", r->option_length);
596 0 : ndr_print_array_uint8(ndr, "option_data", r->option_data, r->option_length);
597 0 : ndr->depth--;
598 : }
599 :
600 158 : _PUBLIC_ enum ndr_err_code ndr_push_dns_tkey_record(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_tkey_record *r)
601 : {
602 : {
603 158 : libndr_flags _flags_save_STRUCT = ndr->flags;
604 158 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NO_COMPRESSION);
605 158 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
606 158 : if (ndr_flags & NDR_SCALARS) {
607 158 : NDR_CHECK(ndr_push_align(ndr, 4));
608 158 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->algorithm));
609 158 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->inception));
610 158 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->expiration));
611 158 : NDR_CHECK(ndr_push_dns_tkey_mode(ndr, NDR_SCALARS, r->mode));
612 158 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->error));
613 158 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->key_size));
614 158 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key_data, r->key_size));
615 158 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->other_size));
616 158 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->other_data, r->other_size));
617 158 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
618 : }
619 158 : if (ndr_flags & NDR_BUFFERS) {
620 0 : }
621 158 : ndr->flags = _flags_save_STRUCT;
622 : }
623 158 : return NDR_ERR_SUCCESS;
624 : }
625 :
626 79 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_tkey_record(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_tkey_record *r)
627 : {
628 79 : uint32_t size_key_data_0 = 0;
629 79 : uint32_t size_other_data_0 = 0;
630 : {
631 79 : libndr_flags _flags_save_STRUCT = ndr->flags;
632 79 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NO_COMPRESSION);
633 79 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
634 79 : if (ndr_flags & NDR_SCALARS) {
635 79 : NDR_CHECK(ndr_pull_align(ndr, 4));
636 79 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->algorithm));
637 79 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->inception));
638 79 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->expiration));
639 79 : NDR_CHECK(ndr_pull_dns_tkey_mode(ndr, NDR_SCALARS, &r->mode));
640 79 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->error));
641 79 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->key_size));
642 79 : size_key_data_0 = r->key_size;
643 79 : NDR_PULL_ALLOC_N(ndr, r->key_data, size_key_data_0);
644 79 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key_data, size_key_data_0));
645 79 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->other_size));
646 79 : size_other_data_0 = r->other_size;
647 79 : NDR_PULL_ALLOC_N(ndr, r->other_data, size_other_data_0);
648 79 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->other_data, size_other_data_0));
649 79 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
650 : }
651 79 : if (ndr_flags & NDR_BUFFERS) {
652 0 : }
653 79 : ndr->flags = _flags_save_STRUCT;
654 : }
655 79 : return NDR_ERR_SUCCESS;
656 : }
657 :
658 0 : static void ndr_print_flags_dns_tkey_record(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_tkey_record *r)
659 : {
660 0 : ndr_print_dns_tkey_record(ndr, name, r);
661 0 : }
662 :
663 0 : _PUBLIC_ void ndr_print_dns_tkey_record(struct ndr_print *ndr, const char *name, const struct dns_tkey_record *r)
664 : {
665 0 : ndr_print_struct(ndr, name, "dns_tkey_record");
666 0 : if (r == NULL) { ndr_print_null(ndr); return; }
667 : {
668 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
669 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NO_COMPRESSION);
670 0 : ndr->depth++;
671 0 : ndr_print_dns_string(ndr, "algorithm", r->algorithm);
672 0 : ndr_print_uint32(ndr, "inception", r->inception);
673 0 : ndr_print_uint32(ndr, "expiration", r->expiration);
674 0 : ndr_print_dns_tkey_mode(ndr, "mode", r->mode);
675 0 : ndr_print_uint16(ndr, "error", r->error);
676 0 : ndr_print_uint16(ndr, "key_size", r->key_size);
677 0 : ndr_print_array_uint8(ndr, "key_data", r->key_data, r->key_size);
678 0 : ndr_print_uint16(ndr, "other_size", r->other_size);
679 0 : ndr_print_array_uint8(ndr, "other_data", r->other_data, r->other_size);
680 0 : ndr->depth--;
681 0 : ndr->flags = _flags_save_STRUCT;
682 : }
683 : }
684 :
685 246 : _PUBLIC_ enum ndr_err_code ndr_push_dns_tsig_record(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_tsig_record *r)
686 : {
687 : {
688 246 : libndr_flags _flags_save_STRUCT = ndr->flags;
689 246 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NO_COMPRESSION);
690 246 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
691 246 : if (ndr_flags & NDR_SCALARS) {
692 246 : NDR_CHECK(ndr_push_align(ndr, 4));
693 246 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->algorithm_name));
694 246 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->time_prefix));
695 246 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
696 246 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->fudge));
697 246 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->mac_size));
698 246 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->mac, r->mac_size));
699 246 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->original_id));
700 246 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->error));
701 246 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->other_size));
702 246 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->other_data, r->other_size));
703 246 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
704 : }
705 246 : if (ndr_flags & NDR_BUFFERS) {
706 0 : }
707 246 : ndr->flags = _flags_save_STRUCT;
708 : }
709 246 : return NDR_ERR_SUCCESS;
710 : }
711 :
712 94 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_tsig_record(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_tsig_record *r)
713 : {
714 94 : uint32_t size_mac_0 = 0;
715 94 : uint32_t size_other_data_0 = 0;
716 : {
717 94 : libndr_flags _flags_save_STRUCT = ndr->flags;
718 94 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NO_COMPRESSION);
719 94 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
720 94 : if (ndr_flags & NDR_SCALARS) {
721 94 : NDR_CHECK(ndr_pull_align(ndr, 4));
722 94 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->algorithm_name));
723 94 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->time_prefix));
724 94 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
725 94 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->fudge));
726 94 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->mac_size));
727 94 : size_mac_0 = r->mac_size;
728 94 : NDR_PULL_ALLOC_N(ndr, r->mac, size_mac_0);
729 94 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->mac, size_mac_0));
730 94 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->original_id));
731 94 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->error));
732 94 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->other_size));
733 94 : size_other_data_0 = r->other_size;
734 94 : NDR_PULL_ALLOC_N(ndr, r->other_data, size_other_data_0);
735 94 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->other_data, size_other_data_0));
736 94 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
737 : }
738 94 : if (ndr_flags & NDR_BUFFERS) {
739 0 : }
740 94 : ndr->flags = _flags_save_STRUCT;
741 : }
742 94 : return NDR_ERR_SUCCESS;
743 : }
744 :
745 0 : static void ndr_print_flags_dns_tsig_record(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_tsig_record *r)
746 : {
747 0 : ndr_print_dns_tsig_record(ndr, name, r);
748 0 : }
749 :
750 0 : _PUBLIC_ void ndr_print_dns_tsig_record(struct ndr_print *ndr, const char *name, const struct dns_tsig_record *r)
751 : {
752 0 : ndr_print_struct(ndr, name, "dns_tsig_record");
753 0 : if (r == NULL) { ndr_print_null(ndr); return; }
754 : {
755 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
756 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NO_COMPRESSION);
757 0 : ndr->depth++;
758 0 : ndr_print_dns_string(ndr, "algorithm_name", r->algorithm_name);
759 0 : ndr_print_uint16(ndr, "time_prefix", r->time_prefix);
760 0 : ndr_print_uint32(ndr, "time", r->time);
761 0 : ndr_print_uint16(ndr, "fudge", r->fudge);
762 0 : ndr_print_uint16(ndr, "mac_size", r->mac_size);
763 0 : ndr_print_array_uint8(ndr, "mac", r->mac, r->mac_size);
764 0 : ndr_print_uint16(ndr, "original_id", r->original_id);
765 0 : ndr_print_uint16(ndr, "error", r->error);
766 0 : ndr_print_uint16(ndr, "other_size", r->other_size);
767 0 : ndr_print_array_uint8(ndr, "other_data", r->other_data, r->other_size);
768 0 : ndr->depth--;
769 0 : ndr->flags = _flags_save_STRUCT;
770 : }
771 : }
772 :
773 229 : _PUBLIC_ enum ndr_err_code ndr_push_dns_fake_tsig_rec(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_fake_tsig_rec *r)
774 : {
775 : {
776 229 : libndr_flags _flags_save_STRUCT = ndr->flags;
777 229 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NO_COMPRESSION|LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
778 229 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
779 229 : if (ndr_flags & NDR_SCALARS) {
780 229 : NDR_CHECK(ndr_push_align(ndr, 4));
781 229 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->name));
782 229 : NDR_CHECK(ndr_push_dns_qclass(ndr, NDR_SCALARS, r->rr_class));
783 229 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ttl));
784 229 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->algorithm_name));
785 229 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->time_prefix));
786 229 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
787 229 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->fudge));
788 229 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->error));
789 229 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->other_size));
790 229 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->other_data, r->other_size));
791 229 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
792 : }
793 229 : if (ndr_flags & NDR_BUFFERS) {
794 0 : }
795 229 : ndr->flags = _flags_save_STRUCT;
796 : }
797 229 : return NDR_ERR_SUCCESS;
798 : }
799 :
800 0 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_fake_tsig_rec(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_fake_tsig_rec *r)
801 : {
802 0 : uint32_t size_other_data_0 = 0;
803 : {
804 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
805 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NO_COMPRESSION|LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
806 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
807 0 : if (ndr_flags & NDR_SCALARS) {
808 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
809 0 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->name));
810 0 : NDR_CHECK(ndr_pull_dns_qclass(ndr, NDR_SCALARS, &r->rr_class));
811 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ttl));
812 0 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->algorithm_name));
813 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->time_prefix));
814 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
815 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->fudge));
816 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->error));
817 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->other_size));
818 0 : size_other_data_0 = r->other_size;
819 0 : NDR_PULL_ALLOC_N(ndr, r->other_data, size_other_data_0);
820 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->other_data, size_other_data_0));
821 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
822 : }
823 0 : if (ndr_flags & NDR_BUFFERS) {
824 0 : }
825 0 : ndr->flags = _flags_save_STRUCT;
826 : }
827 0 : return NDR_ERR_SUCCESS;
828 : }
829 :
830 0 : static void ndr_print_flags_dns_fake_tsig_rec(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_fake_tsig_rec *r)
831 : {
832 0 : ndr_print_dns_fake_tsig_rec(ndr, name, r);
833 0 : }
834 :
835 0 : _PUBLIC_ void ndr_print_dns_fake_tsig_rec(struct ndr_print *ndr, const char *name, const struct dns_fake_tsig_rec *r)
836 : {
837 0 : ndr_print_struct(ndr, name, "dns_fake_tsig_rec");
838 0 : if (r == NULL) { ndr_print_null(ndr); return; }
839 : {
840 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
841 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NO_COMPRESSION|LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
842 0 : ndr->depth++;
843 0 : ndr_print_dns_string(ndr, "name", r->name);
844 0 : ndr_print_dns_qclass(ndr, "rr_class", r->rr_class);
845 0 : ndr_print_uint32(ndr, "ttl", r->ttl);
846 0 : ndr_print_dns_string(ndr, "algorithm_name", r->algorithm_name);
847 0 : ndr_print_uint16(ndr, "time_prefix", r->time_prefix);
848 0 : ndr_print_uint32(ndr, "time", r->time);
849 0 : ndr_print_uint16(ndr, "fudge", r->fudge);
850 0 : ndr_print_uint16(ndr, "error", r->error);
851 0 : ndr_print_uint16(ndr, "other_size", r->other_size);
852 0 : ndr_print_array_uint8(ndr, "other_data", r->other_data, r->other_size);
853 0 : ndr->depth--;
854 0 : ndr->flags = _flags_save_STRUCT;
855 : }
856 : }
857 :
858 25840 : _PUBLIC_ enum ndr_err_code ndr_push_dns_rdata(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union dns_rdata *r)
859 : {
860 0 : uint32_t level;
861 : {
862 25840 : libndr_flags _flags_save_UNION = ndr->flags;
863 25840 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
864 25840 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
865 25840 : if (ndr_flags & NDR_SCALARS) {
866 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
867 12820 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
868 12820 : NDR_CHECK(ndr_push_union_align(ndr, 4));
869 12820 : switch (level) {
870 1831 : case DNS_QTYPE_A: {
871 1831 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ipv4_record));
872 1831 : break; }
873 :
874 150 : case DNS_QTYPE_NS: {
875 150 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->ns_record));
876 150 : break; }
877 :
878 204 : case DNS_QTYPE_CNAME: {
879 204 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->cname_record));
880 204 : break; }
881 :
882 4918 : case DNS_QTYPE_SOA: {
883 4918 : NDR_CHECK(ndr_push_dns_soa_record(ndr, NDR_SCALARS, &r->soa_record));
884 4918 : break; }
885 :
886 0 : case DNS_QTYPE_PTR: {
887 0 : NDR_CHECK(ndr_push_dns_string(ndr, NDR_SCALARS, r->ptr_record));
888 0 : break; }
889 :
890 0 : case DNS_QTYPE_HINFO: {
891 0 : NDR_CHECK(ndr_push_dnsp_hinfo(ndr, NDR_SCALARS, &r->hinfo_record));
892 0 : break; }
893 :
894 8 : case DNS_QTYPE_MX: {
895 8 : NDR_CHECK(ndr_push_dns_mx_record(ndr, NDR_SCALARS, &r->mx_record));
896 8 : break; }
897 :
898 1871 : case DNS_QTYPE_TXT: {
899 1871 : NDR_CHECK(ndr_push_dns_txt_record(ndr, NDR_SCALARS, &r->txt_record));
900 1871 : break; }
901 :
902 0 : case DNS_QTYPE_RP: {
903 0 : NDR_CHECK(ndr_push_dns_rp_record(ndr, NDR_SCALARS, &r->rp_record));
904 0 : break; }
905 :
906 1422 : case DNS_QTYPE_AAAA: {
907 1422 : NDR_CHECK(ndr_push_ipv6address(ndr, NDR_SCALARS, r->ipv6_record));
908 1422 : break; }
909 :
910 2032 : case DNS_QTYPE_SRV: {
911 2032 : NDR_CHECK(ndr_push_dns_srv_record(ndr, NDR_SCALARS, &r->srv_record));
912 2032 : break; }
913 :
914 0 : case DNS_QTYPE_OPT: {
915 0 : NDR_CHECK(ndr_push_dns_opt_record(ndr, NDR_SCALARS, &r->opt_record));
916 0 : break; }
917 :
918 226 : case DNS_QTYPE_TSIG: {
919 226 : NDR_CHECK(ndr_push_dns_tsig_record(ndr, NDR_SCALARS, &r->tsig_record));
920 226 : break; }
921 :
922 158 : case DNS_QTYPE_TKEY: {
923 158 : NDR_CHECK(ndr_push_dns_tkey_record(ndr, NDR_SCALARS, &r->tkey_record));
924 158 : break; }
925 :
926 0 : default: {
927 0 : break; }
928 :
929 : }
930 : }
931 25840 : ndr->flags = _flags_save_UNION;
932 : }
933 25840 : return NDR_ERR_SUCCESS;
934 : }
935 :
936 22153 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_rdata(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union dns_rdata *r)
937 : {
938 4 : uint32_t level;
939 : {
940 22153 : libndr_flags _flags_save_UNION = ndr->flags;
941 22153 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
942 22153 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
943 22153 : if (ndr_flags & NDR_SCALARS) {
944 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
945 10937 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
946 10937 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
947 10937 : switch (level) {
948 1664 : case DNS_QTYPE_A: {
949 1664 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ipv4_record));
950 1664 : break; }
951 :
952 117 : case DNS_QTYPE_NS: {
953 117 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->ns_record));
954 117 : break; }
955 :
956 233 : case DNS_QTYPE_CNAME: {
957 233 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->cname_record));
958 231 : break; }
959 :
960 3981 : case DNS_QTYPE_SOA: {
961 3981 : NDR_CHECK(ndr_pull_dns_soa_record(ndr, NDR_SCALARS, &r->soa_record));
962 3981 : break; }
963 :
964 0 : case DNS_QTYPE_PTR: {
965 0 : NDR_CHECK(ndr_pull_dns_string(ndr, NDR_SCALARS, &r->ptr_record));
966 0 : break; }
967 :
968 0 : case DNS_QTYPE_HINFO: {
969 0 : NDR_CHECK(ndr_pull_dnsp_hinfo(ndr, NDR_SCALARS, &r->hinfo_record));
970 0 : break; }
971 :
972 10 : case DNS_QTYPE_MX: {
973 10 : NDR_CHECK(ndr_pull_dns_mx_record(ndr, NDR_SCALARS, &r->mx_record));
974 10 : break; }
975 :
976 1872 : case DNS_QTYPE_TXT: {
977 1872 : NDR_CHECK(ndr_pull_dns_txt_record(ndr, NDR_SCALARS, &r->txt_record));
978 1872 : break; }
979 :
980 0 : case DNS_QTYPE_RP: {
981 0 : NDR_CHECK(ndr_pull_dns_rp_record(ndr, NDR_SCALARS, &r->rp_record));
982 0 : break; }
983 :
984 1322 : case DNS_QTYPE_AAAA: {
985 1322 : NDR_CHECK(ndr_pull_ipv6address(ndr, NDR_SCALARS, &r->ipv6_record));
986 1322 : break; }
987 :
988 1539 : case DNS_QTYPE_SRV: {
989 1539 : NDR_CHECK(ndr_pull_dns_srv_record(ndr, NDR_SCALARS, &r->srv_record));
990 1539 : break; }
991 :
992 26 : case DNS_QTYPE_OPT: {
993 26 : NDR_CHECK(ndr_pull_dns_opt_record(ndr, NDR_SCALARS, &r->opt_record));
994 26 : break; }
995 :
996 94 : case DNS_QTYPE_TSIG: {
997 94 : NDR_CHECK(ndr_pull_dns_tsig_record(ndr, NDR_SCALARS, &r->tsig_record));
998 94 : break; }
999 :
1000 79 : case DNS_QTYPE_TKEY: {
1001 79 : NDR_CHECK(ndr_pull_dns_tkey_record(ndr, NDR_SCALARS, &r->tkey_record));
1002 79 : break; }
1003 :
1004 0 : default: {
1005 0 : break; }
1006 :
1007 : }
1008 : }
1009 22153 : ndr->flags = _flags_save_UNION;
1010 : }
1011 22153 : return NDR_ERR_SUCCESS;
1012 : }
1013 :
1014 2 : _PUBLIC_ void ndr_print_dns_rdata(struct ndr_print *ndr, const char *name, const union dns_rdata *r)
1015 : {
1016 2 : uint32_t level;
1017 : {
1018 2 : libndr_flags _flags_save_UNION = ndr->flags;
1019 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
1020 2 : level = ndr_print_steal_switch_value(ndr, r);
1021 2 : ndr_print_union(ndr, name, level, "dns_rdata");
1022 2 : switch (level) {
1023 0 : case DNS_QTYPE_A:
1024 0 : ndr_print_ipv4address(ndr, "ipv4_record", r->ipv4_record);
1025 0 : break;
1026 :
1027 0 : case DNS_QTYPE_NS:
1028 0 : ndr_print_dns_string(ndr, "ns_record", r->ns_record);
1029 0 : break;
1030 :
1031 2 : case DNS_QTYPE_CNAME:
1032 2 : ndr_print_dns_string(ndr, "cname_record", r->cname_record);
1033 2 : break;
1034 :
1035 0 : case DNS_QTYPE_SOA:
1036 0 : ndr_print_dns_soa_record(ndr, "soa_record", &r->soa_record);
1037 0 : break;
1038 :
1039 0 : case DNS_QTYPE_PTR:
1040 0 : ndr_print_dns_string(ndr, "ptr_record", r->ptr_record);
1041 0 : break;
1042 :
1043 0 : case DNS_QTYPE_HINFO:
1044 0 : ndr_print_dnsp_hinfo(ndr, "hinfo_record", &r->hinfo_record);
1045 0 : break;
1046 :
1047 0 : case DNS_QTYPE_MX:
1048 0 : ndr_print_dns_mx_record(ndr, "mx_record", &r->mx_record);
1049 0 : break;
1050 :
1051 0 : case DNS_QTYPE_TXT:
1052 0 : ndr_print_dns_txt_record(ndr, "txt_record", &r->txt_record);
1053 0 : break;
1054 :
1055 0 : case DNS_QTYPE_RP:
1056 0 : ndr_print_dns_rp_record(ndr, "rp_record", &r->rp_record);
1057 0 : break;
1058 :
1059 0 : case DNS_QTYPE_AAAA:
1060 0 : ndr_print_ipv6address(ndr, "ipv6_record", r->ipv6_record);
1061 0 : break;
1062 :
1063 0 : case DNS_QTYPE_SRV:
1064 0 : ndr_print_dns_srv_record(ndr, "srv_record", &r->srv_record);
1065 0 : break;
1066 :
1067 0 : case DNS_QTYPE_OPT:
1068 0 : ndr_print_dns_opt_record(ndr, "opt_record", &r->opt_record);
1069 0 : break;
1070 :
1071 0 : case DNS_QTYPE_TSIG:
1072 0 : ndr_print_dns_tsig_record(ndr, "tsig_record", &r->tsig_record);
1073 0 : break;
1074 :
1075 0 : case DNS_QTYPE_TKEY:
1076 0 : ndr_print_dns_tkey_record(ndr, "tkey_record", &r->tkey_record);
1077 0 : break;
1078 :
1079 0 : default:
1080 0 : break;
1081 :
1082 : }
1083 2 : ndr->flags = _flags_save_UNION;
1084 : }
1085 2 : }
1086 :
1087 2 : _PUBLIC_ void ndr_print_dns_res_rec(struct ndr_print *ndr, const char *name, const struct dns_res_rec *r)
1088 : {
1089 2 : ndr_print_struct(ndr, name, "dns_res_rec");
1090 2 : if (r == NULL) { ndr_print_null(ndr); return; }
1091 : {
1092 2 : libndr_flags _flags_save_STRUCT = ndr->flags;
1093 2 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_NOALIGN);
1094 2 : ndr->depth++;
1095 2 : ndr_print_dns_string(ndr, "name", r->name);
1096 2 : ndr_print_dns_qtype(ndr, "rr_type", r->rr_type);
1097 2 : ndr_print_dns_qclass(ndr, "rr_class", r->rr_class);
1098 2 : ndr_print_uint32(ndr, "ttl", r->ttl);
1099 2 : ndr_print_uint16(ndr, "length", r->length);
1100 2 : ndr_print_set_switch_value(ndr, &r->rdata, r->rr_type);
1101 2 : ndr_print_dns_rdata(ndr, "rdata", &r->rdata);
1102 2 : ndr_print_DATA_BLOB(ndr, "unexpected", r->unexpected);
1103 2 : ndr->depth--;
1104 2 : ndr->flags = _flags_save_STRUCT;
1105 : }
1106 : }
1107 :
1108 13276 : _PUBLIC_ enum ndr_err_code ndr_push_dns_name_packet(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct dns_name_packet *r)
1109 : {
1110 0 : uint32_t cntr_questions_0;
1111 0 : uint32_t cntr_answers_0;
1112 0 : uint32_t cntr_nsrecs_0;
1113 0 : uint32_t cntr_additional_0;
1114 : {
1115 13276 : libndr_flags _flags_save_STRUCT = ndr->flags;
1116 13276 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1117 13276 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1118 13276 : if (ndr_flags & NDR_SCALARS) {
1119 13276 : NDR_CHECK(ndr_push_align(ndr, 4));
1120 13276 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->id));
1121 13276 : NDR_CHECK(ndr_push_dns_operation(ndr, NDR_SCALARS, r->operation));
1122 13276 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->qdcount));
1123 13276 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ancount));
1124 13276 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nscount));
1125 13276 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->arcount));
1126 26556 : for (cntr_questions_0 = 0; cntr_questions_0 < (r->qdcount); cntr_questions_0++) {
1127 13284 : NDR_CHECK(ndr_push_dns_name_question(ndr, NDR_SCALARS, &r->questions[cntr_questions_0]));
1128 : }
1129 18661 : for (cntr_answers_0 = 0; cntr_answers_0 < (r->ancount); cntr_answers_0++) {
1130 5389 : NDR_CHECK(ndr_push_dns_res_rec(ndr, NDR_SCALARS, &r->answers[cntr_answers_0]));
1131 : }
1132 20666 : for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (r->nscount); cntr_nsrecs_0++) {
1133 7394 : NDR_CHECK(ndr_push_dns_res_rec(ndr, NDR_SCALARS, &r->nsrecs[cntr_nsrecs_0]));
1134 : }
1135 13441 : for (cntr_additional_0 = 0; cntr_additional_0 < (r->arcount); cntr_additional_0++) {
1136 169 : NDR_CHECK(ndr_push_dns_res_rec(ndr, NDR_SCALARS, &r->additional[cntr_additional_0]));
1137 : }
1138 13272 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1139 : }
1140 13272 : if (ndr_flags & NDR_BUFFERS) {
1141 18661 : for (cntr_answers_0 = 0; cntr_answers_0 < (r->ancount); cntr_answers_0++) {
1142 5389 : NDR_CHECK(ndr_push_dns_res_rec(ndr, NDR_BUFFERS, &r->answers[cntr_answers_0]));
1143 : }
1144 20666 : for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (r->nscount); cntr_nsrecs_0++) {
1145 7394 : NDR_CHECK(ndr_push_dns_res_rec(ndr, NDR_BUFFERS, &r->nsrecs[cntr_nsrecs_0]));
1146 : }
1147 13441 : for (cntr_additional_0 = 0; cntr_additional_0 < (r->arcount); cntr_additional_0++) {
1148 169 : NDR_CHECK(ndr_push_dns_res_rec(ndr, NDR_BUFFERS, &r->additional[cntr_additional_0]));
1149 : }
1150 : }
1151 13272 : ndr->flags = _flags_save_STRUCT;
1152 : }
1153 13272 : return NDR_ERR_SUCCESS;
1154 : }
1155 :
1156 13228 : _PUBLIC_ enum ndr_err_code ndr_pull_dns_name_packet(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct dns_name_packet *r)
1157 : {
1158 13228 : uint32_t size_questions_0 = 0;
1159 2 : uint32_t cntr_questions_0;
1160 13228 : TALLOC_CTX *_mem_save_questions_0 = NULL;
1161 13228 : uint32_t size_answers_0 = 0;
1162 2 : uint32_t cntr_answers_0;
1163 13228 : TALLOC_CTX *_mem_save_answers_0 = NULL;
1164 13228 : uint32_t size_nsrecs_0 = 0;
1165 2 : uint32_t cntr_nsrecs_0;
1166 13228 : TALLOC_CTX *_mem_save_nsrecs_0 = NULL;
1167 13228 : uint32_t size_additional_0 = 0;
1168 2 : uint32_t cntr_additional_0;
1169 13228 : TALLOC_CTX *_mem_save_additional_0 = NULL;
1170 : {
1171 13228 : libndr_flags _flags_save_STRUCT = ndr->flags;
1172 13228 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1173 13228 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1174 13228 : if (ndr_flags & NDR_SCALARS) {
1175 13228 : NDR_CHECK(ndr_pull_align(ndr, 4));
1176 13228 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->id));
1177 13228 : NDR_CHECK(ndr_pull_dns_operation(ndr, NDR_SCALARS, &r->operation));
1178 13228 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->qdcount));
1179 13228 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ancount));
1180 13228 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nscount));
1181 13228 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->arcount));
1182 13228 : size_questions_0 = r->qdcount;
1183 13228 : NDR_PULL_ALLOC_N(ndr, r->questions, size_questions_0);
1184 13228 : _mem_save_questions_0 = NDR_PULL_GET_MEM_CTX(ndr);
1185 13228 : NDR_PULL_SET_MEM_CTX(ndr, r->questions, 0);
1186 26472 : for (cntr_questions_0 = 0; cntr_questions_0 < (size_questions_0); cntr_questions_0++) {
1187 13244 : NDR_CHECK(ndr_pull_dns_name_question(ndr, NDR_SCALARS, &r->questions[cntr_questions_0]));
1188 : }
1189 13228 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_questions_0, 0);
1190 13228 : size_answers_0 = r->ancount;
1191 13228 : NDR_PULL_ALLOC_N(ndr, r->answers, size_answers_0);
1192 13228 : _mem_save_answers_0 = NDR_PULL_GET_MEM_CTX(ndr);
1193 13228 : NDR_PULL_SET_MEM_CTX(ndr, r->answers, 0);
1194 17730 : for (cntr_answers_0 = 0; cntr_answers_0 < (size_answers_0); cntr_answers_0++) {
1195 4502 : NDR_CHECK(ndr_pull_dns_res_rec(ndr, NDR_SCALARS, &r->answers[cntr_answers_0]));
1196 : }
1197 13228 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_answers_0, 0);
1198 13228 : size_nsrecs_0 = r->nscount;
1199 13228 : NDR_PULL_ALLOC_N(ndr, r->nsrecs, size_nsrecs_0);
1200 13228 : _mem_save_nsrecs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1201 13228 : NDR_PULL_SET_MEM_CTX(ndr, r->nsrecs, 0);
1202 19754 : for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (size_nsrecs_0); cntr_nsrecs_0++) {
1203 6526 : NDR_CHECK(ndr_pull_dns_res_rec(ndr, NDR_SCALARS, &r->nsrecs[cntr_nsrecs_0]));
1204 : }
1205 13228 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nsrecs_0, 0);
1206 13228 : size_additional_0 = r->arcount;
1207 13228 : NDR_PULL_ALLOC_N(ndr, r->additional, size_additional_0);
1208 13228 : _mem_save_additional_0 = NDR_PULL_GET_MEM_CTX(ndr);
1209 13228 : NDR_PULL_SET_MEM_CTX(ndr, r->additional, 0);
1210 13416 : for (cntr_additional_0 = 0; cntr_additional_0 < (size_additional_0); cntr_additional_0++) {
1211 188 : NDR_CHECK(ndr_pull_dns_res_rec(ndr, NDR_SCALARS, &r->additional[cntr_additional_0]));
1212 : }
1213 13228 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_additional_0, 0);
1214 13228 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1215 : }
1216 13228 : if (ndr_flags & NDR_BUFFERS) {
1217 13228 : size_answers_0 = r->ancount;
1218 13228 : _mem_save_answers_0 = NDR_PULL_GET_MEM_CTX(ndr);
1219 13228 : NDR_PULL_SET_MEM_CTX(ndr, r->answers, 0);
1220 17730 : for (cntr_answers_0 = 0; cntr_answers_0 < (size_answers_0); cntr_answers_0++) {
1221 4502 : NDR_CHECK(ndr_pull_dns_res_rec(ndr, NDR_BUFFERS, &r->answers[cntr_answers_0]));
1222 : }
1223 13228 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_answers_0, 0);
1224 13228 : size_nsrecs_0 = r->nscount;
1225 13228 : _mem_save_nsrecs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1226 13228 : NDR_PULL_SET_MEM_CTX(ndr, r->nsrecs, 0);
1227 19754 : for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (size_nsrecs_0); cntr_nsrecs_0++) {
1228 6526 : NDR_CHECK(ndr_pull_dns_res_rec(ndr, NDR_BUFFERS, &r->nsrecs[cntr_nsrecs_0]));
1229 : }
1230 13228 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nsrecs_0, 0);
1231 13228 : size_additional_0 = r->arcount;
1232 13228 : _mem_save_additional_0 = NDR_PULL_GET_MEM_CTX(ndr);
1233 13228 : NDR_PULL_SET_MEM_CTX(ndr, r->additional, 0);
1234 13416 : for (cntr_additional_0 = 0; cntr_additional_0 < (size_additional_0); cntr_additional_0++) {
1235 188 : NDR_CHECK(ndr_pull_dns_res_rec(ndr, NDR_BUFFERS, &r->additional[cntr_additional_0]));
1236 : }
1237 13228 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_additional_0, 0);
1238 17730 : for (cntr_answers_0 = 0; cntr_answers_0 < (size_answers_0); cntr_answers_0++) {
1239 : }
1240 19750 : for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (size_nsrecs_0); cntr_nsrecs_0++) {
1241 : }
1242 13414 : for (cntr_additional_0 = 0; cntr_additional_0 < (size_additional_0); cntr_additional_0++) {
1243 : }
1244 : }
1245 13228 : ndr->flags = _flags_save_STRUCT;
1246 : }
1247 13228 : return NDR_ERR_SUCCESS;
1248 : }
1249 :
1250 1 : static void ndr_print_flags_dns_name_packet(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dns_name_packet *r)
1251 : {
1252 1 : ndr_print_dns_name_packet(ndr, name, r);
1253 1 : }
1254 :
1255 2 : _PUBLIC_ void ndr_print_dns_name_packet(struct ndr_print *ndr, const char *name, const struct dns_name_packet *r)
1256 : {
1257 2 : uint32_t cntr_questions_0;
1258 2 : uint32_t cntr_answers_0;
1259 2 : uint32_t cntr_nsrecs_0;
1260 2 : uint32_t cntr_additional_0;
1261 2 : ndr_print_struct(ndr, name, "dns_name_packet");
1262 2 : if (r == NULL) { ndr_print_null(ndr); return; }
1263 : {
1264 2 : libndr_flags _flags_save_STRUCT = ndr->flags;
1265 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
1266 2 : ndr->depth++;
1267 2 : ndr_print_uint16(ndr, "id", r->id);
1268 2 : ndr_print_dns_operation(ndr, "operation", r->operation);
1269 2 : ndr_print_uint16(ndr, "qdcount", r->qdcount);
1270 2 : ndr_print_uint16(ndr, "ancount", r->ancount);
1271 2 : ndr_print_uint16(ndr, "nscount", r->nscount);
1272 2 : ndr_print_uint16(ndr, "arcount", r->arcount);
1273 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "questions", (uint32_t)(r->qdcount));
1274 2 : ndr->depth++;
1275 4 : for (cntr_questions_0 = 0; cntr_questions_0 < (r->qdcount); cntr_questions_0++) {
1276 2 : ndr_print_dns_name_question(ndr, "questions", &r->questions[cntr_questions_0]);
1277 : }
1278 2 : ndr->depth--;
1279 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "answers", (uint32_t)(r->ancount));
1280 2 : ndr->depth++;
1281 2 : for (cntr_answers_0 = 0; cntr_answers_0 < (r->ancount); cntr_answers_0++) {
1282 0 : ndr_print_dns_res_rec(ndr, "answers", &r->answers[cntr_answers_0]);
1283 : }
1284 2 : ndr->depth--;
1285 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "nsrecs", (uint32_t)(r->nscount));
1286 2 : ndr->depth++;
1287 4 : for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (r->nscount); cntr_nsrecs_0++) {
1288 2 : ndr_print_dns_res_rec(ndr, "nsrecs", &r->nsrecs[cntr_nsrecs_0]);
1289 : }
1290 2 : ndr->depth--;
1291 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "additional", (uint32_t)(r->arcount));
1292 2 : ndr->depth++;
1293 2 : for (cntr_additional_0 = 0; cntr_additional_0 < (r->arcount); cntr_additional_0++) {
1294 0 : ndr_print_dns_res_rec(ndr, "additional", &r->additional[cntr_additional_0]);
1295 : }
1296 2 : ndr->depth--;
1297 2 : ndr->depth--;
1298 2 : ndr->flags = _flags_save_STRUCT;
1299 : }
1300 : }
1301 :
1302 0 : static enum ndr_err_code ndr_push_decode_dns_name_packet(struct ndr_push *ndr, ndr_flags_type flags, const struct decode_dns_name_packet *r)
1303 : {
1304 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1305 0 : if (flags & NDR_IN) {
1306 0 : NDR_CHECK(ndr_push_dns_name_packet(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.packet));
1307 : }
1308 0 : if (flags & NDR_OUT) {
1309 0 : }
1310 0 : return NDR_ERR_SUCCESS;
1311 : }
1312 :
1313 1 : static enum ndr_err_code ndr_pull_decode_dns_name_packet(struct ndr_pull *ndr, ndr_flags_type flags, struct decode_dns_name_packet *r)
1314 : {
1315 1 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1316 1 : if (flags & NDR_IN) {
1317 1 : NDR_CHECK(ndr_pull_dns_name_packet(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.packet));
1318 : }
1319 1 : if (flags & NDR_OUT) {
1320 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1321 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1322 1 : }
1323 1 : return NDR_ERR_SUCCESS;
1324 : }
1325 :
1326 1 : _PUBLIC_ void ndr_print_decode_dns_name_packet(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct decode_dns_name_packet *r)
1327 : {
1328 1 : ndr_print_struct(ndr, name, "decode_dns_name_packet");
1329 1 : if (r == NULL) { ndr_print_null(ndr); return; }
1330 1 : ndr->depth++;
1331 1 : if (flags & NDR_SET_VALUES) {
1332 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1333 : }
1334 1 : if (flags & NDR_IN) {
1335 1 : ndr_print_struct(ndr, "in", "decode_dns_name_packet");
1336 1 : ndr->depth++;
1337 1 : ndr_print_dns_name_packet(ndr, "packet", &r->in.packet);
1338 1 : ndr->depth--;
1339 : }
1340 1 : if (flags & NDR_OUT) {
1341 0 : ndr_print_struct(ndr, "out", "decode_dns_name_packet");
1342 0 : ndr->depth++;
1343 0 : ndr->depth--;
1344 : }
1345 1 : ndr->depth--;
1346 : }
1347 :
1348 : #ifndef SKIP_NDR_TABLE_dns
1349 : static const struct ndr_interface_public_struct dns_public_structs[] = {
1350 : {
1351 : .name = "dns_name_question",
1352 : .struct_size = sizeof(struct dns_name_question ),
1353 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_name_question,
1354 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_name_question,
1355 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_name_question,
1356 : },
1357 : {
1358 : .name = "dns_rdata_data",
1359 : .struct_size = sizeof(struct dns_rdata_data ),
1360 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_rdata_data,
1361 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_rdata_data,
1362 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_rdata_data,
1363 : },
1364 : {
1365 : .name = "dns_mx_record",
1366 : .struct_size = sizeof(struct dns_mx_record ),
1367 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_mx_record,
1368 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_mx_record,
1369 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_mx_record,
1370 : },
1371 : {
1372 : .name = "dns_txt_record",
1373 : .struct_size = sizeof(struct dns_txt_record ),
1374 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_txt_record,
1375 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_txt_record,
1376 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_txt_record,
1377 : },
1378 : {
1379 : .name = "dns_rp_record",
1380 : .struct_size = sizeof(struct dns_rp_record ),
1381 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_rp_record,
1382 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_rp_record,
1383 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_rp_record,
1384 : },
1385 : {
1386 : .name = "dns_srv_record",
1387 : .struct_size = sizeof(struct dns_srv_record ),
1388 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_srv_record,
1389 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_srv_record,
1390 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_srv_record,
1391 : },
1392 : {
1393 : .name = "dns_opt_record",
1394 : .struct_size = sizeof(struct dns_opt_record ),
1395 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_opt_record,
1396 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_opt_record,
1397 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_opt_record,
1398 : },
1399 : {
1400 : .name = "dns_tkey_record",
1401 : .struct_size = sizeof(struct dns_tkey_record ),
1402 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_tkey_record,
1403 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_tkey_record,
1404 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_tkey_record,
1405 : },
1406 : {
1407 : .name = "dns_tsig_record",
1408 : .struct_size = sizeof(struct dns_tsig_record ),
1409 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_tsig_record,
1410 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_tsig_record,
1411 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_tsig_record,
1412 : },
1413 : {
1414 : .name = "dns_fake_tsig_rec",
1415 : .struct_size = sizeof(struct dns_fake_tsig_rec ),
1416 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_fake_tsig_rec,
1417 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_fake_tsig_rec,
1418 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_fake_tsig_rec,
1419 : },
1420 : {
1421 : .name = "dns_name_packet",
1422 : .struct_size = sizeof(struct dns_name_packet ),
1423 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dns_name_packet,
1424 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dns_name_packet,
1425 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dns_name_packet,
1426 : },
1427 : { .name = NULL }
1428 : };
1429 :
1430 : static const struct ndr_interface_call dns_calls[] = {
1431 : {
1432 : "decode_dns_name_packet",
1433 : sizeof(struct decode_dns_name_packet),
1434 : (ndr_push_flags_fn_t) ndr_push_decode_dns_name_packet,
1435 : (ndr_pull_flags_fn_t) ndr_pull_decode_dns_name_packet,
1436 : (ndr_print_function_t) ndr_print_decode_dns_name_packet,
1437 : { 0, NULL },
1438 : { 0, NULL },
1439 : },
1440 : { .name = NULL }
1441 : };
1442 :
1443 : static const char * const dns_endpoint_strings[] = {
1444 : "ncacn_np:[\\pipe\\dns]",
1445 : };
1446 :
1447 : static const struct ndr_interface_string_array dns_endpoints = {
1448 : .count = 1,
1449 : .names = dns_endpoint_strings
1450 : };
1451 :
1452 : static const char * const dns_authservice_strings[] = {
1453 : "host",
1454 : };
1455 :
1456 : static const struct ndr_interface_string_array dns_authservices = {
1457 : .count = 1,
1458 : .names = dns_authservice_strings
1459 : };
1460 :
1461 :
1462 : const struct ndr_interface_table ndr_table_dns = {
1463 : .name = "dns",
1464 : .syntax_id = {
1465 : {0xa047c001,0x5f22,0x40b0,{0x9d,0x52},{0x70,0x42,0xc4,0x3f,0x71,0x1a}},
1466 : NDR_DNS_VERSION
1467 : },
1468 : .helpstring = NDR_DNS_HELPSTRING,
1469 : .num_calls = 1,
1470 : .calls = dns_calls,
1471 : .num_public_structs = 11,
1472 : .public_structs = dns_public_structs,
1473 : .endpoints = &dns_endpoints,
1474 : .authservices = &dns_authservices
1475 : };
1476 :
1477 : #endif /* SKIP_NDR_TABLE_dns */
|