Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_spoolss.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 : #include "librpc/gen_ndr/ndr_winreg.h"
9 1030 : static enum ndr_err_code ndr_push_spoolss_Time(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_Time *r)
10 : {
11 1030 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12 1030 : if (ndr_flags & NDR_SCALARS) {
13 1030 : NDR_CHECK(ndr_push_align(ndr, 2));
14 1030 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->year));
15 1030 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->month));
16 1030 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day_of_week));
17 1030 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day));
18 1030 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->hour));
19 1030 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minute));
20 1030 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->second));
21 1030 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->millisecond));
22 1030 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
23 : }
24 1030 : if (ndr_flags & NDR_BUFFERS) {
25 0 : }
26 1030 : return NDR_ERR_SUCCESS;
27 : }
28 :
29 370 : static enum ndr_err_code ndr_pull_spoolss_Time(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_Time *r)
30 : {
31 370 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
32 370 : if (ndr_flags & NDR_SCALARS) {
33 370 : NDR_CHECK(ndr_pull_align(ndr, 2));
34 370 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->year));
35 370 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->month));
36 370 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day_of_week));
37 370 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day));
38 370 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->hour));
39 370 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minute));
40 370 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->second));
41 370 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->millisecond));
42 370 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
43 : }
44 370 : if (ndr_flags & NDR_BUFFERS) {
45 4 : }
46 370 : return NDR_ERR_SUCCESS;
47 : }
48 :
49 0 : static size_t ndr_size_spoolss_Time(const struct spoolss_Time *r, libndr_flags flags)
50 : {
51 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_Time);
52 : }
53 :
54 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_TimeCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_TimeCtr *r)
55 : {
56 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
57 0 : if (ndr_flags & NDR_SCALARS) {
58 0 : NDR_CHECK(ndr_push_align(ndr, 5));
59 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_Time(r->time, ndr->flags)));
60 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->time));
61 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
62 : }
63 0 : if (ndr_flags & NDR_BUFFERS) {
64 0 : if (r->time) {
65 0 : NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, r->time));
66 : }
67 : }
68 0 : return NDR_ERR_SUCCESS;
69 : }
70 :
71 8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_TimeCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_TimeCtr *r)
72 : {
73 8 : uint32_t _ptr_time;
74 8 : TALLOC_CTX *_mem_save_time_0 = NULL;
75 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
76 8 : if (ndr_flags & NDR_SCALARS) {
77 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
78 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
79 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time));
80 4 : if (_ptr_time) {
81 4 : NDR_PULL_ALLOC(ndr, r->time);
82 : } else {
83 0 : r->time = NULL;
84 : }
85 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
86 : }
87 8 : if (ndr_flags & NDR_BUFFERS) {
88 4 : if (r->time) {
89 4 : _mem_save_time_0 = NDR_PULL_GET_MEM_CTX(ndr);
90 4 : NDR_PULL_SET_MEM_CTX(ndr, r->time, 0);
91 4 : NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, r->time));
92 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_0, 0);
93 : }
94 : }
95 0 : return NDR_ERR_SUCCESS;
96 : }
97 :
98 0 : static void ndr_print_flags_spoolss_TimeCtr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_TimeCtr *r)
99 : {
100 0 : ndr_print_spoolss_TimeCtr(ndr, name, r);
101 0 : }
102 :
103 4 : _PUBLIC_ void ndr_print_spoolss_TimeCtr(struct ndr_print *ndr, const char *name, const struct spoolss_TimeCtr *r)
104 : {
105 4 : ndr_print_struct(ndr, name, "spoolss_TimeCtr");
106 4 : if (r == NULL) { ndr_print_null(ndr); return; }
107 4 : ndr->depth++;
108 4 : ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_Time(r->time, ndr->flags):r->size);
109 4 : ndr_print_ptr(ndr, "time", r->time);
110 4 : ndr->depth++;
111 4 : if (r->time) {
112 4 : ndr_print_spoolss_Time(ndr, "time", r->time);
113 : }
114 4 : ndr->depth--;
115 4 : ndr->depth--;
116 : }
117 :
118 1182 : static enum ndr_err_code ndr_push_spoolss_ProcessorArchitecture(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_ProcessorArchitecture r)
119 : {
120 1182 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
121 1182 : return NDR_ERR_SUCCESS;
122 : }
123 :
124 918 : static enum ndr_err_code ndr_pull_spoolss_ProcessorArchitecture(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_ProcessorArchitecture *r)
125 : {
126 12 : uint16_t v;
127 918 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
128 918 : *r = v;
129 918 : return NDR_ERR_SUCCESS;
130 : }
131 :
132 12 : _PUBLIC_ void ndr_print_spoolss_ProcessorArchitecture(struct ndr_print *ndr, const char *name, enum spoolss_ProcessorArchitecture r)
133 : {
134 12 : const char *val = NULL;
135 :
136 12 : switch (r) {
137 8 : case PROCESSOR_ARCHITECTURE_INTEL: val = "PROCESSOR_ARCHITECTURE_INTEL"; break;
138 0 : case PROCESSOR_ARCHITECTURE_MIPS: val = "PROCESSOR_ARCHITECTURE_MIPS"; break;
139 0 : case PROCESSOR_ARCHITECTURE_ALPHA: val = "PROCESSOR_ARCHITECTURE_ALPHA"; break;
140 0 : case PROCESSOR_ARCHITECTURE_PPC: val = "PROCESSOR_ARCHITECTURE_PPC"; break;
141 0 : case PROCESSOR_ARCHITECTURE_SHX: val = "PROCESSOR_ARCHITECTURE_SHX"; break;
142 0 : case PROCESSOR_ARCHITECTURE_ARM: val = "PROCESSOR_ARCHITECTURE_ARM"; break;
143 0 : case PROCESSOR_ARCHITECTURE_IA64: val = "PROCESSOR_ARCHITECTURE_IA64"; break;
144 0 : case PROCESSOR_ARCHITECTURE_ALPHA64: val = "PROCESSOR_ARCHITECTURE_ALPHA64"; break;
145 0 : case PROCESSOR_ARCHITECTURE_MSIL: val = "PROCESSOR_ARCHITECTURE_MSIL"; break;
146 4 : case PROCESSOR_ARCHITECTURE_AMD64: val = "PROCESSOR_ARCHITECTURE_AMD64"; break;
147 0 : case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64: val = "PROCESSOR_ARCHITECTURE_IA32_ON_WIN64"; break;
148 0 : case PROCESSOR_ARCHITECTURE_NEUTRAL: val = "PROCESSOR_ARCHITECTURE_NEUTRAL"; break;
149 0 : case PROCESSOR_ARCHITECTURE_ARM64: val = "PROCESSOR_ARCHITECTURE_ARM64"; break;
150 0 : case PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64: val = "PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64"; break;
151 0 : case PROCESSOR_ARCHITECTURE_IA32_ON_ARM64: val = "PROCESSOR_ARCHITECTURE_IA32_ON_ARM64"; break;
152 0 : case PROCESSOR_ARCHITECTURE_UNKNOWN: val = "PROCESSOR_ARCHITECTURE_UNKNOWN"; break;
153 : }
154 12 : ndr_print_enum(ndr, name, "ENUM", val, r);
155 12 : }
156 :
157 416 : static enum ndr_err_code ndr_push_spoolss_ProcessorType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_ProcessorType r)
158 : {
159 416 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
160 416 : return NDR_ERR_SUCCESS;
161 : }
162 :
163 140 : static enum ndr_err_code ndr_pull_spoolss_ProcessorType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_ProcessorType *r)
164 : {
165 0 : uint32_t v;
166 140 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
167 140 : *r = v;
168 140 : return NDR_ERR_SUCCESS;
169 : }
170 :
171 0 : _PUBLIC_ void ndr_print_spoolss_ProcessorType(struct ndr_print *ndr, const char *name, enum spoolss_ProcessorType r)
172 : {
173 0 : const char *val = NULL;
174 :
175 0 : switch (r) {
176 0 : case PROCESSOR_INTEL_386: val = "PROCESSOR_INTEL_386"; break;
177 0 : case PROCESSOR_INTEL_486: val = "PROCESSOR_INTEL_486"; break;
178 0 : case PROCESSOR_INTEL_PENTIUM: val = "PROCESSOR_INTEL_PENTIUM"; break;
179 0 : case PROCESSOR_INTEL_860: val = "PROCESSOR_INTEL_860"; break;
180 0 : case PROCESSOR_INTEL_IA64: val = "PROCESSOR_INTEL_IA64"; break;
181 0 : case PROCESSOR_AMD_X8664: val = "PROCESSOR_AMD_X8664"; break;
182 0 : case PROCESSOR_MIPS_R2000: val = "PROCESSOR_MIPS_R2000"; break;
183 0 : case PROCESSOR_MIPS_R3000: val = "PROCESSOR_MIPS_R3000"; break;
184 0 : case PROCESSOR_ALPHA_21064: val = "PROCESSOR_ALPHA_21064"; break;
185 0 : case PROCESSOR_PPC_601: val = "PROCESSOR_PPC_601"; break;
186 0 : case PROCESSOR_PPC_603: val = "PROCESSOR_PPC_603"; break;
187 0 : case PROCESSOR_PPC_604: val = "PROCESSOR_PPC_604"; break;
188 0 : case PROCESSOR_PPC_620: val = "PROCESSOR_PPC_620"; break;
189 0 : case PROCESSOR_HITACHI_SH3: val = "PROCESSOR_HITACHI_SH3"; break;
190 0 : case PROCESSOR_HITACHI_SH3E: val = "PROCESSOR_HITACHI_SH3E"; break;
191 0 : case PROCESSOR_HITACHI_SH4: val = "PROCESSOR_HITACHI_SH4"; break;
192 0 : case PROCESSOR_MOTOROLA_821: val = "PROCESSOR_MOTOROLA_821"; break;
193 0 : case PROCESSOR_STRONGARM: val = "PROCESSOR_STRONGARM"; break;
194 0 : case PROCESSOR_ARM720: val = "PROCESSOR_ARM720"; break;
195 0 : case PROCESSOR_ARM820: val = "PROCESSOR_ARM820"; break;
196 0 : case PROCESSOR_ARM920: val = "PROCESSOR_ARM920"; break;
197 0 : case PROCESSOR_ARM_7TDMI: val = "PROCESSOR_ARM_7TDMI"; break;
198 0 : case PROCESSOR_OPTIL: val = "PROCESSOR_OPTIL"; break;
199 : }
200 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
201 0 : }
202 :
203 766 : static enum ndr_err_code ndr_push_spoolss_MajorVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_MajorVersion r)
204 : {
205 766 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
206 766 : return NDR_ERR_SUCCESS;
207 : }
208 :
209 778 : static enum ndr_err_code ndr_pull_spoolss_MajorVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_MajorVersion *r)
210 : {
211 12 : uint32_t v;
212 778 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
213 778 : *r = v;
214 778 : return NDR_ERR_SUCCESS;
215 : }
216 :
217 12 : _PUBLIC_ void ndr_print_spoolss_MajorVersion(struct ndr_print *ndr, const char *name, enum spoolss_MajorVersion r)
218 : {
219 12 : const char *val = NULL;
220 :
221 12 : switch (r) {
222 0 : case SPOOLSS_MAJOR_VERSION_NT4_95_98_ME: val = "SPOOLSS_MAJOR_VERSION_NT4_95_98_ME"; break;
223 0 : case SPOOLSS_MAJOR_VERSION_2000_2003_XP: val = "SPOOLSS_MAJOR_VERSION_2000_2003_XP"; break;
224 0 : case SPOOLSS_MAJOR_VERSION_2008_VISTA: val = "SPOOLSS_MAJOR_VERSION_2008_VISTA"; break;
225 : }
226 12 : ndr_print_enum(ndr, name, "ENUM", val, r);
227 12 : }
228 :
229 766 : static enum ndr_err_code ndr_push_spoolss_MinorVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_MinorVersion r)
230 : {
231 766 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
232 766 : return NDR_ERR_SUCCESS;
233 : }
234 :
235 778 : static enum ndr_err_code ndr_pull_spoolss_MinorVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_MinorVersion *r)
236 : {
237 12 : uint32_t v;
238 778 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
239 778 : *r = v;
240 778 : return NDR_ERR_SUCCESS;
241 : }
242 :
243 12 : _PUBLIC_ void ndr_print_spoolss_MinorVersion(struct ndr_print *ndr, const char *name, enum spoolss_MinorVersion r)
244 : {
245 12 : const char *val = NULL;
246 :
247 12 : switch (r) {
248 12 : case SPOOLSS_MINOR_VERSION_0: val = "SPOOLSS_MINOR_VERSION_0"; break;
249 0 : case SPOOLSS_MINOR_VERSION_XP: val = "SPOOLSS_MINOR_VERSION_XP"; break;
250 0 : case SPOOLSS_MINOR_VERSION_2003_XP64: val = "SPOOLSS_MINOR_VERSION_2003_XP64"; break;
251 0 : case SPOOLSS_MINOR_VERSION_98: val = "SPOOLSS_MINOR_VERSION_98"; break;
252 0 : case SPOOLSS_MINOR_VERSION_ME: val = "SPOOLSS_MINOR_VERSION_ME"; break;
253 : }
254 12 : ndr_print_enum(ndr, name, "ENUM", val, r);
255 12 : }
256 :
257 2612 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterStatus(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
258 : {
259 2612 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
260 2612 : return NDR_ERR_SUCCESS;
261 : }
262 :
263 980 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterStatus(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
264 : {
265 4 : uint32_t v;
266 980 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
267 980 : *r = v;
268 980 : return NDR_ERR_SUCCESS;
269 : }
270 :
271 4 : _PUBLIC_ void ndr_print_spoolss_PrinterStatus(struct ndr_print *ndr, const char *name, uint32_t r)
272 : {
273 4 : ndr_print_uint32(ndr, name, r);
274 4 : ndr->depth++;
275 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAUSED", PRINTER_STATUS_PAUSED, r);
276 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_ERROR", PRINTER_STATUS_ERROR, r);
277 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PENDING_DELETION", PRINTER_STATUS_PENDING_DELETION, r);
278 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_JAM", PRINTER_STATUS_PAPER_JAM, r);
279 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_OUT", PRINTER_STATUS_PAPER_OUT, r);
280 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_MANUAL_FEED", PRINTER_STATUS_MANUAL_FEED, r);
281 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_PROBLEM", PRINTER_STATUS_PAPER_PROBLEM, r);
282 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OFFLINE", PRINTER_STATUS_OFFLINE, r);
283 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_IO_ACTIVE", PRINTER_STATUS_IO_ACTIVE, r);
284 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_BUSY", PRINTER_STATUS_BUSY, r);
285 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PRINTING", PRINTER_STATUS_PRINTING, r);
286 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OUTPUT_BIN_FULL", PRINTER_STATUS_OUTPUT_BIN_FULL, r);
287 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_NOT_AVAILABLE", PRINTER_STATUS_NOT_AVAILABLE, r);
288 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_WAITING", PRINTER_STATUS_WAITING, r);
289 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PROCESSING", PRINTER_STATUS_PROCESSING, r);
290 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_INITIALIZING", PRINTER_STATUS_INITIALIZING, r);
291 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_WARMING_UP", PRINTER_STATUS_WARMING_UP, r);
292 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_TONER_LOW", PRINTER_STATUS_TONER_LOW, r);
293 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_NO_TONER", PRINTER_STATUS_NO_TONER, r);
294 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAGE_PUNT", PRINTER_STATUS_PAGE_PUNT, r);
295 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_USER_INTERVENTION", PRINTER_STATUS_USER_INTERVENTION, r);
296 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OUT_OF_MEMORY", PRINTER_STATUS_OUT_OF_MEMORY, r);
297 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_DOOR_OPEN", PRINTER_STATUS_DOOR_OPEN, r);
298 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_SERVER_UNKNOWN", PRINTER_STATUS_SERVER_UNKNOWN, r);
299 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_POWER_SAVE", PRINTER_STATUS_POWER_SAVE, r);
300 4 : ndr->depth--;
301 4 : }
302 :
303 1030 : static enum ndr_err_code ndr_push_spoolss_JobStatus(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
304 : {
305 1030 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
306 1030 : return NDR_ERR_SUCCESS;
307 : }
308 :
309 366 : static enum ndr_err_code ndr_pull_spoolss_JobStatus(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
310 : {
311 0 : uint32_t v;
312 366 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
313 366 : *r = v;
314 366 : return NDR_ERR_SUCCESS;
315 : }
316 :
317 0 : _PUBLIC_ void ndr_print_spoolss_JobStatus(struct ndr_print *ndr, const char *name, uint32_t r)
318 : {
319 0 : ndr_print_uint32(ndr, name, r);
320 0 : ndr->depth++;
321 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PAUSED", JOB_STATUS_PAUSED, r);
322 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_ERROR", JOB_STATUS_ERROR, r);
323 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_DELETING", JOB_STATUS_DELETING, r);
324 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_SPOOLING", JOB_STATUS_SPOOLING, r);
325 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PRINTING", JOB_STATUS_PRINTING, r);
326 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_OFFLINE", JOB_STATUS_OFFLINE, r);
327 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PAPEROUT", JOB_STATUS_PAPEROUT, r);
328 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PRINTED", JOB_STATUS_PRINTED, r);
329 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_DELETED", JOB_STATUS_DELETED, r);
330 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_BLOCKED_DEVQ", JOB_STATUS_BLOCKED_DEVQ, r);
331 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_USER_INTERVENTION", JOB_STATUS_USER_INTERVENTION, r);
332 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_RESTART", JOB_STATUS_RESTART, r);
333 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_COMPLETE", JOB_STATUS_COMPLETE, r);
334 0 : ndr->depth--;
335 0 : }
336 :
337 416 : static enum ndr_err_code ndr_push_spoolss_Build(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_Build r)
338 : {
339 416 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
340 416 : return NDR_ERR_SUCCESS;
341 : }
342 :
343 140 : static enum ndr_err_code ndr_pull_spoolss_Build(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_Build *r)
344 : {
345 0 : uint32_t v;
346 140 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
347 140 : *r = v;
348 140 : return NDR_ERR_SUCCESS;
349 : }
350 :
351 0 : _PUBLIC_ void ndr_print_spoolss_Build(struct ndr_print *ndr, const char *name, enum spoolss_Build r)
352 : {
353 0 : const char *val = NULL;
354 :
355 0 : switch (r) {
356 0 : case SPOOLSS_DEBUGGING_BUILD: val = "SPOOLSS_DEBUGGING_BUILD"; break;
357 0 : case SPOOLSS_RELEASE_BUILD: val = "SPOOLSS_RELEASE_BUILD"; break;
358 : }
359 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
360 0 : }
361 :
362 832 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo0(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrinterInfo0 *r)
363 : {
364 832 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
365 832 : if (ndr_flags & NDR_SCALARS) {
366 416 : NDR_CHECK(ndr_push_align(ndr, 5));
367 : {
368 416 : libndr_flags _flags_save_string = ndr->flags;
369 416 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
370 416 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
371 416 : ndr->flags = _flags_save_string;
372 : }
373 : {
374 416 : libndr_flags _flags_save_string = ndr->flags;
375 416 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
376 416 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername));
377 416 : ndr->flags = _flags_save_string;
378 : }
379 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
380 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_jobs));
381 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_bytes));
382 416 : NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->time));
383 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->global_counter));
384 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
385 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
386 416 : NDR_CHECK(ndr_push_spoolss_Build(ndr, NDR_SCALARS, r->free_build));
387 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->spooling));
388 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_spooling));
389 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_counter));
390 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_out_of_paper));
391 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_not_ready));
392 416 : NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->job_error));
393 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->number_of_processors));
394 416 : NDR_CHECK(ndr_push_spoolss_ProcessorType(ndr, NDR_SCALARS, r->processor_type));
395 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high_part_total_bytes));
396 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->change_id));
397 416 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->last_error));
398 416 : NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
399 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumerate_network_printers));
400 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->c_setprinter));
401 416 : NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor_architecture));
402 416 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->processor_level));
403 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_ic));
404 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2));
405 416 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved3));
406 416 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
407 : }
408 832 : if (ndr_flags & NDR_BUFFERS) {
409 : {
410 416 : libndr_flags _flags_save_string = ndr->flags;
411 416 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
412 416 : if (r->printername) {
413 416 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printername));
414 416 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
415 416 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printername));
416 : }
417 416 : ndr->flags = _flags_save_string;
418 : }
419 : {
420 416 : libndr_flags _flags_save_string = ndr->flags;
421 416 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
422 416 : if (r->servername) {
423 212 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->servername));
424 212 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername));
425 212 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->servername));
426 : }
427 416 : ndr->flags = _flags_save_string;
428 : }
429 : }
430 832 : return NDR_ERR_SUCCESS;
431 : }
432 :
433 280 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo0(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrinterInfo0 *r)
434 : {
435 0 : uint32_t _ptr_printername;
436 280 : TALLOC_CTX *_mem_save_printername_0 = NULL;
437 0 : uint32_t _ptr_servername;
438 280 : TALLOC_CTX *_mem_save_servername_0 = NULL;
439 280 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
440 280 : if (ndr_flags & NDR_SCALARS) {
441 140 : NDR_CHECK(ndr_pull_align(ndr, 5));
442 : {
443 140 : libndr_flags _flags_save_string = ndr->flags;
444 140 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
445 140 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
446 140 : if (_ptr_printername) {
447 140 : NDR_PULL_ALLOC(ndr, r->printername);
448 140 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
449 : } else {
450 0 : r->printername = NULL;
451 : }
452 140 : ndr->flags = _flags_save_string;
453 : }
454 : {
455 140 : libndr_flags _flags_save_string = ndr->flags;
456 140 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
457 140 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
458 140 : if (_ptr_servername) {
459 72 : NDR_PULL_ALLOC(ndr, r->servername);
460 72 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
461 : } else {
462 68 : r->servername = NULL;
463 : }
464 140 : ndr->flags = _flags_save_string;
465 : }
466 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
467 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_jobs));
468 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_bytes));
469 140 : NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->time));
470 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->global_counter));
471 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
472 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
473 140 : NDR_CHECK(ndr_pull_spoolss_Build(ndr, NDR_SCALARS, &r->free_build));
474 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->spooling));
475 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_spooling));
476 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_counter));
477 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_out_of_paper));
478 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_not_ready));
479 140 : NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->job_error));
480 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->number_of_processors));
481 140 : NDR_CHECK(ndr_pull_spoolss_ProcessorType(ndr, NDR_SCALARS, &r->processor_type));
482 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high_part_total_bytes));
483 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->change_id));
484 140 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->last_error));
485 140 : NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
486 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumerate_network_printers));
487 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->c_setprinter));
488 140 : NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor_architecture));
489 140 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->processor_level));
490 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_ic));
491 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
492 140 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
493 140 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
494 : }
495 280 : if (ndr_flags & NDR_BUFFERS) {
496 : {
497 140 : libndr_flags _flags_save_string = ndr->flags;
498 140 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
499 140 : if (r->printername) {
500 0 : uint32_t _relative_save_offset;
501 140 : _relative_save_offset = ndr->offset;
502 140 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
503 140 : _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
504 140 : NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
505 140 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
506 140 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
507 140 : if (ndr->offset > ndr->relative_highest_offset) {
508 124 : ndr->relative_highest_offset = ndr->offset;
509 : }
510 140 : ndr->offset = _relative_save_offset;
511 : }
512 140 : ndr->flags = _flags_save_string;
513 : }
514 : {
515 140 : libndr_flags _flags_save_string = ndr->flags;
516 140 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
517 140 : if (r->servername) {
518 0 : uint32_t _relative_save_offset;
519 72 : _relative_save_offset = ndr->offset;
520 72 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
521 72 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
522 72 : NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
523 72 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
524 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
525 72 : if (ndr->offset > ndr->relative_highest_offset) {
526 0 : ndr->relative_highest_offset = ndr->offset;
527 : }
528 72 : ndr->offset = _relative_save_offset;
529 : }
530 140 : ndr->flags = _flags_save_string;
531 : }
532 : }
533 280 : return NDR_ERR_SUCCESS;
534 : }
535 :
536 0 : static void ndr_print_flags_spoolss_PrinterInfo0(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrinterInfo0 *r)
537 : {
538 0 : ndr_print_spoolss_PrinterInfo0(ndr, name, r);
539 0 : }
540 :
541 0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo0(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo0 *r)
542 : {
543 0 : ndr_print_struct(ndr, name, "spoolss_PrinterInfo0");
544 0 : if (r == NULL) { ndr_print_null(ndr); return; }
545 0 : ndr->depth++;
546 : {
547 0 : libndr_flags _flags_save_string = ndr->flags;
548 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
549 0 : ndr_print_ptr(ndr, "printername", r->printername);
550 0 : ndr->depth++;
551 0 : if (r->printername) {
552 0 : ndr_print_string(ndr, "printername", r->printername);
553 : }
554 0 : ndr->depth--;
555 0 : ndr->flags = _flags_save_string;
556 : }
557 : {
558 0 : libndr_flags _flags_save_string = ndr->flags;
559 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
560 0 : ndr_print_ptr(ndr, "servername", r->servername);
561 0 : ndr->depth++;
562 0 : if (r->servername) {
563 0 : ndr_print_string(ndr, "servername", r->servername);
564 : }
565 0 : ndr->depth--;
566 0 : ndr->flags = _flags_save_string;
567 : }
568 0 : ndr_print_uint32(ndr, "cjobs", r->cjobs);
569 0 : ndr_print_uint32(ndr, "total_jobs", r->total_jobs);
570 0 : ndr_print_uint32(ndr, "total_bytes", r->total_bytes);
571 0 : ndr_print_spoolss_Time(ndr, "time", &r->time);
572 0 : ndr_print_uint32(ndr, "global_counter", r->global_counter);
573 0 : ndr_print_uint32(ndr, "total_pages", r->total_pages);
574 0 : ndr_print_uint32(ndr, "version", r->version);
575 0 : ndr_print_spoolss_Build(ndr, "free_build", r->free_build);
576 0 : ndr_print_uint32(ndr, "spooling", r->spooling);
577 0 : ndr_print_uint32(ndr, "max_spooling", r->max_spooling);
578 0 : ndr_print_uint32(ndr, "session_counter", r->session_counter);
579 0 : ndr_print_uint32(ndr, "num_error_out_of_paper", r->num_error_out_of_paper);
580 0 : ndr_print_uint32(ndr, "num_error_not_ready", r->num_error_not_ready);
581 0 : ndr_print_spoolss_JobStatus(ndr, "job_error", r->job_error);
582 0 : ndr_print_uint32(ndr, "number_of_processors", r->number_of_processors);
583 0 : ndr_print_spoolss_ProcessorType(ndr, "processor_type", r->processor_type);
584 0 : ndr_print_uint32(ndr, "high_part_total_bytes", r->high_part_total_bytes);
585 0 : ndr_print_uint32(ndr, "change_id", r->change_id);
586 0 : ndr_print_WERROR(ndr, "last_error", r->last_error);
587 0 : ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
588 0 : ndr_print_uint32(ndr, "enumerate_network_printers", r->enumerate_network_printers);
589 0 : ndr_print_uint32(ndr, "c_setprinter", r->c_setprinter);
590 0 : ndr_print_spoolss_ProcessorArchitecture(ndr, "processor_architecture", r->processor_architecture);
591 0 : ndr_print_uint16(ndr, "processor_level", r->processor_level);
592 0 : ndr_print_uint32(ndr, "ref_ic", r->ref_ic);
593 0 : ndr_print_uint32(ndr, "reserved2", r->reserved2);
594 0 : ndr_print_uint32(ndr, "reserved3", r->reserved3);
595 0 : ndr->depth--;
596 : }
597 :
598 0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo0(const struct spoolss_PrinterInfo0 *r, libndr_flags flags)
599 : {
600 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo0);
601 : }
602 :
603 0 : static enum ndr_err_code ndr_push_spoolss_DM_Signature(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DM_Signature r)
604 : {
605 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
606 0 : return NDR_ERR_SUCCESS;
607 : }
608 :
609 0 : static enum ndr_err_code ndr_pull_spoolss_DM_Signature(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DM_Signature *r)
610 : {
611 0 : uint32_t v;
612 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
613 0 : *r = v;
614 0 : return NDR_ERR_SUCCESS;
615 : }
616 :
617 0 : _PUBLIC_ void ndr_print_spoolss_DM_Signature(struct ndr_print *ndr, const char *name, enum spoolss_DM_Signature r)
618 : {
619 0 : const char *val = NULL;
620 :
621 0 : switch (r) {
622 0 : case SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA: val = "SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA"; break;
623 0 : case SPOOLSS_DM_SIGNATURE_JTEXP: val = "SPOOLSS_DM_SIGNATURE_JTEXP"; break;
624 0 : case SPOOLSS_DM_SIGNATURE_PSEXTRA: val = "SPOOLSS_DM_SIGNATURE_PSEXTRA"; break;
625 : }
626 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
627 0 : }
628 :
629 0 : static enum ndr_err_code ndr_push_spoolss_DM_Layout(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DM_Layout r)
630 : {
631 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
632 0 : return NDR_ERR_SUCCESS;
633 : }
634 :
635 0 : static enum ndr_err_code ndr_pull_spoolss_DM_Layout(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DM_Layout *r)
636 : {
637 0 : uint32_t v;
638 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
639 0 : *r = v;
640 0 : return NDR_ERR_SUCCESS;
641 : }
642 :
643 0 : _PUBLIC_ void ndr_print_spoolss_DM_Layout(struct ndr_print *ndr, const char *name, enum spoolss_DM_Layout r)
644 : {
645 0 : const char *val = NULL;
646 :
647 0 : switch (r) {
648 0 : case SPOOLSS_DM_LAYOUT_NUP_DISABLED: val = "SPOOLSS_DM_LAYOUT_NUP_DISABLED"; break;
649 0 : case SPOOLSS_DM_LAYOUT_NUP_2: val = "SPOOLSS_DM_LAYOUT_NUP_2"; break;
650 0 : case SPOOLSS_DM_LAYOUT_NUP_4: val = "SPOOLSS_DM_LAYOUT_NUP_4"; break;
651 0 : case SPOOLSS_DM_LAYOUT_NUP_6: val = "SPOOLSS_DM_LAYOUT_NUP_6"; break;
652 0 : case SPOOLSS_DM_LAYOUT_NUP_9: val = "SPOOLSS_DM_LAYOUT_NUP_9"; break;
653 0 : case SPOOLSS_DM_LAYOUT_NUP_16: val = "SPOOLSS_DM_LAYOUT_NUP_16"; break;
654 0 : case SPOOLSS_DM_LAYOUT_BOOKLET: val = "SPOOLSS_DM_LAYOUT_BOOKLET"; break;
655 : }
656 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
657 0 : }
658 :
659 0 : static enum ndr_err_code ndr_push_spoolss_DM_NupDirection(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DM_NupDirection r)
660 : {
661 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
662 0 : return NDR_ERR_SUCCESS;
663 : }
664 :
665 0 : static enum ndr_err_code ndr_pull_spoolss_DM_NupDirection(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DM_NupDirection *r)
666 : {
667 0 : uint32_t v;
668 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
669 0 : *r = v;
670 0 : return NDR_ERR_SUCCESS;
671 : }
672 :
673 0 : _PUBLIC_ void ndr_print_spoolss_DM_NupDirection(struct ndr_print *ndr, const char *name, enum spoolss_DM_NupDirection r)
674 : {
675 0 : const char *val = NULL;
676 :
677 0 : switch (r) {
678 0 : case SPOOLSS_DM_NUP_DIRECTION_L2R_T2B: val = "SPOOLSS_DM_NUP_DIRECTION_L2R_T2B"; break;
679 0 : case SPOOLSS_DM_NUP_DIRECTION_T2B_L2R: val = "SPOOLSS_DM_NUP_DIRECTION_T2B_L2R"; break;
680 0 : case SPOOLSS_DM_NUP_DIRECTION_R2L_T2B: val = "SPOOLSS_DM_NUP_DIRECTION_R2L_T2B"; break;
681 0 : case SPOOLSS_DM_NUP_DIRECTION_T2B_R2L: val = "SPOOLSS_DM_NUP_DIRECTION_T2B_R2L"; break;
682 : }
683 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
684 0 : }
685 :
686 0 : static enum ndr_err_code ndr_push_spoolss_DM_NupBorderFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DM_NupBorderFlags r)
687 : {
688 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
689 0 : return NDR_ERR_SUCCESS;
690 : }
691 :
692 0 : static enum ndr_err_code ndr_pull_spoolss_DM_NupBorderFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DM_NupBorderFlags *r)
693 : {
694 0 : uint32_t v;
695 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
696 0 : *r = v;
697 0 : return NDR_ERR_SUCCESS;
698 : }
699 :
700 0 : _PUBLIC_ void ndr_print_spoolss_DM_NupBorderFlags(struct ndr_print *ndr, const char *name, enum spoolss_DM_NupBorderFlags r)
701 : {
702 0 : const char *val = NULL;
703 :
704 0 : switch (r) {
705 0 : case SPOOLSS_DM_NUP_BORDER_PRINT: val = "SPOOLSS_DM_NUP_BORDER_PRINT"; break;
706 0 : case SPOOLSS_DM_NUP_BORDER_NONE: val = "SPOOLSS_DM_NUP_BORDER_NONE"; break;
707 : }
708 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
709 0 : }
710 :
711 0 : static enum ndr_err_code ndr_push_spoolss_DM_BookletFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DM_BookletFlags r)
712 : {
713 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
714 0 : return NDR_ERR_SUCCESS;
715 : }
716 :
717 0 : static enum ndr_err_code ndr_pull_spoolss_DM_BookletFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DM_BookletFlags *r)
718 : {
719 0 : uint32_t v;
720 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
721 0 : *r = v;
722 0 : return NDR_ERR_SUCCESS;
723 : }
724 :
725 0 : _PUBLIC_ void ndr_print_spoolss_DM_BookletFlags(struct ndr_print *ndr, const char *name, enum spoolss_DM_BookletFlags r)
726 : {
727 0 : const char *val = NULL;
728 :
729 0 : switch (r) {
730 0 : case SPOOLSS_DM_BOOKLET_LEFT_FLIP: val = "SPOOLSS_DM_BOOKLET_LEFT_FLIP"; break;
731 0 : case SPOOLSS_DM_BOOKLET_RIGHT_FLIP: val = "SPOOLSS_DM_BOOKLET_RIGHT_FLIP"; break;
732 : }
733 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
734 0 : }
735 :
736 0 : static enum ndr_err_code ndr_push_spoolss_DMUNI_Quality(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DMUNI_Quality r)
737 : {
738 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
739 0 : return NDR_ERR_SUCCESS;
740 : }
741 :
742 0 : static enum ndr_err_code ndr_pull_spoolss_DMUNI_Quality(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DMUNI_Quality *r)
743 : {
744 0 : uint32_t v;
745 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
746 0 : *r = v;
747 0 : return NDR_ERR_SUCCESS;
748 : }
749 :
750 0 : _PUBLIC_ void ndr_print_spoolss_DMUNI_Quality(struct ndr_print *ndr, const char *name, enum spoolss_DMUNI_Quality r)
751 : {
752 0 : const char *val = NULL;
753 :
754 0 : switch (r) {
755 0 : case SPOOLSS_DM_UNI_QUALITY_BEST: val = "SPOOLSS_DM_UNI_QUALITY_BEST"; break;
756 0 : case SPOOLSS_DM_UNI_QUALITY_MEDIUM: val = "SPOOLSS_DM_UNI_QUALITY_MEDIUM"; break;
757 0 : case SPOOLSS_DM_UNI_QUALITY_DRAFT: val = "SPOOLSS_DM_UNI_QUALITY_DRAFT"; break;
758 : }
759 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
760 0 : }
761 :
762 0 : static enum ndr_err_code ndr_push_spoolss_DMUNI_Flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
763 : {
764 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
765 0 : return NDR_ERR_SUCCESS;
766 : }
767 :
768 0 : static enum ndr_err_code ndr_pull_spoolss_DMUNI_Flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
769 : {
770 0 : uint32_t v;
771 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
772 0 : *r = v;
773 0 : return NDR_ERR_SUCCESS;
774 : }
775 :
776 0 : _PUBLIC_ void ndr_print_spoolss_DMUNI_Flags(struct ndr_print *ndr, const char *name, uint32_t r)
777 : {
778 0 : ndr_print_uint32(ndr, name, r);
779 0 : ndr->depth++;
780 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS", SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS, r);
781 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL", SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL, r);
782 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING", SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING, r);
783 0 : ndr->depth--;
784 0 : }
785 :
786 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_UNIDRVEXTRA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_UNIDRVEXTRA *r)
787 : {
788 0 : uint32_t cntr_wReserved_0;
789 0 : uint32_t cntr_aOptions_0;
790 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
791 0 : if (ndr_flags & NDR_SCALARS) {
792 0 : NDR_CHECK(ndr_push_align(ndr, 4));
793 0 : NDR_CHECK(ndr_push_spoolss_DM_Signature(ndr, NDR_SCALARS, SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA));
794 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0x0022));
795 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wCoreJTExpSize));
796 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_spoolss_UNIDRVEXTRA(r, ndr->flags) + r->wCoreJTExpSize));
797 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wOEMExtra));
798 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwChecksum32));
799 0 : NDR_CHECK(ndr_push_spoolss_DMUNI_Flags(ndr, NDR_SCALARS, r->dwFlags));
800 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bReversePrint));
801 0 : NDR_CHECK(ndr_push_spoolss_DM_Layout(ndr, NDR_SCALARS, r->iLayout));
802 0 : NDR_CHECK(ndr_push_spoolss_DMUNI_Quality(ndr, NDR_SCALARS, r->iQuality));
803 0 : for (cntr_wReserved_0 = 0; cntr_wReserved_0 < (6); cntr_wReserved_0++) {
804 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wReserved[cntr_wReserved_0]));
805 : }
806 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwOptions));
807 0 : for (cntr_aOptions_0 = 0; cntr_aOptions_0 < (128); cntr_aOptions_0++) {
808 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->aOptions[cntr_aOptions_0]));
809 : }
810 0 : NDR_CHECK(ndr_push_spoolss_DM_NupDirection(ndr, NDR_SCALARS, r->dwNupDirection));
811 0 : NDR_CHECK(ndr_push_spoolss_DM_NupBorderFlags(ndr, NDR_SCALARS, r->dwNupBorderFlags));
812 0 : NDR_CHECK(ndr_push_spoolss_DM_BookletFlags(ndr, NDR_SCALARS, r->dwBookletFlags));
813 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
814 : }
815 0 : if (ndr_flags & NDR_BUFFERS) {
816 0 : }
817 0 : return NDR_ERR_SUCCESS;
818 : }
819 :
820 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_UNIDRVEXTRA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_UNIDRVEXTRA *r)
821 : {
822 0 : uint32_t size_wReserved_0 = 0;
823 0 : uint32_t cntr_wReserved_0;
824 0 : uint32_t size_aOptions_0 = 0;
825 0 : uint32_t cntr_aOptions_0;
826 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
827 0 : if (ndr_flags & NDR_SCALARS) {
828 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
829 0 : NDR_CHECK(ndr_pull_spoolss_DM_Signature(ndr, NDR_SCALARS, &r->dwSignature));
830 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wVer));
831 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wCoreJTExpSize));
832 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wCoreFullSize));
833 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wOEMExtra));
834 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwChecksum32));
835 0 : NDR_CHECK(ndr_pull_spoolss_DMUNI_Flags(ndr, NDR_SCALARS, &r->dwFlags));
836 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bReversePrint));
837 0 : NDR_CHECK(ndr_pull_spoolss_DM_Layout(ndr, NDR_SCALARS, &r->iLayout));
838 0 : NDR_CHECK(ndr_pull_spoolss_DMUNI_Quality(ndr, NDR_SCALARS, &r->iQuality));
839 0 : size_wReserved_0 = 6;
840 0 : for (cntr_wReserved_0 = 0; cntr_wReserved_0 < (size_wReserved_0); cntr_wReserved_0++) {
841 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wReserved[cntr_wReserved_0]));
842 : }
843 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwOptions));
844 0 : size_aOptions_0 = 128;
845 0 : for (cntr_aOptions_0 = 0; cntr_aOptions_0 < (size_aOptions_0); cntr_aOptions_0++) {
846 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->aOptions[cntr_aOptions_0]));
847 : }
848 0 : NDR_CHECK(ndr_pull_spoolss_DM_NupDirection(ndr, NDR_SCALARS, &r->dwNupDirection));
849 0 : NDR_CHECK(ndr_pull_spoolss_DM_NupBorderFlags(ndr, NDR_SCALARS, &r->dwNupBorderFlags));
850 0 : NDR_CHECK(ndr_pull_spoolss_DM_BookletFlags(ndr, NDR_SCALARS, &r->dwBookletFlags));
851 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
852 : }
853 0 : if (ndr_flags & NDR_BUFFERS) {
854 0 : }
855 0 : return NDR_ERR_SUCCESS;
856 : }
857 :
858 0 : static void ndr_print_flags_spoolss_UNIDRVEXTRA(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_UNIDRVEXTRA *r)
859 : {
860 0 : ndr_print_spoolss_UNIDRVEXTRA(ndr, name, r);
861 0 : }
862 :
863 0 : _PUBLIC_ void ndr_print_spoolss_UNIDRVEXTRA(struct ndr_print *ndr, const char *name, const struct spoolss_UNIDRVEXTRA *r)
864 : {
865 0 : uint32_t cntr_wReserved_0;
866 0 : uint32_t cntr_aOptions_0;
867 0 : ndr_print_struct(ndr, name, "spoolss_UNIDRVEXTRA");
868 0 : if (r == NULL) { ndr_print_null(ndr); return; }
869 0 : ndr->depth++;
870 0 : ndr_print_spoolss_DM_Signature(ndr, "dwSignature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA:r->dwSignature);
871 0 : ndr_print_uint16(ndr, "wVer", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x0022:r->wVer);
872 0 : ndr_print_uint16(ndr, "wCoreJTExpSize", r->wCoreJTExpSize);
873 0 : ndr_print_uint16(ndr, "wCoreFullSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_UNIDRVEXTRA(r, ndr->flags) + r->wCoreJTExpSize:r->wCoreFullSize);
874 0 : ndr_print_uint16(ndr, "wOEMExtra", r->wOEMExtra);
875 0 : ndr_print_uint32(ndr, "dwChecksum32", r->dwChecksum32);
876 0 : ndr_print_spoolss_DMUNI_Flags(ndr, "dwFlags", r->dwFlags);
877 0 : ndr_print_uint32(ndr, "bReversePrint", r->bReversePrint);
878 0 : ndr_print_spoolss_DM_Layout(ndr, "iLayout", r->iLayout);
879 0 : ndr_print_spoolss_DMUNI_Quality(ndr, "iQuality", r->iQuality);
880 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "wReserved", (uint32_t)(6));
881 0 : ndr->depth++;
882 0 : for (cntr_wReserved_0 = 0; cntr_wReserved_0 < (6); cntr_wReserved_0++) {
883 0 : ndr_print_uint16(ndr, "wReserved", r->wReserved[cntr_wReserved_0]);
884 : }
885 0 : ndr->depth--;
886 0 : ndr_print_uint32(ndr, "dwOptions", r->dwOptions);
887 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "aOptions", (uint32_t)(128));
888 0 : ndr->depth++;
889 0 : for (cntr_aOptions_0 = 0; cntr_aOptions_0 < (128); cntr_aOptions_0++) {
890 0 : ndr_print_uint32(ndr, "aOptions", r->aOptions[cntr_aOptions_0]);
891 : }
892 0 : ndr->depth--;
893 0 : ndr_print_spoolss_DM_NupDirection(ndr, "dwNupDirection", r->dwNupDirection);
894 0 : ndr_print_spoolss_DM_NupBorderFlags(ndr, "dwNupBorderFlags", r->dwNupBorderFlags);
895 0 : ndr_print_spoolss_DM_BookletFlags(ndr, "dwBookletFlags", r->dwBookletFlags);
896 0 : ndr->depth--;
897 : }
898 :
899 0 : _PUBLIC_ size_t ndr_size_spoolss_UNIDRVEXTRA(const struct spoolss_UNIDRVEXTRA *r, libndr_flags flags)
900 : {
901 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_UNIDRVEXTRA);
902 : }
903 :
904 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeFields(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
905 : {
906 16168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
907 16168 : return NDR_ERR_SUCCESS;
908 : }
909 :
910 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeFields(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
911 : {
912 4 : uint32_t v;
913 4678 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
914 4678 : *r = v;
915 4678 : return NDR_ERR_SUCCESS;
916 : }
917 :
918 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeFields(struct ndr_print *ndr, const char *name, uint32_t r)
919 : {
920 4 : ndr_print_uint32(ndr, name, r);
921 4 : ndr->depth++;
922 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ORIENTATION", DEVMODE_ORIENTATION, r);
923 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERSIZE", DEVMODE_PAPERSIZE, r);
924 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERLENGTH", DEVMODE_PAPERLENGTH, r);
925 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERWIDTH", DEVMODE_PAPERWIDTH, r);
926 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_SCALE", DEVMODE_SCALE, r);
927 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_POSITION", DEVMODE_POSITION, r);
928 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_NUP", DEVMODE_NUP, r);
929 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COPIES", DEVMODE_COPIES, r);
930 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DEFAULTSOURCE", DEVMODE_DEFAULTSOURCE, r);
931 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PRINTQUALITY", DEVMODE_PRINTQUALITY, r);
932 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COLOR", DEVMODE_COLOR, r);
933 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DUPLEX", DEVMODE_DUPLEX, r);
934 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_YRESOLUTION", DEVMODE_YRESOLUTION, r);
935 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_TTOPTION", DEVMODE_TTOPTION, r);
936 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COLLATE", DEVMODE_COLLATE, r);
937 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_FORMNAME", DEVMODE_FORMNAME, r);
938 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_LOGPIXELS", DEVMODE_LOGPIXELS, r);
939 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_BITSPERPEL", DEVMODE_BITSPERPEL, r);
940 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PELSWIDTH", DEVMODE_PELSWIDTH, r);
941 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PELSHEIGHT", DEVMODE_PELSHEIGHT, r);
942 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DISPLAYFLAGS", DEVMODE_DISPLAYFLAGS, r);
943 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DISPLAYFREQUENCY", DEVMODE_DISPLAYFREQUENCY, r);
944 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ICMMETHOD", DEVMODE_ICMMETHOD, r);
945 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ICMINTENT", DEVMODE_ICMINTENT, r);
946 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_MEDIATYPE", DEVMODE_MEDIATYPE, r);
947 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DITHERTYPE", DEVMODE_DITHERTYPE, r);
948 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PANNINGWIDTH", DEVMODE_PANNINGWIDTH, r);
949 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PANNINGHEIGHT", DEVMODE_PANNINGHEIGHT, r);
950 4 : ndr->depth--;
951 4 : }
952 :
953 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeSpecVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeSpecVersion r)
954 : {
955 16168 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
956 16168 : return NDR_ERR_SUCCESS;
957 : }
958 :
959 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeSpecVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeSpecVersion *r)
960 : {
961 4 : uint16_t v;
962 4678 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
963 4678 : *r = v;
964 4678 : return NDR_ERR_SUCCESS;
965 : }
966 :
967 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeSpecVersion(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeSpecVersion r)
968 : {
969 4 : const char *val = NULL;
970 :
971 4 : switch (r) {
972 0 : case DMSPEC_NT3: val = "DMSPEC_NT3"; break;
973 0 : case DMSPEC_WIN95_98_ME: val = "DMSPEC_WIN95_98_ME"; break;
974 4 : case DMSPEC_NT4_AND_ABOVE: val = "DMSPEC_NT4_AND_ABOVE"; break;
975 : }
976 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
977 4 : }
978 :
979 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeOrientation(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeOrientation r)
980 : {
981 16168 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
982 16168 : return NDR_ERR_SUCCESS;
983 : }
984 :
985 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeOrientation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeOrientation *r)
986 : {
987 4 : uint16_t v;
988 4678 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
989 4678 : *r = v;
990 4678 : return NDR_ERR_SUCCESS;
991 : }
992 :
993 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeOrientation(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeOrientation r)
994 : {
995 4 : const char *val = NULL;
996 :
997 4 : switch (r) {
998 4 : case DMORIENT_PORTRAIT: val = "DMORIENT_PORTRAIT"; break;
999 0 : case DMORIENT_LANDSCAPE: val = "DMORIENT_LANDSCAPE"; break;
1000 : }
1001 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1002 4 : }
1003 :
1004 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModePaperSize(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModePaperSize r)
1005 : {
1006 16168 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
1007 16168 : return NDR_ERR_SUCCESS;
1008 : }
1009 :
1010 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModePaperSize(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModePaperSize *r)
1011 : {
1012 4 : uint16_t v;
1013 4678 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
1014 4678 : *r = v;
1015 4678 : return NDR_ERR_SUCCESS;
1016 : }
1017 :
1018 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModePaperSize(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModePaperSize r)
1019 : {
1020 4 : const char *val = NULL;
1021 :
1022 4 : switch (r) {
1023 4 : case DMPAPER_LETTER: val = "DMPAPER_LETTER"; break;
1024 0 : case DMPAPER_LETTERSMALL: val = "DMPAPER_LETTERSMALL"; break;
1025 0 : case DMPAPER_TABLOID: val = "DMPAPER_TABLOID"; break;
1026 0 : case DMPAPER_LEDGER: val = "DMPAPER_LEDGER"; break;
1027 0 : case DMPAPER_LEGAL: val = "DMPAPER_LEGAL"; break;
1028 0 : case DMPAPER_STATEMENT: val = "DMPAPER_STATEMENT"; break;
1029 0 : case DMPAPER_EXECUTIVE: val = "DMPAPER_EXECUTIVE"; break;
1030 0 : case DMPAPER_A3: val = "DMPAPER_A3"; break;
1031 0 : case DMPAPER_A4: val = "DMPAPER_A4"; break;
1032 0 : case DMPAPER_A4SMALL: val = "DMPAPER_A4SMALL"; break;
1033 0 : case DMPAPER_A5: val = "DMPAPER_A5"; break;
1034 0 : case DMPAPER_B4: val = "DMPAPER_B4"; break;
1035 0 : case DMPAPER_B5: val = "DMPAPER_B5"; break;
1036 0 : case DMPAPER_FOLIO: val = "DMPAPER_FOLIO"; break;
1037 0 : case DMPAPER_QUARTO: val = "DMPAPER_QUARTO"; break;
1038 0 : case DMPAPER_10X14: val = "DMPAPER_10X14"; break;
1039 0 : case DMPAPER_11X17: val = "DMPAPER_11X17"; break;
1040 0 : case DMPAPER_NOTE: val = "DMPAPER_NOTE"; break;
1041 0 : case DMPAPER_ENV_9: val = "DMPAPER_ENV_9"; break;
1042 0 : case DMPAPER_ENV_10: val = "DMPAPER_ENV_10"; break;
1043 0 : case DMPAPER_ENV_11: val = "DMPAPER_ENV_11"; break;
1044 0 : case DMPAPER_ENV_12: val = "DMPAPER_ENV_12"; break;
1045 0 : case DMPAPER_ENV_14: val = "DMPAPER_ENV_14"; break;
1046 0 : case DMPAPER_CSHEET: val = "DMPAPER_CSHEET"; break;
1047 0 : case DMPAPER_DSHEET: val = "DMPAPER_DSHEET"; break;
1048 0 : case DMPAPER_ESHEET: val = "DMPAPER_ESHEET"; break;
1049 0 : case DMPAPER_ENV_DL: val = "DMPAPER_ENV_DL"; break;
1050 0 : case DMPAPER_ENV_C5: val = "DMPAPER_ENV_C5"; break;
1051 0 : case DMPAPER_ENV_C3: val = "DMPAPER_ENV_C3"; break;
1052 0 : case DMPAPER_ENV_C4: val = "DMPAPER_ENV_C4"; break;
1053 0 : case DMPAPER_ENV_C6: val = "DMPAPER_ENV_C6"; break;
1054 0 : case DMPAPER_ENV_C65: val = "DMPAPER_ENV_C65"; break;
1055 0 : case DMPAPER_ENV_B4: val = "DMPAPER_ENV_B4"; break;
1056 0 : case DMPAPER_ENV_B5: val = "DMPAPER_ENV_B5"; break;
1057 0 : case DMPAPER_ENV_B6: val = "DMPAPER_ENV_B6"; break;
1058 0 : case DMPAPER_ENV_ITALY: val = "DMPAPER_ENV_ITALY"; break;
1059 0 : case DMPAPER_ENV_MONARCH: val = "DMPAPER_ENV_MONARCH"; break;
1060 0 : case DMPAPER_ENV_PERSONAL: val = "DMPAPER_ENV_PERSONAL"; break;
1061 0 : case DMPAPER_FANFOLD_US: val = "DMPAPER_FANFOLD_US"; break;
1062 0 : case DMPAPER_FANFOLD_STD_GERMAN: val = "DMPAPER_FANFOLD_STD_GERMAN"; break;
1063 0 : case DMPAPER_FANFOLD_LGL_GERMAN: val = "DMPAPER_FANFOLD_LGL_GERMAN"; break;
1064 0 : case DMPAPER_DBL_JAPANESE_POSTCARD: val = "DMPAPER_DBL_JAPANESE_POSTCARD"; break;
1065 0 : case DMPAPER_A6: val = "DMPAPER_A6"; break;
1066 0 : case DMPAPER_JENV_KAKU2: val = "DMPAPER_JENV_KAKU2"; break;
1067 0 : case DMPAPER_JENV_KAKU3: val = "DMPAPER_JENV_KAKU3"; break;
1068 0 : case DMPAPER_JENV_CHOU3: val = "DMPAPER_JENV_CHOU3"; break;
1069 0 : case DMPAPER_JENV_CHOU4: val = "DMPAPER_JENV_CHOU4"; break;
1070 0 : case DMPAPER_LETTER_ROTATED: val = "DMPAPER_LETTER_ROTATED"; break;
1071 0 : case DMPAPER_A3_ROTATED: val = "DMPAPER_A3_ROTATED"; break;
1072 0 : case DMPAPER_A4_ROTATED: val = "DMPAPER_A4_ROTATED"; break;
1073 0 : case DMPAPER_A5_ROTATED: val = "DMPAPER_A5_ROTATED"; break;
1074 0 : case DMPAPER_B4_JIS_ROTATED: val = "DMPAPER_B4_JIS_ROTATED"; break;
1075 0 : case DMPAPER_B5_JIS_ROTATED: val = "DMPAPER_B5_JIS_ROTATED"; break;
1076 0 : case DMPAPER_JAPANESE_POSTCARD_ROTATED: val = "DMPAPER_JAPANESE_POSTCARD_ROTATED"; break;
1077 0 : case DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED: val = "DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED"; break;
1078 0 : case DMPAPER_A6_ROTATED: val = "DMPAPER_A6_ROTATED"; break;
1079 0 : case DMPAPER_JENV_KAKU2_ROTATED: val = "DMPAPER_JENV_KAKU2_ROTATED"; break;
1080 0 : case DMPAPER_JENV_KAKU3_ROTATED: val = "DMPAPER_JENV_KAKU3_ROTATED"; break;
1081 0 : case DMPAPER_JENV_CHOU3_ROTATED: val = "DMPAPER_JENV_CHOU3_ROTATED"; break;
1082 0 : case DMPAPER_JENV_CHOU4_ROTATED: val = "DMPAPER_JENV_CHOU4_ROTATED"; break;
1083 0 : case DMPAPER_B6_JIS: val = "DMPAPER_B6_JIS"; break;
1084 0 : case DMPAPER_B6_JIS_ROTATED: val = "DMPAPER_B6_JIS_ROTATED"; break;
1085 0 : case DMPAPER_12X11: val = "DMPAPER_12X11"; break;
1086 0 : case DMPAPER_JENV_YOU4: val = "DMPAPER_JENV_YOU4"; break;
1087 0 : case DMPAPER_JENV_YOU4_ROTATED: val = "DMPAPER_JENV_YOU4_ROTATED"; break;
1088 0 : case DMPAPER_P16K: val = "DMPAPER_P16K"; break;
1089 0 : case DMPAPER_P32K: val = "DMPAPER_P32K"; break;
1090 0 : case DMPAPER_P32KBIG: val = "DMPAPER_P32KBIG"; break;
1091 0 : case DMPAPER_PENV_1: val = "DMPAPER_PENV_1"; break;
1092 0 : case DMPAPER_PENV_2: val = "DMPAPER_PENV_2"; break;
1093 0 : case DMPAPER_PENV_3: val = "DMPAPER_PENV_3"; break;
1094 0 : case DMPAPER_PENV_4: val = "DMPAPER_PENV_4"; break;
1095 0 : case DMPAPER_PENV_5: val = "DMPAPER_PENV_5"; break;
1096 0 : case DMPAPER_PENV_6: val = "DMPAPER_PENV_6"; break;
1097 0 : case DMPAPER_PENV_7: val = "DMPAPER_PENV_7"; break;
1098 0 : case DMPAPER_PENV_8: val = "DMPAPER_PENV_8"; break;
1099 0 : case DMPAPER_PENV_9: val = "DMPAPER_PENV_9"; break;
1100 0 : case DMPAPER_PENV_10: val = "DMPAPER_PENV_10"; break;
1101 0 : case DMPAPER_P16K_ROTATED: val = "DMPAPER_P16K_ROTATED"; break;
1102 0 : case DMPAPER_P32K_ROTATED: val = "DMPAPER_P32K_ROTATED"; break;
1103 0 : case DMPAPER_P32KBIG_ROTATED: val = "DMPAPER_P32KBIG_ROTATED"; break;
1104 0 : case DMPAPER_PENV_1_ROTATED: val = "DMPAPER_PENV_1_ROTATED"; break;
1105 0 : case DMPAPER_PENV_2_ROTATED: val = "DMPAPER_PENV_2_ROTATED"; break;
1106 0 : case DMPAPER_PENV_3_ROTATED: val = "DMPAPER_PENV_3_ROTATED"; break;
1107 0 : case DMPAPER_PENV_4_ROTATED: val = "DMPAPER_PENV_4_ROTATED"; break;
1108 0 : case DMPAPER_PENV_5_ROTATED: val = "DMPAPER_PENV_5_ROTATED"; break;
1109 0 : case DMPAPER_PENV_6_ROTATED: val = "DMPAPER_PENV_6_ROTATED"; break;
1110 0 : case DMPAPER_PENV_7_ROTATED: val = "DMPAPER_PENV_7_ROTATED"; break;
1111 0 : case DMPAPER_PENV_8_ROTATED: val = "DMPAPER_PENV_8_ROTATED"; break;
1112 0 : case DMPAPER_PENV_9_ROTATED: val = "DMPAPER_PENV_9_ROTATED"; break;
1113 0 : case DMPAPER_PENV_10_ROTATED: val = "DMPAPER_PENV_10_ROTATED"; break;
1114 : }
1115 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1116 4 : }
1117 :
1118 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeDefaultSource(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeDefaultSource r)
1119 : {
1120 16168 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
1121 16168 : return NDR_ERR_SUCCESS;
1122 : }
1123 :
1124 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeDefaultSource(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeDefaultSource *r)
1125 : {
1126 4 : uint16_t v;
1127 4678 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
1128 4678 : *r = v;
1129 4678 : return NDR_ERR_SUCCESS;
1130 : }
1131 :
1132 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeDefaultSource(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeDefaultSource r)
1133 : {
1134 4 : const char *val = NULL;
1135 :
1136 4 : switch (r) {
1137 0 : case DMBIN_UPPER: val = "DMBIN_UPPER"; break;
1138 0 : case DMBIN_LOWER: val = "DMBIN_LOWER"; break;
1139 0 : case DMBIN_MIDDLE: val = "DMBIN_MIDDLE"; break;
1140 0 : case DMBIN_MANUAL: val = "DMBIN_MANUAL"; break;
1141 0 : case DMBIN_ENVELOPE: val = "DMBIN_ENVELOPE"; break;
1142 0 : case DMBIN_ENVMANUAL: val = "DMBIN_ENVMANUAL"; break;
1143 0 : case DMBIN_AUTO: val = "DMBIN_AUTO"; break;
1144 0 : case DMBIN_TRACTOR: val = "DMBIN_TRACTOR"; break;
1145 0 : case DMBIN_SMALLFMT: val = "DMBIN_SMALLFMT"; break;
1146 0 : case DMBIN_LARGEFMT: val = "DMBIN_LARGEFMT"; break;
1147 0 : case DMBIN_LARGECAPACITY: val = "DMBIN_LARGECAPACITY"; break;
1148 0 : case DMBIN_CASSETTE: val = "DMBIN_CASSETTE"; break;
1149 4 : case DMBIN_FORMSOURCE: val = "DMBIN_FORMSOURCE"; break;
1150 : }
1151 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1152 4 : }
1153 :
1154 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModePrintQuality(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModePrintQuality r)
1155 : {
1156 16168 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
1157 16168 : return NDR_ERR_SUCCESS;
1158 : }
1159 :
1160 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModePrintQuality(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModePrintQuality *r)
1161 : {
1162 4 : uint16_t v;
1163 4678 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
1164 4678 : *r = v;
1165 4678 : return NDR_ERR_SUCCESS;
1166 : }
1167 :
1168 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModePrintQuality(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModePrintQuality r)
1169 : {
1170 4 : const char *val = NULL;
1171 :
1172 4 : switch (r) {
1173 0 : case DMRES_HIGH: val = "DMRES_HIGH"; break;
1174 0 : case DMRES_MEDIUM: val = "DMRES_MEDIUM"; break;
1175 0 : case DMRES_LOW: val = "DMRES_LOW"; break;
1176 0 : case DMRES_DRAFT: val = "DMRES_DRAFT"; break;
1177 : }
1178 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1179 4 : }
1180 :
1181 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeColor(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeColor r)
1182 : {
1183 16168 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
1184 16168 : return NDR_ERR_SUCCESS;
1185 : }
1186 :
1187 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeColor(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeColor *r)
1188 : {
1189 4 : uint16_t v;
1190 4678 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
1191 4678 : *r = v;
1192 4678 : return NDR_ERR_SUCCESS;
1193 : }
1194 :
1195 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeColor(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeColor r)
1196 : {
1197 4 : const char *val = NULL;
1198 :
1199 4 : switch (r) {
1200 4 : case DMRES_MONOCHROME: val = "DMRES_MONOCHROME"; break;
1201 0 : case DMRES_COLOR: val = "DMRES_COLOR"; break;
1202 : }
1203 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1204 4 : }
1205 :
1206 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeDuplex(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeDuplex r)
1207 : {
1208 16168 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
1209 16168 : return NDR_ERR_SUCCESS;
1210 : }
1211 :
1212 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeDuplex(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeDuplex *r)
1213 : {
1214 4 : uint16_t v;
1215 4678 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
1216 4678 : *r = v;
1217 4678 : return NDR_ERR_SUCCESS;
1218 : }
1219 :
1220 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeDuplex(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeDuplex r)
1221 : {
1222 4 : const char *val = NULL;
1223 :
1224 4 : switch (r) {
1225 4 : case DMDUP_SIMPLEX: val = "DMDUP_SIMPLEX"; break;
1226 0 : case DMDUP_VERTICAL: val = "DMDUP_VERTICAL"; break;
1227 0 : case DMDUP_HORIZONTAL: val = "DMDUP_HORIZONTAL"; break;
1228 : }
1229 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1230 4 : }
1231 :
1232 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeTTOption(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeTTOption r)
1233 : {
1234 16168 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
1235 16168 : return NDR_ERR_SUCCESS;
1236 : }
1237 :
1238 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeTTOption(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeTTOption *r)
1239 : {
1240 4 : uint16_t v;
1241 4678 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
1242 4678 : *r = v;
1243 4678 : return NDR_ERR_SUCCESS;
1244 : }
1245 :
1246 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeTTOption(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeTTOption r)
1247 : {
1248 4 : const char *val = NULL;
1249 :
1250 4 : switch (r) {
1251 0 : case DMTT_BITMAP: val = "DMTT_BITMAP"; break;
1252 0 : case DMTT_DOWNLOAD: val = "DMTT_DOWNLOAD"; break;
1253 4 : case DMTT_SUBDEV: val = "DMTT_SUBDEV"; break;
1254 0 : case DMTT_DOWNLOAD_OUTLINE: val = "DMTT_DOWNLOAD_OUTLINE"; break;
1255 : }
1256 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1257 4 : }
1258 :
1259 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeCollate(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeCollate r)
1260 : {
1261 16168 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
1262 16168 : return NDR_ERR_SUCCESS;
1263 : }
1264 :
1265 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeCollate(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeCollate *r)
1266 : {
1267 4 : uint16_t v;
1268 4678 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
1269 4678 : *r = v;
1270 4678 : return NDR_ERR_SUCCESS;
1271 : }
1272 :
1273 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeCollate(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeCollate r)
1274 : {
1275 4 : const char *val = NULL;
1276 :
1277 4 : switch (r) {
1278 0 : case DMCOLLATE_FALSE: val = "DMCOLLATE_FALSE"; break;
1279 4 : case DMCOLLATE_TRUE: val = "DMCOLLATE_TRUE"; break;
1280 : }
1281 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1282 4 : }
1283 :
1284 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeNUp(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeNUp r)
1285 : {
1286 16168 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1287 16168 : return NDR_ERR_SUCCESS;
1288 : }
1289 :
1290 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeNUp(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeNUp *r)
1291 : {
1292 4 : uint32_t v;
1293 4678 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1294 4678 : *r = v;
1295 4678 : return NDR_ERR_SUCCESS;
1296 : }
1297 :
1298 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeNUp(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeNUp r)
1299 : {
1300 4 : const char *val = NULL;
1301 :
1302 4 : switch (r) {
1303 4 : case DMNUP_SYSTEM: val = "DMNUP_SYSTEM"; break;
1304 0 : case DMNUP_ONEUP: val = "DMNUP_ONEUP"; break;
1305 : }
1306 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1307 4 : }
1308 :
1309 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeICMMethod(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeICMMethod r)
1310 : {
1311 16168 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1312 16168 : return NDR_ERR_SUCCESS;
1313 : }
1314 :
1315 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeICMMethod(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeICMMethod *r)
1316 : {
1317 4 : uint32_t v;
1318 4678 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1319 4678 : *r = v;
1320 4678 : return NDR_ERR_SUCCESS;
1321 : }
1322 :
1323 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeICMMethod(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeICMMethod r)
1324 : {
1325 4 : const char *val = NULL;
1326 :
1327 4 : switch (r) {
1328 4 : case DMICMMETHOD_NONE: val = "DMICMMETHOD_NONE"; break;
1329 0 : case DMICMMETHOD_SYSTEM: val = "DMICMMETHOD_SYSTEM"; break;
1330 0 : case DMICMMETHOD_DRIVER: val = "DMICMMETHOD_DRIVER"; break;
1331 0 : case DMICMMETHOD_DEVICE: val = "DMICMMETHOD_DEVICE"; break;
1332 : }
1333 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1334 4 : }
1335 :
1336 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeICMIntent(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeICMIntent r)
1337 : {
1338 16168 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1339 16168 : return NDR_ERR_SUCCESS;
1340 : }
1341 :
1342 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeICMIntent(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeICMIntent *r)
1343 : {
1344 4 : uint32_t v;
1345 4678 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1346 4678 : *r = v;
1347 4678 : return NDR_ERR_SUCCESS;
1348 : }
1349 :
1350 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeICMIntent(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeICMIntent r)
1351 : {
1352 4 : const char *val = NULL;
1353 :
1354 4 : switch (r) {
1355 0 : case DMICM_SATURATE: val = "DMICM_SATURATE"; break;
1356 4 : case DMICM_CONTRAST: val = "DMICM_CONTRAST"; break;
1357 0 : case DMICM_COLORIMETRIC: val = "DMICM_COLORIMETRIC"; break;
1358 0 : case DMICM_ABS_COLORIMETRIC: val = "DMICM_ABS_COLORIMETRIC"; break;
1359 : }
1360 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1361 4 : }
1362 :
1363 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeMediaType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeMediaType r)
1364 : {
1365 16168 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1366 16168 : return NDR_ERR_SUCCESS;
1367 : }
1368 :
1369 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeMediaType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeMediaType *r)
1370 : {
1371 4 : uint32_t v;
1372 4678 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1373 4678 : *r = v;
1374 4678 : return NDR_ERR_SUCCESS;
1375 : }
1376 :
1377 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeMediaType(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeMediaType r)
1378 : {
1379 4 : const char *val = NULL;
1380 :
1381 4 : switch (r) {
1382 0 : case DMMEDIA_STANDARD: val = "DMMEDIA_STANDARD"; break;
1383 0 : case DMMEDIA_TRANSPARENCY: val = "DMMEDIA_TRANSPARENCY"; break;
1384 0 : case DMMEDIA_GLOSSY: val = "DMMEDIA_GLOSSY"; break;
1385 : }
1386 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1387 4 : }
1388 :
1389 16168 : static enum ndr_err_code ndr_push_spoolss_DeviceModeDitherType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeDitherType r)
1390 : {
1391 16168 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1392 16168 : return NDR_ERR_SUCCESS;
1393 : }
1394 :
1395 4678 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeDitherType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DeviceModeDitherType *r)
1396 : {
1397 4 : uint32_t v;
1398 4678 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1399 4678 : *r = v;
1400 4678 : return NDR_ERR_SUCCESS;
1401 : }
1402 :
1403 4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeDitherType(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeDitherType r)
1404 : {
1405 4 : const char *val = NULL;
1406 :
1407 4 : switch (r) {
1408 0 : case DMDITHER_NONE: val = "DMDITHER_NONE"; break;
1409 0 : case DMDITHER_COARSE: val = "DMDITHER_COARSE"; break;
1410 0 : case DMDITHER_FINE: val = "DMDITHER_FINE"; break;
1411 0 : case DMDITHER_LINEART: val = "DMDITHER_LINEART"; break;
1412 0 : case DMDITHER_ERRORDIFFUSION: val = "DMDITHER_ERRORDIFFUSION"; break;
1413 0 : case DMDITHER_RESERVED6: val = "DMDITHER_RESERVED6"; break;
1414 0 : case DMDITHER_RESERVED7: val = "DMDITHER_RESERVED7"; break;
1415 0 : case DMDITHER_RESERVED8: val = "DMDITHER_RESERVED8"; break;
1416 0 : case DMDITHER_RESERVED9: val = "DMDITHER_RESERVED9"; break;
1417 0 : case DMDITHER_GRAYSCALE: val = "DMDITHER_GRAYSCALE"; break;
1418 : }
1419 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
1420 4 : }
1421 :
1422 16168 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DeviceMode(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DeviceMode *r)
1423 : {
1424 16168 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1425 16168 : if (ndr_flags & NDR_SCALARS) {
1426 16168 : NDR_CHECK(ndr_push_align(ndr, 4));
1427 16168 : NDR_CHECK(ndr_push_charset_to_null(ndr, NDR_SCALARS, r->devicename, MAXDEVICENAME, sizeof(uint16_t), CH_UTF16));
1428 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeSpecVersion(ndr, NDR_SCALARS, r->specversion));
1429 16168 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->driverversion));
1430 16168 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
1431 16168 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->driverextra_data.length));
1432 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeFields(ndr, NDR_SCALARS, r->fields));
1433 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeOrientation(ndr, NDR_SCALARS, r->orientation));
1434 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModePaperSize(ndr, NDR_SCALARS, r->papersize));
1435 16168 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->paperlength));
1436 16168 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->paperwidth));
1437 16168 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->scale));
1438 16168 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->copies));
1439 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeDefaultSource(ndr, NDR_SCALARS, r->defaultsource));
1440 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModePrintQuality(ndr, NDR_SCALARS, r->printquality));
1441 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeColor(ndr, NDR_SCALARS, r->color));
1442 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeDuplex(ndr, NDR_SCALARS, r->duplex));
1443 16168 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->yresolution));
1444 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeTTOption(ndr, NDR_SCALARS, r->ttoption));
1445 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeCollate(ndr, NDR_SCALARS, r->collate));
1446 16168 : NDR_CHECK(ndr_push_charset_to_null(ndr, NDR_SCALARS, r->formname, MAXDEVICENAME, sizeof(uint16_t), CH_UTF16));
1447 16168 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logpixels));
1448 16168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bitsperpel));
1449 16168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pelswidth));
1450 16168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pelsheight));
1451 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeNUp(ndr, NDR_SCALARS, r->displayflags));
1452 16168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->displayfrequency));
1453 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeICMMethod(ndr, NDR_SCALARS, r->icmmethod));
1454 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeICMIntent(ndr, NDR_SCALARS, r->icmintent));
1455 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeMediaType(ndr, NDR_SCALARS, r->mediatype));
1456 16168 : NDR_CHECK(ndr_push_spoolss_DeviceModeDitherType(ndr, NDR_SCALARS, r->dithertype));
1457 16168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved1));
1458 16168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2));
1459 16168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->panningwidth));
1460 16168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->panningheight));
1461 : {
1462 16168 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1463 16168 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1464 : {
1465 0 : struct ndr_push *_ndr_driverextra_data;
1466 16168 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_driverextra_data, 0, r->driverextra_data.length));
1467 16168 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_driverextra_data, NDR_SCALARS, r->driverextra_data));
1468 16168 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_driverextra_data, 0, r->driverextra_data.length));
1469 : }
1470 16168 : ndr->flags = _flags_save_DATA_BLOB;
1471 : }
1472 16168 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1473 : }
1474 16168 : if (ndr_flags & NDR_BUFFERS) {
1475 0 : }
1476 16168 : return NDR_ERR_SUCCESS;
1477 : }
1478 :
1479 4678 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DeviceMode(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DeviceMode *r)
1480 : {
1481 4678 : uint32_t size_devicename_0 = 0;
1482 4678 : uint32_t size_formname_0 = 0;
1483 4678 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1484 4678 : if (ndr_flags & NDR_SCALARS) {
1485 4678 : NDR_CHECK(ndr_pull_align(ndr, 4));
1486 4678 : size_devicename_0 = MAXDEVICENAME;
1487 4678 : NDR_CHECK(ndr_pull_charset_to_null(ndr, NDR_SCALARS, &r->devicename, size_devicename_0, sizeof(uint16_t), CH_UTF16));
1488 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeSpecVersion(ndr, NDR_SCALARS, &r->specversion));
1489 4678 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->driverversion));
1490 4678 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
1491 4678 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__driverextra_length));
1492 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeFields(ndr, NDR_SCALARS, &r->fields));
1493 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeOrientation(ndr, NDR_SCALARS, &r->orientation));
1494 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModePaperSize(ndr, NDR_SCALARS, &r->papersize));
1495 4678 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->paperlength));
1496 4678 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->paperwidth));
1497 4678 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->scale));
1498 4678 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->copies));
1499 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeDefaultSource(ndr, NDR_SCALARS, &r->defaultsource));
1500 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModePrintQuality(ndr, NDR_SCALARS, &r->printquality));
1501 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeColor(ndr, NDR_SCALARS, &r->color));
1502 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeDuplex(ndr, NDR_SCALARS, &r->duplex));
1503 4678 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->yresolution));
1504 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeTTOption(ndr, NDR_SCALARS, &r->ttoption));
1505 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeCollate(ndr, NDR_SCALARS, &r->collate));
1506 4678 : size_formname_0 = MAXDEVICENAME;
1507 4678 : NDR_CHECK(ndr_pull_charset_to_null(ndr, NDR_SCALARS, &r->formname, size_formname_0, sizeof(uint16_t), CH_UTF16));
1508 4678 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logpixels));
1509 4678 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bitsperpel));
1510 4678 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pelswidth));
1511 4678 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pelsheight));
1512 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeNUp(ndr, NDR_SCALARS, &r->displayflags));
1513 4678 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->displayfrequency));
1514 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeICMMethod(ndr, NDR_SCALARS, &r->icmmethod));
1515 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeICMIntent(ndr, NDR_SCALARS, &r->icmintent));
1516 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeMediaType(ndr, NDR_SCALARS, &r->mediatype));
1517 4682 : NDR_CHECK(ndr_pull_spoolss_DeviceModeDitherType(ndr, NDR_SCALARS, &r->dithertype));
1518 4678 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
1519 4678 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
1520 4678 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->panningwidth));
1521 4678 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->panningheight));
1522 : {
1523 4678 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1524 4678 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1525 : {
1526 4 : struct ndr_pull *_ndr_driverextra_data;
1527 4678 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_driverextra_data, 0, r->__driverextra_length));
1528 4678 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_driverextra_data, NDR_SCALARS, &r->driverextra_data));
1529 4678 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_driverextra_data, 0, r->__driverextra_length));
1530 : }
1531 4678 : ndr->flags = _flags_save_DATA_BLOB;
1532 : }
1533 4678 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1534 : }
1535 4678 : if (ndr_flags & NDR_BUFFERS) {
1536 4 : }
1537 4678 : return NDR_ERR_SUCCESS;
1538 : }
1539 :
1540 0 : static void ndr_print_flags_spoolss_DeviceMode(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DeviceMode *r)
1541 : {
1542 0 : ndr_print_spoolss_DeviceMode(ndr, name, r);
1543 0 : }
1544 :
1545 4 : _PUBLIC_ void ndr_print_spoolss_DeviceMode(struct ndr_print *ndr, const char *name, const struct spoolss_DeviceMode *r)
1546 : {
1547 4 : ndr_print_struct(ndr, name, "spoolss_DeviceMode");
1548 4 : if (r == NULL) { ndr_print_null(ndr); return; }
1549 4 : ndr->depth++;
1550 4 : ndr_print_string(ndr, "devicename", r->devicename);
1551 4 : ndr_print_spoolss_DeviceModeSpecVersion(ndr, "specversion", r->specversion);
1552 4 : ndr_print_uint16(ndr, "driverversion", r->driverversion);
1553 4 : ndr_print_uint16(ndr, "size", r->size);
1554 4 : ndr_print_uint16(ndr, "__driverextra_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->driverextra_data.length:r->__driverextra_length);
1555 4 : ndr_print_spoolss_DeviceModeFields(ndr, "fields", r->fields);
1556 4 : ndr_print_spoolss_DeviceModeOrientation(ndr, "orientation", r->orientation);
1557 4 : ndr_print_spoolss_DeviceModePaperSize(ndr, "papersize", r->papersize);
1558 4 : ndr_print_uint16(ndr, "paperlength", r->paperlength);
1559 4 : ndr_print_uint16(ndr, "paperwidth", r->paperwidth);
1560 4 : ndr_print_uint16(ndr, "scale", r->scale);
1561 4 : ndr_print_uint16(ndr, "copies", r->copies);
1562 4 : ndr_print_spoolss_DeviceModeDefaultSource(ndr, "defaultsource", r->defaultsource);
1563 4 : ndr_print_spoolss_DeviceModePrintQuality(ndr, "printquality", r->printquality);
1564 4 : ndr_print_spoolss_DeviceModeColor(ndr, "color", r->color);
1565 4 : ndr_print_spoolss_DeviceModeDuplex(ndr, "duplex", r->duplex);
1566 4 : ndr_print_uint16(ndr, "yresolution", r->yresolution);
1567 4 : ndr_print_spoolss_DeviceModeTTOption(ndr, "ttoption", r->ttoption);
1568 4 : ndr_print_spoolss_DeviceModeCollate(ndr, "collate", r->collate);
1569 4 : ndr_print_string(ndr, "formname", r->formname);
1570 4 : ndr_print_uint16(ndr, "logpixels", r->logpixels);
1571 4 : ndr_print_uint32(ndr, "bitsperpel", r->bitsperpel);
1572 4 : ndr_print_uint32(ndr, "pelswidth", r->pelswidth);
1573 4 : ndr_print_uint32(ndr, "pelsheight", r->pelsheight);
1574 4 : ndr_print_spoolss_DeviceModeNUp(ndr, "displayflags", r->displayflags);
1575 4 : ndr_print_uint32(ndr, "displayfrequency", r->displayfrequency);
1576 4 : ndr_print_spoolss_DeviceModeICMMethod(ndr, "icmmethod", r->icmmethod);
1577 4 : ndr_print_spoolss_DeviceModeICMIntent(ndr, "icmintent", r->icmintent);
1578 4 : ndr_print_spoolss_DeviceModeMediaType(ndr, "mediatype", r->mediatype);
1579 4 : ndr_print_spoolss_DeviceModeDitherType(ndr, "dithertype", r->dithertype);
1580 4 : ndr_print_uint32(ndr, "reserved1", r->reserved1);
1581 4 : ndr_print_uint32(ndr, "reserved2", r->reserved2);
1582 4 : ndr_print_uint32(ndr, "panningwidth", r->panningwidth);
1583 4 : ndr_print_uint32(ndr, "panningheight", r->panningheight);
1584 : {
1585 4 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1586 4 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1587 4 : ndr_print_DATA_BLOB(ndr, "driverextra_data", r->driverextra_data);
1588 4 : ndr->flags = _flags_save_DATA_BLOB;
1589 : }
1590 4 : ndr->depth--;
1591 : }
1592 :
1593 11240 : _PUBLIC_ size_t ndr_size_spoolss_DeviceMode(const struct spoolss_DeviceMode *r, libndr_flags flags)
1594 : {
1595 11240 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DeviceMode);
1596 : }
1597 :
1598 972 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_EnumPrinterFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
1599 : {
1600 972 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1601 972 : return NDR_ERR_SUCCESS;
1602 : }
1603 :
1604 444 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_EnumPrinterFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
1605 : {
1606 0 : uint32_t v;
1607 444 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1608 444 : *r = v;
1609 444 : return NDR_ERR_SUCCESS;
1610 : }
1611 :
1612 0 : _PUBLIC_ void ndr_print_spoolss_EnumPrinterFlags(struct ndr_print *ndr, const char *name, uint32_t r)
1613 : {
1614 0 : ndr_print_uint32(ndr, name, r);
1615 0 : ndr->depth++;
1616 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_DEFAULT", PRINTER_ENUM_DEFAULT, r);
1617 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_LOCAL", PRINTER_ENUM_LOCAL, r);
1618 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_CONNECTIONS", PRINTER_ENUM_CONNECTIONS, r);
1619 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_FAVORITE", PRINTER_ENUM_FAVORITE, r);
1620 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_NAME", PRINTER_ENUM_NAME, r);
1621 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_REMOTE", PRINTER_ENUM_REMOTE, r);
1622 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_SHARED", PRINTER_ENUM_SHARED, r);
1623 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_NETWORK", PRINTER_ENUM_NETWORK, r);
1624 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_EXPAND", PRINTER_ENUM_EXPAND, r);
1625 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_CONTAINER", PRINTER_ENUM_CONTAINER, r);
1626 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON1", PRINTER_ENUM_ICON1, r);
1627 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON2", PRINTER_ENUM_ICON2, r);
1628 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON3", PRINTER_ENUM_ICON3, r);
1629 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON4", PRINTER_ENUM_ICON4, r);
1630 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON5", PRINTER_ENUM_ICON5, r);
1631 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON6", PRINTER_ENUM_ICON6, r);
1632 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON7", PRINTER_ENUM_ICON7, r);
1633 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON8", PRINTER_ENUM_ICON8, r);
1634 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_HIDE", PRINTER_ENUM_HIDE, r);
1635 0 : ndr->depth--;
1636 0 : }
1637 :
1638 2568 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterAttributes(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
1639 : {
1640 2568 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1641 2568 : return NDR_ERR_SUCCESS;
1642 : }
1643 :
1644 964 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterAttributes(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
1645 : {
1646 4 : uint32_t v;
1647 964 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1648 964 : *r = v;
1649 964 : return NDR_ERR_SUCCESS;
1650 : }
1651 :
1652 4 : _PUBLIC_ void ndr_print_spoolss_PrinterAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
1653 : {
1654 4 : ndr_print_uint32(ndr, name, r);
1655 4 : ndr->depth++;
1656 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_QUEUED", PRINTER_ATTRIBUTE_QUEUED, r);
1657 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DIRECT", PRINTER_ATTRIBUTE_DIRECT, r);
1658 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DEFAULT", PRINTER_ATTRIBUTE_DEFAULT, r);
1659 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_SHARED", PRINTER_ATTRIBUTE_SHARED, r);
1660 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_NETWORK", PRINTER_ATTRIBUTE_NETWORK, r);
1661 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_HIDDEN", PRINTER_ATTRIBUTE_HIDDEN, r);
1662 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_LOCAL", PRINTER_ATTRIBUTE_LOCAL, r);
1663 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_DEVQ", PRINTER_ATTRIBUTE_ENABLE_DEVQ, r);
1664 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS", PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS, r);
1665 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST", PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST, r);
1666 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_WORK_OFFLINE", PRINTER_ATTRIBUTE_WORK_OFFLINE, r);
1667 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_BIDI", PRINTER_ATTRIBUTE_ENABLE_BIDI, r);
1668 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_RAW_ONLY", PRINTER_ATTRIBUTE_RAW_ONLY, r);
1669 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_PUBLISHED", PRINTER_ATTRIBUTE_PUBLISHED, r);
1670 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_FAX", PRINTER_ATTRIBUTE_FAX, r);
1671 4 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_TS", PRINTER_ATTRIBUTE_TS, r);
1672 4 : ndr->depth--;
1673 4 : }
1674 :
1675 1584 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrinterInfo1 *r)
1676 : {
1677 1584 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1678 1584 : if (ndr_flags & NDR_SCALARS) {
1679 792 : NDR_CHECK(ndr_push_align(ndr, 5));
1680 792 : NDR_CHECK(ndr_push_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, r->flags));
1681 : {
1682 792 : libndr_flags _flags_save_string = ndr->flags;
1683 792 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1684 792 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
1685 792 : ndr->flags = _flags_save_string;
1686 : }
1687 : {
1688 792 : libndr_flags _flags_save_string = ndr->flags;
1689 792 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1690 792 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->name));
1691 792 : ndr->flags = _flags_save_string;
1692 : }
1693 : {
1694 792 : libndr_flags _flags_save_string = ndr->flags;
1695 792 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1696 792 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->comment));
1697 792 : ndr->flags = _flags_save_string;
1698 : }
1699 792 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1700 : }
1701 1584 : if (ndr_flags & NDR_BUFFERS) {
1702 : {
1703 792 : libndr_flags _flags_save_string = ndr->flags;
1704 792 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1705 792 : if (r->description) {
1706 792 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->description));
1707 792 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
1708 792 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->description));
1709 : }
1710 792 : ndr->flags = _flags_save_string;
1711 : }
1712 : {
1713 792 : libndr_flags _flags_save_string = ndr->flags;
1714 792 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1715 792 : if (r->name) {
1716 792 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->name));
1717 792 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
1718 792 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->name));
1719 : }
1720 792 : ndr->flags = _flags_save_string;
1721 : }
1722 : {
1723 792 : libndr_flags _flags_save_string = ndr->flags;
1724 792 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1725 792 : if (r->comment) {
1726 792 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->comment));
1727 792 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->comment));
1728 792 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->comment));
1729 : }
1730 792 : ndr->flags = _flags_save_string;
1731 : }
1732 : }
1733 1584 : return NDR_ERR_SUCCESS;
1734 : }
1735 :
1736 528 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrinterInfo1 *r)
1737 : {
1738 0 : uint32_t _ptr_description;
1739 528 : TALLOC_CTX *_mem_save_description_0 = NULL;
1740 0 : uint32_t _ptr_name;
1741 528 : TALLOC_CTX *_mem_save_name_0 = NULL;
1742 0 : uint32_t _ptr_comment;
1743 528 : TALLOC_CTX *_mem_save_comment_0 = NULL;
1744 528 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1745 528 : if (ndr_flags & NDR_SCALARS) {
1746 264 : NDR_CHECK(ndr_pull_align(ndr, 5));
1747 264 : NDR_CHECK(ndr_pull_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, &r->flags));
1748 : {
1749 264 : libndr_flags _flags_save_string = ndr->flags;
1750 264 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1751 264 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
1752 264 : if (_ptr_description) {
1753 264 : NDR_PULL_ALLOC(ndr, r->description);
1754 264 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
1755 : } else {
1756 0 : r->description = NULL;
1757 : }
1758 264 : ndr->flags = _flags_save_string;
1759 : }
1760 : {
1761 264 : libndr_flags _flags_save_string = ndr->flags;
1762 264 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1763 264 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
1764 264 : if (_ptr_name) {
1765 264 : NDR_PULL_ALLOC(ndr, r->name);
1766 264 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->name, _ptr_name));
1767 : } else {
1768 0 : r->name = NULL;
1769 : }
1770 264 : ndr->flags = _flags_save_string;
1771 : }
1772 : {
1773 264 : libndr_flags _flags_save_string = ndr->flags;
1774 264 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1775 264 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1776 264 : if (_ptr_comment) {
1777 264 : NDR_PULL_ALLOC(ndr, r->comment);
1778 264 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->comment, _ptr_comment));
1779 : } else {
1780 0 : r->comment = NULL;
1781 : }
1782 264 : ndr->flags = _flags_save_string;
1783 : }
1784 264 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1785 : }
1786 528 : if (ndr_flags & NDR_BUFFERS) {
1787 : {
1788 264 : libndr_flags _flags_save_string = ndr->flags;
1789 264 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1790 264 : if (r->description) {
1791 0 : uint32_t _relative_save_offset;
1792 264 : _relative_save_offset = ndr->offset;
1793 264 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
1794 264 : _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
1795 264 : NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
1796 264 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
1797 264 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
1798 264 : if (ndr->offset > ndr->relative_highest_offset) {
1799 80 : ndr->relative_highest_offset = ndr->offset;
1800 : }
1801 264 : ndr->offset = _relative_save_offset;
1802 : }
1803 264 : ndr->flags = _flags_save_string;
1804 : }
1805 : {
1806 264 : libndr_flags _flags_save_string = ndr->flags;
1807 264 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1808 264 : if (r->name) {
1809 0 : uint32_t _relative_save_offset;
1810 264 : _relative_save_offset = ndr->offset;
1811 264 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->name));
1812 264 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1813 264 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
1814 264 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
1815 264 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
1816 264 : if (ndr->offset > ndr->relative_highest_offset) {
1817 0 : ndr->relative_highest_offset = ndr->offset;
1818 : }
1819 264 : ndr->offset = _relative_save_offset;
1820 : }
1821 264 : ndr->flags = _flags_save_string;
1822 : }
1823 : {
1824 264 : libndr_flags _flags_save_string = ndr->flags;
1825 264 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1826 264 : if (r->comment) {
1827 0 : uint32_t _relative_save_offset;
1828 264 : _relative_save_offset = ndr->offset;
1829 264 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->comment));
1830 264 : _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1831 264 : NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1832 264 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->comment));
1833 264 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1834 264 : if (ndr->offset > ndr->relative_highest_offset) {
1835 0 : ndr->relative_highest_offset = ndr->offset;
1836 : }
1837 264 : ndr->offset = _relative_save_offset;
1838 : }
1839 264 : ndr->flags = _flags_save_string;
1840 : }
1841 : }
1842 528 : return NDR_ERR_SUCCESS;
1843 : }
1844 :
1845 0 : static void ndr_print_flags_spoolss_PrinterInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrinterInfo1 *r)
1846 : {
1847 0 : ndr_print_spoolss_PrinterInfo1(ndr, name, r);
1848 0 : }
1849 :
1850 0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo1 *r)
1851 : {
1852 0 : ndr_print_struct(ndr, name, "spoolss_PrinterInfo1");
1853 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1854 0 : ndr->depth++;
1855 0 : ndr_print_spoolss_EnumPrinterFlags(ndr, "flags", r->flags);
1856 : {
1857 0 : libndr_flags _flags_save_string = ndr->flags;
1858 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1859 0 : ndr_print_ptr(ndr, "description", r->description);
1860 0 : ndr->depth++;
1861 0 : if (r->description) {
1862 0 : ndr_print_string(ndr, "description", r->description);
1863 : }
1864 0 : ndr->depth--;
1865 0 : ndr->flags = _flags_save_string;
1866 : }
1867 : {
1868 0 : libndr_flags _flags_save_string = ndr->flags;
1869 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1870 0 : ndr_print_ptr(ndr, "name", r->name);
1871 0 : ndr->depth++;
1872 0 : if (r->name) {
1873 0 : ndr_print_string(ndr, "name", r->name);
1874 : }
1875 0 : ndr->depth--;
1876 0 : ndr->flags = _flags_save_string;
1877 : }
1878 : {
1879 0 : libndr_flags _flags_save_string = ndr->flags;
1880 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1881 0 : ndr_print_ptr(ndr, "comment", r->comment);
1882 0 : ndr->depth++;
1883 0 : if (r->comment) {
1884 0 : ndr_print_string(ndr, "comment", r->comment);
1885 : }
1886 0 : ndr->depth--;
1887 0 : ndr->flags = _flags_save_string;
1888 : }
1889 0 : ndr->depth--;
1890 : }
1891 :
1892 0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo1(const struct spoolss_PrinterInfo1 *r, libndr_flags flags)
1893 : {
1894 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo1);
1895 : }
1896 :
1897 1224 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrinterInfo2 *r)
1898 : {
1899 0 : uint32_t _ptr_servername;
1900 1224 : TALLOC_CTX *_mem_save_servername_0 = NULL;
1901 0 : uint32_t _ptr_printername;
1902 1224 : TALLOC_CTX *_mem_save_printername_0 = NULL;
1903 0 : uint32_t _ptr_sharename;
1904 1224 : TALLOC_CTX *_mem_save_sharename_0 = NULL;
1905 0 : uint32_t _ptr_portname;
1906 1224 : TALLOC_CTX *_mem_save_portname_0 = NULL;
1907 0 : uint32_t _ptr_drivername;
1908 1224 : TALLOC_CTX *_mem_save_drivername_0 = NULL;
1909 0 : uint32_t _ptr_comment;
1910 1224 : TALLOC_CTX *_mem_save_comment_0 = NULL;
1911 0 : uint32_t _ptr_location;
1912 1224 : TALLOC_CTX *_mem_save_location_0 = NULL;
1913 0 : uint32_t _ptr_devmode;
1914 1224 : TALLOC_CTX *_mem_save_devmode_0 = NULL;
1915 0 : uint32_t _ptr_sepfile;
1916 1224 : TALLOC_CTX *_mem_save_sepfile_0 = NULL;
1917 0 : uint32_t _ptr_printprocessor;
1918 1224 : TALLOC_CTX *_mem_save_printprocessor_0 = NULL;
1919 0 : uint32_t _ptr_datatype;
1920 1224 : TALLOC_CTX *_mem_save_datatype_0 = NULL;
1921 0 : uint32_t _ptr_parameters;
1922 1224 : TALLOC_CTX *_mem_save_parameters_0 = NULL;
1923 0 : uint32_t _ptr_secdesc;
1924 1224 : TALLOC_CTX *_mem_save_secdesc_0 = NULL;
1925 1224 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1926 1224 : if (ndr_flags & NDR_SCALARS) {
1927 612 : NDR_CHECK(ndr_pull_align(ndr, 5));
1928 : {
1929 612 : libndr_flags _flags_save_string = ndr->flags;
1930 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1931 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
1932 612 : if (_ptr_servername) {
1933 292 : NDR_PULL_ALLOC(ndr, r->servername);
1934 292 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
1935 : } else {
1936 320 : r->servername = NULL;
1937 : }
1938 612 : ndr->flags = _flags_save_string;
1939 : }
1940 : {
1941 612 : libndr_flags _flags_save_string = ndr->flags;
1942 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1943 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
1944 612 : if (_ptr_printername) {
1945 612 : NDR_PULL_ALLOC(ndr, r->printername);
1946 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
1947 : } else {
1948 0 : r->printername = NULL;
1949 : }
1950 612 : ndr->flags = _flags_save_string;
1951 : }
1952 : {
1953 612 : libndr_flags _flags_save_string = ndr->flags;
1954 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1955 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
1956 612 : if (_ptr_sharename) {
1957 612 : NDR_PULL_ALLOC(ndr, r->sharename);
1958 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sharename, _ptr_sharename));
1959 : } else {
1960 0 : r->sharename = NULL;
1961 : }
1962 612 : ndr->flags = _flags_save_string;
1963 : }
1964 : {
1965 612 : libndr_flags _flags_save_string = ndr->flags;
1966 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1967 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
1968 612 : if (_ptr_portname) {
1969 612 : NDR_PULL_ALLOC(ndr, r->portname);
1970 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->portname, _ptr_portname));
1971 : } else {
1972 0 : r->portname = NULL;
1973 : }
1974 612 : ndr->flags = _flags_save_string;
1975 : }
1976 : {
1977 612 : libndr_flags _flags_save_string = ndr->flags;
1978 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1979 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_drivername));
1980 612 : if (_ptr_drivername) {
1981 612 : NDR_PULL_ALLOC(ndr, r->drivername);
1982 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->drivername, _ptr_drivername));
1983 : } else {
1984 0 : r->drivername = NULL;
1985 : }
1986 612 : ndr->flags = _flags_save_string;
1987 : }
1988 : {
1989 612 : libndr_flags _flags_save_string = ndr->flags;
1990 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1991 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1992 612 : if (_ptr_comment) {
1993 612 : NDR_PULL_ALLOC(ndr, r->comment);
1994 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->comment, _ptr_comment));
1995 : } else {
1996 0 : r->comment = NULL;
1997 : }
1998 612 : ndr->flags = _flags_save_string;
1999 : }
2000 : {
2001 612 : libndr_flags _flags_save_string = ndr->flags;
2002 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2003 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_location));
2004 612 : if (_ptr_location) {
2005 612 : NDR_PULL_ALLOC(ndr, r->location);
2006 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->location, _ptr_location));
2007 : } else {
2008 0 : r->location = NULL;
2009 : }
2010 612 : ndr->flags = _flags_save_string;
2011 : }
2012 : {
2013 612 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
2014 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2015 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
2016 612 : if (_ptr_devmode) {
2017 572 : NDR_PULL_ALLOC(ndr, r->devmode);
2018 572 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
2019 : } else {
2020 40 : r->devmode = NULL;
2021 : }
2022 612 : ndr->flags = _flags_save_spoolss_DeviceMode;
2023 : }
2024 : {
2025 612 : libndr_flags _flags_save_string = ndr->flags;
2026 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2027 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sepfile));
2028 612 : if (_ptr_sepfile) {
2029 612 : NDR_PULL_ALLOC(ndr, r->sepfile);
2030 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sepfile, _ptr_sepfile));
2031 : } else {
2032 0 : r->sepfile = NULL;
2033 : }
2034 612 : ndr->flags = _flags_save_string;
2035 : }
2036 : {
2037 612 : libndr_flags _flags_save_string = ndr->flags;
2038 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2039 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printprocessor));
2040 612 : if (_ptr_printprocessor) {
2041 612 : NDR_PULL_ALLOC(ndr, r->printprocessor);
2042 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printprocessor, _ptr_printprocessor));
2043 : } else {
2044 0 : r->printprocessor = NULL;
2045 : }
2046 612 : ndr->flags = _flags_save_string;
2047 : }
2048 : {
2049 612 : libndr_flags _flags_save_string = ndr->flags;
2050 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2051 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
2052 612 : if (_ptr_datatype) {
2053 612 : NDR_PULL_ALLOC(ndr, r->datatype);
2054 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->datatype, _ptr_datatype));
2055 : } else {
2056 0 : r->datatype = NULL;
2057 : }
2058 612 : ndr->flags = _flags_save_string;
2059 : }
2060 : {
2061 612 : libndr_flags _flags_save_string = ndr->flags;
2062 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2063 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
2064 612 : if (_ptr_parameters) {
2065 612 : NDR_PULL_ALLOC(ndr, r->parameters);
2066 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->parameters, _ptr_parameters));
2067 : } else {
2068 0 : r->parameters = NULL;
2069 : }
2070 612 : ndr->flags = _flags_save_string;
2071 : }
2072 : {
2073 612 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
2074 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2075 612 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
2076 612 : if (_ptr_secdesc) {
2077 612 : NDR_PULL_ALLOC(ndr, r->secdesc);
2078 612 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
2079 : } else {
2080 0 : r->secdesc = NULL;
2081 : }
2082 612 : ndr->flags = _flags_save_spoolss_security_descriptor;
2083 : }
2084 612 : NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
2085 612 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
2086 612 : if (r->priority > 99) {
2087 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->priority), (uint32_t)(0), (uint32_t)(99));
2088 : }
2089 612 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->defaultpriority));
2090 612 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->starttime));
2091 612 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->untiltime));
2092 612 : NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
2093 612 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
2094 612 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->averageppm));
2095 612 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2096 : }
2097 1224 : if (ndr_flags & NDR_BUFFERS) {
2098 : {
2099 612 : libndr_flags _flags_save_string = ndr->flags;
2100 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2101 612 : if (r->servername) {
2102 0 : uint32_t _relative_save_offset;
2103 292 : _relative_save_offset = ndr->offset;
2104 292 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
2105 292 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2106 292 : NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
2107 292 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
2108 292 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
2109 292 : if (ndr->offset > ndr->relative_highest_offset) {
2110 228 : ndr->relative_highest_offset = ndr->offset;
2111 : }
2112 292 : ndr->offset = _relative_save_offset;
2113 : }
2114 612 : ndr->flags = _flags_save_string;
2115 : }
2116 : {
2117 612 : libndr_flags _flags_save_string = ndr->flags;
2118 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2119 612 : if (r->printername) {
2120 0 : uint32_t _relative_save_offset;
2121 612 : _relative_save_offset = ndr->offset;
2122 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
2123 612 : _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2124 612 : NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
2125 612 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
2126 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
2127 612 : if (ndr->offset > ndr->relative_highest_offset) {
2128 272 : ndr->relative_highest_offset = ndr->offset;
2129 : }
2130 612 : ndr->offset = _relative_save_offset;
2131 : }
2132 612 : ndr->flags = _flags_save_string;
2133 : }
2134 : {
2135 612 : libndr_flags _flags_save_string = ndr->flags;
2136 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2137 612 : if (r->sharename) {
2138 0 : uint32_t _relative_save_offset;
2139 612 : _relative_save_offset = ndr->offset;
2140 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sharename));
2141 612 : _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
2142 612 : NDR_PULL_SET_MEM_CTX(ndr, r->sharename, 0);
2143 612 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sharename));
2144 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
2145 612 : if (ndr->offset > ndr->relative_highest_offset) {
2146 0 : ndr->relative_highest_offset = ndr->offset;
2147 : }
2148 612 : ndr->offset = _relative_save_offset;
2149 : }
2150 612 : ndr->flags = _flags_save_string;
2151 : }
2152 : {
2153 612 : libndr_flags _flags_save_string = ndr->flags;
2154 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2155 612 : if (r->portname) {
2156 0 : uint32_t _relative_save_offset;
2157 612 : _relative_save_offset = ndr->offset;
2158 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->portname));
2159 612 : _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
2160 612 : NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
2161 612 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->portname));
2162 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
2163 612 : if (ndr->offset > ndr->relative_highest_offset) {
2164 0 : ndr->relative_highest_offset = ndr->offset;
2165 : }
2166 612 : ndr->offset = _relative_save_offset;
2167 : }
2168 612 : ndr->flags = _flags_save_string;
2169 : }
2170 : {
2171 612 : libndr_flags _flags_save_string = ndr->flags;
2172 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2173 612 : if (r->drivername) {
2174 0 : uint32_t _relative_save_offset;
2175 612 : _relative_save_offset = ndr->offset;
2176 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->drivername));
2177 612 : _mem_save_drivername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2178 612 : NDR_PULL_SET_MEM_CTX(ndr, r->drivername, 0);
2179 612 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->drivername));
2180 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_drivername_0, 0);
2181 612 : if (ndr->offset > ndr->relative_highest_offset) {
2182 0 : ndr->relative_highest_offset = ndr->offset;
2183 : }
2184 612 : ndr->offset = _relative_save_offset;
2185 : }
2186 612 : ndr->flags = _flags_save_string;
2187 : }
2188 : {
2189 612 : libndr_flags _flags_save_string = ndr->flags;
2190 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2191 612 : if (r->comment) {
2192 0 : uint32_t _relative_save_offset;
2193 612 : _relative_save_offset = ndr->offset;
2194 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->comment));
2195 612 : _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
2196 612 : NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
2197 612 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->comment));
2198 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
2199 612 : if (ndr->offset > ndr->relative_highest_offset) {
2200 0 : ndr->relative_highest_offset = ndr->offset;
2201 : }
2202 612 : ndr->offset = _relative_save_offset;
2203 : }
2204 612 : ndr->flags = _flags_save_string;
2205 : }
2206 : {
2207 612 : libndr_flags _flags_save_string = ndr->flags;
2208 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2209 612 : if (r->location) {
2210 0 : uint32_t _relative_save_offset;
2211 612 : _relative_save_offset = ndr->offset;
2212 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->location));
2213 612 : _mem_save_location_0 = NDR_PULL_GET_MEM_CTX(ndr);
2214 612 : NDR_PULL_SET_MEM_CTX(ndr, r->location, 0);
2215 612 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->location));
2216 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_location_0, 0);
2217 612 : if (ndr->offset > ndr->relative_highest_offset) {
2218 0 : ndr->relative_highest_offset = ndr->offset;
2219 : }
2220 612 : ndr->offset = _relative_save_offset;
2221 : }
2222 612 : ndr->flags = _flags_save_string;
2223 : }
2224 : {
2225 612 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
2226 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2227 612 : if (r->devmode) {
2228 0 : uint32_t _relative_save_offset;
2229 572 : _relative_save_offset = ndr->offset;
2230 572 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
2231 572 : _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
2232 572 : NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
2233 : {
2234 0 : struct ndr_pull *_ndr_devmode;
2235 572 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
2236 572 : NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
2237 572 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
2238 : }
2239 572 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
2240 572 : if (ndr->offset > ndr->relative_highest_offset) {
2241 0 : ndr->relative_highest_offset = ndr->offset;
2242 : }
2243 572 : ndr->offset = _relative_save_offset;
2244 : }
2245 612 : ndr->flags = _flags_save_spoolss_DeviceMode;
2246 : }
2247 : {
2248 612 : libndr_flags _flags_save_string = ndr->flags;
2249 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2250 612 : if (r->sepfile) {
2251 0 : uint32_t _relative_save_offset;
2252 612 : _relative_save_offset = ndr->offset;
2253 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sepfile));
2254 612 : _mem_save_sepfile_0 = NDR_PULL_GET_MEM_CTX(ndr);
2255 612 : NDR_PULL_SET_MEM_CTX(ndr, r->sepfile, 0);
2256 612 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sepfile));
2257 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sepfile_0, 0);
2258 612 : if (ndr->offset > ndr->relative_highest_offset) {
2259 0 : ndr->relative_highest_offset = ndr->offset;
2260 : }
2261 612 : ndr->offset = _relative_save_offset;
2262 : }
2263 612 : ndr->flags = _flags_save_string;
2264 : }
2265 : {
2266 612 : libndr_flags _flags_save_string = ndr->flags;
2267 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2268 612 : if (r->printprocessor) {
2269 0 : uint32_t _relative_save_offset;
2270 612 : _relative_save_offset = ndr->offset;
2271 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printprocessor));
2272 612 : _mem_save_printprocessor_0 = NDR_PULL_GET_MEM_CTX(ndr);
2273 612 : NDR_PULL_SET_MEM_CTX(ndr, r->printprocessor, 0);
2274 612 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printprocessor));
2275 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printprocessor_0, 0);
2276 612 : if (ndr->offset > ndr->relative_highest_offset) {
2277 0 : ndr->relative_highest_offset = ndr->offset;
2278 : }
2279 612 : ndr->offset = _relative_save_offset;
2280 : }
2281 612 : ndr->flags = _flags_save_string;
2282 : }
2283 : {
2284 612 : libndr_flags _flags_save_string = ndr->flags;
2285 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2286 612 : if (r->datatype) {
2287 0 : uint32_t _relative_save_offset;
2288 612 : _relative_save_offset = ndr->offset;
2289 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->datatype));
2290 612 : _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
2291 612 : NDR_PULL_SET_MEM_CTX(ndr, r->datatype, 0);
2292 612 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->datatype));
2293 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
2294 612 : if (ndr->offset > ndr->relative_highest_offset) {
2295 0 : ndr->relative_highest_offset = ndr->offset;
2296 : }
2297 612 : ndr->offset = _relative_save_offset;
2298 : }
2299 612 : ndr->flags = _flags_save_string;
2300 : }
2301 : {
2302 612 : libndr_flags _flags_save_string = ndr->flags;
2303 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2304 612 : if (r->parameters) {
2305 0 : uint32_t _relative_save_offset;
2306 612 : _relative_save_offset = ndr->offset;
2307 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->parameters));
2308 612 : _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
2309 612 : NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
2310 612 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->parameters));
2311 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
2312 612 : if (ndr->offset > ndr->relative_highest_offset) {
2313 0 : ndr->relative_highest_offset = ndr->offset;
2314 : }
2315 612 : ndr->offset = _relative_save_offset;
2316 : }
2317 612 : ndr->flags = _flags_save_string;
2318 : }
2319 : {
2320 612 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
2321 612 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2322 612 : if (r->secdesc) {
2323 0 : uint32_t _relative_save_offset;
2324 612 : _relative_save_offset = ndr->offset;
2325 612 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
2326 612 : _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
2327 612 : NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
2328 : {
2329 0 : struct ndr_pull *_ndr_secdesc;
2330 612 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
2331 612 : NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
2332 612 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
2333 : }
2334 612 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
2335 612 : if (ndr->offset > ndr->relative_highest_offset) {
2336 0 : ndr->relative_highest_offset = ndr->offset;
2337 : }
2338 612 : ndr->offset = _relative_save_offset;
2339 : }
2340 612 : ndr->flags = _flags_save_spoolss_security_descriptor;
2341 : }
2342 : }
2343 1224 : return NDR_ERR_SUCCESS;
2344 : }
2345 :
2346 0 : static void ndr_print_flags_spoolss_PrinterInfo2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrinterInfo2 *r)
2347 : {
2348 0 : ndr_print_spoolss_PrinterInfo2(ndr, name, r);
2349 0 : }
2350 :
2351 0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo2 *r)
2352 : {
2353 0 : ndr_print_struct(ndr, name, "spoolss_PrinterInfo2");
2354 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2355 0 : ndr->depth++;
2356 : {
2357 0 : libndr_flags _flags_save_string = ndr->flags;
2358 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2359 0 : ndr_print_ptr(ndr, "servername", r->servername);
2360 0 : ndr->depth++;
2361 0 : if (r->servername) {
2362 0 : ndr_print_string(ndr, "servername", r->servername);
2363 : }
2364 0 : ndr->depth--;
2365 0 : ndr->flags = _flags_save_string;
2366 : }
2367 : {
2368 0 : libndr_flags _flags_save_string = ndr->flags;
2369 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2370 0 : ndr_print_ptr(ndr, "printername", r->printername);
2371 0 : ndr->depth++;
2372 0 : if (r->printername) {
2373 0 : ndr_print_string(ndr, "printername", r->printername);
2374 : }
2375 0 : ndr->depth--;
2376 0 : ndr->flags = _flags_save_string;
2377 : }
2378 : {
2379 0 : libndr_flags _flags_save_string = ndr->flags;
2380 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2381 0 : ndr_print_ptr(ndr, "sharename", r->sharename);
2382 0 : ndr->depth++;
2383 0 : if (r->sharename) {
2384 0 : ndr_print_string(ndr, "sharename", r->sharename);
2385 : }
2386 0 : ndr->depth--;
2387 0 : ndr->flags = _flags_save_string;
2388 : }
2389 : {
2390 0 : libndr_flags _flags_save_string = ndr->flags;
2391 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2392 0 : ndr_print_ptr(ndr, "portname", r->portname);
2393 0 : ndr->depth++;
2394 0 : if (r->portname) {
2395 0 : ndr_print_string(ndr, "portname", r->portname);
2396 : }
2397 0 : ndr->depth--;
2398 0 : ndr->flags = _flags_save_string;
2399 : }
2400 : {
2401 0 : libndr_flags _flags_save_string = ndr->flags;
2402 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2403 0 : ndr_print_ptr(ndr, "drivername", r->drivername);
2404 0 : ndr->depth++;
2405 0 : if (r->drivername) {
2406 0 : ndr_print_string(ndr, "drivername", r->drivername);
2407 : }
2408 0 : ndr->depth--;
2409 0 : ndr->flags = _flags_save_string;
2410 : }
2411 : {
2412 0 : libndr_flags _flags_save_string = ndr->flags;
2413 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2414 0 : ndr_print_ptr(ndr, "comment", r->comment);
2415 0 : ndr->depth++;
2416 0 : if (r->comment) {
2417 0 : ndr_print_string(ndr, "comment", r->comment);
2418 : }
2419 0 : ndr->depth--;
2420 0 : ndr->flags = _flags_save_string;
2421 : }
2422 : {
2423 0 : libndr_flags _flags_save_string = ndr->flags;
2424 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2425 0 : ndr_print_ptr(ndr, "location", r->location);
2426 0 : ndr->depth++;
2427 0 : if (r->location) {
2428 0 : ndr_print_string(ndr, "location", r->location);
2429 : }
2430 0 : ndr->depth--;
2431 0 : ndr->flags = _flags_save_string;
2432 : }
2433 : {
2434 0 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
2435 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2436 0 : ndr_print_ptr(ndr, "devmode", r->devmode);
2437 0 : ndr->depth++;
2438 0 : if (r->devmode) {
2439 0 : ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
2440 : }
2441 0 : ndr->depth--;
2442 0 : ndr->flags = _flags_save_spoolss_DeviceMode;
2443 : }
2444 : {
2445 0 : libndr_flags _flags_save_string = ndr->flags;
2446 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2447 0 : ndr_print_ptr(ndr, "sepfile", r->sepfile);
2448 0 : ndr->depth++;
2449 0 : if (r->sepfile) {
2450 0 : ndr_print_string(ndr, "sepfile", r->sepfile);
2451 : }
2452 0 : ndr->depth--;
2453 0 : ndr->flags = _flags_save_string;
2454 : }
2455 : {
2456 0 : libndr_flags _flags_save_string = ndr->flags;
2457 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2458 0 : ndr_print_ptr(ndr, "printprocessor", r->printprocessor);
2459 0 : ndr->depth++;
2460 0 : if (r->printprocessor) {
2461 0 : ndr_print_string(ndr, "printprocessor", r->printprocessor);
2462 : }
2463 0 : ndr->depth--;
2464 0 : ndr->flags = _flags_save_string;
2465 : }
2466 : {
2467 0 : libndr_flags _flags_save_string = ndr->flags;
2468 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2469 0 : ndr_print_ptr(ndr, "datatype", r->datatype);
2470 0 : ndr->depth++;
2471 0 : if (r->datatype) {
2472 0 : ndr_print_string(ndr, "datatype", r->datatype);
2473 : }
2474 0 : ndr->depth--;
2475 0 : ndr->flags = _flags_save_string;
2476 : }
2477 : {
2478 0 : libndr_flags _flags_save_string = ndr->flags;
2479 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2480 0 : ndr_print_ptr(ndr, "parameters", r->parameters);
2481 0 : ndr->depth++;
2482 0 : if (r->parameters) {
2483 0 : ndr_print_string(ndr, "parameters", r->parameters);
2484 : }
2485 0 : ndr->depth--;
2486 0 : ndr->flags = _flags_save_string;
2487 : }
2488 : {
2489 0 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
2490 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2491 0 : ndr_print_ptr(ndr, "secdesc", r->secdesc);
2492 0 : ndr->depth++;
2493 0 : if (r->secdesc) {
2494 0 : ndr_print_spoolss_security_descriptor(ndr, "secdesc", r->secdesc);
2495 : }
2496 0 : ndr->depth--;
2497 0 : ndr->flags = _flags_save_spoolss_security_descriptor;
2498 : }
2499 0 : ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
2500 0 : ndr_print_uint32(ndr, "priority", r->priority);
2501 0 : ndr_print_uint32(ndr, "defaultpriority", r->defaultpriority);
2502 0 : ndr_print_uint32(ndr, "starttime", r->starttime);
2503 0 : ndr_print_uint32(ndr, "untiltime", r->untiltime);
2504 0 : ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
2505 0 : ndr_print_uint32(ndr, "cjobs", r->cjobs);
2506 0 : ndr_print_uint32(ndr, "averageppm", r->averageppm);
2507 0 : ndr->depth--;
2508 : }
2509 :
2510 0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo2(const struct spoolss_PrinterInfo2 *r, libndr_flags flags)
2511 : {
2512 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo2);
2513 : }
2514 :
2515 552 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrinterInfo3 *r)
2516 : {
2517 552 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2518 552 : if (ndr_flags & NDR_SCALARS) {
2519 276 : NDR_CHECK(ndr_push_align(ndr, 5));
2520 : {
2521 276 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
2522 276 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2523 276 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
2524 276 : ndr->flags = _flags_save_spoolss_security_descriptor;
2525 : }
2526 276 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2527 : }
2528 552 : if (ndr_flags & NDR_BUFFERS) {
2529 : {
2530 276 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
2531 276 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2532 276 : if (r->secdesc) {
2533 276 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->secdesc));
2534 : {
2535 0 : struct ndr_push *_ndr_secdesc;
2536 276 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
2537 276 : NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
2538 276 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
2539 : }
2540 276 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->secdesc));
2541 : }
2542 276 : ndr->flags = _flags_save_spoolss_security_descriptor;
2543 : }
2544 : }
2545 552 : return NDR_ERR_SUCCESS;
2546 : }
2547 :
2548 184 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrinterInfo3 *r)
2549 : {
2550 0 : uint32_t _ptr_secdesc;
2551 184 : TALLOC_CTX *_mem_save_secdesc_0 = NULL;
2552 184 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2553 184 : if (ndr_flags & NDR_SCALARS) {
2554 92 : NDR_CHECK(ndr_pull_align(ndr, 5));
2555 : {
2556 92 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
2557 92 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2558 92 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
2559 92 : if (_ptr_secdesc) {
2560 92 : NDR_PULL_ALLOC(ndr, r->secdesc);
2561 92 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
2562 : } else {
2563 0 : r->secdesc = NULL;
2564 : }
2565 92 : ndr->flags = _flags_save_spoolss_security_descriptor;
2566 : }
2567 92 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2568 : }
2569 184 : if (ndr_flags & NDR_BUFFERS) {
2570 : {
2571 92 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
2572 92 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2573 92 : if (r->secdesc) {
2574 0 : uint32_t _relative_save_offset;
2575 92 : _relative_save_offset = ndr->offset;
2576 92 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
2577 92 : _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
2578 92 : NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
2579 : {
2580 0 : struct ndr_pull *_ndr_secdesc;
2581 92 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
2582 92 : NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
2583 92 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
2584 : }
2585 92 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
2586 92 : if (ndr->offset > ndr->relative_highest_offset) {
2587 92 : ndr->relative_highest_offset = ndr->offset;
2588 : }
2589 92 : ndr->offset = _relative_save_offset;
2590 : }
2591 92 : ndr->flags = _flags_save_spoolss_security_descriptor;
2592 : }
2593 : }
2594 184 : return NDR_ERR_SUCCESS;
2595 : }
2596 :
2597 0 : static void ndr_print_flags_spoolss_PrinterInfo3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrinterInfo3 *r)
2598 : {
2599 0 : ndr_print_spoolss_PrinterInfo3(ndr, name, r);
2600 0 : }
2601 :
2602 0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo3 *r)
2603 : {
2604 0 : ndr_print_struct(ndr, name, "spoolss_PrinterInfo3");
2605 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2606 0 : ndr->depth++;
2607 : {
2608 0 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
2609 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2610 0 : ndr_print_ptr(ndr, "secdesc", r->secdesc);
2611 0 : ndr->depth++;
2612 0 : if (r->secdesc) {
2613 0 : ndr_print_spoolss_security_descriptor(ndr, "secdesc", r->secdesc);
2614 : }
2615 0 : ndr->depth--;
2616 0 : ndr->flags = _flags_save_spoolss_security_descriptor;
2617 : }
2618 0 : ndr->depth--;
2619 : }
2620 :
2621 0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo3(const struct spoolss_PrinterInfo3 *r, libndr_flags flags)
2622 : {
2623 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo3);
2624 : }
2625 :
2626 504 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrinterInfo4 *r)
2627 : {
2628 504 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2629 504 : if (ndr_flags & NDR_SCALARS) {
2630 252 : NDR_CHECK(ndr_push_align(ndr, 5));
2631 : {
2632 252 : libndr_flags _flags_save_string = ndr->flags;
2633 252 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2634 252 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
2635 252 : ndr->flags = _flags_save_string;
2636 : }
2637 : {
2638 252 : libndr_flags _flags_save_string = ndr->flags;
2639 252 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2640 252 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername));
2641 252 : ndr->flags = _flags_save_string;
2642 : }
2643 252 : NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
2644 252 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2645 : }
2646 504 : if (ndr_flags & NDR_BUFFERS) {
2647 : {
2648 252 : libndr_flags _flags_save_string = ndr->flags;
2649 252 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2650 252 : if (r->printername) {
2651 252 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printername));
2652 252 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
2653 252 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printername));
2654 : }
2655 252 : ndr->flags = _flags_save_string;
2656 : }
2657 : {
2658 252 : libndr_flags _flags_save_string = ndr->flags;
2659 252 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2660 252 : if (r->servername) {
2661 12 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->servername));
2662 12 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername));
2663 12 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->servername));
2664 : }
2665 252 : ndr->flags = _flags_save_string;
2666 : }
2667 : }
2668 504 : return NDR_ERR_SUCCESS;
2669 : }
2670 :
2671 168 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrinterInfo4 *r)
2672 : {
2673 0 : uint32_t _ptr_printername;
2674 168 : TALLOC_CTX *_mem_save_printername_0 = NULL;
2675 0 : uint32_t _ptr_servername;
2676 168 : TALLOC_CTX *_mem_save_servername_0 = NULL;
2677 168 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2678 168 : if (ndr_flags & NDR_SCALARS) {
2679 84 : NDR_CHECK(ndr_pull_align(ndr, 5));
2680 : {
2681 84 : libndr_flags _flags_save_string = ndr->flags;
2682 84 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2683 84 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
2684 84 : if (_ptr_printername) {
2685 84 : NDR_PULL_ALLOC(ndr, r->printername);
2686 84 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
2687 : } else {
2688 0 : r->printername = NULL;
2689 : }
2690 84 : ndr->flags = _flags_save_string;
2691 : }
2692 : {
2693 84 : libndr_flags _flags_save_string = ndr->flags;
2694 84 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2695 84 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
2696 84 : if (_ptr_servername) {
2697 4 : NDR_PULL_ALLOC(ndr, r->servername);
2698 4 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
2699 : } else {
2700 80 : r->servername = NULL;
2701 : }
2702 84 : ndr->flags = _flags_save_string;
2703 : }
2704 84 : NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
2705 84 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2706 : }
2707 168 : if (ndr_flags & NDR_BUFFERS) {
2708 : {
2709 84 : libndr_flags _flags_save_string = ndr->flags;
2710 84 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2711 84 : if (r->printername) {
2712 0 : uint32_t _relative_save_offset;
2713 84 : _relative_save_offset = ndr->offset;
2714 84 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
2715 84 : _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2716 84 : NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
2717 84 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
2718 84 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
2719 84 : if (ndr->offset > ndr->relative_highest_offset) {
2720 52 : ndr->relative_highest_offset = ndr->offset;
2721 : }
2722 84 : ndr->offset = _relative_save_offset;
2723 : }
2724 84 : ndr->flags = _flags_save_string;
2725 : }
2726 : {
2727 84 : libndr_flags _flags_save_string = ndr->flags;
2728 84 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2729 84 : if (r->servername) {
2730 0 : uint32_t _relative_save_offset;
2731 4 : _relative_save_offset = ndr->offset;
2732 4 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
2733 4 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2734 4 : NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
2735 4 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
2736 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
2737 4 : if (ndr->offset > ndr->relative_highest_offset) {
2738 0 : ndr->relative_highest_offset = ndr->offset;
2739 : }
2740 4 : ndr->offset = _relative_save_offset;
2741 : }
2742 84 : ndr->flags = _flags_save_string;
2743 : }
2744 : }
2745 168 : return NDR_ERR_SUCCESS;
2746 : }
2747 :
2748 0 : static void ndr_print_flags_spoolss_PrinterInfo4(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrinterInfo4 *r)
2749 : {
2750 0 : ndr_print_spoolss_PrinterInfo4(ndr, name, r);
2751 0 : }
2752 :
2753 0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo4 *r)
2754 : {
2755 0 : ndr_print_struct(ndr, name, "spoolss_PrinterInfo4");
2756 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2757 0 : ndr->depth++;
2758 : {
2759 0 : libndr_flags _flags_save_string = ndr->flags;
2760 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2761 0 : ndr_print_ptr(ndr, "printername", r->printername);
2762 0 : ndr->depth++;
2763 0 : if (r->printername) {
2764 0 : ndr_print_string(ndr, "printername", r->printername);
2765 : }
2766 0 : ndr->depth--;
2767 0 : ndr->flags = _flags_save_string;
2768 : }
2769 : {
2770 0 : libndr_flags _flags_save_string = ndr->flags;
2771 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2772 0 : ndr_print_ptr(ndr, "servername", r->servername);
2773 0 : ndr->depth++;
2774 0 : if (r->servername) {
2775 0 : ndr_print_string(ndr, "servername", r->servername);
2776 : }
2777 0 : ndr->depth--;
2778 0 : ndr->flags = _flags_save_string;
2779 : }
2780 0 : ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
2781 0 : ndr->depth--;
2782 : }
2783 :
2784 0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo4(const struct spoolss_PrinterInfo4 *r, libndr_flags flags)
2785 : {
2786 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo4);
2787 : }
2788 :
2789 504 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo5(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrinterInfo5 *r)
2790 : {
2791 504 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2792 504 : if (ndr_flags & NDR_SCALARS) {
2793 252 : NDR_CHECK(ndr_push_align(ndr, 5));
2794 : {
2795 252 : libndr_flags _flags_save_string = ndr->flags;
2796 252 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2797 252 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
2798 252 : ndr->flags = _flags_save_string;
2799 : }
2800 : {
2801 252 : libndr_flags _flags_save_string = ndr->flags;
2802 252 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2803 252 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->portname));
2804 252 : ndr->flags = _flags_save_string;
2805 : }
2806 252 : NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
2807 252 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->device_not_selected_timeout));
2808 252 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->transmission_retry_timeout));
2809 252 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2810 : }
2811 504 : if (ndr_flags & NDR_BUFFERS) {
2812 : {
2813 252 : libndr_flags _flags_save_string = ndr->flags;
2814 252 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2815 252 : if (r->printername) {
2816 252 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printername));
2817 252 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
2818 252 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printername));
2819 : }
2820 252 : ndr->flags = _flags_save_string;
2821 : }
2822 : {
2823 252 : libndr_flags _flags_save_string = ndr->flags;
2824 252 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2825 252 : if (r->portname) {
2826 252 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->portname));
2827 252 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->portname));
2828 252 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->portname));
2829 : }
2830 252 : ndr->flags = _flags_save_string;
2831 : }
2832 : }
2833 504 : return NDR_ERR_SUCCESS;
2834 : }
2835 :
2836 168 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo5(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrinterInfo5 *r)
2837 : {
2838 0 : uint32_t _ptr_printername;
2839 168 : TALLOC_CTX *_mem_save_printername_0 = NULL;
2840 0 : uint32_t _ptr_portname;
2841 168 : TALLOC_CTX *_mem_save_portname_0 = NULL;
2842 168 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2843 168 : if (ndr_flags & NDR_SCALARS) {
2844 84 : NDR_CHECK(ndr_pull_align(ndr, 5));
2845 : {
2846 84 : libndr_flags _flags_save_string = ndr->flags;
2847 84 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2848 84 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
2849 84 : if (_ptr_printername) {
2850 84 : NDR_PULL_ALLOC(ndr, r->printername);
2851 84 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
2852 : } else {
2853 0 : r->printername = NULL;
2854 : }
2855 84 : ndr->flags = _flags_save_string;
2856 : }
2857 : {
2858 84 : libndr_flags _flags_save_string = ndr->flags;
2859 84 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2860 84 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
2861 84 : if (_ptr_portname) {
2862 84 : NDR_PULL_ALLOC(ndr, r->portname);
2863 84 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->portname, _ptr_portname));
2864 : } else {
2865 0 : r->portname = NULL;
2866 : }
2867 84 : ndr->flags = _flags_save_string;
2868 : }
2869 84 : NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
2870 84 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->device_not_selected_timeout));
2871 84 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->transmission_retry_timeout));
2872 84 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2873 : }
2874 168 : if (ndr_flags & NDR_BUFFERS) {
2875 : {
2876 84 : libndr_flags _flags_save_string = ndr->flags;
2877 84 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2878 84 : if (r->printername) {
2879 0 : uint32_t _relative_save_offset;
2880 84 : _relative_save_offset = ndr->offset;
2881 84 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
2882 84 : _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2883 84 : NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
2884 84 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
2885 84 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
2886 84 : if (ndr->offset > ndr->relative_highest_offset) {
2887 52 : ndr->relative_highest_offset = ndr->offset;
2888 : }
2889 84 : ndr->offset = _relative_save_offset;
2890 : }
2891 84 : ndr->flags = _flags_save_string;
2892 : }
2893 : {
2894 84 : libndr_flags _flags_save_string = ndr->flags;
2895 84 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2896 84 : if (r->portname) {
2897 0 : uint32_t _relative_save_offset;
2898 84 : _relative_save_offset = ndr->offset;
2899 84 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->portname));
2900 84 : _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
2901 84 : NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
2902 84 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->portname));
2903 84 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
2904 84 : if (ndr->offset > ndr->relative_highest_offset) {
2905 0 : ndr->relative_highest_offset = ndr->offset;
2906 : }
2907 84 : ndr->offset = _relative_save_offset;
2908 : }
2909 84 : ndr->flags = _flags_save_string;
2910 : }
2911 : }
2912 168 : return NDR_ERR_SUCCESS;
2913 : }
2914 :
2915 0 : static void ndr_print_flags_spoolss_PrinterInfo5(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrinterInfo5 *r)
2916 : {
2917 0 : ndr_print_spoolss_PrinterInfo5(ndr, name, r);
2918 0 : }
2919 :
2920 0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo5(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo5 *r)
2921 : {
2922 0 : ndr_print_struct(ndr, name, "spoolss_PrinterInfo5");
2923 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2924 0 : ndr->depth++;
2925 : {
2926 0 : libndr_flags _flags_save_string = ndr->flags;
2927 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2928 0 : ndr_print_ptr(ndr, "printername", r->printername);
2929 0 : ndr->depth++;
2930 0 : if (r->printername) {
2931 0 : ndr_print_string(ndr, "printername", r->printername);
2932 : }
2933 0 : ndr->depth--;
2934 0 : ndr->flags = _flags_save_string;
2935 : }
2936 : {
2937 0 : libndr_flags _flags_save_string = ndr->flags;
2938 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
2939 0 : ndr_print_ptr(ndr, "portname", r->portname);
2940 0 : ndr->depth++;
2941 0 : if (r->portname) {
2942 0 : ndr_print_string(ndr, "portname", r->portname);
2943 : }
2944 0 : ndr->depth--;
2945 0 : ndr->flags = _flags_save_string;
2946 : }
2947 0 : ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
2948 0 : ndr_print_uint32(ndr, "device_not_selected_timeout", r->device_not_selected_timeout);
2949 0 : ndr_print_uint32(ndr, "transmission_retry_timeout", r->transmission_retry_timeout);
2950 0 : ndr->depth--;
2951 : }
2952 :
2953 0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo5(const struct spoolss_PrinterInfo5 *r, libndr_flags flags)
2954 : {
2955 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo5);
2956 : }
2957 :
2958 132 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo6(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrinterInfo6 *r)
2959 : {
2960 132 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2961 132 : if (ndr_flags & NDR_SCALARS) {
2962 132 : NDR_CHECK(ndr_push_align(ndr, 4));
2963 132 : NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
2964 132 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2965 : }
2966 132 : if (ndr_flags & NDR_BUFFERS) {
2967 0 : }
2968 132 : return NDR_ERR_SUCCESS;
2969 : }
2970 :
2971 44 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrinterInfo6 *r)
2972 : {
2973 44 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2974 44 : if (ndr_flags & NDR_SCALARS) {
2975 44 : NDR_CHECK(ndr_pull_align(ndr, 4));
2976 44 : NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
2977 44 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2978 : }
2979 44 : if (ndr_flags & NDR_BUFFERS) {
2980 0 : }
2981 44 : return NDR_ERR_SUCCESS;
2982 : }
2983 :
2984 0 : static void ndr_print_flags_spoolss_PrinterInfo6(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrinterInfo6 *r)
2985 : {
2986 0 : ndr_print_spoolss_PrinterInfo6(ndr, name, r);
2987 0 : }
2988 :
2989 0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo6(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo6 *r)
2990 : {
2991 0 : ndr_print_struct(ndr, name, "spoolss_PrinterInfo6");
2992 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2993 0 : ndr->depth++;
2994 0 : ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
2995 0 : ndr->depth--;
2996 : }
2997 :
2998 0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo6(const struct spoolss_PrinterInfo6 *r, libndr_flags flags)
2999 : {
3000 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo6);
3001 : }
3002 :
3003 176 : static enum ndr_err_code ndr_push_spoolss_DsPrintAction(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
3004 : {
3005 176 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
3006 176 : return NDR_ERR_SUCCESS;
3007 : }
3008 :
3009 64 : static enum ndr_err_code ndr_pull_spoolss_DsPrintAction(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
3010 : {
3011 0 : uint32_t v;
3012 64 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
3013 64 : *r = v;
3014 64 : return NDR_ERR_SUCCESS;
3015 : }
3016 :
3017 0 : _PUBLIC_ void ndr_print_spoolss_DsPrintAction(struct ndr_print *ndr, const char *name, uint32_t r)
3018 : {
3019 0 : ndr_print_uint32(ndr, name, r);
3020 0 : ndr->depth++;
3021 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_PUBLISH", DSPRINT_PUBLISH, r);
3022 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_UPDATE", DSPRINT_UPDATE, r);
3023 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_UNPUBLISH", DSPRINT_UNPUBLISH, r);
3024 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_REPUBLISH", DSPRINT_REPUBLISH, r);
3025 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_PENDING", DSPRINT_PENDING, r);
3026 0 : ndr->depth--;
3027 0 : }
3028 :
3029 336 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo7(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrinterInfo7 *r)
3030 : {
3031 336 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3032 336 : if (ndr_flags & NDR_SCALARS) {
3033 168 : NDR_CHECK(ndr_push_align(ndr, 5));
3034 : {
3035 168 : libndr_flags _flags_save_string = ndr->flags;
3036 168 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3037 168 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->guid));
3038 168 : ndr->flags = _flags_save_string;
3039 : }
3040 168 : NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr, NDR_SCALARS, r->action));
3041 168 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3042 : }
3043 336 : if (ndr_flags & NDR_BUFFERS) {
3044 : {
3045 168 : libndr_flags _flags_save_string = ndr->flags;
3046 168 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3047 168 : if (r->guid) {
3048 168 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->guid));
3049 168 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->guid));
3050 168 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->guid));
3051 : }
3052 168 : ndr->flags = _flags_save_string;
3053 : }
3054 : }
3055 336 : return NDR_ERR_SUCCESS;
3056 : }
3057 :
3058 112 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo7(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrinterInfo7 *r)
3059 : {
3060 0 : uint32_t _ptr_guid;
3061 112 : TALLOC_CTX *_mem_save_guid_0 = NULL;
3062 112 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3063 112 : if (ndr_flags & NDR_SCALARS) {
3064 56 : NDR_CHECK(ndr_pull_align(ndr, 5));
3065 : {
3066 56 : libndr_flags _flags_save_string = ndr->flags;
3067 56 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3068 56 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guid));
3069 56 : if (_ptr_guid) {
3070 56 : NDR_PULL_ALLOC(ndr, r->guid);
3071 56 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->guid, _ptr_guid));
3072 : } else {
3073 0 : r->guid = NULL;
3074 : }
3075 56 : ndr->flags = _flags_save_string;
3076 : }
3077 56 : NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr, NDR_SCALARS, &r->action));
3078 56 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3079 : }
3080 112 : if (ndr_flags & NDR_BUFFERS) {
3081 : {
3082 56 : libndr_flags _flags_save_string = ndr->flags;
3083 56 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3084 56 : if (r->guid) {
3085 0 : uint32_t _relative_save_offset;
3086 56 : _relative_save_offset = ndr->offset;
3087 56 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->guid));
3088 56 : _mem_save_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3089 56 : NDR_PULL_SET_MEM_CTX(ndr, r->guid, 0);
3090 56 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->guid));
3091 56 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guid_0, 0);
3092 56 : if (ndr->offset > ndr->relative_highest_offset) {
3093 56 : ndr->relative_highest_offset = ndr->offset;
3094 : }
3095 56 : ndr->offset = _relative_save_offset;
3096 : }
3097 56 : ndr->flags = _flags_save_string;
3098 : }
3099 : }
3100 112 : return NDR_ERR_SUCCESS;
3101 : }
3102 :
3103 0 : static void ndr_print_flags_spoolss_PrinterInfo7(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrinterInfo7 *r)
3104 : {
3105 0 : ndr_print_spoolss_PrinterInfo7(ndr, name, r);
3106 0 : }
3107 :
3108 0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo7(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo7 *r)
3109 : {
3110 0 : ndr_print_struct(ndr, name, "spoolss_PrinterInfo7");
3111 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3112 0 : ndr->depth++;
3113 : {
3114 0 : libndr_flags _flags_save_string = ndr->flags;
3115 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3116 0 : ndr_print_ptr(ndr, "guid", r->guid);
3117 0 : ndr->depth++;
3118 0 : if (r->guid) {
3119 0 : ndr_print_string(ndr, "guid", r->guid);
3120 : }
3121 0 : ndr->depth--;
3122 0 : ndr->flags = _flags_save_string;
3123 : }
3124 0 : ndr_print_spoolss_DsPrintAction(ndr, "action", r->action);
3125 0 : ndr->depth--;
3126 : }
3127 :
3128 0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo7(const struct spoolss_PrinterInfo7 *r, libndr_flags flags)
3129 : {
3130 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo7);
3131 : }
3132 :
3133 4992 : static enum ndr_err_code ndr_push_spoolss_DeviceModeInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DeviceModeInfo *r)
3134 : {
3135 4992 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3136 4992 : if (ndr_flags & NDR_SCALARS) {
3137 2496 : NDR_CHECK(ndr_push_align(ndr, 5));
3138 : {
3139 2496 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
3140 2496 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
3141 2496 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
3142 2496 : ndr->flags = _flags_save_spoolss_DeviceMode;
3143 : }
3144 2496 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3145 : }
3146 4992 : if (ndr_flags & NDR_BUFFERS) {
3147 : {
3148 2496 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
3149 2496 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
3150 2496 : if (r->devmode) {
3151 2484 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->devmode));
3152 : {
3153 0 : struct ndr_push *_ndr_devmode;
3154 2484 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
3155 2484 : NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
3156 2484 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
3157 : }
3158 2484 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->devmode));
3159 : }
3160 2496 : ndr->flags = _flags_save_spoolss_DeviceMode;
3161 : }
3162 : }
3163 4992 : return NDR_ERR_SUCCESS;
3164 : }
3165 :
3166 1664 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DeviceModeInfo *r)
3167 : {
3168 0 : uint32_t _ptr_devmode;
3169 1664 : TALLOC_CTX *_mem_save_devmode_0 = NULL;
3170 1664 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3171 1664 : if (ndr_flags & NDR_SCALARS) {
3172 832 : NDR_CHECK(ndr_pull_align(ndr, 5));
3173 : {
3174 832 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
3175 832 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
3176 832 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
3177 832 : if (_ptr_devmode) {
3178 828 : NDR_PULL_ALLOC(ndr, r->devmode);
3179 828 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
3180 : } else {
3181 4 : r->devmode = NULL;
3182 : }
3183 832 : ndr->flags = _flags_save_spoolss_DeviceMode;
3184 : }
3185 832 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3186 : }
3187 1664 : if (ndr_flags & NDR_BUFFERS) {
3188 : {
3189 832 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
3190 832 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
3191 832 : if (r->devmode) {
3192 0 : uint32_t _relative_save_offset;
3193 828 : _relative_save_offset = ndr->offset;
3194 828 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
3195 828 : _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
3196 828 : NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
3197 : {
3198 0 : struct ndr_pull *_ndr_devmode;
3199 828 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
3200 828 : NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
3201 828 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
3202 : }
3203 828 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
3204 828 : if (ndr->offset > ndr->relative_highest_offset) {
3205 828 : ndr->relative_highest_offset = ndr->offset;
3206 : }
3207 828 : ndr->offset = _relative_save_offset;
3208 : }
3209 832 : ndr->flags = _flags_save_spoolss_DeviceMode;
3210 : }
3211 : }
3212 1664 : return NDR_ERR_SUCCESS;
3213 : }
3214 :
3215 0 : _PUBLIC_ void ndr_print_spoolss_DeviceModeInfo(struct ndr_print *ndr, const char *name, const struct spoolss_DeviceModeInfo *r)
3216 : {
3217 0 : ndr_print_struct(ndr, name, "spoolss_DeviceModeInfo");
3218 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3219 0 : ndr->depth++;
3220 : {
3221 0 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
3222 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
3223 0 : ndr_print_ptr(ndr, "devmode", r->devmode);
3224 0 : ndr->depth++;
3225 0 : if (r->devmode) {
3226 0 : ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
3227 : }
3228 0 : ndr->depth--;
3229 0 : ndr->flags = _flags_save_spoolss_DeviceMode;
3230 : }
3231 0 : ndr->depth--;
3232 : }
3233 :
3234 8108 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_PrinterInfo *r)
3235 : {
3236 8108 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
3237 0 : uint32_t level;
3238 : {
3239 8108 : libndr_flags _flags_save_UNION = ndr->flags;
3240 8108 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
3241 8108 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3242 8108 : if (ndr_flags & NDR_SCALARS) {
3243 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3244 6668 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3245 6668 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3246 6668 : switch (level) {
3247 416 : case 0: {
3248 416 : NDR_CHECK(ndr_push_align(ndr, 5));
3249 416 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
3250 416 : NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr, NDR_SCALARS, &r->info0));
3251 416 : break; }
3252 :
3253 792 : case 1: {
3254 792 : NDR_CHECK(ndr_push_align(ndr, 5));
3255 792 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
3256 792 : NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr, NDR_SCALARS, &r->info1));
3257 792 : break; }
3258 :
3259 1884 : case 2: {
3260 1884 : NDR_CHECK(ndr_push_align(ndr, 5));
3261 1884 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
3262 1884 : NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr, NDR_SCALARS, &r->info2));
3263 1884 : break; }
3264 :
3265 276 : case 3: {
3266 276 : NDR_CHECK(ndr_push_align(ndr, 5));
3267 276 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
3268 276 : NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr, NDR_SCALARS, &r->info3));
3269 276 : break; }
3270 :
3271 252 : case 4: {
3272 252 : NDR_CHECK(ndr_push_align(ndr, 5));
3273 252 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
3274 252 : NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->info4));
3275 252 : break; }
3276 :
3277 252 : case 5: {
3278 252 : NDR_CHECK(ndr_push_align(ndr, 5));
3279 252 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
3280 252 : NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr, NDR_SCALARS, &r->info5));
3281 252 : break; }
3282 :
3283 132 : case 6: {
3284 132 : NDR_CHECK(ndr_push_align(ndr, 4));
3285 132 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
3286 132 : NDR_CHECK(ndr_push_spoolss_PrinterInfo6(ndr, NDR_SCALARS, &r->info6));
3287 132 : break; }
3288 :
3289 168 : case 7: {
3290 168 : NDR_CHECK(ndr_push_align(ndr, 5));
3291 168 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
3292 168 : NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr, NDR_SCALARS, &r->info7));
3293 168 : break; }
3294 :
3295 2496 : case 8: {
3296 2496 : NDR_CHECK(ndr_push_align(ndr, 5));
3297 2496 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
3298 2496 : NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info8));
3299 2496 : break; }
3300 :
3301 0 : case 9: {
3302 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3303 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
3304 0 : NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info9));
3305 0 : break; }
3306 :
3307 0 : default: {
3308 0 : break; }
3309 :
3310 : }
3311 : }
3312 8108 : if (ndr_flags & NDR_BUFFERS) {
3313 6668 : if (!(ndr_flags & NDR_SCALARS)) {
3314 : /* We didn't get it above, and the token is not needed after this. */
3315 1440 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3316 : }
3317 6668 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
3318 6668 : switch (level) {
3319 416 : case 0:
3320 416 : NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr, NDR_BUFFERS, &r->info0));
3321 416 : break;
3322 :
3323 792 : case 1:
3324 792 : NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr, NDR_BUFFERS, &r->info1));
3325 792 : break;
3326 :
3327 1884 : case 2:
3328 1884 : NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr, NDR_BUFFERS, &r->info2));
3329 1884 : break;
3330 :
3331 276 : case 3:
3332 276 : NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr, NDR_BUFFERS, &r->info3));
3333 276 : break;
3334 :
3335 252 : case 4:
3336 252 : NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->info4));
3337 252 : break;
3338 :
3339 252 : case 5:
3340 252 : NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr, NDR_BUFFERS, &r->info5));
3341 252 : break;
3342 :
3343 132 : case 6:
3344 132 : break;
3345 :
3346 168 : case 7:
3347 168 : NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr, NDR_BUFFERS, &r->info7));
3348 168 : break;
3349 :
3350 2496 : case 8:
3351 2496 : NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info8));
3352 2496 : break;
3353 :
3354 0 : case 9:
3355 0 : NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info9));
3356 0 : break;
3357 :
3358 0 : default:
3359 0 : break;
3360 :
3361 : }
3362 : }
3363 8108 : ndr->flags = _flags_save_UNION;
3364 : }
3365 8108 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
3366 8108 : return NDR_ERR_SUCCESS;
3367 : }
3368 :
3369 2668 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_PrinterInfo *r)
3370 : {
3371 2668 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
3372 0 : uint32_t level;
3373 : {
3374 2668 : libndr_flags _flags_save_UNION = ndr->flags;
3375 2668 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
3376 2668 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3377 2668 : if (ndr_flags & NDR_SCALARS) {
3378 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3379 2208 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3380 2208 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3381 2208 : switch (level) {
3382 140 : case 0: {
3383 140 : NDR_CHECK(ndr_pull_align(ndr, 5));
3384 140 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
3385 140 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr, NDR_SCALARS, &r->info0));
3386 140 : break; }
3387 :
3388 264 : case 1: {
3389 264 : NDR_CHECK(ndr_pull_align(ndr, 5));
3390 264 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
3391 264 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr, NDR_SCALARS, &r->info1));
3392 264 : break; }
3393 :
3394 612 : case 2: {
3395 612 : NDR_CHECK(ndr_pull_align(ndr, 5));
3396 612 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
3397 612 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr, NDR_SCALARS, &r->info2));
3398 612 : break; }
3399 :
3400 92 : case 3: {
3401 92 : NDR_CHECK(ndr_pull_align(ndr, 5));
3402 92 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
3403 92 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr, NDR_SCALARS, &r->info3));
3404 92 : break; }
3405 :
3406 84 : case 4: {
3407 84 : NDR_CHECK(ndr_pull_align(ndr, 5));
3408 84 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
3409 84 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->info4));
3410 84 : break; }
3411 :
3412 84 : case 5: {
3413 84 : NDR_CHECK(ndr_pull_align(ndr, 5));
3414 84 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
3415 84 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr, NDR_SCALARS, &r->info5));
3416 84 : break; }
3417 :
3418 44 : case 6: {
3419 44 : NDR_CHECK(ndr_pull_align(ndr, 4));
3420 44 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
3421 44 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo6(ndr, NDR_SCALARS, &r->info6));
3422 44 : break; }
3423 :
3424 56 : case 7: {
3425 56 : NDR_CHECK(ndr_pull_align(ndr, 5));
3426 56 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
3427 56 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr, NDR_SCALARS, &r->info7));
3428 56 : break; }
3429 :
3430 832 : case 8: {
3431 832 : NDR_CHECK(ndr_pull_align(ndr, 5));
3432 832 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
3433 832 : NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info8));
3434 832 : break; }
3435 :
3436 0 : case 9: {
3437 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3438 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
3439 0 : NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info9));
3440 0 : break; }
3441 :
3442 0 : default: {
3443 0 : break; }
3444 :
3445 : }
3446 : }
3447 2668 : if (ndr_flags & NDR_BUFFERS) {
3448 2208 : if (!(ndr_flags & NDR_SCALARS)) {
3449 : /* We didn't get it above, and the token is not needed after this. */
3450 460 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3451 : }
3452 2208 : switch (level) {
3453 140 : case 0:
3454 140 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
3455 140 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr, NDR_BUFFERS, &r->info0));
3456 140 : break;
3457 :
3458 264 : case 1:
3459 264 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
3460 264 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr, NDR_BUFFERS, &r->info1));
3461 264 : break;
3462 :
3463 612 : case 2:
3464 612 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
3465 612 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr, NDR_BUFFERS, &r->info2));
3466 612 : break;
3467 :
3468 92 : case 3:
3469 92 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
3470 92 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr, NDR_BUFFERS, &r->info3));
3471 92 : break;
3472 :
3473 84 : case 4:
3474 84 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
3475 84 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->info4));
3476 84 : break;
3477 :
3478 84 : case 5:
3479 84 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
3480 84 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr, NDR_BUFFERS, &r->info5));
3481 84 : break;
3482 :
3483 44 : case 6:
3484 44 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
3485 44 : break;
3486 :
3487 56 : case 7:
3488 56 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
3489 56 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr, NDR_BUFFERS, &r->info7));
3490 56 : break;
3491 :
3492 832 : case 8:
3493 832 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
3494 832 : NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info8));
3495 832 : break;
3496 :
3497 0 : case 9:
3498 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
3499 0 : NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info9));
3500 0 : break;
3501 :
3502 0 : default:
3503 0 : break;
3504 :
3505 : }
3506 : }
3507 2668 : ndr->flags = _flags_save_UNION;
3508 : }
3509 2668 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
3510 2668 : return NDR_ERR_SUCCESS;
3511 : }
3512 :
3513 0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrinterInfo *r)
3514 : {
3515 0 : uint32_t level;
3516 : {
3517 0 : libndr_flags _flags_save_UNION = ndr->flags;
3518 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
3519 0 : level = ndr_print_steal_switch_value(ndr, r);
3520 0 : ndr_print_union(ndr, name, level, "spoolss_PrinterInfo");
3521 0 : switch (level) {
3522 0 : case 0:
3523 0 : ndr_print_spoolss_PrinterInfo0(ndr, "info0", &r->info0);
3524 0 : break;
3525 :
3526 0 : case 1:
3527 0 : ndr_print_spoolss_PrinterInfo1(ndr, "info1", &r->info1);
3528 0 : break;
3529 :
3530 0 : case 2:
3531 0 : ndr_print_spoolss_PrinterInfo2(ndr, "info2", &r->info2);
3532 0 : break;
3533 :
3534 0 : case 3:
3535 0 : ndr_print_spoolss_PrinterInfo3(ndr, "info3", &r->info3);
3536 0 : break;
3537 :
3538 0 : case 4:
3539 0 : ndr_print_spoolss_PrinterInfo4(ndr, "info4", &r->info4);
3540 0 : break;
3541 :
3542 0 : case 5:
3543 0 : ndr_print_spoolss_PrinterInfo5(ndr, "info5", &r->info5);
3544 0 : break;
3545 :
3546 0 : case 6:
3547 0 : ndr_print_spoolss_PrinterInfo6(ndr, "info6", &r->info6);
3548 0 : break;
3549 :
3550 0 : case 7:
3551 0 : ndr_print_spoolss_PrinterInfo7(ndr, "info7", &r->info7);
3552 0 : break;
3553 :
3554 0 : case 8:
3555 0 : ndr_print_spoolss_DeviceModeInfo(ndr, "info8", &r->info8);
3556 0 : break;
3557 :
3558 0 : case 9:
3559 0 : ndr_print_spoolss_DeviceModeInfo(ndr, "info9", &r->info9);
3560 0 : break;
3561 :
3562 0 : default:
3563 0 : break;
3564 :
3565 : }
3566 0 : ndr->flags = _flags_save_UNION;
3567 : }
3568 0 : }
3569 :
3570 3480 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo(const union spoolss_PrinterInfo *r, uint32_t level, libndr_flags flags)
3571 : {
3572 3480 : flags |= LIBNDR_FLAG_RELATIVE_REVERSE;
3573 3480 : return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo);
3574 : }
3575 :
3576 1668 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DevmodeContainer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DevmodeContainer *r)
3577 : {
3578 1668 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3579 1668 : if (ndr_flags & NDR_SCALARS) {
3580 1668 : NDR_CHECK(ndr_push_align(ndr, 5));
3581 1668 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_spoolss_DeviceMode(r->devmode, ndr->flags)));
3582 1668 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->devmode));
3583 1668 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3584 : }
3585 1668 : if (ndr_flags & NDR_BUFFERS) {
3586 1668 : if (r->devmode) {
3587 : {
3588 0 : struct ndr_push *_ndr_devmode;
3589 312 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 4, _ndr_size_spoolss_DeviceMode(r->devmode, ndr->flags)));
3590 312 : NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
3591 312 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 4, _ndr_size_spoolss_DeviceMode(r->devmode, ndr->flags)));
3592 : }
3593 : }
3594 : }
3595 1668 : return NDR_ERR_SUCCESS;
3596 : }
3597 :
3598 1688 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DevmodeContainer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DevmodeContainer *r)
3599 : {
3600 20 : uint32_t _ptr_devmode;
3601 1688 : TALLOC_CTX *_mem_save_devmode_0 = NULL;
3602 1688 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3603 1688 : if (ndr_flags & NDR_SCALARS) {
3604 1688 : NDR_CHECK(ndr_pull_align(ndr, 5));
3605 1688 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
3606 1688 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
3607 1688 : if (_ptr_devmode) {
3608 316 : NDR_PULL_ALLOC(ndr, r->devmode);
3609 : } else {
3610 1372 : r->devmode = NULL;
3611 : }
3612 1688 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3613 : }
3614 1688 : if (ndr_flags & NDR_BUFFERS) {
3615 1688 : if (r->devmode) {
3616 316 : _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
3617 316 : NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
3618 : {
3619 4 : struct ndr_pull *_ndr_devmode;
3620 316 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 4, r->_ndr_size));
3621 316 : NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
3622 316 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 4, r->_ndr_size));
3623 : }
3624 316 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
3625 : }
3626 : }
3627 1668 : return NDR_ERR_SUCCESS;
3628 : }
3629 :
3630 0 : static void ndr_print_flags_spoolss_DevmodeContainer(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DevmodeContainer *r)
3631 : {
3632 0 : ndr_print_spoolss_DevmodeContainer(ndr, name, r);
3633 0 : }
3634 :
3635 20 : _PUBLIC_ void ndr_print_spoolss_DevmodeContainer(struct ndr_print *ndr, const char *name, const struct spoolss_DevmodeContainer *r)
3636 : {
3637 20 : ndr_print_struct(ndr, name, "spoolss_DevmodeContainer");
3638 20 : if (r == NULL) { ndr_print_null(ndr); return; }
3639 20 : ndr->depth++;
3640 20 : ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?_ndr_size_spoolss_DeviceMode(r->devmode, ndr->flags):r->_ndr_size);
3641 20 : ndr_print_ptr(ndr, "devmode", r->devmode);
3642 20 : ndr->depth++;
3643 20 : if (r->devmode) {
3644 4 : ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
3645 : }
3646 20 : ndr->depth--;
3647 20 : ndr->depth--;
3648 : }
3649 :
3650 960 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_JobInfo1 *r)
3651 : {
3652 960 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3653 960 : if (ndr_flags & NDR_SCALARS) {
3654 480 : NDR_CHECK(ndr_push_align(ndr, 5));
3655 480 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
3656 : {
3657 480 : libndr_flags _flags_save_string = ndr->flags;
3658 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3659 480 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printer_name));
3660 480 : ndr->flags = _flags_save_string;
3661 : }
3662 : {
3663 480 : libndr_flags _flags_save_string = ndr->flags;
3664 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3665 480 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->server_name));
3666 480 : ndr->flags = _flags_save_string;
3667 : }
3668 : {
3669 480 : libndr_flags _flags_save_string = ndr->flags;
3670 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3671 480 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->user_name));
3672 480 : ndr->flags = _flags_save_string;
3673 : }
3674 : {
3675 480 : libndr_flags _flags_save_string = ndr->flags;
3676 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3677 480 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->document_name));
3678 480 : ndr->flags = _flags_save_string;
3679 : }
3680 : {
3681 480 : libndr_flags _flags_save_string = ndr->flags;
3682 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3683 480 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_type));
3684 480 : ndr->flags = _flags_save_string;
3685 : }
3686 : {
3687 480 : libndr_flags _flags_save_string = ndr->flags;
3688 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3689 480 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->text_status));
3690 480 : ndr->flags = _flags_save_string;
3691 : }
3692 480 : NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
3693 480 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
3694 480 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
3695 480 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
3696 480 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
3697 480 : NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
3698 480 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3699 : }
3700 960 : if (ndr_flags & NDR_BUFFERS) {
3701 : {
3702 480 : libndr_flags _flags_save_string = ndr->flags;
3703 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3704 480 : if (r->printer_name) {
3705 480 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printer_name));
3706 480 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printer_name));
3707 480 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printer_name));
3708 : }
3709 480 : ndr->flags = _flags_save_string;
3710 : }
3711 : {
3712 480 : libndr_flags _flags_save_string = ndr->flags;
3713 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3714 480 : if (r->server_name) {
3715 480 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->server_name));
3716 480 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server_name));
3717 480 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->server_name));
3718 : }
3719 480 : ndr->flags = _flags_save_string;
3720 : }
3721 : {
3722 480 : libndr_flags _flags_save_string = ndr->flags;
3723 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3724 480 : if (r->user_name) {
3725 480 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->user_name));
3726 480 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
3727 480 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->user_name));
3728 : }
3729 480 : ndr->flags = _flags_save_string;
3730 : }
3731 : {
3732 480 : libndr_flags _flags_save_string = ndr->flags;
3733 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3734 480 : if (r->document_name) {
3735 480 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->document_name));
3736 480 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->document_name));
3737 480 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->document_name));
3738 : }
3739 480 : ndr->flags = _flags_save_string;
3740 : }
3741 : {
3742 480 : libndr_flags _flags_save_string = ndr->flags;
3743 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3744 480 : if (r->data_type) {
3745 480 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_type));
3746 480 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_type));
3747 480 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_type));
3748 : }
3749 480 : ndr->flags = _flags_save_string;
3750 : }
3751 : {
3752 480 : libndr_flags _flags_save_string = ndr->flags;
3753 480 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3754 480 : if (r->text_status) {
3755 480 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->text_status));
3756 480 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->text_status));
3757 480 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->text_status));
3758 : }
3759 480 : ndr->flags = _flags_save_string;
3760 : }
3761 : }
3762 960 : return NDR_ERR_SUCCESS;
3763 : }
3764 :
3765 320 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_JobInfo1 *r)
3766 : {
3767 0 : uint32_t _ptr_printer_name;
3768 320 : TALLOC_CTX *_mem_save_printer_name_0 = NULL;
3769 0 : uint32_t _ptr_server_name;
3770 320 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
3771 0 : uint32_t _ptr_user_name;
3772 320 : TALLOC_CTX *_mem_save_user_name_0 = NULL;
3773 0 : uint32_t _ptr_document_name;
3774 320 : TALLOC_CTX *_mem_save_document_name_0 = NULL;
3775 0 : uint32_t _ptr_data_type;
3776 320 : TALLOC_CTX *_mem_save_data_type_0 = NULL;
3777 0 : uint32_t _ptr_text_status;
3778 320 : TALLOC_CTX *_mem_save_text_status_0 = NULL;
3779 320 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3780 320 : if (ndr_flags & NDR_SCALARS) {
3781 160 : NDR_CHECK(ndr_pull_align(ndr, 5));
3782 160 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
3783 : {
3784 160 : libndr_flags _flags_save_string = ndr->flags;
3785 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3786 160 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
3787 160 : if (_ptr_printer_name) {
3788 160 : NDR_PULL_ALLOC(ndr, r->printer_name);
3789 160 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printer_name, _ptr_printer_name));
3790 : } else {
3791 0 : r->printer_name = NULL;
3792 : }
3793 160 : ndr->flags = _flags_save_string;
3794 : }
3795 : {
3796 160 : libndr_flags _flags_save_string = ndr->flags;
3797 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3798 160 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
3799 160 : if (_ptr_server_name) {
3800 160 : NDR_PULL_ALLOC(ndr, r->server_name);
3801 160 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->server_name, _ptr_server_name));
3802 : } else {
3803 0 : r->server_name = NULL;
3804 : }
3805 160 : ndr->flags = _flags_save_string;
3806 : }
3807 : {
3808 160 : libndr_flags _flags_save_string = ndr->flags;
3809 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3810 160 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
3811 160 : if (_ptr_user_name) {
3812 160 : NDR_PULL_ALLOC(ndr, r->user_name);
3813 160 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->user_name, _ptr_user_name));
3814 : } else {
3815 0 : r->user_name = NULL;
3816 : }
3817 160 : ndr->flags = _flags_save_string;
3818 : }
3819 : {
3820 160 : libndr_flags _flags_save_string = ndr->flags;
3821 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3822 160 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
3823 160 : if (_ptr_document_name) {
3824 160 : NDR_PULL_ALLOC(ndr, r->document_name);
3825 160 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->document_name, _ptr_document_name));
3826 : } else {
3827 0 : r->document_name = NULL;
3828 : }
3829 160 : ndr->flags = _flags_save_string;
3830 : }
3831 : {
3832 160 : libndr_flags _flags_save_string = ndr->flags;
3833 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3834 160 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
3835 160 : if (_ptr_data_type) {
3836 160 : NDR_PULL_ALLOC(ndr, r->data_type);
3837 160 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_type, _ptr_data_type));
3838 : } else {
3839 0 : r->data_type = NULL;
3840 : }
3841 160 : ndr->flags = _flags_save_string;
3842 : }
3843 : {
3844 160 : libndr_flags _flags_save_string = ndr->flags;
3845 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3846 160 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
3847 160 : if (_ptr_text_status) {
3848 160 : NDR_PULL_ALLOC(ndr, r->text_status);
3849 160 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->text_status, _ptr_text_status));
3850 : } else {
3851 0 : r->text_status = NULL;
3852 : }
3853 160 : ndr->flags = _flags_save_string;
3854 : }
3855 160 : NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
3856 160 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
3857 160 : if (r->priority > 99) {
3858 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->priority), (uint32_t)(0), (uint32_t)(99));
3859 : }
3860 160 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
3861 160 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
3862 160 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
3863 160 : NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
3864 160 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3865 : }
3866 320 : if (ndr_flags & NDR_BUFFERS) {
3867 : {
3868 160 : libndr_flags _flags_save_string = ndr->flags;
3869 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3870 160 : if (r->printer_name) {
3871 0 : uint32_t _relative_save_offset;
3872 160 : _relative_save_offset = ndr->offset;
3873 160 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printer_name));
3874 160 : _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3875 160 : NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
3876 160 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printer_name));
3877 160 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
3878 160 : if (ndr->offset > ndr->relative_highest_offset) {
3879 76 : ndr->relative_highest_offset = ndr->offset;
3880 : }
3881 160 : ndr->offset = _relative_save_offset;
3882 : }
3883 160 : ndr->flags = _flags_save_string;
3884 : }
3885 : {
3886 160 : libndr_flags _flags_save_string = ndr->flags;
3887 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3888 160 : if (r->server_name) {
3889 0 : uint32_t _relative_save_offset;
3890 160 : _relative_save_offset = ndr->offset;
3891 160 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->server_name));
3892 160 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3893 160 : NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
3894 160 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server_name));
3895 160 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
3896 160 : if (ndr->offset > ndr->relative_highest_offset) {
3897 0 : ndr->relative_highest_offset = ndr->offset;
3898 : }
3899 160 : ndr->offset = _relative_save_offset;
3900 : }
3901 160 : ndr->flags = _flags_save_string;
3902 : }
3903 : {
3904 160 : libndr_flags _flags_save_string = ndr->flags;
3905 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3906 160 : if (r->user_name) {
3907 0 : uint32_t _relative_save_offset;
3908 160 : _relative_save_offset = ndr->offset;
3909 160 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->user_name));
3910 160 : _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3911 160 : NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
3912 160 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
3913 160 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
3914 160 : if (ndr->offset > ndr->relative_highest_offset) {
3915 0 : ndr->relative_highest_offset = ndr->offset;
3916 : }
3917 160 : ndr->offset = _relative_save_offset;
3918 : }
3919 160 : ndr->flags = _flags_save_string;
3920 : }
3921 : {
3922 160 : libndr_flags _flags_save_string = ndr->flags;
3923 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3924 160 : if (r->document_name) {
3925 0 : uint32_t _relative_save_offset;
3926 160 : _relative_save_offset = ndr->offset;
3927 160 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->document_name));
3928 160 : _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3929 160 : NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
3930 160 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->document_name));
3931 160 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
3932 160 : if (ndr->offset > ndr->relative_highest_offset) {
3933 0 : ndr->relative_highest_offset = ndr->offset;
3934 : }
3935 160 : ndr->offset = _relative_save_offset;
3936 : }
3937 160 : ndr->flags = _flags_save_string;
3938 : }
3939 : {
3940 160 : libndr_flags _flags_save_string = ndr->flags;
3941 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3942 160 : if (r->data_type) {
3943 0 : uint32_t _relative_save_offset;
3944 160 : _relative_save_offset = ndr->offset;
3945 160 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_type));
3946 160 : _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
3947 160 : NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
3948 160 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_type));
3949 160 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
3950 160 : if (ndr->offset > ndr->relative_highest_offset) {
3951 0 : ndr->relative_highest_offset = ndr->offset;
3952 : }
3953 160 : ndr->offset = _relative_save_offset;
3954 : }
3955 160 : ndr->flags = _flags_save_string;
3956 : }
3957 : {
3958 160 : libndr_flags _flags_save_string = ndr->flags;
3959 160 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3960 160 : if (r->text_status) {
3961 0 : uint32_t _relative_save_offset;
3962 160 : _relative_save_offset = ndr->offset;
3963 160 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->text_status));
3964 160 : _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
3965 160 : NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
3966 160 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->text_status));
3967 160 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
3968 160 : if (ndr->offset > ndr->relative_highest_offset) {
3969 0 : ndr->relative_highest_offset = ndr->offset;
3970 : }
3971 160 : ndr->offset = _relative_save_offset;
3972 : }
3973 160 : ndr->flags = _flags_save_string;
3974 : }
3975 : }
3976 320 : return NDR_ERR_SUCCESS;
3977 : }
3978 :
3979 0 : static void ndr_print_flags_spoolss_JobInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_JobInfo1 *r)
3980 : {
3981 0 : ndr_print_spoolss_JobInfo1(ndr, name, r);
3982 0 : }
3983 :
3984 0 : _PUBLIC_ void ndr_print_spoolss_JobInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo1 *r)
3985 : {
3986 0 : ndr_print_struct(ndr, name, "spoolss_JobInfo1");
3987 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3988 0 : ndr->depth++;
3989 0 : ndr_print_uint32(ndr, "job_id", r->job_id);
3990 : {
3991 0 : libndr_flags _flags_save_string = ndr->flags;
3992 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
3993 0 : ndr_print_ptr(ndr, "printer_name", r->printer_name);
3994 0 : ndr->depth++;
3995 0 : if (r->printer_name) {
3996 0 : ndr_print_string(ndr, "printer_name", r->printer_name);
3997 : }
3998 0 : ndr->depth--;
3999 0 : ndr->flags = _flags_save_string;
4000 : }
4001 : {
4002 0 : libndr_flags _flags_save_string = ndr->flags;
4003 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4004 0 : ndr_print_ptr(ndr, "server_name", r->server_name);
4005 0 : ndr->depth++;
4006 0 : if (r->server_name) {
4007 0 : ndr_print_string(ndr, "server_name", r->server_name);
4008 : }
4009 0 : ndr->depth--;
4010 0 : ndr->flags = _flags_save_string;
4011 : }
4012 : {
4013 0 : libndr_flags _flags_save_string = ndr->flags;
4014 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4015 0 : ndr_print_ptr(ndr, "user_name", r->user_name);
4016 0 : ndr->depth++;
4017 0 : if (r->user_name) {
4018 0 : ndr_print_string(ndr, "user_name", r->user_name);
4019 : }
4020 0 : ndr->depth--;
4021 0 : ndr->flags = _flags_save_string;
4022 : }
4023 : {
4024 0 : libndr_flags _flags_save_string = ndr->flags;
4025 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4026 0 : ndr_print_ptr(ndr, "document_name", r->document_name);
4027 0 : ndr->depth++;
4028 0 : if (r->document_name) {
4029 0 : ndr_print_string(ndr, "document_name", r->document_name);
4030 : }
4031 0 : ndr->depth--;
4032 0 : ndr->flags = _flags_save_string;
4033 : }
4034 : {
4035 0 : libndr_flags _flags_save_string = ndr->flags;
4036 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4037 0 : ndr_print_ptr(ndr, "data_type", r->data_type);
4038 0 : ndr->depth++;
4039 0 : if (r->data_type) {
4040 0 : ndr_print_string(ndr, "data_type", r->data_type);
4041 : }
4042 0 : ndr->depth--;
4043 0 : ndr->flags = _flags_save_string;
4044 : }
4045 : {
4046 0 : libndr_flags _flags_save_string = ndr->flags;
4047 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4048 0 : ndr_print_ptr(ndr, "text_status", r->text_status);
4049 0 : ndr->depth++;
4050 0 : if (r->text_status) {
4051 0 : ndr_print_string(ndr, "text_status", r->text_status);
4052 : }
4053 0 : ndr->depth--;
4054 0 : ndr->flags = _flags_save_string;
4055 : }
4056 0 : ndr_print_spoolss_JobStatus(ndr, "status", r->status);
4057 0 : ndr_print_uint32(ndr, "priority", r->priority);
4058 0 : ndr_print_uint32(ndr, "position", r->position);
4059 0 : ndr_print_uint32(ndr, "total_pages", r->total_pages);
4060 0 : ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
4061 0 : ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
4062 0 : ndr->depth--;
4063 : }
4064 :
4065 0 : _PUBLIC_ size_t ndr_size_spoolss_JobInfo1(const struct spoolss_JobInfo1 *r, libndr_flags flags)
4066 : {
4067 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo1);
4068 : }
4069 :
4070 204 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_JobInfo2 *r)
4071 : {
4072 204 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4073 204 : if (ndr_flags & NDR_SCALARS) {
4074 102 : NDR_CHECK(ndr_push_align(ndr, 5));
4075 102 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
4076 : {
4077 102 : libndr_flags _flags_save_string = ndr->flags;
4078 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4079 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printer_name));
4080 102 : ndr->flags = _flags_save_string;
4081 : }
4082 : {
4083 102 : libndr_flags _flags_save_string = ndr->flags;
4084 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4085 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->server_name));
4086 102 : ndr->flags = _flags_save_string;
4087 : }
4088 : {
4089 102 : libndr_flags _flags_save_string = ndr->flags;
4090 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4091 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->user_name));
4092 102 : ndr->flags = _flags_save_string;
4093 : }
4094 : {
4095 102 : libndr_flags _flags_save_string = ndr->flags;
4096 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4097 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->document_name));
4098 102 : ndr->flags = _flags_save_string;
4099 : }
4100 : {
4101 102 : libndr_flags _flags_save_string = ndr->flags;
4102 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4103 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->notify_name));
4104 102 : ndr->flags = _flags_save_string;
4105 : }
4106 : {
4107 102 : libndr_flags _flags_save_string = ndr->flags;
4108 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4109 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_type));
4110 102 : ndr->flags = _flags_save_string;
4111 : }
4112 : {
4113 102 : libndr_flags _flags_save_string = ndr->flags;
4114 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4115 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor));
4116 102 : ndr->flags = _flags_save_string;
4117 : }
4118 : {
4119 102 : libndr_flags _flags_save_string = ndr->flags;
4120 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4121 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->parameters));
4122 102 : ndr->flags = _flags_save_string;
4123 : }
4124 : {
4125 102 : libndr_flags _flags_save_string = ndr->flags;
4126 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4127 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
4128 102 : ndr->flags = _flags_save_string;
4129 : }
4130 : {
4131 102 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
4132 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4133 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
4134 102 : ndr->flags = _flags_save_spoolss_DeviceMode;
4135 : }
4136 : {
4137 102 : libndr_flags _flags_save_string = ndr->flags;
4138 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4139 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->text_status));
4140 102 : ndr->flags = _flags_save_string;
4141 : }
4142 : {
4143 102 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
4144 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4145 102 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
4146 102 : ndr->flags = _flags_save_spoolss_security_descriptor;
4147 : }
4148 102 : NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
4149 102 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
4150 102 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
4151 102 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
4152 102 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
4153 102 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
4154 102 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
4155 102 : NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
4156 102 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
4157 102 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
4158 102 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4159 : }
4160 204 : if (ndr_flags & NDR_BUFFERS) {
4161 : {
4162 102 : libndr_flags _flags_save_string = ndr->flags;
4163 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4164 102 : if (r->printer_name) {
4165 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printer_name));
4166 102 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printer_name));
4167 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printer_name));
4168 : }
4169 102 : ndr->flags = _flags_save_string;
4170 : }
4171 : {
4172 102 : libndr_flags _flags_save_string = ndr->flags;
4173 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4174 102 : if (r->server_name) {
4175 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->server_name));
4176 102 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server_name));
4177 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->server_name));
4178 : }
4179 102 : ndr->flags = _flags_save_string;
4180 : }
4181 : {
4182 102 : libndr_flags _flags_save_string = ndr->flags;
4183 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4184 102 : if (r->user_name) {
4185 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->user_name));
4186 102 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
4187 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->user_name));
4188 : }
4189 102 : ndr->flags = _flags_save_string;
4190 : }
4191 : {
4192 102 : libndr_flags _flags_save_string = ndr->flags;
4193 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4194 102 : if (r->document_name) {
4195 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->document_name));
4196 102 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->document_name));
4197 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->document_name));
4198 : }
4199 102 : ndr->flags = _flags_save_string;
4200 : }
4201 : {
4202 102 : libndr_flags _flags_save_string = ndr->flags;
4203 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4204 102 : if (r->notify_name) {
4205 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->notify_name));
4206 102 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->notify_name));
4207 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->notify_name));
4208 : }
4209 102 : ndr->flags = _flags_save_string;
4210 : }
4211 : {
4212 102 : libndr_flags _flags_save_string = ndr->flags;
4213 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4214 102 : if (r->data_type) {
4215 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_type));
4216 102 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_type));
4217 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_type));
4218 : }
4219 102 : ndr->flags = _flags_save_string;
4220 : }
4221 : {
4222 102 : libndr_flags _flags_save_string = ndr->flags;
4223 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4224 102 : if (r->print_processor) {
4225 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->print_processor));
4226 102 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->print_processor));
4227 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->print_processor));
4228 : }
4229 102 : ndr->flags = _flags_save_string;
4230 : }
4231 : {
4232 102 : libndr_flags _flags_save_string = ndr->flags;
4233 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4234 102 : if (r->parameters) {
4235 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->parameters));
4236 102 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->parameters));
4237 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->parameters));
4238 : }
4239 102 : ndr->flags = _flags_save_string;
4240 : }
4241 : {
4242 102 : libndr_flags _flags_save_string = ndr->flags;
4243 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4244 102 : if (r->driver_name) {
4245 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
4246 102 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
4247 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
4248 : }
4249 102 : ndr->flags = _flags_save_string;
4250 : }
4251 : {
4252 102 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
4253 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4254 102 : if (r->devmode) {
4255 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->devmode));
4256 : {
4257 0 : struct ndr_push *_ndr_devmode;
4258 102 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
4259 102 : NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
4260 102 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
4261 : }
4262 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->devmode));
4263 : }
4264 102 : ndr->flags = _flags_save_spoolss_DeviceMode;
4265 : }
4266 : {
4267 102 : libndr_flags _flags_save_string = ndr->flags;
4268 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4269 102 : if (r->text_status) {
4270 102 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->text_status));
4271 102 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->text_status));
4272 102 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->text_status));
4273 : }
4274 102 : ndr->flags = _flags_save_string;
4275 : }
4276 : {
4277 102 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
4278 102 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4279 102 : if (r->secdesc) {
4280 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->secdesc));
4281 : {
4282 0 : struct ndr_push *_ndr_secdesc;
4283 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
4284 0 : NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
4285 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
4286 : }
4287 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->secdesc));
4288 : }
4289 102 : ndr->flags = _flags_save_spoolss_security_descriptor;
4290 : }
4291 : }
4292 204 : return NDR_ERR_SUCCESS;
4293 : }
4294 :
4295 68 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_JobInfo2 *r)
4296 : {
4297 0 : uint32_t _ptr_printer_name;
4298 68 : TALLOC_CTX *_mem_save_printer_name_0 = NULL;
4299 0 : uint32_t _ptr_server_name;
4300 68 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
4301 0 : uint32_t _ptr_user_name;
4302 68 : TALLOC_CTX *_mem_save_user_name_0 = NULL;
4303 0 : uint32_t _ptr_document_name;
4304 68 : TALLOC_CTX *_mem_save_document_name_0 = NULL;
4305 0 : uint32_t _ptr_notify_name;
4306 68 : TALLOC_CTX *_mem_save_notify_name_0 = NULL;
4307 0 : uint32_t _ptr_data_type;
4308 68 : TALLOC_CTX *_mem_save_data_type_0 = NULL;
4309 0 : uint32_t _ptr_print_processor;
4310 68 : TALLOC_CTX *_mem_save_print_processor_0 = NULL;
4311 0 : uint32_t _ptr_parameters;
4312 68 : TALLOC_CTX *_mem_save_parameters_0 = NULL;
4313 0 : uint32_t _ptr_driver_name;
4314 68 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
4315 0 : uint32_t _ptr_devmode;
4316 68 : TALLOC_CTX *_mem_save_devmode_0 = NULL;
4317 0 : uint32_t _ptr_text_status;
4318 68 : TALLOC_CTX *_mem_save_text_status_0 = NULL;
4319 0 : uint32_t _ptr_secdesc;
4320 68 : TALLOC_CTX *_mem_save_secdesc_0 = NULL;
4321 68 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4322 68 : if (ndr_flags & NDR_SCALARS) {
4323 34 : NDR_CHECK(ndr_pull_align(ndr, 5));
4324 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
4325 : {
4326 34 : libndr_flags _flags_save_string = ndr->flags;
4327 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4328 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
4329 34 : if (_ptr_printer_name) {
4330 34 : NDR_PULL_ALLOC(ndr, r->printer_name);
4331 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printer_name, _ptr_printer_name));
4332 : } else {
4333 0 : r->printer_name = NULL;
4334 : }
4335 34 : ndr->flags = _flags_save_string;
4336 : }
4337 : {
4338 34 : libndr_flags _flags_save_string = ndr->flags;
4339 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4340 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
4341 34 : if (_ptr_server_name) {
4342 34 : NDR_PULL_ALLOC(ndr, r->server_name);
4343 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->server_name, _ptr_server_name));
4344 : } else {
4345 0 : r->server_name = NULL;
4346 : }
4347 34 : ndr->flags = _flags_save_string;
4348 : }
4349 : {
4350 34 : libndr_flags _flags_save_string = ndr->flags;
4351 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4352 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
4353 34 : if (_ptr_user_name) {
4354 34 : NDR_PULL_ALLOC(ndr, r->user_name);
4355 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->user_name, _ptr_user_name));
4356 : } else {
4357 0 : r->user_name = NULL;
4358 : }
4359 34 : ndr->flags = _flags_save_string;
4360 : }
4361 : {
4362 34 : libndr_flags _flags_save_string = ndr->flags;
4363 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4364 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
4365 34 : if (_ptr_document_name) {
4366 34 : NDR_PULL_ALLOC(ndr, r->document_name);
4367 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->document_name, _ptr_document_name));
4368 : } else {
4369 0 : r->document_name = NULL;
4370 : }
4371 34 : ndr->flags = _flags_save_string;
4372 : }
4373 : {
4374 34 : libndr_flags _flags_save_string = ndr->flags;
4375 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4376 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
4377 34 : if (_ptr_notify_name) {
4378 34 : NDR_PULL_ALLOC(ndr, r->notify_name);
4379 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->notify_name, _ptr_notify_name));
4380 : } else {
4381 0 : r->notify_name = NULL;
4382 : }
4383 34 : ndr->flags = _flags_save_string;
4384 : }
4385 : {
4386 34 : libndr_flags _flags_save_string = ndr->flags;
4387 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4388 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
4389 34 : if (_ptr_data_type) {
4390 34 : NDR_PULL_ALLOC(ndr, r->data_type);
4391 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_type, _ptr_data_type));
4392 : } else {
4393 0 : r->data_type = NULL;
4394 : }
4395 34 : ndr->flags = _flags_save_string;
4396 : }
4397 : {
4398 34 : libndr_flags _flags_save_string = ndr->flags;
4399 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4400 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
4401 34 : if (_ptr_print_processor) {
4402 34 : NDR_PULL_ALLOC(ndr, r->print_processor);
4403 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->print_processor, _ptr_print_processor));
4404 : } else {
4405 0 : r->print_processor = NULL;
4406 : }
4407 34 : ndr->flags = _flags_save_string;
4408 : }
4409 : {
4410 34 : libndr_flags _flags_save_string = ndr->flags;
4411 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4412 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
4413 34 : if (_ptr_parameters) {
4414 34 : NDR_PULL_ALLOC(ndr, r->parameters);
4415 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->parameters, _ptr_parameters));
4416 : } else {
4417 0 : r->parameters = NULL;
4418 : }
4419 34 : ndr->flags = _flags_save_string;
4420 : }
4421 : {
4422 34 : libndr_flags _flags_save_string = ndr->flags;
4423 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4424 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
4425 34 : if (_ptr_driver_name) {
4426 34 : NDR_PULL_ALLOC(ndr, r->driver_name);
4427 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
4428 : } else {
4429 0 : r->driver_name = NULL;
4430 : }
4431 34 : ndr->flags = _flags_save_string;
4432 : }
4433 : {
4434 34 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
4435 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4436 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
4437 34 : if (_ptr_devmode) {
4438 34 : NDR_PULL_ALLOC(ndr, r->devmode);
4439 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
4440 : } else {
4441 0 : r->devmode = NULL;
4442 : }
4443 34 : ndr->flags = _flags_save_spoolss_DeviceMode;
4444 : }
4445 : {
4446 34 : libndr_flags _flags_save_string = ndr->flags;
4447 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4448 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
4449 34 : if (_ptr_text_status) {
4450 34 : NDR_PULL_ALLOC(ndr, r->text_status);
4451 34 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->text_status, _ptr_text_status));
4452 : } else {
4453 0 : r->text_status = NULL;
4454 : }
4455 34 : ndr->flags = _flags_save_string;
4456 : }
4457 : {
4458 34 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
4459 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4460 34 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
4461 34 : if (_ptr_secdesc) {
4462 0 : NDR_PULL_ALLOC(ndr, r->secdesc);
4463 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
4464 : } else {
4465 34 : r->secdesc = NULL;
4466 : }
4467 34 : ndr->flags = _flags_save_spoolss_security_descriptor;
4468 : }
4469 34 : NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
4470 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
4471 34 : if (r->priority > 99) {
4472 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->priority), (uint32_t)(0), (uint32_t)(99));
4473 : }
4474 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
4475 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
4476 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
4477 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
4478 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
4479 34 : NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
4480 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
4481 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
4482 34 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4483 : }
4484 68 : if (ndr_flags & NDR_BUFFERS) {
4485 : {
4486 34 : libndr_flags _flags_save_string = ndr->flags;
4487 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4488 34 : if (r->printer_name) {
4489 0 : uint32_t _relative_save_offset;
4490 34 : _relative_save_offset = ndr->offset;
4491 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printer_name));
4492 34 : _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4493 34 : NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
4494 34 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printer_name));
4495 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
4496 34 : if (ndr->offset > ndr->relative_highest_offset) {
4497 6 : ndr->relative_highest_offset = ndr->offset;
4498 : }
4499 34 : ndr->offset = _relative_save_offset;
4500 : }
4501 34 : ndr->flags = _flags_save_string;
4502 : }
4503 : {
4504 34 : libndr_flags _flags_save_string = ndr->flags;
4505 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4506 34 : if (r->server_name) {
4507 0 : uint32_t _relative_save_offset;
4508 34 : _relative_save_offset = ndr->offset;
4509 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->server_name));
4510 34 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4511 34 : NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
4512 34 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server_name));
4513 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
4514 34 : if (ndr->offset > ndr->relative_highest_offset) {
4515 0 : ndr->relative_highest_offset = ndr->offset;
4516 : }
4517 34 : ndr->offset = _relative_save_offset;
4518 : }
4519 34 : ndr->flags = _flags_save_string;
4520 : }
4521 : {
4522 34 : libndr_flags _flags_save_string = ndr->flags;
4523 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4524 34 : if (r->user_name) {
4525 0 : uint32_t _relative_save_offset;
4526 34 : _relative_save_offset = ndr->offset;
4527 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->user_name));
4528 34 : _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4529 34 : NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
4530 34 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
4531 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
4532 34 : if (ndr->offset > ndr->relative_highest_offset) {
4533 0 : ndr->relative_highest_offset = ndr->offset;
4534 : }
4535 34 : ndr->offset = _relative_save_offset;
4536 : }
4537 34 : ndr->flags = _flags_save_string;
4538 : }
4539 : {
4540 34 : libndr_flags _flags_save_string = ndr->flags;
4541 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4542 34 : if (r->document_name) {
4543 0 : uint32_t _relative_save_offset;
4544 34 : _relative_save_offset = ndr->offset;
4545 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->document_name));
4546 34 : _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4547 34 : NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
4548 34 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->document_name));
4549 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
4550 34 : if (ndr->offset > ndr->relative_highest_offset) {
4551 0 : ndr->relative_highest_offset = ndr->offset;
4552 : }
4553 34 : ndr->offset = _relative_save_offset;
4554 : }
4555 34 : ndr->flags = _flags_save_string;
4556 : }
4557 : {
4558 34 : libndr_flags _flags_save_string = ndr->flags;
4559 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4560 34 : if (r->notify_name) {
4561 0 : uint32_t _relative_save_offset;
4562 34 : _relative_save_offset = ndr->offset;
4563 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->notify_name));
4564 34 : _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4565 34 : NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
4566 34 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->notify_name));
4567 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
4568 34 : if (ndr->offset > ndr->relative_highest_offset) {
4569 0 : ndr->relative_highest_offset = ndr->offset;
4570 : }
4571 34 : ndr->offset = _relative_save_offset;
4572 : }
4573 34 : ndr->flags = _flags_save_string;
4574 : }
4575 : {
4576 34 : libndr_flags _flags_save_string = ndr->flags;
4577 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4578 34 : if (r->data_type) {
4579 0 : uint32_t _relative_save_offset;
4580 34 : _relative_save_offset = ndr->offset;
4581 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_type));
4582 34 : _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
4583 34 : NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
4584 34 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_type));
4585 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
4586 34 : if (ndr->offset > ndr->relative_highest_offset) {
4587 0 : ndr->relative_highest_offset = ndr->offset;
4588 : }
4589 34 : ndr->offset = _relative_save_offset;
4590 : }
4591 34 : ndr->flags = _flags_save_string;
4592 : }
4593 : {
4594 34 : libndr_flags _flags_save_string = ndr->flags;
4595 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4596 34 : if (r->print_processor) {
4597 0 : uint32_t _relative_save_offset;
4598 34 : _relative_save_offset = ndr->offset;
4599 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->print_processor));
4600 34 : _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
4601 34 : NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
4602 34 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->print_processor));
4603 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
4604 34 : if (ndr->offset > ndr->relative_highest_offset) {
4605 0 : ndr->relative_highest_offset = ndr->offset;
4606 : }
4607 34 : ndr->offset = _relative_save_offset;
4608 : }
4609 34 : ndr->flags = _flags_save_string;
4610 : }
4611 : {
4612 34 : libndr_flags _flags_save_string = ndr->flags;
4613 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4614 34 : if (r->parameters) {
4615 0 : uint32_t _relative_save_offset;
4616 34 : _relative_save_offset = ndr->offset;
4617 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->parameters));
4618 34 : _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
4619 34 : NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
4620 34 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->parameters));
4621 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
4622 34 : if (ndr->offset > ndr->relative_highest_offset) {
4623 0 : ndr->relative_highest_offset = ndr->offset;
4624 : }
4625 34 : ndr->offset = _relative_save_offset;
4626 : }
4627 34 : ndr->flags = _flags_save_string;
4628 : }
4629 : {
4630 34 : libndr_flags _flags_save_string = ndr->flags;
4631 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4632 34 : if (r->driver_name) {
4633 0 : uint32_t _relative_save_offset;
4634 34 : _relative_save_offset = ndr->offset;
4635 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
4636 34 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4637 34 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
4638 34 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
4639 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
4640 34 : if (ndr->offset > ndr->relative_highest_offset) {
4641 0 : ndr->relative_highest_offset = ndr->offset;
4642 : }
4643 34 : ndr->offset = _relative_save_offset;
4644 : }
4645 34 : ndr->flags = _flags_save_string;
4646 : }
4647 : {
4648 34 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
4649 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4650 34 : if (r->devmode) {
4651 0 : uint32_t _relative_save_offset;
4652 34 : _relative_save_offset = ndr->offset;
4653 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
4654 34 : _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
4655 34 : NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
4656 : {
4657 0 : struct ndr_pull *_ndr_devmode;
4658 34 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
4659 34 : NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
4660 34 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
4661 : }
4662 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
4663 34 : if (ndr->offset > ndr->relative_highest_offset) {
4664 0 : ndr->relative_highest_offset = ndr->offset;
4665 : }
4666 34 : ndr->offset = _relative_save_offset;
4667 : }
4668 34 : ndr->flags = _flags_save_spoolss_DeviceMode;
4669 : }
4670 : {
4671 34 : libndr_flags _flags_save_string = ndr->flags;
4672 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4673 34 : if (r->text_status) {
4674 0 : uint32_t _relative_save_offset;
4675 34 : _relative_save_offset = ndr->offset;
4676 34 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->text_status));
4677 34 : _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
4678 34 : NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
4679 34 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->text_status));
4680 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
4681 34 : if (ndr->offset > ndr->relative_highest_offset) {
4682 0 : ndr->relative_highest_offset = ndr->offset;
4683 : }
4684 34 : ndr->offset = _relative_save_offset;
4685 : }
4686 34 : ndr->flags = _flags_save_string;
4687 : }
4688 : {
4689 34 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
4690 34 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4691 34 : if (r->secdesc) {
4692 0 : uint32_t _relative_save_offset;
4693 0 : _relative_save_offset = ndr->offset;
4694 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
4695 0 : _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
4696 0 : NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
4697 : {
4698 0 : struct ndr_pull *_ndr_secdesc;
4699 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
4700 0 : NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
4701 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
4702 : }
4703 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
4704 0 : if (ndr->offset > ndr->relative_highest_offset) {
4705 0 : ndr->relative_highest_offset = ndr->offset;
4706 : }
4707 0 : ndr->offset = _relative_save_offset;
4708 : }
4709 34 : ndr->flags = _flags_save_spoolss_security_descriptor;
4710 : }
4711 : }
4712 68 : return NDR_ERR_SUCCESS;
4713 : }
4714 :
4715 0 : static void ndr_print_flags_spoolss_JobInfo2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_JobInfo2 *r)
4716 : {
4717 0 : ndr_print_spoolss_JobInfo2(ndr, name, r);
4718 0 : }
4719 :
4720 0 : _PUBLIC_ void ndr_print_spoolss_JobInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo2 *r)
4721 : {
4722 0 : ndr_print_struct(ndr, name, "spoolss_JobInfo2");
4723 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4724 0 : ndr->depth++;
4725 0 : ndr_print_uint32(ndr, "job_id", r->job_id);
4726 : {
4727 0 : libndr_flags _flags_save_string = ndr->flags;
4728 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4729 0 : ndr_print_ptr(ndr, "printer_name", r->printer_name);
4730 0 : ndr->depth++;
4731 0 : if (r->printer_name) {
4732 0 : ndr_print_string(ndr, "printer_name", r->printer_name);
4733 : }
4734 0 : ndr->depth--;
4735 0 : ndr->flags = _flags_save_string;
4736 : }
4737 : {
4738 0 : libndr_flags _flags_save_string = ndr->flags;
4739 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4740 0 : ndr_print_ptr(ndr, "server_name", r->server_name);
4741 0 : ndr->depth++;
4742 0 : if (r->server_name) {
4743 0 : ndr_print_string(ndr, "server_name", r->server_name);
4744 : }
4745 0 : ndr->depth--;
4746 0 : ndr->flags = _flags_save_string;
4747 : }
4748 : {
4749 0 : libndr_flags _flags_save_string = ndr->flags;
4750 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4751 0 : ndr_print_ptr(ndr, "user_name", r->user_name);
4752 0 : ndr->depth++;
4753 0 : if (r->user_name) {
4754 0 : ndr_print_string(ndr, "user_name", r->user_name);
4755 : }
4756 0 : ndr->depth--;
4757 0 : ndr->flags = _flags_save_string;
4758 : }
4759 : {
4760 0 : libndr_flags _flags_save_string = ndr->flags;
4761 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4762 0 : ndr_print_ptr(ndr, "document_name", r->document_name);
4763 0 : ndr->depth++;
4764 0 : if (r->document_name) {
4765 0 : ndr_print_string(ndr, "document_name", r->document_name);
4766 : }
4767 0 : ndr->depth--;
4768 0 : ndr->flags = _flags_save_string;
4769 : }
4770 : {
4771 0 : libndr_flags _flags_save_string = ndr->flags;
4772 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4773 0 : ndr_print_ptr(ndr, "notify_name", r->notify_name);
4774 0 : ndr->depth++;
4775 0 : if (r->notify_name) {
4776 0 : ndr_print_string(ndr, "notify_name", r->notify_name);
4777 : }
4778 0 : ndr->depth--;
4779 0 : ndr->flags = _flags_save_string;
4780 : }
4781 : {
4782 0 : libndr_flags _flags_save_string = ndr->flags;
4783 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4784 0 : ndr_print_ptr(ndr, "data_type", r->data_type);
4785 0 : ndr->depth++;
4786 0 : if (r->data_type) {
4787 0 : ndr_print_string(ndr, "data_type", r->data_type);
4788 : }
4789 0 : ndr->depth--;
4790 0 : ndr->flags = _flags_save_string;
4791 : }
4792 : {
4793 0 : libndr_flags _flags_save_string = ndr->flags;
4794 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4795 0 : ndr_print_ptr(ndr, "print_processor", r->print_processor);
4796 0 : ndr->depth++;
4797 0 : if (r->print_processor) {
4798 0 : ndr_print_string(ndr, "print_processor", r->print_processor);
4799 : }
4800 0 : ndr->depth--;
4801 0 : ndr->flags = _flags_save_string;
4802 : }
4803 : {
4804 0 : libndr_flags _flags_save_string = ndr->flags;
4805 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4806 0 : ndr_print_ptr(ndr, "parameters", r->parameters);
4807 0 : ndr->depth++;
4808 0 : if (r->parameters) {
4809 0 : ndr_print_string(ndr, "parameters", r->parameters);
4810 : }
4811 0 : ndr->depth--;
4812 0 : ndr->flags = _flags_save_string;
4813 : }
4814 : {
4815 0 : libndr_flags _flags_save_string = ndr->flags;
4816 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4817 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
4818 0 : ndr->depth++;
4819 0 : if (r->driver_name) {
4820 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
4821 : }
4822 0 : ndr->depth--;
4823 0 : ndr->flags = _flags_save_string;
4824 : }
4825 : {
4826 0 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
4827 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4828 0 : ndr_print_ptr(ndr, "devmode", r->devmode);
4829 0 : ndr->depth++;
4830 0 : if (r->devmode) {
4831 0 : ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
4832 : }
4833 0 : ndr->depth--;
4834 0 : ndr->flags = _flags_save_spoolss_DeviceMode;
4835 : }
4836 : {
4837 0 : libndr_flags _flags_save_string = ndr->flags;
4838 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4839 0 : ndr_print_ptr(ndr, "text_status", r->text_status);
4840 0 : ndr->depth++;
4841 0 : if (r->text_status) {
4842 0 : ndr_print_string(ndr, "text_status", r->text_status);
4843 : }
4844 0 : ndr->depth--;
4845 0 : ndr->flags = _flags_save_string;
4846 : }
4847 : {
4848 0 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
4849 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4850 0 : ndr_print_ptr(ndr, "secdesc", r->secdesc);
4851 0 : ndr->depth++;
4852 0 : if (r->secdesc) {
4853 0 : ndr_print_spoolss_security_descriptor(ndr, "secdesc", r->secdesc);
4854 : }
4855 0 : ndr->depth--;
4856 0 : ndr->flags = _flags_save_spoolss_security_descriptor;
4857 : }
4858 0 : ndr_print_spoolss_JobStatus(ndr, "status", r->status);
4859 0 : ndr_print_uint32(ndr, "priority", r->priority);
4860 0 : ndr_print_uint32(ndr, "position", r->position);
4861 0 : ndr_print_uint32(ndr, "start_time", r->start_time);
4862 0 : ndr_print_uint32(ndr, "until_time", r->until_time);
4863 0 : ndr_print_uint32(ndr, "total_pages", r->total_pages);
4864 0 : ndr_print_uint32(ndr, "size", r->size);
4865 0 : ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
4866 0 : ndr_print_uint32(ndr, "time", r->time);
4867 0 : ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
4868 0 : ndr->depth--;
4869 : }
4870 :
4871 0 : _PUBLIC_ size_t ndr_size_spoolss_JobInfo2(const struct spoolss_JobInfo2 *r, libndr_flags flags)
4872 : {
4873 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo2);
4874 : }
4875 :
4876 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_JobInfo3 *r)
4877 : {
4878 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4879 0 : if (ndr_flags & NDR_SCALARS) {
4880 0 : NDR_CHECK(ndr_push_align(ndr, 4));
4881 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
4882 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_job_id));
4883 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
4884 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4885 : }
4886 0 : if (ndr_flags & NDR_BUFFERS) {
4887 0 : }
4888 0 : return NDR_ERR_SUCCESS;
4889 : }
4890 :
4891 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_JobInfo3 *r)
4892 : {
4893 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4894 0 : if (ndr_flags & NDR_SCALARS) {
4895 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
4896 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
4897 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_job_id));
4898 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
4899 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4900 : }
4901 0 : if (ndr_flags & NDR_BUFFERS) {
4902 0 : }
4903 0 : return NDR_ERR_SUCCESS;
4904 : }
4905 :
4906 0 : static void ndr_print_flags_spoolss_JobInfo3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_JobInfo3 *r)
4907 : {
4908 0 : ndr_print_spoolss_JobInfo3(ndr, name, r);
4909 0 : }
4910 :
4911 0 : _PUBLIC_ void ndr_print_spoolss_JobInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo3 *r)
4912 : {
4913 0 : ndr_print_struct(ndr, name, "spoolss_JobInfo3");
4914 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4915 0 : ndr->depth++;
4916 0 : ndr_print_uint32(ndr, "job_id", r->job_id);
4917 0 : ndr_print_uint32(ndr, "next_job_id", r->next_job_id);
4918 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
4919 0 : ndr->depth--;
4920 : }
4921 :
4922 0 : _PUBLIC_ size_t ndr_size_spoolss_JobInfo3(const struct spoolss_JobInfo3 *r, libndr_flags flags)
4923 : {
4924 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo3);
4925 : }
4926 :
4927 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_JobInfo4 *r)
4928 : {
4929 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4930 0 : if (ndr_flags & NDR_SCALARS) {
4931 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4932 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
4933 : {
4934 0 : libndr_flags _flags_save_string = ndr->flags;
4935 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4936 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printer_name));
4937 0 : ndr->flags = _flags_save_string;
4938 : }
4939 : {
4940 0 : libndr_flags _flags_save_string = ndr->flags;
4941 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4942 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->server_name));
4943 0 : ndr->flags = _flags_save_string;
4944 : }
4945 : {
4946 0 : libndr_flags _flags_save_string = ndr->flags;
4947 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4948 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->user_name));
4949 0 : ndr->flags = _flags_save_string;
4950 : }
4951 : {
4952 0 : libndr_flags _flags_save_string = ndr->flags;
4953 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4954 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->document_name));
4955 0 : ndr->flags = _flags_save_string;
4956 : }
4957 : {
4958 0 : libndr_flags _flags_save_string = ndr->flags;
4959 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4960 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->notify_name));
4961 0 : ndr->flags = _flags_save_string;
4962 : }
4963 : {
4964 0 : libndr_flags _flags_save_string = ndr->flags;
4965 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4966 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_type));
4967 0 : ndr->flags = _flags_save_string;
4968 : }
4969 : {
4970 0 : libndr_flags _flags_save_string = ndr->flags;
4971 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4972 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor));
4973 0 : ndr->flags = _flags_save_string;
4974 : }
4975 : {
4976 0 : libndr_flags _flags_save_string = ndr->flags;
4977 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4978 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->parameters));
4979 0 : ndr->flags = _flags_save_string;
4980 : }
4981 : {
4982 0 : libndr_flags _flags_save_string = ndr->flags;
4983 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4984 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
4985 0 : ndr->flags = _flags_save_string;
4986 : }
4987 : {
4988 0 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
4989 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
4990 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
4991 0 : ndr->flags = _flags_save_spoolss_DeviceMode;
4992 : }
4993 : {
4994 0 : libndr_flags _flags_save_string = ndr->flags;
4995 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
4996 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->text_status));
4997 0 : ndr->flags = _flags_save_string;
4998 : }
4999 : {
5000 0 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
5001 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
5002 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
5003 0 : ndr->flags = _flags_save_spoolss_security_descriptor;
5004 : }
5005 0 : NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
5006 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
5007 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
5008 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
5009 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
5010 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
5011 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
5012 0 : NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
5013 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
5014 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
5015 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_high));
5016 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5017 : }
5018 0 : if (ndr_flags & NDR_BUFFERS) {
5019 : {
5020 0 : libndr_flags _flags_save_string = ndr->flags;
5021 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5022 0 : if (r->printer_name) {
5023 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printer_name));
5024 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printer_name));
5025 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printer_name));
5026 : }
5027 0 : ndr->flags = _flags_save_string;
5028 : }
5029 : {
5030 0 : libndr_flags _flags_save_string = ndr->flags;
5031 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5032 0 : if (r->server_name) {
5033 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->server_name));
5034 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server_name));
5035 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->server_name));
5036 : }
5037 0 : ndr->flags = _flags_save_string;
5038 : }
5039 : {
5040 0 : libndr_flags _flags_save_string = ndr->flags;
5041 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5042 0 : if (r->user_name) {
5043 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->user_name));
5044 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
5045 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->user_name));
5046 : }
5047 0 : ndr->flags = _flags_save_string;
5048 : }
5049 : {
5050 0 : libndr_flags _flags_save_string = ndr->flags;
5051 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5052 0 : if (r->document_name) {
5053 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->document_name));
5054 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->document_name));
5055 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->document_name));
5056 : }
5057 0 : ndr->flags = _flags_save_string;
5058 : }
5059 : {
5060 0 : libndr_flags _flags_save_string = ndr->flags;
5061 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5062 0 : if (r->notify_name) {
5063 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->notify_name));
5064 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->notify_name));
5065 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->notify_name));
5066 : }
5067 0 : ndr->flags = _flags_save_string;
5068 : }
5069 : {
5070 0 : libndr_flags _flags_save_string = ndr->flags;
5071 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5072 0 : if (r->data_type) {
5073 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_type));
5074 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_type));
5075 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_type));
5076 : }
5077 0 : ndr->flags = _flags_save_string;
5078 : }
5079 : {
5080 0 : libndr_flags _flags_save_string = ndr->flags;
5081 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5082 0 : if (r->print_processor) {
5083 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->print_processor));
5084 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->print_processor));
5085 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->print_processor));
5086 : }
5087 0 : ndr->flags = _flags_save_string;
5088 : }
5089 : {
5090 0 : libndr_flags _flags_save_string = ndr->flags;
5091 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5092 0 : if (r->parameters) {
5093 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->parameters));
5094 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->parameters));
5095 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->parameters));
5096 : }
5097 0 : ndr->flags = _flags_save_string;
5098 : }
5099 : {
5100 0 : libndr_flags _flags_save_string = ndr->flags;
5101 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5102 0 : if (r->driver_name) {
5103 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
5104 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
5105 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
5106 : }
5107 0 : ndr->flags = _flags_save_string;
5108 : }
5109 : {
5110 0 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
5111 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
5112 0 : if (r->devmode) {
5113 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->devmode));
5114 : {
5115 0 : struct ndr_push *_ndr_devmode;
5116 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
5117 0 : NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
5118 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
5119 : }
5120 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->devmode));
5121 : }
5122 0 : ndr->flags = _flags_save_spoolss_DeviceMode;
5123 : }
5124 : {
5125 0 : libndr_flags _flags_save_string = ndr->flags;
5126 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5127 0 : if (r->text_status) {
5128 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->text_status));
5129 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->text_status));
5130 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->text_status));
5131 : }
5132 0 : ndr->flags = _flags_save_string;
5133 : }
5134 : {
5135 0 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
5136 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
5137 0 : if (r->secdesc) {
5138 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->secdesc));
5139 : {
5140 0 : struct ndr_push *_ndr_secdesc;
5141 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
5142 0 : NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
5143 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
5144 : }
5145 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->secdesc));
5146 : }
5147 0 : ndr->flags = _flags_save_spoolss_security_descriptor;
5148 : }
5149 : }
5150 0 : return NDR_ERR_SUCCESS;
5151 : }
5152 :
5153 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_JobInfo4 *r)
5154 : {
5155 0 : uint32_t _ptr_printer_name;
5156 0 : TALLOC_CTX *_mem_save_printer_name_0 = NULL;
5157 0 : uint32_t _ptr_server_name;
5158 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
5159 0 : uint32_t _ptr_user_name;
5160 0 : TALLOC_CTX *_mem_save_user_name_0 = NULL;
5161 0 : uint32_t _ptr_document_name;
5162 0 : TALLOC_CTX *_mem_save_document_name_0 = NULL;
5163 0 : uint32_t _ptr_notify_name;
5164 0 : TALLOC_CTX *_mem_save_notify_name_0 = NULL;
5165 0 : uint32_t _ptr_data_type;
5166 0 : TALLOC_CTX *_mem_save_data_type_0 = NULL;
5167 0 : uint32_t _ptr_print_processor;
5168 0 : TALLOC_CTX *_mem_save_print_processor_0 = NULL;
5169 0 : uint32_t _ptr_parameters;
5170 0 : TALLOC_CTX *_mem_save_parameters_0 = NULL;
5171 0 : uint32_t _ptr_driver_name;
5172 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
5173 0 : uint32_t _ptr_devmode;
5174 0 : TALLOC_CTX *_mem_save_devmode_0 = NULL;
5175 0 : uint32_t _ptr_text_status;
5176 0 : TALLOC_CTX *_mem_save_text_status_0 = NULL;
5177 0 : uint32_t _ptr_secdesc;
5178 0 : TALLOC_CTX *_mem_save_secdesc_0 = NULL;
5179 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5180 0 : if (ndr_flags & NDR_SCALARS) {
5181 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5182 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
5183 : {
5184 0 : libndr_flags _flags_save_string = ndr->flags;
5185 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5186 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
5187 0 : if (_ptr_printer_name) {
5188 0 : NDR_PULL_ALLOC(ndr, r->printer_name);
5189 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printer_name, _ptr_printer_name));
5190 : } else {
5191 0 : r->printer_name = NULL;
5192 : }
5193 0 : ndr->flags = _flags_save_string;
5194 : }
5195 : {
5196 0 : libndr_flags _flags_save_string = ndr->flags;
5197 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5198 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
5199 0 : if (_ptr_server_name) {
5200 0 : NDR_PULL_ALLOC(ndr, r->server_name);
5201 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->server_name, _ptr_server_name));
5202 : } else {
5203 0 : r->server_name = NULL;
5204 : }
5205 0 : ndr->flags = _flags_save_string;
5206 : }
5207 : {
5208 0 : libndr_flags _flags_save_string = ndr->flags;
5209 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5210 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
5211 0 : if (_ptr_user_name) {
5212 0 : NDR_PULL_ALLOC(ndr, r->user_name);
5213 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->user_name, _ptr_user_name));
5214 : } else {
5215 0 : r->user_name = NULL;
5216 : }
5217 0 : ndr->flags = _flags_save_string;
5218 : }
5219 : {
5220 0 : libndr_flags _flags_save_string = ndr->flags;
5221 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5222 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
5223 0 : if (_ptr_document_name) {
5224 0 : NDR_PULL_ALLOC(ndr, r->document_name);
5225 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->document_name, _ptr_document_name));
5226 : } else {
5227 0 : r->document_name = NULL;
5228 : }
5229 0 : ndr->flags = _flags_save_string;
5230 : }
5231 : {
5232 0 : libndr_flags _flags_save_string = ndr->flags;
5233 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5234 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
5235 0 : if (_ptr_notify_name) {
5236 0 : NDR_PULL_ALLOC(ndr, r->notify_name);
5237 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->notify_name, _ptr_notify_name));
5238 : } else {
5239 0 : r->notify_name = NULL;
5240 : }
5241 0 : ndr->flags = _flags_save_string;
5242 : }
5243 : {
5244 0 : libndr_flags _flags_save_string = ndr->flags;
5245 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5246 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
5247 0 : if (_ptr_data_type) {
5248 0 : NDR_PULL_ALLOC(ndr, r->data_type);
5249 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_type, _ptr_data_type));
5250 : } else {
5251 0 : r->data_type = NULL;
5252 : }
5253 0 : ndr->flags = _flags_save_string;
5254 : }
5255 : {
5256 0 : libndr_flags _flags_save_string = ndr->flags;
5257 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5258 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
5259 0 : if (_ptr_print_processor) {
5260 0 : NDR_PULL_ALLOC(ndr, r->print_processor);
5261 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->print_processor, _ptr_print_processor));
5262 : } else {
5263 0 : r->print_processor = NULL;
5264 : }
5265 0 : ndr->flags = _flags_save_string;
5266 : }
5267 : {
5268 0 : libndr_flags _flags_save_string = ndr->flags;
5269 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5270 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
5271 0 : if (_ptr_parameters) {
5272 0 : NDR_PULL_ALLOC(ndr, r->parameters);
5273 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->parameters, _ptr_parameters));
5274 : } else {
5275 0 : r->parameters = NULL;
5276 : }
5277 0 : ndr->flags = _flags_save_string;
5278 : }
5279 : {
5280 0 : libndr_flags _flags_save_string = ndr->flags;
5281 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5282 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
5283 0 : if (_ptr_driver_name) {
5284 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
5285 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
5286 : } else {
5287 0 : r->driver_name = NULL;
5288 : }
5289 0 : ndr->flags = _flags_save_string;
5290 : }
5291 : {
5292 0 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
5293 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
5294 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
5295 0 : if (_ptr_devmode) {
5296 0 : NDR_PULL_ALLOC(ndr, r->devmode);
5297 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
5298 : } else {
5299 0 : r->devmode = NULL;
5300 : }
5301 0 : ndr->flags = _flags_save_spoolss_DeviceMode;
5302 : }
5303 : {
5304 0 : libndr_flags _flags_save_string = ndr->flags;
5305 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5306 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
5307 0 : if (_ptr_text_status) {
5308 0 : NDR_PULL_ALLOC(ndr, r->text_status);
5309 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->text_status, _ptr_text_status));
5310 : } else {
5311 0 : r->text_status = NULL;
5312 : }
5313 0 : ndr->flags = _flags_save_string;
5314 : }
5315 : {
5316 0 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
5317 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
5318 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
5319 0 : if (_ptr_secdesc) {
5320 0 : NDR_PULL_ALLOC(ndr, r->secdesc);
5321 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
5322 : } else {
5323 0 : r->secdesc = NULL;
5324 : }
5325 0 : ndr->flags = _flags_save_spoolss_security_descriptor;
5326 : }
5327 0 : NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
5328 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
5329 0 : if (r->priority > 99) {
5330 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->priority), (uint32_t)(0), (uint32_t)(99));
5331 : }
5332 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
5333 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
5334 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
5335 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
5336 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
5337 0 : NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
5338 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
5339 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
5340 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_high));
5341 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5342 : }
5343 0 : if (ndr_flags & NDR_BUFFERS) {
5344 : {
5345 0 : libndr_flags _flags_save_string = ndr->flags;
5346 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5347 0 : if (r->printer_name) {
5348 0 : uint32_t _relative_save_offset;
5349 0 : _relative_save_offset = ndr->offset;
5350 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printer_name));
5351 0 : _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5352 0 : NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
5353 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printer_name));
5354 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
5355 0 : if (ndr->offset > ndr->relative_highest_offset) {
5356 0 : ndr->relative_highest_offset = ndr->offset;
5357 : }
5358 0 : ndr->offset = _relative_save_offset;
5359 : }
5360 0 : ndr->flags = _flags_save_string;
5361 : }
5362 : {
5363 0 : libndr_flags _flags_save_string = ndr->flags;
5364 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5365 0 : if (r->server_name) {
5366 0 : uint32_t _relative_save_offset;
5367 0 : _relative_save_offset = ndr->offset;
5368 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->server_name));
5369 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5370 0 : NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
5371 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server_name));
5372 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
5373 0 : if (ndr->offset > ndr->relative_highest_offset) {
5374 0 : ndr->relative_highest_offset = ndr->offset;
5375 : }
5376 0 : ndr->offset = _relative_save_offset;
5377 : }
5378 0 : ndr->flags = _flags_save_string;
5379 : }
5380 : {
5381 0 : libndr_flags _flags_save_string = ndr->flags;
5382 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5383 0 : if (r->user_name) {
5384 0 : uint32_t _relative_save_offset;
5385 0 : _relative_save_offset = ndr->offset;
5386 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->user_name));
5387 0 : _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5388 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
5389 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
5390 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
5391 0 : if (ndr->offset > ndr->relative_highest_offset) {
5392 0 : ndr->relative_highest_offset = ndr->offset;
5393 : }
5394 0 : ndr->offset = _relative_save_offset;
5395 : }
5396 0 : ndr->flags = _flags_save_string;
5397 : }
5398 : {
5399 0 : libndr_flags _flags_save_string = ndr->flags;
5400 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5401 0 : if (r->document_name) {
5402 0 : uint32_t _relative_save_offset;
5403 0 : _relative_save_offset = ndr->offset;
5404 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->document_name));
5405 0 : _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5406 0 : NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
5407 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->document_name));
5408 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
5409 0 : if (ndr->offset > ndr->relative_highest_offset) {
5410 0 : ndr->relative_highest_offset = ndr->offset;
5411 : }
5412 0 : ndr->offset = _relative_save_offset;
5413 : }
5414 0 : ndr->flags = _flags_save_string;
5415 : }
5416 : {
5417 0 : libndr_flags _flags_save_string = ndr->flags;
5418 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5419 0 : if (r->notify_name) {
5420 0 : uint32_t _relative_save_offset;
5421 0 : _relative_save_offset = ndr->offset;
5422 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->notify_name));
5423 0 : _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5424 0 : NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
5425 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->notify_name));
5426 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
5427 0 : if (ndr->offset > ndr->relative_highest_offset) {
5428 0 : ndr->relative_highest_offset = ndr->offset;
5429 : }
5430 0 : ndr->offset = _relative_save_offset;
5431 : }
5432 0 : ndr->flags = _flags_save_string;
5433 : }
5434 : {
5435 0 : libndr_flags _flags_save_string = ndr->flags;
5436 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5437 0 : if (r->data_type) {
5438 0 : uint32_t _relative_save_offset;
5439 0 : _relative_save_offset = ndr->offset;
5440 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_type));
5441 0 : _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
5442 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
5443 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_type));
5444 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
5445 0 : if (ndr->offset > ndr->relative_highest_offset) {
5446 0 : ndr->relative_highest_offset = ndr->offset;
5447 : }
5448 0 : ndr->offset = _relative_save_offset;
5449 : }
5450 0 : ndr->flags = _flags_save_string;
5451 : }
5452 : {
5453 0 : libndr_flags _flags_save_string = ndr->flags;
5454 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5455 0 : if (r->print_processor) {
5456 0 : uint32_t _relative_save_offset;
5457 0 : _relative_save_offset = ndr->offset;
5458 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->print_processor));
5459 0 : _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
5460 0 : NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
5461 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->print_processor));
5462 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
5463 0 : if (ndr->offset > ndr->relative_highest_offset) {
5464 0 : ndr->relative_highest_offset = ndr->offset;
5465 : }
5466 0 : ndr->offset = _relative_save_offset;
5467 : }
5468 0 : ndr->flags = _flags_save_string;
5469 : }
5470 : {
5471 0 : libndr_flags _flags_save_string = ndr->flags;
5472 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5473 0 : if (r->parameters) {
5474 0 : uint32_t _relative_save_offset;
5475 0 : _relative_save_offset = ndr->offset;
5476 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->parameters));
5477 0 : _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
5478 0 : NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
5479 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->parameters));
5480 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
5481 0 : if (ndr->offset > ndr->relative_highest_offset) {
5482 0 : ndr->relative_highest_offset = ndr->offset;
5483 : }
5484 0 : ndr->offset = _relative_save_offset;
5485 : }
5486 0 : ndr->flags = _flags_save_string;
5487 : }
5488 : {
5489 0 : libndr_flags _flags_save_string = ndr->flags;
5490 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5491 0 : if (r->driver_name) {
5492 0 : uint32_t _relative_save_offset;
5493 0 : _relative_save_offset = ndr->offset;
5494 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
5495 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5496 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
5497 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
5498 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
5499 0 : if (ndr->offset > ndr->relative_highest_offset) {
5500 0 : ndr->relative_highest_offset = ndr->offset;
5501 : }
5502 0 : ndr->offset = _relative_save_offset;
5503 : }
5504 0 : ndr->flags = _flags_save_string;
5505 : }
5506 : {
5507 0 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
5508 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
5509 0 : if (r->devmode) {
5510 0 : uint32_t _relative_save_offset;
5511 0 : _relative_save_offset = ndr->offset;
5512 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
5513 0 : _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
5514 0 : NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
5515 : {
5516 0 : struct ndr_pull *_ndr_devmode;
5517 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
5518 0 : NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
5519 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
5520 : }
5521 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
5522 0 : if (ndr->offset > ndr->relative_highest_offset) {
5523 0 : ndr->relative_highest_offset = ndr->offset;
5524 : }
5525 0 : ndr->offset = _relative_save_offset;
5526 : }
5527 0 : ndr->flags = _flags_save_spoolss_DeviceMode;
5528 : }
5529 : {
5530 0 : libndr_flags _flags_save_string = ndr->flags;
5531 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5532 0 : if (r->text_status) {
5533 0 : uint32_t _relative_save_offset;
5534 0 : _relative_save_offset = ndr->offset;
5535 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->text_status));
5536 0 : _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
5537 0 : NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
5538 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->text_status));
5539 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
5540 0 : if (ndr->offset > ndr->relative_highest_offset) {
5541 0 : ndr->relative_highest_offset = ndr->offset;
5542 : }
5543 0 : ndr->offset = _relative_save_offset;
5544 : }
5545 0 : ndr->flags = _flags_save_string;
5546 : }
5547 : {
5548 0 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
5549 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
5550 0 : if (r->secdesc) {
5551 0 : uint32_t _relative_save_offset;
5552 0 : _relative_save_offset = ndr->offset;
5553 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
5554 0 : _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
5555 0 : NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
5556 : {
5557 0 : struct ndr_pull *_ndr_secdesc;
5558 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
5559 0 : NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
5560 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
5561 : }
5562 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
5563 0 : if (ndr->offset > ndr->relative_highest_offset) {
5564 0 : ndr->relative_highest_offset = ndr->offset;
5565 : }
5566 0 : ndr->offset = _relative_save_offset;
5567 : }
5568 0 : ndr->flags = _flags_save_spoolss_security_descriptor;
5569 : }
5570 : }
5571 0 : return NDR_ERR_SUCCESS;
5572 : }
5573 :
5574 0 : static void ndr_print_flags_spoolss_JobInfo4(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_JobInfo4 *r)
5575 : {
5576 0 : ndr_print_spoolss_JobInfo4(ndr, name, r);
5577 0 : }
5578 :
5579 0 : _PUBLIC_ void ndr_print_spoolss_JobInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo4 *r)
5580 : {
5581 0 : ndr_print_struct(ndr, name, "spoolss_JobInfo4");
5582 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5583 0 : ndr->depth++;
5584 0 : ndr_print_uint32(ndr, "job_id", r->job_id);
5585 : {
5586 0 : libndr_flags _flags_save_string = ndr->flags;
5587 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5588 0 : ndr_print_ptr(ndr, "printer_name", r->printer_name);
5589 0 : ndr->depth++;
5590 0 : if (r->printer_name) {
5591 0 : ndr_print_string(ndr, "printer_name", r->printer_name);
5592 : }
5593 0 : ndr->depth--;
5594 0 : ndr->flags = _flags_save_string;
5595 : }
5596 : {
5597 0 : libndr_flags _flags_save_string = ndr->flags;
5598 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5599 0 : ndr_print_ptr(ndr, "server_name", r->server_name);
5600 0 : ndr->depth++;
5601 0 : if (r->server_name) {
5602 0 : ndr_print_string(ndr, "server_name", r->server_name);
5603 : }
5604 0 : ndr->depth--;
5605 0 : ndr->flags = _flags_save_string;
5606 : }
5607 : {
5608 0 : libndr_flags _flags_save_string = ndr->flags;
5609 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5610 0 : ndr_print_ptr(ndr, "user_name", r->user_name);
5611 0 : ndr->depth++;
5612 0 : if (r->user_name) {
5613 0 : ndr_print_string(ndr, "user_name", r->user_name);
5614 : }
5615 0 : ndr->depth--;
5616 0 : ndr->flags = _flags_save_string;
5617 : }
5618 : {
5619 0 : libndr_flags _flags_save_string = ndr->flags;
5620 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5621 0 : ndr_print_ptr(ndr, "document_name", r->document_name);
5622 0 : ndr->depth++;
5623 0 : if (r->document_name) {
5624 0 : ndr_print_string(ndr, "document_name", r->document_name);
5625 : }
5626 0 : ndr->depth--;
5627 0 : ndr->flags = _flags_save_string;
5628 : }
5629 : {
5630 0 : libndr_flags _flags_save_string = ndr->flags;
5631 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5632 0 : ndr_print_ptr(ndr, "notify_name", r->notify_name);
5633 0 : ndr->depth++;
5634 0 : if (r->notify_name) {
5635 0 : ndr_print_string(ndr, "notify_name", r->notify_name);
5636 : }
5637 0 : ndr->depth--;
5638 0 : ndr->flags = _flags_save_string;
5639 : }
5640 : {
5641 0 : libndr_flags _flags_save_string = ndr->flags;
5642 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5643 0 : ndr_print_ptr(ndr, "data_type", r->data_type);
5644 0 : ndr->depth++;
5645 0 : if (r->data_type) {
5646 0 : ndr_print_string(ndr, "data_type", r->data_type);
5647 : }
5648 0 : ndr->depth--;
5649 0 : ndr->flags = _flags_save_string;
5650 : }
5651 : {
5652 0 : libndr_flags _flags_save_string = ndr->flags;
5653 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5654 0 : ndr_print_ptr(ndr, "print_processor", r->print_processor);
5655 0 : ndr->depth++;
5656 0 : if (r->print_processor) {
5657 0 : ndr_print_string(ndr, "print_processor", r->print_processor);
5658 : }
5659 0 : ndr->depth--;
5660 0 : ndr->flags = _flags_save_string;
5661 : }
5662 : {
5663 0 : libndr_flags _flags_save_string = ndr->flags;
5664 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5665 0 : ndr_print_ptr(ndr, "parameters", r->parameters);
5666 0 : ndr->depth++;
5667 0 : if (r->parameters) {
5668 0 : ndr_print_string(ndr, "parameters", r->parameters);
5669 : }
5670 0 : ndr->depth--;
5671 0 : ndr->flags = _flags_save_string;
5672 : }
5673 : {
5674 0 : libndr_flags _flags_save_string = ndr->flags;
5675 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5676 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
5677 0 : ndr->depth++;
5678 0 : if (r->driver_name) {
5679 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
5680 : }
5681 0 : ndr->depth--;
5682 0 : ndr->flags = _flags_save_string;
5683 : }
5684 : {
5685 0 : libndr_flags _flags_save_spoolss_DeviceMode = ndr->flags;
5686 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
5687 0 : ndr_print_ptr(ndr, "devmode", r->devmode);
5688 0 : ndr->depth++;
5689 0 : if (r->devmode) {
5690 0 : ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
5691 : }
5692 0 : ndr->depth--;
5693 0 : ndr->flags = _flags_save_spoolss_DeviceMode;
5694 : }
5695 : {
5696 0 : libndr_flags _flags_save_string = ndr->flags;
5697 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
5698 0 : ndr_print_ptr(ndr, "text_status", r->text_status);
5699 0 : ndr->depth++;
5700 0 : if (r->text_status) {
5701 0 : ndr_print_string(ndr, "text_status", r->text_status);
5702 : }
5703 0 : ndr->depth--;
5704 0 : ndr->flags = _flags_save_string;
5705 : }
5706 : {
5707 0 : libndr_flags _flags_save_spoolss_security_descriptor = ndr->flags;
5708 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
5709 0 : ndr_print_ptr(ndr, "secdesc", r->secdesc);
5710 0 : ndr->depth++;
5711 0 : if (r->secdesc) {
5712 0 : ndr_print_spoolss_security_descriptor(ndr, "secdesc", r->secdesc);
5713 : }
5714 0 : ndr->depth--;
5715 0 : ndr->flags = _flags_save_spoolss_security_descriptor;
5716 : }
5717 0 : ndr_print_spoolss_JobStatus(ndr, "status", r->status);
5718 0 : ndr_print_uint32(ndr, "priority", r->priority);
5719 0 : ndr_print_uint32(ndr, "position", r->position);
5720 0 : ndr_print_uint32(ndr, "start_time", r->start_time);
5721 0 : ndr_print_uint32(ndr, "until_time", r->until_time);
5722 0 : ndr_print_uint32(ndr, "total_pages", r->total_pages);
5723 0 : ndr_print_uint32(ndr, "size", r->size);
5724 0 : ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
5725 0 : ndr_print_uint32(ndr, "time", r->time);
5726 0 : ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
5727 0 : ndr_print_uint32(ndr, "size_high", r->size_high);
5728 0 : ndr->depth--;
5729 : }
5730 :
5731 0 : _PUBLIC_ size_t ndr_size_spoolss_JobInfo4(const struct spoolss_JobInfo4 *r, libndr_flags flags)
5732 : {
5733 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo4);
5734 : }
5735 :
5736 972 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_JobInfo *r)
5737 : {
5738 972 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
5739 0 : uint32_t level;
5740 : {
5741 972 : libndr_flags _flags_save_UNION = ndr->flags;
5742 972 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
5743 972 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5744 972 : if (ndr_flags & NDR_SCALARS) {
5745 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5746 582 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5747 582 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5748 582 : switch (level) {
5749 480 : case 1: {
5750 480 : NDR_CHECK(ndr_push_align(ndr, 5));
5751 480 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
5752 480 : NDR_CHECK(ndr_push_spoolss_JobInfo1(ndr, NDR_SCALARS, &r->info1));
5753 480 : break; }
5754 :
5755 102 : case 2: {
5756 102 : NDR_CHECK(ndr_push_align(ndr, 5));
5757 102 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
5758 102 : NDR_CHECK(ndr_push_spoolss_JobInfo2(ndr, NDR_SCALARS, &r->info2));
5759 102 : break; }
5760 :
5761 0 : case 3: {
5762 0 : NDR_CHECK(ndr_push_align(ndr, 4));
5763 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
5764 0 : NDR_CHECK(ndr_push_spoolss_JobInfo3(ndr, NDR_SCALARS, &r->info3));
5765 0 : break; }
5766 :
5767 0 : case 4: {
5768 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5769 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
5770 0 : NDR_CHECK(ndr_push_spoolss_JobInfo4(ndr, NDR_SCALARS, &r->info4));
5771 0 : break; }
5772 :
5773 0 : default: {
5774 0 : break; }
5775 :
5776 : }
5777 : }
5778 972 : if (ndr_flags & NDR_BUFFERS) {
5779 582 : if (!(ndr_flags & NDR_SCALARS)) {
5780 : /* We didn't get it above, and the token is not needed after this. */
5781 390 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5782 : }
5783 582 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
5784 582 : switch (level) {
5785 480 : case 1:
5786 480 : NDR_CHECK(ndr_push_spoolss_JobInfo1(ndr, NDR_BUFFERS, &r->info1));
5787 480 : break;
5788 :
5789 102 : case 2:
5790 102 : NDR_CHECK(ndr_push_spoolss_JobInfo2(ndr, NDR_BUFFERS, &r->info2));
5791 102 : break;
5792 :
5793 0 : case 3:
5794 0 : break;
5795 :
5796 0 : case 4:
5797 0 : NDR_CHECK(ndr_push_spoolss_JobInfo4(ndr, NDR_BUFFERS, &r->info4));
5798 0 : break;
5799 :
5800 0 : default:
5801 0 : break;
5802 :
5803 : }
5804 : }
5805 972 : ndr->flags = _flags_save_UNION;
5806 : }
5807 972 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
5808 972 : return NDR_ERR_SUCCESS;
5809 : }
5810 :
5811 324 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_JobInfo *r)
5812 : {
5813 324 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
5814 0 : uint32_t level;
5815 : {
5816 324 : libndr_flags _flags_save_UNION = ndr->flags;
5817 324 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
5818 324 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5819 324 : if (ndr_flags & NDR_SCALARS) {
5820 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5821 194 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5822 194 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5823 194 : switch (level) {
5824 160 : case 1: {
5825 160 : NDR_CHECK(ndr_pull_align(ndr, 5));
5826 160 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
5827 160 : NDR_CHECK(ndr_pull_spoolss_JobInfo1(ndr, NDR_SCALARS, &r->info1));
5828 160 : break; }
5829 :
5830 34 : case 2: {
5831 34 : NDR_CHECK(ndr_pull_align(ndr, 5));
5832 34 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
5833 34 : NDR_CHECK(ndr_pull_spoolss_JobInfo2(ndr, NDR_SCALARS, &r->info2));
5834 34 : break; }
5835 :
5836 0 : case 3: {
5837 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
5838 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
5839 0 : NDR_CHECK(ndr_pull_spoolss_JobInfo3(ndr, NDR_SCALARS, &r->info3));
5840 0 : break; }
5841 :
5842 0 : case 4: {
5843 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5844 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
5845 0 : NDR_CHECK(ndr_pull_spoolss_JobInfo4(ndr, NDR_SCALARS, &r->info4));
5846 0 : break; }
5847 :
5848 0 : default: {
5849 0 : break; }
5850 :
5851 : }
5852 : }
5853 324 : if (ndr_flags & NDR_BUFFERS) {
5854 194 : if (!(ndr_flags & NDR_SCALARS)) {
5855 : /* We didn't get it above, and the token is not needed after this. */
5856 130 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5857 : }
5858 194 : switch (level) {
5859 160 : case 1:
5860 160 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
5861 160 : NDR_CHECK(ndr_pull_spoolss_JobInfo1(ndr, NDR_BUFFERS, &r->info1));
5862 160 : break;
5863 :
5864 34 : case 2:
5865 34 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
5866 34 : NDR_CHECK(ndr_pull_spoolss_JobInfo2(ndr, NDR_BUFFERS, &r->info2));
5867 34 : break;
5868 :
5869 0 : case 3:
5870 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
5871 0 : break;
5872 :
5873 0 : case 4:
5874 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
5875 0 : NDR_CHECK(ndr_pull_spoolss_JobInfo4(ndr, NDR_BUFFERS, &r->info4));
5876 0 : break;
5877 :
5878 0 : default:
5879 0 : break;
5880 :
5881 : }
5882 : }
5883 324 : ndr->flags = _flags_save_UNION;
5884 : }
5885 324 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
5886 324 : return NDR_ERR_SUCCESS;
5887 : }
5888 :
5889 0 : _PUBLIC_ void ndr_print_spoolss_JobInfo(struct ndr_print *ndr, const char *name, const union spoolss_JobInfo *r)
5890 : {
5891 0 : uint32_t level;
5892 : {
5893 0 : libndr_flags _flags_save_UNION = ndr->flags;
5894 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
5895 0 : level = ndr_print_steal_switch_value(ndr, r);
5896 0 : ndr_print_union(ndr, name, level, "spoolss_JobInfo");
5897 0 : switch (level) {
5898 0 : case 1:
5899 0 : ndr_print_spoolss_JobInfo1(ndr, "info1", &r->info1);
5900 0 : break;
5901 :
5902 0 : case 2:
5903 0 : ndr_print_spoolss_JobInfo2(ndr, "info2", &r->info2);
5904 0 : break;
5905 :
5906 0 : case 3:
5907 0 : ndr_print_spoolss_JobInfo3(ndr, "info3", &r->info3);
5908 0 : break;
5909 :
5910 0 : case 4:
5911 0 : ndr_print_spoolss_JobInfo4(ndr, "info4", &r->info4);
5912 0 : break;
5913 :
5914 0 : default:
5915 0 : break;
5916 :
5917 : }
5918 0 : ndr->flags = _flags_save_UNION;
5919 : }
5920 0 : }
5921 :
5922 128 : _PUBLIC_ size_t ndr_size_spoolss_JobInfo(const union spoolss_JobInfo *r, uint32_t level, libndr_flags flags)
5923 : {
5924 128 : flags |= LIBNDR_FLAG_RELATIVE_REVERSE;
5925 128 : return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo);
5926 : }
5927 :
5928 32 : static enum ndr_err_code ndr_push_spoolss_SetJobInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetJobInfo1 *r)
5929 : {
5930 32 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5931 32 : if (ndr_flags & NDR_SCALARS) {
5932 32 : NDR_CHECK(ndr_push_align(ndr, 5));
5933 32 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
5934 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->printer_name));
5935 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
5936 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
5937 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
5938 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_type));
5939 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->text_status));
5940 32 : NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
5941 32 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
5942 32 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
5943 32 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
5944 32 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
5945 32 : NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
5946 32 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5947 : }
5948 32 : if (ndr_flags & NDR_BUFFERS) {
5949 32 : if (r->printer_name) {
5950 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
5951 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5952 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
5953 32 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printer_name, ndr_charset_length(r->printer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5954 : }
5955 32 : if (r->server_name) {
5956 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
5957 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5958 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
5959 32 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5960 : }
5961 32 : if (r->user_name) {
5962 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
5963 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5964 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
5965 32 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5966 : }
5967 32 : if (r->document_name) {
5968 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
5969 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5970 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
5971 32 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5972 : }
5973 32 : if (r->data_type) {
5974 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
5975 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5976 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
5977 32 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_type, ndr_charset_length(r->data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5978 : }
5979 32 : if (r->text_status) {
5980 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
5981 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5982 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
5983 32 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->text_status, ndr_charset_length(r->text_status, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5984 : }
5985 : }
5986 32 : return NDR_ERR_SUCCESS;
5987 : }
5988 :
5989 32 : static enum ndr_err_code ndr_pull_spoolss_SetJobInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetJobInfo1 *r)
5990 : {
5991 0 : uint32_t _ptr_printer_name;
5992 32 : uint32_t size_printer_name_1 = 0;
5993 32 : uint32_t length_printer_name_1 = 0;
5994 32 : TALLOC_CTX *_mem_save_printer_name_0 = NULL;
5995 0 : uint32_t _ptr_server_name;
5996 32 : uint32_t size_server_name_1 = 0;
5997 32 : uint32_t length_server_name_1 = 0;
5998 32 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
5999 0 : uint32_t _ptr_user_name;
6000 32 : uint32_t size_user_name_1 = 0;
6001 32 : uint32_t length_user_name_1 = 0;
6002 32 : TALLOC_CTX *_mem_save_user_name_0 = NULL;
6003 0 : uint32_t _ptr_document_name;
6004 32 : uint32_t size_document_name_1 = 0;
6005 32 : uint32_t length_document_name_1 = 0;
6006 32 : TALLOC_CTX *_mem_save_document_name_0 = NULL;
6007 0 : uint32_t _ptr_data_type;
6008 32 : uint32_t size_data_type_1 = 0;
6009 32 : uint32_t length_data_type_1 = 0;
6010 32 : TALLOC_CTX *_mem_save_data_type_0 = NULL;
6011 0 : uint32_t _ptr_text_status;
6012 32 : uint32_t size_text_status_1 = 0;
6013 32 : uint32_t length_text_status_1 = 0;
6014 32 : TALLOC_CTX *_mem_save_text_status_0 = NULL;
6015 32 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6016 32 : if (ndr_flags & NDR_SCALARS) {
6017 32 : NDR_CHECK(ndr_pull_align(ndr, 5));
6018 32 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
6019 32 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
6020 32 : if (_ptr_printer_name) {
6021 32 : NDR_PULL_ALLOC(ndr, r->printer_name);
6022 : } else {
6023 0 : r->printer_name = NULL;
6024 : }
6025 32 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6026 32 : if (_ptr_server_name) {
6027 32 : NDR_PULL_ALLOC(ndr, r->server_name);
6028 : } else {
6029 0 : r->server_name = NULL;
6030 : }
6031 32 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
6032 32 : if (_ptr_user_name) {
6033 32 : NDR_PULL_ALLOC(ndr, r->user_name);
6034 : } else {
6035 0 : r->user_name = NULL;
6036 : }
6037 32 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
6038 32 : if (_ptr_document_name) {
6039 32 : NDR_PULL_ALLOC(ndr, r->document_name);
6040 : } else {
6041 0 : r->document_name = NULL;
6042 : }
6043 32 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
6044 32 : if (_ptr_data_type) {
6045 32 : NDR_PULL_ALLOC(ndr, r->data_type);
6046 : } else {
6047 0 : r->data_type = NULL;
6048 : }
6049 32 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
6050 32 : if (_ptr_text_status) {
6051 32 : NDR_PULL_ALLOC(ndr, r->text_status);
6052 : } else {
6053 0 : r->text_status = NULL;
6054 : }
6055 32 : NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
6056 32 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
6057 32 : if (r->priority > 99) {
6058 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->priority), (uint32_t)(0), (uint32_t)(99));
6059 : }
6060 32 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
6061 32 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
6062 32 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
6063 32 : NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
6064 32 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6065 : }
6066 32 : if (ndr_flags & NDR_BUFFERS) {
6067 32 : if (r->printer_name) {
6068 32 : _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6069 32 : NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
6070 32 : NDR_CHECK(ndr_pull_array_size(ndr, &r->printer_name));
6071 32 : NDR_CHECK(ndr_pull_array_length(ndr, &r->printer_name));
6072 32 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printer_name, &size_printer_name_1));
6073 32 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printer_name, &length_printer_name_1));
6074 32 : if (length_printer_name_1 > size_printer_name_1) {
6075 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printer_name_1, length_printer_name_1);
6076 : }
6077 32 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printer_name_1, sizeof(uint16_t)));
6078 32 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printer_name, length_printer_name_1, sizeof(uint16_t), CH_UTF16));
6079 32 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
6080 : }
6081 32 : if (r->server_name) {
6082 32 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6083 32 : NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6084 32 : NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6085 32 : NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6086 32 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
6087 32 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
6088 32 : if (length_server_name_1 > size_server_name_1) {
6089 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
6090 : }
6091 32 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6092 32 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6093 32 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6094 : }
6095 32 : if (r->user_name) {
6096 32 : _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6097 32 : NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
6098 32 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
6099 32 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
6100 32 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user_name, &size_user_name_1));
6101 32 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user_name, &length_user_name_1));
6102 32 : if (length_user_name_1 > size_user_name_1) {
6103 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_name_1, length_user_name_1);
6104 : }
6105 32 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_name_1, sizeof(uint16_t)));
6106 32 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, length_user_name_1, sizeof(uint16_t), CH_UTF16));
6107 32 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
6108 : }
6109 32 : if (r->document_name) {
6110 32 : _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6111 32 : NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
6112 32 : NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
6113 32 : NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
6114 32 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->document_name, &size_document_name_1));
6115 32 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->document_name, &length_document_name_1));
6116 32 : if (length_document_name_1 > size_document_name_1) {
6117 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_document_name_1, length_document_name_1);
6118 : }
6119 32 : NDR_CHECK(ndr_check_string_terminator(ndr, length_document_name_1, sizeof(uint16_t)));
6120 32 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, length_document_name_1, sizeof(uint16_t), CH_UTF16));
6121 32 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
6122 : }
6123 32 : if (r->data_type) {
6124 32 : _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
6125 32 : NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
6126 32 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data_type));
6127 32 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data_type));
6128 32 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_type, &size_data_type_1));
6129 32 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_type, &length_data_type_1));
6130 32 : if (length_data_type_1 > size_data_type_1) {
6131 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_type_1, length_data_type_1);
6132 : }
6133 32 : NDR_CHECK(ndr_check_string_terminator(ndr, length_data_type_1, sizeof(uint16_t)));
6134 32 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_type, length_data_type_1, sizeof(uint16_t), CH_UTF16));
6135 32 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
6136 : }
6137 32 : if (r->text_status) {
6138 32 : _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
6139 32 : NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
6140 32 : NDR_CHECK(ndr_pull_array_size(ndr, &r->text_status));
6141 32 : NDR_CHECK(ndr_pull_array_length(ndr, &r->text_status));
6142 32 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->text_status, &size_text_status_1));
6143 32 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->text_status, &length_text_status_1));
6144 32 : if (length_text_status_1 > size_text_status_1) {
6145 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_text_status_1, length_text_status_1);
6146 : }
6147 32 : NDR_CHECK(ndr_check_string_terminator(ndr, length_text_status_1, sizeof(uint16_t)));
6148 32 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->text_status, length_text_status_1, sizeof(uint16_t), CH_UTF16));
6149 32 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
6150 : }
6151 : }
6152 32 : return NDR_ERR_SUCCESS;
6153 : }
6154 :
6155 0 : _PUBLIC_ void ndr_print_spoolss_SetJobInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_SetJobInfo1 *r)
6156 : {
6157 0 : ndr_print_struct(ndr, name, "spoolss_SetJobInfo1");
6158 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6159 0 : ndr->depth++;
6160 0 : ndr_print_uint32(ndr, "job_id", r->job_id);
6161 0 : ndr_print_ptr(ndr, "printer_name", r->printer_name);
6162 0 : ndr->depth++;
6163 0 : if (r->printer_name) {
6164 0 : ndr_print_string(ndr, "printer_name", r->printer_name);
6165 : }
6166 0 : ndr->depth--;
6167 0 : ndr_print_ptr(ndr, "server_name", r->server_name);
6168 0 : ndr->depth++;
6169 0 : if (r->server_name) {
6170 0 : ndr_print_string(ndr, "server_name", r->server_name);
6171 : }
6172 0 : ndr->depth--;
6173 0 : ndr_print_ptr(ndr, "user_name", r->user_name);
6174 0 : ndr->depth++;
6175 0 : if (r->user_name) {
6176 0 : ndr_print_string(ndr, "user_name", r->user_name);
6177 : }
6178 0 : ndr->depth--;
6179 0 : ndr_print_ptr(ndr, "document_name", r->document_name);
6180 0 : ndr->depth++;
6181 0 : if (r->document_name) {
6182 0 : ndr_print_string(ndr, "document_name", r->document_name);
6183 : }
6184 0 : ndr->depth--;
6185 0 : ndr_print_ptr(ndr, "data_type", r->data_type);
6186 0 : ndr->depth++;
6187 0 : if (r->data_type) {
6188 0 : ndr_print_string(ndr, "data_type", r->data_type);
6189 : }
6190 0 : ndr->depth--;
6191 0 : ndr_print_ptr(ndr, "text_status", r->text_status);
6192 0 : ndr->depth++;
6193 0 : if (r->text_status) {
6194 0 : ndr_print_string(ndr, "text_status", r->text_status);
6195 : }
6196 0 : ndr->depth--;
6197 0 : ndr_print_spoolss_JobStatus(ndr, "status", r->status);
6198 0 : ndr_print_uint32(ndr, "priority", r->priority);
6199 0 : ndr_print_uint32(ndr, "position", r->position);
6200 0 : ndr_print_uint32(ndr, "total_pages", r->total_pages);
6201 0 : ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
6202 0 : ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
6203 0 : ndr->depth--;
6204 : }
6205 :
6206 0 : static enum ndr_err_code ndr_push_spoolss_SetJobInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetJobInfo2 *r)
6207 : {
6208 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6209 0 : if (ndr_flags & NDR_SCALARS) {
6210 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6211 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
6212 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->printer_name));
6213 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6214 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
6215 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
6216 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->notify_name));
6217 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_type));
6218 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->print_processor));
6219 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->parameters));
6220 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
6221 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->_devmode_ptr));
6222 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->text_status));
6223 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->_secdesc_ptr));
6224 0 : NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
6225 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
6226 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
6227 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
6228 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
6229 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
6230 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
6231 0 : NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
6232 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
6233 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
6234 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6235 : }
6236 0 : if (ndr_flags & NDR_BUFFERS) {
6237 0 : if (r->printer_name) {
6238 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
6239 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6240 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
6241 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printer_name, ndr_charset_length(r->printer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6242 : }
6243 0 : if (r->server_name) {
6244 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6245 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6246 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6247 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6248 : }
6249 0 : if (r->user_name) {
6250 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
6251 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6252 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
6253 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6254 : }
6255 0 : if (r->document_name) {
6256 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
6257 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6258 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
6259 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6260 : }
6261 0 : if (r->notify_name) {
6262 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
6263 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6264 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
6265 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->notify_name, ndr_charset_length(r->notify_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6266 : }
6267 0 : if (r->data_type) {
6268 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
6269 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6270 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
6271 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_type, ndr_charset_length(r->data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6272 : }
6273 0 : if (r->print_processor) {
6274 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
6275 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6276 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
6277 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->print_processor, ndr_charset_length(r->print_processor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6278 : }
6279 0 : if (r->parameters) {
6280 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
6281 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6282 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
6283 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->parameters, ndr_charset_length(r->parameters, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6284 : }
6285 0 : if (r->driver_name) {
6286 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
6287 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6288 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
6289 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6290 : }
6291 0 : if (r->text_status) {
6292 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
6293 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6294 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
6295 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->text_status, ndr_charset_length(r->text_status, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6296 : }
6297 : }
6298 0 : return NDR_ERR_SUCCESS;
6299 : }
6300 :
6301 0 : static enum ndr_err_code ndr_pull_spoolss_SetJobInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetJobInfo2 *r)
6302 : {
6303 0 : uint32_t _ptr_printer_name;
6304 0 : uint32_t size_printer_name_1 = 0;
6305 0 : uint32_t length_printer_name_1 = 0;
6306 0 : TALLOC_CTX *_mem_save_printer_name_0 = NULL;
6307 0 : uint32_t _ptr_server_name;
6308 0 : uint32_t size_server_name_1 = 0;
6309 0 : uint32_t length_server_name_1 = 0;
6310 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
6311 0 : uint32_t _ptr_user_name;
6312 0 : uint32_t size_user_name_1 = 0;
6313 0 : uint32_t length_user_name_1 = 0;
6314 0 : TALLOC_CTX *_mem_save_user_name_0 = NULL;
6315 0 : uint32_t _ptr_document_name;
6316 0 : uint32_t size_document_name_1 = 0;
6317 0 : uint32_t length_document_name_1 = 0;
6318 0 : TALLOC_CTX *_mem_save_document_name_0 = NULL;
6319 0 : uint32_t _ptr_notify_name;
6320 0 : uint32_t size_notify_name_1 = 0;
6321 0 : uint32_t length_notify_name_1 = 0;
6322 0 : TALLOC_CTX *_mem_save_notify_name_0 = NULL;
6323 0 : uint32_t _ptr_data_type;
6324 0 : uint32_t size_data_type_1 = 0;
6325 0 : uint32_t length_data_type_1 = 0;
6326 0 : TALLOC_CTX *_mem_save_data_type_0 = NULL;
6327 0 : uint32_t _ptr_print_processor;
6328 0 : uint32_t size_print_processor_1 = 0;
6329 0 : uint32_t length_print_processor_1 = 0;
6330 0 : TALLOC_CTX *_mem_save_print_processor_0 = NULL;
6331 0 : uint32_t _ptr_parameters;
6332 0 : uint32_t size_parameters_1 = 0;
6333 0 : uint32_t length_parameters_1 = 0;
6334 0 : TALLOC_CTX *_mem_save_parameters_0 = NULL;
6335 0 : uint32_t _ptr_driver_name;
6336 0 : uint32_t size_driver_name_1 = 0;
6337 0 : uint32_t length_driver_name_1 = 0;
6338 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
6339 0 : uint32_t _ptr_text_status;
6340 0 : uint32_t size_text_status_1 = 0;
6341 0 : uint32_t length_text_status_1 = 0;
6342 0 : TALLOC_CTX *_mem_save_text_status_0 = NULL;
6343 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6344 0 : if (ndr_flags & NDR_SCALARS) {
6345 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6346 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
6347 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
6348 0 : if (_ptr_printer_name) {
6349 0 : NDR_PULL_ALLOC(ndr, r->printer_name);
6350 : } else {
6351 0 : r->printer_name = NULL;
6352 : }
6353 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6354 0 : if (_ptr_server_name) {
6355 0 : NDR_PULL_ALLOC(ndr, r->server_name);
6356 : } else {
6357 0 : r->server_name = NULL;
6358 : }
6359 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
6360 0 : if (_ptr_user_name) {
6361 0 : NDR_PULL_ALLOC(ndr, r->user_name);
6362 : } else {
6363 0 : r->user_name = NULL;
6364 : }
6365 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
6366 0 : if (_ptr_document_name) {
6367 0 : NDR_PULL_ALLOC(ndr, r->document_name);
6368 : } else {
6369 0 : r->document_name = NULL;
6370 : }
6371 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
6372 0 : if (_ptr_notify_name) {
6373 0 : NDR_PULL_ALLOC(ndr, r->notify_name);
6374 : } else {
6375 0 : r->notify_name = NULL;
6376 : }
6377 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
6378 0 : if (_ptr_data_type) {
6379 0 : NDR_PULL_ALLOC(ndr, r->data_type);
6380 : } else {
6381 0 : r->data_type = NULL;
6382 : }
6383 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
6384 0 : if (_ptr_print_processor) {
6385 0 : NDR_PULL_ALLOC(ndr, r->print_processor);
6386 : } else {
6387 0 : r->print_processor = NULL;
6388 : }
6389 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
6390 0 : if (_ptr_parameters) {
6391 0 : NDR_PULL_ALLOC(ndr, r->parameters);
6392 : } else {
6393 0 : r->parameters = NULL;
6394 : }
6395 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
6396 0 : if (_ptr_driver_name) {
6397 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
6398 : } else {
6399 0 : r->driver_name = NULL;
6400 : }
6401 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->_devmode_ptr));
6402 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
6403 0 : if (_ptr_text_status) {
6404 0 : NDR_PULL_ALLOC(ndr, r->text_status);
6405 : } else {
6406 0 : r->text_status = NULL;
6407 : }
6408 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->_secdesc_ptr));
6409 0 : NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
6410 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
6411 0 : if (r->priority > 99) {
6412 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->priority), (uint32_t)(0), (uint32_t)(99));
6413 : }
6414 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
6415 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
6416 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
6417 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
6418 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
6419 0 : NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
6420 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
6421 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
6422 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6423 : }
6424 0 : if (ndr_flags & NDR_BUFFERS) {
6425 0 : if (r->printer_name) {
6426 0 : _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6427 0 : NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
6428 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->printer_name));
6429 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->printer_name));
6430 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printer_name, &size_printer_name_1));
6431 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printer_name, &length_printer_name_1));
6432 0 : if (length_printer_name_1 > size_printer_name_1) {
6433 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printer_name_1, length_printer_name_1);
6434 : }
6435 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printer_name_1, sizeof(uint16_t)));
6436 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printer_name, length_printer_name_1, sizeof(uint16_t), CH_UTF16));
6437 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
6438 : }
6439 0 : if (r->server_name) {
6440 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6441 0 : NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6442 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6443 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6444 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
6445 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
6446 0 : if (length_server_name_1 > size_server_name_1) {
6447 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
6448 : }
6449 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6450 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6451 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6452 : }
6453 0 : if (r->user_name) {
6454 0 : _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6455 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
6456 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
6457 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
6458 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user_name, &size_user_name_1));
6459 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user_name, &length_user_name_1));
6460 0 : if (length_user_name_1 > size_user_name_1) {
6461 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_name_1, length_user_name_1);
6462 : }
6463 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_name_1, sizeof(uint16_t)));
6464 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, length_user_name_1, sizeof(uint16_t), CH_UTF16));
6465 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
6466 : }
6467 0 : if (r->document_name) {
6468 0 : _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6469 0 : NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
6470 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
6471 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
6472 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->document_name, &size_document_name_1));
6473 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->document_name, &length_document_name_1));
6474 0 : if (length_document_name_1 > size_document_name_1) {
6475 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_document_name_1, length_document_name_1);
6476 : }
6477 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_document_name_1, sizeof(uint16_t)));
6478 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, length_document_name_1, sizeof(uint16_t), CH_UTF16));
6479 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
6480 : }
6481 0 : if (r->notify_name) {
6482 0 : _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6483 0 : NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
6484 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->notify_name));
6485 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->notify_name));
6486 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->notify_name, &size_notify_name_1));
6487 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->notify_name, &length_notify_name_1));
6488 0 : if (length_notify_name_1 > size_notify_name_1) {
6489 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_notify_name_1, length_notify_name_1);
6490 : }
6491 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_notify_name_1, sizeof(uint16_t)));
6492 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->notify_name, length_notify_name_1, sizeof(uint16_t), CH_UTF16));
6493 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
6494 : }
6495 0 : if (r->data_type) {
6496 0 : _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
6497 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
6498 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data_type));
6499 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data_type));
6500 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_type, &size_data_type_1));
6501 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_type, &length_data_type_1));
6502 0 : if (length_data_type_1 > size_data_type_1) {
6503 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_type_1, length_data_type_1);
6504 : }
6505 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_data_type_1, sizeof(uint16_t)));
6506 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_type, length_data_type_1, sizeof(uint16_t), CH_UTF16));
6507 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
6508 : }
6509 0 : if (r->print_processor) {
6510 0 : _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
6511 0 : NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
6512 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->print_processor));
6513 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->print_processor));
6514 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->print_processor, &size_print_processor_1));
6515 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->print_processor, &length_print_processor_1));
6516 0 : if (length_print_processor_1 > size_print_processor_1) {
6517 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_print_processor_1, length_print_processor_1);
6518 : }
6519 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_print_processor_1, sizeof(uint16_t)));
6520 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->print_processor, length_print_processor_1, sizeof(uint16_t), CH_UTF16));
6521 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
6522 : }
6523 0 : if (r->parameters) {
6524 0 : _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
6525 0 : NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
6526 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->parameters));
6527 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->parameters));
6528 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->parameters, &size_parameters_1));
6529 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->parameters, &length_parameters_1));
6530 0 : if (length_parameters_1 > size_parameters_1) {
6531 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_parameters_1, length_parameters_1);
6532 : }
6533 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_parameters_1, sizeof(uint16_t)));
6534 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->parameters, length_parameters_1, sizeof(uint16_t), CH_UTF16));
6535 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
6536 : }
6537 0 : if (r->driver_name) {
6538 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6539 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
6540 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
6541 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
6542 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_name, &size_driver_name_1));
6543 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_name, &length_driver_name_1));
6544 0 : if (length_driver_name_1 > size_driver_name_1) {
6545 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_name_1, length_driver_name_1);
6546 : }
6547 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_name_1, sizeof(uint16_t)));
6548 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, length_driver_name_1, sizeof(uint16_t), CH_UTF16));
6549 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
6550 : }
6551 0 : if (r->text_status) {
6552 0 : _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
6553 0 : NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
6554 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->text_status));
6555 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->text_status));
6556 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->text_status, &size_text_status_1));
6557 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->text_status, &length_text_status_1));
6558 0 : if (length_text_status_1 > size_text_status_1) {
6559 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_text_status_1, length_text_status_1);
6560 : }
6561 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_text_status_1, sizeof(uint16_t)));
6562 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->text_status, length_text_status_1, sizeof(uint16_t), CH_UTF16));
6563 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
6564 : }
6565 : }
6566 0 : return NDR_ERR_SUCCESS;
6567 : }
6568 :
6569 0 : _PUBLIC_ void ndr_print_spoolss_SetJobInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_SetJobInfo2 *r)
6570 : {
6571 0 : ndr_print_struct(ndr, name, "spoolss_SetJobInfo2");
6572 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6573 0 : ndr->depth++;
6574 0 : ndr_print_uint32(ndr, "job_id", r->job_id);
6575 0 : ndr_print_ptr(ndr, "printer_name", r->printer_name);
6576 0 : ndr->depth++;
6577 0 : if (r->printer_name) {
6578 0 : ndr_print_string(ndr, "printer_name", r->printer_name);
6579 : }
6580 0 : ndr->depth--;
6581 0 : ndr_print_ptr(ndr, "server_name", r->server_name);
6582 0 : ndr->depth++;
6583 0 : if (r->server_name) {
6584 0 : ndr_print_string(ndr, "server_name", r->server_name);
6585 : }
6586 0 : ndr->depth--;
6587 0 : ndr_print_ptr(ndr, "user_name", r->user_name);
6588 0 : ndr->depth++;
6589 0 : if (r->user_name) {
6590 0 : ndr_print_string(ndr, "user_name", r->user_name);
6591 : }
6592 0 : ndr->depth--;
6593 0 : ndr_print_ptr(ndr, "document_name", r->document_name);
6594 0 : ndr->depth++;
6595 0 : if (r->document_name) {
6596 0 : ndr_print_string(ndr, "document_name", r->document_name);
6597 : }
6598 0 : ndr->depth--;
6599 0 : ndr_print_ptr(ndr, "notify_name", r->notify_name);
6600 0 : ndr->depth++;
6601 0 : if (r->notify_name) {
6602 0 : ndr_print_string(ndr, "notify_name", r->notify_name);
6603 : }
6604 0 : ndr->depth--;
6605 0 : ndr_print_ptr(ndr, "data_type", r->data_type);
6606 0 : ndr->depth++;
6607 0 : if (r->data_type) {
6608 0 : ndr_print_string(ndr, "data_type", r->data_type);
6609 : }
6610 0 : ndr->depth--;
6611 0 : ndr_print_ptr(ndr, "print_processor", r->print_processor);
6612 0 : ndr->depth++;
6613 0 : if (r->print_processor) {
6614 0 : ndr_print_string(ndr, "print_processor", r->print_processor);
6615 : }
6616 0 : ndr->depth--;
6617 0 : ndr_print_ptr(ndr, "parameters", r->parameters);
6618 0 : ndr->depth++;
6619 0 : if (r->parameters) {
6620 0 : ndr_print_string(ndr, "parameters", r->parameters);
6621 : }
6622 0 : ndr->depth--;
6623 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
6624 0 : ndr->depth++;
6625 0 : if (r->driver_name) {
6626 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
6627 : }
6628 0 : ndr->depth--;
6629 0 : ndr_print_uint3264(ndr, "_devmode_ptr", r->_devmode_ptr);
6630 0 : ndr_print_ptr(ndr, "text_status", r->text_status);
6631 0 : ndr->depth++;
6632 0 : if (r->text_status) {
6633 0 : ndr_print_string(ndr, "text_status", r->text_status);
6634 : }
6635 0 : ndr->depth--;
6636 0 : ndr_print_uint3264(ndr, "_secdesc_ptr", r->_secdesc_ptr);
6637 0 : ndr_print_spoolss_JobStatus(ndr, "status", r->status);
6638 0 : ndr_print_uint32(ndr, "priority", r->priority);
6639 0 : ndr_print_uint32(ndr, "position", r->position);
6640 0 : ndr_print_uint32(ndr, "start_time", r->start_time);
6641 0 : ndr_print_uint32(ndr, "until_time", r->until_time);
6642 0 : ndr_print_uint32(ndr, "total_pages", r->total_pages);
6643 0 : ndr_print_uint32(ndr, "size", r->size);
6644 0 : ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
6645 0 : ndr_print_uint32(ndr, "time", r->time);
6646 0 : ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
6647 0 : ndr->depth--;
6648 : }
6649 :
6650 0 : static enum ndr_err_code ndr_push_spoolss_SetJobInfo4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetJobInfo4 *r)
6651 : {
6652 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6653 0 : if (ndr_flags & NDR_SCALARS) {
6654 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6655 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
6656 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->printer_name));
6657 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6658 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
6659 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
6660 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->notify_name));
6661 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_type));
6662 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->print_processor));
6663 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->parameters));
6664 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
6665 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->_devmode_ptr));
6666 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->text_status));
6667 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->_secdesc_ptr));
6668 0 : NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
6669 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
6670 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
6671 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
6672 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
6673 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
6674 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
6675 0 : NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
6676 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
6677 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
6678 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_high));
6679 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6680 : }
6681 0 : if (ndr_flags & NDR_BUFFERS) {
6682 0 : if (r->printer_name) {
6683 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
6684 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6685 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
6686 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printer_name, ndr_charset_length(r->printer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6687 : }
6688 0 : if (r->server_name) {
6689 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6690 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6691 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6692 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6693 : }
6694 0 : if (r->user_name) {
6695 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
6696 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6697 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
6698 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6699 : }
6700 0 : if (r->document_name) {
6701 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
6702 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6703 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
6704 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6705 : }
6706 0 : if (r->notify_name) {
6707 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
6708 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6709 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
6710 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->notify_name, ndr_charset_length(r->notify_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6711 : }
6712 0 : if (r->data_type) {
6713 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
6714 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6715 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
6716 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_type, ndr_charset_length(r->data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6717 : }
6718 0 : if (r->print_processor) {
6719 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
6720 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6721 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
6722 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->print_processor, ndr_charset_length(r->print_processor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6723 : }
6724 0 : if (r->parameters) {
6725 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
6726 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6727 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
6728 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->parameters, ndr_charset_length(r->parameters, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6729 : }
6730 0 : if (r->driver_name) {
6731 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
6732 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6733 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
6734 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6735 : }
6736 0 : if (r->text_status) {
6737 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
6738 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6739 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
6740 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->text_status, ndr_charset_length(r->text_status, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6741 : }
6742 : }
6743 0 : return NDR_ERR_SUCCESS;
6744 : }
6745 :
6746 0 : static enum ndr_err_code ndr_pull_spoolss_SetJobInfo4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetJobInfo4 *r)
6747 : {
6748 0 : uint32_t _ptr_printer_name;
6749 0 : uint32_t size_printer_name_1 = 0;
6750 0 : uint32_t length_printer_name_1 = 0;
6751 0 : TALLOC_CTX *_mem_save_printer_name_0 = NULL;
6752 0 : uint32_t _ptr_server_name;
6753 0 : uint32_t size_server_name_1 = 0;
6754 0 : uint32_t length_server_name_1 = 0;
6755 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
6756 0 : uint32_t _ptr_user_name;
6757 0 : uint32_t size_user_name_1 = 0;
6758 0 : uint32_t length_user_name_1 = 0;
6759 0 : TALLOC_CTX *_mem_save_user_name_0 = NULL;
6760 0 : uint32_t _ptr_document_name;
6761 0 : uint32_t size_document_name_1 = 0;
6762 0 : uint32_t length_document_name_1 = 0;
6763 0 : TALLOC_CTX *_mem_save_document_name_0 = NULL;
6764 0 : uint32_t _ptr_notify_name;
6765 0 : uint32_t size_notify_name_1 = 0;
6766 0 : uint32_t length_notify_name_1 = 0;
6767 0 : TALLOC_CTX *_mem_save_notify_name_0 = NULL;
6768 0 : uint32_t _ptr_data_type;
6769 0 : uint32_t size_data_type_1 = 0;
6770 0 : uint32_t length_data_type_1 = 0;
6771 0 : TALLOC_CTX *_mem_save_data_type_0 = NULL;
6772 0 : uint32_t _ptr_print_processor;
6773 0 : uint32_t size_print_processor_1 = 0;
6774 0 : uint32_t length_print_processor_1 = 0;
6775 0 : TALLOC_CTX *_mem_save_print_processor_0 = NULL;
6776 0 : uint32_t _ptr_parameters;
6777 0 : uint32_t size_parameters_1 = 0;
6778 0 : uint32_t length_parameters_1 = 0;
6779 0 : TALLOC_CTX *_mem_save_parameters_0 = NULL;
6780 0 : uint32_t _ptr_driver_name;
6781 0 : uint32_t size_driver_name_1 = 0;
6782 0 : uint32_t length_driver_name_1 = 0;
6783 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
6784 0 : uint32_t _ptr_text_status;
6785 0 : uint32_t size_text_status_1 = 0;
6786 0 : uint32_t length_text_status_1 = 0;
6787 0 : TALLOC_CTX *_mem_save_text_status_0 = NULL;
6788 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6789 0 : if (ndr_flags & NDR_SCALARS) {
6790 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6791 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
6792 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
6793 0 : if (_ptr_printer_name) {
6794 0 : NDR_PULL_ALLOC(ndr, r->printer_name);
6795 : } else {
6796 0 : r->printer_name = NULL;
6797 : }
6798 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6799 0 : if (_ptr_server_name) {
6800 0 : NDR_PULL_ALLOC(ndr, r->server_name);
6801 : } else {
6802 0 : r->server_name = NULL;
6803 : }
6804 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
6805 0 : if (_ptr_user_name) {
6806 0 : NDR_PULL_ALLOC(ndr, r->user_name);
6807 : } else {
6808 0 : r->user_name = NULL;
6809 : }
6810 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
6811 0 : if (_ptr_document_name) {
6812 0 : NDR_PULL_ALLOC(ndr, r->document_name);
6813 : } else {
6814 0 : r->document_name = NULL;
6815 : }
6816 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
6817 0 : if (_ptr_notify_name) {
6818 0 : NDR_PULL_ALLOC(ndr, r->notify_name);
6819 : } else {
6820 0 : r->notify_name = NULL;
6821 : }
6822 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
6823 0 : if (_ptr_data_type) {
6824 0 : NDR_PULL_ALLOC(ndr, r->data_type);
6825 : } else {
6826 0 : r->data_type = NULL;
6827 : }
6828 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
6829 0 : if (_ptr_print_processor) {
6830 0 : NDR_PULL_ALLOC(ndr, r->print_processor);
6831 : } else {
6832 0 : r->print_processor = NULL;
6833 : }
6834 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
6835 0 : if (_ptr_parameters) {
6836 0 : NDR_PULL_ALLOC(ndr, r->parameters);
6837 : } else {
6838 0 : r->parameters = NULL;
6839 : }
6840 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
6841 0 : if (_ptr_driver_name) {
6842 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
6843 : } else {
6844 0 : r->driver_name = NULL;
6845 : }
6846 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->_devmode_ptr));
6847 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
6848 0 : if (_ptr_text_status) {
6849 0 : NDR_PULL_ALLOC(ndr, r->text_status);
6850 : } else {
6851 0 : r->text_status = NULL;
6852 : }
6853 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->_secdesc_ptr));
6854 0 : NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
6855 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
6856 0 : if (r->priority > 99) {
6857 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->priority), (uint32_t)(0), (uint32_t)(99));
6858 : }
6859 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
6860 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
6861 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
6862 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
6863 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
6864 0 : NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
6865 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
6866 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
6867 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_high));
6868 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6869 : }
6870 0 : if (ndr_flags & NDR_BUFFERS) {
6871 0 : if (r->printer_name) {
6872 0 : _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6873 0 : NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
6874 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->printer_name));
6875 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->printer_name));
6876 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printer_name, &size_printer_name_1));
6877 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printer_name, &length_printer_name_1));
6878 0 : if (length_printer_name_1 > size_printer_name_1) {
6879 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printer_name_1, length_printer_name_1);
6880 : }
6881 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printer_name_1, sizeof(uint16_t)));
6882 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printer_name, length_printer_name_1, sizeof(uint16_t), CH_UTF16));
6883 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
6884 : }
6885 0 : if (r->server_name) {
6886 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6887 0 : NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6888 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6889 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6890 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
6891 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
6892 0 : if (length_server_name_1 > size_server_name_1) {
6893 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
6894 : }
6895 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6896 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6897 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6898 : }
6899 0 : if (r->user_name) {
6900 0 : _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6901 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
6902 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
6903 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
6904 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user_name, &size_user_name_1));
6905 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user_name, &length_user_name_1));
6906 0 : if (length_user_name_1 > size_user_name_1) {
6907 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_name_1, length_user_name_1);
6908 : }
6909 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_name_1, sizeof(uint16_t)));
6910 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, length_user_name_1, sizeof(uint16_t), CH_UTF16));
6911 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
6912 : }
6913 0 : if (r->document_name) {
6914 0 : _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6915 0 : NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
6916 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
6917 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
6918 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->document_name, &size_document_name_1));
6919 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->document_name, &length_document_name_1));
6920 0 : if (length_document_name_1 > size_document_name_1) {
6921 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_document_name_1, length_document_name_1);
6922 : }
6923 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_document_name_1, sizeof(uint16_t)));
6924 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, length_document_name_1, sizeof(uint16_t), CH_UTF16));
6925 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
6926 : }
6927 0 : if (r->notify_name) {
6928 0 : _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6929 0 : NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
6930 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->notify_name));
6931 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->notify_name));
6932 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->notify_name, &size_notify_name_1));
6933 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->notify_name, &length_notify_name_1));
6934 0 : if (length_notify_name_1 > size_notify_name_1) {
6935 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_notify_name_1, length_notify_name_1);
6936 : }
6937 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_notify_name_1, sizeof(uint16_t)));
6938 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->notify_name, length_notify_name_1, sizeof(uint16_t), CH_UTF16));
6939 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
6940 : }
6941 0 : if (r->data_type) {
6942 0 : _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
6943 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
6944 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data_type));
6945 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data_type));
6946 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_type, &size_data_type_1));
6947 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_type, &length_data_type_1));
6948 0 : if (length_data_type_1 > size_data_type_1) {
6949 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_type_1, length_data_type_1);
6950 : }
6951 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_data_type_1, sizeof(uint16_t)));
6952 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_type, length_data_type_1, sizeof(uint16_t), CH_UTF16));
6953 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
6954 : }
6955 0 : if (r->print_processor) {
6956 0 : _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
6957 0 : NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
6958 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->print_processor));
6959 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->print_processor));
6960 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->print_processor, &size_print_processor_1));
6961 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->print_processor, &length_print_processor_1));
6962 0 : if (length_print_processor_1 > size_print_processor_1) {
6963 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_print_processor_1, length_print_processor_1);
6964 : }
6965 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_print_processor_1, sizeof(uint16_t)));
6966 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->print_processor, length_print_processor_1, sizeof(uint16_t), CH_UTF16));
6967 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
6968 : }
6969 0 : if (r->parameters) {
6970 0 : _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
6971 0 : NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
6972 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->parameters));
6973 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->parameters));
6974 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->parameters, &size_parameters_1));
6975 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->parameters, &length_parameters_1));
6976 0 : if (length_parameters_1 > size_parameters_1) {
6977 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_parameters_1, length_parameters_1);
6978 : }
6979 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_parameters_1, sizeof(uint16_t)));
6980 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->parameters, length_parameters_1, sizeof(uint16_t), CH_UTF16));
6981 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
6982 : }
6983 0 : if (r->driver_name) {
6984 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6985 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
6986 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
6987 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
6988 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_name, &size_driver_name_1));
6989 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_name, &length_driver_name_1));
6990 0 : if (length_driver_name_1 > size_driver_name_1) {
6991 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_name_1, length_driver_name_1);
6992 : }
6993 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_name_1, sizeof(uint16_t)));
6994 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, length_driver_name_1, sizeof(uint16_t), CH_UTF16));
6995 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
6996 : }
6997 0 : if (r->text_status) {
6998 0 : _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
6999 0 : NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
7000 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->text_status));
7001 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->text_status));
7002 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->text_status, &size_text_status_1));
7003 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->text_status, &length_text_status_1));
7004 0 : if (length_text_status_1 > size_text_status_1) {
7005 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_text_status_1, length_text_status_1);
7006 : }
7007 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_text_status_1, sizeof(uint16_t)));
7008 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->text_status, length_text_status_1, sizeof(uint16_t), CH_UTF16));
7009 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
7010 : }
7011 : }
7012 0 : return NDR_ERR_SUCCESS;
7013 : }
7014 :
7015 0 : _PUBLIC_ void ndr_print_spoolss_SetJobInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_SetJobInfo4 *r)
7016 : {
7017 0 : ndr_print_struct(ndr, name, "spoolss_SetJobInfo4");
7018 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7019 0 : ndr->depth++;
7020 0 : ndr_print_uint32(ndr, "job_id", r->job_id);
7021 0 : ndr_print_ptr(ndr, "printer_name", r->printer_name);
7022 0 : ndr->depth++;
7023 0 : if (r->printer_name) {
7024 0 : ndr_print_string(ndr, "printer_name", r->printer_name);
7025 : }
7026 0 : ndr->depth--;
7027 0 : ndr_print_ptr(ndr, "server_name", r->server_name);
7028 0 : ndr->depth++;
7029 0 : if (r->server_name) {
7030 0 : ndr_print_string(ndr, "server_name", r->server_name);
7031 : }
7032 0 : ndr->depth--;
7033 0 : ndr_print_ptr(ndr, "user_name", r->user_name);
7034 0 : ndr->depth++;
7035 0 : if (r->user_name) {
7036 0 : ndr_print_string(ndr, "user_name", r->user_name);
7037 : }
7038 0 : ndr->depth--;
7039 0 : ndr_print_ptr(ndr, "document_name", r->document_name);
7040 0 : ndr->depth++;
7041 0 : if (r->document_name) {
7042 0 : ndr_print_string(ndr, "document_name", r->document_name);
7043 : }
7044 0 : ndr->depth--;
7045 0 : ndr_print_ptr(ndr, "notify_name", r->notify_name);
7046 0 : ndr->depth++;
7047 0 : if (r->notify_name) {
7048 0 : ndr_print_string(ndr, "notify_name", r->notify_name);
7049 : }
7050 0 : ndr->depth--;
7051 0 : ndr_print_ptr(ndr, "data_type", r->data_type);
7052 0 : ndr->depth++;
7053 0 : if (r->data_type) {
7054 0 : ndr_print_string(ndr, "data_type", r->data_type);
7055 : }
7056 0 : ndr->depth--;
7057 0 : ndr_print_ptr(ndr, "print_processor", r->print_processor);
7058 0 : ndr->depth++;
7059 0 : if (r->print_processor) {
7060 0 : ndr_print_string(ndr, "print_processor", r->print_processor);
7061 : }
7062 0 : ndr->depth--;
7063 0 : ndr_print_ptr(ndr, "parameters", r->parameters);
7064 0 : ndr->depth++;
7065 0 : if (r->parameters) {
7066 0 : ndr_print_string(ndr, "parameters", r->parameters);
7067 : }
7068 0 : ndr->depth--;
7069 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
7070 0 : ndr->depth++;
7071 0 : if (r->driver_name) {
7072 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
7073 : }
7074 0 : ndr->depth--;
7075 0 : ndr_print_uint3264(ndr, "_devmode_ptr", r->_devmode_ptr);
7076 0 : ndr_print_ptr(ndr, "text_status", r->text_status);
7077 0 : ndr->depth++;
7078 0 : if (r->text_status) {
7079 0 : ndr_print_string(ndr, "text_status", r->text_status);
7080 : }
7081 0 : ndr->depth--;
7082 0 : ndr_print_uint3264(ndr, "_secdesc_ptr", r->_secdesc_ptr);
7083 0 : ndr_print_spoolss_JobStatus(ndr, "status", r->status);
7084 0 : ndr_print_uint32(ndr, "priority", r->priority);
7085 0 : ndr_print_uint32(ndr, "position", r->position);
7086 0 : ndr_print_uint32(ndr, "start_time", r->start_time);
7087 0 : ndr_print_uint32(ndr, "until_time", r->until_time);
7088 0 : ndr_print_uint32(ndr, "total_pages", r->total_pages);
7089 0 : ndr_print_uint32(ndr, "size", r->size);
7090 0 : ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
7091 0 : ndr_print_uint32(ndr, "time", r->time);
7092 0 : ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
7093 0 : ndr_print_uint32(ndr, "size_high", r->size_high);
7094 0 : ndr->depth--;
7095 : }
7096 :
7097 64 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetJobInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_SetJobInfo *r)
7098 : {
7099 0 : uint32_t level;
7100 64 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7101 64 : if (ndr_flags & NDR_SCALARS) {
7102 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7103 32 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7104 32 : NDR_CHECK(ndr_push_union_align(ndr, 5));
7105 32 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
7106 : /* ms_union is always aligned to the largest union arm*/
7107 32 : NDR_CHECK(ndr_push_align(ndr, 5));
7108 32 : switch (level) {
7109 32 : case 1: {
7110 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
7111 32 : break; }
7112 :
7113 0 : case 2: {
7114 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
7115 0 : break; }
7116 :
7117 0 : case 3: {
7118 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
7119 0 : break; }
7120 :
7121 0 : case 4: {
7122 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
7123 0 : break; }
7124 :
7125 0 : default: {
7126 0 : break; }
7127 :
7128 : }
7129 : }
7130 64 : if (ndr_flags & NDR_BUFFERS) {
7131 32 : if (!(ndr_flags & NDR_SCALARS)) {
7132 : /* We didn't get it above, and the token is not needed after this. */
7133 32 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7134 : }
7135 32 : switch (level) {
7136 32 : case 1:
7137 32 : if (r->info1) {
7138 32 : NDR_CHECK(ndr_push_spoolss_SetJobInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
7139 : }
7140 32 : break;
7141 :
7142 0 : case 2:
7143 0 : if (r->info2) {
7144 0 : NDR_CHECK(ndr_push_spoolss_SetJobInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
7145 : }
7146 0 : break;
7147 :
7148 0 : case 3:
7149 0 : if (r->info3) {
7150 0 : NDR_CHECK(ndr_push_spoolss_JobInfo3(ndr, NDR_SCALARS, r->info3));
7151 : }
7152 0 : break;
7153 :
7154 0 : case 4:
7155 0 : if (r->info4) {
7156 0 : NDR_CHECK(ndr_push_spoolss_SetJobInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
7157 : }
7158 0 : break;
7159 :
7160 0 : default:
7161 0 : break;
7162 :
7163 : }
7164 : }
7165 64 : return NDR_ERR_SUCCESS;
7166 : }
7167 :
7168 64 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetJobInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_SetJobInfo *r)
7169 : {
7170 0 : uint32_t level;
7171 0 : uint32_t _level;
7172 64 : TALLOC_CTX *_mem_save_info1_0 = NULL;
7173 0 : uint32_t _ptr_info1;
7174 64 : TALLOC_CTX *_mem_save_info2_0 = NULL;
7175 0 : uint32_t _ptr_info2;
7176 64 : TALLOC_CTX *_mem_save_info3_0 = NULL;
7177 0 : uint32_t _ptr_info3;
7178 64 : TALLOC_CTX *_mem_save_info4_0 = NULL;
7179 0 : uint32_t _ptr_info4;
7180 64 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7181 64 : if (ndr_flags & NDR_SCALARS) {
7182 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7183 32 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7184 32 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
7185 32 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
7186 32 : if (_level != level) {
7187 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
7188 : }
7189 : /* ms_union is always aligned to the largest union arm*/
7190 32 : NDR_CHECK(ndr_pull_align(ndr, 5));
7191 32 : switch (level) {
7192 32 : case 1: {
7193 32 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
7194 32 : if (_ptr_info1) {
7195 32 : NDR_PULL_ALLOC(ndr, r->info1);
7196 : } else {
7197 0 : r->info1 = NULL;
7198 : }
7199 32 : break; }
7200 :
7201 0 : case 2: {
7202 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
7203 0 : if (_ptr_info2) {
7204 0 : NDR_PULL_ALLOC(ndr, r->info2);
7205 : } else {
7206 0 : r->info2 = NULL;
7207 : }
7208 0 : break; }
7209 :
7210 0 : case 3: {
7211 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
7212 0 : if (_ptr_info3) {
7213 0 : NDR_PULL_ALLOC(ndr, r->info3);
7214 : } else {
7215 0 : r->info3 = NULL;
7216 : }
7217 0 : break; }
7218 :
7219 0 : case 4: {
7220 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
7221 0 : if (_ptr_info4) {
7222 0 : NDR_PULL_ALLOC(ndr, r->info4);
7223 : } else {
7224 0 : r->info4 = NULL;
7225 : }
7226 0 : break; }
7227 :
7228 0 : default: {
7229 0 : break; }
7230 :
7231 : }
7232 : }
7233 64 : if (ndr_flags & NDR_BUFFERS) {
7234 32 : if (!(ndr_flags & NDR_SCALARS)) {
7235 : /* We didn't get it above, and the token is not needed after this. */
7236 32 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7237 : }
7238 32 : switch (level) {
7239 32 : case 1:
7240 32 : if (r->info1) {
7241 32 : _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
7242 32 : NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
7243 32 : NDR_CHECK(ndr_pull_spoolss_SetJobInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
7244 32 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
7245 : }
7246 32 : break;
7247 :
7248 0 : case 2:
7249 0 : if (r->info2) {
7250 0 : _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
7251 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
7252 0 : NDR_CHECK(ndr_pull_spoolss_SetJobInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
7253 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
7254 : }
7255 0 : break;
7256 :
7257 0 : case 3:
7258 0 : if (r->info3) {
7259 0 : _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
7260 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
7261 0 : NDR_CHECK(ndr_pull_spoolss_JobInfo3(ndr, NDR_SCALARS, r->info3));
7262 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
7263 : }
7264 0 : break;
7265 :
7266 0 : case 4:
7267 0 : if (r->info4) {
7268 0 : _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
7269 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
7270 0 : NDR_CHECK(ndr_pull_spoolss_SetJobInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
7271 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
7272 : }
7273 0 : break;
7274 :
7275 0 : default:
7276 0 : break;
7277 :
7278 : }
7279 : }
7280 64 : return NDR_ERR_SUCCESS;
7281 : }
7282 :
7283 0 : _PUBLIC_ void ndr_print_spoolss_SetJobInfo(struct ndr_print *ndr, const char *name, const union spoolss_SetJobInfo *r)
7284 : {
7285 0 : uint32_t level;
7286 0 : level = ndr_print_steal_switch_value(ndr, r);
7287 0 : ndr_print_union(ndr, name, level, "spoolss_SetJobInfo");
7288 0 : switch (level) {
7289 0 : case 1:
7290 0 : ndr_print_ptr(ndr, "info1", r->info1);
7291 0 : ndr->depth++;
7292 0 : if (r->info1) {
7293 0 : ndr_print_spoolss_SetJobInfo1(ndr, "info1", r->info1);
7294 : }
7295 0 : ndr->depth--;
7296 0 : break;
7297 :
7298 0 : case 2:
7299 0 : ndr_print_ptr(ndr, "info2", r->info2);
7300 0 : ndr->depth++;
7301 0 : if (r->info2) {
7302 0 : ndr_print_spoolss_SetJobInfo2(ndr, "info2", r->info2);
7303 : }
7304 0 : ndr->depth--;
7305 0 : break;
7306 :
7307 0 : case 3:
7308 0 : ndr_print_ptr(ndr, "info3", r->info3);
7309 0 : ndr->depth++;
7310 0 : if (r->info3) {
7311 0 : ndr_print_spoolss_JobInfo3(ndr, "info3", r->info3);
7312 : }
7313 0 : ndr->depth--;
7314 0 : break;
7315 :
7316 0 : case 4:
7317 0 : ndr_print_ptr(ndr, "info4", r->info4);
7318 0 : ndr->depth++;
7319 0 : if (r->info4) {
7320 0 : ndr_print_spoolss_SetJobInfo4(ndr, "info4", r->info4);
7321 : }
7322 0 : ndr->depth--;
7323 0 : break;
7324 :
7325 0 : default:
7326 0 : break;
7327 :
7328 : }
7329 0 : }
7330 :
7331 32 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfoContainer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_JobInfoContainer *r)
7332 : {
7333 32 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7334 32 : if (ndr_flags & NDR_SCALARS) {
7335 32 : NDR_CHECK(ndr_push_align(ndr, 5));
7336 32 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
7337 32 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
7338 32 : NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr, NDR_SCALARS, &r->info));
7339 32 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7340 : }
7341 32 : if (ndr_flags & NDR_BUFFERS) {
7342 32 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
7343 32 : NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr, NDR_BUFFERS, &r->info));
7344 : }
7345 32 : return NDR_ERR_SUCCESS;
7346 : }
7347 :
7348 32 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfoContainer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_JobInfoContainer *r)
7349 : {
7350 32 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7351 32 : if (ndr_flags & NDR_SCALARS) {
7352 32 : NDR_CHECK(ndr_pull_align(ndr, 5));
7353 32 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
7354 32 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
7355 32 : NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr, NDR_SCALARS, &r->info));
7356 32 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7357 : }
7358 32 : if (ndr_flags & NDR_BUFFERS) {
7359 32 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
7360 32 : NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr, NDR_BUFFERS, &r->info));
7361 : }
7362 32 : return NDR_ERR_SUCCESS;
7363 : }
7364 :
7365 0 : static void ndr_print_flags_spoolss_JobInfoContainer(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_JobInfoContainer *r)
7366 : {
7367 0 : ndr_print_spoolss_JobInfoContainer(ndr, name, r);
7368 0 : }
7369 :
7370 0 : _PUBLIC_ void ndr_print_spoolss_JobInfoContainer(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfoContainer *r)
7371 : {
7372 0 : ndr_print_struct(ndr, name, "spoolss_JobInfoContainer");
7373 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7374 0 : ndr->depth++;
7375 0 : ndr_print_uint32(ndr, "level", r->level);
7376 0 : ndr_print_set_switch_value(ndr, &r->info, r->level);
7377 0 : ndr_print_spoolss_SetJobInfo(ndr, "info", &r->info);
7378 0 : ndr->depth--;
7379 : }
7380 :
7381 640 : static enum ndr_err_code ndr_push_spoolss_JobControl(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_JobControl r)
7382 : {
7383 640 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
7384 640 : return NDR_ERR_SUCCESS;
7385 : }
7386 :
7387 640 : static enum ndr_err_code ndr_pull_spoolss_JobControl(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_JobControl *r)
7388 : {
7389 0 : uint32_t v;
7390 640 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
7391 640 : *r = v;
7392 640 : return NDR_ERR_SUCCESS;
7393 : }
7394 :
7395 0 : _PUBLIC_ void ndr_print_spoolss_JobControl(struct ndr_print *ndr, const char *name, enum spoolss_JobControl r)
7396 : {
7397 0 : const char *val = NULL;
7398 :
7399 0 : switch (r) {
7400 0 : case SPOOLSS_JOB_CONTROL_NOOP: val = "SPOOLSS_JOB_CONTROL_NOOP"; break;
7401 0 : case SPOOLSS_JOB_CONTROL_PAUSE: val = "SPOOLSS_JOB_CONTROL_PAUSE"; break;
7402 0 : case SPOOLSS_JOB_CONTROL_RESUME: val = "SPOOLSS_JOB_CONTROL_RESUME"; break;
7403 0 : case SPOOLSS_JOB_CONTROL_CANCEL: val = "SPOOLSS_JOB_CONTROL_CANCEL"; break;
7404 0 : case SPOOLSS_JOB_CONTROL_RESTART: val = "SPOOLSS_JOB_CONTROL_RESTART"; break;
7405 0 : case SPOOLSS_JOB_CONTROL_DELETE: val = "SPOOLSS_JOB_CONTROL_DELETE"; break;
7406 0 : case SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER: val = "SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER"; break;
7407 0 : case SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED: val = "SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED"; break;
7408 0 : case SPOOLSS_JOB_CONTROL_RETAIN: val = "SPOOLSS_JOB_CONTROL_RETAIN"; break;
7409 0 : case SPOOLSS_JOB_CONTROL_RELEASE: val = "SPOOLSS_JOB_CONTROL_RELEASE"; break;
7410 : }
7411 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
7412 0 : }
7413 :
7414 584 : static enum ndr_err_code ndr_push_spoolss_PrinterControl(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_PrinterControl r)
7415 : {
7416 584 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
7417 584 : return NDR_ERR_SUCCESS;
7418 : }
7419 :
7420 588 : static enum ndr_err_code ndr_pull_spoolss_PrinterControl(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_PrinterControl *r)
7421 : {
7422 4 : uint32_t v;
7423 588 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
7424 588 : *r = v;
7425 588 : return NDR_ERR_SUCCESS;
7426 : }
7427 :
7428 4 : _PUBLIC_ void ndr_print_spoolss_PrinterControl(struct ndr_print *ndr, const char *name, enum spoolss_PrinterControl r)
7429 : {
7430 4 : const char *val = NULL;
7431 :
7432 4 : switch (r) {
7433 4 : case SPOOLSS_PRINTER_CONTROL_UNPAUSE: val = "SPOOLSS_PRINTER_CONTROL_UNPAUSE"; break;
7434 0 : case SPOOLSS_PRINTER_CONTROL_PAUSE: val = "SPOOLSS_PRINTER_CONTROL_PAUSE"; break;
7435 0 : case SPOOLSS_PRINTER_CONTROL_RESUME: val = "SPOOLSS_PRINTER_CONTROL_RESUME"; break;
7436 0 : case SPOOLSS_PRINTER_CONTROL_PURGE: val = "SPOOLSS_PRINTER_CONTROL_PURGE"; break;
7437 0 : case SPOOLSS_PRINTER_CONTROL_SET_STATUS: val = "SPOOLSS_PRINTER_CONTROL_SET_STATUS"; break;
7438 : }
7439 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
7440 4 : }
7441 :
7442 0 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo0(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfo0 *r)
7443 : {
7444 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7445 0 : if (ndr_flags & NDR_SCALARS) {
7446 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7447 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->servername));
7448 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername));
7449 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
7450 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_jobs));
7451 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_bytes));
7452 0 : NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->time));
7453 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->global_counter));
7454 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
7455 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
7456 0 : NDR_CHECK(ndr_push_spoolss_Build(ndr, NDR_SCALARS, r->free_build));
7457 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->spooling));
7458 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_spooling));
7459 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_counter));
7460 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_out_of_paper));
7461 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_not_ready));
7462 0 : NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->job_error));
7463 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->number_of_processors));
7464 0 : NDR_CHECK(ndr_push_spoolss_ProcessorType(ndr, NDR_SCALARS, r->processor_type));
7465 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high_part_total_bytes));
7466 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->change_id));
7467 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->last_error));
7468 0 : NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
7469 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumerate_network_printers));
7470 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->c_setprinter));
7471 0 : NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor_architecture));
7472 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->processor_level));
7473 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_ic));
7474 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2));
7475 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved3));
7476 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7477 : }
7478 0 : if (ndr_flags & NDR_BUFFERS) {
7479 0 : if (r->servername) {
7480 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
7481 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7482 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
7483 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servername, ndr_charset_length(r->servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7484 : }
7485 0 : if (r->printername) {
7486 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
7487 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7488 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
7489 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printername, ndr_charset_length(r->printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7490 : }
7491 : }
7492 0 : return NDR_ERR_SUCCESS;
7493 : }
7494 :
7495 0 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo0(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfo0 *r)
7496 : {
7497 0 : uint32_t _ptr_servername;
7498 0 : uint32_t size_servername_1 = 0;
7499 0 : uint32_t length_servername_1 = 0;
7500 0 : TALLOC_CTX *_mem_save_servername_0 = NULL;
7501 0 : uint32_t _ptr_printername;
7502 0 : uint32_t size_printername_1 = 0;
7503 0 : uint32_t length_printername_1 = 0;
7504 0 : TALLOC_CTX *_mem_save_printername_0 = NULL;
7505 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7506 0 : if (ndr_flags & NDR_SCALARS) {
7507 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7508 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
7509 0 : if (_ptr_servername) {
7510 0 : NDR_PULL_ALLOC(ndr, r->servername);
7511 : } else {
7512 0 : r->servername = NULL;
7513 : }
7514 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
7515 0 : if (_ptr_printername) {
7516 0 : NDR_PULL_ALLOC(ndr, r->printername);
7517 : } else {
7518 0 : r->printername = NULL;
7519 : }
7520 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
7521 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_jobs));
7522 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_bytes));
7523 0 : NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->time));
7524 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->global_counter));
7525 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
7526 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
7527 0 : NDR_CHECK(ndr_pull_spoolss_Build(ndr, NDR_SCALARS, &r->free_build));
7528 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->spooling));
7529 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_spooling));
7530 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_counter));
7531 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_out_of_paper));
7532 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_not_ready));
7533 0 : NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->job_error));
7534 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->number_of_processors));
7535 0 : NDR_CHECK(ndr_pull_spoolss_ProcessorType(ndr, NDR_SCALARS, &r->processor_type));
7536 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high_part_total_bytes));
7537 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->change_id));
7538 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->last_error));
7539 0 : NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
7540 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumerate_network_printers));
7541 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->c_setprinter));
7542 0 : NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor_architecture));
7543 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->processor_level));
7544 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_ic));
7545 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
7546 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
7547 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7548 : }
7549 0 : if (ndr_flags & NDR_BUFFERS) {
7550 0 : if (r->servername) {
7551 0 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
7552 0 : NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
7553 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->servername));
7554 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->servername));
7555 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->servername, &size_servername_1));
7556 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->servername, &length_servername_1));
7557 0 : if (length_servername_1 > size_servername_1) {
7558 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
7559 : }
7560 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
7561 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
7562 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
7563 : }
7564 0 : if (r->printername) {
7565 0 : _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
7566 0 : NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
7567 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->printername));
7568 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->printername));
7569 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printername, &size_printername_1));
7570 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printername, &length_printername_1));
7571 0 : if (length_printername_1 > size_printername_1) {
7572 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printername_1, length_printername_1);
7573 : }
7574 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printername_1, sizeof(uint16_t)));
7575 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printername, length_printername_1, sizeof(uint16_t), CH_UTF16));
7576 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
7577 : }
7578 : }
7579 0 : return NDR_ERR_SUCCESS;
7580 : }
7581 :
7582 0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo0(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo0 *r)
7583 : {
7584 0 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo0");
7585 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7586 0 : ndr->depth++;
7587 0 : ndr_print_ptr(ndr, "servername", r->servername);
7588 0 : ndr->depth++;
7589 0 : if (r->servername) {
7590 0 : ndr_print_string(ndr, "servername", r->servername);
7591 : }
7592 0 : ndr->depth--;
7593 0 : ndr_print_ptr(ndr, "printername", r->printername);
7594 0 : ndr->depth++;
7595 0 : if (r->printername) {
7596 0 : ndr_print_string(ndr, "printername", r->printername);
7597 : }
7598 0 : ndr->depth--;
7599 0 : ndr_print_uint32(ndr, "cjobs", r->cjobs);
7600 0 : ndr_print_uint32(ndr, "total_jobs", r->total_jobs);
7601 0 : ndr_print_uint32(ndr, "total_bytes", r->total_bytes);
7602 0 : ndr_print_spoolss_Time(ndr, "time", &r->time);
7603 0 : ndr_print_uint32(ndr, "global_counter", r->global_counter);
7604 0 : ndr_print_uint32(ndr, "total_pages", r->total_pages);
7605 0 : ndr_print_uint32(ndr, "version", r->version);
7606 0 : ndr_print_spoolss_Build(ndr, "free_build", r->free_build);
7607 0 : ndr_print_uint32(ndr, "spooling", r->spooling);
7608 0 : ndr_print_uint32(ndr, "max_spooling", r->max_spooling);
7609 0 : ndr_print_uint32(ndr, "session_counter", r->session_counter);
7610 0 : ndr_print_uint32(ndr, "num_error_out_of_paper", r->num_error_out_of_paper);
7611 0 : ndr_print_uint32(ndr, "num_error_not_ready", r->num_error_not_ready);
7612 0 : ndr_print_spoolss_JobStatus(ndr, "job_error", r->job_error);
7613 0 : ndr_print_uint32(ndr, "number_of_processors", r->number_of_processors);
7614 0 : ndr_print_spoolss_ProcessorType(ndr, "processor_type", r->processor_type);
7615 0 : ndr_print_uint32(ndr, "high_part_total_bytes", r->high_part_total_bytes);
7616 0 : ndr_print_uint32(ndr, "change_id", r->change_id);
7617 0 : ndr_print_WERROR(ndr, "last_error", r->last_error);
7618 0 : ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
7619 0 : ndr_print_uint32(ndr, "enumerate_network_printers", r->enumerate_network_printers);
7620 0 : ndr_print_uint32(ndr, "c_setprinter", r->c_setprinter);
7621 0 : ndr_print_spoolss_ProcessorArchitecture(ndr, "processor_architecture", r->processor_architecture);
7622 0 : ndr_print_uint16(ndr, "processor_level", r->processor_level);
7623 0 : ndr_print_uint32(ndr, "ref_ic", r->ref_ic);
7624 0 : ndr_print_uint32(ndr, "reserved2", r->reserved2);
7625 0 : ndr_print_uint32(ndr, "reserved3", r->reserved3);
7626 0 : ndr->depth--;
7627 : }
7628 :
7629 0 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfo1 *r)
7630 : {
7631 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7632 0 : if (ndr_flags & NDR_SCALARS) {
7633 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7634 0 : NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->flags));
7635 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->description));
7636 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
7637 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
7638 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7639 : }
7640 0 : if (ndr_flags & NDR_BUFFERS) {
7641 0 : if (r->description) {
7642 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->description, CH_UTF16)));
7643 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7644 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->description, CH_UTF16)));
7645 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->description, ndr_charset_length(r->description, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7646 : }
7647 0 : if (r->name) {
7648 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
7649 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7650 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
7651 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7652 : }
7653 0 : if (r->comment) {
7654 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7655 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7656 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7657 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7658 : }
7659 : }
7660 0 : return NDR_ERR_SUCCESS;
7661 : }
7662 :
7663 0 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfo1 *r)
7664 : {
7665 0 : uint32_t _ptr_description;
7666 0 : uint32_t size_description_1 = 0;
7667 0 : uint32_t length_description_1 = 0;
7668 0 : TALLOC_CTX *_mem_save_description_0 = NULL;
7669 0 : uint32_t _ptr_name;
7670 0 : uint32_t size_name_1 = 0;
7671 0 : uint32_t length_name_1 = 0;
7672 0 : TALLOC_CTX *_mem_save_name_0 = NULL;
7673 0 : uint32_t _ptr_comment;
7674 0 : uint32_t size_comment_1 = 0;
7675 0 : uint32_t length_comment_1 = 0;
7676 0 : TALLOC_CTX *_mem_save_comment_0 = NULL;
7677 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7678 0 : if (ndr_flags & NDR_SCALARS) {
7679 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7680 0 : NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->flags));
7681 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
7682 0 : if (_ptr_description) {
7683 0 : NDR_PULL_ALLOC(ndr, r->description);
7684 : } else {
7685 0 : r->description = NULL;
7686 : }
7687 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
7688 0 : if (_ptr_name) {
7689 0 : NDR_PULL_ALLOC(ndr, r->name);
7690 : } else {
7691 0 : r->name = NULL;
7692 : }
7693 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
7694 0 : if (_ptr_comment) {
7695 0 : NDR_PULL_ALLOC(ndr, r->comment);
7696 : } else {
7697 0 : r->comment = NULL;
7698 : }
7699 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7700 : }
7701 0 : if (ndr_flags & NDR_BUFFERS) {
7702 0 : if (r->description) {
7703 0 : _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
7704 0 : NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
7705 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->description));
7706 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->description));
7707 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->description, &size_description_1));
7708 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->description, &length_description_1));
7709 0 : if (length_description_1 > size_description_1) {
7710 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_description_1, length_description_1);
7711 : }
7712 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_description_1, sizeof(uint16_t)));
7713 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->description, length_description_1, sizeof(uint16_t), CH_UTF16));
7714 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
7715 : }
7716 0 : if (r->name) {
7717 0 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7718 0 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
7719 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
7720 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
7721 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
7722 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
7723 0 : if (length_name_1 > size_name_1) {
7724 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
7725 : }
7726 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
7727 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
7728 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
7729 : }
7730 0 : if (r->comment) {
7731 0 : _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
7732 0 : NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
7733 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
7734 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
7735 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->comment, &size_comment_1));
7736 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->comment, &length_comment_1));
7737 0 : if (length_comment_1 > size_comment_1) {
7738 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_comment_1, length_comment_1);
7739 : }
7740 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
7741 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
7742 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
7743 : }
7744 : }
7745 0 : return NDR_ERR_SUCCESS;
7746 : }
7747 :
7748 0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo1 *r)
7749 : {
7750 0 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo1");
7751 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7752 0 : ndr->depth++;
7753 0 : ndr_print_spoolss_PrinterAttributes(ndr, "flags", r->flags);
7754 0 : ndr_print_ptr(ndr, "description", r->description);
7755 0 : ndr->depth++;
7756 0 : if (r->description) {
7757 0 : ndr_print_string(ndr, "description", r->description);
7758 : }
7759 0 : ndr->depth--;
7760 0 : ndr_print_ptr(ndr, "name", r->name);
7761 0 : ndr->depth++;
7762 0 : if (r->name) {
7763 0 : ndr_print_string(ndr, "name", r->name);
7764 : }
7765 0 : ndr->depth--;
7766 0 : ndr_print_ptr(ndr, "comment", r->comment);
7767 0 : ndr->depth++;
7768 0 : if (r->comment) {
7769 0 : ndr_print_string(ndr, "comment", r->comment);
7770 : }
7771 0 : ndr->depth--;
7772 0 : ndr->depth--;
7773 : }
7774 :
7775 180 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfo2 *r)
7776 : {
7777 180 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7778 180 : if (ndr_flags & NDR_SCALARS) {
7779 180 : NDR_CHECK(ndr_push_align(ndr, 5));
7780 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->servername));
7781 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername));
7782 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sharename));
7783 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->portname));
7784 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->drivername));
7785 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
7786 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->location));
7787 180 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->devmode_ptr));
7788 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sepfile));
7789 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->printprocessor));
7790 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->datatype));
7791 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->parameters));
7792 180 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->secdesc_ptr));
7793 180 : NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
7794 180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
7795 180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->defaultpriority));
7796 180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->starttime));
7797 180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->untiltime));
7798 180 : NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
7799 180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
7800 180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->averageppm));
7801 180 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7802 : }
7803 180 : if (ndr_flags & NDR_BUFFERS) {
7804 180 : if (r->servername) {
7805 64 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
7806 64 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7807 64 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
7808 64 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servername, ndr_charset_length(r->servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7809 : }
7810 180 : if (r->printername) {
7811 164 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
7812 164 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7813 164 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
7814 164 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printername, ndr_charset_length(r->printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7815 : }
7816 180 : if (r->sharename) {
7817 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sharename, CH_UTF16)));
7818 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7819 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sharename, CH_UTF16)));
7820 84 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sharename, ndr_charset_length(r->sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7821 : }
7822 180 : if (r->portname) {
7823 148 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->portname, CH_UTF16)));
7824 148 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7825 148 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->portname, CH_UTF16)));
7826 148 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->portname, ndr_charset_length(r->portname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7827 : }
7828 180 : if (r->drivername) {
7829 132 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->drivername, CH_UTF16)));
7830 132 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7831 132 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->drivername, CH_UTF16)));
7832 132 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->drivername, ndr_charset_length(r->drivername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7833 : }
7834 180 : if (r->comment) {
7835 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7836 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7837 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7838 84 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7839 : }
7840 180 : if (r->location) {
7841 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->location, CH_UTF16)));
7842 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7843 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->location, CH_UTF16)));
7844 84 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->location, ndr_charset_length(r->location, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7845 : }
7846 180 : if (r->sepfile) {
7847 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sepfile, CH_UTF16)));
7848 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7849 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sepfile, CH_UTF16)));
7850 84 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sepfile, ndr_charset_length(r->sepfile, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7851 : }
7852 180 : if (r->printprocessor) {
7853 116 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printprocessor, CH_UTF16)));
7854 116 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7855 116 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printprocessor, CH_UTF16)));
7856 116 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printprocessor, ndr_charset_length(r->printprocessor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7857 : }
7858 180 : if (r->datatype) {
7859 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->datatype, CH_UTF16)));
7860 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7861 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->datatype, CH_UTF16)));
7862 84 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->datatype, ndr_charset_length(r->datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7863 : }
7864 180 : if (r->parameters) {
7865 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
7866 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7867 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
7868 84 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->parameters, ndr_charset_length(r->parameters, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7869 : }
7870 : }
7871 180 : return NDR_ERR_SUCCESS;
7872 : }
7873 :
7874 184 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfo2 *r)
7875 : {
7876 4 : uint32_t _ptr_servername;
7877 184 : uint32_t size_servername_1 = 0;
7878 184 : uint32_t length_servername_1 = 0;
7879 184 : TALLOC_CTX *_mem_save_servername_0 = NULL;
7880 4 : uint32_t _ptr_printername;
7881 184 : uint32_t size_printername_1 = 0;
7882 184 : uint32_t length_printername_1 = 0;
7883 184 : TALLOC_CTX *_mem_save_printername_0 = NULL;
7884 4 : uint32_t _ptr_sharename;
7885 184 : uint32_t size_sharename_1 = 0;
7886 184 : uint32_t length_sharename_1 = 0;
7887 184 : TALLOC_CTX *_mem_save_sharename_0 = NULL;
7888 4 : uint32_t _ptr_portname;
7889 184 : uint32_t size_portname_1 = 0;
7890 184 : uint32_t length_portname_1 = 0;
7891 184 : TALLOC_CTX *_mem_save_portname_0 = NULL;
7892 4 : uint32_t _ptr_drivername;
7893 184 : uint32_t size_drivername_1 = 0;
7894 184 : uint32_t length_drivername_1 = 0;
7895 184 : TALLOC_CTX *_mem_save_drivername_0 = NULL;
7896 4 : uint32_t _ptr_comment;
7897 184 : uint32_t size_comment_1 = 0;
7898 184 : uint32_t length_comment_1 = 0;
7899 184 : TALLOC_CTX *_mem_save_comment_0 = NULL;
7900 4 : uint32_t _ptr_location;
7901 184 : uint32_t size_location_1 = 0;
7902 184 : uint32_t length_location_1 = 0;
7903 184 : TALLOC_CTX *_mem_save_location_0 = NULL;
7904 4 : uint32_t _ptr_sepfile;
7905 184 : uint32_t size_sepfile_1 = 0;
7906 184 : uint32_t length_sepfile_1 = 0;
7907 184 : TALLOC_CTX *_mem_save_sepfile_0 = NULL;
7908 4 : uint32_t _ptr_printprocessor;
7909 184 : uint32_t size_printprocessor_1 = 0;
7910 184 : uint32_t length_printprocessor_1 = 0;
7911 184 : TALLOC_CTX *_mem_save_printprocessor_0 = NULL;
7912 4 : uint32_t _ptr_datatype;
7913 184 : uint32_t size_datatype_1 = 0;
7914 184 : uint32_t length_datatype_1 = 0;
7915 184 : TALLOC_CTX *_mem_save_datatype_0 = NULL;
7916 4 : uint32_t _ptr_parameters;
7917 184 : uint32_t size_parameters_1 = 0;
7918 184 : uint32_t length_parameters_1 = 0;
7919 184 : TALLOC_CTX *_mem_save_parameters_0 = NULL;
7920 184 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7921 184 : if (ndr_flags & NDR_SCALARS) {
7922 184 : NDR_CHECK(ndr_pull_align(ndr, 5));
7923 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
7924 184 : if (_ptr_servername) {
7925 68 : NDR_PULL_ALLOC(ndr, r->servername);
7926 : } else {
7927 116 : r->servername = NULL;
7928 : }
7929 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
7930 184 : if (_ptr_printername) {
7931 168 : NDR_PULL_ALLOC(ndr, r->printername);
7932 : } else {
7933 16 : r->printername = NULL;
7934 : }
7935 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
7936 184 : if (_ptr_sharename) {
7937 88 : NDR_PULL_ALLOC(ndr, r->sharename);
7938 : } else {
7939 96 : r->sharename = NULL;
7940 : }
7941 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
7942 184 : if (_ptr_portname) {
7943 152 : NDR_PULL_ALLOC(ndr, r->portname);
7944 : } else {
7945 32 : r->portname = NULL;
7946 : }
7947 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_drivername));
7948 184 : if (_ptr_drivername) {
7949 136 : NDR_PULL_ALLOC(ndr, r->drivername);
7950 : } else {
7951 48 : r->drivername = NULL;
7952 : }
7953 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
7954 184 : if (_ptr_comment) {
7955 88 : NDR_PULL_ALLOC(ndr, r->comment);
7956 : } else {
7957 96 : r->comment = NULL;
7958 : }
7959 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_location));
7960 184 : if (_ptr_location) {
7961 88 : NDR_PULL_ALLOC(ndr, r->location);
7962 : } else {
7963 96 : r->location = NULL;
7964 : }
7965 184 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->devmode_ptr));
7966 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sepfile));
7967 184 : if (_ptr_sepfile) {
7968 88 : NDR_PULL_ALLOC(ndr, r->sepfile);
7969 : } else {
7970 96 : r->sepfile = NULL;
7971 : }
7972 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printprocessor));
7973 184 : if (_ptr_printprocessor) {
7974 120 : NDR_PULL_ALLOC(ndr, r->printprocessor);
7975 : } else {
7976 64 : r->printprocessor = NULL;
7977 : }
7978 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
7979 184 : if (_ptr_datatype) {
7980 88 : NDR_PULL_ALLOC(ndr, r->datatype);
7981 : } else {
7982 96 : r->datatype = NULL;
7983 : }
7984 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
7985 184 : if (_ptr_parameters) {
7986 88 : NDR_PULL_ALLOC(ndr, r->parameters);
7987 : } else {
7988 96 : r->parameters = NULL;
7989 : }
7990 184 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->secdesc_ptr));
7991 184 : NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
7992 184 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
7993 184 : if (r->priority > 99) {
7994 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->priority), (uint32_t)(0), (uint32_t)(99));
7995 : }
7996 184 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->defaultpriority));
7997 184 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->starttime));
7998 184 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->untiltime));
7999 184 : NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
8000 184 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
8001 184 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->averageppm));
8002 184 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8003 : }
8004 184 : if (ndr_flags & NDR_BUFFERS) {
8005 184 : if (r->servername) {
8006 68 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
8007 68 : NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
8008 68 : NDR_CHECK(ndr_pull_array_size(ndr, &r->servername));
8009 68 : NDR_CHECK(ndr_pull_array_length(ndr, &r->servername));
8010 68 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->servername, &size_servername_1));
8011 68 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->servername, &length_servername_1));
8012 68 : if (length_servername_1 > size_servername_1) {
8013 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
8014 : }
8015 68 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
8016 68 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
8017 68 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
8018 : }
8019 184 : if (r->printername) {
8020 168 : _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
8021 168 : NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
8022 168 : NDR_CHECK(ndr_pull_array_size(ndr, &r->printername));
8023 168 : NDR_CHECK(ndr_pull_array_length(ndr, &r->printername));
8024 168 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printername, &size_printername_1));
8025 168 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printername, &length_printername_1));
8026 168 : if (length_printername_1 > size_printername_1) {
8027 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printername_1, length_printername_1);
8028 : }
8029 168 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printername_1, sizeof(uint16_t)));
8030 168 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printername, length_printername_1, sizeof(uint16_t), CH_UTF16));
8031 168 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
8032 : }
8033 184 : if (r->sharename) {
8034 88 : _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
8035 88 : NDR_PULL_SET_MEM_CTX(ndr, r->sharename, 0);
8036 88 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sharename));
8037 88 : NDR_CHECK(ndr_pull_array_length(ndr, &r->sharename));
8038 88 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->sharename, &size_sharename_1));
8039 88 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->sharename, &length_sharename_1));
8040 88 : if (length_sharename_1 > size_sharename_1) {
8041 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_sharename_1, length_sharename_1);
8042 : }
8043 88 : NDR_CHECK(ndr_check_string_terminator(ndr, length_sharename_1, sizeof(uint16_t)));
8044 88 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sharename, length_sharename_1, sizeof(uint16_t), CH_UTF16));
8045 88 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
8046 : }
8047 184 : if (r->portname) {
8048 152 : _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
8049 152 : NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
8050 152 : NDR_CHECK(ndr_pull_array_size(ndr, &r->portname));
8051 152 : NDR_CHECK(ndr_pull_array_length(ndr, &r->portname));
8052 152 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->portname, &size_portname_1));
8053 152 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->portname, &length_portname_1));
8054 152 : if (length_portname_1 > size_portname_1) {
8055 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_portname_1, length_portname_1);
8056 : }
8057 152 : NDR_CHECK(ndr_check_string_terminator(ndr, length_portname_1, sizeof(uint16_t)));
8058 152 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->portname, length_portname_1, sizeof(uint16_t), CH_UTF16));
8059 152 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
8060 : }
8061 184 : if (r->drivername) {
8062 136 : _mem_save_drivername_0 = NDR_PULL_GET_MEM_CTX(ndr);
8063 136 : NDR_PULL_SET_MEM_CTX(ndr, r->drivername, 0);
8064 136 : NDR_CHECK(ndr_pull_array_size(ndr, &r->drivername));
8065 136 : NDR_CHECK(ndr_pull_array_length(ndr, &r->drivername));
8066 136 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->drivername, &size_drivername_1));
8067 136 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->drivername, &length_drivername_1));
8068 136 : if (length_drivername_1 > size_drivername_1) {
8069 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_drivername_1, length_drivername_1);
8070 : }
8071 136 : NDR_CHECK(ndr_check_string_terminator(ndr, length_drivername_1, sizeof(uint16_t)));
8072 136 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->drivername, length_drivername_1, sizeof(uint16_t), CH_UTF16));
8073 136 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_drivername_0, 0);
8074 : }
8075 184 : if (r->comment) {
8076 88 : _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
8077 88 : NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
8078 88 : NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
8079 88 : NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
8080 88 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->comment, &size_comment_1));
8081 88 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->comment, &length_comment_1));
8082 88 : if (length_comment_1 > size_comment_1) {
8083 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_comment_1, length_comment_1);
8084 : }
8085 88 : NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
8086 88 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
8087 88 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
8088 : }
8089 184 : if (r->location) {
8090 88 : _mem_save_location_0 = NDR_PULL_GET_MEM_CTX(ndr);
8091 88 : NDR_PULL_SET_MEM_CTX(ndr, r->location, 0);
8092 88 : NDR_CHECK(ndr_pull_array_size(ndr, &r->location));
8093 88 : NDR_CHECK(ndr_pull_array_length(ndr, &r->location));
8094 88 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->location, &size_location_1));
8095 88 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->location, &length_location_1));
8096 88 : if (length_location_1 > size_location_1) {
8097 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_location_1, length_location_1);
8098 : }
8099 88 : NDR_CHECK(ndr_check_string_terminator(ndr, length_location_1, sizeof(uint16_t)));
8100 88 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->location, length_location_1, sizeof(uint16_t), CH_UTF16));
8101 88 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_location_0, 0);
8102 : }
8103 184 : if (r->sepfile) {
8104 88 : _mem_save_sepfile_0 = NDR_PULL_GET_MEM_CTX(ndr);
8105 88 : NDR_PULL_SET_MEM_CTX(ndr, r->sepfile, 0);
8106 88 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sepfile));
8107 88 : NDR_CHECK(ndr_pull_array_length(ndr, &r->sepfile));
8108 88 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->sepfile, &size_sepfile_1));
8109 88 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->sepfile, &length_sepfile_1));
8110 88 : if (length_sepfile_1 > size_sepfile_1) {
8111 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_sepfile_1, length_sepfile_1);
8112 : }
8113 88 : NDR_CHECK(ndr_check_string_terminator(ndr, length_sepfile_1, sizeof(uint16_t)));
8114 88 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sepfile, length_sepfile_1, sizeof(uint16_t), CH_UTF16));
8115 88 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sepfile_0, 0);
8116 : }
8117 184 : if (r->printprocessor) {
8118 120 : _mem_save_printprocessor_0 = NDR_PULL_GET_MEM_CTX(ndr);
8119 120 : NDR_PULL_SET_MEM_CTX(ndr, r->printprocessor, 0);
8120 120 : NDR_CHECK(ndr_pull_array_size(ndr, &r->printprocessor));
8121 120 : NDR_CHECK(ndr_pull_array_length(ndr, &r->printprocessor));
8122 120 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printprocessor, &size_printprocessor_1));
8123 120 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printprocessor, &length_printprocessor_1));
8124 120 : if (length_printprocessor_1 > size_printprocessor_1) {
8125 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printprocessor_1, length_printprocessor_1);
8126 : }
8127 120 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printprocessor_1, sizeof(uint16_t)));
8128 120 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printprocessor, length_printprocessor_1, sizeof(uint16_t), CH_UTF16));
8129 120 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printprocessor_0, 0);
8130 : }
8131 184 : if (r->datatype) {
8132 88 : _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
8133 88 : NDR_PULL_SET_MEM_CTX(ndr, r->datatype, 0);
8134 88 : NDR_CHECK(ndr_pull_array_size(ndr, &r->datatype));
8135 88 : NDR_CHECK(ndr_pull_array_length(ndr, &r->datatype));
8136 88 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->datatype, &size_datatype_1));
8137 88 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->datatype, &length_datatype_1));
8138 88 : if (length_datatype_1 > size_datatype_1) {
8139 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_datatype_1, length_datatype_1);
8140 : }
8141 88 : NDR_CHECK(ndr_check_string_terminator(ndr, length_datatype_1, sizeof(uint16_t)));
8142 88 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->datatype, length_datatype_1, sizeof(uint16_t), CH_UTF16));
8143 88 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
8144 : }
8145 184 : if (r->parameters) {
8146 88 : _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
8147 88 : NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
8148 88 : NDR_CHECK(ndr_pull_array_size(ndr, &r->parameters));
8149 88 : NDR_CHECK(ndr_pull_array_length(ndr, &r->parameters));
8150 88 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->parameters, &size_parameters_1));
8151 88 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->parameters, &length_parameters_1));
8152 88 : if (length_parameters_1 > size_parameters_1) {
8153 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_parameters_1, length_parameters_1);
8154 : }
8155 88 : NDR_CHECK(ndr_check_string_terminator(ndr, length_parameters_1, sizeof(uint16_t)));
8156 88 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->parameters, length_parameters_1, sizeof(uint16_t), CH_UTF16));
8157 88 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
8158 : }
8159 : }
8160 180 : return NDR_ERR_SUCCESS;
8161 : }
8162 :
8163 4 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo2 *r)
8164 : {
8165 4 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo2");
8166 4 : if (r == NULL) { ndr_print_null(ndr); return; }
8167 4 : ndr->depth++;
8168 4 : ndr_print_ptr(ndr, "servername", r->servername);
8169 4 : ndr->depth++;
8170 4 : if (r->servername) {
8171 4 : ndr_print_string(ndr, "servername", r->servername);
8172 : }
8173 4 : ndr->depth--;
8174 4 : ndr_print_ptr(ndr, "printername", r->printername);
8175 4 : ndr->depth++;
8176 4 : if (r->printername) {
8177 4 : ndr_print_string(ndr, "printername", r->printername);
8178 : }
8179 4 : ndr->depth--;
8180 4 : ndr_print_ptr(ndr, "sharename", r->sharename);
8181 4 : ndr->depth++;
8182 4 : if (r->sharename) {
8183 4 : ndr_print_string(ndr, "sharename", r->sharename);
8184 : }
8185 4 : ndr->depth--;
8186 4 : ndr_print_ptr(ndr, "portname", r->portname);
8187 4 : ndr->depth++;
8188 4 : if (r->portname) {
8189 4 : ndr_print_string(ndr, "portname", r->portname);
8190 : }
8191 4 : ndr->depth--;
8192 4 : ndr_print_ptr(ndr, "drivername", r->drivername);
8193 4 : ndr->depth++;
8194 4 : if (r->drivername) {
8195 4 : ndr_print_string(ndr, "drivername", r->drivername);
8196 : }
8197 4 : ndr->depth--;
8198 4 : ndr_print_ptr(ndr, "comment", r->comment);
8199 4 : ndr->depth++;
8200 4 : if (r->comment) {
8201 4 : ndr_print_string(ndr, "comment", r->comment);
8202 : }
8203 4 : ndr->depth--;
8204 4 : ndr_print_ptr(ndr, "location", r->location);
8205 4 : ndr->depth++;
8206 4 : if (r->location) {
8207 4 : ndr_print_string(ndr, "location", r->location);
8208 : }
8209 4 : ndr->depth--;
8210 4 : ndr_print_uint3264(ndr, "devmode_ptr", r->devmode_ptr);
8211 4 : ndr_print_ptr(ndr, "sepfile", r->sepfile);
8212 4 : ndr->depth++;
8213 4 : if (r->sepfile) {
8214 4 : ndr_print_string(ndr, "sepfile", r->sepfile);
8215 : }
8216 4 : ndr->depth--;
8217 4 : ndr_print_ptr(ndr, "printprocessor", r->printprocessor);
8218 4 : ndr->depth++;
8219 4 : if (r->printprocessor) {
8220 4 : ndr_print_string(ndr, "printprocessor", r->printprocessor);
8221 : }
8222 4 : ndr->depth--;
8223 4 : ndr_print_ptr(ndr, "datatype", r->datatype);
8224 4 : ndr->depth++;
8225 4 : if (r->datatype) {
8226 4 : ndr_print_string(ndr, "datatype", r->datatype);
8227 : }
8228 4 : ndr->depth--;
8229 4 : ndr_print_ptr(ndr, "parameters", r->parameters);
8230 4 : ndr->depth++;
8231 4 : if (r->parameters) {
8232 4 : ndr_print_string(ndr, "parameters", r->parameters);
8233 : }
8234 4 : ndr->depth--;
8235 4 : ndr_print_uint3264(ndr, "secdesc_ptr", r->secdesc_ptr);
8236 4 : ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
8237 4 : ndr_print_uint32(ndr, "priority", r->priority);
8238 4 : ndr_print_uint32(ndr, "defaultpriority", r->defaultpriority);
8239 4 : ndr_print_uint32(ndr, "starttime", r->starttime);
8240 4 : ndr_print_uint32(ndr, "untiltime", r->untiltime);
8241 4 : ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
8242 4 : ndr_print_uint32(ndr, "cjobs", r->cjobs);
8243 4 : ndr_print_uint32(ndr, "averageppm", r->averageppm);
8244 4 : ndr->depth--;
8245 : }
8246 :
8247 92 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfo3 *r)
8248 : {
8249 92 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8250 92 : if (ndr_flags & NDR_SCALARS) {
8251 92 : NDR_CHECK(ndr_push_align(ndr, 5));
8252 92 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->sec_desc_ptr));
8253 92 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8254 : }
8255 92 : if (ndr_flags & NDR_BUFFERS) {
8256 0 : }
8257 92 : return NDR_ERR_SUCCESS;
8258 : }
8259 :
8260 96 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfo3 *r)
8261 : {
8262 96 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8263 96 : if (ndr_flags & NDR_SCALARS) {
8264 96 : NDR_CHECK(ndr_pull_align(ndr, 5));
8265 96 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->sec_desc_ptr));
8266 96 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8267 : }
8268 96 : if (ndr_flags & NDR_BUFFERS) {
8269 4 : }
8270 96 : return NDR_ERR_SUCCESS;
8271 : }
8272 :
8273 4 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo3 *r)
8274 : {
8275 4 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo3");
8276 4 : if (r == NULL) { ndr_print_null(ndr); return; }
8277 4 : ndr->depth++;
8278 4 : ndr_print_uint3264(ndr, "sec_desc_ptr", r->sec_desc_ptr);
8279 4 : ndr->depth--;
8280 : }
8281 :
8282 0 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfo4 *r)
8283 : {
8284 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8285 0 : if (ndr_flags & NDR_SCALARS) {
8286 0 : NDR_CHECK(ndr_push_align(ndr, 5));
8287 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername));
8288 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->servername));
8289 0 : NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
8290 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8291 : }
8292 0 : if (ndr_flags & NDR_BUFFERS) {
8293 0 : if (r->printername) {
8294 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
8295 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8296 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
8297 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printername, ndr_charset_length(r->printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8298 : }
8299 0 : if (r->servername) {
8300 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
8301 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8302 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
8303 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servername, ndr_charset_length(r->servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8304 : }
8305 : }
8306 0 : return NDR_ERR_SUCCESS;
8307 : }
8308 :
8309 0 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfo4 *r)
8310 : {
8311 0 : uint32_t _ptr_printername;
8312 0 : uint32_t size_printername_1 = 0;
8313 0 : uint32_t length_printername_1 = 0;
8314 0 : TALLOC_CTX *_mem_save_printername_0 = NULL;
8315 0 : uint32_t _ptr_servername;
8316 0 : uint32_t size_servername_1 = 0;
8317 0 : uint32_t length_servername_1 = 0;
8318 0 : TALLOC_CTX *_mem_save_servername_0 = NULL;
8319 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8320 0 : if (ndr_flags & NDR_SCALARS) {
8321 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
8322 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
8323 0 : if (_ptr_printername) {
8324 0 : NDR_PULL_ALLOC(ndr, r->printername);
8325 : } else {
8326 0 : r->printername = NULL;
8327 : }
8328 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
8329 0 : if (_ptr_servername) {
8330 0 : NDR_PULL_ALLOC(ndr, r->servername);
8331 : } else {
8332 0 : r->servername = NULL;
8333 : }
8334 0 : NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
8335 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8336 : }
8337 0 : if (ndr_flags & NDR_BUFFERS) {
8338 0 : if (r->printername) {
8339 0 : _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
8340 0 : NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
8341 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->printername));
8342 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->printername));
8343 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printername, &size_printername_1));
8344 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printername, &length_printername_1));
8345 0 : if (length_printername_1 > size_printername_1) {
8346 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printername_1, length_printername_1);
8347 : }
8348 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printername_1, sizeof(uint16_t)));
8349 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printername, length_printername_1, sizeof(uint16_t), CH_UTF16));
8350 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
8351 : }
8352 0 : if (r->servername) {
8353 0 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
8354 0 : NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
8355 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->servername));
8356 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->servername));
8357 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->servername, &size_servername_1));
8358 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->servername, &length_servername_1));
8359 0 : if (length_servername_1 > size_servername_1) {
8360 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
8361 : }
8362 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
8363 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
8364 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
8365 : }
8366 : }
8367 0 : return NDR_ERR_SUCCESS;
8368 : }
8369 :
8370 0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo4 *r)
8371 : {
8372 0 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo4");
8373 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8374 0 : ndr->depth++;
8375 0 : ndr_print_ptr(ndr, "printername", r->printername);
8376 0 : ndr->depth++;
8377 0 : if (r->printername) {
8378 0 : ndr_print_string(ndr, "printername", r->printername);
8379 : }
8380 0 : ndr->depth--;
8381 0 : ndr_print_ptr(ndr, "servername", r->servername);
8382 0 : ndr->depth++;
8383 0 : if (r->servername) {
8384 0 : ndr_print_string(ndr, "servername", r->servername);
8385 : }
8386 0 : ndr->depth--;
8387 0 : ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
8388 0 : ndr->depth--;
8389 : }
8390 :
8391 0 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo5(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfo5 *r)
8392 : {
8393 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8394 0 : if (ndr_flags & NDR_SCALARS) {
8395 0 : NDR_CHECK(ndr_push_align(ndr, 5));
8396 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername));
8397 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->portname));
8398 0 : NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
8399 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->device_not_selected_timeout));
8400 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->transmission_retry_timeout));
8401 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8402 : }
8403 0 : if (ndr_flags & NDR_BUFFERS) {
8404 0 : if (r->printername) {
8405 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
8406 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8407 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
8408 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printername, ndr_charset_length(r->printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8409 : }
8410 0 : if (r->portname) {
8411 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->portname, CH_UTF16)));
8412 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8413 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->portname, CH_UTF16)));
8414 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->portname, ndr_charset_length(r->portname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8415 : }
8416 : }
8417 0 : return NDR_ERR_SUCCESS;
8418 : }
8419 :
8420 0 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo5(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfo5 *r)
8421 : {
8422 0 : uint32_t _ptr_printername;
8423 0 : uint32_t size_printername_1 = 0;
8424 0 : uint32_t length_printername_1 = 0;
8425 0 : TALLOC_CTX *_mem_save_printername_0 = NULL;
8426 0 : uint32_t _ptr_portname;
8427 0 : uint32_t size_portname_1 = 0;
8428 0 : uint32_t length_portname_1 = 0;
8429 0 : TALLOC_CTX *_mem_save_portname_0 = NULL;
8430 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8431 0 : if (ndr_flags & NDR_SCALARS) {
8432 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
8433 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
8434 0 : if (_ptr_printername) {
8435 0 : NDR_PULL_ALLOC(ndr, r->printername);
8436 : } else {
8437 0 : r->printername = NULL;
8438 : }
8439 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
8440 0 : if (_ptr_portname) {
8441 0 : NDR_PULL_ALLOC(ndr, r->portname);
8442 : } else {
8443 0 : r->portname = NULL;
8444 : }
8445 0 : NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
8446 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->device_not_selected_timeout));
8447 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->transmission_retry_timeout));
8448 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8449 : }
8450 0 : if (ndr_flags & NDR_BUFFERS) {
8451 0 : if (r->printername) {
8452 0 : _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
8453 0 : NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
8454 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->printername));
8455 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->printername));
8456 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printername, &size_printername_1));
8457 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printername, &length_printername_1));
8458 0 : if (length_printername_1 > size_printername_1) {
8459 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printername_1, length_printername_1);
8460 : }
8461 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printername_1, sizeof(uint16_t)));
8462 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printername, length_printername_1, sizeof(uint16_t), CH_UTF16));
8463 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
8464 : }
8465 0 : if (r->portname) {
8466 0 : _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
8467 0 : NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
8468 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->portname));
8469 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->portname));
8470 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->portname, &size_portname_1));
8471 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->portname, &length_portname_1));
8472 0 : if (length_portname_1 > size_portname_1) {
8473 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_portname_1, length_portname_1);
8474 : }
8475 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_portname_1, sizeof(uint16_t)));
8476 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->portname, length_portname_1, sizeof(uint16_t), CH_UTF16));
8477 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
8478 : }
8479 : }
8480 0 : return NDR_ERR_SUCCESS;
8481 : }
8482 :
8483 0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo5(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo5 *r)
8484 : {
8485 0 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo5");
8486 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8487 0 : ndr->depth++;
8488 0 : ndr_print_ptr(ndr, "printername", r->printername);
8489 0 : ndr->depth++;
8490 0 : if (r->printername) {
8491 0 : ndr_print_string(ndr, "printername", r->printername);
8492 : }
8493 0 : ndr->depth--;
8494 0 : ndr_print_ptr(ndr, "portname", r->portname);
8495 0 : ndr->depth++;
8496 0 : if (r->portname) {
8497 0 : ndr_print_string(ndr, "portname", r->portname);
8498 : }
8499 0 : ndr->depth--;
8500 0 : ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
8501 0 : ndr_print_uint32(ndr, "device_not_selected_timeout", r->device_not_selected_timeout);
8502 0 : ndr_print_uint32(ndr, "transmission_retry_timeout", r->transmission_retry_timeout);
8503 0 : ndr->depth--;
8504 : }
8505 :
8506 0 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo6(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfo6 *r)
8507 : {
8508 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8509 0 : if (ndr_flags & NDR_SCALARS) {
8510 0 : NDR_CHECK(ndr_push_align(ndr, 4));
8511 0 : NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
8512 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8513 : }
8514 0 : if (ndr_flags & NDR_BUFFERS) {
8515 0 : }
8516 0 : return NDR_ERR_SUCCESS;
8517 : }
8518 :
8519 0 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfo6 *r)
8520 : {
8521 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8522 0 : if (ndr_flags & NDR_SCALARS) {
8523 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
8524 0 : NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
8525 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8526 : }
8527 0 : if (ndr_flags & NDR_BUFFERS) {
8528 0 : }
8529 0 : return NDR_ERR_SUCCESS;
8530 : }
8531 :
8532 0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo6(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo6 *r)
8533 : {
8534 0 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo6");
8535 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8536 0 : ndr->depth++;
8537 0 : ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
8538 0 : ndr->depth--;
8539 : }
8540 :
8541 8 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo7(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfo7 *r)
8542 : {
8543 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8544 8 : if (ndr_flags & NDR_SCALARS) {
8545 8 : NDR_CHECK(ndr_push_align(ndr, 5));
8546 8 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->guid));
8547 8 : NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr, NDR_SCALARS, r->action));
8548 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8549 : }
8550 8 : if (ndr_flags & NDR_BUFFERS) {
8551 8 : if (r->guid) {
8552 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guid, CH_UTF16)));
8553 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8554 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guid, CH_UTF16)));
8555 8 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guid, ndr_charset_length(r->guid, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8556 : }
8557 : }
8558 8 : return NDR_ERR_SUCCESS;
8559 : }
8560 :
8561 8 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo7(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfo7 *r)
8562 : {
8563 0 : uint32_t _ptr_guid;
8564 8 : uint32_t size_guid_1 = 0;
8565 8 : uint32_t length_guid_1 = 0;
8566 8 : TALLOC_CTX *_mem_save_guid_0 = NULL;
8567 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8568 8 : if (ndr_flags & NDR_SCALARS) {
8569 8 : NDR_CHECK(ndr_pull_align(ndr, 5));
8570 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guid));
8571 8 : if (_ptr_guid) {
8572 8 : NDR_PULL_ALLOC(ndr, r->guid);
8573 : } else {
8574 0 : r->guid = NULL;
8575 : }
8576 8 : NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr, NDR_SCALARS, &r->action));
8577 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8578 : }
8579 8 : if (ndr_flags & NDR_BUFFERS) {
8580 8 : if (r->guid) {
8581 8 : _mem_save_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8582 8 : NDR_PULL_SET_MEM_CTX(ndr, r->guid, 0);
8583 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->guid));
8584 8 : NDR_CHECK(ndr_pull_array_length(ndr, &r->guid));
8585 8 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->guid, &size_guid_1));
8586 8 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->guid, &length_guid_1));
8587 8 : if (length_guid_1 > size_guid_1) {
8588 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_guid_1, length_guid_1);
8589 : }
8590 8 : NDR_CHECK(ndr_check_string_terminator(ndr, length_guid_1, sizeof(uint16_t)));
8591 8 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guid, length_guid_1, sizeof(uint16_t), CH_UTF16));
8592 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guid_0, 0);
8593 : }
8594 : }
8595 8 : return NDR_ERR_SUCCESS;
8596 : }
8597 :
8598 0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo7(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo7 *r)
8599 : {
8600 0 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo7");
8601 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8602 0 : ndr->depth++;
8603 0 : ndr_print_ptr(ndr, "guid", r->guid);
8604 0 : ndr->depth++;
8605 0 : if (r->guid) {
8606 0 : ndr_print_string(ndr, "guid", r->guid);
8607 : }
8608 0 : ndr->depth--;
8609 0 : ndr_print_spoolss_DsPrintAction(ndr, "action", r->action);
8610 0 : ndr->depth--;
8611 : }
8612 :
8613 296 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo8(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfo8 *r)
8614 : {
8615 296 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8616 296 : if (ndr_flags & NDR_SCALARS) {
8617 296 : NDR_CHECK(ndr_push_align(ndr, 5));
8618 296 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->devmode_ptr));
8619 296 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8620 : }
8621 296 : if (ndr_flags & NDR_BUFFERS) {
8622 0 : }
8623 296 : return NDR_ERR_SUCCESS;
8624 : }
8625 :
8626 296 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo8(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfo8 *r)
8627 : {
8628 296 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8629 296 : if (ndr_flags & NDR_SCALARS) {
8630 296 : NDR_CHECK(ndr_pull_align(ndr, 5));
8631 296 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->devmode_ptr));
8632 296 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8633 : }
8634 296 : if (ndr_flags & NDR_BUFFERS) {
8635 0 : }
8636 296 : return NDR_ERR_SUCCESS;
8637 : }
8638 :
8639 0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo8(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo8 *r)
8640 : {
8641 0 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo8");
8642 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8643 0 : ndr->depth++;
8644 0 : ndr_print_uint3264(ndr, "devmode_ptr", r->devmode_ptr);
8645 0 : ndr->depth--;
8646 : }
8647 :
8648 0 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo9(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfo9 *r)
8649 : {
8650 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8651 0 : if (ndr_flags & NDR_SCALARS) {
8652 0 : NDR_CHECK(ndr_push_align(ndr, 5));
8653 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->devmode_ptr));
8654 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8655 : }
8656 0 : if (ndr_flags & NDR_BUFFERS) {
8657 0 : }
8658 0 : return NDR_ERR_SUCCESS;
8659 : }
8660 :
8661 0 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo9(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfo9 *r)
8662 : {
8663 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8664 0 : if (ndr_flags & NDR_SCALARS) {
8665 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
8666 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->devmode_ptr));
8667 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8668 : }
8669 0 : if (ndr_flags & NDR_BUFFERS) {
8670 0 : }
8671 0 : return NDR_ERR_SUCCESS;
8672 : }
8673 :
8674 0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo9(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo9 *r)
8675 : {
8676 0 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo9");
8677 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8678 0 : ndr->depth++;
8679 0 : ndr_print_uint3264(ndr, "devmode_ptr", r->devmode_ptr);
8680 0 : ndr->depth--;
8681 : }
8682 :
8683 1360 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_SetPrinterInfo *r)
8684 : {
8685 0 : uint32_t level;
8686 1360 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8687 1360 : if (ndr_flags & NDR_SCALARS) {
8688 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8689 680 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8690 680 : NDR_CHECK(ndr_push_union_align(ndr, 5));
8691 680 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
8692 : /* ms_union is always aligned to the largest union arm*/
8693 680 : NDR_CHECK(ndr_push_align(ndr, 5));
8694 680 : switch (level) {
8695 104 : case 0: {
8696 104 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
8697 104 : break; }
8698 :
8699 0 : case 1: {
8700 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
8701 0 : break; }
8702 :
8703 180 : case 2: {
8704 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
8705 180 : break; }
8706 :
8707 92 : case 3: {
8708 92 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
8709 92 : break; }
8710 :
8711 0 : case 4: {
8712 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
8713 0 : break; }
8714 :
8715 0 : case 5: {
8716 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
8717 0 : break; }
8718 :
8719 0 : case 6: {
8720 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
8721 0 : break; }
8722 :
8723 8 : case 7: {
8724 8 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
8725 8 : break; }
8726 :
8727 296 : case 8: {
8728 296 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info8));
8729 296 : break; }
8730 :
8731 0 : case 9: {
8732 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info9));
8733 0 : break; }
8734 :
8735 0 : default: {
8736 0 : break; }
8737 :
8738 : }
8739 : }
8740 1360 : if (ndr_flags & NDR_BUFFERS) {
8741 680 : if (!(ndr_flags & NDR_SCALARS)) {
8742 : /* We didn't get it above, and the token is not needed after this. */
8743 680 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8744 : }
8745 680 : switch (level) {
8746 104 : case 0:
8747 104 : if (r->info0) {
8748 0 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
8749 : }
8750 104 : break;
8751 :
8752 0 : case 1:
8753 0 : if (r->info1) {
8754 0 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
8755 : }
8756 0 : break;
8757 :
8758 180 : case 2:
8759 180 : if (r->info2) {
8760 180 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
8761 : }
8762 180 : break;
8763 :
8764 92 : case 3:
8765 92 : if (r->info3) {
8766 92 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo3(ndr, NDR_SCALARS, r->info3));
8767 : }
8768 92 : break;
8769 :
8770 0 : case 4:
8771 0 : if (r->info4) {
8772 0 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
8773 : }
8774 0 : break;
8775 :
8776 0 : case 5:
8777 0 : if (r->info5) {
8778 0 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
8779 : }
8780 0 : break;
8781 :
8782 0 : case 6:
8783 0 : if (r->info6) {
8784 0 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo6(ndr, NDR_SCALARS, r->info6));
8785 : }
8786 0 : break;
8787 :
8788 8 : case 7:
8789 8 : if (r->info7) {
8790 8 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7));
8791 : }
8792 8 : break;
8793 :
8794 296 : case 8:
8795 296 : if (r->info8) {
8796 296 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo8(ndr, NDR_SCALARS, r->info8));
8797 : }
8798 296 : break;
8799 :
8800 0 : case 9:
8801 0 : if (r->info9) {
8802 0 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo9(ndr, NDR_SCALARS, r->info9));
8803 : }
8804 0 : break;
8805 :
8806 0 : default:
8807 0 : break;
8808 :
8809 : }
8810 : }
8811 1360 : return NDR_ERR_SUCCESS;
8812 : }
8813 :
8814 1376 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_SetPrinterInfo *r)
8815 : {
8816 16 : uint32_t level;
8817 16 : uint32_t _level;
8818 1376 : TALLOC_CTX *_mem_save_info0_0 = NULL;
8819 16 : uint32_t _ptr_info0;
8820 1376 : TALLOC_CTX *_mem_save_info1_0 = NULL;
8821 16 : uint32_t _ptr_info1;
8822 1376 : TALLOC_CTX *_mem_save_info2_0 = NULL;
8823 16 : uint32_t _ptr_info2;
8824 1376 : TALLOC_CTX *_mem_save_info3_0 = NULL;
8825 16 : uint32_t _ptr_info3;
8826 1376 : TALLOC_CTX *_mem_save_info4_0 = NULL;
8827 16 : uint32_t _ptr_info4;
8828 1376 : TALLOC_CTX *_mem_save_info5_0 = NULL;
8829 16 : uint32_t _ptr_info5;
8830 1376 : TALLOC_CTX *_mem_save_info6_0 = NULL;
8831 16 : uint32_t _ptr_info6;
8832 1376 : TALLOC_CTX *_mem_save_info7_0 = NULL;
8833 16 : uint32_t _ptr_info7;
8834 1376 : TALLOC_CTX *_mem_save_info8_0 = NULL;
8835 16 : uint32_t _ptr_info8;
8836 1376 : TALLOC_CTX *_mem_save_info9_0 = NULL;
8837 16 : uint32_t _ptr_info9;
8838 1376 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8839 1376 : if (ndr_flags & NDR_SCALARS) {
8840 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8841 688 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8842 688 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
8843 688 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
8844 688 : if (_level != level) {
8845 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
8846 : }
8847 : /* ms_union is always aligned to the largest union arm*/
8848 688 : NDR_CHECK(ndr_pull_align(ndr, 5));
8849 688 : switch (level) {
8850 104 : case 0: {
8851 104 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
8852 104 : if (_ptr_info0) {
8853 0 : NDR_PULL_ALLOC(ndr, r->info0);
8854 : } else {
8855 104 : r->info0 = NULL;
8856 : }
8857 104 : break; }
8858 :
8859 0 : case 1: {
8860 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
8861 0 : if (_ptr_info1) {
8862 0 : NDR_PULL_ALLOC(ndr, r->info1);
8863 : } else {
8864 0 : r->info1 = NULL;
8865 : }
8866 0 : break; }
8867 :
8868 184 : case 2: {
8869 184 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
8870 184 : if (_ptr_info2) {
8871 184 : NDR_PULL_ALLOC(ndr, r->info2);
8872 : } else {
8873 0 : r->info2 = NULL;
8874 : }
8875 180 : break; }
8876 :
8877 96 : case 3: {
8878 96 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
8879 96 : if (_ptr_info3) {
8880 96 : NDR_PULL_ALLOC(ndr, r->info3);
8881 : } else {
8882 0 : r->info3 = NULL;
8883 : }
8884 92 : break; }
8885 :
8886 0 : case 4: {
8887 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
8888 0 : if (_ptr_info4) {
8889 0 : NDR_PULL_ALLOC(ndr, r->info4);
8890 : } else {
8891 0 : r->info4 = NULL;
8892 : }
8893 0 : break; }
8894 :
8895 0 : case 5: {
8896 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
8897 0 : if (_ptr_info5) {
8898 0 : NDR_PULL_ALLOC(ndr, r->info5);
8899 : } else {
8900 0 : r->info5 = NULL;
8901 : }
8902 0 : break; }
8903 :
8904 0 : case 6: {
8905 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
8906 0 : if (_ptr_info6) {
8907 0 : NDR_PULL_ALLOC(ndr, r->info6);
8908 : } else {
8909 0 : r->info6 = NULL;
8910 : }
8911 0 : break; }
8912 :
8913 8 : case 7: {
8914 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
8915 8 : if (_ptr_info7) {
8916 8 : NDR_PULL_ALLOC(ndr, r->info7);
8917 : } else {
8918 0 : r->info7 = NULL;
8919 : }
8920 8 : break; }
8921 :
8922 296 : case 8: {
8923 296 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info8));
8924 296 : if (_ptr_info8) {
8925 296 : NDR_PULL_ALLOC(ndr, r->info8);
8926 : } else {
8927 0 : r->info8 = NULL;
8928 : }
8929 296 : break; }
8930 :
8931 0 : case 9: {
8932 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info9));
8933 0 : if (_ptr_info9) {
8934 0 : NDR_PULL_ALLOC(ndr, r->info9);
8935 : } else {
8936 0 : r->info9 = NULL;
8937 : }
8938 0 : break; }
8939 :
8940 0 : default: {
8941 0 : break; }
8942 :
8943 : }
8944 : }
8945 1376 : if (ndr_flags & NDR_BUFFERS) {
8946 688 : if (!(ndr_flags & NDR_SCALARS)) {
8947 : /* We didn't get it above, and the token is not needed after this. */
8948 688 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8949 : }
8950 688 : switch (level) {
8951 104 : case 0:
8952 104 : if (r->info0) {
8953 0 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
8954 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
8955 0 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
8956 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
8957 : }
8958 104 : break;
8959 :
8960 0 : case 1:
8961 0 : if (r->info1) {
8962 0 : _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
8963 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
8964 0 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
8965 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
8966 : }
8967 0 : break;
8968 :
8969 184 : case 2:
8970 184 : if (r->info2) {
8971 184 : _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
8972 184 : NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
8973 184 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
8974 184 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
8975 : }
8976 180 : break;
8977 :
8978 96 : case 3:
8979 96 : if (r->info3) {
8980 96 : _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
8981 96 : NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
8982 96 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo3(ndr, NDR_SCALARS, r->info3));
8983 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
8984 : }
8985 92 : break;
8986 :
8987 0 : case 4:
8988 0 : if (r->info4) {
8989 0 : _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
8990 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
8991 0 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
8992 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
8993 : }
8994 0 : break;
8995 :
8996 0 : case 5:
8997 0 : if (r->info5) {
8998 0 : _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
8999 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
9000 0 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
9001 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
9002 : }
9003 0 : break;
9004 :
9005 0 : case 6:
9006 0 : if (r->info6) {
9007 0 : _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
9008 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
9009 0 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo6(ndr, NDR_SCALARS, r->info6));
9010 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
9011 : }
9012 0 : break;
9013 :
9014 8 : case 7:
9015 8 : if (r->info7) {
9016 8 : _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
9017 8 : NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
9018 8 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7));
9019 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
9020 : }
9021 8 : break;
9022 :
9023 296 : case 8:
9024 296 : if (r->info8) {
9025 296 : _mem_save_info8_0 = NDR_PULL_GET_MEM_CTX(ndr);
9026 296 : NDR_PULL_SET_MEM_CTX(ndr, r->info8, 0);
9027 296 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo8(ndr, NDR_SCALARS, r->info8));
9028 296 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info8_0, 0);
9029 : }
9030 296 : break;
9031 :
9032 0 : case 9:
9033 0 : if (r->info9) {
9034 0 : _mem_save_info9_0 = NDR_PULL_GET_MEM_CTX(ndr);
9035 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info9, 0);
9036 0 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo9(ndr, NDR_SCALARS, r->info9));
9037 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info9_0, 0);
9038 : }
9039 0 : break;
9040 :
9041 0 : default:
9042 0 : break;
9043 :
9044 : }
9045 : }
9046 1360 : return NDR_ERR_SUCCESS;
9047 : }
9048 :
9049 8 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo(struct ndr_print *ndr, const char *name, const union spoolss_SetPrinterInfo *r)
9050 : {
9051 8 : uint32_t level;
9052 8 : level = ndr_print_steal_switch_value(ndr, r);
9053 8 : ndr_print_union(ndr, name, level, "spoolss_SetPrinterInfo");
9054 8 : switch (level) {
9055 0 : case 0:
9056 0 : ndr_print_ptr(ndr, "info0", r->info0);
9057 0 : ndr->depth++;
9058 0 : if (r->info0) {
9059 0 : ndr_print_spoolss_SetPrinterInfo0(ndr, "info0", r->info0);
9060 : }
9061 0 : ndr->depth--;
9062 0 : break;
9063 :
9064 0 : case 1:
9065 0 : ndr_print_ptr(ndr, "info1", r->info1);
9066 0 : ndr->depth++;
9067 0 : if (r->info1) {
9068 0 : ndr_print_spoolss_SetPrinterInfo1(ndr, "info1", r->info1);
9069 : }
9070 0 : ndr->depth--;
9071 0 : break;
9072 :
9073 4 : case 2:
9074 4 : ndr_print_ptr(ndr, "info2", r->info2);
9075 4 : ndr->depth++;
9076 4 : if (r->info2) {
9077 4 : ndr_print_spoolss_SetPrinterInfo2(ndr, "info2", r->info2);
9078 : }
9079 4 : ndr->depth--;
9080 4 : break;
9081 :
9082 4 : case 3:
9083 4 : ndr_print_ptr(ndr, "info3", r->info3);
9084 4 : ndr->depth++;
9085 4 : if (r->info3) {
9086 4 : ndr_print_spoolss_SetPrinterInfo3(ndr, "info3", r->info3);
9087 : }
9088 4 : ndr->depth--;
9089 4 : break;
9090 :
9091 0 : case 4:
9092 0 : ndr_print_ptr(ndr, "info4", r->info4);
9093 0 : ndr->depth++;
9094 0 : if (r->info4) {
9095 0 : ndr_print_spoolss_SetPrinterInfo4(ndr, "info4", r->info4);
9096 : }
9097 0 : ndr->depth--;
9098 0 : break;
9099 :
9100 0 : case 5:
9101 0 : ndr_print_ptr(ndr, "info5", r->info5);
9102 0 : ndr->depth++;
9103 0 : if (r->info5) {
9104 0 : ndr_print_spoolss_SetPrinterInfo5(ndr, "info5", r->info5);
9105 : }
9106 0 : ndr->depth--;
9107 0 : break;
9108 :
9109 0 : case 6:
9110 0 : ndr_print_ptr(ndr, "info6", r->info6);
9111 0 : ndr->depth++;
9112 0 : if (r->info6) {
9113 0 : ndr_print_spoolss_SetPrinterInfo6(ndr, "info6", r->info6);
9114 : }
9115 0 : ndr->depth--;
9116 0 : break;
9117 :
9118 0 : case 7:
9119 0 : ndr_print_ptr(ndr, "info7", r->info7);
9120 0 : ndr->depth++;
9121 0 : if (r->info7) {
9122 0 : ndr_print_spoolss_SetPrinterInfo7(ndr, "info7", r->info7);
9123 : }
9124 0 : ndr->depth--;
9125 0 : break;
9126 :
9127 0 : case 8:
9128 0 : ndr_print_ptr(ndr, "info8", r->info8);
9129 0 : ndr->depth++;
9130 0 : if (r->info8) {
9131 0 : ndr_print_spoolss_SetPrinterInfo8(ndr, "info8", r->info8);
9132 : }
9133 0 : ndr->depth--;
9134 0 : break;
9135 :
9136 0 : case 9:
9137 0 : ndr_print_ptr(ndr, "info9", r->info9);
9138 0 : ndr->depth++;
9139 0 : if (r->info9) {
9140 0 : ndr_print_spoolss_SetPrinterInfo9(ndr, "info9", r->info9);
9141 : }
9142 0 : ndr->depth--;
9143 0 : break;
9144 :
9145 0 : default:
9146 0 : break;
9147 :
9148 : }
9149 8 : }
9150 :
9151 680 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetPrinterInfoCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPrinterInfoCtr *r)
9152 : {
9153 680 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9154 680 : if (ndr_flags & NDR_SCALARS) {
9155 680 : NDR_CHECK(ndr_push_align(ndr, 5));
9156 680 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
9157 680 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
9158 680 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr, NDR_SCALARS, &r->info));
9159 680 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9160 : }
9161 680 : if (ndr_flags & NDR_BUFFERS) {
9162 680 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
9163 680 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr, NDR_BUFFERS, &r->info));
9164 : }
9165 680 : return NDR_ERR_SUCCESS;
9166 : }
9167 :
9168 688 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetPrinterInfoCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPrinterInfoCtr *r)
9169 : {
9170 688 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9171 688 : if (ndr_flags & NDR_SCALARS) {
9172 688 : NDR_CHECK(ndr_pull_align(ndr, 5));
9173 688 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
9174 688 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
9175 688 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr, NDR_SCALARS, &r->info));
9176 688 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9177 : }
9178 688 : if (ndr_flags & NDR_BUFFERS) {
9179 688 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
9180 688 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr, NDR_BUFFERS, &r->info));
9181 : }
9182 680 : return NDR_ERR_SUCCESS;
9183 : }
9184 :
9185 0 : static void ndr_print_flags_spoolss_SetPrinterInfoCtr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_SetPrinterInfoCtr *r)
9186 : {
9187 0 : ndr_print_spoolss_SetPrinterInfoCtr(ndr, name, r);
9188 0 : }
9189 :
9190 8 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfoCtr(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfoCtr *r)
9191 : {
9192 8 : ndr_print_struct(ndr, name, "spoolss_SetPrinterInfoCtr");
9193 8 : if (r == NULL) { ndr_print_null(ndr); return; }
9194 8 : ndr->depth++;
9195 8 : ndr_print_uint32(ndr, "level", r->level);
9196 8 : ndr_print_set_switch_value(ndr, &r->info, r->level);
9197 8 : ndr_print_spoolss_SetPrinterInfo(ndr, "info", &r->info);
9198 8 : ndr->depth--;
9199 : }
9200 :
9201 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_StringArray(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_StringArray *r)
9202 : {
9203 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9204 0 : if (ndr_flags & NDR_SCALARS) {
9205 0 : NDR_CHECK(ndr_push_align(ndr, 4));
9206 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (ndr_size_spoolss_StringArray(r, ndr->flags) - 4) / 2));
9207 : {
9208 0 : libndr_flags _flags_save_string_array = ndr->flags;
9209 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
9210 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->string));
9211 0 : ndr->flags = _flags_save_string_array;
9212 : }
9213 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9214 : }
9215 0 : if (ndr_flags & NDR_BUFFERS) {
9216 0 : }
9217 0 : return NDR_ERR_SUCCESS;
9218 : }
9219 :
9220 8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_StringArray(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_StringArray *r)
9221 : {
9222 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9223 8 : if (ndr_flags & NDR_SCALARS) {
9224 8 : NDR_CHECK(ndr_pull_align(ndr, 4));
9225 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
9226 : {
9227 8 : libndr_flags _flags_save_string_array = ndr->flags;
9228 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
9229 8 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->string));
9230 8 : ndr->flags = _flags_save_string_array;
9231 : }
9232 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9233 : }
9234 8 : if (ndr_flags & NDR_BUFFERS) {
9235 8 : }
9236 8 : return NDR_ERR_SUCCESS;
9237 : }
9238 :
9239 0 : static void ndr_print_flags_spoolss_StringArray(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_StringArray *r)
9240 : {
9241 0 : ndr_print_spoolss_StringArray(ndr, name, r);
9242 0 : }
9243 :
9244 8 : _PUBLIC_ void ndr_print_spoolss_StringArray(struct ndr_print *ndr, const char *name, const struct spoolss_StringArray *r)
9245 : {
9246 8 : ndr_print_struct(ndr, name, "spoolss_StringArray");
9247 8 : if (r == NULL) { ndr_print_null(ndr); return; }
9248 8 : ndr->depth++;
9249 8 : ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(ndr_size_spoolss_StringArray(r, ndr->flags) - 4) / 2:r->_ndr_size);
9250 : {
9251 8 : libndr_flags _flags_save_string_array = ndr->flags;
9252 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
9253 8 : ndr_print_string_array(ndr, "string", r->string);
9254 8 : ndr->flags = _flags_save_string_array;
9255 : }
9256 8 : ndr->depth--;
9257 : }
9258 :
9259 0 : static enum ndr_err_code ndr_push_spoolss_AddDriverInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_AddDriverInfo1 *r)
9260 : {
9261 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9262 0 : if (ndr_flags & NDR_SCALARS) {
9263 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9264 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
9265 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9266 : }
9267 0 : if (ndr_flags & NDR_BUFFERS) {
9268 0 : if (r->driver_name) {
9269 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
9270 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9271 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
9272 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9273 : }
9274 : }
9275 0 : return NDR_ERR_SUCCESS;
9276 : }
9277 :
9278 0 : static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_AddDriverInfo1 *r)
9279 : {
9280 0 : uint32_t _ptr_driver_name;
9281 0 : uint32_t size_driver_name_1 = 0;
9282 0 : uint32_t length_driver_name_1 = 0;
9283 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
9284 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9285 0 : if (ndr_flags & NDR_SCALARS) {
9286 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
9287 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
9288 0 : if (_ptr_driver_name) {
9289 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
9290 : } else {
9291 0 : r->driver_name = NULL;
9292 : }
9293 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9294 : }
9295 0 : if (ndr_flags & NDR_BUFFERS) {
9296 0 : if (r->driver_name) {
9297 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9298 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
9299 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
9300 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
9301 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_name, &size_driver_name_1));
9302 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_name, &length_driver_name_1));
9303 0 : if (length_driver_name_1 > size_driver_name_1) {
9304 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_name_1, length_driver_name_1);
9305 : }
9306 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_name_1, sizeof(uint16_t)));
9307 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, length_driver_name_1, sizeof(uint16_t), CH_UTF16));
9308 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
9309 : }
9310 : }
9311 0 : return NDR_ERR_SUCCESS;
9312 : }
9313 :
9314 0 : _PUBLIC_ void ndr_print_spoolss_AddDriverInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo1 *r)
9315 : {
9316 0 : ndr_print_struct(ndr, name, "spoolss_AddDriverInfo1");
9317 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9318 0 : ndr->depth++;
9319 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
9320 0 : ndr->depth++;
9321 0 : if (r->driver_name) {
9322 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
9323 : }
9324 0 : ndr->depth--;
9325 0 : ndr->depth--;
9326 : }
9327 :
9328 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverOSVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DriverOSVersion r)
9329 : {
9330 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
9331 0 : return NDR_ERR_SUCCESS;
9332 : }
9333 :
9334 6 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverOSVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DriverOSVersion *r)
9335 : {
9336 6 : uint32_t v;
9337 6 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
9338 6 : *r = v;
9339 6 : return NDR_ERR_SUCCESS;
9340 : }
9341 :
9342 6 : _PUBLIC_ void ndr_print_spoolss_DriverOSVersion(struct ndr_print *ndr, const char *name, enum spoolss_DriverOSVersion r)
9343 : {
9344 6 : const char *val = NULL;
9345 :
9346 6 : switch (r) {
9347 4 : case SPOOLSS_DRIVER_VERSION_9X: val = "SPOOLSS_DRIVER_VERSION_9X"; break;
9348 0 : case SPOOLSS_DRIVER_VERSION_NT35: val = "SPOOLSS_DRIVER_VERSION_NT35"; break;
9349 0 : case SPOOLSS_DRIVER_VERSION_NT4: val = "SPOOLSS_DRIVER_VERSION_NT4"; break;
9350 2 : case SPOOLSS_DRIVER_VERSION_200X: val = "SPOOLSS_DRIVER_VERSION_200X"; break;
9351 0 : case SPOOLSS_DRIVER_VERSION_2012: val = "SPOOLSS_DRIVER_VERSION_2012"; break;
9352 : }
9353 6 : ndr_print_enum(ndr, name, "ENUM", val, r);
9354 6 : }
9355 :
9356 0 : static enum ndr_err_code ndr_push_spoolss_AddDriverInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_AddDriverInfo2 *r)
9357 : {
9358 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9359 0 : if (ndr_flags & NDR_SCALARS) {
9360 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9361 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
9362 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
9363 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->architecture));
9364 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path));
9365 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file));
9366 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file));
9367 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9368 : }
9369 0 : if (ndr_flags & NDR_BUFFERS) {
9370 0 : if (r->driver_name) {
9371 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
9372 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9373 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
9374 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9375 : }
9376 0 : if (r->architecture) {
9377 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
9378 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9379 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
9380 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->architecture, ndr_charset_length(r->architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9381 : }
9382 0 : if (r->driver_path) {
9383 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
9384 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9385 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
9386 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_path, ndr_charset_length(r->driver_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9387 : }
9388 0 : if (r->data_file) {
9389 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
9390 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9391 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
9392 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_file, ndr_charset_length(r->data_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9393 : }
9394 0 : if (r->config_file) {
9395 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
9396 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9397 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
9398 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->config_file, ndr_charset_length(r->config_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9399 : }
9400 : }
9401 0 : return NDR_ERR_SUCCESS;
9402 : }
9403 :
9404 0 : static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_AddDriverInfo2 *r)
9405 : {
9406 0 : uint32_t _ptr_driver_name;
9407 0 : uint32_t size_driver_name_1 = 0;
9408 0 : uint32_t length_driver_name_1 = 0;
9409 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
9410 0 : uint32_t _ptr_architecture;
9411 0 : uint32_t size_architecture_1 = 0;
9412 0 : uint32_t length_architecture_1 = 0;
9413 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
9414 0 : uint32_t _ptr_driver_path;
9415 0 : uint32_t size_driver_path_1 = 0;
9416 0 : uint32_t length_driver_path_1 = 0;
9417 0 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
9418 0 : uint32_t _ptr_data_file;
9419 0 : uint32_t size_data_file_1 = 0;
9420 0 : uint32_t length_data_file_1 = 0;
9421 0 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
9422 0 : uint32_t _ptr_config_file;
9423 0 : uint32_t size_config_file_1 = 0;
9424 0 : uint32_t length_config_file_1 = 0;
9425 0 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
9426 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9427 0 : if (ndr_flags & NDR_SCALARS) {
9428 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
9429 0 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
9430 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
9431 0 : if (_ptr_driver_name) {
9432 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
9433 : } else {
9434 0 : r->driver_name = NULL;
9435 : }
9436 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
9437 0 : if (_ptr_architecture) {
9438 0 : NDR_PULL_ALLOC(ndr, r->architecture);
9439 : } else {
9440 0 : r->architecture = NULL;
9441 : }
9442 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
9443 0 : if (_ptr_driver_path) {
9444 0 : NDR_PULL_ALLOC(ndr, r->driver_path);
9445 : } else {
9446 0 : r->driver_path = NULL;
9447 : }
9448 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
9449 0 : if (_ptr_data_file) {
9450 0 : NDR_PULL_ALLOC(ndr, r->data_file);
9451 : } else {
9452 0 : r->data_file = NULL;
9453 : }
9454 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
9455 0 : if (_ptr_config_file) {
9456 0 : NDR_PULL_ALLOC(ndr, r->config_file);
9457 : } else {
9458 0 : r->config_file = NULL;
9459 : }
9460 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9461 : }
9462 0 : if (ndr_flags & NDR_BUFFERS) {
9463 0 : if (r->driver_name) {
9464 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9465 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
9466 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
9467 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
9468 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_name, &size_driver_name_1));
9469 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_name, &length_driver_name_1));
9470 0 : if (length_driver_name_1 > size_driver_name_1) {
9471 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_name_1, length_driver_name_1);
9472 : }
9473 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_name_1, sizeof(uint16_t)));
9474 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, length_driver_name_1, sizeof(uint16_t), CH_UTF16));
9475 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
9476 : }
9477 0 : if (r->architecture) {
9478 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
9479 0 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
9480 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->architecture));
9481 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->architecture));
9482 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->architecture, &size_architecture_1));
9483 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->architecture, &length_architecture_1));
9484 0 : if (length_architecture_1 > size_architecture_1) {
9485 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_1, length_architecture_1);
9486 : }
9487 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_1, sizeof(uint16_t)));
9488 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->architecture, length_architecture_1, sizeof(uint16_t), CH_UTF16));
9489 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
9490 : }
9491 0 : if (r->driver_path) {
9492 0 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
9493 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
9494 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_path));
9495 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_path));
9496 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_path, &size_driver_path_1));
9497 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_path, &length_driver_path_1));
9498 0 : if (length_driver_path_1 > size_driver_path_1) {
9499 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_path_1, length_driver_path_1);
9500 : }
9501 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_path_1, sizeof(uint16_t)));
9502 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_path, length_driver_path_1, sizeof(uint16_t), CH_UTF16));
9503 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
9504 : }
9505 0 : if (r->data_file) {
9506 0 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9507 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
9508 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data_file));
9509 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data_file));
9510 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_file, &size_data_file_1));
9511 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_file, &length_data_file_1));
9512 0 : if (length_data_file_1 > size_data_file_1) {
9513 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_file_1, length_data_file_1);
9514 : }
9515 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_data_file_1, sizeof(uint16_t)));
9516 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_file, length_data_file_1, sizeof(uint16_t), CH_UTF16));
9517 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
9518 : }
9519 0 : if (r->config_file) {
9520 0 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9521 0 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
9522 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->config_file));
9523 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->config_file));
9524 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->config_file, &size_config_file_1));
9525 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->config_file, &length_config_file_1));
9526 0 : if (length_config_file_1 > size_config_file_1) {
9527 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_config_file_1, length_config_file_1);
9528 : }
9529 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_config_file_1, sizeof(uint16_t)));
9530 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->config_file, length_config_file_1, sizeof(uint16_t), CH_UTF16));
9531 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
9532 : }
9533 : }
9534 0 : return NDR_ERR_SUCCESS;
9535 : }
9536 :
9537 0 : _PUBLIC_ void ndr_print_spoolss_AddDriverInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo2 *r)
9538 : {
9539 0 : ndr_print_struct(ndr, name, "spoolss_AddDriverInfo2");
9540 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9541 0 : ndr->depth++;
9542 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
9543 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
9544 0 : ndr->depth++;
9545 0 : if (r->driver_name) {
9546 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
9547 : }
9548 0 : ndr->depth--;
9549 0 : ndr_print_ptr(ndr, "architecture", r->architecture);
9550 0 : ndr->depth++;
9551 0 : if (r->architecture) {
9552 0 : ndr_print_string(ndr, "architecture", r->architecture);
9553 : }
9554 0 : ndr->depth--;
9555 0 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
9556 0 : ndr->depth++;
9557 0 : if (r->driver_path) {
9558 0 : ndr_print_string(ndr, "driver_path", r->driver_path);
9559 : }
9560 0 : ndr->depth--;
9561 0 : ndr_print_ptr(ndr, "data_file", r->data_file);
9562 0 : ndr->depth++;
9563 0 : if (r->data_file) {
9564 0 : ndr_print_string(ndr, "data_file", r->data_file);
9565 : }
9566 0 : ndr->depth--;
9567 0 : ndr_print_ptr(ndr, "config_file", r->config_file);
9568 0 : ndr->depth++;
9569 0 : if (r->config_file) {
9570 0 : ndr_print_string(ndr, "config_file", r->config_file);
9571 : }
9572 0 : ndr->depth--;
9573 0 : ndr->depth--;
9574 : }
9575 :
9576 0 : static enum ndr_err_code ndr_push_spoolss_AddDriverInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_AddDriverInfo3 *r)
9577 : {
9578 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9579 0 : if (ndr_flags & NDR_SCALARS) {
9580 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9581 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
9582 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
9583 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->architecture));
9584 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path));
9585 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file));
9586 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file));
9587 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->help_file));
9588 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->monitor_name));
9589 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_datatype));
9590 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->dependent_files, ndr->flags) - 4) / 2)));
9591 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependent_files));
9592 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9593 : }
9594 0 : if (ndr_flags & NDR_BUFFERS) {
9595 0 : if (r->driver_name) {
9596 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
9597 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9598 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
9599 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9600 : }
9601 0 : if (r->architecture) {
9602 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
9603 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9604 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
9605 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->architecture, ndr_charset_length(r->architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9606 : }
9607 0 : if (r->driver_path) {
9608 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
9609 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9610 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
9611 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_path, ndr_charset_length(r->driver_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9612 : }
9613 0 : if (r->data_file) {
9614 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
9615 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9616 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
9617 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_file, ndr_charset_length(r->data_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9618 : }
9619 0 : if (r->config_file) {
9620 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
9621 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9622 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
9623 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->config_file, ndr_charset_length(r->config_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9624 : }
9625 0 : if (r->help_file) {
9626 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
9627 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9628 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
9629 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->help_file, ndr_charset_length(r->help_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9630 : }
9631 0 : if (r->monitor_name) {
9632 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
9633 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9634 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
9635 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->monitor_name, ndr_charset_length(r->monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9636 : }
9637 0 : if (r->default_datatype) {
9638 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
9639 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9640 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
9641 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->default_datatype, ndr_charset_length(r->default_datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9642 : }
9643 0 : if (r->dependent_files) {
9644 0 : NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
9645 : }
9646 : }
9647 0 : return NDR_ERR_SUCCESS;
9648 : }
9649 :
9650 0 : static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_AddDriverInfo3 *r)
9651 : {
9652 0 : uint32_t _ptr_driver_name;
9653 0 : uint32_t size_driver_name_1 = 0;
9654 0 : uint32_t length_driver_name_1 = 0;
9655 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
9656 0 : uint32_t _ptr_architecture;
9657 0 : uint32_t size_architecture_1 = 0;
9658 0 : uint32_t length_architecture_1 = 0;
9659 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
9660 0 : uint32_t _ptr_driver_path;
9661 0 : uint32_t size_driver_path_1 = 0;
9662 0 : uint32_t length_driver_path_1 = 0;
9663 0 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
9664 0 : uint32_t _ptr_data_file;
9665 0 : uint32_t size_data_file_1 = 0;
9666 0 : uint32_t length_data_file_1 = 0;
9667 0 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
9668 0 : uint32_t _ptr_config_file;
9669 0 : uint32_t size_config_file_1 = 0;
9670 0 : uint32_t length_config_file_1 = 0;
9671 0 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
9672 0 : uint32_t _ptr_help_file;
9673 0 : uint32_t size_help_file_1 = 0;
9674 0 : uint32_t length_help_file_1 = 0;
9675 0 : TALLOC_CTX *_mem_save_help_file_0 = NULL;
9676 0 : uint32_t _ptr_monitor_name;
9677 0 : uint32_t size_monitor_name_1 = 0;
9678 0 : uint32_t length_monitor_name_1 = 0;
9679 0 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
9680 0 : uint32_t _ptr_default_datatype;
9681 0 : uint32_t size_default_datatype_1 = 0;
9682 0 : uint32_t length_default_datatype_1 = 0;
9683 0 : TALLOC_CTX *_mem_save_default_datatype_0 = NULL;
9684 0 : uint32_t _ptr_dependent_files;
9685 0 : TALLOC_CTX *_mem_save_dependent_files_0 = NULL;
9686 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9687 0 : if (ndr_flags & NDR_SCALARS) {
9688 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
9689 0 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
9690 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
9691 0 : if (_ptr_driver_name) {
9692 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
9693 : } else {
9694 0 : r->driver_name = NULL;
9695 : }
9696 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
9697 0 : if (_ptr_architecture) {
9698 0 : NDR_PULL_ALLOC(ndr, r->architecture);
9699 : } else {
9700 0 : r->architecture = NULL;
9701 : }
9702 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
9703 0 : if (_ptr_driver_path) {
9704 0 : NDR_PULL_ALLOC(ndr, r->driver_path);
9705 : } else {
9706 0 : r->driver_path = NULL;
9707 : }
9708 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
9709 0 : if (_ptr_data_file) {
9710 0 : NDR_PULL_ALLOC(ndr, r->data_file);
9711 : } else {
9712 0 : r->data_file = NULL;
9713 : }
9714 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
9715 0 : if (_ptr_config_file) {
9716 0 : NDR_PULL_ALLOC(ndr, r->config_file);
9717 : } else {
9718 0 : r->config_file = NULL;
9719 : }
9720 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
9721 0 : if (_ptr_help_file) {
9722 0 : NDR_PULL_ALLOC(ndr, r->help_file);
9723 : } else {
9724 0 : r->help_file = NULL;
9725 : }
9726 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
9727 0 : if (_ptr_monitor_name) {
9728 0 : NDR_PULL_ALLOC(ndr, r->monitor_name);
9729 : } else {
9730 0 : r->monitor_name = NULL;
9731 : }
9732 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
9733 0 : if (_ptr_default_datatype) {
9734 0 : NDR_PULL_ALLOC(ndr, r->default_datatype);
9735 : } else {
9736 0 : r->default_datatype = NULL;
9737 : }
9738 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_dependent_files));
9739 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
9740 0 : if (_ptr_dependent_files) {
9741 0 : NDR_PULL_ALLOC(ndr, r->dependent_files);
9742 : } else {
9743 0 : r->dependent_files = NULL;
9744 : }
9745 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9746 : }
9747 0 : if (ndr_flags & NDR_BUFFERS) {
9748 0 : if (r->driver_name) {
9749 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9750 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
9751 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
9752 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
9753 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_name, &size_driver_name_1));
9754 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_name, &length_driver_name_1));
9755 0 : if (length_driver_name_1 > size_driver_name_1) {
9756 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_name_1, length_driver_name_1);
9757 : }
9758 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_name_1, sizeof(uint16_t)));
9759 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, length_driver_name_1, sizeof(uint16_t), CH_UTF16));
9760 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
9761 : }
9762 0 : if (r->architecture) {
9763 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
9764 0 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
9765 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->architecture));
9766 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->architecture));
9767 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->architecture, &size_architecture_1));
9768 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->architecture, &length_architecture_1));
9769 0 : if (length_architecture_1 > size_architecture_1) {
9770 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_1, length_architecture_1);
9771 : }
9772 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_1, sizeof(uint16_t)));
9773 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->architecture, length_architecture_1, sizeof(uint16_t), CH_UTF16));
9774 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
9775 : }
9776 0 : if (r->driver_path) {
9777 0 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
9778 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
9779 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_path));
9780 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_path));
9781 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_path, &size_driver_path_1));
9782 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_path, &length_driver_path_1));
9783 0 : if (length_driver_path_1 > size_driver_path_1) {
9784 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_path_1, length_driver_path_1);
9785 : }
9786 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_path_1, sizeof(uint16_t)));
9787 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_path, length_driver_path_1, sizeof(uint16_t), CH_UTF16));
9788 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
9789 : }
9790 0 : if (r->data_file) {
9791 0 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9792 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
9793 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data_file));
9794 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data_file));
9795 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_file, &size_data_file_1));
9796 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_file, &length_data_file_1));
9797 0 : if (length_data_file_1 > size_data_file_1) {
9798 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_file_1, length_data_file_1);
9799 : }
9800 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_data_file_1, sizeof(uint16_t)));
9801 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_file, length_data_file_1, sizeof(uint16_t), CH_UTF16));
9802 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
9803 : }
9804 0 : if (r->config_file) {
9805 0 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9806 0 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
9807 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->config_file));
9808 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->config_file));
9809 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->config_file, &size_config_file_1));
9810 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->config_file, &length_config_file_1));
9811 0 : if (length_config_file_1 > size_config_file_1) {
9812 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_config_file_1, length_config_file_1);
9813 : }
9814 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_config_file_1, sizeof(uint16_t)));
9815 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->config_file, length_config_file_1, sizeof(uint16_t), CH_UTF16));
9816 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
9817 : }
9818 0 : if (r->help_file) {
9819 0 : _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9820 0 : NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
9821 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->help_file));
9822 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->help_file));
9823 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->help_file, &size_help_file_1));
9824 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->help_file, &length_help_file_1));
9825 0 : if (length_help_file_1 > size_help_file_1) {
9826 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_help_file_1, length_help_file_1);
9827 : }
9828 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_help_file_1, sizeof(uint16_t)));
9829 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->help_file, length_help_file_1, sizeof(uint16_t), CH_UTF16));
9830 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
9831 : }
9832 0 : if (r->monitor_name) {
9833 0 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9834 0 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
9835 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->monitor_name));
9836 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->monitor_name));
9837 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->monitor_name, &size_monitor_name_1));
9838 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->monitor_name, &length_monitor_name_1));
9839 0 : if (length_monitor_name_1 > size_monitor_name_1) {
9840 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_monitor_name_1, length_monitor_name_1);
9841 : }
9842 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_monitor_name_1, sizeof(uint16_t)));
9843 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->monitor_name, length_monitor_name_1, sizeof(uint16_t), CH_UTF16));
9844 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
9845 : }
9846 0 : if (r->default_datatype) {
9847 0 : _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
9848 0 : NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
9849 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->default_datatype));
9850 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->default_datatype));
9851 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->default_datatype, &size_default_datatype_1));
9852 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->default_datatype, &length_default_datatype_1));
9853 0 : if (length_default_datatype_1 > size_default_datatype_1) {
9854 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_default_datatype_1, length_default_datatype_1);
9855 : }
9856 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_default_datatype_1, sizeof(uint16_t)));
9857 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->default_datatype, length_default_datatype_1, sizeof(uint16_t), CH_UTF16));
9858 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
9859 : }
9860 0 : if (r->dependent_files) {
9861 0 : _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
9862 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
9863 0 : NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
9864 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
9865 : }
9866 : }
9867 0 : return NDR_ERR_SUCCESS;
9868 : }
9869 :
9870 0 : _PUBLIC_ void ndr_print_spoolss_AddDriverInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo3 *r)
9871 : {
9872 0 : ndr_print_struct(ndr, name, "spoolss_AddDriverInfo3");
9873 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9874 0 : ndr->depth++;
9875 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
9876 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
9877 0 : ndr->depth++;
9878 0 : if (r->driver_name) {
9879 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
9880 : }
9881 0 : ndr->depth--;
9882 0 : ndr_print_ptr(ndr, "architecture", r->architecture);
9883 0 : ndr->depth++;
9884 0 : if (r->architecture) {
9885 0 : ndr_print_string(ndr, "architecture", r->architecture);
9886 : }
9887 0 : ndr->depth--;
9888 0 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
9889 0 : ndr->depth++;
9890 0 : if (r->driver_path) {
9891 0 : ndr_print_string(ndr, "driver_path", r->driver_path);
9892 : }
9893 0 : ndr->depth--;
9894 0 : ndr_print_ptr(ndr, "data_file", r->data_file);
9895 0 : ndr->depth++;
9896 0 : if (r->data_file) {
9897 0 : ndr_print_string(ndr, "data_file", r->data_file);
9898 : }
9899 0 : ndr->depth--;
9900 0 : ndr_print_ptr(ndr, "config_file", r->config_file);
9901 0 : ndr->depth++;
9902 0 : if (r->config_file) {
9903 0 : ndr_print_string(ndr, "config_file", r->config_file);
9904 : }
9905 0 : ndr->depth--;
9906 0 : ndr_print_ptr(ndr, "help_file", r->help_file);
9907 0 : ndr->depth++;
9908 0 : if (r->help_file) {
9909 0 : ndr_print_string(ndr, "help_file", r->help_file);
9910 : }
9911 0 : ndr->depth--;
9912 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
9913 0 : ndr->depth++;
9914 0 : if (r->monitor_name) {
9915 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
9916 : }
9917 0 : ndr->depth--;
9918 0 : ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
9919 0 : ndr->depth++;
9920 0 : if (r->default_datatype) {
9921 0 : ndr_print_string(ndr, "default_datatype", r->default_datatype);
9922 : }
9923 0 : ndr->depth--;
9924 0 : ndr_print_uint32(ndr, "_ndr_size_dependent_files", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->dependent_files, ndr->flags) - 4) / 2):r->_ndr_size_dependent_files);
9925 0 : ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
9926 0 : ndr->depth++;
9927 0 : if (r->dependent_files) {
9928 0 : ndr_print_spoolss_StringArray(ndr, "dependent_files", r->dependent_files);
9929 : }
9930 0 : ndr->depth--;
9931 0 : ndr->depth--;
9932 : }
9933 :
9934 0 : static enum ndr_err_code ndr_push_spoolss_AddDriverInfo4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_AddDriverInfo4 *r)
9935 : {
9936 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9937 0 : if (ndr_flags & NDR_SCALARS) {
9938 0 : NDR_CHECK(ndr_push_align(ndr, 5));
9939 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
9940 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
9941 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->architecture));
9942 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path));
9943 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file));
9944 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file));
9945 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->help_file));
9946 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->monitor_name));
9947 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_datatype));
9948 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->dependent_files, ndr->flags) - 4) / 2)));
9949 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependent_files));
9950 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->previous_names, ndr->flags) - 4) / 2)));
9951 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->previous_names));
9952 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9953 : }
9954 0 : if (ndr_flags & NDR_BUFFERS) {
9955 0 : if (r->driver_name) {
9956 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
9957 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9958 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
9959 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9960 : }
9961 0 : if (r->architecture) {
9962 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
9963 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9964 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
9965 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->architecture, ndr_charset_length(r->architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9966 : }
9967 0 : if (r->driver_path) {
9968 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
9969 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9970 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
9971 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_path, ndr_charset_length(r->driver_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9972 : }
9973 0 : if (r->data_file) {
9974 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
9975 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9976 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
9977 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_file, ndr_charset_length(r->data_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9978 : }
9979 0 : if (r->config_file) {
9980 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
9981 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9982 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
9983 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->config_file, ndr_charset_length(r->config_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9984 : }
9985 0 : if (r->help_file) {
9986 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
9987 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9988 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
9989 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->help_file, ndr_charset_length(r->help_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9990 : }
9991 0 : if (r->monitor_name) {
9992 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
9993 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9994 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
9995 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->monitor_name, ndr_charset_length(r->monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9996 : }
9997 0 : if (r->default_datatype) {
9998 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
9999 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10000 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
10001 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->default_datatype, ndr_charset_length(r->default_datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10002 : }
10003 0 : if (r->dependent_files) {
10004 0 : NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
10005 : }
10006 0 : if (r->previous_names) {
10007 0 : NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
10008 : }
10009 : }
10010 0 : return NDR_ERR_SUCCESS;
10011 : }
10012 :
10013 0 : static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_AddDriverInfo4 *r)
10014 : {
10015 0 : uint32_t _ptr_driver_name;
10016 0 : uint32_t size_driver_name_1 = 0;
10017 0 : uint32_t length_driver_name_1 = 0;
10018 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
10019 0 : uint32_t _ptr_architecture;
10020 0 : uint32_t size_architecture_1 = 0;
10021 0 : uint32_t length_architecture_1 = 0;
10022 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
10023 0 : uint32_t _ptr_driver_path;
10024 0 : uint32_t size_driver_path_1 = 0;
10025 0 : uint32_t length_driver_path_1 = 0;
10026 0 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
10027 0 : uint32_t _ptr_data_file;
10028 0 : uint32_t size_data_file_1 = 0;
10029 0 : uint32_t length_data_file_1 = 0;
10030 0 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
10031 0 : uint32_t _ptr_config_file;
10032 0 : uint32_t size_config_file_1 = 0;
10033 0 : uint32_t length_config_file_1 = 0;
10034 0 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
10035 0 : uint32_t _ptr_help_file;
10036 0 : uint32_t size_help_file_1 = 0;
10037 0 : uint32_t length_help_file_1 = 0;
10038 0 : TALLOC_CTX *_mem_save_help_file_0 = NULL;
10039 0 : uint32_t _ptr_monitor_name;
10040 0 : uint32_t size_monitor_name_1 = 0;
10041 0 : uint32_t length_monitor_name_1 = 0;
10042 0 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
10043 0 : uint32_t _ptr_default_datatype;
10044 0 : uint32_t size_default_datatype_1 = 0;
10045 0 : uint32_t length_default_datatype_1 = 0;
10046 0 : TALLOC_CTX *_mem_save_default_datatype_0 = NULL;
10047 0 : uint32_t _ptr_dependent_files;
10048 0 : TALLOC_CTX *_mem_save_dependent_files_0 = NULL;
10049 0 : uint32_t _ptr_previous_names;
10050 0 : TALLOC_CTX *_mem_save_previous_names_0 = NULL;
10051 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10052 0 : if (ndr_flags & NDR_SCALARS) {
10053 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
10054 0 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
10055 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
10056 0 : if (_ptr_driver_name) {
10057 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
10058 : } else {
10059 0 : r->driver_name = NULL;
10060 : }
10061 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
10062 0 : if (_ptr_architecture) {
10063 0 : NDR_PULL_ALLOC(ndr, r->architecture);
10064 : } else {
10065 0 : r->architecture = NULL;
10066 : }
10067 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
10068 0 : if (_ptr_driver_path) {
10069 0 : NDR_PULL_ALLOC(ndr, r->driver_path);
10070 : } else {
10071 0 : r->driver_path = NULL;
10072 : }
10073 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
10074 0 : if (_ptr_data_file) {
10075 0 : NDR_PULL_ALLOC(ndr, r->data_file);
10076 : } else {
10077 0 : r->data_file = NULL;
10078 : }
10079 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
10080 0 : if (_ptr_config_file) {
10081 0 : NDR_PULL_ALLOC(ndr, r->config_file);
10082 : } else {
10083 0 : r->config_file = NULL;
10084 : }
10085 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
10086 0 : if (_ptr_help_file) {
10087 0 : NDR_PULL_ALLOC(ndr, r->help_file);
10088 : } else {
10089 0 : r->help_file = NULL;
10090 : }
10091 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
10092 0 : if (_ptr_monitor_name) {
10093 0 : NDR_PULL_ALLOC(ndr, r->monitor_name);
10094 : } else {
10095 0 : r->monitor_name = NULL;
10096 : }
10097 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
10098 0 : if (_ptr_default_datatype) {
10099 0 : NDR_PULL_ALLOC(ndr, r->default_datatype);
10100 : } else {
10101 0 : r->default_datatype = NULL;
10102 : }
10103 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_dependent_files));
10104 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
10105 0 : if (_ptr_dependent_files) {
10106 0 : NDR_PULL_ALLOC(ndr, r->dependent_files);
10107 : } else {
10108 0 : r->dependent_files = NULL;
10109 : }
10110 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_previous_names));
10111 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
10112 0 : if (_ptr_previous_names) {
10113 0 : NDR_PULL_ALLOC(ndr, r->previous_names);
10114 : } else {
10115 0 : r->previous_names = NULL;
10116 : }
10117 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10118 : }
10119 0 : if (ndr_flags & NDR_BUFFERS) {
10120 0 : if (r->driver_name) {
10121 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10122 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
10123 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
10124 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
10125 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_name, &size_driver_name_1));
10126 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_name, &length_driver_name_1));
10127 0 : if (length_driver_name_1 > size_driver_name_1) {
10128 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_name_1, length_driver_name_1);
10129 : }
10130 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_name_1, sizeof(uint16_t)));
10131 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, length_driver_name_1, sizeof(uint16_t), CH_UTF16));
10132 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
10133 : }
10134 0 : if (r->architecture) {
10135 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
10136 0 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
10137 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->architecture));
10138 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->architecture));
10139 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->architecture, &size_architecture_1));
10140 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->architecture, &length_architecture_1));
10141 0 : if (length_architecture_1 > size_architecture_1) {
10142 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_1, length_architecture_1);
10143 : }
10144 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_1, sizeof(uint16_t)));
10145 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->architecture, length_architecture_1, sizeof(uint16_t), CH_UTF16));
10146 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
10147 : }
10148 0 : if (r->driver_path) {
10149 0 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
10150 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
10151 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_path));
10152 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_path));
10153 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_path, &size_driver_path_1));
10154 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_path, &length_driver_path_1));
10155 0 : if (length_driver_path_1 > size_driver_path_1) {
10156 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_path_1, length_driver_path_1);
10157 : }
10158 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_path_1, sizeof(uint16_t)));
10159 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_path, length_driver_path_1, sizeof(uint16_t), CH_UTF16));
10160 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
10161 : }
10162 0 : if (r->data_file) {
10163 0 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
10164 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
10165 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data_file));
10166 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data_file));
10167 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_file, &size_data_file_1));
10168 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_file, &length_data_file_1));
10169 0 : if (length_data_file_1 > size_data_file_1) {
10170 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_file_1, length_data_file_1);
10171 : }
10172 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_data_file_1, sizeof(uint16_t)));
10173 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_file, length_data_file_1, sizeof(uint16_t), CH_UTF16));
10174 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
10175 : }
10176 0 : if (r->config_file) {
10177 0 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
10178 0 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
10179 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->config_file));
10180 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->config_file));
10181 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->config_file, &size_config_file_1));
10182 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->config_file, &length_config_file_1));
10183 0 : if (length_config_file_1 > size_config_file_1) {
10184 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_config_file_1, length_config_file_1);
10185 : }
10186 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_config_file_1, sizeof(uint16_t)));
10187 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->config_file, length_config_file_1, sizeof(uint16_t), CH_UTF16));
10188 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
10189 : }
10190 0 : if (r->help_file) {
10191 0 : _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
10192 0 : NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
10193 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->help_file));
10194 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->help_file));
10195 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->help_file, &size_help_file_1));
10196 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->help_file, &length_help_file_1));
10197 0 : if (length_help_file_1 > size_help_file_1) {
10198 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_help_file_1, length_help_file_1);
10199 : }
10200 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_help_file_1, sizeof(uint16_t)));
10201 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->help_file, length_help_file_1, sizeof(uint16_t), CH_UTF16));
10202 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
10203 : }
10204 0 : if (r->monitor_name) {
10205 0 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10206 0 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
10207 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->monitor_name));
10208 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->monitor_name));
10209 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->monitor_name, &size_monitor_name_1));
10210 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->monitor_name, &length_monitor_name_1));
10211 0 : if (length_monitor_name_1 > size_monitor_name_1) {
10212 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_monitor_name_1, length_monitor_name_1);
10213 : }
10214 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_monitor_name_1, sizeof(uint16_t)));
10215 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->monitor_name, length_monitor_name_1, sizeof(uint16_t), CH_UTF16));
10216 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
10217 : }
10218 0 : if (r->default_datatype) {
10219 0 : _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
10220 0 : NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
10221 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->default_datatype));
10222 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->default_datatype));
10223 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->default_datatype, &size_default_datatype_1));
10224 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->default_datatype, &length_default_datatype_1));
10225 0 : if (length_default_datatype_1 > size_default_datatype_1) {
10226 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_default_datatype_1, length_default_datatype_1);
10227 : }
10228 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_default_datatype_1, sizeof(uint16_t)));
10229 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->default_datatype, length_default_datatype_1, sizeof(uint16_t), CH_UTF16));
10230 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
10231 : }
10232 0 : if (r->dependent_files) {
10233 0 : _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
10234 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
10235 0 : NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
10236 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
10237 : }
10238 0 : if (r->previous_names) {
10239 0 : _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
10240 0 : NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
10241 0 : NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
10242 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
10243 : }
10244 : }
10245 0 : return NDR_ERR_SUCCESS;
10246 : }
10247 :
10248 0 : _PUBLIC_ void ndr_print_spoolss_AddDriverInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo4 *r)
10249 : {
10250 0 : ndr_print_struct(ndr, name, "spoolss_AddDriverInfo4");
10251 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10252 0 : ndr->depth++;
10253 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
10254 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
10255 0 : ndr->depth++;
10256 0 : if (r->driver_name) {
10257 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
10258 : }
10259 0 : ndr->depth--;
10260 0 : ndr_print_ptr(ndr, "architecture", r->architecture);
10261 0 : ndr->depth++;
10262 0 : if (r->architecture) {
10263 0 : ndr_print_string(ndr, "architecture", r->architecture);
10264 : }
10265 0 : ndr->depth--;
10266 0 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
10267 0 : ndr->depth++;
10268 0 : if (r->driver_path) {
10269 0 : ndr_print_string(ndr, "driver_path", r->driver_path);
10270 : }
10271 0 : ndr->depth--;
10272 0 : ndr_print_ptr(ndr, "data_file", r->data_file);
10273 0 : ndr->depth++;
10274 0 : if (r->data_file) {
10275 0 : ndr_print_string(ndr, "data_file", r->data_file);
10276 : }
10277 0 : ndr->depth--;
10278 0 : ndr_print_ptr(ndr, "config_file", r->config_file);
10279 0 : ndr->depth++;
10280 0 : if (r->config_file) {
10281 0 : ndr_print_string(ndr, "config_file", r->config_file);
10282 : }
10283 0 : ndr->depth--;
10284 0 : ndr_print_ptr(ndr, "help_file", r->help_file);
10285 0 : ndr->depth++;
10286 0 : if (r->help_file) {
10287 0 : ndr_print_string(ndr, "help_file", r->help_file);
10288 : }
10289 0 : ndr->depth--;
10290 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
10291 0 : ndr->depth++;
10292 0 : if (r->monitor_name) {
10293 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
10294 : }
10295 0 : ndr->depth--;
10296 0 : ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
10297 0 : ndr->depth++;
10298 0 : if (r->default_datatype) {
10299 0 : ndr_print_string(ndr, "default_datatype", r->default_datatype);
10300 : }
10301 0 : ndr->depth--;
10302 0 : ndr_print_uint32(ndr, "_ndr_size_dependent_files", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->dependent_files, ndr->flags) - 4) / 2):r->_ndr_size_dependent_files);
10303 0 : ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
10304 0 : ndr->depth++;
10305 0 : if (r->dependent_files) {
10306 0 : ndr_print_spoolss_StringArray(ndr, "dependent_files", r->dependent_files);
10307 : }
10308 0 : ndr->depth--;
10309 0 : ndr_print_uint32(ndr, "_ndr_size_previous_names", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->previous_names, ndr->flags) - 4) / 2):r->_ndr_size_previous_names);
10310 0 : ndr_print_ptr(ndr, "previous_names", r->previous_names);
10311 0 : ndr->depth++;
10312 0 : if (r->previous_names) {
10313 0 : ndr_print_spoolss_StringArray(ndr, "previous_names", r->previous_names);
10314 : }
10315 0 : ndr->depth--;
10316 0 : ndr->depth--;
10317 : }
10318 :
10319 0 : static enum ndr_err_code ndr_push_spoolss_DriverAttributes(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
10320 : {
10321 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
10322 0 : return NDR_ERR_SUCCESS;
10323 : }
10324 :
10325 0 : static enum ndr_err_code ndr_pull_spoolss_DriverAttributes(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
10326 : {
10327 0 : uint32_t v;
10328 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
10329 0 : *r = v;
10330 0 : return NDR_ERR_SUCCESS;
10331 : }
10332 :
10333 0 : _PUBLIC_ void ndr_print_spoolss_DriverAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
10334 : {
10335 0 : ndr_print_uint32(ndr, name, r);
10336 0 : ndr->depth++;
10337 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_PACKAGE_AWARE", PRINTER_DRIVER_PACKAGE_AWARE, r);
10338 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_XPS", PRINTER_DRIVER_XPS, r);
10339 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_SANDBOX_ENABLED", PRINTER_DRIVER_SANDBOX_ENABLED, r);
10340 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_CLASS", PRINTER_DRIVER_CLASS, r);
10341 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_DERIVED", PRINTER_DRIVER_DERIVED, r);
10342 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_NOT_SHAREABLE", PRINTER_DRIVER_NOT_SHAREABLE, r);
10343 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_CATEGORY_FAX", PRINTER_DRIVER_CATEGORY_FAX, r);
10344 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_CATEGORY_FILE", PRINTER_DRIVER_CATEGORY_FILE, r);
10345 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_CATEGORY_VIRTUAL", PRINTER_DRIVER_CATEGORY_VIRTUAL, r);
10346 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_CATEGORY_SERVICE", PRINTER_DRIVER_CATEGORY_SERVICE, r);
10347 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_SOFT_RESET_REQUIRED", PRINTER_DRIVER_SOFT_RESET_REQUIRED, r);
10348 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_CATEGORY_3D", PRINTER_DRIVER_CATEGORY_3D, r);
10349 0 : ndr->depth--;
10350 0 : }
10351 :
10352 0 : static enum ndr_err_code ndr_push_spoolss_AddDriverInfo6(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_AddDriverInfo6 *r)
10353 : {
10354 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10355 0 : if (ndr_flags & NDR_SCALARS) {
10356 0 : NDR_CHECK(ndr_push_align(ndr, 8));
10357 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
10358 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
10359 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->architecture));
10360 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path));
10361 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file));
10362 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file));
10363 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->help_file));
10364 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->monitor_name));
10365 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_datatype));
10366 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->dependent_files, ndr->flags) - 4) / 2)));
10367 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependent_files));
10368 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->previous_names, ndr->flags) - 4) / 2)));
10369 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->previous_names));
10370 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date));
10371 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version));
10372 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->manufacturer_name));
10373 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->manufacturer_url));
10374 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->hardware_id));
10375 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->provider));
10376 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
10377 : }
10378 0 : if (ndr_flags & NDR_BUFFERS) {
10379 0 : if (r->driver_name) {
10380 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
10381 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10382 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
10383 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10384 : }
10385 0 : if (r->architecture) {
10386 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
10387 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10388 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
10389 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->architecture, ndr_charset_length(r->architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10390 : }
10391 0 : if (r->driver_path) {
10392 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
10393 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10394 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
10395 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_path, ndr_charset_length(r->driver_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10396 : }
10397 0 : if (r->data_file) {
10398 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
10399 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10400 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
10401 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_file, ndr_charset_length(r->data_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10402 : }
10403 0 : if (r->config_file) {
10404 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
10405 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10406 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
10407 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->config_file, ndr_charset_length(r->config_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10408 : }
10409 0 : if (r->help_file) {
10410 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
10411 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10412 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
10413 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->help_file, ndr_charset_length(r->help_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10414 : }
10415 0 : if (r->monitor_name) {
10416 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
10417 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10418 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
10419 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->monitor_name, ndr_charset_length(r->monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10420 : }
10421 0 : if (r->default_datatype) {
10422 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
10423 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10424 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
10425 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->default_datatype, ndr_charset_length(r->default_datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10426 : }
10427 0 : if (r->dependent_files) {
10428 0 : NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
10429 : }
10430 0 : if (r->previous_names) {
10431 0 : NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
10432 : }
10433 0 : if (r->manufacturer_name) {
10434 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_name, CH_UTF16)));
10435 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10436 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_name, CH_UTF16)));
10437 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->manufacturer_name, ndr_charset_length(r->manufacturer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10438 : }
10439 0 : if (r->manufacturer_url) {
10440 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_url, CH_UTF16)));
10441 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10442 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_url, CH_UTF16)));
10443 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->manufacturer_url, ndr_charset_length(r->manufacturer_url, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10444 : }
10445 0 : if (r->hardware_id) {
10446 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->hardware_id, CH_UTF16)));
10447 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10448 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->hardware_id, CH_UTF16)));
10449 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->hardware_id, ndr_charset_length(r->hardware_id, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10450 : }
10451 0 : if (r->provider) {
10452 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->provider, CH_UTF16)));
10453 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10454 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->provider, CH_UTF16)));
10455 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->provider, ndr_charset_length(r->provider, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10456 : }
10457 : }
10458 0 : return NDR_ERR_SUCCESS;
10459 : }
10460 :
10461 4 : static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_AddDriverInfo6 *r)
10462 : {
10463 4 : uint32_t _ptr_driver_name;
10464 4 : uint32_t size_driver_name_1 = 0;
10465 4 : uint32_t length_driver_name_1 = 0;
10466 4 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
10467 4 : uint32_t _ptr_architecture;
10468 4 : uint32_t size_architecture_1 = 0;
10469 4 : uint32_t length_architecture_1 = 0;
10470 4 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
10471 4 : uint32_t _ptr_driver_path;
10472 4 : uint32_t size_driver_path_1 = 0;
10473 4 : uint32_t length_driver_path_1 = 0;
10474 4 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
10475 4 : uint32_t _ptr_data_file;
10476 4 : uint32_t size_data_file_1 = 0;
10477 4 : uint32_t length_data_file_1 = 0;
10478 4 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
10479 4 : uint32_t _ptr_config_file;
10480 4 : uint32_t size_config_file_1 = 0;
10481 4 : uint32_t length_config_file_1 = 0;
10482 4 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
10483 4 : uint32_t _ptr_help_file;
10484 4 : uint32_t size_help_file_1 = 0;
10485 4 : uint32_t length_help_file_1 = 0;
10486 4 : TALLOC_CTX *_mem_save_help_file_0 = NULL;
10487 4 : uint32_t _ptr_monitor_name;
10488 4 : uint32_t size_monitor_name_1 = 0;
10489 4 : uint32_t length_monitor_name_1 = 0;
10490 4 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
10491 4 : uint32_t _ptr_default_datatype;
10492 4 : uint32_t size_default_datatype_1 = 0;
10493 4 : uint32_t length_default_datatype_1 = 0;
10494 4 : TALLOC_CTX *_mem_save_default_datatype_0 = NULL;
10495 4 : uint32_t _ptr_dependent_files;
10496 4 : TALLOC_CTX *_mem_save_dependent_files_0 = NULL;
10497 4 : uint32_t _ptr_previous_names;
10498 4 : TALLOC_CTX *_mem_save_previous_names_0 = NULL;
10499 4 : uint32_t _ptr_manufacturer_name;
10500 4 : uint32_t size_manufacturer_name_1 = 0;
10501 4 : uint32_t length_manufacturer_name_1 = 0;
10502 4 : TALLOC_CTX *_mem_save_manufacturer_name_0 = NULL;
10503 4 : uint32_t _ptr_manufacturer_url;
10504 4 : uint32_t size_manufacturer_url_1 = 0;
10505 4 : uint32_t length_manufacturer_url_1 = 0;
10506 4 : TALLOC_CTX *_mem_save_manufacturer_url_0 = NULL;
10507 4 : uint32_t _ptr_hardware_id;
10508 4 : uint32_t size_hardware_id_1 = 0;
10509 4 : uint32_t length_hardware_id_1 = 0;
10510 4 : TALLOC_CTX *_mem_save_hardware_id_0 = NULL;
10511 4 : uint32_t _ptr_provider;
10512 4 : uint32_t size_provider_1 = 0;
10513 4 : uint32_t length_provider_1 = 0;
10514 4 : TALLOC_CTX *_mem_save_provider_0 = NULL;
10515 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10516 4 : if (ndr_flags & NDR_SCALARS) {
10517 4 : NDR_CHECK(ndr_pull_align(ndr, 8));
10518 4 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
10519 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
10520 4 : if (_ptr_driver_name) {
10521 4 : NDR_PULL_ALLOC(ndr, r->driver_name);
10522 : } else {
10523 0 : r->driver_name = NULL;
10524 : }
10525 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
10526 4 : if (_ptr_architecture) {
10527 4 : NDR_PULL_ALLOC(ndr, r->architecture);
10528 : } else {
10529 0 : r->architecture = NULL;
10530 : }
10531 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
10532 4 : if (_ptr_driver_path) {
10533 4 : NDR_PULL_ALLOC(ndr, r->driver_path);
10534 : } else {
10535 0 : r->driver_path = NULL;
10536 : }
10537 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
10538 4 : if (_ptr_data_file) {
10539 4 : NDR_PULL_ALLOC(ndr, r->data_file);
10540 : } else {
10541 0 : r->data_file = NULL;
10542 : }
10543 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
10544 4 : if (_ptr_config_file) {
10545 4 : NDR_PULL_ALLOC(ndr, r->config_file);
10546 : } else {
10547 0 : r->config_file = NULL;
10548 : }
10549 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
10550 4 : if (_ptr_help_file) {
10551 4 : NDR_PULL_ALLOC(ndr, r->help_file);
10552 : } else {
10553 0 : r->help_file = NULL;
10554 : }
10555 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
10556 4 : if (_ptr_monitor_name) {
10557 0 : NDR_PULL_ALLOC(ndr, r->monitor_name);
10558 : } else {
10559 4 : r->monitor_name = NULL;
10560 : }
10561 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
10562 4 : if (_ptr_default_datatype) {
10563 0 : NDR_PULL_ALLOC(ndr, r->default_datatype);
10564 : } else {
10565 4 : r->default_datatype = NULL;
10566 : }
10567 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_dependent_files));
10568 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
10569 4 : if (_ptr_dependent_files) {
10570 4 : NDR_PULL_ALLOC(ndr, r->dependent_files);
10571 : } else {
10572 0 : r->dependent_files = NULL;
10573 : }
10574 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_previous_names));
10575 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
10576 4 : if (_ptr_previous_names) {
10577 4 : NDR_PULL_ALLOC(ndr, r->previous_names);
10578 : } else {
10579 0 : r->previous_names = NULL;
10580 : }
10581 4 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date));
10582 4 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version));
10583 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_name));
10584 4 : if (_ptr_manufacturer_name) {
10585 4 : NDR_PULL_ALLOC(ndr, r->manufacturer_name);
10586 : } else {
10587 0 : r->manufacturer_name = NULL;
10588 : }
10589 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_url));
10590 4 : if (_ptr_manufacturer_url) {
10591 4 : NDR_PULL_ALLOC(ndr, r->manufacturer_url);
10592 : } else {
10593 0 : r->manufacturer_url = NULL;
10594 : }
10595 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hardware_id));
10596 4 : if (_ptr_hardware_id) {
10597 4 : NDR_PULL_ALLOC(ndr, r->hardware_id);
10598 : } else {
10599 0 : r->hardware_id = NULL;
10600 : }
10601 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_provider));
10602 4 : if (_ptr_provider) {
10603 4 : NDR_PULL_ALLOC(ndr, r->provider);
10604 : } else {
10605 0 : r->provider = NULL;
10606 : }
10607 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
10608 : }
10609 4 : if (ndr_flags & NDR_BUFFERS) {
10610 4 : if (r->driver_name) {
10611 4 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10612 4 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
10613 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
10614 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
10615 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_name, &size_driver_name_1));
10616 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_name, &length_driver_name_1));
10617 4 : if (length_driver_name_1 > size_driver_name_1) {
10618 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_name_1, length_driver_name_1);
10619 : }
10620 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_name_1, sizeof(uint16_t)));
10621 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, length_driver_name_1, sizeof(uint16_t), CH_UTF16));
10622 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
10623 : }
10624 4 : if (r->architecture) {
10625 4 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
10626 4 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
10627 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->architecture));
10628 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->architecture));
10629 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->architecture, &size_architecture_1));
10630 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->architecture, &length_architecture_1));
10631 4 : if (length_architecture_1 > size_architecture_1) {
10632 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_1, length_architecture_1);
10633 : }
10634 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_1, sizeof(uint16_t)));
10635 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->architecture, length_architecture_1, sizeof(uint16_t), CH_UTF16));
10636 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
10637 : }
10638 4 : if (r->driver_path) {
10639 4 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
10640 4 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
10641 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_path));
10642 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_path));
10643 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_path, &size_driver_path_1));
10644 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_path, &length_driver_path_1));
10645 4 : if (length_driver_path_1 > size_driver_path_1) {
10646 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_path_1, length_driver_path_1);
10647 : }
10648 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_path_1, sizeof(uint16_t)));
10649 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_path, length_driver_path_1, sizeof(uint16_t), CH_UTF16));
10650 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
10651 : }
10652 4 : if (r->data_file) {
10653 4 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
10654 4 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
10655 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data_file));
10656 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data_file));
10657 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_file, &size_data_file_1));
10658 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_file, &length_data_file_1));
10659 4 : if (length_data_file_1 > size_data_file_1) {
10660 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_file_1, length_data_file_1);
10661 : }
10662 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_data_file_1, sizeof(uint16_t)));
10663 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_file, length_data_file_1, sizeof(uint16_t), CH_UTF16));
10664 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
10665 : }
10666 4 : if (r->config_file) {
10667 4 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
10668 4 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
10669 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->config_file));
10670 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->config_file));
10671 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->config_file, &size_config_file_1));
10672 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->config_file, &length_config_file_1));
10673 4 : if (length_config_file_1 > size_config_file_1) {
10674 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_config_file_1, length_config_file_1);
10675 : }
10676 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_config_file_1, sizeof(uint16_t)));
10677 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->config_file, length_config_file_1, sizeof(uint16_t), CH_UTF16));
10678 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
10679 : }
10680 4 : if (r->help_file) {
10681 4 : _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
10682 4 : NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
10683 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->help_file));
10684 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->help_file));
10685 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->help_file, &size_help_file_1));
10686 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->help_file, &length_help_file_1));
10687 4 : if (length_help_file_1 > size_help_file_1) {
10688 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_help_file_1, length_help_file_1);
10689 : }
10690 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_help_file_1, sizeof(uint16_t)));
10691 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->help_file, length_help_file_1, sizeof(uint16_t), CH_UTF16));
10692 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
10693 : }
10694 4 : if (r->monitor_name) {
10695 0 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10696 0 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
10697 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->monitor_name));
10698 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->monitor_name));
10699 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->monitor_name, &size_monitor_name_1));
10700 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->monitor_name, &length_monitor_name_1));
10701 0 : if (length_monitor_name_1 > size_monitor_name_1) {
10702 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_monitor_name_1, length_monitor_name_1);
10703 : }
10704 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_monitor_name_1, sizeof(uint16_t)));
10705 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->monitor_name, length_monitor_name_1, sizeof(uint16_t), CH_UTF16));
10706 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
10707 : }
10708 4 : if (r->default_datatype) {
10709 0 : _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
10710 0 : NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
10711 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->default_datatype));
10712 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->default_datatype));
10713 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->default_datatype, &size_default_datatype_1));
10714 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->default_datatype, &length_default_datatype_1));
10715 0 : if (length_default_datatype_1 > size_default_datatype_1) {
10716 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_default_datatype_1, length_default_datatype_1);
10717 : }
10718 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_default_datatype_1, sizeof(uint16_t)));
10719 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->default_datatype, length_default_datatype_1, sizeof(uint16_t), CH_UTF16));
10720 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
10721 : }
10722 4 : if (r->dependent_files) {
10723 4 : _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
10724 4 : NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
10725 4 : NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
10726 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
10727 : }
10728 4 : if (r->previous_names) {
10729 4 : _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
10730 4 : NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
10731 4 : NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
10732 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
10733 : }
10734 4 : if (r->manufacturer_name) {
10735 4 : _mem_save_manufacturer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10736 4 : NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_name, 0);
10737 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->manufacturer_name));
10738 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->manufacturer_name));
10739 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->manufacturer_name, &size_manufacturer_name_1));
10740 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->manufacturer_name, &length_manufacturer_name_1));
10741 4 : if (length_manufacturer_name_1 > size_manufacturer_name_1) {
10742 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_manufacturer_name_1, length_manufacturer_name_1);
10743 : }
10744 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_manufacturer_name_1, sizeof(uint16_t)));
10745 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->manufacturer_name, length_manufacturer_name_1, sizeof(uint16_t), CH_UTF16));
10746 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_name_0, 0);
10747 : }
10748 4 : if (r->manufacturer_url) {
10749 4 : _mem_save_manufacturer_url_0 = NDR_PULL_GET_MEM_CTX(ndr);
10750 4 : NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_url, 0);
10751 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->manufacturer_url));
10752 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->manufacturer_url));
10753 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->manufacturer_url, &size_manufacturer_url_1));
10754 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->manufacturer_url, &length_manufacturer_url_1));
10755 4 : if (length_manufacturer_url_1 > size_manufacturer_url_1) {
10756 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_manufacturer_url_1, length_manufacturer_url_1);
10757 : }
10758 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_manufacturer_url_1, sizeof(uint16_t)));
10759 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->manufacturer_url, length_manufacturer_url_1, sizeof(uint16_t), CH_UTF16));
10760 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_url_0, 0);
10761 : }
10762 4 : if (r->hardware_id) {
10763 4 : _mem_save_hardware_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
10764 4 : NDR_PULL_SET_MEM_CTX(ndr, r->hardware_id, 0);
10765 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->hardware_id));
10766 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->hardware_id));
10767 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->hardware_id, &size_hardware_id_1));
10768 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->hardware_id, &length_hardware_id_1));
10769 4 : if (length_hardware_id_1 > size_hardware_id_1) {
10770 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_hardware_id_1, length_hardware_id_1);
10771 : }
10772 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_hardware_id_1, sizeof(uint16_t)));
10773 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->hardware_id, length_hardware_id_1, sizeof(uint16_t), CH_UTF16));
10774 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hardware_id_0, 0);
10775 : }
10776 4 : if (r->provider) {
10777 4 : _mem_save_provider_0 = NDR_PULL_GET_MEM_CTX(ndr);
10778 4 : NDR_PULL_SET_MEM_CTX(ndr, r->provider, 0);
10779 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->provider));
10780 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->provider));
10781 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->provider, &size_provider_1));
10782 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->provider, &length_provider_1));
10783 4 : if (length_provider_1 > size_provider_1) {
10784 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_provider_1, length_provider_1);
10785 : }
10786 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_provider_1, sizeof(uint16_t)));
10787 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->provider, length_provider_1, sizeof(uint16_t), CH_UTF16));
10788 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_provider_0, 0);
10789 : }
10790 : }
10791 0 : return NDR_ERR_SUCCESS;
10792 : }
10793 :
10794 4 : _PUBLIC_ void ndr_print_spoolss_AddDriverInfo6(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo6 *r)
10795 : {
10796 4 : ndr_print_struct(ndr, name, "spoolss_AddDriverInfo6");
10797 4 : if (r == NULL) { ndr_print_null(ndr); return; }
10798 4 : ndr->depth++;
10799 4 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
10800 4 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
10801 4 : ndr->depth++;
10802 4 : if (r->driver_name) {
10803 4 : ndr_print_string(ndr, "driver_name", r->driver_name);
10804 : }
10805 4 : ndr->depth--;
10806 4 : ndr_print_ptr(ndr, "architecture", r->architecture);
10807 4 : ndr->depth++;
10808 4 : if (r->architecture) {
10809 4 : ndr_print_string(ndr, "architecture", r->architecture);
10810 : }
10811 4 : ndr->depth--;
10812 4 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
10813 4 : ndr->depth++;
10814 4 : if (r->driver_path) {
10815 4 : ndr_print_string(ndr, "driver_path", r->driver_path);
10816 : }
10817 4 : ndr->depth--;
10818 4 : ndr_print_ptr(ndr, "data_file", r->data_file);
10819 4 : ndr->depth++;
10820 4 : if (r->data_file) {
10821 4 : ndr_print_string(ndr, "data_file", r->data_file);
10822 : }
10823 4 : ndr->depth--;
10824 4 : ndr_print_ptr(ndr, "config_file", r->config_file);
10825 4 : ndr->depth++;
10826 4 : if (r->config_file) {
10827 4 : ndr_print_string(ndr, "config_file", r->config_file);
10828 : }
10829 4 : ndr->depth--;
10830 4 : ndr_print_ptr(ndr, "help_file", r->help_file);
10831 4 : ndr->depth++;
10832 4 : if (r->help_file) {
10833 4 : ndr_print_string(ndr, "help_file", r->help_file);
10834 : }
10835 4 : ndr->depth--;
10836 4 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
10837 4 : ndr->depth++;
10838 4 : if (r->monitor_name) {
10839 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
10840 : }
10841 4 : ndr->depth--;
10842 4 : ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
10843 4 : ndr->depth++;
10844 4 : if (r->default_datatype) {
10845 0 : ndr_print_string(ndr, "default_datatype", r->default_datatype);
10846 : }
10847 4 : ndr->depth--;
10848 4 : ndr_print_uint32(ndr, "_ndr_size_dependent_files", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->dependent_files, ndr->flags) - 4) / 2):r->_ndr_size_dependent_files);
10849 4 : ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
10850 4 : ndr->depth++;
10851 4 : if (r->dependent_files) {
10852 4 : ndr_print_spoolss_StringArray(ndr, "dependent_files", r->dependent_files);
10853 : }
10854 4 : ndr->depth--;
10855 4 : ndr_print_uint32(ndr, "_ndr_size_previous_names", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->previous_names, ndr->flags) - 4) / 2):r->_ndr_size_previous_names);
10856 4 : ndr_print_ptr(ndr, "previous_names", r->previous_names);
10857 4 : ndr->depth++;
10858 4 : if (r->previous_names) {
10859 4 : ndr_print_spoolss_StringArray(ndr, "previous_names", r->previous_names);
10860 : }
10861 4 : ndr->depth--;
10862 4 : ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
10863 4 : ndr_print_hyper(ndr, "driver_version", r->driver_version);
10864 4 : ndr_print_ptr(ndr, "manufacturer_name", r->manufacturer_name);
10865 4 : ndr->depth++;
10866 4 : if (r->manufacturer_name) {
10867 4 : ndr_print_string(ndr, "manufacturer_name", r->manufacturer_name);
10868 : }
10869 4 : ndr->depth--;
10870 4 : ndr_print_ptr(ndr, "manufacturer_url", r->manufacturer_url);
10871 4 : ndr->depth++;
10872 4 : if (r->manufacturer_url) {
10873 4 : ndr_print_string(ndr, "manufacturer_url", r->manufacturer_url);
10874 : }
10875 4 : ndr->depth--;
10876 4 : ndr_print_ptr(ndr, "hardware_id", r->hardware_id);
10877 4 : ndr->depth++;
10878 4 : if (r->hardware_id) {
10879 4 : ndr_print_string(ndr, "hardware_id", r->hardware_id);
10880 : }
10881 4 : ndr->depth--;
10882 4 : ndr_print_ptr(ndr, "provider", r->provider);
10883 4 : ndr->depth++;
10884 4 : if (r->provider) {
10885 4 : ndr_print_string(ndr, "provider", r->provider);
10886 : }
10887 4 : ndr->depth--;
10888 4 : ndr->depth--;
10889 : }
10890 :
10891 0 : static enum ndr_err_code ndr_push_spoolss_AddDriverInfo8(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_AddDriverInfo8 *r)
10892 : {
10893 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10894 0 : if (ndr_flags & NDR_SCALARS) {
10895 0 : NDR_CHECK(ndr_push_align(ndr, 8));
10896 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
10897 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
10898 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->architecture));
10899 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path));
10900 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file));
10901 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file));
10902 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->help_file));
10903 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->monitor_name));
10904 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_datatype));
10905 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->dependent_files, ndr->flags) - 4) / 2)));
10906 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependent_files));
10907 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->previous_names, ndr->flags) - 4) / 2)));
10908 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->previous_names));
10909 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date));
10910 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version));
10911 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->manufacturer_name));
10912 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->manufacturer_url));
10913 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->hardware_id));
10914 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->provider));
10915 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->print_processor));
10916 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->vendor_setup));
10917 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->color_profiles, ndr->flags) - 4) / 2)));
10918 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->color_profiles));
10919 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->inf_path));
10920 0 : NDR_CHECK(ndr_push_spoolss_DriverAttributes(ndr, NDR_SCALARS, r->printer_driver_attributes));
10921 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->core_driver_dependencies, ndr->flags) - 4) / 2)));
10922 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->core_driver_dependencies));
10923 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->min_inbox_driver_ver_date));
10924 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->min_inbox_driver_ver_version));
10925 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
10926 : }
10927 0 : if (ndr_flags & NDR_BUFFERS) {
10928 0 : if (r->driver_name) {
10929 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
10930 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10931 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
10932 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10933 : }
10934 0 : if (r->architecture) {
10935 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
10936 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10937 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
10938 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->architecture, ndr_charset_length(r->architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10939 : }
10940 0 : if (r->driver_path) {
10941 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
10942 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10943 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
10944 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_path, ndr_charset_length(r->driver_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10945 : }
10946 0 : if (r->data_file) {
10947 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
10948 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10949 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
10950 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_file, ndr_charset_length(r->data_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10951 : }
10952 0 : if (r->config_file) {
10953 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
10954 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10955 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
10956 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->config_file, ndr_charset_length(r->config_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10957 : }
10958 0 : if (r->help_file) {
10959 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
10960 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10961 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
10962 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->help_file, ndr_charset_length(r->help_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10963 : }
10964 0 : if (r->monitor_name) {
10965 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
10966 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10967 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
10968 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->monitor_name, ndr_charset_length(r->monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10969 : }
10970 0 : if (r->default_datatype) {
10971 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
10972 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10973 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
10974 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->default_datatype, ndr_charset_length(r->default_datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10975 : }
10976 0 : if (r->dependent_files) {
10977 0 : NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
10978 : }
10979 0 : if (r->previous_names) {
10980 0 : NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
10981 : }
10982 0 : if (r->manufacturer_name) {
10983 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_name, CH_UTF16)));
10984 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10985 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_name, CH_UTF16)));
10986 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->manufacturer_name, ndr_charset_length(r->manufacturer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10987 : }
10988 0 : if (r->manufacturer_url) {
10989 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_url, CH_UTF16)));
10990 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10991 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_url, CH_UTF16)));
10992 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->manufacturer_url, ndr_charset_length(r->manufacturer_url, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10993 : }
10994 0 : if (r->hardware_id) {
10995 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->hardware_id, CH_UTF16)));
10996 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10997 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->hardware_id, CH_UTF16)));
10998 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->hardware_id, ndr_charset_length(r->hardware_id, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10999 : }
11000 0 : if (r->provider) {
11001 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->provider, CH_UTF16)));
11002 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11003 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->provider, CH_UTF16)));
11004 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->provider, ndr_charset_length(r->provider, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11005 : }
11006 0 : if (r->print_processor) {
11007 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
11008 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11009 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
11010 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->print_processor, ndr_charset_length(r->print_processor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11011 : }
11012 0 : if (r->vendor_setup) {
11013 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->vendor_setup, CH_UTF16)));
11014 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11015 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->vendor_setup, CH_UTF16)));
11016 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->vendor_setup, ndr_charset_length(r->vendor_setup, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11017 : }
11018 0 : if (r->color_profiles) {
11019 0 : NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->color_profiles));
11020 : }
11021 0 : if (r->inf_path) {
11022 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->inf_path, CH_UTF16)));
11023 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11024 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->inf_path, CH_UTF16)));
11025 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->inf_path, ndr_charset_length(r->inf_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11026 : }
11027 0 : if (r->core_driver_dependencies) {
11028 0 : NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->core_driver_dependencies));
11029 : }
11030 : }
11031 0 : return NDR_ERR_SUCCESS;
11032 : }
11033 :
11034 0 : static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo8(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_AddDriverInfo8 *r)
11035 : {
11036 0 : uint32_t _ptr_driver_name;
11037 0 : uint32_t size_driver_name_1 = 0;
11038 0 : uint32_t length_driver_name_1 = 0;
11039 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
11040 0 : uint32_t _ptr_architecture;
11041 0 : uint32_t size_architecture_1 = 0;
11042 0 : uint32_t length_architecture_1 = 0;
11043 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
11044 0 : uint32_t _ptr_driver_path;
11045 0 : uint32_t size_driver_path_1 = 0;
11046 0 : uint32_t length_driver_path_1 = 0;
11047 0 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
11048 0 : uint32_t _ptr_data_file;
11049 0 : uint32_t size_data_file_1 = 0;
11050 0 : uint32_t length_data_file_1 = 0;
11051 0 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
11052 0 : uint32_t _ptr_config_file;
11053 0 : uint32_t size_config_file_1 = 0;
11054 0 : uint32_t length_config_file_1 = 0;
11055 0 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
11056 0 : uint32_t _ptr_help_file;
11057 0 : uint32_t size_help_file_1 = 0;
11058 0 : uint32_t length_help_file_1 = 0;
11059 0 : TALLOC_CTX *_mem_save_help_file_0 = NULL;
11060 0 : uint32_t _ptr_monitor_name;
11061 0 : uint32_t size_monitor_name_1 = 0;
11062 0 : uint32_t length_monitor_name_1 = 0;
11063 0 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
11064 0 : uint32_t _ptr_default_datatype;
11065 0 : uint32_t size_default_datatype_1 = 0;
11066 0 : uint32_t length_default_datatype_1 = 0;
11067 0 : TALLOC_CTX *_mem_save_default_datatype_0 = NULL;
11068 0 : uint32_t _ptr_dependent_files;
11069 0 : TALLOC_CTX *_mem_save_dependent_files_0 = NULL;
11070 0 : uint32_t _ptr_previous_names;
11071 0 : TALLOC_CTX *_mem_save_previous_names_0 = NULL;
11072 0 : uint32_t _ptr_manufacturer_name;
11073 0 : uint32_t size_manufacturer_name_1 = 0;
11074 0 : uint32_t length_manufacturer_name_1 = 0;
11075 0 : TALLOC_CTX *_mem_save_manufacturer_name_0 = NULL;
11076 0 : uint32_t _ptr_manufacturer_url;
11077 0 : uint32_t size_manufacturer_url_1 = 0;
11078 0 : uint32_t length_manufacturer_url_1 = 0;
11079 0 : TALLOC_CTX *_mem_save_manufacturer_url_0 = NULL;
11080 0 : uint32_t _ptr_hardware_id;
11081 0 : uint32_t size_hardware_id_1 = 0;
11082 0 : uint32_t length_hardware_id_1 = 0;
11083 0 : TALLOC_CTX *_mem_save_hardware_id_0 = NULL;
11084 0 : uint32_t _ptr_provider;
11085 0 : uint32_t size_provider_1 = 0;
11086 0 : uint32_t length_provider_1 = 0;
11087 0 : TALLOC_CTX *_mem_save_provider_0 = NULL;
11088 0 : uint32_t _ptr_print_processor;
11089 0 : uint32_t size_print_processor_1 = 0;
11090 0 : uint32_t length_print_processor_1 = 0;
11091 0 : TALLOC_CTX *_mem_save_print_processor_0 = NULL;
11092 0 : uint32_t _ptr_vendor_setup;
11093 0 : uint32_t size_vendor_setup_1 = 0;
11094 0 : uint32_t length_vendor_setup_1 = 0;
11095 0 : TALLOC_CTX *_mem_save_vendor_setup_0 = NULL;
11096 0 : uint32_t _ptr_color_profiles;
11097 0 : TALLOC_CTX *_mem_save_color_profiles_0 = NULL;
11098 0 : uint32_t _ptr_inf_path;
11099 0 : uint32_t size_inf_path_1 = 0;
11100 0 : uint32_t length_inf_path_1 = 0;
11101 0 : TALLOC_CTX *_mem_save_inf_path_0 = NULL;
11102 0 : uint32_t _ptr_core_driver_dependencies;
11103 0 : TALLOC_CTX *_mem_save_core_driver_dependencies_0 = NULL;
11104 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11105 0 : if (ndr_flags & NDR_SCALARS) {
11106 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
11107 0 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
11108 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
11109 0 : if (_ptr_driver_name) {
11110 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
11111 : } else {
11112 0 : r->driver_name = NULL;
11113 : }
11114 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
11115 0 : if (_ptr_architecture) {
11116 0 : NDR_PULL_ALLOC(ndr, r->architecture);
11117 : } else {
11118 0 : r->architecture = NULL;
11119 : }
11120 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
11121 0 : if (_ptr_driver_path) {
11122 0 : NDR_PULL_ALLOC(ndr, r->driver_path);
11123 : } else {
11124 0 : r->driver_path = NULL;
11125 : }
11126 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
11127 0 : if (_ptr_data_file) {
11128 0 : NDR_PULL_ALLOC(ndr, r->data_file);
11129 : } else {
11130 0 : r->data_file = NULL;
11131 : }
11132 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
11133 0 : if (_ptr_config_file) {
11134 0 : NDR_PULL_ALLOC(ndr, r->config_file);
11135 : } else {
11136 0 : r->config_file = NULL;
11137 : }
11138 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
11139 0 : if (_ptr_help_file) {
11140 0 : NDR_PULL_ALLOC(ndr, r->help_file);
11141 : } else {
11142 0 : r->help_file = NULL;
11143 : }
11144 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
11145 0 : if (_ptr_monitor_name) {
11146 0 : NDR_PULL_ALLOC(ndr, r->monitor_name);
11147 : } else {
11148 0 : r->monitor_name = NULL;
11149 : }
11150 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
11151 0 : if (_ptr_default_datatype) {
11152 0 : NDR_PULL_ALLOC(ndr, r->default_datatype);
11153 : } else {
11154 0 : r->default_datatype = NULL;
11155 : }
11156 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_dependent_files));
11157 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
11158 0 : if (_ptr_dependent_files) {
11159 0 : NDR_PULL_ALLOC(ndr, r->dependent_files);
11160 : } else {
11161 0 : r->dependent_files = NULL;
11162 : }
11163 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_previous_names));
11164 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
11165 0 : if (_ptr_previous_names) {
11166 0 : NDR_PULL_ALLOC(ndr, r->previous_names);
11167 : } else {
11168 0 : r->previous_names = NULL;
11169 : }
11170 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date));
11171 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version));
11172 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_name));
11173 0 : if (_ptr_manufacturer_name) {
11174 0 : NDR_PULL_ALLOC(ndr, r->manufacturer_name);
11175 : } else {
11176 0 : r->manufacturer_name = NULL;
11177 : }
11178 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_url));
11179 0 : if (_ptr_manufacturer_url) {
11180 0 : NDR_PULL_ALLOC(ndr, r->manufacturer_url);
11181 : } else {
11182 0 : r->manufacturer_url = NULL;
11183 : }
11184 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hardware_id));
11185 0 : if (_ptr_hardware_id) {
11186 0 : NDR_PULL_ALLOC(ndr, r->hardware_id);
11187 : } else {
11188 0 : r->hardware_id = NULL;
11189 : }
11190 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_provider));
11191 0 : if (_ptr_provider) {
11192 0 : NDR_PULL_ALLOC(ndr, r->provider);
11193 : } else {
11194 0 : r->provider = NULL;
11195 : }
11196 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
11197 0 : if (_ptr_print_processor) {
11198 0 : NDR_PULL_ALLOC(ndr, r->print_processor);
11199 : } else {
11200 0 : r->print_processor = NULL;
11201 : }
11202 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_vendor_setup));
11203 0 : if (_ptr_vendor_setup) {
11204 0 : NDR_PULL_ALLOC(ndr, r->vendor_setup);
11205 : } else {
11206 0 : r->vendor_setup = NULL;
11207 : }
11208 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_color_profiles));
11209 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_color_profiles));
11210 0 : if (_ptr_color_profiles) {
11211 0 : NDR_PULL_ALLOC(ndr, r->color_profiles);
11212 : } else {
11213 0 : r->color_profiles = NULL;
11214 : }
11215 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_inf_path));
11216 0 : if (_ptr_inf_path) {
11217 0 : NDR_PULL_ALLOC(ndr, r->inf_path);
11218 : } else {
11219 0 : r->inf_path = NULL;
11220 : }
11221 0 : NDR_CHECK(ndr_pull_spoolss_DriverAttributes(ndr, NDR_SCALARS, &r->printer_driver_attributes));
11222 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_core_driver_dependencies));
11223 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_core_driver_dependencies));
11224 0 : if (_ptr_core_driver_dependencies) {
11225 0 : NDR_PULL_ALLOC(ndr, r->core_driver_dependencies);
11226 : } else {
11227 0 : r->core_driver_dependencies = NULL;
11228 : }
11229 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_date));
11230 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_version));
11231 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
11232 : }
11233 0 : if (ndr_flags & NDR_BUFFERS) {
11234 0 : if (r->driver_name) {
11235 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11236 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
11237 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
11238 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
11239 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_name, &size_driver_name_1));
11240 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_name, &length_driver_name_1));
11241 0 : if (length_driver_name_1 > size_driver_name_1) {
11242 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_name_1, length_driver_name_1);
11243 : }
11244 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_name_1, sizeof(uint16_t)));
11245 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, length_driver_name_1, sizeof(uint16_t), CH_UTF16));
11246 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
11247 : }
11248 0 : if (r->architecture) {
11249 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
11250 0 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
11251 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->architecture));
11252 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->architecture));
11253 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->architecture, &size_architecture_1));
11254 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->architecture, &length_architecture_1));
11255 0 : if (length_architecture_1 > size_architecture_1) {
11256 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_1, length_architecture_1);
11257 : }
11258 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_1, sizeof(uint16_t)));
11259 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->architecture, length_architecture_1, sizeof(uint16_t), CH_UTF16));
11260 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
11261 : }
11262 0 : if (r->driver_path) {
11263 0 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
11264 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
11265 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_path));
11266 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_path));
11267 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_path, &size_driver_path_1));
11268 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_path, &length_driver_path_1));
11269 0 : if (length_driver_path_1 > size_driver_path_1) {
11270 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_path_1, length_driver_path_1);
11271 : }
11272 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_path_1, sizeof(uint16_t)));
11273 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_path, length_driver_path_1, sizeof(uint16_t), CH_UTF16));
11274 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
11275 : }
11276 0 : if (r->data_file) {
11277 0 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11278 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
11279 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data_file));
11280 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data_file));
11281 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_file, &size_data_file_1));
11282 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_file, &length_data_file_1));
11283 0 : if (length_data_file_1 > size_data_file_1) {
11284 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_file_1, length_data_file_1);
11285 : }
11286 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_data_file_1, sizeof(uint16_t)));
11287 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_file, length_data_file_1, sizeof(uint16_t), CH_UTF16));
11288 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
11289 : }
11290 0 : if (r->config_file) {
11291 0 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11292 0 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
11293 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->config_file));
11294 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->config_file));
11295 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->config_file, &size_config_file_1));
11296 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->config_file, &length_config_file_1));
11297 0 : if (length_config_file_1 > size_config_file_1) {
11298 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_config_file_1, length_config_file_1);
11299 : }
11300 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_config_file_1, sizeof(uint16_t)));
11301 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->config_file, length_config_file_1, sizeof(uint16_t), CH_UTF16));
11302 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
11303 : }
11304 0 : if (r->help_file) {
11305 0 : _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11306 0 : NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
11307 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->help_file));
11308 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->help_file));
11309 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->help_file, &size_help_file_1));
11310 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->help_file, &length_help_file_1));
11311 0 : if (length_help_file_1 > size_help_file_1) {
11312 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_help_file_1, length_help_file_1);
11313 : }
11314 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_help_file_1, sizeof(uint16_t)));
11315 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->help_file, length_help_file_1, sizeof(uint16_t), CH_UTF16));
11316 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
11317 : }
11318 0 : if (r->monitor_name) {
11319 0 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11320 0 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
11321 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->monitor_name));
11322 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->monitor_name));
11323 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->monitor_name, &size_monitor_name_1));
11324 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->monitor_name, &length_monitor_name_1));
11325 0 : if (length_monitor_name_1 > size_monitor_name_1) {
11326 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_monitor_name_1, length_monitor_name_1);
11327 : }
11328 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_monitor_name_1, sizeof(uint16_t)));
11329 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->monitor_name, length_monitor_name_1, sizeof(uint16_t), CH_UTF16));
11330 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
11331 : }
11332 0 : if (r->default_datatype) {
11333 0 : _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
11334 0 : NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
11335 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->default_datatype));
11336 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->default_datatype));
11337 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->default_datatype, &size_default_datatype_1));
11338 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->default_datatype, &length_default_datatype_1));
11339 0 : if (length_default_datatype_1 > size_default_datatype_1) {
11340 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_default_datatype_1, length_default_datatype_1);
11341 : }
11342 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_default_datatype_1, sizeof(uint16_t)));
11343 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->default_datatype, length_default_datatype_1, sizeof(uint16_t), CH_UTF16));
11344 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
11345 : }
11346 0 : if (r->dependent_files) {
11347 0 : _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
11348 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
11349 0 : NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
11350 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
11351 : }
11352 0 : if (r->previous_names) {
11353 0 : _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11354 0 : NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
11355 0 : NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
11356 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
11357 : }
11358 0 : if (r->manufacturer_name) {
11359 0 : _mem_save_manufacturer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11360 0 : NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_name, 0);
11361 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->manufacturer_name));
11362 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->manufacturer_name));
11363 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->manufacturer_name, &size_manufacturer_name_1));
11364 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->manufacturer_name, &length_manufacturer_name_1));
11365 0 : if (length_manufacturer_name_1 > size_manufacturer_name_1) {
11366 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_manufacturer_name_1, length_manufacturer_name_1);
11367 : }
11368 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_manufacturer_name_1, sizeof(uint16_t)));
11369 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->manufacturer_name, length_manufacturer_name_1, sizeof(uint16_t), CH_UTF16));
11370 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_name_0, 0);
11371 : }
11372 0 : if (r->manufacturer_url) {
11373 0 : _mem_save_manufacturer_url_0 = NDR_PULL_GET_MEM_CTX(ndr);
11374 0 : NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_url, 0);
11375 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->manufacturer_url));
11376 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->manufacturer_url));
11377 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->manufacturer_url, &size_manufacturer_url_1));
11378 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->manufacturer_url, &length_manufacturer_url_1));
11379 0 : if (length_manufacturer_url_1 > size_manufacturer_url_1) {
11380 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_manufacturer_url_1, length_manufacturer_url_1);
11381 : }
11382 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_manufacturer_url_1, sizeof(uint16_t)));
11383 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->manufacturer_url, length_manufacturer_url_1, sizeof(uint16_t), CH_UTF16));
11384 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_url_0, 0);
11385 : }
11386 0 : if (r->hardware_id) {
11387 0 : _mem_save_hardware_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
11388 0 : NDR_PULL_SET_MEM_CTX(ndr, r->hardware_id, 0);
11389 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->hardware_id));
11390 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->hardware_id));
11391 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->hardware_id, &size_hardware_id_1));
11392 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->hardware_id, &length_hardware_id_1));
11393 0 : if (length_hardware_id_1 > size_hardware_id_1) {
11394 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_hardware_id_1, length_hardware_id_1);
11395 : }
11396 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_hardware_id_1, sizeof(uint16_t)));
11397 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->hardware_id, length_hardware_id_1, sizeof(uint16_t), CH_UTF16));
11398 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hardware_id_0, 0);
11399 : }
11400 0 : if (r->provider) {
11401 0 : _mem_save_provider_0 = NDR_PULL_GET_MEM_CTX(ndr);
11402 0 : NDR_PULL_SET_MEM_CTX(ndr, r->provider, 0);
11403 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->provider));
11404 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->provider));
11405 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->provider, &size_provider_1));
11406 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->provider, &length_provider_1));
11407 0 : if (length_provider_1 > size_provider_1) {
11408 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_provider_1, length_provider_1);
11409 : }
11410 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_provider_1, sizeof(uint16_t)));
11411 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->provider, length_provider_1, sizeof(uint16_t), CH_UTF16));
11412 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_provider_0, 0);
11413 : }
11414 0 : if (r->print_processor) {
11415 0 : _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
11416 0 : NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
11417 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->print_processor));
11418 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->print_processor));
11419 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->print_processor, &size_print_processor_1));
11420 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->print_processor, &length_print_processor_1));
11421 0 : if (length_print_processor_1 > size_print_processor_1) {
11422 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_print_processor_1, length_print_processor_1);
11423 : }
11424 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_print_processor_1, sizeof(uint16_t)));
11425 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->print_processor, length_print_processor_1, sizeof(uint16_t), CH_UTF16));
11426 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
11427 : }
11428 0 : if (r->vendor_setup) {
11429 0 : _mem_save_vendor_setup_0 = NDR_PULL_GET_MEM_CTX(ndr);
11430 0 : NDR_PULL_SET_MEM_CTX(ndr, r->vendor_setup, 0);
11431 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->vendor_setup));
11432 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->vendor_setup));
11433 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->vendor_setup, &size_vendor_setup_1));
11434 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->vendor_setup, &length_vendor_setup_1));
11435 0 : if (length_vendor_setup_1 > size_vendor_setup_1) {
11436 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_vendor_setup_1, length_vendor_setup_1);
11437 : }
11438 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_vendor_setup_1, sizeof(uint16_t)));
11439 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->vendor_setup, length_vendor_setup_1, sizeof(uint16_t), CH_UTF16));
11440 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_vendor_setup_0, 0);
11441 : }
11442 0 : if (r->color_profiles) {
11443 0 : _mem_save_color_profiles_0 = NDR_PULL_GET_MEM_CTX(ndr);
11444 0 : NDR_PULL_SET_MEM_CTX(ndr, r->color_profiles, 0);
11445 0 : NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->color_profiles));
11446 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_color_profiles_0, 0);
11447 : }
11448 0 : if (r->inf_path) {
11449 0 : _mem_save_inf_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
11450 0 : NDR_PULL_SET_MEM_CTX(ndr, r->inf_path, 0);
11451 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->inf_path));
11452 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->inf_path));
11453 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->inf_path, &size_inf_path_1));
11454 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->inf_path, &length_inf_path_1));
11455 0 : if (length_inf_path_1 > size_inf_path_1) {
11456 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_inf_path_1, length_inf_path_1);
11457 : }
11458 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_inf_path_1, sizeof(uint16_t)));
11459 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->inf_path, length_inf_path_1, sizeof(uint16_t), CH_UTF16));
11460 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_inf_path_0, 0);
11461 : }
11462 0 : if (r->core_driver_dependencies) {
11463 0 : _mem_save_core_driver_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
11464 0 : NDR_PULL_SET_MEM_CTX(ndr, r->core_driver_dependencies, 0);
11465 0 : NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->core_driver_dependencies));
11466 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_core_driver_dependencies_0, 0);
11467 : }
11468 : }
11469 0 : return NDR_ERR_SUCCESS;
11470 : }
11471 :
11472 0 : _PUBLIC_ void ndr_print_spoolss_AddDriverInfo8(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo8 *r)
11473 : {
11474 0 : ndr_print_struct(ndr, name, "spoolss_AddDriverInfo8");
11475 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11476 0 : ndr->depth++;
11477 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
11478 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
11479 0 : ndr->depth++;
11480 0 : if (r->driver_name) {
11481 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
11482 : }
11483 0 : ndr->depth--;
11484 0 : ndr_print_ptr(ndr, "architecture", r->architecture);
11485 0 : ndr->depth++;
11486 0 : if (r->architecture) {
11487 0 : ndr_print_string(ndr, "architecture", r->architecture);
11488 : }
11489 0 : ndr->depth--;
11490 0 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
11491 0 : ndr->depth++;
11492 0 : if (r->driver_path) {
11493 0 : ndr_print_string(ndr, "driver_path", r->driver_path);
11494 : }
11495 0 : ndr->depth--;
11496 0 : ndr_print_ptr(ndr, "data_file", r->data_file);
11497 0 : ndr->depth++;
11498 0 : if (r->data_file) {
11499 0 : ndr_print_string(ndr, "data_file", r->data_file);
11500 : }
11501 0 : ndr->depth--;
11502 0 : ndr_print_ptr(ndr, "config_file", r->config_file);
11503 0 : ndr->depth++;
11504 0 : if (r->config_file) {
11505 0 : ndr_print_string(ndr, "config_file", r->config_file);
11506 : }
11507 0 : ndr->depth--;
11508 0 : ndr_print_ptr(ndr, "help_file", r->help_file);
11509 0 : ndr->depth++;
11510 0 : if (r->help_file) {
11511 0 : ndr_print_string(ndr, "help_file", r->help_file);
11512 : }
11513 0 : ndr->depth--;
11514 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
11515 0 : ndr->depth++;
11516 0 : if (r->monitor_name) {
11517 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
11518 : }
11519 0 : ndr->depth--;
11520 0 : ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
11521 0 : ndr->depth++;
11522 0 : if (r->default_datatype) {
11523 0 : ndr_print_string(ndr, "default_datatype", r->default_datatype);
11524 : }
11525 0 : ndr->depth--;
11526 0 : ndr_print_uint32(ndr, "_ndr_size_dependent_files", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->dependent_files, ndr->flags) - 4) / 2):r->_ndr_size_dependent_files);
11527 0 : ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
11528 0 : ndr->depth++;
11529 0 : if (r->dependent_files) {
11530 0 : ndr_print_spoolss_StringArray(ndr, "dependent_files", r->dependent_files);
11531 : }
11532 0 : ndr->depth--;
11533 0 : ndr_print_uint32(ndr, "_ndr_size_previous_names", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->previous_names, ndr->flags) - 4) / 2):r->_ndr_size_previous_names);
11534 0 : ndr_print_ptr(ndr, "previous_names", r->previous_names);
11535 0 : ndr->depth++;
11536 0 : if (r->previous_names) {
11537 0 : ndr_print_spoolss_StringArray(ndr, "previous_names", r->previous_names);
11538 : }
11539 0 : ndr->depth--;
11540 0 : ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
11541 0 : ndr_print_hyper(ndr, "driver_version", r->driver_version);
11542 0 : ndr_print_ptr(ndr, "manufacturer_name", r->manufacturer_name);
11543 0 : ndr->depth++;
11544 0 : if (r->manufacturer_name) {
11545 0 : ndr_print_string(ndr, "manufacturer_name", r->manufacturer_name);
11546 : }
11547 0 : ndr->depth--;
11548 0 : ndr_print_ptr(ndr, "manufacturer_url", r->manufacturer_url);
11549 0 : ndr->depth++;
11550 0 : if (r->manufacturer_url) {
11551 0 : ndr_print_string(ndr, "manufacturer_url", r->manufacturer_url);
11552 : }
11553 0 : ndr->depth--;
11554 0 : ndr_print_ptr(ndr, "hardware_id", r->hardware_id);
11555 0 : ndr->depth++;
11556 0 : if (r->hardware_id) {
11557 0 : ndr_print_string(ndr, "hardware_id", r->hardware_id);
11558 : }
11559 0 : ndr->depth--;
11560 0 : ndr_print_ptr(ndr, "provider", r->provider);
11561 0 : ndr->depth++;
11562 0 : if (r->provider) {
11563 0 : ndr_print_string(ndr, "provider", r->provider);
11564 : }
11565 0 : ndr->depth--;
11566 0 : ndr_print_ptr(ndr, "print_processor", r->print_processor);
11567 0 : ndr->depth++;
11568 0 : if (r->print_processor) {
11569 0 : ndr_print_string(ndr, "print_processor", r->print_processor);
11570 : }
11571 0 : ndr->depth--;
11572 0 : ndr_print_ptr(ndr, "vendor_setup", r->vendor_setup);
11573 0 : ndr->depth++;
11574 0 : if (r->vendor_setup) {
11575 0 : ndr_print_string(ndr, "vendor_setup", r->vendor_setup);
11576 : }
11577 0 : ndr->depth--;
11578 0 : ndr_print_uint32(ndr, "_ndr_size_color_profiles", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->color_profiles, ndr->flags) - 4) / 2):r->_ndr_size_color_profiles);
11579 0 : ndr_print_ptr(ndr, "color_profiles", r->color_profiles);
11580 0 : ndr->depth++;
11581 0 : if (r->color_profiles) {
11582 0 : ndr_print_spoolss_StringArray(ndr, "color_profiles", r->color_profiles);
11583 : }
11584 0 : ndr->depth--;
11585 0 : ndr_print_ptr(ndr, "inf_path", r->inf_path);
11586 0 : ndr->depth++;
11587 0 : if (r->inf_path) {
11588 0 : ndr_print_string(ndr, "inf_path", r->inf_path);
11589 : }
11590 0 : ndr->depth--;
11591 0 : ndr_print_spoolss_DriverAttributes(ndr, "printer_driver_attributes", r->printer_driver_attributes);
11592 0 : ndr_print_uint32(ndr, "_ndr_size_core_driver_dependencies", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->core_driver_dependencies, ndr->flags) - 4) / 2):r->_ndr_size_core_driver_dependencies);
11593 0 : ndr_print_ptr(ndr, "core_driver_dependencies", r->core_driver_dependencies);
11594 0 : ndr->depth++;
11595 0 : if (r->core_driver_dependencies) {
11596 0 : ndr_print_spoolss_StringArray(ndr, "core_driver_dependencies", r->core_driver_dependencies);
11597 : }
11598 0 : ndr->depth--;
11599 0 : ndr_print_NTTIME(ndr, "min_inbox_driver_ver_date", r->min_inbox_driver_ver_date);
11600 0 : ndr_print_hyper(ndr, "min_inbox_driver_ver_version", r->min_inbox_driver_ver_version);
11601 0 : ndr->depth--;
11602 : }
11603 :
11604 0 : static enum ndr_err_code ndr_push_spoolss_AddDriverInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_AddDriverInfo *r)
11605 : {
11606 0 : uint32_t level;
11607 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11608 0 : if (ndr_flags & NDR_SCALARS) {
11609 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
11610 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
11611 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
11612 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
11613 : /* ms_union is always aligned to the largest union arm*/
11614 0 : NDR_CHECK(ndr_push_align(ndr, 5));
11615 0 : switch (level) {
11616 0 : case 1: {
11617 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
11618 0 : break; }
11619 :
11620 0 : case 2: {
11621 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
11622 0 : break; }
11623 :
11624 0 : case 3: {
11625 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
11626 0 : break; }
11627 :
11628 0 : case 4: {
11629 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
11630 0 : break; }
11631 :
11632 0 : case 6: {
11633 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
11634 0 : break; }
11635 :
11636 0 : case 8: {
11637 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info8));
11638 0 : break; }
11639 :
11640 0 : default:
11641 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
11642 : }
11643 : }
11644 0 : if (ndr_flags & NDR_BUFFERS) {
11645 0 : if (!(ndr_flags & NDR_SCALARS)) {
11646 : /* We didn't get it above, and the token is not needed after this. */
11647 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
11648 : }
11649 0 : switch (level) {
11650 0 : case 1:
11651 0 : if (r->info1) {
11652 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
11653 : }
11654 0 : break;
11655 :
11656 0 : case 2:
11657 0 : if (r->info2) {
11658 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
11659 : }
11660 0 : break;
11661 :
11662 0 : case 3:
11663 0 : if (r->info3) {
11664 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
11665 : }
11666 0 : break;
11667 :
11668 0 : case 4:
11669 0 : if (r->info4) {
11670 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
11671 : }
11672 0 : break;
11673 :
11674 0 : case 6:
11675 0 : if (r->info6) {
11676 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
11677 : }
11678 0 : break;
11679 :
11680 0 : case 8:
11681 0 : if (r->info8) {
11682 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfo8(ndr, NDR_SCALARS|NDR_BUFFERS, r->info8));
11683 : }
11684 0 : break;
11685 :
11686 0 : default:
11687 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
11688 : }
11689 : }
11690 0 : return NDR_ERR_SUCCESS;
11691 : }
11692 :
11693 8 : static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_AddDriverInfo *r)
11694 : {
11695 8 : uint32_t level;
11696 8 : uint32_t _level;
11697 8 : TALLOC_CTX *_mem_save_info1_0 = NULL;
11698 8 : uint32_t _ptr_info1;
11699 8 : TALLOC_CTX *_mem_save_info2_0 = NULL;
11700 8 : uint32_t _ptr_info2;
11701 8 : TALLOC_CTX *_mem_save_info3_0 = NULL;
11702 8 : uint32_t _ptr_info3;
11703 8 : TALLOC_CTX *_mem_save_info4_0 = NULL;
11704 8 : uint32_t _ptr_info4;
11705 8 : TALLOC_CTX *_mem_save_info6_0 = NULL;
11706 8 : uint32_t _ptr_info6;
11707 8 : TALLOC_CTX *_mem_save_info8_0 = NULL;
11708 8 : uint32_t _ptr_info8;
11709 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11710 8 : if (ndr_flags & NDR_SCALARS) {
11711 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
11712 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
11713 4 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
11714 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
11715 4 : if (_level != level) {
11716 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
11717 : }
11718 : /* ms_union is always aligned to the largest union arm*/
11719 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
11720 4 : switch (level) {
11721 0 : case 1: {
11722 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
11723 0 : if (_ptr_info1) {
11724 0 : NDR_PULL_ALLOC(ndr, r->info1);
11725 : } else {
11726 0 : r->info1 = NULL;
11727 : }
11728 0 : break; }
11729 :
11730 0 : case 2: {
11731 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
11732 0 : if (_ptr_info2) {
11733 0 : NDR_PULL_ALLOC(ndr, r->info2);
11734 : } else {
11735 0 : r->info2 = NULL;
11736 : }
11737 0 : break; }
11738 :
11739 0 : case 3: {
11740 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
11741 0 : if (_ptr_info3) {
11742 0 : NDR_PULL_ALLOC(ndr, r->info3);
11743 : } else {
11744 0 : r->info3 = NULL;
11745 : }
11746 0 : break; }
11747 :
11748 0 : case 4: {
11749 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
11750 0 : if (_ptr_info4) {
11751 0 : NDR_PULL_ALLOC(ndr, r->info4);
11752 : } else {
11753 0 : r->info4 = NULL;
11754 : }
11755 0 : break; }
11756 :
11757 4 : case 6: {
11758 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
11759 4 : if (_ptr_info6) {
11760 4 : NDR_PULL_ALLOC(ndr, r->info6);
11761 : } else {
11762 0 : r->info6 = NULL;
11763 : }
11764 0 : break; }
11765 :
11766 0 : case 8: {
11767 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info8));
11768 0 : if (_ptr_info8) {
11769 0 : NDR_PULL_ALLOC(ndr, r->info8);
11770 : } else {
11771 0 : r->info8 = NULL;
11772 : }
11773 0 : break; }
11774 :
11775 0 : default:
11776 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
11777 : }
11778 : }
11779 8 : if (ndr_flags & NDR_BUFFERS) {
11780 4 : if (!(ndr_flags & NDR_SCALARS)) {
11781 : /* We didn't get it above, and the token is not needed after this. */
11782 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
11783 : }
11784 4 : switch (level) {
11785 0 : case 1:
11786 0 : if (r->info1) {
11787 0 : _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
11788 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
11789 0 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
11790 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
11791 : }
11792 0 : break;
11793 :
11794 0 : case 2:
11795 0 : if (r->info2) {
11796 0 : _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
11797 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
11798 0 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
11799 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
11800 : }
11801 0 : break;
11802 :
11803 0 : case 3:
11804 0 : if (r->info3) {
11805 0 : _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
11806 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
11807 0 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
11808 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
11809 : }
11810 0 : break;
11811 :
11812 0 : case 4:
11813 0 : if (r->info4) {
11814 0 : _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
11815 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
11816 0 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
11817 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
11818 : }
11819 0 : break;
11820 :
11821 4 : case 6:
11822 4 : if (r->info6) {
11823 4 : _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
11824 4 : NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
11825 4 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
11826 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
11827 : }
11828 0 : break;
11829 :
11830 0 : case 8:
11831 0 : if (r->info8) {
11832 0 : _mem_save_info8_0 = NDR_PULL_GET_MEM_CTX(ndr);
11833 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info8, 0);
11834 0 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfo8(ndr, NDR_SCALARS|NDR_BUFFERS, r->info8));
11835 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info8_0, 0);
11836 : }
11837 0 : break;
11838 :
11839 0 : default:
11840 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
11841 : }
11842 : }
11843 0 : return NDR_ERR_SUCCESS;
11844 : }
11845 :
11846 4 : _PUBLIC_ void ndr_print_spoolss_AddDriverInfo(struct ndr_print *ndr, const char *name, const union spoolss_AddDriverInfo *r)
11847 : {
11848 4 : uint32_t level;
11849 4 : level = ndr_print_steal_switch_value(ndr, r);
11850 4 : ndr_print_union(ndr, name, level, "spoolss_AddDriverInfo");
11851 4 : switch (level) {
11852 0 : case 1:
11853 0 : ndr_print_ptr(ndr, "info1", r->info1);
11854 0 : ndr->depth++;
11855 0 : if (r->info1) {
11856 0 : ndr_print_spoolss_AddDriverInfo1(ndr, "info1", r->info1);
11857 : }
11858 0 : ndr->depth--;
11859 0 : break;
11860 :
11861 0 : case 2:
11862 0 : ndr_print_ptr(ndr, "info2", r->info2);
11863 0 : ndr->depth++;
11864 0 : if (r->info2) {
11865 0 : ndr_print_spoolss_AddDriverInfo2(ndr, "info2", r->info2);
11866 : }
11867 0 : ndr->depth--;
11868 0 : break;
11869 :
11870 0 : case 3:
11871 0 : ndr_print_ptr(ndr, "info3", r->info3);
11872 0 : ndr->depth++;
11873 0 : if (r->info3) {
11874 0 : ndr_print_spoolss_AddDriverInfo3(ndr, "info3", r->info3);
11875 : }
11876 0 : ndr->depth--;
11877 0 : break;
11878 :
11879 0 : case 4:
11880 0 : ndr_print_ptr(ndr, "info4", r->info4);
11881 0 : ndr->depth++;
11882 0 : if (r->info4) {
11883 0 : ndr_print_spoolss_AddDriverInfo4(ndr, "info4", r->info4);
11884 : }
11885 0 : ndr->depth--;
11886 0 : break;
11887 :
11888 4 : case 6:
11889 4 : ndr_print_ptr(ndr, "info6", r->info6);
11890 4 : ndr->depth++;
11891 4 : if (r->info6) {
11892 4 : ndr_print_spoolss_AddDriverInfo6(ndr, "info6", r->info6);
11893 : }
11894 4 : ndr->depth--;
11895 4 : break;
11896 :
11897 0 : case 8:
11898 0 : ndr_print_ptr(ndr, "info8", r->info8);
11899 0 : ndr->depth++;
11900 0 : if (r->info8) {
11901 0 : ndr_print_spoolss_AddDriverInfo8(ndr, "info8", r->info8);
11902 : }
11903 0 : ndr->depth--;
11904 0 : break;
11905 :
11906 0 : default:
11907 0 : ndr_print_bad_level(ndr, name, level);
11908 : }
11909 4 : }
11910 :
11911 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_AddDriverInfoCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_AddDriverInfoCtr *r)
11912 : {
11913 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11914 0 : if (ndr_flags & NDR_SCALARS) {
11915 0 : NDR_CHECK(ndr_push_align(ndr, 5));
11916 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
11917 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
11918 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr, NDR_SCALARS, &r->info));
11919 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
11920 : }
11921 0 : if (ndr_flags & NDR_BUFFERS) {
11922 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
11923 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr, NDR_BUFFERS, &r->info));
11924 : }
11925 0 : return NDR_ERR_SUCCESS;
11926 : }
11927 :
11928 4 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_AddDriverInfoCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_AddDriverInfoCtr *r)
11929 : {
11930 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11931 4 : if (ndr_flags & NDR_SCALARS) {
11932 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
11933 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
11934 4 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
11935 4 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr, NDR_SCALARS, &r->info));
11936 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
11937 : }
11938 4 : if (ndr_flags & NDR_BUFFERS) {
11939 4 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
11940 4 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr, NDR_BUFFERS, &r->info));
11941 : }
11942 0 : return NDR_ERR_SUCCESS;
11943 : }
11944 :
11945 0 : static void ndr_print_flags_spoolss_AddDriverInfoCtr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_AddDriverInfoCtr *r)
11946 : {
11947 0 : ndr_print_spoolss_AddDriverInfoCtr(ndr, name, r);
11948 0 : }
11949 :
11950 4 : _PUBLIC_ void ndr_print_spoolss_AddDriverInfoCtr(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfoCtr *r)
11951 : {
11952 4 : ndr_print_struct(ndr, name, "spoolss_AddDriverInfoCtr");
11953 4 : if (r == NULL) { ndr_print_null(ndr); return; }
11954 4 : ndr->depth++;
11955 4 : ndr_print_uint32(ndr, "level", r->level);
11956 4 : ndr_print_set_switch_value(ndr, &r->info, r->level);
11957 4 : ndr_print_spoolss_AddDriverInfo(ndr, "info", &r->info);
11958 4 : ndr->depth--;
11959 : }
11960 :
11961 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DriverInfo1 *r)
11962 : {
11963 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11964 0 : if (ndr_flags & NDR_SCALARS) {
11965 0 : NDR_CHECK(ndr_push_align(ndr, 5));
11966 : {
11967 0 : libndr_flags _flags_save_string = ndr->flags;
11968 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
11969 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
11970 0 : ndr->flags = _flags_save_string;
11971 : }
11972 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
11973 : }
11974 0 : if (ndr_flags & NDR_BUFFERS) {
11975 : {
11976 0 : libndr_flags _flags_save_string = ndr->flags;
11977 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
11978 0 : if (r->driver_name) {
11979 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
11980 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
11981 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
11982 : }
11983 0 : ndr->flags = _flags_save_string;
11984 : }
11985 : }
11986 0 : return NDR_ERR_SUCCESS;
11987 : }
11988 :
11989 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DriverInfo1 *r)
11990 : {
11991 0 : uint32_t _ptr_driver_name;
11992 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
11993 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
11994 0 : if (ndr_flags & NDR_SCALARS) {
11995 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
11996 : {
11997 0 : libndr_flags _flags_save_string = ndr->flags;
11998 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
11999 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
12000 0 : if (_ptr_driver_name) {
12001 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
12002 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
12003 : } else {
12004 0 : r->driver_name = NULL;
12005 : }
12006 0 : ndr->flags = _flags_save_string;
12007 : }
12008 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12009 : }
12010 0 : if (ndr_flags & NDR_BUFFERS) {
12011 : {
12012 0 : libndr_flags _flags_save_string = ndr->flags;
12013 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12014 0 : if (r->driver_name) {
12015 0 : uint32_t _relative_save_offset;
12016 0 : _relative_save_offset = ndr->offset;
12017 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
12018 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12019 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
12020 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
12021 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
12022 0 : if (ndr->offset > ndr->relative_highest_offset) {
12023 0 : ndr->relative_highest_offset = ndr->offset;
12024 : }
12025 0 : ndr->offset = _relative_save_offset;
12026 : }
12027 0 : ndr->flags = _flags_save_string;
12028 : }
12029 : }
12030 0 : return NDR_ERR_SUCCESS;
12031 : }
12032 :
12033 0 : static void ndr_print_flags_spoolss_DriverInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverInfo1 *r)
12034 : {
12035 0 : ndr_print_spoolss_DriverInfo1(ndr, name, r);
12036 0 : }
12037 :
12038 0 : _PUBLIC_ void ndr_print_spoolss_DriverInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo1 *r)
12039 : {
12040 0 : ndr_print_struct(ndr, name, "spoolss_DriverInfo1");
12041 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12042 0 : ndr->depth++;
12043 : {
12044 0 : libndr_flags _flags_save_string = ndr->flags;
12045 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12046 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
12047 0 : ndr->depth++;
12048 0 : if (r->driver_name) {
12049 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
12050 : }
12051 0 : ndr->depth--;
12052 0 : ndr->flags = _flags_save_string;
12053 : }
12054 0 : ndr->depth--;
12055 : }
12056 :
12057 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverInfo1(const struct spoolss_DriverInfo1 *r, libndr_flags flags)
12058 : {
12059 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo1);
12060 : }
12061 :
12062 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DriverInfo2 *r)
12063 : {
12064 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12065 0 : if (ndr_flags & NDR_SCALARS) {
12066 0 : NDR_CHECK(ndr_push_align(ndr, 5));
12067 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
12068 : {
12069 0 : libndr_flags _flags_save_string = ndr->flags;
12070 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12071 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
12072 0 : ndr->flags = _flags_save_string;
12073 : }
12074 : {
12075 0 : libndr_flags _flags_save_string = ndr->flags;
12076 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12077 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
12078 0 : ndr->flags = _flags_save_string;
12079 : }
12080 : {
12081 0 : libndr_flags _flags_save_string = ndr->flags;
12082 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12083 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
12084 0 : ndr->flags = _flags_save_string;
12085 : }
12086 : {
12087 0 : libndr_flags _flags_save_string = ndr->flags;
12088 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12089 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
12090 0 : ndr->flags = _flags_save_string;
12091 : }
12092 : {
12093 0 : libndr_flags _flags_save_string = ndr->flags;
12094 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12095 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
12096 0 : ndr->flags = _flags_save_string;
12097 : }
12098 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12099 : }
12100 0 : if (ndr_flags & NDR_BUFFERS) {
12101 : {
12102 0 : libndr_flags _flags_save_string = ndr->flags;
12103 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12104 0 : if (r->driver_name) {
12105 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
12106 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
12107 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
12108 : }
12109 0 : ndr->flags = _flags_save_string;
12110 : }
12111 : {
12112 0 : libndr_flags _flags_save_string = ndr->flags;
12113 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12114 0 : if (r->architecture) {
12115 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->architecture));
12116 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
12117 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->architecture));
12118 : }
12119 0 : ndr->flags = _flags_save_string;
12120 : }
12121 : {
12122 0 : libndr_flags _flags_save_string = ndr->flags;
12123 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12124 0 : if (r->driver_path) {
12125 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_path));
12126 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
12127 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_path));
12128 : }
12129 0 : ndr->flags = _flags_save_string;
12130 : }
12131 : {
12132 0 : libndr_flags _flags_save_string = ndr->flags;
12133 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12134 0 : if (r->data_file) {
12135 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_file));
12136 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
12137 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_file));
12138 : }
12139 0 : ndr->flags = _flags_save_string;
12140 : }
12141 : {
12142 0 : libndr_flags _flags_save_string = ndr->flags;
12143 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12144 0 : if (r->config_file) {
12145 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->config_file));
12146 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
12147 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->config_file));
12148 : }
12149 0 : ndr->flags = _flags_save_string;
12150 : }
12151 : }
12152 0 : return NDR_ERR_SUCCESS;
12153 : }
12154 :
12155 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DriverInfo2 *r)
12156 : {
12157 0 : uint32_t _ptr_driver_name;
12158 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
12159 0 : uint32_t _ptr_architecture;
12160 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
12161 0 : uint32_t _ptr_driver_path;
12162 0 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
12163 0 : uint32_t _ptr_data_file;
12164 0 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
12165 0 : uint32_t _ptr_config_file;
12166 0 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
12167 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12168 0 : if (ndr_flags & NDR_SCALARS) {
12169 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
12170 0 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
12171 : {
12172 0 : libndr_flags _flags_save_string = ndr->flags;
12173 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12174 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
12175 0 : if (_ptr_driver_name) {
12176 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
12177 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
12178 : } else {
12179 0 : r->driver_name = NULL;
12180 : }
12181 0 : ndr->flags = _flags_save_string;
12182 : }
12183 : {
12184 0 : libndr_flags _flags_save_string = ndr->flags;
12185 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12186 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
12187 0 : if (_ptr_architecture) {
12188 0 : NDR_PULL_ALLOC(ndr, r->architecture);
12189 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
12190 : } else {
12191 0 : r->architecture = NULL;
12192 : }
12193 0 : ndr->flags = _flags_save_string;
12194 : }
12195 : {
12196 0 : libndr_flags _flags_save_string = ndr->flags;
12197 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12198 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
12199 0 : if (_ptr_driver_path) {
12200 0 : NDR_PULL_ALLOC(ndr, r->driver_path);
12201 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
12202 : } else {
12203 0 : r->driver_path = NULL;
12204 : }
12205 0 : ndr->flags = _flags_save_string;
12206 : }
12207 : {
12208 0 : libndr_flags _flags_save_string = ndr->flags;
12209 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12210 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
12211 0 : if (_ptr_data_file) {
12212 0 : NDR_PULL_ALLOC(ndr, r->data_file);
12213 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
12214 : } else {
12215 0 : r->data_file = NULL;
12216 : }
12217 0 : ndr->flags = _flags_save_string;
12218 : }
12219 : {
12220 0 : libndr_flags _flags_save_string = ndr->flags;
12221 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12222 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
12223 0 : if (_ptr_config_file) {
12224 0 : NDR_PULL_ALLOC(ndr, r->config_file);
12225 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
12226 : } else {
12227 0 : r->config_file = NULL;
12228 : }
12229 0 : ndr->flags = _flags_save_string;
12230 : }
12231 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12232 : }
12233 0 : if (ndr_flags & NDR_BUFFERS) {
12234 : {
12235 0 : libndr_flags _flags_save_string = ndr->flags;
12236 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12237 0 : if (r->driver_name) {
12238 0 : uint32_t _relative_save_offset;
12239 0 : _relative_save_offset = ndr->offset;
12240 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
12241 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12242 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
12243 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
12244 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
12245 0 : if (ndr->offset > ndr->relative_highest_offset) {
12246 0 : ndr->relative_highest_offset = ndr->offset;
12247 : }
12248 0 : ndr->offset = _relative_save_offset;
12249 : }
12250 0 : ndr->flags = _flags_save_string;
12251 : }
12252 : {
12253 0 : libndr_flags _flags_save_string = ndr->flags;
12254 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12255 0 : if (r->architecture) {
12256 0 : uint32_t _relative_save_offset;
12257 0 : _relative_save_offset = ndr->offset;
12258 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
12259 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
12260 0 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
12261 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
12262 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
12263 0 : if (ndr->offset > ndr->relative_highest_offset) {
12264 0 : ndr->relative_highest_offset = ndr->offset;
12265 : }
12266 0 : ndr->offset = _relative_save_offset;
12267 : }
12268 0 : ndr->flags = _flags_save_string;
12269 : }
12270 : {
12271 0 : libndr_flags _flags_save_string = ndr->flags;
12272 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12273 0 : if (r->driver_path) {
12274 0 : uint32_t _relative_save_offset;
12275 0 : _relative_save_offset = ndr->offset;
12276 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
12277 0 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
12278 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
12279 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
12280 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
12281 0 : if (ndr->offset > ndr->relative_highest_offset) {
12282 0 : ndr->relative_highest_offset = ndr->offset;
12283 : }
12284 0 : ndr->offset = _relative_save_offset;
12285 : }
12286 0 : ndr->flags = _flags_save_string;
12287 : }
12288 : {
12289 0 : libndr_flags _flags_save_string = ndr->flags;
12290 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12291 0 : if (r->data_file) {
12292 0 : uint32_t _relative_save_offset;
12293 0 : _relative_save_offset = ndr->offset;
12294 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
12295 0 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
12296 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
12297 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
12298 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
12299 0 : if (ndr->offset > ndr->relative_highest_offset) {
12300 0 : ndr->relative_highest_offset = ndr->offset;
12301 : }
12302 0 : ndr->offset = _relative_save_offset;
12303 : }
12304 0 : ndr->flags = _flags_save_string;
12305 : }
12306 : {
12307 0 : libndr_flags _flags_save_string = ndr->flags;
12308 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12309 0 : if (r->config_file) {
12310 0 : uint32_t _relative_save_offset;
12311 0 : _relative_save_offset = ndr->offset;
12312 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
12313 0 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
12314 0 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
12315 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
12316 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
12317 0 : if (ndr->offset > ndr->relative_highest_offset) {
12318 0 : ndr->relative_highest_offset = ndr->offset;
12319 : }
12320 0 : ndr->offset = _relative_save_offset;
12321 : }
12322 0 : ndr->flags = _flags_save_string;
12323 : }
12324 : }
12325 0 : return NDR_ERR_SUCCESS;
12326 : }
12327 :
12328 0 : static void ndr_print_flags_spoolss_DriverInfo2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverInfo2 *r)
12329 : {
12330 0 : ndr_print_spoolss_DriverInfo2(ndr, name, r);
12331 0 : }
12332 :
12333 0 : _PUBLIC_ void ndr_print_spoolss_DriverInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo2 *r)
12334 : {
12335 0 : ndr_print_struct(ndr, name, "spoolss_DriverInfo2");
12336 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12337 0 : ndr->depth++;
12338 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
12339 : {
12340 0 : libndr_flags _flags_save_string = ndr->flags;
12341 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12342 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
12343 0 : ndr->depth++;
12344 0 : if (r->driver_name) {
12345 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
12346 : }
12347 0 : ndr->depth--;
12348 0 : ndr->flags = _flags_save_string;
12349 : }
12350 : {
12351 0 : libndr_flags _flags_save_string = ndr->flags;
12352 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12353 0 : ndr_print_ptr(ndr, "architecture", r->architecture);
12354 0 : ndr->depth++;
12355 0 : if (r->architecture) {
12356 0 : ndr_print_string(ndr, "architecture", r->architecture);
12357 : }
12358 0 : ndr->depth--;
12359 0 : ndr->flags = _flags_save_string;
12360 : }
12361 : {
12362 0 : libndr_flags _flags_save_string = ndr->flags;
12363 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12364 0 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
12365 0 : ndr->depth++;
12366 0 : if (r->driver_path) {
12367 0 : ndr_print_string(ndr, "driver_path", r->driver_path);
12368 : }
12369 0 : ndr->depth--;
12370 0 : ndr->flags = _flags_save_string;
12371 : }
12372 : {
12373 0 : libndr_flags _flags_save_string = ndr->flags;
12374 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12375 0 : ndr_print_ptr(ndr, "data_file", r->data_file);
12376 0 : ndr->depth++;
12377 0 : if (r->data_file) {
12378 0 : ndr_print_string(ndr, "data_file", r->data_file);
12379 : }
12380 0 : ndr->depth--;
12381 0 : ndr->flags = _flags_save_string;
12382 : }
12383 : {
12384 0 : libndr_flags _flags_save_string = ndr->flags;
12385 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12386 0 : ndr_print_ptr(ndr, "config_file", r->config_file);
12387 0 : ndr->depth++;
12388 0 : if (r->config_file) {
12389 0 : ndr_print_string(ndr, "config_file", r->config_file);
12390 : }
12391 0 : ndr->depth--;
12392 0 : ndr->flags = _flags_save_string;
12393 : }
12394 0 : ndr->depth--;
12395 : }
12396 :
12397 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverInfo2(const struct spoolss_DriverInfo2 *r, libndr_flags flags)
12398 : {
12399 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo2);
12400 : }
12401 :
12402 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DriverInfo3 *r)
12403 : {
12404 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12405 0 : if (ndr_flags & NDR_SCALARS) {
12406 0 : NDR_CHECK(ndr_push_align(ndr, 5));
12407 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
12408 : {
12409 0 : libndr_flags _flags_save_string = ndr->flags;
12410 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12411 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
12412 0 : ndr->flags = _flags_save_string;
12413 : }
12414 : {
12415 0 : libndr_flags _flags_save_string = ndr->flags;
12416 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12417 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
12418 0 : ndr->flags = _flags_save_string;
12419 : }
12420 : {
12421 0 : libndr_flags _flags_save_string = ndr->flags;
12422 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12423 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
12424 0 : ndr->flags = _flags_save_string;
12425 : }
12426 : {
12427 0 : libndr_flags _flags_save_string = ndr->flags;
12428 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12429 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
12430 0 : ndr->flags = _flags_save_string;
12431 : }
12432 : {
12433 0 : libndr_flags _flags_save_string = ndr->flags;
12434 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12435 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
12436 0 : ndr->flags = _flags_save_string;
12437 : }
12438 : {
12439 0 : libndr_flags _flags_save_string = ndr->flags;
12440 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12441 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->help_file));
12442 0 : ndr->flags = _flags_save_string;
12443 : }
12444 : {
12445 0 : libndr_flags _flags_save_string_array = ndr->flags;
12446 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12447 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dependent_files));
12448 0 : ndr->flags = _flags_save_string_array;
12449 : }
12450 : {
12451 0 : libndr_flags _flags_save_string = ndr->flags;
12452 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12453 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
12454 0 : ndr->flags = _flags_save_string;
12455 : }
12456 : {
12457 0 : libndr_flags _flags_save_string = ndr->flags;
12458 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12459 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->default_datatype));
12460 0 : ndr->flags = _flags_save_string;
12461 : }
12462 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12463 : }
12464 0 : if (ndr_flags & NDR_BUFFERS) {
12465 : {
12466 0 : libndr_flags _flags_save_string = ndr->flags;
12467 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12468 0 : if (r->driver_name) {
12469 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
12470 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
12471 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
12472 : }
12473 0 : ndr->flags = _flags_save_string;
12474 : }
12475 : {
12476 0 : libndr_flags _flags_save_string = ndr->flags;
12477 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12478 0 : if (r->architecture) {
12479 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->architecture));
12480 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
12481 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->architecture));
12482 : }
12483 0 : ndr->flags = _flags_save_string;
12484 : }
12485 : {
12486 0 : libndr_flags _flags_save_string = ndr->flags;
12487 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12488 0 : if (r->driver_path) {
12489 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_path));
12490 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
12491 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_path));
12492 : }
12493 0 : ndr->flags = _flags_save_string;
12494 : }
12495 : {
12496 0 : libndr_flags _flags_save_string = ndr->flags;
12497 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12498 0 : if (r->data_file) {
12499 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_file));
12500 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
12501 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_file));
12502 : }
12503 0 : ndr->flags = _flags_save_string;
12504 : }
12505 : {
12506 0 : libndr_flags _flags_save_string = ndr->flags;
12507 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12508 0 : if (r->config_file) {
12509 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->config_file));
12510 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
12511 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->config_file));
12512 : }
12513 0 : ndr->flags = _flags_save_string;
12514 : }
12515 : {
12516 0 : libndr_flags _flags_save_string = ndr->flags;
12517 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12518 0 : if (r->help_file) {
12519 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->help_file));
12520 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->help_file));
12521 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->help_file));
12522 : }
12523 0 : ndr->flags = _flags_save_string;
12524 : }
12525 : {
12526 0 : libndr_flags _flags_save_string_array = ndr->flags;
12527 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12528 0 : if (r->dependent_files) {
12529 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->dependent_files));
12530 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->dependent_files));
12531 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->dependent_files));
12532 : }
12533 0 : ndr->flags = _flags_save_string_array;
12534 : }
12535 : {
12536 0 : libndr_flags _flags_save_string = ndr->flags;
12537 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12538 0 : if (r->monitor_name) {
12539 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->monitor_name));
12540 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
12541 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->monitor_name));
12542 : }
12543 0 : ndr->flags = _flags_save_string;
12544 : }
12545 : {
12546 0 : libndr_flags _flags_save_string = ndr->flags;
12547 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12548 0 : if (r->default_datatype) {
12549 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->default_datatype));
12550 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->default_datatype));
12551 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->default_datatype));
12552 : }
12553 0 : ndr->flags = _flags_save_string;
12554 : }
12555 : }
12556 0 : return NDR_ERR_SUCCESS;
12557 : }
12558 :
12559 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DriverInfo3 *r)
12560 : {
12561 0 : uint32_t _ptr_driver_name;
12562 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
12563 0 : uint32_t _ptr_architecture;
12564 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
12565 0 : uint32_t _ptr_driver_path;
12566 0 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
12567 0 : uint32_t _ptr_data_file;
12568 0 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
12569 0 : uint32_t _ptr_config_file;
12570 0 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
12571 0 : uint32_t _ptr_help_file;
12572 0 : TALLOC_CTX *_mem_save_help_file_0 = NULL;
12573 0 : uint32_t _ptr_dependent_files;
12574 0 : TALLOC_CTX *_mem_save_dependent_files_0 = NULL;
12575 0 : uint32_t _ptr_monitor_name;
12576 0 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
12577 0 : uint32_t _ptr_default_datatype;
12578 0 : TALLOC_CTX *_mem_save_default_datatype_0 = NULL;
12579 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
12580 0 : if (ndr_flags & NDR_SCALARS) {
12581 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
12582 0 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
12583 : {
12584 0 : libndr_flags _flags_save_string = ndr->flags;
12585 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12586 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
12587 0 : if (_ptr_driver_name) {
12588 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
12589 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
12590 : } else {
12591 0 : r->driver_name = NULL;
12592 : }
12593 0 : ndr->flags = _flags_save_string;
12594 : }
12595 : {
12596 0 : libndr_flags _flags_save_string = ndr->flags;
12597 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12598 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
12599 0 : if (_ptr_architecture) {
12600 0 : NDR_PULL_ALLOC(ndr, r->architecture);
12601 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
12602 : } else {
12603 0 : r->architecture = NULL;
12604 : }
12605 0 : ndr->flags = _flags_save_string;
12606 : }
12607 : {
12608 0 : libndr_flags _flags_save_string = ndr->flags;
12609 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12610 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
12611 0 : if (_ptr_driver_path) {
12612 0 : NDR_PULL_ALLOC(ndr, r->driver_path);
12613 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
12614 : } else {
12615 0 : r->driver_path = NULL;
12616 : }
12617 0 : ndr->flags = _flags_save_string;
12618 : }
12619 : {
12620 0 : libndr_flags _flags_save_string = ndr->flags;
12621 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12622 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
12623 0 : if (_ptr_data_file) {
12624 0 : NDR_PULL_ALLOC(ndr, r->data_file);
12625 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
12626 : } else {
12627 0 : r->data_file = NULL;
12628 : }
12629 0 : ndr->flags = _flags_save_string;
12630 : }
12631 : {
12632 0 : libndr_flags _flags_save_string = ndr->flags;
12633 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12634 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
12635 0 : if (_ptr_config_file) {
12636 0 : NDR_PULL_ALLOC(ndr, r->config_file);
12637 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
12638 : } else {
12639 0 : r->config_file = NULL;
12640 : }
12641 0 : ndr->flags = _flags_save_string;
12642 : }
12643 : {
12644 0 : libndr_flags _flags_save_string = ndr->flags;
12645 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12646 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
12647 0 : if (_ptr_help_file) {
12648 0 : NDR_PULL_ALLOC(ndr, r->help_file);
12649 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->help_file, _ptr_help_file));
12650 : } else {
12651 0 : r->help_file = NULL;
12652 : }
12653 0 : ndr->flags = _flags_save_string;
12654 : }
12655 : {
12656 0 : libndr_flags _flags_save_string_array = ndr->flags;
12657 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12658 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
12659 0 : if (_ptr_dependent_files) {
12660 0 : NDR_PULL_ALLOC(ndr, r->dependent_files);
12661 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dependent_files, _ptr_dependent_files));
12662 : } else {
12663 0 : r->dependent_files = NULL;
12664 : }
12665 0 : ndr->flags = _flags_save_string_array;
12666 : }
12667 : {
12668 0 : libndr_flags _flags_save_string = ndr->flags;
12669 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12670 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
12671 0 : if (_ptr_monitor_name) {
12672 0 : NDR_PULL_ALLOC(ndr, r->monitor_name);
12673 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
12674 : } else {
12675 0 : r->monitor_name = NULL;
12676 : }
12677 0 : ndr->flags = _flags_save_string;
12678 : }
12679 : {
12680 0 : libndr_flags _flags_save_string = ndr->flags;
12681 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12682 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
12683 0 : if (_ptr_default_datatype) {
12684 0 : NDR_PULL_ALLOC(ndr, r->default_datatype);
12685 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->default_datatype, _ptr_default_datatype));
12686 : } else {
12687 0 : r->default_datatype = NULL;
12688 : }
12689 0 : ndr->flags = _flags_save_string;
12690 : }
12691 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12692 : }
12693 0 : if (ndr_flags & NDR_BUFFERS) {
12694 : {
12695 0 : libndr_flags _flags_save_string = ndr->flags;
12696 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12697 0 : if (r->driver_name) {
12698 0 : uint32_t _relative_save_offset;
12699 0 : _relative_save_offset = ndr->offset;
12700 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
12701 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12702 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
12703 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
12704 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
12705 0 : if (ndr->offset > ndr->relative_highest_offset) {
12706 0 : ndr->relative_highest_offset = ndr->offset;
12707 : }
12708 0 : ndr->offset = _relative_save_offset;
12709 : }
12710 0 : ndr->flags = _flags_save_string;
12711 : }
12712 : {
12713 0 : libndr_flags _flags_save_string = ndr->flags;
12714 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12715 0 : if (r->architecture) {
12716 0 : uint32_t _relative_save_offset;
12717 0 : _relative_save_offset = ndr->offset;
12718 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
12719 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
12720 0 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
12721 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
12722 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
12723 0 : if (ndr->offset > ndr->relative_highest_offset) {
12724 0 : ndr->relative_highest_offset = ndr->offset;
12725 : }
12726 0 : ndr->offset = _relative_save_offset;
12727 : }
12728 0 : ndr->flags = _flags_save_string;
12729 : }
12730 : {
12731 0 : libndr_flags _flags_save_string = ndr->flags;
12732 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12733 0 : if (r->driver_path) {
12734 0 : uint32_t _relative_save_offset;
12735 0 : _relative_save_offset = ndr->offset;
12736 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
12737 0 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
12738 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
12739 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
12740 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
12741 0 : if (ndr->offset > ndr->relative_highest_offset) {
12742 0 : ndr->relative_highest_offset = ndr->offset;
12743 : }
12744 0 : ndr->offset = _relative_save_offset;
12745 : }
12746 0 : ndr->flags = _flags_save_string;
12747 : }
12748 : {
12749 0 : libndr_flags _flags_save_string = ndr->flags;
12750 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12751 0 : if (r->data_file) {
12752 0 : uint32_t _relative_save_offset;
12753 0 : _relative_save_offset = ndr->offset;
12754 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
12755 0 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
12756 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
12757 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
12758 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
12759 0 : if (ndr->offset > ndr->relative_highest_offset) {
12760 0 : ndr->relative_highest_offset = ndr->offset;
12761 : }
12762 0 : ndr->offset = _relative_save_offset;
12763 : }
12764 0 : ndr->flags = _flags_save_string;
12765 : }
12766 : {
12767 0 : libndr_flags _flags_save_string = ndr->flags;
12768 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12769 0 : if (r->config_file) {
12770 0 : uint32_t _relative_save_offset;
12771 0 : _relative_save_offset = ndr->offset;
12772 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
12773 0 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
12774 0 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
12775 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
12776 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
12777 0 : if (ndr->offset > ndr->relative_highest_offset) {
12778 0 : ndr->relative_highest_offset = ndr->offset;
12779 : }
12780 0 : ndr->offset = _relative_save_offset;
12781 : }
12782 0 : ndr->flags = _flags_save_string;
12783 : }
12784 : {
12785 0 : libndr_flags _flags_save_string = ndr->flags;
12786 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12787 0 : if (r->help_file) {
12788 0 : uint32_t _relative_save_offset;
12789 0 : _relative_save_offset = ndr->offset;
12790 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->help_file));
12791 0 : _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
12792 0 : NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
12793 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->help_file));
12794 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
12795 0 : if (ndr->offset > ndr->relative_highest_offset) {
12796 0 : ndr->relative_highest_offset = ndr->offset;
12797 : }
12798 0 : ndr->offset = _relative_save_offset;
12799 : }
12800 0 : ndr->flags = _flags_save_string;
12801 : }
12802 : {
12803 0 : libndr_flags _flags_save_string_array = ndr->flags;
12804 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12805 0 : if (r->dependent_files) {
12806 0 : uint32_t _relative_save_offset;
12807 0 : _relative_save_offset = ndr->offset;
12808 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dependent_files));
12809 0 : _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
12810 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
12811 0 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->dependent_files));
12812 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
12813 0 : if (ndr->offset > ndr->relative_highest_offset) {
12814 0 : ndr->relative_highest_offset = ndr->offset;
12815 : }
12816 0 : ndr->offset = _relative_save_offset;
12817 : }
12818 0 : ndr->flags = _flags_save_string_array;
12819 : }
12820 : {
12821 0 : libndr_flags _flags_save_string = ndr->flags;
12822 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12823 0 : if (r->monitor_name) {
12824 0 : uint32_t _relative_save_offset;
12825 0 : _relative_save_offset = ndr->offset;
12826 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
12827 0 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12828 0 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
12829 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
12830 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
12831 0 : if (ndr->offset > ndr->relative_highest_offset) {
12832 0 : ndr->relative_highest_offset = ndr->offset;
12833 : }
12834 0 : ndr->offset = _relative_save_offset;
12835 : }
12836 0 : ndr->flags = _flags_save_string;
12837 : }
12838 : {
12839 0 : libndr_flags _flags_save_string = ndr->flags;
12840 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12841 0 : if (r->default_datatype) {
12842 0 : uint32_t _relative_save_offset;
12843 0 : _relative_save_offset = ndr->offset;
12844 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->default_datatype));
12845 0 : _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
12846 0 : NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
12847 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->default_datatype));
12848 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
12849 0 : if (ndr->offset > ndr->relative_highest_offset) {
12850 0 : ndr->relative_highest_offset = ndr->offset;
12851 : }
12852 0 : ndr->offset = _relative_save_offset;
12853 : }
12854 0 : ndr->flags = _flags_save_string;
12855 : }
12856 : }
12857 0 : return NDR_ERR_SUCCESS;
12858 : }
12859 :
12860 0 : static void ndr_print_flags_spoolss_DriverInfo3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverInfo3 *r)
12861 : {
12862 0 : ndr_print_spoolss_DriverInfo3(ndr, name, r);
12863 0 : }
12864 :
12865 0 : _PUBLIC_ void ndr_print_spoolss_DriverInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo3 *r)
12866 : {
12867 0 : ndr_print_struct(ndr, name, "spoolss_DriverInfo3");
12868 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12869 0 : ndr->depth++;
12870 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
12871 : {
12872 0 : libndr_flags _flags_save_string = ndr->flags;
12873 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12874 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
12875 0 : ndr->depth++;
12876 0 : if (r->driver_name) {
12877 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
12878 : }
12879 0 : ndr->depth--;
12880 0 : ndr->flags = _flags_save_string;
12881 : }
12882 : {
12883 0 : libndr_flags _flags_save_string = ndr->flags;
12884 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12885 0 : ndr_print_ptr(ndr, "architecture", r->architecture);
12886 0 : ndr->depth++;
12887 0 : if (r->architecture) {
12888 0 : ndr_print_string(ndr, "architecture", r->architecture);
12889 : }
12890 0 : ndr->depth--;
12891 0 : ndr->flags = _flags_save_string;
12892 : }
12893 : {
12894 0 : libndr_flags _flags_save_string = ndr->flags;
12895 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12896 0 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
12897 0 : ndr->depth++;
12898 0 : if (r->driver_path) {
12899 0 : ndr_print_string(ndr, "driver_path", r->driver_path);
12900 : }
12901 0 : ndr->depth--;
12902 0 : ndr->flags = _flags_save_string;
12903 : }
12904 : {
12905 0 : libndr_flags _flags_save_string = ndr->flags;
12906 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12907 0 : ndr_print_ptr(ndr, "data_file", r->data_file);
12908 0 : ndr->depth++;
12909 0 : if (r->data_file) {
12910 0 : ndr_print_string(ndr, "data_file", r->data_file);
12911 : }
12912 0 : ndr->depth--;
12913 0 : ndr->flags = _flags_save_string;
12914 : }
12915 : {
12916 0 : libndr_flags _flags_save_string = ndr->flags;
12917 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12918 0 : ndr_print_ptr(ndr, "config_file", r->config_file);
12919 0 : ndr->depth++;
12920 0 : if (r->config_file) {
12921 0 : ndr_print_string(ndr, "config_file", r->config_file);
12922 : }
12923 0 : ndr->depth--;
12924 0 : ndr->flags = _flags_save_string;
12925 : }
12926 : {
12927 0 : libndr_flags _flags_save_string = ndr->flags;
12928 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12929 0 : ndr_print_ptr(ndr, "help_file", r->help_file);
12930 0 : ndr->depth++;
12931 0 : if (r->help_file) {
12932 0 : ndr_print_string(ndr, "help_file", r->help_file);
12933 : }
12934 0 : ndr->depth--;
12935 0 : ndr->flags = _flags_save_string;
12936 : }
12937 : {
12938 0 : libndr_flags _flags_save_string_array = ndr->flags;
12939 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12940 0 : ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
12941 0 : ndr->depth++;
12942 0 : if (r->dependent_files) {
12943 0 : ndr_print_string_array(ndr, "dependent_files", r->dependent_files);
12944 : }
12945 0 : ndr->depth--;
12946 0 : ndr->flags = _flags_save_string_array;
12947 : }
12948 : {
12949 0 : libndr_flags _flags_save_string = ndr->flags;
12950 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12951 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
12952 0 : ndr->depth++;
12953 0 : if (r->monitor_name) {
12954 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
12955 : }
12956 0 : ndr->depth--;
12957 0 : ndr->flags = _flags_save_string;
12958 : }
12959 : {
12960 0 : libndr_flags _flags_save_string = ndr->flags;
12961 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12962 0 : ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
12963 0 : ndr->depth++;
12964 0 : if (r->default_datatype) {
12965 0 : ndr_print_string(ndr, "default_datatype", r->default_datatype);
12966 : }
12967 0 : ndr->depth--;
12968 0 : ndr->flags = _flags_save_string;
12969 : }
12970 0 : ndr->depth--;
12971 : }
12972 :
12973 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverInfo3(const struct spoolss_DriverInfo3 *r, libndr_flags flags)
12974 : {
12975 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo3);
12976 : }
12977 :
12978 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DriverInfo4 *r)
12979 : {
12980 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
12981 0 : if (ndr_flags & NDR_SCALARS) {
12982 0 : NDR_CHECK(ndr_push_align(ndr, 5));
12983 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
12984 : {
12985 0 : libndr_flags _flags_save_string = ndr->flags;
12986 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12987 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
12988 0 : ndr->flags = _flags_save_string;
12989 : }
12990 : {
12991 0 : libndr_flags _flags_save_string = ndr->flags;
12992 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12993 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
12994 0 : ndr->flags = _flags_save_string;
12995 : }
12996 : {
12997 0 : libndr_flags _flags_save_string = ndr->flags;
12998 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
12999 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
13000 0 : ndr->flags = _flags_save_string;
13001 : }
13002 : {
13003 0 : libndr_flags _flags_save_string = ndr->flags;
13004 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13005 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
13006 0 : ndr->flags = _flags_save_string;
13007 : }
13008 : {
13009 0 : libndr_flags _flags_save_string = ndr->flags;
13010 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13011 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
13012 0 : ndr->flags = _flags_save_string;
13013 : }
13014 : {
13015 0 : libndr_flags _flags_save_string = ndr->flags;
13016 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13017 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->help_file));
13018 0 : ndr->flags = _flags_save_string;
13019 : }
13020 : {
13021 0 : libndr_flags _flags_save_string_array = ndr->flags;
13022 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13023 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dependent_files));
13024 0 : ndr->flags = _flags_save_string_array;
13025 : }
13026 : {
13027 0 : libndr_flags _flags_save_string = ndr->flags;
13028 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13029 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
13030 0 : ndr->flags = _flags_save_string;
13031 : }
13032 : {
13033 0 : libndr_flags _flags_save_string = ndr->flags;
13034 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13035 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->default_datatype));
13036 0 : ndr->flags = _flags_save_string;
13037 : }
13038 : {
13039 0 : libndr_flags _flags_save_string_array = ndr->flags;
13040 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13041 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->previous_names));
13042 0 : ndr->flags = _flags_save_string_array;
13043 : }
13044 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
13045 : }
13046 0 : if (ndr_flags & NDR_BUFFERS) {
13047 : {
13048 0 : libndr_flags _flags_save_string = ndr->flags;
13049 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13050 0 : if (r->driver_name) {
13051 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
13052 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
13053 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
13054 : }
13055 0 : ndr->flags = _flags_save_string;
13056 : }
13057 : {
13058 0 : libndr_flags _flags_save_string = ndr->flags;
13059 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13060 0 : if (r->architecture) {
13061 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->architecture));
13062 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
13063 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->architecture));
13064 : }
13065 0 : ndr->flags = _flags_save_string;
13066 : }
13067 : {
13068 0 : libndr_flags _flags_save_string = ndr->flags;
13069 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13070 0 : if (r->driver_path) {
13071 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_path));
13072 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
13073 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_path));
13074 : }
13075 0 : ndr->flags = _flags_save_string;
13076 : }
13077 : {
13078 0 : libndr_flags _flags_save_string = ndr->flags;
13079 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13080 0 : if (r->data_file) {
13081 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_file));
13082 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
13083 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_file));
13084 : }
13085 0 : ndr->flags = _flags_save_string;
13086 : }
13087 : {
13088 0 : libndr_flags _flags_save_string = ndr->flags;
13089 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13090 0 : if (r->config_file) {
13091 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->config_file));
13092 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
13093 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->config_file));
13094 : }
13095 0 : ndr->flags = _flags_save_string;
13096 : }
13097 : {
13098 0 : libndr_flags _flags_save_string = ndr->flags;
13099 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13100 0 : if (r->help_file) {
13101 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->help_file));
13102 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->help_file));
13103 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->help_file));
13104 : }
13105 0 : ndr->flags = _flags_save_string;
13106 : }
13107 : {
13108 0 : libndr_flags _flags_save_string_array = ndr->flags;
13109 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13110 0 : if (r->dependent_files) {
13111 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->dependent_files));
13112 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->dependent_files));
13113 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->dependent_files));
13114 : }
13115 0 : ndr->flags = _flags_save_string_array;
13116 : }
13117 : {
13118 0 : libndr_flags _flags_save_string = ndr->flags;
13119 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13120 0 : if (r->monitor_name) {
13121 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->monitor_name));
13122 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
13123 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->monitor_name));
13124 : }
13125 0 : ndr->flags = _flags_save_string;
13126 : }
13127 : {
13128 0 : libndr_flags _flags_save_string = ndr->flags;
13129 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13130 0 : if (r->default_datatype) {
13131 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->default_datatype));
13132 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->default_datatype));
13133 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->default_datatype));
13134 : }
13135 0 : ndr->flags = _flags_save_string;
13136 : }
13137 : {
13138 0 : libndr_flags _flags_save_string_array = ndr->flags;
13139 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13140 0 : if (r->previous_names) {
13141 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->previous_names));
13142 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->previous_names));
13143 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->previous_names));
13144 : }
13145 0 : ndr->flags = _flags_save_string_array;
13146 : }
13147 : }
13148 0 : return NDR_ERR_SUCCESS;
13149 : }
13150 :
13151 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DriverInfo4 *r)
13152 : {
13153 0 : uint32_t _ptr_driver_name;
13154 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
13155 0 : uint32_t _ptr_architecture;
13156 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
13157 0 : uint32_t _ptr_driver_path;
13158 0 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
13159 0 : uint32_t _ptr_data_file;
13160 0 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
13161 0 : uint32_t _ptr_config_file;
13162 0 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
13163 0 : uint32_t _ptr_help_file;
13164 0 : TALLOC_CTX *_mem_save_help_file_0 = NULL;
13165 0 : uint32_t _ptr_dependent_files;
13166 0 : TALLOC_CTX *_mem_save_dependent_files_0 = NULL;
13167 0 : uint32_t _ptr_monitor_name;
13168 0 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
13169 0 : uint32_t _ptr_default_datatype;
13170 0 : TALLOC_CTX *_mem_save_default_datatype_0 = NULL;
13171 0 : uint32_t _ptr_previous_names;
13172 0 : TALLOC_CTX *_mem_save_previous_names_0 = NULL;
13173 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
13174 0 : if (ndr_flags & NDR_SCALARS) {
13175 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
13176 0 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
13177 : {
13178 0 : libndr_flags _flags_save_string = ndr->flags;
13179 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13180 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
13181 0 : if (_ptr_driver_name) {
13182 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
13183 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
13184 : } else {
13185 0 : r->driver_name = NULL;
13186 : }
13187 0 : ndr->flags = _flags_save_string;
13188 : }
13189 : {
13190 0 : libndr_flags _flags_save_string = ndr->flags;
13191 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13192 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
13193 0 : if (_ptr_architecture) {
13194 0 : NDR_PULL_ALLOC(ndr, r->architecture);
13195 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
13196 : } else {
13197 0 : r->architecture = NULL;
13198 : }
13199 0 : ndr->flags = _flags_save_string;
13200 : }
13201 : {
13202 0 : libndr_flags _flags_save_string = ndr->flags;
13203 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13204 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
13205 0 : if (_ptr_driver_path) {
13206 0 : NDR_PULL_ALLOC(ndr, r->driver_path);
13207 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
13208 : } else {
13209 0 : r->driver_path = NULL;
13210 : }
13211 0 : ndr->flags = _flags_save_string;
13212 : }
13213 : {
13214 0 : libndr_flags _flags_save_string = ndr->flags;
13215 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13216 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
13217 0 : if (_ptr_data_file) {
13218 0 : NDR_PULL_ALLOC(ndr, r->data_file);
13219 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
13220 : } else {
13221 0 : r->data_file = NULL;
13222 : }
13223 0 : ndr->flags = _flags_save_string;
13224 : }
13225 : {
13226 0 : libndr_flags _flags_save_string = ndr->flags;
13227 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13228 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
13229 0 : if (_ptr_config_file) {
13230 0 : NDR_PULL_ALLOC(ndr, r->config_file);
13231 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
13232 : } else {
13233 0 : r->config_file = NULL;
13234 : }
13235 0 : ndr->flags = _flags_save_string;
13236 : }
13237 : {
13238 0 : libndr_flags _flags_save_string = ndr->flags;
13239 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13240 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
13241 0 : if (_ptr_help_file) {
13242 0 : NDR_PULL_ALLOC(ndr, r->help_file);
13243 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->help_file, _ptr_help_file));
13244 : } else {
13245 0 : r->help_file = NULL;
13246 : }
13247 0 : ndr->flags = _flags_save_string;
13248 : }
13249 : {
13250 0 : libndr_flags _flags_save_string_array = ndr->flags;
13251 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13252 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
13253 0 : if (_ptr_dependent_files) {
13254 0 : NDR_PULL_ALLOC(ndr, r->dependent_files);
13255 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dependent_files, _ptr_dependent_files));
13256 : } else {
13257 0 : r->dependent_files = NULL;
13258 : }
13259 0 : ndr->flags = _flags_save_string_array;
13260 : }
13261 : {
13262 0 : libndr_flags _flags_save_string = ndr->flags;
13263 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13264 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
13265 0 : if (_ptr_monitor_name) {
13266 0 : NDR_PULL_ALLOC(ndr, r->monitor_name);
13267 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
13268 : } else {
13269 0 : r->monitor_name = NULL;
13270 : }
13271 0 : ndr->flags = _flags_save_string;
13272 : }
13273 : {
13274 0 : libndr_flags _flags_save_string = ndr->flags;
13275 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13276 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
13277 0 : if (_ptr_default_datatype) {
13278 0 : NDR_PULL_ALLOC(ndr, r->default_datatype);
13279 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->default_datatype, _ptr_default_datatype));
13280 : } else {
13281 0 : r->default_datatype = NULL;
13282 : }
13283 0 : ndr->flags = _flags_save_string;
13284 : }
13285 : {
13286 0 : libndr_flags _flags_save_string_array = ndr->flags;
13287 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13288 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
13289 0 : if (_ptr_previous_names) {
13290 0 : NDR_PULL_ALLOC(ndr, r->previous_names);
13291 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->previous_names, _ptr_previous_names));
13292 : } else {
13293 0 : r->previous_names = NULL;
13294 : }
13295 0 : ndr->flags = _flags_save_string_array;
13296 : }
13297 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
13298 : }
13299 0 : if (ndr_flags & NDR_BUFFERS) {
13300 : {
13301 0 : libndr_flags _flags_save_string = ndr->flags;
13302 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13303 0 : if (r->driver_name) {
13304 0 : uint32_t _relative_save_offset;
13305 0 : _relative_save_offset = ndr->offset;
13306 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
13307 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13308 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
13309 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
13310 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
13311 0 : if (ndr->offset > ndr->relative_highest_offset) {
13312 0 : ndr->relative_highest_offset = ndr->offset;
13313 : }
13314 0 : ndr->offset = _relative_save_offset;
13315 : }
13316 0 : ndr->flags = _flags_save_string;
13317 : }
13318 : {
13319 0 : libndr_flags _flags_save_string = ndr->flags;
13320 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13321 0 : if (r->architecture) {
13322 0 : uint32_t _relative_save_offset;
13323 0 : _relative_save_offset = ndr->offset;
13324 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
13325 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
13326 0 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
13327 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
13328 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
13329 0 : if (ndr->offset > ndr->relative_highest_offset) {
13330 0 : ndr->relative_highest_offset = ndr->offset;
13331 : }
13332 0 : ndr->offset = _relative_save_offset;
13333 : }
13334 0 : ndr->flags = _flags_save_string;
13335 : }
13336 : {
13337 0 : libndr_flags _flags_save_string = ndr->flags;
13338 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13339 0 : if (r->driver_path) {
13340 0 : uint32_t _relative_save_offset;
13341 0 : _relative_save_offset = ndr->offset;
13342 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
13343 0 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
13344 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
13345 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
13346 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
13347 0 : if (ndr->offset > ndr->relative_highest_offset) {
13348 0 : ndr->relative_highest_offset = ndr->offset;
13349 : }
13350 0 : ndr->offset = _relative_save_offset;
13351 : }
13352 0 : ndr->flags = _flags_save_string;
13353 : }
13354 : {
13355 0 : libndr_flags _flags_save_string = ndr->flags;
13356 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13357 0 : if (r->data_file) {
13358 0 : uint32_t _relative_save_offset;
13359 0 : _relative_save_offset = ndr->offset;
13360 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
13361 0 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
13362 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
13363 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
13364 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
13365 0 : if (ndr->offset > ndr->relative_highest_offset) {
13366 0 : ndr->relative_highest_offset = ndr->offset;
13367 : }
13368 0 : ndr->offset = _relative_save_offset;
13369 : }
13370 0 : ndr->flags = _flags_save_string;
13371 : }
13372 : {
13373 0 : libndr_flags _flags_save_string = ndr->flags;
13374 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13375 0 : if (r->config_file) {
13376 0 : uint32_t _relative_save_offset;
13377 0 : _relative_save_offset = ndr->offset;
13378 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
13379 0 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
13380 0 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
13381 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
13382 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
13383 0 : if (ndr->offset > ndr->relative_highest_offset) {
13384 0 : ndr->relative_highest_offset = ndr->offset;
13385 : }
13386 0 : ndr->offset = _relative_save_offset;
13387 : }
13388 0 : ndr->flags = _flags_save_string;
13389 : }
13390 : {
13391 0 : libndr_flags _flags_save_string = ndr->flags;
13392 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13393 0 : if (r->help_file) {
13394 0 : uint32_t _relative_save_offset;
13395 0 : _relative_save_offset = ndr->offset;
13396 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->help_file));
13397 0 : _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
13398 0 : NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
13399 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->help_file));
13400 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
13401 0 : if (ndr->offset > ndr->relative_highest_offset) {
13402 0 : ndr->relative_highest_offset = ndr->offset;
13403 : }
13404 0 : ndr->offset = _relative_save_offset;
13405 : }
13406 0 : ndr->flags = _flags_save_string;
13407 : }
13408 : {
13409 0 : libndr_flags _flags_save_string_array = ndr->flags;
13410 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13411 0 : if (r->dependent_files) {
13412 0 : uint32_t _relative_save_offset;
13413 0 : _relative_save_offset = ndr->offset;
13414 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dependent_files));
13415 0 : _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
13416 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
13417 0 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->dependent_files));
13418 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
13419 0 : if (ndr->offset > ndr->relative_highest_offset) {
13420 0 : ndr->relative_highest_offset = ndr->offset;
13421 : }
13422 0 : ndr->offset = _relative_save_offset;
13423 : }
13424 0 : ndr->flags = _flags_save_string_array;
13425 : }
13426 : {
13427 0 : libndr_flags _flags_save_string = ndr->flags;
13428 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13429 0 : if (r->monitor_name) {
13430 0 : uint32_t _relative_save_offset;
13431 0 : _relative_save_offset = ndr->offset;
13432 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
13433 0 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13434 0 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
13435 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
13436 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
13437 0 : if (ndr->offset > ndr->relative_highest_offset) {
13438 0 : ndr->relative_highest_offset = ndr->offset;
13439 : }
13440 0 : ndr->offset = _relative_save_offset;
13441 : }
13442 0 : ndr->flags = _flags_save_string;
13443 : }
13444 : {
13445 0 : libndr_flags _flags_save_string = ndr->flags;
13446 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13447 0 : if (r->default_datatype) {
13448 0 : uint32_t _relative_save_offset;
13449 0 : _relative_save_offset = ndr->offset;
13450 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->default_datatype));
13451 0 : _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
13452 0 : NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
13453 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->default_datatype));
13454 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
13455 0 : if (ndr->offset > ndr->relative_highest_offset) {
13456 0 : ndr->relative_highest_offset = ndr->offset;
13457 : }
13458 0 : ndr->offset = _relative_save_offset;
13459 : }
13460 0 : ndr->flags = _flags_save_string;
13461 : }
13462 : {
13463 0 : libndr_flags _flags_save_string_array = ndr->flags;
13464 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13465 0 : if (r->previous_names) {
13466 0 : uint32_t _relative_save_offset;
13467 0 : _relative_save_offset = ndr->offset;
13468 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->previous_names));
13469 0 : _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
13470 0 : NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
13471 0 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->previous_names));
13472 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
13473 0 : if (ndr->offset > ndr->relative_highest_offset) {
13474 0 : ndr->relative_highest_offset = ndr->offset;
13475 : }
13476 0 : ndr->offset = _relative_save_offset;
13477 : }
13478 0 : ndr->flags = _flags_save_string_array;
13479 : }
13480 : }
13481 0 : return NDR_ERR_SUCCESS;
13482 : }
13483 :
13484 0 : static void ndr_print_flags_spoolss_DriverInfo4(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverInfo4 *r)
13485 : {
13486 0 : ndr_print_spoolss_DriverInfo4(ndr, name, r);
13487 0 : }
13488 :
13489 0 : _PUBLIC_ void ndr_print_spoolss_DriverInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo4 *r)
13490 : {
13491 0 : ndr_print_struct(ndr, name, "spoolss_DriverInfo4");
13492 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13493 0 : ndr->depth++;
13494 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
13495 : {
13496 0 : libndr_flags _flags_save_string = ndr->flags;
13497 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13498 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
13499 0 : ndr->depth++;
13500 0 : if (r->driver_name) {
13501 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
13502 : }
13503 0 : ndr->depth--;
13504 0 : ndr->flags = _flags_save_string;
13505 : }
13506 : {
13507 0 : libndr_flags _flags_save_string = ndr->flags;
13508 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13509 0 : ndr_print_ptr(ndr, "architecture", r->architecture);
13510 0 : ndr->depth++;
13511 0 : if (r->architecture) {
13512 0 : ndr_print_string(ndr, "architecture", r->architecture);
13513 : }
13514 0 : ndr->depth--;
13515 0 : ndr->flags = _flags_save_string;
13516 : }
13517 : {
13518 0 : libndr_flags _flags_save_string = ndr->flags;
13519 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13520 0 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
13521 0 : ndr->depth++;
13522 0 : if (r->driver_path) {
13523 0 : ndr_print_string(ndr, "driver_path", r->driver_path);
13524 : }
13525 0 : ndr->depth--;
13526 0 : ndr->flags = _flags_save_string;
13527 : }
13528 : {
13529 0 : libndr_flags _flags_save_string = ndr->flags;
13530 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13531 0 : ndr_print_ptr(ndr, "data_file", r->data_file);
13532 0 : ndr->depth++;
13533 0 : if (r->data_file) {
13534 0 : ndr_print_string(ndr, "data_file", r->data_file);
13535 : }
13536 0 : ndr->depth--;
13537 0 : ndr->flags = _flags_save_string;
13538 : }
13539 : {
13540 0 : libndr_flags _flags_save_string = ndr->flags;
13541 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13542 0 : ndr_print_ptr(ndr, "config_file", r->config_file);
13543 0 : ndr->depth++;
13544 0 : if (r->config_file) {
13545 0 : ndr_print_string(ndr, "config_file", r->config_file);
13546 : }
13547 0 : ndr->depth--;
13548 0 : ndr->flags = _flags_save_string;
13549 : }
13550 : {
13551 0 : libndr_flags _flags_save_string = ndr->flags;
13552 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13553 0 : ndr_print_ptr(ndr, "help_file", r->help_file);
13554 0 : ndr->depth++;
13555 0 : if (r->help_file) {
13556 0 : ndr_print_string(ndr, "help_file", r->help_file);
13557 : }
13558 0 : ndr->depth--;
13559 0 : ndr->flags = _flags_save_string;
13560 : }
13561 : {
13562 0 : libndr_flags _flags_save_string_array = ndr->flags;
13563 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13564 0 : ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
13565 0 : ndr->depth++;
13566 0 : if (r->dependent_files) {
13567 0 : ndr_print_string_array(ndr, "dependent_files", r->dependent_files);
13568 : }
13569 0 : ndr->depth--;
13570 0 : ndr->flags = _flags_save_string_array;
13571 : }
13572 : {
13573 0 : libndr_flags _flags_save_string = ndr->flags;
13574 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13575 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
13576 0 : ndr->depth++;
13577 0 : if (r->monitor_name) {
13578 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
13579 : }
13580 0 : ndr->depth--;
13581 0 : ndr->flags = _flags_save_string;
13582 : }
13583 : {
13584 0 : libndr_flags _flags_save_string = ndr->flags;
13585 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13586 0 : ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
13587 0 : ndr->depth++;
13588 0 : if (r->default_datatype) {
13589 0 : ndr_print_string(ndr, "default_datatype", r->default_datatype);
13590 : }
13591 0 : ndr->depth--;
13592 0 : ndr->flags = _flags_save_string;
13593 : }
13594 : {
13595 0 : libndr_flags _flags_save_string_array = ndr->flags;
13596 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13597 0 : ndr_print_ptr(ndr, "previous_names", r->previous_names);
13598 0 : ndr->depth++;
13599 0 : if (r->previous_names) {
13600 0 : ndr_print_string_array(ndr, "previous_names", r->previous_names);
13601 : }
13602 0 : ndr->depth--;
13603 0 : ndr->flags = _flags_save_string_array;
13604 : }
13605 0 : ndr->depth--;
13606 : }
13607 :
13608 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverInfo4(const struct spoolss_DriverInfo4 *r, libndr_flags flags)
13609 : {
13610 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo4);
13611 : }
13612 :
13613 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo5(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DriverInfo5 *r)
13614 : {
13615 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13616 0 : if (ndr_flags & NDR_SCALARS) {
13617 0 : NDR_CHECK(ndr_push_align(ndr, 5));
13618 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
13619 : {
13620 0 : libndr_flags _flags_save_string = ndr->flags;
13621 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13622 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
13623 0 : ndr->flags = _flags_save_string;
13624 : }
13625 : {
13626 0 : libndr_flags _flags_save_string = ndr->flags;
13627 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13628 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
13629 0 : ndr->flags = _flags_save_string;
13630 : }
13631 : {
13632 0 : libndr_flags _flags_save_string = ndr->flags;
13633 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13634 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
13635 0 : ndr->flags = _flags_save_string;
13636 : }
13637 : {
13638 0 : libndr_flags _flags_save_string = ndr->flags;
13639 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13640 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
13641 0 : ndr->flags = _flags_save_string;
13642 : }
13643 : {
13644 0 : libndr_flags _flags_save_string = ndr->flags;
13645 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13646 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
13647 0 : ndr->flags = _flags_save_string;
13648 : }
13649 0 : NDR_CHECK(ndr_push_spoolss_DriverAttributes(ndr, NDR_SCALARS, r->driver_attributes));
13650 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->config_version));
13651 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->driver_version));
13652 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
13653 : }
13654 0 : if (ndr_flags & NDR_BUFFERS) {
13655 : {
13656 0 : libndr_flags _flags_save_string = ndr->flags;
13657 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13658 0 : if (r->driver_name) {
13659 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
13660 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
13661 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
13662 : }
13663 0 : ndr->flags = _flags_save_string;
13664 : }
13665 : {
13666 0 : libndr_flags _flags_save_string = ndr->flags;
13667 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13668 0 : if (r->architecture) {
13669 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->architecture));
13670 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
13671 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->architecture));
13672 : }
13673 0 : ndr->flags = _flags_save_string;
13674 : }
13675 : {
13676 0 : libndr_flags _flags_save_string = ndr->flags;
13677 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13678 0 : if (r->driver_path) {
13679 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_path));
13680 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
13681 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_path));
13682 : }
13683 0 : ndr->flags = _flags_save_string;
13684 : }
13685 : {
13686 0 : libndr_flags _flags_save_string = ndr->flags;
13687 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13688 0 : if (r->data_file) {
13689 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_file));
13690 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
13691 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_file));
13692 : }
13693 0 : ndr->flags = _flags_save_string;
13694 : }
13695 : {
13696 0 : libndr_flags _flags_save_string = ndr->flags;
13697 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13698 0 : if (r->config_file) {
13699 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->config_file));
13700 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
13701 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->config_file));
13702 : }
13703 0 : ndr->flags = _flags_save_string;
13704 : }
13705 : }
13706 0 : return NDR_ERR_SUCCESS;
13707 : }
13708 :
13709 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo5(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DriverInfo5 *r)
13710 : {
13711 0 : uint32_t _ptr_driver_name;
13712 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
13713 0 : uint32_t _ptr_architecture;
13714 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
13715 0 : uint32_t _ptr_driver_path;
13716 0 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
13717 0 : uint32_t _ptr_data_file;
13718 0 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
13719 0 : uint32_t _ptr_config_file;
13720 0 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
13721 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
13722 0 : if (ndr_flags & NDR_SCALARS) {
13723 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
13724 0 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
13725 : {
13726 0 : libndr_flags _flags_save_string = ndr->flags;
13727 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13728 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
13729 0 : if (_ptr_driver_name) {
13730 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
13731 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
13732 : } else {
13733 0 : r->driver_name = NULL;
13734 : }
13735 0 : ndr->flags = _flags_save_string;
13736 : }
13737 : {
13738 0 : libndr_flags _flags_save_string = ndr->flags;
13739 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13740 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
13741 0 : if (_ptr_architecture) {
13742 0 : NDR_PULL_ALLOC(ndr, r->architecture);
13743 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
13744 : } else {
13745 0 : r->architecture = NULL;
13746 : }
13747 0 : ndr->flags = _flags_save_string;
13748 : }
13749 : {
13750 0 : libndr_flags _flags_save_string = ndr->flags;
13751 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13752 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
13753 0 : if (_ptr_driver_path) {
13754 0 : NDR_PULL_ALLOC(ndr, r->driver_path);
13755 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
13756 : } else {
13757 0 : r->driver_path = NULL;
13758 : }
13759 0 : ndr->flags = _flags_save_string;
13760 : }
13761 : {
13762 0 : libndr_flags _flags_save_string = ndr->flags;
13763 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13764 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
13765 0 : if (_ptr_data_file) {
13766 0 : NDR_PULL_ALLOC(ndr, r->data_file);
13767 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
13768 : } else {
13769 0 : r->data_file = NULL;
13770 : }
13771 0 : ndr->flags = _flags_save_string;
13772 : }
13773 : {
13774 0 : libndr_flags _flags_save_string = ndr->flags;
13775 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13776 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
13777 0 : if (_ptr_config_file) {
13778 0 : NDR_PULL_ALLOC(ndr, r->config_file);
13779 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
13780 : } else {
13781 0 : r->config_file = NULL;
13782 : }
13783 0 : ndr->flags = _flags_save_string;
13784 : }
13785 0 : NDR_CHECK(ndr_pull_spoolss_DriverAttributes(ndr, NDR_SCALARS, &r->driver_attributes));
13786 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->config_version));
13787 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->driver_version));
13788 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
13789 : }
13790 0 : if (ndr_flags & NDR_BUFFERS) {
13791 : {
13792 0 : libndr_flags _flags_save_string = ndr->flags;
13793 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13794 0 : if (r->driver_name) {
13795 0 : uint32_t _relative_save_offset;
13796 0 : _relative_save_offset = ndr->offset;
13797 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
13798 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13799 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
13800 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
13801 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
13802 0 : if (ndr->offset > ndr->relative_highest_offset) {
13803 0 : ndr->relative_highest_offset = ndr->offset;
13804 : }
13805 0 : ndr->offset = _relative_save_offset;
13806 : }
13807 0 : ndr->flags = _flags_save_string;
13808 : }
13809 : {
13810 0 : libndr_flags _flags_save_string = ndr->flags;
13811 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13812 0 : if (r->architecture) {
13813 0 : uint32_t _relative_save_offset;
13814 0 : _relative_save_offset = ndr->offset;
13815 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
13816 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
13817 0 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
13818 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
13819 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
13820 0 : if (ndr->offset > ndr->relative_highest_offset) {
13821 0 : ndr->relative_highest_offset = ndr->offset;
13822 : }
13823 0 : ndr->offset = _relative_save_offset;
13824 : }
13825 0 : ndr->flags = _flags_save_string;
13826 : }
13827 : {
13828 0 : libndr_flags _flags_save_string = ndr->flags;
13829 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13830 0 : if (r->driver_path) {
13831 0 : uint32_t _relative_save_offset;
13832 0 : _relative_save_offset = ndr->offset;
13833 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
13834 0 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
13835 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
13836 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
13837 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
13838 0 : if (ndr->offset > ndr->relative_highest_offset) {
13839 0 : ndr->relative_highest_offset = ndr->offset;
13840 : }
13841 0 : ndr->offset = _relative_save_offset;
13842 : }
13843 0 : ndr->flags = _flags_save_string;
13844 : }
13845 : {
13846 0 : libndr_flags _flags_save_string = ndr->flags;
13847 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13848 0 : if (r->data_file) {
13849 0 : uint32_t _relative_save_offset;
13850 0 : _relative_save_offset = ndr->offset;
13851 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
13852 0 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
13853 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
13854 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
13855 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
13856 0 : if (ndr->offset > ndr->relative_highest_offset) {
13857 0 : ndr->relative_highest_offset = ndr->offset;
13858 : }
13859 0 : ndr->offset = _relative_save_offset;
13860 : }
13861 0 : ndr->flags = _flags_save_string;
13862 : }
13863 : {
13864 0 : libndr_flags _flags_save_string = ndr->flags;
13865 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13866 0 : if (r->config_file) {
13867 0 : uint32_t _relative_save_offset;
13868 0 : _relative_save_offset = ndr->offset;
13869 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
13870 0 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
13871 0 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
13872 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
13873 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
13874 0 : if (ndr->offset > ndr->relative_highest_offset) {
13875 0 : ndr->relative_highest_offset = ndr->offset;
13876 : }
13877 0 : ndr->offset = _relative_save_offset;
13878 : }
13879 0 : ndr->flags = _flags_save_string;
13880 : }
13881 : }
13882 0 : return NDR_ERR_SUCCESS;
13883 : }
13884 :
13885 0 : static void ndr_print_flags_spoolss_DriverInfo5(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverInfo5 *r)
13886 : {
13887 0 : ndr_print_spoolss_DriverInfo5(ndr, name, r);
13888 0 : }
13889 :
13890 0 : _PUBLIC_ void ndr_print_spoolss_DriverInfo5(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo5 *r)
13891 : {
13892 0 : ndr_print_struct(ndr, name, "spoolss_DriverInfo5");
13893 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13894 0 : ndr->depth++;
13895 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
13896 : {
13897 0 : libndr_flags _flags_save_string = ndr->flags;
13898 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13899 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
13900 0 : ndr->depth++;
13901 0 : if (r->driver_name) {
13902 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
13903 : }
13904 0 : ndr->depth--;
13905 0 : ndr->flags = _flags_save_string;
13906 : }
13907 : {
13908 0 : libndr_flags _flags_save_string = ndr->flags;
13909 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13910 0 : ndr_print_ptr(ndr, "architecture", r->architecture);
13911 0 : ndr->depth++;
13912 0 : if (r->architecture) {
13913 0 : ndr_print_string(ndr, "architecture", r->architecture);
13914 : }
13915 0 : ndr->depth--;
13916 0 : ndr->flags = _flags_save_string;
13917 : }
13918 : {
13919 0 : libndr_flags _flags_save_string = ndr->flags;
13920 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13921 0 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
13922 0 : ndr->depth++;
13923 0 : if (r->driver_path) {
13924 0 : ndr_print_string(ndr, "driver_path", r->driver_path);
13925 : }
13926 0 : ndr->depth--;
13927 0 : ndr->flags = _flags_save_string;
13928 : }
13929 : {
13930 0 : libndr_flags _flags_save_string = ndr->flags;
13931 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13932 0 : ndr_print_ptr(ndr, "data_file", r->data_file);
13933 0 : ndr->depth++;
13934 0 : if (r->data_file) {
13935 0 : ndr_print_string(ndr, "data_file", r->data_file);
13936 : }
13937 0 : ndr->depth--;
13938 0 : ndr->flags = _flags_save_string;
13939 : }
13940 : {
13941 0 : libndr_flags _flags_save_string = ndr->flags;
13942 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13943 0 : ndr_print_ptr(ndr, "config_file", r->config_file);
13944 0 : ndr->depth++;
13945 0 : if (r->config_file) {
13946 0 : ndr_print_string(ndr, "config_file", r->config_file);
13947 : }
13948 0 : ndr->depth--;
13949 0 : ndr->flags = _flags_save_string;
13950 : }
13951 0 : ndr_print_spoolss_DriverAttributes(ndr, "driver_attributes", r->driver_attributes);
13952 0 : ndr_print_uint32(ndr, "config_version", r->config_version);
13953 0 : ndr_print_uint32(ndr, "driver_version", r->driver_version);
13954 0 : ndr->depth--;
13955 : }
13956 :
13957 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverInfo5(const struct spoolss_DriverInfo5 *r, libndr_flags flags)
13958 : {
13959 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo5);
13960 : }
13961 :
13962 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo6(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DriverInfo6 *r)
13963 : {
13964 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13965 0 : if (ndr_flags & NDR_SCALARS) {
13966 0 : NDR_CHECK(ndr_push_align(ndr, 8));
13967 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
13968 : {
13969 0 : libndr_flags _flags_save_string = ndr->flags;
13970 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13971 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
13972 0 : ndr->flags = _flags_save_string;
13973 : }
13974 : {
13975 0 : libndr_flags _flags_save_string = ndr->flags;
13976 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13977 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
13978 0 : ndr->flags = _flags_save_string;
13979 : }
13980 : {
13981 0 : libndr_flags _flags_save_string = ndr->flags;
13982 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13983 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
13984 0 : ndr->flags = _flags_save_string;
13985 : }
13986 : {
13987 0 : libndr_flags _flags_save_string = ndr->flags;
13988 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13989 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
13990 0 : ndr->flags = _flags_save_string;
13991 : }
13992 : {
13993 0 : libndr_flags _flags_save_string = ndr->flags;
13994 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
13995 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
13996 0 : ndr->flags = _flags_save_string;
13997 : }
13998 : {
13999 0 : libndr_flags _flags_save_string = ndr->flags;
14000 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14001 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->help_file));
14002 0 : ndr->flags = _flags_save_string;
14003 : }
14004 : {
14005 0 : libndr_flags _flags_save_string_array = ndr->flags;
14006 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14007 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dependent_files));
14008 0 : ndr->flags = _flags_save_string_array;
14009 : }
14010 : {
14011 0 : libndr_flags _flags_save_string = ndr->flags;
14012 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14013 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
14014 0 : ndr->flags = _flags_save_string;
14015 : }
14016 : {
14017 0 : libndr_flags _flags_save_string = ndr->flags;
14018 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14019 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->default_datatype));
14020 0 : ndr->flags = _flags_save_string;
14021 : }
14022 : {
14023 0 : libndr_flags _flags_save_string_array = ndr->flags;
14024 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14025 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->previous_names));
14026 0 : ndr->flags = _flags_save_string_array;
14027 : }
14028 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date));
14029 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version));
14030 : {
14031 0 : libndr_flags _flags_save_string = ndr->flags;
14032 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14033 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->manufacturer_name));
14034 0 : ndr->flags = _flags_save_string;
14035 : }
14036 : {
14037 0 : libndr_flags _flags_save_string = ndr->flags;
14038 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14039 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->manufacturer_url));
14040 0 : ndr->flags = _flags_save_string;
14041 : }
14042 : {
14043 0 : libndr_flags _flags_save_string = ndr->flags;
14044 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14045 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->hardware_id));
14046 0 : ndr->flags = _flags_save_string;
14047 : }
14048 : {
14049 0 : libndr_flags _flags_save_string = ndr->flags;
14050 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14051 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->provider));
14052 0 : ndr->flags = _flags_save_string;
14053 : }
14054 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
14055 : }
14056 0 : if (ndr_flags & NDR_BUFFERS) {
14057 : {
14058 0 : libndr_flags _flags_save_string = ndr->flags;
14059 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14060 0 : if (r->driver_name) {
14061 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
14062 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
14063 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
14064 : }
14065 0 : ndr->flags = _flags_save_string;
14066 : }
14067 : {
14068 0 : libndr_flags _flags_save_string = ndr->flags;
14069 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14070 0 : if (r->architecture) {
14071 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->architecture));
14072 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
14073 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->architecture));
14074 : }
14075 0 : ndr->flags = _flags_save_string;
14076 : }
14077 : {
14078 0 : libndr_flags _flags_save_string = ndr->flags;
14079 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14080 0 : if (r->driver_path) {
14081 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_path));
14082 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
14083 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_path));
14084 : }
14085 0 : ndr->flags = _flags_save_string;
14086 : }
14087 : {
14088 0 : libndr_flags _flags_save_string = ndr->flags;
14089 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14090 0 : if (r->data_file) {
14091 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_file));
14092 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
14093 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_file));
14094 : }
14095 0 : ndr->flags = _flags_save_string;
14096 : }
14097 : {
14098 0 : libndr_flags _flags_save_string = ndr->flags;
14099 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14100 0 : if (r->config_file) {
14101 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->config_file));
14102 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
14103 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->config_file));
14104 : }
14105 0 : ndr->flags = _flags_save_string;
14106 : }
14107 : {
14108 0 : libndr_flags _flags_save_string = ndr->flags;
14109 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14110 0 : if (r->help_file) {
14111 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->help_file));
14112 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->help_file));
14113 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->help_file));
14114 : }
14115 0 : ndr->flags = _flags_save_string;
14116 : }
14117 : {
14118 0 : libndr_flags _flags_save_string_array = ndr->flags;
14119 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14120 0 : if (r->dependent_files) {
14121 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->dependent_files));
14122 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->dependent_files));
14123 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->dependent_files));
14124 : }
14125 0 : ndr->flags = _flags_save_string_array;
14126 : }
14127 : {
14128 0 : libndr_flags _flags_save_string = ndr->flags;
14129 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14130 0 : if (r->monitor_name) {
14131 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->monitor_name));
14132 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
14133 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->monitor_name));
14134 : }
14135 0 : ndr->flags = _flags_save_string;
14136 : }
14137 : {
14138 0 : libndr_flags _flags_save_string = ndr->flags;
14139 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14140 0 : if (r->default_datatype) {
14141 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->default_datatype));
14142 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->default_datatype));
14143 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->default_datatype));
14144 : }
14145 0 : ndr->flags = _flags_save_string;
14146 : }
14147 : {
14148 0 : libndr_flags _flags_save_string_array = ndr->flags;
14149 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14150 0 : if (r->previous_names) {
14151 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->previous_names));
14152 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->previous_names));
14153 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->previous_names));
14154 : }
14155 0 : ndr->flags = _flags_save_string_array;
14156 : }
14157 : {
14158 0 : libndr_flags _flags_save_string = ndr->flags;
14159 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14160 0 : if (r->manufacturer_name) {
14161 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->manufacturer_name));
14162 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->manufacturer_name));
14163 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->manufacturer_name));
14164 : }
14165 0 : ndr->flags = _flags_save_string;
14166 : }
14167 : {
14168 0 : libndr_flags _flags_save_string = ndr->flags;
14169 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14170 0 : if (r->manufacturer_url) {
14171 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->manufacturer_url));
14172 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->manufacturer_url));
14173 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->manufacturer_url));
14174 : }
14175 0 : ndr->flags = _flags_save_string;
14176 : }
14177 : {
14178 0 : libndr_flags _flags_save_string = ndr->flags;
14179 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14180 0 : if (r->hardware_id) {
14181 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->hardware_id));
14182 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->hardware_id));
14183 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->hardware_id));
14184 : }
14185 0 : ndr->flags = _flags_save_string;
14186 : }
14187 : {
14188 0 : libndr_flags _flags_save_string = ndr->flags;
14189 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14190 0 : if (r->provider) {
14191 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->provider));
14192 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->provider));
14193 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->provider));
14194 : }
14195 0 : ndr->flags = _flags_save_string;
14196 : }
14197 : }
14198 0 : return NDR_ERR_SUCCESS;
14199 : }
14200 :
14201 4 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DriverInfo6 *r)
14202 : {
14203 4 : uint32_t _ptr_driver_name;
14204 4 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
14205 4 : uint32_t _ptr_architecture;
14206 4 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
14207 4 : uint32_t _ptr_driver_path;
14208 4 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
14209 4 : uint32_t _ptr_data_file;
14210 4 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
14211 4 : uint32_t _ptr_config_file;
14212 4 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
14213 4 : uint32_t _ptr_help_file;
14214 4 : TALLOC_CTX *_mem_save_help_file_0 = NULL;
14215 4 : uint32_t _ptr_dependent_files;
14216 4 : TALLOC_CTX *_mem_save_dependent_files_0 = NULL;
14217 4 : uint32_t _ptr_monitor_name;
14218 4 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
14219 4 : uint32_t _ptr_default_datatype;
14220 4 : TALLOC_CTX *_mem_save_default_datatype_0 = NULL;
14221 4 : uint32_t _ptr_previous_names;
14222 4 : TALLOC_CTX *_mem_save_previous_names_0 = NULL;
14223 4 : uint32_t _ptr_manufacturer_name;
14224 4 : TALLOC_CTX *_mem_save_manufacturer_name_0 = NULL;
14225 4 : uint32_t _ptr_manufacturer_url;
14226 4 : TALLOC_CTX *_mem_save_manufacturer_url_0 = NULL;
14227 4 : uint32_t _ptr_hardware_id;
14228 4 : TALLOC_CTX *_mem_save_hardware_id_0 = NULL;
14229 4 : uint32_t _ptr_provider;
14230 4 : TALLOC_CTX *_mem_save_provider_0 = NULL;
14231 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
14232 4 : if (ndr_flags & NDR_SCALARS) {
14233 2 : NDR_CHECK(ndr_pull_align(ndr, 8));
14234 2 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
14235 : {
14236 2 : libndr_flags _flags_save_string = ndr->flags;
14237 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14238 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
14239 2 : if (_ptr_driver_name) {
14240 2 : NDR_PULL_ALLOC(ndr, r->driver_name);
14241 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
14242 : } else {
14243 0 : r->driver_name = NULL;
14244 : }
14245 2 : ndr->flags = _flags_save_string;
14246 : }
14247 : {
14248 2 : libndr_flags _flags_save_string = ndr->flags;
14249 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14250 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
14251 2 : if (_ptr_architecture) {
14252 2 : NDR_PULL_ALLOC(ndr, r->architecture);
14253 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
14254 : } else {
14255 0 : r->architecture = NULL;
14256 : }
14257 2 : ndr->flags = _flags_save_string;
14258 : }
14259 : {
14260 2 : libndr_flags _flags_save_string = ndr->flags;
14261 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14262 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
14263 2 : if (_ptr_driver_path) {
14264 2 : NDR_PULL_ALLOC(ndr, r->driver_path);
14265 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
14266 : } else {
14267 0 : r->driver_path = NULL;
14268 : }
14269 2 : ndr->flags = _flags_save_string;
14270 : }
14271 : {
14272 2 : libndr_flags _flags_save_string = ndr->flags;
14273 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14274 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
14275 2 : if (_ptr_data_file) {
14276 2 : NDR_PULL_ALLOC(ndr, r->data_file);
14277 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
14278 : } else {
14279 0 : r->data_file = NULL;
14280 : }
14281 2 : ndr->flags = _flags_save_string;
14282 : }
14283 : {
14284 2 : libndr_flags _flags_save_string = ndr->flags;
14285 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14286 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
14287 2 : if (_ptr_config_file) {
14288 2 : NDR_PULL_ALLOC(ndr, r->config_file);
14289 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
14290 : } else {
14291 0 : r->config_file = NULL;
14292 : }
14293 2 : ndr->flags = _flags_save_string;
14294 : }
14295 : {
14296 2 : libndr_flags _flags_save_string = ndr->flags;
14297 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14298 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
14299 2 : if (_ptr_help_file) {
14300 2 : NDR_PULL_ALLOC(ndr, r->help_file);
14301 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->help_file, _ptr_help_file));
14302 : } else {
14303 0 : r->help_file = NULL;
14304 : }
14305 2 : ndr->flags = _flags_save_string;
14306 : }
14307 : {
14308 2 : libndr_flags _flags_save_string_array = ndr->flags;
14309 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14310 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
14311 2 : if (_ptr_dependent_files) {
14312 2 : NDR_PULL_ALLOC(ndr, r->dependent_files);
14313 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dependent_files, _ptr_dependent_files));
14314 : } else {
14315 0 : r->dependent_files = NULL;
14316 : }
14317 2 : ndr->flags = _flags_save_string_array;
14318 : }
14319 : {
14320 2 : libndr_flags _flags_save_string = ndr->flags;
14321 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14322 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
14323 2 : if (_ptr_monitor_name) {
14324 0 : NDR_PULL_ALLOC(ndr, r->monitor_name);
14325 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
14326 : } else {
14327 2 : r->monitor_name = NULL;
14328 : }
14329 2 : ndr->flags = _flags_save_string;
14330 : }
14331 : {
14332 2 : libndr_flags _flags_save_string = ndr->flags;
14333 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14334 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
14335 2 : if (_ptr_default_datatype) {
14336 0 : NDR_PULL_ALLOC(ndr, r->default_datatype);
14337 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->default_datatype, _ptr_default_datatype));
14338 : } else {
14339 2 : r->default_datatype = NULL;
14340 : }
14341 2 : ndr->flags = _flags_save_string;
14342 : }
14343 : {
14344 2 : libndr_flags _flags_save_string_array = ndr->flags;
14345 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14346 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
14347 2 : if (_ptr_previous_names) {
14348 0 : NDR_PULL_ALLOC(ndr, r->previous_names);
14349 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->previous_names, _ptr_previous_names));
14350 : } else {
14351 2 : r->previous_names = NULL;
14352 : }
14353 2 : ndr->flags = _flags_save_string_array;
14354 : }
14355 2 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date));
14356 2 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version));
14357 : {
14358 2 : libndr_flags _flags_save_string = ndr->flags;
14359 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14360 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_name));
14361 2 : if (_ptr_manufacturer_name) {
14362 2 : NDR_PULL_ALLOC(ndr, r->manufacturer_name);
14363 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->manufacturer_name, _ptr_manufacturer_name));
14364 : } else {
14365 0 : r->manufacturer_name = NULL;
14366 : }
14367 2 : ndr->flags = _flags_save_string;
14368 : }
14369 : {
14370 2 : libndr_flags _flags_save_string = ndr->flags;
14371 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14372 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_url));
14373 2 : if (_ptr_manufacturer_url) {
14374 2 : NDR_PULL_ALLOC(ndr, r->manufacturer_url);
14375 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->manufacturer_url, _ptr_manufacturer_url));
14376 : } else {
14377 0 : r->manufacturer_url = NULL;
14378 : }
14379 2 : ndr->flags = _flags_save_string;
14380 : }
14381 : {
14382 2 : libndr_flags _flags_save_string = ndr->flags;
14383 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14384 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hardware_id));
14385 2 : if (_ptr_hardware_id) {
14386 2 : NDR_PULL_ALLOC(ndr, r->hardware_id);
14387 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->hardware_id, _ptr_hardware_id));
14388 : } else {
14389 0 : r->hardware_id = NULL;
14390 : }
14391 2 : ndr->flags = _flags_save_string;
14392 : }
14393 : {
14394 2 : libndr_flags _flags_save_string = ndr->flags;
14395 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14396 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_provider));
14397 2 : if (_ptr_provider) {
14398 2 : NDR_PULL_ALLOC(ndr, r->provider);
14399 2 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->provider, _ptr_provider));
14400 : } else {
14401 0 : r->provider = NULL;
14402 : }
14403 2 : ndr->flags = _flags_save_string;
14404 : }
14405 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
14406 : }
14407 4 : if (ndr_flags & NDR_BUFFERS) {
14408 : {
14409 2 : libndr_flags _flags_save_string = ndr->flags;
14410 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14411 2 : if (r->driver_name) {
14412 2 : uint32_t _relative_save_offset;
14413 2 : _relative_save_offset = ndr->offset;
14414 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
14415 2 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14416 2 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
14417 2 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
14418 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
14419 2 : if (ndr->offset > ndr->relative_highest_offset) {
14420 2 : ndr->relative_highest_offset = ndr->offset;
14421 : }
14422 2 : ndr->offset = _relative_save_offset;
14423 : }
14424 2 : ndr->flags = _flags_save_string;
14425 : }
14426 : {
14427 2 : libndr_flags _flags_save_string = ndr->flags;
14428 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14429 2 : if (r->architecture) {
14430 2 : uint32_t _relative_save_offset;
14431 2 : _relative_save_offset = ndr->offset;
14432 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
14433 2 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
14434 2 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
14435 2 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
14436 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
14437 2 : if (ndr->offset > ndr->relative_highest_offset) {
14438 0 : ndr->relative_highest_offset = ndr->offset;
14439 : }
14440 2 : ndr->offset = _relative_save_offset;
14441 : }
14442 2 : ndr->flags = _flags_save_string;
14443 : }
14444 : {
14445 2 : libndr_flags _flags_save_string = ndr->flags;
14446 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14447 2 : if (r->driver_path) {
14448 2 : uint32_t _relative_save_offset;
14449 2 : _relative_save_offset = ndr->offset;
14450 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
14451 2 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
14452 2 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
14453 2 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
14454 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
14455 2 : if (ndr->offset > ndr->relative_highest_offset) {
14456 0 : ndr->relative_highest_offset = ndr->offset;
14457 : }
14458 2 : ndr->offset = _relative_save_offset;
14459 : }
14460 2 : ndr->flags = _flags_save_string;
14461 : }
14462 : {
14463 2 : libndr_flags _flags_save_string = ndr->flags;
14464 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14465 2 : if (r->data_file) {
14466 2 : uint32_t _relative_save_offset;
14467 2 : _relative_save_offset = ndr->offset;
14468 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
14469 2 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
14470 2 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
14471 2 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
14472 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
14473 2 : if (ndr->offset > ndr->relative_highest_offset) {
14474 0 : ndr->relative_highest_offset = ndr->offset;
14475 : }
14476 2 : ndr->offset = _relative_save_offset;
14477 : }
14478 2 : ndr->flags = _flags_save_string;
14479 : }
14480 : {
14481 2 : libndr_flags _flags_save_string = ndr->flags;
14482 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14483 2 : if (r->config_file) {
14484 2 : uint32_t _relative_save_offset;
14485 2 : _relative_save_offset = ndr->offset;
14486 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
14487 2 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
14488 2 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
14489 2 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
14490 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
14491 2 : if (ndr->offset > ndr->relative_highest_offset) {
14492 0 : ndr->relative_highest_offset = ndr->offset;
14493 : }
14494 2 : ndr->offset = _relative_save_offset;
14495 : }
14496 2 : ndr->flags = _flags_save_string;
14497 : }
14498 : {
14499 2 : libndr_flags _flags_save_string = ndr->flags;
14500 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14501 2 : if (r->help_file) {
14502 2 : uint32_t _relative_save_offset;
14503 2 : _relative_save_offset = ndr->offset;
14504 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->help_file));
14505 2 : _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
14506 2 : NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
14507 2 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->help_file));
14508 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
14509 2 : if (ndr->offset > ndr->relative_highest_offset) {
14510 0 : ndr->relative_highest_offset = ndr->offset;
14511 : }
14512 2 : ndr->offset = _relative_save_offset;
14513 : }
14514 2 : ndr->flags = _flags_save_string;
14515 : }
14516 : {
14517 2 : libndr_flags _flags_save_string_array = ndr->flags;
14518 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14519 2 : if (r->dependent_files) {
14520 2 : uint32_t _relative_save_offset;
14521 2 : _relative_save_offset = ndr->offset;
14522 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dependent_files));
14523 2 : _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
14524 2 : NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
14525 2 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->dependent_files));
14526 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
14527 2 : if (ndr->offset > ndr->relative_highest_offset) {
14528 0 : ndr->relative_highest_offset = ndr->offset;
14529 : }
14530 2 : ndr->offset = _relative_save_offset;
14531 : }
14532 2 : ndr->flags = _flags_save_string_array;
14533 : }
14534 : {
14535 2 : libndr_flags _flags_save_string = ndr->flags;
14536 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14537 2 : if (r->monitor_name) {
14538 0 : uint32_t _relative_save_offset;
14539 0 : _relative_save_offset = ndr->offset;
14540 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
14541 0 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14542 0 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
14543 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
14544 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
14545 0 : if (ndr->offset > ndr->relative_highest_offset) {
14546 0 : ndr->relative_highest_offset = ndr->offset;
14547 : }
14548 0 : ndr->offset = _relative_save_offset;
14549 : }
14550 2 : ndr->flags = _flags_save_string;
14551 : }
14552 : {
14553 2 : libndr_flags _flags_save_string = ndr->flags;
14554 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14555 2 : if (r->default_datatype) {
14556 0 : uint32_t _relative_save_offset;
14557 0 : _relative_save_offset = ndr->offset;
14558 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->default_datatype));
14559 0 : _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
14560 0 : NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
14561 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->default_datatype));
14562 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
14563 0 : if (ndr->offset > ndr->relative_highest_offset) {
14564 0 : ndr->relative_highest_offset = ndr->offset;
14565 : }
14566 0 : ndr->offset = _relative_save_offset;
14567 : }
14568 2 : ndr->flags = _flags_save_string;
14569 : }
14570 : {
14571 2 : libndr_flags _flags_save_string_array = ndr->flags;
14572 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14573 2 : if (r->previous_names) {
14574 0 : uint32_t _relative_save_offset;
14575 0 : _relative_save_offset = ndr->offset;
14576 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->previous_names));
14577 0 : _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
14578 0 : NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
14579 0 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->previous_names));
14580 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
14581 0 : if (ndr->offset > ndr->relative_highest_offset) {
14582 0 : ndr->relative_highest_offset = ndr->offset;
14583 : }
14584 0 : ndr->offset = _relative_save_offset;
14585 : }
14586 2 : ndr->flags = _flags_save_string_array;
14587 : }
14588 : {
14589 2 : libndr_flags _flags_save_string = ndr->flags;
14590 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14591 2 : if (r->manufacturer_name) {
14592 2 : uint32_t _relative_save_offset;
14593 2 : _relative_save_offset = ndr->offset;
14594 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->manufacturer_name));
14595 2 : _mem_save_manufacturer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14596 2 : NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_name, 0);
14597 2 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->manufacturer_name));
14598 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_name_0, 0);
14599 2 : if (ndr->offset > ndr->relative_highest_offset) {
14600 0 : ndr->relative_highest_offset = ndr->offset;
14601 : }
14602 2 : ndr->offset = _relative_save_offset;
14603 : }
14604 2 : ndr->flags = _flags_save_string;
14605 : }
14606 : {
14607 2 : libndr_flags _flags_save_string = ndr->flags;
14608 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14609 2 : if (r->manufacturer_url) {
14610 2 : uint32_t _relative_save_offset;
14611 2 : _relative_save_offset = ndr->offset;
14612 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->manufacturer_url));
14613 2 : _mem_save_manufacturer_url_0 = NDR_PULL_GET_MEM_CTX(ndr);
14614 2 : NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_url, 0);
14615 2 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->manufacturer_url));
14616 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_url_0, 0);
14617 2 : if (ndr->offset > ndr->relative_highest_offset) {
14618 0 : ndr->relative_highest_offset = ndr->offset;
14619 : }
14620 2 : ndr->offset = _relative_save_offset;
14621 : }
14622 2 : ndr->flags = _flags_save_string;
14623 : }
14624 : {
14625 2 : libndr_flags _flags_save_string = ndr->flags;
14626 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14627 2 : if (r->hardware_id) {
14628 2 : uint32_t _relative_save_offset;
14629 2 : _relative_save_offset = ndr->offset;
14630 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->hardware_id));
14631 2 : _mem_save_hardware_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
14632 2 : NDR_PULL_SET_MEM_CTX(ndr, r->hardware_id, 0);
14633 2 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->hardware_id));
14634 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hardware_id_0, 0);
14635 2 : if (ndr->offset > ndr->relative_highest_offset) {
14636 0 : ndr->relative_highest_offset = ndr->offset;
14637 : }
14638 2 : ndr->offset = _relative_save_offset;
14639 : }
14640 2 : ndr->flags = _flags_save_string;
14641 : }
14642 : {
14643 2 : libndr_flags _flags_save_string = ndr->flags;
14644 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14645 2 : if (r->provider) {
14646 2 : uint32_t _relative_save_offset;
14647 2 : _relative_save_offset = ndr->offset;
14648 2 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->provider));
14649 2 : _mem_save_provider_0 = NDR_PULL_GET_MEM_CTX(ndr);
14650 2 : NDR_PULL_SET_MEM_CTX(ndr, r->provider, 0);
14651 2 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->provider));
14652 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_provider_0, 0);
14653 2 : if (ndr->offset > ndr->relative_highest_offset) {
14654 0 : ndr->relative_highest_offset = ndr->offset;
14655 : }
14656 2 : ndr->offset = _relative_save_offset;
14657 : }
14658 2 : ndr->flags = _flags_save_string;
14659 : }
14660 : }
14661 0 : return NDR_ERR_SUCCESS;
14662 : }
14663 :
14664 0 : static void ndr_print_flags_spoolss_DriverInfo6(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverInfo6 *r)
14665 : {
14666 0 : ndr_print_spoolss_DriverInfo6(ndr, name, r);
14667 0 : }
14668 :
14669 2 : _PUBLIC_ void ndr_print_spoolss_DriverInfo6(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo6 *r)
14670 : {
14671 2 : ndr_print_struct(ndr, name, "spoolss_DriverInfo6");
14672 2 : if (r == NULL) { ndr_print_null(ndr); return; }
14673 2 : ndr->depth++;
14674 2 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
14675 : {
14676 2 : libndr_flags _flags_save_string = ndr->flags;
14677 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14678 2 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
14679 2 : ndr->depth++;
14680 2 : if (r->driver_name) {
14681 2 : ndr_print_string(ndr, "driver_name", r->driver_name);
14682 : }
14683 2 : ndr->depth--;
14684 2 : ndr->flags = _flags_save_string;
14685 : }
14686 : {
14687 2 : libndr_flags _flags_save_string = ndr->flags;
14688 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14689 2 : ndr_print_ptr(ndr, "architecture", r->architecture);
14690 2 : ndr->depth++;
14691 2 : if (r->architecture) {
14692 2 : ndr_print_string(ndr, "architecture", r->architecture);
14693 : }
14694 2 : ndr->depth--;
14695 2 : ndr->flags = _flags_save_string;
14696 : }
14697 : {
14698 2 : libndr_flags _flags_save_string = ndr->flags;
14699 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14700 2 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
14701 2 : ndr->depth++;
14702 2 : if (r->driver_path) {
14703 2 : ndr_print_string(ndr, "driver_path", r->driver_path);
14704 : }
14705 2 : ndr->depth--;
14706 2 : ndr->flags = _flags_save_string;
14707 : }
14708 : {
14709 2 : libndr_flags _flags_save_string = ndr->flags;
14710 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14711 2 : ndr_print_ptr(ndr, "data_file", r->data_file);
14712 2 : ndr->depth++;
14713 2 : if (r->data_file) {
14714 2 : ndr_print_string(ndr, "data_file", r->data_file);
14715 : }
14716 2 : ndr->depth--;
14717 2 : ndr->flags = _flags_save_string;
14718 : }
14719 : {
14720 2 : libndr_flags _flags_save_string = ndr->flags;
14721 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14722 2 : ndr_print_ptr(ndr, "config_file", r->config_file);
14723 2 : ndr->depth++;
14724 2 : if (r->config_file) {
14725 2 : ndr_print_string(ndr, "config_file", r->config_file);
14726 : }
14727 2 : ndr->depth--;
14728 2 : ndr->flags = _flags_save_string;
14729 : }
14730 : {
14731 2 : libndr_flags _flags_save_string = ndr->flags;
14732 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14733 2 : ndr_print_ptr(ndr, "help_file", r->help_file);
14734 2 : ndr->depth++;
14735 2 : if (r->help_file) {
14736 2 : ndr_print_string(ndr, "help_file", r->help_file);
14737 : }
14738 2 : ndr->depth--;
14739 2 : ndr->flags = _flags_save_string;
14740 : }
14741 : {
14742 2 : libndr_flags _flags_save_string_array = ndr->flags;
14743 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14744 2 : ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
14745 2 : ndr->depth++;
14746 2 : if (r->dependent_files) {
14747 2 : ndr_print_string_array(ndr, "dependent_files", r->dependent_files);
14748 : }
14749 2 : ndr->depth--;
14750 2 : ndr->flags = _flags_save_string_array;
14751 : }
14752 : {
14753 2 : libndr_flags _flags_save_string = ndr->flags;
14754 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14755 2 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
14756 2 : ndr->depth++;
14757 2 : if (r->monitor_name) {
14758 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
14759 : }
14760 2 : ndr->depth--;
14761 2 : ndr->flags = _flags_save_string;
14762 : }
14763 : {
14764 2 : libndr_flags _flags_save_string = ndr->flags;
14765 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14766 2 : ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
14767 2 : ndr->depth++;
14768 2 : if (r->default_datatype) {
14769 0 : ndr_print_string(ndr, "default_datatype", r->default_datatype);
14770 : }
14771 2 : ndr->depth--;
14772 2 : ndr->flags = _flags_save_string;
14773 : }
14774 : {
14775 2 : libndr_flags _flags_save_string_array = ndr->flags;
14776 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14777 2 : ndr_print_ptr(ndr, "previous_names", r->previous_names);
14778 2 : ndr->depth++;
14779 2 : if (r->previous_names) {
14780 0 : ndr_print_string_array(ndr, "previous_names", r->previous_names);
14781 : }
14782 2 : ndr->depth--;
14783 2 : ndr->flags = _flags_save_string_array;
14784 : }
14785 2 : ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
14786 2 : ndr_print_hyper(ndr, "driver_version", r->driver_version);
14787 : {
14788 2 : libndr_flags _flags_save_string = ndr->flags;
14789 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14790 2 : ndr_print_ptr(ndr, "manufacturer_name", r->manufacturer_name);
14791 2 : ndr->depth++;
14792 2 : if (r->manufacturer_name) {
14793 2 : ndr_print_string(ndr, "manufacturer_name", r->manufacturer_name);
14794 : }
14795 2 : ndr->depth--;
14796 2 : ndr->flags = _flags_save_string;
14797 : }
14798 : {
14799 2 : libndr_flags _flags_save_string = ndr->flags;
14800 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14801 2 : ndr_print_ptr(ndr, "manufacturer_url", r->manufacturer_url);
14802 2 : ndr->depth++;
14803 2 : if (r->manufacturer_url) {
14804 2 : ndr_print_string(ndr, "manufacturer_url", r->manufacturer_url);
14805 : }
14806 2 : ndr->depth--;
14807 2 : ndr->flags = _flags_save_string;
14808 : }
14809 : {
14810 2 : libndr_flags _flags_save_string = ndr->flags;
14811 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14812 2 : ndr_print_ptr(ndr, "hardware_id", r->hardware_id);
14813 2 : ndr->depth++;
14814 2 : if (r->hardware_id) {
14815 2 : ndr_print_string(ndr, "hardware_id", r->hardware_id);
14816 : }
14817 2 : ndr->depth--;
14818 2 : ndr->flags = _flags_save_string;
14819 : }
14820 : {
14821 2 : libndr_flags _flags_save_string = ndr->flags;
14822 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14823 2 : ndr_print_ptr(ndr, "provider", r->provider);
14824 2 : ndr->depth++;
14825 2 : if (r->provider) {
14826 2 : ndr_print_string(ndr, "provider", r->provider);
14827 : }
14828 2 : ndr->depth--;
14829 2 : ndr->flags = _flags_save_string;
14830 : }
14831 2 : ndr->depth--;
14832 : }
14833 :
14834 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverInfo6(const struct spoolss_DriverInfo6 *r, libndr_flags flags)
14835 : {
14836 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo6);
14837 : }
14838 :
14839 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo7(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DriverInfo7 *r)
14840 : {
14841 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14842 0 : if (ndr_flags & NDR_SCALARS) {
14843 0 : NDR_CHECK(ndr_push_align(ndr, 5));
14844 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
14845 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
14846 : {
14847 0 : libndr_flags _flags_save_string = ndr->flags;
14848 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14849 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
14850 0 : ndr->flags = _flags_save_string;
14851 : }
14852 : {
14853 0 : libndr_flags _flags_save_string = ndr->flags;
14854 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14855 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->inf_name));
14856 0 : ndr->flags = _flags_save_string;
14857 : }
14858 : {
14859 0 : libndr_flags _flags_save_string = ndr->flags;
14860 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14861 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->install_source_root));
14862 0 : ndr->flags = _flags_save_string;
14863 : }
14864 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
14865 : }
14866 0 : if (ndr_flags & NDR_BUFFERS) {
14867 : {
14868 0 : libndr_flags _flags_save_string = ndr->flags;
14869 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14870 0 : if (r->driver_name) {
14871 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
14872 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
14873 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
14874 : }
14875 0 : ndr->flags = _flags_save_string;
14876 : }
14877 : {
14878 0 : libndr_flags _flags_save_string = ndr->flags;
14879 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14880 0 : if (r->inf_name) {
14881 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->inf_name));
14882 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->inf_name));
14883 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->inf_name));
14884 : }
14885 0 : ndr->flags = _flags_save_string;
14886 : }
14887 : {
14888 0 : libndr_flags _flags_save_string = ndr->flags;
14889 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14890 0 : if (r->install_source_root) {
14891 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->install_source_root));
14892 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->install_source_root));
14893 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->install_source_root));
14894 : }
14895 0 : ndr->flags = _flags_save_string;
14896 : }
14897 : }
14898 0 : return NDR_ERR_SUCCESS;
14899 : }
14900 :
14901 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo7(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DriverInfo7 *r)
14902 : {
14903 0 : uint32_t _ptr_driver_name;
14904 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
14905 0 : uint32_t _ptr_inf_name;
14906 0 : TALLOC_CTX *_mem_save_inf_name_0 = NULL;
14907 0 : uint32_t _ptr_install_source_root;
14908 0 : TALLOC_CTX *_mem_save_install_source_root_0 = NULL;
14909 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
14910 0 : if (ndr_flags & NDR_SCALARS) {
14911 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
14912 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
14913 0 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
14914 : {
14915 0 : libndr_flags _flags_save_string = ndr->flags;
14916 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14917 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
14918 0 : if (_ptr_driver_name) {
14919 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
14920 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
14921 : } else {
14922 0 : r->driver_name = NULL;
14923 : }
14924 0 : ndr->flags = _flags_save_string;
14925 : }
14926 : {
14927 0 : libndr_flags _flags_save_string = ndr->flags;
14928 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14929 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_inf_name));
14930 0 : if (_ptr_inf_name) {
14931 0 : NDR_PULL_ALLOC(ndr, r->inf_name);
14932 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->inf_name, _ptr_inf_name));
14933 : } else {
14934 0 : r->inf_name = NULL;
14935 : }
14936 0 : ndr->flags = _flags_save_string;
14937 : }
14938 : {
14939 0 : libndr_flags _flags_save_string = ndr->flags;
14940 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14941 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_install_source_root));
14942 0 : if (_ptr_install_source_root) {
14943 0 : NDR_PULL_ALLOC(ndr, r->install_source_root);
14944 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->install_source_root, _ptr_install_source_root));
14945 : } else {
14946 0 : r->install_source_root = NULL;
14947 : }
14948 0 : ndr->flags = _flags_save_string;
14949 : }
14950 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
14951 : }
14952 0 : if (ndr_flags & NDR_BUFFERS) {
14953 : {
14954 0 : libndr_flags _flags_save_string = ndr->flags;
14955 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14956 0 : if (r->driver_name) {
14957 0 : uint32_t _relative_save_offset;
14958 0 : _relative_save_offset = ndr->offset;
14959 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
14960 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14961 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
14962 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
14963 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
14964 0 : if (ndr->offset > ndr->relative_highest_offset) {
14965 0 : ndr->relative_highest_offset = ndr->offset;
14966 : }
14967 0 : ndr->offset = _relative_save_offset;
14968 : }
14969 0 : ndr->flags = _flags_save_string;
14970 : }
14971 : {
14972 0 : libndr_flags _flags_save_string = ndr->flags;
14973 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14974 0 : if (r->inf_name) {
14975 0 : uint32_t _relative_save_offset;
14976 0 : _relative_save_offset = ndr->offset;
14977 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->inf_name));
14978 0 : _mem_save_inf_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14979 0 : NDR_PULL_SET_MEM_CTX(ndr, r->inf_name, 0);
14980 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->inf_name));
14981 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_inf_name_0, 0);
14982 0 : if (ndr->offset > ndr->relative_highest_offset) {
14983 0 : ndr->relative_highest_offset = ndr->offset;
14984 : }
14985 0 : ndr->offset = _relative_save_offset;
14986 : }
14987 0 : ndr->flags = _flags_save_string;
14988 : }
14989 : {
14990 0 : libndr_flags _flags_save_string = ndr->flags;
14991 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
14992 0 : if (r->install_source_root) {
14993 0 : uint32_t _relative_save_offset;
14994 0 : _relative_save_offset = ndr->offset;
14995 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->install_source_root));
14996 0 : _mem_save_install_source_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
14997 0 : NDR_PULL_SET_MEM_CTX(ndr, r->install_source_root, 0);
14998 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->install_source_root));
14999 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_install_source_root_0, 0);
15000 0 : if (ndr->offset > ndr->relative_highest_offset) {
15001 0 : ndr->relative_highest_offset = ndr->offset;
15002 : }
15003 0 : ndr->offset = _relative_save_offset;
15004 : }
15005 0 : ndr->flags = _flags_save_string;
15006 : }
15007 : }
15008 0 : return NDR_ERR_SUCCESS;
15009 : }
15010 :
15011 0 : static void ndr_print_flags_spoolss_DriverInfo7(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverInfo7 *r)
15012 : {
15013 0 : ndr_print_spoolss_DriverInfo7(ndr, name, r);
15014 0 : }
15015 :
15016 0 : _PUBLIC_ void ndr_print_spoolss_DriverInfo7(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo7 *r)
15017 : {
15018 0 : ndr_print_struct(ndr, name, "spoolss_DriverInfo7");
15019 0 : if (r == NULL) { ndr_print_null(ndr); return; }
15020 0 : ndr->depth++;
15021 0 : ndr_print_uint32(ndr, "size", r->size);
15022 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
15023 : {
15024 0 : libndr_flags _flags_save_string = ndr->flags;
15025 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15026 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
15027 0 : ndr->depth++;
15028 0 : if (r->driver_name) {
15029 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
15030 : }
15031 0 : ndr->depth--;
15032 0 : ndr->flags = _flags_save_string;
15033 : }
15034 : {
15035 0 : libndr_flags _flags_save_string = ndr->flags;
15036 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15037 0 : ndr_print_ptr(ndr, "inf_name", r->inf_name);
15038 0 : ndr->depth++;
15039 0 : if (r->inf_name) {
15040 0 : ndr_print_string(ndr, "inf_name", r->inf_name);
15041 : }
15042 0 : ndr->depth--;
15043 0 : ndr->flags = _flags_save_string;
15044 : }
15045 : {
15046 0 : libndr_flags _flags_save_string = ndr->flags;
15047 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15048 0 : ndr_print_ptr(ndr, "install_source_root", r->install_source_root);
15049 0 : ndr->depth++;
15050 0 : if (r->install_source_root) {
15051 0 : ndr_print_string(ndr, "install_source_root", r->install_source_root);
15052 : }
15053 0 : ndr->depth--;
15054 0 : ndr->flags = _flags_save_string;
15055 : }
15056 0 : ndr->depth--;
15057 : }
15058 :
15059 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverInfo7(const struct spoolss_DriverInfo7 *r, libndr_flags flags)
15060 : {
15061 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo7);
15062 : }
15063 :
15064 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo8(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DriverInfo8 *r)
15065 : {
15066 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
15067 0 : if (ndr_flags & NDR_SCALARS) {
15068 0 : NDR_CHECK(ndr_push_align(ndr, 8));
15069 0 : NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
15070 : {
15071 0 : libndr_flags _flags_save_string = ndr->flags;
15072 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15073 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
15074 0 : ndr->flags = _flags_save_string;
15075 : }
15076 : {
15077 0 : libndr_flags _flags_save_string = ndr->flags;
15078 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15079 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
15080 0 : ndr->flags = _flags_save_string;
15081 : }
15082 : {
15083 0 : libndr_flags _flags_save_string = ndr->flags;
15084 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15085 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
15086 0 : ndr->flags = _flags_save_string;
15087 : }
15088 : {
15089 0 : libndr_flags _flags_save_string = ndr->flags;
15090 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15091 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
15092 0 : ndr->flags = _flags_save_string;
15093 : }
15094 : {
15095 0 : libndr_flags _flags_save_string = ndr->flags;
15096 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15097 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
15098 0 : ndr->flags = _flags_save_string;
15099 : }
15100 : {
15101 0 : libndr_flags _flags_save_string = ndr->flags;
15102 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15103 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->help_file));
15104 0 : ndr->flags = _flags_save_string;
15105 : }
15106 : {
15107 0 : libndr_flags _flags_save_string_array = ndr->flags;
15108 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15109 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dependent_files));
15110 0 : ndr->flags = _flags_save_string_array;
15111 : }
15112 : {
15113 0 : libndr_flags _flags_save_string = ndr->flags;
15114 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15115 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
15116 0 : ndr->flags = _flags_save_string;
15117 : }
15118 : {
15119 0 : libndr_flags _flags_save_string = ndr->flags;
15120 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15121 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->default_datatype));
15122 0 : ndr->flags = _flags_save_string;
15123 : }
15124 : {
15125 0 : libndr_flags _flags_save_string_array = ndr->flags;
15126 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15127 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->previous_names));
15128 0 : ndr->flags = _flags_save_string_array;
15129 : }
15130 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date));
15131 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version));
15132 : {
15133 0 : libndr_flags _flags_save_string = ndr->flags;
15134 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15135 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->manufacturer_name));
15136 0 : ndr->flags = _flags_save_string;
15137 : }
15138 : {
15139 0 : libndr_flags _flags_save_string = ndr->flags;
15140 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15141 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->manufacturer_url));
15142 0 : ndr->flags = _flags_save_string;
15143 : }
15144 : {
15145 0 : libndr_flags _flags_save_string = ndr->flags;
15146 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15147 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->hardware_id));
15148 0 : ndr->flags = _flags_save_string;
15149 : }
15150 : {
15151 0 : libndr_flags _flags_save_string = ndr->flags;
15152 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15153 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->provider));
15154 0 : ndr->flags = _flags_save_string;
15155 : }
15156 : {
15157 0 : libndr_flags _flags_save_string = ndr->flags;
15158 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15159 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor));
15160 0 : ndr->flags = _flags_save_string;
15161 : }
15162 : {
15163 0 : libndr_flags _flags_save_string = ndr->flags;
15164 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15165 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->vendor_setup));
15166 0 : ndr->flags = _flags_save_string;
15167 : }
15168 : {
15169 0 : libndr_flags _flags_save_string_array = ndr->flags;
15170 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15171 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->color_profiles));
15172 0 : ndr->flags = _flags_save_string_array;
15173 : }
15174 : {
15175 0 : libndr_flags _flags_save_string = ndr->flags;
15176 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15177 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->inf_path));
15178 0 : ndr->flags = _flags_save_string;
15179 : }
15180 0 : NDR_CHECK(ndr_push_spoolss_DriverAttributes(ndr, NDR_SCALARS, r->printer_driver_attributes));
15181 : {
15182 0 : libndr_flags _flags_save_string_array = ndr->flags;
15183 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15184 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->core_driver_dependencies));
15185 0 : ndr->flags = _flags_save_string_array;
15186 : }
15187 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->min_inbox_driver_ver_date));
15188 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->min_inbox_driver_ver_version));
15189 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
15190 : }
15191 0 : if (ndr_flags & NDR_BUFFERS) {
15192 : {
15193 0 : libndr_flags _flags_save_string = ndr->flags;
15194 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15195 0 : if (r->driver_name) {
15196 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
15197 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
15198 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
15199 : }
15200 0 : ndr->flags = _flags_save_string;
15201 : }
15202 : {
15203 0 : libndr_flags _flags_save_string = ndr->flags;
15204 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15205 0 : if (r->architecture) {
15206 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->architecture));
15207 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
15208 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->architecture));
15209 : }
15210 0 : ndr->flags = _flags_save_string;
15211 : }
15212 : {
15213 0 : libndr_flags _flags_save_string = ndr->flags;
15214 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15215 0 : if (r->driver_path) {
15216 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_path));
15217 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
15218 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_path));
15219 : }
15220 0 : ndr->flags = _flags_save_string;
15221 : }
15222 : {
15223 0 : libndr_flags _flags_save_string = ndr->flags;
15224 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15225 0 : if (r->data_file) {
15226 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_file));
15227 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
15228 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_file));
15229 : }
15230 0 : ndr->flags = _flags_save_string;
15231 : }
15232 : {
15233 0 : libndr_flags _flags_save_string = ndr->flags;
15234 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15235 0 : if (r->config_file) {
15236 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->config_file));
15237 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
15238 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->config_file));
15239 : }
15240 0 : ndr->flags = _flags_save_string;
15241 : }
15242 : {
15243 0 : libndr_flags _flags_save_string = ndr->flags;
15244 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15245 0 : if (r->help_file) {
15246 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->help_file));
15247 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->help_file));
15248 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->help_file));
15249 : }
15250 0 : ndr->flags = _flags_save_string;
15251 : }
15252 : {
15253 0 : libndr_flags _flags_save_string_array = ndr->flags;
15254 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15255 0 : if (r->dependent_files) {
15256 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->dependent_files));
15257 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->dependent_files));
15258 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->dependent_files));
15259 : }
15260 0 : ndr->flags = _flags_save_string_array;
15261 : }
15262 : {
15263 0 : libndr_flags _flags_save_string = ndr->flags;
15264 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15265 0 : if (r->monitor_name) {
15266 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->monitor_name));
15267 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
15268 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->monitor_name));
15269 : }
15270 0 : ndr->flags = _flags_save_string;
15271 : }
15272 : {
15273 0 : libndr_flags _flags_save_string = ndr->flags;
15274 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15275 0 : if (r->default_datatype) {
15276 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->default_datatype));
15277 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->default_datatype));
15278 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->default_datatype));
15279 : }
15280 0 : ndr->flags = _flags_save_string;
15281 : }
15282 : {
15283 0 : libndr_flags _flags_save_string_array = ndr->flags;
15284 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15285 0 : if (r->previous_names) {
15286 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->previous_names));
15287 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->previous_names));
15288 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->previous_names));
15289 : }
15290 0 : ndr->flags = _flags_save_string_array;
15291 : }
15292 : {
15293 0 : libndr_flags _flags_save_string = ndr->flags;
15294 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15295 0 : if (r->manufacturer_name) {
15296 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->manufacturer_name));
15297 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->manufacturer_name));
15298 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->manufacturer_name));
15299 : }
15300 0 : ndr->flags = _flags_save_string;
15301 : }
15302 : {
15303 0 : libndr_flags _flags_save_string = ndr->flags;
15304 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15305 0 : if (r->manufacturer_url) {
15306 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->manufacturer_url));
15307 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->manufacturer_url));
15308 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->manufacturer_url));
15309 : }
15310 0 : ndr->flags = _flags_save_string;
15311 : }
15312 : {
15313 0 : libndr_flags _flags_save_string = ndr->flags;
15314 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15315 0 : if (r->hardware_id) {
15316 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->hardware_id));
15317 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->hardware_id));
15318 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->hardware_id));
15319 : }
15320 0 : ndr->flags = _flags_save_string;
15321 : }
15322 : {
15323 0 : libndr_flags _flags_save_string = ndr->flags;
15324 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15325 0 : if (r->provider) {
15326 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->provider));
15327 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->provider));
15328 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->provider));
15329 : }
15330 0 : ndr->flags = _flags_save_string;
15331 : }
15332 : {
15333 0 : libndr_flags _flags_save_string = ndr->flags;
15334 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15335 0 : if (r->print_processor) {
15336 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->print_processor));
15337 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->print_processor));
15338 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->print_processor));
15339 : }
15340 0 : ndr->flags = _flags_save_string;
15341 : }
15342 : {
15343 0 : libndr_flags _flags_save_string = ndr->flags;
15344 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15345 0 : if (r->vendor_setup) {
15346 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->vendor_setup));
15347 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->vendor_setup));
15348 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->vendor_setup));
15349 : }
15350 0 : ndr->flags = _flags_save_string;
15351 : }
15352 : {
15353 0 : libndr_flags _flags_save_string_array = ndr->flags;
15354 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15355 0 : if (r->color_profiles) {
15356 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->color_profiles));
15357 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->color_profiles));
15358 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->color_profiles));
15359 : }
15360 0 : ndr->flags = _flags_save_string_array;
15361 : }
15362 : {
15363 0 : libndr_flags _flags_save_string = ndr->flags;
15364 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15365 0 : if (r->inf_path) {
15366 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->inf_path));
15367 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->inf_path));
15368 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->inf_path));
15369 : }
15370 0 : ndr->flags = _flags_save_string;
15371 : }
15372 : {
15373 0 : libndr_flags _flags_save_string_array = ndr->flags;
15374 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15375 0 : if (r->core_driver_dependencies) {
15376 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->core_driver_dependencies));
15377 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->core_driver_dependencies));
15378 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->core_driver_dependencies));
15379 : }
15380 0 : ndr->flags = _flags_save_string_array;
15381 : }
15382 : }
15383 0 : return NDR_ERR_SUCCESS;
15384 : }
15385 :
15386 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo8(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DriverInfo8 *r)
15387 : {
15388 0 : uint32_t _ptr_driver_name;
15389 0 : TALLOC_CTX *_mem_save_driver_name_0 = NULL;
15390 0 : uint32_t _ptr_architecture;
15391 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
15392 0 : uint32_t _ptr_driver_path;
15393 0 : TALLOC_CTX *_mem_save_driver_path_0 = NULL;
15394 0 : uint32_t _ptr_data_file;
15395 0 : TALLOC_CTX *_mem_save_data_file_0 = NULL;
15396 0 : uint32_t _ptr_config_file;
15397 0 : TALLOC_CTX *_mem_save_config_file_0 = NULL;
15398 0 : uint32_t _ptr_help_file;
15399 0 : TALLOC_CTX *_mem_save_help_file_0 = NULL;
15400 0 : uint32_t _ptr_dependent_files;
15401 0 : TALLOC_CTX *_mem_save_dependent_files_0 = NULL;
15402 0 : uint32_t _ptr_monitor_name;
15403 0 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
15404 0 : uint32_t _ptr_default_datatype;
15405 0 : TALLOC_CTX *_mem_save_default_datatype_0 = NULL;
15406 0 : uint32_t _ptr_previous_names;
15407 0 : TALLOC_CTX *_mem_save_previous_names_0 = NULL;
15408 0 : uint32_t _ptr_manufacturer_name;
15409 0 : TALLOC_CTX *_mem_save_manufacturer_name_0 = NULL;
15410 0 : uint32_t _ptr_manufacturer_url;
15411 0 : TALLOC_CTX *_mem_save_manufacturer_url_0 = NULL;
15412 0 : uint32_t _ptr_hardware_id;
15413 0 : TALLOC_CTX *_mem_save_hardware_id_0 = NULL;
15414 0 : uint32_t _ptr_provider;
15415 0 : TALLOC_CTX *_mem_save_provider_0 = NULL;
15416 0 : uint32_t _ptr_print_processor;
15417 0 : TALLOC_CTX *_mem_save_print_processor_0 = NULL;
15418 0 : uint32_t _ptr_vendor_setup;
15419 0 : TALLOC_CTX *_mem_save_vendor_setup_0 = NULL;
15420 0 : uint32_t _ptr_color_profiles;
15421 0 : TALLOC_CTX *_mem_save_color_profiles_0 = NULL;
15422 0 : uint32_t _ptr_inf_path;
15423 0 : TALLOC_CTX *_mem_save_inf_path_0 = NULL;
15424 0 : uint32_t _ptr_core_driver_dependencies;
15425 0 : TALLOC_CTX *_mem_save_core_driver_dependencies_0 = NULL;
15426 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
15427 0 : if (ndr_flags & NDR_SCALARS) {
15428 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
15429 0 : NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
15430 : {
15431 0 : libndr_flags _flags_save_string = ndr->flags;
15432 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15433 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
15434 0 : if (_ptr_driver_name) {
15435 0 : NDR_PULL_ALLOC(ndr, r->driver_name);
15436 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
15437 : } else {
15438 0 : r->driver_name = NULL;
15439 : }
15440 0 : ndr->flags = _flags_save_string;
15441 : }
15442 : {
15443 0 : libndr_flags _flags_save_string = ndr->flags;
15444 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15445 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
15446 0 : if (_ptr_architecture) {
15447 0 : NDR_PULL_ALLOC(ndr, r->architecture);
15448 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
15449 : } else {
15450 0 : r->architecture = NULL;
15451 : }
15452 0 : ndr->flags = _flags_save_string;
15453 : }
15454 : {
15455 0 : libndr_flags _flags_save_string = ndr->flags;
15456 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15457 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
15458 0 : if (_ptr_driver_path) {
15459 0 : NDR_PULL_ALLOC(ndr, r->driver_path);
15460 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
15461 : } else {
15462 0 : r->driver_path = NULL;
15463 : }
15464 0 : ndr->flags = _flags_save_string;
15465 : }
15466 : {
15467 0 : libndr_flags _flags_save_string = ndr->flags;
15468 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15469 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
15470 0 : if (_ptr_data_file) {
15471 0 : NDR_PULL_ALLOC(ndr, r->data_file);
15472 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
15473 : } else {
15474 0 : r->data_file = NULL;
15475 : }
15476 0 : ndr->flags = _flags_save_string;
15477 : }
15478 : {
15479 0 : libndr_flags _flags_save_string = ndr->flags;
15480 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15481 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
15482 0 : if (_ptr_config_file) {
15483 0 : NDR_PULL_ALLOC(ndr, r->config_file);
15484 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
15485 : } else {
15486 0 : r->config_file = NULL;
15487 : }
15488 0 : ndr->flags = _flags_save_string;
15489 : }
15490 : {
15491 0 : libndr_flags _flags_save_string = ndr->flags;
15492 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15493 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
15494 0 : if (_ptr_help_file) {
15495 0 : NDR_PULL_ALLOC(ndr, r->help_file);
15496 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->help_file, _ptr_help_file));
15497 : } else {
15498 0 : r->help_file = NULL;
15499 : }
15500 0 : ndr->flags = _flags_save_string;
15501 : }
15502 : {
15503 0 : libndr_flags _flags_save_string_array = ndr->flags;
15504 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15505 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
15506 0 : if (_ptr_dependent_files) {
15507 0 : NDR_PULL_ALLOC(ndr, r->dependent_files);
15508 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dependent_files, _ptr_dependent_files));
15509 : } else {
15510 0 : r->dependent_files = NULL;
15511 : }
15512 0 : ndr->flags = _flags_save_string_array;
15513 : }
15514 : {
15515 0 : libndr_flags _flags_save_string = ndr->flags;
15516 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15517 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
15518 0 : if (_ptr_monitor_name) {
15519 0 : NDR_PULL_ALLOC(ndr, r->monitor_name);
15520 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
15521 : } else {
15522 0 : r->monitor_name = NULL;
15523 : }
15524 0 : ndr->flags = _flags_save_string;
15525 : }
15526 : {
15527 0 : libndr_flags _flags_save_string = ndr->flags;
15528 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15529 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
15530 0 : if (_ptr_default_datatype) {
15531 0 : NDR_PULL_ALLOC(ndr, r->default_datatype);
15532 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->default_datatype, _ptr_default_datatype));
15533 : } else {
15534 0 : r->default_datatype = NULL;
15535 : }
15536 0 : ndr->flags = _flags_save_string;
15537 : }
15538 : {
15539 0 : libndr_flags _flags_save_string_array = ndr->flags;
15540 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15541 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
15542 0 : if (_ptr_previous_names) {
15543 0 : NDR_PULL_ALLOC(ndr, r->previous_names);
15544 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->previous_names, _ptr_previous_names));
15545 : } else {
15546 0 : r->previous_names = NULL;
15547 : }
15548 0 : ndr->flags = _flags_save_string_array;
15549 : }
15550 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date));
15551 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version));
15552 : {
15553 0 : libndr_flags _flags_save_string = ndr->flags;
15554 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15555 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_name));
15556 0 : if (_ptr_manufacturer_name) {
15557 0 : NDR_PULL_ALLOC(ndr, r->manufacturer_name);
15558 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->manufacturer_name, _ptr_manufacturer_name));
15559 : } else {
15560 0 : r->manufacturer_name = NULL;
15561 : }
15562 0 : ndr->flags = _flags_save_string;
15563 : }
15564 : {
15565 0 : libndr_flags _flags_save_string = ndr->flags;
15566 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15567 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_url));
15568 0 : if (_ptr_manufacturer_url) {
15569 0 : NDR_PULL_ALLOC(ndr, r->manufacturer_url);
15570 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->manufacturer_url, _ptr_manufacturer_url));
15571 : } else {
15572 0 : r->manufacturer_url = NULL;
15573 : }
15574 0 : ndr->flags = _flags_save_string;
15575 : }
15576 : {
15577 0 : libndr_flags _flags_save_string = ndr->flags;
15578 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15579 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hardware_id));
15580 0 : if (_ptr_hardware_id) {
15581 0 : NDR_PULL_ALLOC(ndr, r->hardware_id);
15582 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->hardware_id, _ptr_hardware_id));
15583 : } else {
15584 0 : r->hardware_id = NULL;
15585 : }
15586 0 : ndr->flags = _flags_save_string;
15587 : }
15588 : {
15589 0 : libndr_flags _flags_save_string = ndr->flags;
15590 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15591 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_provider));
15592 0 : if (_ptr_provider) {
15593 0 : NDR_PULL_ALLOC(ndr, r->provider);
15594 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->provider, _ptr_provider));
15595 : } else {
15596 0 : r->provider = NULL;
15597 : }
15598 0 : ndr->flags = _flags_save_string;
15599 : }
15600 : {
15601 0 : libndr_flags _flags_save_string = ndr->flags;
15602 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15603 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
15604 0 : if (_ptr_print_processor) {
15605 0 : NDR_PULL_ALLOC(ndr, r->print_processor);
15606 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->print_processor, _ptr_print_processor));
15607 : } else {
15608 0 : r->print_processor = NULL;
15609 : }
15610 0 : ndr->flags = _flags_save_string;
15611 : }
15612 : {
15613 0 : libndr_flags _flags_save_string = ndr->flags;
15614 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15615 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_vendor_setup));
15616 0 : if (_ptr_vendor_setup) {
15617 0 : NDR_PULL_ALLOC(ndr, r->vendor_setup);
15618 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->vendor_setup, _ptr_vendor_setup));
15619 : } else {
15620 0 : r->vendor_setup = NULL;
15621 : }
15622 0 : ndr->flags = _flags_save_string;
15623 : }
15624 : {
15625 0 : libndr_flags _flags_save_string_array = ndr->flags;
15626 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15627 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_color_profiles));
15628 0 : if (_ptr_color_profiles) {
15629 0 : NDR_PULL_ALLOC(ndr, r->color_profiles);
15630 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->color_profiles, _ptr_color_profiles));
15631 : } else {
15632 0 : r->color_profiles = NULL;
15633 : }
15634 0 : ndr->flags = _flags_save_string_array;
15635 : }
15636 : {
15637 0 : libndr_flags _flags_save_string = ndr->flags;
15638 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15639 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_inf_path));
15640 0 : if (_ptr_inf_path) {
15641 0 : NDR_PULL_ALLOC(ndr, r->inf_path);
15642 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->inf_path, _ptr_inf_path));
15643 : } else {
15644 0 : r->inf_path = NULL;
15645 : }
15646 0 : ndr->flags = _flags_save_string;
15647 : }
15648 0 : NDR_CHECK(ndr_pull_spoolss_DriverAttributes(ndr, NDR_SCALARS, &r->printer_driver_attributes));
15649 : {
15650 0 : libndr_flags _flags_save_string_array = ndr->flags;
15651 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15652 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_core_driver_dependencies));
15653 0 : if (_ptr_core_driver_dependencies) {
15654 0 : NDR_PULL_ALLOC(ndr, r->core_driver_dependencies);
15655 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->core_driver_dependencies, _ptr_core_driver_dependencies));
15656 : } else {
15657 0 : r->core_driver_dependencies = NULL;
15658 : }
15659 0 : ndr->flags = _flags_save_string_array;
15660 : }
15661 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_date));
15662 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_version));
15663 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
15664 : }
15665 0 : if (ndr_flags & NDR_BUFFERS) {
15666 : {
15667 0 : libndr_flags _flags_save_string = ndr->flags;
15668 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15669 0 : if (r->driver_name) {
15670 0 : uint32_t _relative_save_offset;
15671 0 : _relative_save_offset = ndr->offset;
15672 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
15673 0 : _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15674 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
15675 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
15676 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
15677 0 : if (ndr->offset > ndr->relative_highest_offset) {
15678 0 : ndr->relative_highest_offset = ndr->offset;
15679 : }
15680 0 : ndr->offset = _relative_save_offset;
15681 : }
15682 0 : ndr->flags = _flags_save_string;
15683 : }
15684 : {
15685 0 : libndr_flags _flags_save_string = ndr->flags;
15686 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15687 0 : if (r->architecture) {
15688 0 : uint32_t _relative_save_offset;
15689 0 : _relative_save_offset = ndr->offset;
15690 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
15691 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
15692 0 : NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
15693 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
15694 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
15695 0 : if (ndr->offset > ndr->relative_highest_offset) {
15696 0 : ndr->relative_highest_offset = ndr->offset;
15697 : }
15698 0 : ndr->offset = _relative_save_offset;
15699 : }
15700 0 : ndr->flags = _flags_save_string;
15701 : }
15702 : {
15703 0 : libndr_flags _flags_save_string = ndr->flags;
15704 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15705 0 : if (r->driver_path) {
15706 0 : uint32_t _relative_save_offset;
15707 0 : _relative_save_offset = ndr->offset;
15708 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
15709 0 : _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
15710 0 : NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
15711 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
15712 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
15713 0 : if (ndr->offset > ndr->relative_highest_offset) {
15714 0 : ndr->relative_highest_offset = ndr->offset;
15715 : }
15716 0 : ndr->offset = _relative_save_offset;
15717 : }
15718 0 : ndr->flags = _flags_save_string;
15719 : }
15720 : {
15721 0 : libndr_flags _flags_save_string = ndr->flags;
15722 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15723 0 : if (r->data_file) {
15724 0 : uint32_t _relative_save_offset;
15725 0 : _relative_save_offset = ndr->offset;
15726 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
15727 0 : _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
15728 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
15729 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
15730 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
15731 0 : if (ndr->offset > ndr->relative_highest_offset) {
15732 0 : ndr->relative_highest_offset = ndr->offset;
15733 : }
15734 0 : ndr->offset = _relative_save_offset;
15735 : }
15736 0 : ndr->flags = _flags_save_string;
15737 : }
15738 : {
15739 0 : libndr_flags _flags_save_string = ndr->flags;
15740 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15741 0 : if (r->config_file) {
15742 0 : uint32_t _relative_save_offset;
15743 0 : _relative_save_offset = ndr->offset;
15744 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
15745 0 : _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
15746 0 : NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
15747 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
15748 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
15749 0 : if (ndr->offset > ndr->relative_highest_offset) {
15750 0 : ndr->relative_highest_offset = ndr->offset;
15751 : }
15752 0 : ndr->offset = _relative_save_offset;
15753 : }
15754 0 : ndr->flags = _flags_save_string;
15755 : }
15756 : {
15757 0 : libndr_flags _flags_save_string = ndr->flags;
15758 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15759 0 : if (r->help_file) {
15760 0 : uint32_t _relative_save_offset;
15761 0 : _relative_save_offset = ndr->offset;
15762 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->help_file));
15763 0 : _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
15764 0 : NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
15765 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->help_file));
15766 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
15767 0 : if (ndr->offset > ndr->relative_highest_offset) {
15768 0 : ndr->relative_highest_offset = ndr->offset;
15769 : }
15770 0 : ndr->offset = _relative_save_offset;
15771 : }
15772 0 : ndr->flags = _flags_save_string;
15773 : }
15774 : {
15775 0 : libndr_flags _flags_save_string_array = ndr->flags;
15776 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15777 0 : if (r->dependent_files) {
15778 0 : uint32_t _relative_save_offset;
15779 0 : _relative_save_offset = ndr->offset;
15780 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dependent_files));
15781 0 : _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
15782 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
15783 0 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->dependent_files));
15784 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
15785 0 : if (ndr->offset > ndr->relative_highest_offset) {
15786 0 : ndr->relative_highest_offset = ndr->offset;
15787 : }
15788 0 : ndr->offset = _relative_save_offset;
15789 : }
15790 0 : ndr->flags = _flags_save_string_array;
15791 : }
15792 : {
15793 0 : libndr_flags _flags_save_string = ndr->flags;
15794 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15795 0 : if (r->monitor_name) {
15796 0 : uint32_t _relative_save_offset;
15797 0 : _relative_save_offset = ndr->offset;
15798 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
15799 0 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15800 0 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
15801 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
15802 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
15803 0 : if (ndr->offset > ndr->relative_highest_offset) {
15804 0 : ndr->relative_highest_offset = ndr->offset;
15805 : }
15806 0 : ndr->offset = _relative_save_offset;
15807 : }
15808 0 : ndr->flags = _flags_save_string;
15809 : }
15810 : {
15811 0 : libndr_flags _flags_save_string = ndr->flags;
15812 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15813 0 : if (r->default_datatype) {
15814 0 : uint32_t _relative_save_offset;
15815 0 : _relative_save_offset = ndr->offset;
15816 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->default_datatype));
15817 0 : _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
15818 0 : NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
15819 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->default_datatype));
15820 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
15821 0 : if (ndr->offset > ndr->relative_highest_offset) {
15822 0 : ndr->relative_highest_offset = ndr->offset;
15823 : }
15824 0 : ndr->offset = _relative_save_offset;
15825 : }
15826 0 : ndr->flags = _flags_save_string;
15827 : }
15828 : {
15829 0 : libndr_flags _flags_save_string_array = ndr->flags;
15830 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15831 0 : if (r->previous_names) {
15832 0 : uint32_t _relative_save_offset;
15833 0 : _relative_save_offset = ndr->offset;
15834 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->previous_names));
15835 0 : _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
15836 0 : NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
15837 0 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->previous_names));
15838 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
15839 0 : if (ndr->offset > ndr->relative_highest_offset) {
15840 0 : ndr->relative_highest_offset = ndr->offset;
15841 : }
15842 0 : ndr->offset = _relative_save_offset;
15843 : }
15844 0 : ndr->flags = _flags_save_string_array;
15845 : }
15846 : {
15847 0 : libndr_flags _flags_save_string = ndr->flags;
15848 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15849 0 : if (r->manufacturer_name) {
15850 0 : uint32_t _relative_save_offset;
15851 0 : _relative_save_offset = ndr->offset;
15852 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->manufacturer_name));
15853 0 : _mem_save_manufacturer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15854 0 : NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_name, 0);
15855 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->manufacturer_name));
15856 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_name_0, 0);
15857 0 : if (ndr->offset > ndr->relative_highest_offset) {
15858 0 : ndr->relative_highest_offset = ndr->offset;
15859 : }
15860 0 : ndr->offset = _relative_save_offset;
15861 : }
15862 0 : ndr->flags = _flags_save_string;
15863 : }
15864 : {
15865 0 : libndr_flags _flags_save_string = ndr->flags;
15866 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15867 0 : if (r->manufacturer_url) {
15868 0 : uint32_t _relative_save_offset;
15869 0 : _relative_save_offset = ndr->offset;
15870 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->manufacturer_url));
15871 0 : _mem_save_manufacturer_url_0 = NDR_PULL_GET_MEM_CTX(ndr);
15872 0 : NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_url, 0);
15873 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->manufacturer_url));
15874 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_url_0, 0);
15875 0 : if (ndr->offset > ndr->relative_highest_offset) {
15876 0 : ndr->relative_highest_offset = ndr->offset;
15877 : }
15878 0 : ndr->offset = _relative_save_offset;
15879 : }
15880 0 : ndr->flags = _flags_save_string;
15881 : }
15882 : {
15883 0 : libndr_flags _flags_save_string = ndr->flags;
15884 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15885 0 : if (r->hardware_id) {
15886 0 : uint32_t _relative_save_offset;
15887 0 : _relative_save_offset = ndr->offset;
15888 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->hardware_id));
15889 0 : _mem_save_hardware_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
15890 0 : NDR_PULL_SET_MEM_CTX(ndr, r->hardware_id, 0);
15891 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->hardware_id));
15892 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hardware_id_0, 0);
15893 0 : if (ndr->offset > ndr->relative_highest_offset) {
15894 0 : ndr->relative_highest_offset = ndr->offset;
15895 : }
15896 0 : ndr->offset = _relative_save_offset;
15897 : }
15898 0 : ndr->flags = _flags_save_string;
15899 : }
15900 : {
15901 0 : libndr_flags _flags_save_string = ndr->flags;
15902 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15903 0 : if (r->provider) {
15904 0 : uint32_t _relative_save_offset;
15905 0 : _relative_save_offset = ndr->offset;
15906 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->provider));
15907 0 : _mem_save_provider_0 = NDR_PULL_GET_MEM_CTX(ndr);
15908 0 : NDR_PULL_SET_MEM_CTX(ndr, r->provider, 0);
15909 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->provider));
15910 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_provider_0, 0);
15911 0 : if (ndr->offset > ndr->relative_highest_offset) {
15912 0 : ndr->relative_highest_offset = ndr->offset;
15913 : }
15914 0 : ndr->offset = _relative_save_offset;
15915 : }
15916 0 : ndr->flags = _flags_save_string;
15917 : }
15918 : {
15919 0 : libndr_flags _flags_save_string = ndr->flags;
15920 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15921 0 : if (r->print_processor) {
15922 0 : uint32_t _relative_save_offset;
15923 0 : _relative_save_offset = ndr->offset;
15924 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->print_processor));
15925 0 : _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
15926 0 : NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
15927 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->print_processor));
15928 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
15929 0 : if (ndr->offset > ndr->relative_highest_offset) {
15930 0 : ndr->relative_highest_offset = ndr->offset;
15931 : }
15932 0 : ndr->offset = _relative_save_offset;
15933 : }
15934 0 : ndr->flags = _flags_save_string;
15935 : }
15936 : {
15937 0 : libndr_flags _flags_save_string = ndr->flags;
15938 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15939 0 : if (r->vendor_setup) {
15940 0 : uint32_t _relative_save_offset;
15941 0 : _relative_save_offset = ndr->offset;
15942 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->vendor_setup));
15943 0 : _mem_save_vendor_setup_0 = NDR_PULL_GET_MEM_CTX(ndr);
15944 0 : NDR_PULL_SET_MEM_CTX(ndr, r->vendor_setup, 0);
15945 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->vendor_setup));
15946 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_vendor_setup_0, 0);
15947 0 : if (ndr->offset > ndr->relative_highest_offset) {
15948 0 : ndr->relative_highest_offset = ndr->offset;
15949 : }
15950 0 : ndr->offset = _relative_save_offset;
15951 : }
15952 0 : ndr->flags = _flags_save_string;
15953 : }
15954 : {
15955 0 : libndr_flags _flags_save_string_array = ndr->flags;
15956 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15957 0 : if (r->color_profiles) {
15958 0 : uint32_t _relative_save_offset;
15959 0 : _relative_save_offset = ndr->offset;
15960 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->color_profiles));
15961 0 : _mem_save_color_profiles_0 = NDR_PULL_GET_MEM_CTX(ndr);
15962 0 : NDR_PULL_SET_MEM_CTX(ndr, r->color_profiles, 0);
15963 0 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->color_profiles));
15964 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_color_profiles_0, 0);
15965 0 : if (ndr->offset > ndr->relative_highest_offset) {
15966 0 : ndr->relative_highest_offset = ndr->offset;
15967 : }
15968 0 : ndr->offset = _relative_save_offset;
15969 : }
15970 0 : ndr->flags = _flags_save_string_array;
15971 : }
15972 : {
15973 0 : libndr_flags _flags_save_string = ndr->flags;
15974 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15975 0 : if (r->inf_path) {
15976 0 : uint32_t _relative_save_offset;
15977 0 : _relative_save_offset = ndr->offset;
15978 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->inf_path));
15979 0 : _mem_save_inf_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
15980 0 : NDR_PULL_SET_MEM_CTX(ndr, r->inf_path, 0);
15981 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->inf_path));
15982 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_inf_path_0, 0);
15983 0 : if (ndr->offset > ndr->relative_highest_offset) {
15984 0 : ndr->relative_highest_offset = ndr->offset;
15985 : }
15986 0 : ndr->offset = _relative_save_offset;
15987 : }
15988 0 : ndr->flags = _flags_save_string;
15989 : }
15990 : {
15991 0 : libndr_flags _flags_save_string_array = ndr->flags;
15992 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15993 0 : if (r->core_driver_dependencies) {
15994 0 : uint32_t _relative_save_offset;
15995 0 : _relative_save_offset = ndr->offset;
15996 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->core_driver_dependencies));
15997 0 : _mem_save_core_driver_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
15998 0 : NDR_PULL_SET_MEM_CTX(ndr, r->core_driver_dependencies, 0);
15999 0 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->core_driver_dependencies));
16000 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_core_driver_dependencies_0, 0);
16001 0 : if (ndr->offset > ndr->relative_highest_offset) {
16002 0 : ndr->relative_highest_offset = ndr->offset;
16003 : }
16004 0 : ndr->offset = _relative_save_offset;
16005 : }
16006 0 : ndr->flags = _flags_save_string_array;
16007 : }
16008 : }
16009 0 : return NDR_ERR_SUCCESS;
16010 : }
16011 :
16012 0 : static void ndr_print_flags_spoolss_DriverInfo8(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverInfo8 *r)
16013 : {
16014 0 : ndr_print_spoolss_DriverInfo8(ndr, name, r);
16015 0 : }
16016 :
16017 0 : _PUBLIC_ void ndr_print_spoolss_DriverInfo8(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo8 *r)
16018 : {
16019 0 : ndr_print_struct(ndr, name, "spoolss_DriverInfo8");
16020 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16021 0 : ndr->depth++;
16022 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
16023 : {
16024 0 : libndr_flags _flags_save_string = ndr->flags;
16025 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16026 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
16027 0 : ndr->depth++;
16028 0 : if (r->driver_name) {
16029 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
16030 : }
16031 0 : ndr->depth--;
16032 0 : ndr->flags = _flags_save_string;
16033 : }
16034 : {
16035 0 : libndr_flags _flags_save_string = ndr->flags;
16036 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16037 0 : ndr_print_ptr(ndr, "architecture", r->architecture);
16038 0 : ndr->depth++;
16039 0 : if (r->architecture) {
16040 0 : ndr_print_string(ndr, "architecture", r->architecture);
16041 : }
16042 0 : ndr->depth--;
16043 0 : ndr->flags = _flags_save_string;
16044 : }
16045 : {
16046 0 : libndr_flags _flags_save_string = ndr->flags;
16047 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16048 0 : ndr_print_ptr(ndr, "driver_path", r->driver_path);
16049 0 : ndr->depth++;
16050 0 : if (r->driver_path) {
16051 0 : ndr_print_string(ndr, "driver_path", r->driver_path);
16052 : }
16053 0 : ndr->depth--;
16054 0 : ndr->flags = _flags_save_string;
16055 : }
16056 : {
16057 0 : libndr_flags _flags_save_string = ndr->flags;
16058 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16059 0 : ndr_print_ptr(ndr, "data_file", r->data_file);
16060 0 : ndr->depth++;
16061 0 : if (r->data_file) {
16062 0 : ndr_print_string(ndr, "data_file", r->data_file);
16063 : }
16064 0 : ndr->depth--;
16065 0 : ndr->flags = _flags_save_string;
16066 : }
16067 : {
16068 0 : libndr_flags _flags_save_string = ndr->flags;
16069 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16070 0 : ndr_print_ptr(ndr, "config_file", r->config_file);
16071 0 : ndr->depth++;
16072 0 : if (r->config_file) {
16073 0 : ndr_print_string(ndr, "config_file", r->config_file);
16074 : }
16075 0 : ndr->depth--;
16076 0 : ndr->flags = _flags_save_string;
16077 : }
16078 : {
16079 0 : libndr_flags _flags_save_string = ndr->flags;
16080 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16081 0 : ndr_print_ptr(ndr, "help_file", r->help_file);
16082 0 : ndr->depth++;
16083 0 : if (r->help_file) {
16084 0 : ndr_print_string(ndr, "help_file", r->help_file);
16085 : }
16086 0 : ndr->depth--;
16087 0 : ndr->flags = _flags_save_string;
16088 : }
16089 : {
16090 0 : libndr_flags _flags_save_string_array = ndr->flags;
16091 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16092 0 : ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
16093 0 : ndr->depth++;
16094 0 : if (r->dependent_files) {
16095 0 : ndr_print_string_array(ndr, "dependent_files", r->dependent_files);
16096 : }
16097 0 : ndr->depth--;
16098 0 : ndr->flags = _flags_save_string_array;
16099 : }
16100 : {
16101 0 : libndr_flags _flags_save_string = ndr->flags;
16102 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16103 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
16104 0 : ndr->depth++;
16105 0 : if (r->monitor_name) {
16106 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
16107 : }
16108 0 : ndr->depth--;
16109 0 : ndr->flags = _flags_save_string;
16110 : }
16111 : {
16112 0 : libndr_flags _flags_save_string = ndr->flags;
16113 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16114 0 : ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
16115 0 : ndr->depth++;
16116 0 : if (r->default_datatype) {
16117 0 : ndr_print_string(ndr, "default_datatype", r->default_datatype);
16118 : }
16119 0 : ndr->depth--;
16120 0 : ndr->flags = _flags_save_string;
16121 : }
16122 : {
16123 0 : libndr_flags _flags_save_string_array = ndr->flags;
16124 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16125 0 : ndr_print_ptr(ndr, "previous_names", r->previous_names);
16126 0 : ndr->depth++;
16127 0 : if (r->previous_names) {
16128 0 : ndr_print_string_array(ndr, "previous_names", r->previous_names);
16129 : }
16130 0 : ndr->depth--;
16131 0 : ndr->flags = _flags_save_string_array;
16132 : }
16133 0 : ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
16134 0 : ndr_print_hyper(ndr, "driver_version", r->driver_version);
16135 : {
16136 0 : libndr_flags _flags_save_string = ndr->flags;
16137 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16138 0 : ndr_print_ptr(ndr, "manufacturer_name", r->manufacturer_name);
16139 0 : ndr->depth++;
16140 0 : if (r->manufacturer_name) {
16141 0 : ndr_print_string(ndr, "manufacturer_name", r->manufacturer_name);
16142 : }
16143 0 : ndr->depth--;
16144 0 : ndr->flags = _flags_save_string;
16145 : }
16146 : {
16147 0 : libndr_flags _flags_save_string = ndr->flags;
16148 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16149 0 : ndr_print_ptr(ndr, "manufacturer_url", r->manufacturer_url);
16150 0 : ndr->depth++;
16151 0 : if (r->manufacturer_url) {
16152 0 : ndr_print_string(ndr, "manufacturer_url", r->manufacturer_url);
16153 : }
16154 0 : ndr->depth--;
16155 0 : ndr->flags = _flags_save_string;
16156 : }
16157 : {
16158 0 : libndr_flags _flags_save_string = ndr->flags;
16159 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16160 0 : ndr_print_ptr(ndr, "hardware_id", r->hardware_id);
16161 0 : ndr->depth++;
16162 0 : if (r->hardware_id) {
16163 0 : ndr_print_string(ndr, "hardware_id", r->hardware_id);
16164 : }
16165 0 : ndr->depth--;
16166 0 : ndr->flags = _flags_save_string;
16167 : }
16168 : {
16169 0 : libndr_flags _flags_save_string = ndr->flags;
16170 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16171 0 : ndr_print_ptr(ndr, "provider", r->provider);
16172 0 : ndr->depth++;
16173 0 : if (r->provider) {
16174 0 : ndr_print_string(ndr, "provider", r->provider);
16175 : }
16176 0 : ndr->depth--;
16177 0 : ndr->flags = _flags_save_string;
16178 : }
16179 : {
16180 0 : libndr_flags _flags_save_string = ndr->flags;
16181 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16182 0 : ndr_print_ptr(ndr, "print_processor", r->print_processor);
16183 0 : ndr->depth++;
16184 0 : if (r->print_processor) {
16185 0 : ndr_print_string(ndr, "print_processor", r->print_processor);
16186 : }
16187 0 : ndr->depth--;
16188 0 : ndr->flags = _flags_save_string;
16189 : }
16190 : {
16191 0 : libndr_flags _flags_save_string = ndr->flags;
16192 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16193 0 : ndr_print_ptr(ndr, "vendor_setup", r->vendor_setup);
16194 0 : ndr->depth++;
16195 0 : if (r->vendor_setup) {
16196 0 : ndr_print_string(ndr, "vendor_setup", r->vendor_setup);
16197 : }
16198 0 : ndr->depth--;
16199 0 : ndr->flags = _flags_save_string;
16200 : }
16201 : {
16202 0 : libndr_flags _flags_save_string_array = ndr->flags;
16203 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16204 0 : ndr_print_ptr(ndr, "color_profiles", r->color_profiles);
16205 0 : ndr->depth++;
16206 0 : if (r->color_profiles) {
16207 0 : ndr_print_string_array(ndr, "color_profiles", r->color_profiles);
16208 : }
16209 0 : ndr->depth--;
16210 0 : ndr->flags = _flags_save_string_array;
16211 : }
16212 : {
16213 0 : libndr_flags _flags_save_string = ndr->flags;
16214 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16215 0 : ndr_print_ptr(ndr, "inf_path", r->inf_path);
16216 0 : ndr->depth++;
16217 0 : if (r->inf_path) {
16218 0 : ndr_print_string(ndr, "inf_path", r->inf_path);
16219 : }
16220 0 : ndr->depth--;
16221 0 : ndr->flags = _flags_save_string;
16222 : }
16223 0 : ndr_print_spoolss_DriverAttributes(ndr, "printer_driver_attributes", r->printer_driver_attributes);
16224 : {
16225 0 : libndr_flags _flags_save_string_array = ndr->flags;
16226 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16227 0 : ndr_print_ptr(ndr, "core_driver_dependencies", r->core_driver_dependencies);
16228 0 : ndr->depth++;
16229 0 : if (r->core_driver_dependencies) {
16230 0 : ndr_print_string_array(ndr, "core_driver_dependencies", r->core_driver_dependencies);
16231 : }
16232 0 : ndr->depth--;
16233 0 : ndr->flags = _flags_save_string_array;
16234 : }
16235 0 : ndr_print_NTTIME(ndr, "min_inbox_driver_ver_date", r->min_inbox_driver_ver_date);
16236 0 : ndr_print_hyper(ndr, "min_inbox_driver_ver_version", r->min_inbox_driver_ver_version);
16237 0 : ndr->depth--;
16238 : }
16239 :
16240 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverInfo8(const struct spoolss_DriverInfo8 *r, libndr_flags flags)
16241 : {
16242 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo8);
16243 : }
16244 :
16245 0 : static enum ndr_err_code ndr_push_spoolss_DriverFileType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_DriverFileType r)
16246 : {
16247 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
16248 0 : return NDR_ERR_SUCCESS;
16249 : }
16250 :
16251 0 : static enum ndr_err_code ndr_pull_spoolss_DriverFileType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_DriverFileType *r)
16252 : {
16253 0 : uint32_t v;
16254 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
16255 0 : *r = v;
16256 0 : return NDR_ERR_SUCCESS;
16257 : }
16258 :
16259 0 : _PUBLIC_ void ndr_print_spoolss_DriverFileType(struct ndr_print *ndr, const char *name, enum spoolss_DriverFileType r)
16260 : {
16261 0 : const char *val = NULL;
16262 :
16263 0 : switch (r) {
16264 0 : case SPOOLSS_DRIVER_FILE_TYPE_RENDERING: val = "SPOOLSS_DRIVER_FILE_TYPE_RENDERING"; break;
16265 0 : case SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION: val = "SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION"; break;
16266 0 : case SPOOLSS_DRIVER_FILE_TYPE_DATA: val = "SPOOLSS_DRIVER_FILE_TYPE_DATA"; break;
16267 0 : case SPOOLSS_DRIVER_FILE_TYPE_HELP: val = "SPOOLSS_DRIVER_FILE_TYPE_HELP"; break;
16268 0 : case SPOOLSS_DRIVER_FILE_TYPE_OTHER: val = "SPOOLSS_DRIVER_FILE_TYPE_OTHER"; break;
16269 : }
16270 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
16271 0 : }
16272 :
16273 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverFileInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DriverFileInfo *r)
16274 : {
16275 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
16276 0 : if (ndr_flags & NDR_SCALARS) {
16277 0 : NDR_CHECK(ndr_push_align(ndr, 5));
16278 : {
16279 0 : libndr_flags _flags_save_string = ndr->flags;
16280 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16281 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->file_name));
16282 0 : ndr->flags = _flags_save_string;
16283 : }
16284 0 : NDR_CHECK(ndr_push_spoolss_DriverFileType(ndr, NDR_SCALARS, r->file_type));
16285 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->file_version));
16286 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
16287 : }
16288 0 : if (ndr_flags & NDR_BUFFERS) {
16289 : {
16290 0 : libndr_flags _flags_save_string = ndr->flags;
16291 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16292 0 : if (r->file_name) {
16293 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->file_name));
16294 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->file_name));
16295 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->file_name));
16296 : }
16297 0 : ndr->flags = _flags_save_string;
16298 : }
16299 : }
16300 0 : return NDR_ERR_SUCCESS;
16301 : }
16302 :
16303 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverFileInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DriverFileInfo *r)
16304 : {
16305 0 : uint32_t _ptr_file_name;
16306 0 : TALLOC_CTX *_mem_save_file_name_0 = NULL;
16307 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
16308 0 : if (ndr_flags & NDR_SCALARS) {
16309 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
16310 : {
16311 0 : libndr_flags _flags_save_string = ndr->flags;
16312 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16313 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_file_name));
16314 0 : if (_ptr_file_name) {
16315 0 : NDR_PULL_ALLOC(ndr, r->file_name);
16316 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->file_name, _ptr_file_name));
16317 : } else {
16318 0 : r->file_name = NULL;
16319 : }
16320 0 : ndr->flags = _flags_save_string;
16321 : }
16322 0 : NDR_CHECK(ndr_pull_spoolss_DriverFileType(ndr, NDR_SCALARS, &r->file_type));
16323 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->file_version));
16324 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
16325 : }
16326 0 : if (ndr_flags & NDR_BUFFERS) {
16327 : {
16328 0 : libndr_flags _flags_save_string = ndr->flags;
16329 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16330 0 : if (r->file_name) {
16331 0 : uint32_t _relative_save_offset;
16332 0 : _relative_save_offset = ndr->offset;
16333 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->file_name));
16334 0 : _mem_save_file_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16335 0 : NDR_PULL_SET_MEM_CTX(ndr, r->file_name, 0);
16336 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->file_name));
16337 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_file_name_0, 0);
16338 0 : if (ndr->offset > ndr->relative_highest_offset) {
16339 0 : ndr->relative_highest_offset = ndr->offset;
16340 : }
16341 0 : ndr->offset = _relative_save_offset;
16342 : }
16343 0 : ndr->flags = _flags_save_string;
16344 : }
16345 : }
16346 0 : return NDR_ERR_SUCCESS;
16347 : }
16348 :
16349 0 : static void ndr_print_flags_spoolss_DriverFileInfo(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverFileInfo *r)
16350 : {
16351 0 : ndr_print_spoolss_DriverFileInfo(ndr, name, r);
16352 0 : }
16353 :
16354 0 : _PUBLIC_ void ndr_print_spoolss_DriverFileInfo(struct ndr_print *ndr, const char *name, const struct spoolss_DriverFileInfo *r)
16355 : {
16356 0 : ndr_print_struct(ndr, name, "spoolss_DriverFileInfo");
16357 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16358 0 : ndr->depth++;
16359 : {
16360 0 : libndr_flags _flags_save_string = ndr->flags;
16361 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16362 0 : ndr_print_ptr(ndr, "file_name", r->file_name);
16363 0 : ndr->depth++;
16364 0 : if (r->file_name) {
16365 0 : ndr_print_string(ndr, "file_name", r->file_name);
16366 : }
16367 0 : ndr->depth--;
16368 0 : ndr->flags = _flags_save_string;
16369 : }
16370 0 : ndr_print_spoolss_DriverFileType(ndr, "file_type", r->file_type);
16371 0 : ndr_print_uint32(ndr, "file_version", r->file_version);
16372 0 : ndr->depth--;
16373 : }
16374 :
16375 0 : static void ndr_print_flags_spoolss_DriverInfo101(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverInfo101 *r)
16376 : {
16377 0 : ndr_print_spoolss_DriverInfo101(ndr, name, r);
16378 0 : }
16379 :
16380 0 : _PUBLIC_ void ndr_print_spoolss_DriverInfo101(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo101 *r)
16381 : {
16382 0 : uint32_t cntr_file_info_1;
16383 0 : ndr_print_struct(ndr, name, "spoolss_DriverInfo101");
16384 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16385 0 : ndr->depth++;
16386 0 : ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
16387 : {
16388 0 : libndr_flags _flags_save_string = ndr->flags;
16389 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16390 0 : ndr_print_ptr(ndr, "driver_name", r->driver_name);
16391 0 : ndr->depth++;
16392 0 : if (r->driver_name) {
16393 0 : ndr_print_string(ndr, "driver_name", r->driver_name);
16394 : }
16395 0 : ndr->depth--;
16396 0 : ndr->flags = _flags_save_string;
16397 : }
16398 : {
16399 0 : libndr_flags _flags_save_string = ndr->flags;
16400 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16401 0 : ndr_print_ptr(ndr, "architecture", r->architecture);
16402 0 : ndr->depth++;
16403 0 : if (r->architecture) {
16404 0 : ndr_print_string(ndr, "architecture", r->architecture);
16405 : }
16406 0 : ndr->depth--;
16407 0 : ndr->flags = _flags_save_string;
16408 : }
16409 : {
16410 0 : libndr_flags _flags_save_spoolss_DriverFileInfo = ndr->flags;
16411 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
16412 0 : ndr_print_ptr(ndr, "file_info", r->file_info);
16413 0 : ndr->depth++;
16414 0 : if (r->file_info) {
16415 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "file_info", (uint32_t)(r->file_count));
16416 0 : ndr->depth++;
16417 0 : for (cntr_file_info_1 = 0; cntr_file_info_1 < (r->file_count); cntr_file_info_1++) {
16418 0 : ndr_print_spoolss_DriverFileInfo(ndr, "file_info", &r->file_info[cntr_file_info_1]);
16419 : }
16420 0 : ndr->depth--;
16421 : }
16422 0 : ndr->depth--;
16423 0 : ndr->flags = _flags_save_spoolss_DriverFileInfo;
16424 : }
16425 0 : ndr_print_uint32(ndr, "file_count", r->file_count);
16426 : {
16427 0 : libndr_flags _flags_save_string = ndr->flags;
16428 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16429 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
16430 0 : ndr->depth++;
16431 0 : if (r->monitor_name) {
16432 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
16433 : }
16434 0 : ndr->depth--;
16435 0 : ndr->flags = _flags_save_string;
16436 : }
16437 : {
16438 0 : libndr_flags _flags_save_string = ndr->flags;
16439 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16440 0 : ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
16441 0 : ndr->depth++;
16442 0 : if (r->default_datatype) {
16443 0 : ndr_print_string(ndr, "default_datatype", r->default_datatype);
16444 : }
16445 0 : ndr->depth--;
16446 0 : ndr->flags = _flags_save_string;
16447 : }
16448 : {
16449 0 : libndr_flags _flags_save_string_array = ndr->flags;
16450 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16451 0 : ndr_print_ptr(ndr, "previous_names", r->previous_names);
16452 0 : ndr->depth++;
16453 0 : if (r->previous_names) {
16454 0 : ndr_print_string_array(ndr, "previous_names", r->previous_names);
16455 : }
16456 0 : ndr->depth--;
16457 0 : ndr->flags = _flags_save_string_array;
16458 : }
16459 0 : ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
16460 0 : ndr_print_hyper(ndr, "driver_version", r->driver_version);
16461 : {
16462 0 : libndr_flags _flags_save_string = ndr->flags;
16463 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16464 0 : ndr_print_ptr(ndr, "manufacturer_name", r->manufacturer_name);
16465 0 : ndr->depth++;
16466 0 : if (r->manufacturer_name) {
16467 0 : ndr_print_string(ndr, "manufacturer_name", r->manufacturer_name);
16468 : }
16469 0 : ndr->depth--;
16470 0 : ndr->flags = _flags_save_string;
16471 : }
16472 : {
16473 0 : libndr_flags _flags_save_string = ndr->flags;
16474 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16475 0 : ndr_print_ptr(ndr, "manufacturer_url", r->manufacturer_url);
16476 0 : ndr->depth++;
16477 0 : if (r->manufacturer_url) {
16478 0 : ndr_print_string(ndr, "manufacturer_url", r->manufacturer_url);
16479 : }
16480 0 : ndr->depth--;
16481 0 : ndr->flags = _flags_save_string;
16482 : }
16483 : {
16484 0 : libndr_flags _flags_save_string = ndr->flags;
16485 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16486 0 : ndr_print_ptr(ndr, "hardware_id", r->hardware_id);
16487 0 : ndr->depth++;
16488 0 : if (r->hardware_id) {
16489 0 : ndr_print_string(ndr, "hardware_id", r->hardware_id);
16490 : }
16491 0 : ndr->depth--;
16492 0 : ndr->flags = _flags_save_string;
16493 : }
16494 : {
16495 0 : libndr_flags _flags_save_string = ndr->flags;
16496 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16497 0 : ndr_print_ptr(ndr, "provider", r->provider);
16498 0 : ndr->depth++;
16499 0 : if (r->provider) {
16500 0 : ndr_print_string(ndr, "provider", r->provider);
16501 : }
16502 0 : ndr->depth--;
16503 0 : ndr->flags = _flags_save_string;
16504 : }
16505 0 : ndr->depth--;
16506 : }
16507 :
16508 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverInfo101(const struct spoolss_DriverInfo101 *r, libndr_flags flags)
16509 : {
16510 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo101);
16511 : }
16512 :
16513 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_DriverInfo *r)
16514 : {
16515 0 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
16516 0 : uint32_t level;
16517 : {
16518 0 : libndr_flags _flags_save_UNION = ndr->flags;
16519 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
16520 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
16521 0 : if (ndr_flags & NDR_SCALARS) {
16522 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
16523 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
16524 0 : NDR_CHECK(ndr_push_union_align(ndr, 8));
16525 0 : switch (level) {
16526 0 : case 1: {
16527 0 : NDR_CHECK(ndr_push_align(ndr, 5));
16528 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16529 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo1(ndr, NDR_SCALARS, &r->info1));
16530 0 : break; }
16531 :
16532 0 : case 2: {
16533 0 : NDR_CHECK(ndr_push_align(ndr, 5));
16534 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16535 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo2(ndr, NDR_SCALARS, &r->info2));
16536 0 : break; }
16537 :
16538 0 : case 3: {
16539 0 : NDR_CHECK(ndr_push_align(ndr, 5));
16540 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16541 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo3(ndr, NDR_SCALARS, &r->info3));
16542 0 : break; }
16543 :
16544 0 : case 4: {
16545 0 : NDR_CHECK(ndr_push_align(ndr, 5));
16546 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16547 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo4(ndr, NDR_SCALARS, &r->info4));
16548 0 : break; }
16549 :
16550 0 : case 5: {
16551 0 : NDR_CHECK(ndr_push_align(ndr, 5));
16552 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16553 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo5(ndr, NDR_SCALARS, &r->info5));
16554 0 : break; }
16555 :
16556 0 : case 6: {
16557 0 : NDR_CHECK(ndr_push_align(ndr, 8));
16558 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16559 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo6(ndr, NDR_SCALARS, &r->info6));
16560 0 : break; }
16561 :
16562 0 : case 7: {
16563 0 : NDR_CHECK(ndr_push_align(ndr, 5));
16564 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16565 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo7(ndr, NDR_SCALARS, &r->info7));
16566 0 : break; }
16567 :
16568 0 : case 8: {
16569 0 : NDR_CHECK(ndr_push_align(ndr, 8));
16570 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16571 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo8(ndr, NDR_SCALARS, &r->info8));
16572 0 : break; }
16573 :
16574 0 : case 101: {
16575 0 : NDR_CHECK(ndr_push_align(ndr, 8));
16576 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16577 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo101(ndr, NDR_SCALARS, &r->info101));
16578 0 : break; }
16579 :
16580 0 : default: {
16581 0 : break; }
16582 :
16583 : }
16584 : }
16585 0 : if (ndr_flags & NDR_BUFFERS) {
16586 0 : if (!(ndr_flags & NDR_SCALARS)) {
16587 : /* We didn't get it above, and the token is not needed after this. */
16588 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
16589 : }
16590 0 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
16591 0 : switch (level) {
16592 0 : case 1:
16593 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo1(ndr, NDR_BUFFERS, &r->info1));
16594 0 : break;
16595 :
16596 0 : case 2:
16597 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo2(ndr, NDR_BUFFERS, &r->info2));
16598 0 : break;
16599 :
16600 0 : case 3:
16601 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo3(ndr, NDR_BUFFERS, &r->info3));
16602 0 : break;
16603 :
16604 0 : case 4:
16605 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo4(ndr, NDR_BUFFERS, &r->info4));
16606 0 : break;
16607 :
16608 0 : case 5:
16609 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo5(ndr, NDR_BUFFERS, &r->info5));
16610 0 : break;
16611 :
16612 0 : case 6:
16613 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo6(ndr, NDR_BUFFERS, &r->info6));
16614 0 : break;
16615 :
16616 0 : case 7:
16617 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo7(ndr, NDR_BUFFERS, &r->info7));
16618 0 : break;
16619 :
16620 0 : case 8:
16621 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo8(ndr, NDR_BUFFERS, &r->info8));
16622 0 : break;
16623 :
16624 0 : case 101:
16625 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo101(ndr, NDR_BUFFERS, &r->info101));
16626 0 : break;
16627 :
16628 0 : default:
16629 0 : break;
16630 :
16631 : }
16632 : }
16633 0 : ndr->flags = _flags_save_UNION;
16634 : }
16635 0 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
16636 0 : return NDR_ERR_SUCCESS;
16637 : }
16638 :
16639 2 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_DriverInfo *r)
16640 : {
16641 2 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
16642 2 : uint32_t level;
16643 : {
16644 2 : libndr_flags _flags_save_UNION = ndr->flags;
16645 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
16646 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
16647 2 : if (ndr_flags & NDR_SCALARS) {
16648 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
16649 2 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
16650 2 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
16651 2 : switch (level) {
16652 0 : case 1: {
16653 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
16654 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16655 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo1(ndr, NDR_SCALARS, &r->info1));
16656 0 : break; }
16657 :
16658 0 : case 2: {
16659 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
16660 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16661 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo2(ndr, NDR_SCALARS, &r->info2));
16662 0 : break; }
16663 :
16664 0 : case 3: {
16665 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
16666 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16667 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo3(ndr, NDR_SCALARS, &r->info3));
16668 0 : break; }
16669 :
16670 0 : case 4: {
16671 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
16672 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16673 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo4(ndr, NDR_SCALARS, &r->info4));
16674 0 : break; }
16675 :
16676 0 : case 5: {
16677 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
16678 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16679 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo5(ndr, NDR_SCALARS, &r->info5));
16680 0 : break; }
16681 :
16682 2 : case 6: {
16683 2 : NDR_CHECK(ndr_pull_align(ndr, 8));
16684 2 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16685 2 : NDR_CHECK(ndr_pull_spoolss_DriverInfo6(ndr, NDR_SCALARS, &r->info6));
16686 0 : break; }
16687 :
16688 0 : case 7: {
16689 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
16690 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16691 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo7(ndr, NDR_SCALARS, &r->info7));
16692 0 : break; }
16693 :
16694 0 : case 8: {
16695 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
16696 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16697 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo8(ndr, NDR_SCALARS, &r->info8));
16698 0 : break; }
16699 :
16700 0 : case 101: {
16701 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
16702 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16703 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo101(ndr, NDR_SCALARS, &r->info101));
16704 0 : break; }
16705 :
16706 0 : default: {
16707 0 : break; }
16708 :
16709 : }
16710 : }
16711 2 : if (ndr_flags & NDR_BUFFERS) {
16712 2 : if (!(ndr_flags & NDR_SCALARS)) {
16713 : /* We didn't get it above, and the token is not needed after this. */
16714 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
16715 : }
16716 2 : switch (level) {
16717 0 : case 1:
16718 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
16719 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo1(ndr, NDR_BUFFERS, &r->info1));
16720 0 : break;
16721 :
16722 0 : case 2:
16723 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
16724 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo2(ndr, NDR_BUFFERS, &r->info2));
16725 0 : break;
16726 :
16727 0 : case 3:
16728 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
16729 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo3(ndr, NDR_BUFFERS, &r->info3));
16730 0 : break;
16731 :
16732 0 : case 4:
16733 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
16734 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo4(ndr, NDR_BUFFERS, &r->info4));
16735 0 : break;
16736 :
16737 0 : case 5:
16738 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
16739 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo5(ndr, NDR_BUFFERS, &r->info5));
16740 0 : break;
16741 :
16742 2 : case 6:
16743 2 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
16744 2 : NDR_CHECK(ndr_pull_spoolss_DriverInfo6(ndr, NDR_BUFFERS, &r->info6));
16745 0 : break;
16746 :
16747 0 : case 7:
16748 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
16749 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo7(ndr, NDR_BUFFERS, &r->info7));
16750 0 : break;
16751 :
16752 0 : case 8:
16753 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
16754 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo8(ndr, NDR_BUFFERS, &r->info8));
16755 0 : break;
16756 :
16757 0 : case 101:
16758 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
16759 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo101(ndr, NDR_BUFFERS, &r->info101));
16760 0 : break;
16761 :
16762 0 : default:
16763 0 : break;
16764 :
16765 : }
16766 : }
16767 2 : ndr->flags = _flags_save_UNION;
16768 : }
16769 2 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
16770 2 : return NDR_ERR_SUCCESS;
16771 : }
16772 :
16773 2 : _PUBLIC_ void ndr_print_spoolss_DriverInfo(struct ndr_print *ndr, const char *name, const union spoolss_DriverInfo *r)
16774 : {
16775 2 : uint32_t level;
16776 : {
16777 2 : libndr_flags _flags_save_UNION = ndr->flags;
16778 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
16779 2 : level = ndr_print_steal_switch_value(ndr, r);
16780 2 : ndr_print_union(ndr, name, level, "spoolss_DriverInfo");
16781 2 : switch (level) {
16782 0 : case 1:
16783 0 : ndr_print_spoolss_DriverInfo1(ndr, "info1", &r->info1);
16784 0 : break;
16785 :
16786 0 : case 2:
16787 0 : ndr_print_spoolss_DriverInfo2(ndr, "info2", &r->info2);
16788 0 : break;
16789 :
16790 0 : case 3:
16791 0 : ndr_print_spoolss_DriverInfo3(ndr, "info3", &r->info3);
16792 0 : break;
16793 :
16794 0 : case 4:
16795 0 : ndr_print_spoolss_DriverInfo4(ndr, "info4", &r->info4);
16796 0 : break;
16797 :
16798 0 : case 5:
16799 0 : ndr_print_spoolss_DriverInfo5(ndr, "info5", &r->info5);
16800 0 : break;
16801 :
16802 2 : case 6:
16803 2 : ndr_print_spoolss_DriverInfo6(ndr, "info6", &r->info6);
16804 2 : break;
16805 :
16806 0 : case 7:
16807 0 : ndr_print_spoolss_DriverInfo7(ndr, "info7", &r->info7);
16808 0 : break;
16809 :
16810 0 : case 8:
16811 0 : ndr_print_spoolss_DriverInfo8(ndr, "info8", &r->info8);
16812 0 : break;
16813 :
16814 0 : case 101:
16815 0 : ndr_print_spoolss_DriverInfo101(ndr, "info101", &r->info101);
16816 0 : break;
16817 :
16818 0 : default:
16819 0 : break;
16820 :
16821 : }
16822 2 : ndr->flags = _flags_save_UNION;
16823 : }
16824 2 : }
16825 :
16826 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverInfo(const union spoolss_DriverInfo *r, uint32_t level, libndr_flags flags)
16827 : {
16828 0 : flags |= LIBNDR_FLAG_RELATIVE_REVERSE;
16829 0 : return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo);
16830 : }
16831 :
16832 252 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverDirectoryInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DriverDirectoryInfo1 *r)
16833 : {
16834 252 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
16835 252 : if (ndr_flags & NDR_SCALARS) {
16836 252 : NDR_CHECK(ndr_push_align(ndr, 4));
16837 : {
16838 252 : libndr_flags _flags_save_string = ndr->flags;
16839 252 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16840 252 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->directory_name));
16841 252 : ndr->flags = _flags_save_string;
16842 : }
16843 252 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
16844 : }
16845 252 : if (ndr_flags & NDR_BUFFERS) {
16846 0 : }
16847 252 : return NDR_ERR_SUCCESS;
16848 : }
16849 :
16850 86 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverDirectoryInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DriverDirectoryInfo1 *r)
16851 : {
16852 86 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
16853 86 : if (ndr_flags & NDR_SCALARS) {
16854 86 : NDR_CHECK(ndr_pull_align(ndr, 4));
16855 : {
16856 86 : libndr_flags _flags_save_string = ndr->flags;
16857 86 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16858 86 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->directory_name));
16859 86 : ndr->flags = _flags_save_string;
16860 : }
16861 86 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
16862 : }
16863 86 : if (ndr_flags & NDR_BUFFERS) {
16864 2 : }
16865 86 : return NDR_ERR_SUCCESS;
16866 : }
16867 :
16868 0 : static void ndr_print_flags_spoolss_DriverDirectoryInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DriverDirectoryInfo1 *r)
16869 : {
16870 0 : ndr_print_spoolss_DriverDirectoryInfo1(ndr, name, r);
16871 0 : }
16872 :
16873 2 : _PUBLIC_ void ndr_print_spoolss_DriverDirectoryInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_DriverDirectoryInfo1 *r)
16874 : {
16875 2 : ndr_print_struct(ndr, name, "spoolss_DriverDirectoryInfo1");
16876 2 : if (r == NULL) { ndr_print_null(ndr); return; }
16877 2 : ndr->depth++;
16878 : {
16879 2 : libndr_flags _flags_save_string = ndr->flags;
16880 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16881 2 : ndr_print_string(ndr, "directory_name", r->directory_name);
16882 2 : ndr->flags = _flags_save_string;
16883 : }
16884 2 : ndr->depth--;
16885 : }
16886 :
16887 0 : _PUBLIC_ size_t ndr_size_spoolss_DriverDirectoryInfo1(const struct spoolss_DriverDirectoryInfo1 *r, libndr_flags flags)
16888 : {
16889 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverDirectoryInfo1);
16890 : }
16891 :
16892 252 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverDirectoryInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_DriverDirectoryInfo *r)
16893 : {
16894 252 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
16895 0 : uint32_t level;
16896 : {
16897 252 : libndr_flags _flags_save_UNION = ndr->flags;
16898 252 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
16899 252 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
16900 252 : if (ndr_flags & NDR_SCALARS) {
16901 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
16902 252 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
16903 252 : NDR_CHECK(ndr_push_union_align(ndr, 4));
16904 252 : switch (level) {
16905 228 : case 1: {
16906 228 : NDR_CHECK(ndr_push_align(ndr, 4));
16907 228 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16908 228 : NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
16909 228 : break; }
16910 :
16911 24 : default: {
16912 24 : NDR_CHECK(ndr_push_align(ndr, 4));
16913 24 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16914 24 : NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
16915 24 : break; }
16916 :
16917 : }
16918 : }
16919 252 : ndr->flags = _flags_save_UNION;
16920 : }
16921 252 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
16922 252 : return NDR_ERR_SUCCESS;
16923 : }
16924 :
16925 86 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverDirectoryInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_DriverDirectoryInfo *r)
16926 : {
16927 86 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
16928 2 : uint32_t level;
16929 : {
16930 86 : libndr_flags _flags_save_UNION = ndr->flags;
16931 86 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
16932 86 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
16933 86 : if (ndr_flags & NDR_SCALARS) {
16934 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
16935 86 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
16936 86 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
16937 86 : switch (level) {
16938 78 : case 1: {
16939 78 : NDR_CHECK(ndr_pull_align(ndr, 4));
16940 78 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16941 78 : NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
16942 76 : break; }
16943 :
16944 8 : default: {
16945 8 : NDR_CHECK(ndr_pull_align(ndr, 4));
16946 8 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16947 8 : NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
16948 8 : break; }
16949 :
16950 : }
16951 : }
16952 86 : ndr->flags = _flags_save_UNION;
16953 : }
16954 86 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
16955 86 : return NDR_ERR_SUCCESS;
16956 : }
16957 :
16958 2 : _PUBLIC_ void ndr_print_spoolss_DriverDirectoryInfo(struct ndr_print *ndr, const char *name, const union spoolss_DriverDirectoryInfo *r)
16959 : {
16960 2 : uint32_t level;
16961 : {
16962 2 : libndr_flags _flags_save_UNION = ndr->flags;
16963 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
16964 2 : level = ndr_print_steal_switch_value(ndr, r);
16965 2 : ndr_print_union(ndr, name, level, "spoolss_DriverDirectoryInfo");
16966 2 : switch (level) {
16967 2 : case 1:
16968 2 : ndr_print_spoolss_DriverDirectoryInfo1(ndr, "info1", &r->info1);
16969 2 : break;
16970 :
16971 0 : default:
16972 0 : ndr_print_spoolss_DriverDirectoryInfo1(ndr, "info1", &r->info1);
16973 0 : break;
16974 :
16975 : }
16976 2 : ndr->flags = _flags_save_UNION;
16977 : }
16978 2 : }
16979 :
16980 168 : _PUBLIC_ size_t ndr_size_spoolss_DriverDirectoryInfo(const union spoolss_DriverDirectoryInfo *r, uint32_t level, libndr_flags flags)
16981 : {
16982 168 : flags |= LIBNDR_FLAG_RELATIVE_REVERSE;
16983 168 : return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverDirectoryInfo);
16984 : }
16985 :
16986 72 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrintProcessorInfo1 *r)
16987 : {
16988 72 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
16989 72 : if (ndr_flags & NDR_SCALARS) {
16990 36 : NDR_CHECK(ndr_push_align(ndr, 5));
16991 : {
16992 36 : libndr_flags _flags_save_string = ndr->flags;
16993 36 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
16994 36 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor_name));
16995 36 : ndr->flags = _flags_save_string;
16996 : }
16997 36 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
16998 : }
16999 72 : if (ndr_flags & NDR_BUFFERS) {
17000 : {
17001 36 : libndr_flags _flags_save_string = ndr->flags;
17002 36 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17003 36 : if (r->print_processor_name) {
17004 36 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->print_processor_name));
17005 36 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->print_processor_name));
17006 36 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->print_processor_name));
17007 : }
17008 36 : ndr->flags = _flags_save_string;
17009 : }
17010 : }
17011 72 : return NDR_ERR_SUCCESS;
17012 : }
17013 :
17014 24 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrintProcessorInfo1 *r)
17015 : {
17016 0 : uint32_t _ptr_print_processor_name;
17017 24 : TALLOC_CTX *_mem_save_print_processor_name_0 = NULL;
17018 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
17019 24 : if (ndr_flags & NDR_SCALARS) {
17020 12 : NDR_CHECK(ndr_pull_align(ndr, 5));
17021 : {
17022 12 : libndr_flags _flags_save_string = ndr->flags;
17023 12 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17024 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor_name));
17025 12 : if (_ptr_print_processor_name) {
17026 12 : NDR_PULL_ALLOC(ndr, r->print_processor_name);
17027 12 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->print_processor_name, _ptr_print_processor_name));
17028 : } else {
17029 0 : r->print_processor_name = NULL;
17030 : }
17031 12 : ndr->flags = _flags_save_string;
17032 : }
17033 12 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
17034 : }
17035 24 : if (ndr_flags & NDR_BUFFERS) {
17036 : {
17037 12 : libndr_flags _flags_save_string = ndr->flags;
17038 12 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17039 12 : if (r->print_processor_name) {
17040 0 : uint32_t _relative_save_offset;
17041 12 : _relative_save_offset = ndr->offset;
17042 12 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->print_processor_name));
17043 12 : _mem_save_print_processor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17044 12 : NDR_PULL_SET_MEM_CTX(ndr, r->print_processor_name, 0);
17045 12 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->print_processor_name));
17046 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_name_0, 0);
17047 12 : if (ndr->offset > ndr->relative_highest_offset) {
17048 12 : ndr->relative_highest_offset = ndr->offset;
17049 : }
17050 12 : ndr->offset = _relative_save_offset;
17051 : }
17052 12 : ndr->flags = _flags_save_string;
17053 : }
17054 : }
17055 24 : return NDR_ERR_SUCCESS;
17056 : }
17057 :
17058 0 : static void ndr_print_flags_spoolss_PrintProcessorInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrintProcessorInfo1 *r)
17059 : {
17060 0 : ndr_print_spoolss_PrintProcessorInfo1(ndr, name, r);
17061 0 : }
17062 :
17063 0 : _PUBLIC_ void ndr_print_spoolss_PrintProcessorInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcessorInfo1 *r)
17064 : {
17065 0 : ndr_print_struct(ndr, name, "spoolss_PrintProcessorInfo1");
17066 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17067 0 : ndr->depth++;
17068 : {
17069 0 : libndr_flags _flags_save_string = ndr->flags;
17070 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17071 0 : ndr_print_ptr(ndr, "print_processor_name", r->print_processor_name);
17072 0 : ndr->depth++;
17073 0 : if (r->print_processor_name) {
17074 0 : ndr_print_string(ndr, "print_processor_name", r->print_processor_name);
17075 : }
17076 0 : ndr->depth--;
17077 0 : ndr->flags = _flags_save_string;
17078 : }
17079 0 : ndr->depth--;
17080 : }
17081 :
17082 0 : _PUBLIC_ size_t ndr_size_spoolss_PrintProcessorInfo1(const struct spoolss_PrintProcessorInfo1 *r, libndr_flags flags)
17083 : {
17084 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcessorInfo1);
17085 : }
17086 :
17087 72 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_PrintProcessorInfo *r)
17088 : {
17089 72 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
17090 0 : uint32_t level;
17091 : {
17092 72 : libndr_flags _flags_save_UNION = ndr->flags;
17093 72 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
17094 72 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
17095 72 : if (ndr_flags & NDR_SCALARS) {
17096 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
17097 36 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
17098 36 : NDR_CHECK(ndr_push_union_align(ndr, 5));
17099 36 : switch (level) {
17100 36 : case 1: {
17101 36 : NDR_CHECK(ndr_push_align(ndr, 5));
17102 36 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
17103 36 : NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo1(ndr, NDR_SCALARS, &r->info1));
17104 36 : break; }
17105 :
17106 0 : default: {
17107 0 : break; }
17108 :
17109 : }
17110 : }
17111 72 : if (ndr_flags & NDR_BUFFERS) {
17112 36 : if (!(ndr_flags & NDR_SCALARS)) {
17113 : /* We didn't get it above, and the token is not needed after this. */
17114 36 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
17115 : }
17116 36 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
17117 36 : switch (level) {
17118 36 : case 1:
17119 36 : NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo1(ndr, NDR_BUFFERS, &r->info1));
17120 36 : break;
17121 :
17122 0 : default:
17123 0 : break;
17124 :
17125 : }
17126 : }
17127 72 : ndr->flags = _flags_save_UNION;
17128 : }
17129 72 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
17130 72 : return NDR_ERR_SUCCESS;
17131 : }
17132 :
17133 24 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_PrintProcessorInfo *r)
17134 : {
17135 24 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
17136 0 : uint32_t level;
17137 : {
17138 24 : libndr_flags _flags_save_UNION = ndr->flags;
17139 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
17140 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
17141 24 : if (ndr_flags & NDR_SCALARS) {
17142 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
17143 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
17144 12 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
17145 12 : switch (level) {
17146 12 : case 1: {
17147 12 : NDR_CHECK(ndr_pull_align(ndr, 5));
17148 12 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
17149 12 : NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo1(ndr, NDR_SCALARS, &r->info1));
17150 12 : break; }
17151 :
17152 0 : default: {
17153 0 : break; }
17154 :
17155 : }
17156 : }
17157 24 : if (ndr_flags & NDR_BUFFERS) {
17158 12 : if (!(ndr_flags & NDR_SCALARS)) {
17159 : /* We didn't get it above, and the token is not needed after this. */
17160 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
17161 : }
17162 12 : switch (level) {
17163 12 : case 1:
17164 12 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
17165 12 : NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo1(ndr, NDR_BUFFERS, &r->info1));
17166 12 : break;
17167 :
17168 0 : default:
17169 0 : break;
17170 :
17171 : }
17172 : }
17173 24 : ndr->flags = _flags_save_UNION;
17174 : }
17175 24 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
17176 24 : return NDR_ERR_SUCCESS;
17177 : }
17178 :
17179 0 : _PUBLIC_ void ndr_print_spoolss_PrintProcessorInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcessorInfo *r)
17180 : {
17181 0 : uint32_t level;
17182 : {
17183 0 : libndr_flags _flags_save_UNION = ndr->flags;
17184 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
17185 0 : level = ndr_print_steal_switch_value(ndr, r);
17186 0 : ndr_print_union(ndr, name, level, "spoolss_PrintProcessorInfo");
17187 0 : switch (level) {
17188 0 : case 1:
17189 0 : ndr_print_spoolss_PrintProcessorInfo1(ndr, "info1", &r->info1);
17190 0 : break;
17191 :
17192 0 : default:
17193 0 : break;
17194 :
17195 : }
17196 0 : ndr->flags = _flags_save_UNION;
17197 : }
17198 0 : }
17199 :
17200 60 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorDirectoryInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrintProcessorDirectoryInfo1 *r)
17201 : {
17202 60 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
17203 60 : if (ndr_flags & NDR_SCALARS) {
17204 60 : NDR_CHECK(ndr_push_align(ndr, 4));
17205 : {
17206 60 : libndr_flags _flags_save_string = ndr->flags;
17207 60 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17208 60 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->directory_name));
17209 60 : ndr->flags = _flags_save_string;
17210 : }
17211 60 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
17212 : }
17213 60 : if (ndr_flags & NDR_BUFFERS) {
17214 0 : }
17215 60 : return NDR_ERR_SUCCESS;
17216 : }
17217 :
17218 20 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorDirectoryInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrintProcessorDirectoryInfo1 *r)
17219 : {
17220 20 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
17221 20 : if (ndr_flags & NDR_SCALARS) {
17222 20 : NDR_CHECK(ndr_pull_align(ndr, 4));
17223 : {
17224 20 : libndr_flags _flags_save_string = ndr->flags;
17225 20 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17226 20 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->directory_name));
17227 20 : ndr->flags = _flags_save_string;
17228 : }
17229 20 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
17230 : }
17231 20 : if (ndr_flags & NDR_BUFFERS) {
17232 0 : }
17233 20 : return NDR_ERR_SUCCESS;
17234 : }
17235 :
17236 0 : static void ndr_print_flags_spoolss_PrintProcessorDirectoryInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrintProcessorDirectoryInfo1 *r)
17237 : {
17238 0 : ndr_print_spoolss_PrintProcessorDirectoryInfo1(ndr, name, r);
17239 0 : }
17240 :
17241 0 : _PUBLIC_ void ndr_print_spoolss_PrintProcessorDirectoryInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcessorDirectoryInfo1 *r)
17242 : {
17243 0 : ndr_print_struct(ndr, name, "spoolss_PrintProcessorDirectoryInfo1");
17244 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17245 0 : ndr->depth++;
17246 : {
17247 0 : libndr_flags _flags_save_string = ndr->flags;
17248 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17249 0 : ndr_print_string(ndr, "directory_name", r->directory_name);
17250 0 : ndr->flags = _flags_save_string;
17251 : }
17252 0 : ndr->depth--;
17253 : }
17254 :
17255 0 : _PUBLIC_ size_t ndr_size_spoolss_PrintProcessorDirectoryInfo1(const struct spoolss_PrintProcessorDirectoryInfo1 *r, libndr_flags flags)
17256 : {
17257 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcessorDirectoryInfo1);
17258 : }
17259 :
17260 60 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorDirectoryInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_PrintProcessorDirectoryInfo *r)
17261 : {
17262 60 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
17263 0 : uint32_t level;
17264 : {
17265 60 : libndr_flags _flags_save_UNION = ndr->flags;
17266 60 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
17267 60 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
17268 60 : if (ndr_flags & NDR_SCALARS) {
17269 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
17270 60 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
17271 60 : NDR_CHECK(ndr_push_union_align(ndr, 4));
17272 60 : switch (level) {
17273 36 : case 1: {
17274 36 : NDR_CHECK(ndr_push_align(ndr, 4));
17275 36 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
17276 36 : NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
17277 36 : break; }
17278 :
17279 24 : default: {
17280 24 : NDR_CHECK(ndr_push_align(ndr, 4));
17281 24 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
17282 24 : NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
17283 24 : break; }
17284 :
17285 : }
17286 : }
17287 60 : ndr->flags = _flags_save_UNION;
17288 : }
17289 60 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
17290 60 : return NDR_ERR_SUCCESS;
17291 : }
17292 :
17293 20 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorDirectoryInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_PrintProcessorDirectoryInfo *r)
17294 : {
17295 20 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
17296 0 : uint32_t level;
17297 : {
17298 20 : libndr_flags _flags_save_UNION = ndr->flags;
17299 20 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
17300 20 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
17301 20 : if (ndr_flags & NDR_SCALARS) {
17302 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
17303 20 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
17304 20 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
17305 20 : switch (level) {
17306 12 : case 1: {
17307 12 : NDR_CHECK(ndr_pull_align(ndr, 4));
17308 12 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
17309 12 : NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
17310 12 : break; }
17311 :
17312 8 : default: {
17313 8 : NDR_CHECK(ndr_pull_align(ndr, 4));
17314 8 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
17315 8 : NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
17316 8 : break; }
17317 :
17318 : }
17319 : }
17320 20 : ndr->flags = _flags_save_UNION;
17321 : }
17322 20 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
17323 20 : return NDR_ERR_SUCCESS;
17324 : }
17325 :
17326 0 : _PUBLIC_ void ndr_print_spoolss_PrintProcessorDirectoryInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcessorDirectoryInfo *r)
17327 : {
17328 0 : uint32_t level;
17329 : {
17330 0 : libndr_flags _flags_save_UNION = ndr->flags;
17331 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
17332 0 : level = ndr_print_steal_switch_value(ndr, r);
17333 0 : ndr_print_union(ndr, name, level, "spoolss_PrintProcessorDirectoryInfo");
17334 0 : switch (level) {
17335 0 : case 1:
17336 0 : ndr_print_spoolss_PrintProcessorDirectoryInfo1(ndr, "info1", &r->info1);
17337 0 : break;
17338 :
17339 0 : default:
17340 0 : ndr_print_spoolss_PrintProcessorDirectoryInfo1(ndr, "info1", &r->info1);
17341 0 : break;
17342 :
17343 : }
17344 0 : ndr->flags = _flags_save_UNION;
17345 : }
17346 0 : }
17347 :
17348 40 : _PUBLIC_ size_t ndr_size_spoolss_PrintProcessorDirectoryInfo(const union spoolss_PrintProcessorDirectoryInfo *r, uint32_t level, libndr_flags flags)
17349 : {
17350 40 : flags |= LIBNDR_FLAG_RELATIVE_REVERSE;
17351 40 : return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcessorDirectoryInfo);
17352 : }
17353 :
17354 668 : static enum ndr_err_code ndr_push_spoolss_DocumentInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DocumentInfo1 *r)
17355 : {
17356 668 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
17357 668 : if (ndr_flags & NDR_SCALARS) {
17358 668 : NDR_CHECK(ndr_push_align(ndr, 5));
17359 668 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
17360 668 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->output_file));
17361 668 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->datatype));
17362 668 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
17363 : }
17364 668 : if (ndr_flags & NDR_BUFFERS) {
17365 668 : if (r->document_name) {
17366 668 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
17367 668 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17368 668 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
17369 668 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17370 : }
17371 668 : if (r->output_file) {
17372 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->output_file, CH_UTF16)));
17373 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17374 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->output_file, CH_UTF16)));
17375 28 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->output_file, ndr_charset_length(r->output_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17376 : }
17377 668 : if (r->datatype) {
17378 668 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->datatype, CH_UTF16)));
17379 668 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17380 668 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->datatype, CH_UTF16)));
17381 668 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->datatype, ndr_charset_length(r->datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17382 : }
17383 : }
17384 668 : return NDR_ERR_SUCCESS;
17385 : }
17386 :
17387 668 : static enum ndr_err_code ndr_pull_spoolss_DocumentInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DocumentInfo1 *r)
17388 : {
17389 0 : uint32_t _ptr_document_name;
17390 668 : uint32_t size_document_name_1 = 0;
17391 668 : uint32_t length_document_name_1 = 0;
17392 668 : TALLOC_CTX *_mem_save_document_name_0 = NULL;
17393 0 : uint32_t _ptr_output_file;
17394 668 : uint32_t size_output_file_1 = 0;
17395 668 : uint32_t length_output_file_1 = 0;
17396 668 : TALLOC_CTX *_mem_save_output_file_0 = NULL;
17397 0 : uint32_t _ptr_datatype;
17398 668 : uint32_t size_datatype_1 = 0;
17399 668 : uint32_t length_datatype_1 = 0;
17400 668 : TALLOC_CTX *_mem_save_datatype_0 = NULL;
17401 668 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
17402 668 : if (ndr_flags & NDR_SCALARS) {
17403 668 : NDR_CHECK(ndr_pull_align(ndr, 5));
17404 668 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
17405 668 : if (_ptr_document_name) {
17406 668 : NDR_PULL_ALLOC(ndr, r->document_name);
17407 : } else {
17408 0 : r->document_name = NULL;
17409 : }
17410 668 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_output_file));
17411 668 : if (_ptr_output_file) {
17412 28 : NDR_PULL_ALLOC(ndr, r->output_file);
17413 : } else {
17414 640 : r->output_file = NULL;
17415 : }
17416 668 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
17417 668 : if (_ptr_datatype) {
17418 668 : NDR_PULL_ALLOC(ndr, r->datatype);
17419 : } else {
17420 0 : r->datatype = NULL;
17421 : }
17422 668 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
17423 : }
17424 668 : if (ndr_flags & NDR_BUFFERS) {
17425 668 : if (r->document_name) {
17426 668 : _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17427 668 : NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
17428 668 : NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
17429 668 : NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
17430 668 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->document_name, &size_document_name_1));
17431 668 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->document_name, &length_document_name_1));
17432 668 : if (length_document_name_1 > size_document_name_1) {
17433 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_document_name_1, length_document_name_1);
17434 : }
17435 668 : NDR_CHECK(ndr_check_string_terminator(ndr, length_document_name_1, sizeof(uint16_t)));
17436 668 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, length_document_name_1, sizeof(uint16_t), CH_UTF16));
17437 668 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
17438 : }
17439 668 : if (r->output_file) {
17440 28 : _mem_save_output_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
17441 28 : NDR_PULL_SET_MEM_CTX(ndr, r->output_file, 0);
17442 28 : NDR_CHECK(ndr_pull_array_size(ndr, &r->output_file));
17443 28 : NDR_CHECK(ndr_pull_array_length(ndr, &r->output_file));
17444 28 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->output_file, &size_output_file_1));
17445 28 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->output_file, &length_output_file_1));
17446 28 : if (length_output_file_1 > size_output_file_1) {
17447 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_output_file_1, length_output_file_1);
17448 : }
17449 28 : NDR_CHECK(ndr_check_string_terminator(ndr, length_output_file_1, sizeof(uint16_t)));
17450 28 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->output_file, length_output_file_1, sizeof(uint16_t), CH_UTF16));
17451 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_output_file_0, 0);
17452 : }
17453 668 : if (r->datatype) {
17454 668 : _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17455 668 : NDR_PULL_SET_MEM_CTX(ndr, r->datatype, 0);
17456 668 : NDR_CHECK(ndr_pull_array_size(ndr, &r->datatype));
17457 668 : NDR_CHECK(ndr_pull_array_length(ndr, &r->datatype));
17458 668 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->datatype, &size_datatype_1));
17459 668 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->datatype, &length_datatype_1));
17460 668 : if (length_datatype_1 > size_datatype_1) {
17461 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_datatype_1, length_datatype_1);
17462 : }
17463 668 : NDR_CHECK(ndr_check_string_terminator(ndr, length_datatype_1, sizeof(uint16_t)));
17464 668 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->datatype, length_datatype_1, sizeof(uint16_t), CH_UTF16));
17465 668 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
17466 : }
17467 : }
17468 668 : return NDR_ERR_SUCCESS;
17469 : }
17470 :
17471 0 : _PUBLIC_ void ndr_print_spoolss_DocumentInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_DocumentInfo1 *r)
17472 : {
17473 0 : ndr_print_struct(ndr, name, "spoolss_DocumentInfo1");
17474 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17475 0 : ndr->depth++;
17476 0 : ndr_print_ptr(ndr, "document_name", r->document_name);
17477 0 : ndr->depth++;
17478 0 : if (r->document_name) {
17479 0 : ndr_print_string(ndr, "document_name", r->document_name);
17480 : }
17481 0 : ndr->depth--;
17482 0 : ndr_print_ptr(ndr, "output_file", r->output_file);
17483 0 : ndr->depth++;
17484 0 : if (r->output_file) {
17485 0 : ndr_print_string(ndr, "output_file", r->output_file);
17486 : }
17487 0 : ndr->depth--;
17488 0 : ndr_print_ptr(ndr, "datatype", r->datatype);
17489 0 : ndr->depth++;
17490 0 : if (r->datatype) {
17491 0 : ndr_print_string(ndr, "datatype", r->datatype);
17492 : }
17493 0 : ndr->depth--;
17494 0 : ndr->depth--;
17495 : }
17496 :
17497 1336 : static enum ndr_err_code ndr_push_spoolss_DocumentInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_DocumentInfo *r)
17498 : {
17499 0 : uint32_t level;
17500 1336 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
17501 1336 : if (ndr_flags & NDR_SCALARS) {
17502 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
17503 668 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
17504 668 : NDR_CHECK(ndr_push_union_align(ndr, 5));
17505 668 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
17506 : /* ms_union is always aligned to the largest union arm*/
17507 668 : NDR_CHECK(ndr_push_align(ndr, 5));
17508 668 : switch (level) {
17509 668 : case 1: {
17510 668 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
17511 668 : break; }
17512 :
17513 0 : case 2: {
17514 0 : break; }
17515 :
17516 0 : case 3: {
17517 0 : break; }
17518 :
17519 0 : default: {
17520 0 : break; }
17521 :
17522 : }
17523 : }
17524 1336 : if (ndr_flags & NDR_BUFFERS) {
17525 668 : if (!(ndr_flags & NDR_SCALARS)) {
17526 : /* We didn't get it above, and the token is not needed after this. */
17527 668 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
17528 : }
17529 668 : switch (level) {
17530 668 : case 1:
17531 668 : if (r->info1) {
17532 668 : NDR_CHECK(ndr_push_spoolss_DocumentInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
17533 : }
17534 668 : break;
17535 :
17536 0 : case 2:
17537 0 : break;
17538 :
17539 0 : case 3:
17540 0 : break;
17541 :
17542 0 : default:
17543 0 : break;
17544 :
17545 : }
17546 : }
17547 1336 : return NDR_ERR_SUCCESS;
17548 : }
17549 :
17550 1336 : static enum ndr_err_code ndr_pull_spoolss_DocumentInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_DocumentInfo *r)
17551 : {
17552 0 : uint32_t level;
17553 0 : uint32_t _level;
17554 1336 : TALLOC_CTX *_mem_save_info1_0 = NULL;
17555 0 : uint32_t _ptr_info1;
17556 1336 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
17557 1336 : if (ndr_flags & NDR_SCALARS) {
17558 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
17559 668 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
17560 668 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
17561 668 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
17562 668 : if (_level != level) {
17563 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
17564 : }
17565 : /* ms_union is always aligned to the largest union arm*/
17566 668 : NDR_CHECK(ndr_pull_align(ndr, 5));
17567 668 : switch (level) {
17568 668 : case 1: {
17569 668 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
17570 668 : if (_ptr_info1) {
17571 668 : NDR_PULL_ALLOC(ndr, r->info1);
17572 : } else {
17573 0 : r->info1 = NULL;
17574 : }
17575 668 : break; }
17576 :
17577 0 : case 2: {
17578 0 : break; }
17579 :
17580 0 : case 3: {
17581 0 : break; }
17582 :
17583 0 : default: {
17584 0 : break; }
17585 :
17586 : }
17587 : }
17588 1336 : if (ndr_flags & NDR_BUFFERS) {
17589 668 : if (!(ndr_flags & NDR_SCALARS)) {
17590 : /* We didn't get it above, and the token is not needed after this. */
17591 668 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
17592 : }
17593 668 : switch (level) {
17594 668 : case 1:
17595 668 : if (r->info1) {
17596 668 : _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
17597 668 : NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
17598 668 : NDR_CHECK(ndr_pull_spoolss_DocumentInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
17599 668 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
17600 : }
17601 668 : break;
17602 :
17603 0 : case 2:
17604 0 : break;
17605 :
17606 0 : case 3:
17607 0 : break;
17608 :
17609 0 : default:
17610 0 : break;
17611 :
17612 : }
17613 : }
17614 1336 : return NDR_ERR_SUCCESS;
17615 : }
17616 :
17617 0 : _PUBLIC_ void ndr_print_spoolss_DocumentInfo(struct ndr_print *ndr, const char *name, const union spoolss_DocumentInfo *r)
17618 : {
17619 0 : uint32_t level;
17620 0 : level = ndr_print_steal_switch_value(ndr, r);
17621 0 : ndr_print_union(ndr, name, level, "spoolss_DocumentInfo");
17622 0 : switch (level) {
17623 0 : case 1:
17624 0 : ndr_print_ptr(ndr, "info1", r->info1);
17625 0 : ndr->depth++;
17626 0 : if (r->info1) {
17627 0 : ndr_print_spoolss_DocumentInfo1(ndr, "info1", r->info1);
17628 : }
17629 0 : ndr->depth--;
17630 0 : break;
17631 :
17632 0 : case 2:
17633 0 : break;
17634 :
17635 0 : case 3:
17636 0 : break;
17637 :
17638 0 : default:
17639 0 : break;
17640 :
17641 : }
17642 0 : }
17643 :
17644 668 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DocumentInfoCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_DocumentInfoCtr *r)
17645 : {
17646 668 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
17647 668 : if (ndr_flags & NDR_SCALARS) {
17648 668 : NDR_CHECK(ndr_push_align(ndr, 5));
17649 668 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
17650 668 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
17651 668 : NDR_CHECK(ndr_push_spoolss_DocumentInfo(ndr, NDR_SCALARS, &r->info));
17652 668 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
17653 : }
17654 668 : if (ndr_flags & NDR_BUFFERS) {
17655 668 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
17656 668 : NDR_CHECK(ndr_push_spoolss_DocumentInfo(ndr, NDR_BUFFERS, &r->info));
17657 : }
17658 668 : return NDR_ERR_SUCCESS;
17659 : }
17660 :
17661 668 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DocumentInfoCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_DocumentInfoCtr *r)
17662 : {
17663 668 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
17664 668 : if (ndr_flags & NDR_SCALARS) {
17665 668 : NDR_CHECK(ndr_pull_align(ndr, 5));
17666 668 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
17667 668 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
17668 668 : NDR_CHECK(ndr_pull_spoolss_DocumentInfo(ndr, NDR_SCALARS, &r->info));
17669 668 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
17670 : }
17671 668 : if (ndr_flags & NDR_BUFFERS) {
17672 668 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
17673 668 : NDR_CHECK(ndr_pull_spoolss_DocumentInfo(ndr, NDR_BUFFERS, &r->info));
17674 : }
17675 668 : return NDR_ERR_SUCCESS;
17676 : }
17677 :
17678 0 : static void ndr_print_flags_spoolss_DocumentInfoCtr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_DocumentInfoCtr *r)
17679 : {
17680 0 : ndr_print_spoolss_DocumentInfoCtr(ndr, name, r);
17681 0 : }
17682 :
17683 0 : _PUBLIC_ void ndr_print_spoolss_DocumentInfoCtr(struct ndr_print *ndr, const char *name, const struct spoolss_DocumentInfoCtr *r)
17684 : {
17685 0 : ndr_print_struct(ndr, name, "spoolss_DocumentInfoCtr");
17686 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17687 0 : ndr->depth++;
17688 0 : ndr_print_uint32(ndr, "level", r->level);
17689 0 : ndr_print_set_switch_value(ndr, &r->info, r->level);
17690 0 : ndr_print_spoolss_DocumentInfo(ndr, "info", &r->info);
17691 0 : ndr->depth--;
17692 : }
17693 :
17694 80 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OSVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_OSVersion *r)
17695 : {
17696 80 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
17697 80 : if (ndr_flags & NDR_SCALARS) {
17698 80 : NDR_CHECK(ndr_push_align(ndr, 4));
17699 80 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_OSVersion(r, ndr->flags)));
17700 80 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->major));
17701 80 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minor));
17702 80 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->build));
17703 80 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
17704 : {
17705 80 : libndr_flags _flags_save_string = ndr->flags;
17706 80 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17707 : {
17708 0 : struct ndr_push *_ndr_extra_string;
17709 80 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_extra_string, 0, 256));
17710 80 : NDR_CHECK(ndr_push_string(_ndr_extra_string, NDR_SCALARS, r->extra_string));
17711 80 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_extra_string, 0, 256));
17712 : }
17713 80 : ndr->flags = _flags_save_string;
17714 : }
17715 80 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
17716 : }
17717 80 : if (ndr_flags & NDR_BUFFERS) {
17718 0 : }
17719 80 : return NDR_ERR_SUCCESS;
17720 : }
17721 :
17722 8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_OSVersion *r)
17723 : {
17724 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
17725 8 : if (ndr_flags & NDR_SCALARS) {
17726 8 : NDR_CHECK(ndr_pull_align(ndr, 4));
17727 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
17728 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->major));
17729 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minor));
17730 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build));
17731 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->platform_id));
17732 : {
17733 8 : libndr_flags _flags_save_string = ndr->flags;
17734 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17735 : {
17736 0 : struct ndr_pull *_ndr_extra_string;
17737 8 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_extra_string, 0, 256));
17738 8 : NDR_CHECK(ndr_pull_string(_ndr_extra_string, NDR_SCALARS, &r->extra_string));
17739 8 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_extra_string, 0, 256));
17740 : }
17741 8 : ndr->flags = _flags_save_string;
17742 : }
17743 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
17744 : }
17745 8 : if (ndr_flags & NDR_BUFFERS) {
17746 0 : }
17747 8 : return NDR_ERR_SUCCESS;
17748 : }
17749 :
17750 0 : static void ndr_print_flags_spoolss_OSVersion(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_OSVersion *r)
17751 : {
17752 0 : ndr_print_spoolss_OSVersion(ndr, name, r);
17753 0 : }
17754 :
17755 0 : _PUBLIC_ void ndr_print_spoolss_OSVersion(struct ndr_print *ndr, const char *name, const struct spoolss_OSVersion *r)
17756 : {
17757 0 : ndr_print_struct(ndr, name, "spoolss_OSVersion");
17758 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17759 0 : ndr->depth++;
17760 0 : ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_OSVersion(r, ndr->flags):r->_ndr_size);
17761 0 : ndr_print_uint32(ndr, "major", r->major);
17762 0 : ndr_print_uint32(ndr, "minor", r->minor);
17763 0 : ndr_print_uint32(ndr, "build", r->build);
17764 0 : ndr_print_uint32(ndr, "platform_id", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->platform_id);
17765 : {
17766 0 : libndr_flags _flags_save_string = ndr->flags;
17767 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17768 0 : ndr_print_string(ndr, "extra_string", r->extra_string);
17769 0 : ndr->flags = _flags_save_string;
17770 : }
17771 0 : ndr->depth--;
17772 : }
17773 :
17774 80 : _PUBLIC_ size_t ndr_size_spoolss_OSVersion(const struct spoolss_OSVersion *r, libndr_flags flags)
17775 : {
17776 80 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_OSVersion);
17777 : }
17778 :
17779 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OSVersionEx(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_OSVersionEx *r)
17780 : {
17781 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
17782 0 : if (ndr_flags & NDR_SCALARS) {
17783 0 : NDR_CHECK(ndr_push_align(ndr, 4));
17784 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_OSVersionEx(r, ndr->flags)));
17785 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->major));
17786 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minor));
17787 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->build));
17788 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
17789 : {
17790 0 : libndr_flags _flags_save_string = ndr->flags;
17791 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17792 : {
17793 0 : struct ndr_push *_ndr_extra_string;
17794 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_extra_string, 0, 256));
17795 0 : NDR_CHECK(ndr_push_string(_ndr_extra_string, NDR_SCALARS, r->extra_string));
17796 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_extra_string, 0, 256));
17797 : }
17798 0 : ndr->flags = _flags_save_string;
17799 : }
17800 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->service_pack_major));
17801 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->service_pack_minor));
17802 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->suite_mask));
17803 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->product_type));
17804 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->reserved));
17805 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
17806 : }
17807 0 : if (ndr_flags & NDR_BUFFERS) {
17808 0 : }
17809 0 : return NDR_ERR_SUCCESS;
17810 : }
17811 :
17812 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersionEx(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_OSVersionEx *r)
17813 : {
17814 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
17815 0 : if (ndr_flags & NDR_SCALARS) {
17816 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
17817 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
17818 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->major));
17819 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minor));
17820 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build));
17821 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->platform_id));
17822 : {
17823 0 : libndr_flags _flags_save_string = ndr->flags;
17824 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17825 : {
17826 0 : struct ndr_pull *_ndr_extra_string;
17827 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_extra_string, 0, 256));
17828 0 : NDR_CHECK(ndr_pull_string(_ndr_extra_string, NDR_SCALARS, &r->extra_string));
17829 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_extra_string, 0, 256));
17830 : }
17831 0 : ndr->flags = _flags_save_string;
17832 : }
17833 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->service_pack_major));
17834 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->service_pack_minor));
17835 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->suite_mask));
17836 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->product_type));
17837 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->reserved));
17838 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
17839 : }
17840 0 : if (ndr_flags & NDR_BUFFERS) {
17841 0 : }
17842 0 : return NDR_ERR_SUCCESS;
17843 : }
17844 :
17845 0 : static void ndr_print_flags_spoolss_OSVersionEx(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_OSVersionEx *r)
17846 : {
17847 0 : ndr_print_spoolss_OSVersionEx(ndr, name, r);
17848 0 : }
17849 :
17850 0 : _PUBLIC_ void ndr_print_spoolss_OSVersionEx(struct ndr_print *ndr, const char *name, const struct spoolss_OSVersionEx *r)
17851 : {
17852 0 : ndr_print_struct(ndr, name, "spoolss_OSVersionEx");
17853 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17854 0 : ndr->depth++;
17855 0 : ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_OSVersionEx(r, ndr->flags):r->_ndr_size);
17856 0 : ndr_print_uint32(ndr, "major", r->major);
17857 0 : ndr_print_uint32(ndr, "minor", r->minor);
17858 0 : ndr_print_uint32(ndr, "build", r->build);
17859 0 : ndr_print_uint32(ndr, "platform_id", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->platform_id);
17860 : {
17861 0 : libndr_flags _flags_save_string = ndr->flags;
17862 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17863 0 : ndr_print_string(ndr, "extra_string", r->extra_string);
17864 0 : ndr->flags = _flags_save_string;
17865 : }
17866 0 : ndr_print_uint16(ndr, "service_pack_major", r->service_pack_major);
17867 0 : ndr_print_uint16(ndr, "service_pack_minor", r->service_pack_minor);
17868 0 : ndr_print_uint16(ndr, "suite_mask", r->suite_mask);
17869 0 : ndr_print_uint8(ndr, "product_type", r->product_type);
17870 0 : ndr_print_uint8(ndr, "reserved", r->reserved);
17871 0 : ndr->depth--;
17872 : }
17873 :
17874 0 : _PUBLIC_ size_t ndr_size_spoolss_OSVersionEx(const struct spoolss_OSVersionEx *r, libndr_flags flags)
17875 : {
17876 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_OSVersionEx);
17877 : }
17878 :
17879 400 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_PrinterData *r)
17880 : {
17881 0 : uint32_t level;
17882 400 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
17883 400 : if (ndr_flags & NDR_SCALARS) {
17884 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
17885 400 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
17886 400 : NDR_CHECK(ndr_push_union_align(ndr, 4));
17887 400 : switch (level) {
17888 0 : case REG_NONE: {
17889 0 : break; }
17890 :
17891 208 : case REG_SZ: {
17892 : {
17893 208 : libndr_flags _flags_save_string = ndr->flags;
17894 208 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17895 208 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->string));
17896 208 : ndr->flags = _flags_save_string;
17897 : }
17898 208 : break; }
17899 :
17900 40 : case REG_BINARY: {
17901 : {
17902 40 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
17903 40 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
17904 40 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->binary));
17905 40 : ndr->flags = _flags_save_DATA_BLOB;
17906 : }
17907 40 : break; }
17908 :
17909 152 : case REG_DWORD: {
17910 152 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->value));
17911 152 : break; }
17912 :
17913 0 : case REG_MULTI_SZ: {
17914 : {
17915 0 : libndr_flags _flags_save_string_array = ndr->flags;
17916 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17917 0 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->string_array));
17918 0 : ndr->flags = _flags_save_string_array;
17919 : }
17920 0 : break; }
17921 :
17922 0 : default: {
17923 : {
17924 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
17925 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
17926 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
17927 0 : ndr->flags = _flags_save_DATA_BLOB;
17928 : }
17929 0 : break; }
17930 :
17931 : }
17932 : }
17933 400 : return NDR_ERR_SUCCESS;
17934 : }
17935 :
17936 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_PrinterData *r)
17937 : {
17938 0 : uint32_t level;
17939 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
17940 0 : if (ndr_flags & NDR_SCALARS) {
17941 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
17942 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
17943 0 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
17944 0 : switch (level) {
17945 0 : case REG_NONE: {
17946 0 : break; }
17947 :
17948 0 : case REG_SZ: {
17949 : {
17950 0 : libndr_flags _flags_save_string = ndr->flags;
17951 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17952 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->string));
17953 0 : ndr->flags = _flags_save_string;
17954 : }
17955 0 : break; }
17956 :
17957 0 : case REG_BINARY: {
17958 : {
17959 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
17960 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
17961 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->binary));
17962 0 : ndr->flags = _flags_save_DATA_BLOB;
17963 : }
17964 0 : break; }
17965 :
17966 0 : case REG_DWORD: {
17967 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value));
17968 0 : break; }
17969 :
17970 0 : case REG_MULTI_SZ: {
17971 : {
17972 0 : libndr_flags _flags_save_string_array = ndr->flags;
17973 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
17974 0 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->string_array));
17975 0 : ndr->flags = _flags_save_string_array;
17976 : }
17977 0 : break; }
17978 :
17979 0 : default: {
17980 : {
17981 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
17982 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
17983 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
17984 0 : ndr->flags = _flags_save_DATA_BLOB;
17985 : }
17986 0 : break; }
17987 :
17988 : }
17989 : }
17990 0 : return NDR_ERR_SUCCESS;
17991 : }
17992 :
17993 0 : _PUBLIC_ void ndr_print_spoolss_PrinterData(struct ndr_print *ndr, const char *name, const union spoolss_PrinterData *r)
17994 : {
17995 0 : uint32_t level;
17996 0 : level = ndr_print_steal_switch_value(ndr, r);
17997 0 : ndr_print_union(ndr, name, level, "spoolss_PrinterData");
17998 0 : switch (level) {
17999 0 : case REG_NONE:
18000 0 : break;
18001 :
18002 0 : case REG_SZ:
18003 : {
18004 0 : libndr_flags _flags_save_string = ndr->flags;
18005 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18006 0 : ndr_print_string(ndr, "string", r->string);
18007 0 : ndr->flags = _flags_save_string;
18008 : }
18009 0 : break;
18010 :
18011 0 : case REG_BINARY:
18012 : {
18013 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
18014 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
18015 0 : ndr_print_DATA_BLOB(ndr, "binary", r->binary);
18016 0 : ndr->flags = _flags_save_DATA_BLOB;
18017 : }
18018 0 : break;
18019 :
18020 0 : case REG_DWORD:
18021 0 : ndr_print_uint32(ndr, "value", r->value);
18022 0 : break;
18023 :
18024 0 : case REG_MULTI_SZ:
18025 : {
18026 0 : libndr_flags _flags_save_string_array = ndr->flags;
18027 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18028 0 : ndr_print_string_array(ndr, "string_array", r->string_array);
18029 0 : ndr->flags = _flags_save_string_array;
18030 : }
18031 0 : break;
18032 :
18033 0 : default:
18034 : {
18035 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
18036 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
18037 0 : ndr_print_DATA_BLOB(ndr, "data", r->data);
18038 0 : ndr->flags = _flags_save_DATA_BLOB;
18039 : }
18040 0 : break;
18041 :
18042 : }
18043 0 : }
18044 :
18045 103376 : static enum ndr_err_code ndr_push_spoolss_FormFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_FormFlags r)
18046 : {
18047 103376 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
18048 103376 : return NDR_ERR_SUCCESS;
18049 : }
18050 :
18051 34896 : static enum ndr_err_code ndr_pull_spoolss_FormFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_FormFlags *r)
18052 : {
18053 0 : uint32_t v;
18054 34896 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
18055 34896 : *r = v;
18056 34896 : return NDR_ERR_SUCCESS;
18057 : }
18058 :
18059 0 : _PUBLIC_ void ndr_print_spoolss_FormFlags(struct ndr_print *ndr, const char *name, enum spoolss_FormFlags r)
18060 : {
18061 0 : const char *val = NULL;
18062 :
18063 0 : switch (r) {
18064 0 : case SPOOLSS_FORM_USER: val = "SPOOLSS_FORM_USER"; break;
18065 0 : case SPOOLSS_FORM_BUILTIN: val = "SPOOLSS_FORM_BUILTIN"; break;
18066 0 : case SPOOLSS_FORM_PRINTER: val = "SPOOLSS_FORM_PRINTER"; break;
18067 : }
18068 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
18069 0 : }
18070 :
18071 103376 : static enum ndr_err_code ndr_push_spoolss_FormSize(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_FormSize *r)
18072 : {
18073 103376 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
18074 103376 : if (ndr_flags & NDR_SCALARS) {
18075 103376 : NDR_CHECK(ndr_push_align(ndr, 4));
18076 103376 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->width));
18077 103376 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->height));
18078 103376 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
18079 : }
18080 103376 : if (ndr_flags & NDR_BUFFERS) {
18081 0 : }
18082 103376 : return NDR_ERR_SUCCESS;
18083 : }
18084 :
18085 34896 : static enum ndr_err_code ndr_pull_spoolss_FormSize(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_FormSize *r)
18086 : {
18087 34896 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
18088 34896 : if (ndr_flags & NDR_SCALARS) {
18089 34896 : NDR_CHECK(ndr_pull_align(ndr, 4));
18090 34896 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->width));
18091 34896 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->height));
18092 34896 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
18093 : }
18094 34896 : if (ndr_flags & NDR_BUFFERS) {
18095 0 : }
18096 34896 : return NDR_ERR_SUCCESS;
18097 : }
18098 :
18099 0 : _PUBLIC_ void ndr_print_spoolss_FormSize(struct ndr_print *ndr, const char *name, const struct spoolss_FormSize *r)
18100 : {
18101 0 : ndr_print_struct(ndr, name, "spoolss_FormSize");
18102 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18103 0 : ndr->depth++;
18104 0 : ndr_print_uint32(ndr, "width", r->width);
18105 0 : ndr_print_uint32(ndr, "height", r->height);
18106 0 : ndr->depth--;
18107 : }
18108 :
18109 103376 : static enum ndr_err_code ndr_push_spoolss_FormArea(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_FormArea *r)
18110 : {
18111 103376 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
18112 103376 : if (ndr_flags & NDR_SCALARS) {
18113 103376 : NDR_CHECK(ndr_push_align(ndr, 4));
18114 103376 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->left));
18115 103376 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->top));
18116 103376 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->right));
18117 103376 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bottom));
18118 103376 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
18119 : }
18120 103376 : if (ndr_flags & NDR_BUFFERS) {
18121 0 : }
18122 103376 : return NDR_ERR_SUCCESS;
18123 : }
18124 :
18125 34896 : static enum ndr_err_code ndr_pull_spoolss_FormArea(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_FormArea *r)
18126 : {
18127 34896 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
18128 34896 : if (ndr_flags & NDR_SCALARS) {
18129 34896 : NDR_CHECK(ndr_pull_align(ndr, 4));
18130 34896 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->left));
18131 34896 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->top));
18132 34896 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->right));
18133 34896 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bottom));
18134 34896 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
18135 : }
18136 34896 : if (ndr_flags & NDR_BUFFERS) {
18137 0 : }
18138 34896 : return NDR_ERR_SUCCESS;
18139 : }
18140 :
18141 0 : _PUBLIC_ void ndr_print_spoolss_FormArea(struct ndr_print *ndr, const char *name, const struct spoolss_FormArea *r)
18142 : {
18143 0 : ndr_print_struct(ndr, name, "spoolss_FormArea");
18144 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18145 0 : ndr->depth++;
18146 0 : ndr_print_uint32(ndr, "left", r->left);
18147 0 : ndr_print_uint32(ndr, "top", r->top);
18148 0 : ndr_print_uint32(ndr, "right", r->right);
18149 0 : ndr_print_uint32(ndr, "bottom", r->bottom);
18150 0 : ndr->depth--;
18151 : }
18152 :
18153 205440 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FormInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_FormInfo1 *r)
18154 : {
18155 205440 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
18156 205440 : if (ndr_flags & NDR_SCALARS) {
18157 102720 : NDR_CHECK(ndr_push_align(ndr, 5));
18158 102720 : NDR_CHECK(ndr_push_spoolss_FormFlags(ndr, NDR_SCALARS, r->flags));
18159 : {
18160 102720 : libndr_flags _flags_save_string = ndr->flags;
18161 102720 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18162 102720 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->form_name));
18163 102720 : ndr->flags = _flags_save_string;
18164 : }
18165 102720 : NDR_CHECK(ndr_push_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
18166 102720 : NDR_CHECK(ndr_push_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
18167 102720 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
18168 : }
18169 205440 : if (ndr_flags & NDR_BUFFERS) {
18170 : {
18171 102720 : libndr_flags _flags_save_string = ndr->flags;
18172 102720 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18173 102720 : if (r->form_name) {
18174 102720 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->form_name));
18175 102720 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->form_name));
18176 102720 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->form_name));
18177 : }
18178 102720 : ndr->flags = _flags_save_string;
18179 : }
18180 : }
18181 205440 : return NDR_ERR_SUCCESS;
18182 : }
18183 :
18184 68480 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FormInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_FormInfo1 *r)
18185 : {
18186 0 : uint32_t _ptr_form_name;
18187 68480 : TALLOC_CTX *_mem_save_form_name_0 = NULL;
18188 68480 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
18189 68480 : if (ndr_flags & NDR_SCALARS) {
18190 34240 : NDR_CHECK(ndr_pull_align(ndr, 5));
18191 34240 : NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr, NDR_SCALARS, &r->flags));
18192 : {
18193 34240 : libndr_flags _flags_save_string = ndr->flags;
18194 34240 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18195 34240 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_form_name));
18196 34240 : if (_ptr_form_name) {
18197 34240 : NDR_PULL_ALLOC(ndr, r->form_name);
18198 34240 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->form_name, _ptr_form_name));
18199 : } else {
18200 0 : r->form_name = NULL;
18201 : }
18202 34240 : ndr->flags = _flags_save_string;
18203 : }
18204 34240 : NDR_CHECK(ndr_pull_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
18205 34240 : NDR_CHECK(ndr_pull_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
18206 34240 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
18207 : }
18208 68480 : if (ndr_flags & NDR_BUFFERS) {
18209 : {
18210 34240 : libndr_flags _flags_save_string = ndr->flags;
18211 34240 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18212 34240 : if (r->form_name) {
18213 0 : uint32_t _relative_save_offset;
18214 34240 : _relative_save_offset = ndr->offset;
18215 34240 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->form_name));
18216 34240 : _mem_save_form_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18217 34240 : NDR_PULL_SET_MEM_CTX(ndr, r->form_name, 0);
18218 34240 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->form_name));
18219 34240 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_form_name_0, 0);
18220 34240 : if (ndr->offset > ndr->relative_highest_offset) {
18221 2788 : ndr->relative_highest_offset = ndr->offset;
18222 : }
18223 34240 : ndr->offset = _relative_save_offset;
18224 : }
18225 34240 : ndr->flags = _flags_save_string;
18226 : }
18227 : }
18228 68480 : return NDR_ERR_SUCCESS;
18229 : }
18230 :
18231 0 : static void ndr_print_flags_spoolss_FormInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_FormInfo1 *r)
18232 : {
18233 0 : ndr_print_spoolss_FormInfo1(ndr, name, r);
18234 0 : }
18235 :
18236 0 : _PUBLIC_ void ndr_print_spoolss_FormInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_FormInfo1 *r)
18237 : {
18238 0 : ndr_print_struct(ndr, name, "spoolss_FormInfo1");
18239 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18240 0 : ndr->depth++;
18241 0 : ndr_print_spoolss_FormFlags(ndr, "flags", r->flags);
18242 : {
18243 0 : libndr_flags _flags_save_string = ndr->flags;
18244 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18245 0 : ndr_print_ptr(ndr, "form_name", r->form_name);
18246 0 : ndr->depth++;
18247 0 : if (r->form_name) {
18248 0 : ndr_print_string(ndr, "form_name", r->form_name);
18249 : }
18250 0 : ndr->depth--;
18251 0 : ndr->flags = _flags_save_string;
18252 : }
18253 0 : ndr_print_spoolss_FormSize(ndr, "size", &r->size);
18254 0 : ndr_print_spoolss_FormArea(ndr, "area", &r->area);
18255 0 : ndr->depth--;
18256 : }
18257 :
18258 0 : _PUBLIC_ size_t ndr_size_spoolss_FormInfo1(const struct spoolss_FormInfo1 *r, libndr_flags flags)
18259 : {
18260 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_FormInfo1);
18261 : }
18262 :
18263 0 : static enum ndr_err_code ndr_push_spoolss_FormStringType(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
18264 : {
18265 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
18266 0 : return NDR_ERR_SUCCESS;
18267 : }
18268 :
18269 0 : static enum ndr_err_code ndr_pull_spoolss_FormStringType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
18270 : {
18271 0 : uint32_t v;
18272 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
18273 0 : *r = v;
18274 0 : return NDR_ERR_SUCCESS;
18275 : }
18276 :
18277 0 : _PUBLIC_ void ndr_print_spoolss_FormStringType(struct ndr_print *ndr, const char *name, uint32_t r)
18278 : {
18279 0 : ndr_print_uint32(ndr, name, r);
18280 0 : ndr->depth++;
18281 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_NONE", SPOOLSS_FORM_STRING_TYPE_NONE, r);
18282 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_MUI_DLL", SPOOLSS_FORM_STRING_TYPE_MUI_DLL, r);
18283 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_LANG_PAIR", SPOOLSS_FORM_STRING_TYPE_LANG_PAIR, r);
18284 0 : ndr->depth--;
18285 0 : }
18286 :
18287 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FormInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_FormInfo2 *r)
18288 : {
18289 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
18290 0 : if (ndr_flags & NDR_SCALARS) {
18291 0 : NDR_CHECK(ndr_push_align(ndr, 5));
18292 0 : NDR_CHECK(ndr_push_spoolss_FormFlags(ndr, NDR_SCALARS, r->flags));
18293 : {
18294 0 : libndr_flags _flags_save_string = ndr->flags;
18295 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18296 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->form_name));
18297 0 : ndr->flags = _flags_save_string;
18298 : }
18299 0 : NDR_CHECK(ndr_push_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
18300 0 : NDR_CHECK(ndr_push_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
18301 : {
18302 0 : libndr_flags _flags_save_string = ndr->flags;
18303 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
18304 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->keyword));
18305 0 : ndr->flags = _flags_save_string;
18306 : }
18307 0 : NDR_CHECK(ndr_push_spoolss_FormStringType(ndr, NDR_SCALARS, r->string_type));
18308 : {
18309 0 : libndr_flags _flags_save_string = ndr->flags;
18310 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18311 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->mui_dll));
18312 0 : ndr->flags = _flags_save_string;
18313 : }
18314 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ressource_id));
18315 : {
18316 0 : libndr_flags _flags_save_string = ndr->flags;
18317 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18318 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
18319 0 : ndr->flags = _flags_save_string;
18320 : }
18321 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lang_id));
18322 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unused));
18323 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
18324 : }
18325 0 : if (ndr_flags & NDR_BUFFERS) {
18326 : {
18327 0 : libndr_flags _flags_save_string = ndr->flags;
18328 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18329 0 : if (r->form_name) {
18330 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->form_name));
18331 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->form_name));
18332 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->form_name));
18333 : }
18334 0 : ndr->flags = _flags_save_string;
18335 : }
18336 : {
18337 0 : libndr_flags _flags_save_string = ndr->flags;
18338 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
18339 0 : if (r->keyword) {
18340 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->keyword));
18341 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->keyword));
18342 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->keyword));
18343 : }
18344 0 : ndr->flags = _flags_save_string;
18345 : }
18346 : {
18347 0 : libndr_flags _flags_save_string = ndr->flags;
18348 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18349 0 : if (r->mui_dll) {
18350 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->mui_dll));
18351 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mui_dll));
18352 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->mui_dll));
18353 : }
18354 0 : ndr->flags = _flags_save_string;
18355 : }
18356 : {
18357 0 : libndr_flags _flags_save_string = ndr->flags;
18358 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18359 0 : if (r->display_name) {
18360 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->display_name));
18361 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
18362 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->display_name));
18363 : }
18364 0 : ndr->flags = _flags_save_string;
18365 : }
18366 : }
18367 0 : return NDR_ERR_SUCCESS;
18368 : }
18369 :
18370 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FormInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_FormInfo2 *r)
18371 : {
18372 0 : uint32_t _ptr_form_name;
18373 0 : TALLOC_CTX *_mem_save_form_name_0 = NULL;
18374 0 : uint32_t _ptr_keyword;
18375 0 : TALLOC_CTX *_mem_save_keyword_0 = NULL;
18376 0 : uint32_t _ptr_mui_dll;
18377 0 : TALLOC_CTX *_mem_save_mui_dll_0 = NULL;
18378 0 : uint32_t _ptr_display_name;
18379 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
18380 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
18381 0 : if (ndr_flags & NDR_SCALARS) {
18382 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
18383 0 : NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr, NDR_SCALARS, &r->flags));
18384 : {
18385 0 : libndr_flags _flags_save_string = ndr->flags;
18386 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18387 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_form_name));
18388 0 : if (_ptr_form_name) {
18389 0 : NDR_PULL_ALLOC(ndr, r->form_name);
18390 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->form_name, _ptr_form_name));
18391 : } else {
18392 0 : r->form_name = NULL;
18393 : }
18394 0 : ndr->flags = _flags_save_string;
18395 : }
18396 0 : NDR_CHECK(ndr_pull_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
18397 0 : NDR_CHECK(ndr_pull_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
18398 : {
18399 0 : libndr_flags _flags_save_string = ndr->flags;
18400 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
18401 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyword));
18402 0 : if (_ptr_keyword) {
18403 0 : NDR_PULL_ALLOC(ndr, r->keyword);
18404 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->keyword, _ptr_keyword));
18405 : } else {
18406 0 : r->keyword = NULL;
18407 : }
18408 0 : ndr->flags = _flags_save_string;
18409 : }
18410 0 : NDR_CHECK(ndr_pull_spoolss_FormStringType(ndr, NDR_SCALARS, &r->string_type));
18411 : {
18412 0 : libndr_flags _flags_save_string = ndr->flags;
18413 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18414 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_mui_dll));
18415 0 : if (_ptr_mui_dll) {
18416 0 : NDR_PULL_ALLOC(ndr, r->mui_dll);
18417 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->mui_dll, _ptr_mui_dll));
18418 : } else {
18419 0 : r->mui_dll = NULL;
18420 : }
18421 0 : ndr->flags = _flags_save_string;
18422 : }
18423 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ressource_id));
18424 : {
18425 0 : libndr_flags _flags_save_string = ndr->flags;
18426 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18427 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
18428 0 : if (_ptr_display_name) {
18429 0 : NDR_PULL_ALLOC(ndr, r->display_name);
18430 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
18431 : } else {
18432 0 : r->display_name = NULL;
18433 : }
18434 0 : ndr->flags = _flags_save_string;
18435 : }
18436 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lang_id));
18437 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unused));
18438 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
18439 : }
18440 0 : if (ndr_flags & NDR_BUFFERS) {
18441 : {
18442 0 : libndr_flags _flags_save_string = ndr->flags;
18443 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18444 0 : if (r->form_name) {
18445 0 : uint32_t _relative_save_offset;
18446 0 : _relative_save_offset = ndr->offset;
18447 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->form_name));
18448 0 : _mem_save_form_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18449 0 : NDR_PULL_SET_MEM_CTX(ndr, r->form_name, 0);
18450 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->form_name));
18451 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_form_name_0, 0);
18452 0 : if (ndr->offset > ndr->relative_highest_offset) {
18453 0 : ndr->relative_highest_offset = ndr->offset;
18454 : }
18455 0 : ndr->offset = _relative_save_offset;
18456 : }
18457 0 : ndr->flags = _flags_save_string;
18458 : }
18459 : {
18460 0 : libndr_flags _flags_save_string = ndr->flags;
18461 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
18462 0 : if (r->keyword) {
18463 0 : uint32_t _relative_save_offset;
18464 0 : _relative_save_offset = ndr->offset;
18465 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->keyword));
18466 0 : _mem_save_keyword_0 = NDR_PULL_GET_MEM_CTX(ndr);
18467 0 : NDR_PULL_SET_MEM_CTX(ndr, r->keyword, 0);
18468 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->keyword));
18469 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyword_0, 0);
18470 0 : if (ndr->offset > ndr->relative_highest_offset) {
18471 0 : ndr->relative_highest_offset = ndr->offset;
18472 : }
18473 0 : ndr->offset = _relative_save_offset;
18474 : }
18475 0 : ndr->flags = _flags_save_string;
18476 : }
18477 : {
18478 0 : libndr_flags _flags_save_string = ndr->flags;
18479 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18480 0 : if (r->mui_dll) {
18481 0 : uint32_t _relative_save_offset;
18482 0 : _relative_save_offset = ndr->offset;
18483 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->mui_dll));
18484 0 : _mem_save_mui_dll_0 = NDR_PULL_GET_MEM_CTX(ndr);
18485 0 : NDR_PULL_SET_MEM_CTX(ndr, r->mui_dll, 0);
18486 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mui_dll));
18487 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mui_dll_0, 0);
18488 0 : if (ndr->offset > ndr->relative_highest_offset) {
18489 0 : ndr->relative_highest_offset = ndr->offset;
18490 : }
18491 0 : ndr->offset = _relative_save_offset;
18492 : }
18493 0 : ndr->flags = _flags_save_string;
18494 : }
18495 : {
18496 0 : libndr_flags _flags_save_string = ndr->flags;
18497 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18498 0 : if (r->display_name) {
18499 0 : uint32_t _relative_save_offset;
18500 0 : _relative_save_offset = ndr->offset;
18501 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
18502 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18503 0 : NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
18504 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
18505 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
18506 0 : if (ndr->offset > ndr->relative_highest_offset) {
18507 0 : ndr->relative_highest_offset = ndr->offset;
18508 : }
18509 0 : ndr->offset = _relative_save_offset;
18510 : }
18511 0 : ndr->flags = _flags_save_string;
18512 : }
18513 : }
18514 0 : return NDR_ERR_SUCCESS;
18515 : }
18516 :
18517 0 : static void ndr_print_flags_spoolss_FormInfo2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_FormInfo2 *r)
18518 : {
18519 0 : ndr_print_spoolss_FormInfo2(ndr, name, r);
18520 0 : }
18521 :
18522 0 : _PUBLIC_ void ndr_print_spoolss_FormInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_FormInfo2 *r)
18523 : {
18524 0 : ndr_print_struct(ndr, name, "spoolss_FormInfo2");
18525 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18526 0 : ndr->depth++;
18527 0 : ndr_print_spoolss_FormFlags(ndr, "flags", r->flags);
18528 : {
18529 0 : libndr_flags _flags_save_string = ndr->flags;
18530 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18531 0 : ndr_print_ptr(ndr, "form_name", r->form_name);
18532 0 : ndr->depth++;
18533 0 : if (r->form_name) {
18534 0 : ndr_print_string(ndr, "form_name", r->form_name);
18535 : }
18536 0 : ndr->depth--;
18537 0 : ndr->flags = _flags_save_string;
18538 : }
18539 0 : ndr_print_spoolss_FormSize(ndr, "size", &r->size);
18540 0 : ndr_print_spoolss_FormArea(ndr, "area", &r->area);
18541 : {
18542 0 : libndr_flags _flags_save_string = ndr->flags;
18543 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
18544 0 : ndr_print_ptr(ndr, "keyword", r->keyword);
18545 0 : ndr->depth++;
18546 0 : if (r->keyword) {
18547 0 : ndr_print_string(ndr, "keyword", r->keyword);
18548 : }
18549 0 : ndr->depth--;
18550 0 : ndr->flags = _flags_save_string;
18551 : }
18552 0 : ndr_print_spoolss_FormStringType(ndr, "string_type", r->string_type);
18553 : {
18554 0 : libndr_flags _flags_save_string = ndr->flags;
18555 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18556 0 : ndr_print_ptr(ndr, "mui_dll", r->mui_dll);
18557 0 : ndr->depth++;
18558 0 : if (r->mui_dll) {
18559 0 : ndr_print_string(ndr, "mui_dll", r->mui_dll);
18560 : }
18561 0 : ndr->depth--;
18562 0 : ndr->flags = _flags_save_string;
18563 : }
18564 0 : ndr_print_uint32(ndr, "ressource_id", r->ressource_id);
18565 : {
18566 0 : libndr_flags _flags_save_string = ndr->flags;
18567 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
18568 0 : ndr_print_ptr(ndr, "display_name", r->display_name);
18569 0 : ndr->depth++;
18570 0 : if (r->display_name) {
18571 0 : ndr_print_string(ndr, "display_name", r->display_name);
18572 : }
18573 0 : ndr->depth--;
18574 0 : ndr->flags = _flags_save_string;
18575 : }
18576 0 : ndr_print_uint16(ndr, "lang_id", r->lang_id);
18577 0 : ndr_print_uint16(ndr, "unused", r->unused);
18578 0 : ndr->depth--;
18579 : }
18580 :
18581 0 : _PUBLIC_ size_t ndr_size_spoolss_FormInfo2(const struct spoolss_FormInfo2 *r, libndr_flags flags)
18582 : {
18583 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_FormInfo2);
18584 : }
18585 :
18586 197880 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FormInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_FormInfo *r)
18587 : {
18588 197880 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
18589 0 : uint32_t level;
18590 : {
18591 197880 : libndr_flags _flags_save_UNION = ndr->flags;
18592 197880 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
18593 197880 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
18594 197880 : if (ndr_flags & NDR_SCALARS) {
18595 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
18596 102720 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
18597 102720 : NDR_CHECK(ndr_push_union_align(ndr, 5));
18598 102720 : switch (level) {
18599 102720 : case 1: {
18600 102720 : NDR_CHECK(ndr_push_align(ndr, 5));
18601 102720 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
18602 102720 : NDR_CHECK(ndr_push_spoolss_FormInfo1(ndr, NDR_SCALARS, &r->info1));
18603 102720 : break; }
18604 :
18605 0 : case 2: {
18606 0 : NDR_CHECK(ndr_push_align(ndr, 5));
18607 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
18608 0 : NDR_CHECK(ndr_push_spoolss_FormInfo2(ndr, NDR_SCALARS, &r->info2));
18609 0 : break; }
18610 :
18611 0 : default: {
18612 0 : break; }
18613 :
18614 : }
18615 : }
18616 197880 : if (ndr_flags & NDR_BUFFERS) {
18617 102720 : if (!(ndr_flags & NDR_SCALARS)) {
18618 : /* We didn't get it above, and the token is not needed after this. */
18619 95160 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
18620 : }
18621 102720 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
18622 102720 : switch (level) {
18623 102720 : case 1:
18624 102720 : NDR_CHECK(ndr_push_spoolss_FormInfo1(ndr, NDR_BUFFERS, &r->info1));
18625 102720 : break;
18626 :
18627 0 : case 2:
18628 0 : NDR_CHECK(ndr_push_spoolss_FormInfo2(ndr, NDR_BUFFERS, &r->info2));
18629 0 : break;
18630 :
18631 0 : default:
18632 0 : break;
18633 :
18634 : }
18635 : }
18636 197880 : ndr->flags = _flags_save_UNION;
18637 : }
18638 197880 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
18639 197880 : return NDR_ERR_SUCCESS;
18640 : }
18641 :
18642 66472 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FormInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_FormInfo *r)
18643 : {
18644 66472 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
18645 512 : uint32_t level;
18646 : {
18647 66472 : libndr_flags _flags_save_UNION = ndr->flags;
18648 66472 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
18649 66472 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
18650 66472 : if (ndr_flags & NDR_SCALARS) {
18651 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
18652 34496 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
18653 34496 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
18654 34496 : switch (level) {
18655 34240 : case 1: {
18656 34240 : NDR_CHECK(ndr_pull_align(ndr, 5));
18657 34240 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
18658 34240 : NDR_CHECK(ndr_pull_spoolss_FormInfo1(ndr, NDR_SCALARS, &r->info1));
18659 34240 : break; }
18660 :
18661 0 : case 2: {
18662 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
18663 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
18664 0 : NDR_CHECK(ndr_pull_spoolss_FormInfo2(ndr, NDR_SCALARS, &r->info2));
18665 0 : break; }
18666 :
18667 0 : default: {
18668 0 : break; }
18669 :
18670 : }
18671 : }
18672 66472 : if (ndr_flags & NDR_BUFFERS) {
18673 34496 : if (!(ndr_flags & NDR_SCALARS)) {
18674 : /* We didn't get it above, and the token is not needed after this. */
18675 31976 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
18676 : }
18677 34496 : switch (level) {
18678 34240 : case 1:
18679 34240 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
18680 34240 : NDR_CHECK(ndr_pull_spoolss_FormInfo1(ndr, NDR_BUFFERS, &r->info1));
18681 34240 : break;
18682 :
18683 0 : case 2:
18684 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
18685 0 : NDR_CHECK(ndr_pull_spoolss_FormInfo2(ndr, NDR_BUFFERS, &r->info2));
18686 0 : break;
18687 :
18688 0 : default:
18689 0 : break;
18690 :
18691 : }
18692 : }
18693 66472 : ndr->flags = _flags_save_UNION;
18694 : }
18695 66472 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
18696 66472 : return NDR_ERR_SUCCESS;
18697 : }
18698 :
18699 256 : _PUBLIC_ void ndr_print_spoolss_FormInfo(struct ndr_print *ndr, const char *name, const union spoolss_FormInfo *r)
18700 : {
18701 256 : uint32_t level;
18702 : {
18703 256 : libndr_flags _flags_save_UNION = ndr->flags;
18704 256 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
18705 256 : level = ndr_print_steal_switch_value(ndr, r);
18706 256 : ndr_print_union(ndr, name, level, "spoolss_FormInfo");
18707 256 : switch (level) {
18708 0 : case 1:
18709 0 : ndr_print_spoolss_FormInfo1(ndr, "info1", &r->info1);
18710 0 : break;
18711 :
18712 0 : case 2:
18713 0 : ndr_print_spoolss_FormInfo2(ndr, "info2", &r->info2);
18714 0 : break;
18715 :
18716 0 : default:
18717 0 : break;
18718 :
18719 : }
18720 256 : ndr->flags = _flags_save_UNION;
18721 : }
18722 256 : }
18723 :
18724 5040 : _PUBLIC_ size_t ndr_size_spoolss_FormInfo(const union spoolss_FormInfo *r, uint32_t level, libndr_flags flags)
18725 : {
18726 5040 : flags |= LIBNDR_FLAG_RELATIVE_REVERSE;
18727 5040 : return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_FormInfo);
18728 : }
18729 :
18730 656 : static enum ndr_err_code ndr_push_spoolss_AddFormInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_AddFormInfo1 *r)
18731 : {
18732 656 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
18733 656 : if (ndr_flags & NDR_SCALARS) {
18734 656 : NDR_CHECK(ndr_push_align(ndr, 5));
18735 656 : NDR_CHECK(ndr_push_spoolss_FormFlags(ndr, NDR_SCALARS, r->flags));
18736 656 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->form_name));
18737 656 : NDR_CHECK(ndr_push_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
18738 656 : NDR_CHECK(ndr_push_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
18739 656 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
18740 : }
18741 656 : if (ndr_flags & NDR_BUFFERS) {
18742 656 : if (r->form_name) {
18743 656 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->form_name, CH_UTF16)));
18744 656 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18745 656 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->form_name, CH_UTF16)));
18746 656 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->form_name, ndr_charset_length(r->form_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18747 : }
18748 : }
18749 656 : return NDR_ERR_SUCCESS;
18750 : }
18751 :
18752 656 : static enum ndr_err_code ndr_pull_spoolss_AddFormInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_AddFormInfo1 *r)
18753 : {
18754 0 : uint32_t _ptr_form_name;
18755 656 : uint32_t size_form_name_1 = 0;
18756 656 : uint32_t length_form_name_1 = 0;
18757 656 : TALLOC_CTX *_mem_save_form_name_0 = NULL;
18758 656 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
18759 656 : if (ndr_flags & NDR_SCALARS) {
18760 656 : NDR_CHECK(ndr_pull_align(ndr, 5));
18761 656 : NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr, NDR_SCALARS, &r->flags));
18762 656 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_form_name));
18763 656 : if (_ptr_form_name) {
18764 656 : NDR_PULL_ALLOC(ndr, r->form_name);
18765 : } else {
18766 0 : r->form_name = NULL;
18767 : }
18768 656 : NDR_CHECK(ndr_pull_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
18769 656 : NDR_CHECK(ndr_pull_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
18770 656 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
18771 : }
18772 656 : if (ndr_flags & NDR_BUFFERS) {
18773 656 : if (r->form_name) {
18774 656 : _mem_save_form_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18775 656 : NDR_PULL_SET_MEM_CTX(ndr, r->form_name, 0);
18776 656 : NDR_CHECK(ndr_pull_array_size(ndr, &r->form_name));
18777 656 : NDR_CHECK(ndr_pull_array_length(ndr, &r->form_name));
18778 656 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->form_name, &size_form_name_1));
18779 656 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->form_name, &length_form_name_1));
18780 656 : if (length_form_name_1 > size_form_name_1) {
18781 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_form_name_1, length_form_name_1);
18782 : }
18783 656 : NDR_CHECK(ndr_check_string_terminator(ndr, length_form_name_1, sizeof(uint16_t)));
18784 656 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->form_name, length_form_name_1, sizeof(uint16_t), CH_UTF16));
18785 656 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_form_name_0, 0);
18786 : }
18787 : }
18788 656 : return NDR_ERR_SUCCESS;
18789 : }
18790 :
18791 0 : _PUBLIC_ void ndr_print_spoolss_AddFormInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_AddFormInfo1 *r)
18792 : {
18793 0 : ndr_print_struct(ndr, name, "spoolss_AddFormInfo1");
18794 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18795 0 : ndr->depth++;
18796 0 : ndr_print_spoolss_FormFlags(ndr, "flags", r->flags);
18797 0 : ndr_print_ptr(ndr, "form_name", r->form_name);
18798 0 : ndr->depth++;
18799 0 : if (r->form_name) {
18800 0 : ndr_print_string(ndr, "form_name", r->form_name);
18801 : }
18802 0 : ndr->depth--;
18803 0 : ndr_print_spoolss_FormSize(ndr, "size", &r->size);
18804 0 : ndr_print_spoolss_FormArea(ndr, "area", &r->area);
18805 0 : ndr->depth--;
18806 : }
18807 :
18808 0 : static enum ndr_err_code ndr_push_spoolss_AddFormInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_AddFormInfo2 *r)
18809 : {
18810 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
18811 0 : if (ndr_flags & NDR_SCALARS) {
18812 0 : NDR_CHECK(ndr_push_align(ndr, 5));
18813 0 : NDR_CHECK(ndr_push_spoolss_FormFlags(ndr, NDR_SCALARS, r->flags));
18814 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->form_name));
18815 0 : NDR_CHECK(ndr_push_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
18816 0 : NDR_CHECK(ndr_push_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
18817 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->keyword));
18818 0 : NDR_CHECK(ndr_push_spoolss_FormStringType(ndr, NDR_SCALARS, r->string_type));
18819 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->mui_dll));
18820 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ressource_id));
18821 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->display_name));
18822 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lang_id));
18823 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
18824 : }
18825 0 : if (ndr_flags & NDR_BUFFERS) {
18826 0 : if (r->form_name) {
18827 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->form_name, CH_UTF16)));
18828 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18829 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->form_name, CH_UTF16)));
18830 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->form_name, ndr_charset_length(r->form_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18831 : }
18832 0 : if (r->keyword) {
18833 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->keyword, CH_DOS)));
18834 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18835 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->keyword, CH_DOS)));
18836 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->keyword, ndr_charset_length(r->keyword, CH_DOS), sizeof(uint8_t), CH_DOS));
18837 : }
18838 0 : if (r->mui_dll) {
18839 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->mui_dll, CH_UTF16)));
18840 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18841 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->mui_dll, CH_UTF16)));
18842 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->mui_dll, ndr_charset_length(r->mui_dll, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18843 : }
18844 0 : if (r->display_name) {
18845 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->display_name, CH_UTF16)));
18846 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18847 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->display_name, CH_UTF16)));
18848 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->display_name, ndr_charset_length(r->display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18849 : }
18850 : }
18851 0 : return NDR_ERR_SUCCESS;
18852 : }
18853 :
18854 0 : static enum ndr_err_code ndr_pull_spoolss_AddFormInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_AddFormInfo2 *r)
18855 : {
18856 0 : uint32_t _ptr_form_name;
18857 0 : uint32_t size_form_name_1 = 0;
18858 0 : uint32_t length_form_name_1 = 0;
18859 0 : TALLOC_CTX *_mem_save_form_name_0 = NULL;
18860 0 : uint32_t _ptr_keyword;
18861 0 : uint32_t size_keyword_1 = 0;
18862 0 : uint32_t length_keyword_1 = 0;
18863 0 : TALLOC_CTX *_mem_save_keyword_0 = NULL;
18864 0 : uint32_t _ptr_mui_dll;
18865 0 : uint32_t size_mui_dll_1 = 0;
18866 0 : uint32_t length_mui_dll_1 = 0;
18867 0 : TALLOC_CTX *_mem_save_mui_dll_0 = NULL;
18868 0 : uint32_t _ptr_display_name;
18869 0 : uint32_t size_display_name_1 = 0;
18870 0 : uint32_t length_display_name_1 = 0;
18871 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
18872 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
18873 0 : if (ndr_flags & NDR_SCALARS) {
18874 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
18875 0 : NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr, NDR_SCALARS, &r->flags));
18876 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_form_name));
18877 0 : if (_ptr_form_name) {
18878 0 : NDR_PULL_ALLOC(ndr, r->form_name);
18879 : } else {
18880 0 : r->form_name = NULL;
18881 : }
18882 0 : NDR_CHECK(ndr_pull_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
18883 0 : NDR_CHECK(ndr_pull_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
18884 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyword));
18885 0 : if (_ptr_keyword) {
18886 0 : NDR_PULL_ALLOC(ndr, r->keyword);
18887 : } else {
18888 0 : r->keyword = NULL;
18889 : }
18890 0 : NDR_CHECK(ndr_pull_spoolss_FormStringType(ndr, NDR_SCALARS, &r->string_type));
18891 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_mui_dll));
18892 0 : if (_ptr_mui_dll) {
18893 0 : NDR_PULL_ALLOC(ndr, r->mui_dll);
18894 : } else {
18895 0 : r->mui_dll = NULL;
18896 : }
18897 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ressource_id));
18898 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
18899 0 : if (_ptr_display_name) {
18900 0 : NDR_PULL_ALLOC(ndr, r->display_name);
18901 : } else {
18902 0 : r->display_name = NULL;
18903 : }
18904 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lang_id));
18905 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
18906 : }
18907 0 : if (ndr_flags & NDR_BUFFERS) {
18908 0 : if (r->form_name) {
18909 0 : _mem_save_form_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18910 0 : NDR_PULL_SET_MEM_CTX(ndr, r->form_name, 0);
18911 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->form_name));
18912 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->form_name));
18913 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->form_name, &size_form_name_1));
18914 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->form_name, &length_form_name_1));
18915 0 : if (length_form_name_1 > size_form_name_1) {
18916 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_form_name_1, length_form_name_1);
18917 : }
18918 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_form_name_1, sizeof(uint16_t)));
18919 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->form_name, length_form_name_1, sizeof(uint16_t), CH_UTF16));
18920 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_form_name_0, 0);
18921 : }
18922 0 : if (r->keyword) {
18923 0 : _mem_save_keyword_0 = NDR_PULL_GET_MEM_CTX(ndr);
18924 0 : NDR_PULL_SET_MEM_CTX(ndr, r->keyword, 0);
18925 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->keyword));
18926 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->keyword));
18927 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->keyword, &size_keyword_1));
18928 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->keyword, &length_keyword_1));
18929 0 : if (length_keyword_1 > size_keyword_1) {
18930 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_keyword_1, length_keyword_1);
18931 : }
18932 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_keyword_1, sizeof(uint8_t)));
18933 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->keyword, length_keyword_1, sizeof(uint8_t), CH_DOS));
18934 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyword_0, 0);
18935 : }
18936 0 : if (r->mui_dll) {
18937 0 : _mem_save_mui_dll_0 = NDR_PULL_GET_MEM_CTX(ndr);
18938 0 : NDR_PULL_SET_MEM_CTX(ndr, r->mui_dll, 0);
18939 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->mui_dll));
18940 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->mui_dll));
18941 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->mui_dll, &size_mui_dll_1));
18942 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->mui_dll, &length_mui_dll_1));
18943 0 : if (length_mui_dll_1 > size_mui_dll_1) {
18944 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_mui_dll_1, length_mui_dll_1);
18945 : }
18946 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_mui_dll_1, sizeof(uint16_t)));
18947 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->mui_dll, length_mui_dll_1, sizeof(uint16_t), CH_UTF16));
18948 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mui_dll_0, 0);
18949 : }
18950 0 : if (r->display_name) {
18951 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18952 0 : NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
18953 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->display_name));
18954 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->display_name));
18955 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->display_name, &size_display_name_1));
18956 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->display_name, &length_display_name_1));
18957 0 : if (length_display_name_1 > size_display_name_1) {
18958 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_display_name_1, length_display_name_1);
18959 : }
18960 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_display_name_1, sizeof(uint16_t)));
18961 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->display_name, length_display_name_1, sizeof(uint16_t), CH_UTF16));
18962 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
18963 : }
18964 : }
18965 0 : return NDR_ERR_SUCCESS;
18966 : }
18967 :
18968 0 : _PUBLIC_ void ndr_print_spoolss_AddFormInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_AddFormInfo2 *r)
18969 : {
18970 0 : ndr_print_struct(ndr, name, "spoolss_AddFormInfo2");
18971 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18972 0 : ndr->depth++;
18973 0 : ndr_print_spoolss_FormFlags(ndr, "flags", r->flags);
18974 0 : ndr_print_ptr(ndr, "form_name", r->form_name);
18975 0 : ndr->depth++;
18976 0 : if (r->form_name) {
18977 0 : ndr_print_string(ndr, "form_name", r->form_name);
18978 : }
18979 0 : ndr->depth--;
18980 0 : ndr_print_spoolss_FormSize(ndr, "size", &r->size);
18981 0 : ndr_print_spoolss_FormArea(ndr, "area", &r->area);
18982 0 : ndr_print_ptr(ndr, "keyword", r->keyword);
18983 0 : ndr->depth++;
18984 0 : if (r->keyword) {
18985 0 : ndr_print_string(ndr, "keyword", r->keyword);
18986 : }
18987 0 : ndr->depth--;
18988 0 : ndr_print_spoolss_FormStringType(ndr, "string_type", r->string_type);
18989 0 : ndr_print_ptr(ndr, "mui_dll", r->mui_dll);
18990 0 : ndr->depth++;
18991 0 : if (r->mui_dll) {
18992 0 : ndr_print_string(ndr, "mui_dll", r->mui_dll);
18993 : }
18994 0 : ndr->depth--;
18995 0 : ndr_print_uint32(ndr, "ressource_id", r->ressource_id);
18996 0 : ndr_print_ptr(ndr, "display_name", r->display_name);
18997 0 : ndr->depth++;
18998 0 : if (r->display_name) {
18999 0 : ndr_print_string(ndr, "display_name", r->display_name);
19000 : }
19001 0 : ndr->depth--;
19002 0 : ndr_print_uint32(ndr, "lang_id", r->lang_id);
19003 0 : ndr->depth--;
19004 : }
19005 :
19006 1312 : static enum ndr_err_code ndr_push_spoolss_AddFormInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_AddFormInfo *r)
19007 : {
19008 0 : uint32_t level;
19009 1312 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
19010 1312 : if (ndr_flags & NDR_SCALARS) {
19011 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
19012 656 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
19013 656 : NDR_CHECK(ndr_push_union_align(ndr, 5));
19014 656 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
19015 : /* ms_union is always aligned to the largest union arm*/
19016 656 : NDR_CHECK(ndr_push_align(ndr, 5));
19017 656 : switch (level) {
19018 656 : case 1: {
19019 656 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
19020 656 : break; }
19021 :
19022 0 : case 2: {
19023 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
19024 0 : break; }
19025 :
19026 0 : default:
19027 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
19028 : }
19029 : }
19030 1312 : if (ndr_flags & NDR_BUFFERS) {
19031 656 : if (!(ndr_flags & NDR_SCALARS)) {
19032 : /* We didn't get it above, and the token is not needed after this. */
19033 656 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
19034 : }
19035 656 : switch (level) {
19036 656 : case 1:
19037 656 : if (r->info1) {
19038 656 : NDR_CHECK(ndr_push_spoolss_AddFormInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
19039 : }
19040 656 : break;
19041 :
19042 0 : case 2:
19043 0 : if (r->info2) {
19044 0 : NDR_CHECK(ndr_push_spoolss_AddFormInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
19045 : }
19046 0 : break;
19047 :
19048 0 : default:
19049 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
19050 : }
19051 : }
19052 1312 : return NDR_ERR_SUCCESS;
19053 : }
19054 :
19055 1312 : static enum ndr_err_code ndr_pull_spoolss_AddFormInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_AddFormInfo *r)
19056 : {
19057 0 : uint32_t level;
19058 0 : uint32_t _level;
19059 1312 : TALLOC_CTX *_mem_save_info1_0 = NULL;
19060 0 : uint32_t _ptr_info1;
19061 1312 : TALLOC_CTX *_mem_save_info2_0 = NULL;
19062 0 : uint32_t _ptr_info2;
19063 1312 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
19064 1312 : if (ndr_flags & NDR_SCALARS) {
19065 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
19066 656 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
19067 656 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
19068 656 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
19069 656 : if (_level != level) {
19070 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
19071 : }
19072 : /* ms_union is always aligned to the largest union arm*/
19073 656 : NDR_CHECK(ndr_pull_align(ndr, 5));
19074 656 : switch (level) {
19075 656 : case 1: {
19076 656 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
19077 656 : if (_ptr_info1) {
19078 656 : NDR_PULL_ALLOC(ndr, r->info1);
19079 : } else {
19080 0 : r->info1 = NULL;
19081 : }
19082 656 : break; }
19083 :
19084 0 : case 2: {
19085 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
19086 0 : if (_ptr_info2) {
19087 0 : NDR_PULL_ALLOC(ndr, r->info2);
19088 : } else {
19089 0 : r->info2 = NULL;
19090 : }
19091 0 : break; }
19092 :
19093 0 : default:
19094 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
19095 : }
19096 : }
19097 1312 : if (ndr_flags & NDR_BUFFERS) {
19098 656 : if (!(ndr_flags & NDR_SCALARS)) {
19099 : /* We didn't get it above, and the token is not needed after this. */
19100 656 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
19101 : }
19102 656 : switch (level) {
19103 656 : case 1:
19104 656 : if (r->info1) {
19105 656 : _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
19106 656 : NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
19107 656 : NDR_CHECK(ndr_pull_spoolss_AddFormInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
19108 656 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
19109 : }
19110 656 : break;
19111 :
19112 0 : case 2:
19113 0 : if (r->info2) {
19114 0 : _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
19115 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
19116 0 : NDR_CHECK(ndr_pull_spoolss_AddFormInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
19117 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
19118 : }
19119 0 : break;
19120 :
19121 0 : default:
19122 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
19123 : }
19124 : }
19125 1312 : return NDR_ERR_SUCCESS;
19126 : }
19127 :
19128 0 : _PUBLIC_ void ndr_print_spoolss_AddFormInfo(struct ndr_print *ndr, const char *name, const union spoolss_AddFormInfo *r)
19129 : {
19130 0 : uint32_t level;
19131 0 : level = ndr_print_steal_switch_value(ndr, r);
19132 0 : ndr_print_union(ndr, name, level, "spoolss_AddFormInfo");
19133 0 : switch (level) {
19134 0 : case 1:
19135 0 : ndr_print_ptr(ndr, "info1", r->info1);
19136 0 : ndr->depth++;
19137 0 : if (r->info1) {
19138 0 : ndr_print_spoolss_AddFormInfo1(ndr, "info1", r->info1);
19139 : }
19140 0 : ndr->depth--;
19141 0 : break;
19142 :
19143 0 : case 2:
19144 0 : ndr_print_ptr(ndr, "info2", r->info2);
19145 0 : ndr->depth++;
19146 0 : if (r->info2) {
19147 0 : ndr_print_spoolss_AddFormInfo2(ndr, "info2", r->info2);
19148 : }
19149 0 : ndr->depth--;
19150 0 : break;
19151 :
19152 0 : default:
19153 0 : ndr_print_bad_level(ndr, name, level);
19154 : }
19155 0 : }
19156 :
19157 656 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_AddFormInfoCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_AddFormInfoCtr *r)
19158 : {
19159 656 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
19160 656 : if (ndr_flags & NDR_SCALARS) {
19161 656 : NDR_CHECK(ndr_push_align(ndr, 5));
19162 656 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
19163 656 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
19164 656 : NDR_CHECK(ndr_push_spoolss_AddFormInfo(ndr, NDR_SCALARS, &r->info));
19165 656 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
19166 : }
19167 656 : if (ndr_flags & NDR_BUFFERS) {
19168 656 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
19169 656 : NDR_CHECK(ndr_push_spoolss_AddFormInfo(ndr, NDR_BUFFERS, &r->info));
19170 : }
19171 656 : return NDR_ERR_SUCCESS;
19172 : }
19173 :
19174 656 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_AddFormInfoCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_AddFormInfoCtr *r)
19175 : {
19176 656 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
19177 656 : if (ndr_flags & NDR_SCALARS) {
19178 656 : NDR_CHECK(ndr_pull_align(ndr, 5));
19179 656 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
19180 656 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
19181 656 : NDR_CHECK(ndr_pull_spoolss_AddFormInfo(ndr, NDR_SCALARS, &r->info));
19182 656 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
19183 : }
19184 656 : if (ndr_flags & NDR_BUFFERS) {
19185 656 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
19186 656 : NDR_CHECK(ndr_pull_spoolss_AddFormInfo(ndr, NDR_BUFFERS, &r->info));
19187 : }
19188 656 : return NDR_ERR_SUCCESS;
19189 : }
19190 :
19191 0 : static void ndr_print_flags_spoolss_AddFormInfoCtr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_AddFormInfoCtr *r)
19192 : {
19193 0 : ndr_print_spoolss_AddFormInfoCtr(ndr, name, r);
19194 0 : }
19195 :
19196 0 : _PUBLIC_ void ndr_print_spoolss_AddFormInfoCtr(struct ndr_print *ndr, const char *name, const struct spoolss_AddFormInfoCtr *r)
19197 : {
19198 0 : ndr_print_struct(ndr, name, "spoolss_AddFormInfoCtr");
19199 0 : if (r == NULL) { ndr_print_null(ndr); return; }
19200 0 : ndr->depth++;
19201 0 : ndr_print_uint32(ndr, "level", r->level);
19202 0 : ndr_print_set_switch_value(ndr, &r->info, r->level);
19203 0 : ndr_print_spoolss_AddFormInfo(ndr, "info", &r->info);
19204 0 : ndr->depth--;
19205 : }
19206 :
19207 24 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PortInfo1 *r)
19208 : {
19209 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
19210 24 : if (ndr_flags & NDR_SCALARS) {
19211 12 : NDR_CHECK(ndr_push_align(ndr, 5));
19212 : {
19213 12 : libndr_flags _flags_save_string = ndr->flags;
19214 12 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19215 12 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->port_name));
19216 12 : ndr->flags = _flags_save_string;
19217 : }
19218 12 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
19219 : }
19220 24 : if (ndr_flags & NDR_BUFFERS) {
19221 : {
19222 12 : libndr_flags _flags_save_string = ndr->flags;
19223 12 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19224 12 : if (r->port_name) {
19225 12 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->port_name));
19226 12 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->port_name));
19227 12 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->port_name));
19228 : }
19229 12 : ndr->flags = _flags_save_string;
19230 : }
19231 : }
19232 24 : return NDR_ERR_SUCCESS;
19233 : }
19234 :
19235 8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PortInfo1 *r)
19236 : {
19237 0 : uint32_t _ptr_port_name;
19238 8 : TALLOC_CTX *_mem_save_port_name_0 = NULL;
19239 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
19240 8 : if (ndr_flags & NDR_SCALARS) {
19241 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
19242 : {
19243 4 : libndr_flags _flags_save_string = ndr->flags;
19244 4 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19245 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_port_name));
19246 4 : if (_ptr_port_name) {
19247 4 : NDR_PULL_ALLOC(ndr, r->port_name);
19248 4 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->port_name, _ptr_port_name));
19249 : } else {
19250 0 : r->port_name = NULL;
19251 : }
19252 4 : ndr->flags = _flags_save_string;
19253 : }
19254 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
19255 : }
19256 8 : if (ndr_flags & NDR_BUFFERS) {
19257 : {
19258 4 : libndr_flags _flags_save_string = ndr->flags;
19259 4 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19260 4 : if (r->port_name) {
19261 0 : uint32_t _relative_save_offset;
19262 4 : _relative_save_offset = ndr->offset;
19263 4 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->port_name));
19264 4 : _mem_save_port_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
19265 4 : NDR_PULL_SET_MEM_CTX(ndr, r->port_name, 0);
19266 4 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->port_name));
19267 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_name_0, 0);
19268 4 : if (ndr->offset > ndr->relative_highest_offset) {
19269 4 : ndr->relative_highest_offset = ndr->offset;
19270 : }
19271 4 : ndr->offset = _relative_save_offset;
19272 : }
19273 4 : ndr->flags = _flags_save_string;
19274 : }
19275 : }
19276 8 : return NDR_ERR_SUCCESS;
19277 : }
19278 :
19279 0 : static void ndr_print_flags_spoolss_PortInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PortInfo1 *r)
19280 : {
19281 0 : ndr_print_spoolss_PortInfo1(ndr, name, r);
19282 0 : }
19283 :
19284 0 : _PUBLIC_ void ndr_print_spoolss_PortInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfo1 *r)
19285 : {
19286 0 : ndr_print_struct(ndr, name, "spoolss_PortInfo1");
19287 0 : if (r == NULL) { ndr_print_null(ndr); return; }
19288 0 : ndr->depth++;
19289 : {
19290 0 : libndr_flags _flags_save_string = ndr->flags;
19291 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19292 0 : ndr_print_ptr(ndr, "port_name", r->port_name);
19293 0 : ndr->depth++;
19294 0 : if (r->port_name) {
19295 0 : ndr_print_string(ndr, "port_name", r->port_name);
19296 : }
19297 0 : ndr->depth--;
19298 0 : ndr->flags = _flags_save_string;
19299 : }
19300 0 : ndr->depth--;
19301 : }
19302 :
19303 0 : _PUBLIC_ size_t ndr_size_spoolss_PortInfo1(const struct spoolss_PortInfo1 *r, libndr_flags flags)
19304 : {
19305 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfo1);
19306 : }
19307 :
19308 24 : static enum ndr_err_code ndr_push_spoolss_PortType(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
19309 : {
19310 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
19311 24 : return NDR_ERR_SUCCESS;
19312 : }
19313 :
19314 8 : static enum ndr_err_code ndr_pull_spoolss_PortType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
19315 : {
19316 0 : uint32_t v;
19317 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
19318 8 : *r = v;
19319 8 : return NDR_ERR_SUCCESS;
19320 : }
19321 :
19322 0 : _PUBLIC_ void ndr_print_spoolss_PortType(struct ndr_print *ndr, const char *name, uint32_t r)
19323 : {
19324 0 : ndr_print_uint32(ndr, name, r);
19325 0 : ndr->depth++;
19326 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_WRITE", SPOOLSS_PORT_TYPE_WRITE, r);
19327 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_READ", SPOOLSS_PORT_TYPE_READ, r);
19328 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_REDIRECTED", SPOOLSS_PORT_TYPE_REDIRECTED, r);
19329 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_NET_ATTACHED", SPOOLSS_PORT_TYPE_NET_ATTACHED, r);
19330 0 : ndr->depth--;
19331 0 : }
19332 :
19333 48 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PortInfo2 *r)
19334 : {
19335 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
19336 48 : if (ndr_flags & NDR_SCALARS) {
19337 24 : NDR_CHECK(ndr_push_align(ndr, 5));
19338 : {
19339 24 : libndr_flags _flags_save_string = ndr->flags;
19340 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19341 24 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->port_name));
19342 24 : ndr->flags = _flags_save_string;
19343 : }
19344 : {
19345 24 : libndr_flags _flags_save_string = ndr->flags;
19346 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19347 24 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
19348 24 : ndr->flags = _flags_save_string;
19349 : }
19350 : {
19351 24 : libndr_flags _flags_save_string = ndr->flags;
19352 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19353 24 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
19354 24 : ndr->flags = _flags_save_string;
19355 : }
19356 24 : NDR_CHECK(ndr_push_spoolss_PortType(ndr, NDR_SCALARS, r->port_type));
19357 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
19358 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
19359 : }
19360 48 : if (ndr_flags & NDR_BUFFERS) {
19361 : {
19362 24 : libndr_flags _flags_save_string = ndr->flags;
19363 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19364 24 : if (r->port_name) {
19365 24 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->port_name));
19366 24 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->port_name));
19367 24 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->port_name));
19368 : }
19369 24 : ndr->flags = _flags_save_string;
19370 : }
19371 : {
19372 24 : libndr_flags _flags_save_string = ndr->flags;
19373 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19374 24 : if (r->monitor_name) {
19375 24 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->monitor_name));
19376 24 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
19377 24 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->monitor_name));
19378 : }
19379 24 : ndr->flags = _flags_save_string;
19380 : }
19381 : {
19382 24 : libndr_flags _flags_save_string = ndr->flags;
19383 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19384 24 : if (r->description) {
19385 24 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->description));
19386 24 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
19387 24 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->description));
19388 : }
19389 24 : ndr->flags = _flags_save_string;
19390 : }
19391 : }
19392 48 : return NDR_ERR_SUCCESS;
19393 : }
19394 :
19395 16 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PortInfo2 *r)
19396 : {
19397 0 : uint32_t _ptr_port_name;
19398 16 : TALLOC_CTX *_mem_save_port_name_0 = NULL;
19399 0 : uint32_t _ptr_monitor_name;
19400 16 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
19401 0 : uint32_t _ptr_description;
19402 16 : TALLOC_CTX *_mem_save_description_0 = NULL;
19403 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
19404 16 : if (ndr_flags & NDR_SCALARS) {
19405 8 : NDR_CHECK(ndr_pull_align(ndr, 5));
19406 : {
19407 8 : libndr_flags _flags_save_string = ndr->flags;
19408 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19409 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_port_name));
19410 8 : if (_ptr_port_name) {
19411 8 : NDR_PULL_ALLOC(ndr, r->port_name);
19412 8 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->port_name, _ptr_port_name));
19413 : } else {
19414 0 : r->port_name = NULL;
19415 : }
19416 8 : ndr->flags = _flags_save_string;
19417 : }
19418 : {
19419 8 : libndr_flags _flags_save_string = ndr->flags;
19420 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19421 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
19422 8 : if (_ptr_monitor_name) {
19423 8 : NDR_PULL_ALLOC(ndr, r->monitor_name);
19424 8 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
19425 : } else {
19426 0 : r->monitor_name = NULL;
19427 : }
19428 8 : ndr->flags = _flags_save_string;
19429 : }
19430 : {
19431 8 : libndr_flags _flags_save_string = ndr->flags;
19432 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19433 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
19434 8 : if (_ptr_description) {
19435 8 : NDR_PULL_ALLOC(ndr, r->description);
19436 8 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
19437 : } else {
19438 0 : r->description = NULL;
19439 : }
19440 8 : ndr->flags = _flags_save_string;
19441 : }
19442 8 : NDR_CHECK(ndr_pull_spoolss_PortType(ndr, NDR_SCALARS, &r->port_type));
19443 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
19444 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
19445 : }
19446 16 : if (ndr_flags & NDR_BUFFERS) {
19447 : {
19448 8 : libndr_flags _flags_save_string = ndr->flags;
19449 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19450 8 : if (r->port_name) {
19451 0 : uint32_t _relative_save_offset;
19452 8 : _relative_save_offset = ndr->offset;
19453 8 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->port_name));
19454 8 : _mem_save_port_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
19455 8 : NDR_PULL_SET_MEM_CTX(ndr, r->port_name, 0);
19456 8 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->port_name));
19457 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_name_0, 0);
19458 8 : if (ndr->offset > ndr->relative_highest_offset) {
19459 8 : ndr->relative_highest_offset = ndr->offset;
19460 : }
19461 8 : ndr->offset = _relative_save_offset;
19462 : }
19463 8 : ndr->flags = _flags_save_string;
19464 : }
19465 : {
19466 8 : libndr_flags _flags_save_string = ndr->flags;
19467 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19468 8 : if (r->monitor_name) {
19469 0 : uint32_t _relative_save_offset;
19470 8 : _relative_save_offset = ndr->offset;
19471 8 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
19472 8 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
19473 8 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
19474 8 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
19475 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
19476 8 : if (ndr->offset > ndr->relative_highest_offset) {
19477 0 : ndr->relative_highest_offset = ndr->offset;
19478 : }
19479 8 : ndr->offset = _relative_save_offset;
19480 : }
19481 8 : ndr->flags = _flags_save_string;
19482 : }
19483 : {
19484 8 : libndr_flags _flags_save_string = ndr->flags;
19485 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19486 8 : if (r->description) {
19487 0 : uint32_t _relative_save_offset;
19488 8 : _relative_save_offset = ndr->offset;
19489 8 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
19490 8 : _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
19491 8 : NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
19492 8 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
19493 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
19494 8 : if (ndr->offset > ndr->relative_highest_offset) {
19495 0 : ndr->relative_highest_offset = ndr->offset;
19496 : }
19497 8 : ndr->offset = _relative_save_offset;
19498 : }
19499 8 : ndr->flags = _flags_save_string;
19500 : }
19501 : }
19502 16 : return NDR_ERR_SUCCESS;
19503 : }
19504 :
19505 0 : static void ndr_print_flags_spoolss_PortInfo2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PortInfo2 *r)
19506 : {
19507 0 : ndr_print_spoolss_PortInfo2(ndr, name, r);
19508 0 : }
19509 :
19510 0 : _PUBLIC_ void ndr_print_spoolss_PortInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfo2 *r)
19511 : {
19512 0 : ndr_print_struct(ndr, name, "spoolss_PortInfo2");
19513 0 : if (r == NULL) { ndr_print_null(ndr); return; }
19514 0 : ndr->depth++;
19515 : {
19516 0 : libndr_flags _flags_save_string = ndr->flags;
19517 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19518 0 : ndr_print_ptr(ndr, "port_name", r->port_name);
19519 0 : ndr->depth++;
19520 0 : if (r->port_name) {
19521 0 : ndr_print_string(ndr, "port_name", r->port_name);
19522 : }
19523 0 : ndr->depth--;
19524 0 : ndr->flags = _flags_save_string;
19525 : }
19526 : {
19527 0 : libndr_flags _flags_save_string = ndr->flags;
19528 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19529 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
19530 0 : ndr->depth++;
19531 0 : if (r->monitor_name) {
19532 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
19533 : }
19534 0 : ndr->depth--;
19535 0 : ndr->flags = _flags_save_string;
19536 : }
19537 : {
19538 0 : libndr_flags _flags_save_string = ndr->flags;
19539 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19540 0 : ndr_print_ptr(ndr, "description", r->description);
19541 0 : ndr->depth++;
19542 0 : if (r->description) {
19543 0 : ndr_print_string(ndr, "description", r->description);
19544 : }
19545 0 : ndr->depth--;
19546 0 : ndr->flags = _flags_save_string;
19547 : }
19548 0 : ndr_print_spoolss_PortType(ndr, "port_type", r->port_type);
19549 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
19550 0 : ndr->depth--;
19551 : }
19552 :
19553 0 : _PUBLIC_ size_t ndr_size_spoolss_PortInfo2(const struct spoolss_PortInfo2 *r, libndr_flags flags)
19554 : {
19555 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfo2);
19556 : }
19557 :
19558 0 : static enum ndr_err_code ndr_push_spoolss_PortStatus(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_PortStatus r)
19559 : {
19560 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
19561 0 : return NDR_ERR_SUCCESS;
19562 : }
19563 :
19564 0 : static enum ndr_err_code ndr_pull_spoolss_PortStatus(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_PortStatus *r)
19565 : {
19566 0 : uint32_t v;
19567 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
19568 0 : *r = v;
19569 0 : return NDR_ERR_SUCCESS;
19570 : }
19571 :
19572 0 : _PUBLIC_ void ndr_print_spoolss_PortStatus(struct ndr_print *ndr, const char *name, enum spoolss_PortStatus r)
19573 : {
19574 0 : const char *val = NULL;
19575 :
19576 0 : switch (r) {
19577 0 : case PORT_STATUS_CLEAR: val = "PORT_STATUS_CLEAR"; break;
19578 0 : case PORT_STATUS_OFFLINE: val = "PORT_STATUS_OFFLINE"; break;
19579 0 : case PORT_STATUS_PAPER_JAM: val = "PORT_STATUS_PAPER_JAM"; break;
19580 0 : case PORT_STATUS_PAPER_OUT: val = "PORT_STATUS_PAPER_OUT"; break;
19581 0 : case PORT_STATUS_OUTPUT_BIN_FULL: val = "PORT_STATUS_OUTPUT_BIN_FULL"; break;
19582 0 : case PORT_STATUS_PAPER_PROBLEM: val = "PORT_STATUS_PAPER_PROBLEM"; break;
19583 0 : case PORT_STATUS_NO_TONER: val = "PORT_STATUS_NO_TONER"; break;
19584 0 : case PORT_STATUS_DOOR_OPEN: val = "PORT_STATUS_DOOR_OPEN"; break;
19585 0 : case PORT_STATUS_USER_INTERVENTION: val = "PORT_STATUS_USER_INTERVENTION"; break;
19586 0 : case PORT_STATUS_OUT_OF_MEMORY: val = "PORT_STATUS_OUT_OF_MEMORY"; break;
19587 0 : case PORT_STATUS_TONER_LOW: val = "PORT_STATUS_TONER_LOW"; break;
19588 0 : case PORT_STATUS_WARMING_UP: val = "PORT_STATUS_WARMING_UP"; break;
19589 0 : case PORT_STATUS_POWER_SAVE: val = "PORT_STATUS_POWER_SAVE"; break;
19590 : }
19591 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
19592 0 : }
19593 :
19594 0 : static enum ndr_err_code ndr_push_spoolss_PortSeverity(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_PortSeverity r)
19595 : {
19596 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
19597 0 : return NDR_ERR_SUCCESS;
19598 : }
19599 :
19600 0 : static enum ndr_err_code ndr_pull_spoolss_PortSeverity(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_PortSeverity *r)
19601 : {
19602 0 : uint32_t v;
19603 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
19604 0 : *r = v;
19605 0 : return NDR_ERR_SUCCESS;
19606 : }
19607 :
19608 0 : _PUBLIC_ void ndr_print_spoolss_PortSeverity(struct ndr_print *ndr, const char *name, enum spoolss_PortSeverity r)
19609 : {
19610 0 : const char *val = NULL;
19611 :
19612 0 : switch (r) {
19613 0 : case PORT_STATUS_TYPE_ERROR: val = "PORT_STATUS_TYPE_ERROR"; break;
19614 0 : case PORT_STATUS_TYPE_WARNING: val = "PORT_STATUS_TYPE_WARNING"; break;
19615 0 : case PORT_STATUS_TYPE_INFO: val = "PORT_STATUS_TYPE_INFO"; break;
19616 : }
19617 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
19618 0 : }
19619 :
19620 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PortInfo3 *r)
19621 : {
19622 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
19623 0 : if (ndr_flags & NDR_SCALARS) {
19624 0 : NDR_CHECK(ndr_push_align(ndr, 5));
19625 0 : NDR_CHECK(ndr_push_spoolss_PortStatus(ndr, NDR_SCALARS, r->status));
19626 : {
19627 0 : libndr_flags _flags_save_string = ndr->flags;
19628 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19629 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->status_string));
19630 0 : ndr->flags = _flags_save_string;
19631 : }
19632 0 : NDR_CHECK(ndr_push_spoolss_PortSeverity(ndr, NDR_SCALARS, r->severity));
19633 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
19634 : }
19635 0 : if (ndr_flags & NDR_BUFFERS) {
19636 : {
19637 0 : libndr_flags _flags_save_string = ndr->flags;
19638 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19639 0 : if (r->status_string) {
19640 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->status_string));
19641 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->status_string));
19642 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->status_string));
19643 : }
19644 0 : ndr->flags = _flags_save_string;
19645 : }
19646 : }
19647 0 : return NDR_ERR_SUCCESS;
19648 : }
19649 :
19650 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PortInfo3 *r)
19651 : {
19652 0 : uint32_t _ptr_status_string;
19653 0 : TALLOC_CTX *_mem_save_status_string_0 = NULL;
19654 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
19655 0 : if (ndr_flags & NDR_SCALARS) {
19656 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
19657 0 : NDR_CHECK(ndr_pull_spoolss_PortStatus(ndr, NDR_SCALARS, &r->status));
19658 : {
19659 0 : libndr_flags _flags_save_string = ndr->flags;
19660 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19661 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_status_string));
19662 0 : if (_ptr_status_string) {
19663 0 : NDR_PULL_ALLOC(ndr, r->status_string);
19664 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->status_string, _ptr_status_string));
19665 : } else {
19666 0 : r->status_string = NULL;
19667 : }
19668 0 : ndr->flags = _flags_save_string;
19669 : }
19670 0 : NDR_CHECK(ndr_pull_spoolss_PortSeverity(ndr, NDR_SCALARS, &r->severity));
19671 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
19672 : }
19673 0 : if (ndr_flags & NDR_BUFFERS) {
19674 : {
19675 0 : libndr_flags _flags_save_string = ndr->flags;
19676 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19677 0 : if (r->status_string) {
19678 0 : uint32_t _relative_save_offset;
19679 0 : _relative_save_offset = ndr->offset;
19680 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->status_string));
19681 0 : _mem_save_status_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
19682 0 : NDR_PULL_SET_MEM_CTX(ndr, r->status_string, 0);
19683 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->status_string));
19684 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_string_0, 0);
19685 0 : if (ndr->offset > ndr->relative_highest_offset) {
19686 0 : ndr->relative_highest_offset = ndr->offset;
19687 : }
19688 0 : ndr->offset = _relative_save_offset;
19689 : }
19690 0 : ndr->flags = _flags_save_string;
19691 : }
19692 : }
19693 0 : return NDR_ERR_SUCCESS;
19694 : }
19695 :
19696 0 : static void ndr_print_flags_spoolss_PortInfo3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PortInfo3 *r)
19697 : {
19698 0 : ndr_print_spoolss_PortInfo3(ndr, name, r);
19699 0 : }
19700 :
19701 0 : _PUBLIC_ void ndr_print_spoolss_PortInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfo3 *r)
19702 : {
19703 0 : ndr_print_struct(ndr, name, "spoolss_PortInfo3");
19704 0 : if (r == NULL) { ndr_print_null(ndr); return; }
19705 0 : ndr->depth++;
19706 0 : ndr_print_spoolss_PortStatus(ndr, "status", r->status);
19707 : {
19708 0 : libndr_flags _flags_save_string = ndr->flags;
19709 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19710 0 : ndr_print_ptr(ndr, "status_string", r->status_string);
19711 0 : ndr->depth++;
19712 0 : if (r->status_string) {
19713 0 : ndr_print_string(ndr, "status_string", r->status_string);
19714 : }
19715 0 : ndr->depth--;
19716 0 : ndr->flags = _flags_save_string;
19717 : }
19718 0 : ndr_print_spoolss_PortSeverity(ndr, "severity", r->severity);
19719 0 : ndr->depth--;
19720 : }
19721 :
19722 0 : _PUBLIC_ size_t ndr_size_spoolss_PortInfo3(const struct spoolss_PortInfo3 *r, libndr_flags flags)
19723 : {
19724 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfo3);
19725 : }
19726 :
19727 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfoFF(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PortInfoFF *r)
19728 : {
19729 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
19730 0 : if (ndr_flags & NDR_SCALARS) {
19731 0 : NDR_CHECK(ndr_push_align(ndr, 5));
19732 : {
19733 0 : libndr_flags _flags_save_string = ndr->flags;
19734 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19735 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->port_name));
19736 0 : ndr->flags = _flags_save_string;
19737 : }
19738 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->monitor_data));
19739 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
19740 : }
19741 0 : if (ndr_flags & NDR_BUFFERS) {
19742 : {
19743 0 : libndr_flags _flags_save_string = ndr->flags;
19744 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19745 0 : if (r->port_name) {
19746 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->port_name));
19747 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->port_name));
19748 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->port_name));
19749 : }
19750 0 : ndr->flags = _flags_save_string;
19751 : }
19752 : }
19753 0 : return NDR_ERR_SUCCESS;
19754 : }
19755 :
19756 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfoFF(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PortInfoFF *r)
19757 : {
19758 0 : uint32_t _ptr_port_name;
19759 0 : TALLOC_CTX *_mem_save_port_name_0 = NULL;
19760 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
19761 0 : if (ndr_flags & NDR_SCALARS) {
19762 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
19763 : {
19764 0 : libndr_flags _flags_save_string = ndr->flags;
19765 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19766 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_port_name));
19767 0 : if (_ptr_port_name) {
19768 0 : NDR_PULL_ALLOC(ndr, r->port_name);
19769 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->port_name, _ptr_port_name));
19770 : } else {
19771 0 : r->port_name = NULL;
19772 : }
19773 0 : ndr->flags = _flags_save_string;
19774 : }
19775 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->monitor_data));
19776 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
19777 : }
19778 0 : if (ndr_flags & NDR_BUFFERS) {
19779 : {
19780 0 : libndr_flags _flags_save_string = ndr->flags;
19781 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19782 0 : if (r->port_name) {
19783 0 : uint32_t _relative_save_offset;
19784 0 : _relative_save_offset = ndr->offset;
19785 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->port_name));
19786 0 : _mem_save_port_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
19787 0 : NDR_PULL_SET_MEM_CTX(ndr, r->port_name, 0);
19788 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->port_name));
19789 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_name_0, 0);
19790 0 : if (ndr->offset > ndr->relative_highest_offset) {
19791 0 : ndr->relative_highest_offset = ndr->offset;
19792 : }
19793 0 : ndr->offset = _relative_save_offset;
19794 : }
19795 0 : ndr->flags = _flags_save_string;
19796 : }
19797 : }
19798 0 : return NDR_ERR_SUCCESS;
19799 : }
19800 :
19801 0 : static void ndr_print_flags_spoolss_PortInfoFF(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PortInfoFF *r)
19802 : {
19803 0 : ndr_print_spoolss_PortInfoFF(ndr, name, r);
19804 0 : }
19805 :
19806 0 : _PUBLIC_ void ndr_print_spoolss_PortInfoFF(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfoFF *r)
19807 : {
19808 0 : ndr_print_struct(ndr, name, "spoolss_PortInfoFF");
19809 0 : if (r == NULL) { ndr_print_null(ndr); return; }
19810 0 : ndr->depth++;
19811 : {
19812 0 : libndr_flags _flags_save_string = ndr->flags;
19813 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19814 0 : ndr_print_ptr(ndr, "port_name", r->port_name);
19815 0 : ndr->depth++;
19816 0 : if (r->port_name) {
19817 0 : ndr_print_string(ndr, "port_name", r->port_name);
19818 : }
19819 0 : ndr->depth--;
19820 0 : ndr->flags = _flags_save_string;
19821 : }
19822 0 : ndr_print_DATA_BLOB(ndr, "monitor_data", r->monitor_data);
19823 0 : ndr->depth--;
19824 : }
19825 :
19826 0 : _PUBLIC_ size_t ndr_size_spoolss_PortInfoFF(const struct spoolss_PortInfoFF *r, libndr_flags flags)
19827 : {
19828 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfoFF);
19829 : }
19830 :
19831 72 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_PortInfo *r)
19832 : {
19833 72 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
19834 0 : uint32_t level;
19835 : {
19836 72 : libndr_flags _flags_save_UNION = ndr->flags;
19837 72 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
19838 72 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
19839 72 : if (ndr_flags & NDR_SCALARS) {
19840 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
19841 36 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
19842 36 : NDR_CHECK(ndr_push_union_align(ndr, 5));
19843 36 : switch (level) {
19844 12 : case 1: {
19845 12 : NDR_CHECK(ndr_push_align(ndr, 5));
19846 12 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
19847 12 : NDR_CHECK(ndr_push_spoolss_PortInfo1(ndr, NDR_SCALARS, &r->info1));
19848 12 : break; }
19849 :
19850 24 : case 2: {
19851 24 : NDR_CHECK(ndr_push_align(ndr, 5));
19852 24 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
19853 24 : NDR_CHECK(ndr_push_spoolss_PortInfo2(ndr, NDR_SCALARS, &r->info2));
19854 24 : break; }
19855 :
19856 0 : case 3: {
19857 0 : NDR_CHECK(ndr_push_align(ndr, 5));
19858 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
19859 0 : NDR_CHECK(ndr_push_spoolss_PortInfo3(ndr, NDR_SCALARS, &r->info3));
19860 0 : break; }
19861 :
19862 0 : case 0xff: {
19863 0 : NDR_CHECK(ndr_push_align(ndr, 5));
19864 0 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
19865 0 : NDR_CHECK(ndr_push_spoolss_PortInfoFF(ndr, NDR_SCALARS, &r->infoFF));
19866 0 : break; }
19867 :
19868 0 : default: {
19869 0 : break; }
19870 :
19871 : }
19872 : }
19873 72 : if (ndr_flags & NDR_BUFFERS) {
19874 36 : if (!(ndr_flags & NDR_SCALARS)) {
19875 : /* We didn't get it above, and the token is not needed after this. */
19876 36 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
19877 : }
19878 36 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
19879 36 : switch (level) {
19880 12 : case 1:
19881 12 : NDR_CHECK(ndr_push_spoolss_PortInfo1(ndr, NDR_BUFFERS, &r->info1));
19882 12 : break;
19883 :
19884 24 : case 2:
19885 24 : NDR_CHECK(ndr_push_spoolss_PortInfo2(ndr, NDR_BUFFERS, &r->info2));
19886 24 : break;
19887 :
19888 0 : case 3:
19889 0 : NDR_CHECK(ndr_push_spoolss_PortInfo3(ndr, NDR_BUFFERS, &r->info3));
19890 0 : break;
19891 :
19892 0 : case 0xff:
19893 0 : NDR_CHECK(ndr_push_spoolss_PortInfoFF(ndr, NDR_BUFFERS, &r->infoFF));
19894 0 : break;
19895 :
19896 0 : default:
19897 0 : break;
19898 :
19899 : }
19900 : }
19901 72 : ndr->flags = _flags_save_UNION;
19902 : }
19903 72 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
19904 72 : return NDR_ERR_SUCCESS;
19905 : }
19906 :
19907 24 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_PortInfo *r)
19908 : {
19909 24 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
19910 0 : uint32_t level;
19911 : {
19912 24 : libndr_flags _flags_save_UNION = ndr->flags;
19913 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
19914 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
19915 24 : if (ndr_flags & NDR_SCALARS) {
19916 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
19917 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
19918 12 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
19919 12 : switch (level) {
19920 4 : case 1: {
19921 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
19922 4 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
19923 4 : NDR_CHECK(ndr_pull_spoolss_PortInfo1(ndr, NDR_SCALARS, &r->info1));
19924 4 : break; }
19925 :
19926 8 : case 2: {
19927 8 : NDR_CHECK(ndr_pull_align(ndr, 5));
19928 8 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
19929 8 : NDR_CHECK(ndr_pull_spoolss_PortInfo2(ndr, NDR_SCALARS, &r->info2));
19930 8 : break; }
19931 :
19932 0 : case 3: {
19933 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
19934 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
19935 0 : NDR_CHECK(ndr_pull_spoolss_PortInfo3(ndr, NDR_SCALARS, &r->info3));
19936 0 : break; }
19937 :
19938 0 : case 0xff: {
19939 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
19940 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
19941 0 : NDR_CHECK(ndr_pull_spoolss_PortInfoFF(ndr, NDR_SCALARS, &r->infoFF));
19942 0 : break; }
19943 :
19944 0 : default: {
19945 0 : break; }
19946 :
19947 : }
19948 : }
19949 24 : if (ndr_flags & NDR_BUFFERS) {
19950 12 : if (!(ndr_flags & NDR_SCALARS)) {
19951 : /* We didn't get it above, and the token is not needed after this. */
19952 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
19953 : }
19954 12 : switch (level) {
19955 4 : case 1:
19956 4 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
19957 4 : NDR_CHECK(ndr_pull_spoolss_PortInfo1(ndr, NDR_BUFFERS, &r->info1));
19958 4 : break;
19959 :
19960 8 : case 2:
19961 8 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
19962 8 : NDR_CHECK(ndr_pull_spoolss_PortInfo2(ndr, NDR_BUFFERS, &r->info2));
19963 8 : break;
19964 :
19965 0 : case 3:
19966 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
19967 0 : NDR_CHECK(ndr_pull_spoolss_PortInfo3(ndr, NDR_BUFFERS, &r->info3));
19968 0 : break;
19969 :
19970 0 : case 0xff:
19971 0 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
19972 0 : NDR_CHECK(ndr_pull_spoolss_PortInfoFF(ndr, NDR_BUFFERS, &r->infoFF));
19973 0 : break;
19974 :
19975 0 : default:
19976 0 : break;
19977 :
19978 : }
19979 : }
19980 24 : ndr->flags = _flags_save_UNION;
19981 : }
19982 24 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
19983 24 : return NDR_ERR_SUCCESS;
19984 : }
19985 :
19986 0 : _PUBLIC_ void ndr_print_spoolss_PortInfo(struct ndr_print *ndr, const char *name, const union spoolss_PortInfo *r)
19987 : {
19988 0 : uint32_t level;
19989 : {
19990 0 : libndr_flags _flags_save_UNION = ndr->flags;
19991 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
19992 0 : level = ndr_print_steal_switch_value(ndr, r);
19993 0 : ndr_print_union(ndr, name, level, "spoolss_PortInfo");
19994 0 : switch (level) {
19995 0 : case 1:
19996 0 : ndr_print_spoolss_PortInfo1(ndr, "info1", &r->info1);
19997 0 : break;
19998 :
19999 0 : case 2:
20000 0 : ndr_print_spoolss_PortInfo2(ndr, "info2", &r->info2);
20001 0 : break;
20002 :
20003 0 : case 3:
20004 0 : ndr_print_spoolss_PortInfo3(ndr, "info3", &r->info3);
20005 0 : break;
20006 :
20007 0 : case 0xff:
20008 0 : ndr_print_spoolss_PortInfoFF(ndr, "infoFF", &r->infoFF);
20009 0 : break;
20010 :
20011 0 : default:
20012 0 : break;
20013 :
20014 : }
20015 0 : ndr->flags = _flags_save_UNION;
20016 : }
20017 0 : }
20018 :
20019 48 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_MonitorInfo1 *r)
20020 : {
20021 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
20022 48 : if (ndr_flags & NDR_SCALARS) {
20023 24 : NDR_CHECK(ndr_push_align(ndr, 5));
20024 : {
20025 24 : libndr_flags _flags_save_string = ndr->flags;
20026 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20027 24 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
20028 24 : ndr->flags = _flags_save_string;
20029 : }
20030 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
20031 : }
20032 48 : if (ndr_flags & NDR_BUFFERS) {
20033 : {
20034 24 : libndr_flags _flags_save_string = ndr->flags;
20035 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20036 24 : if (r->monitor_name) {
20037 24 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->monitor_name));
20038 24 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
20039 24 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->monitor_name));
20040 : }
20041 24 : ndr->flags = _flags_save_string;
20042 : }
20043 : }
20044 48 : return NDR_ERR_SUCCESS;
20045 : }
20046 :
20047 16 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_MonitorInfo1 *r)
20048 : {
20049 0 : uint32_t _ptr_monitor_name;
20050 16 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
20051 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
20052 16 : if (ndr_flags & NDR_SCALARS) {
20053 8 : NDR_CHECK(ndr_pull_align(ndr, 5));
20054 : {
20055 8 : libndr_flags _flags_save_string = ndr->flags;
20056 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20057 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
20058 8 : if (_ptr_monitor_name) {
20059 8 : NDR_PULL_ALLOC(ndr, r->monitor_name);
20060 8 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
20061 : } else {
20062 0 : r->monitor_name = NULL;
20063 : }
20064 8 : ndr->flags = _flags_save_string;
20065 : }
20066 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
20067 : }
20068 16 : if (ndr_flags & NDR_BUFFERS) {
20069 : {
20070 8 : libndr_flags _flags_save_string = ndr->flags;
20071 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20072 8 : if (r->monitor_name) {
20073 0 : uint32_t _relative_save_offset;
20074 8 : _relative_save_offset = ndr->offset;
20075 8 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
20076 8 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
20077 8 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
20078 8 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
20079 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
20080 8 : if (ndr->offset > ndr->relative_highest_offset) {
20081 4 : ndr->relative_highest_offset = ndr->offset;
20082 : }
20083 8 : ndr->offset = _relative_save_offset;
20084 : }
20085 8 : ndr->flags = _flags_save_string;
20086 : }
20087 : }
20088 16 : return NDR_ERR_SUCCESS;
20089 : }
20090 :
20091 0 : static void ndr_print_flags_spoolss_MonitorInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_MonitorInfo1 *r)
20092 : {
20093 0 : ndr_print_spoolss_MonitorInfo1(ndr, name, r);
20094 0 : }
20095 :
20096 0 : _PUBLIC_ void ndr_print_spoolss_MonitorInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_MonitorInfo1 *r)
20097 : {
20098 0 : ndr_print_struct(ndr, name, "spoolss_MonitorInfo1");
20099 0 : if (r == NULL) { ndr_print_null(ndr); return; }
20100 0 : ndr->depth++;
20101 : {
20102 0 : libndr_flags _flags_save_string = ndr->flags;
20103 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20104 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
20105 0 : ndr->depth++;
20106 0 : if (r->monitor_name) {
20107 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
20108 : }
20109 0 : ndr->depth--;
20110 0 : ndr->flags = _flags_save_string;
20111 : }
20112 0 : ndr->depth--;
20113 : }
20114 :
20115 0 : _PUBLIC_ size_t ndr_size_spoolss_MonitorInfo1(const struct spoolss_MonitorInfo1 *r, libndr_flags flags)
20116 : {
20117 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_MonitorInfo1);
20118 : }
20119 :
20120 48 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_MonitorInfo2 *r)
20121 : {
20122 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
20123 48 : if (ndr_flags & NDR_SCALARS) {
20124 24 : NDR_CHECK(ndr_push_align(ndr, 5));
20125 : {
20126 24 : libndr_flags _flags_save_string = ndr->flags;
20127 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20128 24 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
20129 24 : ndr->flags = _flags_save_string;
20130 : }
20131 : {
20132 24 : libndr_flags _flags_save_string = ndr->flags;
20133 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20134 24 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->environment));
20135 24 : ndr->flags = _flags_save_string;
20136 : }
20137 : {
20138 24 : libndr_flags _flags_save_string = ndr->flags;
20139 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20140 24 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dll_name));
20141 24 : ndr->flags = _flags_save_string;
20142 : }
20143 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
20144 : }
20145 48 : if (ndr_flags & NDR_BUFFERS) {
20146 : {
20147 24 : libndr_flags _flags_save_string = ndr->flags;
20148 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20149 24 : if (r->monitor_name) {
20150 24 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->monitor_name));
20151 24 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
20152 24 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->monitor_name));
20153 : }
20154 24 : ndr->flags = _flags_save_string;
20155 : }
20156 : {
20157 24 : libndr_flags _flags_save_string = ndr->flags;
20158 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20159 24 : if (r->environment) {
20160 24 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->environment));
20161 24 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->environment));
20162 24 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->environment));
20163 : }
20164 24 : ndr->flags = _flags_save_string;
20165 : }
20166 : {
20167 24 : libndr_flags _flags_save_string = ndr->flags;
20168 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20169 24 : if (r->dll_name) {
20170 24 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->dll_name));
20171 24 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dll_name));
20172 24 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->dll_name));
20173 : }
20174 24 : ndr->flags = _flags_save_string;
20175 : }
20176 : }
20177 48 : return NDR_ERR_SUCCESS;
20178 : }
20179 :
20180 16 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_MonitorInfo2 *r)
20181 : {
20182 0 : uint32_t _ptr_monitor_name;
20183 16 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
20184 0 : uint32_t _ptr_environment;
20185 16 : TALLOC_CTX *_mem_save_environment_0 = NULL;
20186 0 : uint32_t _ptr_dll_name;
20187 16 : TALLOC_CTX *_mem_save_dll_name_0 = NULL;
20188 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
20189 16 : if (ndr_flags & NDR_SCALARS) {
20190 8 : NDR_CHECK(ndr_pull_align(ndr, 5));
20191 : {
20192 8 : libndr_flags _flags_save_string = ndr->flags;
20193 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20194 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
20195 8 : if (_ptr_monitor_name) {
20196 8 : NDR_PULL_ALLOC(ndr, r->monitor_name);
20197 8 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
20198 : } else {
20199 0 : r->monitor_name = NULL;
20200 : }
20201 8 : ndr->flags = _flags_save_string;
20202 : }
20203 : {
20204 8 : libndr_flags _flags_save_string = ndr->flags;
20205 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20206 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
20207 8 : if (_ptr_environment) {
20208 8 : NDR_PULL_ALLOC(ndr, r->environment);
20209 8 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->environment, _ptr_environment));
20210 : } else {
20211 0 : r->environment = NULL;
20212 : }
20213 8 : ndr->flags = _flags_save_string;
20214 : }
20215 : {
20216 8 : libndr_flags _flags_save_string = ndr->flags;
20217 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20218 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dll_name));
20219 8 : if (_ptr_dll_name) {
20220 8 : NDR_PULL_ALLOC(ndr, r->dll_name);
20221 8 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dll_name, _ptr_dll_name));
20222 : } else {
20223 0 : r->dll_name = NULL;
20224 : }
20225 8 : ndr->flags = _flags_save_string;
20226 : }
20227 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
20228 : }
20229 16 : if (ndr_flags & NDR_BUFFERS) {
20230 : {
20231 8 : libndr_flags _flags_save_string = ndr->flags;
20232 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20233 8 : if (r->monitor_name) {
20234 0 : uint32_t _relative_save_offset;
20235 8 : _relative_save_offset = ndr->offset;
20236 8 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
20237 8 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
20238 8 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
20239 8 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
20240 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
20241 8 : if (ndr->offset > ndr->relative_highest_offset) {
20242 4 : ndr->relative_highest_offset = ndr->offset;
20243 : }
20244 8 : ndr->offset = _relative_save_offset;
20245 : }
20246 8 : ndr->flags = _flags_save_string;
20247 : }
20248 : {
20249 8 : libndr_flags _flags_save_string = ndr->flags;
20250 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20251 8 : if (r->environment) {
20252 0 : uint32_t _relative_save_offset;
20253 8 : _relative_save_offset = ndr->offset;
20254 8 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->environment));
20255 8 : _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
20256 8 : NDR_PULL_SET_MEM_CTX(ndr, r->environment, 0);
20257 8 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->environment));
20258 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
20259 8 : if (ndr->offset > ndr->relative_highest_offset) {
20260 0 : ndr->relative_highest_offset = ndr->offset;
20261 : }
20262 8 : ndr->offset = _relative_save_offset;
20263 : }
20264 8 : ndr->flags = _flags_save_string;
20265 : }
20266 : {
20267 8 : libndr_flags _flags_save_string = ndr->flags;
20268 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20269 8 : if (r->dll_name) {
20270 0 : uint32_t _relative_save_offset;
20271 8 : _relative_save_offset = ndr->offset;
20272 8 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dll_name));
20273 8 : _mem_save_dll_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
20274 8 : NDR_PULL_SET_MEM_CTX(ndr, r->dll_name, 0);
20275 8 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dll_name));
20276 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dll_name_0, 0);
20277 8 : if (ndr->offset > ndr->relative_highest_offset) {
20278 0 : ndr->relative_highest_offset = ndr->offset;
20279 : }
20280 8 : ndr->offset = _relative_save_offset;
20281 : }
20282 8 : ndr->flags = _flags_save_string;
20283 : }
20284 : }
20285 16 : return NDR_ERR_SUCCESS;
20286 : }
20287 :
20288 0 : static void ndr_print_flags_spoolss_MonitorInfo2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_MonitorInfo2 *r)
20289 : {
20290 0 : ndr_print_spoolss_MonitorInfo2(ndr, name, r);
20291 0 : }
20292 :
20293 0 : _PUBLIC_ void ndr_print_spoolss_MonitorInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_MonitorInfo2 *r)
20294 : {
20295 0 : ndr_print_struct(ndr, name, "spoolss_MonitorInfo2");
20296 0 : if (r == NULL) { ndr_print_null(ndr); return; }
20297 0 : ndr->depth++;
20298 : {
20299 0 : libndr_flags _flags_save_string = ndr->flags;
20300 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20301 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
20302 0 : ndr->depth++;
20303 0 : if (r->monitor_name) {
20304 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
20305 : }
20306 0 : ndr->depth--;
20307 0 : ndr->flags = _flags_save_string;
20308 : }
20309 : {
20310 0 : libndr_flags _flags_save_string = ndr->flags;
20311 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20312 0 : ndr_print_ptr(ndr, "environment", r->environment);
20313 0 : ndr->depth++;
20314 0 : if (r->environment) {
20315 0 : ndr_print_string(ndr, "environment", r->environment);
20316 : }
20317 0 : ndr->depth--;
20318 0 : ndr->flags = _flags_save_string;
20319 : }
20320 : {
20321 0 : libndr_flags _flags_save_string = ndr->flags;
20322 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
20323 0 : ndr_print_ptr(ndr, "dll_name", r->dll_name);
20324 0 : ndr->depth++;
20325 0 : if (r->dll_name) {
20326 0 : ndr_print_string(ndr, "dll_name", r->dll_name);
20327 : }
20328 0 : ndr->depth--;
20329 0 : ndr->flags = _flags_save_string;
20330 : }
20331 0 : ndr->depth--;
20332 : }
20333 :
20334 0 : _PUBLIC_ size_t ndr_size_spoolss_MonitorInfo2(const struct spoolss_MonitorInfo2 *r, libndr_flags flags)
20335 : {
20336 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_MonitorInfo2);
20337 : }
20338 :
20339 96 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_MonitorInfo *r)
20340 : {
20341 96 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
20342 0 : uint32_t level;
20343 : {
20344 96 : libndr_flags _flags_save_UNION = ndr->flags;
20345 96 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
20346 96 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
20347 96 : if (ndr_flags & NDR_SCALARS) {
20348 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
20349 48 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
20350 48 : NDR_CHECK(ndr_push_union_align(ndr, 5));
20351 48 : switch (level) {
20352 24 : case 1: {
20353 24 : NDR_CHECK(ndr_push_align(ndr, 5));
20354 24 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
20355 24 : NDR_CHECK(ndr_push_spoolss_MonitorInfo1(ndr, NDR_SCALARS, &r->info1));
20356 24 : break; }
20357 :
20358 24 : case 2: {
20359 24 : NDR_CHECK(ndr_push_align(ndr, 5));
20360 24 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
20361 24 : NDR_CHECK(ndr_push_spoolss_MonitorInfo2(ndr, NDR_SCALARS, &r->info2));
20362 24 : break; }
20363 :
20364 0 : default: {
20365 0 : break; }
20366 :
20367 : }
20368 : }
20369 96 : if (ndr_flags & NDR_BUFFERS) {
20370 48 : if (!(ndr_flags & NDR_SCALARS)) {
20371 : /* We didn't get it above, and the token is not needed after this. */
20372 48 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
20373 : }
20374 48 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
20375 48 : switch (level) {
20376 24 : case 1:
20377 24 : NDR_CHECK(ndr_push_spoolss_MonitorInfo1(ndr, NDR_BUFFERS, &r->info1));
20378 24 : break;
20379 :
20380 24 : case 2:
20381 24 : NDR_CHECK(ndr_push_spoolss_MonitorInfo2(ndr, NDR_BUFFERS, &r->info2));
20382 24 : break;
20383 :
20384 0 : default:
20385 0 : break;
20386 :
20387 : }
20388 : }
20389 96 : ndr->flags = _flags_save_UNION;
20390 : }
20391 96 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
20392 96 : return NDR_ERR_SUCCESS;
20393 : }
20394 :
20395 32 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_MonitorInfo *r)
20396 : {
20397 32 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
20398 0 : uint32_t level;
20399 : {
20400 32 : libndr_flags _flags_save_UNION = ndr->flags;
20401 32 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
20402 32 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
20403 32 : if (ndr_flags & NDR_SCALARS) {
20404 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
20405 16 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
20406 16 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
20407 16 : switch (level) {
20408 8 : case 1: {
20409 8 : NDR_CHECK(ndr_pull_align(ndr, 5));
20410 8 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
20411 8 : NDR_CHECK(ndr_pull_spoolss_MonitorInfo1(ndr, NDR_SCALARS, &r->info1));
20412 8 : break; }
20413 :
20414 8 : case 2: {
20415 8 : NDR_CHECK(ndr_pull_align(ndr, 5));
20416 8 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
20417 8 : NDR_CHECK(ndr_pull_spoolss_MonitorInfo2(ndr, NDR_SCALARS, &r->info2));
20418 8 : break; }
20419 :
20420 0 : default: {
20421 0 : break; }
20422 :
20423 : }
20424 : }
20425 32 : if (ndr_flags & NDR_BUFFERS) {
20426 16 : if (!(ndr_flags & NDR_SCALARS)) {
20427 : /* We didn't get it above, and the token is not needed after this. */
20428 16 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
20429 : }
20430 16 : switch (level) {
20431 8 : case 1:
20432 8 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
20433 8 : NDR_CHECK(ndr_pull_spoolss_MonitorInfo1(ndr, NDR_BUFFERS, &r->info1));
20434 8 : break;
20435 :
20436 8 : case 2:
20437 8 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
20438 8 : NDR_CHECK(ndr_pull_spoolss_MonitorInfo2(ndr, NDR_BUFFERS, &r->info2));
20439 8 : break;
20440 :
20441 0 : default:
20442 0 : break;
20443 :
20444 : }
20445 : }
20446 32 : ndr->flags = _flags_save_UNION;
20447 : }
20448 32 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
20449 32 : return NDR_ERR_SUCCESS;
20450 : }
20451 :
20452 0 : _PUBLIC_ void ndr_print_spoolss_MonitorInfo(struct ndr_print *ndr, const char *name, const union spoolss_MonitorInfo *r)
20453 : {
20454 0 : uint32_t level;
20455 : {
20456 0 : libndr_flags _flags_save_UNION = ndr->flags;
20457 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
20458 0 : level = ndr_print_steal_switch_value(ndr, r);
20459 0 : ndr_print_union(ndr, name, level, "spoolss_MonitorInfo");
20460 0 : switch (level) {
20461 0 : case 1:
20462 0 : ndr_print_spoolss_MonitorInfo1(ndr, "info1", &r->info1);
20463 0 : break;
20464 :
20465 0 : case 2:
20466 0 : ndr_print_spoolss_MonitorInfo2(ndr, "info2", &r->info2);
20467 0 : break;
20468 :
20469 0 : default:
20470 0 : break;
20471 :
20472 : }
20473 0 : ndr->flags = _flags_save_UNION;
20474 : }
20475 0 : }
20476 :
20477 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetPortInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPortInfo1 *r)
20478 : {
20479 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
20480 0 : if (ndr_flags & NDR_SCALARS) {
20481 0 : NDR_CHECK(ndr_push_align(ndr, 5));
20482 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->port_name));
20483 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
20484 : }
20485 0 : if (ndr_flags & NDR_BUFFERS) {
20486 0 : if (r->port_name) {
20487 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->port_name, CH_UTF16)));
20488 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
20489 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->port_name, CH_UTF16)));
20490 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->port_name, ndr_charset_length(r->port_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20491 : }
20492 : }
20493 0 : return NDR_ERR_SUCCESS;
20494 : }
20495 :
20496 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetPortInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPortInfo1 *r)
20497 : {
20498 0 : uint32_t _ptr_port_name;
20499 0 : uint32_t size_port_name_1 = 0;
20500 0 : uint32_t length_port_name_1 = 0;
20501 0 : TALLOC_CTX *_mem_save_port_name_0 = NULL;
20502 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
20503 0 : if (ndr_flags & NDR_SCALARS) {
20504 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
20505 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_port_name));
20506 0 : if (_ptr_port_name) {
20507 0 : NDR_PULL_ALLOC(ndr, r->port_name);
20508 : } else {
20509 0 : r->port_name = NULL;
20510 : }
20511 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
20512 : }
20513 0 : if (ndr_flags & NDR_BUFFERS) {
20514 0 : if (r->port_name) {
20515 0 : _mem_save_port_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
20516 0 : NDR_PULL_SET_MEM_CTX(ndr, r->port_name, 0);
20517 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->port_name));
20518 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->port_name));
20519 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->port_name, &size_port_name_1));
20520 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->port_name, &length_port_name_1));
20521 0 : if (length_port_name_1 > size_port_name_1) {
20522 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_port_name_1, length_port_name_1);
20523 : }
20524 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_port_name_1, sizeof(uint16_t)));
20525 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->port_name, length_port_name_1, sizeof(uint16_t), CH_UTF16));
20526 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_name_0, 0);
20527 : }
20528 : }
20529 0 : return NDR_ERR_SUCCESS;
20530 : }
20531 :
20532 0 : static void ndr_print_flags_spoolss_SetPortInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_SetPortInfo1 *r)
20533 : {
20534 0 : ndr_print_spoolss_SetPortInfo1(ndr, name, r);
20535 0 : }
20536 :
20537 0 : _PUBLIC_ void ndr_print_spoolss_SetPortInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_SetPortInfo1 *r)
20538 : {
20539 0 : ndr_print_struct(ndr, name, "spoolss_SetPortInfo1");
20540 0 : if (r == NULL) { ndr_print_null(ndr); return; }
20541 0 : ndr->depth++;
20542 0 : ndr_print_ptr(ndr, "port_name", r->port_name);
20543 0 : ndr->depth++;
20544 0 : if (r->port_name) {
20545 0 : ndr_print_string(ndr, "port_name", r->port_name);
20546 : }
20547 0 : ndr->depth--;
20548 0 : ndr->depth--;
20549 : }
20550 :
20551 0 : _PUBLIC_ size_t ndr_size_spoolss_SetPortInfo1(const struct spoolss_SetPortInfo1 *r, libndr_flags flags)
20552 : {
20553 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_SetPortInfo1);
20554 : }
20555 :
20556 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetPortInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPortInfo2 *r)
20557 : {
20558 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
20559 0 : if (ndr_flags & NDR_SCALARS) {
20560 0 : NDR_CHECK(ndr_push_align(ndr, 5));
20561 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->port_name));
20562 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->monitor_name));
20563 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->description));
20564 0 : NDR_CHECK(ndr_push_spoolss_PortType(ndr, NDR_SCALARS, r->port_type));
20565 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
20566 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
20567 : }
20568 0 : if (ndr_flags & NDR_BUFFERS) {
20569 0 : if (r->port_name) {
20570 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->port_name, CH_UTF16)));
20571 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
20572 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->port_name, CH_UTF16)));
20573 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->port_name, ndr_charset_length(r->port_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20574 : }
20575 0 : if (r->monitor_name) {
20576 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
20577 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
20578 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
20579 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->monitor_name, ndr_charset_length(r->monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20580 : }
20581 0 : if (r->description) {
20582 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->description, CH_UTF16)));
20583 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
20584 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->description, CH_UTF16)));
20585 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->description, ndr_charset_length(r->description, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20586 : }
20587 : }
20588 0 : return NDR_ERR_SUCCESS;
20589 : }
20590 :
20591 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetPortInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPortInfo2 *r)
20592 : {
20593 0 : uint32_t _ptr_port_name;
20594 0 : uint32_t size_port_name_1 = 0;
20595 0 : uint32_t length_port_name_1 = 0;
20596 0 : TALLOC_CTX *_mem_save_port_name_0 = NULL;
20597 0 : uint32_t _ptr_monitor_name;
20598 0 : uint32_t size_monitor_name_1 = 0;
20599 0 : uint32_t length_monitor_name_1 = 0;
20600 0 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
20601 0 : uint32_t _ptr_description;
20602 0 : uint32_t size_description_1 = 0;
20603 0 : uint32_t length_description_1 = 0;
20604 0 : TALLOC_CTX *_mem_save_description_0 = NULL;
20605 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
20606 0 : if (ndr_flags & NDR_SCALARS) {
20607 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
20608 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_port_name));
20609 0 : if (_ptr_port_name) {
20610 0 : NDR_PULL_ALLOC(ndr, r->port_name);
20611 : } else {
20612 0 : r->port_name = NULL;
20613 : }
20614 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
20615 0 : if (_ptr_monitor_name) {
20616 0 : NDR_PULL_ALLOC(ndr, r->monitor_name);
20617 : } else {
20618 0 : r->monitor_name = NULL;
20619 : }
20620 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
20621 0 : if (_ptr_description) {
20622 0 : NDR_PULL_ALLOC(ndr, r->description);
20623 : } else {
20624 0 : r->description = NULL;
20625 : }
20626 0 : NDR_CHECK(ndr_pull_spoolss_PortType(ndr, NDR_SCALARS, &r->port_type));
20627 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
20628 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
20629 : }
20630 0 : if (ndr_flags & NDR_BUFFERS) {
20631 0 : if (r->port_name) {
20632 0 : _mem_save_port_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
20633 0 : NDR_PULL_SET_MEM_CTX(ndr, r->port_name, 0);
20634 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->port_name));
20635 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->port_name));
20636 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->port_name, &size_port_name_1));
20637 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->port_name, &length_port_name_1));
20638 0 : if (length_port_name_1 > size_port_name_1) {
20639 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_port_name_1, length_port_name_1);
20640 : }
20641 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_port_name_1, sizeof(uint16_t)));
20642 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->port_name, length_port_name_1, sizeof(uint16_t), CH_UTF16));
20643 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_name_0, 0);
20644 : }
20645 0 : if (r->monitor_name) {
20646 0 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
20647 0 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
20648 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->monitor_name));
20649 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->monitor_name));
20650 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->monitor_name, &size_monitor_name_1));
20651 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->monitor_name, &length_monitor_name_1));
20652 0 : if (length_monitor_name_1 > size_monitor_name_1) {
20653 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_monitor_name_1, length_monitor_name_1);
20654 : }
20655 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_monitor_name_1, sizeof(uint16_t)));
20656 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->monitor_name, length_monitor_name_1, sizeof(uint16_t), CH_UTF16));
20657 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
20658 : }
20659 0 : if (r->description) {
20660 0 : _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
20661 0 : NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
20662 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->description));
20663 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->description));
20664 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->description, &size_description_1));
20665 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->description, &length_description_1));
20666 0 : if (length_description_1 > size_description_1) {
20667 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_description_1, length_description_1);
20668 : }
20669 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_description_1, sizeof(uint16_t)));
20670 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->description, length_description_1, sizeof(uint16_t), CH_UTF16));
20671 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
20672 : }
20673 : }
20674 0 : return NDR_ERR_SUCCESS;
20675 : }
20676 :
20677 0 : static void ndr_print_flags_spoolss_SetPortInfo2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_SetPortInfo2 *r)
20678 : {
20679 0 : ndr_print_spoolss_SetPortInfo2(ndr, name, r);
20680 0 : }
20681 :
20682 0 : _PUBLIC_ void ndr_print_spoolss_SetPortInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_SetPortInfo2 *r)
20683 : {
20684 0 : ndr_print_struct(ndr, name, "spoolss_SetPortInfo2");
20685 0 : if (r == NULL) { ndr_print_null(ndr); return; }
20686 0 : ndr->depth++;
20687 0 : ndr_print_ptr(ndr, "port_name", r->port_name);
20688 0 : ndr->depth++;
20689 0 : if (r->port_name) {
20690 0 : ndr_print_string(ndr, "port_name", r->port_name);
20691 : }
20692 0 : ndr->depth--;
20693 0 : ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
20694 0 : ndr->depth++;
20695 0 : if (r->monitor_name) {
20696 0 : ndr_print_string(ndr, "monitor_name", r->monitor_name);
20697 : }
20698 0 : ndr->depth--;
20699 0 : ndr_print_ptr(ndr, "description", r->description);
20700 0 : ndr->depth++;
20701 0 : if (r->description) {
20702 0 : ndr_print_string(ndr, "description", r->description);
20703 : }
20704 0 : ndr->depth--;
20705 0 : ndr_print_spoolss_PortType(ndr, "port_type", r->port_type);
20706 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
20707 0 : ndr->depth--;
20708 : }
20709 :
20710 0 : _PUBLIC_ size_t ndr_size_spoolss_SetPortInfo2(const struct spoolss_SetPortInfo2 *r, libndr_flags flags)
20711 : {
20712 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_SetPortInfo2);
20713 : }
20714 :
20715 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetPortInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPortInfo3 *r)
20716 : {
20717 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
20718 0 : if (ndr_flags & NDR_SCALARS) {
20719 0 : NDR_CHECK(ndr_push_align(ndr, 5));
20720 0 : NDR_CHECK(ndr_push_spoolss_PortStatus(ndr, NDR_SCALARS, r->status));
20721 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->status_string));
20722 0 : NDR_CHECK(ndr_push_spoolss_PortSeverity(ndr, NDR_SCALARS, r->severity));
20723 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
20724 : }
20725 0 : if (ndr_flags & NDR_BUFFERS) {
20726 0 : if (r->status_string) {
20727 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->status_string, CH_UTF16)));
20728 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
20729 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->status_string, CH_UTF16)));
20730 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->status_string, ndr_charset_length(r->status_string, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20731 : }
20732 : }
20733 0 : return NDR_ERR_SUCCESS;
20734 : }
20735 :
20736 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetPortInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPortInfo3 *r)
20737 : {
20738 0 : uint32_t _ptr_status_string;
20739 0 : uint32_t size_status_string_1 = 0;
20740 0 : uint32_t length_status_string_1 = 0;
20741 0 : TALLOC_CTX *_mem_save_status_string_0 = NULL;
20742 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
20743 0 : if (ndr_flags & NDR_SCALARS) {
20744 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
20745 0 : NDR_CHECK(ndr_pull_spoolss_PortStatus(ndr, NDR_SCALARS, &r->status));
20746 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_status_string));
20747 0 : if (_ptr_status_string) {
20748 0 : NDR_PULL_ALLOC(ndr, r->status_string);
20749 : } else {
20750 0 : r->status_string = NULL;
20751 : }
20752 0 : NDR_CHECK(ndr_pull_spoolss_PortSeverity(ndr, NDR_SCALARS, &r->severity));
20753 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
20754 : }
20755 0 : if (ndr_flags & NDR_BUFFERS) {
20756 0 : if (r->status_string) {
20757 0 : _mem_save_status_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
20758 0 : NDR_PULL_SET_MEM_CTX(ndr, r->status_string, 0);
20759 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->status_string));
20760 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->status_string));
20761 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->status_string, &size_status_string_1));
20762 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->status_string, &length_status_string_1));
20763 0 : if (length_status_string_1 > size_status_string_1) {
20764 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_status_string_1, length_status_string_1);
20765 : }
20766 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_status_string_1, sizeof(uint16_t)));
20767 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->status_string, length_status_string_1, sizeof(uint16_t), CH_UTF16));
20768 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_string_0, 0);
20769 : }
20770 : }
20771 0 : return NDR_ERR_SUCCESS;
20772 : }
20773 :
20774 0 : static void ndr_print_flags_spoolss_SetPortInfo3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_SetPortInfo3 *r)
20775 : {
20776 0 : ndr_print_spoolss_SetPortInfo3(ndr, name, r);
20777 0 : }
20778 :
20779 0 : _PUBLIC_ void ndr_print_spoolss_SetPortInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_SetPortInfo3 *r)
20780 : {
20781 0 : ndr_print_struct(ndr, name, "spoolss_SetPortInfo3");
20782 0 : if (r == NULL) { ndr_print_null(ndr); return; }
20783 0 : ndr->depth++;
20784 0 : ndr_print_spoolss_PortStatus(ndr, "status", r->status);
20785 0 : ndr_print_ptr(ndr, "status_string", r->status_string);
20786 0 : ndr->depth++;
20787 0 : if (r->status_string) {
20788 0 : ndr_print_string(ndr, "status_string", r->status_string);
20789 : }
20790 0 : ndr->depth--;
20791 0 : ndr_print_spoolss_PortSeverity(ndr, "severity", r->severity);
20792 0 : ndr->depth--;
20793 : }
20794 :
20795 0 : _PUBLIC_ size_t ndr_size_spoolss_SetPortInfo3(const struct spoolss_SetPortInfo3 *r, libndr_flags flags)
20796 : {
20797 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_SetPortInfo3);
20798 : }
20799 :
20800 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetPortInfoFF(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPortInfoFF *r)
20801 : {
20802 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
20803 0 : if (ndr_flags & NDR_SCALARS) {
20804 0 : NDR_CHECK(ndr_push_align(ndr, 5));
20805 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->port_name));
20806 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->monitor_data));
20807 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
20808 : }
20809 0 : if (ndr_flags & NDR_BUFFERS) {
20810 0 : if (r->port_name) {
20811 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->port_name, CH_UTF16)));
20812 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
20813 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->port_name, CH_UTF16)));
20814 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->port_name, ndr_charset_length(r->port_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20815 : }
20816 : }
20817 0 : return NDR_ERR_SUCCESS;
20818 : }
20819 :
20820 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetPortInfoFF(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPortInfoFF *r)
20821 : {
20822 0 : uint32_t _ptr_port_name;
20823 0 : uint32_t size_port_name_1 = 0;
20824 0 : uint32_t length_port_name_1 = 0;
20825 0 : TALLOC_CTX *_mem_save_port_name_0 = NULL;
20826 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
20827 0 : if (ndr_flags & NDR_SCALARS) {
20828 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
20829 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_port_name));
20830 0 : if (_ptr_port_name) {
20831 0 : NDR_PULL_ALLOC(ndr, r->port_name);
20832 : } else {
20833 0 : r->port_name = NULL;
20834 : }
20835 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->monitor_data));
20836 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
20837 : }
20838 0 : if (ndr_flags & NDR_BUFFERS) {
20839 0 : if (r->port_name) {
20840 0 : _mem_save_port_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
20841 0 : NDR_PULL_SET_MEM_CTX(ndr, r->port_name, 0);
20842 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->port_name));
20843 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->port_name));
20844 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->port_name, &size_port_name_1));
20845 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->port_name, &length_port_name_1));
20846 0 : if (length_port_name_1 > size_port_name_1) {
20847 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_port_name_1, length_port_name_1);
20848 : }
20849 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_port_name_1, sizeof(uint16_t)));
20850 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->port_name, length_port_name_1, sizeof(uint16_t), CH_UTF16));
20851 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_name_0, 0);
20852 : }
20853 : }
20854 0 : return NDR_ERR_SUCCESS;
20855 : }
20856 :
20857 0 : static void ndr_print_flags_spoolss_SetPortInfoFF(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_SetPortInfoFF *r)
20858 : {
20859 0 : ndr_print_spoolss_SetPortInfoFF(ndr, name, r);
20860 0 : }
20861 :
20862 0 : _PUBLIC_ void ndr_print_spoolss_SetPortInfoFF(struct ndr_print *ndr, const char *name, const struct spoolss_SetPortInfoFF *r)
20863 : {
20864 0 : ndr_print_struct(ndr, name, "spoolss_SetPortInfoFF");
20865 0 : if (r == NULL) { ndr_print_null(ndr); return; }
20866 0 : ndr->depth++;
20867 0 : ndr_print_ptr(ndr, "port_name", r->port_name);
20868 0 : ndr->depth++;
20869 0 : if (r->port_name) {
20870 0 : ndr_print_string(ndr, "port_name", r->port_name);
20871 : }
20872 0 : ndr->depth--;
20873 0 : ndr_print_DATA_BLOB(ndr, "monitor_data", r->monitor_data);
20874 0 : ndr->depth--;
20875 : }
20876 :
20877 0 : _PUBLIC_ size_t ndr_size_spoolss_SetPortInfoFF(const struct spoolss_SetPortInfoFF *r, libndr_flags flags)
20878 : {
20879 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_SetPortInfoFF);
20880 : }
20881 :
20882 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetPortInfoContainer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_SetPortInfoContainer *r)
20883 : {
20884 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
20885 0 : if (ndr_flags & NDR_SCALARS) {
20886 0 : NDR_CHECK(ndr_push_align(ndr, 5));
20887 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
20888 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
20889 0 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr, NDR_SCALARS, &r->info));
20890 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
20891 : }
20892 0 : if (ndr_flags & NDR_BUFFERS) {
20893 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
20894 0 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr, NDR_BUFFERS, &r->info));
20895 : }
20896 0 : return NDR_ERR_SUCCESS;
20897 : }
20898 :
20899 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetPortInfoContainer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_SetPortInfoContainer *r)
20900 : {
20901 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
20902 0 : if (ndr_flags & NDR_SCALARS) {
20903 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
20904 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
20905 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
20906 0 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr, NDR_SCALARS, &r->info));
20907 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
20908 : }
20909 0 : if (ndr_flags & NDR_BUFFERS) {
20910 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
20911 0 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr, NDR_BUFFERS, &r->info));
20912 : }
20913 0 : return NDR_ERR_SUCCESS;
20914 : }
20915 :
20916 0 : static void ndr_print_flags_spoolss_SetPortInfoContainer(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_SetPortInfoContainer *r)
20917 : {
20918 0 : ndr_print_spoolss_SetPortInfoContainer(ndr, name, r);
20919 0 : }
20920 :
20921 0 : _PUBLIC_ void ndr_print_spoolss_SetPortInfoContainer(struct ndr_print *ndr, const char *name, const struct spoolss_SetPortInfoContainer *r)
20922 : {
20923 0 : ndr_print_struct(ndr, name, "spoolss_SetPortInfoContainer");
20924 0 : if (r == NULL) { ndr_print_null(ndr); return; }
20925 0 : ndr->depth++;
20926 0 : ndr_print_uint32(ndr, "level", r->level);
20927 0 : ndr_print_set_switch_value(ndr, &r->info, r->level);
20928 0 : ndr_print_spoolss_SetPrinterInfo(ndr, "info", &r->info);
20929 0 : ndr->depth--;
20930 : }
20931 :
20932 0 : static enum ndr_err_code ndr_push_UNIVERSAL_FONT_ID(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct UNIVERSAL_FONT_ID *r)
20933 : {
20934 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
20935 0 : if (ndr_flags & NDR_SCALARS) {
20936 0 : NDR_CHECK(ndr_push_align(ndr, 4));
20937 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Checksum));
20938 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Index));
20939 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
20940 : }
20941 0 : if (ndr_flags & NDR_BUFFERS) {
20942 0 : }
20943 0 : return NDR_ERR_SUCCESS;
20944 : }
20945 :
20946 0 : static enum ndr_err_code ndr_pull_UNIVERSAL_FONT_ID(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct UNIVERSAL_FONT_ID *r)
20947 : {
20948 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
20949 0 : if (ndr_flags & NDR_SCALARS) {
20950 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
20951 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Checksum));
20952 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Index));
20953 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
20954 : }
20955 0 : if (ndr_flags & NDR_BUFFERS) {
20956 0 : }
20957 0 : return NDR_ERR_SUCCESS;
20958 : }
20959 :
20960 0 : _PUBLIC_ void ndr_print_UNIVERSAL_FONT_ID(struct ndr_print *ndr, const char *name, const struct UNIVERSAL_FONT_ID *r)
20961 : {
20962 0 : ndr_print_struct(ndr, name, "UNIVERSAL_FONT_ID");
20963 0 : if (r == NULL) { ndr_print_null(ndr); return; }
20964 0 : ndr->depth++;
20965 0 : ndr_print_uint32(ndr, "Checksum", r->Checksum);
20966 0 : ndr_print_uint32(ndr, "Index", r->Index);
20967 0 : ndr->depth--;
20968 : }
20969 :
20970 0 : _PUBLIC_ enum ndr_err_code ndr_push_UNIVERSAL_FONT_ID_ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct UNIVERSAL_FONT_ID_ctr *r)
20971 : {
20972 0 : uint32_t cntr_fonts_0;
20973 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
20974 0 : if (ndr_flags & NDR_SCALARS) {
20975 0 : NDR_CHECK(ndr_push_align(ndr, 4));
20976 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
20977 0 : for (cntr_fonts_0 = 0; cntr_fonts_0 < (r->count); cntr_fonts_0++) {
20978 0 : NDR_CHECK(ndr_push_UNIVERSAL_FONT_ID(ndr, NDR_SCALARS, &r->fonts[cntr_fonts_0]));
20979 : }
20980 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
20981 : }
20982 0 : if (ndr_flags & NDR_BUFFERS) {
20983 0 : }
20984 0 : return NDR_ERR_SUCCESS;
20985 : }
20986 :
20987 0 : _PUBLIC_ enum ndr_err_code ndr_pull_UNIVERSAL_FONT_ID_ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct UNIVERSAL_FONT_ID_ctr *r)
20988 : {
20989 0 : uint32_t size_fonts_0 = 0;
20990 0 : uint32_t cntr_fonts_0;
20991 0 : TALLOC_CTX *_mem_save_fonts_0 = NULL;
20992 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
20993 0 : if (ndr_flags & NDR_SCALARS) {
20994 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
20995 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
20996 0 : size_fonts_0 = r->count;
20997 0 : NDR_PULL_ALLOC_N(ndr, r->fonts, size_fonts_0);
20998 0 : _mem_save_fonts_0 = NDR_PULL_GET_MEM_CTX(ndr);
20999 0 : NDR_PULL_SET_MEM_CTX(ndr, r->fonts, 0);
21000 0 : for (cntr_fonts_0 = 0; cntr_fonts_0 < (size_fonts_0); cntr_fonts_0++) {
21001 0 : NDR_CHECK(ndr_pull_UNIVERSAL_FONT_ID(ndr, NDR_SCALARS, &r->fonts[cntr_fonts_0]));
21002 : }
21003 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_fonts_0, 0);
21004 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
21005 : }
21006 0 : if (ndr_flags & NDR_BUFFERS) {
21007 0 : }
21008 0 : return NDR_ERR_SUCCESS;
21009 : }
21010 :
21011 0 : static void ndr_print_flags_UNIVERSAL_FONT_ID_ctr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct UNIVERSAL_FONT_ID_ctr *r)
21012 : {
21013 0 : ndr_print_UNIVERSAL_FONT_ID_ctr(ndr, name, r);
21014 0 : }
21015 :
21016 0 : _PUBLIC_ void ndr_print_UNIVERSAL_FONT_ID_ctr(struct ndr_print *ndr, const char *name, const struct UNIVERSAL_FONT_ID_ctr *r)
21017 : {
21018 0 : uint32_t cntr_fonts_0;
21019 0 : ndr_print_struct(ndr, name, "UNIVERSAL_FONT_ID_ctr");
21020 0 : if (r == NULL) { ndr_print_null(ndr); return; }
21021 0 : ndr->depth++;
21022 0 : ndr_print_uint32(ndr, "count", r->count);
21023 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "fonts", (uint32_t)(r->count));
21024 0 : ndr->depth++;
21025 0 : for (cntr_fonts_0 = 0; cntr_fonts_0 < (r->count); cntr_fonts_0++) {
21026 0 : ndr_print_UNIVERSAL_FONT_ID(ndr, "fonts", &r->fonts[cntr_fonts_0]);
21027 : }
21028 0 : ndr->depth--;
21029 0 : ndr->depth--;
21030 : }
21031 :
21032 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorContainer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_MonitorContainer *r)
21033 : {
21034 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
21035 0 : if (ndr_flags & NDR_SCALARS) {
21036 0 : NDR_CHECK(ndr_push_align(ndr, 5));
21037 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
21038 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
21039 0 : NDR_CHECK(ndr_push_spoolss_MonitorInfo(ndr, NDR_SCALARS, &r->info));
21040 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
21041 : }
21042 0 : if (ndr_flags & NDR_BUFFERS) {
21043 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
21044 0 : NDR_CHECK(ndr_push_spoolss_MonitorInfo(ndr, NDR_BUFFERS, &r->info));
21045 : }
21046 0 : return NDR_ERR_SUCCESS;
21047 : }
21048 :
21049 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorContainer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_MonitorContainer *r)
21050 : {
21051 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
21052 0 : if (ndr_flags & NDR_SCALARS) {
21053 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
21054 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
21055 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
21056 0 : NDR_CHECK(ndr_pull_spoolss_MonitorInfo(ndr, NDR_SCALARS, &r->info));
21057 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
21058 : }
21059 0 : if (ndr_flags & NDR_BUFFERS) {
21060 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
21061 0 : NDR_CHECK(ndr_pull_spoolss_MonitorInfo(ndr, NDR_BUFFERS, &r->info));
21062 : }
21063 0 : return NDR_ERR_SUCCESS;
21064 : }
21065 :
21066 0 : static void ndr_print_flags_spoolss_MonitorContainer(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_MonitorContainer *r)
21067 : {
21068 0 : ndr_print_spoolss_MonitorContainer(ndr, name, r);
21069 0 : }
21070 :
21071 0 : _PUBLIC_ void ndr_print_spoolss_MonitorContainer(struct ndr_print *ndr, const char *name, const struct spoolss_MonitorContainer *r)
21072 : {
21073 0 : ndr_print_struct(ndr, name, "spoolss_MonitorContainer");
21074 0 : if (r == NULL) { ndr_print_null(ndr); return; }
21075 0 : ndr->depth++;
21076 0 : ndr_print_uint32(ndr, "level", r->level);
21077 0 : ndr_print_set_switch_value(ndr, &r->info, r->level);
21078 0 : ndr_print_spoolss_MonitorInfo(ndr, "info", &r->info);
21079 0 : ndr->depth--;
21080 : }
21081 :
21082 48 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcDataTypesInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrintProcDataTypesInfo1 *r)
21083 : {
21084 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
21085 48 : if (ndr_flags & NDR_SCALARS) {
21086 24 : NDR_CHECK(ndr_push_align(ndr, 5));
21087 : {
21088 24 : libndr_flags _flags_save_string = ndr->flags;
21089 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
21090 24 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->name_array));
21091 24 : ndr->flags = _flags_save_string;
21092 : }
21093 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
21094 : }
21095 48 : if (ndr_flags & NDR_BUFFERS) {
21096 : {
21097 24 : libndr_flags _flags_save_string = ndr->flags;
21098 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
21099 24 : if (r->name_array) {
21100 24 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->name_array));
21101 24 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name_array));
21102 24 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->name_array));
21103 : }
21104 24 : ndr->flags = _flags_save_string;
21105 : }
21106 : }
21107 48 : return NDR_ERR_SUCCESS;
21108 : }
21109 :
21110 16 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcDataTypesInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrintProcDataTypesInfo1 *r)
21111 : {
21112 0 : uint32_t _ptr_name_array;
21113 16 : TALLOC_CTX *_mem_save_name_array_0 = NULL;
21114 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
21115 16 : if (ndr_flags & NDR_SCALARS) {
21116 8 : NDR_CHECK(ndr_pull_align(ndr, 5));
21117 : {
21118 8 : libndr_flags _flags_save_string = ndr->flags;
21119 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
21120 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name_array));
21121 8 : if (_ptr_name_array) {
21122 8 : NDR_PULL_ALLOC(ndr, r->name_array);
21123 8 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->name_array, _ptr_name_array));
21124 : } else {
21125 0 : r->name_array = NULL;
21126 : }
21127 8 : ndr->flags = _flags_save_string;
21128 : }
21129 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
21130 : }
21131 16 : if (ndr_flags & NDR_BUFFERS) {
21132 : {
21133 8 : libndr_flags _flags_save_string = ndr->flags;
21134 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
21135 8 : if (r->name_array) {
21136 0 : uint32_t _relative_save_offset;
21137 8 : _relative_save_offset = ndr->offset;
21138 8 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->name_array));
21139 8 : _mem_save_name_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
21140 8 : NDR_PULL_SET_MEM_CTX(ndr, r->name_array, 0);
21141 8 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name_array));
21142 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_array_0, 0);
21143 8 : if (ndr->offset > ndr->relative_highest_offset) {
21144 8 : ndr->relative_highest_offset = ndr->offset;
21145 : }
21146 8 : ndr->offset = _relative_save_offset;
21147 : }
21148 8 : ndr->flags = _flags_save_string;
21149 : }
21150 : }
21151 16 : return NDR_ERR_SUCCESS;
21152 : }
21153 :
21154 0 : static void ndr_print_flags_spoolss_PrintProcDataTypesInfo1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrintProcDataTypesInfo1 *r)
21155 : {
21156 0 : ndr_print_spoolss_PrintProcDataTypesInfo1(ndr, name, r);
21157 0 : }
21158 :
21159 0 : _PUBLIC_ void ndr_print_spoolss_PrintProcDataTypesInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcDataTypesInfo1 *r)
21160 : {
21161 0 : ndr_print_struct(ndr, name, "spoolss_PrintProcDataTypesInfo1");
21162 0 : if (r == NULL) { ndr_print_null(ndr); return; }
21163 0 : ndr->depth++;
21164 : {
21165 0 : libndr_flags _flags_save_string = ndr->flags;
21166 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
21167 0 : ndr_print_ptr(ndr, "name_array", r->name_array);
21168 0 : ndr->depth++;
21169 0 : if (r->name_array) {
21170 0 : ndr_print_string(ndr, "name_array", r->name_array);
21171 : }
21172 0 : ndr->depth--;
21173 0 : ndr->flags = _flags_save_string;
21174 : }
21175 0 : ndr->depth--;
21176 : }
21177 :
21178 0 : _PUBLIC_ size_t ndr_size_spoolss_PrintProcDataTypesInfo1(const struct spoolss_PrintProcDataTypesInfo1 *r, libndr_flags flags)
21179 : {
21180 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcDataTypesInfo1);
21181 : }
21182 :
21183 48 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcDataTypesInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_PrintProcDataTypesInfo *r)
21184 : {
21185 48 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
21186 0 : uint32_t level;
21187 : {
21188 48 : libndr_flags _flags_save_UNION = ndr->flags;
21189 48 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
21190 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
21191 48 : if (ndr_flags & NDR_SCALARS) {
21192 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
21193 24 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
21194 24 : NDR_CHECK(ndr_push_union_align(ndr, 5));
21195 24 : switch (level) {
21196 24 : case 1: {
21197 24 : NDR_CHECK(ndr_push_align(ndr, 5));
21198 24 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
21199 24 : NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo1(ndr, NDR_SCALARS, &r->info1));
21200 24 : break; }
21201 :
21202 0 : default: {
21203 0 : break; }
21204 :
21205 : }
21206 : }
21207 48 : if (ndr_flags & NDR_BUFFERS) {
21208 24 : if (!(ndr_flags & NDR_SCALARS)) {
21209 : /* We didn't get it above, and the token is not needed after this. */
21210 24 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
21211 : }
21212 24 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
21213 24 : switch (level) {
21214 24 : case 1:
21215 24 : NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo1(ndr, NDR_BUFFERS, &r->info1));
21216 24 : break;
21217 :
21218 0 : default:
21219 0 : break;
21220 :
21221 : }
21222 : }
21223 48 : ndr->flags = _flags_save_UNION;
21224 : }
21225 48 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
21226 48 : return NDR_ERR_SUCCESS;
21227 : }
21228 :
21229 16 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcDataTypesInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_PrintProcDataTypesInfo *r)
21230 : {
21231 16 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
21232 0 : uint32_t level;
21233 : {
21234 16 : libndr_flags _flags_save_UNION = ndr->flags;
21235 16 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
21236 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
21237 16 : if (ndr_flags & NDR_SCALARS) {
21238 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
21239 8 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
21240 8 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
21241 8 : switch (level) {
21242 8 : case 1: {
21243 8 : NDR_CHECK(ndr_pull_align(ndr, 5));
21244 8 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
21245 8 : NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo1(ndr, NDR_SCALARS, &r->info1));
21246 8 : break; }
21247 :
21248 0 : default: {
21249 0 : break; }
21250 :
21251 : }
21252 : }
21253 16 : if (ndr_flags & NDR_BUFFERS) {
21254 8 : if (!(ndr_flags & NDR_SCALARS)) {
21255 : /* We didn't get it above, and the token is not needed after this. */
21256 8 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
21257 : }
21258 8 : switch (level) {
21259 8 : case 1:
21260 8 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
21261 8 : NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo1(ndr, NDR_BUFFERS, &r->info1));
21262 8 : break;
21263 :
21264 0 : default:
21265 0 : break;
21266 :
21267 : }
21268 : }
21269 16 : ndr->flags = _flags_save_UNION;
21270 : }
21271 16 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
21272 16 : return NDR_ERR_SUCCESS;
21273 : }
21274 :
21275 0 : _PUBLIC_ void ndr_print_spoolss_PrintProcDataTypesInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcDataTypesInfo *r)
21276 : {
21277 0 : uint32_t level;
21278 : {
21279 0 : libndr_flags _flags_save_UNION = ndr->flags;
21280 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
21281 0 : level = ndr_print_steal_switch_value(ndr, r);
21282 0 : ndr_print_union(ndr, name, level, "spoolss_PrintProcDataTypesInfo");
21283 0 : switch (level) {
21284 0 : case 1:
21285 0 : ndr_print_spoolss_PrintProcDataTypesInfo1(ndr, "info1", &r->info1);
21286 0 : break;
21287 :
21288 0 : default:
21289 0 : break;
21290 :
21291 : }
21292 0 : ndr->flags = _flags_save_UNION;
21293 : }
21294 0 : }
21295 :
21296 2 : static enum ndr_err_code ndr_push_spoolss_PrinterChangeFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
21297 : {
21298 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
21299 2 : return NDR_ERR_SUCCESS;
21300 : }
21301 :
21302 4 : static enum ndr_err_code ndr_pull_spoolss_PrinterChangeFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
21303 : {
21304 2 : uint32_t v;
21305 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
21306 4 : *r = v;
21307 4 : return NDR_ERR_SUCCESS;
21308 : }
21309 :
21310 2 : _PUBLIC_ void ndr_print_spoolss_PrinterChangeFlags(struct ndr_print *ndr, const char *name, uint32_t r)
21311 : {
21312 2 : ndr_print_uint32(ndr, name, r);
21313 2 : ndr->depth++;
21314 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINTER", PRINTER_CHANGE_ADD_PRINTER, r);
21315 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_SET_PRINTER", PRINTER_CHANGE_SET_PRINTER, r);
21316 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINTER", PRINTER_CHANGE_DELETE_PRINTER, r);
21317 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_FAILED_CONNECTION_PRINTER", PRINTER_CHANGE_FAILED_CONNECTION_PRINTER, r);
21318 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_JOB", PRINTER_CHANGE_ADD_JOB, r);
21319 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_SET_JOB", PRINTER_CHANGE_SET_JOB, r);
21320 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_JOB", PRINTER_CHANGE_DELETE_JOB, r);
21321 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_WRITE_JOB", PRINTER_CHANGE_WRITE_JOB, r);
21322 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_FORM", PRINTER_CHANGE_ADD_FORM, r);
21323 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_SET_FORM", PRINTER_CHANGE_SET_FORM, r);
21324 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_FORM", PRINTER_CHANGE_DELETE_FORM, r);
21325 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PORT", PRINTER_CHANGE_ADD_PORT, r);
21326 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_CONFIGURE_PORT", PRINTER_CHANGE_CONFIGURE_PORT, r);
21327 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PORT", PRINTER_CHANGE_DELETE_PORT, r);
21328 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINT_PROCESSOR", PRINTER_CHANGE_ADD_PRINT_PROCESSOR, r);
21329 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINT_PROCESSOR", PRINTER_CHANGE_DELETE_PRINT_PROCESSOR, r);
21330 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_SERVER", PRINTER_CHANGE_SERVER, r);
21331 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINTER_DRIVER", PRINTER_CHANGE_ADD_PRINTER_DRIVER, r);
21332 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_SET_PRINTER_DRIVER", PRINTER_CHANGE_SET_PRINTER_DRIVER, r);
21333 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINTER_DRIVER", PRINTER_CHANGE_DELETE_PRINTER_DRIVER, r);
21334 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_TIMEOUT", PRINTER_CHANGE_TIMEOUT, r);
21335 2 : ndr->depth--;
21336 2 : }
21337 :
21338 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortVarContainer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PortVarContainer *r)
21339 : {
21340 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
21341 0 : if (ndr_flags & NDR_SCALARS) {
21342 0 : NDR_CHECK(ndr_push_align(ndr, 5));
21343 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->monitor_data_size));
21344 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->monitor_data));
21345 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
21346 : }
21347 0 : if (ndr_flags & NDR_BUFFERS) {
21348 0 : if (r->monitor_data) {
21349 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->monitor_data_size));
21350 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->monitor_data, r->monitor_data_size));
21351 : }
21352 : }
21353 0 : return NDR_ERR_SUCCESS;
21354 : }
21355 :
21356 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortVarContainer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PortVarContainer *r)
21357 : {
21358 0 : uint32_t _ptr_monitor_data;
21359 0 : uint32_t size_monitor_data_1 = 0;
21360 0 : TALLOC_CTX *_mem_save_monitor_data_0 = NULL;
21361 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
21362 0 : if (ndr_flags & NDR_SCALARS) {
21363 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
21364 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->monitor_data_size));
21365 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_data));
21366 0 : if (_ptr_monitor_data) {
21367 0 : NDR_PULL_ALLOC(ndr, r->monitor_data);
21368 : } else {
21369 0 : r->monitor_data = NULL;
21370 : }
21371 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
21372 : }
21373 0 : if (ndr_flags & NDR_BUFFERS) {
21374 0 : if (r->monitor_data) {
21375 0 : _mem_save_monitor_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
21376 0 : NDR_PULL_SET_MEM_CTX(ndr, r->monitor_data, 0);
21377 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->monitor_data));
21378 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->monitor_data, &size_monitor_data_1));
21379 0 : NDR_PULL_ALLOC_N(ndr, r->monitor_data, size_monitor_data_1);
21380 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->monitor_data, size_monitor_data_1));
21381 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_data_0, 0);
21382 : }
21383 0 : if (r->monitor_data) {
21384 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->monitor_data, r->monitor_data_size));
21385 : }
21386 : }
21387 0 : return NDR_ERR_SUCCESS;
21388 : }
21389 :
21390 0 : static void ndr_print_flags_spoolss_PortVarContainer(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PortVarContainer *r)
21391 : {
21392 0 : ndr_print_spoolss_PortVarContainer(ndr, name, r);
21393 0 : }
21394 :
21395 0 : _PUBLIC_ void ndr_print_spoolss_PortVarContainer(struct ndr_print *ndr, const char *name, const struct spoolss_PortVarContainer *r)
21396 : {
21397 0 : ndr_print_struct(ndr, name, "spoolss_PortVarContainer");
21398 0 : if (r == NULL) { ndr_print_null(ndr); return; }
21399 0 : ndr->depth++;
21400 0 : ndr_print_uint32(ndr, "monitor_data_size", r->monitor_data_size);
21401 0 : ndr_print_ptr(ndr, "monitor_data", r->monitor_data);
21402 0 : ndr->depth++;
21403 0 : if (r->monitor_data) {
21404 0 : ndr_print_array_uint8(ndr, "monitor_data", r->monitor_data, r->monitor_data_size);
21405 : }
21406 0 : ndr->depth--;
21407 0 : ndr->depth--;
21408 : }
21409 :
21410 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobNotifyField(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_JobNotifyField r)
21411 : {
21412 0 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
21413 0 : return NDR_ERR_SUCCESS;
21414 : }
21415 :
21416 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobNotifyField(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_JobNotifyField *r)
21417 : {
21418 0 : uint16_t v;
21419 0 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
21420 0 : *r = v;
21421 0 : return NDR_ERR_SUCCESS;
21422 : }
21423 :
21424 76 : _PUBLIC_ void ndr_print_spoolss_JobNotifyField(struct ndr_print *ndr, const char *name, enum spoolss_JobNotifyField r)
21425 : {
21426 76 : const char *val = NULL;
21427 :
21428 76 : switch (r) {
21429 2 : case JOB_NOTIFY_FIELD_PRINTER_NAME: val = "JOB_NOTIFY_FIELD_PRINTER_NAME"; break;
21430 2 : case JOB_NOTIFY_FIELD_MACHINE_NAME: val = "JOB_NOTIFY_FIELD_MACHINE_NAME"; break;
21431 6 : case JOB_NOTIFY_FIELD_PORT_NAME: val = "JOB_NOTIFY_FIELD_PORT_NAME"; break;
21432 6 : case JOB_NOTIFY_FIELD_USER_NAME: val = "JOB_NOTIFY_FIELD_USER_NAME"; break;
21433 2 : case JOB_NOTIFY_FIELD_NOTIFY_NAME: val = "JOB_NOTIFY_FIELD_NOTIFY_NAME"; break;
21434 0 : case JOB_NOTIFY_FIELD_DATATYPE: val = "JOB_NOTIFY_FIELD_DATATYPE"; break;
21435 0 : case JOB_NOTIFY_FIELD_PRINT_PROCESSOR: val = "JOB_NOTIFY_FIELD_PRINT_PROCESSOR"; break;
21436 0 : case JOB_NOTIFY_FIELD_PARAMETERS: val = "JOB_NOTIFY_FIELD_PARAMETERS"; break;
21437 2 : case JOB_NOTIFY_FIELD_DRIVER_NAME: val = "JOB_NOTIFY_FIELD_DRIVER_NAME"; break;
21438 0 : case JOB_NOTIFY_FIELD_DEVMODE: val = "JOB_NOTIFY_FIELD_DEVMODE"; break;
21439 6 : case JOB_NOTIFY_FIELD_STATUS: val = "JOB_NOTIFY_FIELD_STATUS"; break;
21440 6 : case JOB_NOTIFY_FIELD_STATUS_STRING: val = "JOB_NOTIFY_FIELD_STATUS_STRING"; break;
21441 0 : case JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR: val = "JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR"; break;
21442 6 : case JOB_NOTIFY_FIELD_DOCUMENT: val = "JOB_NOTIFY_FIELD_DOCUMENT"; break;
21443 0 : case JOB_NOTIFY_FIELD_PRIORITY: val = "JOB_NOTIFY_FIELD_PRIORITY"; break;
21444 6 : case JOB_NOTIFY_FIELD_POSITION: val = "JOB_NOTIFY_FIELD_POSITION"; break;
21445 6 : case JOB_NOTIFY_FIELD_SUBMITTED: val = "JOB_NOTIFY_FIELD_SUBMITTED"; break;
21446 0 : case JOB_NOTIFY_FIELD_START_TIME: val = "JOB_NOTIFY_FIELD_START_TIME"; break;
21447 0 : case JOB_NOTIFY_FIELD_UNTIL_TIME: val = "JOB_NOTIFY_FIELD_UNTIL_TIME"; break;
21448 2 : case JOB_NOTIFY_FIELD_TIME: val = "JOB_NOTIFY_FIELD_TIME"; break;
21449 6 : case JOB_NOTIFY_FIELD_TOTAL_PAGES: val = "JOB_NOTIFY_FIELD_TOTAL_PAGES"; break;
21450 6 : case JOB_NOTIFY_FIELD_PAGES_PRINTED: val = "JOB_NOTIFY_FIELD_PAGES_PRINTED"; break;
21451 6 : case JOB_NOTIFY_FIELD_TOTAL_BYTES: val = "JOB_NOTIFY_FIELD_TOTAL_BYTES"; break;
21452 6 : case JOB_NOTIFY_FIELD_BYTES_PRINTED: val = "JOB_NOTIFY_FIELD_BYTES_PRINTED"; break;
21453 : }
21454 76 : ndr_print_enum(ndr, name, "ENUM", val, r);
21455 76 : }
21456 :
21457 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintNotifyField(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_PrintNotifyField r)
21458 : {
21459 0 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
21460 0 : return NDR_ERR_SUCCESS;
21461 : }
21462 :
21463 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintNotifyField(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_PrintNotifyField *r)
21464 : {
21465 0 : uint16_t v;
21466 0 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
21467 0 : *r = v;
21468 0 : return NDR_ERR_SUCCESS;
21469 : }
21470 :
21471 46 : _PUBLIC_ void ndr_print_spoolss_PrintNotifyField(struct ndr_print *ndr, const char *name, enum spoolss_PrintNotifyField r)
21472 : {
21473 46 : const char *val = NULL;
21474 :
21475 46 : switch (r) {
21476 4 : case PRINTER_NOTIFY_FIELD_SERVER_NAME: val = "PRINTER_NOTIFY_FIELD_SERVER_NAME"; break;
21477 6 : case PRINTER_NOTIFY_FIELD_PRINTER_NAME: val = "PRINTER_NOTIFY_FIELD_PRINTER_NAME"; break;
21478 2 : case PRINTER_NOTIFY_FIELD_SHARE_NAME: val = "PRINTER_NOTIFY_FIELD_SHARE_NAME"; break;
21479 4 : case PRINTER_NOTIFY_FIELD_PORT_NAME: val = "PRINTER_NOTIFY_FIELD_PORT_NAME"; break;
21480 4 : case PRINTER_NOTIFY_FIELD_DRIVER_NAME: val = "PRINTER_NOTIFY_FIELD_DRIVER_NAME"; break;
21481 4 : case PRINTER_NOTIFY_FIELD_COMMENT: val = "PRINTER_NOTIFY_FIELD_COMMENT"; break;
21482 4 : case PRINTER_NOTIFY_FIELD_LOCATION: val = "PRINTER_NOTIFY_FIELD_LOCATION"; break;
21483 0 : case PRINTER_NOTIFY_FIELD_DEVMODE: val = "PRINTER_NOTIFY_FIELD_DEVMODE"; break;
21484 0 : case PRINTER_NOTIFY_FIELD_SEPFILE: val = "PRINTER_NOTIFY_FIELD_SEPFILE"; break;
21485 0 : case PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR: val = "PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR"; break;
21486 0 : case PRINTER_NOTIFY_FIELD_PARAMETERS: val = "PRINTER_NOTIFY_FIELD_PARAMETERS"; break;
21487 0 : case PRINTER_NOTIFY_FIELD_DATATYPE: val = "PRINTER_NOTIFY_FIELD_DATATYPE"; break;
21488 2 : case PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR: val = "PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR"; break;
21489 6 : case PRINTER_NOTIFY_FIELD_ATTRIBUTES: val = "PRINTER_NOTIFY_FIELD_ATTRIBUTES"; break;
21490 0 : case PRINTER_NOTIFY_FIELD_PRIORITY: val = "PRINTER_NOTIFY_FIELD_PRIORITY"; break;
21491 0 : case PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY: val = "PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY"; break;
21492 0 : case PRINTER_NOTIFY_FIELD_START_TIME: val = "PRINTER_NOTIFY_FIELD_START_TIME"; break;
21493 0 : case PRINTER_NOTIFY_FIELD_UNTIL_TIME: val = "PRINTER_NOTIFY_FIELD_UNTIL_TIME"; break;
21494 6 : case PRINTER_NOTIFY_FIELD_STATUS: val = "PRINTER_NOTIFY_FIELD_STATUS"; break;
21495 0 : case PRINTER_NOTIFY_FIELD_STATUS_STRING: val = "PRINTER_NOTIFY_FIELD_STATUS_STRING"; break;
21496 4 : case PRINTER_NOTIFY_FIELD_CJOBS: val = "PRINTER_NOTIFY_FIELD_CJOBS"; break;
21497 0 : case PRINTER_NOTIFY_FIELD_AVERAGE_PPM: val = "PRINTER_NOTIFY_FIELD_AVERAGE_PPM"; break;
21498 0 : case PRINTER_NOTIFY_FIELD_TOTAL_PAGES: val = "PRINTER_NOTIFY_FIELD_TOTAL_PAGES"; break;
21499 0 : case PRINTER_NOTIFY_FIELD_PAGES_PRINTED: val = "PRINTER_NOTIFY_FIELD_PAGES_PRINTED"; break;
21500 0 : case PRINTER_NOTIFY_FIELD_TOTAL_BYTES: val = "PRINTER_NOTIFY_FIELD_TOTAL_BYTES"; break;
21501 0 : case PRINTER_NOTIFY_FIELD_BYTES_PRINTED: val = "PRINTER_NOTIFY_FIELD_BYTES_PRINTED"; break;
21502 0 : case PRINTER_NOTIFY_FIELD_OBJECT_GUID: val = "PRINTER_NOTIFY_FIELD_OBJECT_GUID"; break;
21503 0 : case PRINTER_NOTIFY_FIELD_FRIENDLY_NAME: val = "PRINTER_NOTIFY_FIELD_FRIENDLY_NAME"; break;
21504 : }
21505 46 : ndr_print_enum(ndr, name, "ENUM", val, r);
21506 46 : }
21507 :
21508 8 : static enum ndr_err_code ndr_push_spoolss_NotifyType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_NotifyType r)
21509 : {
21510 8 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
21511 8 : return NDR_ERR_SUCCESS;
21512 : }
21513 :
21514 66 : static enum ndr_err_code ndr_pull_spoolss_NotifyType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_NotifyType *r)
21515 : {
21516 58 : uint16_t v;
21517 66 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
21518 66 : *r = v;
21519 66 : return NDR_ERR_SUCCESS;
21520 : }
21521 :
21522 58 : _PUBLIC_ void ndr_print_spoolss_NotifyType(struct ndr_print *ndr, const char *name, enum spoolss_NotifyType r)
21523 : {
21524 58 : const char *val = NULL;
21525 :
21526 58 : switch (r) {
21527 12 : case PRINTER_NOTIFY_TYPE: val = "PRINTER_NOTIFY_TYPE"; break;
21528 46 : case JOB_NOTIFY_TYPE: val = "JOB_NOTIFY_TYPE"; break;
21529 : }
21530 58 : ndr_print_enum(ndr, name, "ENUM", val, r);
21531 58 : }
21532 :
21533 8 : static enum ndr_err_code ndr_push_spoolss_Field(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_Field *r)
21534 : {
21535 0 : uint32_t level;
21536 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
21537 8 : if (ndr_flags & NDR_SCALARS) {
21538 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
21539 8 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
21540 8 : NDR_CHECK(ndr_push_union_align(ndr, 2));
21541 8 : switch (level) {
21542 4 : case PRINTER_NOTIFY_TYPE: {
21543 4 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->field));
21544 4 : break; }
21545 :
21546 4 : case JOB_NOTIFY_TYPE: {
21547 4 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->field));
21548 4 : break; }
21549 :
21550 0 : default: {
21551 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->field));
21552 0 : break; }
21553 :
21554 : }
21555 : }
21556 8 : return NDR_ERR_SUCCESS;
21557 : }
21558 :
21559 130 : static enum ndr_err_code ndr_pull_spoolss_Field(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_Field *r)
21560 : {
21561 122 : uint32_t level;
21562 130 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
21563 130 : if (ndr_flags & NDR_SCALARS) {
21564 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
21565 130 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
21566 130 : NDR_CHECK(ndr_pull_union_align(ndr, 2));
21567 130 : switch (level) {
21568 50 : case PRINTER_NOTIFY_TYPE: {
21569 50 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->field));
21570 4 : break; }
21571 :
21572 80 : case JOB_NOTIFY_TYPE: {
21573 80 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->field));
21574 4 : break; }
21575 :
21576 0 : default: {
21577 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->field));
21578 0 : break; }
21579 :
21580 : }
21581 : }
21582 8 : return NDR_ERR_SUCCESS;
21583 : }
21584 :
21585 16 : static enum ndr_err_code ndr_push_spoolss_NotifyOptionType(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_NotifyOptionType *r)
21586 : {
21587 0 : uint32_t cntr_fields_1;
21588 16 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
21589 16 : if (ndr_flags & NDR_SCALARS) {
21590 8 : NDR_CHECK(ndr_push_align(ndr, 5));
21591 8 : NDR_CHECK(ndr_push_spoolss_NotifyType(ndr, NDR_SCALARS, r->type));
21592 8 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->u1));
21593 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
21594 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
21595 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
21596 8 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->fields));
21597 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
21598 : }
21599 16 : if (ndr_flags & NDR_BUFFERS) {
21600 8 : if (r->fields) {
21601 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
21602 16 : for (cntr_fields_1 = 0; cntr_fields_1 < (r->count); cntr_fields_1++) {
21603 8 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->fields[cntr_fields_1], r->type));
21604 8 : NDR_CHECK(ndr_push_spoolss_Field(ndr, NDR_SCALARS, &r->fields[cntr_fields_1]));
21605 : }
21606 : }
21607 : }
21608 16 : return NDR_ERR_SUCCESS;
21609 : }
21610 :
21611 28 : static enum ndr_err_code ndr_pull_spoolss_NotifyOptionType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_NotifyOptionType *r)
21612 : {
21613 12 : uint32_t _ptr_fields;
21614 28 : uint32_t size_fields_1 = 0;
21615 12 : uint32_t cntr_fields_1;
21616 28 : TALLOC_CTX *_mem_save_fields_0 = NULL;
21617 28 : TALLOC_CTX *_mem_save_fields_1 = NULL;
21618 28 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
21619 28 : if (ndr_flags & NDR_SCALARS) {
21620 14 : NDR_CHECK(ndr_pull_align(ndr, 5));
21621 20 : NDR_CHECK(ndr_pull_spoolss_NotifyType(ndr, NDR_SCALARS, &r->type));
21622 14 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->u1));
21623 14 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
21624 14 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
21625 14 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
21626 14 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_fields));
21627 14 : if (_ptr_fields) {
21628 14 : NDR_PULL_ALLOC(ndr, r->fields);
21629 : } else {
21630 0 : r->fields = NULL;
21631 : }
21632 14 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
21633 : }
21634 28 : if (ndr_flags & NDR_BUFFERS) {
21635 14 : if (r->fields) {
21636 14 : _mem_save_fields_0 = NDR_PULL_GET_MEM_CTX(ndr);
21637 14 : NDR_PULL_SET_MEM_CTX(ndr, r->fields, 0);
21638 14 : NDR_CHECK(ndr_pull_array_size(ndr, &r->fields));
21639 14 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->fields, &size_fields_1));
21640 14 : NDR_PULL_ALLOC_N(ndr, r->fields, size_fields_1);
21641 14 : _mem_save_fields_1 = NDR_PULL_GET_MEM_CTX(ndr);
21642 14 : NDR_PULL_SET_MEM_CTX(ndr, r->fields, 0);
21643 92 : for (cntr_fields_1 = 0; cntr_fields_1 < (size_fields_1); cntr_fields_1++) {
21644 78 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->fields[cntr_fields_1], r->type));
21645 78 : NDR_CHECK(ndr_pull_spoolss_Field(ndr, NDR_SCALARS, &r->fields[cntr_fields_1]));
21646 : }
21647 14 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_fields_1, 0);
21648 14 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_fields_0, 0);
21649 : }
21650 14 : if (r->fields) {
21651 14 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->fields, r->count));
21652 : }
21653 : }
21654 16 : return NDR_ERR_SUCCESS;
21655 : }
21656 :
21657 6 : _PUBLIC_ void ndr_print_spoolss_NotifyOptionType(struct ndr_print *ndr, const char *name, const struct spoolss_NotifyOptionType *r)
21658 : {
21659 6 : uint32_t cntr_fields_1;
21660 6 : ndr_print_struct(ndr, name, "spoolss_NotifyOptionType");
21661 6 : if (r == NULL) { ndr_print_null(ndr); return; }
21662 6 : ndr->depth++;
21663 6 : ndr_print_spoolss_NotifyType(ndr, "type", r->type);
21664 6 : ndr_print_uint16(ndr, "u1", r->u1);
21665 6 : ndr_print_uint32(ndr, "u2", r->u2);
21666 6 : ndr_print_uint32(ndr, "u3", r->u3);
21667 6 : ndr_print_uint32(ndr, "count", r->count);
21668 6 : ndr_print_ptr(ndr, "fields", r->fields);
21669 6 : ndr->depth++;
21670 6 : if (r->fields) {
21671 6 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "fields", (uint32_t)(r->count));
21672 6 : ndr->depth++;
21673 76 : for (cntr_fields_1 = 0; cntr_fields_1 < (r->count); cntr_fields_1++) {
21674 70 : ndr_print_set_switch_value(ndr, &r->fields[cntr_fields_1], r->type);
21675 70 : ndr_print_spoolss_Field(ndr, "fields", &r->fields[cntr_fields_1]);
21676 : }
21677 6 : ndr->depth--;
21678 : }
21679 6 : ndr->depth--;
21680 6 : ndr->depth--;
21681 : }
21682 :
21683 4 : static enum ndr_err_code ndr_push_spoolssNotifyOptionFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
21684 : {
21685 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
21686 4 : return NDR_ERR_SUCCESS;
21687 : }
21688 :
21689 10 : static enum ndr_err_code ndr_pull_spoolssNotifyOptionFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
21690 : {
21691 6 : uint32_t v;
21692 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
21693 10 : *r = v;
21694 10 : return NDR_ERR_SUCCESS;
21695 : }
21696 :
21697 6 : _PUBLIC_ void ndr_print_spoolssNotifyOptionFlags(struct ndr_print *ndr, const char *name, uint32_t r)
21698 : {
21699 6 : ndr_print_uint32(ndr, name, r);
21700 6 : ndr->depth++;
21701 6 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_OPTIONS_REFRESH", PRINTER_NOTIFY_OPTIONS_REFRESH, r);
21702 6 : ndr->depth--;
21703 6 : }
21704 :
21705 4 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_NotifyOption(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_NotifyOption *r)
21706 : {
21707 0 : uint32_t cntr_types_1;
21708 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
21709 4 : if (ndr_flags & NDR_SCALARS) {
21710 4 : NDR_CHECK(ndr_push_align(ndr, 5));
21711 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
21712 4 : NDR_CHECK(ndr_push_spoolssNotifyOptionFlags(ndr, NDR_SCALARS, r->flags));
21713 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
21714 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->types));
21715 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
21716 : }
21717 4 : if (ndr_flags & NDR_BUFFERS) {
21718 4 : if (r->types) {
21719 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
21720 12 : for (cntr_types_1 = 0; cntr_types_1 < (r->count); cntr_types_1++) {
21721 8 : NDR_CHECK(ndr_push_spoolss_NotifyOptionType(ndr, NDR_SCALARS, &r->types[cntr_types_1]));
21722 : }
21723 12 : for (cntr_types_1 = 0; cntr_types_1 < (r->count); cntr_types_1++) {
21724 8 : NDR_CHECK(ndr_push_spoolss_NotifyOptionType(ndr, NDR_BUFFERS, &r->types[cntr_types_1]));
21725 : }
21726 : }
21727 : }
21728 4 : return NDR_ERR_SUCCESS;
21729 : }
21730 :
21731 10 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_NotifyOption(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_NotifyOption *r)
21732 : {
21733 6 : uint32_t _ptr_types;
21734 10 : uint32_t size_types_1 = 0;
21735 6 : uint32_t cntr_types_1;
21736 10 : TALLOC_CTX *_mem_save_types_0 = NULL;
21737 10 : TALLOC_CTX *_mem_save_types_1 = NULL;
21738 10 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
21739 10 : if (ndr_flags & NDR_SCALARS) {
21740 10 : NDR_CHECK(ndr_pull_align(ndr, 5));
21741 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
21742 16 : NDR_CHECK(ndr_pull_spoolssNotifyOptionFlags(ndr, NDR_SCALARS, &r->flags));
21743 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
21744 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_types));
21745 10 : if (_ptr_types) {
21746 8 : NDR_PULL_ALLOC(ndr, r->types);
21747 : } else {
21748 2 : r->types = NULL;
21749 : }
21750 10 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
21751 : }
21752 10 : if (ndr_flags & NDR_BUFFERS) {
21753 10 : if (r->types) {
21754 8 : _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
21755 8 : NDR_PULL_SET_MEM_CTX(ndr, r->types, 0);
21756 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->types));
21757 8 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->types, &size_types_1));
21758 8 : NDR_PULL_ALLOC_N(ndr, r->types, size_types_1);
21759 8 : _mem_save_types_1 = NDR_PULL_GET_MEM_CTX(ndr);
21760 8 : NDR_PULL_SET_MEM_CTX(ndr, r->types, 0);
21761 22 : for (cntr_types_1 = 0; cntr_types_1 < (size_types_1); cntr_types_1++) {
21762 14 : NDR_CHECK(ndr_pull_spoolss_NotifyOptionType(ndr, NDR_SCALARS, &r->types[cntr_types_1]));
21763 : }
21764 22 : for (cntr_types_1 = 0; cntr_types_1 < (size_types_1); cntr_types_1++) {
21765 14 : NDR_CHECK(ndr_pull_spoolss_NotifyOptionType(ndr, NDR_BUFFERS, &r->types[cntr_types_1]));
21766 : }
21767 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_1, 0);
21768 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, 0);
21769 : }
21770 10 : if (r->types) {
21771 8 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->types, r->count));
21772 : }
21773 24 : for (cntr_types_1 = 0; cntr_types_1 < (size_types_1); cntr_types_1++) {
21774 6 : }
21775 : }
21776 4 : return NDR_ERR_SUCCESS;
21777 : }
21778 :
21779 0 : static void ndr_print_flags_spoolss_NotifyOption(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_NotifyOption *r)
21780 : {
21781 0 : ndr_print_spoolss_NotifyOption(ndr, name, r);
21782 0 : }
21783 :
21784 6 : _PUBLIC_ void ndr_print_spoolss_NotifyOption(struct ndr_print *ndr, const char *name, const struct spoolss_NotifyOption *r)
21785 : {
21786 6 : uint32_t cntr_types_1;
21787 6 : ndr_print_struct(ndr, name, "spoolss_NotifyOption");
21788 6 : if (r == NULL) { ndr_print_null(ndr); return; }
21789 6 : ndr->depth++;
21790 6 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->version);
21791 6 : ndr_print_spoolssNotifyOptionFlags(ndr, "flags", r->flags);
21792 6 : ndr_print_uint32(ndr, "count", r->count);
21793 6 : ndr_print_ptr(ndr, "types", r->types);
21794 6 : ndr->depth++;
21795 6 : if (r->types) {
21796 4 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "types", (uint32_t)(r->count));
21797 4 : ndr->depth++;
21798 10 : for (cntr_types_1 = 0; cntr_types_1 < (r->count); cntr_types_1++) {
21799 6 : ndr_print_spoolss_NotifyOptionType(ndr, "types", &r->types[cntr_types_1]);
21800 : }
21801 4 : ndr->depth--;
21802 : }
21803 6 : ndr->depth--;
21804 6 : ndr->depth--;
21805 : }
21806 :
21807 0 : static enum ndr_err_code ndr_push_spoolss_NotifyString(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_NotifyString *r)
21808 : {
21809 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
21810 0 : if (ndr_flags & NDR_SCALARS) {
21811 0 : NDR_CHECK(ndr_push_align(ndr, 5));
21812 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
21813 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
21814 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
21815 : }
21816 0 : if (ndr_flags & NDR_BUFFERS) {
21817 0 : if (r->string) {
21818 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size / 2));
21819 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->size / 2, sizeof(uint16_t), CH_UTF16));
21820 : }
21821 : }
21822 0 : return NDR_ERR_SUCCESS;
21823 : }
21824 :
21825 40 : static enum ndr_err_code ndr_pull_spoolss_NotifyString(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_NotifyString *r)
21826 : {
21827 40 : uint32_t _ptr_string;
21828 40 : uint32_t size_string_1 = 0;
21829 40 : TALLOC_CTX *_mem_save_string_0 = NULL;
21830 40 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
21831 40 : if (ndr_flags & NDR_SCALARS) {
21832 20 : NDR_CHECK(ndr_pull_align(ndr, 5));
21833 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
21834 20 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
21835 20 : if (_ptr_string) {
21836 20 : NDR_PULL_ALLOC(ndr, r->string);
21837 : } else {
21838 0 : r->string = NULL;
21839 : }
21840 20 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
21841 : }
21842 40 : if (ndr_flags & NDR_BUFFERS) {
21843 20 : if (r->string) {
21844 20 : _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
21845 20 : NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
21846 20 : NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
21847 20 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->string, &size_string_1));
21848 20 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, size_string_1, sizeof(uint16_t), CH_UTF16));
21849 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
21850 : }
21851 20 : if (r->string) {
21852 20 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->string, r->size / 2));
21853 : }
21854 : }
21855 0 : return NDR_ERR_SUCCESS;
21856 : }
21857 :
21858 20 : _PUBLIC_ void ndr_print_spoolss_NotifyString(struct ndr_print *ndr, const char *name, const struct spoolss_NotifyString *r)
21859 : {
21860 20 : ndr_print_struct(ndr, name, "spoolss_NotifyString");
21861 20 : if (r == NULL) { ndr_print_null(ndr); return; }
21862 20 : ndr->depth++;
21863 20 : ndr_print_uint32(ndr, "size", r->size);
21864 20 : ndr_print_ptr(ndr, "string", r->string);
21865 20 : ndr->depth++;
21866 20 : if (r->string) {
21867 20 : ndr_print_string(ndr, "string", r->string);
21868 : }
21869 20 : ndr->depth--;
21870 20 : ndr->depth--;
21871 : }
21872 :
21873 0 : static enum ndr_err_code ndr_push_spoolss_NotifyTable(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_NotifyTable r)
21874 : {
21875 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
21876 0 : return NDR_ERR_SUCCESS;
21877 : }
21878 :
21879 52 : static enum ndr_err_code ndr_pull_spoolss_NotifyTable(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_NotifyTable *r)
21880 : {
21881 52 : uint32_t v;
21882 52 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
21883 52 : *r = v;
21884 52 : return NDR_ERR_SUCCESS;
21885 : }
21886 :
21887 52 : _PUBLIC_ void ndr_print_spoolss_NotifyTable(struct ndr_print *ndr, const char *name, enum spoolss_NotifyTable r)
21888 : {
21889 52 : const char *val = NULL;
21890 :
21891 52 : switch (r) {
21892 28 : case NOTIFY_TABLE_DWORD: val = "NOTIFY_TABLE_DWORD"; break;
21893 20 : case NOTIFY_TABLE_STRING: val = "NOTIFY_TABLE_STRING"; break;
21894 0 : case NOTIFY_TABLE_DEVMODE: val = "NOTIFY_TABLE_DEVMODE"; break;
21895 4 : case NOTIFY_TABLE_TIME: val = "NOTIFY_TABLE_TIME"; break;
21896 0 : case NOTIFY_TABLE_SECURITYDESCRIPTOR: val = "NOTIFY_TABLE_SECURITYDESCRIPTOR"; break;
21897 : }
21898 52 : ndr_print_enum(ndr, name, "ENUM", val, r);
21899 52 : }
21900 :
21901 0 : static enum ndr_err_code ndr_push_spoolss_NotifyData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_NotifyData *r)
21902 : {
21903 0 : uint32_t level;
21904 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
21905 0 : if (ndr_flags & NDR_SCALARS) {
21906 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
21907 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
21908 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
21909 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
21910 : /* ms_union is always aligned to the largest union arm*/
21911 0 : NDR_CHECK(ndr_push_align(ndr, 5));
21912 0 : switch (level) {
21913 0 : case 1: {
21914 : uint32_t cntr_integer_0;
21915 0 : for (cntr_integer_0 = 0; cntr_integer_0 < (2); cntr_integer_0++) {
21916 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->integer[cntr_integer_0]));
21917 : }
21918 0 : break; }
21919 :
21920 0 : case 2: {
21921 0 : NDR_CHECK(ndr_push_spoolss_NotifyString(ndr, NDR_SCALARS, &r->string));
21922 0 : break; }
21923 :
21924 0 : case 3: {
21925 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS, &r->devmode));
21926 0 : break; }
21927 :
21928 0 : case 4: {
21929 0 : NDR_CHECK(ndr_push_spoolss_TimeCtr(ndr, NDR_SCALARS, &r->time));
21930 0 : break; }
21931 :
21932 0 : case 5: {
21933 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sd));
21934 0 : break; }
21935 :
21936 0 : default:
21937 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
21938 : }
21939 : }
21940 0 : if (ndr_flags & NDR_BUFFERS) {
21941 0 : if (!(ndr_flags & NDR_SCALARS)) {
21942 : /* We didn't get it above, and the token is not needed after this. */
21943 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
21944 : }
21945 0 : switch (level) {
21946 0 : case 1:
21947 0 : break;
21948 :
21949 0 : case 2:
21950 0 : NDR_CHECK(ndr_push_spoolss_NotifyString(ndr, NDR_BUFFERS, &r->string));
21951 0 : break;
21952 :
21953 0 : case 3:
21954 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_BUFFERS, &r->devmode));
21955 0 : break;
21956 :
21957 0 : case 4:
21958 0 : NDR_CHECK(ndr_push_spoolss_TimeCtr(ndr, NDR_BUFFERS, &r->time));
21959 0 : break;
21960 :
21961 0 : case 5:
21962 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd));
21963 0 : break;
21964 :
21965 0 : default:
21966 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
21967 : }
21968 : }
21969 0 : return NDR_ERR_SUCCESS;
21970 : }
21971 :
21972 104 : static enum ndr_err_code ndr_pull_spoolss_NotifyData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_NotifyData *r)
21973 : {
21974 104 : uint32_t level;
21975 104 : uint32_t _level;
21976 104 : uint32_t size_integer_0 = 0;
21977 104 : uint32_t cntr_integer_0;
21978 104 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
21979 104 : if (ndr_flags & NDR_SCALARS) {
21980 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
21981 52 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
21982 52 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
21983 52 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
21984 52 : if (_level != level) {
21985 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
21986 : }
21987 : /* ms_union is always aligned to the largest union arm*/
21988 52 : NDR_CHECK(ndr_pull_align(ndr, 5));
21989 52 : switch (level) {
21990 0 : case 1: {
21991 84 : size_integer_0 = 2;
21992 84 : for (cntr_integer_0 = 0; cntr_integer_0 < (size_integer_0); cntr_integer_0++) {
21993 56 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->integer[cntr_integer_0]));
21994 : }
21995 0 : break; }
21996 :
21997 20 : case 2: {
21998 20 : NDR_CHECK(ndr_pull_spoolss_NotifyString(ndr, NDR_SCALARS, &r->string));
21999 0 : break; }
22000 :
22001 0 : case 3: {
22002 0 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS, &r->devmode));
22003 0 : break; }
22004 :
22005 4 : case 4: {
22006 4 : NDR_CHECK(ndr_pull_spoolss_TimeCtr(ndr, NDR_SCALARS, &r->time));
22007 0 : break; }
22008 :
22009 0 : case 5: {
22010 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sd));
22011 0 : break; }
22012 :
22013 0 : default:
22014 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
22015 : }
22016 : }
22017 104 : if (ndr_flags & NDR_BUFFERS) {
22018 52 : if (!(ndr_flags & NDR_SCALARS)) {
22019 : /* We didn't get it above, and the token is not needed after this. */
22020 52 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
22021 : }
22022 52 : switch (level) {
22023 0 : case 1:
22024 0 : break;
22025 :
22026 20 : case 2:
22027 20 : NDR_CHECK(ndr_pull_spoolss_NotifyString(ndr, NDR_BUFFERS, &r->string));
22028 0 : break;
22029 :
22030 0 : case 3:
22031 0 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_BUFFERS, &r->devmode));
22032 0 : break;
22033 :
22034 4 : case 4:
22035 4 : NDR_CHECK(ndr_pull_spoolss_TimeCtr(ndr, NDR_BUFFERS, &r->time));
22036 0 : break;
22037 :
22038 0 : case 5:
22039 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd));
22040 0 : break;
22041 :
22042 0 : default:
22043 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
22044 : }
22045 : }
22046 0 : return NDR_ERR_SUCCESS;
22047 : }
22048 :
22049 52 : _PUBLIC_ void ndr_print_spoolss_NotifyData(struct ndr_print *ndr, const char *name, const union spoolss_NotifyData *r)
22050 : {
22051 52 : uint32_t level;
22052 52 : uint32_t cntr_integer_0;
22053 52 : level = ndr_print_steal_switch_value(ndr, r);
22054 52 : ndr_print_union(ndr, name, level, "spoolss_NotifyData");
22055 52 : switch (level) {
22056 28 : case 1:
22057 28 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "integer", (uint32_t)(2));
22058 28 : ndr->depth++;
22059 84 : for (cntr_integer_0 = 0; cntr_integer_0 < (2); cntr_integer_0++) {
22060 56 : ndr_print_uint32(ndr, "integer", r->integer[cntr_integer_0]);
22061 : }
22062 28 : ndr->depth--;
22063 28 : break;
22064 :
22065 20 : case 2:
22066 20 : ndr_print_spoolss_NotifyString(ndr, "string", &r->string);
22067 20 : break;
22068 :
22069 0 : case 3:
22070 0 : ndr_print_spoolss_DevmodeContainer(ndr, "devmode", &r->devmode);
22071 0 : break;
22072 :
22073 4 : case 4:
22074 4 : ndr_print_spoolss_TimeCtr(ndr, "time", &r->time);
22075 4 : break;
22076 :
22077 0 : case 5:
22078 0 : ndr_print_sec_desc_buf(ndr, "sd", &r->sd);
22079 0 : break;
22080 :
22081 0 : default:
22082 0 : ndr_print_bad_level(ndr, name, level);
22083 : }
22084 52 : }
22085 :
22086 0 : static enum ndr_err_code ndr_push_spoolss_Notify(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_Notify *r)
22087 : {
22088 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
22089 0 : if (ndr_flags & NDR_SCALARS) {
22090 0 : NDR_CHECK(ndr_push_align(ndr, 5));
22091 0 : NDR_CHECK(ndr_push_spoolss_NotifyType(ndr, NDR_SCALARS, r->type));
22092 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->field, r->type));
22093 0 : NDR_CHECK(ndr_push_spoolss_Field(ndr, NDR_SCALARS, &r->field));
22094 0 : NDR_CHECK(ndr_push_spoolss_NotifyTable(ndr, NDR_SCALARS, r->variable_type));
22095 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
22096 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->data, r->variable_type));
22097 0 : NDR_CHECK(ndr_push_spoolss_NotifyData(ndr, NDR_SCALARS, &r->data));
22098 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
22099 : }
22100 0 : if (ndr_flags & NDR_BUFFERS) {
22101 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->data, r->variable_type));
22102 0 : NDR_CHECK(ndr_push_spoolss_NotifyData(ndr, NDR_BUFFERS, &r->data));
22103 : }
22104 0 : return NDR_ERR_SUCCESS;
22105 : }
22106 :
22107 104 : static enum ndr_err_code ndr_pull_spoolss_Notify(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_Notify *r)
22108 : {
22109 104 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
22110 104 : if (ndr_flags & NDR_SCALARS) {
22111 52 : NDR_CHECK(ndr_pull_align(ndr, 5));
22112 104 : NDR_CHECK(ndr_pull_spoolss_NotifyType(ndr, NDR_SCALARS, &r->type));
22113 52 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->field, r->type));
22114 52 : NDR_CHECK(ndr_pull_spoolss_Field(ndr, NDR_SCALARS, &r->field));
22115 104 : NDR_CHECK(ndr_pull_spoolss_NotifyTable(ndr, NDR_SCALARS, &r->variable_type));
22116 52 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
22117 52 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->data, r->variable_type));
22118 52 : NDR_CHECK(ndr_pull_spoolss_NotifyData(ndr, NDR_SCALARS, &r->data));
22119 52 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
22120 : }
22121 104 : if (ndr_flags & NDR_BUFFERS) {
22122 52 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->data, r->variable_type));
22123 52 : NDR_CHECK(ndr_pull_spoolss_NotifyData(ndr, NDR_BUFFERS, &r->data));
22124 : }
22125 0 : return NDR_ERR_SUCCESS;
22126 : }
22127 :
22128 52 : _PUBLIC_ void ndr_print_spoolss_Notify(struct ndr_print *ndr, const char *name, const struct spoolss_Notify *r)
22129 : {
22130 52 : ndr_print_struct(ndr, name, "spoolss_Notify");
22131 52 : if (r == NULL) { ndr_print_null(ndr); return; }
22132 52 : ndr->depth++;
22133 52 : ndr_print_spoolss_NotifyType(ndr, "type", r->type);
22134 52 : ndr_print_set_switch_value(ndr, &r->field, r->type);
22135 52 : ndr_print_spoolss_Field(ndr, "field", &r->field);
22136 52 : ndr_print_spoolss_NotifyTable(ndr, "variable_type", r->variable_type);
22137 52 : ndr_print_uint32(ndr, "job_id", r->job_id);
22138 52 : ndr_print_set_switch_value(ndr, &r->data, r->variable_type);
22139 52 : ndr_print_spoolss_NotifyData(ndr, "data", &r->data);
22140 52 : ndr->depth--;
22141 : }
22142 :
22143 4 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_NotifyInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_NotifyInfo *r)
22144 : {
22145 0 : uint32_t cntr_notifies_0;
22146 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
22147 4 : if (ndr_flags & NDR_SCALARS) {
22148 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
22149 4 : NDR_CHECK(ndr_push_align(ndr, 5));
22150 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
22151 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
22152 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
22153 4 : for (cntr_notifies_0 = 0; cntr_notifies_0 < (r->count); cntr_notifies_0++) {
22154 0 : NDR_CHECK(ndr_push_spoolss_Notify(ndr, NDR_SCALARS, &r->notifies[cntr_notifies_0]));
22155 : }
22156 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
22157 : }
22158 4 : if (ndr_flags & NDR_BUFFERS) {
22159 4 : for (cntr_notifies_0 = 0; cntr_notifies_0 < (r->count); cntr_notifies_0++) {
22160 0 : NDR_CHECK(ndr_push_spoolss_Notify(ndr, NDR_BUFFERS, &r->notifies[cntr_notifies_0]));
22161 : }
22162 : }
22163 4 : return NDR_ERR_SUCCESS;
22164 : }
22165 :
22166 6 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_NotifyInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_NotifyInfo *r)
22167 : {
22168 6 : uint32_t size_notifies_0 = 0;
22169 2 : uint32_t cntr_notifies_0;
22170 6 : TALLOC_CTX *_mem_save_notifies_0 = NULL;
22171 6 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
22172 6 : if (ndr_flags & NDR_SCALARS) {
22173 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->notifies));
22174 6 : NDR_CHECK(ndr_pull_align(ndr, 5));
22175 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
22176 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
22177 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
22178 6 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->notifies, &size_notifies_0));
22179 6 : NDR_PULL_ALLOC_N(ndr, r->notifies, size_notifies_0);
22180 6 : _mem_save_notifies_0 = NDR_PULL_GET_MEM_CTX(ndr);
22181 6 : NDR_PULL_SET_MEM_CTX(ndr, r->notifies, 0);
22182 58 : for (cntr_notifies_0 = 0; cntr_notifies_0 < (size_notifies_0); cntr_notifies_0++) {
22183 52 : NDR_CHECK(ndr_pull_spoolss_Notify(ndr, NDR_SCALARS, &r->notifies[cntr_notifies_0]));
22184 : }
22185 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notifies_0, 0);
22186 6 : if (r->notifies) {
22187 6 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->notifies, r->count));
22188 : }
22189 6 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
22190 : }
22191 6 : if (ndr_flags & NDR_BUFFERS) {
22192 6 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->notifies, &size_notifies_0));
22193 6 : _mem_save_notifies_0 = NDR_PULL_GET_MEM_CTX(ndr);
22194 6 : NDR_PULL_SET_MEM_CTX(ndr, r->notifies, 0);
22195 58 : for (cntr_notifies_0 = 0; cntr_notifies_0 < (size_notifies_0); cntr_notifies_0++) {
22196 52 : NDR_CHECK(ndr_pull_spoolss_Notify(ndr, NDR_BUFFERS, &r->notifies[cntr_notifies_0]));
22197 : }
22198 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notifies_0, 0);
22199 6 : for (cntr_notifies_0 = 0; cntr_notifies_0 < (size_notifies_0); cntr_notifies_0++) {
22200 : }
22201 : }
22202 4 : return NDR_ERR_SUCCESS;
22203 : }
22204 :
22205 0 : static void ndr_print_flags_spoolss_NotifyInfo(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_NotifyInfo *r)
22206 : {
22207 0 : ndr_print_spoolss_NotifyInfo(ndr, name, r);
22208 0 : }
22209 :
22210 2 : _PUBLIC_ void ndr_print_spoolss_NotifyInfo(struct ndr_print *ndr, const char *name, const struct spoolss_NotifyInfo *r)
22211 : {
22212 2 : uint32_t cntr_notifies_0;
22213 2 : ndr_print_struct(ndr, name, "spoolss_NotifyInfo");
22214 2 : if (r == NULL) { ndr_print_null(ndr); return; }
22215 2 : ndr->depth++;
22216 2 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->version);
22217 2 : ndr_print_uint32(ndr, "flags", r->flags);
22218 2 : ndr_print_uint32(ndr, "count", r->count);
22219 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "notifies", (uint32_t)(r->count));
22220 2 : ndr->depth++;
22221 54 : for (cntr_notifies_0 = 0; cntr_notifies_0 < (r->count); cntr_notifies_0++) {
22222 52 : ndr_print_spoolss_Notify(ndr, "notifies", &r->notifies[cntr_notifies_0]);
22223 : }
22224 2 : ndr->depth--;
22225 2 : ndr->depth--;
22226 : }
22227 :
22228 0 : static enum ndr_err_code ndr_push_spoolss_ReplyPrinterInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_ReplyPrinterInfo *r)
22229 : {
22230 0 : uint32_t level;
22231 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
22232 0 : if (ndr_flags & NDR_SCALARS) {
22233 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
22234 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
22235 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
22236 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
22237 : /* ms_union is always aligned to the largest union arm*/
22238 0 : NDR_CHECK(ndr_push_align(ndr, 5));
22239 0 : switch (level) {
22240 0 : case 0: {
22241 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
22242 0 : break; }
22243 :
22244 0 : default:
22245 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
22246 : }
22247 : }
22248 0 : if (ndr_flags & NDR_BUFFERS) {
22249 0 : if (!(ndr_flags & NDR_SCALARS)) {
22250 : /* We didn't get it above, and the token is not needed after this. */
22251 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
22252 : }
22253 0 : switch (level) {
22254 0 : case 0:
22255 0 : if (r->info0) {
22256 0 : NDR_CHECK(ndr_push_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
22257 : }
22258 0 : break;
22259 :
22260 0 : default:
22261 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
22262 : }
22263 : }
22264 0 : return NDR_ERR_SUCCESS;
22265 : }
22266 :
22267 0 : static enum ndr_err_code ndr_pull_spoolss_ReplyPrinterInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_ReplyPrinterInfo *r)
22268 : {
22269 0 : uint32_t level;
22270 0 : uint32_t _level;
22271 0 : TALLOC_CTX *_mem_save_info0_0 = NULL;
22272 0 : uint32_t _ptr_info0;
22273 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
22274 0 : if (ndr_flags & NDR_SCALARS) {
22275 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
22276 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
22277 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
22278 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
22279 0 : if (_level != level) {
22280 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
22281 : }
22282 : /* ms_union is always aligned to the largest union arm*/
22283 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
22284 0 : switch (level) {
22285 0 : case 0: {
22286 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
22287 0 : if (_ptr_info0) {
22288 0 : NDR_PULL_ALLOC(ndr, r->info0);
22289 : } else {
22290 0 : r->info0 = NULL;
22291 : }
22292 0 : break; }
22293 :
22294 0 : default:
22295 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
22296 : }
22297 : }
22298 0 : if (ndr_flags & NDR_BUFFERS) {
22299 0 : if (!(ndr_flags & NDR_SCALARS)) {
22300 : /* We didn't get it above, and the token is not needed after this. */
22301 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
22302 : }
22303 0 : switch (level) {
22304 0 : case 0:
22305 0 : if (r->info0) {
22306 0 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
22307 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
22308 0 : NDR_CHECK(ndr_pull_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
22309 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
22310 : }
22311 0 : break;
22312 :
22313 0 : default:
22314 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
22315 : }
22316 : }
22317 0 : return NDR_ERR_SUCCESS;
22318 : }
22319 :
22320 0 : _PUBLIC_ void ndr_print_spoolss_ReplyPrinterInfo(struct ndr_print *ndr, const char *name, const union spoolss_ReplyPrinterInfo *r)
22321 : {
22322 0 : uint32_t level;
22323 0 : level = ndr_print_steal_switch_value(ndr, r);
22324 0 : ndr_print_union(ndr, name, level, "spoolss_ReplyPrinterInfo");
22325 0 : switch (level) {
22326 0 : case 0:
22327 0 : ndr_print_ptr(ndr, "info0", r->info0);
22328 0 : ndr->depth++;
22329 0 : if (r->info0) {
22330 0 : ndr_print_spoolss_NotifyInfo(ndr, "info0", r->info0);
22331 : }
22332 0 : ndr->depth--;
22333 0 : break;
22334 :
22335 0 : default:
22336 0 : ndr_print_bad_level(ndr, name, level);
22337 : }
22338 0 : }
22339 :
22340 0 : static enum ndr_err_code ndr_push_spoolss_PrinterNotifyFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
22341 : {
22342 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
22343 0 : return NDR_ERR_SUCCESS;
22344 : }
22345 :
22346 0 : static enum ndr_err_code ndr_pull_spoolss_PrinterNotifyFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
22347 : {
22348 0 : uint32_t v;
22349 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
22350 0 : *r = v;
22351 0 : return NDR_ERR_SUCCESS;
22352 : }
22353 :
22354 0 : _PUBLIC_ void ndr_print_spoolss_PrinterNotifyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
22355 : {
22356 0 : ndr_print_uint32(ndr, name, r);
22357 0 : ndr->depth++;
22358 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_DISCARDED", PRINTER_NOTIFY_INFO_DISCARDED, r);
22359 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_DISCARDNOTED", PRINTER_NOTIFY_INFO_DISCARDNOTED, r);
22360 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_COLOR_MISMATCH", PRINTER_NOTIFY_INFO_COLOR_MISMATCH, r);
22361 0 : ndr->depth--;
22362 0 : }
22363 :
22364 766 : static enum ndr_err_code ndr_push_spoolss_UserLevel1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_UserLevel1 *r)
22365 : {
22366 766 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
22367 766 : if (ndr_flags & NDR_SCALARS) {
22368 766 : NDR_CHECK(ndr_push_align(ndr, 5));
22369 766 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
22370 766 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
22371 766 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
22372 766 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->build));
22373 766 : NDR_CHECK(ndr_push_spoolss_MajorVersion(ndr, NDR_SCALARS, r->major));
22374 766 : NDR_CHECK(ndr_push_spoolss_MinorVersion(ndr, NDR_SCALARS, r->minor));
22375 766 : NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor));
22376 766 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
22377 : }
22378 766 : if (ndr_flags & NDR_BUFFERS) {
22379 766 : if (r->client) {
22380 754 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
22381 754 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
22382 754 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
22383 754 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
22384 : }
22385 766 : if (r->user) {
22386 754 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
22387 754 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
22388 754 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
22389 754 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
22390 : }
22391 : }
22392 766 : return NDR_ERR_SUCCESS;
22393 : }
22394 :
22395 778 : static enum ndr_err_code ndr_pull_spoolss_UserLevel1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_UserLevel1 *r)
22396 : {
22397 12 : uint32_t _ptr_client;
22398 778 : uint32_t size_client_1 = 0;
22399 778 : uint32_t length_client_1 = 0;
22400 778 : TALLOC_CTX *_mem_save_client_0 = NULL;
22401 12 : uint32_t _ptr_user;
22402 778 : uint32_t size_user_1 = 0;
22403 778 : uint32_t length_user_1 = 0;
22404 778 : TALLOC_CTX *_mem_save_user_0 = NULL;
22405 778 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
22406 778 : if (ndr_flags & NDR_SCALARS) {
22407 778 : NDR_CHECK(ndr_pull_align(ndr, 5));
22408 778 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
22409 778 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
22410 778 : if (_ptr_client) {
22411 766 : NDR_PULL_ALLOC(ndr, r->client);
22412 : } else {
22413 12 : r->client = NULL;
22414 : }
22415 778 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
22416 778 : if (_ptr_user) {
22417 766 : NDR_PULL_ALLOC(ndr, r->user);
22418 : } else {
22419 12 : r->user = NULL;
22420 : }
22421 778 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build));
22422 790 : NDR_CHECK(ndr_pull_spoolss_MajorVersion(ndr, NDR_SCALARS, &r->major));
22423 790 : NDR_CHECK(ndr_pull_spoolss_MinorVersion(ndr, NDR_SCALARS, &r->minor));
22424 790 : NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor));
22425 778 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
22426 : }
22427 778 : if (ndr_flags & NDR_BUFFERS) {
22428 778 : if (r->client) {
22429 766 : _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
22430 766 : NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
22431 766 : NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
22432 766 : NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
22433 766 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client, &size_client_1));
22434 766 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client, &length_client_1));
22435 766 : if (length_client_1 > size_client_1) {
22436 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_client_1, length_client_1);
22437 : }
22438 766 : NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
22439 766 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
22440 766 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
22441 : }
22442 778 : if (r->user) {
22443 766 : _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
22444 766 : NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
22445 766 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
22446 766 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
22447 766 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
22448 766 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
22449 766 : if (length_user_1 > size_user_1) {
22450 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_1, length_user_1);
22451 : }
22452 766 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
22453 766 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
22454 766 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
22455 : }
22456 : }
22457 766 : return NDR_ERR_SUCCESS;
22458 : }
22459 :
22460 12 : _PUBLIC_ void ndr_print_spoolss_UserLevel1(struct ndr_print *ndr, const char *name, const struct spoolss_UserLevel1 *r)
22461 : {
22462 12 : ndr_print_struct(ndr, name, "spoolss_UserLevel1");
22463 12 : if (r == NULL) { ndr_print_null(ndr); return; }
22464 12 : ndr->depth++;
22465 12 : ndr_print_uint32(ndr, "size", r->size);
22466 12 : ndr_print_ptr(ndr, "client", r->client);
22467 12 : ndr->depth++;
22468 12 : if (r->client) {
22469 12 : ndr_print_string(ndr, "client", r->client);
22470 : }
22471 12 : ndr->depth--;
22472 12 : ndr_print_ptr(ndr, "user", r->user);
22473 12 : ndr->depth++;
22474 12 : if (r->user) {
22475 12 : ndr_print_string(ndr, "user", r->user);
22476 : }
22477 12 : ndr->depth--;
22478 12 : ndr_print_uint32(ndr, "build", r->build);
22479 12 : ndr_print_spoolss_MajorVersion(ndr, "major", r->major);
22480 12 : ndr_print_spoolss_MinorVersion(ndr, "minor", r->minor);
22481 12 : ndr_print_spoolss_ProcessorArchitecture(ndr, "processor", r->processor);
22482 12 : ndr->depth--;
22483 : }
22484 :
22485 0 : static enum ndr_err_code ndr_push_spoolss_UserLevel2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_UserLevel2 *r)
22486 : {
22487 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
22488 0 : if (ndr_flags & NDR_SCALARS) {
22489 0 : NDR_CHECK(ndr_push_align(ndr, 4));
22490 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->not_used));
22491 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
22492 : }
22493 0 : if (ndr_flags & NDR_BUFFERS) {
22494 0 : }
22495 0 : return NDR_ERR_SUCCESS;
22496 : }
22497 :
22498 0 : static enum ndr_err_code ndr_pull_spoolss_UserLevel2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_UserLevel2 *r)
22499 : {
22500 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
22501 0 : if (ndr_flags & NDR_SCALARS) {
22502 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
22503 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->not_used));
22504 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
22505 : }
22506 0 : if (ndr_flags & NDR_BUFFERS) {
22507 0 : }
22508 0 : return NDR_ERR_SUCCESS;
22509 : }
22510 :
22511 0 : _PUBLIC_ void ndr_print_spoolss_UserLevel2(struct ndr_print *ndr, const char *name, const struct spoolss_UserLevel2 *r)
22512 : {
22513 0 : ndr_print_struct(ndr, name, "spoolss_UserLevel2");
22514 0 : if (r == NULL) { ndr_print_null(ndr); return; }
22515 0 : ndr->depth++;
22516 0 : ndr_print_uint32(ndr, "not_used", r->not_used);
22517 0 : ndr->depth--;
22518 : }
22519 :
22520 0 : static enum ndr_err_code ndr_push_spoolss_UserLevel3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_UserLevel3 *r)
22521 : {
22522 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
22523 0 : if (ndr_flags & NDR_SCALARS) {
22524 0 : NDR_CHECK(ndr_push_align(ndr, 5));
22525 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
22526 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
22527 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size2));
22528 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
22529 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
22530 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->build));
22531 0 : NDR_CHECK(ndr_push_spoolss_MajorVersion(ndr, NDR_SCALARS, r->major));
22532 0 : NDR_CHECK(ndr_push_spoolss_MinorVersion(ndr, NDR_SCALARS, r->minor));
22533 0 : NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor));
22534 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->reserved));
22535 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
22536 : }
22537 0 : if (ndr_flags & NDR_BUFFERS) {
22538 0 : if (r->client) {
22539 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
22540 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
22541 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
22542 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
22543 : }
22544 0 : if (r->user) {
22545 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
22546 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
22547 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
22548 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
22549 : }
22550 : }
22551 0 : return NDR_ERR_SUCCESS;
22552 : }
22553 :
22554 0 : static enum ndr_err_code ndr_pull_spoolss_UserLevel3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_UserLevel3 *r)
22555 : {
22556 0 : uint32_t _ptr_client;
22557 0 : uint32_t size_client_1 = 0;
22558 0 : uint32_t length_client_1 = 0;
22559 0 : TALLOC_CTX *_mem_save_client_0 = NULL;
22560 0 : uint32_t _ptr_user;
22561 0 : uint32_t size_user_1 = 0;
22562 0 : uint32_t length_user_1 = 0;
22563 0 : TALLOC_CTX *_mem_save_user_0 = NULL;
22564 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
22565 0 : if (ndr_flags & NDR_SCALARS) {
22566 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
22567 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
22568 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
22569 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size2));
22570 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
22571 0 : if (_ptr_client) {
22572 0 : NDR_PULL_ALLOC(ndr, r->client);
22573 : } else {
22574 0 : r->client = NULL;
22575 : }
22576 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
22577 0 : if (_ptr_user) {
22578 0 : NDR_PULL_ALLOC(ndr, r->user);
22579 : } else {
22580 0 : r->user = NULL;
22581 : }
22582 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build));
22583 0 : NDR_CHECK(ndr_pull_spoolss_MajorVersion(ndr, NDR_SCALARS, &r->major));
22584 0 : NDR_CHECK(ndr_pull_spoolss_MinorVersion(ndr, NDR_SCALARS, &r->minor));
22585 0 : NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor));
22586 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->reserved));
22587 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
22588 : }
22589 0 : if (ndr_flags & NDR_BUFFERS) {
22590 0 : if (r->client) {
22591 0 : _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
22592 0 : NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
22593 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
22594 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
22595 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client, &size_client_1));
22596 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client, &length_client_1));
22597 0 : if (length_client_1 > size_client_1) {
22598 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_client_1, length_client_1);
22599 : }
22600 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
22601 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
22602 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
22603 : }
22604 0 : if (r->user) {
22605 0 : _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
22606 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
22607 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
22608 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
22609 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
22610 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
22611 0 : if (length_user_1 > size_user_1) {
22612 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_1, length_user_1);
22613 : }
22614 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
22615 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
22616 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
22617 : }
22618 : }
22619 0 : return NDR_ERR_SUCCESS;
22620 : }
22621 :
22622 0 : _PUBLIC_ void ndr_print_spoolss_UserLevel3(struct ndr_print *ndr, const char *name, const struct spoolss_UserLevel3 *r)
22623 : {
22624 0 : ndr_print_struct(ndr, name, "spoolss_UserLevel3");
22625 0 : if (r == NULL) { ndr_print_null(ndr); return; }
22626 0 : ndr->depth++;
22627 0 : ndr_print_uint32(ndr, "size", r->size);
22628 0 : ndr_print_uint32(ndr, "flags", r->flags);
22629 0 : ndr_print_uint32(ndr, "size2", r->size2);
22630 0 : ndr_print_ptr(ndr, "client", r->client);
22631 0 : ndr->depth++;
22632 0 : if (r->client) {
22633 0 : ndr_print_string(ndr, "client", r->client);
22634 : }
22635 0 : ndr->depth--;
22636 0 : ndr_print_ptr(ndr, "user", r->user);
22637 0 : ndr->depth++;
22638 0 : if (r->user) {
22639 0 : ndr_print_string(ndr, "user", r->user);
22640 : }
22641 0 : ndr->depth--;
22642 0 : ndr_print_uint32(ndr, "build", r->build);
22643 0 : ndr_print_spoolss_MajorVersion(ndr, "major", r->major);
22644 0 : ndr_print_spoolss_MinorVersion(ndr, "minor", r->minor);
22645 0 : ndr_print_spoolss_ProcessorArchitecture(ndr, "processor", r->processor);
22646 0 : ndr_print_udlong(ndr, "reserved", r->reserved);
22647 0 : ndr->depth--;
22648 : }
22649 :
22650 1636 : static enum ndr_err_code ndr_push_spoolss_UserLevel(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_UserLevel *r)
22651 : {
22652 0 : uint32_t level;
22653 1636 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
22654 1636 : if (ndr_flags & NDR_SCALARS) {
22655 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
22656 818 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
22657 818 : NDR_CHECK(ndr_push_union_align(ndr, 5));
22658 818 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
22659 : /* ms_union is always aligned to the largest union arm*/
22660 818 : NDR_CHECK(ndr_push_align(ndr, 5));
22661 818 : switch (level) {
22662 818 : case 1: {
22663 818 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->level1));
22664 818 : break; }
22665 :
22666 0 : case 2: {
22667 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->level2));
22668 0 : break; }
22669 :
22670 0 : case 3: {
22671 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->level3));
22672 0 : break; }
22673 :
22674 0 : default:
22675 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
22676 : }
22677 : }
22678 1636 : if (ndr_flags & NDR_BUFFERS) {
22679 818 : if (!(ndr_flags & NDR_SCALARS)) {
22680 : /* We didn't get it above, and the token is not needed after this. */
22681 818 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
22682 : }
22683 818 : switch (level) {
22684 818 : case 1:
22685 818 : if (r->level1) {
22686 766 : NDR_CHECK(ndr_push_spoolss_UserLevel1(ndr, NDR_SCALARS|NDR_BUFFERS, r->level1));
22687 : }
22688 818 : break;
22689 :
22690 0 : case 2:
22691 0 : if (r->level2) {
22692 0 : NDR_CHECK(ndr_push_spoolss_UserLevel2(ndr, NDR_SCALARS, r->level2));
22693 : }
22694 0 : break;
22695 :
22696 0 : case 3:
22697 0 : if (r->level3) {
22698 0 : NDR_CHECK(ndr_push_spoolss_UserLevel3(ndr, NDR_SCALARS|NDR_BUFFERS, r->level3));
22699 : }
22700 0 : break;
22701 :
22702 0 : default:
22703 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
22704 : }
22705 : }
22706 1636 : return NDR_ERR_SUCCESS;
22707 : }
22708 :
22709 1660 : static enum ndr_err_code ndr_pull_spoolss_UserLevel(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_UserLevel *r)
22710 : {
22711 24 : uint32_t level;
22712 24 : uint32_t _level;
22713 1660 : TALLOC_CTX *_mem_save_level1_0 = NULL;
22714 24 : uint32_t _ptr_level1;
22715 1660 : TALLOC_CTX *_mem_save_level2_0 = NULL;
22716 24 : uint32_t _ptr_level2;
22717 1660 : TALLOC_CTX *_mem_save_level3_0 = NULL;
22718 24 : uint32_t _ptr_level3;
22719 1660 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
22720 1660 : if (ndr_flags & NDR_SCALARS) {
22721 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
22722 830 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
22723 830 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
22724 830 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
22725 830 : if (_level != level) {
22726 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
22727 : }
22728 : /* ms_union is always aligned to the largest union arm*/
22729 830 : NDR_CHECK(ndr_pull_align(ndr, 5));
22730 830 : switch (level) {
22731 830 : case 1: {
22732 830 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_level1));
22733 830 : if (_ptr_level1) {
22734 778 : NDR_PULL_ALLOC(ndr, r->level1);
22735 : } else {
22736 52 : r->level1 = NULL;
22737 : }
22738 818 : break; }
22739 :
22740 0 : case 2: {
22741 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_level2));
22742 0 : if (_ptr_level2) {
22743 0 : NDR_PULL_ALLOC(ndr, r->level2);
22744 : } else {
22745 0 : r->level2 = NULL;
22746 : }
22747 0 : break; }
22748 :
22749 0 : case 3: {
22750 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_level3));
22751 0 : if (_ptr_level3) {
22752 0 : NDR_PULL_ALLOC(ndr, r->level3);
22753 : } else {
22754 0 : r->level3 = NULL;
22755 : }
22756 0 : break; }
22757 :
22758 0 : default:
22759 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
22760 : }
22761 : }
22762 1660 : if (ndr_flags & NDR_BUFFERS) {
22763 830 : if (!(ndr_flags & NDR_SCALARS)) {
22764 : /* We didn't get it above, and the token is not needed after this. */
22765 830 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
22766 : }
22767 830 : switch (level) {
22768 830 : case 1:
22769 830 : if (r->level1) {
22770 778 : _mem_save_level1_0 = NDR_PULL_GET_MEM_CTX(ndr);
22771 778 : NDR_PULL_SET_MEM_CTX(ndr, r->level1, 0);
22772 778 : NDR_CHECK(ndr_pull_spoolss_UserLevel1(ndr, NDR_SCALARS|NDR_BUFFERS, r->level1));
22773 778 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level1_0, 0);
22774 : }
22775 818 : break;
22776 :
22777 0 : case 2:
22778 0 : if (r->level2) {
22779 0 : _mem_save_level2_0 = NDR_PULL_GET_MEM_CTX(ndr);
22780 0 : NDR_PULL_SET_MEM_CTX(ndr, r->level2, 0);
22781 0 : NDR_CHECK(ndr_pull_spoolss_UserLevel2(ndr, NDR_SCALARS, r->level2));
22782 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level2_0, 0);
22783 : }
22784 0 : break;
22785 :
22786 0 : case 3:
22787 0 : if (r->level3) {
22788 0 : _mem_save_level3_0 = NDR_PULL_GET_MEM_CTX(ndr);
22789 0 : NDR_PULL_SET_MEM_CTX(ndr, r->level3, 0);
22790 0 : NDR_CHECK(ndr_pull_spoolss_UserLevel3(ndr, NDR_SCALARS|NDR_BUFFERS, r->level3));
22791 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level3_0, 0);
22792 : }
22793 0 : break;
22794 :
22795 0 : default:
22796 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
22797 : }
22798 : }
22799 1636 : return NDR_ERR_SUCCESS;
22800 : }
22801 :
22802 12 : _PUBLIC_ void ndr_print_spoolss_UserLevel(struct ndr_print *ndr, const char *name, const union spoolss_UserLevel *r)
22803 : {
22804 12 : uint32_t level;
22805 12 : level = ndr_print_steal_switch_value(ndr, r);
22806 12 : ndr_print_union(ndr, name, level, "spoolss_UserLevel");
22807 12 : switch (level) {
22808 12 : case 1:
22809 12 : ndr_print_ptr(ndr, "level1", r->level1);
22810 12 : ndr->depth++;
22811 12 : if (r->level1) {
22812 12 : ndr_print_spoolss_UserLevel1(ndr, "level1", r->level1);
22813 : }
22814 12 : ndr->depth--;
22815 12 : break;
22816 :
22817 0 : case 2:
22818 0 : ndr_print_ptr(ndr, "level2", r->level2);
22819 0 : ndr->depth++;
22820 0 : if (r->level2) {
22821 0 : ndr_print_spoolss_UserLevel2(ndr, "level2", r->level2);
22822 : }
22823 0 : ndr->depth--;
22824 0 : break;
22825 :
22826 0 : case 3:
22827 0 : ndr_print_ptr(ndr, "level3", r->level3);
22828 0 : ndr->depth++;
22829 0 : if (r->level3) {
22830 0 : ndr_print_spoolss_UserLevel3(ndr, "level3", r->level3);
22831 : }
22832 0 : ndr->depth--;
22833 0 : break;
22834 :
22835 0 : default:
22836 0 : ndr_print_bad_level(ndr, name, level);
22837 : }
22838 12 : }
22839 :
22840 818 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_UserLevelCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_UserLevelCtr *r)
22841 : {
22842 818 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
22843 818 : if (ndr_flags & NDR_SCALARS) {
22844 818 : NDR_CHECK(ndr_push_align(ndr, 5));
22845 818 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
22846 818 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->user_info, r->level));
22847 818 : NDR_CHECK(ndr_push_spoolss_UserLevel(ndr, NDR_SCALARS, &r->user_info));
22848 818 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
22849 : }
22850 818 : if (ndr_flags & NDR_BUFFERS) {
22851 818 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->user_info, r->level));
22852 818 : NDR_CHECK(ndr_push_spoolss_UserLevel(ndr, NDR_BUFFERS, &r->user_info));
22853 : }
22854 818 : return NDR_ERR_SUCCESS;
22855 : }
22856 :
22857 830 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_UserLevelCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_UserLevelCtr *r)
22858 : {
22859 830 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
22860 830 : if (ndr_flags & NDR_SCALARS) {
22861 830 : NDR_CHECK(ndr_pull_align(ndr, 5));
22862 830 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
22863 830 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->user_info, r->level));
22864 830 : NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr, NDR_SCALARS, &r->user_info));
22865 830 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
22866 : }
22867 830 : if (ndr_flags & NDR_BUFFERS) {
22868 830 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->user_info, r->level));
22869 830 : NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr, NDR_BUFFERS, &r->user_info));
22870 : }
22871 818 : return NDR_ERR_SUCCESS;
22872 : }
22873 :
22874 0 : static void ndr_print_flags_spoolss_UserLevelCtr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_UserLevelCtr *r)
22875 : {
22876 0 : ndr_print_spoolss_UserLevelCtr(ndr, name, r);
22877 0 : }
22878 :
22879 12 : _PUBLIC_ void ndr_print_spoolss_UserLevelCtr(struct ndr_print *ndr, const char *name, const struct spoolss_UserLevelCtr *r)
22880 : {
22881 12 : ndr_print_struct(ndr, name, "spoolss_UserLevelCtr");
22882 12 : if (r == NULL) { ndr_print_null(ndr); return; }
22883 12 : ndr->depth++;
22884 12 : ndr_print_uint32(ndr, "level", r->level);
22885 12 : ndr_print_set_switch_value(ndr, &r->user_info, r->level);
22886 12 : ndr_print_spoolss_UserLevel(ndr, "user_info", &r->user_info);
22887 12 : ndr->depth--;
22888 : }
22889 :
22890 988 : static enum ndr_err_code ndr_push_spoolss_AccessRights(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
22891 : {
22892 988 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
22893 988 : return NDR_ERR_SUCCESS;
22894 : }
22895 :
22896 994 : static enum ndr_err_code ndr_pull_spoolss_AccessRights(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
22897 : {
22898 6 : uint32_t v;
22899 994 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
22900 994 : *r = v;
22901 994 : return NDR_ERR_SUCCESS;
22902 : }
22903 :
22904 6 : _PUBLIC_ void ndr_print_spoolss_AccessRights(struct ndr_print *ndr, const char *name, uint32_t r)
22905 : {
22906 6 : ndr_print_uint32(ndr, name, r);
22907 6 : ndr->depth++;
22908 6 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SERVER_ACCESS_ADMINISTER", SERVER_ACCESS_ADMINISTER, r);
22909 6 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SERVER_ACCESS_ENUMERATE", SERVER_ACCESS_ENUMERATE, r);
22910 6 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ACCESS_ADMINISTER", PRINTER_ACCESS_ADMINISTER, r);
22911 6 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ACCESS_USE", PRINTER_ACCESS_USE, r);
22912 6 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_ACCESS_ADMINISTER", JOB_ACCESS_ADMINISTER, r);
22913 6 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_ACCESS_READ", JOB_ACCESS_READ, r);
22914 6 : ndr->depth--;
22915 6 : }
22916 :
22917 11088 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterEnumValues(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrinterEnumValues *r)
22918 : {
22919 11088 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
22920 11088 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
22921 11088 : if (ndr_flags & NDR_SCALARS) {
22922 5544 : NDR_CHECK(ndr_push_align(ndr, 5));
22923 5544 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
22924 : {
22925 5544 : libndr_flags _flags_save_string = ndr->flags;
22926 5544 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
22927 5544 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value_name));
22928 5544 : ndr->flags = _flags_save_string;
22929 : }
22930 5544 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->value_name)));
22931 5544 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->type));
22932 : {
22933 5544 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
22934 5544 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING|ndr_spoolss_PrinterEnumValues_align(r->type));
22935 5544 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data));
22936 5544 : ndr->flags = _flags_save_DATA_BLOB;
22937 : }
22938 5544 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data?r->data->length:0));
22939 5544 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
22940 : }
22941 11088 : if (ndr_flags & NDR_BUFFERS) {
22942 5544 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
22943 : {
22944 5544 : libndr_flags _flags_save_string = ndr->flags;
22945 5544 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
22946 5544 : if (r->value_name) {
22947 5544 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->value_name));
22948 5544 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->value_name));
22949 5544 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->value_name));
22950 : }
22951 5544 : ndr->flags = _flags_save_string;
22952 : }
22953 : {
22954 5544 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
22955 5544 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING|ndr_spoolss_PrinterEnumValues_align(r->type));
22956 5544 : if (r->data) {
22957 5436 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data));
22958 : {
22959 0 : struct ndr_push *_ndr_data;
22960 5436 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_data, 0, r->data?r->data->length:0));
22961 5436 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_data, NDR_SCALARS, *r->data));
22962 5436 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_data, 0, r->data?r->data->length:0));
22963 : }
22964 5436 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data));
22965 : }
22966 5544 : ndr->flags = _flags_save_DATA_BLOB;
22967 : }
22968 : }
22969 11088 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
22970 11088 : return NDR_ERR_SUCCESS;
22971 : }
22972 :
22973 3348 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterEnumValues(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrinterEnumValues *r)
22974 : {
22975 3348 : uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
22976 100 : uint32_t _ptr_value_name;
22977 3348 : TALLOC_CTX *_mem_save_value_name_0 = NULL;
22978 100 : uint32_t _ptr_data;
22979 3348 : TALLOC_CTX *_mem_save_data_0 = NULL;
22980 3348 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
22981 3348 : if (ndr_flags & NDR_SCALARS) {
22982 1674 : NDR_CHECK(ndr_pull_align(ndr, 5));
22983 1674 : NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
22984 : {
22985 1674 : libndr_flags _flags_save_string = ndr->flags;
22986 1674 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
22987 1674 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_name));
22988 1674 : if (_ptr_value_name) {
22989 1674 : NDR_PULL_ALLOC(ndr, r->value_name);
22990 1674 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value_name, _ptr_value_name));
22991 : } else {
22992 0 : r->value_name = NULL;
22993 : }
22994 1674 : ndr->flags = _flags_save_string;
22995 : }
22996 1674 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_name_len));
22997 1674 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->type));
22998 : {
22999 1674 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
23000 1674 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING|ndr_spoolss_PrinterEnumValues_align(r->type));
23001 1674 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
23002 1674 : if (_ptr_data) {
23003 1638 : NDR_PULL_ALLOC(ndr, r->data);
23004 1638 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data, _ptr_data));
23005 : } else {
23006 36 : r->data = NULL;
23007 : }
23008 1674 : ndr->flags = _flags_save_DATA_BLOB;
23009 : }
23010 1674 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_length));
23011 1674 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
23012 : }
23013 3348 : if (ndr_flags & NDR_BUFFERS) {
23014 1674 : NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
23015 : {
23016 1674 : libndr_flags _flags_save_string = ndr->flags;
23017 1674 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
23018 1674 : if (r->value_name) {
23019 50 : uint32_t _relative_save_offset;
23020 1674 : _relative_save_offset = ndr->offset;
23021 1674 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value_name));
23022 1674 : _mem_save_value_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
23023 1674 : NDR_PULL_SET_MEM_CTX(ndr, r->value_name, 0);
23024 1674 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->value_name));
23025 1674 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_name_0, 0);
23026 1674 : if (ndr->offset > ndr->relative_highest_offset) {
23027 1674 : ndr->relative_highest_offset = ndr->offset;
23028 : }
23029 1674 : ndr->offset = _relative_save_offset;
23030 : }
23031 1674 : ndr->flags = _flags_save_string;
23032 : }
23033 : {
23034 1674 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
23035 1674 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING|ndr_spoolss_PrinterEnumValues_align(r->type));
23036 1674 : if (r->data) {
23037 50 : uint32_t _relative_save_offset;
23038 1638 : _relative_save_offset = ndr->offset;
23039 1638 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data));
23040 1638 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
23041 1638 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
23042 : {
23043 50 : struct ndr_pull *_ndr_data;
23044 1638 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_data, 0, r->data_length));
23045 1638 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_data, NDR_SCALARS, r->data));
23046 1638 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_data, 0, r->data_length));
23047 : }
23048 1638 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
23049 1638 : if (ndr->offset > ndr->relative_highest_offset) {
23050 1638 : ndr->relative_highest_offset = ndr->offset;
23051 : }
23052 1638 : ndr->offset = _relative_save_offset;
23053 : }
23054 1674 : ndr->flags = _flags_save_DATA_BLOB;
23055 : }
23056 : }
23057 3348 : ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
23058 3348 : return NDR_ERR_SUCCESS;
23059 : }
23060 :
23061 0 : static void ndr_print_flags_spoolss_PrinterEnumValues(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrinterEnumValues *r)
23062 : {
23063 0 : ndr_print_spoolss_PrinterEnumValues(ndr, name, r);
23064 0 : }
23065 :
23066 50 : _PUBLIC_ void ndr_print_spoolss_PrinterEnumValues(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterEnumValues *r)
23067 : {
23068 50 : ndr_print_struct(ndr, name, "spoolss_PrinterEnumValues");
23069 50 : if (r == NULL) { ndr_print_null(ndr); return; }
23070 50 : ndr->depth++;
23071 : {
23072 50 : libndr_flags _flags_save_string = ndr->flags;
23073 50 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
23074 50 : ndr_print_ptr(ndr, "value_name", r->value_name);
23075 50 : ndr->depth++;
23076 50 : if (r->value_name) {
23077 50 : ndr_print_string(ndr, "value_name", r->value_name);
23078 : }
23079 50 : ndr->depth--;
23080 50 : ndr->flags = _flags_save_string;
23081 : }
23082 50 : ndr_print_uint32(ndr, "value_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->value_name):r->value_name_len);
23083 50 : ndr_print_winreg_Type(ndr, "type", r->type);
23084 : {
23085 50 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
23086 50 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING|ndr_spoolss_PrinterEnumValues_align(r->type));
23087 50 : ndr_print_ptr(ndr, "data", r->data);
23088 50 : ndr->depth++;
23089 50 : if (r->data) {
23090 50 : ndr_print_DATA_BLOB(ndr, "data", *r->data);
23091 : }
23092 50 : ndr->depth--;
23093 50 : ndr->flags = _flags_save_DATA_BLOB;
23094 : }
23095 50 : ndr_print_uint32(ndr, "data_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->data?r->data->length:0:r->data_length);
23096 50 : ndr->depth--;
23097 : }
23098 :
23099 0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterEnumValues(const struct spoolss_PrinterEnumValues *r, libndr_flags flags)
23100 : {
23101 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterEnumValues);
23102 : }
23103 :
23104 3384 : static enum ndr_err_code ndr_push_spoolss_KeyNames(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_KeyNames *r)
23105 : {
23106 0 : uint32_t level;
23107 3384 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
23108 3384 : if (ndr_flags & NDR_SCALARS) {
23109 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
23110 3384 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
23111 3384 : NDR_CHECK(ndr_push_union_align(ndr, 4));
23112 3384 : switch (level) {
23113 340 : case 0: {
23114 340 : break; }
23115 :
23116 328 : case 1: {
23117 328 : break; }
23118 :
23119 2716 : default: {
23120 : {
23121 2716 : libndr_flags _flags_save_string_array = ndr->flags;
23122 2716 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
23123 2716 : NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->string_array));
23124 2716 : ndr->flags = _flags_save_string_array;
23125 : }
23126 2716 : break; }
23127 :
23128 : }
23129 : }
23130 3384 : return NDR_ERR_SUCCESS;
23131 : }
23132 :
23133 3388 : static enum ndr_err_code ndr_pull_spoolss_KeyNames(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_KeyNames *r)
23134 : {
23135 4 : uint32_t level;
23136 3388 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
23137 3388 : if (ndr_flags & NDR_SCALARS) {
23138 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
23139 3388 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
23140 3388 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
23141 3388 : switch (level) {
23142 340 : case 0: {
23143 340 : break; }
23144 :
23145 328 : case 1: {
23146 328 : break; }
23147 :
23148 2716 : default: {
23149 : {
23150 2716 : libndr_flags _flags_save_string_array = ndr->flags;
23151 2716 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
23152 2716 : NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->string_array));
23153 2716 : ndr->flags = _flags_save_string_array;
23154 : }
23155 2716 : break; }
23156 :
23157 : }
23158 : }
23159 3384 : return NDR_ERR_SUCCESS;
23160 : }
23161 :
23162 4 : _PUBLIC_ void ndr_print_spoolss_KeyNames(struct ndr_print *ndr, const char *name, const union spoolss_KeyNames *r)
23163 : {
23164 4 : uint32_t level;
23165 4 : level = ndr_print_steal_switch_value(ndr, r);
23166 4 : ndr_print_union(ndr, name, level, "spoolss_KeyNames");
23167 4 : switch (level) {
23168 0 : case 0:
23169 0 : break;
23170 :
23171 0 : case 1:
23172 0 : break;
23173 :
23174 0 : default:
23175 : {
23176 0 : libndr_flags _flags_save_string_array = ndr->flags;
23177 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
23178 0 : ndr_print_string_array(ndr, "string_array", r->string_array);
23179 0 : ndr->flags = _flags_save_string_array;
23180 : }
23181 0 : break;
23182 :
23183 : }
23184 4 : }
23185 :
23186 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DeleteDriverFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
23187 : {
23188 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
23189 0 : return NDR_ERR_SUCCESS;
23190 : }
23191 :
23192 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DeleteDriverFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
23193 : {
23194 0 : uint32_t v;
23195 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
23196 0 : *r = v;
23197 0 : return NDR_ERR_SUCCESS;
23198 : }
23199 :
23200 0 : _PUBLIC_ void ndr_print_spoolss_DeleteDriverFlags(struct ndr_print *ndr, const char *name, uint32_t r)
23201 : {
23202 0 : ndr_print_uint32(ndr, name, r);
23203 0 : ndr->depth++;
23204 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DPD_DELETE_UNUSED_FILES", DPD_DELETE_UNUSED_FILES, r);
23205 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DPD_DELETE_SPECIFIC_VERSION", DPD_DELETE_SPECIFIC_VERSION, r);
23206 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DPD_DELETE_ALL_FILES", DPD_DELETE_ALL_FILES, r);
23207 0 : ndr->depth--;
23208 0 : }
23209 :
23210 0 : static enum ndr_err_code ndr_push_spoolss_PortProtocol(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_PortProtocol r)
23211 : {
23212 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
23213 0 : return NDR_ERR_SUCCESS;
23214 : }
23215 :
23216 0 : static enum ndr_err_code ndr_pull_spoolss_PortProtocol(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_PortProtocol *r)
23217 : {
23218 0 : uint32_t v;
23219 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
23220 0 : *r = v;
23221 0 : return NDR_ERR_SUCCESS;
23222 : }
23223 :
23224 0 : _PUBLIC_ void ndr_print_spoolss_PortProtocol(struct ndr_print *ndr, const char *name, enum spoolss_PortProtocol r)
23225 : {
23226 0 : const char *val = NULL;
23227 :
23228 0 : switch (r) {
23229 0 : case PROTOCOL_RAWTCP_TYPE: val = "PROTOCOL_RAWTCP_TYPE"; break;
23230 0 : case PROTOCOL_LPR_TYPE: val = "PROTOCOL_LPR_TYPE"; break;
23231 : }
23232 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
23233 0 : }
23234 :
23235 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortData1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PortData1 *r)
23236 : {
23237 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
23238 0 : if (ndr_flags & NDR_SCALARS) {
23239 0 : NDR_CHECK(ndr_push_align(ndr, 4));
23240 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->portname, 64, sizeof(uint16_t), CH_UTF16));
23241 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000001));
23242 0 : NDR_CHECK(ndr_push_spoolss_PortProtocol(ndr, NDR_SCALARS, r->protocol));
23243 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_PortData1(r, ndr->flags)));
23244 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
23245 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->hostaddress, 49, sizeof(uint16_t), CH_UTF16));
23246 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->snmpcommunity, 33, sizeof(uint16_t), CH_UTF16));
23247 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dblspool));
23248 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->queue, 33, sizeof(uint16_t), CH_UTF16));
23249 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ip_address, 16, sizeof(uint16_t), CH_UTF16));
23250 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->hardware_address, 13, sizeof(uint16_t), CH_UTF16));
23251 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device_type, 257, sizeof(uint16_t), CH_UTF16));
23252 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port_number));
23253 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_enabled));
23254 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_dev_index));
23255 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
23256 : }
23257 0 : if (ndr_flags & NDR_BUFFERS) {
23258 0 : }
23259 0 : return NDR_ERR_SUCCESS;
23260 : }
23261 :
23262 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortData1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PortData1 *r)
23263 : {
23264 0 : uint32_t size_portname_0 = 0;
23265 0 : uint32_t size_hostaddress_0 = 0;
23266 0 : uint32_t size_snmpcommunity_0 = 0;
23267 0 : uint32_t size_queue_0 = 0;
23268 0 : uint32_t size_ip_address_0 = 0;
23269 0 : uint32_t size_hardware_address_0 = 0;
23270 0 : uint32_t size_device_type_0 = 0;
23271 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
23272 0 : if (ndr_flags & NDR_SCALARS) {
23273 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
23274 0 : size_portname_0 = 64;
23275 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->portname, size_portname_0, sizeof(uint16_t), CH_UTF16));
23276 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
23277 0 : NDR_CHECK(ndr_pull_spoolss_PortProtocol(ndr, NDR_SCALARS, &r->protocol));
23278 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
23279 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
23280 0 : size_hostaddress_0 = 49;
23281 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->hostaddress, size_hostaddress_0, sizeof(uint16_t), CH_UTF16));
23282 0 : size_snmpcommunity_0 = 33;
23283 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->snmpcommunity, size_snmpcommunity_0, sizeof(uint16_t), CH_UTF16));
23284 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dblspool));
23285 0 : size_queue_0 = 33;
23286 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->queue, size_queue_0, sizeof(uint16_t), CH_UTF16));
23287 0 : size_ip_address_0 = 16;
23288 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ip_address, size_ip_address_0, sizeof(uint16_t), CH_UTF16));
23289 0 : size_hardware_address_0 = 13;
23290 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->hardware_address, size_hardware_address_0, sizeof(uint16_t), CH_UTF16));
23291 0 : size_device_type_0 = 257;
23292 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device_type, size_device_type_0, sizeof(uint16_t), CH_UTF16));
23293 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port_number));
23294 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_enabled));
23295 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_dev_index));
23296 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
23297 : }
23298 0 : if (ndr_flags & NDR_BUFFERS) {
23299 0 : }
23300 0 : return NDR_ERR_SUCCESS;
23301 : }
23302 :
23303 0 : static void ndr_print_flags_spoolss_PortData1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PortData1 *r)
23304 : {
23305 0 : ndr_print_spoolss_PortData1(ndr, name, r);
23306 0 : }
23307 :
23308 0 : _PUBLIC_ void ndr_print_spoolss_PortData1(struct ndr_print *ndr, const char *name, const struct spoolss_PortData1 *r)
23309 : {
23310 0 : ndr_print_struct(ndr, name, "spoolss_PortData1");
23311 0 : if (r == NULL) { ndr_print_null(ndr); return; }
23312 0 : ndr->depth++;
23313 0 : ndr_print_string(ndr, "portname", r->portname);
23314 0 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000001:r->version);
23315 0 : ndr_print_spoolss_PortProtocol(ndr, "protocol", r->protocol);
23316 0 : ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_PortData1(r, ndr->flags):r->size);
23317 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
23318 0 : ndr_print_string(ndr, "hostaddress", r->hostaddress);
23319 0 : ndr_print_string(ndr, "snmpcommunity", r->snmpcommunity);
23320 0 : ndr_print_uint32(ndr, "dblspool", r->dblspool);
23321 0 : ndr_print_string(ndr, "queue", r->queue);
23322 0 : ndr_print_string(ndr, "ip_address", r->ip_address);
23323 0 : ndr_print_string(ndr, "hardware_address", r->hardware_address);
23324 0 : ndr_print_string(ndr, "device_type", r->device_type);
23325 0 : ndr_print_uint32(ndr, "port_number", r->port_number);
23326 0 : ndr_print_uint32(ndr, "snmp_enabled", r->snmp_enabled);
23327 0 : ndr_print_uint32(ndr, "snmp_dev_index", r->snmp_dev_index);
23328 0 : ndr->depth--;
23329 : }
23330 :
23331 0 : _PUBLIC_ size_t ndr_size_spoolss_PortData1(const struct spoolss_PortData1 *r, libndr_flags flags)
23332 : {
23333 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortData1);
23334 : }
23335 :
23336 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortData2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PortData2 *r)
23337 : {
23338 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
23339 0 : if (ndr_flags & NDR_SCALARS) {
23340 0 : NDR_CHECK(ndr_push_align(ndr, 4));
23341 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->portname, 64, sizeof(uint16_t), CH_UTF16));
23342 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000002));
23343 0 : NDR_CHECK(ndr_push_spoolss_PortProtocol(ndr, NDR_SCALARS, r->protocol));
23344 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_PortData2(r, ndr->flags)));
23345 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
23346 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->hostaddress, 128, sizeof(uint16_t), CH_UTF16));
23347 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->snmpcommunity, 33, sizeof(uint16_t), CH_UTF16));
23348 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dblspool));
23349 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->queue, 33, sizeof(uint16_t), CH_UTF16));
23350 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device_type, 257, sizeof(uint16_t), CH_UTF16));
23351 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port_number));
23352 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_enabled));
23353 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_dev_index));
23354 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port_monitor_mib_index));
23355 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
23356 : }
23357 0 : if (ndr_flags & NDR_BUFFERS) {
23358 0 : }
23359 0 : return NDR_ERR_SUCCESS;
23360 : }
23361 :
23362 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortData2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PortData2 *r)
23363 : {
23364 0 : uint32_t size_portname_0 = 0;
23365 0 : uint32_t size_hostaddress_0 = 0;
23366 0 : uint32_t size_snmpcommunity_0 = 0;
23367 0 : uint32_t size_queue_0 = 0;
23368 0 : uint32_t size_device_type_0 = 0;
23369 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
23370 0 : if (ndr_flags & NDR_SCALARS) {
23371 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
23372 0 : size_portname_0 = 64;
23373 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->portname, size_portname_0, sizeof(uint16_t), CH_UTF16));
23374 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
23375 0 : NDR_CHECK(ndr_pull_spoolss_PortProtocol(ndr, NDR_SCALARS, &r->protocol));
23376 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
23377 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
23378 0 : size_hostaddress_0 = 128;
23379 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->hostaddress, size_hostaddress_0, sizeof(uint16_t), CH_UTF16));
23380 0 : size_snmpcommunity_0 = 33;
23381 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->snmpcommunity, size_snmpcommunity_0, sizeof(uint16_t), CH_UTF16));
23382 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dblspool));
23383 0 : size_queue_0 = 33;
23384 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->queue, size_queue_0, sizeof(uint16_t), CH_UTF16));
23385 0 : size_device_type_0 = 257;
23386 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device_type, size_device_type_0, sizeof(uint16_t), CH_UTF16));
23387 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port_number));
23388 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_enabled));
23389 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_dev_index));
23390 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port_monitor_mib_index));
23391 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
23392 : }
23393 0 : if (ndr_flags & NDR_BUFFERS) {
23394 0 : }
23395 0 : return NDR_ERR_SUCCESS;
23396 : }
23397 :
23398 0 : static void ndr_print_flags_spoolss_PortData2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PortData2 *r)
23399 : {
23400 0 : ndr_print_spoolss_PortData2(ndr, name, r);
23401 0 : }
23402 :
23403 0 : _PUBLIC_ void ndr_print_spoolss_PortData2(struct ndr_print *ndr, const char *name, const struct spoolss_PortData2 *r)
23404 : {
23405 0 : ndr_print_struct(ndr, name, "spoolss_PortData2");
23406 0 : if (r == NULL) { ndr_print_null(ndr); return; }
23407 0 : ndr->depth++;
23408 0 : ndr_print_string(ndr, "portname", r->portname);
23409 0 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000002:r->version);
23410 0 : ndr_print_spoolss_PortProtocol(ndr, "protocol", r->protocol);
23411 0 : ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_PortData2(r, ndr->flags):r->size);
23412 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
23413 0 : ndr_print_string(ndr, "hostaddress", r->hostaddress);
23414 0 : ndr_print_string(ndr, "snmpcommunity", r->snmpcommunity);
23415 0 : ndr_print_uint32(ndr, "dblspool", r->dblspool);
23416 0 : ndr_print_string(ndr, "queue", r->queue);
23417 0 : ndr_print_string(ndr, "device_type", r->device_type);
23418 0 : ndr_print_uint32(ndr, "port_number", r->port_number);
23419 0 : ndr_print_uint32(ndr, "snmp_enabled", r->snmp_enabled);
23420 0 : ndr_print_uint32(ndr, "snmp_dev_index", r->snmp_dev_index);
23421 0 : ndr_print_uint32(ndr, "port_monitor_mib_index", r->port_monitor_mib_index);
23422 0 : ndr->depth--;
23423 : }
23424 :
23425 0 : _PUBLIC_ size_t ndr_size_spoolss_PortData2(const struct spoolss_PortData2 *r, libndr_flags flags)
23426 : {
23427 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortData2);
23428 : }
23429 :
23430 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorUi(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_MonitorUi *r)
23431 : {
23432 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
23433 0 : if (ndr_flags & NDR_SCALARS) {
23434 0 : NDR_CHECK(ndr_push_align(ndr, 4));
23435 : {
23436 0 : libndr_flags _flags_save_string = ndr->flags;
23437 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
23438 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dll_name));
23439 0 : ndr->flags = _flags_save_string;
23440 : }
23441 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
23442 : }
23443 0 : if (ndr_flags & NDR_BUFFERS) {
23444 0 : }
23445 0 : return NDR_ERR_SUCCESS;
23446 : }
23447 :
23448 0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorUi(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_MonitorUi *r)
23449 : {
23450 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
23451 0 : if (ndr_flags & NDR_SCALARS) {
23452 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
23453 : {
23454 0 : libndr_flags _flags_save_string = ndr->flags;
23455 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
23456 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dll_name));
23457 0 : ndr->flags = _flags_save_string;
23458 : }
23459 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
23460 : }
23461 0 : if (ndr_flags & NDR_BUFFERS) {
23462 0 : }
23463 0 : return NDR_ERR_SUCCESS;
23464 : }
23465 :
23466 0 : static void ndr_print_flags_spoolss_MonitorUi(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_MonitorUi *r)
23467 : {
23468 0 : ndr_print_spoolss_MonitorUi(ndr, name, r);
23469 0 : }
23470 :
23471 0 : _PUBLIC_ void ndr_print_spoolss_MonitorUi(struct ndr_print *ndr, const char *name, const struct spoolss_MonitorUi *r)
23472 : {
23473 0 : ndr_print_struct(ndr, name, "spoolss_MonitorUi");
23474 0 : if (r == NULL) { ndr_print_null(ndr); return; }
23475 0 : ndr->depth++;
23476 : {
23477 0 : libndr_flags _flags_save_string = ndr->flags;
23478 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
23479 0 : ndr_print_string(ndr, "dll_name", r->dll_name);
23480 0 : ndr->flags = _flags_save_string;
23481 : }
23482 0 : ndr->depth--;
23483 : }
23484 :
23485 0 : static enum ndr_err_code ndr_push_spoolss_AddPrinterDriverExFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
23486 : {
23487 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
23488 0 : return NDR_ERR_SUCCESS;
23489 : }
23490 :
23491 2 : static enum ndr_err_code ndr_pull_spoolss_AddPrinterDriverExFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
23492 : {
23493 2 : uint32_t v;
23494 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
23495 2 : *r = v;
23496 2 : return NDR_ERR_SUCCESS;
23497 : }
23498 :
23499 2 : _PUBLIC_ void ndr_print_spoolss_AddPrinterDriverExFlags(struct ndr_print *ndr, const char *name, uint32_t r)
23500 : {
23501 2 : ndr_print_uint32(ndr, name, r);
23502 2 : ndr->depth++;
23503 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_STRICT_UPGRADE", APD_STRICT_UPGRADE, r);
23504 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_STRICT_DOWNGRADE", APD_STRICT_DOWNGRADE, r);
23505 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_ALL_FILES", APD_COPY_ALL_FILES, r);
23506 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_NEW_FILES", APD_COPY_NEW_FILES, r);
23507 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_FROM_DIRECTORY", APD_COPY_FROM_DIRECTORY, r);
23508 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_DONT_COPY_FILES_TO_CLUSTER", APD_DONT_COPY_FILES_TO_CLUSTER, r);
23509 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_TO_ALL_SPOOLERS", APD_COPY_TO_ALL_SPOOLERS, r);
23510 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_RETURN_BLOCKING_STATUS_CODE", APD_RETURN_BLOCKING_STATUS_CODE, r);
23511 2 : ndr->depth--;
23512 2 : }
23513 :
23514 0 : static enum ndr_err_code ndr_push_RPC_BINARY_CONTAINER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct RPC_BINARY_CONTAINER *r)
23515 : {
23516 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
23517 0 : if (ndr_flags & NDR_SCALARS) {
23518 0 : NDR_CHECK(ndr_push_align(ndr, 5));
23519 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cbBuf));
23520 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszString));
23521 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
23522 : }
23523 0 : if (ndr_flags & NDR_BUFFERS) {
23524 0 : if (r->pszString) {
23525 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->cbBuf));
23526 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->pszString, r->cbBuf));
23527 : }
23528 : }
23529 0 : return NDR_ERR_SUCCESS;
23530 : }
23531 :
23532 0 : static enum ndr_err_code ndr_pull_RPC_BINARY_CONTAINER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct RPC_BINARY_CONTAINER *r)
23533 : {
23534 0 : uint32_t _ptr_pszString;
23535 0 : uint32_t size_pszString_1 = 0;
23536 0 : TALLOC_CTX *_mem_save_pszString_0 = NULL;
23537 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
23538 0 : if (ndr_flags & NDR_SCALARS) {
23539 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
23540 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cbBuf));
23541 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszString));
23542 0 : if (_ptr_pszString) {
23543 0 : NDR_PULL_ALLOC(ndr, r->pszString);
23544 : } else {
23545 0 : r->pszString = NULL;
23546 : }
23547 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
23548 : }
23549 0 : if (ndr_flags & NDR_BUFFERS) {
23550 0 : if (r->pszString) {
23551 0 : _mem_save_pszString_0 = NDR_PULL_GET_MEM_CTX(ndr);
23552 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszString, 0);
23553 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszString));
23554 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pszString, &size_pszString_1));
23555 0 : NDR_PULL_ALLOC_N(ndr, r->pszString, size_pszString_1);
23556 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->pszString, size_pszString_1));
23557 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszString_0, 0);
23558 : }
23559 0 : if (r->pszString) {
23560 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->pszString, r->cbBuf));
23561 : }
23562 : }
23563 0 : return NDR_ERR_SUCCESS;
23564 : }
23565 :
23566 0 : _PUBLIC_ void ndr_print_RPC_BINARY_CONTAINER(struct ndr_print *ndr, const char *name, const struct RPC_BINARY_CONTAINER *r)
23567 : {
23568 0 : ndr_print_struct(ndr, name, "RPC_BINARY_CONTAINER");
23569 0 : if (r == NULL) { ndr_print_null(ndr); return; }
23570 0 : ndr->depth++;
23571 0 : ndr_print_uint32(ndr, "cbBuf", r->cbBuf);
23572 0 : ndr_print_ptr(ndr, "pszString", r->pszString);
23573 0 : ndr->depth++;
23574 0 : if (r->pszString) {
23575 0 : ndr_print_array_uint8(ndr, "pszString", r->pszString, r->cbBuf);
23576 : }
23577 0 : ndr->depth--;
23578 0 : ndr->depth--;
23579 : }
23580 :
23581 0 : static enum ndr_err_code ndr_push_RPC_BIDI_DATA_u(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union RPC_BIDI_DATA_u *r)
23582 : {
23583 0 : uint32_t level;
23584 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
23585 0 : if (ndr_flags & NDR_SCALARS) {
23586 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
23587 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
23588 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
23589 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
23590 : /* ms_union is always aligned to the largest union arm*/
23591 0 : NDR_CHECK(ndr_push_align(ndr, 5));
23592 0 : switch (level) {
23593 0 : case BIDI_NULL: {
23594 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bData));
23595 0 : break; }
23596 :
23597 0 : case BIDI_BOOL: {
23598 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bData));
23599 0 : break; }
23600 :
23601 0 : case BIDI_INT: {
23602 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->iData));
23603 0 : break; }
23604 :
23605 0 : case BIDI_STRING: {
23606 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sData));
23607 0 : break; }
23608 :
23609 0 : case BIDI_TEXT: {
23610 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sData));
23611 0 : break; }
23612 :
23613 0 : case BIDI_ENUM: {
23614 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sData));
23615 0 : break; }
23616 :
23617 0 : case BIDI_BLOB: {
23618 0 : NDR_CHECK(ndr_push_RPC_BINARY_CONTAINER(ndr, NDR_SCALARS, &r->biData));
23619 0 : break; }
23620 :
23621 0 : default:
23622 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
23623 : }
23624 : }
23625 0 : if (ndr_flags & NDR_BUFFERS) {
23626 0 : if (!(ndr_flags & NDR_SCALARS)) {
23627 : /* We didn't get it above, and the token is not needed after this. */
23628 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
23629 : }
23630 0 : switch (level) {
23631 0 : case BIDI_NULL:
23632 0 : break;
23633 :
23634 0 : case BIDI_BOOL:
23635 0 : break;
23636 :
23637 0 : case BIDI_INT:
23638 0 : break;
23639 :
23640 0 : case BIDI_STRING:
23641 0 : if (r->sData) {
23642 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sData, CH_UTF16)));
23643 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
23644 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sData, CH_UTF16)));
23645 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sData, ndr_charset_length(r->sData, CH_UTF16), sizeof(uint16_t), CH_UTF16));
23646 : }
23647 0 : break;
23648 :
23649 0 : case BIDI_TEXT:
23650 0 : if (r->sData) {
23651 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sData, CH_UTF16)));
23652 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
23653 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sData, CH_UTF16)));
23654 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sData, ndr_charset_length(r->sData, CH_UTF16), sizeof(uint16_t), CH_UTF16));
23655 : }
23656 0 : break;
23657 :
23658 0 : case BIDI_ENUM:
23659 0 : if (r->sData) {
23660 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sData, CH_UTF16)));
23661 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
23662 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sData, CH_UTF16)));
23663 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sData, ndr_charset_length(r->sData, CH_UTF16), sizeof(uint16_t), CH_UTF16));
23664 : }
23665 0 : break;
23666 :
23667 0 : case BIDI_BLOB:
23668 0 : NDR_CHECK(ndr_push_RPC_BINARY_CONTAINER(ndr, NDR_BUFFERS, &r->biData));
23669 0 : break;
23670 :
23671 0 : default:
23672 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
23673 : }
23674 : }
23675 0 : return NDR_ERR_SUCCESS;
23676 : }
23677 :
23678 0 : static enum ndr_err_code ndr_pull_RPC_BIDI_DATA_u(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union RPC_BIDI_DATA_u *r)
23679 : {
23680 0 : uint32_t level;
23681 0 : uint32_t _level;
23682 0 : TALLOC_CTX *_mem_save_sData_0 = NULL;
23683 0 : uint32_t _ptr_sData;
23684 0 : uint32_t size_sData_1 = 0;
23685 0 : uint32_t length_sData_1 = 0;
23686 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
23687 0 : if (ndr_flags & NDR_SCALARS) {
23688 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
23689 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
23690 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
23691 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
23692 0 : if (_level != level) {
23693 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
23694 : }
23695 : /* ms_union is always aligned to the largest union arm*/
23696 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
23697 0 : switch (level) {
23698 0 : case BIDI_NULL: {
23699 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bData));
23700 0 : break; }
23701 :
23702 0 : case BIDI_BOOL: {
23703 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bData));
23704 0 : break; }
23705 :
23706 0 : case BIDI_INT: {
23707 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->iData));
23708 0 : break; }
23709 :
23710 0 : case BIDI_STRING: {
23711 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sData));
23712 0 : if (_ptr_sData) {
23713 0 : NDR_PULL_ALLOC(ndr, r->sData);
23714 : } else {
23715 0 : r->sData = NULL;
23716 : }
23717 0 : break; }
23718 :
23719 0 : case BIDI_TEXT: {
23720 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sData));
23721 0 : if (_ptr_sData) {
23722 0 : NDR_PULL_ALLOC(ndr, r->sData);
23723 : } else {
23724 0 : r->sData = NULL;
23725 : }
23726 0 : break; }
23727 :
23728 0 : case BIDI_ENUM: {
23729 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sData));
23730 0 : if (_ptr_sData) {
23731 0 : NDR_PULL_ALLOC(ndr, r->sData);
23732 : } else {
23733 0 : r->sData = NULL;
23734 : }
23735 0 : break; }
23736 :
23737 0 : case BIDI_BLOB: {
23738 0 : NDR_CHECK(ndr_pull_RPC_BINARY_CONTAINER(ndr, NDR_SCALARS, &r->biData));
23739 0 : break; }
23740 :
23741 0 : default:
23742 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
23743 : }
23744 : }
23745 0 : if (ndr_flags & NDR_BUFFERS) {
23746 0 : if (!(ndr_flags & NDR_SCALARS)) {
23747 : /* We didn't get it above, and the token is not needed after this. */
23748 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
23749 : }
23750 0 : switch (level) {
23751 0 : case BIDI_NULL:
23752 0 : break;
23753 :
23754 0 : case BIDI_BOOL:
23755 0 : break;
23756 :
23757 0 : case BIDI_INT:
23758 0 : break;
23759 :
23760 0 : case BIDI_STRING:
23761 0 : if (r->sData) {
23762 0 : _mem_save_sData_0 = NDR_PULL_GET_MEM_CTX(ndr);
23763 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sData, 0);
23764 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sData));
23765 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->sData));
23766 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->sData, &size_sData_1));
23767 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->sData, &length_sData_1));
23768 0 : if (length_sData_1 > size_sData_1) {
23769 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_sData_1, length_sData_1);
23770 : }
23771 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_sData_1, sizeof(uint16_t)));
23772 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sData, length_sData_1, sizeof(uint16_t), CH_UTF16));
23773 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sData_0, 0);
23774 : }
23775 0 : break;
23776 :
23777 0 : case BIDI_TEXT:
23778 0 : if (r->sData) {
23779 0 : _mem_save_sData_0 = NDR_PULL_GET_MEM_CTX(ndr);
23780 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sData, 0);
23781 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sData));
23782 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->sData));
23783 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->sData, &size_sData_1));
23784 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->sData, &length_sData_1));
23785 0 : if (length_sData_1 > size_sData_1) {
23786 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_sData_1, length_sData_1);
23787 : }
23788 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_sData_1, sizeof(uint16_t)));
23789 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sData, length_sData_1, sizeof(uint16_t), CH_UTF16));
23790 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sData_0, 0);
23791 : }
23792 0 : break;
23793 :
23794 0 : case BIDI_ENUM:
23795 0 : if (r->sData) {
23796 0 : _mem_save_sData_0 = NDR_PULL_GET_MEM_CTX(ndr);
23797 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sData, 0);
23798 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sData));
23799 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->sData));
23800 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->sData, &size_sData_1));
23801 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->sData, &length_sData_1));
23802 0 : if (length_sData_1 > size_sData_1) {
23803 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_sData_1, length_sData_1);
23804 : }
23805 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_sData_1, sizeof(uint16_t)));
23806 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sData, length_sData_1, sizeof(uint16_t), CH_UTF16));
23807 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sData_0, 0);
23808 : }
23809 0 : break;
23810 :
23811 0 : case BIDI_BLOB:
23812 0 : NDR_CHECK(ndr_pull_RPC_BINARY_CONTAINER(ndr, NDR_BUFFERS, &r->biData));
23813 0 : break;
23814 :
23815 0 : default:
23816 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
23817 : }
23818 : }
23819 0 : return NDR_ERR_SUCCESS;
23820 : }
23821 :
23822 0 : _PUBLIC_ void ndr_print_RPC_BIDI_DATA_u(struct ndr_print *ndr, const char *name, const union RPC_BIDI_DATA_u *r)
23823 : {
23824 0 : uint32_t level;
23825 0 : level = ndr_print_steal_switch_value(ndr, r);
23826 0 : ndr_print_union(ndr, name, level, "RPC_BIDI_DATA_u");
23827 0 : switch (level) {
23828 0 : case BIDI_NULL:
23829 0 : ndr_print_uint32(ndr, "bData", r->bData);
23830 0 : break;
23831 :
23832 0 : case BIDI_BOOL:
23833 0 : ndr_print_uint32(ndr, "bData", r->bData);
23834 0 : break;
23835 :
23836 0 : case BIDI_INT:
23837 0 : ndr_print_uint32(ndr, "iData", r->iData);
23838 0 : break;
23839 :
23840 0 : case BIDI_STRING:
23841 0 : ndr_print_ptr(ndr, "sData", r->sData);
23842 0 : ndr->depth++;
23843 0 : if (r->sData) {
23844 0 : ndr_print_string(ndr, "sData", r->sData);
23845 : }
23846 0 : ndr->depth--;
23847 0 : break;
23848 :
23849 0 : case BIDI_TEXT:
23850 0 : ndr_print_ptr(ndr, "sData", r->sData);
23851 0 : ndr->depth++;
23852 0 : if (r->sData) {
23853 0 : ndr_print_string(ndr, "sData", r->sData);
23854 : }
23855 0 : ndr->depth--;
23856 0 : break;
23857 :
23858 0 : case BIDI_ENUM:
23859 0 : ndr_print_ptr(ndr, "sData", r->sData);
23860 0 : ndr->depth++;
23861 0 : if (r->sData) {
23862 0 : ndr_print_string(ndr, "sData", r->sData);
23863 : }
23864 0 : ndr->depth--;
23865 0 : break;
23866 :
23867 0 : case BIDI_BLOB:
23868 0 : ndr_print_RPC_BINARY_CONTAINER(ndr, "biData", &r->biData);
23869 0 : break;
23870 :
23871 0 : default:
23872 0 : ndr_print_bad_level(ndr, name, level);
23873 : }
23874 0 : }
23875 :
23876 0 : static enum ndr_err_code ndr_push_RPC_BIDI_DATA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct RPC_BIDI_DATA *r)
23877 : {
23878 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
23879 0 : if (ndr_flags & NDR_SCALARS) {
23880 0 : NDR_CHECK(ndr_push_align(ndr, 5));
23881 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwBidiType));
23882 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->dwBidiType));
23883 0 : NDR_CHECK(ndr_push_RPC_BIDI_DATA_u(ndr, NDR_SCALARS, &r->u));
23884 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
23885 : }
23886 0 : if (ndr_flags & NDR_BUFFERS) {
23887 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->dwBidiType));
23888 0 : NDR_CHECK(ndr_push_RPC_BIDI_DATA_u(ndr, NDR_BUFFERS, &r->u));
23889 : }
23890 0 : return NDR_ERR_SUCCESS;
23891 : }
23892 :
23893 0 : static enum ndr_err_code ndr_pull_RPC_BIDI_DATA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct RPC_BIDI_DATA *r)
23894 : {
23895 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
23896 0 : if (ndr_flags & NDR_SCALARS) {
23897 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
23898 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwBidiType));
23899 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->dwBidiType));
23900 0 : NDR_CHECK(ndr_pull_RPC_BIDI_DATA_u(ndr, NDR_SCALARS, &r->u));
23901 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
23902 : }
23903 0 : if (ndr_flags & NDR_BUFFERS) {
23904 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->dwBidiType));
23905 0 : NDR_CHECK(ndr_pull_RPC_BIDI_DATA_u(ndr, NDR_BUFFERS, &r->u));
23906 : }
23907 0 : return NDR_ERR_SUCCESS;
23908 : }
23909 :
23910 0 : _PUBLIC_ void ndr_print_RPC_BIDI_DATA(struct ndr_print *ndr, const char *name, const struct RPC_BIDI_DATA *r)
23911 : {
23912 0 : ndr_print_struct(ndr, name, "RPC_BIDI_DATA");
23913 0 : if (r == NULL) { ndr_print_null(ndr); return; }
23914 0 : ndr->depth++;
23915 0 : ndr_print_uint32(ndr, "dwBidiType", r->dwBidiType);
23916 0 : ndr_print_set_switch_value(ndr, &r->u, r->dwBidiType);
23917 0 : ndr_print_RPC_BIDI_DATA_u(ndr, "u", &r->u);
23918 0 : ndr->depth--;
23919 : }
23920 :
23921 0 : static enum ndr_err_code ndr_push_RPC_BIDI_REQUEST_DATA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct RPC_BIDI_REQUEST_DATA *r)
23922 : {
23923 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
23924 0 : if (ndr_flags & NDR_SCALARS) {
23925 0 : NDR_CHECK(ndr_push_align(ndr, 5));
23926 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReqNumber));
23927 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pSchema));
23928 0 : NDR_CHECK(ndr_push_RPC_BIDI_DATA(ndr, NDR_SCALARS, &r->data));
23929 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
23930 : }
23931 0 : if (ndr_flags & NDR_BUFFERS) {
23932 0 : if (r->pSchema) {
23933 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pSchema, CH_UTF16)));
23934 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
23935 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pSchema, CH_UTF16)));
23936 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pSchema, ndr_charset_length(r->pSchema, CH_UTF16), sizeof(uint16_t), CH_UTF16));
23937 : }
23938 0 : NDR_CHECK(ndr_push_RPC_BIDI_DATA(ndr, NDR_BUFFERS, &r->data));
23939 : }
23940 0 : return NDR_ERR_SUCCESS;
23941 : }
23942 :
23943 0 : static enum ndr_err_code ndr_pull_RPC_BIDI_REQUEST_DATA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct RPC_BIDI_REQUEST_DATA *r)
23944 : {
23945 0 : uint32_t _ptr_pSchema;
23946 0 : uint32_t size_pSchema_1 = 0;
23947 0 : uint32_t length_pSchema_1 = 0;
23948 0 : TALLOC_CTX *_mem_save_pSchema_0 = NULL;
23949 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
23950 0 : if (ndr_flags & NDR_SCALARS) {
23951 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
23952 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReqNumber));
23953 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pSchema));
23954 0 : if (_ptr_pSchema) {
23955 0 : NDR_PULL_ALLOC(ndr, r->pSchema);
23956 : } else {
23957 0 : r->pSchema = NULL;
23958 : }
23959 0 : NDR_CHECK(ndr_pull_RPC_BIDI_DATA(ndr, NDR_SCALARS, &r->data));
23960 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
23961 : }
23962 0 : if (ndr_flags & NDR_BUFFERS) {
23963 0 : if (r->pSchema) {
23964 0 : _mem_save_pSchema_0 = NDR_PULL_GET_MEM_CTX(ndr);
23965 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pSchema, 0);
23966 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pSchema));
23967 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pSchema));
23968 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pSchema, &size_pSchema_1));
23969 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pSchema, &length_pSchema_1));
23970 0 : if (length_pSchema_1 > size_pSchema_1) {
23971 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pSchema_1, length_pSchema_1);
23972 : }
23973 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pSchema_1, sizeof(uint16_t)));
23974 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pSchema, length_pSchema_1, sizeof(uint16_t), CH_UTF16));
23975 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pSchema_0, 0);
23976 : }
23977 0 : NDR_CHECK(ndr_pull_RPC_BIDI_DATA(ndr, NDR_BUFFERS, &r->data));
23978 : }
23979 0 : return NDR_ERR_SUCCESS;
23980 : }
23981 :
23982 0 : _PUBLIC_ void ndr_print_RPC_BIDI_REQUEST_DATA(struct ndr_print *ndr, const char *name, const struct RPC_BIDI_REQUEST_DATA *r)
23983 : {
23984 0 : ndr_print_struct(ndr, name, "RPC_BIDI_REQUEST_DATA");
23985 0 : if (r == NULL) { ndr_print_null(ndr); return; }
23986 0 : ndr->depth++;
23987 0 : ndr_print_uint32(ndr, "dwReqNumber", r->dwReqNumber);
23988 0 : ndr_print_ptr(ndr, "pSchema", r->pSchema);
23989 0 : ndr->depth++;
23990 0 : if (r->pSchema) {
23991 0 : ndr_print_string(ndr, "pSchema", r->pSchema);
23992 : }
23993 0 : ndr->depth--;
23994 0 : ndr_print_RPC_BIDI_DATA(ndr, "data", &r->data);
23995 0 : ndr->depth--;
23996 : }
23997 :
23998 0 : _PUBLIC_ enum ndr_err_code ndr_push_RPC_BIDI_REQUEST_CONTAINER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct RPC_BIDI_REQUEST_CONTAINER *r)
23999 : {
24000 0 : uint32_t cntr_aData_0;
24001 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
24002 0 : if (ndr_flags & NDR_SCALARS) {
24003 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->Count));
24004 0 : NDR_CHECK(ndr_push_align(ndr, 5));
24005 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
24006 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Flags));
24007 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Count));
24008 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (r->Count); cntr_aData_0++) {
24009 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aData[cntr_aData_0]));
24010 : }
24011 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
24012 : }
24013 0 : if (ndr_flags & NDR_BUFFERS) {
24014 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (r->Count); cntr_aData_0++) {
24015 0 : if (r->aData[cntr_aData_0]) {
24016 0 : NDR_CHECK(ndr_push_RPC_BIDI_REQUEST_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, r->aData[cntr_aData_0]));
24017 : }
24018 : }
24019 : }
24020 0 : return NDR_ERR_SUCCESS;
24021 : }
24022 :
24023 0 : _PUBLIC_ enum ndr_err_code ndr_pull_RPC_BIDI_REQUEST_CONTAINER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct RPC_BIDI_REQUEST_CONTAINER *r)
24024 : {
24025 0 : uint32_t _ptr_aData;
24026 0 : uint32_t size_aData_0 = 0;
24027 0 : uint32_t cntr_aData_0;
24028 0 : TALLOC_CTX *_mem_save_aData_0 = NULL;
24029 0 : TALLOC_CTX *_mem_save_aData_1 = NULL;
24030 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
24031 0 : if (ndr_flags & NDR_SCALARS) {
24032 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->aData));
24033 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
24034 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Version));
24035 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Flags));
24036 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Count));
24037 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->aData, &size_aData_0));
24038 0 : NDR_PULL_ALLOC_N(ndr, r->aData, size_aData_0);
24039 0 : _mem_save_aData_0 = NDR_PULL_GET_MEM_CTX(ndr);
24040 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aData, 0);
24041 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (size_aData_0); cntr_aData_0++) {
24042 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aData));
24043 0 : if (_ptr_aData) {
24044 0 : NDR_PULL_ALLOC(ndr, r->aData[cntr_aData_0]);
24045 : } else {
24046 0 : r->aData[cntr_aData_0] = NULL;
24047 : }
24048 : }
24049 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aData_0, 0);
24050 0 : if (r->aData) {
24051 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->aData, r->Count));
24052 : }
24053 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
24054 : }
24055 0 : if (ndr_flags & NDR_BUFFERS) {
24056 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->aData, &size_aData_0));
24057 0 : _mem_save_aData_0 = NDR_PULL_GET_MEM_CTX(ndr);
24058 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aData, 0);
24059 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (size_aData_0); cntr_aData_0++) {
24060 0 : if (r->aData[cntr_aData_0]) {
24061 0 : _mem_save_aData_1 = NDR_PULL_GET_MEM_CTX(ndr);
24062 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aData[cntr_aData_0], 0);
24063 0 : NDR_CHECK(ndr_pull_RPC_BIDI_REQUEST_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, r->aData[cntr_aData_0]));
24064 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aData_1, 0);
24065 : }
24066 : }
24067 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aData_0, 0);
24068 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (size_aData_0); cntr_aData_0++) {
24069 : }
24070 : }
24071 0 : return NDR_ERR_SUCCESS;
24072 : }
24073 :
24074 0 : static void ndr_print_flags_RPC_BIDI_REQUEST_CONTAINER(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct RPC_BIDI_REQUEST_CONTAINER *r)
24075 : {
24076 0 : ndr_print_RPC_BIDI_REQUEST_CONTAINER(ndr, name, r);
24077 0 : }
24078 :
24079 0 : _PUBLIC_ void ndr_print_RPC_BIDI_REQUEST_CONTAINER(struct ndr_print *ndr, const char *name, const struct RPC_BIDI_REQUEST_CONTAINER *r)
24080 : {
24081 0 : uint32_t cntr_aData_0;
24082 0 : ndr_print_struct(ndr, name, "RPC_BIDI_REQUEST_CONTAINER");
24083 0 : if (r == NULL) { ndr_print_null(ndr); return; }
24084 0 : ndr->depth++;
24085 0 : ndr_print_uint32(ndr, "Version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->Version);
24086 0 : ndr_print_uint32(ndr, "Flags", r->Flags);
24087 0 : ndr_print_uint32(ndr, "Count", r->Count);
24088 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "aData", (uint32_t)(r->Count));
24089 0 : ndr->depth++;
24090 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (r->Count); cntr_aData_0++) {
24091 0 : ndr_print_ptr(ndr, "aData", r->aData[cntr_aData_0]);
24092 0 : ndr->depth++;
24093 0 : if (r->aData[cntr_aData_0]) {
24094 0 : ndr_print_RPC_BIDI_REQUEST_DATA(ndr, "aData", r->aData[cntr_aData_0]);
24095 : }
24096 0 : ndr->depth--;
24097 : }
24098 0 : ndr->depth--;
24099 0 : ndr->depth--;
24100 : }
24101 :
24102 0 : static enum ndr_err_code ndr_push_RPC_BIDI_RESPONSE_DATA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct RPC_BIDI_RESPONSE_DATA *r)
24103 : {
24104 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
24105 0 : if (ndr_flags & NDR_SCALARS) {
24106 0 : NDR_CHECK(ndr_push_align(ndr, 5));
24107 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwResult));
24108 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReqNumber));
24109 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pSchema));
24110 0 : NDR_CHECK(ndr_push_RPC_BIDI_DATA(ndr, NDR_SCALARS, &r->data));
24111 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
24112 : }
24113 0 : if (ndr_flags & NDR_BUFFERS) {
24114 0 : if (r->pSchema) {
24115 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pSchema, CH_UTF16)));
24116 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24117 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pSchema, CH_UTF16)));
24118 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pSchema, ndr_charset_length(r->pSchema, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24119 : }
24120 0 : NDR_CHECK(ndr_push_RPC_BIDI_DATA(ndr, NDR_BUFFERS, &r->data));
24121 : }
24122 0 : return NDR_ERR_SUCCESS;
24123 : }
24124 :
24125 0 : static enum ndr_err_code ndr_pull_RPC_BIDI_RESPONSE_DATA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct RPC_BIDI_RESPONSE_DATA *r)
24126 : {
24127 0 : uint32_t _ptr_pSchema;
24128 0 : uint32_t size_pSchema_1 = 0;
24129 0 : uint32_t length_pSchema_1 = 0;
24130 0 : TALLOC_CTX *_mem_save_pSchema_0 = NULL;
24131 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
24132 0 : if (ndr_flags & NDR_SCALARS) {
24133 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
24134 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwResult));
24135 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReqNumber));
24136 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pSchema));
24137 0 : if (_ptr_pSchema) {
24138 0 : NDR_PULL_ALLOC(ndr, r->pSchema);
24139 : } else {
24140 0 : r->pSchema = NULL;
24141 : }
24142 0 : NDR_CHECK(ndr_pull_RPC_BIDI_DATA(ndr, NDR_SCALARS, &r->data));
24143 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
24144 : }
24145 0 : if (ndr_flags & NDR_BUFFERS) {
24146 0 : if (r->pSchema) {
24147 0 : _mem_save_pSchema_0 = NDR_PULL_GET_MEM_CTX(ndr);
24148 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pSchema, 0);
24149 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pSchema));
24150 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pSchema));
24151 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pSchema, &size_pSchema_1));
24152 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pSchema, &length_pSchema_1));
24153 0 : if (length_pSchema_1 > size_pSchema_1) {
24154 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pSchema_1, length_pSchema_1);
24155 : }
24156 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pSchema_1, sizeof(uint16_t)));
24157 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pSchema, length_pSchema_1, sizeof(uint16_t), CH_UTF16));
24158 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pSchema_0, 0);
24159 : }
24160 0 : NDR_CHECK(ndr_pull_RPC_BIDI_DATA(ndr, NDR_BUFFERS, &r->data));
24161 : }
24162 0 : return NDR_ERR_SUCCESS;
24163 : }
24164 :
24165 0 : _PUBLIC_ void ndr_print_RPC_BIDI_RESPONSE_DATA(struct ndr_print *ndr, const char *name, const struct RPC_BIDI_RESPONSE_DATA *r)
24166 : {
24167 0 : ndr_print_struct(ndr, name, "RPC_BIDI_RESPONSE_DATA");
24168 0 : if (r == NULL) { ndr_print_null(ndr); return; }
24169 0 : ndr->depth++;
24170 0 : ndr_print_uint32(ndr, "dwResult", r->dwResult);
24171 0 : ndr_print_uint32(ndr, "dwReqNumber", r->dwReqNumber);
24172 0 : ndr_print_ptr(ndr, "pSchema", r->pSchema);
24173 0 : ndr->depth++;
24174 0 : if (r->pSchema) {
24175 0 : ndr_print_string(ndr, "pSchema", r->pSchema);
24176 : }
24177 0 : ndr->depth--;
24178 0 : ndr_print_RPC_BIDI_DATA(ndr, "data", &r->data);
24179 0 : ndr->depth--;
24180 : }
24181 :
24182 0 : _PUBLIC_ enum ndr_err_code ndr_push_RPC_BIDI_RESPONSE_CONTAINER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct RPC_BIDI_RESPONSE_CONTAINER *r)
24183 : {
24184 0 : uint32_t cntr_aData_0;
24185 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
24186 0 : if (ndr_flags & NDR_SCALARS) {
24187 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->Count));
24188 0 : NDR_CHECK(ndr_push_align(ndr, 5));
24189 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
24190 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Flags));
24191 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Count));
24192 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (r->Count); cntr_aData_0++) {
24193 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->aData[cntr_aData_0]));
24194 : }
24195 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
24196 : }
24197 0 : if (ndr_flags & NDR_BUFFERS) {
24198 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (r->Count); cntr_aData_0++) {
24199 0 : if (r->aData[cntr_aData_0]) {
24200 0 : NDR_CHECK(ndr_push_RPC_BIDI_RESPONSE_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, r->aData[cntr_aData_0]));
24201 : }
24202 : }
24203 : }
24204 0 : return NDR_ERR_SUCCESS;
24205 : }
24206 :
24207 0 : _PUBLIC_ enum ndr_err_code ndr_pull_RPC_BIDI_RESPONSE_CONTAINER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct RPC_BIDI_RESPONSE_CONTAINER *r)
24208 : {
24209 0 : uint32_t _ptr_aData;
24210 0 : uint32_t size_aData_0 = 0;
24211 0 : uint32_t cntr_aData_0;
24212 0 : TALLOC_CTX *_mem_save_aData_0 = NULL;
24213 0 : TALLOC_CTX *_mem_save_aData_1 = NULL;
24214 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
24215 0 : if (ndr_flags & NDR_SCALARS) {
24216 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->aData));
24217 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
24218 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Version));
24219 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Flags));
24220 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Count));
24221 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->aData, &size_aData_0));
24222 0 : NDR_PULL_ALLOC_N(ndr, r->aData, size_aData_0);
24223 0 : _mem_save_aData_0 = NDR_PULL_GET_MEM_CTX(ndr);
24224 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aData, 0);
24225 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (size_aData_0); cntr_aData_0++) {
24226 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_aData));
24227 0 : if (_ptr_aData) {
24228 0 : NDR_PULL_ALLOC(ndr, r->aData[cntr_aData_0]);
24229 : } else {
24230 0 : r->aData[cntr_aData_0] = NULL;
24231 : }
24232 : }
24233 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aData_0, 0);
24234 0 : if (r->aData) {
24235 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->aData, r->Count));
24236 : }
24237 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
24238 : }
24239 0 : if (ndr_flags & NDR_BUFFERS) {
24240 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->aData, &size_aData_0));
24241 0 : _mem_save_aData_0 = NDR_PULL_GET_MEM_CTX(ndr);
24242 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aData, 0);
24243 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (size_aData_0); cntr_aData_0++) {
24244 0 : if (r->aData[cntr_aData_0]) {
24245 0 : _mem_save_aData_1 = NDR_PULL_GET_MEM_CTX(ndr);
24246 0 : NDR_PULL_SET_MEM_CTX(ndr, r->aData[cntr_aData_0], 0);
24247 0 : NDR_CHECK(ndr_pull_RPC_BIDI_RESPONSE_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, r->aData[cntr_aData_0]));
24248 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aData_1, 0);
24249 : }
24250 : }
24251 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aData_0, 0);
24252 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (size_aData_0); cntr_aData_0++) {
24253 : }
24254 : }
24255 0 : return NDR_ERR_SUCCESS;
24256 : }
24257 :
24258 0 : static void ndr_print_flags_RPC_BIDI_RESPONSE_CONTAINER(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct RPC_BIDI_RESPONSE_CONTAINER *r)
24259 : {
24260 0 : ndr_print_RPC_BIDI_RESPONSE_CONTAINER(ndr, name, r);
24261 0 : }
24262 :
24263 0 : _PUBLIC_ void ndr_print_RPC_BIDI_RESPONSE_CONTAINER(struct ndr_print *ndr, const char *name, const struct RPC_BIDI_RESPONSE_CONTAINER *r)
24264 : {
24265 0 : uint32_t cntr_aData_0;
24266 0 : ndr_print_struct(ndr, name, "RPC_BIDI_RESPONSE_CONTAINER");
24267 0 : if (r == NULL) { ndr_print_null(ndr); return; }
24268 0 : ndr->depth++;
24269 0 : ndr_print_uint32(ndr, "Version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->Version);
24270 0 : ndr_print_uint32(ndr, "Flags", r->Flags);
24271 0 : ndr_print_uint32(ndr, "Count", r->Count);
24272 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "aData", (uint32_t)(r->Count));
24273 0 : ndr->depth++;
24274 0 : for (cntr_aData_0 = 0; cntr_aData_0 < (r->Count); cntr_aData_0++) {
24275 0 : ndr_print_ptr(ndr, "aData", r->aData[cntr_aData_0]);
24276 0 : ndr->depth++;
24277 0 : if (r->aData[cntr_aData_0]) {
24278 0 : ndr_print_RPC_BIDI_RESPONSE_DATA(ndr, "aData", r->aData[cntr_aData_0]);
24279 : }
24280 0 : ndr->depth--;
24281 : }
24282 0 : ndr->depth--;
24283 0 : ndr->depth--;
24284 : }
24285 :
24286 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_CorePrinterDriver(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_CorePrinterDriver *r)
24287 : {
24288 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
24289 0 : if (ndr_flags & NDR_SCALARS) {
24290 0 : NDR_CHECK(ndr_push_align(ndr, 8));
24291 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->core_driver_guid));
24292 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date));
24293 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version));
24294 0 : NDR_CHECK(ndr_push_charset_to_null(ndr, NDR_SCALARS, r->szPackageID, 260, sizeof(uint16_t), CH_UTF16));
24295 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
24296 : }
24297 0 : if (ndr_flags & NDR_BUFFERS) {
24298 0 : }
24299 0 : return NDR_ERR_SUCCESS;
24300 : }
24301 :
24302 8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_CorePrinterDriver(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_CorePrinterDriver *r)
24303 : {
24304 8 : uint32_t size_szPackageID_0 = 0;
24305 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
24306 8 : if (ndr_flags & NDR_SCALARS) {
24307 8 : NDR_CHECK(ndr_pull_align(ndr, 8));
24308 8 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->core_driver_guid));
24309 8 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date));
24310 8 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version));
24311 8 : size_szPackageID_0 = 260;
24312 8 : NDR_CHECK(ndr_pull_charset_to_null(ndr, NDR_SCALARS, &r->szPackageID, size_szPackageID_0, sizeof(uint16_t), CH_UTF16));
24313 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
24314 : }
24315 8 : if (ndr_flags & NDR_BUFFERS) {
24316 8 : }
24317 8 : return NDR_ERR_SUCCESS;
24318 : }
24319 :
24320 0 : static void ndr_print_flags_spoolss_CorePrinterDriver(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_CorePrinterDriver *r)
24321 : {
24322 0 : ndr_print_spoolss_CorePrinterDriver(ndr, name, r);
24323 0 : }
24324 :
24325 8 : _PUBLIC_ void ndr_print_spoolss_CorePrinterDriver(struct ndr_print *ndr, const char *name, const struct spoolss_CorePrinterDriver *r)
24326 : {
24327 8 : ndr_print_struct(ndr, name, "spoolss_CorePrinterDriver");
24328 8 : if (r == NULL) { ndr_print_null(ndr); return; }
24329 8 : ndr->depth++;
24330 8 : ndr_print_GUID(ndr, "core_driver_guid", &r->core_driver_guid);
24331 8 : ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
24332 8 : ndr_print_hyper(ndr, "driver_version", r->driver_version);
24333 8 : ndr_print_string(ndr, "szPackageID", r->szPackageID);
24334 8 : ndr->depth--;
24335 : }
24336 :
24337 0 : static enum ndr_err_code ndr_push_spoolss_EPrintPropertyType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum spoolss_EPrintPropertyType r)
24338 : {
24339 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
24340 0 : return NDR_ERR_SUCCESS;
24341 : }
24342 :
24343 4 : static enum ndr_err_code ndr_pull_spoolss_EPrintPropertyType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum spoolss_EPrintPropertyType *r)
24344 : {
24345 4 : uint16_t v;
24346 4 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
24347 4 : *r = v;
24348 4 : return NDR_ERR_SUCCESS;
24349 : }
24350 :
24351 4 : _PUBLIC_ void ndr_print_spoolss_EPrintPropertyType(struct ndr_print *ndr, const char *name, enum spoolss_EPrintPropertyType r)
24352 : {
24353 4 : const char *val = NULL;
24354 :
24355 4 : switch (r) {
24356 4 : case kRpcPropertyTypeString: val = "kRpcPropertyTypeString"; break;
24357 0 : case kRpcPropertyTypeInt32: val = "kRpcPropertyTypeInt32"; break;
24358 0 : case kRpcPropertyTypeInt64: val = "kRpcPropertyTypeInt64"; break;
24359 0 : case kRpcPropertyTypeByte: val = "kRpcPropertyTypeByte"; break;
24360 0 : case kRpcPropertyTypeBuffer: val = "kRpcPropertyTypeBuffer"; break;
24361 : }
24362 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
24363 4 : }
24364 :
24365 0 : static enum ndr_err_code ndr_push_propertyBlob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct propertyBlob *r)
24366 : {
24367 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
24368 0 : if (ndr_flags & NDR_SCALARS) {
24369 0 : NDR_CHECK(ndr_push_align(ndr, 5));
24370 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cbBuf));
24371 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pBuf));
24372 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
24373 : }
24374 0 : if (ndr_flags & NDR_BUFFERS) {
24375 0 : if (r->pBuf) {
24376 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->cbBuf));
24377 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->pBuf, r->cbBuf));
24378 : }
24379 : }
24380 0 : return NDR_ERR_SUCCESS;
24381 : }
24382 :
24383 0 : static enum ndr_err_code ndr_pull_propertyBlob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct propertyBlob *r)
24384 : {
24385 0 : uint32_t _ptr_pBuf;
24386 0 : uint32_t size_pBuf_1 = 0;
24387 0 : TALLOC_CTX *_mem_save_pBuf_0 = NULL;
24388 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
24389 0 : if (ndr_flags & NDR_SCALARS) {
24390 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
24391 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cbBuf));
24392 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pBuf));
24393 0 : if (_ptr_pBuf) {
24394 0 : NDR_PULL_ALLOC(ndr, r->pBuf);
24395 : } else {
24396 0 : r->pBuf = NULL;
24397 : }
24398 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
24399 : }
24400 0 : if (ndr_flags & NDR_BUFFERS) {
24401 0 : if (r->pBuf) {
24402 0 : _mem_save_pBuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
24403 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pBuf, 0);
24404 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pBuf));
24405 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pBuf, &size_pBuf_1));
24406 0 : NDR_PULL_ALLOC_N(ndr, r->pBuf, size_pBuf_1);
24407 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->pBuf, size_pBuf_1));
24408 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBuf_0, 0);
24409 : }
24410 0 : if (r->pBuf) {
24411 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->pBuf, r->cbBuf));
24412 : }
24413 : }
24414 0 : return NDR_ERR_SUCCESS;
24415 : }
24416 :
24417 0 : _PUBLIC_ void ndr_print_propertyBlob(struct ndr_print *ndr, const char *name, const struct propertyBlob *r)
24418 : {
24419 0 : ndr_print_struct(ndr, name, "propertyBlob");
24420 0 : if (r == NULL) { ndr_print_null(ndr); return; }
24421 0 : ndr->depth++;
24422 0 : ndr_print_uint32(ndr, "cbBuf", r->cbBuf);
24423 0 : ndr_print_ptr(ndr, "pBuf", r->pBuf);
24424 0 : ndr->depth++;
24425 0 : if (r->pBuf) {
24426 0 : ndr_print_array_uint8(ndr, "pBuf", r->pBuf, r->cbBuf);
24427 : }
24428 0 : ndr->depth--;
24429 0 : ndr->depth--;
24430 : }
24431 :
24432 0 : static enum ndr_err_code ndr_push_spoolss_PrintPropertyValueUnion(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_PrintPropertyValueUnion *r)
24433 : {
24434 0 : uint32_t level;
24435 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
24436 0 : if (ndr_flags & NDR_SCALARS) {
24437 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
24438 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
24439 0 : NDR_CHECK(ndr_push_union_align(ndr, 8));
24440 0 : NDR_CHECK(ndr_push_spoolss_EPrintPropertyType(ndr, NDR_SCALARS, level));
24441 : /* ms_union is always aligned to the largest union arm*/
24442 0 : NDR_CHECK(ndr_push_align(ndr, 8));
24443 0 : switch (level) {
24444 0 : case kRpcPropertyTypeString: {
24445 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->propertyString));
24446 0 : break; }
24447 :
24448 0 : case kRpcPropertyTypeInt32: {
24449 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->propertyInt32));
24450 0 : break; }
24451 :
24452 0 : case kRpcPropertyTypeInt64: {
24453 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->propertyInt64));
24454 0 : break; }
24455 :
24456 0 : case kRpcPropertyTypeByte: {
24457 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->propertyByte));
24458 0 : break; }
24459 :
24460 0 : case kRpcPropertyTypeBuffer: {
24461 0 : NDR_CHECK(ndr_push_propertyBlob(ndr, NDR_SCALARS, &r->propertyBlob));
24462 0 : break; }
24463 :
24464 0 : default:
24465 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
24466 : }
24467 : }
24468 0 : if (ndr_flags & NDR_BUFFERS) {
24469 0 : if (!(ndr_flags & NDR_SCALARS)) {
24470 : /* We didn't get it above, and the token is not needed after this. */
24471 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
24472 : }
24473 0 : switch (level) {
24474 0 : case kRpcPropertyTypeString:
24475 0 : if (r->propertyString) {
24476 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->propertyString, CH_UTF16)));
24477 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24478 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->propertyString, CH_UTF16)));
24479 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->propertyString, ndr_charset_length(r->propertyString, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24480 : }
24481 0 : break;
24482 :
24483 0 : case kRpcPropertyTypeInt32:
24484 0 : break;
24485 :
24486 0 : case kRpcPropertyTypeInt64:
24487 0 : break;
24488 :
24489 0 : case kRpcPropertyTypeByte:
24490 0 : break;
24491 :
24492 0 : case kRpcPropertyTypeBuffer:
24493 0 : NDR_CHECK(ndr_push_propertyBlob(ndr, NDR_BUFFERS, &r->propertyBlob));
24494 0 : break;
24495 :
24496 0 : default:
24497 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
24498 : }
24499 : }
24500 0 : return NDR_ERR_SUCCESS;
24501 : }
24502 :
24503 8 : static enum ndr_err_code ndr_pull_spoolss_PrintPropertyValueUnion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_PrintPropertyValueUnion *r)
24504 : {
24505 8 : uint32_t level;
24506 8 : uint16_t _level;
24507 8 : TALLOC_CTX *_mem_save_propertyString_0 = NULL;
24508 8 : uint32_t _ptr_propertyString;
24509 8 : uint32_t size_propertyString_1 = 0;
24510 8 : uint32_t length_propertyString_1 = 0;
24511 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
24512 8 : if (ndr_flags & NDR_SCALARS) {
24513 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
24514 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
24515 4 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
24516 4 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
24517 4 : if (_level != level) {
24518 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
24519 : }
24520 : /* ms_union is always aligned to the largest union arm*/
24521 4 : NDR_CHECK(ndr_pull_align(ndr, 8));
24522 4 : switch (level) {
24523 4 : case kRpcPropertyTypeString: {
24524 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_propertyString));
24525 4 : if (_ptr_propertyString) {
24526 4 : NDR_PULL_ALLOC(ndr, r->propertyString);
24527 : } else {
24528 0 : r->propertyString = NULL;
24529 : }
24530 0 : break; }
24531 :
24532 0 : case kRpcPropertyTypeInt32: {
24533 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->propertyInt32));
24534 0 : break; }
24535 :
24536 0 : case kRpcPropertyTypeInt64: {
24537 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->propertyInt64));
24538 0 : break; }
24539 :
24540 0 : case kRpcPropertyTypeByte: {
24541 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->propertyByte));
24542 0 : break; }
24543 :
24544 0 : case kRpcPropertyTypeBuffer: {
24545 0 : NDR_CHECK(ndr_pull_propertyBlob(ndr, NDR_SCALARS, &r->propertyBlob));
24546 0 : break; }
24547 :
24548 0 : default:
24549 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
24550 : }
24551 : }
24552 8 : if (ndr_flags & NDR_BUFFERS) {
24553 4 : if (!(ndr_flags & NDR_SCALARS)) {
24554 : /* We didn't get it above, and the token is not needed after this. */
24555 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
24556 : }
24557 4 : switch (level) {
24558 4 : case kRpcPropertyTypeString:
24559 4 : if (r->propertyString) {
24560 4 : _mem_save_propertyString_0 = NDR_PULL_GET_MEM_CTX(ndr);
24561 4 : NDR_PULL_SET_MEM_CTX(ndr, r->propertyString, 0);
24562 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->propertyString));
24563 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->propertyString));
24564 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->propertyString, &size_propertyString_1));
24565 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->propertyString, &length_propertyString_1));
24566 4 : if (length_propertyString_1 > size_propertyString_1) {
24567 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_propertyString_1, length_propertyString_1);
24568 : }
24569 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_propertyString_1, sizeof(uint16_t)));
24570 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->propertyString, length_propertyString_1, sizeof(uint16_t), CH_UTF16));
24571 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_propertyString_0, 0);
24572 : }
24573 0 : break;
24574 :
24575 0 : case kRpcPropertyTypeInt32:
24576 0 : break;
24577 :
24578 0 : case kRpcPropertyTypeInt64:
24579 0 : break;
24580 :
24581 0 : case kRpcPropertyTypeByte:
24582 0 : break;
24583 :
24584 0 : case kRpcPropertyTypeBuffer:
24585 0 : NDR_CHECK(ndr_pull_propertyBlob(ndr, NDR_BUFFERS, &r->propertyBlob));
24586 0 : break;
24587 :
24588 0 : default:
24589 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
24590 : }
24591 : }
24592 0 : return NDR_ERR_SUCCESS;
24593 : }
24594 :
24595 4 : _PUBLIC_ void ndr_print_spoolss_PrintPropertyValueUnion(struct ndr_print *ndr, const char *name, const union spoolss_PrintPropertyValueUnion *r)
24596 : {
24597 4 : uint32_t level;
24598 4 : level = ndr_print_steal_switch_value(ndr, r);
24599 4 : ndr_print_union(ndr, name, level, "spoolss_PrintPropertyValueUnion");
24600 4 : switch (level) {
24601 4 : case kRpcPropertyTypeString:
24602 4 : ndr_print_ptr(ndr, "propertyString", r->propertyString);
24603 4 : ndr->depth++;
24604 4 : if (r->propertyString) {
24605 4 : ndr_print_string(ndr, "propertyString", r->propertyString);
24606 : }
24607 4 : ndr->depth--;
24608 4 : break;
24609 :
24610 0 : case kRpcPropertyTypeInt32:
24611 0 : ndr_print_uint32(ndr, "propertyInt32", r->propertyInt32);
24612 0 : break;
24613 :
24614 0 : case kRpcPropertyTypeInt64:
24615 0 : ndr_print_hyper(ndr, "propertyInt64", r->propertyInt64);
24616 0 : break;
24617 :
24618 0 : case kRpcPropertyTypeByte:
24619 0 : ndr_print_uint8(ndr, "propertyByte", r->propertyByte);
24620 0 : break;
24621 :
24622 0 : case kRpcPropertyTypeBuffer:
24623 0 : ndr_print_propertyBlob(ndr, "propertyBlob", &r->propertyBlob);
24624 0 : break;
24625 :
24626 0 : default:
24627 0 : ndr_print_bad_level(ndr, name, level);
24628 : }
24629 4 : }
24630 :
24631 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintPropertyValue(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrintPropertyValue *r)
24632 : {
24633 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
24634 0 : if (ndr_flags & NDR_SCALARS) {
24635 0 : NDR_CHECK(ndr_push_align(ndr, 8));
24636 0 : NDR_CHECK(ndr_push_spoolss_EPrintPropertyType(ndr, NDR_SCALARS, r->ePropertyType));
24637 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->value, r->ePropertyType));
24638 0 : NDR_CHECK(ndr_push_spoolss_PrintPropertyValueUnion(ndr, NDR_SCALARS, &r->value));
24639 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
24640 : }
24641 0 : if (ndr_flags & NDR_BUFFERS) {
24642 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->value, r->ePropertyType));
24643 0 : NDR_CHECK(ndr_push_spoolss_PrintPropertyValueUnion(ndr, NDR_BUFFERS, &r->value));
24644 : }
24645 0 : return NDR_ERR_SUCCESS;
24646 : }
24647 :
24648 8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintPropertyValue(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrintPropertyValue *r)
24649 : {
24650 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
24651 8 : if (ndr_flags & NDR_SCALARS) {
24652 4 : NDR_CHECK(ndr_pull_align(ndr, 8));
24653 8 : NDR_CHECK(ndr_pull_spoolss_EPrintPropertyType(ndr, NDR_SCALARS, &r->ePropertyType));
24654 4 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->value, r->ePropertyType));
24655 4 : NDR_CHECK(ndr_pull_spoolss_PrintPropertyValueUnion(ndr, NDR_SCALARS, &r->value));
24656 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
24657 : }
24658 8 : if (ndr_flags & NDR_BUFFERS) {
24659 4 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->value, r->ePropertyType));
24660 4 : NDR_CHECK(ndr_pull_spoolss_PrintPropertyValueUnion(ndr, NDR_BUFFERS, &r->value));
24661 : }
24662 0 : return NDR_ERR_SUCCESS;
24663 : }
24664 :
24665 0 : static void ndr_print_flags_spoolss_PrintPropertyValue(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrintPropertyValue *r)
24666 : {
24667 0 : ndr_print_spoolss_PrintPropertyValue(ndr, name, r);
24668 0 : }
24669 :
24670 4 : _PUBLIC_ void ndr_print_spoolss_PrintPropertyValue(struct ndr_print *ndr, const char *name, const struct spoolss_PrintPropertyValue *r)
24671 : {
24672 4 : ndr_print_struct(ndr, name, "spoolss_PrintPropertyValue");
24673 4 : if (r == NULL) { ndr_print_null(ndr); return; }
24674 4 : ndr->depth++;
24675 4 : ndr_print_spoolss_EPrintPropertyType(ndr, "ePropertyType", r->ePropertyType);
24676 4 : ndr_print_set_switch_value(ndr, &r->value, r->ePropertyType);
24677 4 : ndr_print_spoolss_PrintPropertyValueUnion(ndr, "value", &r->value);
24678 4 : ndr->depth--;
24679 : }
24680 :
24681 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintNamedProperty(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_PrintNamedProperty *r)
24682 : {
24683 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
24684 0 : if (ndr_flags & NDR_SCALARS) {
24685 0 : NDR_CHECK(ndr_push_align(ndr, 8));
24686 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->propertyName));
24687 0 : NDR_CHECK(ndr_push_spoolss_PrintPropertyValue(ndr, NDR_SCALARS, &r->propertyValue));
24688 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
24689 : }
24690 0 : if (ndr_flags & NDR_BUFFERS) {
24691 0 : if (r->propertyName) {
24692 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->propertyName, CH_UTF16)));
24693 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24694 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->propertyName, CH_UTF16)));
24695 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->propertyName, ndr_charset_length(r->propertyName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24696 : }
24697 0 : NDR_CHECK(ndr_push_spoolss_PrintPropertyValue(ndr, NDR_BUFFERS, &r->propertyValue));
24698 : }
24699 0 : return NDR_ERR_SUCCESS;
24700 : }
24701 :
24702 4 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintNamedProperty(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_PrintNamedProperty *r)
24703 : {
24704 4 : uint32_t _ptr_propertyName;
24705 4 : uint32_t size_propertyName_1 = 0;
24706 4 : uint32_t length_propertyName_1 = 0;
24707 4 : TALLOC_CTX *_mem_save_propertyName_0 = NULL;
24708 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
24709 4 : if (ndr_flags & NDR_SCALARS) {
24710 4 : NDR_CHECK(ndr_pull_align(ndr, 8));
24711 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_propertyName));
24712 4 : if (_ptr_propertyName) {
24713 4 : NDR_PULL_ALLOC(ndr, r->propertyName);
24714 : } else {
24715 0 : r->propertyName = NULL;
24716 : }
24717 4 : NDR_CHECK(ndr_pull_spoolss_PrintPropertyValue(ndr, NDR_SCALARS, &r->propertyValue));
24718 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
24719 : }
24720 4 : if (ndr_flags & NDR_BUFFERS) {
24721 4 : if (r->propertyName) {
24722 4 : _mem_save_propertyName_0 = NDR_PULL_GET_MEM_CTX(ndr);
24723 4 : NDR_PULL_SET_MEM_CTX(ndr, r->propertyName, 0);
24724 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->propertyName));
24725 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->propertyName));
24726 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->propertyName, &size_propertyName_1));
24727 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->propertyName, &length_propertyName_1));
24728 4 : if (length_propertyName_1 > size_propertyName_1) {
24729 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_propertyName_1, length_propertyName_1);
24730 : }
24731 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_propertyName_1, sizeof(uint16_t)));
24732 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->propertyName, length_propertyName_1, sizeof(uint16_t), CH_UTF16));
24733 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_propertyName_0, 0);
24734 : }
24735 4 : NDR_CHECK(ndr_pull_spoolss_PrintPropertyValue(ndr, NDR_BUFFERS, &r->propertyValue));
24736 : }
24737 0 : return NDR_ERR_SUCCESS;
24738 : }
24739 :
24740 0 : static void ndr_print_flags_spoolss_PrintNamedProperty(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_PrintNamedProperty *r)
24741 : {
24742 0 : ndr_print_spoolss_PrintNamedProperty(ndr, name, r);
24743 0 : }
24744 :
24745 4 : _PUBLIC_ void ndr_print_spoolss_PrintNamedProperty(struct ndr_print *ndr, const char *name, const struct spoolss_PrintNamedProperty *r)
24746 : {
24747 4 : ndr_print_struct(ndr, name, "spoolss_PrintNamedProperty");
24748 4 : if (r == NULL) { ndr_print_null(ndr); return; }
24749 4 : ndr->depth++;
24750 4 : ndr_print_ptr(ndr, "propertyName", r->propertyName);
24751 4 : ndr->depth++;
24752 4 : if (r->propertyName) {
24753 4 : ndr_print_string(ndr, "propertyName", r->propertyName);
24754 : }
24755 4 : ndr->depth--;
24756 4 : ndr_print_spoolss_PrintPropertyValue(ndr, "propertyValue", &r->propertyValue);
24757 4 : ndr->depth--;
24758 : }
24759 :
24760 0 : static enum ndr_err_code ndr_push_EBranchOfficeJobEventType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum EBranchOfficeJobEventType r)
24761 : {
24762 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
24763 0 : return NDR_ERR_SUCCESS;
24764 : }
24765 :
24766 0 : static enum ndr_err_code ndr_pull_EBranchOfficeJobEventType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum EBranchOfficeJobEventType *r)
24767 : {
24768 0 : uint16_t v;
24769 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
24770 0 : *r = v;
24771 0 : return NDR_ERR_SUCCESS;
24772 : }
24773 :
24774 0 : _PUBLIC_ void ndr_print_EBranchOfficeJobEventType(struct ndr_print *ndr, const char *name, enum EBranchOfficeJobEventType r)
24775 : {
24776 0 : const char *val = NULL;
24777 :
24778 0 : switch (r) {
24779 0 : case kInvalidJobState: val = "kInvalidJobState"; break;
24780 0 : case kLogJobPrinted: val = "kLogJobPrinted"; break;
24781 0 : case kLogJobRendered: val = "kLogJobRendered"; break;
24782 0 : case kLogJobError: val = "kLogJobError"; break;
24783 0 : case kLogJobPipelineError: val = "kLogJobPipelineError"; break;
24784 0 : case kLogOfflineFileFull: val = "kLogOfflineFileFull"; break;
24785 : }
24786 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
24787 0 : }
24788 :
24789 0 : static enum ndr_err_code ndr_push_spoolss_BranchOfficeJobDataPrinted(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_BranchOfficeJobDataPrinted *r)
24790 : {
24791 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
24792 0 : if (ndr_flags & NDR_SCALARS) {
24793 0 : NDR_CHECK(ndr_push_align(ndr, 8));
24794 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Status));
24795 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pDocumentName));
24796 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pUserName));
24797 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pMachineName));
24798 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pPrinterName));
24799 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pPortName));
24800 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->Size));
24801 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->TotalPages));
24802 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
24803 : }
24804 0 : if (ndr_flags & NDR_BUFFERS) {
24805 0 : if (r->pDocumentName) {
24806 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pDocumentName, CH_UTF16)));
24807 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24808 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pDocumentName, CH_UTF16)));
24809 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pDocumentName, ndr_charset_length(r->pDocumentName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24810 : }
24811 0 : if (r->pUserName) {
24812 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pUserName, CH_UTF16)));
24813 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24814 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pUserName, CH_UTF16)));
24815 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pUserName, ndr_charset_length(r->pUserName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24816 : }
24817 0 : if (r->pMachineName) {
24818 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pMachineName, CH_UTF16)));
24819 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24820 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pMachineName, CH_UTF16)));
24821 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pMachineName, ndr_charset_length(r->pMachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24822 : }
24823 0 : if (r->pPrinterName) {
24824 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pPrinterName, CH_UTF16)));
24825 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24826 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pPrinterName, CH_UTF16)));
24827 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pPrinterName, ndr_charset_length(r->pPrinterName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24828 : }
24829 0 : if (r->pPortName) {
24830 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pPortName, CH_UTF16)));
24831 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24832 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pPortName, CH_UTF16)));
24833 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pPortName, ndr_charset_length(r->pPortName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24834 : }
24835 : }
24836 0 : return NDR_ERR_SUCCESS;
24837 : }
24838 :
24839 0 : static enum ndr_err_code ndr_pull_spoolss_BranchOfficeJobDataPrinted(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_BranchOfficeJobDataPrinted *r)
24840 : {
24841 0 : uint32_t _ptr_pDocumentName;
24842 0 : uint32_t size_pDocumentName_1 = 0;
24843 0 : uint32_t length_pDocumentName_1 = 0;
24844 0 : TALLOC_CTX *_mem_save_pDocumentName_0 = NULL;
24845 0 : uint32_t _ptr_pUserName;
24846 0 : uint32_t size_pUserName_1 = 0;
24847 0 : uint32_t length_pUserName_1 = 0;
24848 0 : TALLOC_CTX *_mem_save_pUserName_0 = NULL;
24849 0 : uint32_t _ptr_pMachineName;
24850 0 : uint32_t size_pMachineName_1 = 0;
24851 0 : uint32_t length_pMachineName_1 = 0;
24852 0 : TALLOC_CTX *_mem_save_pMachineName_0 = NULL;
24853 0 : uint32_t _ptr_pPrinterName;
24854 0 : uint32_t size_pPrinterName_1 = 0;
24855 0 : uint32_t length_pPrinterName_1 = 0;
24856 0 : TALLOC_CTX *_mem_save_pPrinterName_0 = NULL;
24857 0 : uint32_t _ptr_pPortName;
24858 0 : uint32_t size_pPortName_1 = 0;
24859 0 : uint32_t length_pPortName_1 = 0;
24860 0 : TALLOC_CTX *_mem_save_pPortName_0 = NULL;
24861 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
24862 0 : if (ndr_flags & NDR_SCALARS) {
24863 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
24864 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Status));
24865 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDocumentName));
24866 0 : if (_ptr_pDocumentName) {
24867 0 : NDR_PULL_ALLOC(ndr, r->pDocumentName);
24868 : } else {
24869 0 : r->pDocumentName = NULL;
24870 : }
24871 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pUserName));
24872 0 : if (_ptr_pUserName) {
24873 0 : NDR_PULL_ALLOC(ndr, r->pUserName);
24874 : } else {
24875 0 : r->pUserName = NULL;
24876 : }
24877 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pMachineName));
24878 0 : if (_ptr_pMachineName) {
24879 0 : NDR_PULL_ALLOC(ndr, r->pMachineName);
24880 : } else {
24881 0 : r->pMachineName = NULL;
24882 : }
24883 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrinterName));
24884 0 : if (_ptr_pPrinterName) {
24885 0 : NDR_PULL_ALLOC(ndr, r->pPrinterName);
24886 : } else {
24887 0 : r->pPrinterName = NULL;
24888 : }
24889 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPortName));
24890 0 : if (_ptr_pPortName) {
24891 0 : NDR_PULL_ALLOC(ndr, r->pPortName);
24892 : } else {
24893 0 : r->pPortName = NULL;
24894 : }
24895 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->Size));
24896 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->TotalPages));
24897 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
24898 : }
24899 0 : if (ndr_flags & NDR_BUFFERS) {
24900 0 : if (r->pDocumentName) {
24901 0 : _mem_save_pDocumentName_0 = NDR_PULL_GET_MEM_CTX(ndr);
24902 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pDocumentName, 0);
24903 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pDocumentName));
24904 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pDocumentName));
24905 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pDocumentName, &size_pDocumentName_1));
24906 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pDocumentName, &length_pDocumentName_1));
24907 0 : if (length_pDocumentName_1 > size_pDocumentName_1) {
24908 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pDocumentName_1, length_pDocumentName_1);
24909 : }
24910 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pDocumentName_1, sizeof(uint16_t)));
24911 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pDocumentName, length_pDocumentName_1, sizeof(uint16_t), CH_UTF16));
24912 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDocumentName_0, 0);
24913 : }
24914 0 : if (r->pUserName) {
24915 0 : _mem_save_pUserName_0 = NDR_PULL_GET_MEM_CTX(ndr);
24916 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pUserName, 0);
24917 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pUserName));
24918 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pUserName));
24919 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pUserName, &size_pUserName_1));
24920 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pUserName, &length_pUserName_1));
24921 0 : if (length_pUserName_1 > size_pUserName_1) {
24922 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pUserName_1, length_pUserName_1);
24923 : }
24924 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pUserName_1, sizeof(uint16_t)));
24925 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pUserName, length_pUserName_1, sizeof(uint16_t), CH_UTF16));
24926 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pUserName_0, 0);
24927 : }
24928 0 : if (r->pMachineName) {
24929 0 : _mem_save_pMachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
24930 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pMachineName, 0);
24931 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pMachineName));
24932 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pMachineName));
24933 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pMachineName, &size_pMachineName_1));
24934 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pMachineName, &length_pMachineName_1));
24935 0 : if (length_pMachineName_1 > size_pMachineName_1) {
24936 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pMachineName_1, length_pMachineName_1);
24937 : }
24938 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pMachineName_1, sizeof(uint16_t)));
24939 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pMachineName, length_pMachineName_1, sizeof(uint16_t), CH_UTF16));
24940 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pMachineName_0, 0);
24941 : }
24942 0 : if (r->pPrinterName) {
24943 0 : _mem_save_pPrinterName_0 = NDR_PULL_GET_MEM_CTX(ndr);
24944 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pPrinterName, 0);
24945 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pPrinterName));
24946 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pPrinterName));
24947 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pPrinterName, &size_pPrinterName_1));
24948 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pPrinterName, &length_pPrinterName_1));
24949 0 : if (length_pPrinterName_1 > size_pPrinterName_1) {
24950 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPrinterName_1, length_pPrinterName_1);
24951 : }
24952 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPrinterName_1, sizeof(uint16_t)));
24953 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pPrinterName, length_pPrinterName_1, sizeof(uint16_t), CH_UTF16));
24954 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinterName_0, 0);
24955 : }
24956 0 : if (r->pPortName) {
24957 0 : _mem_save_pPortName_0 = NDR_PULL_GET_MEM_CTX(ndr);
24958 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pPortName, 0);
24959 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pPortName));
24960 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pPortName));
24961 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pPortName, &size_pPortName_1));
24962 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pPortName, &length_pPortName_1));
24963 0 : if (length_pPortName_1 > size_pPortName_1) {
24964 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPortName_1, length_pPortName_1);
24965 : }
24966 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPortName_1, sizeof(uint16_t)));
24967 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pPortName, length_pPortName_1, sizeof(uint16_t), CH_UTF16));
24968 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPortName_0, 0);
24969 : }
24970 : }
24971 0 : return NDR_ERR_SUCCESS;
24972 : }
24973 :
24974 0 : _PUBLIC_ void ndr_print_spoolss_BranchOfficeJobDataPrinted(struct ndr_print *ndr, const char *name, const struct spoolss_BranchOfficeJobDataPrinted *r)
24975 : {
24976 0 : ndr_print_struct(ndr, name, "spoolss_BranchOfficeJobDataPrinted");
24977 0 : if (r == NULL) { ndr_print_null(ndr); return; }
24978 0 : ndr->depth++;
24979 0 : ndr_print_uint32(ndr, "Status", r->Status);
24980 0 : ndr_print_ptr(ndr, "pDocumentName", r->pDocumentName);
24981 0 : ndr->depth++;
24982 0 : if (r->pDocumentName) {
24983 0 : ndr_print_string(ndr, "pDocumentName", r->pDocumentName);
24984 : }
24985 0 : ndr->depth--;
24986 0 : ndr_print_ptr(ndr, "pUserName", r->pUserName);
24987 0 : ndr->depth++;
24988 0 : if (r->pUserName) {
24989 0 : ndr_print_string(ndr, "pUserName", r->pUserName);
24990 : }
24991 0 : ndr->depth--;
24992 0 : ndr_print_ptr(ndr, "pMachineName", r->pMachineName);
24993 0 : ndr->depth++;
24994 0 : if (r->pMachineName) {
24995 0 : ndr_print_string(ndr, "pMachineName", r->pMachineName);
24996 : }
24997 0 : ndr->depth--;
24998 0 : ndr_print_ptr(ndr, "pPrinterName", r->pPrinterName);
24999 0 : ndr->depth++;
25000 0 : if (r->pPrinterName) {
25001 0 : ndr_print_string(ndr, "pPrinterName", r->pPrinterName);
25002 : }
25003 0 : ndr->depth--;
25004 0 : ndr_print_ptr(ndr, "pPortName", r->pPortName);
25005 0 : ndr->depth++;
25006 0 : if (r->pPortName) {
25007 0 : ndr_print_string(ndr, "pPortName", r->pPortName);
25008 : }
25009 0 : ndr->depth--;
25010 0 : ndr_print_hyper(ndr, "Size", r->Size);
25011 0 : ndr_print_uint32(ndr, "TotalPages", r->TotalPages);
25012 0 : ndr->depth--;
25013 : }
25014 :
25015 0 : static enum ndr_err_code ndr_push_spoolss_BranchOfficeJobDataRendered(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_BranchOfficeJobDataRendered *r)
25016 : {
25017 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
25018 0 : if (ndr_flags & NDR_SCALARS) {
25019 0 : NDR_CHECK(ndr_push_align(ndr, 8));
25020 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->Size));
25021 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ICMMethod));
25022 0 : NDR_CHECK(ndr_push_int16(ndr, NDR_SCALARS, r->Color));
25023 0 : NDR_CHECK(ndr_push_int16(ndr, NDR_SCALARS, r->PrintQuality));
25024 0 : NDR_CHECK(ndr_push_int16(ndr, NDR_SCALARS, r->YResolution));
25025 0 : NDR_CHECK(ndr_push_int16(ndr, NDR_SCALARS, r->Copies));
25026 0 : NDR_CHECK(ndr_push_int16(ndr, NDR_SCALARS, r->TTOption));
25027 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
25028 : }
25029 0 : if (ndr_flags & NDR_BUFFERS) {
25030 0 : }
25031 0 : return NDR_ERR_SUCCESS;
25032 : }
25033 :
25034 0 : static enum ndr_err_code ndr_pull_spoolss_BranchOfficeJobDataRendered(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_BranchOfficeJobDataRendered *r)
25035 : {
25036 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
25037 0 : if (ndr_flags & NDR_SCALARS) {
25038 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
25039 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->Size));
25040 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ICMMethod));
25041 0 : NDR_CHECK(ndr_pull_int16(ndr, NDR_SCALARS, &r->Color));
25042 0 : NDR_CHECK(ndr_pull_int16(ndr, NDR_SCALARS, &r->PrintQuality));
25043 0 : NDR_CHECK(ndr_pull_int16(ndr, NDR_SCALARS, &r->YResolution));
25044 0 : NDR_CHECK(ndr_pull_int16(ndr, NDR_SCALARS, &r->Copies));
25045 0 : NDR_CHECK(ndr_pull_int16(ndr, NDR_SCALARS, &r->TTOption));
25046 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
25047 : }
25048 0 : if (ndr_flags & NDR_BUFFERS) {
25049 0 : }
25050 0 : return NDR_ERR_SUCCESS;
25051 : }
25052 :
25053 0 : _PUBLIC_ void ndr_print_spoolss_BranchOfficeJobDataRendered(struct ndr_print *ndr, const char *name, const struct spoolss_BranchOfficeJobDataRendered *r)
25054 : {
25055 0 : ndr_print_struct(ndr, name, "spoolss_BranchOfficeJobDataRendered");
25056 0 : if (r == NULL) { ndr_print_null(ndr); return; }
25057 0 : ndr->depth++;
25058 0 : ndr_print_hyper(ndr, "Size", r->Size);
25059 0 : ndr_print_uint32(ndr, "ICMMethod", r->ICMMethod);
25060 0 : ndr_print_int16(ndr, "Color", r->Color);
25061 0 : ndr_print_int16(ndr, "PrintQuality", r->PrintQuality);
25062 0 : ndr_print_int16(ndr, "YResolution", r->YResolution);
25063 0 : ndr_print_int16(ndr, "Copies", r->Copies);
25064 0 : ndr_print_int16(ndr, "TTOption", r->TTOption);
25065 0 : ndr->depth--;
25066 : }
25067 :
25068 0 : static enum ndr_err_code ndr_push_spoolss_BranchOfficeJobDataError(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_BranchOfficeJobDataError *r)
25069 : {
25070 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
25071 0 : if (ndr_flags & NDR_SCALARS) {
25072 0 : NDR_CHECK(ndr_push_align(ndr, 8));
25073 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->LastError));
25074 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pDocumentName));
25075 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pUserName));
25076 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pPrinterName));
25077 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pDataType));
25078 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->TotalSize));
25079 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PrintedSize));
25080 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->TotalPages));
25081 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->PrintedPages));
25082 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pMachineName));
25083 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pJobError));
25084 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pErrorDescription));
25085 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
25086 : }
25087 0 : if (ndr_flags & NDR_BUFFERS) {
25088 0 : if (r->pDocumentName) {
25089 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pDocumentName, CH_UTF16)));
25090 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25091 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pDocumentName, CH_UTF16)));
25092 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pDocumentName, ndr_charset_length(r->pDocumentName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25093 : }
25094 0 : if (r->pUserName) {
25095 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pUserName, CH_UTF16)));
25096 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25097 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pUserName, CH_UTF16)));
25098 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pUserName, ndr_charset_length(r->pUserName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25099 : }
25100 0 : if (r->pPrinterName) {
25101 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pPrinterName, CH_UTF16)));
25102 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25103 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pPrinterName, CH_UTF16)));
25104 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pPrinterName, ndr_charset_length(r->pPrinterName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25105 : }
25106 0 : if (r->pDataType) {
25107 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pDataType, CH_UTF16)));
25108 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25109 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pDataType, CH_UTF16)));
25110 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pDataType, ndr_charset_length(r->pDataType, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25111 : }
25112 0 : if (r->pMachineName) {
25113 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pMachineName, CH_UTF16)));
25114 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25115 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pMachineName, CH_UTF16)));
25116 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pMachineName, ndr_charset_length(r->pMachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25117 : }
25118 0 : if (r->pJobError) {
25119 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pJobError, CH_UTF16)));
25120 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25121 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pJobError, CH_UTF16)));
25122 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pJobError, ndr_charset_length(r->pJobError, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25123 : }
25124 0 : if (r->pErrorDescription) {
25125 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pErrorDescription, CH_UTF16)));
25126 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25127 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pErrorDescription, CH_UTF16)));
25128 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pErrorDescription, ndr_charset_length(r->pErrorDescription, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25129 : }
25130 : }
25131 0 : return NDR_ERR_SUCCESS;
25132 : }
25133 :
25134 0 : static enum ndr_err_code ndr_pull_spoolss_BranchOfficeJobDataError(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_BranchOfficeJobDataError *r)
25135 : {
25136 0 : uint32_t _ptr_pDocumentName;
25137 0 : uint32_t size_pDocumentName_1 = 0;
25138 0 : uint32_t length_pDocumentName_1 = 0;
25139 0 : TALLOC_CTX *_mem_save_pDocumentName_0 = NULL;
25140 0 : uint32_t _ptr_pUserName;
25141 0 : uint32_t size_pUserName_1 = 0;
25142 0 : uint32_t length_pUserName_1 = 0;
25143 0 : TALLOC_CTX *_mem_save_pUserName_0 = NULL;
25144 0 : uint32_t _ptr_pPrinterName;
25145 0 : uint32_t size_pPrinterName_1 = 0;
25146 0 : uint32_t length_pPrinterName_1 = 0;
25147 0 : TALLOC_CTX *_mem_save_pPrinterName_0 = NULL;
25148 0 : uint32_t _ptr_pDataType;
25149 0 : uint32_t size_pDataType_1 = 0;
25150 0 : uint32_t length_pDataType_1 = 0;
25151 0 : TALLOC_CTX *_mem_save_pDataType_0 = NULL;
25152 0 : uint32_t _ptr_pMachineName;
25153 0 : uint32_t size_pMachineName_1 = 0;
25154 0 : uint32_t length_pMachineName_1 = 0;
25155 0 : TALLOC_CTX *_mem_save_pMachineName_0 = NULL;
25156 0 : uint32_t _ptr_pJobError;
25157 0 : uint32_t size_pJobError_1 = 0;
25158 0 : uint32_t length_pJobError_1 = 0;
25159 0 : TALLOC_CTX *_mem_save_pJobError_0 = NULL;
25160 0 : uint32_t _ptr_pErrorDescription;
25161 0 : uint32_t size_pErrorDescription_1 = 0;
25162 0 : uint32_t length_pErrorDescription_1 = 0;
25163 0 : TALLOC_CTX *_mem_save_pErrorDescription_0 = NULL;
25164 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
25165 0 : if (ndr_flags & NDR_SCALARS) {
25166 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
25167 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->LastError));
25168 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDocumentName));
25169 0 : if (_ptr_pDocumentName) {
25170 0 : NDR_PULL_ALLOC(ndr, r->pDocumentName);
25171 : } else {
25172 0 : r->pDocumentName = NULL;
25173 : }
25174 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pUserName));
25175 0 : if (_ptr_pUserName) {
25176 0 : NDR_PULL_ALLOC(ndr, r->pUserName);
25177 : } else {
25178 0 : r->pUserName = NULL;
25179 : }
25180 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrinterName));
25181 0 : if (_ptr_pPrinterName) {
25182 0 : NDR_PULL_ALLOC(ndr, r->pPrinterName);
25183 : } else {
25184 0 : r->pPrinterName = NULL;
25185 : }
25186 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDataType));
25187 0 : if (_ptr_pDataType) {
25188 0 : NDR_PULL_ALLOC(ndr, r->pDataType);
25189 : } else {
25190 0 : r->pDataType = NULL;
25191 : }
25192 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->TotalSize));
25193 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PrintedSize));
25194 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->TotalPages));
25195 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->PrintedPages));
25196 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pMachineName));
25197 0 : if (_ptr_pMachineName) {
25198 0 : NDR_PULL_ALLOC(ndr, r->pMachineName);
25199 : } else {
25200 0 : r->pMachineName = NULL;
25201 : }
25202 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pJobError));
25203 0 : if (_ptr_pJobError) {
25204 0 : NDR_PULL_ALLOC(ndr, r->pJobError);
25205 : } else {
25206 0 : r->pJobError = NULL;
25207 : }
25208 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pErrorDescription));
25209 0 : if (_ptr_pErrorDescription) {
25210 0 : NDR_PULL_ALLOC(ndr, r->pErrorDescription);
25211 : } else {
25212 0 : r->pErrorDescription = NULL;
25213 : }
25214 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
25215 : }
25216 0 : if (ndr_flags & NDR_BUFFERS) {
25217 0 : if (r->pDocumentName) {
25218 0 : _mem_save_pDocumentName_0 = NDR_PULL_GET_MEM_CTX(ndr);
25219 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pDocumentName, 0);
25220 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pDocumentName));
25221 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pDocumentName));
25222 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pDocumentName, &size_pDocumentName_1));
25223 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pDocumentName, &length_pDocumentName_1));
25224 0 : if (length_pDocumentName_1 > size_pDocumentName_1) {
25225 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pDocumentName_1, length_pDocumentName_1);
25226 : }
25227 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pDocumentName_1, sizeof(uint16_t)));
25228 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pDocumentName, length_pDocumentName_1, sizeof(uint16_t), CH_UTF16));
25229 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDocumentName_0, 0);
25230 : }
25231 0 : if (r->pUserName) {
25232 0 : _mem_save_pUserName_0 = NDR_PULL_GET_MEM_CTX(ndr);
25233 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pUserName, 0);
25234 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pUserName));
25235 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pUserName));
25236 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pUserName, &size_pUserName_1));
25237 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pUserName, &length_pUserName_1));
25238 0 : if (length_pUserName_1 > size_pUserName_1) {
25239 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pUserName_1, length_pUserName_1);
25240 : }
25241 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pUserName_1, sizeof(uint16_t)));
25242 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pUserName, length_pUserName_1, sizeof(uint16_t), CH_UTF16));
25243 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pUserName_0, 0);
25244 : }
25245 0 : if (r->pPrinterName) {
25246 0 : _mem_save_pPrinterName_0 = NDR_PULL_GET_MEM_CTX(ndr);
25247 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pPrinterName, 0);
25248 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pPrinterName));
25249 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pPrinterName));
25250 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pPrinterName, &size_pPrinterName_1));
25251 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pPrinterName, &length_pPrinterName_1));
25252 0 : if (length_pPrinterName_1 > size_pPrinterName_1) {
25253 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPrinterName_1, length_pPrinterName_1);
25254 : }
25255 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPrinterName_1, sizeof(uint16_t)));
25256 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pPrinterName, length_pPrinterName_1, sizeof(uint16_t), CH_UTF16));
25257 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinterName_0, 0);
25258 : }
25259 0 : if (r->pDataType) {
25260 0 : _mem_save_pDataType_0 = NDR_PULL_GET_MEM_CTX(ndr);
25261 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pDataType, 0);
25262 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pDataType));
25263 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pDataType));
25264 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pDataType, &size_pDataType_1));
25265 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pDataType, &length_pDataType_1));
25266 0 : if (length_pDataType_1 > size_pDataType_1) {
25267 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pDataType_1, length_pDataType_1);
25268 : }
25269 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pDataType_1, sizeof(uint16_t)));
25270 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pDataType, length_pDataType_1, sizeof(uint16_t), CH_UTF16));
25271 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDataType_0, 0);
25272 : }
25273 0 : if (r->pMachineName) {
25274 0 : _mem_save_pMachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
25275 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pMachineName, 0);
25276 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pMachineName));
25277 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pMachineName));
25278 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pMachineName, &size_pMachineName_1));
25279 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pMachineName, &length_pMachineName_1));
25280 0 : if (length_pMachineName_1 > size_pMachineName_1) {
25281 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pMachineName_1, length_pMachineName_1);
25282 : }
25283 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pMachineName_1, sizeof(uint16_t)));
25284 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pMachineName, length_pMachineName_1, sizeof(uint16_t), CH_UTF16));
25285 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pMachineName_0, 0);
25286 : }
25287 0 : if (r->pJobError) {
25288 0 : _mem_save_pJobError_0 = NDR_PULL_GET_MEM_CTX(ndr);
25289 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pJobError, 0);
25290 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pJobError));
25291 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pJobError));
25292 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pJobError, &size_pJobError_1));
25293 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pJobError, &length_pJobError_1));
25294 0 : if (length_pJobError_1 > size_pJobError_1) {
25295 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pJobError_1, length_pJobError_1);
25296 : }
25297 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pJobError_1, sizeof(uint16_t)));
25298 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pJobError, length_pJobError_1, sizeof(uint16_t), CH_UTF16));
25299 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pJobError_0, 0);
25300 : }
25301 0 : if (r->pErrorDescription) {
25302 0 : _mem_save_pErrorDescription_0 = NDR_PULL_GET_MEM_CTX(ndr);
25303 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pErrorDescription, 0);
25304 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pErrorDescription));
25305 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pErrorDescription));
25306 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pErrorDescription, &size_pErrorDescription_1));
25307 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pErrorDescription, &length_pErrorDescription_1));
25308 0 : if (length_pErrorDescription_1 > size_pErrorDescription_1) {
25309 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pErrorDescription_1, length_pErrorDescription_1);
25310 : }
25311 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pErrorDescription_1, sizeof(uint16_t)));
25312 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pErrorDescription, length_pErrorDescription_1, sizeof(uint16_t), CH_UTF16));
25313 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pErrorDescription_0, 0);
25314 : }
25315 : }
25316 0 : return NDR_ERR_SUCCESS;
25317 : }
25318 :
25319 0 : _PUBLIC_ void ndr_print_spoolss_BranchOfficeJobDataError(struct ndr_print *ndr, const char *name, const struct spoolss_BranchOfficeJobDataError *r)
25320 : {
25321 0 : ndr_print_struct(ndr, name, "spoolss_BranchOfficeJobDataError");
25322 0 : if (r == NULL) { ndr_print_null(ndr); return; }
25323 0 : ndr->depth++;
25324 0 : ndr_print_WERROR(ndr, "LastError", r->LastError);
25325 0 : ndr_print_ptr(ndr, "pDocumentName", r->pDocumentName);
25326 0 : ndr->depth++;
25327 0 : if (r->pDocumentName) {
25328 0 : ndr_print_string(ndr, "pDocumentName", r->pDocumentName);
25329 : }
25330 0 : ndr->depth--;
25331 0 : ndr_print_ptr(ndr, "pUserName", r->pUserName);
25332 0 : ndr->depth++;
25333 0 : if (r->pUserName) {
25334 0 : ndr_print_string(ndr, "pUserName", r->pUserName);
25335 : }
25336 0 : ndr->depth--;
25337 0 : ndr_print_ptr(ndr, "pPrinterName", r->pPrinterName);
25338 0 : ndr->depth++;
25339 0 : if (r->pPrinterName) {
25340 0 : ndr_print_string(ndr, "pPrinterName", r->pPrinterName);
25341 : }
25342 0 : ndr->depth--;
25343 0 : ndr_print_ptr(ndr, "pDataType", r->pDataType);
25344 0 : ndr->depth++;
25345 0 : if (r->pDataType) {
25346 0 : ndr_print_string(ndr, "pDataType", r->pDataType);
25347 : }
25348 0 : ndr->depth--;
25349 0 : ndr_print_hyper(ndr, "TotalSize", r->TotalSize);
25350 0 : ndr_print_hyper(ndr, "PrintedSize", r->PrintedSize);
25351 0 : ndr_print_uint32(ndr, "TotalPages", r->TotalPages);
25352 0 : ndr_print_uint32(ndr, "PrintedPages", r->PrintedPages);
25353 0 : ndr_print_ptr(ndr, "pMachineName", r->pMachineName);
25354 0 : ndr->depth++;
25355 0 : if (r->pMachineName) {
25356 0 : ndr_print_string(ndr, "pMachineName", r->pMachineName);
25357 : }
25358 0 : ndr->depth--;
25359 0 : ndr_print_ptr(ndr, "pJobError", r->pJobError);
25360 0 : ndr->depth++;
25361 0 : if (r->pJobError) {
25362 0 : ndr_print_string(ndr, "pJobError", r->pJobError);
25363 : }
25364 0 : ndr->depth--;
25365 0 : ndr_print_ptr(ndr, "pErrorDescription", r->pErrorDescription);
25366 0 : ndr->depth++;
25367 0 : if (r->pErrorDescription) {
25368 0 : ndr_print_string(ndr, "pErrorDescription", r->pErrorDescription);
25369 : }
25370 0 : ndr->depth--;
25371 0 : ndr->depth--;
25372 : }
25373 :
25374 0 : static enum ndr_err_code ndr_push_spoolss_BranchOfficeJobDataPipelineFailed(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_BranchOfficeJobDataPipelineFailed *r)
25375 : {
25376 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
25377 0 : if (ndr_flags & NDR_SCALARS) {
25378 0 : NDR_CHECK(ndr_push_align(ndr, 5));
25379 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pDocumentName));
25380 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pPrinterName));
25381 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pExtraErrorInfo));
25382 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
25383 : }
25384 0 : if (ndr_flags & NDR_BUFFERS) {
25385 0 : if (r->pDocumentName) {
25386 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pDocumentName, CH_UTF16)));
25387 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25388 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pDocumentName, CH_UTF16)));
25389 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pDocumentName, ndr_charset_length(r->pDocumentName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25390 : }
25391 0 : if (r->pPrinterName) {
25392 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pPrinterName, CH_UTF16)));
25393 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25394 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pPrinterName, CH_UTF16)));
25395 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pPrinterName, ndr_charset_length(r->pPrinterName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25396 : }
25397 0 : if (r->pExtraErrorInfo) {
25398 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pExtraErrorInfo, CH_UTF16)));
25399 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25400 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pExtraErrorInfo, CH_UTF16)));
25401 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pExtraErrorInfo, ndr_charset_length(r->pExtraErrorInfo, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25402 : }
25403 : }
25404 0 : return NDR_ERR_SUCCESS;
25405 : }
25406 :
25407 0 : static enum ndr_err_code ndr_pull_spoolss_BranchOfficeJobDataPipelineFailed(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_BranchOfficeJobDataPipelineFailed *r)
25408 : {
25409 0 : uint32_t _ptr_pDocumentName;
25410 0 : uint32_t size_pDocumentName_1 = 0;
25411 0 : uint32_t length_pDocumentName_1 = 0;
25412 0 : TALLOC_CTX *_mem_save_pDocumentName_0 = NULL;
25413 0 : uint32_t _ptr_pPrinterName;
25414 0 : uint32_t size_pPrinterName_1 = 0;
25415 0 : uint32_t length_pPrinterName_1 = 0;
25416 0 : TALLOC_CTX *_mem_save_pPrinterName_0 = NULL;
25417 0 : uint32_t _ptr_pExtraErrorInfo;
25418 0 : uint32_t size_pExtraErrorInfo_1 = 0;
25419 0 : uint32_t length_pExtraErrorInfo_1 = 0;
25420 0 : TALLOC_CTX *_mem_save_pExtraErrorInfo_0 = NULL;
25421 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
25422 0 : if (ndr_flags & NDR_SCALARS) {
25423 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
25424 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDocumentName));
25425 0 : if (_ptr_pDocumentName) {
25426 0 : NDR_PULL_ALLOC(ndr, r->pDocumentName);
25427 : } else {
25428 0 : r->pDocumentName = NULL;
25429 : }
25430 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrinterName));
25431 0 : if (_ptr_pPrinterName) {
25432 0 : NDR_PULL_ALLOC(ndr, r->pPrinterName);
25433 : } else {
25434 0 : r->pPrinterName = NULL;
25435 : }
25436 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExtraErrorInfo));
25437 0 : if (_ptr_pExtraErrorInfo) {
25438 0 : NDR_PULL_ALLOC(ndr, r->pExtraErrorInfo);
25439 : } else {
25440 0 : r->pExtraErrorInfo = NULL;
25441 : }
25442 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
25443 : }
25444 0 : if (ndr_flags & NDR_BUFFERS) {
25445 0 : if (r->pDocumentName) {
25446 0 : _mem_save_pDocumentName_0 = NDR_PULL_GET_MEM_CTX(ndr);
25447 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pDocumentName, 0);
25448 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pDocumentName));
25449 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pDocumentName));
25450 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pDocumentName, &size_pDocumentName_1));
25451 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pDocumentName, &length_pDocumentName_1));
25452 0 : if (length_pDocumentName_1 > size_pDocumentName_1) {
25453 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pDocumentName_1, length_pDocumentName_1);
25454 : }
25455 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pDocumentName_1, sizeof(uint16_t)));
25456 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pDocumentName, length_pDocumentName_1, sizeof(uint16_t), CH_UTF16));
25457 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDocumentName_0, 0);
25458 : }
25459 0 : if (r->pPrinterName) {
25460 0 : _mem_save_pPrinterName_0 = NDR_PULL_GET_MEM_CTX(ndr);
25461 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pPrinterName, 0);
25462 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pPrinterName));
25463 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pPrinterName));
25464 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pPrinterName, &size_pPrinterName_1));
25465 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pPrinterName, &length_pPrinterName_1));
25466 0 : if (length_pPrinterName_1 > size_pPrinterName_1) {
25467 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPrinterName_1, length_pPrinterName_1);
25468 : }
25469 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPrinterName_1, sizeof(uint16_t)));
25470 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pPrinterName, length_pPrinterName_1, sizeof(uint16_t), CH_UTF16));
25471 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinterName_0, 0);
25472 : }
25473 0 : if (r->pExtraErrorInfo) {
25474 0 : _mem_save_pExtraErrorInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
25475 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pExtraErrorInfo, 0);
25476 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pExtraErrorInfo));
25477 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pExtraErrorInfo));
25478 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pExtraErrorInfo, &size_pExtraErrorInfo_1));
25479 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pExtraErrorInfo, &length_pExtraErrorInfo_1));
25480 0 : if (length_pExtraErrorInfo_1 > size_pExtraErrorInfo_1) {
25481 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pExtraErrorInfo_1, length_pExtraErrorInfo_1);
25482 : }
25483 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pExtraErrorInfo_1, sizeof(uint16_t)));
25484 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pExtraErrorInfo, length_pExtraErrorInfo_1, sizeof(uint16_t), CH_UTF16));
25485 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExtraErrorInfo_0, 0);
25486 : }
25487 : }
25488 0 : return NDR_ERR_SUCCESS;
25489 : }
25490 :
25491 0 : _PUBLIC_ void ndr_print_spoolss_BranchOfficeJobDataPipelineFailed(struct ndr_print *ndr, const char *name, const struct spoolss_BranchOfficeJobDataPipelineFailed *r)
25492 : {
25493 0 : ndr_print_struct(ndr, name, "spoolss_BranchOfficeJobDataPipelineFailed");
25494 0 : if (r == NULL) { ndr_print_null(ndr); return; }
25495 0 : ndr->depth++;
25496 0 : ndr_print_ptr(ndr, "pDocumentName", r->pDocumentName);
25497 0 : ndr->depth++;
25498 0 : if (r->pDocumentName) {
25499 0 : ndr_print_string(ndr, "pDocumentName", r->pDocumentName);
25500 : }
25501 0 : ndr->depth--;
25502 0 : ndr_print_ptr(ndr, "pPrinterName", r->pPrinterName);
25503 0 : ndr->depth++;
25504 0 : if (r->pPrinterName) {
25505 0 : ndr_print_string(ndr, "pPrinterName", r->pPrinterName);
25506 : }
25507 0 : ndr->depth--;
25508 0 : ndr_print_ptr(ndr, "pExtraErrorInfo", r->pExtraErrorInfo);
25509 0 : ndr->depth++;
25510 0 : if (r->pExtraErrorInfo) {
25511 0 : ndr_print_string(ndr, "pExtraErrorInfo", r->pExtraErrorInfo);
25512 : }
25513 0 : ndr->depth--;
25514 0 : ndr->depth--;
25515 : }
25516 :
25517 0 : static enum ndr_err_code ndr_push_spoolss_BranchOfficeLogOfflineFileFull(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_BranchOfficeLogOfflineFileFull *r)
25518 : {
25519 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
25520 0 : if (ndr_flags & NDR_SCALARS) {
25521 0 : NDR_CHECK(ndr_push_align(ndr, 5));
25522 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pMachineName));
25523 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
25524 : }
25525 0 : if (ndr_flags & NDR_BUFFERS) {
25526 0 : if (r->pMachineName) {
25527 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pMachineName, CH_UTF16)));
25528 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25529 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pMachineName, CH_UTF16)));
25530 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pMachineName, ndr_charset_length(r->pMachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25531 : }
25532 : }
25533 0 : return NDR_ERR_SUCCESS;
25534 : }
25535 :
25536 0 : static enum ndr_err_code ndr_pull_spoolss_BranchOfficeLogOfflineFileFull(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_BranchOfficeLogOfflineFileFull *r)
25537 : {
25538 0 : uint32_t _ptr_pMachineName;
25539 0 : uint32_t size_pMachineName_1 = 0;
25540 0 : uint32_t length_pMachineName_1 = 0;
25541 0 : TALLOC_CTX *_mem_save_pMachineName_0 = NULL;
25542 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
25543 0 : if (ndr_flags & NDR_SCALARS) {
25544 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
25545 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pMachineName));
25546 0 : if (_ptr_pMachineName) {
25547 0 : NDR_PULL_ALLOC(ndr, r->pMachineName);
25548 : } else {
25549 0 : r->pMachineName = NULL;
25550 : }
25551 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
25552 : }
25553 0 : if (ndr_flags & NDR_BUFFERS) {
25554 0 : if (r->pMachineName) {
25555 0 : _mem_save_pMachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
25556 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pMachineName, 0);
25557 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pMachineName));
25558 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pMachineName));
25559 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pMachineName, &size_pMachineName_1));
25560 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pMachineName, &length_pMachineName_1));
25561 0 : if (length_pMachineName_1 > size_pMachineName_1) {
25562 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pMachineName_1, length_pMachineName_1);
25563 : }
25564 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pMachineName_1, sizeof(uint16_t)));
25565 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pMachineName, length_pMachineName_1, sizeof(uint16_t), CH_UTF16));
25566 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pMachineName_0, 0);
25567 : }
25568 : }
25569 0 : return NDR_ERR_SUCCESS;
25570 : }
25571 :
25572 0 : _PUBLIC_ void ndr_print_spoolss_BranchOfficeLogOfflineFileFull(struct ndr_print *ndr, const char *name, const struct spoolss_BranchOfficeLogOfflineFileFull *r)
25573 : {
25574 0 : ndr_print_struct(ndr, name, "spoolss_BranchOfficeLogOfflineFileFull");
25575 0 : if (r == NULL) { ndr_print_null(ndr); return; }
25576 0 : ndr->depth++;
25577 0 : ndr_print_ptr(ndr, "pMachineName", r->pMachineName);
25578 0 : ndr->depth++;
25579 0 : if (r->pMachineName) {
25580 0 : ndr_print_string(ndr, "pMachineName", r->pMachineName);
25581 : }
25582 0 : ndr->depth--;
25583 0 : ndr->depth--;
25584 : }
25585 :
25586 0 : static enum ndr_err_code ndr_push_spoolss_BranchOfficeJobInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union spoolss_BranchOfficeJobInfo *r)
25587 : {
25588 0 : uint32_t level;
25589 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
25590 0 : if (ndr_flags & NDR_SCALARS) {
25591 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
25592 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
25593 0 : NDR_CHECK(ndr_push_union_align(ndr, 8));
25594 0 : NDR_CHECK(ndr_push_EBranchOfficeJobEventType(ndr, NDR_SCALARS, level));
25595 : /* ms_union is always aligned to the largest union arm*/
25596 0 : NDR_CHECK(ndr_push_align(ndr, 8));
25597 0 : switch (level) {
25598 0 : case kLogJobPrinted: {
25599 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobDataPrinted(ndr, NDR_SCALARS, &r->LogJobPrinted));
25600 0 : break; }
25601 :
25602 0 : case kLogJobRendered: {
25603 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobDataRendered(ndr, NDR_SCALARS, &r->LogJobRendered));
25604 0 : break; }
25605 :
25606 0 : case kLogJobError: {
25607 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobDataError(ndr, NDR_SCALARS, &r->LogJobError));
25608 0 : break; }
25609 :
25610 0 : case kLogJobPipelineError: {
25611 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobDataPipelineFailed(ndr, NDR_SCALARS, &r->LogPipelineFailed));
25612 0 : break; }
25613 :
25614 0 : case kLogOfflineFileFull: {
25615 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeLogOfflineFileFull(ndr, NDR_SCALARS, &r->LogOfflineFileFull));
25616 0 : break; }
25617 :
25618 0 : default:
25619 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
25620 : }
25621 : }
25622 0 : if (ndr_flags & NDR_BUFFERS) {
25623 0 : if (!(ndr_flags & NDR_SCALARS)) {
25624 : /* We didn't get it above, and the token is not needed after this. */
25625 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
25626 : }
25627 0 : switch (level) {
25628 0 : case kLogJobPrinted:
25629 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobDataPrinted(ndr, NDR_BUFFERS, &r->LogJobPrinted));
25630 0 : break;
25631 :
25632 0 : case kLogJobRendered:
25633 0 : break;
25634 :
25635 0 : case kLogJobError:
25636 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobDataError(ndr, NDR_BUFFERS, &r->LogJobError));
25637 0 : break;
25638 :
25639 0 : case kLogJobPipelineError:
25640 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobDataPipelineFailed(ndr, NDR_BUFFERS, &r->LogPipelineFailed));
25641 0 : break;
25642 :
25643 0 : case kLogOfflineFileFull:
25644 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeLogOfflineFileFull(ndr, NDR_BUFFERS, &r->LogOfflineFileFull));
25645 0 : break;
25646 :
25647 0 : default:
25648 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
25649 : }
25650 : }
25651 0 : return NDR_ERR_SUCCESS;
25652 : }
25653 :
25654 0 : static enum ndr_err_code ndr_pull_spoolss_BranchOfficeJobInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union spoolss_BranchOfficeJobInfo *r)
25655 : {
25656 0 : uint32_t level;
25657 0 : uint16_t _level;
25658 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
25659 0 : if (ndr_flags & NDR_SCALARS) {
25660 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
25661 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
25662 0 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
25663 0 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
25664 0 : if (_level != level) {
25665 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
25666 : }
25667 : /* ms_union is always aligned to the largest union arm*/
25668 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
25669 0 : switch (level) {
25670 0 : case kLogJobPrinted: {
25671 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobDataPrinted(ndr, NDR_SCALARS, &r->LogJobPrinted));
25672 0 : break; }
25673 :
25674 0 : case kLogJobRendered: {
25675 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobDataRendered(ndr, NDR_SCALARS, &r->LogJobRendered));
25676 0 : break; }
25677 :
25678 0 : case kLogJobError: {
25679 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobDataError(ndr, NDR_SCALARS, &r->LogJobError));
25680 0 : break; }
25681 :
25682 0 : case kLogJobPipelineError: {
25683 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobDataPipelineFailed(ndr, NDR_SCALARS, &r->LogPipelineFailed));
25684 0 : break; }
25685 :
25686 0 : case kLogOfflineFileFull: {
25687 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeLogOfflineFileFull(ndr, NDR_SCALARS, &r->LogOfflineFileFull));
25688 0 : break; }
25689 :
25690 0 : default:
25691 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
25692 : }
25693 : }
25694 0 : if (ndr_flags & NDR_BUFFERS) {
25695 0 : if (!(ndr_flags & NDR_SCALARS)) {
25696 : /* We didn't get it above, and the token is not needed after this. */
25697 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
25698 : }
25699 0 : switch (level) {
25700 0 : case kLogJobPrinted:
25701 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobDataPrinted(ndr, NDR_BUFFERS, &r->LogJobPrinted));
25702 0 : break;
25703 :
25704 0 : case kLogJobRendered:
25705 0 : break;
25706 :
25707 0 : case kLogJobError:
25708 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobDataError(ndr, NDR_BUFFERS, &r->LogJobError));
25709 0 : break;
25710 :
25711 0 : case kLogJobPipelineError:
25712 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobDataPipelineFailed(ndr, NDR_BUFFERS, &r->LogPipelineFailed));
25713 0 : break;
25714 :
25715 0 : case kLogOfflineFileFull:
25716 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeLogOfflineFileFull(ndr, NDR_BUFFERS, &r->LogOfflineFileFull));
25717 0 : break;
25718 :
25719 0 : default:
25720 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
25721 : }
25722 : }
25723 0 : return NDR_ERR_SUCCESS;
25724 : }
25725 :
25726 0 : _PUBLIC_ void ndr_print_spoolss_BranchOfficeJobInfo(struct ndr_print *ndr, const char *name, const union spoolss_BranchOfficeJobInfo *r)
25727 : {
25728 0 : uint32_t level;
25729 0 : level = ndr_print_steal_switch_value(ndr, r);
25730 0 : ndr_print_union(ndr, name, level, "spoolss_BranchOfficeJobInfo");
25731 0 : switch (level) {
25732 0 : case kLogJobPrinted:
25733 0 : ndr_print_spoolss_BranchOfficeJobDataPrinted(ndr, "LogJobPrinted", &r->LogJobPrinted);
25734 0 : break;
25735 :
25736 0 : case kLogJobRendered:
25737 0 : ndr_print_spoolss_BranchOfficeJobDataRendered(ndr, "LogJobRendered", &r->LogJobRendered);
25738 0 : break;
25739 :
25740 0 : case kLogJobError:
25741 0 : ndr_print_spoolss_BranchOfficeJobDataError(ndr, "LogJobError", &r->LogJobError);
25742 0 : break;
25743 :
25744 0 : case kLogJobPipelineError:
25745 0 : ndr_print_spoolss_BranchOfficeJobDataPipelineFailed(ndr, "LogPipelineFailed", &r->LogPipelineFailed);
25746 0 : break;
25747 :
25748 0 : case kLogOfflineFileFull:
25749 0 : ndr_print_spoolss_BranchOfficeLogOfflineFileFull(ndr, "LogOfflineFileFull", &r->LogOfflineFileFull);
25750 0 : break;
25751 :
25752 0 : default:
25753 0 : ndr_print_bad_level(ndr, name, level);
25754 : }
25755 0 : }
25756 :
25757 0 : static enum ndr_err_code ndr_push_spoolss_BranchOfficeJobData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_BranchOfficeJobData *r)
25758 : {
25759 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
25760 0 : if (ndr_flags & NDR_SCALARS) {
25761 0 : NDR_CHECK(ndr_push_align(ndr, 8));
25762 0 : NDR_CHECK(ndr_push_EBranchOfficeJobEventType(ndr, NDR_SCALARS, r->eEventType));
25763 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->JobId));
25764 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->JobInfo, r->eEventType));
25765 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobInfo(ndr, NDR_SCALARS, &r->JobInfo));
25766 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
25767 : }
25768 0 : if (ndr_flags & NDR_BUFFERS) {
25769 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->JobInfo, r->eEventType));
25770 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobInfo(ndr, NDR_BUFFERS, &r->JobInfo));
25771 : }
25772 0 : return NDR_ERR_SUCCESS;
25773 : }
25774 :
25775 0 : static enum ndr_err_code ndr_pull_spoolss_BranchOfficeJobData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_BranchOfficeJobData *r)
25776 : {
25777 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
25778 0 : if (ndr_flags & NDR_SCALARS) {
25779 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
25780 0 : NDR_CHECK(ndr_pull_EBranchOfficeJobEventType(ndr, NDR_SCALARS, &r->eEventType));
25781 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->JobId));
25782 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->JobInfo, r->eEventType));
25783 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobInfo(ndr, NDR_SCALARS, &r->JobInfo));
25784 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
25785 : }
25786 0 : if (ndr_flags & NDR_BUFFERS) {
25787 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->JobInfo, r->eEventType));
25788 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobInfo(ndr, NDR_BUFFERS, &r->JobInfo));
25789 : }
25790 0 : return NDR_ERR_SUCCESS;
25791 : }
25792 :
25793 0 : _PUBLIC_ void ndr_print_spoolss_BranchOfficeJobData(struct ndr_print *ndr, const char *name, const struct spoolss_BranchOfficeJobData *r)
25794 : {
25795 0 : ndr_print_struct(ndr, name, "spoolss_BranchOfficeJobData");
25796 0 : if (r == NULL) { ndr_print_null(ndr); return; }
25797 0 : ndr->depth++;
25798 0 : ndr_print_EBranchOfficeJobEventType(ndr, "eEventType", r->eEventType);
25799 0 : ndr_print_uint32(ndr, "JobId", r->JobId);
25800 0 : ndr_print_set_switch_value(ndr, &r->JobInfo, r->eEventType);
25801 0 : ndr_print_spoolss_BranchOfficeJobInfo(ndr, "JobInfo", &r->JobInfo);
25802 0 : ndr->depth--;
25803 : }
25804 :
25805 8 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_BranchOfficeJobDataContainer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct spoolss_BranchOfficeJobDataContainer *r)
25806 : {
25807 0 : uint32_t cntr_JobData_0;
25808 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
25809 8 : if (ndr_flags & NDR_SCALARS) {
25810 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->cJobDataEntries));
25811 8 : NDR_CHECK(ndr_push_align(ndr, 8));
25812 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cJobDataEntries));
25813 8 : for (cntr_JobData_0 = 0; cntr_JobData_0 < (r->cJobDataEntries); cntr_JobData_0++) {
25814 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobData(ndr, NDR_SCALARS, &r->JobData[cntr_JobData_0]));
25815 : }
25816 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
25817 : }
25818 8 : if (ndr_flags & NDR_BUFFERS) {
25819 8 : for (cntr_JobData_0 = 0; cntr_JobData_0 < (r->cJobDataEntries); cntr_JobData_0++) {
25820 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobData(ndr, NDR_BUFFERS, &r->JobData[cntr_JobData_0]));
25821 : }
25822 : }
25823 8 : return NDR_ERR_SUCCESS;
25824 : }
25825 :
25826 8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_BranchOfficeJobDataContainer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct spoolss_BranchOfficeJobDataContainer *r)
25827 : {
25828 8 : uint32_t size_JobData_0 = 0;
25829 0 : uint32_t cntr_JobData_0;
25830 8 : TALLOC_CTX *_mem_save_JobData_0 = NULL;
25831 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
25832 8 : if (ndr_flags & NDR_SCALARS) {
25833 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->JobData));
25834 8 : NDR_CHECK(ndr_pull_align(ndr, 8));
25835 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cJobDataEntries));
25836 8 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->JobData, &size_JobData_0));
25837 8 : NDR_PULL_ALLOC_N(ndr, r->JobData, size_JobData_0);
25838 8 : _mem_save_JobData_0 = NDR_PULL_GET_MEM_CTX(ndr);
25839 8 : NDR_PULL_SET_MEM_CTX(ndr, r->JobData, 0);
25840 8 : for (cntr_JobData_0 = 0; cntr_JobData_0 < (size_JobData_0); cntr_JobData_0++) {
25841 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobData(ndr, NDR_SCALARS, &r->JobData[cntr_JobData_0]));
25842 : }
25843 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_JobData_0, 0);
25844 8 : if (r->JobData) {
25845 8 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->JobData, r->cJobDataEntries));
25846 : }
25847 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
25848 : }
25849 8 : if (ndr_flags & NDR_BUFFERS) {
25850 8 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->JobData, &size_JobData_0));
25851 8 : _mem_save_JobData_0 = NDR_PULL_GET_MEM_CTX(ndr);
25852 8 : NDR_PULL_SET_MEM_CTX(ndr, r->JobData, 0);
25853 8 : for (cntr_JobData_0 = 0; cntr_JobData_0 < (size_JobData_0); cntr_JobData_0++) {
25854 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobData(ndr, NDR_BUFFERS, &r->JobData[cntr_JobData_0]));
25855 : }
25856 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_JobData_0, 0);
25857 8 : for (cntr_JobData_0 = 0; cntr_JobData_0 < (size_JobData_0); cntr_JobData_0++) {
25858 : }
25859 : }
25860 8 : return NDR_ERR_SUCCESS;
25861 : }
25862 :
25863 0 : static void ndr_print_flags_spoolss_BranchOfficeJobDataContainer(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct spoolss_BranchOfficeJobDataContainer *r)
25864 : {
25865 0 : ndr_print_spoolss_BranchOfficeJobDataContainer(ndr, name, r);
25866 0 : }
25867 :
25868 0 : _PUBLIC_ void ndr_print_spoolss_BranchOfficeJobDataContainer(struct ndr_print *ndr, const char *name, const struct spoolss_BranchOfficeJobDataContainer *r)
25869 : {
25870 0 : uint32_t cntr_JobData_0;
25871 0 : ndr_print_struct(ndr, name, "spoolss_BranchOfficeJobDataContainer");
25872 0 : if (r == NULL) { ndr_print_null(ndr); return; }
25873 0 : ndr->depth++;
25874 0 : ndr_print_uint32(ndr, "cJobDataEntries", r->cJobDataEntries);
25875 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "JobData", (uint32_t)(r->cJobDataEntries));
25876 0 : ndr->depth++;
25877 0 : for (cntr_JobData_0 = 0; cntr_JobData_0 < (r->cJobDataEntries); cntr_JobData_0++) {
25878 0 : ndr_print_spoolss_BranchOfficeJobData(ndr, "JobData", &r->JobData[cntr_JobData_0]);
25879 : }
25880 0 : ndr->depth--;
25881 0 : ndr->depth--;
25882 : }
25883 :
25884 360 : _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrinters(struct ndr_push *ndr, ndr_flags_type flags, const struct _spoolss_EnumPrinters *r)
25885 : {
25886 360 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
25887 360 : if (flags & NDR_IN) {
25888 180 : NDR_CHECK(ndr_push_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, r->in.flags));
25889 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
25890 180 : if (r->in.server) {
25891 120 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
25892 120 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
25893 120 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
25894 120 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25895 : }
25896 180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
25897 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
25898 180 : if (r->in.buffer) {
25899 92 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
25900 : }
25901 180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
25902 : }
25903 360 : if (flags & NDR_OUT) {
25904 180 : if (r->out.needed == NULL) {
25905 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25906 : }
25907 180 : if (r->out.count == NULL) {
25908 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25909 : }
25910 180 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
25911 180 : if (r->out.info) {
25912 92 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
25913 : }
25914 180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
25915 180 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
25916 180 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25917 : }
25918 360 : return NDR_ERR_SUCCESS;
25919 : }
25920 :
25921 360 : _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinters(struct ndr_pull *ndr, ndr_flags_type flags, struct _spoolss_EnumPrinters *r)
25922 : {
25923 0 : uint32_t _ptr_server;
25924 360 : uint32_t size_server_1 = 0;
25925 360 : uint32_t length_server_1 = 0;
25926 0 : uint32_t _ptr_buffer;
25927 0 : uint32_t _ptr_info;
25928 360 : TALLOC_CTX *_mem_save_server_0 = NULL;
25929 360 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
25930 360 : TALLOC_CTX *_mem_save_info_0 = NULL;
25931 360 : TALLOC_CTX *_mem_save_needed_0 = NULL;
25932 360 : TALLOC_CTX *_mem_save_count_0 = NULL;
25933 360 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
25934 360 : if (flags & NDR_IN) {
25935 180 : NDR_ZERO_STRUCT(r->out);
25936 :
25937 180 : NDR_CHECK(ndr_pull_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, &r->in.flags));
25938 180 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
25939 180 : if (_ptr_server) {
25940 120 : NDR_PULL_ALLOC(ndr, r->in.server);
25941 : } else {
25942 60 : r->in.server = NULL;
25943 : }
25944 180 : if (r->in.server) {
25945 120 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
25946 120 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
25947 120 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
25948 120 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
25949 120 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
25950 120 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
25951 120 : if (length_server_1 > size_server_1) {
25952 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
25953 : }
25954 120 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
25955 120 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
25956 120 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
25957 : }
25958 180 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
25959 180 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
25960 180 : if (_ptr_buffer) {
25961 92 : NDR_PULL_ALLOC(ndr, r->in.buffer);
25962 : } else {
25963 88 : r->in.buffer = NULL;
25964 : }
25965 180 : if (r->in.buffer) {
25966 92 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
25967 92 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
25968 92 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
25969 92 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
25970 : }
25971 180 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
25972 180 : NDR_PULL_ALLOC(ndr, r->out.needed);
25973 180 : NDR_ZERO_STRUCTP(r->out.needed);
25974 180 : NDR_PULL_ALLOC(ndr, r->out.count);
25975 180 : NDR_ZERO_STRUCTP(r->out.count);
25976 : }
25977 360 : if (flags & NDR_OUT) {
25978 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
25979 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
25980 180 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
25981 180 : if (_ptr_info) {
25982 92 : NDR_PULL_ALLOC(ndr, r->out.info);
25983 : } else {
25984 88 : r->out.info = NULL;
25985 : }
25986 180 : if (r->out.info) {
25987 92 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
25988 92 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
25989 92 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
25990 92 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
25991 : }
25992 180 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25993 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
25994 : }
25995 180 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
25996 180 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
25997 180 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
25998 180 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
25999 180 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26000 0 : NDR_PULL_ALLOC(ndr, r->out.count);
26001 : }
26002 180 : _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
26003 180 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
26004 180 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
26005 180 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
26006 180 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26007 : }
26008 360 : return NDR_ERR_SUCCESS;
26009 : }
26010 :
26011 272 : _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrinters(struct ndr_push *ndr, ndr_flags_type flags, const struct __spoolss_EnumPrinters *r)
26012 : {
26013 0 : uint32_t cntr_info_0;
26014 272 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
26015 272 : if (flags & NDR_IN) {
26016 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
26017 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
26018 : }
26019 272 : if (flags & NDR_OUT) {
26020 1712 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
26021 1440 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
26022 1440 : NDR_CHECK(ndr_push_spoolss_PrinterInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
26023 : }
26024 1712 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
26025 1440 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
26026 1440 : NDR_CHECK(ndr_push_spoolss_PrinterInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
26027 : }
26028 : }
26029 272 : return NDR_ERR_SUCCESS;
26030 : }
26031 :
26032 84 : _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrinters(struct ndr_pull *ndr, ndr_flags_type flags, struct __spoolss_EnumPrinters *r)
26033 : {
26034 84 : uint32_t size_info_0 = 0;
26035 0 : uint32_t cntr_info_0;
26036 84 : TALLOC_CTX *_mem_save_info_0 = NULL;
26037 84 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
26038 84 : if (flags & NDR_IN) {
26039 0 : NDR_ZERO_STRUCT(r->out);
26040 :
26041 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
26042 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
26043 : }
26044 84 : if (flags & NDR_OUT) {
26045 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
26046 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
26047 84 : size_info_0 = r->in.count;
26048 84 : NDR_PULL_ALLOC_N(ndr, r->out.info, size_info_0);
26049 84 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
26050 84 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
26051 544 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
26052 460 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
26053 460 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
26054 : }
26055 544 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
26056 460 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
26057 460 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
26058 : }
26059 84 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
26060 544 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
26061 : }
26062 : }
26063 84 : return NDR_ERR_SUCCESS;
26064 : }
26065 :
26066 0 : _PUBLIC_ void ndr_print_spoolss_EnumPrinters(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumPrinters *r)
26067 : {
26068 0 : uint32_t cntr_info_2;
26069 0 : ndr_print_struct(ndr, name, "spoolss_EnumPrinters");
26070 0 : if (r == NULL) { ndr_print_null(ndr); return; }
26071 0 : ndr->depth++;
26072 0 : if (flags & NDR_SET_VALUES) {
26073 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26074 : }
26075 0 : if (flags & NDR_IN) {
26076 0 : ndr_print_struct(ndr, "in", "spoolss_EnumPrinters");
26077 0 : ndr->depth++;
26078 0 : ndr_print_spoolss_EnumPrinterFlags(ndr, "flags", r->in.flags);
26079 0 : ndr_print_ptr(ndr, "server", r->in.server);
26080 0 : ndr->depth++;
26081 0 : if (r->in.server) {
26082 0 : ndr_print_string(ndr, "server", r->in.server);
26083 : }
26084 0 : ndr->depth--;
26085 0 : ndr_print_uint32(ndr, "level", r->in.level);
26086 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
26087 0 : ndr->depth++;
26088 0 : if (r->in.buffer) {
26089 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
26090 : }
26091 0 : ndr->depth--;
26092 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
26093 0 : ndr->depth--;
26094 : }
26095 0 : if (flags & NDR_OUT) {
26096 0 : ndr_print_struct(ndr, "out", "spoolss_EnumPrinters");
26097 0 : ndr->depth++;
26098 0 : ndr_print_ptr(ndr, "count", r->out.count);
26099 0 : ndr->depth++;
26100 0 : ndr_print_uint32(ndr, "count", *r->out.count);
26101 0 : ndr->depth--;
26102 0 : ndr_print_ptr(ndr, "info", r->out.info);
26103 0 : ndr->depth++;
26104 0 : ndr_print_ptr(ndr, "info", *r->out.info);
26105 0 : ndr->depth++;
26106 0 : if (*r->out.info) {
26107 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(*r->out.count));
26108 0 : ndr->depth++;
26109 0 : for (cntr_info_2 = 0; cntr_info_2 < (*r->out.count); cntr_info_2++) {
26110 0 : ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
26111 0 : ndr_print_spoolss_PrinterInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
26112 : }
26113 0 : ndr->depth--;
26114 : }
26115 0 : ndr->depth--;
26116 0 : ndr->depth--;
26117 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
26118 0 : ndr->depth++;
26119 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
26120 0 : ndr->depth--;
26121 0 : ndr_print_WERROR(ndr, "result", r->out.result);
26122 0 : ndr->depth--;
26123 : }
26124 0 : ndr->depth--;
26125 : }
26126 :
26127 388 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OpenPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_OpenPrinter *r)
26128 : {
26129 388 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
26130 388 : if (flags & NDR_IN) {
26131 194 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.printername));
26132 194 : if (r->in.printername) {
26133 194 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
26134 194 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
26135 194 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
26136 194 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.printername, ndr_charset_length(r->in.printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
26137 : }
26138 194 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.datatype));
26139 194 : if (r->in.datatype) {
26140 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.datatype, CH_UTF16)));
26141 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
26142 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.datatype, CH_UTF16)));
26143 28 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.datatype, ndr_charset_length(r->in.datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
26144 : }
26145 194 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.devmode_ctr));
26146 194 : NDR_CHECK(ndr_push_spoolss_AccessRights(ndr, NDR_SCALARS, r->in.access_mask));
26147 : }
26148 388 : if (flags & NDR_OUT) {
26149 194 : if (r->out.handle == NULL) {
26150 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26151 : }
26152 194 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
26153 194 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26154 : }
26155 388 : return NDR_ERR_SUCCESS;
26156 : }
26157 :
26158 388 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OpenPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_OpenPrinter *r)
26159 : {
26160 0 : uint32_t _ptr_printername;
26161 388 : uint32_t size_printername_1 = 0;
26162 388 : uint32_t length_printername_1 = 0;
26163 0 : uint32_t _ptr_datatype;
26164 388 : uint32_t size_datatype_1 = 0;
26165 388 : uint32_t length_datatype_1 = 0;
26166 388 : TALLOC_CTX *_mem_save_printername_0 = NULL;
26167 388 : TALLOC_CTX *_mem_save_datatype_0 = NULL;
26168 388 : TALLOC_CTX *_mem_save_handle_0 = NULL;
26169 388 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
26170 388 : if (flags & NDR_IN) {
26171 194 : NDR_ZERO_STRUCT(r->out);
26172 :
26173 194 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
26174 194 : if (_ptr_printername) {
26175 194 : NDR_PULL_ALLOC(ndr, r->in.printername);
26176 : } else {
26177 0 : r->in.printername = NULL;
26178 : }
26179 194 : if (r->in.printername) {
26180 194 : _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
26181 194 : NDR_PULL_SET_MEM_CTX(ndr, r->in.printername, 0);
26182 194 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.printername));
26183 194 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.printername));
26184 194 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.printername, &size_printername_1));
26185 194 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.printername, &length_printername_1));
26186 194 : if (length_printername_1 > size_printername_1) {
26187 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printername_1, length_printername_1);
26188 : }
26189 194 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printername_1, sizeof(uint16_t)));
26190 194 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.printername, length_printername_1, sizeof(uint16_t), CH_UTF16));
26191 194 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
26192 : }
26193 194 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
26194 194 : if (_ptr_datatype) {
26195 28 : NDR_PULL_ALLOC(ndr, r->in.datatype);
26196 : } else {
26197 166 : r->in.datatype = NULL;
26198 : }
26199 194 : if (r->in.datatype) {
26200 28 : _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
26201 28 : NDR_PULL_SET_MEM_CTX(ndr, r->in.datatype, 0);
26202 28 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.datatype));
26203 28 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.datatype));
26204 28 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.datatype, &size_datatype_1));
26205 28 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.datatype, &length_datatype_1));
26206 28 : if (length_datatype_1 > size_datatype_1) {
26207 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_datatype_1, length_datatype_1);
26208 : }
26209 28 : NDR_CHECK(ndr_check_string_terminator(ndr, length_datatype_1, sizeof(uint16_t)));
26210 28 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.datatype, length_datatype_1, sizeof(uint16_t), CH_UTF16));
26211 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
26212 : }
26213 194 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.devmode_ctr));
26214 194 : NDR_CHECK(ndr_pull_spoolss_AccessRights(ndr, NDR_SCALARS, &r->in.access_mask));
26215 194 : NDR_PULL_ALLOC(ndr, r->out.handle);
26216 194 : NDR_ZERO_STRUCTP(r->out.handle);
26217 : }
26218 388 : if (flags & NDR_OUT) {
26219 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
26220 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
26221 194 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26222 28 : NDR_PULL_ALLOC(ndr, r->out.handle);
26223 : }
26224 194 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26225 194 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
26226 194 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
26227 194 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26228 194 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26229 : }
26230 388 : return NDR_ERR_SUCCESS;
26231 : }
26232 :
26233 0 : _PUBLIC_ void ndr_print_spoolss_OpenPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_OpenPrinter *r)
26234 : {
26235 0 : ndr_print_struct(ndr, name, "spoolss_OpenPrinter");
26236 0 : if (r == NULL) { ndr_print_null(ndr); return; }
26237 0 : ndr->depth++;
26238 0 : if (flags & NDR_SET_VALUES) {
26239 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26240 : }
26241 0 : if (flags & NDR_IN) {
26242 0 : ndr_print_struct(ndr, "in", "spoolss_OpenPrinter");
26243 0 : ndr->depth++;
26244 0 : ndr_print_ptr(ndr, "printername", r->in.printername);
26245 0 : ndr->depth++;
26246 0 : if (r->in.printername) {
26247 0 : ndr_print_string(ndr, "printername", r->in.printername);
26248 : }
26249 0 : ndr->depth--;
26250 0 : ndr_print_ptr(ndr, "datatype", r->in.datatype);
26251 0 : ndr->depth++;
26252 0 : if (r->in.datatype) {
26253 0 : ndr_print_string(ndr, "datatype", r->in.datatype);
26254 : }
26255 0 : ndr->depth--;
26256 0 : ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", &r->in.devmode_ctr);
26257 0 : ndr_print_spoolss_AccessRights(ndr, "access_mask", r->in.access_mask);
26258 0 : ndr->depth--;
26259 : }
26260 0 : if (flags & NDR_OUT) {
26261 0 : ndr_print_struct(ndr, "out", "spoolss_OpenPrinter");
26262 0 : ndr->depth++;
26263 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
26264 0 : ndr->depth++;
26265 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
26266 0 : ndr->depth--;
26267 0 : ndr_print_WERROR(ndr, "result", r->out.result);
26268 0 : ndr->depth--;
26269 : }
26270 0 : ndr->depth--;
26271 : }
26272 :
26273 1280 : static enum ndr_err_code ndr_push_spoolss_SetJob(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_SetJob *r)
26274 : {
26275 1280 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
26276 1280 : if (flags & NDR_IN) {
26277 640 : if (r->in.handle == NULL) {
26278 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26279 : }
26280 640 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26281 640 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.job_id));
26282 640 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ctr));
26283 640 : if (r->in.ctr) {
26284 32 : NDR_CHECK(ndr_push_spoolss_JobInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
26285 : }
26286 640 : NDR_CHECK(ndr_push_spoolss_JobControl(ndr, NDR_SCALARS, r->in.command));
26287 : }
26288 1280 : if (flags & NDR_OUT) {
26289 640 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26290 : }
26291 1280 : return NDR_ERR_SUCCESS;
26292 : }
26293 :
26294 1280 : static enum ndr_err_code ndr_pull_spoolss_SetJob(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_SetJob *r)
26295 : {
26296 0 : uint32_t _ptr_ctr;
26297 1280 : TALLOC_CTX *_mem_save_handle_0 = NULL;
26298 1280 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
26299 1280 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
26300 1280 : if (flags & NDR_IN) {
26301 640 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26302 640 : NDR_PULL_ALLOC(ndr, r->in.handle);
26303 : }
26304 640 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26305 640 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
26306 640 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26307 640 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26308 640 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.job_id));
26309 640 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
26310 640 : if (_ptr_ctr) {
26311 32 : NDR_PULL_ALLOC(ndr, r->in.ctr);
26312 : } else {
26313 608 : r->in.ctr = NULL;
26314 : }
26315 640 : if (r->in.ctr) {
26316 32 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
26317 32 : NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, 0);
26318 32 : NDR_CHECK(ndr_pull_spoolss_JobInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
26319 32 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, 0);
26320 : }
26321 640 : NDR_CHECK(ndr_pull_spoolss_JobControl(ndr, NDR_SCALARS, &r->in.command));
26322 : }
26323 1280 : if (flags & NDR_OUT) {
26324 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
26325 : if (r->in.handle == NULL) {
26326 : NDR_PULL_ALLOC(ndr, r->in.handle);
26327 : NDR_ZERO_STRUCTP(r->in.handle);
26328 : }
26329 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
26330 640 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26331 : }
26332 1280 : return NDR_ERR_SUCCESS;
26333 : }
26334 :
26335 0 : _PUBLIC_ void ndr_print_spoolss_SetJob(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_SetJob *r)
26336 : {
26337 0 : ndr_print_struct(ndr, name, "spoolss_SetJob");
26338 0 : if (r == NULL) { ndr_print_null(ndr); return; }
26339 0 : ndr->depth++;
26340 0 : if (flags & NDR_SET_VALUES) {
26341 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26342 : }
26343 0 : if (flags & NDR_IN) {
26344 0 : ndr_print_struct(ndr, "in", "spoolss_SetJob");
26345 0 : ndr->depth++;
26346 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
26347 0 : ndr->depth++;
26348 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
26349 0 : ndr->depth--;
26350 0 : ndr_print_uint32(ndr, "job_id", r->in.job_id);
26351 0 : ndr_print_ptr(ndr, "ctr", r->in.ctr);
26352 0 : ndr->depth++;
26353 0 : if (r->in.ctr) {
26354 0 : ndr_print_spoolss_JobInfoContainer(ndr, "ctr", r->in.ctr);
26355 : }
26356 0 : ndr->depth--;
26357 0 : ndr_print_spoolss_JobControl(ndr, "command", r->in.command);
26358 0 : ndr->depth--;
26359 : }
26360 0 : if (flags & NDR_OUT) {
26361 0 : ndr_print_struct(ndr, "out", "spoolss_SetJob");
26362 0 : ndr->depth++;
26363 0 : ndr_print_WERROR(ndr, "result", r->out.result);
26364 0 : ndr->depth--;
26365 : }
26366 0 : ndr->depth--;
26367 : }
26368 :
26369 4096 : static enum ndr_err_code ndr_push_spoolss_GetJob(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetJob *r)
26370 : {
26371 4096 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
26372 4096 : if (flags & NDR_IN) {
26373 2048 : if (r->in.handle == NULL) {
26374 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26375 : }
26376 2048 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26377 2048 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.job_id));
26378 2048 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
26379 2048 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
26380 2048 : if (r->in.buffer) {
26381 64 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
26382 : }
26383 2048 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
26384 : }
26385 4096 : if (flags & NDR_OUT) {
26386 2048 : if (r->out.needed == NULL) {
26387 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26388 : }
26389 2048 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
26390 2048 : if (r->out.info) {
26391 : {
26392 0 : struct ndr_push *_ndr_info;
26393 64 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
26394 64 : NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
26395 64 : NDR_CHECK(ndr_push_spoolss_JobInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
26396 64 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
26397 : }
26398 : }
26399 2048 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
26400 2048 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26401 : }
26402 4096 : return NDR_ERR_SUCCESS;
26403 : }
26404 :
26405 4096 : static enum ndr_err_code ndr_pull_spoolss_GetJob(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetJob *r)
26406 : {
26407 0 : uint32_t _ptr_buffer;
26408 0 : uint32_t _ptr_info;
26409 4096 : TALLOC_CTX *_mem_save_handle_0 = NULL;
26410 4096 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
26411 4096 : TALLOC_CTX *_mem_save_info_0 = NULL;
26412 4096 : TALLOC_CTX *_mem_save_needed_0 = NULL;
26413 4096 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
26414 4096 : if (flags & NDR_IN) {
26415 2048 : NDR_ZERO_STRUCT(r->out);
26416 :
26417 2048 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26418 2048 : NDR_PULL_ALLOC(ndr, r->in.handle);
26419 : }
26420 2048 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26421 2048 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
26422 2048 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26423 2048 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26424 2048 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.job_id));
26425 2048 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
26426 2048 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
26427 2048 : if (_ptr_buffer) {
26428 64 : NDR_PULL_ALLOC(ndr, r->in.buffer);
26429 : } else {
26430 1984 : r->in.buffer = NULL;
26431 : }
26432 2048 : if (r->in.buffer) {
26433 64 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
26434 64 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
26435 64 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
26436 64 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
26437 : }
26438 2048 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
26439 2048 : NDR_PULL_ALLOC(ndr, r->out.needed);
26440 2048 : NDR_ZERO_STRUCTP(r->out.needed);
26441 : }
26442 4096 : if (flags & NDR_OUT) {
26443 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
26444 : if (r->in.handle == NULL) {
26445 : NDR_PULL_ALLOC(ndr, r->in.handle);
26446 : NDR_ZERO_STRUCTP(r->in.handle);
26447 : }
26448 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
26449 2048 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
26450 2048 : if (_ptr_info) {
26451 64 : NDR_PULL_ALLOC(ndr, r->out.info);
26452 : } else {
26453 1984 : r->out.info = NULL;
26454 : }
26455 2048 : if (r->out.info) {
26456 64 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
26457 64 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
26458 : {
26459 0 : struct ndr_pull *_ndr_info;
26460 64 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
26461 64 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
26462 64 : NDR_CHECK(ndr_pull_spoolss_JobInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
26463 64 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
26464 : }
26465 64 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
26466 : }
26467 2048 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26468 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
26469 : }
26470 2048 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
26471 2048 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
26472 2048 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
26473 2048 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
26474 2048 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26475 : }
26476 4096 : return NDR_ERR_SUCCESS;
26477 : }
26478 :
26479 0 : _PUBLIC_ void ndr_print_spoolss_GetJob(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetJob *r)
26480 : {
26481 0 : ndr_print_struct(ndr, name, "spoolss_GetJob");
26482 0 : if (r == NULL) { ndr_print_null(ndr); return; }
26483 0 : ndr->depth++;
26484 0 : if (flags & NDR_SET_VALUES) {
26485 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26486 : }
26487 0 : if (flags & NDR_IN) {
26488 0 : ndr_print_struct(ndr, "in", "spoolss_GetJob");
26489 0 : ndr->depth++;
26490 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
26491 0 : ndr->depth++;
26492 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
26493 0 : ndr->depth--;
26494 0 : ndr_print_uint32(ndr, "job_id", r->in.job_id);
26495 0 : ndr_print_uint32(ndr, "level", r->in.level);
26496 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
26497 0 : ndr->depth++;
26498 0 : if (r->in.buffer) {
26499 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
26500 : }
26501 0 : ndr->depth--;
26502 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
26503 0 : ndr->depth--;
26504 : }
26505 0 : if (flags & NDR_OUT) {
26506 0 : ndr_print_struct(ndr, "out", "spoolss_GetJob");
26507 0 : ndr->depth++;
26508 0 : ndr_print_ptr(ndr, "info", r->out.info);
26509 0 : ndr->depth++;
26510 0 : if (r->out.info) {
26511 0 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
26512 0 : ndr_print_spoolss_JobInfo(ndr, "info", r->out.info);
26513 : }
26514 0 : ndr->depth--;
26515 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
26516 0 : ndr->depth++;
26517 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
26518 0 : ndr->depth--;
26519 0 : ndr_print_WERROR(ndr, "result", r->out.result);
26520 0 : ndr->depth--;
26521 : }
26522 0 : ndr->depth--;
26523 : }
26524 :
26525 192 : _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumJobs(struct ndr_push *ndr, ndr_flags_type flags, const struct _spoolss_EnumJobs *r)
26526 : {
26527 192 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
26528 192 : if (flags & NDR_IN) {
26529 96 : if (r->in.handle == NULL) {
26530 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26531 : }
26532 96 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26533 96 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.firstjob));
26534 96 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.numjobs));
26535 96 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
26536 96 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
26537 96 : if (r->in.buffer) {
26538 22 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
26539 : }
26540 96 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
26541 : }
26542 192 : if (flags & NDR_OUT) {
26543 96 : if (r->out.needed == NULL) {
26544 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26545 : }
26546 96 : if (r->out.count == NULL) {
26547 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26548 : }
26549 96 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
26550 96 : if (r->out.info) {
26551 22 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
26552 : }
26553 96 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
26554 96 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
26555 96 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26556 : }
26557 192 : return NDR_ERR_SUCCESS;
26558 : }
26559 :
26560 192 : _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumJobs(struct ndr_pull *ndr, ndr_flags_type flags, struct _spoolss_EnumJobs *r)
26561 : {
26562 0 : uint32_t _ptr_buffer;
26563 0 : uint32_t _ptr_info;
26564 192 : TALLOC_CTX *_mem_save_handle_0 = NULL;
26565 192 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
26566 192 : TALLOC_CTX *_mem_save_info_0 = NULL;
26567 192 : TALLOC_CTX *_mem_save_needed_0 = NULL;
26568 192 : TALLOC_CTX *_mem_save_count_0 = NULL;
26569 192 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
26570 192 : if (flags & NDR_IN) {
26571 96 : NDR_ZERO_STRUCT(r->out);
26572 :
26573 96 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26574 96 : NDR_PULL_ALLOC(ndr, r->in.handle);
26575 : }
26576 96 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26577 96 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
26578 96 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26579 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26580 96 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.firstjob));
26581 96 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.numjobs));
26582 96 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
26583 96 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
26584 96 : if (_ptr_buffer) {
26585 22 : NDR_PULL_ALLOC(ndr, r->in.buffer);
26586 : } else {
26587 74 : r->in.buffer = NULL;
26588 : }
26589 96 : if (r->in.buffer) {
26590 22 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
26591 22 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
26592 22 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
26593 22 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
26594 : }
26595 96 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
26596 96 : NDR_PULL_ALLOC(ndr, r->out.needed);
26597 96 : NDR_ZERO_STRUCTP(r->out.needed);
26598 96 : NDR_PULL_ALLOC(ndr, r->out.count);
26599 96 : NDR_ZERO_STRUCTP(r->out.count);
26600 : }
26601 192 : if (flags & NDR_OUT) {
26602 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
26603 : if (r->in.handle == NULL) {
26604 : NDR_PULL_ALLOC(ndr, r->in.handle);
26605 : NDR_ZERO_STRUCTP(r->in.handle);
26606 : }
26607 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
26608 96 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
26609 96 : if (_ptr_info) {
26610 22 : NDR_PULL_ALLOC(ndr, r->out.info);
26611 : } else {
26612 74 : r->out.info = NULL;
26613 : }
26614 96 : if (r->out.info) {
26615 22 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
26616 22 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
26617 22 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
26618 22 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
26619 : }
26620 96 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26621 8 : NDR_PULL_ALLOC(ndr, r->out.needed);
26622 : }
26623 96 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
26624 96 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
26625 96 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
26626 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
26627 96 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26628 8 : NDR_PULL_ALLOC(ndr, r->out.count);
26629 : }
26630 96 : _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
26631 96 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
26632 96 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
26633 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
26634 96 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26635 : }
26636 192 : return NDR_ERR_SUCCESS;
26637 : }
26638 :
26639 58 : _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumJobs(struct ndr_push *ndr, ndr_flags_type flags, const struct __spoolss_EnumJobs *r)
26640 : {
26641 0 : uint32_t cntr_info_0;
26642 58 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
26643 58 : if (flags & NDR_IN) {
26644 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
26645 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
26646 : }
26647 58 : if (flags & NDR_OUT) {
26648 448 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
26649 390 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
26650 390 : NDR_CHECK(ndr_push_spoolss_JobInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
26651 : }
26652 448 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
26653 390 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
26654 390 : NDR_CHECK(ndr_push_spoolss_JobInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
26655 : }
26656 : }
26657 58 : return NDR_ERR_SUCCESS;
26658 : }
26659 :
26660 22 : _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumJobs(struct ndr_pull *ndr, ndr_flags_type flags, struct __spoolss_EnumJobs *r)
26661 : {
26662 22 : uint32_t size_info_0 = 0;
26663 0 : uint32_t cntr_info_0;
26664 22 : TALLOC_CTX *_mem_save_info_0 = NULL;
26665 22 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
26666 22 : if (flags & NDR_IN) {
26667 0 : NDR_ZERO_STRUCT(r->out);
26668 :
26669 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
26670 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
26671 : }
26672 22 : if (flags & NDR_OUT) {
26673 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
26674 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
26675 22 : size_info_0 = r->in.count;
26676 22 : NDR_PULL_ALLOC_N(ndr, r->out.info, size_info_0);
26677 22 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
26678 22 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
26679 152 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
26680 130 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
26681 130 : NDR_CHECK(ndr_pull_spoolss_JobInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
26682 : }
26683 152 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
26684 130 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
26685 130 : NDR_CHECK(ndr_pull_spoolss_JobInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
26686 : }
26687 22 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
26688 152 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
26689 : }
26690 : }
26691 22 : return NDR_ERR_SUCCESS;
26692 : }
26693 :
26694 0 : _PUBLIC_ void ndr_print_spoolss_EnumJobs(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumJobs *r)
26695 : {
26696 0 : uint32_t cntr_info_2;
26697 0 : ndr_print_struct(ndr, name, "spoolss_EnumJobs");
26698 0 : if (r == NULL) { ndr_print_null(ndr); return; }
26699 0 : ndr->depth++;
26700 0 : if (flags & NDR_SET_VALUES) {
26701 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26702 : }
26703 0 : if (flags & NDR_IN) {
26704 0 : ndr_print_struct(ndr, "in", "spoolss_EnumJobs");
26705 0 : ndr->depth++;
26706 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
26707 0 : ndr->depth++;
26708 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
26709 0 : ndr->depth--;
26710 0 : ndr_print_uint32(ndr, "firstjob", r->in.firstjob);
26711 0 : ndr_print_uint32(ndr, "numjobs", r->in.numjobs);
26712 0 : ndr_print_uint32(ndr, "level", r->in.level);
26713 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
26714 0 : ndr->depth++;
26715 0 : if (r->in.buffer) {
26716 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
26717 : }
26718 0 : ndr->depth--;
26719 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
26720 0 : ndr->depth--;
26721 : }
26722 0 : if (flags & NDR_OUT) {
26723 0 : ndr_print_struct(ndr, "out", "spoolss_EnumJobs");
26724 0 : ndr->depth++;
26725 0 : ndr_print_ptr(ndr, "count", r->out.count);
26726 0 : ndr->depth++;
26727 0 : ndr_print_uint32(ndr, "count", *r->out.count);
26728 0 : ndr->depth--;
26729 0 : ndr_print_ptr(ndr, "info", r->out.info);
26730 0 : ndr->depth++;
26731 0 : ndr_print_ptr(ndr, "info", *r->out.info);
26732 0 : ndr->depth++;
26733 0 : if (*r->out.info) {
26734 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(*r->out.count));
26735 0 : ndr->depth++;
26736 0 : for (cntr_info_2 = 0; cntr_info_2 < (*r->out.count); cntr_info_2++) {
26737 0 : ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
26738 0 : ndr_print_spoolss_JobInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
26739 : }
26740 0 : ndr->depth--;
26741 : }
26742 0 : ndr->depth--;
26743 0 : ndr->depth--;
26744 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
26745 0 : ndr->depth++;
26746 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
26747 0 : ndr->depth--;
26748 0 : ndr_print_WERROR(ndr, "result", r->out.result);
26749 0 : ndr->depth--;
26750 : }
26751 0 : ndr->depth--;
26752 : }
26753 :
26754 144 : static enum ndr_err_code ndr_push_spoolss_AddPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddPrinter *r)
26755 : {
26756 144 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
26757 144 : if (flags & NDR_IN) {
26758 72 : if (r->in.info_ctr == NULL) {
26759 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26760 : }
26761 72 : if (r->in.devmode_ctr == NULL) {
26762 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26763 : }
26764 72 : if (r->in.secdesc_ctr == NULL) {
26765 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26766 : }
26767 72 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
26768 72 : if (r->in.server) {
26769 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
26770 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
26771 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
26772 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
26773 : }
26774 72 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
26775 72 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
26776 72 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
26777 : }
26778 144 : if (flags & NDR_OUT) {
26779 72 : if (r->out.handle == NULL) {
26780 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26781 : }
26782 72 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
26783 72 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26784 : }
26785 144 : return NDR_ERR_SUCCESS;
26786 : }
26787 :
26788 144 : static enum ndr_err_code ndr_pull_spoolss_AddPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddPrinter *r)
26789 : {
26790 0 : uint32_t _ptr_server;
26791 144 : uint32_t size_server_1 = 0;
26792 144 : uint32_t length_server_1 = 0;
26793 144 : TALLOC_CTX *_mem_save_server_0 = NULL;
26794 144 : TALLOC_CTX *_mem_save_info_ctr_0 = NULL;
26795 144 : TALLOC_CTX *_mem_save_devmode_ctr_0 = NULL;
26796 144 : TALLOC_CTX *_mem_save_secdesc_ctr_0 = NULL;
26797 144 : TALLOC_CTX *_mem_save_handle_0 = NULL;
26798 144 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
26799 144 : if (flags & NDR_IN) {
26800 72 : NDR_ZERO_STRUCT(r->out);
26801 :
26802 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
26803 72 : if (_ptr_server) {
26804 0 : NDR_PULL_ALLOC(ndr, r->in.server);
26805 : } else {
26806 72 : r->in.server = NULL;
26807 : }
26808 72 : if (r->in.server) {
26809 0 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
26810 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
26811 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
26812 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
26813 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
26814 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
26815 0 : if (length_server_1 > size_server_1) {
26816 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
26817 : }
26818 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
26819 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
26820 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
26821 : }
26822 72 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26823 72 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
26824 : }
26825 72 : _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
26826 72 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
26827 72 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
26828 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
26829 72 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26830 72 : NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
26831 : }
26832 72 : _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
26833 72 : NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC);
26834 72 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
26835 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC);
26836 72 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26837 72 : NDR_PULL_ALLOC(ndr, r->in.secdesc_ctr);
26838 : }
26839 72 : _mem_save_secdesc_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
26840 72 : NDR_PULL_SET_MEM_CTX(ndr, r->in.secdesc_ctr, LIBNDR_FLAG_REF_ALLOC);
26841 72 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
26842 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_ctr_0, LIBNDR_FLAG_REF_ALLOC);
26843 72 : NDR_PULL_ALLOC(ndr, r->out.handle);
26844 72 : NDR_ZERO_STRUCTP(r->out.handle);
26845 : }
26846 144 : if (flags & NDR_OUT) {
26847 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
26848 : if (r->in.info_ctr == NULL) {
26849 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
26850 : NDR_ZERO_STRUCTP(r->in.info_ctr);
26851 : }
26852 : if (r->in.devmode_ctr == NULL) {
26853 : NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
26854 : NDR_ZERO_STRUCTP(r->in.devmode_ctr);
26855 : }
26856 : if (r->in.secdesc_ctr == NULL) {
26857 : NDR_PULL_ALLOC(ndr, r->in.secdesc_ctr);
26858 : NDR_ZERO_STRUCTP(r->in.secdesc_ctr);
26859 : }
26860 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
26861 72 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26862 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
26863 : }
26864 72 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26865 72 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
26866 72 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
26867 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26868 72 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26869 : }
26870 144 : return NDR_ERR_SUCCESS;
26871 : }
26872 :
26873 0 : _PUBLIC_ void ndr_print_spoolss_AddPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddPrinter *r)
26874 : {
26875 0 : ndr_print_struct(ndr, name, "spoolss_AddPrinter");
26876 0 : if (r == NULL) { ndr_print_null(ndr); return; }
26877 0 : ndr->depth++;
26878 0 : if (flags & NDR_SET_VALUES) {
26879 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26880 : }
26881 0 : if (flags & NDR_IN) {
26882 0 : ndr_print_struct(ndr, "in", "spoolss_AddPrinter");
26883 0 : ndr->depth++;
26884 0 : ndr_print_ptr(ndr, "server", r->in.server);
26885 0 : ndr->depth++;
26886 0 : if (r->in.server) {
26887 0 : ndr_print_string(ndr, "server", r->in.server);
26888 : }
26889 0 : ndr->depth--;
26890 0 : ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
26891 0 : ndr->depth++;
26892 0 : ndr_print_spoolss_SetPrinterInfoCtr(ndr, "info_ctr", r->in.info_ctr);
26893 0 : ndr->depth--;
26894 0 : ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr);
26895 0 : ndr->depth++;
26896 0 : ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr);
26897 0 : ndr->depth--;
26898 0 : ndr_print_ptr(ndr, "secdesc_ctr", r->in.secdesc_ctr);
26899 0 : ndr->depth++;
26900 0 : ndr_print_sec_desc_buf(ndr, "secdesc_ctr", r->in.secdesc_ctr);
26901 0 : ndr->depth--;
26902 0 : ndr->depth--;
26903 : }
26904 0 : if (flags & NDR_OUT) {
26905 0 : ndr_print_struct(ndr, "out", "spoolss_AddPrinter");
26906 0 : ndr->depth++;
26907 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
26908 0 : ndr->depth++;
26909 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
26910 0 : ndr->depth--;
26911 0 : ndr_print_WERROR(ndr, "result", r->out.result);
26912 0 : ndr->depth--;
26913 : }
26914 0 : ndr->depth--;
26915 : }
26916 :
26917 32 : static enum ndr_err_code ndr_push_spoolss_DeletePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePrinter *r)
26918 : {
26919 32 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
26920 32 : if (flags & NDR_IN) {
26921 16 : if (r->in.handle == NULL) {
26922 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26923 : }
26924 16 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26925 : }
26926 32 : if (flags & NDR_OUT) {
26927 16 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26928 : }
26929 32 : return NDR_ERR_SUCCESS;
26930 : }
26931 :
26932 32 : static enum ndr_err_code ndr_pull_spoolss_DeletePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePrinter *r)
26933 : {
26934 32 : TALLOC_CTX *_mem_save_handle_0 = NULL;
26935 32 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
26936 32 : if (flags & NDR_IN) {
26937 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26938 16 : NDR_PULL_ALLOC(ndr, r->in.handle);
26939 : }
26940 16 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26941 16 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
26942 16 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26943 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26944 : }
26945 32 : if (flags & NDR_OUT) {
26946 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
26947 : if (r->in.handle == NULL) {
26948 : NDR_PULL_ALLOC(ndr, r->in.handle);
26949 : NDR_ZERO_STRUCTP(r->in.handle);
26950 : }
26951 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
26952 16 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26953 : }
26954 32 : return NDR_ERR_SUCCESS;
26955 : }
26956 :
26957 0 : _PUBLIC_ void ndr_print_spoolss_DeletePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePrinter *r)
26958 : {
26959 0 : ndr_print_struct(ndr, name, "spoolss_DeletePrinter");
26960 0 : if (r == NULL) { ndr_print_null(ndr); return; }
26961 0 : ndr->depth++;
26962 0 : if (flags & NDR_SET_VALUES) {
26963 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26964 : }
26965 0 : if (flags & NDR_IN) {
26966 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePrinter");
26967 0 : ndr->depth++;
26968 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
26969 0 : ndr->depth++;
26970 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
26971 0 : ndr->depth--;
26972 0 : ndr->depth--;
26973 : }
26974 0 : if (flags & NDR_OUT) {
26975 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePrinter");
26976 0 : ndr->depth++;
26977 0 : ndr_print_WERROR(ndr, "result", r->out.result);
26978 0 : ndr->depth--;
26979 : }
26980 0 : ndr->depth--;
26981 : }
26982 :
26983 1168 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_SetPrinter *r)
26984 : {
26985 1168 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
26986 1168 : if (flags & NDR_IN) {
26987 584 : if (r->in.handle == NULL) {
26988 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26989 : }
26990 584 : if (r->in.info_ctr == NULL) {
26991 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26992 : }
26993 584 : if (r->in.devmode_ctr == NULL) {
26994 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26995 : }
26996 584 : if (r->in.secdesc_ctr == NULL) {
26997 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26998 : }
26999 584 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27000 584 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
27001 584 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
27002 584 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
27003 584 : NDR_CHECK(ndr_push_spoolss_PrinterControl(ndr, NDR_SCALARS, r->in.command));
27004 : }
27005 1168 : if (flags & NDR_OUT) {
27006 584 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27007 : }
27008 1168 : return NDR_ERR_SUCCESS;
27009 : }
27010 :
27011 1172 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_SetPrinter *r)
27012 : {
27013 1172 : TALLOC_CTX *_mem_save_handle_0 = NULL;
27014 1172 : TALLOC_CTX *_mem_save_info_ctr_0 = NULL;
27015 1172 : TALLOC_CTX *_mem_save_devmode_ctr_0 = NULL;
27016 1172 : TALLOC_CTX *_mem_save_secdesc_ctr_0 = NULL;
27017 1172 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
27018 1172 : if (flags & NDR_IN) {
27019 588 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27020 588 : NDR_PULL_ALLOC(ndr, r->in.handle);
27021 : }
27022 588 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
27023 588 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
27024 588 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27025 588 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
27026 588 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27027 588 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
27028 : }
27029 588 : _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
27030 588 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
27031 588 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
27032 588 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
27033 588 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27034 588 : NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
27035 : }
27036 588 : _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
27037 588 : NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC);
27038 588 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
27039 588 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC);
27040 588 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27041 588 : NDR_PULL_ALLOC(ndr, r->in.secdesc_ctr);
27042 : }
27043 588 : _mem_save_secdesc_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
27044 588 : NDR_PULL_SET_MEM_CTX(ndr, r->in.secdesc_ctr, LIBNDR_FLAG_REF_ALLOC);
27045 588 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
27046 588 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_ctr_0, LIBNDR_FLAG_REF_ALLOC);
27047 592 : NDR_CHECK(ndr_pull_spoolss_PrinterControl(ndr, NDR_SCALARS, &r->in.command));
27048 : }
27049 1172 : if (flags & NDR_OUT) {
27050 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
27051 : if (r->in.handle == NULL) {
27052 : NDR_PULL_ALLOC(ndr, r->in.handle);
27053 : NDR_ZERO_STRUCTP(r->in.handle);
27054 : }
27055 : if (r->in.info_ctr == NULL) {
27056 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
27057 : NDR_ZERO_STRUCTP(r->in.info_ctr);
27058 : }
27059 : if (r->in.devmode_ctr == NULL) {
27060 : NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
27061 : NDR_ZERO_STRUCTP(r->in.devmode_ctr);
27062 : }
27063 : if (r->in.secdesc_ctr == NULL) {
27064 : NDR_PULL_ALLOC(ndr, r->in.secdesc_ctr);
27065 : NDR_ZERO_STRUCTP(r->in.secdesc_ctr);
27066 : }
27067 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
27068 584 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27069 : }
27070 1168 : return NDR_ERR_SUCCESS;
27071 : }
27072 :
27073 4 : _PUBLIC_ void ndr_print_spoolss_SetPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_SetPrinter *r)
27074 : {
27075 4 : ndr_print_struct(ndr, name, "spoolss_SetPrinter");
27076 4 : if (r == NULL) { ndr_print_null(ndr); return; }
27077 4 : ndr->depth++;
27078 4 : if (flags & NDR_SET_VALUES) {
27079 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27080 : }
27081 4 : if (flags & NDR_IN) {
27082 4 : ndr_print_struct(ndr, "in", "spoolss_SetPrinter");
27083 4 : ndr->depth++;
27084 4 : ndr_print_ptr(ndr, "handle", r->in.handle);
27085 4 : ndr->depth++;
27086 4 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
27087 4 : ndr->depth--;
27088 4 : ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
27089 4 : ndr->depth++;
27090 4 : ndr_print_spoolss_SetPrinterInfoCtr(ndr, "info_ctr", r->in.info_ctr);
27091 4 : ndr->depth--;
27092 4 : ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr);
27093 4 : ndr->depth++;
27094 4 : ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr);
27095 4 : ndr->depth--;
27096 4 : ndr_print_ptr(ndr, "secdesc_ctr", r->in.secdesc_ctr);
27097 4 : ndr->depth++;
27098 4 : ndr_print_sec_desc_buf(ndr, "secdesc_ctr", r->in.secdesc_ctr);
27099 4 : ndr->depth--;
27100 4 : ndr_print_spoolss_PrinterControl(ndr, "command", r->in.command);
27101 4 : ndr->depth--;
27102 : }
27103 4 : if (flags & NDR_OUT) {
27104 0 : ndr_print_struct(ndr, "out", "spoolss_SetPrinter");
27105 0 : ndr->depth++;
27106 0 : ndr_print_WERROR(ndr, "result", r->out.result);
27107 0 : ndr->depth--;
27108 : }
27109 4 : ndr->depth--;
27110 : }
27111 :
27112 7024 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_GetPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetPrinter *r)
27113 : {
27114 7024 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
27115 7024 : if (flags & NDR_IN) {
27116 3512 : if (r->in.handle == NULL) {
27117 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27118 : }
27119 3512 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27120 3512 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
27121 3512 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
27122 3512 : if (r->in.buffer) {
27123 1748 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
27124 : }
27125 3512 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
27126 : }
27127 7024 : if (flags & NDR_OUT) {
27128 3512 : if (r->out.needed == NULL) {
27129 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27130 : }
27131 3512 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
27132 3512 : if (r->out.info) {
27133 : {
27134 0 : struct ndr_push *_ndr_info;
27135 1748 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
27136 1748 : NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
27137 1748 : NDR_CHECK(ndr_push_spoolss_PrinterInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
27138 1748 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
27139 : }
27140 : }
27141 3512 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
27142 3512 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27143 : }
27144 7024 : return NDR_ERR_SUCCESS;
27145 : }
27146 :
27147 7028 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_GetPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetPrinter *r)
27148 : {
27149 4 : uint32_t _ptr_buffer;
27150 4 : uint32_t _ptr_info;
27151 7028 : TALLOC_CTX *_mem_save_handle_0 = NULL;
27152 7028 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
27153 7028 : TALLOC_CTX *_mem_save_info_0 = NULL;
27154 7028 : TALLOC_CTX *_mem_save_needed_0 = NULL;
27155 7028 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
27156 7028 : if (flags & NDR_IN) {
27157 3514 : NDR_ZERO_STRUCT(r->out);
27158 :
27159 3514 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27160 3514 : NDR_PULL_ALLOC(ndr, r->in.handle);
27161 : }
27162 3514 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
27163 3514 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
27164 3514 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27165 3514 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
27166 3514 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
27167 3514 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
27168 3514 : if (_ptr_buffer) {
27169 1748 : NDR_PULL_ALLOC(ndr, r->in.buffer);
27170 : } else {
27171 1766 : r->in.buffer = NULL;
27172 : }
27173 3514 : if (r->in.buffer) {
27174 1748 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
27175 1748 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
27176 1748 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
27177 1748 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
27178 : }
27179 3514 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
27180 3514 : NDR_PULL_ALLOC(ndr, r->out.needed);
27181 3514 : NDR_ZERO_STRUCTP(r->out.needed);
27182 : }
27183 7028 : if (flags & NDR_OUT) {
27184 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
27185 : if (r->in.handle == NULL) {
27186 : NDR_PULL_ALLOC(ndr, r->in.handle);
27187 : NDR_ZERO_STRUCTP(r->in.handle);
27188 : }
27189 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
27190 3514 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
27191 3514 : if (_ptr_info) {
27192 1748 : NDR_PULL_ALLOC(ndr, r->out.info);
27193 : } else {
27194 1766 : r->out.info = NULL;
27195 : }
27196 3514 : if (r->out.info) {
27197 1748 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
27198 1748 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
27199 : {
27200 0 : struct ndr_pull *_ndr_info;
27201 1748 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
27202 1748 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
27203 1748 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
27204 1748 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
27205 : }
27206 1748 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
27207 : }
27208 3514 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27209 2 : NDR_PULL_ALLOC(ndr, r->out.needed);
27210 : }
27211 3514 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
27212 3514 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
27213 3514 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
27214 3514 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
27215 3514 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27216 : }
27217 7024 : return NDR_ERR_SUCCESS;
27218 : }
27219 :
27220 4 : _PUBLIC_ void ndr_print_spoolss_GetPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetPrinter *r)
27221 : {
27222 4 : ndr_print_struct(ndr, name, "spoolss_GetPrinter");
27223 4 : if (r == NULL) { ndr_print_null(ndr); return; }
27224 4 : ndr->depth++;
27225 4 : if (flags & NDR_SET_VALUES) {
27226 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27227 : }
27228 4 : if (flags & NDR_IN) {
27229 2 : ndr_print_struct(ndr, "in", "spoolss_GetPrinter");
27230 2 : ndr->depth++;
27231 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
27232 2 : ndr->depth++;
27233 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
27234 2 : ndr->depth--;
27235 2 : ndr_print_uint32(ndr, "level", r->in.level);
27236 2 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
27237 2 : ndr->depth++;
27238 2 : if (r->in.buffer) {
27239 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
27240 : }
27241 2 : ndr->depth--;
27242 2 : ndr_print_uint32(ndr, "offered", r->in.offered);
27243 2 : ndr->depth--;
27244 : }
27245 4 : if (flags & NDR_OUT) {
27246 2 : ndr_print_struct(ndr, "out", "spoolss_GetPrinter");
27247 2 : ndr->depth++;
27248 2 : ndr_print_ptr(ndr, "info", r->out.info);
27249 2 : ndr->depth++;
27250 2 : if (r->out.info) {
27251 0 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
27252 0 : ndr_print_spoolss_PrinterInfo(ndr, "info", r->out.info);
27253 : }
27254 2 : ndr->depth--;
27255 2 : ndr_print_ptr(ndr, "needed", r->out.needed);
27256 2 : ndr->depth++;
27257 2 : ndr_print_uint32(ndr, "needed", *r->out.needed);
27258 2 : ndr->depth--;
27259 2 : ndr_print_WERROR(ndr, "result", r->out.result);
27260 2 : ndr->depth--;
27261 : }
27262 4 : ndr->depth--;
27263 : }
27264 :
27265 0 : static enum ndr_err_code ndr_push_spoolss_AddPrinterDriver(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddPrinterDriver *r)
27266 : {
27267 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
27268 0 : if (flags & NDR_IN) {
27269 0 : if (r->in.info_ctr == NULL) {
27270 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27271 : }
27272 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
27273 0 : if (r->in.servername) {
27274 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
27275 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
27276 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
27277 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27278 : }
27279 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
27280 : }
27281 0 : if (flags & NDR_OUT) {
27282 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27283 : }
27284 0 : return NDR_ERR_SUCCESS;
27285 : }
27286 :
27287 0 : static enum ndr_err_code ndr_pull_spoolss_AddPrinterDriver(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddPrinterDriver *r)
27288 : {
27289 0 : uint32_t _ptr_servername;
27290 0 : uint32_t size_servername_1 = 0;
27291 0 : uint32_t length_servername_1 = 0;
27292 0 : TALLOC_CTX *_mem_save_servername_0 = NULL;
27293 0 : TALLOC_CTX *_mem_save_info_ctr_0 = NULL;
27294 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
27295 0 : if (flags & NDR_IN) {
27296 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
27297 0 : if (_ptr_servername) {
27298 0 : NDR_PULL_ALLOC(ndr, r->in.servername);
27299 : } else {
27300 0 : r->in.servername = NULL;
27301 : }
27302 0 : if (r->in.servername) {
27303 0 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
27304 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
27305 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
27306 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
27307 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
27308 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
27309 0 : if (length_servername_1 > size_servername_1) {
27310 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
27311 : }
27312 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
27313 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
27314 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
27315 : }
27316 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27317 0 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
27318 : }
27319 0 : _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
27320 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
27321 0 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
27322 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
27323 : }
27324 0 : if (flags & NDR_OUT) {
27325 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
27326 : if (r->in.info_ctr == NULL) {
27327 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
27328 : NDR_ZERO_STRUCTP(r->in.info_ctr);
27329 : }
27330 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
27331 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27332 : }
27333 0 : return NDR_ERR_SUCCESS;
27334 : }
27335 :
27336 0 : _PUBLIC_ void ndr_print_spoolss_AddPrinterDriver(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddPrinterDriver *r)
27337 : {
27338 0 : ndr_print_struct(ndr, name, "spoolss_AddPrinterDriver");
27339 0 : if (r == NULL) { ndr_print_null(ndr); return; }
27340 0 : ndr->depth++;
27341 0 : if (flags & NDR_SET_VALUES) {
27342 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27343 : }
27344 0 : if (flags & NDR_IN) {
27345 0 : ndr_print_struct(ndr, "in", "spoolss_AddPrinterDriver");
27346 0 : ndr->depth++;
27347 0 : ndr_print_ptr(ndr, "servername", r->in.servername);
27348 0 : ndr->depth++;
27349 0 : if (r->in.servername) {
27350 0 : ndr_print_string(ndr, "servername", r->in.servername);
27351 : }
27352 0 : ndr->depth--;
27353 0 : ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
27354 0 : ndr->depth++;
27355 0 : ndr_print_spoolss_AddDriverInfoCtr(ndr, "info_ctr", r->in.info_ctr);
27356 0 : ndr->depth--;
27357 0 : ndr->depth--;
27358 : }
27359 0 : if (flags & NDR_OUT) {
27360 0 : ndr_print_struct(ndr, "out", "spoolss_AddPrinterDriver");
27361 0 : ndr->depth++;
27362 0 : ndr_print_WERROR(ndr, "result", r->out.result);
27363 0 : ndr->depth--;
27364 : }
27365 0 : ndr->depth--;
27366 : }
27367 :
27368 216 : _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrinterDrivers(struct ndr_push *ndr, ndr_flags_type flags, const struct _spoolss_EnumPrinterDrivers *r)
27369 : {
27370 216 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
27371 216 : if (flags & NDR_IN) {
27372 108 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
27373 108 : if (r->in.server) {
27374 108 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
27375 108 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
27376 108 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
27377 108 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27378 : }
27379 108 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.environment));
27380 108 : if (r->in.environment) {
27381 108 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
27382 108 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
27383 108 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
27384 108 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.environment, ndr_charset_length(r->in.environment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27385 : }
27386 108 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
27387 108 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
27388 108 : if (r->in.buffer) {
27389 24 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
27390 : }
27391 108 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
27392 : }
27393 216 : if (flags & NDR_OUT) {
27394 108 : if (r->out.needed == NULL) {
27395 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27396 : }
27397 108 : if (r->out.count == NULL) {
27398 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27399 : }
27400 108 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
27401 108 : if (r->out.info) {
27402 24 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
27403 : }
27404 108 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
27405 108 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
27406 108 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27407 : }
27408 216 : return NDR_ERR_SUCCESS;
27409 : }
27410 :
27411 216 : _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, ndr_flags_type flags, struct _spoolss_EnumPrinterDrivers *r)
27412 : {
27413 0 : uint32_t _ptr_server;
27414 216 : uint32_t size_server_1 = 0;
27415 216 : uint32_t length_server_1 = 0;
27416 0 : uint32_t _ptr_environment;
27417 216 : uint32_t size_environment_1 = 0;
27418 216 : uint32_t length_environment_1 = 0;
27419 0 : uint32_t _ptr_buffer;
27420 0 : uint32_t _ptr_info;
27421 216 : TALLOC_CTX *_mem_save_server_0 = NULL;
27422 216 : TALLOC_CTX *_mem_save_environment_0 = NULL;
27423 216 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
27424 216 : TALLOC_CTX *_mem_save_info_0 = NULL;
27425 216 : TALLOC_CTX *_mem_save_needed_0 = NULL;
27426 216 : TALLOC_CTX *_mem_save_count_0 = NULL;
27427 216 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
27428 216 : if (flags & NDR_IN) {
27429 108 : NDR_ZERO_STRUCT(r->out);
27430 :
27431 108 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
27432 108 : if (_ptr_server) {
27433 108 : NDR_PULL_ALLOC(ndr, r->in.server);
27434 : } else {
27435 0 : r->in.server = NULL;
27436 : }
27437 108 : if (r->in.server) {
27438 108 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
27439 108 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
27440 108 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
27441 108 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
27442 108 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
27443 108 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
27444 108 : if (length_server_1 > size_server_1) {
27445 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
27446 : }
27447 108 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
27448 108 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
27449 108 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
27450 : }
27451 108 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
27452 108 : if (_ptr_environment) {
27453 108 : NDR_PULL_ALLOC(ndr, r->in.environment);
27454 : } else {
27455 0 : r->in.environment = NULL;
27456 : }
27457 108 : if (r->in.environment) {
27458 108 : _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
27459 108 : NDR_PULL_SET_MEM_CTX(ndr, r->in.environment, 0);
27460 108 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.environment));
27461 108 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.environment));
27462 108 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.environment, &size_environment_1));
27463 108 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.environment, &length_environment_1));
27464 108 : if (length_environment_1 > size_environment_1) {
27465 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_environment_1, length_environment_1);
27466 : }
27467 108 : NDR_CHECK(ndr_check_string_terminator(ndr, length_environment_1, sizeof(uint16_t)));
27468 108 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.environment, length_environment_1, sizeof(uint16_t), CH_UTF16));
27469 108 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
27470 : }
27471 108 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
27472 108 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
27473 108 : if (_ptr_buffer) {
27474 24 : NDR_PULL_ALLOC(ndr, r->in.buffer);
27475 : } else {
27476 84 : r->in.buffer = NULL;
27477 : }
27478 108 : if (r->in.buffer) {
27479 24 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
27480 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
27481 24 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
27482 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
27483 : }
27484 108 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
27485 108 : NDR_PULL_ALLOC(ndr, r->out.needed);
27486 108 : NDR_ZERO_STRUCTP(r->out.needed);
27487 108 : NDR_PULL_ALLOC(ndr, r->out.count);
27488 108 : NDR_ZERO_STRUCTP(r->out.count);
27489 : }
27490 216 : if (flags & NDR_OUT) {
27491 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
27492 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
27493 108 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
27494 108 : if (_ptr_info) {
27495 24 : NDR_PULL_ALLOC(ndr, r->out.info);
27496 : } else {
27497 84 : r->out.info = NULL;
27498 : }
27499 108 : if (r->out.info) {
27500 24 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
27501 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
27502 24 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
27503 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
27504 : }
27505 108 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27506 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
27507 : }
27508 108 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
27509 108 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
27510 108 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
27511 108 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
27512 108 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27513 0 : NDR_PULL_ALLOC(ndr, r->out.count);
27514 : }
27515 108 : _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
27516 108 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
27517 108 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
27518 108 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
27519 108 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27520 : }
27521 216 : return NDR_ERR_SUCCESS;
27522 : }
27523 :
27524 24 : _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrinterDrivers(struct ndr_push *ndr, ndr_flags_type flags, const struct __spoolss_EnumPrinterDrivers *r)
27525 : {
27526 0 : uint32_t cntr_info_0;
27527 24 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
27528 24 : if (flags & NDR_IN) {
27529 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
27530 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
27531 : }
27532 24 : if (flags & NDR_OUT) {
27533 24 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
27534 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
27535 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
27536 : }
27537 24 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
27538 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
27539 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
27540 : }
27541 : }
27542 24 : return NDR_ERR_SUCCESS;
27543 : }
27544 :
27545 24 : _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, ndr_flags_type flags, struct __spoolss_EnumPrinterDrivers *r)
27546 : {
27547 24 : uint32_t size_info_0 = 0;
27548 0 : uint32_t cntr_info_0;
27549 24 : TALLOC_CTX *_mem_save_info_0 = NULL;
27550 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
27551 24 : if (flags & NDR_IN) {
27552 0 : NDR_ZERO_STRUCT(r->out);
27553 :
27554 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
27555 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
27556 : }
27557 24 : if (flags & NDR_OUT) {
27558 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
27559 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
27560 24 : size_info_0 = r->in.count;
27561 24 : NDR_PULL_ALLOC_N(ndr, r->out.info, size_info_0);
27562 24 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
27563 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
27564 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
27565 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
27566 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
27567 : }
27568 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
27569 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
27570 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
27571 : }
27572 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
27573 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
27574 : }
27575 : }
27576 24 : return NDR_ERR_SUCCESS;
27577 : }
27578 :
27579 0 : _PUBLIC_ void ndr_print_spoolss_EnumPrinterDrivers(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumPrinterDrivers *r)
27580 : {
27581 0 : uint32_t cntr_info_2;
27582 0 : ndr_print_struct(ndr, name, "spoolss_EnumPrinterDrivers");
27583 0 : if (r == NULL) { ndr_print_null(ndr); return; }
27584 0 : ndr->depth++;
27585 0 : if (flags & NDR_SET_VALUES) {
27586 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27587 : }
27588 0 : if (flags & NDR_IN) {
27589 0 : ndr_print_struct(ndr, "in", "spoolss_EnumPrinterDrivers");
27590 0 : ndr->depth++;
27591 0 : ndr_print_ptr(ndr, "server", r->in.server);
27592 0 : ndr->depth++;
27593 0 : if (r->in.server) {
27594 0 : ndr_print_string(ndr, "server", r->in.server);
27595 : }
27596 0 : ndr->depth--;
27597 0 : ndr_print_ptr(ndr, "environment", r->in.environment);
27598 0 : ndr->depth++;
27599 0 : if (r->in.environment) {
27600 0 : ndr_print_string(ndr, "environment", r->in.environment);
27601 : }
27602 0 : ndr->depth--;
27603 0 : ndr_print_uint32(ndr, "level", r->in.level);
27604 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
27605 0 : ndr->depth++;
27606 0 : if (r->in.buffer) {
27607 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
27608 : }
27609 0 : ndr->depth--;
27610 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
27611 0 : ndr->depth--;
27612 : }
27613 0 : if (flags & NDR_OUT) {
27614 0 : ndr_print_struct(ndr, "out", "spoolss_EnumPrinterDrivers");
27615 0 : ndr->depth++;
27616 0 : ndr_print_ptr(ndr, "count", r->out.count);
27617 0 : ndr->depth++;
27618 0 : ndr_print_uint32(ndr, "count", *r->out.count);
27619 0 : ndr->depth--;
27620 0 : ndr_print_ptr(ndr, "info", r->out.info);
27621 0 : ndr->depth++;
27622 0 : ndr_print_ptr(ndr, "info", *r->out.info);
27623 0 : ndr->depth++;
27624 0 : if (*r->out.info) {
27625 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(*r->out.count));
27626 0 : ndr->depth++;
27627 0 : for (cntr_info_2 = 0; cntr_info_2 < (*r->out.count); cntr_info_2++) {
27628 0 : ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
27629 0 : ndr_print_spoolss_DriverInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
27630 : }
27631 0 : ndr->depth--;
27632 : }
27633 0 : ndr->depth--;
27634 0 : ndr->depth--;
27635 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
27636 0 : ndr->depth++;
27637 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
27638 0 : ndr->depth--;
27639 0 : ndr_print_WERROR(ndr, "result", r->out.result);
27640 0 : ndr->depth--;
27641 : }
27642 0 : ndr->depth--;
27643 : }
27644 :
27645 0 : static enum ndr_err_code ndr_push_spoolss_GetPrinterDriver(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetPrinterDriver *r)
27646 : {
27647 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
27648 0 : if (flags & NDR_IN) {
27649 0 : if (r->in.handle == NULL) {
27650 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27651 : }
27652 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27653 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.architecture));
27654 0 : if (r->in.architecture) {
27655 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
27656 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
27657 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
27658 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27659 : }
27660 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
27661 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
27662 0 : if (r->in.buffer) {
27663 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
27664 : }
27665 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
27666 : }
27667 0 : if (flags & NDR_OUT) {
27668 0 : if (r->out.needed == NULL) {
27669 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27670 : }
27671 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
27672 0 : if (r->out.info) {
27673 : {
27674 0 : struct ndr_push *_ndr_info;
27675 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
27676 0 : NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
27677 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
27678 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
27679 : }
27680 : }
27681 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
27682 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27683 : }
27684 0 : return NDR_ERR_SUCCESS;
27685 : }
27686 :
27687 0 : static enum ndr_err_code ndr_pull_spoolss_GetPrinterDriver(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetPrinterDriver *r)
27688 : {
27689 0 : uint32_t _ptr_architecture;
27690 0 : uint32_t size_architecture_1 = 0;
27691 0 : uint32_t length_architecture_1 = 0;
27692 0 : uint32_t _ptr_buffer;
27693 0 : uint32_t _ptr_info;
27694 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
27695 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
27696 0 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
27697 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
27698 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
27699 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
27700 0 : if (flags & NDR_IN) {
27701 0 : NDR_ZERO_STRUCT(r->out);
27702 :
27703 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27704 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
27705 : }
27706 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
27707 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
27708 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27709 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
27710 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
27711 0 : if (_ptr_architecture) {
27712 0 : NDR_PULL_ALLOC(ndr, r->in.architecture);
27713 : } else {
27714 0 : r->in.architecture = NULL;
27715 : }
27716 0 : if (r->in.architecture) {
27717 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
27718 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.architecture, 0);
27719 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
27720 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
27721 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.architecture, &size_architecture_1));
27722 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.architecture, &length_architecture_1));
27723 0 : if (length_architecture_1 > size_architecture_1) {
27724 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_1, length_architecture_1);
27725 : }
27726 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_1, sizeof(uint16_t)));
27727 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, length_architecture_1, sizeof(uint16_t), CH_UTF16));
27728 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
27729 : }
27730 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
27731 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
27732 0 : if (_ptr_buffer) {
27733 0 : NDR_PULL_ALLOC(ndr, r->in.buffer);
27734 : } else {
27735 0 : r->in.buffer = NULL;
27736 : }
27737 0 : if (r->in.buffer) {
27738 0 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
27739 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
27740 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
27741 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
27742 : }
27743 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
27744 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
27745 0 : NDR_ZERO_STRUCTP(r->out.needed);
27746 : }
27747 0 : if (flags & NDR_OUT) {
27748 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
27749 : if (r->in.handle == NULL) {
27750 : NDR_PULL_ALLOC(ndr, r->in.handle);
27751 : NDR_ZERO_STRUCTP(r->in.handle);
27752 : }
27753 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
27754 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
27755 0 : if (_ptr_info) {
27756 0 : NDR_PULL_ALLOC(ndr, r->out.info);
27757 : } else {
27758 0 : r->out.info = NULL;
27759 : }
27760 0 : if (r->out.info) {
27761 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
27762 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
27763 : {
27764 0 : struct ndr_pull *_ndr_info;
27765 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
27766 0 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
27767 0 : NDR_CHECK(ndr_pull_spoolss_DriverInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
27768 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
27769 : }
27770 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
27771 : }
27772 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27773 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
27774 : }
27775 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
27776 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
27777 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
27778 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
27779 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27780 : }
27781 0 : return NDR_ERR_SUCCESS;
27782 : }
27783 :
27784 0 : _PUBLIC_ void ndr_print_spoolss_GetPrinterDriver(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetPrinterDriver *r)
27785 : {
27786 0 : ndr_print_struct(ndr, name, "spoolss_GetPrinterDriver");
27787 0 : if (r == NULL) { ndr_print_null(ndr); return; }
27788 0 : ndr->depth++;
27789 0 : if (flags & NDR_SET_VALUES) {
27790 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27791 : }
27792 0 : if (flags & NDR_IN) {
27793 0 : ndr_print_struct(ndr, "in", "spoolss_GetPrinterDriver");
27794 0 : ndr->depth++;
27795 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
27796 0 : ndr->depth++;
27797 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
27798 0 : ndr->depth--;
27799 0 : ndr_print_ptr(ndr, "architecture", r->in.architecture);
27800 0 : ndr->depth++;
27801 0 : if (r->in.architecture) {
27802 0 : ndr_print_string(ndr, "architecture", r->in.architecture);
27803 : }
27804 0 : ndr->depth--;
27805 0 : ndr_print_uint32(ndr, "level", r->in.level);
27806 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
27807 0 : ndr->depth++;
27808 0 : if (r->in.buffer) {
27809 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
27810 : }
27811 0 : ndr->depth--;
27812 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
27813 0 : ndr->depth--;
27814 : }
27815 0 : if (flags & NDR_OUT) {
27816 0 : ndr_print_struct(ndr, "out", "spoolss_GetPrinterDriver");
27817 0 : ndr->depth++;
27818 0 : ndr_print_ptr(ndr, "info", r->out.info);
27819 0 : ndr->depth++;
27820 0 : if (r->out.info) {
27821 0 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
27822 0 : ndr_print_spoolss_DriverInfo(ndr, "info", r->out.info);
27823 : }
27824 0 : ndr->depth--;
27825 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
27826 0 : ndr->depth++;
27827 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
27828 0 : ndr->depth--;
27829 0 : ndr_print_WERROR(ndr, "result", r->out.result);
27830 0 : ndr->depth--;
27831 : }
27832 0 : ndr->depth--;
27833 : }
27834 :
27835 336 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_GetPrinterDriverDirectory(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetPrinterDriverDirectory *r)
27836 : {
27837 336 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
27838 336 : if (flags & NDR_IN) {
27839 168 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
27840 168 : if (r->in.server) {
27841 160 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
27842 160 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
27843 160 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
27844 160 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27845 : }
27846 168 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.environment));
27847 168 : if (r->in.environment) {
27848 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
27849 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
27850 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
27851 168 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.environment, ndr_charset_length(r->in.environment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27852 : }
27853 168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
27854 168 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
27855 168 : if (r->in.buffer) {
27856 84 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
27857 : }
27858 168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
27859 : }
27860 336 : if (flags & NDR_OUT) {
27861 168 : if (r->out.needed == NULL) {
27862 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27863 : }
27864 168 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
27865 168 : if (r->out.info) {
27866 : {
27867 0 : struct ndr_push *_ndr_info;
27868 84 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
27869 84 : NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
27870 84 : NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo(_ndr_info, NDR_SCALARS, r->out.info));
27871 84 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
27872 : }
27873 : }
27874 168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
27875 168 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27876 : }
27877 336 : return NDR_ERR_SUCCESS;
27878 : }
27879 :
27880 342 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_GetPrinterDriverDirectory(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetPrinterDriverDirectory *r)
27881 : {
27882 6 : uint32_t _ptr_server;
27883 342 : uint32_t size_server_1 = 0;
27884 342 : uint32_t length_server_1 = 0;
27885 6 : uint32_t _ptr_environment;
27886 342 : uint32_t size_environment_1 = 0;
27887 342 : uint32_t length_environment_1 = 0;
27888 6 : uint32_t _ptr_buffer;
27889 6 : uint32_t _ptr_info;
27890 342 : TALLOC_CTX *_mem_save_server_0 = NULL;
27891 342 : TALLOC_CTX *_mem_save_environment_0 = NULL;
27892 342 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
27893 342 : TALLOC_CTX *_mem_save_info_0 = NULL;
27894 342 : TALLOC_CTX *_mem_save_needed_0 = NULL;
27895 342 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
27896 342 : if (flags & NDR_IN) {
27897 172 : NDR_ZERO_STRUCT(r->out);
27898 :
27899 172 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
27900 172 : if (_ptr_server) {
27901 164 : NDR_PULL_ALLOC(ndr, r->in.server);
27902 : } else {
27903 8 : r->in.server = NULL;
27904 : }
27905 172 : if (r->in.server) {
27906 164 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
27907 164 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
27908 164 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
27909 164 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
27910 164 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
27911 164 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
27912 164 : if (length_server_1 > size_server_1) {
27913 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
27914 : }
27915 164 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
27916 164 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
27917 164 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
27918 : }
27919 172 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
27920 172 : if (_ptr_environment) {
27921 172 : NDR_PULL_ALLOC(ndr, r->in.environment);
27922 : } else {
27923 0 : r->in.environment = NULL;
27924 : }
27925 172 : if (r->in.environment) {
27926 172 : _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
27927 172 : NDR_PULL_SET_MEM_CTX(ndr, r->in.environment, 0);
27928 172 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.environment));
27929 172 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.environment));
27930 172 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.environment, &size_environment_1));
27931 172 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.environment, &length_environment_1));
27932 172 : if (length_environment_1 > size_environment_1) {
27933 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_environment_1, length_environment_1);
27934 : }
27935 172 : NDR_CHECK(ndr_check_string_terminator(ndr, length_environment_1, sizeof(uint16_t)));
27936 172 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.environment, length_environment_1, sizeof(uint16_t), CH_UTF16));
27937 172 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
27938 : }
27939 172 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
27940 172 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
27941 172 : if (_ptr_buffer) {
27942 88 : NDR_PULL_ALLOC(ndr, r->in.buffer);
27943 : } else {
27944 84 : r->in.buffer = NULL;
27945 : }
27946 172 : if (r->in.buffer) {
27947 88 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
27948 88 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
27949 88 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
27950 88 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
27951 : }
27952 172 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
27953 172 : NDR_PULL_ALLOC(ndr, r->out.needed);
27954 172 : NDR_ZERO_STRUCTP(r->out.needed);
27955 : }
27956 342 : if (flags & NDR_OUT) {
27957 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
27958 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
27959 170 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
27960 170 : if (_ptr_info) {
27961 86 : NDR_PULL_ALLOC(ndr, r->out.info);
27962 : } else {
27963 84 : r->out.info = NULL;
27964 : }
27965 170 : if (r->out.info) {
27966 86 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
27967 86 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
27968 : {
27969 2 : struct ndr_pull *_ndr_info;
27970 86 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
27971 86 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
27972 86 : NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo(_ndr_info, NDR_SCALARS, r->out.info));
27973 86 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
27974 : }
27975 86 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
27976 : }
27977 170 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27978 2 : NDR_PULL_ALLOC(ndr, r->out.needed);
27979 : }
27980 170 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
27981 170 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
27982 170 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
27983 170 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
27984 170 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27985 : }
27986 336 : return NDR_ERR_SUCCESS;
27987 : }
27988 :
27989 6 : _PUBLIC_ void ndr_print_spoolss_GetPrinterDriverDirectory(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetPrinterDriverDirectory *r)
27990 : {
27991 6 : ndr_print_struct(ndr, name, "spoolss_GetPrinterDriverDirectory");
27992 6 : if (r == NULL) { ndr_print_null(ndr); return; }
27993 6 : ndr->depth++;
27994 6 : if (flags & NDR_SET_VALUES) {
27995 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27996 : }
27997 6 : if (flags & NDR_IN) {
27998 4 : ndr_print_struct(ndr, "in", "spoolss_GetPrinterDriverDirectory");
27999 4 : ndr->depth++;
28000 4 : ndr_print_ptr(ndr, "server", r->in.server);
28001 4 : ndr->depth++;
28002 4 : if (r->in.server) {
28003 4 : ndr_print_string(ndr, "server", r->in.server);
28004 : }
28005 4 : ndr->depth--;
28006 4 : ndr_print_ptr(ndr, "environment", r->in.environment);
28007 4 : ndr->depth++;
28008 4 : if (r->in.environment) {
28009 4 : ndr_print_string(ndr, "environment", r->in.environment);
28010 : }
28011 4 : ndr->depth--;
28012 4 : ndr_print_uint32(ndr, "level", r->in.level);
28013 4 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
28014 4 : ndr->depth++;
28015 4 : if (r->in.buffer) {
28016 4 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
28017 : }
28018 4 : ndr->depth--;
28019 4 : ndr_print_uint32(ndr, "offered", r->in.offered);
28020 4 : ndr->depth--;
28021 : }
28022 6 : if (flags & NDR_OUT) {
28023 2 : ndr_print_struct(ndr, "out", "spoolss_GetPrinterDriverDirectory");
28024 2 : ndr->depth++;
28025 2 : ndr_print_ptr(ndr, "info", r->out.info);
28026 2 : ndr->depth++;
28027 2 : if (r->out.info) {
28028 2 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
28029 2 : ndr_print_spoolss_DriverDirectoryInfo(ndr, "info", r->out.info);
28030 : }
28031 2 : ndr->depth--;
28032 2 : ndr_print_ptr(ndr, "needed", r->out.needed);
28033 2 : ndr->depth++;
28034 2 : ndr_print_uint32(ndr, "needed", *r->out.needed);
28035 2 : ndr->depth--;
28036 2 : ndr_print_WERROR(ndr, "result", r->out.result);
28037 2 : ndr->depth--;
28038 : }
28039 6 : ndr->depth--;
28040 : }
28041 :
28042 0 : static enum ndr_err_code ndr_push_spoolss_DeletePrinterDriver(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePrinterDriver *r)
28043 : {
28044 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
28045 0 : if (flags & NDR_IN) {
28046 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
28047 0 : if (r->in.server) {
28048 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
28049 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28050 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
28051 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28052 : }
28053 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
28054 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28055 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
28056 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28057 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.driver, CH_UTF16)));
28058 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28059 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.driver, CH_UTF16)));
28060 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.driver, ndr_charset_length(r->in.driver, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28061 : }
28062 0 : if (flags & NDR_OUT) {
28063 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28064 : }
28065 0 : return NDR_ERR_SUCCESS;
28066 : }
28067 :
28068 0 : static enum ndr_err_code ndr_pull_spoolss_DeletePrinterDriver(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePrinterDriver *r)
28069 : {
28070 0 : uint32_t _ptr_server;
28071 0 : uint32_t size_server_1 = 0;
28072 0 : uint32_t length_server_1 = 0;
28073 0 : uint32_t size_architecture_0 = 0;
28074 0 : uint32_t length_architecture_0 = 0;
28075 0 : uint32_t size_driver_0 = 0;
28076 0 : uint32_t length_driver_0 = 0;
28077 0 : TALLOC_CTX *_mem_save_server_0 = NULL;
28078 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
28079 0 : if (flags & NDR_IN) {
28080 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
28081 0 : if (_ptr_server) {
28082 0 : NDR_PULL_ALLOC(ndr, r->in.server);
28083 : } else {
28084 0 : r->in.server = NULL;
28085 : }
28086 0 : if (r->in.server) {
28087 0 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
28088 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
28089 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
28090 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
28091 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
28092 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
28093 0 : if (length_server_1 > size_server_1) {
28094 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
28095 : }
28096 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
28097 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
28098 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
28099 : }
28100 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
28101 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
28102 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.architecture, &size_architecture_0));
28103 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.architecture, &length_architecture_0));
28104 0 : if (length_architecture_0 > size_architecture_0) {
28105 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_0, length_architecture_0);
28106 : }
28107 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_0, sizeof(uint16_t)));
28108 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, length_architecture_0, sizeof(uint16_t), CH_UTF16));
28109 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.driver));
28110 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.driver));
28111 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.driver, &size_driver_0));
28112 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.driver, &length_driver_0));
28113 0 : if (length_driver_0 > size_driver_0) {
28114 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_0, length_driver_0);
28115 : }
28116 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_0, sizeof(uint16_t)));
28117 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.driver, length_driver_0, sizeof(uint16_t), CH_UTF16));
28118 : }
28119 0 : if (flags & NDR_OUT) {
28120 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
28121 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
28122 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28123 : }
28124 0 : return NDR_ERR_SUCCESS;
28125 : }
28126 :
28127 0 : _PUBLIC_ void ndr_print_spoolss_DeletePrinterDriver(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePrinterDriver *r)
28128 : {
28129 0 : ndr_print_struct(ndr, name, "spoolss_DeletePrinterDriver");
28130 0 : if (r == NULL) { ndr_print_null(ndr); return; }
28131 0 : ndr->depth++;
28132 0 : if (flags & NDR_SET_VALUES) {
28133 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28134 : }
28135 0 : if (flags & NDR_IN) {
28136 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePrinterDriver");
28137 0 : ndr->depth++;
28138 0 : ndr_print_ptr(ndr, "server", r->in.server);
28139 0 : ndr->depth++;
28140 0 : if (r->in.server) {
28141 0 : ndr_print_string(ndr, "server", r->in.server);
28142 : }
28143 0 : ndr->depth--;
28144 0 : ndr_print_string(ndr, "architecture", r->in.architecture);
28145 0 : ndr_print_string(ndr, "driver", r->in.driver);
28146 0 : ndr->depth--;
28147 : }
28148 0 : if (flags & NDR_OUT) {
28149 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePrinterDriver");
28150 0 : ndr->depth++;
28151 0 : ndr_print_WERROR(ndr, "result", r->out.result);
28152 0 : ndr->depth--;
28153 : }
28154 0 : ndr->depth--;
28155 : }
28156 :
28157 8 : static enum ndr_err_code ndr_push_spoolss_AddPrintProcessor(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddPrintProcessor *r)
28158 : {
28159 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
28160 8 : if (flags & NDR_IN) {
28161 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
28162 4 : if (r->in.server) {
28163 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
28164 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28165 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
28166 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28167 : }
28168 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
28169 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28170 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
28171 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28172 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path_name, CH_UTF16)));
28173 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28174 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path_name, CH_UTF16)));
28175 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path_name, ndr_charset_length(r->in.path_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28176 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_name, CH_UTF16)));
28177 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28178 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_name, CH_UTF16)));
28179 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.print_processor_name, ndr_charset_length(r->in.print_processor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28180 : }
28181 8 : if (flags & NDR_OUT) {
28182 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28183 : }
28184 8 : return NDR_ERR_SUCCESS;
28185 : }
28186 :
28187 8 : static enum ndr_err_code ndr_pull_spoolss_AddPrintProcessor(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddPrintProcessor *r)
28188 : {
28189 0 : uint32_t _ptr_server;
28190 8 : uint32_t size_server_1 = 0;
28191 8 : uint32_t length_server_1 = 0;
28192 8 : uint32_t size_architecture_0 = 0;
28193 8 : uint32_t length_architecture_0 = 0;
28194 8 : uint32_t size_path_name_0 = 0;
28195 8 : uint32_t length_path_name_0 = 0;
28196 8 : uint32_t size_print_processor_name_0 = 0;
28197 8 : uint32_t length_print_processor_name_0 = 0;
28198 8 : TALLOC_CTX *_mem_save_server_0 = NULL;
28199 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
28200 8 : if (flags & NDR_IN) {
28201 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
28202 4 : if (_ptr_server) {
28203 0 : NDR_PULL_ALLOC(ndr, r->in.server);
28204 : } else {
28205 4 : r->in.server = NULL;
28206 : }
28207 4 : if (r->in.server) {
28208 0 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
28209 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
28210 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
28211 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
28212 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
28213 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
28214 0 : if (length_server_1 > size_server_1) {
28215 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
28216 : }
28217 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
28218 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
28219 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
28220 : }
28221 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
28222 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
28223 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.architecture, &size_architecture_0));
28224 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.architecture, &length_architecture_0));
28225 4 : if (length_architecture_0 > size_architecture_0) {
28226 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_0, length_architecture_0);
28227 : }
28228 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_0, sizeof(uint16_t)));
28229 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, length_architecture_0, sizeof(uint16_t), CH_UTF16));
28230 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path_name));
28231 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path_name));
28232 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.path_name, &size_path_name_0));
28233 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.path_name, &length_path_name_0));
28234 4 : if (length_path_name_0 > size_path_name_0) {
28235 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_path_name_0, length_path_name_0);
28236 : }
28237 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_path_name_0, sizeof(uint16_t)));
28238 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path_name, length_path_name_0, sizeof(uint16_t), CH_UTF16));
28239 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.print_processor_name));
28240 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.print_processor_name));
28241 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.print_processor_name, &size_print_processor_name_0));
28242 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.print_processor_name, &length_print_processor_name_0));
28243 4 : if (length_print_processor_name_0 > size_print_processor_name_0) {
28244 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_print_processor_name_0, length_print_processor_name_0);
28245 : }
28246 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_print_processor_name_0, sizeof(uint16_t)));
28247 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.print_processor_name, length_print_processor_name_0, sizeof(uint16_t), CH_UTF16));
28248 : }
28249 8 : if (flags & NDR_OUT) {
28250 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
28251 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
28252 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28253 : }
28254 8 : return NDR_ERR_SUCCESS;
28255 : }
28256 :
28257 0 : _PUBLIC_ void ndr_print_spoolss_AddPrintProcessor(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddPrintProcessor *r)
28258 : {
28259 0 : ndr_print_struct(ndr, name, "spoolss_AddPrintProcessor");
28260 0 : if (r == NULL) { ndr_print_null(ndr); return; }
28261 0 : ndr->depth++;
28262 0 : if (flags & NDR_SET_VALUES) {
28263 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28264 : }
28265 0 : if (flags & NDR_IN) {
28266 0 : ndr_print_struct(ndr, "in", "spoolss_AddPrintProcessor");
28267 0 : ndr->depth++;
28268 0 : ndr_print_ptr(ndr, "server", r->in.server);
28269 0 : ndr->depth++;
28270 0 : if (r->in.server) {
28271 0 : ndr_print_string(ndr, "server", r->in.server);
28272 : }
28273 0 : ndr->depth--;
28274 0 : ndr_print_string(ndr, "architecture", r->in.architecture);
28275 0 : ndr_print_string(ndr, "path_name", r->in.path_name);
28276 0 : ndr_print_string(ndr, "print_processor_name", r->in.print_processor_name);
28277 0 : ndr->depth--;
28278 : }
28279 0 : if (flags & NDR_OUT) {
28280 0 : ndr_print_struct(ndr, "out", "spoolss_AddPrintProcessor");
28281 0 : ndr->depth++;
28282 0 : ndr_print_WERROR(ndr, "result", r->out.result);
28283 0 : ndr->depth--;
28284 : }
28285 0 : ndr->depth--;
28286 : }
28287 :
28288 96 : _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrintProcessors(struct ndr_push *ndr, ndr_flags_type flags, const struct _spoolss_EnumPrintProcessors *r)
28289 : {
28290 96 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
28291 96 : if (flags & NDR_IN) {
28292 48 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
28293 48 : if (r->in.servername) {
28294 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
28295 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28296 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
28297 48 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28298 : }
28299 48 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.environment));
28300 48 : if (r->in.environment) {
28301 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
28302 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28303 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
28304 48 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.environment, ndr_charset_length(r->in.environment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28305 : }
28306 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
28307 48 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
28308 48 : if (r->in.buffer) {
28309 12 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
28310 : }
28311 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
28312 : }
28313 96 : if (flags & NDR_OUT) {
28314 48 : if (r->out.needed == NULL) {
28315 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28316 : }
28317 48 : if (r->out.count == NULL) {
28318 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28319 : }
28320 48 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
28321 48 : if (r->out.info) {
28322 12 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
28323 : }
28324 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
28325 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
28326 48 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28327 : }
28328 96 : return NDR_ERR_SUCCESS;
28329 : }
28330 :
28331 96 : _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrintProcessors(struct ndr_pull *ndr, ndr_flags_type flags, struct _spoolss_EnumPrintProcessors *r)
28332 : {
28333 0 : uint32_t _ptr_servername;
28334 96 : uint32_t size_servername_1 = 0;
28335 96 : uint32_t length_servername_1 = 0;
28336 0 : uint32_t _ptr_environment;
28337 96 : uint32_t size_environment_1 = 0;
28338 96 : uint32_t length_environment_1 = 0;
28339 0 : uint32_t _ptr_buffer;
28340 0 : uint32_t _ptr_info;
28341 96 : TALLOC_CTX *_mem_save_servername_0 = NULL;
28342 96 : TALLOC_CTX *_mem_save_environment_0 = NULL;
28343 96 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
28344 96 : TALLOC_CTX *_mem_save_info_0 = NULL;
28345 96 : TALLOC_CTX *_mem_save_needed_0 = NULL;
28346 96 : TALLOC_CTX *_mem_save_count_0 = NULL;
28347 96 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
28348 96 : if (flags & NDR_IN) {
28349 48 : NDR_ZERO_STRUCT(r->out);
28350 :
28351 48 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
28352 48 : if (_ptr_servername) {
28353 48 : NDR_PULL_ALLOC(ndr, r->in.servername);
28354 : } else {
28355 0 : r->in.servername = NULL;
28356 : }
28357 48 : if (r->in.servername) {
28358 48 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
28359 48 : NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
28360 48 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
28361 48 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
28362 48 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
28363 48 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
28364 48 : if (length_servername_1 > size_servername_1) {
28365 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
28366 : }
28367 48 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
28368 48 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
28369 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
28370 : }
28371 48 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
28372 48 : if (_ptr_environment) {
28373 48 : NDR_PULL_ALLOC(ndr, r->in.environment);
28374 : } else {
28375 0 : r->in.environment = NULL;
28376 : }
28377 48 : if (r->in.environment) {
28378 48 : _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
28379 48 : NDR_PULL_SET_MEM_CTX(ndr, r->in.environment, 0);
28380 48 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.environment));
28381 48 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.environment));
28382 48 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.environment, &size_environment_1));
28383 48 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.environment, &length_environment_1));
28384 48 : if (length_environment_1 > size_environment_1) {
28385 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_environment_1, length_environment_1);
28386 : }
28387 48 : NDR_CHECK(ndr_check_string_terminator(ndr, length_environment_1, sizeof(uint16_t)));
28388 48 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.environment, length_environment_1, sizeof(uint16_t), CH_UTF16));
28389 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
28390 : }
28391 48 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
28392 48 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
28393 48 : if (_ptr_buffer) {
28394 12 : NDR_PULL_ALLOC(ndr, r->in.buffer);
28395 : } else {
28396 36 : r->in.buffer = NULL;
28397 : }
28398 48 : if (r->in.buffer) {
28399 12 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
28400 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
28401 12 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
28402 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
28403 : }
28404 48 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
28405 48 : NDR_PULL_ALLOC(ndr, r->out.needed);
28406 48 : NDR_ZERO_STRUCTP(r->out.needed);
28407 48 : NDR_PULL_ALLOC(ndr, r->out.count);
28408 48 : NDR_ZERO_STRUCTP(r->out.count);
28409 : }
28410 96 : if (flags & NDR_OUT) {
28411 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
28412 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
28413 48 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
28414 48 : if (_ptr_info) {
28415 12 : NDR_PULL_ALLOC(ndr, r->out.info);
28416 : } else {
28417 36 : r->out.info = NULL;
28418 : }
28419 48 : if (r->out.info) {
28420 12 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
28421 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
28422 12 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
28423 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
28424 : }
28425 48 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28426 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
28427 : }
28428 48 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
28429 48 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
28430 48 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
28431 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
28432 48 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28433 0 : NDR_PULL_ALLOC(ndr, r->out.count);
28434 : }
28435 48 : _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
28436 48 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
28437 48 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
28438 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
28439 48 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28440 : }
28441 96 : return NDR_ERR_SUCCESS;
28442 : }
28443 :
28444 36 : _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrintProcessors(struct ndr_push *ndr, ndr_flags_type flags, const struct __spoolss_EnumPrintProcessors *r)
28445 : {
28446 0 : uint32_t cntr_info_0;
28447 36 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
28448 36 : if (flags & NDR_IN) {
28449 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
28450 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
28451 : }
28452 36 : if (flags & NDR_OUT) {
28453 72 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
28454 36 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
28455 36 : NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
28456 : }
28457 72 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
28458 36 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
28459 36 : NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
28460 : }
28461 : }
28462 36 : return NDR_ERR_SUCCESS;
28463 : }
28464 :
28465 12 : _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrintProcessors(struct ndr_pull *ndr, ndr_flags_type flags, struct __spoolss_EnumPrintProcessors *r)
28466 : {
28467 12 : uint32_t size_info_0 = 0;
28468 0 : uint32_t cntr_info_0;
28469 12 : TALLOC_CTX *_mem_save_info_0 = NULL;
28470 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
28471 12 : if (flags & NDR_IN) {
28472 0 : NDR_ZERO_STRUCT(r->out);
28473 :
28474 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
28475 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
28476 : }
28477 12 : if (flags & NDR_OUT) {
28478 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
28479 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
28480 12 : size_info_0 = r->in.count;
28481 12 : NDR_PULL_ALLOC_N(ndr, r->out.info, size_info_0);
28482 12 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
28483 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
28484 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
28485 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
28486 12 : NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
28487 : }
28488 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
28489 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
28490 12 : NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
28491 : }
28492 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
28493 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
28494 : }
28495 : }
28496 12 : return NDR_ERR_SUCCESS;
28497 : }
28498 :
28499 0 : _PUBLIC_ void ndr_print_spoolss_EnumPrintProcessors(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumPrintProcessors *r)
28500 : {
28501 0 : uint32_t cntr_info_2;
28502 0 : ndr_print_struct(ndr, name, "spoolss_EnumPrintProcessors");
28503 0 : if (r == NULL) { ndr_print_null(ndr); return; }
28504 0 : ndr->depth++;
28505 0 : if (flags & NDR_SET_VALUES) {
28506 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28507 : }
28508 0 : if (flags & NDR_IN) {
28509 0 : ndr_print_struct(ndr, "in", "spoolss_EnumPrintProcessors");
28510 0 : ndr->depth++;
28511 0 : ndr_print_ptr(ndr, "servername", r->in.servername);
28512 0 : ndr->depth++;
28513 0 : if (r->in.servername) {
28514 0 : ndr_print_string(ndr, "servername", r->in.servername);
28515 : }
28516 0 : ndr->depth--;
28517 0 : ndr_print_ptr(ndr, "environment", r->in.environment);
28518 0 : ndr->depth++;
28519 0 : if (r->in.environment) {
28520 0 : ndr_print_string(ndr, "environment", r->in.environment);
28521 : }
28522 0 : ndr->depth--;
28523 0 : ndr_print_uint32(ndr, "level", r->in.level);
28524 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
28525 0 : ndr->depth++;
28526 0 : if (r->in.buffer) {
28527 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
28528 : }
28529 0 : ndr->depth--;
28530 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
28531 0 : ndr->depth--;
28532 : }
28533 0 : if (flags & NDR_OUT) {
28534 0 : ndr_print_struct(ndr, "out", "spoolss_EnumPrintProcessors");
28535 0 : ndr->depth++;
28536 0 : ndr_print_ptr(ndr, "count", r->out.count);
28537 0 : ndr->depth++;
28538 0 : ndr_print_uint32(ndr, "count", *r->out.count);
28539 0 : ndr->depth--;
28540 0 : ndr_print_ptr(ndr, "info", r->out.info);
28541 0 : ndr->depth++;
28542 0 : ndr_print_ptr(ndr, "info", *r->out.info);
28543 0 : ndr->depth++;
28544 0 : if (*r->out.info) {
28545 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(*r->out.count));
28546 0 : ndr->depth++;
28547 0 : for (cntr_info_2 = 0; cntr_info_2 < (*r->out.count); cntr_info_2++) {
28548 0 : ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
28549 0 : ndr_print_spoolss_PrintProcessorInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
28550 : }
28551 0 : ndr->depth--;
28552 : }
28553 0 : ndr->depth--;
28554 0 : ndr->depth--;
28555 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
28556 0 : ndr->depth++;
28557 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
28558 0 : ndr->depth--;
28559 0 : ndr_print_WERROR(ndr, "result", r->out.result);
28560 0 : ndr->depth--;
28561 : }
28562 0 : ndr->depth--;
28563 : }
28564 :
28565 80 : static enum ndr_err_code ndr_push_spoolss_GetPrintProcessorDirectory(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetPrintProcessorDirectory *r)
28566 : {
28567 80 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
28568 80 : if (flags & NDR_IN) {
28569 40 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
28570 40 : if (r->in.server) {
28571 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
28572 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28573 32 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
28574 32 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28575 : }
28576 40 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.environment));
28577 40 : if (r->in.environment) {
28578 40 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
28579 40 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
28580 40 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
28581 40 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.environment, ndr_charset_length(r->in.environment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28582 : }
28583 40 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
28584 40 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
28585 40 : if (r->in.buffer) {
28586 20 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
28587 : }
28588 40 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
28589 : }
28590 80 : if (flags & NDR_OUT) {
28591 40 : if (r->out.needed == NULL) {
28592 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28593 : }
28594 40 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
28595 40 : if (r->out.info) {
28596 : {
28597 0 : struct ndr_push *_ndr_info;
28598 20 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
28599 20 : NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
28600 20 : NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo(_ndr_info, NDR_SCALARS, r->out.info));
28601 20 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
28602 : }
28603 : }
28604 40 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
28605 40 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28606 : }
28607 80 : return NDR_ERR_SUCCESS;
28608 : }
28609 :
28610 80 : static enum ndr_err_code ndr_pull_spoolss_GetPrintProcessorDirectory(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetPrintProcessorDirectory *r)
28611 : {
28612 0 : uint32_t _ptr_server;
28613 80 : uint32_t size_server_1 = 0;
28614 80 : uint32_t length_server_1 = 0;
28615 0 : uint32_t _ptr_environment;
28616 80 : uint32_t size_environment_1 = 0;
28617 80 : uint32_t length_environment_1 = 0;
28618 0 : uint32_t _ptr_buffer;
28619 0 : uint32_t _ptr_info;
28620 80 : TALLOC_CTX *_mem_save_server_0 = NULL;
28621 80 : TALLOC_CTX *_mem_save_environment_0 = NULL;
28622 80 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
28623 80 : TALLOC_CTX *_mem_save_info_0 = NULL;
28624 80 : TALLOC_CTX *_mem_save_needed_0 = NULL;
28625 80 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
28626 80 : if (flags & NDR_IN) {
28627 40 : NDR_ZERO_STRUCT(r->out);
28628 :
28629 40 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
28630 40 : if (_ptr_server) {
28631 32 : NDR_PULL_ALLOC(ndr, r->in.server);
28632 : } else {
28633 8 : r->in.server = NULL;
28634 : }
28635 40 : if (r->in.server) {
28636 32 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
28637 32 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
28638 32 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
28639 32 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
28640 32 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
28641 32 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
28642 32 : if (length_server_1 > size_server_1) {
28643 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
28644 : }
28645 32 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
28646 32 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
28647 32 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
28648 : }
28649 40 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
28650 40 : if (_ptr_environment) {
28651 40 : NDR_PULL_ALLOC(ndr, r->in.environment);
28652 : } else {
28653 0 : r->in.environment = NULL;
28654 : }
28655 40 : if (r->in.environment) {
28656 40 : _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
28657 40 : NDR_PULL_SET_MEM_CTX(ndr, r->in.environment, 0);
28658 40 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.environment));
28659 40 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.environment));
28660 40 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.environment, &size_environment_1));
28661 40 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.environment, &length_environment_1));
28662 40 : if (length_environment_1 > size_environment_1) {
28663 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_environment_1, length_environment_1);
28664 : }
28665 40 : NDR_CHECK(ndr_check_string_terminator(ndr, length_environment_1, sizeof(uint16_t)));
28666 40 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.environment, length_environment_1, sizeof(uint16_t), CH_UTF16));
28667 40 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
28668 : }
28669 40 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
28670 40 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
28671 40 : if (_ptr_buffer) {
28672 20 : NDR_PULL_ALLOC(ndr, r->in.buffer);
28673 : } else {
28674 20 : r->in.buffer = NULL;
28675 : }
28676 40 : if (r->in.buffer) {
28677 20 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
28678 20 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
28679 20 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
28680 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
28681 : }
28682 40 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
28683 40 : NDR_PULL_ALLOC(ndr, r->out.needed);
28684 40 : NDR_ZERO_STRUCTP(r->out.needed);
28685 : }
28686 80 : if (flags & NDR_OUT) {
28687 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
28688 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
28689 40 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
28690 40 : if (_ptr_info) {
28691 20 : NDR_PULL_ALLOC(ndr, r->out.info);
28692 : } else {
28693 20 : r->out.info = NULL;
28694 : }
28695 40 : if (r->out.info) {
28696 20 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
28697 20 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
28698 : {
28699 0 : struct ndr_pull *_ndr_info;
28700 20 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
28701 20 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
28702 20 : NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo(_ndr_info, NDR_SCALARS, r->out.info));
28703 20 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
28704 : }
28705 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
28706 : }
28707 40 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28708 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
28709 : }
28710 40 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
28711 40 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
28712 40 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
28713 40 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
28714 40 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28715 : }
28716 80 : return NDR_ERR_SUCCESS;
28717 : }
28718 :
28719 0 : _PUBLIC_ void ndr_print_spoolss_GetPrintProcessorDirectory(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetPrintProcessorDirectory *r)
28720 : {
28721 0 : ndr_print_struct(ndr, name, "spoolss_GetPrintProcessorDirectory");
28722 0 : if (r == NULL) { ndr_print_null(ndr); return; }
28723 0 : ndr->depth++;
28724 0 : if (flags & NDR_SET_VALUES) {
28725 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28726 : }
28727 0 : if (flags & NDR_IN) {
28728 0 : ndr_print_struct(ndr, "in", "spoolss_GetPrintProcessorDirectory");
28729 0 : ndr->depth++;
28730 0 : ndr_print_ptr(ndr, "server", r->in.server);
28731 0 : ndr->depth++;
28732 0 : if (r->in.server) {
28733 0 : ndr_print_string(ndr, "server", r->in.server);
28734 : }
28735 0 : ndr->depth--;
28736 0 : ndr_print_ptr(ndr, "environment", r->in.environment);
28737 0 : ndr->depth++;
28738 0 : if (r->in.environment) {
28739 0 : ndr_print_string(ndr, "environment", r->in.environment);
28740 : }
28741 0 : ndr->depth--;
28742 0 : ndr_print_uint32(ndr, "level", r->in.level);
28743 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
28744 0 : ndr->depth++;
28745 0 : if (r->in.buffer) {
28746 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
28747 : }
28748 0 : ndr->depth--;
28749 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
28750 0 : ndr->depth--;
28751 : }
28752 0 : if (flags & NDR_OUT) {
28753 0 : ndr_print_struct(ndr, "out", "spoolss_GetPrintProcessorDirectory");
28754 0 : ndr->depth++;
28755 0 : ndr_print_ptr(ndr, "info", r->out.info);
28756 0 : ndr->depth++;
28757 0 : if (r->out.info) {
28758 0 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
28759 0 : ndr_print_spoolss_PrintProcessorDirectoryInfo(ndr, "info", r->out.info);
28760 : }
28761 0 : ndr->depth--;
28762 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
28763 0 : ndr->depth++;
28764 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
28765 0 : ndr->depth--;
28766 0 : ndr_print_WERROR(ndr, "result", r->out.result);
28767 0 : ndr->depth--;
28768 : }
28769 0 : ndr->depth--;
28770 : }
28771 :
28772 1336 : static enum ndr_err_code ndr_push_spoolss_StartDocPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_StartDocPrinter *r)
28773 : {
28774 1336 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
28775 1336 : if (flags & NDR_IN) {
28776 668 : if (r->in.handle == NULL) {
28777 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28778 : }
28779 668 : if (r->in.info_ctr == NULL) {
28780 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28781 : }
28782 668 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
28783 668 : NDR_CHECK(ndr_push_spoolss_DocumentInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
28784 : }
28785 1336 : if (flags & NDR_OUT) {
28786 668 : if (r->out.job_id == NULL) {
28787 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28788 : }
28789 668 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.job_id));
28790 668 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28791 : }
28792 1336 : return NDR_ERR_SUCCESS;
28793 : }
28794 :
28795 1336 : static enum ndr_err_code ndr_pull_spoolss_StartDocPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_StartDocPrinter *r)
28796 : {
28797 1336 : TALLOC_CTX *_mem_save_handle_0 = NULL;
28798 1336 : TALLOC_CTX *_mem_save_info_ctr_0 = NULL;
28799 1336 : TALLOC_CTX *_mem_save_job_id_0 = NULL;
28800 1336 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
28801 1336 : if (flags & NDR_IN) {
28802 668 : NDR_ZERO_STRUCT(r->out);
28803 :
28804 668 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28805 668 : NDR_PULL_ALLOC(ndr, r->in.handle);
28806 : }
28807 668 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
28808 668 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
28809 668 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
28810 668 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
28811 668 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28812 668 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
28813 : }
28814 668 : _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
28815 668 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
28816 668 : NDR_CHECK(ndr_pull_spoolss_DocumentInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
28817 668 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
28818 668 : NDR_PULL_ALLOC(ndr, r->out.job_id);
28819 668 : NDR_ZERO_STRUCTP(r->out.job_id);
28820 : }
28821 1336 : if (flags & NDR_OUT) {
28822 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
28823 : if (r->in.handle == NULL) {
28824 : NDR_PULL_ALLOC(ndr, r->in.handle);
28825 : NDR_ZERO_STRUCTP(r->in.handle);
28826 : }
28827 : if (r->in.info_ctr == NULL) {
28828 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
28829 : NDR_ZERO_STRUCTP(r->in.info_ctr);
28830 : }
28831 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
28832 668 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28833 28 : NDR_PULL_ALLOC(ndr, r->out.job_id);
28834 : }
28835 668 : _mem_save_job_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
28836 668 : NDR_PULL_SET_MEM_CTX(ndr, r->out.job_id, LIBNDR_FLAG_REF_ALLOC);
28837 668 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.job_id));
28838 668 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_job_id_0, LIBNDR_FLAG_REF_ALLOC);
28839 668 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28840 : }
28841 1336 : return NDR_ERR_SUCCESS;
28842 : }
28843 :
28844 0 : _PUBLIC_ void ndr_print_spoolss_StartDocPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_StartDocPrinter *r)
28845 : {
28846 0 : ndr_print_struct(ndr, name, "spoolss_StartDocPrinter");
28847 0 : if (r == NULL) { ndr_print_null(ndr); return; }
28848 0 : ndr->depth++;
28849 0 : if (flags & NDR_SET_VALUES) {
28850 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28851 : }
28852 0 : if (flags & NDR_IN) {
28853 0 : ndr_print_struct(ndr, "in", "spoolss_StartDocPrinter");
28854 0 : ndr->depth++;
28855 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
28856 0 : ndr->depth++;
28857 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
28858 0 : ndr->depth--;
28859 0 : ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
28860 0 : ndr->depth++;
28861 0 : ndr_print_spoolss_DocumentInfoCtr(ndr, "info_ctr", r->in.info_ctr);
28862 0 : ndr->depth--;
28863 0 : ndr->depth--;
28864 : }
28865 0 : if (flags & NDR_OUT) {
28866 0 : ndr_print_struct(ndr, "out", "spoolss_StartDocPrinter");
28867 0 : ndr->depth++;
28868 0 : ndr_print_ptr(ndr, "job_id", r->out.job_id);
28869 0 : ndr->depth++;
28870 0 : ndr_print_uint32(ndr, "job_id", *r->out.job_id);
28871 0 : ndr->depth--;
28872 0 : ndr_print_WERROR(ndr, "result", r->out.result);
28873 0 : ndr->depth--;
28874 : }
28875 0 : ndr->depth--;
28876 : }
28877 :
28878 3840 : static enum ndr_err_code ndr_push_spoolss_StartPagePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_StartPagePrinter *r)
28879 : {
28880 3840 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
28881 3840 : if (flags & NDR_IN) {
28882 1920 : if (r->in.handle == NULL) {
28883 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28884 : }
28885 1920 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
28886 : }
28887 3840 : if (flags & NDR_OUT) {
28888 1920 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28889 : }
28890 3840 : return NDR_ERR_SUCCESS;
28891 : }
28892 :
28893 3840 : static enum ndr_err_code ndr_pull_spoolss_StartPagePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_StartPagePrinter *r)
28894 : {
28895 3840 : TALLOC_CTX *_mem_save_handle_0 = NULL;
28896 3840 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
28897 3840 : if (flags & NDR_IN) {
28898 1920 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28899 1920 : NDR_PULL_ALLOC(ndr, r->in.handle);
28900 : }
28901 1920 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
28902 1920 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
28903 1920 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
28904 1920 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
28905 : }
28906 3840 : if (flags & NDR_OUT) {
28907 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
28908 : if (r->in.handle == NULL) {
28909 : NDR_PULL_ALLOC(ndr, r->in.handle);
28910 : NDR_ZERO_STRUCTP(r->in.handle);
28911 : }
28912 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
28913 1920 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28914 : }
28915 3840 : return NDR_ERR_SUCCESS;
28916 : }
28917 :
28918 0 : _PUBLIC_ void ndr_print_spoolss_StartPagePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_StartPagePrinter *r)
28919 : {
28920 0 : ndr_print_struct(ndr, name, "spoolss_StartPagePrinter");
28921 0 : if (r == NULL) { ndr_print_null(ndr); return; }
28922 0 : ndr->depth++;
28923 0 : if (flags & NDR_SET_VALUES) {
28924 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28925 : }
28926 0 : if (flags & NDR_IN) {
28927 0 : ndr_print_struct(ndr, "in", "spoolss_StartPagePrinter");
28928 0 : ndr->depth++;
28929 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
28930 0 : ndr->depth++;
28931 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
28932 0 : ndr->depth--;
28933 0 : ndr->depth--;
28934 : }
28935 0 : if (flags & NDR_OUT) {
28936 0 : ndr_print_struct(ndr, "out", "spoolss_StartPagePrinter");
28937 0 : ndr->depth++;
28938 0 : ndr_print_WERROR(ndr, "result", r->out.result);
28939 0 : ndr->depth--;
28940 : }
28941 0 : ndr->depth--;
28942 : }
28943 :
28944 3840 : static enum ndr_err_code ndr_push_spoolss_WritePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_WritePrinter *r)
28945 : {
28946 3840 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
28947 3840 : if (flags & NDR_IN) {
28948 1920 : if (r->in.handle == NULL) {
28949 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28950 : }
28951 1920 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
28952 1920 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->in.data));
28953 1920 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data.length));
28954 : }
28955 3840 : if (flags & NDR_OUT) {
28956 1920 : if (r->out.num_written == NULL) {
28957 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28958 : }
28959 1920 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_written));
28960 1920 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28961 : }
28962 3840 : return NDR_ERR_SUCCESS;
28963 : }
28964 :
28965 3840 : static enum ndr_err_code ndr_pull_spoolss_WritePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_WritePrinter *r)
28966 : {
28967 3840 : TALLOC_CTX *_mem_save_handle_0 = NULL;
28968 3840 : TALLOC_CTX *_mem_save_num_written_0 = NULL;
28969 3840 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
28970 3840 : if (flags & NDR_IN) {
28971 1920 : NDR_ZERO_STRUCT(r->out);
28972 :
28973 1920 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28974 1920 : NDR_PULL_ALLOC(ndr, r->in.handle);
28975 : }
28976 1920 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
28977 1920 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
28978 1920 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
28979 1920 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
28980 1920 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->in.data));
28981 1920 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in._data_size));
28982 1920 : NDR_PULL_ALLOC(ndr, r->out.num_written);
28983 1920 : NDR_ZERO_STRUCTP(r->out.num_written);
28984 : }
28985 3840 : if (flags & NDR_OUT) {
28986 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
28987 : if (r->in.handle == NULL) {
28988 : NDR_PULL_ALLOC(ndr, r->in.handle);
28989 : NDR_ZERO_STRUCTP(r->in.handle);
28990 : }
28991 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
28992 1920 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28993 0 : NDR_PULL_ALLOC(ndr, r->out.num_written);
28994 : }
28995 1920 : _mem_save_num_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
28996 1920 : NDR_PULL_SET_MEM_CTX(ndr, r->out.num_written, LIBNDR_FLAG_REF_ALLOC);
28997 1920 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_written));
28998 1920 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_written_0, LIBNDR_FLAG_REF_ALLOC);
28999 1920 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29000 : }
29001 3840 : return NDR_ERR_SUCCESS;
29002 : }
29003 :
29004 0 : _PUBLIC_ void ndr_print_spoolss_WritePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_WritePrinter *r)
29005 : {
29006 0 : ndr_print_struct(ndr, name, "spoolss_WritePrinter");
29007 0 : if (r == NULL) { ndr_print_null(ndr); return; }
29008 0 : ndr->depth++;
29009 0 : if (flags & NDR_SET_VALUES) {
29010 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29011 : }
29012 0 : if (flags & NDR_IN) {
29013 0 : ndr_print_struct(ndr, "in", "spoolss_WritePrinter");
29014 0 : ndr->depth++;
29015 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
29016 0 : ndr->depth++;
29017 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
29018 0 : ndr->depth--;
29019 0 : ndr_print_DATA_BLOB(ndr, "data", r->in.data);
29020 0 : ndr_print_uint32(ndr, "_data_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->in.data.length:r->in._data_size);
29021 0 : ndr->depth--;
29022 : }
29023 0 : if (flags & NDR_OUT) {
29024 0 : ndr_print_struct(ndr, "out", "spoolss_WritePrinter");
29025 0 : ndr->depth++;
29026 0 : ndr_print_ptr(ndr, "num_written", r->out.num_written);
29027 0 : ndr->depth++;
29028 0 : ndr_print_uint32(ndr, "num_written", *r->out.num_written);
29029 0 : ndr->depth--;
29030 0 : ndr_print_WERROR(ndr, "result", r->out.result);
29031 0 : ndr->depth--;
29032 : }
29033 0 : ndr->depth--;
29034 : }
29035 :
29036 3840 : static enum ndr_err_code ndr_push_spoolss_EndPagePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_EndPagePrinter *r)
29037 : {
29038 3840 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29039 3840 : if (flags & NDR_IN) {
29040 1920 : if (r->in.handle == NULL) {
29041 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29042 : }
29043 1920 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29044 : }
29045 3840 : if (flags & NDR_OUT) {
29046 1920 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29047 : }
29048 3840 : return NDR_ERR_SUCCESS;
29049 : }
29050 :
29051 3840 : static enum ndr_err_code ndr_pull_spoolss_EndPagePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_EndPagePrinter *r)
29052 : {
29053 3840 : TALLOC_CTX *_mem_save_handle_0 = NULL;
29054 3840 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29055 3840 : if (flags & NDR_IN) {
29056 1920 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29057 1920 : NDR_PULL_ALLOC(ndr, r->in.handle);
29058 : }
29059 1920 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29060 1920 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
29061 1920 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29062 1920 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29063 : }
29064 3840 : if (flags & NDR_OUT) {
29065 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29066 : if (r->in.handle == NULL) {
29067 : NDR_PULL_ALLOC(ndr, r->in.handle);
29068 : NDR_ZERO_STRUCTP(r->in.handle);
29069 : }
29070 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29071 1920 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29072 : }
29073 3840 : return NDR_ERR_SUCCESS;
29074 : }
29075 :
29076 0 : _PUBLIC_ void ndr_print_spoolss_EndPagePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EndPagePrinter *r)
29077 : {
29078 0 : ndr_print_struct(ndr, name, "spoolss_EndPagePrinter");
29079 0 : if (r == NULL) { ndr_print_null(ndr); return; }
29080 0 : ndr->depth++;
29081 0 : if (flags & NDR_SET_VALUES) {
29082 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29083 : }
29084 0 : if (flags & NDR_IN) {
29085 0 : ndr_print_struct(ndr, "in", "spoolss_EndPagePrinter");
29086 0 : ndr->depth++;
29087 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
29088 0 : ndr->depth++;
29089 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
29090 0 : ndr->depth--;
29091 0 : ndr->depth--;
29092 : }
29093 0 : if (flags & NDR_OUT) {
29094 0 : ndr_print_struct(ndr, "out", "spoolss_EndPagePrinter");
29095 0 : ndr->depth++;
29096 0 : ndr_print_WERROR(ndr, "result", r->out.result);
29097 0 : ndr->depth--;
29098 : }
29099 0 : ndr->depth--;
29100 : }
29101 :
29102 0 : static enum ndr_err_code ndr_push_spoolss_AbortPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AbortPrinter *r)
29103 : {
29104 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29105 0 : if (flags & NDR_IN) {
29106 0 : if (r->in.handle == NULL) {
29107 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29108 : }
29109 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29110 : }
29111 0 : if (flags & NDR_OUT) {
29112 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29113 : }
29114 0 : return NDR_ERR_SUCCESS;
29115 : }
29116 :
29117 0 : static enum ndr_err_code ndr_pull_spoolss_AbortPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AbortPrinter *r)
29118 : {
29119 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
29120 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29121 0 : if (flags & NDR_IN) {
29122 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29123 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
29124 : }
29125 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29126 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
29127 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29128 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29129 : }
29130 0 : if (flags & NDR_OUT) {
29131 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29132 : if (r->in.handle == NULL) {
29133 : NDR_PULL_ALLOC(ndr, r->in.handle);
29134 : NDR_ZERO_STRUCTP(r->in.handle);
29135 : }
29136 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29137 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29138 : }
29139 0 : return NDR_ERR_SUCCESS;
29140 : }
29141 :
29142 0 : _PUBLIC_ void ndr_print_spoolss_AbortPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AbortPrinter *r)
29143 : {
29144 0 : ndr_print_struct(ndr, name, "spoolss_AbortPrinter");
29145 0 : if (r == NULL) { ndr_print_null(ndr); return; }
29146 0 : ndr->depth++;
29147 0 : if (flags & NDR_SET_VALUES) {
29148 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29149 : }
29150 0 : if (flags & NDR_IN) {
29151 0 : ndr_print_struct(ndr, "in", "spoolss_AbortPrinter");
29152 0 : ndr->depth++;
29153 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
29154 0 : ndr->depth++;
29155 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
29156 0 : ndr->depth--;
29157 0 : ndr->depth--;
29158 : }
29159 0 : if (flags & NDR_OUT) {
29160 0 : ndr_print_struct(ndr, "out", "spoolss_AbortPrinter");
29161 0 : ndr->depth++;
29162 0 : ndr_print_WERROR(ndr, "result", r->out.result);
29163 0 : ndr->depth--;
29164 : }
29165 0 : ndr->depth--;
29166 : }
29167 :
29168 0 : static enum ndr_err_code ndr_push_spoolss_ReadPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_ReadPrinter *r)
29169 : {
29170 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29171 0 : if (flags & NDR_IN) {
29172 0 : if (r->in.handle == NULL) {
29173 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29174 : }
29175 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29176 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
29177 : }
29178 0 : if (flags & NDR_OUT) {
29179 0 : if (r->out.data == NULL) {
29180 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29181 : }
29182 0 : if (r->out._data_size == NULL) {
29183 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29184 : }
29185 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_size));
29186 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.data_size));
29187 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out._data_size));
29188 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29189 : }
29190 0 : return NDR_ERR_SUCCESS;
29191 : }
29192 :
29193 0 : static enum ndr_err_code ndr_pull_spoolss_ReadPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_ReadPrinter *r)
29194 : {
29195 0 : uint32_t size_data_1 = 0;
29196 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
29197 0 : TALLOC_CTX *_mem_save__data_size_0 = NULL;
29198 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29199 0 : if (flags & NDR_IN) {
29200 0 : NDR_ZERO_STRUCT(r->out);
29201 :
29202 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29203 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
29204 : }
29205 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29206 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
29207 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29208 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29209 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size));
29210 0 : NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.data_size);
29211 0 : memset(r->out.data, 0, (r->in.data_size) * sizeof(*r->out.data));
29212 0 : NDR_PULL_ALLOC(ndr, r->out._data_size);
29213 0 : NDR_ZERO_STRUCTP(r->out._data_size);
29214 : }
29215 0 : if (flags & NDR_OUT) {
29216 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29217 : if (r->in.handle == NULL) {
29218 : NDR_PULL_ALLOC(ndr, r->in.handle);
29219 : NDR_ZERO_STRUCTP(r->in.handle);
29220 : }
29221 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29222 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
29223 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.data, &size_data_1));
29224 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29225 0 : NDR_PULL_ALLOC_N(ndr, r->out.data, size_data_1);
29226 : }
29227 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, size_data_1));
29228 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29229 0 : NDR_PULL_ALLOC(ndr, r->out._data_size);
29230 : }
29231 0 : _mem_save__data_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
29232 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out._data_size, LIBNDR_FLAG_REF_ALLOC);
29233 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out._data_size));
29234 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save__data_size_0, LIBNDR_FLAG_REF_ALLOC);
29235 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29236 0 : if (r->out.data) {
29237 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.data, r->in.data_size));
29238 : }
29239 : }
29240 0 : return NDR_ERR_SUCCESS;
29241 : }
29242 :
29243 0 : _PUBLIC_ void ndr_print_spoolss_ReadPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_ReadPrinter *r)
29244 : {
29245 0 : ndr_print_struct(ndr, name, "spoolss_ReadPrinter");
29246 0 : if (r == NULL) { ndr_print_null(ndr); return; }
29247 0 : ndr->depth++;
29248 0 : if (flags & NDR_SET_VALUES) {
29249 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29250 : }
29251 0 : if (flags & NDR_IN) {
29252 0 : ndr_print_struct(ndr, "in", "spoolss_ReadPrinter");
29253 0 : ndr->depth++;
29254 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
29255 0 : ndr->depth++;
29256 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
29257 0 : ndr->depth--;
29258 0 : ndr_print_uint32(ndr, "data_size", r->in.data_size);
29259 0 : ndr->depth--;
29260 : }
29261 0 : if (flags & NDR_OUT) {
29262 0 : ndr_print_struct(ndr, "out", "spoolss_ReadPrinter");
29263 0 : ndr->depth++;
29264 0 : ndr_print_ptr(ndr, "data", r->out.data);
29265 0 : ndr->depth++;
29266 0 : ndr_print_array_uint8(ndr, "data", r->out.data, r->in.data_size);
29267 0 : ndr->depth--;
29268 0 : ndr_print_ptr(ndr, "_data_size", r->out._data_size);
29269 0 : ndr->depth++;
29270 0 : ndr_print_uint32(ndr, "_data_size", *r->out._data_size);
29271 0 : ndr->depth--;
29272 0 : ndr_print_WERROR(ndr, "result", r->out.result);
29273 0 : ndr->depth--;
29274 : }
29275 0 : ndr->depth--;
29276 : }
29277 :
29278 1280 : static enum ndr_err_code ndr_push_spoolss_EndDocPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_EndDocPrinter *r)
29279 : {
29280 1280 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29281 1280 : if (flags & NDR_IN) {
29282 640 : if (r->in.handle == NULL) {
29283 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29284 : }
29285 640 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29286 : }
29287 1280 : if (flags & NDR_OUT) {
29288 640 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29289 : }
29290 1280 : return NDR_ERR_SUCCESS;
29291 : }
29292 :
29293 1280 : static enum ndr_err_code ndr_pull_spoolss_EndDocPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_EndDocPrinter *r)
29294 : {
29295 1280 : TALLOC_CTX *_mem_save_handle_0 = NULL;
29296 1280 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29297 1280 : if (flags & NDR_IN) {
29298 640 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29299 640 : NDR_PULL_ALLOC(ndr, r->in.handle);
29300 : }
29301 640 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29302 640 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
29303 640 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29304 640 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29305 : }
29306 1280 : if (flags & NDR_OUT) {
29307 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29308 : if (r->in.handle == NULL) {
29309 : NDR_PULL_ALLOC(ndr, r->in.handle);
29310 : NDR_ZERO_STRUCTP(r->in.handle);
29311 : }
29312 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29313 640 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29314 : }
29315 1280 : return NDR_ERR_SUCCESS;
29316 : }
29317 :
29318 0 : _PUBLIC_ void ndr_print_spoolss_EndDocPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EndDocPrinter *r)
29319 : {
29320 0 : ndr_print_struct(ndr, name, "spoolss_EndDocPrinter");
29321 0 : if (r == NULL) { ndr_print_null(ndr); return; }
29322 0 : ndr->depth++;
29323 0 : if (flags & NDR_SET_VALUES) {
29324 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29325 : }
29326 0 : if (flags & NDR_IN) {
29327 0 : ndr_print_struct(ndr, "in", "spoolss_EndDocPrinter");
29328 0 : ndr->depth++;
29329 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
29330 0 : ndr->depth++;
29331 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
29332 0 : ndr->depth--;
29333 0 : ndr->depth--;
29334 : }
29335 0 : if (flags & NDR_OUT) {
29336 0 : ndr_print_struct(ndr, "out", "spoolss_EndDocPrinter");
29337 0 : ndr->depth++;
29338 0 : ndr_print_WERROR(ndr, "result", r->out.result);
29339 0 : ndr->depth--;
29340 : }
29341 0 : ndr->depth--;
29342 : }
29343 :
29344 32 : static enum ndr_err_code ndr_push_spoolss_AddJob(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddJob *r)
29345 : {
29346 32 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29347 32 : if (flags & NDR_IN) {
29348 16 : if (r->in.handle == NULL) {
29349 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29350 : }
29351 16 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29352 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
29353 16 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
29354 16 : if (r->in.buffer) {
29355 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
29356 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered));
29357 : }
29358 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
29359 : }
29360 32 : if (flags & NDR_OUT) {
29361 16 : if (r->out.needed == NULL) {
29362 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29363 : }
29364 16 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.buffer));
29365 16 : if (r->out.buffer) {
29366 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
29367 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
29368 : }
29369 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
29370 16 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29371 : }
29372 32 : return NDR_ERR_SUCCESS;
29373 : }
29374 :
29375 32 : static enum ndr_err_code ndr_pull_spoolss_AddJob(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddJob *r)
29376 : {
29377 0 : uint32_t _ptr_buffer;
29378 32 : uint32_t size_buffer_1 = 0;
29379 32 : TALLOC_CTX *_mem_save_handle_0 = NULL;
29380 32 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
29381 32 : TALLOC_CTX *_mem_save_needed_0 = NULL;
29382 32 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29383 32 : if (flags & NDR_IN) {
29384 16 : NDR_ZERO_STRUCT(r->out);
29385 :
29386 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29387 16 : NDR_PULL_ALLOC(ndr, r->in.handle);
29388 : }
29389 16 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29390 16 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
29391 16 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29392 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29393 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
29394 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
29395 16 : if (_ptr_buffer) {
29396 0 : NDR_PULL_ALLOC(ndr, r->in.buffer);
29397 : } else {
29398 16 : r->in.buffer = NULL;
29399 : }
29400 16 : if (r->in.buffer) {
29401 0 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
29402 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
29403 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
29404 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.buffer, &size_buffer_1));
29405 0 : NDR_PULL_ALLOC_N(ndr, r->in.buffer, size_buffer_1);
29406 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, size_buffer_1));
29407 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
29408 : }
29409 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
29410 16 : NDR_PULL_ALLOC(ndr, r->out.needed);
29411 16 : NDR_ZERO_STRUCTP(r->out.needed);
29412 16 : if (r->in.buffer) {
29413 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.buffer, r->in.offered));
29414 : }
29415 : }
29416 32 : if (flags & NDR_OUT) {
29417 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29418 : if (r->in.handle == NULL) {
29419 : NDR_PULL_ALLOC(ndr, r->in.handle);
29420 : NDR_ZERO_STRUCTP(r->in.handle);
29421 : }
29422 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29423 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
29424 16 : if (_ptr_buffer) {
29425 0 : NDR_PULL_ALLOC(ndr, r->out.buffer);
29426 : } else {
29427 16 : r->out.buffer = NULL;
29428 : }
29429 16 : if (r->out.buffer) {
29430 0 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
29431 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, 0);
29432 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
29433 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.buffer, &size_buffer_1));
29434 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_1);
29435 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, size_buffer_1));
29436 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
29437 : }
29438 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29439 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
29440 : }
29441 16 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
29442 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
29443 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
29444 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
29445 16 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29446 16 : if (r->out.buffer) {
29447 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
29448 : }
29449 : }
29450 32 : return NDR_ERR_SUCCESS;
29451 : }
29452 :
29453 0 : _PUBLIC_ void ndr_print_spoolss_AddJob(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddJob *r)
29454 : {
29455 0 : ndr_print_struct(ndr, name, "spoolss_AddJob");
29456 0 : if (r == NULL) { ndr_print_null(ndr); return; }
29457 0 : ndr->depth++;
29458 0 : if (flags & NDR_SET_VALUES) {
29459 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29460 : }
29461 0 : if (flags & NDR_IN) {
29462 0 : ndr_print_struct(ndr, "in", "spoolss_AddJob");
29463 0 : ndr->depth++;
29464 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
29465 0 : ndr->depth++;
29466 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
29467 0 : ndr->depth--;
29468 0 : ndr_print_uint32(ndr, "level", r->in.level);
29469 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
29470 0 : ndr->depth++;
29471 0 : if (r->in.buffer) {
29472 0 : ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered);
29473 : }
29474 0 : ndr->depth--;
29475 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
29476 0 : ndr->depth--;
29477 : }
29478 0 : if (flags & NDR_OUT) {
29479 0 : ndr_print_struct(ndr, "out", "spoolss_AddJob");
29480 0 : ndr->depth++;
29481 0 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
29482 0 : ndr->depth++;
29483 0 : if (r->out.buffer) {
29484 0 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
29485 : }
29486 0 : ndr->depth--;
29487 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
29488 0 : ndr->depth++;
29489 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
29490 0 : ndr->depth--;
29491 0 : ndr_print_WERROR(ndr, "result", r->out.result);
29492 0 : ndr->depth--;
29493 : }
29494 0 : ndr->depth--;
29495 : }
29496 :
29497 0 : static enum ndr_err_code ndr_push_spoolss_ScheduleJob(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_ScheduleJob *r)
29498 : {
29499 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29500 0 : if (flags & NDR_IN) {
29501 0 : if (r->in.handle == NULL) {
29502 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29503 : }
29504 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29505 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.jobid));
29506 : }
29507 0 : if (flags & NDR_OUT) {
29508 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29509 : }
29510 0 : return NDR_ERR_SUCCESS;
29511 : }
29512 :
29513 0 : static enum ndr_err_code ndr_pull_spoolss_ScheduleJob(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_ScheduleJob *r)
29514 : {
29515 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
29516 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29517 0 : if (flags & NDR_IN) {
29518 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29519 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
29520 : }
29521 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29522 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
29523 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29524 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29525 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.jobid));
29526 : }
29527 0 : if (flags & NDR_OUT) {
29528 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29529 : if (r->in.handle == NULL) {
29530 : NDR_PULL_ALLOC(ndr, r->in.handle);
29531 : NDR_ZERO_STRUCTP(r->in.handle);
29532 : }
29533 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29534 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29535 : }
29536 0 : return NDR_ERR_SUCCESS;
29537 : }
29538 :
29539 0 : _PUBLIC_ void ndr_print_spoolss_ScheduleJob(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_ScheduleJob *r)
29540 : {
29541 0 : ndr_print_struct(ndr, name, "spoolss_ScheduleJob");
29542 0 : if (r == NULL) { ndr_print_null(ndr); return; }
29543 0 : ndr->depth++;
29544 0 : if (flags & NDR_SET_VALUES) {
29545 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29546 : }
29547 0 : if (flags & NDR_IN) {
29548 0 : ndr_print_struct(ndr, "in", "spoolss_ScheduleJob");
29549 0 : ndr->depth++;
29550 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
29551 0 : ndr->depth++;
29552 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
29553 0 : ndr->depth--;
29554 0 : ndr_print_uint32(ndr, "jobid", r->in.jobid);
29555 0 : ndr->depth--;
29556 : }
29557 0 : if (flags & NDR_OUT) {
29558 0 : ndr_print_struct(ndr, "out", "spoolss_ScheduleJob");
29559 0 : ndr->depth++;
29560 0 : ndr_print_WERROR(ndr, "result", r->out.result);
29561 0 : ndr->depth--;
29562 : }
29563 0 : ndr->depth--;
29564 : }
29565 :
29566 960 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetPrinterData *r)
29567 : {
29568 960 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29569 960 : if (flags & NDR_IN) {
29570 480 : if (r->in.handle == NULL) {
29571 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29572 : }
29573 480 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29574 480 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
29575 480 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
29576 480 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
29577 480 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
29578 480 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
29579 : }
29580 960 : if (flags & NDR_OUT) {
29581 480 : if (r->out.type == NULL) {
29582 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29583 : }
29584 480 : if (r->out.data == NULL) {
29585 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29586 : }
29587 480 : if (r->out.needed == NULL) {
29588 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29589 : }
29590 480 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
29591 480 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
29592 480 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.offered));
29593 480 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
29594 480 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29595 : }
29596 960 : return NDR_ERR_SUCCESS;
29597 : }
29598 :
29599 966 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetPrinterData *r)
29600 : {
29601 966 : uint32_t size_value_name_0 = 0;
29602 966 : uint32_t length_value_name_0 = 0;
29603 966 : uint32_t size_data_1 = 0;
29604 966 : TALLOC_CTX *_mem_save_handle_0 = NULL;
29605 966 : TALLOC_CTX *_mem_save_type_0 = NULL;
29606 966 : TALLOC_CTX *_mem_save_needed_0 = NULL;
29607 966 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29608 966 : if (flags & NDR_IN) {
29609 484 : NDR_ZERO_STRUCT(r->out);
29610 :
29611 484 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29612 484 : NDR_PULL_ALLOC(ndr, r->in.handle);
29613 : }
29614 484 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29615 484 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
29616 484 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29617 484 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29618 484 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
29619 484 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
29620 484 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.value_name, &size_value_name_0));
29621 484 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.value_name, &length_value_name_0));
29622 484 : if (length_value_name_0 > size_value_name_0) {
29623 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_value_name_0, length_value_name_0);
29624 : }
29625 484 : NDR_CHECK(ndr_check_string_terminator(ndr, length_value_name_0, sizeof(uint16_t)));
29626 484 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, length_value_name_0, sizeof(uint16_t), CH_UTF16));
29627 484 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
29628 484 : NDR_PULL_ALLOC(ndr, r->out.type);
29629 484 : NDR_ZERO_STRUCTP(r->out.type);
29630 484 : NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.offered);
29631 484 : memset(r->out.data, 0, (r->in.offered) * sizeof(*r->out.data));
29632 484 : NDR_PULL_ALLOC(ndr, r->out.needed);
29633 484 : NDR_ZERO_STRUCTP(r->out.needed);
29634 : }
29635 966 : if (flags & NDR_OUT) {
29636 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29637 : if (r->in.handle == NULL) {
29638 : NDR_PULL_ALLOC(ndr, r->in.handle);
29639 : NDR_ZERO_STRUCTP(r->in.handle);
29640 : }
29641 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29642 482 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29643 2 : NDR_PULL_ALLOC(ndr, r->out.type);
29644 : }
29645 482 : _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
29646 482 : NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
29647 482 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
29648 482 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
29649 482 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
29650 482 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.data, &size_data_1));
29651 482 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29652 2 : NDR_PULL_ALLOC_N(ndr, r->out.data, size_data_1);
29653 : }
29654 482 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, size_data_1));
29655 482 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29656 2 : NDR_PULL_ALLOC(ndr, r->out.needed);
29657 : }
29658 482 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
29659 482 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
29660 482 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
29661 482 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
29662 482 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29663 482 : if (r->out.data) {
29664 482 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.data, r->in.offered));
29665 : }
29666 : }
29667 960 : return NDR_ERR_SUCCESS;
29668 : }
29669 :
29670 6 : _PUBLIC_ void ndr_print_spoolss_GetPrinterData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetPrinterData *r)
29671 : {
29672 6 : ndr_print_struct(ndr, name, "spoolss_GetPrinterData");
29673 6 : if (r == NULL) { ndr_print_null(ndr); return; }
29674 6 : ndr->depth++;
29675 6 : if (flags & NDR_SET_VALUES) {
29676 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29677 : }
29678 6 : if (flags & NDR_IN) {
29679 4 : ndr_print_struct(ndr, "in", "spoolss_GetPrinterData");
29680 4 : ndr->depth++;
29681 4 : ndr_print_ptr(ndr, "handle", r->in.handle);
29682 4 : ndr->depth++;
29683 4 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
29684 4 : ndr->depth--;
29685 4 : ndr_print_string(ndr, "value_name", r->in.value_name);
29686 4 : ndr_print_uint32(ndr, "offered", r->in.offered);
29687 4 : ndr->depth--;
29688 : }
29689 6 : if (flags & NDR_OUT) {
29690 2 : ndr_print_struct(ndr, "out", "spoolss_GetPrinterData");
29691 2 : ndr->depth++;
29692 2 : ndr_print_ptr(ndr, "type", r->out.type);
29693 2 : ndr->depth++;
29694 2 : ndr_print_winreg_Type(ndr, "type", *r->out.type);
29695 2 : ndr->depth--;
29696 2 : ndr_print_ptr(ndr, "data", r->out.data);
29697 2 : ndr->depth++;
29698 2 : ndr_print_array_uint8(ndr, "data", r->out.data, r->in.offered);
29699 2 : ndr->depth--;
29700 2 : ndr_print_ptr(ndr, "needed", r->out.needed);
29701 2 : ndr->depth++;
29702 2 : ndr_print_uint32(ndr, "needed", *r->out.needed);
29703 2 : ndr->depth--;
29704 2 : ndr_print_WERROR(ndr, "result", r->out.result);
29705 2 : ndr->depth--;
29706 : }
29707 6 : ndr->depth--;
29708 : }
29709 :
29710 336 : static enum ndr_err_code ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_SetPrinterData *r)
29711 : {
29712 336 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29713 336 : if (flags & NDR_IN) {
29714 168 : if (r->in.handle == NULL) {
29715 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29716 : }
29717 168 : if (r->in.data == NULL) {
29718 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29719 : }
29720 168 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29721 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
29722 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
29723 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
29724 168 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
29725 168 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
29726 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
29727 168 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.offered));
29728 168 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
29729 : }
29730 336 : if (flags & NDR_OUT) {
29731 168 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29732 : }
29733 336 : return NDR_ERR_SUCCESS;
29734 : }
29735 :
29736 336 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterData(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_SetPrinterData *r)
29737 : {
29738 336 : uint32_t size_value_name_0 = 0;
29739 336 : uint32_t length_value_name_0 = 0;
29740 336 : uint32_t size_data_1 = 0;
29741 336 : TALLOC_CTX *_mem_save_handle_0 = NULL;
29742 336 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29743 336 : if (flags & NDR_IN) {
29744 168 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29745 168 : NDR_PULL_ALLOC(ndr, r->in.handle);
29746 : }
29747 168 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29748 168 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
29749 168 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29750 168 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29751 168 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
29752 168 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
29753 168 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.value_name, &size_value_name_0));
29754 168 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.value_name, &length_value_name_0));
29755 168 : if (length_value_name_0 > size_value_name_0) {
29756 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_value_name_0, length_value_name_0);
29757 : }
29758 168 : NDR_CHECK(ndr_check_string_terminator(ndr, length_value_name_0, sizeof(uint16_t)));
29759 168 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, length_value_name_0, sizeof(uint16_t), CH_UTF16));
29760 168 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type));
29761 168 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
29762 168 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.data, &size_data_1));
29763 168 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29764 168 : NDR_PULL_ALLOC_N(ndr, r->in.data, size_data_1);
29765 : }
29766 168 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, size_data_1));
29767 168 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
29768 168 : if (r->in.data) {
29769 168 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.data, r->in.offered));
29770 : }
29771 : }
29772 336 : if (flags & NDR_OUT) {
29773 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29774 : if (r->in.handle == NULL) {
29775 : NDR_PULL_ALLOC(ndr, r->in.handle);
29776 : NDR_ZERO_STRUCTP(r->in.handle);
29777 : }
29778 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29779 168 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29780 : }
29781 336 : return NDR_ERR_SUCCESS;
29782 : }
29783 :
29784 0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_SetPrinterData *r)
29785 : {
29786 0 : ndr_print_struct(ndr, name, "spoolss_SetPrinterData");
29787 0 : if (r == NULL) { ndr_print_null(ndr); return; }
29788 0 : ndr->depth++;
29789 0 : if (flags & NDR_SET_VALUES) {
29790 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29791 : }
29792 0 : if (flags & NDR_IN) {
29793 0 : ndr_print_struct(ndr, "in", "spoolss_SetPrinterData");
29794 0 : ndr->depth++;
29795 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
29796 0 : ndr->depth++;
29797 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
29798 0 : ndr->depth--;
29799 0 : ndr_print_string(ndr, "value_name", r->in.value_name);
29800 0 : ndr_print_winreg_Type(ndr, "type", r->in.type);
29801 0 : ndr_print_ptr(ndr, "data", r->in.data);
29802 0 : ndr->depth++;
29803 0 : ndr_print_array_uint8(ndr, "data", r->in.data, r->in.offered);
29804 0 : ndr->depth--;
29805 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
29806 0 : ndr->depth--;
29807 : }
29808 0 : if (flags & NDR_OUT) {
29809 0 : ndr_print_struct(ndr, "out", "spoolss_SetPrinterData");
29810 0 : ndr->depth++;
29811 0 : ndr_print_WERROR(ndr, "result", r->out.result);
29812 0 : ndr->depth--;
29813 : }
29814 0 : ndr->depth--;
29815 : }
29816 :
29817 0 : static enum ndr_err_code ndr_push_spoolss_WaitForPrinterChange(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_WaitForPrinterChange *r)
29818 : {
29819 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29820 0 : if (flags & NDR_IN) {
29821 0 : }
29822 0 : if (flags & NDR_OUT) {
29823 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29824 : }
29825 0 : return NDR_ERR_SUCCESS;
29826 : }
29827 :
29828 0 : static enum ndr_err_code ndr_pull_spoolss_WaitForPrinterChange(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_WaitForPrinterChange *r)
29829 : {
29830 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29831 0 : if (flags & NDR_IN) {
29832 0 : }
29833 0 : if (flags & NDR_OUT) {
29834 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29835 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29836 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29837 : }
29838 0 : return NDR_ERR_SUCCESS;
29839 : }
29840 :
29841 0 : _PUBLIC_ void ndr_print_spoolss_WaitForPrinterChange(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_WaitForPrinterChange *r)
29842 : {
29843 0 : ndr_print_struct(ndr, name, "spoolss_WaitForPrinterChange");
29844 0 : if (r == NULL) { ndr_print_null(ndr); return; }
29845 0 : ndr->depth++;
29846 0 : if (flags & NDR_SET_VALUES) {
29847 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29848 : }
29849 0 : if (flags & NDR_IN) {
29850 0 : ndr_print_struct(ndr, "in", "spoolss_WaitForPrinterChange");
29851 0 : ndr->depth++;
29852 0 : ndr->depth--;
29853 : }
29854 0 : if (flags & NDR_OUT) {
29855 0 : ndr_print_struct(ndr, "out", "spoolss_WaitForPrinterChange");
29856 0 : ndr->depth++;
29857 0 : ndr_print_WERROR(ndr, "result", r->out.result);
29858 0 : ndr->depth--;
29859 : }
29860 0 : ndr->depth--;
29861 : }
29862 :
29863 1240 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_ClosePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_ClosePrinter *r)
29864 : {
29865 1240 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29866 1240 : if (flags & NDR_IN) {
29867 620 : if (r->in.handle == NULL) {
29868 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29869 : }
29870 620 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29871 : }
29872 1240 : if (flags & NDR_OUT) {
29873 620 : if (r->out.handle == NULL) {
29874 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29875 : }
29876 620 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
29877 620 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29878 : }
29879 1240 : return NDR_ERR_SUCCESS;
29880 : }
29881 :
29882 1244 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_ClosePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_ClosePrinter *r)
29883 : {
29884 1244 : TALLOC_CTX *_mem_save_handle_0 = NULL;
29885 1244 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29886 1244 : if (flags & NDR_IN) {
29887 622 : NDR_ZERO_STRUCT(r->out);
29888 :
29889 622 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29890 622 : NDR_PULL_ALLOC(ndr, r->in.handle);
29891 : }
29892 622 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29893 622 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
29894 622 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29895 622 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29896 622 : NDR_PULL_ALLOC(ndr, r->out.handle);
29897 622 : *r->out.handle = *r->in.handle;
29898 : }
29899 1244 : if (flags & NDR_OUT) {
29900 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29901 : if (r->in.handle == NULL) {
29902 : NDR_PULL_ALLOC(ndr, r->in.handle);
29903 : NDR_ZERO_STRUCTP(r->in.handle);
29904 : }
29905 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29906 622 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29907 36 : NDR_PULL_ALLOC(ndr, r->out.handle);
29908 : }
29909 622 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29910 622 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
29911 622 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
29912 622 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29913 622 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29914 : }
29915 1240 : return NDR_ERR_SUCCESS;
29916 : }
29917 :
29918 4 : _PUBLIC_ void ndr_print_spoolss_ClosePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_ClosePrinter *r)
29919 : {
29920 4 : ndr_print_struct(ndr, name, "spoolss_ClosePrinter");
29921 4 : if (r == NULL) { ndr_print_null(ndr); return; }
29922 4 : ndr->depth++;
29923 4 : if (flags & NDR_SET_VALUES) {
29924 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29925 : }
29926 4 : if (flags & NDR_IN) {
29927 2 : ndr_print_struct(ndr, "in", "spoolss_ClosePrinter");
29928 2 : ndr->depth++;
29929 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
29930 2 : ndr->depth++;
29931 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
29932 2 : ndr->depth--;
29933 2 : ndr->depth--;
29934 : }
29935 4 : if (flags & NDR_OUT) {
29936 2 : ndr_print_struct(ndr, "out", "spoolss_ClosePrinter");
29937 2 : ndr->depth++;
29938 2 : ndr_print_ptr(ndr, "handle", r->out.handle);
29939 2 : ndr->depth++;
29940 2 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
29941 2 : ndr->depth--;
29942 2 : ndr_print_WERROR(ndr, "result", r->out.result);
29943 2 : ndr->depth--;
29944 : }
29945 4 : ndr->depth--;
29946 : }
29947 :
29948 1152 : static enum ndr_err_code ndr_push_spoolss_AddForm(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddForm *r)
29949 : {
29950 1152 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
29951 1152 : if (flags & NDR_IN) {
29952 576 : if (r->in.handle == NULL) {
29953 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29954 : }
29955 576 : if (r->in.info_ctr == NULL) {
29956 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29957 : }
29958 576 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29959 576 : NDR_CHECK(ndr_push_spoolss_AddFormInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
29960 : }
29961 1152 : if (flags & NDR_OUT) {
29962 576 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29963 : }
29964 1152 : return NDR_ERR_SUCCESS;
29965 : }
29966 :
29967 1152 : static enum ndr_err_code ndr_pull_spoolss_AddForm(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddForm *r)
29968 : {
29969 1152 : TALLOC_CTX *_mem_save_handle_0 = NULL;
29970 1152 : TALLOC_CTX *_mem_save_info_ctr_0 = NULL;
29971 1152 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
29972 1152 : if (flags & NDR_IN) {
29973 576 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29974 576 : NDR_PULL_ALLOC(ndr, r->in.handle);
29975 : }
29976 576 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
29977 576 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
29978 576 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
29979 576 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
29980 576 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29981 576 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
29982 : }
29983 576 : _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
29984 576 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
29985 576 : NDR_CHECK(ndr_pull_spoolss_AddFormInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
29986 576 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
29987 : }
29988 1152 : if (flags & NDR_OUT) {
29989 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
29990 : if (r->in.handle == NULL) {
29991 : NDR_PULL_ALLOC(ndr, r->in.handle);
29992 : NDR_ZERO_STRUCTP(r->in.handle);
29993 : }
29994 : if (r->in.info_ctr == NULL) {
29995 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
29996 : NDR_ZERO_STRUCTP(r->in.info_ctr);
29997 : }
29998 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
29999 576 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
30000 : }
30001 1152 : return NDR_ERR_SUCCESS;
30002 : }
30003 :
30004 0 : _PUBLIC_ void ndr_print_spoolss_AddForm(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddForm *r)
30005 : {
30006 0 : ndr_print_struct(ndr, name, "spoolss_AddForm");
30007 0 : if (r == NULL) { ndr_print_null(ndr); return; }
30008 0 : ndr->depth++;
30009 0 : if (flags & NDR_SET_VALUES) {
30010 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
30011 : }
30012 0 : if (flags & NDR_IN) {
30013 0 : ndr_print_struct(ndr, "in", "spoolss_AddForm");
30014 0 : ndr->depth++;
30015 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
30016 0 : ndr->depth++;
30017 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
30018 0 : ndr->depth--;
30019 0 : ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
30020 0 : ndr->depth++;
30021 0 : ndr_print_spoolss_AddFormInfoCtr(ndr, "info_ctr", r->in.info_ctr);
30022 0 : ndr->depth--;
30023 0 : ndr->depth--;
30024 : }
30025 0 : if (flags & NDR_OUT) {
30026 0 : ndr_print_struct(ndr, "out", "spoolss_AddForm");
30027 0 : ndr->depth++;
30028 0 : ndr_print_WERROR(ndr, "result", r->out.result);
30029 0 : ndr->depth--;
30030 : }
30031 0 : ndr->depth--;
30032 : }
30033 :
30034 768 : static enum ndr_err_code ndr_push_spoolss_DeleteForm(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeleteForm *r)
30035 : {
30036 768 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
30037 768 : if (flags & NDR_IN) {
30038 384 : if (r->in.handle == NULL) {
30039 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30040 : }
30041 384 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
30042 384 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
30043 384 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
30044 384 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
30045 384 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.form_name, ndr_charset_length(r->in.form_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
30046 : }
30047 768 : if (flags & NDR_OUT) {
30048 384 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
30049 : }
30050 768 : return NDR_ERR_SUCCESS;
30051 : }
30052 :
30053 768 : static enum ndr_err_code ndr_pull_spoolss_DeleteForm(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeleteForm *r)
30054 : {
30055 768 : uint32_t size_form_name_0 = 0;
30056 768 : uint32_t length_form_name_0 = 0;
30057 768 : TALLOC_CTX *_mem_save_handle_0 = NULL;
30058 768 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
30059 768 : if (flags & NDR_IN) {
30060 384 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30061 384 : NDR_PULL_ALLOC(ndr, r->in.handle);
30062 : }
30063 384 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
30064 384 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
30065 384 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
30066 384 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
30067 384 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.form_name));
30068 384 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.form_name));
30069 384 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.form_name, &size_form_name_0));
30070 384 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.form_name, &length_form_name_0));
30071 384 : if (length_form_name_0 > size_form_name_0) {
30072 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_form_name_0, length_form_name_0);
30073 : }
30074 384 : NDR_CHECK(ndr_check_string_terminator(ndr, length_form_name_0, sizeof(uint16_t)));
30075 384 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.form_name, length_form_name_0, sizeof(uint16_t), CH_UTF16));
30076 : }
30077 768 : if (flags & NDR_OUT) {
30078 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
30079 : if (r->in.handle == NULL) {
30080 : NDR_PULL_ALLOC(ndr, r->in.handle);
30081 : NDR_ZERO_STRUCTP(r->in.handle);
30082 : }
30083 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
30084 384 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
30085 : }
30086 768 : return NDR_ERR_SUCCESS;
30087 : }
30088 :
30089 0 : _PUBLIC_ void ndr_print_spoolss_DeleteForm(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeleteForm *r)
30090 : {
30091 0 : ndr_print_struct(ndr, name, "spoolss_DeleteForm");
30092 0 : if (r == NULL) { ndr_print_null(ndr); return; }
30093 0 : ndr->depth++;
30094 0 : if (flags & NDR_SET_VALUES) {
30095 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
30096 : }
30097 0 : if (flags & NDR_IN) {
30098 0 : ndr_print_struct(ndr, "in", "spoolss_DeleteForm");
30099 0 : ndr->depth++;
30100 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
30101 0 : ndr->depth++;
30102 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
30103 0 : ndr->depth--;
30104 0 : ndr_print_string(ndr, "form_name", r->in.form_name);
30105 0 : ndr->depth--;
30106 : }
30107 0 : if (flags & NDR_OUT) {
30108 0 : ndr_print_struct(ndr, "out", "spoolss_DeleteForm");
30109 0 : ndr->depth++;
30110 0 : ndr_print_WERROR(ndr, "result", r->out.result);
30111 0 : ndr->depth--;
30112 : }
30113 0 : ndr->depth--;
30114 : }
30115 :
30116 10080 : static enum ndr_err_code ndr_push_spoolss_GetForm(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetForm *r)
30117 : {
30118 10080 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
30119 10080 : if (flags & NDR_IN) {
30120 5040 : if (r->in.handle == NULL) {
30121 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30122 : }
30123 5040 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
30124 5040 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
30125 5040 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
30126 5040 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
30127 5040 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.form_name, ndr_charset_length(r->in.form_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
30128 5040 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
30129 5040 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
30130 5040 : if (r->in.buffer) {
30131 2520 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
30132 : }
30133 5040 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
30134 : }
30135 10080 : if (flags & NDR_OUT) {
30136 5040 : if (r->out.needed == NULL) {
30137 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30138 : }
30139 5040 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
30140 5040 : if (r->out.info) {
30141 : {
30142 0 : struct ndr_push *_ndr_info;
30143 2520 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
30144 2520 : NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
30145 2520 : NDR_CHECK(ndr_push_spoolss_FormInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
30146 2520 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
30147 : }
30148 : }
30149 5040 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
30150 5040 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
30151 : }
30152 10080 : return NDR_ERR_SUCCESS;
30153 : }
30154 :
30155 10080 : static enum ndr_err_code ndr_pull_spoolss_GetForm(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetForm *r)
30156 : {
30157 10080 : uint32_t size_form_name_0 = 0;
30158 10080 : uint32_t length_form_name_0 = 0;
30159 0 : uint32_t _ptr_buffer;
30160 0 : uint32_t _ptr_info;
30161 10080 : TALLOC_CTX *_mem_save_handle_0 = NULL;
30162 10080 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
30163 10080 : TALLOC_CTX *_mem_save_info_0 = NULL;
30164 10080 : TALLOC_CTX *_mem_save_needed_0 = NULL;
30165 10080 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
30166 10080 : if (flags & NDR_IN) {
30167 5040 : NDR_ZERO_STRUCT(r->out);
30168 :
30169 5040 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30170 5040 : NDR_PULL_ALLOC(ndr, r->in.handle);
30171 : }
30172 5040 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
30173 5040 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
30174 5040 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
30175 5040 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
30176 5040 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.form_name));
30177 5040 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.form_name));
30178 5040 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.form_name, &size_form_name_0));
30179 5040 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.form_name, &length_form_name_0));
30180 5040 : if (length_form_name_0 > size_form_name_0) {
30181 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_form_name_0, length_form_name_0);
30182 : }
30183 5040 : NDR_CHECK(ndr_check_string_terminator(ndr, length_form_name_0, sizeof(uint16_t)));
30184 5040 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.form_name, length_form_name_0, sizeof(uint16_t), CH_UTF16));
30185 5040 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
30186 5040 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
30187 5040 : if (_ptr_buffer) {
30188 2520 : NDR_PULL_ALLOC(ndr, r->in.buffer);
30189 : } else {
30190 2520 : r->in.buffer = NULL;
30191 : }
30192 5040 : if (r->in.buffer) {
30193 2520 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
30194 2520 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
30195 2520 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
30196 2520 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
30197 : }
30198 5040 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
30199 5040 : NDR_PULL_ALLOC(ndr, r->out.needed);
30200 5040 : NDR_ZERO_STRUCTP(r->out.needed);
30201 : }
30202 10080 : if (flags & NDR_OUT) {
30203 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
30204 : if (r->in.handle == NULL) {
30205 : NDR_PULL_ALLOC(ndr, r->in.handle);
30206 : NDR_ZERO_STRUCTP(r->in.handle);
30207 : }
30208 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
30209 5040 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
30210 5040 : if (_ptr_info) {
30211 2520 : NDR_PULL_ALLOC(ndr, r->out.info);
30212 : } else {
30213 2520 : r->out.info = NULL;
30214 : }
30215 5040 : if (r->out.info) {
30216 2520 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
30217 2520 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
30218 : {
30219 0 : struct ndr_pull *_ndr_info;
30220 2520 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
30221 2520 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
30222 2520 : NDR_CHECK(ndr_pull_spoolss_FormInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
30223 2520 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
30224 : }
30225 2520 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
30226 : }
30227 5040 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30228 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
30229 : }
30230 5040 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
30231 5040 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
30232 5040 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
30233 5040 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
30234 5040 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
30235 : }
30236 10080 : return NDR_ERR_SUCCESS;
30237 : }
30238 :
30239 0 : _PUBLIC_ void ndr_print_spoolss_GetForm(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetForm *r)
30240 : {
30241 0 : ndr_print_struct(ndr, name, "spoolss_GetForm");
30242 0 : if (r == NULL) { ndr_print_null(ndr); return; }
30243 0 : ndr->depth++;
30244 0 : if (flags & NDR_SET_VALUES) {
30245 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
30246 : }
30247 0 : if (flags & NDR_IN) {
30248 0 : ndr_print_struct(ndr, "in", "spoolss_GetForm");
30249 0 : ndr->depth++;
30250 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
30251 0 : ndr->depth++;
30252 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
30253 0 : ndr->depth--;
30254 0 : ndr_print_string(ndr, "form_name", r->in.form_name);
30255 0 : ndr_print_uint32(ndr, "level", r->in.level);
30256 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
30257 0 : ndr->depth++;
30258 0 : if (r->in.buffer) {
30259 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
30260 : }
30261 0 : ndr->depth--;
30262 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
30263 0 : ndr->depth--;
30264 : }
30265 0 : if (flags & NDR_OUT) {
30266 0 : ndr_print_struct(ndr, "out", "spoolss_GetForm");
30267 0 : ndr->depth++;
30268 0 : ndr_print_ptr(ndr, "info", r->out.info);
30269 0 : ndr->depth++;
30270 0 : if (r->out.info) {
30271 0 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
30272 0 : ndr_print_spoolss_FormInfo(ndr, "info", r->out.info);
30273 : }
30274 0 : ndr->depth--;
30275 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
30276 0 : ndr->depth++;
30277 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
30278 0 : ndr->depth--;
30279 0 : ndr_print_WERROR(ndr, "result", r->out.result);
30280 0 : ndr->depth--;
30281 : }
30282 0 : ndr->depth--;
30283 : }
30284 :
30285 160 : static enum ndr_err_code ndr_push_spoolss_SetForm(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_SetForm *r)
30286 : {
30287 160 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
30288 160 : if (flags & NDR_IN) {
30289 80 : if (r->in.handle == NULL) {
30290 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30291 : }
30292 80 : if (r->in.info_ctr == NULL) {
30293 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30294 : }
30295 80 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
30296 80 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
30297 80 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
30298 80 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
30299 80 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.form_name, ndr_charset_length(r->in.form_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
30300 80 : NDR_CHECK(ndr_push_spoolss_AddFormInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
30301 : }
30302 160 : if (flags & NDR_OUT) {
30303 80 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
30304 : }
30305 160 : return NDR_ERR_SUCCESS;
30306 : }
30307 :
30308 160 : static enum ndr_err_code ndr_pull_spoolss_SetForm(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_SetForm *r)
30309 : {
30310 160 : uint32_t size_form_name_0 = 0;
30311 160 : uint32_t length_form_name_0 = 0;
30312 160 : TALLOC_CTX *_mem_save_handle_0 = NULL;
30313 160 : TALLOC_CTX *_mem_save_info_ctr_0 = NULL;
30314 160 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
30315 160 : if (flags & NDR_IN) {
30316 80 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30317 80 : NDR_PULL_ALLOC(ndr, r->in.handle);
30318 : }
30319 80 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
30320 80 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
30321 80 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
30322 80 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
30323 80 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.form_name));
30324 80 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.form_name));
30325 80 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.form_name, &size_form_name_0));
30326 80 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.form_name, &length_form_name_0));
30327 80 : if (length_form_name_0 > size_form_name_0) {
30328 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_form_name_0, length_form_name_0);
30329 : }
30330 80 : NDR_CHECK(ndr_check_string_terminator(ndr, length_form_name_0, sizeof(uint16_t)));
30331 80 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.form_name, length_form_name_0, sizeof(uint16_t), CH_UTF16));
30332 80 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30333 80 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
30334 : }
30335 80 : _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
30336 80 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
30337 80 : NDR_CHECK(ndr_pull_spoolss_AddFormInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
30338 80 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
30339 : }
30340 160 : if (flags & NDR_OUT) {
30341 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
30342 : if (r->in.handle == NULL) {
30343 : NDR_PULL_ALLOC(ndr, r->in.handle);
30344 : NDR_ZERO_STRUCTP(r->in.handle);
30345 : }
30346 : if (r->in.info_ctr == NULL) {
30347 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
30348 : NDR_ZERO_STRUCTP(r->in.info_ctr);
30349 : }
30350 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
30351 80 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
30352 : }
30353 160 : return NDR_ERR_SUCCESS;
30354 : }
30355 :
30356 0 : _PUBLIC_ void ndr_print_spoolss_SetForm(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_SetForm *r)
30357 : {
30358 0 : ndr_print_struct(ndr, name, "spoolss_SetForm");
30359 0 : if (r == NULL) { ndr_print_null(ndr); return; }
30360 0 : ndr->depth++;
30361 0 : if (flags & NDR_SET_VALUES) {
30362 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
30363 : }
30364 0 : if (flags & NDR_IN) {
30365 0 : ndr_print_struct(ndr, "in", "spoolss_SetForm");
30366 0 : ndr->depth++;
30367 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
30368 0 : ndr->depth++;
30369 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
30370 0 : ndr->depth--;
30371 0 : ndr_print_string(ndr, "form_name", r->in.form_name);
30372 0 : ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
30373 0 : ndr->depth++;
30374 0 : ndr_print_spoolss_AddFormInfoCtr(ndr, "info_ctr", r->in.info_ctr);
30375 0 : ndr->depth--;
30376 0 : ndr->depth--;
30377 : }
30378 0 : if (flags & NDR_OUT) {
30379 0 : ndr_print_struct(ndr, "out", "spoolss_SetForm");
30380 0 : ndr->depth++;
30381 0 : ndr_print_WERROR(ndr, "result", r->out.result);
30382 0 : ndr->depth--;
30383 : }
30384 0 : ndr->depth--;
30385 : }
30386 :
30387 1120 : _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumForms(struct ndr_push *ndr, ndr_flags_type flags, const struct _spoolss_EnumForms *r)
30388 : {
30389 1120 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
30390 1120 : if (flags & NDR_IN) {
30391 560 : if (r->in.handle == NULL) {
30392 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30393 : }
30394 560 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
30395 560 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
30396 560 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
30397 560 : if (r->in.buffer) {
30398 268 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
30399 : }
30400 560 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
30401 : }
30402 1120 : if (flags & NDR_OUT) {
30403 560 : if (r->out.needed == NULL) {
30404 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30405 : }
30406 560 : if (r->out.count == NULL) {
30407 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30408 : }
30409 560 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
30410 560 : if (r->out.info) {
30411 268 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
30412 : }
30413 560 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
30414 560 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
30415 560 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
30416 : }
30417 1120 : return NDR_ERR_SUCCESS;
30418 : }
30419 :
30420 1125 : _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumForms(struct ndr_pull *ndr, ndr_flags_type flags, struct _spoolss_EnumForms *r)
30421 : {
30422 5 : uint32_t _ptr_buffer;
30423 5 : uint32_t _ptr_info;
30424 1125 : TALLOC_CTX *_mem_save_handle_0 = NULL;
30425 1125 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
30426 1125 : TALLOC_CTX *_mem_save_info_0 = NULL;
30427 1125 : TALLOC_CTX *_mem_save_needed_0 = NULL;
30428 1125 : TALLOC_CTX *_mem_save_count_0 = NULL;
30429 1125 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
30430 1125 : if (flags & NDR_IN) {
30431 562 : NDR_ZERO_STRUCT(r->out);
30432 :
30433 562 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30434 562 : NDR_PULL_ALLOC(ndr, r->in.handle);
30435 : }
30436 562 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
30437 562 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
30438 562 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
30439 562 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
30440 562 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
30441 562 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
30442 562 : if (_ptr_buffer) {
30443 268 : NDR_PULL_ALLOC(ndr, r->in.buffer);
30444 : } else {
30445 294 : r->in.buffer = NULL;
30446 : }
30447 562 : if (r->in.buffer) {
30448 268 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
30449 268 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
30450 268 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
30451 268 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
30452 : }
30453 562 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
30454 562 : NDR_PULL_ALLOC(ndr, r->out.needed);
30455 562 : NDR_ZERO_STRUCTP(r->out.needed);
30456 562 : NDR_PULL_ALLOC(ndr, r->out.count);
30457 562 : NDR_ZERO_STRUCTP(r->out.count);
30458 : }
30459 1125 : if (flags & NDR_OUT) {
30460 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
30461 : if (r->in.handle == NULL) {
30462 : NDR_PULL_ALLOC(ndr, r->in.handle);
30463 : NDR_ZERO_STRUCTP(r->in.handle);
30464 : }
30465 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
30466 563 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
30467 563 : if (_ptr_info) {
30468 269 : NDR_PULL_ALLOC(ndr, r->out.info);
30469 : } else {
30470 294 : r->out.info = NULL;
30471 : }
30472 563 : if (r->out.info) {
30473 269 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
30474 269 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
30475 269 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
30476 269 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
30477 : }
30478 563 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30479 3 : NDR_PULL_ALLOC(ndr, r->out.needed);
30480 : }
30481 563 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
30482 563 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
30483 563 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
30484 563 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
30485 563 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30486 3 : NDR_PULL_ALLOC(ndr, r->out.count);
30487 : }
30488 563 : _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
30489 563 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
30490 563 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
30491 563 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
30492 563 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
30493 : }
30494 1120 : return NDR_ERR_SUCCESS;
30495 : }
30496 :
30497 804 : _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumForms(struct ndr_push *ndr, ndr_flags_type flags, const struct __spoolss_EnumForms *r)
30498 : {
30499 0 : uint32_t cntr_info_0;
30500 804 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
30501 804 : if (flags & NDR_IN) {
30502 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
30503 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
30504 : }
30505 804 : if (flags & NDR_OUT) {
30506 95964 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
30507 95160 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
30508 95160 : NDR_CHECK(ndr_push_spoolss_FormInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
30509 : }
30510 95964 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
30511 95160 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
30512 95160 : NDR_CHECK(ndr_push_spoolss_FormInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
30513 : }
30514 : }
30515 804 : return NDR_ERR_SUCCESS;
30516 : }
30517 :
30518 269 : _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumForms(struct ndr_pull *ndr, ndr_flags_type flags, struct __spoolss_EnumForms *r)
30519 : {
30520 269 : uint32_t size_info_0 = 0;
30521 1 : uint32_t cntr_info_0;
30522 269 : TALLOC_CTX *_mem_save_info_0 = NULL;
30523 269 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
30524 269 : if (flags & NDR_IN) {
30525 0 : NDR_ZERO_STRUCT(r->out);
30526 :
30527 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
30528 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
30529 : }
30530 269 : if (flags & NDR_OUT) {
30531 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
30532 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
30533 269 : size_info_0 = r->in.count;
30534 269 : NDR_PULL_ALLOC_N(ndr, r->out.info, size_info_0);
30535 269 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
30536 269 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
30537 32245 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
30538 31976 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
30539 31976 : NDR_CHECK(ndr_pull_spoolss_FormInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
30540 : }
30541 32245 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
30542 31976 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
30543 31976 : NDR_CHECK(ndr_pull_spoolss_FormInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
30544 : }
30545 269 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
30546 31989 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
30547 : }
30548 : }
30549 268 : return NDR_ERR_SUCCESS;
30550 : }
30551 :
30552 5 : _PUBLIC_ void ndr_print_spoolss_EnumForms(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumForms *r)
30553 : {
30554 5 : uint32_t cntr_info_2;
30555 5 : ndr_print_struct(ndr, name, "spoolss_EnumForms");
30556 5 : if (r == NULL) { ndr_print_null(ndr); return; }
30557 5 : ndr->depth++;
30558 5 : if (flags & NDR_SET_VALUES) {
30559 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
30560 : }
30561 5 : if (flags & NDR_IN) {
30562 2 : ndr_print_struct(ndr, "in", "spoolss_EnumForms");
30563 2 : ndr->depth++;
30564 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
30565 2 : ndr->depth++;
30566 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
30567 2 : ndr->depth--;
30568 2 : ndr_print_uint32(ndr, "level", r->in.level);
30569 2 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
30570 2 : ndr->depth++;
30571 2 : if (r->in.buffer) {
30572 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
30573 : }
30574 2 : ndr->depth--;
30575 2 : ndr_print_uint32(ndr, "offered", r->in.offered);
30576 2 : ndr->depth--;
30577 : }
30578 5 : if (flags & NDR_OUT) {
30579 3 : ndr_print_struct(ndr, "out", "spoolss_EnumForms");
30580 3 : ndr->depth++;
30581 3 : ndr_print_ptr(ndr, "count", r->out.count);
30582 3 : ndr->depth++;
30583 3 : ndr_print_uint32(ndr, "count", *r->out.count);
30584 3 : ndr->depth--;
30585 3 : ndr_print_ptr(ndr, "info", r->out.info);
30586 3 : ndr->depth++;
30587 3 : ndr_print_ptr(ndr, "info", *r->out.info);
30588 3 : ndr->depth++;
30589 3 : if (*r->out.info) {
30590 1 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(*r->out.count));
30591 1 : ndr->depth++;
30592 257 : for (cntr_info_2 = 0; cntr_info_2 < (*r->out.count); cntr_info_2++) {
30593 256 : ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
30594 256 : ndr_print_spoolss_FormInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
30595 : }
30596 1 : ndr->depth--;
30597 : }
30598 3 : ndr->depth--;
30599 3 : ndr->depth--;
30600 3 : ndr_print_ptr(ndr, "needed", r->out.needed);
30601 3 : ndr->depth++;
30602 3 : ndr_print_uint32(ndr, "needed", *r->out.needed);
30603 3 : ndr->depth--;
30604 3 : ndr_print_WERROR(ndr, "result", r->out.result);
30605 3 : ndr->depth--;
30606 : }
30607 5 : ndr->depth--;
30608 : }
30609 :
30610 48 : _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPorts(struct ndr_push *ndr, ndr_flags_type flags, const struct _spoolss_EnumPorts *r)
30611 : {
30612 48 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
30613 48 : if (flags & NDR_IN) {
30614 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
30615 24 : if (r->in.servername) {
30616 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
30617 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
30618 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
30619 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
30620 : }
30621 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
30622 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
30623 24 : if (r->in.buffer) {
30624 12 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
30625 : }
30626 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
30627 : }
30628 48 : if (flags & NDR_OUT) {
30629 24 : if (r->out.needed == NULL) {
30630 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30631 : }
30632 24 : if (r->out.count == NULL) {
30633 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30634 : }
30635 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
30636 24 : if (r->out.info) {
30637 12 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
30638 : }
30639 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
30640 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
30641 24 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
30642 : }
30643 48 : return NDR_ERR_SUCCESS;
30644 : }
30645 :
30646 48 : _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPorts(struct ndr_pull *ndr, ndr_flags_type flags, struct _spoolss_EnumPorts *r)
30647 : {
30648 0 : uint32_t _ptr_servername;
30649 48 : uint32_t size_servername_1 = 0;
30650 48 : uint32_t length_servername_1 = 0;
30651 0 : uint32_t _ptr_buffer;
30652 0 : uint32_t _ptr_info;
30653 48 : TALLOC_CTX *_mem_save_servername_0 = NULL;
30654 48 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
30655 48 : TALLOC_CTX *_mem_save_info_0 = NULL;
30656 48 : TALLOC_CTX *_mem_save_needed_0 = NULL;
30657 48 : TALLOC_CTX *_mem_save_count_0 = NULL;
30658 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
30659 48 : if (flags & NDR_IN) {
30660 24 : NDR_ZERO_STRUCT(r->out);
30661 :
30662 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
30663 24 : if (_ptr_servername) {
30664 24 : NDR_PULL_ALLOC(ndr, r->in.servername);
30665 : } else {
30666 0 : r->in.servername = NULL;
30667 : }
30668 24 : if (r->in.servername) {
30669 24 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
30670 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
30671 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
30672 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
30673 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
30674 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
30675 24 : if (length_servername_1 > size_servername_1) {
30676 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
30677 : }
30678 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
30679 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
30680 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
30681 : }
30682 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
30683 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
30684 24 : if (_ptr_buffer) {
30685 12 : NDR_PULL_ALLOC(ndr, r->in.buffer);
30686 : } else {
30687 12 : r->in.buffer = NULL;
30688 : }
30689 24 : if (r->in.buffer) {
30690 12 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
30691 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
30692 12 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
30693 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
30694 : }
30695 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
30696 24 : NDR_PULL_ALLOC(ndr, r->out.needed);
30697 24 : NDR_ZERO_STRUCTP(r->out.needed);
30698 24 : NDR_PULL_ALLOC(ndr, r->out.count);
30699 24 : NDR_ZERO_STRUCTP(r->out.count);
30700 : }
30701 48 : if (flags & NDR_OUT) {
30702 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
30703 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
30704 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
30705 24 : if (_ptr_info) {
30706 12 : NDR_PULL_ALLOC(ndr, r->out.info);
30707 : } else {
30708 12 : r->out.info = NULL;
30709 : }
30710 24 : if (r->out.info) {
30711 12 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
30712 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
30713 12 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
30714 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
30715 : }
30716 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30717 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
30718 : }
30719 24 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
30720 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
30721 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
30722 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
30723 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30724 0 : NDR_PULL_ALLOC(ndr, r->out.count);
30725 : }
30726 24 : _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
30727 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
30728 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
30729 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
30730 24 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
30731 : }
30732 48 : return NDR_ERR_SUCCESS;
30733 : }
30734 :
30735 36 : _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPorts(struct ndr_push *ndr, ndr_flags_type flags, const struct __spoolss_EnumPorts *r)
30736 : {
30737 0 : uint32_t cntr_info_0;
30738 36 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
30739 36 : if (flags & NDR_IN) {
30740 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
30741 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
30742 : }
30743 36 : if (flags & NDR_OUT) {
30744 72 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
30745 36 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
30746 36 : NDR_CHECK(ndr_push_spoolss_PortInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
30747 : }
30748 72 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
30749 36 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
30750 36 : NDR_CHECK(ndr_push_spoolss_PortInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
30751 : }
30752 : }
30753 36 : return NDR_ERR_SUCCESS;
30754 : }
30755 :
30756 12 : _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPorts(struct ndr_pull *ndr, ndr_flags_type flags, struct __spoolss_EnumPorts *r)
30757 : {
30758 12 : uint32_t size_info_0 = 0;
30759 0 : uint32_t cntr_info_0;
30760 12 : TALLOC_CTX *_mem_save_info_0 = NULL;
30761 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
30762 12 : if (flags & NDR_IN) {
30763 0 : NDR_ZERO_STRUCT(r->out);
30764 :
30765 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
30766 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
30767 : }
30768 12 : if (flags & NDR_OUT) {
30769 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
30770 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
30771 12 : size_info_0 = r->in.count;
30772 12 : NDR_PULL_ALLOC_N(ndr, r->out.info, size_info_0);
30773 12 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
30774 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
30775 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
30776 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
30777 12 : NDR_CHECK(ndr_pull_spoolss_PortInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
30778 : }
30779 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
30780 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
30781 12 : NDR_CHECK(ndr_pull_spoolss_PortInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
30782 : }
30783 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
30784 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
30785 : }
30786 : }
30787 12 : return NDR_ERR_SUCCESS;
30788 : }
30789 :
30790 0 : _PUBLIC_ void ndr_print_spoolss_EnumPorts(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumPorts *r)
30791 : {
30792 0 : uint32_t cntr_info_2;
30793 0 : ndr_print_struct(ndr, name, "spoolss_EnumPorts");
30794 0 : if (r == NULL) { ndr_print_null(ndr); return; }
30795 0 : ndr->depth++;
30796 0 : if (flags & NDR_SET_VALUES) {
30797 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
30798 : }
30799 0 : if (flags & NDR_IN) {
30800 0 : ndr_print_struct(ndr, "in", "spoolss_EnumPorts");
30801 0 : ndr->depth++;
30802 0 : ndr_print_ptr(ndr, "servername", r->in.servername);
30803 0 : ndr->depth++;
30804 0 : if (r->in.servername) {
30805 0 : ndr_print_string(ndr, "servername", r->in.servername);
30806 : }
30807 0 : ndr->depth--;
30808 0 : ndr_print_uint32(ndr, "level", r->in.level);
30809 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
30810 0 : ndr->depth++;
30811 0 : if (r->in.buffer) {
30812 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
30813 : }
30814 0 : ndr->depth--;
30815 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
30816 0 : ndr->depth--;
30817 : }
30818 0 : if (flags & NDR_OUT) {
30819 0 : ndr_print_struct(ndr, "out", "spoolss_EnumPorts");
30820 0 : ndr->depth++;
30821 0 : ndr_print_ptr(ndr, "count", r->out.count);
30822 0 : ndr->depth++;
30823 0 : ndr_print_uint32(ndr, "count", *r->out.count);
30824 0 : ndr->depth--;
30825 0 : ndr_print_ptr(ndr, "info", r->out.info);
30826 0 : ndr->depth++;
30827 0 : ndr_print_ptr(ndr, "info", *r->out.info);
30828 0 : ndr->depth++;
30829 0 : if (*r->out.info) {
30830 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(*r->out.count));
30831 0 : ndr->depth++;
30832 0 : for (cntr_info_2 = 0; cntr_info_2 < (*r->out.count); cntr_info_2++) {
30833 0 : ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
30834 0 : ndr_print_spoolss_PortInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
30835 : }
30836 0 : ndr->depth--;
30837 : }
30838 0 : ndr->depth--;
30839 0 : ndr->depth--;
30840 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
30841 0 : ndr->depth++;
30842 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
30843 0 : ndr->depth--;
30844 0 : ndr_print_WERROR(ndr, "result", r->out.result);
30845 0 : ndr->depth--;
30846 : }
30847 0 : ndr->depth--;
30848 : }
30849 :
30850 32 : _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumMonitors(struct ndr_push *ndr, ndr_flags_type flags, const struct _spoolss_EnumMonitors *r)
30851 : {
30852 32 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
30853 32 : if (flags & NDR_IN) {
30854 16 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
30855 16 : if (r->in.servername) {
30856 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
30857 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
30858 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
30859 16 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
30860 : }
30861 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
30862 16 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
30863 16 : if (r->in.buffer) {
30864 8 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
30865 : }
30866 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
30867 : }
30868 32 : if (flags & NDR_OUT) {
30869 16 : if (r->out.needed == NULL) {
30870 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30871 : }
30872 16 : if (r->out.count == NULL) {
30873 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
30874 : }
30875 16 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
30876 16 : if (r->out.info) {
30877 8 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
30878 : }
30879 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
30880 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
30881 16 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
30882 : }
30883 32 : return NDR_ERR_SUCCESS;
30884 : }
30885 :
30886 32 : _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumMonitors(struct ndr_pull *ndr, ndr_flags_type flags, struct _spoolss_EnumMonitors *r)
30887 : {
30888 0 : uint32_t _ptr_servername;
30889 32 : uint32_t size_servername_1 = 0;
30890 32 : uint32_t length_servername_1 = 0;
30891 0 : uint32_t _ptr_buffer;
30892 0 : uint32_t _ptr_info;
30893 32 : TALLOC_CTX *_mem_save_servername_0 = NULL;
30894 32 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
30895 32 : TALLOC_CTX *_mem_save_info_0 = NULL;
30896 32 : TALLOC_CTX *_mem_save_needed_0 = NULL;
30897 32 : TALLOC_CTX *_mem_save_count_0 = NULL;
30898 32 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
30899 32 : if (flags & NDR_IN) {
30900 16 : NDR_ZERO_STRUCT(r->out);
30901 :
30902 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
30903 16 : if (_ptr_servername) {
30904 16 : NDR_PULL_ALLOC(ndr, r->in.servername);
30905 : } else {
30906 0 : r->in.servername = NULL;
30907 : }
30908 16 : if (r->in.servername) {
30909 16 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
30910 16 : NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
30911 16 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
30912 16 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
30913 16 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
30914 16 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
30915 16 : if (length_servername_1 > size_servername_1) {
30916 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
30917 : }
30918 16 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
30919 16 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
30920 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
30921 : }
30922 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
30923 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
30924 16 : if (_ptr_buffer) {
30925 8 : NDR_PULL_ALLOC(ndr, r->in.buffer);
30926 : } else {
30927 8 : r->in.buffer = NULL;
30928 : }
30929 16 : if (r->in.buffer) {
30930 8 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
30931 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
30932 8 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
30933 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
30934 : }
30935 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
30936 16 : NDR_PULL_ALLOC(ndr, r->out.needed);
30937 16 : NDR_ZERO_STRUCTP(r->out.needed);
30938 16 : NDR_PULL_ALLOC(ndr, r->out.count);
30939 16 : NDR_ZERO_STRUCTP(r->out.count);
30940 : }
30941 32 : if (flags & NDR_OUT) {
30942 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
30943 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
30944 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
30945 16 : if (_ptr_info) {
30946 8 : NDR_PULL_ALLOC(ndr, r->out.info);
30947 : } else {
30948 8 : r->out.info = NULL;
30949 : }
30950 16 : if (r->out.info) {
30951 8 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
30952 8 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
30953 8 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
30954 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
30955 : }
30956 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30957 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
30958 : }
30959 16 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
30960 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
30961 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
30962 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
30963 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
30964 0 : NDR_PULL_ALLOC(ndr, r->out.count);
30965 : }
30966 16 : _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
30967 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
30968 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
30969 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
30970 16 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
30971 : }
30972 32 : return NDR_ERR_SUCCESS;
30973 : }
30974 :
30975 24 : _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumMonitors(struct ndr_push *ndr, ndr_flags_type flags, const struct __spoolss_EnumMonitors *r)
30976 : {
30977 0 : uint32_t cntr_info_0;
30978 24 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
30979 24 : if (flags & NDR_IN) {
30980 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
30981 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
30982 : }
30983 24 : if (flags & NDR_OUT) {
30984 72 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
30985 48 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
30986 48 : NDR_CHECK(ndr_push_spoolss_MonitorInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
30987 : }
30988 72 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
30989 48 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
30990 48 : NDR_CHECK(ndr_push_spoolss_MonitorInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
30991 : }
30992 : }
30993 24 : return NDR_ERR_SUCCESS;
30994 : }
30995 :
30996 8 : _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumMonitors(struct ndr_pull *ndr, ndr_flags_type flags, struct __spoolss_EnumMonitors *r)
30997 : {
30998 8 : uint32_t size_info_0 = 0;
30999 0 : uint32_t cntr_info_0;
31000 8 : TALLOC_CTX *_mem_save_info_0 = NULL;
31001 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31002 8 : if (flags & NDR_IN) {
31003 0 : NDR_ZERO_STRUCT(r->out);
31004 :
31005 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
31006 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
31007 : }
31008 8 : if (flags & NDR_OUT) {
31009 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31010 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31011 8 : size_info_0 = r->in.count;
31012 8 : NDR_PULL_ALLOC_N(ndr, r->out.info, size_info_0);
31013 8 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
31014 8 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
31015 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
31016 16 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
31017 16 : NDR_CHECK(ndr_pull_spoolss_MonitorInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
31018 : }
31019 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
31020 16 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
31021 16 : NDR_CHECK(ndr_pull_spoolss_MonitorInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
31022 : }
31023 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
31024 24 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
31025 : }
31026 : }
31027 8 : return NDR_ERR_SUCCESS;
31028 : }
31029 :
31030 0 : _PUBLIC_ void ndr_print_spoolss_EnumMonitors(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumMonitors *r)
31031 : {
31032 0 : uint32_t cntr_info_2;
31033 0 : ndr_print_struct(ndr, name, "spoolss_EnumMonitors");
31034 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31035 0 : ndr->depth++;
31036 0 : if (flags & NDR_SET_VALUES) {
31037 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31038 : }
31039 0 : if (flags & NDR_IN) {
31040 0 : ndr_print_struct(ndr, "in", "spoolss_EnumMonitors");
31041 0 : ndr->depth++;
31042 0 : ndr_print_ptr(ndr, "servername", r->in.servername);
31043 0 : ndr->depth++;
31044 0 : if (r->in.servername) {
31045 0 : ndr_print_string(ndr, "servername", r->in.servername);
31046 : }
31047 0 : ndr->depth--;
31048 0 : ndr_print_uint32(ndr, "level", r->in.level);
31049 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
31050 0 : ndr->depth++;
31051 0 : if (r->in.buffer) {
31052 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
31053 : }
31054 0 : ndr->depth--;
31055 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
31056 0 : ndr->depth--;
31057 : }
31058 0 : if (flags & NDR_OUT) {
31059 0 : ndr_print_struct(ndr, "out", "spoolss_EnumMonitors");
31060 0 : ndr->depth++;
31061 0 : ndr_print_ptr(ndr, "count", r->out.count);
31062 0 : ndr->depth++;
31063 0 : ndr_print_uint32(ndr, "count", *r->out.count);
31064 0 : ndr->depth--;
31065 0 : ndr_print_ptr(ndr, "info", r->out.info);
31066 0 : ndr->depth++;
31067 0 : ndr_print_ptr(ndr, "info", *r->out.info);
31068 0 : ndr->depth++;
31069 0 : if (*r->out.info) {
31070 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(*r->out.count));
31071 0 : ndr->depth++;
31072 0 : for (cntr_info_2 = 0; cntr_info_2 < (*r->out.count); cntr_info_2++) {
31073 0 : ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
31074 0 : ndr_print_spoolss_MonitorInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
31075 : }
31076 0 : ndr->depth--;
31077 : }
31078 0 : ndr->depth--;
31079 0 : ndr->depth--;
31080 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
31081 0 : ndr->depth++;
31082 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
31083 0 : ndr->depth--;
31084 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31085 0 : ndr->depth--;
31086 : }
31087 0 : ndr->depth--;
31088 : }
31089 :
31090 8 : static enum ndr_err_code ndr_push_spoolss_AddPort(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddPort *r)
31091 : {
31092 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31093 8 : if (flags & NDR_IN) {
31094 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
31095 4 : if (r->in.server_name) {
31096 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
31097 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
31098 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
31099 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
31100 : }
31101 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
31102 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.monitor_name, CH_UTF16)));
31103 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
31104 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.monitor_name, CH_UTF16)));
31105 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.monitor_name, ndr_charset_length(r->in.monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
31106 : }
31107 8 : if (flags & NDR_OUT) {
31108 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31109 : }
31110 8 : return NDR_ERR_SUCCESS;
31111 : }
31112 :
31113 8 : static enum ndr_err_code ndr_pull_spoolss_AddPort(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddPort *r)
31114 : {
31115 0 : uint32_t _ptr_server_name;
31116 8 : uint32_t size_server_name_1 = 0;
31117 8 : uint32_t length_server_name_1 = 0;
31118 8 : uint32_t size_monitor_name_0 = 0;
31119 8 : uint32_t length_monitor_name_0 = 0;
31120 8 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
31121 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31122 8 : if (flags & NDR_IN) {
31123 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
31124 4 : if (_ptr_server_name) {
31125 4 : NDR_PULL_ALLOC(ndr, r->in.server_name);
31126 : } else {
31127 0 : r->in.server_name = NULL;
31128 : }
31129 4 : if (r->in.server_name) {
31130 4 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
31131 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
31132 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
31133 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
31134 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
31135 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
31136 4 : if (length_server_name_1 > size_server_name_1) {
31137 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
31138 : }
31139 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
31140 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
31141 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
31142 : }
31143 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
31144 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.monitor_name));
31145 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.monitor_name));
31146 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.monitor_name, &size_monitor_name_0));
31147 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.monitor_name, &length_monitor_name_0));
31148 4 : if (length_monitor_name_0 > size_monitor_name_0) {
31149 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_monitor_name_0, length_monitor_name_0);
31150 : }
31151 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_monitor_name_0, sizeof(uint16_t)));
31152 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.monitor_name, length_monitor_name_0, sizeof(uint16_t), CH_UTF16));
31153 : }
31154 8 : if (flags & NDR_OUT) {
31155 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31156 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31157 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31158 : }
31159 8 : return NDR_ERR_SUCCESS;
31160 : }
31161 :
31162 0 : _PUBLIC_ void ndr_print_spoolss_AddPort(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddPort *r)
31163 : {
31164 0 : ndr_print_struct(ndr, name, "spoolss_AddPort");
31165 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31166 0 : ndr->depth++;
31167 0 : if (flags & NDR_SET_VALUES) {
31168 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31169 : }
31170 0 : if (flags & NDR_IN) {
31171 0 : ndr_print_struct(ndr, "in", "spoolss_AddPort");
31172 0 : ndr->depth++;
31173 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
31174 0 : ndr->depth++;
31175 0 : if (r->in.server_name) {
31176 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
31177 : }
31178 0 : ndr->depth--;
31179 0 : ndr_print_uint32(ndr, "unknown", r->in.unknown);
31180 0 : ndr_print_string(ndr, "monitor_name", r->in.monitor_name);
31181 0 : ndr->depth--;
31182 : }
31183 0 : if (flags & NDR_OUT) {
31184 0 : ndr_print_struct(ndr, "out", "spoolss_AddPort");
31185 0 : ndr->depth++;
31186 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31187 0 : ndr->depth--;
31188 : }
31189 0 : ndr->depth--;
31190 : }
31191 :
31192 0 : static enum ndr_err_code ndr_push_spoolss_ConfigurePort(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_ConfigurePort *r)
31193 : {
31194 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31195 0 : if (flags & NDR_IN) {
31196 0 : }
31197 0 : if (flags & NDR_OUT) {
31198 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31199 : }
31200 0 : return NDR_ERR_SUCCESS;
31201 : }
31202 :
31203 0 : static enum ndr_err_code ndr_pull_spoolss_ConfigurePort(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_ConfigurePort *r)
31204 : {
31205 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31206 0 : if (flags & NDR_IN) {
31207 0 : }
31208 0 : if (flags & NDR_OUT) {
31209 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31210 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31211 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31212 : }
31213 0 : return NDR_ERR_SUCCESS;
31214 : }
31215 :
31216 0 : _PUBLIC_ void ndr_print_spoolss_ConfigurePort(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_ConfigurePort *r)
31217 : {
31218 0 : ndr_print_struct(ndr, name, "spoolss_ConfigurePort");
31219 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31220 0 : ndr->depth++;
31221 0 : if (flags & NDR_SET_VALUES) {
31222 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31223 : }
31224 0 : if (flags & NDR_IN) {
31225 0 : ndr_print_struct(ndr, "in", "spoolss_ConfigurePort");
31226 0 : ndr->depth++;
31227 0 : ndr->depth--;
31228 : }
31229 0 : if (flags & NDR_OUT) {
31230 0 : ndr_print_struct(ndr, "out", "spoolss_ConfigurePort");
31231 0 : ndr->depth++;
31232 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31233 0 : ndr->depth--;
31234 : }
31235 0 : ndr->depth--;
31236 : }
31237 :
31238 0 : static enum ndr_err_code ndr_push_spoolss_DeletePort(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePort *r)
31239 : {
31240 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31241 0 : if (flags & NDR_IN) {
31242 0 : if (r->in.port_name == NULL) {
31243 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
31244 : }
31245 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
31246 0 : if (r->in.server_name) {
31247 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
31248 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
31249 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
31250 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
31251 : }
31252 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.ptr));
31253 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.port_name, CH_UTF16)));
31254 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
31255 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.port_name, CH_UTF16)));
31256 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.port_name, ndr_charset_length(r->in.port_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
31257 : }
31258 0 : if (flags & NDR_OUT) {
31259 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31260 : }
31261 0 : return NDR_ERR_SUCCESS;
31262 : }
31263 :
31264 0 : static enum ndr_err_code ndr_pull_spoolss_DeletePort(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePort *r)
31265 : {
31266 0 : uint32_t _ptr_server_name;
31267 0 : uint32_t size_server_name_1 = 0;
31268 0 : uint32_t length_server_name_1 = 0;
31269 0 : uint32_t size_port_name_1 = 0;
31270 0 : uint32_t length_port_name_1 = 0;
31271 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
31272 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31273 0 : if (flags & NDR_IN) {
31274 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
31275 0 : if (_ptr_server_name) {
31276 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
31277 : } else {
31278 0 : r->in.server_name = NULL;
31279 : }
31280 0 : if (r->in.server_name) {
31281 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
31282 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
31283 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
31284 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
31285 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
31286 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
31287 0 : if (length_server_name_1 > size_server_name_1) {
31288 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
31289 : }
31290 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
31291 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
31292 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
31293 : }
31294 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->in.ptr));
31295 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.port_name));
31296 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.port_name));
31297 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.port_name, &size_port_name_1));
31298 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.port_name, &length_port_name_1));
31299 0 : if (length_port_name_1 > size_port_name_1) {
31300 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_port_name_1, length_port_name_1);
31301 : }
31302 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_port_name_1, sizeof(uint16_t)));
31303 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.port_name, length_port_name_1, sizeof(uint16_t), CH_UTF16));
31304 : }
31305 0 : if (flags & NDR_OUT) {
31306 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31307 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31308 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31309 : }
31310 0 : return NDR_ERR_SUCCESS;
31311 : }
31312 :
31313 0 : _PUBLIC_ void ndr_print_spoolss_DeletePort(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePort *r)
31314 : {
31315 0 : ndr_print_struct(ndr, name, "spoolss_DeletePort");
31316 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31317 0 : ndr->depth++;
31318 0 : if (flags & NDR_SET_VALUES) {
31319 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31320 : }
31321 0 : if (flags & NDR_IN) {
31322 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePort");
31323 0 : ndr->depth++;
31324 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
31325 0 : ndr->depth++;
31326 0 : if (r->in.server_name) {
31327 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
31328 : }
31329 0 : ndr->depth--;
31330 0 : ndr_print_uint3264(ndr, "ptr", r->in.ptr);
31331 0 : ndr_print_ptr(ndr, "port_name", r->in.port_name);
31332 0 : ndr->depth++;
31333 0 : ndr_print_string(ndr, "port_name", r->in.port_name);
31334 0 : ndr->depth--;
31335 0 : ndr->depth--;
31336 : }
31337 0 : if (flags & NDR_OUT) {
31338 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePort");
31339 0 : ndr->depth++;
31340 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31341 0 : ndr->depth--;
31342 : }
31343 0 : ndr->depth--;
31344 : }
31345 :
31346 0 : static enum ndr_err_code ndr_push_spoolss_CreatePrinterIC(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_CreatePrinterIC *r)
31347 : {
31348 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31349 0 : if (flags & NDR_IN) {
31350 0 : if (r->in.handle == NULL) {
31351 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
31352 : }
31353 0 : if (r->in.devmode_ctr == NULL) {
31354 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
31355 : }
31356 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
31357 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
31358 : }
31359 0 : if (flags & NDR_OUT) {
31360 0 : if (r->out.gdi_handle == NULL) {
31361 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
31362 : }
31363 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle));
31364 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31365 : }
31366 0 : return NDR_ERR_SUCCESS;
31367 : }
31368 :
31369 0 : static enum ndr_err_code ndr_pull_spoolss_CreatePrinterIC(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_CreatePrinterIC *r)
31370 : {
31371 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
31372 0 : TALLOC_CTX *_mem_save_gdi_handle_0 = NULL;
31373 0 : TALLOC_CTX *_mem_save_devmode_ctr_0 = NULL;
31374 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31375 0 : if (flags & NDR_IN) {
31376 0 : NDR_ZERO_STRUCT(r->out);
31377 :
31378 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
31379 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
31380 : }
31381 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
31382 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
31383 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
31384 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
31385 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
31386 0 : NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
31387 : }
31388 0 : _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
31389 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC);
31390 0 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
31391 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC);
31392 0 : NDR_PULL_ALLOC(ndr, r->out.gdi_handle);
31393 0 : NDR_ZERO_STRUCTP(r->out.gdi_handle);
31394 : }
31395 0 : if (flags & NDR_OUT) {
31396 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31397 : if (r->in.handle == NULL) {
31398 : NDR_PULL_ALLOC(ndr, r->in.handle);
31399 : NDR_ZERO_STRUCTP(r->in.handle);
31400 : }
31401 : if (r->in.devmode_ctr == NULL) {
31402 : NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
31403 : NDR_ZERO_STRUCTP(r->in.devmode_ctr);
31404 : }
31405 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31406 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
31407 0 : NDR_PULL_ALLOC(ndr, r->out.gdi_handle);
31408 : }
31409 0 : _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
31410 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.gdi_handle, LIBNDR_FLAG_REF_ALLOC);
31411 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle));
31412 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC);
31413 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31414 : }
31415 0 : return NDR_ERR_SUCCESS;
31416 : }
31417 :
31418 0 : _PUBLIC_ void ndr_print_spoolss_CreatePrinterIC(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_CreatePrinterIC *r)
31419 : {
31420 0 : ndr_print_struct(ndr, name, "spoolss_CreatePrinterIC");
31421 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31422 0 : ndr->depth++;
31423 0 : if (flags & NDR_SET_VALUES) {
31424 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31425 : }
31426 0 : if (flags & NDR_IN) {
31427 0 : ndr_print_struct(ndr, "in", "spoolss_CreatePrinterIC");
31428 0 : ndr->depth++;
31429 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
31430 0 : ndr->depth++;
31431 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
31432 0 : ndr->depth--;
31433 0 : ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr);
31434 0 : ndr->depth++;
31435 0 : ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr);
31436 0 : ndr->depth--;
31437 0 : ndr->depth--;
31438 : }
31439 0 : if (flags & NDR_OUT) {
31440 0 : ndr_print_struct(ndr, "out", "spoolss_CreatePrinterIC");
31441 0 : ndr->depth++;
31442 0 : ndr_print_ptr(ndr, "gdi_handle", r->out.gdi_handle);
31443 0 : ndr->depth++;
31444 0 : ndr_print_policy_handle(ndr, "gdi_handle", r->out.gdi_handle);
31445 0 : ndr->depth--;
31446 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31447 0 : ndr->depth--;
31448 : }
31449 0 : ndr->depth--;
31450 : }
31451 :
31452 0 : static enum ndr_err_code ndr_push_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_PlayGDIScriptOnPrinterIC *r)
31453 : {
31454 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31455 0 : if (flags & NDR_IN) {
31456 0 : if (r->in.gdi_handle == NULL) {
31457 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
31458 : }
31459 0 : if (r->in.pIn == NULL) {
31460 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
31461 : }
31462 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.gdi_handle));
31463 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cIn));
31464 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pIn, r->in.cIn));
31465 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cIn));
31466 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cOut));
31467 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ul));
31468 : }
31469 0 : if (flags & NDR_OUT) {
31470 0 : if (r->out.pOut == NULL) {
31471 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
31472 : }
31473 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cOut));
31474 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pOut, r->in.cOut));
31475 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31476 : }
31477 0 : return NDR_ERR_SUCCESS;
31478 : }
31479 :
31480 0 : static enum ndr_err_code ndr_pull_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_PlayGDIScriptOnPrinterIC *r)
31481 : {
31482 0 : uint32_t size_pIn_1 = 0;
31483 0 : uint32_t size_pOut_1 = 0;
31484 0 : TALLOC_CTX *_mem_save_gdi_handle_0 = NULL;
31485 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31486 0 : if (flags & NDR_IN) {
31487 0 : NDR_ZERO_STRUCT(r->out);
31488 :
31489 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
31490 0 : NDR_PULL_ALLOC(ndr, r->in.gdi_handle);
31491 : }
31492 0 : _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
31493 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.gdi_handle, LIBNDR_FLAG_REF_ALLOC);
31494 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.gdi_handle));
31495 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC);
31496 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pIn));
31497 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pIn, &size_pIn_1));
31498 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
31499 0 : NDR_PULL_ALLOC_N(ndr, r->in.pIn, size_pIn_1);
31500 : }
31501 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pIn, size_pIn_1));
31502 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cIn));
31503 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cOut));
31504 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ul));
31505 0 : NDR_PULL_ALLOC_N(ndr, r->out.pOut, r->in.cOut);
31506 0 : memset(r->out.pOut, 0, (r->in.cOut) * sizeof(*r->out.pOut));
31507 0 : if (r->in.pIn) {
31508 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pIn, r->in.cIn));
31509 : }
31510 : }
31511 0 : if (flags & NDR_OUT) {
31512 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31513 : if (r->in.gdi_handle == NULL) {
31514 : NDR_PULL_ALLOC(ndr, r->in.gdi_handle);
31515 : NDR_ZERO_STRUCTP(r->in.gdi_handle);
31516 : }
31517 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31518 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pOut));
31519 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pOut, &size_pOut_1));
31520 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
31521 0 : NDR_PULL_ALLOC_N(ndr, r->out.pOut, size_pOut_1);
31522 : }
31523 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pOut, size_pOut_1));
31524 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31525 0 : if (r->out.pOut) {
31526 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pOut, r->in.cOut));
31527 : }
31528 : }
31529 0 : return NDR_ERR_SUCCESS;
31530 : }
31531 :
31532 0 : _PUBLIC_ void ndr_print_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_PlayGDIScriptOnPrinterIC *r)
31533 : {
31534 0 : ndr_print_struct(ndr, name, "spoolss_PlayGDIScriptOnPrinterIC");
31535 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31536 0 : ndr->depth++;
31537 0 : if (flags & NDR_SET_VALUES) {
31538 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31539 : }
31540 0 : if (flags & NDR_IN) {
31541 0 : ndr_print_struct(ndr, "in", "spoolss_PlayGDIScriptOnPrinterIC");
31542 0 : ndr->depth++;
31543 0 : ndr_print_ptr(ndr, "gdi_handle", r->in.gdi_handle);
31544 0 : ndr->depth++;
31545 0 : ndr_print_policy_handle(ndr, "gdi_handle", r->in.gdi_handle);
31546 0 : ndr->depth--;
31547 0 : ndr_print_ptr(ndr, "pIn", r->in.pIn);
31548 0 : ndr->depth++;
31549 0 : ndr_print_array_uint8(ndr, "pIn", r->in.pIn, r->in.cIn);
31550 0 : ndr->depth--;
31551 0 : ndr_print_uint32(ndr, "cIn", r->in.cIn);
31552 0 : ndr_print_uint32(ndr, "cOut", r->in.cOut);
31553 0 : ndr_print_uint32(ndr, "ul", r->in.ul);
31554 0 : ndr->depth--;
31555 : }
31556 0 : if (flags & NDR_OUT) {
31557 0 : ndr_print_struct(ndr, "out", "spoolss_PlayGDIScriptOnPrinterIC");
31558 0 : ndr->depth++;
31559 0 : ndr_print_ptr(ndr, "pOut", r->out.pOut);
31560 0 : ndr->depth++;
31561 0 : ndr_print_array_uint8(ndr, "pOut", r->out.pOut, r->in.cOut);
31562 0 : ndr->depth--;
31563 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31564 0 : ndr->depth--;
31565 : }
31566 0 : ndr->depth--;
31567 : }
31568 :
31569 0 : static enum ndr_err_code ndr_push_spoolss_DeletePrinterIC(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePrinterIC *r)
31570 : {
31571 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31572 0 : if (flags & NDR_IN) {
31573 0 : if (r->in.gdi_handle == NULL) {
31574 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
31575 : }
31576 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.gdi_handle));
31577 : }
31578 0 : if (flags & NDR_OUT) {
31579 0 : if (r->out.gdi_handle == NULL) {
31580 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
31581 : }
31582 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle));
31583 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31584 : }
31585 0 : return NDR_ERR_SUCCESS;
31586 : }
31587 :
31588 0 : static enum ndr_err_code ndr_pull_spoolss_DeletePrinterIC(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePrinterIC *r)
31589 : {
31590 0 : TALLOC_CTX *_mem_save_gdi_handle_0 = NULL;
31591 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31592 0 : if (flags & NDR_IN) {
31593 0 : NDR_ZERO_STRUCT(r->out);
31594 :
31595 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
31596 0 : NDR_PULL_ALLOC(ndr, r->in.gdi_handle);
31597 : }
31598 0 : _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
31599 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.gdi_handle, LIBNDR_FLAG_REF_ALLOC);
31600 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.gdi_handle));
31601 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC);
31602 0 : NDR_PULL_ALLOC(ndr, r->out.gdi_handle);
31603 0 : *r->out.gdi_handle = *r->in.gdi_handle;
31604 : }
31605 0 : if (flags & NDR_OUT) {
31606 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31607 : if (r->in.gdi_handle == NULL) {
31608 : NDR_PULL_ALLOC(ndr, r->in.gdi_handle);
31609 : NDR_ZERO_STRUCTP(r->in.gdi_handle);
31610 : }
31611 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31612 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
31613 0 : NDR_PULL_ALLOC(ndr, r->out.gdi_handle);
31614 : }
31615 0 : _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
31616 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.gdi_handle, LIBNDR_FLAG_REF_ALLOC);
31617 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle));
31618 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC);
31619 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31620 : }
31621 0 : return NDR_ERR_SUCCESS;
31622 : }
31623 :
31624 0 : _PUBLIC_ void ndr_print_spoolss_DeletePrinterIC(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePrinterIC *r)
31625 : {
31626 0 : ndr_print_struct(ndr, name, "spoolss_DeletePrinterIC");
31627 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31628 0 : ndr->depth++;
31629 0 : if (flags & NDR_SET_VALUES) {
31630 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31631 : }
31632 0 : if (flags & NDR_IN) {
31633 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePrinterIC");
31634 0 : ndr->depth++;
31635 0 : ndr_print_ptr(ndr, "gdi_handle", r->in.gdi_handle);
31636 0 : ndr->depth++;
31637 0 : ndr_print_policy_handle(ndr, "gdi_handle", r->in.gdi_handle);
31638 0 : ndr->depth--;
31639 0 : ndr->depth--;
31640 : }
31641 0 : if (flags & NDR_OUT) {
31642 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePrinterIC");
31643 0 : ndr->depth++;
31644 0 : ndr_print_ptr(ndr, "gdi_handle", r->out.gdi_handle);
31645 0 : ndr->depth++;
31646 0 : ndr_print_policy_handle(ndr, "gdi_handle", r->out.gdi_handle);
31647 0 : ndr->depth--;
31648 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31649 0 : ndr->depth--;
31650 : }
31651 0 : ndr->depth--;
31652 : }
31653 :
31654 0 : static enum ndr_err_code ndr_push_spoolss_AddPrinterConnection(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddPrinterConnection *r)
31655 : {
31656 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31657 0 : if (flags & NDR_IN) {
31658 0 : }
31659 0 : if (flags & NDR_OUT) {
31660 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31661 : }
31662 0 : return NDR_ERR_SUCCESS;
31663 : }
31664 :
31665 0 : static enum ndr_err_code ndr_pull_spoolss_AddPrinterConnection(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddPrinterConnection *r)
31666 : {
31667 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31668 0 : if (flags & NDR_IN) {
31669 0 : }
31670 0 : if (flags & NDR_OUT) {
31671 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31672 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31673 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31674 : }
31675 0 : return NDR_ERR_SUCCESS;
31676 : }
31677 :
31678 0 : _PUBLIC_ void ndr_print_spoolss_AddPrinterConnection(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddPrinterConnection *r)
31679 : {
31680 0 : ndr_print_struct(ndr, name, "spoolss_AddPrinterConnection");
31681 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31682 0 : ndr->depth++;
31683 0 : if (flags & NDR_SET_VALUES) {
31684 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31685 : }
31686 0 : if (flags & NDR_IN) {
31687 0 : ndr_print_struct(ndr, "in", "spoolss_AddPrinterConnection");
31688 0 : ndr->depth++;
31689 0 : ndr->depth--;
31690 : }
31691 0 : if (flags & NDR_OUT) {
31692 0 : ndr_print_struct(ndr, "out", "spoolss_AddPrinterConnection");
31693 0 : ndr->depth++;
31694 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31695 0 : ndr->depth--;
31696 : }
31697 0 : ndr->depth--;
31698 : }
31699 :
31700 0 : static enum ndr_err_code ndr_push_spoolss_DeletePrinterConnection(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePrinterConnection *r)
31701 : {
31702 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31703 0 : if (flags & NDR_IN) {
31704 0 : }
31705 0 : if (flags & NDR_OUT) {
31706 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31707 : }
31708 0 : return NDR_ERR_SUCCESS;
31709 : }
31710 :
31711 0 : static enum ndr_err_code ndr_pull_spoolss_DeletePrinterConnection(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePrinterConnection *r)
31712 : {
31713 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31714 0 : if (flags & NDR_IN) {
31715 0 : }
31716 0 : if (flags & NDR_OUT) {
31717 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31718 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31719 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31720 : }
31721 0 : return NDR_ERR_SUCCESS;
31722 : }
31723 :
31724 0 : _PUBLIC_ void ndr_print_spoolss_DeletePrinterConnection(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePrinterConnection *r)
31725 : {
31726 0 : ndr_print_struct(ndr, name, "spoolss_DeletePrinterConnection");
31727 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31728 0 : ndr->depth++;
31729 0 : if (flags & NDR_SET_VALUES) {
31730 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31731 : }
31732 0 : if (flags & NDR_IN) {
31733 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePrinterConnection");
31734 0 : ndr->depth++;
31735 0 : ndr->depth--;
31736 : }
31737 0 : if (flags & NDR_OUT) {
31738 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePrinterConnection");
31739 0 : ndr->depth++;
31740 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31741 0 : ndr->depth--;
31742 : }
31743 0 : ndr->depth--;
31744 : }
31745 :
31746 0 : static enum ndr_err_code ndr_push_spoolss_PrinterMessageBox(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_PrinterMessageBox *r)
31747 : {
31748 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31749 0 : if (flags & NDR_IN) {
31750 0 : }
31751 0 : if (flags & NDR_OUT) {
31752 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31753 : }
31754 0 : return NDR_ERR_SUCCESS;
31755 : }
31756 :
31757 0 : static enum ndr_err_code ndr_pull_spoolss_PrinterMessageBox(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_PrinterMessageBox *r)
31758 : {
31759 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31760 0 : if (flags & NDR_IN) {
31761 0 : }
31762 0 : if (flags & NDR_OUT) {
31763 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31764 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31765 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31766 : }
31767 0 : return NDR_ERR_SUCCESS;
31768 : }
31769 :
31770 0 : _PUBLIC_ void ndr_print_spoolss_PrinterMessageBox(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_PrinterMessageBox *r)
31771 : {
31772 0 : ndr_print_struct(ndr, name, "spoolss_PrinterMessageBox");
31773 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31774 0 : ndr->depth++;
31775 0 : if (flags & NDR_SET_VALUES) {
31776 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31777 : }
31778 0 : if (flags & NDR_IN) {
31779 0 : ndr_print_struct(ndr, "in", "spoolss_PrinterMessageBox");
31780 0 : ndr->depth++;
31781 0 : ndr->depth--;
31782 : }
31783 0 : if (flags & NDR_OUT) {
31784 0 : ndr_print_struct(ndr, "out", "spoolss_PrinterMessageBox");
31785 0 : ndr->depth++;
31786 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31787 0 : ndr->depth--;
31788 : }
31789 0 : ndr->depth--;
31790 : }
31791 :
31792 0 : static enum ndr_err_code ndr_push_spoolss_AddMonitor(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddMonitor *r)
31793 : {
31794 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31795 0 : if (flags & NDR_IN) {
31796 0 : }
31797 0 : if (flags & NDR_OUT) {
31798 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31799 : }
31800 0 : return NDR_ERR_SUCCESS;
31801 : }
31802 :
31803 0 : static enum ndr_err_code ndr_pull_spoolss_AddMonitor(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddMonitor *r)
31804 : {
31805 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31806 0 : if (flags & NDR_IN) {
31807 0 : }
31808 0 : if (flags & NDR_OUT) {
31809 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31810 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31811 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31812 : }
31813 0 : return NDR_ERR_SUCCESS;
31814 : }
31815 :
31816 0 : _PUBLIC_ void ndr_print_spoolss_AddMonitor(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddMonitor *r)
31817 : {
31818 0 : ndr_print_struct(ndr, name, "spoolss_AddMonitor");
31819 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31820 0 : ndr->depth++;
31821 0 : if (flags & NDR_SET_VALUES) {
31822 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31823 : }
31824 0 : if (flags & NDR_IN) {
31825 0 : ndr_print_struct(ndr, "in", "spoolss_AddMonitor");
31826 0 : ndr->depth++;
31827 0 : ndr->depth--;
31828 : }
31829 0 : if (flags & NDR_OUT) {
31830 0 : ndr_print_struct(ndr, "out", "spoolss_AddMonitor");
31831 0 : ndr->depth++;
31832 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31833 0 : ndr->depth--;
31834 : }
31835 0 : ndr->depth--;
31836 : }
31837 :
31838 0 : static enum ndr_err_code ndr_push_spoolss_DeleteMonitor(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeleteMonitor *r)
31839 : {
31840 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31841 0 : if (flags & NDR_IN) {
31842 0 : }
31843 0 : if (flags & NDR_OUT) {
31844 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31845 : }
31846 0 : return NDR_ERR_SUCCESS;
31847 : }
31848 :
31849 0 : static enum ndr_err_code ndr_pull_spoolss_DeleteMonitor(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeleteMonitor *r)
31850 : {
31851 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31852 0 : if (flags & NDR_IN) {
31853 0 : }
31854 0 : if (flags & NDR_OUT) {
31855 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31856 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31857 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31858 : }
31859 0 : return NDR_ERR_SUCCESS;
31860 : }
31861 :
31862 0 : _PUBLIC_ void ndr_print_spoolss_DeleteMonitor(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeleteMonitor *r)
31863 : {
31864 0 : ndr_print_struct(ndr, name, "spoolss_DeleteMonitor");
31865 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31866 0 : ndr->depth++;
31867 0 : if (flags & NDR_SET_VALUES) {
31868 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31869 : }
31870 0 : if (flags & NDR_IN) {
31871 0 : ndr_print_struct(ndr, "in", "spoolss_DeleteMonitor");
31872 0 : ndr->depth++;
31873 0 : ndr->depth--;
31874 : }
31875 0 : if (flags & NDR_OUT) {
31876 0 : ndr_print_struct(ndr, "out", "spoolss_DeleteMonitor");
31877 0 : ndr->depth++;
31878 0 : ndr_print_WERROR(ndr, "result", r->out.result);
31879 0 : ndr->depth--;
31880 : }
31881 0 : ndr->depth--;
31882 : }
31883 :
31884 0 : static enum ndr_err_code ndr_push_spoolss_DeletePrintProcessor(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePrintProcessor *r)
31885 : {
31886 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
31887 0 : if (flags & NDR_IN) {
31888 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
31889 0 : if (r->in.server) {
31890 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
31891 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
31892 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
31893 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
31894 : }
31895 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.architecture));
31896 0 : if (r->in.architecture) {
31897 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
31898 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
31899 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
31900 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
31901 : }
31902 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_name, CH_UTF16)));
31903 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
31904 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_name, CH_UTF16)));
31905 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.print_processor_name, ndr_charset_length(r->in.print_processor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
31906 : }
31907 0 : if (flags & NDR_OUT) {
31908 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
31909 : }
31910 0 : return NDR_ERR_SUCCESS;
31911 : }
31912 :
31913 0 : static enum ndr_err_code ndr_pull_spoolss_DeletePrintProcessor(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePrintProcessor *r)
31914 : {
31915 0 : uint32_t _ptr_server;
31916 0 : uint32_t size_server_1 = 0;
31917 0 : uint32_t length_server_1 = 0;
31918 0 : uint32_t _ptr_architecture;
31919 0 : uint32_t size_architecture_1 = 0;
31920 0 : uint32_t length_architecture_1 = 0;
31921 0 : uint32_t size_print_processor_name_0 = 0;
31922 0 : uint32_t length_print_processor_name_0 = 0;
31923 0 : TALLOC_CTX *_mem_save_server_0 = NULL;
31924 0 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
31925 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
31926 0 : if (flags & NDR_IN) {
31927 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
31928 0 : if (_ptr_server) {
31929 0 : NDR_PULL_ALLOC(ndr, r->in.server);
31930 : } else {
31931 0 : r->in.server = NULL;
31932 : }
31933 0 : if (r->in.server) {
31934 0 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
31935 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
31936 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
31937 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
31938 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
31939 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
31940 0 : if (length_server_1 > size_server_1) {
31941 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
31942 : }
31943 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
31944 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
31945 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
31946 : }
31947 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
31948 0 : if (_ptr_architecture) {
31949 0 : NDR_PULL_ALLOC(ndr, r->in.architecture);
31950 : } else {
31951 0 : r->in.architecture = NULL;
31952 : }
31953 0 : if (r->in.architecture) {
31954 0 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
31955 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.architecture, 0);
31956 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
31957 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
31958 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.architecture, &size_architecture_1));
31959 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.architecture, &length_architecture_1));
31960 0 : if (length_architecture_1 > size_architecture_1) {
31961 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_1, length_architecture_1);
31962 : }
31963 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_1, sizeof(uint16_t)));
31964 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, length_architecture_1, sizeof(uint16_t), CH_UTF16));
31965 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
31966 : }
31967 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.print_processor_name));
31968 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.print_processor_name));
31969 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.print_processor_name, &size_print_processor_name_0));
31970 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.print_processor_name, &length_print_processor_name_0));
31971 0 : if (length_print_processor_name_0 > size_print_processor_name_0) {
31972 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_print_processor_name_0, length_print_processor_name_0);
31973 : }
31974 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_print_processor_name_0, sizeof(uint16_t)));
31975 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.print_processor_name, length_print_processor_name_0, sizeof(uint16_t), CH_UTF16));
31976 : }
31977 0 : if (flags & NDR_OUT) {
31978 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
31979 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
31980 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
31981 : }
31982 0 : return NDR_ERR_SUCCESS;
31983 : }
31984 :
31985 0 : _PUBLIC_ void ndr_print_spoolss_DeletePrintProcessor(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePrintProcessor *r)
31986 : {
31987 0 : ndr_print_struct(ndr, name, "spoolss_DeletePrintProcessor");
31988 0 : if (r == NULL) { ndr_print_null(ndr); return; }
31989 0 : ndr->depth++;
31990 0 : if (flags & NDR_SET_VALUES) {
31991 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
31992 : }
31993 0 : if (flags & NDR_IN) {
31994 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePrintProcessor");
31995 0 : ndr->depth++;
31996 0 : ndr_print_ptr(ndr, "server", r->in.server);
31997 0 : ndr->depth++;
31998 0 : if (r->in.server) {
31999 0 : ndr_print_string(ndr, "server", r->in.server);
32000 : }
32001 0 : ndr->depth--;
32002 0 : ndr_print_ptr(ndr, "architecture", r->in.architecture);
32003 0 : ndr->depth++;
32004 0 : if (r->in.architecture) {
32005 0 : ndr_print_string(ndr, "architecture", r->in.architecture);
32006 : }
32007 0 : ndr->depth--;
32008 0 : ndr_print_string(ndr, "print_processor_name", r->in.print_processor_name);
32009 0 : ndr->depth--;
32010 : }
32011 0 : if (flags & NDR_OUT) {
32012 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePrintProcessor");
32013 0 : ndr->depth++;
32014 0 : ndr_print_WERROR(ndr, "result", r->out.result);
32015 0 : ndr->depth--;
32016 : }
32017 0 : ndr->depth--;
32018 : }
32019 :
32020 0 : static enum ndr_err_code ndr_push_spoolss_AddPrintProvidor(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddPrintProvidor *r)
32021 : {
32022 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32023 0 : if (flags & NDR_IN) {
32024 0 : }
32025 0 : if (flags & NDR_OUT) {
32026 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
32027 : }
32028 0 : return NDR_ERR_SUCCESS;
32029 : }
32030 :
32031 0 : static enum ndr_err_code ndr_pull_spoolss_AddPrintProvidor(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddPrintProvidor *r)
32032 : {
32033 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32034 0 : if (flags & NDR_IN) {
32035 0 : }
32036 0 : if (flags & NDR_OUT) {
32037 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
32038 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
32039 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
32040 : }
32041 0 : return NDR_ERR_SUCCESS;
32042 : }
32043 :
32044 0 : _PUBLIC_ void ndr_print_spoolss_AddPrintProvidor(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddPrintProvidor *r)
32045 : {
32046 0 : ndr_print_struct(ndr, name, "spoolss_AddPrintProvidor");
32047 0 : if (r == NULL) { ndr_print_null(ndr); return; }
32048 0 : ndr->depth++;
32049 0 : if (flags & NDR_SET_VALUES) {
32050 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
32051 : }
32052 0 : if (flags & NDR_IN) {
32053 0 : ndr_print_struct(ndr, "in", "spoolss_AddPrintProvidor");
32054 0 : ndr->depth++;
32055 0 : ndr->depth--;
32056 : }
32057 0 : if (flags & NDR_OUT) {
32058 0 : ndr_print_struct(ndr, "out", "spoolss_AddPrintProvidor");
32059 0 : ndr->depth++;
32060 0 : ndr_print_WERROR(ndr, "result", r->out.result);
32061 0 : ndr->depth--;
32062 : }
32063 0 : ndr->depth--;
32064 : }
32065 :
32066 0 : static enum ndr_err_code ndr_push_spoolss_DeletePrintProvidor(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePrintProvidor *r)
32067 : {
32068 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32069 0 : if (flags & NDR_IN) {
32070 0 : }
32071 0 : if (flags & NDR_OUT) {
32072 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
32073 : }
32074 0 : return NDR_ERR_SUCCESS;
32075 : }
32076 :
32077 0 : static enum ndr_err_code ndr_pull_spoolss_DeletePrintProvidor(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePrintProvidor *r)
32078 : {
32079 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32080 0 : if (flags & NDR_IN) {
32081 0 : }
32082 0 : if (flags & NDR_OUT) {
32083 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
32084 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
32085 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
32086 : }
32087 0 : return NDR_ERR_SUCCESS;
32088 : }
32089 :
32090 0 : _PUBLIC_ void ndr_print_spoolss_DeletePrintProvidor(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePrintProvidor *r)
32091 : {
32092 0 : ndr_print_struct(ndr, name, "spoolss_DeletePrintProvidor");
32093 0 : if (r == NULL) { ndr_print_null(ndr); return; }
32094 0 : ndr->depth++;
32095 0 : if (flags & NDR_SET_VALUES) {
32096 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
32097 : }
32098 0 : if (flags & NDR_IN) {
32099 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePrintProvidor");
32100 0 : ndr->depth++;
32101 0 : ndr->depth--;
32102 : }
32103 0 : if (flags & NDR_OUT) {
32104 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePrintProvidor");
32105 0 : ndr->depth++;
32106 0 : ndr_print_WERROR(ndr, "result", r->out.result);
32107 0 : ndr->depth--;
32108 : }
32109 0 : ndr->depth--;
32110 : }
32111 :
32112 88 : _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrintProcessorDataTypes(struct ndr_push *ndr, ndr_flags_type flags, const struct _spoolss_EnumPrintProcessorDataTypes *r)
32113 : {
32114 88 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32115 88 : if (flags & NDR_IN) {
32116 44 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
32117 44 : if (r->in.servername) {
32118 44 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
32119 44 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
32120 44 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
32121 44 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
32122 : }
32123 44 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.print_processor_name));
32124 44 : if (r->in.print_processor_name) {
32125 40 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_name, CH_UTF16)));
32126 40 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
32127 40 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_name, CH_UTF16)));
32128 40 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.print_processor_name, ndr_charset_length(r->in.print_processor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
32129 : }
32130 44 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
32131 44 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
32132 44 : if (r->in.buffer) {
32133 8 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
32134 : }
32135 44 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
32136 : }
32137 88 : if (flags & NDR_OUT) {
32138 44 : if (r->out.needed == NULL) {
32139 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
32140 : }
32141 44 : if (r->out.count == NULL) {
32142 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
32143 : }
32144 44 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
32145 44 : if (r->out.info) {
32146 8 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
32147 : }
32148 44 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
32149 44 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
32150 44 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
32151 : }
32152 88 : return NDR_ERR_SUCCESS;
32153 : }
32154 :
32155 88 : _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrintProcessorDataTypes(struct ndr_pull *ndr, ndr_flags_type flags, struct _spoolss_EnumPrintProcessorDataTypes *r)
32156 : {
32157 0 : uint32_t _ptr_servername;
32158 88 : uint32_t size_servername_1 = 0;
32159 88 : uint32_t length_servername_1 = 0;
32160 0 : uint32_t _ptr_print_processor_name;
32161 88 : uint32_t size_print_processor_name_1 = 0;
32162 88 : uint32_t length_print_processor_name_1 = 0;
32163 0 : uint32_t _ptr_buffer;
32164 0 : uint32_t _ptr_info;
32165 88 : TALLOC_CTX *_mem_save_servername_0 = NULL;
32166 88 : TALLOC_CTX *_mem_save_print_processor_name_0 = NULL;
32167 88 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
32168 88 : TALLOC_CTX *_mem_save_info_0 = NULL;
32169 88 : TALLOC_CTX *_mem_save_needed_0 = NULL;
32170 88 : TALLOC_CTX *_mem_save_count_0 = NULL;
32171 88 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32172 88 : if (flags & NDR_IN) {
32173 44 : NDR_ZERO_STRUCT(r->out);
32174 :
32175 44 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
32176 44 : if (_ptr_servername) {
32177 44 : NDR_PULL_ALLOC(ndr, r->in.servername);
32178 : } else {
32179 0 : r->in.servername = NULL;
32180 : }
32181 44 : if (r->in.servername) {
32182 44 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
32183 44 : NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
32184 44 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
32185 44 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
32186 44 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
32187 44 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
32188 44 : if (length_servername_1 > size_servername_1) {
32189 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
32190 : }
32191 44 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
32192 44 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
32193 44 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
32194 : }
32195 44 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor_name));
32196 44 : if (_ptr_print_processor_name) {
32197 40 : NDR_PULL_ALLOC(ndr, r->in.print_processor_name);
32198 : } else {
32199 4 : r->in.print_processor_name = NULL;
32200 : }
32201 44 : if (r->in.print_processor_name) {
32202 40 : _mem_save_print_processor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
32203 40 : NDR_PULL_SET_MEM_CTX(ndr, r->in.print_processor_name, 0);
32204 40 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.print_processor_name));
32205 40 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.print_processor_name));
32206 40 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.print_processor_name, &size_print_processor_name_1));
32207 40 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.print_processor_name, &length_print_processor_name_1));
32208 40 : if (length_print_processor_name_1 > size_print_processor_name_1) {
32209 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_print_processor_name_1, length_print_processor_name_1);
32210 : }
32211 40 : NDR_CHECK(ndr_check_string_terminator(ndr, length_print_processor_name_1, sizeof(uint16_t)));
32212 40 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.print_processor_name, length_print_processor_name_1, sizeof(uint16_t), CH_UTF16));
32213 40 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_name_0, 0);
32214 : }
32215 44 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
32216 44 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
32217 44 : if (_ptr_buffer) {
32218 8 : NDR_PULL_ALLOC(ndr, r->in.buffer);
32219 : } else {
32220 36 : r->in.buffer = NULL;
32221 : }
32222 44 : if (r->in.buffer) {
32223 8 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
32224 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
32225 8 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
32226 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
32227 : }
32228 44 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
32229 44 : NDR_PULL_ALLOC(ndr, r->out.needed);
32230 44 : NDR_ZERO_STRUCTP(r->out.needed);
32231 44 : NDR_PULL_ALLOC(ndr, r->out.count);
32232 44 : NDR_ZERO_STRUCTP(r->out.count);
32233 : }
32234 88 : if (flags & NDR_OUT) {
32235 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
32236 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
32237 44 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
32238 44 : if (_ptr_info) {
32239 8 : NDR_PULL_ALLOC(ndr, r->out.info);
32240 : } else {
32241 36 : r->out.info = NULL;
32242 : }
32243 44 : if (r->out.info) {
32244 8 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
32245 8 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
32246 8 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
32247 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
32248 : }
32249 44 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
32250 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
32251 : }
32252 44 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
32253 44 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
32254 44 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
32255 44 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
32256 44 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
32257 0 : NDR_PULL_ALLOC(ndr, r->out.count);
32258 : }
32259 44 : _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
32260 44 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
32261 44 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
32262 44 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
32263 44 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
32264 : }
32265 88 : return NDR_ERR_SUCCESS;
32266 : }
32267 :
32268 24 : _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrintProcessorDataTypes(struct ndr_push *ndr, ndr_flags_type flags, const struct __spoolss_EnumPrintProcessorDataTypes *r)
32269 : {
32270 0 : uint32_t cntr_info_0;
32271 24 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32272 24 : if (flags & NDR_IN) {
32273 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
32274 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
32275 : }
32276 24 : if (flags & NDR_OUT) {
32277 48 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
32278 24 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
32279 24 : NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
32280 : }
32281 48 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
32282 24 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
32283 24 : NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
32284 : }
32285 : }
32286 24 : return NDR_ERR_SUCCESS;
32287 : }
32288 :
32289 8 : _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrintProcessorDataTypes(struct ndr_pull *ndr, ndr_flags_type flags, struct __spoolss_EnumPrintProcessorDataTypes *r)
32290 : {
32291 8 : uint32_t size_info_0 = 0;
32292 0 : uint32_t cntr_info_0;
32293 8 : TALLOC_CTX *_mem_save_info_0 = NULL;
32294 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32295 8 : if (flags & NDR_IN) {
32296 0 : NDR_ZERO_STRUCT(r->out);
32297 :
32298 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
32299 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
32300 : }
32301 8 : if (flags & NDR_OUT) {
32302 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
32303 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
32304 8 : size_info_0 = r->in.count;
32305 8 : NDR_PULL_ALLOC_N(ndr, r->out.info, size_info_0);
32306 8 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
32307 8 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
32308 16 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
32309 8 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
32310 8 : NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
32311 : }
32312 16 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
32313 8 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
32314 8 : NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
32315 : }
32316 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
32317 16 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
32318 : }
32319 : }
32320 8 : return NDR_ERR_SUCCESS;
32321 : }
32322 :
32323 0 : _PUBLIC_ void ndr_print_spoolss_EnumPrintProcessorDataTypes(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumPrintProcessorDataTypes *r)
32324 : {
32325 0 : uint32_t cntr_info_2;
32326 0 : ndr_print_struct(ndr, name, "spoolss_EnumPrintProcessorDataTypes");
32327 0 : if (r == NULL) { ndr_print_null(ndr); return; }
32328 0 : ndr->depth++;
32329 0 : if (flags & NDR_SET_VALUES) {
32330 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
32331 : }
32332 0 : if (flags & NDR_IN) {
32333 0 : ndr_print_struct(ndr, "in", "spoolss_EnumPrintProcessorDataTypes");
32334 0 : ndr->depth++;
32335 0 : ndr_print_ptr(ndr, "servername", r->in.servername);
32336 0 : ndr->depth++;
32337 0 : if (r->in.servername) {
32338 0 : ndr_print_string(ndr, "servername", r->in.servername);
32339 : }
32340 0 : ndr->depth--;
32341 0 : ndr_print_ptr(ndr, "print_processor_name", r->in.print_processor_name);
32342 0 : ndr->depth++;
32343 0 : if (r->in.print_processor_name) {
32344 0 : ndr_print_string(ndr, "print_processor_name", r->in.print_processor_name);
32345 : }
32346 0 : ndr->depth--;
32347 0 : ndr_print_uint32(ndr, "level", r->in.level);
32348 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
32349 0 : ndr->depth++;
32350 0 : if (r->in.buffer) {
32351 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
32352 : }
32353 0 : ndr->depth--;
32354 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
32355 0 : ndr->depth--;
32356 : }
32357 0 : if (flags & NDR_OUT) {
32358 0 : ndr_print_struct(ndr, "out", "spoolss_EnumPrintProcessorDataTypes");
32359 0 : ndr->depth++;
32360 0 : ndr_print_ptr(ndr, "count", r->out.count);
32361 0 : ndr->depth++;
32362 0 : ndr_print_uint32(ndr, "count", *r->out.count);
32363 0 : ndr->depth--;
32364 0 : ndr_print_ptr(ndr, "info", r->out.info);
32365 0 : ndr->depth++;
32366 0 : ndr_print_ptr(ndr, "info", *r->out.info);
32367 0 : ndr->depth++;
32368 0 : if (*r->out.info) {
32369 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(*r->out.count));
32370 0 : ndr->depth++;
32371 0 : for (cntr_info_2 = 0; cntr_info_2 < (*r->out.count); cntr_info_2++) {
32372 0 : ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
32373 0 : ndr_print_spoolss_PrintProcDataTypesInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
32374 : }
32375 0 : ndr->depth--;
32376 : }
32377 0 : ndr->depth--;
32378 0 : ndr->depth--;
32379 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
32380 0 : ndr->depth++;
32381 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
32382 0 : ndr->depth--;
32383 0 : ndr_print_WERROR(ndr, "result", r->out.result);
32384 0 : ndr->depth--;
32385 : }
32386 0 : ndr->depth--;
32387 : }
32388 :
32389 0 : static enum ndr_err_code ndr_push_spoolss_ResetPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_ResetPrinter *r)
32390 : {
32391 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32392 0 : if (flags & NDR_IN) {
32393 0 : if (r->in.handle == NULL) {
32394 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
32395 : }
32396 0 : if (r->in.devmode_ctr == NULL) {
32397 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
32398 : }
32399 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
32400 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_type));
32401 0 : if (r->in.data_type) {
32402 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.data_type, CH_UTF16)));
32403 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
32404 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.data_type, CH_UTF16)));
32405 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.data_type, ndr_charset_length(r->in.data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
32406 : }
32407 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
32408 : }
32409 0 : if (flags & NDR_OUT) {
32410 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
32411 : }
32412 0 : return NDR_ERR_SUCCESS;
32413 : }
32414 :
32415 0 : static enum ndr_err_code ndr_pull_spoolss_ResetPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_ResetPrinter *r)
32416 : {
32417 0 : uint32_t _ptr_data_type;
32418 0 : uint32_t size_data_type_1 = 0;
32419 0 : uint32_t length_data_type_1 = 0;
32420 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
32421 0 : TALLOC_CTX *_mem_save_data_type_0 = NULL;
32422 0 : TALLOC_CTX *_mem_save_devmode_ctr_0 = NULL;
32423 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32424 0 : if (flags & NDR_IN) {
32425 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
32426 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
32427 : }
32428 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
32429 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
32430 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
32431 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
32432 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
32433 0 : if (_ptr_data_type) {
32434 0 : NDR_PULL_ALLOC(ndr, r->in.data_type);
32435 : } else {
32436 0 : r->in.data_type = NULL;
32437 : }
32438 0 : if (r->in.data_type) {
32439 0 : _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
32440 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.data_type, 0);
32441 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data_type));
32442 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.data_type));
32443 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.data_type, &size_data_type_1));
32444 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.data_type, &length_data_type_1));
32445 0 : if (length_data_type_1 > size_data_type_1) {
32446 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_type_1, length_data_type_1);
32447 : }
32448 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_data_type_1, sizeof(uint16_t)));
32449 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.data_type, length_data_type_1, sizeof(uint16_t), CH_UTF16));
32450 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
32451 : }
32452 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
32453 0 : NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
32454 : }
32455 0 : _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
32456 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC);
32457 0 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
32458 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC);
32459 : }
32460 0 : if (flags & NDR_OUT) {
32461 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
32462 : if (r->in.handle == NULL) {
32463 : NDR_PULL_ALLOC(ndr, r->in.handle);
32464 : NDR_ZERO_STRUCTP(r->in.handle);
32465 : }
32466 : if (r->in.devmode_ctr == NULL) {
32467 : NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
32468 : NDR_ZERO_STRUCTP(r->in.devmode_ctr);
32469 : }
32470 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
32471 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
32472 : }
32473 0 : return NDR_ERR_SUCCESS;
32474 : }
32475 :
32476 0 : _PUBLIC_ void ndr_print_spoolss_ResetPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_ResetPrinter *r)
32477 : {
32478 0 : ndr_print_struct(ndr, name, "spoolss_ResetPrinter");
32479 0 : if (r == NULL) { ndr_print_null(ndr); return; }
32480 0 : ndr->depth++;
32481 0 : if (flags & NDR_SET_VALUES) {
32482 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
32483 : }
32484 0 : if (flags & NDR_IN) {
32485 0 : ndr_print_struct(ndr, "in", "spoolss_ResetPrinter");
32486 0 : ndr->depth++;
32487 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
32488 0 : ndr->depth++;
32489 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
32490 0 : ndr->depth--;
32491 0 : ndr_print_ptr(ndr, "data_type", r->in.data_type);
32492 0 : ndr->depth++;
32493 0 : if (r->in.data_type) {
32494 0 : ndr_print_string(ndr, "data_type", r->in.data_type);
32495 : }
32496 0 : ndr->depth--;
32497 0 : ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr);
32498 0 : ndr->depth++;
32499 0 : ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr);
32500 0 : ndr->depth--;
32501 0 : ndr->depth--;
32502 : }
32503 0 : if (flags & NDR_OUT) {
32504 0 : ndr_print_struct(ndr, "out", "spoolss_ResetPrinter");
32505 0 : ndr->depth++;
32506 0 : ndr_print_WERROR(ndr, "result", r->out.result);
32507 0 : ndr->depth--;
32508 : }
32509 0 : ndr->depth--;
32510 : }
32511 :
32512 8 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_GetPrinterDriver2(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetPrinterDriver2 *r)
32513 : {
32514 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32515 8 : if (flags & NDR_IN) {
32516 4 : if (r->in.handle == NULL) {
32517 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
32518 : }
32519 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
32520 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.architecture));
32521 4 : if (r->in.architecture) {
32522 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
32523 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
32524 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
32525 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
32526 : }
32527 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
32528 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
32529 4 : if (r->in.buffer) {
32530 4 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
32531 : }
32532 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
32533 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_major_version));
32534 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_minor_version));
32535 : }
32536 8 : if (flags & NDR_OUT) {
32537 4 : if (r->out.needed == NULL) {
32538 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
32539 : }
32540 4 : if (r->out.server_major_version == NULL) {
32541 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
32542 : }
32543 4 : if (r->out.server_minor_version == NULL) {
32544 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
32545 : }
32546 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
32547 4 : if (r->out.info) {
32548 : {
32549 0 : struct ndr_push *_ndr_info;
32550 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
32551 0 : NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
32552 0 : NDR_CHECK(ndr_push_spoolss_DriverInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
32553 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
32554 : }
32555 : }
32556 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
32557 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.server_major_version));
32558 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.server_minor_version));
32559 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
32560 : }
32561 8 : return NDR_ERR_SUCCESS;
32562 : }
32563 :
32564 14 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_GetPrinterDriver2(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetPrinterDriver2 *r)
32565 : {
32566 6 : uint32_t _ptr_architecture;
32567 14 : uint32_t size_architecture_1 = 0;
32568 14 : uint32_t length_architecture_1 = 0;
32569 6 : uint32_t _ptr_buffer;
32570 6 : uint32_t _ptr_info;
32571 14 : TALLOC_CTX *_mem_save_handle_0 = NULL;
32572 14 : TALLOC_CTX *_mem_save_architecture_0 = NULL;
32573 14 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
32574 14 : TALLOC_CTX *_mem_save_info_0 = NULL;
32575 14 : TALLOC_CTX *_mem_save_needed_0 = NULL;
32576 14 : TALLOC_CTX *_mem_save_server_major_version_0 = NULL;
32577 14 : TALLOC_CTX *_mem_save_server_minor_version_0 = NULL;
32578 14 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32579 14 : if (flags & NDR_IN) {
32580 8 : NDR_ZERO_STRUCT(r->out);
32581 :
32582 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
32583 8 : NDR_PULL_ALLOC(ndr, r->in.handle);
32584 : }
32585 8 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
32586 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
32587 8 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
32588 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
32589 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
32590 8 : if (_ptr_architecture) {
32591 8 : NDR_PULL_ALLOC(ndr, r->in.architecture);
32592 : } else {
32593 0 : r->in.architecture = NULL;
32594 : }
32595 8 : if (r->in.architecture) {
32596 8 : _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
32597 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.architecture, 0);
32598 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
32599 8 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
32600 8 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.architecture, &size_architecture_1));
32601 8 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.architecture, &length_architecture_1));
32602 8 : if (length_architecture_1 > size_architecture_1) {
32603 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_1, length_architecture_1);
32604 : }
32605 8 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_1, sizeof(uint16_t)));
32606 8 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, length_architecture_1, sizeof(uint16_t), CH_UTF16));
32607 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
32608 : }
32609 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
32610 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
32611 8 : if (_ptr_buffer) {
32612 8 : NDR_PULL_ALLOC(ndr, r->in.buffer);
32613 : } else {
32614 0 : r->in.buffer = NULL;
32615 : }
32616 8 : if (r->in.buffer) {
32617 8 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
32618 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
32619 8 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
32620 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
32621 : }
32622 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
32623 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_major_version));
32624 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_minor_version));
32625 8 : NDR_PULL_ALLOC(ndr, r->out.needed);
32626 8 : NDR_ZERO_STRUCTP(r->out.needed);
32627 8 : NDR_PULL_ALLOC(ndr, r->out.server_major_version);
32628 8 : NDR_ZERO_STRUCTP(r->out.server_major_version);
32629 8 : NDR_PULL_ALLOC(ndr, r->out.server_minor_version);
32630 8 : NDR_ZERO_STRUCTP(r->out.server_minor_version);
32631 : }
32632 14 : if (flags & NDR_OUT) {
32633 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
32634 : if (r->in.handle == NULL) {
32635 : NDR_PULL_ALLOC(ndr, r->in.handle);
32636 : NDR_ZERO_STRUCTP(r->in.handle);
32637 : }
32638 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
32639 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
32640 6 : if (_ptr_info) {
32641 2 : NDR_PULL_ALLOC(ndr, r->out.info);
32642 : } else {
32643 4 : r->out.info = NULL;
32644 : }
32645 6 : if (r->out.info) {
32646 2 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
32647 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
32648 : {
32649 2 : struct ndr_pull *_ndr_info;
32650 2 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
32651 2 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
32652 2 : NDR_CHECK(ndr_pull_spoolss_DriverInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
32653 2 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
32654 : }
32655 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
32656 : }
32657 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
32658 2 : NDR_PULL_ALLOC(ndr, r->out.needed);
32659 : }
32660 6 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
32661 6 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
32662 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
32663 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
32664 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
32665 2 : NDR_PULL_ALLOC(ndr, r->out.server_major_version);
32666 : }
32667 6 : _mem_save_server_major_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
32668 6 : NDR_PULL_SET_MEM_CTX(ndr, r->out.server_major_version, LIBNDR_FLAG_REF_ALLOC);
32669 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.server_major_version));
32670 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_major_version_0, LIBNDR_FLAG_REF_ALLOC);
32671 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
32672 2 : NDR_PULL_ALLOC(ndr, r->out.server_minor_version);
32673 : }
32674 6 : _mem_save_server_minor_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
32675 6 : NDR_PULL_SET_MEM_CTX(ndr, r->out.server_minor_version, LIBNDR_FLAG_REF_ALLOC);
32676 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.server_minor_version));
32677 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_minor_version_0, LIBNDR_FLAG_REF_ALLOC);
32678 6 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
32679 : }
32680 8 : return NDR_ERR_SUCCESS;
32681 : }
32682 :
32683 6 : _PUBLIC_ void ndr_print_spoolss_GetPrinterDriver2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetPrinterDriver2 *r)
32684 : {
32685 6 : ndr_print_struct(ndr, name, "spoolss_GetPrinterDriver2");
32686 6 : if (r == NULL) { ndr_print_null(ndr); return; }
32687 6 : ndr->depth++;
32688 6 : if (flags & NDR_SET_VALUES) {
32689 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
32690 : }
32691 6 : if (flags & NDR_IN) {
32692 4 : ndr_print_struct(ndr, "in", "spoolss_GetPrinterDriver2");
32693 4 : ndr->depth++;
32694 4 : ndr_print_ptr(ndr, "handle", r->in.handle);
32695 4 : ndr->depth++;
32696 4 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
32697 4 : ndr->depth--;
32698 4 : ndr_print_ptr(ndr, "architecture", r->in.architecture);
32699 4 : ndr->depth++;
32700 4 : if (r->in.architecture) {
32701 4 : ndr_print_string(ndr, "architecture", r->in.architecture);
32702 : }
32703 4 : ndr->depth--;
32704 4 : ndr_print_uint32(ndr, "level", r->in.level);
32705 4 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
32706 4 : ndr->depth++;
32707 4 : if (r->in.buffer) {
32708 4 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
32709 : }
32710 4 : ndr->depth--;
32711 4 : ndr_print_uint32(ndr, "offered", r->in.offered);
32712 4 : ndr_print_uint32(ndr, "client_major_version", r->in.client_major_version);
32713 4 : ndr_print_uint32(ndr, "client_minor_version", r->in.client_minor_version);
32714 4 : ndr->depth--;
32715 : }
32716 6 : if (flags & NDR_OUT) {
32717 2 : ndr_print_struct(ndr, "out", "spoolss_GetPrinterDriver2");
32718 2 : ndr->depth++;
32719 2 : ndr_print_ptr(ndr, "info", r->out.info);
32720 2 : ndr->depth++;
32721 2 : if (r->out.info) {
32722 2 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
32723 2 : ndr_print_spoolss_DriverInfo(ndr, "info", r->out.info);
32724 : }
32725 2 : ndr->depth--;
32726 2 : ndr_print_ptr(ndr, "needed", r->out.needed);
32727 2 : ndr->depth++;
32728 2 : ndr_print_uint32(ndr, "needed", *r->out.needed);
32729 2 : ndr->depth--;
32730 2 : ndr_print_ptr(ndr, "server_major_version", r->out.server_major_version);
32731 2 : ndr->depth++;
32732 2 : ndr_print_uint32(ndr, "server_major_version", *r->out.server_major_version);
32733 2 : ndr->depth--;
32734 2 : ndr_print_ptr(ndr, "server_minor_version", r->out.server_minor_version);
32735 2 : ndr->depth++;
32736 2 : ndr_print_uint32(ndr, "server_minor_version", *r->out.server_minor_version);
32737 2 : ndr->depth--;
32738 2 : ndr_print_WERROR(ndr, "result", r->out.result);
32739 2 : ndr->depth--;
32740 : }
32741 6 : ndr->depth--;
32742 : }
32743 :
32744 0 : static enum ndr_err_code ndr_push_spoolss_FindFirstPrinterChangeNotification(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_FindFirstPrinterChangeNotification *r)
32745 : {
32746 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32747 0 : if (flags & NDR_IN) {
32748 0 : }
32749 0 : if (flags & NDR_OUT) {
32750 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
32751 : }
32752 0 : return NDR_ERR_SUCCESS;
32753 : }
32754 :
32755 0 : static enum ndr_err_code ndr_pull_spoolss_FindFirstPrinterChangeNotification(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_FindFirstPrinterChangeNotification *r)
32756 : {
32757 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32758 0 : if (flags & NDR_IN) {
32759 0 : }
32760 0 : if (flags & NDR_OUT) {
32761 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
32762 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
32763 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
32764 : }
32765 0 : return NDR_ERR_SUCCESS;
32766 : }
32767 :
32768 0 : _PUBLIC_ void ndr_print_spoolss_FindFirstPrinterChangeNotification(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_FindFirstPrinterChangeNotification *r)
32769 : {
32770 0 : ndr_print_struct(ndr, name, "spoolss_FindFirstPrinterChangeNotification");
32771 0 : if (r == NULL) { ndr_print_null(ndr); return; }
32772 0 : ndr->depth++;
32773 0 : if (flags & NDR_SET_VALUES) {
32774 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
32775 : }
32776 0 : if (flags & NDR_IN) {
32777 0 : ndr_print_struct(ndr, "in", "spoolss_FindFirstPrinterChangeNotification");
32778 0 : ndr->depth++;
32779 0 : ndr->depth--;
32780 : }
32781 0 : if (flags & NDR_OUT) {
32782 0 : ndr_print_struct(ndr, "out", "spoolss_FindFirstPrinterChangeNotification");
32783 0 : ndr->depth++;
32784 0 : ndr_print_WERROR(ndr, "result", r->out.result);
32785 0 : ndr->depth--;
32786 : }
32787 0 : ndr->depth--;
32788 : }
32789 :
32790 0 : static enum ndr_err_code ndr_push_spoolss_FindNextPrinterChangeNotification(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_FindNextPrinterChangeNotification *r)
32791 : {
32792 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32793 0 : if (flags & NDR_IN) {
32794 0 : }
32795 0 : if (flags & NDR_OUT) {
32796 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
32797 : }
32798 0 : return NDR_ERR_SUCCESS;
32799 : }
32800 :
32801 0 : static enum ndr_err_code ndr_pull_spoolss_FindNextPrinterChangeNotification(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_FindNextPrinterChangeNotification *r)
32802 : {
32803 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32804 0 : if (flags & NDR_IN) {
32805 0 : }
32806 0 : if (flags & NDR_OUT) {
32807 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
32808 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
32809 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
32810 : }
32811 0 : return NDR_ERR_SUCCESS;
32812 : }
32813 :
32814 0 : _PUBLIC_ void ndr_print_spoolss_FindNextPrinterChangeNotification(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_FindNextPrinterChangeNotification *r)
32815 : {
32816 0 : ndr_print_struct(ndr, name, "spoolss_FindNextPrinterChangeNotification");
32817 0 : if (r == NULL) { ndr_print_null(ndr); return; }
32818 0 : ndr->depth++;
32819 0 : if (flags & NDR_SET_VALUES) {
32820 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
32821 : }
32822 0 : if (flags & NDR_IN) {
32823 0 : ndr_print_struct(ndr, "in", "spoolss_FindNextPrinterChangeNotification");
32824 0 : ndr->depth++;
32825 0 : ndr->depth--;
32826 : }
32827 0 : if (flags & NDR_OUT) {
32828 0 : ndr_print_struct(ndr, "out", "spoolss_FindNextPrinterChangeNotification");
32829 0 : ndr->depth++;
32830 0 : ndr_print_WERROR(ndr, "result", r->out.result);
32831 0 : ndr->depth--;
32832 : }
32833 0 : ndr->depth--;
32834 : }
32835 :
32836 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FindClosePrinterNotify(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_FindClosePrinterNotify *r)
32837 : {
32838 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32839 0 : if (flags & NDR_IN) {
32840 0 : if (r->in.handle == NULL) {
32841 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
32842 : }
32843 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
32844 : }
32845 0 : if (flags & NDR_OUT) {
32846 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
32847 : }
32848 0 : return NDR_ERR_SUCCESS;
32849 : }
32850 :
32851 4 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FindClosePrinterNotify(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_FindClosePrinterNotify *r)
32852 : {
32853 4 : TALLOC_CTX *_mem_save_handle_0 = NULL;
32854 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32855 4 : if (flags & NDR_IN) {
32856 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
32857 2 : NDR_PULL_ALLOC(ndr, r->in.handle);
32858 : }
32859 2 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
32860 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
32861 2 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
32862 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
32863 : }
32864 4 : if (flags & NDR_OUT) {
32865 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
32866 : if (r->in.handle == NULL) {
32867 : NDR_PULL_ALLOC(ndr, r->in.handle);
32868 : NDR_ZERO_STRUCTP(r->in.handle);
32869 : }
32870 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
32871 2 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
32872 : }
32873 0 : return NDR_ERR_SUCCESS;
32874 : }
32875 :
32876 4 : _PUBLIC_ void ndr_print_spoolss_FindClosePrinterNotify(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_FindClosePrinterNotify *r)
32877 : {
32878 4 : ndr_print_struct(ndr, name, "spoolss_FindClosePrinterNotify");
32879 4 : if (r == NULL) { ndr_print_null(ndr); return; }
32880 4 : ndr->depth++;
32881 4 : if (flags & NDR_SET_VALUES) {
32882 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
32883 : }
32884 4 : if (flags & NDR_IN) {
32885 2 : ndr_print_struct(ndr, "in", "spoolss_FindClosePrinterNotify");
32886 2 : ndr->depth++;
32887 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
32888 2 : ndr->depth++;
32889 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
32890 2 : ndr->depth--;
32891 2 : ndr->depth--;
32892 : }
32893 4 : if (flags & NDR_OUT) {
32894 2 : ndr_print_struct(ndr, "out", "spoolss_FindClosePrinterNotify");
32895 2 : ndr->depth++;
32896 2 : ndr_print_WERROR(ndr, "result", r->out.result);
32897 2 : ndr->depth--;
32898 : }
32899 4 : ndr->depth--;
32900 : }
32901 :
32902 0 : static enum ndr_err_code ndr_push_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r)
32903 : {
32904 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32905 0 : if (flags & NDR_IN) {
32906 0 : }
32907 0 : if (flags & NDR_OUT) {
32908 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
32909 : }
32910 0 : return NDR_ERR_SUCCESS;
32911 : }
32912 :
32913 0 : static enum ndr_err_code ndr_pull_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r)
32914 : {
32915 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32916 0 : if (flags & NDR_IN) {
32917 0 : }
32918 0 : if (flags & NDR_OUT) {
32919 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
32920 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
32921 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
32922 : }
32923 0 : return NDR_ERR_SUCCESS;
32924 : }
32925 :
32926 0 : _PUBLIC_ void ndr_print_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r)
32927 : {
32928 0 : ndr_print_struct(ndr, name, "spoolss_RouterFindFirstPrinterChangeNotificationOld");
32929 0 : if (r == NULL) { ndr_print_null(ndr); return; }
32930 0 : ndr->depth++;
32931 0 : if (flags & NDR_SET_VALUES) {
32932 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
32933 : }
32934 0 : if (flags & NDR_IN) {
32935 0 : ndr_print_struct(ndr, "in", "spoolss_RouterFindFirstPrinterChangeNotificationOld");
32936 0 : ndr->depth++;
32937 0 : ndr->depth--;
32938 : }
32939 0 : if (flags & NDR_OUT) {
32940 0 : ndr_print_struct(ndr, "out", "spoolss_RouterFindFirstPrinterChangeNotificationOld");
32941 0 : ndr->depth++;
32942 0 : ndr_print_WERROR(ndr, "result", r->out.result);
32943 0 : ndr->depth--;
32944 : }
32945 0 : ndr->depth--;
32946 : }
32947 :
32948 4 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_ReplyOpenPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_ReplyOpenPrinter *r)
32949 : {
32950 4 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
32951 4 : if (flags & NDR_IN) {
32952 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
32953 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
32954 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
32955 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
32956 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.printer_local));
32957 2 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
32958 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
32959 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
32960 2 : if (r->in.buffer) {
32961 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.bufsize));
32962 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.bufsize));
32963 : }
32964 : }
32965 4 : if (flags & NDR_OUT) {
32966 2 : if (r->out.handle == NULL) {
32967 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
32968 : }
32969 2 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
32970 2 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
32971 : }
32972 4 : return NDR_ERR_SUCCESS;
32973 : }
32974 :
32975 8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_ReplyOpenPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_ReplyOpenPrinter *r)
32976 : {
32977 8 : uint32_t size_server_name_0 = 0;
32978 8 : uint32_t length_server_name_0 = 0;
32979 4 : uint32_t _ptr_buffer;
32980 8 : uint32_t size_buffer_1 = 0;
32981 8 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
32982 8 : TALLOC_CTX *_mem_save_handle_0 = NULL;
32983 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
32984 8 : if (flags & NDR_IN) {
32985 4 : NDR_ZERO_STRUCT(r->out);
32986 :
32987 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
32988 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
32989 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_0));
32990 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_0));
32991 4 : if (length_server_name_0 > size_server_name_0) {
32992 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_0, length_server_name_0);
32993 : }
32994 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_0, sizeof(uint16_t)));
32995 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_0, sizeof(uint16_t), CH_UTF16));
32996 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.printer_local));
32997 4 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type));
32998 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
32999 4 : if (r->in.bufsize > 512) {
33000 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.bufsize), (uint32_t)(0), (uint32_t)(512));
33001 : }
33002 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
33003 4 : if (_ptr_buffer) {
33004 0 : NDR_PULL_ALLOC(ndr, r->in.buffer);
33005 : } else {
33006 4 : r->in.buffer = NULL;
33007 : }
33008 4 : if (r->in.buffer) {
33009 0 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
33010 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
33011 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
33012 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.buffer, &size_buffer_1));
33013 0 : NDR_PULL_ALLOC_N(ndr, r->in.buffer, size_buffer_1);
33014 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, size_buffer_1));
33015 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
33016 : }
33017 4 : NDR_PULL_ALLOC(ndr, r->out.handle);
33018 4 : NDR_ZERO_STRUCTP(r->out.handle);
33019 4 : if (r->in.buffer) {
33020 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.buffer, r->in.bufsize));
33021 : }
33022 : }
33023 8 : if (flags & NDR_OUT) {
33024 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33025 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33026 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33027 4 : NDR_PULL_ALLOC(ndr, r->out.handle);
33028 : }
33029 4 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
33030 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
33031 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
33032 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
33033 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33034 : }
33035 4 : return NDR_ERR_SUCCESS;
33036 : }
33037 :
33038 8 : _PUBLIC_ void ndr_print_spoolss_ReplyOpenPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_ReplyOpenPrinter *r)
33039 : {
33040 8 : ndr_print_struct(ndr, name, "spoolss_ReplyOpenPrinter");
33041 8 : if (r == NULL) { ndr_print_null(ndr); return; }
33042 8 : ndr->depth++;
33043 8 : if (flags & NDR_SET_VALUES) {
33044 2 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33045 : }
33046 8 : if (flags & NDR_IN) {
33047 4 : ndr_print_struct(ndr, "in", "spoolss_ReplyOpenPrinter");
33048 4 : ndr->depth++;
33049 4 : ndr_print_string(ndr, "server_name", r->in.server_name);
33050 4 : ndr_print_uint32(ndr, "printer_local", r->in.printer_local);
33051 4 : ndr_print_winreg_Type(ndr, "type", r->in.type);
33052 4 : ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
33053 4 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
33054 4 : ndr->depth++;
33055 4 : if (r->in.buffer) {
33056 0 : ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.bufsize);
33057 : }
33058 4 : ndr->depth--;
33059 4 : ndr->depth--;
33060 : }
33061 8 : if (flags & NDR_OUT) {
33062 4 : ndr_print_struct(ndr, "out", "spoolss_ReplyOpenPrinter");
33063 4 : ndr->depth++;
33064 4 : ndr_print_ptr(ndr, "handle", r->out.handle);
33065 4 : ndr->depth++;
33066 4 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
33067 4 : ndr->depth--;
33068 4 : ndr_print_WERROR(ndr, "result", r->out.result);
33069 4 : ndr->depth--;
33070 : }
33071 8 : ndr->depth--;
33072 : }
33073 :
33074 0 : static enum ndr_err_code ndr_push_spoolss_RouterReplyPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_RouterReplyPrinter *r)
33075 : {
33076 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33077 0 : if (flags & NDR_IN) {
33078 0 : if (r->in.handle == NULL) {
33079 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
33080 : }
33081 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
33082 0 : NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, r->in.flags));
33083 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
33084 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
33085 0 : if (r->in.buffer) {
33086 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.bufsize));
33087 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.bufsize));
33088 : }
33089 : }
33090 0 : if (flags & NDR_OUT) {
33091 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
33092 : }
33093 0 : return NDR_ERR_SUCCESS;
33094 : }
33095 :
33096 0 : static enum ndr_err_code ndr_pull_spoolss_RouterReplyPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_RouterReplyPrinter *r)
33097 : {
33098 0 : uint32_t _ptr_buffer;
33099 0 : uint32_t size_buffer_1 = 0;
33100 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
33101 0 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
33102 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
33103 0 : if (flags & NDR_IN) {
33104 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33105 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
33106 : }
33107 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
33108 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
33109 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
33110 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
33111 0 : NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, &r->in.flags));
33112 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
33113 0 : if (r->in.bufsize > 512) {
33114 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.bufsize), (uint32_t)(0), (uint32_t)(512));
33115 : }
33116 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
33117 0 : if (_ptr_buffer) {
33118 0 : NDR_PULL_ALLOC(ndr, r->in.buffer);
33119 : } else {
33120 0 : r->in.buffer = NULL;
33121 : }
33122 0 : if (r->in.buffer) {
33123 0 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
33124 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
33125 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
33126 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.buffer, &size_buffer_1));
33127 0 : NDR_PULL_ALLOC_N(ndr, r->in.buffer, size_buffer_1);
33128 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, size_buffer_1));
33129 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
33130 : }
33131 0 : if (r->in.buffer) {
33132 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.buffer, r->in.bufsize));
33133 : }
33134 : }
33135 0 : if (flags & NDR_OUT) {
33136 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33137 : if (r->in.handle == NULL) {
33138 : NDR_PULL_ALLOC(ndr, r->in.handle);
33139 : NDR_ZERO_STRUCTP(r->in.handle);
33140 : }
33141 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33142 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33143 : }
33144 0 : return NDR_ERR_SUCCESS;
33145 : }
33146 :
33147 0 : _PUBLIC_ void ndr_print_spoolss_RouterReplyPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_RouterReplyPrinter *r)
33148 : {
33149 0 : ndr_print_struct(ndr, name, "spoolss_RouterReplyPrinter");
33150 0 : if (r == NULL) { ndr_print_null(ndr); return; }
33151 0 : ndr->depth++;
33152 0 : if (flags & NDR_SET_VALUES) {
33153 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33154 : }
33155 0 : if (flags & NDR_IN) {
33156 0 : ndr_print_struct(ndr, "in", "spoolss_RouterReplyPrinter");
33157 0 : ndr->depth++;
33158 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
33159 0 : ndr->depth++;
33160 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
33161 0 : ndr->depth--;
33162 0 : ndr_print_spoolss_PrinterChangeFlags(ndr, "flags", r->in.flags);
33163 0 : ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
33164 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
33165 0 : ndr->depth++;
33166 0 : if (r->in.buffer) {
33167 0 : ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.bufsize);
33168 : }
33169 0 : ndr->depth--;
33170 0 : ndr->depth--;
33171 : }
33172 0 : if (flags & NDR_OUT) {
33173 0 : ndr_print_struct(ndr, "out", "spoolss_RouterReplyPrinter");
33174 0 : ndr->depth++;
33175 0 : ndr_print_WERROR(ndr, "result", r->out.result);
33176 0 : ndr->depth--;
33177 : }
33178 0 : ndr->depth--;
33179 : }
33180 :
33181 4 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_ReplyClosePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_ReplyClosePrinter *r)
33182 : {
33183 4 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33184 4 : if (flags & NDR_IN) {
33185 2 : if (r->in.handle == NULL) {
33186 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
33187 : }
33188 2 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
33189 : }
33190 4 : if (flags & NDR_OUT) {
33191 2 : if (r->out.handle == NULL) {
33192 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
33193 : }
33194 2 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
33195 2 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
33196 : }
33197 4 : return NDR_ERR_SUCCESS;
33198 : }
33199 :
33200 8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_ReplyClosePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_ReplyClosePrinter *r)
33201 : {
33202 8 : TALLOC_CTX *_mem_save_handle_0 = NULL;
33203 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
33204 8 : if (flags & NDR_IN) {
33205 4 : NDR_ZERO_STRUCT(r->out);
33206 :
33207 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33208 4 : NDR_PULL_ALLOC(ndr, r->in.handle);
33209 : }
33210 4 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
33211 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
33212 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
33213 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
33214 4 : NDR_PULL_ALLOC(ndr, r->out.handle);
33215 4 : *r->out.handle = *r->in.handle;
33216 : }
33217 8 : if (flags & NDR_OUT) {
33218 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33219 : if (r->in.handle == NULL) {
33220 : NDR_PULL_ALLOC(ndr, r->in.handle);
33221 : NDR_ZERO_STRUCTP(r->in.handle);
33222 : }
33223 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33224 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33225 4 : NDR_PULL_ALLOC(ndr, r->out.handle);
33226 : }
33227 4 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
33228 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
33229 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
33230 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
33231 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33232 : }
33233 4 : return NDR_ERR_SUCCESS;
33234 : }
33235 :
33236 8 : _PUBLIC_ void ndr_print_spoolss_ReplyClosePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_ReplyClosePrinter *r)
33237 : {
33238 8 : ndr_print_struct(ndr, name, "spoolss_ReplyClosePrinter");
33239 8 : if (r == NULL) { ndr_print_null(ndr); return; }
33240 8 : ndr->depth++;
33241 8 : if (flags & NDR_SET_VALUES) {
33242 2 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33243 : }
33244 8 : if (flags & NDR_IN) {
33245 4 : ndr_print_struct(ndr, "in", "spoolss_ReplyClosePrinter");
33246 4 : ndr->depth++;
33247 4 : ndr_print_ptr(ndr, "handle", r->in.handle);
33248 4 : ndr->depth++;
33249 4 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
33250 4 : ndr->depth--;
33251 4 : ndr->depth--;
33252 : }
33253 8 : if (flags & NDR_OUT) {
33254 4 : ndr_print_struct(ndr, "out", "spoolss_ReplyClosePrinter");
33255 4 : ndr->depth++;
33256 4 : ndr_print_ptr(ndr, "handle", r->out.handle);
33257 4 : ndr->depth++;
33258 4 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
33259 4 : ndr->depth--;
33260 4 : ndr_print_WERROR(ndr, "result", r->out.result);
33261 4 : ndr->depth--;
33262 : }
33263 8 : ndr->depth--;
33264 : }
33265 :
33266 0 : static enum ndr_err_code ndr_push_spoolss_AddPortEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddPortEx *r)
33267 : {
33268 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33269 0 : if (flags & NDR_IN) {
33270 0 : if (r->in.port_ctr == NULL) {
33271 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
33272 : }
33273 0 : if (r->in.port_var_ctr == NULL) {
33274 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
33275 : }
33276 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
33277 0 : if (r->in.servername) {
33278 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
33279 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
33280 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
33281 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
33282 : }
33283 0 : NDR_CHECK(ndr_push_spoolss_SetPortInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.port_ctr));
33284 0 : NDR_CHECK(ndr_push_spoolss_PortVarContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.port_var_ctr));
33285 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.monitor_name));
33286 0 : if (r->in.monitor_name) {
33287 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.monitor_name, CH_UTF16)));
33288 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
33289 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.monitor_name, CH_UTF16)));
33290 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.monitor_name, ndr_charset_length(r->in.monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
33291 : }
33292 : }
33293 0 : if (flags & NDR_OUT) {
33294 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
33295 : }
33296 0 : return NDR_ERR_SUCCESS;
33297 : }
33298 :
33299 0 : static enum ndr_err_code ndr_pull_spoolss_AddPortEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddPortEx *r)
33300 : {
33301 0 : uint32_t _ptr_servername;
33302 0 : uint32_t size_servername_1 = 0;
33303 0 : uint32_t length_servername_1 = 0;
33304 0 : uint32_t _ptr_monitor_name;
33305 0 : uint32_t size_monitor_name_1 = 0;
33306 0 : uint32_t length_monitor_name_1 = 0;
33307 0 : TALLOC_CTX *_mem_save_servername_0 = NULL;
33308 0 : TALLOC_CTX *_mem_save_port_ctr_0 = NULL;
33309 0 : TALLOC_CTX *_mem_save_port_var_ctr_0 = NULL;
33310 0 : TALLOC_CTX *_mem_save_monitor_name_0 = NULL;
33311 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
33312 0 : if (flags & NDR_IN) {
33313 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
33314 0 : if (_ptr_servername) {
33315 0 : NDR_PULL_ALLOC(ndr, r->in.servername);
33316 : } else {
33317 0 : r->in.servername = NULL;
33318 : }
33319 0 : if (r->in.servername) {
33320 0 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
33321 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
33322 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
33323 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
33324 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
33325 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
33326 0 : if (length_servername_1 > size_servername_1) {
33327 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
33328 : }
33329 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
33330 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
33331 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
33332 : }
33333 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33334 0 : NDR_PULL_ALLOC(ndr, r->in.port_ctr);
33335 : }
33336 0 : _mem_save_port_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
33337 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.port_ctr, LIBNDR_FLAG_REF_ALLOC);
33338 0 : NDR_CHECK(ndr_pull_spoolss_SetPortInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.port_ctr));
33339 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_ctr_0, LIBNDR_FLAG_REF_ALLOC);
33340 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33341 0 : NDR_PULL_ALLOC(ndr, r->in.port_var_ctr);
33342 : }
33343 0 : _mem_save_port_var_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
33344 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.port_var_ctr, LIBNDR_FLAG_REF_ALLOC);
33345 0 : NDR_CHECK(ndr_pull_spoolss_PortVarContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.port_var_ctr));
33346 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_var_ctr_0, LIBNDR_FLAG_REF_ALLOC);
33347 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
33348 0 : if (_ptr_monitor_name) {
33349 0 : NDR_PULL_ALLOC(ndr, r->in.monitor_name);
33350 : } else {
33351 0 : r->in.monitor_name = NULL;
33352 : }
33353 0 : if (r->in.monitor_name) {
33354 0 : _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
33355 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.monitor_name, 0);
33356 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.monitor_name));
33357 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.monitor_name));
33358 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.monitor_name, &size_monitor_name_1));
33359 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.monitor_name, &length_monitor_name_1));
33360 0 : if (length_monitor_name_1 > size_monitor_name_1) {
33361 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_monitor_name_1, length_monitor_name_1);
33362 : }
33363 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_monitor_name_1, sizeof(uint16_t)));
33364 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.monitor_name, length_monitor_name_1, sizeof(uint16_t), CH_UTF16));
33365 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
33366 : }
33367 : }
33368 0 : if (flags & NDR_OUT) {
33369 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33370 : if (r->in.port_ctr == NULL) {
33371 : NDR_PULL_ALLOC(ndr, r->in.port_ctr);
33372 : NDR_ZERO_STRUCTP(r->in.port_ctr);
33373 : }
33374 : if (r->in.port_var_ctr == NULL) {
33375 : NDR_PULL_ALLOC(ndr, r->in.port_var_ctr);
33376 : NDR_ZERO_STRUCTP(r->in.port_var_ctr);
33377 : }
33378 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33379 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33380 : }
33381 0 : return NDR_ERR_SUCCESS;
33382 : }
33383 :
33384 0 : _PUBLIC_ void ndr_print_spoolss_AddPortEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddPortEx *r)
33385 : {
33386 0 : ndr_print_struct(ndr, name, "spoolss_AddPortEx");
33387 0 : if (r == NULL) { ndr_print_null(ndr); return; }
33388 0 : ndr->depth++;
33389 0 : if (flags & NDR_SET_VALUES) {
33390 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33391 : }
33392 0 : if (flags & NDR_IN) {
33393 0 : ndr_print_struct(ndr, "in", "spoolss_AddPortEx");
33394 0 : ndr->depth++;
33395 0 : ndr_print_ptr(ndr, "servername", r->in.servername);
33396 0 : ndr->depth++;
33397 0 : if (r->in.servername) {
33398 0 : ndr_print_string(ndr, "servername", r->in.servername);
33399 : }
33400 0 : ndr->depth--;
33401 0 : ndr_print_ptr(ndr, "port_ctr", r->in.port_ctr);
33402 0 : ndr->depth++;
33403 0 : ndr_print_spoolss_SetPortInfoContainer(ndr, "port_ctr", r->in.port_ctr);
33404 0 : ndr->depth--;
33405 0 : ndr_print_ptr(ndr, "port_var_ctr", r->in.port_var_ctr);
33406 0 : ndr->depth++;
33407 0 : ndr_print_spoolss_PortVarContainer(ndr, "port_var_ctr", r->in.port_var_ctr);
33408 0 : ndr->depth--;
33409 0 : ndr_print_ptr(ndr, "monitor_name", r->in.monitor_name);
33410 0 : ndr->depth++;
33411 0 : if (r->in.monitor_name) {
33412 0 : ndr_print_string(ndr, "monitor_name", r->in.monitor_name);
33413 : }
33414 0 : ndr->depth--;
33415 0 : ndr->depth--;
33416 : }
33417 0 : if (flags & NDR_OUT) {
33418 0 : ndr_print_struct(ndr, "out", "spoolss_AddPortEx");
33419 0 : ndr->depth++;
33420 0 : ndr_print_WERROR(ndr, "result", r->out.result);
33421 0 : ndr->depth--;
33422 : }
33423 0 : ndr->depth--;
33424 : }
33425 :
33426 0 : static enum ndr_err_code ndr_push_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_RouterFindFirstPrinterChangeNotification *r)
33427 : {
33428 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33429 0 : if (flags & NDR_IN) {
33430 0 : }
33431 0 : if (flags & NDR_OUT) {
33432 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
33433 : }
33434 0 : return NDR_ERR_SUCCESS;
33435 : }
33436 :
33437 0 : static enum ndr_err_code ndr_pull_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_RouterFindFirstPrinterChangeNotification *r)
33438 : {
33439 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
33440 0 : if (flags & NDR_IN) {
33441 0 : }
33442 0 : if (flags & NDR_OUT) {
33443 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33444 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33445 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33446 : }
33447 0 : return NDR_ERR_SUCCESS;
33448 : }
33449 :
33450 0 : _PUBLIC_ void ndr_print_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_RouterFindFirstPrinterChangeNotification *r)
33451 : {
33452 0 : ndr_print_struct(ndr, name, "spoolss_RouterFindFirstPrinterChangeNotification");
33453 0 : if (r == NULL) { ndr_print_null(ndr); return; }
33454 0 : ndr->depth++;
33455 0 : if (flags & NDR_SET_VALUES) {
33456 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33457 : }
33458 0 : if (flags & NDR_IN) {
33459 0 : ndr_print_struct(ndr, "in", "spoolss_RouterFindFirstPrinterChangeNotification");
33460 0 : ndr->depth++;
33461 0 : ndr->depth--;
33462 : }
33463 0 : if (flags & NDR_OUT) {
33464 0 : ndr_print_struct(ndr, "out", "spoolss_RouterFindFirstPrinterChangeNotification");
33465 0 : ndr->depth++;
33466 0 : ndr_print_WERROR(ndr, "result", r->out.result);
33467 0 : ndr->depth--;
33468 : }
33469 0 : ndr->depth--;
33470 : }
33471 :
33472 0 : static enum ndr_err_code ndr_push_spoolss_SpoolerInit(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_SpoolerInit *r)
33473 : {
33474 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33475 0 : if (flags & NDR_IN) {
33476 0 : }
33477 0 : if (flags & NDR_OUT) {
33478 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
33479 : }
33480 0 : return NDR_ERR_SUCCESS;
33481 : }
33482 :
33483 0 : static enum ndr_err_code ndr_pull_spoolss_SpoolerInit(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_SpoolerInit *r)
33484 : {
33485 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
33486 0 : if (flags & NDR_IN) {
33487 0 : }
33488 0 : if (flags & NDR_OUT) {
33489 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33490 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33491 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33492 : }
33493 0 : return NDR_ERR_SUCCESS;
33494 : }
33495 :
33496 0 : _PUBLIC_ void ndr_print_spoolss_SpoolerInit(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_SpoolerInit *r)
33497 : {
33498 0 : ndr_print_struct(ndr, name, "spoolss_SpoolerInit");
33499 0 : if (r == NULL) { ndr_print_null(ndr); return; }
33500 0 : ndr->depth++;
33501 0 : if (flags & NDR_SET_VALUES) {
33502 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33503 : }
33504 0 : if (flags & NDR_IN) {
33505 0 : ndr_print_struct(ndr, "in", "spoolss_SpoolerInit");
33506 0 : ndr->depth++;
33507 0 : ndr->depth--;
33508 : }
33509 0 : if (flags & NDR_OUT) {
33510 0 : ndr_print_struct(ndr, "out", "spoolss_SpoolerInit");
33511 0 : ndr->depth++;
33512 0 : ndr_print_WERROR(ndr, "result", r->out.result);
33513 0 : ndr->depth--;
33514 : }
33515 0 : ndr->depth--;
33516 : }
33517 :
33518 0 : static enum ndr_err_code ndr_push_spoolss_ResetPrinterEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_ResetPrinterEx *r)
33519 : {
33520 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33521 0 : if (flags & NDR_IN) {
33522 0 : }
33523 0 : if (flags & NDR_OUT) {
33524 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
33525 : }
33526 0 : return NDR_ERR_SUCCESS;
33527 : }
33528 :
33529 0 : static enum ndr_err_code ndr_pull_spoolss_ResetPrinterEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_ResetPrinterEx *r)
33530 : {
33531 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
33532 0 : if (flags & NDR_IN) {
33533 0 : }
33534 0 : if (flags & NDR_OUT) {
33535 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33536 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33537 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33538 : }
33539 0 : return NDR_ERR_SUCCESS;
33540 : }
33541 :
33542 0 : _PUBLIC_ void ndr_print_spoolss_ResetPrinterEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_ResetPrinterEx *r)
33543 : {
33544 0 : ndr_print_struct(ndr, name, "spoolss_ResetPrinterEx");
33545 0 : if (r == NULL) { ndr_print_null(ndr); return; }
33546 0 : ndr->depth++;
33547 0 : if (flags & NDR_SET_VALUES) {
33548 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33549 : }
33550 0 : if (flags & NDR_IN) {
33551 0 : ndr_print_struct(ndr, "in", "spoolss_ResetPrinterEx");
33552 0 : ndr->depth++;
33553 0 : ndr->depth--;
33554 : }
33555 0 : if (flags & NDR_OUT) {
33556 0 : ndr_print_struct(ndr, "out", "spoolss_ResetPrinterEx");
33557 0 : ndr->depth++;
33558 0 : ndr_print_WERROR(ndr, "result", r->out.result);
33559 0 : ndr->depth--;
33560 : }
33561 0 : ndr->depth--;
33562 : }
33563 :
33564 4 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
33565 : {
33566 4 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33567 4 : if (flags & NDR_IN) {
33568 2 : if (r->in.handle == NULL) {
33569 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
33570 : }
33571 2 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
33572 2 : NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, r->in.flags));
33573 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options));
33574 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.local_machine));
33575 2 : if (r->in.local_machine) {
33576 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.local_machine, CH_UTF16)));
33577 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
33578 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.local_machine, CH_UTF16)));
33579 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.local_machine, ndr_charset_length(r->in.local_machine, CH_UTF16), sizeof(uint16_t), CH_UTF16));
33580 : }
33581 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.printer_local));
33582 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.notify_options));
33583 2 : if (r->in.notify_options) {
33584 2 : NDR_CHECK(ndr_push_spoolss_NotifyOption(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.notify_options));
33585 : }
33586 : }
33587 4 : if (flags & NDR_OUT) {
33588 2 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
33589 : }
33590 4 : return NDR_ERR_SUCCESS;
33591 : }
33592 :
33593 8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
33594 : {
33595 4 : uint32_t _ptr_local_machine;
33596 8 : uint32_t size_local_machine_1 = 0;
33597 8 : uint32_t length_local_machine_1 = 0;
33598 4 : uint32_t _ptr_notify_options;
33599 8 : TALLOC_CTX *_mem_save_handle_0 = NULL;
33600 8 : TALLOC_CTX *_mem_save_local_machine_0 = NULL;
33601 8 : TALLOC_CTX *_mem_save_notify_options_0 = NULL;
33602 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
33603 8 : if (flags & NDR_IN) {
33604 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33605 4 : NDR_PULL_ALLOC(ndr, r->in.handle);
33606 : }
33607 4 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
33608 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
33609 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
33610 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
33611 6 : NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, &r->in.flags));
33612 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.options));
33613 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_local_machine));
33614 4 : if (_ptr_local_machine) {
33615 4 : NDR_PULL_ALLOC(ndr, r->in.local_machine);
33616 : } else {
33617 0 : r->in.local_machine = NULL;
33618 : }
33619 4 : if (r->in.local_machine) {
33620 4 : _mem_save_local_machine_0 = NDR_PULL_GET_MEM_CTX(ndr);
33621 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.local_machine, 0);
33622 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.local_machine));
33623 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.local_machine));
33624 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.local_machine, &size_local_machine_1));
33625 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.local_machine, &length_local_machine_1));
33626 4 : if (length_local_machine_1 > size_local_machine_1) {
33627 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_local_machine_1, length_local_machine_1);
33628 : }
33629 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_local_machine_1, sizeof(uint16_t)));
33630 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.local_machine, length_local_machine_1, sizeof(uint16_t), CH_UTF16));
33631 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_local_machine_0, 0);
33632 : }
33633 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.printer_local));
33634 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_options));
33635 4 : if (_ptr_notify_options) {
33636 4 : NDR_PULL_ALLOC(ndr, r->in.notify_options);
33637 : } else {
33638 0 : r->in.notify_options = NULL;
33639 : }
33640 4 : if (r->in.notify_options) {
33641 4 : _mem_save_notify_options_0 = NDR_PULL_GET_MEM_CTX(ndr);
33642 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.notify_options, 0);
33643 4 : NDR_CHECK(ndr_pull_spoolss_NotifyOption(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.notify_options));
33644 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_options_0, 0);
33645 : }
33646 : }
33647 8 : if (flags & NDR_OUT) {
33648 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33649 : if (r->in.handle == NULL) {
33650 : NDR_PULL_ALLOC(ndr, r->in.handle);
33651 : NDR_ZERO_STRUCTP(r->in.handle);
33652 : }
33653 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33654 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33655 : }
33656 4 : return NDR_ERR_SUCCESS;
33657 : }
33658 :
33659 4 : _PUBLIC_ void ndr_print_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
33660 : {
33661 4 : ndr_print_struct(ndr, name, "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
33662 4 : if (r == NULL) { ndr_print_null(ndr); return; }
33663 4 : ndr->depth++;
33664 4 : if (flags & NDR_SET_VALUES) {
33665 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33666 : }
33667 4 : if (flags & NDR_IN) {
33668 2 : ndr_print_struct(ndr, "in", "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
33669 2 : ndr->depth++;
33670 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
33671 2 : ndr->depth++;
33672 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
33673 2 : ndr->depth--;
33674 2 : ndr_print_spoolss_PrinterChangeFlags(ndr, "flags", r->in.flags);
33675 2 : ndr_print_uint32(ndr, "options", r->in.options);
33676 2 : ndr_print_ptr(ndr, "local_machine", r->in.local_machine);
33677 2 : ndr->depth++;
33678 2 : if (r->in.local_machine) {
33679 2 : ndr_print_string(ndr, "local_machine", r->in.local_machine);
33680 : }
33681 2 : ndr->depth--;
33682 2 : ndr_print_uint32(ndr, "printer_local", r->in.printer_local);
33683 2 : ndr_print_ptr(ndr, "notify_options", r->in.notify_options);
33684 2 : ndr->depth++;
33685 2 : if (r->in.notify_options) {
33686 2 : ndr_print_spoolss_NotifyOption(ndr, "notify_options", r->in.notify_options);
33687 : }
33688 2 : ndr->depth--;
33689 2 : ndr->depth--;
33690 : }
33691 4 : if (flags & NDR_OUT) {
33692 2 : ndr_print_struct(ndr, "out", "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
33693 2 : ndr->depth++;
33694 2 : ndr_print_WERROR(ndr, "result", r->out.result);
33695 2 : ndr->depth--;
33696 : }
33697 4 : ndr->depth--;
33698 : }
33699 :
33700 0 : static enum ndr_err_code ndr_push_spoolss_RouterReplyPrinterEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_RouterReplyPrinterEx *r)
33701 : {
33702 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33703 0 : if (flags & NDR_IN) {
33704 0 : if (r->in.handle == NULL) {
33705 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
33706 : }
33707 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
33708 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.color));
33709 0 : NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, r->in.flags));
33710 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reply_type));
33711 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.reply_type));
33712 0 : NDR_CHECK(ndr_push_spoolss_ReplyPrinterInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
33713 : }
33714 0 : if (flags & NDR_OUT) {
33715 0 : if (r->out.reply_result == NULL) {
33716 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
33717 : }
33718 0 : NDR_CHECK(ndr_push_spoolss_PrinterNotifyFlags(ndr, NDR_SCALARS, *r->out.reply_result));
33719 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
33720 : }
33721 0 : return NDR_ERR_SUCCESS;
33722 : }
33723 :
33724 0 : static enum ndr_err_code ndr_pull_spoolss_RouterReplyPrinterEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_RouterReplyPrinterEx *r)
33725 : {
33726 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
33727 0 : TALLOC_CTX *_mem_save_reply_result_0 = NULL;
33728 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
33729 0 : if (flags & NDR_IN) {
33730 0 : NDR_ZERO_STRUCT(r->out);
33731 :
33732 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33733 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
33734 : }
33735 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
33736 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
33737 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
33738 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
33739 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.color));
33740 0 : NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, &r->in.flags));
33741 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reply_type));
33742 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.reply_type));
33743 0 : NDR_CHECK(ndr_pull_spoolss_ReplyPrinterInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
33744 0 : NDR_PULL_ALLOC(ndr, r->out.reply_result);
33745 0 : NDR_ZERO_STRUCTP(r->out.reply_result);
33746 : }
33747 0 : if (flags & NDR_OUT) {
33748 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33749 : if (r->in.handle == NULL) {
33750 : NDR_PULL_ALLOC(ndr, r->in.handle);
33751 : NDR_ZERO_STRUCTP(r->in.handle);
33752 : }
33753 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33754 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33755 0 : NDR_PULL_ALLOC(ndr, r->out.reply_result);
33756 : }
33757 0 : _mem_save_reply_result_0 = NDR_PULL_GET_MEM_CTX(ndr);
33758 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.reply_result, LIBNDR_FLAG_REF_ALLOC);
33759 0 : NDR_CHECK(ndr_pull_spoolss_PrinterNotifyFlags(ndr, NDR_SCALARS, r->out.reply_result));
33760 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reply_result_0, LIBNDR_FLAG_REF_ALLOC);
33761 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33762 : }
33763 0 : return NDR_ERR_SUCCESS;
33764 : }
33765 :
33766 0 : _PUBLIC_ void ndr_print_spoolss_RouterReplyPrinterEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_RouterReplyPrinterEx *r)
33767 : {
33768 0 : ndr_print_struct(ndr, name, "spoolss_RouterReplyPrinterEx");
33769 0 : if (r == NULL) { ndr_print_null(ndr); return; }
33770 0 : ndr->depth++;
33771 0 : if (flags & NDR_SET_VALUES) {
33772 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33773 : }
33774 0 : if (flags & NDR_IN) {
33775 0 : ndr_print_struct(ndr, "in", "spoolss_RouterReplyPrinterEx");
33776 0 : ndr->depth++;
33777 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
33778 0 : ndr->depth++;
33779 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
33780 0 : ndr->depth--;
33781 0 : ndr_print_uint32(ndr, "color", r->in.color);
33782 0 : ndr_print_spoolss_PrinterChangeFlags(ndr, "flags", r->in.flags);
33783 0 : ndr_print_uint32(ndr, "reply_type", r->in.reply_type);
33784 0 : ndr_print_set_switch_value(ndr, &r->in.info, r->in.reply_type);
33785 0 : ndr_print_spoolss_ReplyPrinterInfo(ndr, "info", &r->in.info);
33786 0 : ndr->depth--;
33787 : }
33788 0 : if (flags & NDR_OUT) {
33789 0 : ndr_print_struct(ndr, "out", "spoolss_RouterReplyPrinterEx");
33790 0 : ndr->depth++;
33791 0 : ndr_print_ptr(ndr, "reply_result", r->out.reply_result);
33792 0 : ndr->depth++;
33793 0 : ndr_print_spoolss_PrinterNotifyFlags(ndr, "reply_result", *r->out.reply_result);
33794 0 : ndr->depth--;
33795 0 : ndr_print_WERROR(ndr, "result", r->out.result);
33796 0 : ndr->depth--;
33797 : }
33798 0 : ndr->depth--;
33799 : }
33800 :
33801 8 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_RouterRefreshPrinterChangeNotify *r)
33802 : {
33803 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33804 8 : if (flags & NDR_IN) {
33805 4 : if (r->in.handle == NULL) {
33806 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
33807 : }
33808 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
33809 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.change_low));
33810 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.options));
33811 4 : if (r->in.options) {
33812 2 : NDR_CHECK(ndr_push_spoolss_NotifyOption(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.options));
33813 : }
33814 : }
33815 8 : if (flags & NDR_OUT) {
33816 4 : if (r->out.info == NULL) {
33817 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
33818 : }
33819 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
33820 4 : if (*r->out.info) {
33821 4 : NDR_CHECK(ndr_push_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
33822 : }
33823 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
33824 : }
33825 8 : return NDR_ERR_SUCCESS;
33826 : }
33827 :
33828 12 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_RouterRefreshPrinterChangeNotify *r)
33829 : {
33830 4 : uint32_t _ptr_options;
33831 4 : uint32_t _ptr_info;
33832 12 : TALLOC_CTX *_mem_save_handle_0 = NULL;
33833 12 : TALLOC_CTX *_mem_save_options_0 = NULL;
33834 12 : TALLOC_CTX *_mem_save_info_0 = NULL;
33835 12 : TALLOC_CTX *_mem_save_info_1 = NULL;
33836 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
33837 12 : if (flags & NDR_IN) {
33838 6 : NDR_ZERO_STRUCT(r->out);
33839 :
33840 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33841 6 : NDR_PULL_ALLOC(ndr, r->in.handle);
33842 : }
33843 6 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
33844 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
33845 6 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
33846 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
33847 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.change_low));
33848 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_options));
33849 6 : if (_ptr_options) {
33850 4 : NDR_PULL_ALLOC(ndr, r->in.options);
33851 : } else {
33852 2 : r->in.options = NULL;
33853 : }
33854 6 : if (r->in.options) {
33855 4 : _mem_save_options_0 = NDR_PULL_GET_MEM_CTX(ndr);
33856 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.options, 0);
33857 4 : NDR_CHECK(ndr_pull_spoolss_NotifyOption(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.options));
33858 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_options_0, 0);
33859 : }
33860 6 : NDR_PULL_ALLOC(ndr, r->out.info);
33861 6 : NDR_ZERO_STRUCTP(r->out.info);
33862 : }
33863 12 : if (flags & NDR_OUT) {
33864 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33865 : if (r->in.handle == NULL) {
33866 : NDR_PULL_ALLOC(ndr, r->in.handle);
33867 : NDR_ZERO_STRUCTP(r->in.handle);
33868 : }
33869 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33870 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
33871 2 : NDR_PULL_ALLOC(ndr, r->out.info);
33872 : }
33873 6 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
33874 6 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
33875 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
33876 6 : if (_ptr_info) {
33877 6 : NDR_PULL_ALLOC(ndr, *r->out.info);
33878 : } else {
33879 0 : *r->out.info = NULL;
33880 : }
33881 6 : if (*r->out.info) {
33882 6 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
33883 6 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
33884 6 : NDR_CHECK(ndr_pull_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
33885 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
33886 : }
33887 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
33888 6 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33889 : }
33890 8 : return NDR_ERR_SUCCESS;
33891 : }
33892 :
33893 4 : _PUBLIC_ void ndr_print_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_RouterRefreshPrinterChangeNotify *r)
33894 : {
33895 4 : ndr_print_struct(ndr, name, "spoolss_RouterRefreshPrinterChangeNotify");
33896 4 : if (r == NULL) { ndr_print_null(ndr); return; }
33897 4 : ndr->depth++;
33898 4 : if (flags & NDR_SET_VALUES) {
33899 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33900 : }
33901 4 : if (flags & NDR_IN) {
33902 2 : ndr_print_struct(ndr, "in", "spoolss_RouterRefreshPrinterChangeNotify");
33903 2 : ndr->depth++;
33904 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
33905 2 : ndr->depth++;
33906 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
33907 2 : ndr->depth--;
33908 2 : ndr_print_uint32(ndr, "change_low", r->in.change_low);
33909 2 : ndr_print_ptr(ndr, "options", r->in.options);
33910 2 : ndr->depth++;
33911 2 : if (r->in.options) {
33912 2 : ndr_print_spoolss_NotifyOption(ndr, "options", r->in.options);
33913 : }
33914 2 : ndr->depth--;
33915 2 : ndr->depth--;
33916 : }
33917 4 : if (flags & NDR_OUT) {
33918 2 : ndr_print_struct(ndr, "out", "spoolss_RouterRefreshPrinterChangeNotify");
33919 2 : ndr->depth++;
33920 2 : ndr_print_ptr(ndr, "info", r->out.info);
33921 2 : ndr->depth++;
33922 2 : ndr_print_ptr(ndr, "info", *r->out.info);
33923 2 : ndr->depth++;
33924 2 : if (*r->out.info) {
33925 2 : ndr_print_spoolss_NotifyInfo(ndr, "info", *r->out.info);
33926 : }
33927 2 : ndr->depth--;
33928 2 : ndr->depth--;
33929 2 : ndr_print_WERROR(ndr, "result", r->out.result);
33930 2 : ndr->depth--;
33931 : }
33932 4 : ndr->depth--;
33933 : }
33934 :
33935 0 : static enum ndr_err_code ndr_push_spoolss_44(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_44 *r)
33936 : {
33937 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33938 0 : if (flags & NDR_IN) {
33939 0 : }
33940 0 : if (flags & NDR_OUT) {
33941 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
33942 : }
33943 0 : return NDR_ERR_SUCCESS;
33944 : }
33945 :
33946 0 : static enum ndr_err_code ndr_pull_spoolss_44(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_44 *r)
33947 : {
33948 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
33949 0 : if (flags & NDR_IN) {
33950 0 : }
33951 0 : if (flags & NDR_OUT) {
33952 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
33953 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
33954 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
33955 : }
33956 0 : return NDR_ERR_SUCCESS;
33957 : }
33958 :
33959 0 : _PUBLIC_ void ndr_print_spoolss_44(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_44 *r)
33960 : {
33961 0 : ndr_print_struct(ndr, name, "spoolss_44");
33962 0 : if (r == NULL) { ndr_print_null(ndr); return; }
33963 0 : ndr->depth++;
33964 0 : if (flags & NDR_SET_VALUES) {
33965 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
33966 : }
33967 0 : if (flags & NDR_IN) {
33968 0 : ndr_print_struct(ndr, "in", "spoolss_44");
33969 0 : ndr->depth++;
33970 0 : ndr->depth--;
33971 : }
33972 0 : if (flags & NDR_OUT) {
33973 0 : ndr_print_struct(ndr, "out", "spoolss_44");
33974 0 : ndr->depth++;
33975 0 : ndr_print_WERROR(ndr, "result", r->out.result);
33976 0 : ndr->depth--;
33977 : }
33978 0 : ndr->depth--;
33979 : }
33980 :
33981 1588 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OpenPrinterEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_OpenPrinterEx *r)
33982 : {
33983 1588 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
33984 1588 : if (flags & NDR_IN) {
33985 794 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.printername));
33986 794 : if (r->in.printername) {
33987 794 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
33988 794 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
33989 794 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
33990 794 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.printername, ndr_charset_length(r->in.printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
33991 : }
33992 794 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.datatype));
33993 794 : if (r->in.datatype) {
33994 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.datatype, CH_UTF16)));
33995 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
33996 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.datatype, CH_UTF16)));
33997 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.datatype, ndr_charset_length(r->in.datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
33998 : }
33999 794 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.devmode_ctr));
34000 794 : NDR_CHECK(ndr_push_spoolss_AccessRights(ndr, NDR_SCALARS, r->in.access_mask));
34001 794 : NDR_CHECK(ndr_push_spoolss_UserLevelCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.userlevel_ctr));
34002 : }
34003 1588 : if (flags & NDR_OUT) {
34004 794 : if (r->out.handle == NULL) {
34005 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34006 : }
34007 794 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
34008 794 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
34009 : }
34010 1588 : return NDR_ERR_SUCCESS;
34011 : }
34012 :
34013 1596 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OpenPrinterEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_OpenPrinterEx *r)
34014 : {
34015 8 : uint32_t _ptr_printername;
34016 1596 : uint32_t size_printername_1 = 0;
34017 1596 : uint32_t length_printername_1 = 0;
34018 8 : uint32_t _ptr_datatype;
34019 1596 : uint32_t size_datatype_1 = 0;
34020 1596 : uint32_t length_datatype_1 = 0;
34021 1596 : TALLOC_CTX *_mem_save_printername_0 = NULL;
34022 1596 : TALLOC_CTX *_mem_save_datatype_0 = NULL;
34023 1596 : TALLOC_CTX *_mem_save_handle_0 = NULL;
34024 1596 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
34025 1596 : if (flags & NDR_IN) {
34026 800 : NDR_ZERO_STRUCT(r->out);
34027 :
34028 800 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
34029 800 : if (_ptr_printername) {
34030 800 : NDR_PULL_ALLOC(ndr, r->in.printername);
34031 : } else {
34032 0 : r->in.printername = NULL;
34033 : }
34034 800 : if (r->in.printername) {
34035 800 : _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
34036 800 : NDR_PULL_SET_MEM_CTX(ndr, r->in.printername, 0);
34037 800 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.printername));
34038 800 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.printername));
34039 800 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.printername, &size_printername_1));
34040 800 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.printername, &length_printername_1));
34041 800 : if (length_printername_1 > size_printername_1) {
34042 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printername_1, length_printername_1);
34043 : }
34044 800 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printername_1, sizeof(uint16_t)));
34045 800 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.printername, length_printername_1, sizeof(uint16_t), CH_UTF16));
34046 800 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
34047 : }
34048 800 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
34049 800 : if (_ptr_datatype) {
34050 0 : NDR_PULL_ALLOC(ndr, r->in.datatype);
34051 : } else {
34052 800 : r->in.datatype = NULL;
34053 : }
34054 800 : if (r->in.datatype) {
34055 0 : _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
34056 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.datatype, 0);
34057 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.datatype));
34058 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.datatype));
34059 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.datatype, &size_datatype_1));
34060 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.datatype, &length_datatype_1));
34061 0 : if (length_datatype_1 > size_datatype_1) {
34062 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_datatype_1, length_datatype_1);
34063 : }
34064 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_datatype_1, sizeof(uint16_t)));
34065 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.datatype, length_datatype_1, sizeof(uint16_t), CH_UTF16));
34066 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
34067 : }
34068 800 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.devmode_ctr));
34069 806 : NDR_CHECK(ndr_pull_spoolss_AccessRights(ndr, NDR_SCALARS, &r->in.access_mask));
34070 800 : NDR_CHECK(ndr_pull_spoolss_UserLevelCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.userlevel_ctr));
34071 800 : NDR_PULL_ALLOC(ndr, r->out.handle);
34072 800 : NDR_ZERO_STRUCTP(r->out.handle);
34073 : }
34074 1596 : if (flags & NDR_OUT) {
34075 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
34076 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
34077 796 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34078 8 : NDR_PULL_ALLOC(ndr, r->out.handle);
34079 : }
34080 796 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
34081 796 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
34082 796 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
34083 796 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
34084 796 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
34085 : }
34086 1588 : return NDR_ERR_SUCCESS;
34087 : }
34088 :
34089 8 : _PUBLIC_ void ndr_print_spoolss_OpenPrinterEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_OpenPrinterEx *r)
34090 : {
34091 8 : ndr_print_struct(ndr, name, "spoolss_OpenPrinterEx");
34092 8 : if (r == NULL) { ndr_print_null(ndr); return; }
34093 8 : ndr->depth++;
34094 8 : if (flags & NDR_SET_VALUES) {
34095 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
34096 : }
34097 8 : if (flags & NDR_IN) {
34098 6 : ndr_print_struct(ndr, "in", "spoolss_OpenPrinterEx");
34099 6 : ndr->depth++;
34100 6 : ndr_print_ptr(ndr, "printername", r->in.printername);
34101 6 : ndr->depth++;
34102 6 : if (r->in.printername) {
34103 6 : ndr_print_string(ndr, "printername", r->in.printername);
34104 : }
34105 6 : ndr->depth--;
34106 6 : ndr_print_ptr(ndr, "datatype", r->in.datatype);
34107 6 : ndr->depth++;
34108 6 : if (r->in.datatype) {
34109 0 : ndr_print_string(ndr, "datatype", r->in.datatype);
34110 : }
34111 6 : ndr->depth--;
34112 6 : ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", &r->in.devmode_ctr);
34113 6 : ndr_print_spoolss_AccessRights(ndr, "access_mask", r->in.access_mask);
34114 6 : ndr_print_spoolss_UserLevelCtr(ndr, "userlevel_ctr", &r->in.userlevel_ctr);
34115 6 : ndr->depth--;
34116 : }
34117 8 : if (flags & NDR_OUT) {
34118 2 : ndr_print_struct(ndr, "out", "spoolss_OpenPrinterEx");
34119 2 : ndr->depth++;
34120 2 : ndr_print_ptr(ndr, "handle", r->out.handle);
34121 2 : ndr->depth++;
34122 2 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
34123 2 : ndr->depth--;
34124 2 : ndr_print_WERROR(ndr, "result", r->out.result);
34125 2 : ndr->depth--;
34126 : }
34127 8 : ndr->depth--;
34128 : }
34129 :
34130 48 : static enum ndr_err_code ndr_push_spoolss_AddPrinterEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddPrinterEx *r)
34131 : {
34132 48 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
34133 48 : if (flags & NDR_IN) {
34134 24 : if (r->in.info_ctr == NULL) {
34135 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34136 : }
34137 24 : if (r->in.devmode_ctr == NULL) {
34138 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34139 : }
34140 24 : if (r->in.secdesc_ctr == NULL) {
34141 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34142 : }
34143 24 : if (r->in.userlevel_ctr == NULL) {
34144 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34145 : }
34146 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
34147 24 : if (r->in.server) {
34148 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
34149 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
34150 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
34151 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
34152 : }
34153 24 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
34154 24 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
34155 24 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
34156 24 : NDR_CHECK(ndr_push_spoolss_UserLevelCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.userlevel_ctr));
34157 : }
34158 48 : if (flags & NDR_OUT) {
34159 24 : if (r->out.handle == NULL) {
34160 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34161 : }
34162 24 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
34163 24 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
34164 : }
34165 48 : return NDR_ERR_SUCCESS;
34166 : }
34167 :
34168 48 : static enum ndr_err_code ndr_pull_spoolss_AddPrinterEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddPrinterEx *r)
34169 : {
34170 0 : uint32_t _ptr_server;
34171 48 : uint32_t size_server_1 = 0;
34172 48 : uint32_t length_server_1 = 0;
34173 48 : TALLOC_CTX *_mem_save_server_0 = NULL;
34174 48 : TALLOC_CTX *_mem_save_info_ctr_0 = NULL;
34175 48 : TALLOC_CTX *_mem_save_devmode_ctr_0 = NULL;
34176 48 : TALLOC_CTX *_mem_save_secdesc_ctr_0 = NULL;
34177 48 : TALLOC_CTX *_mem_save_userlevel_ctr_0 = NULL;
34178 48 : TALLOC_CTX *_mem_save_handle_0 = NULL;
34179 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
34180 48 : if (flags & NDR_IN) {
34181 24 : NDR_ZERO_STRUCT(r->out);
34182 :
34183 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
34184 24 : if (_ptr_server) {
34185 0 : NDR_PULL_ALLOC(ndr, r->in.server);
34186 : } else {
34187 24 : r->in.server = NULL;
34188 : }
34189 24 : if (r->in.server) {
34190 0 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
34191 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
34192 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
34193 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
34194 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
34195 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
34196 0 : if (length_server_1 > size_server_1) {
34197 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
34198 : }
34199 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
34200 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
34201 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
34202 : }
34203 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34204 24 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
34205 : }
34206 24 : _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
34207 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
34208 24 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
34209 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
34210 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34211 24 : NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
34212 : }
34213 24 : _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
34214 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC);
34215 24 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
34216 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC);
34217 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34218 24 : NDR_PULL_ALLOC(ndr, r->in.secdesc_ctr);
34219 : }
34220 24 : _mem_save_secdesc_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
34221 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.secdesc_ctr, LIBNDR_FLAG_REF_ALLOC);
34222 24 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
34223 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_ctr_0, LIBNDR_FLAG_REF_ALLOC);
34224 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34225 24 : NDR_PULL_ALLOC(ndr, r->in.userlevel_ctr);
34226 : }
34227 24 : _mem_save_userlevel_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
34228 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.userlevel_ctr, LIBNDR_FLAG_REF_ALLOC);
34229 24 : NDR_CHECK(ndr_pull_spoolss_UserLevelCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.userlevel_ctr));
34230 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userlevel_ctr_0, LIBNDR_FLAG_REF_ALLOC);
34231 24 : NDR_PULL_ALLOC(ndr, r->out.handle);
34232 24 : NDR_ZERO_STRUCTP(r->out.handle);
34233 : }
34234 48 : if (flags & NDR_OUT) {
34235 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
34236 : if (r->in.info_ctr == NULL) {
34237 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
34238 : NDR_ZERO_STRUCTP(r->in.info_ctr);
34239 : }
34240 : if (r->in.devmode_ctr == NULL) {
34241 : NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
34242 : NDR_ZERO_STRUCTP(r->in.devmode_ctr);
34243 : }
34244 : if (r->in.secdesc_ctr == NULL) {
34245 : NDR_PULL_ALLOC(ndr, r->in.secdesc_ctr);
34246 : NDR_ZERO_STRUCTP(r->in.secdesc_ctr);
34247 : }
34248 : if (r->in.userlevel_ctr == NULL) {
34249 : NDR_PULL_ALLOC(ndr, r->in.userlevel_ctr);
34250 : NDR_ZERO_STRUCTP(r->in.userlevel_ctr);
34251 : }
34252 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
34253 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34254 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
34255 : }
34256 24 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
34257 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
34258 24 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
34259 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
34260 24 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
34261 : }
34262 48 : return NDR_ERR_SUCCESS;
34263 : }
34264 :
34265 0 : _PUBLIC_ void ndr_print_spoolss_AddPrinterEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddPrinterEx *r)
34266 : {
34267 0 : ndr_print_struct(ndr, name, "spoolss_AddPrinterEx");
34268 0 : if (r == NULL) { ndr_print_null(ndr); return; }
34269 0 : ndr->depth++;
34270 0 : if (flags & NDR_SET_VALUES) {
34271 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
34272 : }
34273 0 : if (flags & NDR_IN) {
34274 0 : ndr_print_struct(ndr, "in", "spoolss_AddPrinterEx");
34275 0 : ndr->depth++;
34276 0 : ndr_print_ptr(ndr, "server", r->in.server);
34277 0 : ndr->depth++;
34278 0 : if (r->in.server) {
34279 0 : ndr_print_string(ndr, "server", r->in.server);
34280 : }
34281 0 : ndr->depth--;
34282 0 : ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
34283 0 : ndr->depth++;
34284 0 : ndr_print_spoolss_SetPrinterInfoCtr(ndr, "info_ctr", r->in.info_ctr);
34285 0 : ndr->depth--;
34286 0 : ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr);
34287 0 : ndr->depth++;
34288 0 : ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr);
34289 0 : ndr->depth--;
34290 0 : ndr_print_ptr(ndr, "secdesc_ctr", r->in.secdesc_ctr);
34291 0 : ndr->depth++;
34292 0 : ndr_print_sec_desc_buf(ndr, "secdesc_ctr", r->in.secdesc_ctr);
34293 0 : ndr->depth--;
34294 0 : ndr_print_ptr(ndr, "userlevel_ctr", r->in.userlevel_ctr);
34295 0 : ndr->depth++;
34296 0 : ndr_print_spoolss_UserLevelCtr(ndr, "userlevel_ctr", r->in.userlevel_ctr);
34297 0 : ndr->depth--;
34298 0 : ndr->depth--;
34299 : }
34300 0 : if (flags & NDR_OUT) {
34301 0 : ndr_print_struct(ndr, "out", "spoolss_AddPrinterEx");
34302 0 : ndr->depth++;
34303 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
34304 0 : ndr->depth++;
34305 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
34306 0 : ndr->depth--;
34307 0 : ndr_print_WERROR(ndr, "result", r->out.result);
34308 0 : ndr->depth--;
34309 : }
34310 0 : ndr->depth--;
34311 : }
34312 :
34313 0 : static enum ndr_err_code ndr_push_spoolss_SetPort(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_SetPort *r)
34314 : {
34315 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
34316 0 : if (flags & NDR_IN) {
34317 0 : if (r->in.port_ctr == NULL) {
34318 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34319 : }
34320 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
34321 0 : if (r->in.servername) {
34322 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
34323 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
34324 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
34325 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
34326 : }
34327 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.port_name));
34328 0 : if (r->in.port_name) {
34329 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.port_name, CH_UTF16)));
34330 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
34331 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.port_name, CH_UTF16)));
34332 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.port_name, ndr_charset_length(r->in.port_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
34333 : }
34334 0 : NDR_CHECK(ndr_push_spoolss_SetPortInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.port_ctr));
34335 : }
34336 0 : if (flags & NDR_OUT) {
34337 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
34338 : }
34339 0 : return NDR_ERR_SUCCESS;
34340 : }
34341 :
34342 0 : static enum ndr_err_code ndr_pull_spoolss_SetPort(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_SetPort *r)
34343 : {
34344 0 : uint32_t _ptr_servername;
34345 0 : uint32_t size_servername_1 = 0;
34346 0 : uint32_t length_servername_1 = 0;
34347 0 : uint32_t _ptr_port_name;
34348 0 : uint32_t size_port_name_1 = 0;
34349 0 : uint32_t length_port_name_1 = 0;
34350 0 : TALLOC_CTX *_mem_save_servername_0 = NULL;
34351 0 : TALLOC_CTX *_mem_save_port_name_0 = NULL;
34352 0 : TALLOC_CTX *_mem_save_port_ctr_0 = NULL;
34353 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
34354 0 : if (flags & NDR_IN) {
34355 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
34356 0 : if (_ptr_servername) {
34357 0 : NDR_PULL_ALLOC(ndr, r->in.servername);
34358 : } else {
34359 0 : r->in.servername = NULL;
34360 : }
34361 0 : if (r->in.servername) {
34362 0 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
34363 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
34364 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
34365 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
34366 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
34367 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
34368 0 : if (length_servername_1 > size_servername_1) {
34369 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
34370 : }
34371 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
34372 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
34373 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
34374 : }
34375 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_port_name));
34376 0 : if (_ptr_port_name) {
34377 0 : NDR_PULL_ALLOC(ndr, r->in.port_name);
34378 : } else {
34379 0 : r->in.port_name = NULL;
34380 : }
34381 0 : if (r->in.port_name) {
34382 0 : _mem_save_port_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
34383 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.port_name, 0);
34384 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.port_name));
34385 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.port_name));
34386 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.port_name, &size_port_name_1));
34387 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.port_name, &length_port_name_1));
34388 0 : if (length_port_name_1 > size_port_name_1) {
34389 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_port_name_1, length_port_name_1);
34390 : }
34391 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_port_name_1, sizeof(uint16_t)));
34392 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.port_name, length_port_name_1, sizeof(uint16_t), CH_UTF16));
34393 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_name_0, 0);
34394 : }
34395 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34396 0 : NDR_PULL_ALLOC(ndr, r->in.port_ctr);
34397 : }
34398 0 : _mem_save_port_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
34399 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.port_ctr, LIBNDR_FLAG_REF_ALLOC);
34400 0 : NDR_CHECK(ndr_pull_spoolss_SetPortInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.port_ctr));
34401 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_ctr_0, LIBNDR_FLAG_REF_ALLOC);
34402 : }
34403 0 : if (flags & NDR_OUT) {
34404 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
34405 : if (r->in.port_ctr == NULL) {
34406 : NDR_PULL_ALLOC(ndr, r->in.port_ctr);
34407 : NDR_ZERO_STRUCTP(r->in.port_ctr);
34408 : }
34409 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
34410 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
34411 : }
34412 0 : return NDR_ERR_SUCCESS;
34413 : }
34414 :
34415 0 : _PUBLIC_ void ndr_print_spoolss_SetPort(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_SetPort *r)
34416 : {
34417 0 : ndr_print_struct(ndr, name, "spoolss_SetPort");
34418 0 : if (r == NULL) { ndr_print_null(ndr); return; }
34419 0 : ndr->depth++;
34420 0 : if (flags & NDR_SET_VALUES) {
34421 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
34422 : }
34423 0 : if (flags & NDR_IN) {
34424 0 : ndr_print_struct(ndr, "in", "spoolss_SetPort");
34425 0 : ndr->depth++;
34426 0 : ndr_print_ptr(ndr, "servername", r->in.servername);
34427 0 : ndr->depth++;
34428 0 : if (r->in.servername) {
34429 0 : ndr_print_string(ndr, "servername", r->in.servername);
34430 : }
34431 0 : ndr->depth--;
34432 0 : ndr_print_ptr(ndr, "port_name", r->in.port_name);
34433 0 : ndr->depth++;
34434 0 : if (r->in.port_name) {
34435 0 : ndr_print_string(ndr, "port_name", r->in.port_name);
34436 : }
34437 0 : ndr->depth--;
34438 0 : ndr_print_ptr(ndr, "port_ctr", r->in.port_ctr);
34439 0 : ndr->depth++;
34440 0 : ndr_print_spoolss_SetPortInfoContainer(ndr, "port_ctr", r->in.port_ctr);
34441 0 : ndr->depth--;
34442 0 : ndr->depth--;
34443 : }
34444 0 : if (flags & NDR_OUT) {
34445 0 : ndr_print_struct(ndr, "out", "spoolss_SetPort");
34446 0 : ndr->depth++;
34447 0 : ndr_print_WERROR(ndr, "result", r->out.result);
34448 0 : ndr->depth--;
34449 : }
34450 0 : ndr->depth--;
34451 : }
34452 :
34453 304 : static enum ndr_err_code ndr_push_spoolss_EnumPrinterData(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_EnumPrinterData *r)
34454 : {
34455 304 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
34456 304 : if (flags & NDR_IN) {
34457 152 : if (r->in.handle == NULL) {
34458 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34459 : }
34460 152 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
34461 152 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index));
34462 152 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.value_offered));
34463 152 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_offered));
34464 : }
34465 304 : if (flags & NDR_OUT) {
34466 152 : if (r->out.value_needed == NULL) {
34467 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34468 : }
34469 152 : if (r->out.type == NULL) {
34470 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34471 : }
34472 152 : if (r->out.data == NULL) {
34473 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34474 : }
34475 152 : if (r->out.data_needed == NULL) {
34476 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34477 : }
34478 152 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.value_offered / 2));
34479 152 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->out.value_name, r->in.value_offered / 2, sizeof(uint16_t), CH_UTF16));
34480 152 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.value_needed));
34481 152 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
34482 : {
34483 152 : libndr_flags _flags_save_uint8 = ndr->flags;
34484 152 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
34485 152 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_offered));
34486 152 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.data_offered));
34487 152 : ndr->flags = _flags_save_uint8;
34488 : }
34489 152 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_needed));
34490 152 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
34491 : }
34492 304 : return NDR_ERR_SUCCESS;
34493 : }
34494 :
34495 304 : static enum ndr_err_code ndr_pull_spoolss_EnumPrinterData(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_EnumPrinterData *r)
34496 : {
34497 304 : uint32_t size_value_name_0 = 0;
34498 304 : uint32_t size_data_1 = 0;
34499 304 : TALLOC_CTX *_mem_save_handle_0 = NULL;
34500 304 : TALLOC_CTX *_mem_save_value_needed_0 = NULL;
34501 304 : TALLOC_CTX *_mem_save_type_0 = NULL;
34502 304 : TALLOC_CTX *_mem_save_data_needed_0 = NULL;
34503 304 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
34504 304 : if (flags & NDR_IN) {
34505 152 : NDR_ZERO_STRUCT(r->out);
34506 :
34507 152 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34508 152 : NDR_PULL_ALLOC(ndr, r->in.handle);
34509 : }
34510 152 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
34511 152 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
34512 152 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
34513 152 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
34514 152 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.enum_index));
34515 152 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.value_offered));
34516 152 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_offered));
34517 152 : NDR_PULL_ALLOC(ndr, r->out.value_needed);
34518 152 : NDR_ZERO_STRUCTP(r->out.value_needed);
34519 152 : NDR_PULL_ALLOC(ndr, r->out.type);
34520 152 : NDR_ZERO_STRUCTP(r->out.type);
34521 152 : NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.data_offered);
34522 152 : memset(r->out.data, 0, (r->in.data_offered) * sizeof(*r->out.data));
34523 152 : NDR_PULL_ALLOC(ndr, r->out.data_needed);
34524 152 : NDR_ZERO_STRUCTP(r->out.data_needed);
34525 : }
34526 304 : if (flags & NDR_OUT) {
34527 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
34528 : if (r->in.handle == NULL) {
34529 : NDR_PULL_ALLOC(ndr, r->in.handle);
34530 : NDR_ZERO_STRUCTP(r->in.handle);
34531 : }
34532 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
34533 152 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.value_name));
34534 152 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.value_name, &size_value_name_0));
34535 152 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->out.value_name, size_value_name_0, sizeof(uint16_t), CH_UTF16));
34536 152 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34537 0 : NDR_PULL_ALLOC(ndr, r->out.value_needed);
34538 : }
34539 152 : _mem_save_value_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
34540 152 : NDR_PULL_SET_MEM_CTX(ndr, r->out.value_needed, LIBNDR_FLAG_REF_ALLOC);
34541 152 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.value_needed));
34542 152 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_needed_0, LIBNDR_FLAG_REF_ALLOC);
34543 152 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34544 0 : NDR_PULL_ALLOC(ndr, r->out.type);
34545 : }
34546 152 : _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
34547 152 : NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
34548 152 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
34549 152 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
34550 : {
34551 152 : libndr_flags _flags_save_uint8 = ndr->flags;
34552 152 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
34553 152 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
34554 152 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.data, &size_data_1));
34555 152 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34556 0 : NDR_PULL_ALLOC_N(ndr, r->out.data, size_data_1);
34557 : }
34558 152 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, size_data_1));
34559 152 : ndr->flags = _flags_save_uint8;
34560 : }
34561 152 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34562 0 : NDR_PULL_ALLOC(ndr, r->out.data_needed);
34563 : }
34564 152 : _mem_save_data_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
34565 152 : NDR_PULL_SET_MEM_CTX(ndr, r->out.data_needed, LIBNDR_FLAG_REF_ALLOC);
34566 152 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_needed));
34567 152 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_needed_0, LIBNDR_FLAG_REF_ALLOC);
34568 152 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
34569 152 : if (r->out.value_name) {
34570 152 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.value_name, r->in.value_offered / 2));
34571 : }
34572 152 : if (r->out.data) {
34573 152 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.data, r->in.data_offered));
34574 : }
34575 : }
34576 304 : return NDR_ERR_SUCCESS;
34577 : }
34578 :
34579 0 : _PUBLIC_ void ndr_print_spoolss_EnumPrinterData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumPrinterData *r)
34580 : {
34581 0 : ndr_print_struct(ndr, name, "spoolss_EnumPrinterData");
34582 0 : if (r == NULL) { ndr_print_null(ndr); return; }
34583 0 : ndr->depth++;
34584 0 : if (flags & NDR_SET_VALUES) {
34585 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
34586 : }
34587 0 : if (flags & NDR_IN) {
34588 0 : ndr_print_struct(ndr, "in", "spoolss_EnumPrinterData");
34589 0 : ndr->depth++;
34590 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
34591 0 : ndr->depth++;
34592 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
34593 0 : ndr->depth--;
34594 0 : ndr_print_uint32(ndr, "enum_index", r->in.enum_index);
34595 0 : ndr_print_uint32(ndr, "value_offered", r->in.value_offered);
34596 0 : ndr_print_uint32(ndr, "data_offered", r->in.data_offered);
34597 0 : ndr->depth--;
34598 : }
34599 0 : if (flags & NDR_OUT) {
34600 0 : ndr_print_struct(ndr, "out", "spoolss_EnumPrinterData");
34601 0 : ndr->depth++;
34602 0 : ndr_print_string(ndr, "value_name", r->out.value_name);
34603 0 : ndr_print_ptr(ndr, "value_needed", r->out.value_needed);
34604 0 : ndr->depth++;
34605 0 : ndr_print_uint32(ndr, "value_needed", *r->out.value_needed);
34606 0 : ndr->depth--;
34607 0 : ndr_print_ptr(ndr, "type", r->out.type);
34608 0 : ndr->depth++;
34609 0 : ndr_print_winreg_Type(ndr, "type", *r->out.type);
34610 0 : ndr->depth--;
34611 : {
34612 0 : libndr_flags _flags_save_uint8 = ndr->flags;
34613 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
34614 0 : ndr_print_ptr(ndr, "data", r->out.data);
34615 0 : ndr->depth++;
34616 0 : ndr_print_array_uint8(ndr, "data", r->out.data, r->in.data_offered);
34617 0 : ndr->depth--;
34618 0 : ndr->flags = _flags_save_uint8;
34619 : }
34620 0 : ndr_print_ptr(ndr, "data_needed", r->out.data_needed);
34621 0 : ndr->depth++;
34622 0 : ndr_print_uint32(ndr, "data_needed", *r->out.data_needed);
34623 0 : ndr->depth--;
34624 0 : ndr_print_WERROR(ndr, "result", r->out.result);
34625 0 : ndr->depth--;
34626 : }
34627 0 : ndr->depth--;
34628 : }
34629 :
34630 336 : static enum ndr_err_code ndr_push_spoolss_DeletePrinterData(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePrinterData *r)
34631 : {
34632 336 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
34633 336 : if (flags & NDR_IN) {
34634 168 : if (r->in.handle == NULL) {
34635 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34636 : }
34637 168 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
34638 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
34639 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
34640 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
34641 168 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
34642 : }
34643 336 : if (flags & NDR_OUT) {
34644 168 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
34645 : }
34646 336 : return NDR_ERR_SUCCESS;
34647 : }
34648 :
34649 336 : static enum ndr_err_code ndr_pull_spoolss_DeletePrinterData(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePrinterData *r)
34650 : {
34651 336 : uint32_t size_value_name_0 = 0;
34652 336 : uint32_t length_value_name_0 = 0;
34653 336 : TALLOC_CTX *_mem_save_handle_0 = NULL;
34654 336 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
34655 336 : if (flags & NDR_IN) {
34656 168 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34657 168 : NDR_PULL_ALLOC(ndr, r->in.handle);
34658 : }
34659 168 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
34660 168 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
34661 168 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
34662 168 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
34663 168 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
34664 168 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
34665 168 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.value_name, &size_value_name_0));
34666 168 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.value_name, &length_value_name_0));
34667 168 : if (length_value_name_0 > size_value_name_0) {
34668 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_value_name_0, length_value_name_0);
34669 : }
34670 168 : NDR_CHECK(ndr_check_string_terminator(ndr, length_value_name_0, sizeof(uint16_t)));
34671 168 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, length_value_name_0, sizeof(uint16_t), CH_UTF16));
34672 : }
34673 336 : if (flags & NDR_OUT) {
34674 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
34675 : if (r->in.handle == NULL) {
34676 : NDR_PULL_ALLOC(ndr, r->in.handle);
34677 : NDR_ZERO_STRUCTP(r->in.handle);
34678 : }
34679 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
34680 168 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
34681 : }
34682 336 : return NDR_ERR_SUCCESS;
34683 : }
34684 :
34685 0 : _PUBLIC_ void ndr_print_spoolss_DeletePrinterData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePrinterData *r)
34686 : {
34687 0 : ndr_print_struct(ndr, name, "spoolss_DeletePrinterData");
34688 0 : if (r == NULL) { ndr_print_null(ndr); return; }
34689 0 : ndr->depth++;
34690 0 : if (flags & NDR_SET_VALUES) {
34691 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
34692 : }
34693 0 : if (flags & NDR_IN) {
34694 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePrinterData");
34695 0 : ndr->depth++;
34696 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
34697 0 : ndr->depth++;
34698 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
34699 0 : ndr->depth--;
34700 0 : ndr_print_string(ndr, "value_name", r->in.value_name);
34701 0 : ndr->depth--;
34702 : }
34703 0 : if (flags & NDR_OUT) {
34704 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePrinterData");
34705 0 : ndr->depth++;
34706 0 : ndr_print_WERROR(ndr, "result", r->out.result);
34707 0 : ndr->depth--;
34708 : }
34709 0 : ndr->depth--;
34710 : }
34711 :
34712 0 : static enum ndr_err_code ndr_push_spoolss_4a(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_4a *r)
34713 : {
34714 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
34715 0 : if (flags & NDR_IN) {
34716 0 : }
34717 0 : if (flags & NDR_OUT) {
34718 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
34719 : }
34720 0 : return NDR_ERR_SUCCESS;
34721 : }
34722 :
34723 0 : static enum ndr_err_code ndr_pull_spoolss_4a(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_4a *r)
34724 : {
34725 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
34726 0 : if (flags & NDR_IN) {
34727 0 : }
34728 0 : if (flags & NDR_OUT) {
34729 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
34730 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
34731 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
34732 : }
34733 0 : return NDR_ERR_SUCCESS;
34734 : }
34735 :
34736 0 : _PUBLIC_ void ndr_print_spoolss_4a(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_4a *r)
34737 : {
34738 0 : ndr_print_struct(ndr, name, "spoolss_4a");
34739 0 : if (r == NULL) { ndr_print_null(ndr); return; }
34740 0 : ndr->depth++;
34741 0 : if (flags & NDR_SET_VALUES) {
34742 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
34743 : }
34744 0 : if (flags & NDR_IN) {
34745 0 : ndr_print_struct(ndr, "in", "spoolss_4a");
34746 0 : ndr->depth++;
34747 0 : ndr->depth--;
34748 : }
34749 0 : if (flags & NDR_OUT) {
34750 0 : ndr_print_struct(ndr, "out", "spoolss_4a");
34751 0 : ndr->depth++;
34752 0 : ndr_print_WERROR(ndr, "result", r->out.result);
34753 0 : ndr->depth--;
34754 : }
34755 0 : ndr->depth--;
34756 : }
34757 :
34758 0 : static enum ndr_err_code ndr_push_spoolss_4b(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_4b *r)
34759 : {
34760 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
34761 0 : if (flags & NDR_IN) {
34762 0 : }
34763 0 : if (flags & NDR_OUT) {
34764 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
34765 : }
34766 0 : return NDR_ERR_SUCCESS;
34767 : }
34768 :
34769 0 : static enum ndr_err_code ndr_pull_spoolss_4b(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_4b *r)
34770 : {
34771 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
34772 0 : if (flags & NDR_IN) {
34773 0 : }
34774 0 : if (flags & NDR_OUT) {
34775 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
34776 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
34777 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
34778 : }
34779 0 : return NDR_ERR_SUCCESS;
34780 : }
34781 :
34782 0 : _PUBLIC_ void ndr_print_spoolss_4b(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_4b *r)
34783 : {
34784 0 : ndr_print_struct(ndr, name, "spoolss_4b");
34785 0 : if (r == NULL) { ndr_print_null(ndr); return; }
34786 0 : ndr->depth++;
34787 0 : if (flags & NDR_SET_VALUES) {
34788 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
34789 : }
34790 0 : if (flags & NDR_IN) {
34791 0 : ndr_print_struct(ndr, "in", "spoolss_4b");
34792 0 : ndr->depth++;
34793 0 : ndr->depth--;
34794 : }
34795 0 : if (flags & NDR_OUT) {
34796 0 : ndr_print_struct(ndr, "out", "spoolss_4b");
34797 0 : ndr->depth++;
34798 0 : ndr_print_WERROR(ndr, "result", r->out.result);
34799 0 : ndr->depth--;
34800 : }
34801 0 : ndr->depth--;
34802 : }
34803 :
34804 0 : static enum ndr_err_code ndr_push_spoolss_4c(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_4c *r)
34805 : {
34806 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
34807 0 : if (flags & NDR_IN) {
34808 0 : }
34809 0 : if (flags & NDR_OUT) {
34810 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
34811 : }
34812 0 : return NDR_ERR_SUCCESS;
34813 : }
34814 :
34815 0 : static enum ndr_err_code ndr_pull_spoolss_4c(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_4c *r)
34816 : {
34817 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
34818 0 : if (flags & NDR_IN) {
34819 0 : }
34820 0 : if (flags & NDR_OUT) {
34821 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
34822 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
34823 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
34824 : }
34825 0 : return NDR_ERR_SUCCESS;
34826 : }
34827 :
34828 0 : _PUBLIC_ void ndr_print_spoolss_4c(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_4c *r)
34829 : {
34830 0 : ndr_print_struct(ndr, name, "spoolss_4c");
34831 0 : if (r == NULL) { ndr_print_null(ndr); return; }
34832 0 : ndr->depth++;
34833 0 : if (flags & NDR_SET_VALUES) {
34834 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
34835 : }
34836 0 : if (flags & NDR_IN) {
34837 0 : ndr_print_struct(ndr, "in", "spoolss_4c");
34838 0 : ndr->depth++;
34839 0 : ndr->depth--;
34840 : }
34841 0 : if (flags & NDR_OUT) {
34842 0 : ndr_print_struct(ndr, "out", "spoolss_4c");
34843 0 : ndr->depth++;
34844 0 : ndr_print_WERROR(ndr, "result", r->out.result);
34845 0 : ndr->depth--;
34846 : }
34847 0 : ndr->depth--;
34848 : }
34849 :
34850 2400 : static enum ndr_err_code ndr_push_spoolss_SetPrinterDataEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_SetPrinterDataEx *r)
34851 : {
34852 2400 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
34853 2400 : if (flags & NDR_IN) {
34854 1200 : if (r->in.handle == NULL) {
34855 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34856 : }
34857 1200 : if (r->in.data == NULL) {
34858 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34859 : }
34860 1200 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
34861 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
34862 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
34863 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
34864 1200 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
34865 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
34866 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
34867 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
34868 1200 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
34869 1200 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
34870 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
34871 1200 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.offered));
34872 1200 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
34873 : }
34874 2400 : if (flags & NDR_OUT) {
34875 1200 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
34876 : }
34877 2400 : return NDR_ERR_SUCCESS;
34878 : }
34879 :
34880 2400 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterDataEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_SetPrinterDataEx *r)
34881 : {
34882 2400 : uint32_t size_key_name_0 = 0;
34883 2400 : uint32_t length_key_name_0 = 0;
34884 2400 : uint32_t size_value_name_0 = 0;
34885 2400 : uint32_t length_value_name_0 = 0;
34886 2400 : uint32_t size_data_1 = 0;
34887 2400 : TALLOC_CTX *_mem_save_handle_0 = NULL;
34888 2400 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
34889 2400 : if (flags & NDR_IN) {
34890 1200 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34891 1200 : NDR_PULL_ALLOC(ndr, r->in.handle);
34892 : }
34893 1200 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
34894 1200 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
34895 1200 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
34896 1200 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
34897 1200 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
34898 1200 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
34899 1200 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.key_name, &size_key_name_0));
34900 1200 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.key_name, &length_key_name_0));
34901 1200 : if (length_key_name_0 > size_key_name_0) {
34902 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_key_name_0, length_key_name_0);
34903 : }
34904 1200 : NDR_CHECK(ndr_check_string_terminator(ndr, length_key_name_0, sizeof(uint16_t)));
34905 1200 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, length_key_name_0, sizeof(uint16_t), CH_UTF16));
34906 1200 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
34907 1200 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
34908 1200 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.value_name, &size_value_name_0));
34909 1200 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.value_name, &length_value_name_0));
34910 1200 : if (length_value_name_0 > size_value_name_0) {
34911 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_value_name_0, length_value_name_0);
34912 : }
34913 1200 : NDR_CHECK(ndr_check_string_terminator(ndr, length_value_name_0, sizeof(uint16_t)));
34914 1200 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, length_value_name_0, sizeof(uint16_t), CH_UTF16));
34915 1200 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type));
34916 1200 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
34917 1200 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.data, &size_data_1));
34918 1200 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
34919 1200 : NDR_PULL_ALLOC_N(ndr, r->in.data, size_data_1);
34920 : }
34921 1200 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, size_data_1));
34922 1200 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
34923 1200 : if (r->in.data) {
34924 1200 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.data, r->in.offered));
34925 : }
34926 : }
34927 2400 : if (flags & NDR_OUT) {
34928 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
34929 : if (r->in.handle == NULL) {
34930 : NDR_PULL_ALLOC(ndr, r->in.handle);
34931 : NDR_ZERO_STRUCTP(r->in.handle);
34932 : }
34933 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
34934 1200 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
34935 : }
34936 2400 : return NDR_ERR_SUCCESS;
34937 : }
34938 :
34939 0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterDataEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_SetPrinterDataEx *r)
34940 : {
34941 0 : ndr_print_struct(ndr, name, "spoolss_SetPrinterDataEx");
34942 0 : if (r == NULL) { ndr_print_null(ndr); return; }
34943 0 : ndr->depth++;
34944 0 : if (flags & NDR_SET_VALUES) {
34945 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
34946 : }
34947 0 : if (flags & NDR_IN) {
34948 0 : ndr_print_struct(ndr, "in", "spoolss_SetPrinterDataEx");
34949 0 : ndr->depth++;
34950 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
34951 0 : ndr->depth++;
34952 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
34953 0 : ndr->depth--;
34954 0 : ndr_print_string(ndr, "key_name", r->in.key_name);
34955 0 : ndr_print_string(ndr, "value_name", r->in.value_name);
34956 0 : ndr_print_winreg_Type(ndr, "type", r->in.type);
34957 0 : ndr_print_ptr(ndr, "data", r->in.data);
34958 0 : ndr->depth++;
34959 0 : ndr_print_array_uint8(ndr, "data", r->in.data, r->in.offered);
34960 0 : ndr->depth--;
34961 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
34962 0 : ndr->depth--;
34963 : }
34964 0 : if (flags & NDR_OUT) {
34965 0 : ndr_print_struct(ndr, "out", "spoolss_SetPrinterDataEx");
34966 0 : ndr->depth++;
34967 0 : ndr_print_WERROR(ndr, "result", r->out.result);
34968 0 : ndr->depth--;
34969 : }
34970 0 : ndr->depth--;
34971 : }
34972 :
34973 5400 : static enum ndr_err_code ndr_push_spoolss_GetPrinterDataEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetPrinterDataEx *r)
34974 : {
34975 5400 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
34976 5400 : if (flags & NDR_IN) {
34977 2700 : if (r->in.handle == NULL) {
34978 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34979 : }
34980 2700 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
34981 2700 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
34982 2700 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
34983 2700 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
34984 2700 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
34985 2700 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
34986 2700 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
34987 2700 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
34988 2700 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
34989 2700 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
34990 : }
34991 5400 : if (flags & NDR_OUT) {
34992 2700 : if (r->out.type == NULL) {
34993 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34994 : }
34995 2700 : if (r->out.data == NULL) {
34996 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
34997 : }
34998 2700 : if (r->out.needed == NULL) {
34999 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35000 : }
35001 2700 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
35002 2700 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
35003 2700 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.offered));
35004 2700 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
35005 2700 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
35006 : }
35007 5400 : return NDR_ERR_SUCCESS;
35008 : }
35009 :
35010 5400 : static enum ndr_err_code ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetPrinterDataEx *r)
35011 : {
35012 5400 : uint32_t size_key_name_0 = 0;
35013 5400 : uint32_t length_key_name_0 = 0;
35014 5400 : uint32_t size_value_name_0 = 0;
35015 5400 : uint32_t length_value_name_0 = 0;
35016 5400 : uint32_t size_data_1 = 0;
35017 5400 : TALLOC_CTX *_mem_save_handle_0 = NULL;
35018 5400 : TALLOC_CTX *_mem_save_type_0 = NULL;
35019 5400 : TALLOC_CTX *_mem_save_needed_0 = NULL;
35020 5400 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
35021 5400 : if (flags & NDR_IN) {
35022 2700 : NDR_ZERO_STRUCT(r->out);
35023 :
35024 2700 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35025 2700 : NDR_PULL_ALLOC(ndr, r->in.handle);
35026 : }
35027 2700 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
35028 2700 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
35029 2700 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
35030 2700 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
35031 2700 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
35032 2700 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
35033 2700 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.key_name, &size_key_name_0));
35034 2700 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.key_name, &length_key_name_0));
35035 2700 : if (length_key_name_0 > size_key_name_0) {
35036 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_key_name_0, length_key_name_0);
35037 : }
35038 2700 : NDR_CHECK(ndr_check_string_terminator(ndr, length_key_name_0, sizeof(uint16_t)));
35039 2700 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, length_key_name_0, sizeof(uint16_t), CH_UTF16));
35040 2700 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
35041 2700 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
35042 2700 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.value_name, &size_value_name_0));
35043 2700 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.value_name, &length_value_name_0));
35044 2700 : if (length_value_name_0 > size_value_name_0) {
35045 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_value_name_0, length_value_name_0);
35046 : }
35047 2700 : NDR_CHECK(ndr_check_string_terminator(ndr, length_value_name_0, sizeof(uint16_t)));
35048 2700 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, length_value_name_0, sizeof(uint16_t), CH_UTF16));
35049 2700 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
35050 2700 : NDR_PULL_ALLOC(ndr, r->out.type);
35051 2700 : NDR_ZERO_STRUCTP(r->out.type);
35052 2700 : NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.offered);
35053 2700 : memset(r->out.data, 0, (r->in.offered) * sizeof(*r->out.data));
35054 2700 : NDR_PULL_ALLOC(ndr, r->out.needed);
35055 2700 : NDR_ZERO_STRUCTP(r->out.needed);
35056 : }
35057 5400 : if (flags & NDR_OUT) {
35058 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
35059 : if (r->in.handle == NULL) {
35060 : NDR_PULL_ALLOC(ndr, r->in.handle);
35061 : NDR_ZERO_STRUCTP(r->in.handle);
35062 : }
35063 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
35064 2700 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35065 0 : NDR_PULL_ALLOC(ndr, r->out.type);
35066 : }
35067 2700 : _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
35068 2700 : NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
35069 2700 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
35070 2700 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
35071 2700 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
35072 2700 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.data, &size_data_1));
35073 2700 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35074 0 : NDR_PULL_ALLOC_N(ndr, r->out.data, size_data_1);
35075 : }
35076 2700 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, size_data_1));
35077 2700 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35078 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
35079 : }
35080 2700 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
35081 2700 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
35082 2700 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
35083 2700 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
35084 2700 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
35085 2700 : if (r->out.data) {
35086 2700 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.data, r->in.offered));
35087 : }
35088 : }
35089 5400 : return NDR_ERR_SUCCESS;
35090 : }
35091 :
35092 0 : _PUBLIC_ void ndr_print_spoolss_GetPrinterDataEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetPrinterDataEx *r)
35093 : {
35094 0 : ndr_print_struct(ndr, name, "spoolss_GetPrinterDataEx");
35095 0 : if (r == NULL) { ndr_print_null(ndr); return; }
35096 0 : ndr->depth++;
35097 0 : if (flags & NDR_SET_VALUES) {
35098 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
35099 : }
35100 0 : if (flags & NDR_IN) {
35101 0 : ndr_print_struct(ndr, "in", "spoolss_GetPrinterDataEx");
35102 0 : ndr->depth++;
35103 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
35104 0 : ndr->depth++;
35105 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
35106 0 : ndr->depth--;
35107 0 : ndr_print_string(ndr, "key_name", r->in.key_name);
35108 0 : ndr_print_string(ndr, "value_name", r->in.value_name);
35109 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
35110 0 : ndr->depth--;
35111 : }
35112 0 : if (flags & NDR_OUT) {
35113 0 : ndr_print_struct(ndr, "out", "spoolss_GetPrinterDataEx");
35114 0 : ndr->depth++;
35115 0 : ndr_print_ptr(ndr, "type", r->out.type);
35116 0 : ndr->depth++;
35117 0 : ndr_print_winreg_Type(ndr, "type", *r->out.type);
35118 0 : ndr->depth--;
35119 0 : ndr_print_ptr(ndr, "data", r->out.data);
35120 0 : ndr->depth++;
35121 0 : ndr_print_array_uint8(ndr, "data", r->out.data, r->in.offered);
35122 0 : ndr->depth--;
35123 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
35124 0 : ndr->depth++;
35125 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
35126 0 : ndr->depth--;
35127 0 : ndr_print_WERROR(ndr, "result", r->out.result);
35128 0 : ndr->depth--;
35129 : }
35130 0 : ndr->depth--;
35131 : }
35132 :
35133 5192 : _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrinterDataEx(struct ndr_push *ndr, ndr_flags_type flags, const struct _spoolss_EnumPrinterDataEx *r)
35134 : {
35135 5192 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
35136 5192 : if (flags & NDR_IN) {
35137 2596 : if (r->in.handle == NULL) {
35138 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35139 : }
35140 2596 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
35141 2596 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
35142 2596 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35143 2596 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
35144 2596 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35145 2596 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
35146 : }
35147 5192 : if (flags & NDR_OUT) {
35148 2596 : if (r->out.needed == NULL) {
35149 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35150 : }
35151 2596 : if (r->out.count == NULL) {
35152 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35153 : }
35154 2596 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
35155 2596 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
35156 2596 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
35157 2596 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
35158 : }
35159 5192 : return NDR_ERR_SUCCESS;
35160 : }
35161 :
35162 5200 : _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinterDataEx(struct ndr_pull *ndr, ndr_flags_type flags, struct _spoolss_EnumPrinterDataEx *r)
35163 : {
35164 5200 : uint32_t size_key_name_0 = 0;
35165 5200 : uint32_t length_key_name_0 = 0;
35166 5200 : TALLOC_CTX *_mem_save_handle_0 = NULL;
35167 5200 : TALLOC_CTX *_mem_save_needed_0 = NULL;
35168 5200 : TALLOC_CTX *_mem_save_count_0 = NULL;
35169 5200 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
35170 5200 : if (flags & NDR_IN) {
35171 2600 : NDR_ZERO_STRUCT(r->out);
35172 :
35173 2600 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35174 2600 : NDR_PULL_ALLOC(ndr, r->in.handle);
35175 : }
35176 2600 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
35177 2600 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
35178 2600 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
35179 2600 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
35180 2600 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
35181 2600 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
35182 2600 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.key_name, &size_key_name_0));
35183 2600 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.key_name, &length_key_name_0));
35184 2600 : if (length_key_name_0 > size_key_name_0) {
35185 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_key_name_0, length_key_name_0);
35186 : }
35187 2600 : NDR_CHECK(ndr_check_string_terminator(ndr, length_key_name_0, sizeof(uint16_t)));
35188 2600 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, length_key_name_0, sizeof(uint16_t), CH_UTF16));
35189 2600 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
35190 2600 : NDR_PULL_ALLOC(ndr, r->out.needed);
35191 2600 : NDR_ZERO_STRUCTP(r->out.needed);
35192 2600 : NDR_PULL_ALLOC(ndr, r->out.count);
35193 2600 : NDR_ZERO_STRUCTP(r->out.count);
35194 : }
35195 5200 : if (flags & NDR_OUT) {
35196 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
35197 : if (r->in.handle == NULL) {
35198 : NDR_PULL_ALLOC(ndr, r->in.handle);
35199 : NDR_ZERO_STRUCTP(r->in.handle);
35200 : }
35201 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
35202 2600 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->out.info));
35203 2600 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35204 4 : NDR_PULL_ALLOC(ndr, r->out.needed);
35205 : }
35206 2600 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
35207 2600 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
35208 2600 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
35209 2600 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
35210 2600 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35211 4 : NDR_PULL_ALLOC(ndr, r->out.count);
35212 : }
35213 2600 : _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
35214 2600 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
35215 2600 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
35216 2600 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
35217 2600 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
35218 : }
35219 5192 : return NDR_ERR_SUCCESS;
35220 : }
35221 :
35222 4192 : _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrinterDataEx(struct ndr_push *ndr, ndr_flags_type flags, const struct __spoolss_EnumPrinterDataEx *r)
35223 : {
35224 0 : uint32_t cntr_info_0;
35225 4192 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
35226 4192 : if (flags & NDR_IN) {
35227 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
35228 : }
35229 4192 : if (flags & NDR_OUT) {
35230 9736 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
35231 5544 : NDR_CHECK(ndr_push_spoolss_PrinterEnumValues(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
35232 : }
35233 9736 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
35234 5544 : NDR_CHECK(ndr_push_spoolss_PrinterEnumValues(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
35235 : }
35236 : }
35237 4192 : return NDR_ERR_SUCCESS;
35238 : }
35239 :
35240 1262 : _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrinterDataEx(struct ndr_pull *ndr, ndr_flags_type flags, struct __spoolss_EnumPrinterDataEx *r)
35241 : {
35242 1262 : uint32_t size_info_0 = 0;
35243 2 : uint32_t cntr_info_0;
35244 1262 : TALLOC_CTX *_mem_save_info_0 = NULL;
35245 1262 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
35246 1262 : if (flags & NDR_IN) {
35247 0 : NDR_ZERO_STRUCT(r->out);
35248 :
35249 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
35250 : }
35251 1262 : if (flags & NDR_OUT) {
35252 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
35253 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
35254 1262 : size_info_0 = r->in.count;
35255 1262 : NDR_PULL_ALLOC_N(ndr, r->out.info, size_info_0);
35256 1262 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
35257 1262 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
35258 2936 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
35259 1674 : NDR_CHECK(ndr_pull_spoolss_PrinterEnumValues(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
35260 : }
35261 2936 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
35262 1674 : NDR_CHECK(ndr_pull_spoolss_PrinterEnumValues(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
35263 : }
35264 1262 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
35265 2886 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
35266 : }
35267 : }
35268 1260 : return NDR_ERR_SUCCESS;
35269 : }
35270 :
35271 8 : _PUBLIC_ void ndr_print_spoolss_EnumPrinterDataEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumPrinterDataEx *r)
35272 : {
35273 8 : uint32_t cntr_info_2;
35274 8 : ndr_print_struct(ndr, name, "spoolss_EnumPrinterDataEx");
35275 8 : if (r == NULL) { ndr_print_null(ndr); return; }
35276 8 : ndr->depth++;
35277 8 : if (flags & NDR_SET_VALUES) {
35278 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
35279 : }
35280 8 : if (flags & NDR_IN) {
35281 4 : ndr_print_struct(ndr, "in", "spoolss_EnumPrinterDataEx");
35282 4 : ndr->depth++;
35283 4 : ndr_print_ptr(ndr, "handle", r->in.handle);
35284 4 : ndr->depth++;
35285 4 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
35286 4 : ndr->depth--;
35287 4 : ndr_print_string(ndr, "key_name", r->in.key_name);
35288 4 : ndr_print_uint32(ndr, "offered", r->in.offered);
35289 4 : ndr->depth--;
35290 : }
35291 8 : if (flags & NDR_OUT) {
35292 4 : ndr_print_struct(ndr, "out", "spoolss_EnumPrinterDataEx");
35293 4 : ndr->depth++;
35294 4 : ndr_print_ptr(ndr, "count", r->out.count);
35295 4 : ndr->depth++;
35296 4 : ndr_print_uint32(ndr, "count", *r->out.count);
35297 4 : ndr->depth--;
35298 4 : ndr_print_ptr(ndr, "info", r->out.info);
35299 4 : ndr->depth++;
35300 4 : ndr_print_ptr(ndr, "info", *r->out.info);
35301 4 : ndr->depth++;
35302 4 : if (*r->out.info) {
35303 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(*r->out.count));
35304 2 : ndr->depth++;
35305 52 : for (cntr_info_2 = 0; cntr_info_2 < (*r->out.count); cntr_info_2++) {
35306 50 : ndr_print_spoolss_PrinterEnumValues(ndr, "info", &(*r->out.info)[cntr_info_2]);
35307 : }
35308 2 : ndr->depth--;
35309 : }
35310 4 : ndr->depth--;
35311 4 : ndr->depth--;
35312 4 : ndr_print_ptr(ndr, "needed", r->out.needed);
35313 4 : ndr->depth++;
35314 4 : ndr_print_uint32(ndr, "needed", *r->out.needed);
35315 4 : ndr->depth--;
35316 4 : ndr_print_WERROR(ndr, "result", r->out.result);
35317 4 : ndr->depth--;
35318 : }
35319 8 : ndr->depth--;
35320 : }
35321 :
35322 6768 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_EnumPrinterKey(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_EnumPrinterKey *r)
35323 : {
35324 6768 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
35325 6768 : if (flags & NDR_IN) {
35326 3384 : if (r->in.handle == NULL) {
35327 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35328 : }
35329 3384 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
35330 3384 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
35331 3384 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35332 3384 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
35333 3384 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35334 3384 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
35335 : }
35336 6768 : if (flags & NDR_OUT) {
35337 3384 : if (r->out._ndr_size == NULL) {
35338 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35339 : }
35340 3384 : if (r->out.key_buffer == NULL) {
35341 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35342 : }
35343 3384 : if (r->out.needed == NULL) {
35344 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35345 : }
35346 3384 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out._ndr_size));
35347 : {
35348 0 : struct ndr_push *_ndr_key_buffer;
35349 3384 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_key_buffer, 0, *r->out._ndr_size * 2));
35350 3384 : NDR_CHECK(ndr_push_set_switch_value(_ndr_key_buffer, r->out.key_buffer, *r->out._ndr_size));
35351 3384 : NDR_CHECK(ndr_push_spoolss_KeyNames(_ndr_key_buffer, NDR_SCALARS|NDR_BUFFERS, r->out.key_buffer));
35352 3384 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_key_buffer, 0, *r->out._ndr_size * 2));
35353 : }
35354 3384 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
35355 3384 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
35356 : }
35357 6768 : return NDR_ERR_SUCCESS;
35358 : }
35359 :
35360 6776 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_EnumPrinterKey(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_EnumPrinterKey *r)
35361 : {
35362 6776 : uint32_t size_key_name_0 = 0;
35363 6776 : uint32_t length_key_name_0 = 0;
35364 6776 : TALLOC_CTX *_mem_save_handle_0 = NULL;
35365 6776 : TALLOC_CTX *_mem_save__ndr_size_0 = NULL;
35366 6776 : TALLOC_CTX *_mem_save_key_buffer_0 = NULL;
35367 6776 : TALLOC_CTX *_mem_save_needed_0 = NULL;
35368 6776 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
35369 6776 : if (flags & NDR_IN) {
35370 3388 : NDR_ZERO_STRUCT(r->out);
35371 :
35372 3388 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35373 3388 : NDR_PULL_ALLOC(ndr, r->in.handle);
35374 : }
35375 3388 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
35376 3388 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
35377 3388 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
35378 3388 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
35379 3388 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
35380 3388 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
35381 3388 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.key_name, &size_key_name_0));
35382 3388 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.key_name, &length_key_name_0));
35383 3388 : if (length_key_name_0 > size_key_name_0) {
35384 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_key_name_0, length_key_name_0);
35385 : }
35386 3388 : NDR_CHECK(ndr_check_string_terminator(ndr, length_key_name_0, sizeof(uint16_t)));
35387 3388 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, length_key_name_0, sizeof(uint16_t), CH_UTF16));
35388 3388 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
35389 3388 : NDR_PULL_ALLOC(ndr, r->out._ndr_size);
35390 3388 : NDR_ZERO_STRUCTP(r->out._ndr_size);
35391 3388 : NDR_PULL_ALLOC(ndr, r->out.key_buffer);
35392 3388 : NDR_ZERO_STRUCTP(r->out.key_buffer);
35393 3388 : NDR_PULL_ALLOC(ndr, r->out.needed);
35394 3388 : NDR_ZERO_STRUCTP(r->out.needed);
35395 : }
35396 6776 : if (flags & NDR_OUT) {
35397 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
35398 : if (r->in.handle == NULL) {
35399 : NDR_PULL_ALLOC(ndr, r->in.handle);
35400 : NDR_ZERO_STRUCTP(r->in.handle);
35401 : }
35402 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
35403 3388 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35404 4 : NDR_PULL_ALLOC(ndr, r->out._ndr_size);
35405 : }
35406 3388 : _mem_save__ndr_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
35407 3388 : NDR_PULL_SET_MEM_CTX(ndr, r->out._ndr_size, LIBNDR_FLAG_REF_ALLOC);
35408 3388 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out._ndr_size));
35409 3388 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save__ndr_size_0, LIBNDR_FLAG_REF_ALLOC);
35410 3388 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35411 4 : NDR_PULL_ALLOC(ndr, r->out.key_buffer);
35412 : }
35413 3388 : _mem_save_key_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
35414 3388 : NDR_PULL_SET_MEM_CTX(ndr, r->out.key_buffer, LIBNDR_FLAG_REF_ALLOC);
35415 : {
35416 4 : struct ndr_pull *_ndr_key_buffer;
35417 3388 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_key_buffer, 0, *r->out._ndr_size * 2));
35418 3388 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_key_buffer, r->out.key_buffer, *r->out._ndr_size));
35419 3388 : NDR_CHECK(ndr_pull_spoolss_KeyNames(_ndr_key_buffer, NDR_SCALARS|NDR_BUFFERS, r->out.key_buffer));
35420 3388 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_key_buffer, 0, *r->out._ndr_size * 2));
35421 : }
35422 3388 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_buffer_0, LIBNDR_FLAG_REF_ALLOC);
35423 3388 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35424 4 : NDR_PULL_ALLOC(ndr, r->out.needed);
35425 : }
35426 3388 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
35427 3388 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
35428 3388 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
35429 3388 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
35430 3388 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
35431 : }
35432 6768 : return NDR_ERR_SUCCESS;
35433 : }
35434 :
35435 8 : _PUBLIC_ void ndr_print_spoolss_EnumPrinterKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumPrinterKey *r)
35436 : {
35437 8 : ndr_print_struct(ndr, name, "spoolss_EnumPrinterKey");
35438 8 : if (r == NULL) { ndr_print_null(ndr); return; }
35439 8 : ndr->depth++;
35440 8 : if (flags & NDR_SET_VALUES) {
35441 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
35442 : }
35443 8 : if (flags & NDR_IN) {
35444 4 : ndr_print_struct(ndr, "in", "spoolss_EnumPrinterKey");
35445 4 : ndr->depth++;
35446 4 : ndr_print_ptr(ndr, "handle", r->in.handle);
35447 4 : ndr->depth++;
35448 4 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
35449 4 : ndr->depth--;
35450 4 : ndr_print_string(ndr, "key_name", r->in.key_name);
35451 4 : ndr_print_uint32(ndr, "offered", r->in.offered);
35452 4 : ndr->depth--;
35453 : }
35454 8 : if (flags & NDR_OUT) {
35455 4 : ndr_print_struct(ndr, "out", "spoolss_EnumPrinterKey");
35456 4 : ndr->depth++;
35457 4 : ndr_print_ptr(ndr, "_ndr_size", r->out._ndr_size);
35458 4 : ndr->depth++;
35459 4 : ndr_print_uint32(ndr, "_ndr_size", *r->out._ndr_size);
35460 4 : ndr->depth--;
35461 4 : ndr_print_ptr(ndr, "key_buffer", r->out.key_buffer);
35462 4 : ndr->depth++;
35463 4 : ndr_print_set_switch_value(ndr, r->out.key_buffer, *r->out._ndr_size);
35464 4 : ndr_print_spoolss_KeyNames(ndr, "key_buffer", r->out.key_buffer);
35465 4 : ndr->depth--;
35466 4 : ndr_print_ptr(ndr, "needed", r->out.needed);
35467 4 : ndr->depth++;
35468 4 : ndr_print_uint32(ndr, "needed", *r->out.needed);
35469 4 : ndr->depth--;
35470 4 : ndr_print_WERROR(ndr, "result", r->out.result);
35471 4 : ndr->depth--;
35472 : }
35473 8 : ndr->depth--;
35474 : }
35475 :
35476 2400 : static enum ndr_err_code ndr_push_spoolss_DeletePrinterDataEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePrinterDataEx *r)
35477 : {
35478 2400 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
35479 2400 : if (flags & NDR_IN) {
35480 1200 : if (r->in.handle == NULL) {
35481 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35482 : }
35483 1200 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
35484 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
35485 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35486 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
35487 1200 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35488 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
35489 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35490 1200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
35491 1200 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35492 : }
35493 2400 : if (flags & NDR_OUT) {
35494 1200 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
35495 : }
35496 2400 : return NDR_ERR_SUCCESS;
35497 : }
35498 :
35499 2400 : static enum ndr_err_code ndr_pull_spoolss_DeletePrinterDataEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePrinterDataEx *r)
35500 : {
35501 2400 : uint32_t size_key_name_0 = 0;
35502 2400 : uint32_t length_key_name_0 = 0;
35503 2400 : uint32_t size_value_name_0 = 0;
35504 2400 : uint32_t length_value_name_0 = 0;
35505 2400 : TALLOC_CTX *_mem_save_handle_0 = NULL;
35506 2400 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
35507 2400 : if (flags & NDR_IN) {
35508 1200 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35509 1200 : NDR_PULL_ALLOC(ndr, r->in.handle);
35510 : }
35511 1200 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
35512 1200 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
35513 1200 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
35514 1200 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
35515 1200 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
35516 1200 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
35517 1200 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.key_name, &size_key_name_0));
35518 1200 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.key_name, &length_key_name_0));
35519 1200 : if (length_key_name_0 > size_key_name_0) {
35520 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_key_name_0, length_key_name_0);
35521 : }
35522 1200 : NDR_CHECK(ndr_check_string_terminator(ndr, length_key_name_0, sizeof(uint16_t)));
35523 1200 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, length_key_name_0, sizeof(uint16_t), CH_UTF16));
35524 1200 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
35525 1200 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
35526 1200 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.value_name, &size_value_name_0));
35527 1200 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.value_name, &length_value_name_0));
35528 1200 : if (length_value_name_0 > size_value_name_0) {
35529 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_value_name_0, length_value_name_0);
35530 : }
35531 1200 : NDR_CHECK(ndr_check_string_terminator(ndr, length_value_name_0, sizeof(uint16_t)));
35532 1200 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, length_value_name_0, sizeof(uint16_t), CH_UTF16));
35533 : }
35534 2400 : if (flags & NDR_OUT) {
35535 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
35536 : if (r->in.handle == NULL) {
35537 : NDR_PULL_ALLOC(ndr, r->in.handle);
35538 : NDR_ZERO_STRUCTP(r->in.handle);
35539 : }
35540 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
35541 1200 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
35542 : }
35543 2400 : return NDR_ERR_SUCCESS;
35544 : }
35545 :
35546 0 : _PUBLIC_ void ndr_print_spoolss_DeletePrinterDataEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePrinterDataEx *r)
35547 : {
35548 0 : ndr_print_struct(ndr, name, "spoolss_DeletePrinterDataEx");
35549 0 : if (r == NULL) { ndr_print_null(ndr); return; }
35550 0 : ndr->depth++;
35551 0 : if (flags & NDR_SET_VALUES) {
35552 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
35553 : }
35554 0 : if (flags & NDR_IN) {
35555 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePrinterDataEx");
35556 0 : ndr->depth++;
35557 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
35558 0 : ndr->depth++;
35559 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
35560 0 : ndr->depth--;
35561 0 : ndr_print_string(ndr, "key_name", r->in.key_name);
35562 0 : ndr_print_string(ndr, "value_name", r->in.value_name);
35563 0 : ndr->depth--;
35564 : }
35565 0 : if (flags & NDR_OUT) {
35566 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePrinterDataEx");
35567 0 : ndr->depth++;
35568 0 : ndr_print_WERROR(ndr, "result", r->out.result);
35569 0 : ndr->depth--;
35570 : }
35571 0 : ndr->depth--;
35572 : }
35573 :
35574 432 : static enum ndr_err_code ndr_push_spoolss_DeletePrinterKey(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePrinterKey *r)
35575 : {
35576 432 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
35577 432 : if (flags & NDR_IN) {
35578 216 : if (r->in.handle == NULL) {
35579 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35580 : }
35581 216 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
35582 216 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
35583 216 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35584 216 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
35585 216 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35586 : }
35587 432 : if (flags & NDR_OUT) {
35588 216 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
35589 : }
35590 432 : return NDR_ERR_SUCCESS;
35591 : }
35592 :
35593 432 : static enum ndr_err_code ndr_pull_spoolss_DeletePrinterKey(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePrinterKey *r)
35594 : {
35595 432 : uint32_t size_key_name_0 = 0;
35596 432 : uint32_t length_key_name_0 = 0;
35597 432 : TALLOC_CTX *_mem_save_handle_0 = NULL;
35598 432 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
35599 432 : if (flags & NDR_IN) {
35600 216 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
35601 216 : NDR_PULL_ALLOC(ndr, r->in.handle);
35602 : }
35603 216 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
35604 216 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
35605 216 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
35606 216 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
35607 216 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
35608 216 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
35609 216 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.key_name, &size_key_name_0));
35610 216 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.key_name, &length_key_name_0));
35611 216 : if (length_key_name_0 > size_key_name_0) {
35612 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_key_name_0, length_key_name_0);
35613 : }
35614 216 : NDR_CHECK(ndr_check_string_terminator(ndr, length_key_name_0, sizeof(uint16_t)));
35615 216 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, length_key_name_0, sizeof(uint16_t), CH_UTF16));
35616 : }
35617 432 : if (flags & NDR_OUT) {
35618 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
35619 : if (r->in.handle == NULL) {
35620 : NDR_PULL_ALLOC(ndr, r->in.handle);
35621 : NDR_ZERO_STRUCTP(r->in.handle);
35622 : }
35623 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
35624 216 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
35625 : }
35626 432 : return NDR_ERR_SUCCESS;
35627 : }
35628 :
35629 0 : _PUBLIC_ void ndr_print_spoolss_DeletePrinterKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePrinterKey *r)
35630 : {
35631 0 : ndr_print_struct(ndr, name, "spoolss_DeletePrinterKey");
35632 0 : if (r == NULL) { ndr_print_null(ndr); return; }
35633 0 : ndr->depth++;
35634 0 : if (flags & NDR_SET_VALUES) {
35635 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
35636 : }
35637 0 : if (flags & NDR_IN) {
35638 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePrinterKey");
35639 0 : ndr->depth++;
35640 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
35641 0 : ndr->depth++;
35642 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
35643 0 : ndr->depth--;
35644 0 : ndr_print_string(ndr, "key_name", r->in.key_name);
35645 0 : ndr->depth--;
35646 : }
35647 0 : if (flags & NDR_OUT) {
35648 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePrinterKey");
35649 0 : ndr->depth++;
35650 0 : ndr_print_WERROR(ndr, "result", r->out.result);
35651 0 : ndr->depth--;
35652 : }
35653 0 : ndr->depth--;
35654 : }
35655 :
35656 0 : static enum ndr_err_code ndr_push_spoolss_53(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_53 *r)
35657 : {
35658 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
35659 0 : if (flags & NDR_IN) {
35660 0 : }
35661 0 : if (flags & NDR_OUT) {
35662 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
35663 : }
35664 0 : return NDR_ERR_SUCCESS;
35665 : }
35666 :
35667 0 : static enum ndr_err_code ndr_pull_spoolss_53(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_53 *r)
35668 : {
35669 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
35670 0 : if (flags & NDR_IN) {
35671 0 : }
35672 0 : if (flags & NDR_OUT) {
35673 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
35674 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
35675 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
35676 : }
35677 0 : return NDR_ERR_SUCCESS;
35678 : }
35679 :
35680 0 : _PUBLIC_ void ndr_print_spoolss_53(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_53 *r)
35681 : {
35682 0 : ndr_print_struct(ndr, name, "spoolss_53");
35683 0 : if (r == NULL) { ndr_print_null(ndr); return; }
35684 0 : ndr->depth++;
35685 0 : if (flags & NDR_SET_VALUES) {
35686 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
35687 : }
35688 0 : if (flags & NDR_IN) {
35689 0 : ndr_print_struct(ndr, "in", "spoolss_53");
35690 0 : ndr->depth++;
35691 0 : ndr->depth--;
35692 : }
35693 0 : if (flags & NDR_OUT) {
35694 0 : ndr_print_struct(ndr, "out", "spoolss_53");
35695 0 : ndr->depth++;
35696 0 : ndr_print_WERROR(ndr, "result", r->out.result);
35697 0 : ndr->depth--;
35698 : }
35699 0 : ndr->depth--;
35700 : }
35701 :
35702 0 : static enum ndr_err_code ndr_push_spoolss_DeletePrinterDriverEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePrinterDriverEx *r)
35703 : {
35704 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
35705 0 : if (flags & NDR_IN) {
35706 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
35707 0 : if (r->in.server) {
35708 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
35709 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35710 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
35711 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35712 : }
35713 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
35714 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35715 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
35716 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35717 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.driver, CH_UTF16)));
35718 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35719 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.driver, CH_UTF16)));
35720 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.driver, ndr_charset_length(r->in.driver, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35721 0 : NDR_CHECK(ndr_push_spoolss_DeleteDriverFlags(ndr, NDR_SCALARS, r->in.delete_flags));
35722 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.version));
35723 : }
35724 0 : if (flags & NDR_OUT) {
35725 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
35726 : }
35727 0 : return NDR_ERR_SUCCESS;
35728 : }
35729 :
35730 0 : static enum ndr_err_code ndr_pull_spoolss_DeletePrinterDriverEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePrinterDriverEx *r)
35731 : {
35732 0 : uint32_t _ptr_server;
35733 0 : uint32_t size_server_1 = 0;
35734 0 : uint32_t length_server_1 = 0;
35735 0 : uint32_t size_architecture_0 = 0;
35736 0 : uint32_t length_architecture_0 = 0;
35737 0 : uint32_t size_driver_0 = 0;
35738 0 : uint32_t length_driver_0 = 0;
35739 0 : TALLOC_CTX *_mem_save_server_0 = NULL;
35740 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
35741 0 : if (flags & NDR_IN) {
35742 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
35743 0 : if (_ptr_server) {
35744 0 : NDR_PULL_ALLOC(ndr, r->in.server);
35745 : } else {
35746 0 : r->in.server = NULL;
35747 : }
35748 0 : if (r->in.server) {
35749 0 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
35750 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
35751 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
35752 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
35753 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
35754 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
35755 0 : if (length_server_1 > size_server_1) {
35756 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
35757 : }
35758 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
35759 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
35760 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
35761 : }
35762 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
35763 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
35764 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.architecture, &size_architecture_0));
35765 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.architecture, &length_architecture_0));
35766 0 : if (length_architecture_0 > size_architecture_0) {
35767 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_0, length_architecture_0);
35768 : }
35769 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_0, sizeof(uint16_t)));
35770 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, length_architecture_0, sizeof(uint16_t), CH_UTF16));
35771 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.driver));
35772 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.driver));
35773 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.driver, &size_driver_0));
35774 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.driver, &length_driver_0));
35775 0 : if (length_driver_0 > size_driver_0) {
35776 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_driver_0, length_driver_0);
35777 : }
35778 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_0, sizeof(uint16_t)));
35779 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.driver, length_driver_0, sizeof(uint16_t), CH_UTF16));
35780 0 : NDR_CHECK(ndr_pull_spoolss_DeleteDriverFlags(ndr, NDR_SCALARS, &r->in.delete_flags));
35781 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.version));
35782 : }
35783 0 : if (flags & NDR_OUT) {
35784 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
35785 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
35786 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
35787 : }
35788 0 : return NDR_ERR_SUCCESS;
35789 : }
35790 :
35791 0 : _PUBLIC_ void ndr_print_spoolss_DeletePrinterDriverEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePrinterDriverEx *r)
35792 : {
35793 0 : ndr_print_struct(ndr, name, "spoolss_DeletePrinterDriverEx");
35794 0 : if (r == NULL) { ndr_print_null(ndr); return; }
35795 0 : ndr->depth++;
35796 0 : if (flags & NDR_SET_VALUES) {
35797 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
35798 : }
35799 0 : if (flags & NDR_IN) {
35800 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePrinterDriverEx");
35801 0 : ndr->depth++;
35802 0 : ndr_print_ptr(ndr, "server", r->in.server);
35803 0 : ndr->depth++;
35804 0 : if (r->in.server) {
35805 0 : ndr_print_string(ndr, "server", r->in.server);
35806 : }
35807 0 : ndr->depth--;
35808 0 : ndr_print_string(ndr, "architecture", r->in.architecture);
35809 0 : ndr_print_string(ndr, "driver", r->in.driver);
35810 0 : ndr_print_spoolss_DeleteDriverFlags(ndr, "delete_flags", r->in.delete_flags);
35811 0 : ndr_print_uint32(ndr, "version", r->in.version);
35812 0 : ndr->depth--;
35813 : }
35814 0 : if (flags & NDR_OUT) {
35815 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePrinterDriverEx");
35816 0 : ndr->depth++;
35817 0 : ndr_print_WERROR(ndr, "result", r->out.result);
35818 0 : ndr->depth--;
35819 : }
35820 0 : ndr->depth--;
35821 : }
35822 :
35823 4 : static enum ndr_err_code ndr_push_spoolss_AddPerMachineConnection(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddPerMachineConnection *r)
35824 : {
35825 4 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
35826 4 : if (flags & NDR_IN) {
35827 4 : if (r->in.printername == NULL) {
35828 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35829 : }
35830 4 : if (r->in.printserver == NULL) {
35831 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35832 : }
35833 4 : if (r->in.provider == NULL) {
35834 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35835 : }
35836 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
35837 4 : if (r->in.server) {
35838 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
35839 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35840 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
35841 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35842 : }
35843 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
35844 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35845 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
35846 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.printername, ndr_charset_length(r->in.printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35847 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.printserver, CH_UTF16)));
35848 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35849 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.printserver, CH_UTF16)));
35850 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.printserver, ndr_charset_length(r->in.printserver, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35851 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.provider, CH_UTF16)));
35852 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35853 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.provider, CH_UTF16)));
35854 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.provider, ndr_charset_length(r->in.provider, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35855 : }
35856 4 : if (flags & NDR_OUT) {
35857 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
35858 : }
35859 4 : return NDR_ERR_SUCCESS;
35860 : }
35861 :
35862 4 : static enum ndr_err_code ndr_pull_spoolss_AddPerMachineConnection(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddPerMachineConnection *r)
35863 : {
35864 0 : uint32_t _ptr_server;
35865 4 : uint32_t size_server_1 = 0;
35866 4 : uint32_t length_server_1 = 0;
35867 4 : uint32_t size_printername_1 = 0;
35868 4 : uint32_t length_printername_1 = 0;
35869 4 : uint32_t size_printserver_1 = 0;
35870 4 : uint32_t length_printserver_1 = 0;
35871 4 : uint32_t size_provider_1 = 0;
35872 4 : uint32_t length_provider_1 = 0;
35873 4 : TALLOC_CTX *_mem_save_server_0 = NULL;
35874 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
35875 4 : if (flags & NDR_IN) {
35876 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
35877 4 : if (_ptr_server) {
35878 0 : NDR_PULL_ALLOC(ndr, r->in.server);
35879 : } else {
35880 4 : r->in.server = NULL;
35881 : }
35882 4 : if (r->in.server) {
35883 0 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
35884 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
35885 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
35886 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
35887 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
35888 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
35889 0 : if (length_server_1 > size_server_1) {
35890 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
35891 : }
35892 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
35893 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
35894 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
35895 : }
35896 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.printername));
35897 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.printername));
35898 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.printername, &size_printername_1));
35899 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.printername, &length_printername_1));
35900 4 : if (length_printername_1 > size_printername_1) {
35901 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printername_1, length_printername_1);
35902 : }
35903 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printername_1, sizeof(uint16_t)));
35904 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.printername, length_printername_1, sizeof(uint16_t), CH_UTF16));
35905 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.printserver));
35906 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.printserver));
35907 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.printserver, &size_printserver_1));
35908 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.printserver, &length_printserver_1));
35909 4 : if (length_printserver_1 > size_printserver_1) {
35910 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printserver_1, length_printserver_1);
35911 : }
35912 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printserver_1, sizeof(uint16_t)));
35913 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.printserver, length_printserver_1, sizeof(uint16_t), CH_UTF16));
35914 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.provider));
35915 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.provider));
35916 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.provider, &size_provider_1));
35917 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.provider, &length_provider_1));
35918 4 : if (length_provider_1 > size_provider_1) {
35919 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_provider_1, length_provider_1);
35920 : }
35921 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_provider_1, sizeof(uint16_t)));
35922 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.provider, length_provider_1, sizeof(uint16_t), CH_UTF16));
35923 : }
35924 4 : if (flags & NDR_OUT) {
35925 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
35926 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
35927 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
35928 : }
35929 4 : return NDR_ERR_SUCCESS;
35930 : }
35931 :
35932 0 : _PUBLIC_ void ndr_print_spoolss_AddPerMachineConnection(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddPerMachineConnection *r)
35933 : {
35934 0 : ndr_print_struct(ndr, name, "spoolss_AddPerMachineConnection");
35935 0 : if (r == NULL) { ndr_print_null(ndr); return; }
35936 0 : ndr->depth++;
35937 0 : if (flags & NDR_SET_VALUES) {
35938 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
35939 : }
35940 0 : if (flags & NDR_IN) {
35941 0 : ndr_print_struct(ndr, "in", "spoolss_AddPerMachineConnection");
35942 0 : ndr->depth++;
35943 0 : ndr_print_ptr(ndr, "server", r->in.server);
35944 0 : ndr->depth++;
35945 0 : if (r->in.server) {
35946 0 : ndr_print_string(ndr, "server", r->in.server);
35947 : }
35948 0 : ndr->depth--;
35949 0 : ndr_print_ptr(ndr, "printername", r->in.printername);
35950 0 : ndr->depth++;
35951 0 : ndr_print_string(ndr, "printername", r->in.printername);
35952 0 : ndr->depth--;
35953 0 : ndr_print_ptr(ndr, "printserver", r->in.printserver);
35954 0 : ndr->depth++;
35955 0 : ndr_print_string(ndr, "printserver", r->in.printserver);
35956 0 : ndr->depth--;
35957 0 : ndr_print_ptr(ndr, "provider", r->in.provider);
35958 0 : ndr->depth++;
35959 0 : ndr_print_string(ndr, "provider", r->in.provider);
35960 0 : ndr->depth--;
35961 0 : ndr->depth--;
35962 : }
35963 0 : if (flags & NDR_OUT) {
35964 0 : ndr_print_struct(ndr, "out", "spoolss_AddPerMachineConnection");
35965 0 : ndr->depth++;
35966 0 : ndr_print_WERROR(ndr, "result", r->out.result);
35967 0 : ndr->depth--;
35968 : }
35969 0 : ndr->depth--;
35970 : }
35971 :
35972 0 : static enum ndr_err_code ndr_push_spoolss_DeletePerMachineConnection(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeletePerMachineConnection *r)
35973 : {
35974 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
35975 0 : if (flags & NDR_IN) {
35976 0 : if (r->in.printername == NULL) {
35977 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
35978 : }
35979 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
35980 0 : if (r->in.server) {
35981 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
35982 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35983 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
35984 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35985 : }
35986 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
35987 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
35988 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
35989 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.printername, ndr_charset_length(r->in.printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
35990 : }
35991 0 : if (flags & NDR_OUT) {
35992 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
35993 : }
35994 0 : return NDR_ERR_SUCCESS;
35995 : }
35996 :
35997 0 : static enum ndr_err_code ndr_pull_spoolss_DeletePerMachineConnection(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeletePerMachineConnection *r)
35998 : {
35999 0 : uint32_t _ptr_server;
36000 0 : uint32_t size_server_1 = 0;
36001 0 : uint32_t length_server_1 = 0;
36002 0 : uint32_t size_printername_1 = 0;
36003 0 : uint32_t length_printername_1 = 0;
36004 0 : TALLOC_CTX *_mem_save_server_0 = NULL;
36005 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36006 0 : if (flags & NDR_IN) {
36007 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
36008 0 : if (_ptr_server) {
36009 0 : NDR_PULL_ALLOC(ndr, r->in.server);
36010 : } else {
36011 0 : r->in.server = NULL;
36012 : }
36013 0 : if (r->in.server) {
36014 0 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
36015 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
36016 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
36017 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
36018 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
36019 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
36020 0 : if (length_server_1 > size_server_1) {
36021 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
36022 : }
36023 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
36024 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
36025 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
36026 : }
36027 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.printername));
36028 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.printername));
36029 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.printername, &size_printername_1));
36030 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.printername, &length_printername_1));
36031 0 : if (length_printername_1 > size_printername_1) {
36032 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_printername_1, length_printername_1);
36033 : }
36034 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_printername_1, sizeof(uint16_t)));
36035 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.printername, length_printername_1, sizeof(uint16_t), CH_UTF16));
36036 : }
36037 0 : if (flags & NDR_OUT) {
36038 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36039 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36040 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36041 : }
36042 0 : return NDR_ERR_SUCCESS;
36043 : }
36044 :
36045 0 : _PUBLIC_ void ndr_print_spoolss_DeletePerMachineConnection(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeletePerMachineConnection *r)
36046 : {
36047 0 : ndr_print_struct(ndr, name, "spoolss_DeletePerMachineConnection");
36048 0 : if (r == NULL) { ndr_print_null(ndr); return; }
36049 0 : ndr->depth++;
36050 0 : if (flags & NDR_SET_VALUES) {
36051 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36052 : }
36053 0 : if (flags & NDR_IN) {
36054 0 : ndr_print_struct(ndr, "in", "spoolss_DeletePerMachineConnection");
36055 0 : ndr->depth++;
36056 0 : ndr_print_ptr(ndr, "server", r->in.server);
36057 0 : ndr->depth++;
36058 0 : if (r->in.server) {
36059 0 : ndr_print_string(ndr, "server", r->in.server);
36060 : }
36061 0 : ndr->depth--;
36062 0 : ndr_print_ptr(ndr, "printername", r->in.printername);
36063 0 : ndr->depth++;
36064 0 : ndr_print_string(ndr, "printername", r->in.printername);
36065 0 : ndr->depth--;
36066 0 : ndr->depth--;
36067 : }
36068 0 : if (flags & NDR_OUT) {
36069 0 : ndr_print_struct(ndr, "out", "spoolss_DeletePerMachineConnection");
36070 0 : ndr->depth++;
36071 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36072 0 : ndr->depth--;
36073 : }
36074 0 : ndr->depth--;
36075 : }
36076 :
36077 0 : _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPerMachineConnections(struct ndr_push *ndr, ndr_flags_type flags, const struct _spoolss_EnumPerMachineConnections *r)
36078 : {
36079 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36080 0 : if (flags & NDR_IN) {
36081 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
36082 0 : if (r->in.server) {
36083 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
36084 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
36085 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
36086 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
36087 : }
36088 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
36089 0 : if (r->in.buffer) {
36090 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
36091 : }
36092 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
36093 : }
36094 0 : if (flags & NDR_OUT) {
36095 0 : if (r->out.needed == NULL) {
36096 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
36097 : }
36098 0 : if (r->out.count == NULL) {
36099 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
36100 : }
36101 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
36102 0 : if (r->out.info) {
36103 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
36104 : }
36105 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
36106 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
36107 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36108 : }
36109 0 : return NDR_ERR_SUCCESS;
36110 : }
36111 :
36112 0 : _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPerMachineConnections(struct ndr_pull *ndr, ndr_flags_type flags, struct _spoolss_EnumPerMachineConnections *r)
36113 : {
36114 0 : uint32_t _ptr_server;
36115 0 : uint32_t size_server_1 = 0;
36116 0 : uint32_t length_server_1 = 0;
36117 0 : uint32_t _ptr_buffer;
36118 0 : uint32_t _ptr_info;
36119 0 : TALLOC_CTX *_mem_save_server_0 = NULL;
36120 0 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
36121 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
36122 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
36123 0 : TALLOC_CTX *_mem_save_count_0 = NULL;
36124 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36125 0 : if (flags & NDR_IN) {
36126 0 : NDR_ZERO_STRUCT(r->out);
36127 :
36128 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
36129 0 : if (_ptr_server) {
36130 0 : NDR_PULL_ALLOC(ndr, r->in.server);
36131 : } else {
36132 0 : r->in.server = NULL;
36133 : }
36134 0 : if (r->in.server) {
36135 0 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
36136 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
36137 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
36138 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
36139 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server, &size_server_1));
36140 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server, &length_server_1));
36141 0 : if (length_server_1 > size_server_1) {
36142 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_1, length_server_1);
36143 : }
36144 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
36145 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
36146 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
36147 : }
36148 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
36149 0 : if (_ptr_buffer) {
36150 0 : NDR_PULL_ALLOC(ndr, r->in.buffer);
36151 : } else {
36152 0 : r->in.buffer = NULL;
36153 : }
36154 0 : if (r->in.buffer) {
36155 0 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
36156 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
36157 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
36158 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
36159 : }
36160 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
36161 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
36162 0 : NDR_ZERO_STRUCTP(r->out.needed);
36163 0 : NDR_PULL_ALLOC(ndr, r->out.count);
36164 0 : NDR_ZERO_STRUCTP(r->out.count);
36165 : }
36166 0 : if (flags & NDR_OUT) {
36167 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36168 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36169 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
36170 0 : if (_ptr_info) {
36171 0 : NDR_PULL_ALLOC(ndr, r->out.info);
36172 : } else {
36173 0 : r->out.info = NULL;
36174 : }
36175 0 : if (r->out.info) {
36176 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
36177 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
36178 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
36179 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
36180 : }
36181 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
36182 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
36183 : }
36184 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
36185 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
36186 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
36187 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
36188 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
36189 0 : NDR_PULL_ALLOC(ndr, r->out.count);
36190 : }
36191 0 : _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
36192 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
36193 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
36194 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
36195 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36196 : }
36197 0 : return NDR_ERR_SUCCESS;
36198 : }
36199 :
36200 0 : _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPerMachineConnections(struct ndr_push *ndr, ndr_flags_type flags, const struct __spoolss_EnumPerMachineConnections *r)
36201 : {
36202 0 : uint32_t cntr_info_0;
36203 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36204 0 : if (flags & NDR_IN) {
36205 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
36206 : }
36207 0 : if (flags & NDR_OUT) {
36208 0 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
36209 0 : NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
36210 : }
36211 0 : for (cntr_info_0 = 0; cntr_info_0 < (r->in.count); cntr_info_0++) {
36212 0 : NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
36213 : }
36214 : }
36215 0 : return NDR_ERR_SUCCESS;
36216 : }
36217 :
36218 0 : _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPerMachineConnections(struct ndr_pull *ndr, ndr_flags_type flags, struct __spoolss_EnumPerMachineConnections *r)
36219 : {
36220 0 : uint32_t size_info_0 = 0;
36221 0 : uint32_t cntr_info_0;
36222 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
36223 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36224 0 : if (flags & NDR_IN) {
36225 0 : NDR_ZERO_STRUCT(r->out);
36226 :
36227 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
36228 : }
36229 0 : if (flags & NDR_OUT) {
36230 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36231 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36232 0 : size_info_0 = r->in.count;
36233 0 : NDR_PULL_ALLOC_N(ndr, r->out.info, size_info_0);
36234 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
36235 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
36236 0 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
36237 0 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
36238 : }
36239 0 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
36240 0 : NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
36241 : }
36242 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
36243 0 : for (cntr_info_0 = 0; cntr_info_0 < (size_info_0); cntr_info_0++) {
36244 : }
36245 : }
36246 0 : return NDR_ERR_SUCCESS;
36247 : }
36248 :
36249 0 : _PUBLIC_ void ndr_print_spoolss_EnumPerMachineConnections(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumPerMachineConnections *r)
36250 : {
36251 0 : uint32_t cntr_info_2;
36252 0 : ndr_print_struct(ndr, name, "spoolss_EnumPerMachineConnections");
36253 0 : if (r == NULL) { ndr_print_null(ndr); return; }
36254 0 : ndr->depth++;
36255 0 : if (flags & NDR_SET_VALUES) {
36256 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36257 : }
36258 0 : if (flags & NDR_IN) {
36259 0 : ndr_print_struct(ndr, "in", "spoolss_EnumPerMachineConnections");
36260 0 : ndr->depth++;
36261 0 : ndr_print_ptr(ndr, "server", r->in.server);
36262 0 : ndr->depth++;
36263 0 : if (r->in.server) {
36264 0 : ndr_print_string(ndr, "server", r->in.server);
36265 : }
36266 0 : ndr->depth--;
36267 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
36268 0 : ndr->depth++;
36269 0 : if (r->in.buffer) {
36270 0 : ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
36271 : }
36272 0 : ndr->depth--;
36273 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
36274 0 : ndr->depth--;
36275 : }
36276 0 : if (flags & NDR_OUT) {
36277 0 : ndr_print_struct(ndr, "out", "spoolss_EnumPerMachineConnections");
36278 0 : ndr->depth++;
36279 0 : ndr_print_ptr(ndr, "count", r->out.count);
36280 0 : ndr->depth++;
36281 0 : ndr_print_uint32(ndr, "count", *r->out.count);
36282 0 : ndr->depth--;
36283 0 : ndr_print_ptr(ndr, "info", r->out.info);
36284 0 : ndr->depth++;
36285 0 : ndr_print_ptr(ndr, "info", *r->out.info);
36286 0 : ndr->depth++;
36287 0 : if (*r->out.info) {
36288 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(*r->out.count));
36289 0 : ndr->depth++;
36290 0 : for (cntr_info_2 = 0; cntr_info_2 < (*r->out.count); cntr_info_2++) {
36291 0 : ndr_print_spoolss_PrinterInfo4(ndr, "info", &(*r->out.info)[cntr_info_2]);
36292 : }
36293 0 : ndr->depth--;
36294 : }
36295 0 : ndr->depth--;
36296 0 : ndr->depth--;
36297 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
36298 0 : ndr->depth++;
36299 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
36300 0 : ndr->depth--;
36301 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36302 0 : ndr->depth--;
36303 : }
36304 0 : ndr->depth--;
36305 : }
36306 :
36307 0 : static enum ndr_err_code ndr_push_spoolss_XcvData(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_XcvData *r)
36308 : {
36309 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36310 0 : if (flags & NDR_IN) {
36311 0 : if (r->in.handle == NULL) {
36312 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
36313 : }
36314 0 : if (r->in.status_code == NULL) {
36315 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
36316 : }
36317 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
36318 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.function_name, CH_UTF16)));
36319 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
36320 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.function_name, CH_UTF16)));
36321 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.function_name, ndr_charset_length(r->in.function_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
36322 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->in.in_data));
36323 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.in_data.length));
36324 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.out_data_size));
36325 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.status_code));
36326 : }
36327 0 : if (flags & NDR_OUT) {
36328 0 : if (r->out.out_data == NULL) {
36329 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
36330 : }
36331 0 : if (r->out.needed == NULL) {
36332 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
36333 : }
36334 0 : if (r->out.status_code == NULL) {
36335 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
36336 : }
36337 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.out_data_size));
36338 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.out_data, r->in.out_data_size));
36339 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
36340 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.status_code));
36341 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36342 : }
36343 0 : return NDR_ERR_SUCCESS;
36344 : }
36345 :
36346 0 : static enum ndr_err_code ndr_pull_spoolss_XcvData(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_XcvData *r)
36347 : {
36348 0 : uint32_t size_function_name_0 = 0;
36349 0 : uint32_t length_function_name_0 = 0;
36350 0 : uint32_t size_out_data_1 = 0;
36351 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
36352 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
36353 0 : TALLOC_CTX *_mem_save_status_code_0 = NULL;
36354 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36355 0 : if (flags & NDR_IN) {
36356 0 : NDR_ZERO_STRUCT(r->out);
36357 :
36358 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
36359 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
36360 : }
36361 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
36362 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
36363 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
36364 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
36365 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.function_name));
36366 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.function_name));
36367 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.function_name, &size_function_name_0));
36368 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.function_name, &length_function_name_0));
36369 0 : if (length_function_name_0 > size_function_name_0) {
36370 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_function_name_0, length_function_name_0);
36371 : }
36372 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_function_name_0, sizeof(uint16_t)));
36373 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.function_name, length_function_name_0, sizeof(uint16_t), CH_UTF16));
36374 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->in.in_data));
36375 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in._in_data_length));
36376 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.out_data_size));
36377 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
36378 0 : NDR_PULL_ALLOC(ndr, r->in.status_code);
36379 : }
36380 0 : _mem_save_status_code_0 = NDR_PULL_GET_MEM_CTX(ndr);
36381 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.status_code, LIBNDR_FLAG_REF_ALLOC);
36382 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.status_code));
36383 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_code_0, LIBNDR_FLAG_REF_ALLOC);
36384 0 : NDR_PULL_ALLOC_N(ndr, r->out.out_data, r->in.out_data_size);
36385 0 : memset(r->out.out_data, 0, (r->in.out_data_size) * sizeof(*r->out.out_data));
36386 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
36387 0 : NDR_ZERO_STRUCTP(r->out.needed);
36388 0 : NDR_PULL_ALLOC(ndr, r->out.status_code);
36389 0 : *r->out.status_code = *r->in.status_code;
36390 : }
36391 0 : if (flags & NDR_OUT) {
36392 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36393 : if (r->in.handle == NULL) {
36394 : NDR_PULL_ALLOC(ndr, r->in.handle);
36395 : NDR_ZERO_STRUCTP(r->in.handle);
36396 : }
36397 : if (r->in.status_code == NULL) {
36398 : NDR_PULL_ALLOC(ndr, r->in.status_code);
36399 : NDR_ZERO_STRUCTP(r->in.status_code);
36400 : }
36401 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36402 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.out_data));
36403 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.out_data, &size_out_data_1));
36404 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
36405 0 : NDR_PULL_ALLOC_N(ndr, r->out.out_data, size_out_data_1);
36406 : }
36407 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.out_data, size_out_data_1));
36408 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
36409 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
36410 : }
36411 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
36412 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
36413 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
36414 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
36415 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
36416 0 : NDR_PULL_ALLOC(ndr, r->out.status_code);
36417 : }
36418 0 : _mem_save_status_code_0 = NDR_PULL_GET_MEM_CTX(ndr);
36419 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.status_code, LIBNDR_FLAG_REF_ALLOC);
36420 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.status_code));
36421 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_code_0, LIBNDR_FLAG_REF_ALLOC);
36422 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36423 0 : if (r->out.out_data) {
36424 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.out_data, r->in.out_data_size));
36425 : }
36426 : }
36427 0 : return NDR_ERR_SUCCESS;
36428 : }
36429 :
36430 0 : _PUBLIC_ void ndr_print_spoolss_XcvData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_XcvData *r)
36431 : {
36432 0 : ndr_print_struct(ndr, name, "spoolss_XcvData");
36433 0 : if (r == NULL) { ndr_print_null(ndr); return; }
36434 0 : ndr->depth++;
36435 0 : if (flags & NDR_SET_VALUES) {
36436 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36437 : }
36438 0 : if (flags & NDR_IN) {
36439 0 : ndr_print_struct(ndr, "in", "spoolss_XcvData");
36440 0 : ndr->depth++;
36441 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
36442 0 : ndr->depth++;
36443 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
36444 0 : ndr->depth--;
36445 0 : ndr_print_string(ndr, "function_name", r->in.function_name);
36446 0 : ndr_print_DATA_BLOB(ndr, "in_data", r->in.in_data);
36447 0 : ndr_print_uint32(ndr, "_in_data_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->in.in_data.length:r->in._in_data_length);
36448 0 : ndr_print_uint32(ndr, "out_data_size", r->in.out_data_size);
36449 0 : ndr_print_ptr(ndr, "status_code", r->in.status_code);
36450 0 : ndr->depth++;
36451 0 : ndr_print_uint32(ndr, "status_code", *r->in.status_code);
36452 0 : ndr->depth--;
36453 0 : ndr->depth--;
36454 : }
36455 0 : if (flags & NDR_OUT) {
36456 0 : ndr_print_struct(ndr, "out", "spoolss_XcvData");
36457 0 : ndr->depth++;
36458 0 : ndr_print_ptr(ndr, "out_data", r->out.out_data);
36459 0 : ndr->depth++;
36460 0 : ndr_print_array_uint8(ndr, "out_data", r->out.out_data, r->in.out_data_size);
36461 0 : ndr->depth--;
36462 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
36463 0 : ndr->depth++;
36464 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
36465 0 : ndr->depth--;
36466 0 : ndr_print_ptr(ndr, "status_code", r->out.status_code);
36467 0 : ndr->depth++;
36468 0 : ndr_print_uint32(ndr, "status_code", *r->out.status_code);
36469 0 : ndr->depth--;
36470 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36471 0 : ndr->depth--;
36472 : }
36473 0 : ndr->depth--;
36474 : }
36475 :
36476 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_AddPrinterDriverEx(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_AddPrinterDriverEx *r)
36477 : {
36478 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36479 0 : if (flags & NDR_IN) {
36480 0 : if (r->in.info_ctr == NULL) {
36481 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
36482 : }
36483 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
36484 0 : if (r->in.servername) {
36485 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
36486 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
36487 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
36488 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
36489 : }
36490 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
36491 0 : NDR_CHECK(ndr_push_spoolss_AddPrinterDriverExFlags(ndr, NDR_SCALARS, r->in.flags));
36492 : }
36493 0 : if (flags & NDR_OUT) {
36494 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36495 : }
36496 0 : return NDR_ERR_SUCCESS;
36497 : }
36498 :
36499 2 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_AddPrinterDriverEx(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_AddPrinterDriverEx *r)
36500 : {
36501 2 : uint32_t _ptr_servername;
36502 2 : uint32_t size_servername_1 = 0;
36503 2 : uint32_t length_servername_1 = 0;
36504 2 : TALLOC_CTX *_mem_save_servername_0 = NULL;
36505 2 : TALLOC_CTX *_mem_save_info_ctr_0 = NULL;
36506 2 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36507 2 : if (flags & NDR_IN) {
36508 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
36509 2 : if (_ptr_servername) {
36510 2 : NDR_PULL_ALLOC(ndr, r->in.servername);
36511 : } else {
36512 0 : r->in.servername = NULL;
36513 : }
36514 2 : if (r->in.servername) {
36515 2 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
36516 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
36517 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
36518 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
36519 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
36520 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
36521 2 : if (length_servername_1 > size_servername_1) {
36522 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
36523 : }
36524 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
36525 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
36526 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
36527 : }
36528 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
36529 2 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
36530 : }
36531 2 : _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
36532 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
36533 2 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
36534 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
36535 4 : NDR_CHECK(ndr_pull_spoolss_AddPrinterDriverExFlags(ndr, NDR_SCALARS, &r->in.flags));
36536 : }
36537 2 : if (flags & NDR_OUT) {
36538 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36539 : if (r->in.info_ctr == NULL) {
36540 : NDR_PULL_ALLOC(ndr, r->in.info_ctr);
36541 : NDR_ZERO_STRUCTP(r->in.info_ctr);
36542 : }
36543 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36544 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36545 : }
36546 0 : return NDR_ERR_SUCCESS;
36547 : }
36548 :
36549 2 : _PUBLIC_ void ndr_print_spoolss_AddPrinterDriverEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_AddPrinterDriverEx *r)
36550 : {
36551 2 : ndr_print_struct(ndr, name, "spoolss_AddPrinterDriverEx");
36552 2 : if (r == NULL) { ndr_print_null(ndr); return; }
36553 2 : ndr->depth++;
36554 2 : if (flags & NDR_SET_VALUES) {
36555 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36556 : }
36557 2 : if (flags & NDR_IN) {
36558 2 : ndr_print_struct(ndr, "in", "spoolss_AddPrinterDriverEx");
36559 2 : ndr->depth++;
36560 2 : ndr_print_ptr(ndr, "servername", r->in.servername);
36561 2 : ndr->depth++;
36562 2 : if (r->in.servername) {
36563 2 : ndr_print_string(ndr, "servername", r->in.servername);
36564 : }
36565 2 : ndr->depth--;
36566 2 : ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
36567 2 : ndr->depth++;
36568 2 : ndr_print_spoolss_AddDriverInfoCtr(ndr, "info_ctr", r->in.info_ctr);
36569 2 : ndr->depth--;
36570 2 : ndr_print_spoolss_AddPrinterDriverExFlags(ndr, "flags", r->in.flags);
36571 2 : ndr->depth--;
36572 : }
36573 2 : if (flags & NDR_OUT) {
36574 0 : ndr_print_struct(ndr, "out", "spoolss_AddPrinterDriverEx");
36575 0 : ndr->depth++;
36576 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36577 0 : ndr->depth--;
36578 : }
36579 2 : ndr->depth--;
36580 : }
36581 :
36582 0 : static enum ndr_err_code ndr_push_spoolss_5a(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_5a *r)
36583 : {
36584 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36585 0 : if (flags & NDR_IN) {
36586 0 : }
36587 0 : if (flags & NDR_OUT) {
36588 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36589 : }
36590 0 : return NDR_ERR_SUCCESS;
36591 : }
36592 :
36593 0 : static enum ndr_err_code ndr_pull_spoolss_5a(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_5a *r)
36594 : {
36595 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36596 0 : if (flags & NDR_IN) {
36597 0 : }
36598 0 : if (flags & NDR_OUT) {
36599 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36600 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36601 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36602 : }
36603 0 : return NDR_ERR_SUCCESS;
36604 : }
36605 :
36606 0 : _PUBLIC_ void ndr_print_spoolss_5a(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_5a *r)
36607 : {
36608 0 : ndr_print_struct(ndr, name, "spoolss_5a");
36609 0 : if (r == NULL) { ndr_print_null(ndr); return; }
36610 0 : ndr->depth++;
36611 0 : if (flags & NDR_SET_VALUES) {
36612 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36613 : }
36614 0 : if (flags & NDR_IN) {
36615 0 : ndr_print_struct(ndr, "in", "spoolss_5a");
36616 0 : ndr->depth++;
36617 0 : ndr->depth--;
36618 : }
36619 0 : if (flags & NDR_OUT) {
36620 0 : ndr_print_struct(ndr, "out", "spoolss_5a");
36621 0 : ndr->depth++;
36622 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36623 0 : ndr->depth--;
36624 : }
36625 0 : ndr->depth--;
36626 : }
36627 :
36628 0 : static enum ndr_err_code ndr_push_spoolss_5b(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_5b *r)
36629 : {
36630 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36631 0 : if (flags & NDR_IN) {
36632 0 : }
36633 0 : if (flags & NDR_OUT) {
36634 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36635 : }
36636 0 : return NDR_ERR_SUCCESS;
36637 : }
36638 :
36639 0 : static enum ndr_err_code ndr_pull_spoolss_5b(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_5b *r)
36640 : {
36641 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36642 0 : if (flags & NDR_IN) {
36643 0 : }
36644 0 : if (flags & NDR_OUT) {
36645 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36646 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36647 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36648 : }
36649 0 : return NDR_ERR_SUCCESS;
36650 : }
36651 :
36652 0 : _PUBLIC_ void ndr_print_spoolss_5b(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_5b *r)
36653 : {
36654 0 : ndr_print_struct(ndr, name, "spoolss_5b");
36655 0 : if (r == NULL) { ndr_print_null(ndr); return; }
36656 0 : ndr->depth++;
36657 0 : if (flags & NDR_SET_VALUES) {
36658 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36659 : }
36660 0 : if (flags & NDR_IN) {
36661 0 : ndr_print_struct(ndr, "in", "spoolss_5b");
36662 0 : ndr->depth++;
36663 0 : ndr->depth--;
36664 : }
36665 0 : if (flags & NDR_OUT) {
36666 0 : ndr_print_struct(ndr, "out", "spoolss_5b");
36667 0 : ndr->depth++;
36668 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36669 0 : ndr->depth--;
36670 : }
36671 0 : ndr->depth--;
36672 : }
36673 :
36674 0 : static enum ndr_err_code ndr_push_spoolss_5c(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_5c *r)
36675 : {
36676 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36677 0 : if (flags & NDR_IN) {
36678 0 : }
36679 0 : if (flags & NDR_OUT) {
36680 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36681 : }
36682 0 : return NDR_ERR_SUCCESS;
36683 : }
36684 :
36685 0 : static enum ndr_err_code ndr_pull_spoolss_5c(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_5c *r)
36686 : {
36687 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36688 0 : if (flags & NDR_IN) {
36689 0 : }
36690 0 : if (flags & NDR_OUT) {
36691 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36692 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36693 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36694 : }
36695 0 : return NDR_ERR_SUCCESS;
36696 : }
36697 :
36698 0 : _PUBLIC_ void ndr_print_spoolss_5c(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_5c *r)
36699 : {
36700 0 : ndr_print_struct(ndr, name, "spoolss_5c");
36701 0 : if (r == NULL) { ndr_print_null(ndr); return; }
36702 0 : ndr->depth++;
36703 0 : if (flags & NDR_SET_VALUES) {
36704 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36705 : }
36706 0 : if (flags & NDR_IN) {
36707 0 : ndr_print_struct(ndr, "in", "spoolss_5c");
36708 0 : ndr->depth++;
36709 0 : ndr->depth--;
36710 : }
36711 0 : if (flags & NDR_OUT) {
36712 0 : ndr_print_struct(ndr, "out", "spoolss_5c");
36713 0 : ndr->depth++;
36714 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36715 0 : ndr->depth--;
36716 : }
36717 0 : ndr->depth--;
36718 : }
36719 :
36720 0 : static enum ndr_err_code ndr_push_spoolss_5d(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_5d *r)
36721 : {
36722 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36723 0 : if (flags & NDR_IN) {
36724 0 : }
36725 0 : if (flags & NDR_OUT) {
36726 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36727 : }
36728 0 : return NDR_ERR_SUCCESS;
36729 : }
36730 :
36731 0 : static enum ndr_err_code ndr_pull_spoolss_5d(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_5d *r)
36732 : {
36733 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36734 0 : if (flags & NDR_IN) {
36735 0 : }
36736 0 : if (flags & NDR_OUT) {
36737 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36738 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36739 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36740 : }
36741 0 : return NDR_ERR_SUCCESS;
36742 : }
36743 :
36744 0 : _PUBLIC_ void ndr_print_spoolss_5d(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_5d *r)
36745 : {
36746 0 : ndr_print_struct(ndr, name, "spoolss_5d");
36747 0 : if (r == NULL) { ndr_print_null(ndr); return; }
36748 0 : ndr->depth++;
36749 0 : if (flags & NDR_SET_VALUES) {
36750 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36751 : }
36752 0 : if (flags & NDR_IN) {
36753 0 : ndr_print_struct(ndr, "in", "spoolss_5d");
36754 0 : ndr->depth++;
36755 0 : ndr->depth--;
36756 : }
36757 0 : if (flags & NDR_OUT) {
36758 0 : ndr_print_struct(ndr, "out", "spoolss_5d");
36759 0 : ndr->depth++;
36760 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36761 0 : ndr->depth--;
36762 : }
36763 0 : ndr->depth--;
36764 : }
36765 :
36766 0 : static enum ndr_err_code ndr_push_spoolss_5e(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_5e *r)
36767 : {
36768 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36769 0 : if (flags & NDR_IN) {
36770 0 : }
36771 0 : if (flags & NDR_OUT) {
36772 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36773 : }
36774 0 : return NDR_ERR_SUCCESS;
36775 : }
36776 :
36777 0 : static enum ndr_err_code ndr_pull_spoolss_5e(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_5e *r)
36778 : {
36779 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36780 0 : if (flags & NDR_IN) {
36781 0 : }
36782 0 : if (flags & NDR_OUT) {
36783 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36784 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36785 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36786 : }
36787 0 : return NDR_ERR_SUCCESS;
36788 : }
36789 :
36790 0 : _PUBLIC_ void ndr_print_spoolss_5e(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_5e *r)
36791 : {
36792 0 : ndr_print_struct(ndr, name, "spoolss_5e");
36793 0 : if (r == NULL) { ndr_print_null(ndr); return; }
36794 0 : ndr->depth++;
36795 0 : if (flags & NDR_SET_VALUES) {
36796 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36797 : }
36798 0 : if (flags & NDR_IN) {
36799 0 : ndr_print_struct(ndr, "in", "spoolss_5e");
36800 0 : ndr->depth++;
36801 0 : ndr->depth--;
36802 : }
36803 0 : if (flags & NDR_OUT) {
36804 0 : ndr_print_struct(ndr, "out", "spoolss_5e");
36805 0 : ndr->depth++;
36806 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36807 0 : ndr->depth--;
36808 : }
36809 0 : ndr->depth--;
36810 : }
36811 :
36812 0 : static enum ndr_err_code ndr_push_spoolss_5f(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_5f *r)
36813 : {
36814 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36815 0 : if (flags & NDR_IN) {
36816 0 : }
36817 0 : if (flags & NDR_OUT) {
36818 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36819 : }
36820 0 : return NDR_ERR_SUCCESS;
36821 : }
36822 :
36823 0 : static enum ndr_err_code ndr_pull_spoolss_5f(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_5f *r)
36824 : {
36825 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36826 0 : if (flags & NDR_IN) {
36827 0 : }
36828 0 : if (flags & NDR_OUT) {
36829 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36830 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36831 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36832 : }
36833 0 : return NDR_ERR_SUCCESS;
36834 : }
36835 :
36836 0 : _PUBLIC_ void ndr_print_spoolss_5f(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_5f *r)
36837 : {
36838 0 : ndr_print_struct(ndr, name, "spoolss_5f");
36839 0 : if (r == NULL) { ndr_print_null(ndr); return; }
36840 0 : ndr->depth++;
36841 0 : if (flags & NDR_SET_VALUES) {
36842 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36843 : }
36844 0 : if (flags & NDR_IN) {
36845 0 : ndr_print_struct(ndr, "in", "spoolss_5f");
36846 0 : ndr->depth++;
36847 0 : ndr->depth--;
36848 : }
36849 0 : if (flags & NDR_OUT) {
36850 0 : ndr_print_struct(ndr, "out", "spoolss_5f");
36851 0 : ndr->depth++;
36852 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36853 0 : ndr->depth--;
36854 : }
36855 0 : ndr->depth--;
36856 : }
36857 :
36858 0 : static enum ndr_err_code ndr_push_spoolss_60(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_60 *r)
36859 : {
36860 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36861 0 : if (flags & NDR_IN) {
36862 0 : }
36863 0 : if (flags & NDR_OUT) {
36864 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36865 : }
36866 0 : return NDR_ERR_SUCCESS;
36867 : }
36868 :
36869 0 : static enum ndr_err_code ndr_pull_spoolss_60(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_60 *r)
36870 : {
36871 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36872 0 : if (flags & NDR_IN) {
36873 0 : }
36874 0 : if (flags & NDR_OUT) {
36875 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36876 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36877 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
36878 : }
36879 0 : return NDR_ERR_SUCCESS;
36880 : }
36881 :
36882 0 : _PUBLIC_ void ndr_print_spoolss_60(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_60 *r)
36883 : {
36884 0 : ndr_print_struct(ndr, name, "spoolss_60");
36885 0 : if (r == NULL) { ndr_print_null(ndr); return; }
36886 0 : ndr->depth++;
36887 0 : if (flags & NDR_SET_VALUES) {
36888 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36889 : }
36890 0 : if (flags & NDR_IN) {
36891 0 : ndr_print_struct(ndr, "in", "spoolss_60");
36892 0 : ndr->depth++;
36893 0 : ndr->depth--;
36894 : }
36895 0 : if (flags & NDR_OUT) {
36896 0 : ndr_print_struct(ndr, "out", "spoolss_60");
36897 0 : ndr->depth++;
36898 0 : ndr_print_WERROR(ndr, "result", r->out.result);
36899 0 : ndr->depth--;
36900 : }
36901 0 : ndr->depth--;
36902 : }
36903 :
36904 0 : static enum ndr_err_code ndr_push_spoolss_SendRecvBidiData(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_SendRecvBidiData *r)
36905 : {
36906 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
36907 0 : if (flags & NDR_IN) {
36908 0 : if (r->in.pReqData == NULL) {
36909 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
36910 : }
36911 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
36912 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pAction));
36913 0 : if (r->in.pAction) {
36914 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pAction, CH_UTF16)));
36915 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
36916 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pAction, CH_UTF16)));
36917 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pAction, ndr_charset_length(r->in.pAction, CH_UTF16), sizeof(uint16_t), CH_UTF16));
36918 : }
36919 0 : NDR_CHECK(ndr_push_RPC_BIDI_REQUEST_CONTAINER(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pReqData));
36920 : }
36921 0 : if (flags & NDR_OUT) {
36922 0 : if (r->out.ppRespData == NULL) {
36923 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
36924 : }
36925 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ppRespData));
36926 0 : if (*r->out.ppRespData) {
36927 0 : NDR_CHECK(ndr_push_RPC_BIDI_RESPONSE_CONTAINER(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ppRespData));
36928 : }
36929 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
36930 : }
36931 0 : return NDR_ERR_SUCCESS;
36932 : }
36933 :
36934 0 : static enum ndr_err_code ndr_pull_spoolss_SendRecvBidiData(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_SendRecvBidiData *r)
36935 : {
36936 0 : uint32_t _ptr_pAction;
36937 0 : uint32_t size_pAction_1 = 0;
36938 0 : uint32_t length_pAction_1 = 0;
36939 0 : uint32_t _ptr_ppRespData;
36940 0 : TALLOC_CTX *_mem_save_pAction_0 = NULL;
36941 0 : TALLOC_CTX *_mem_save_pReqData_0 = NULL;
36942 0 : TALLOC_CTX *_mem_save_ppRespData_0 = NULL;
36943 0 : TALLOC_CTX *_mem_save_ppRespData_1 = NULL;
36944 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
36945 0 : if (flags & NDR_IN) {
36946 0 : NDR_ZERO_STRUCT(r->out);
36947 :
36948 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
36949 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pAction));
36950 0 : if (_ptr_pAction) {
36951 0 : NDR_PULL_ALLOC(ndr, r->in.pAction);
36952 : } else {
36953 0 : r->in.pAction = NULL;
36954 : }
36955 0 : if (r->in.pAction) {
36956 0 : _mem_save_pAction_0 = NDR_PULL_GET_MEM_CTX(ndr);
36957 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pAction, 0);
36958 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pAction));
36959 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pAction));
36960 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pAction, &size_pAction_1));
36961 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pAction, &length_pAction_1));
36962 0 : if (length_pAction_1 > size_pAction_1) {
36963 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pAction_1, length_pAction_1);
36964 : }
36965 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pAction_1, sizeof(uint16_t)));
36966 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pAction, length_pAction_1, sizeof(uint16_t), CH_UTF16));
36967 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pAction_0, 0);
36968 : }
36969 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
36970 0 : NDR_PULL_ALLOC(ndr, r->in.pReqData);
36971 : }
36972 0 : _mem_save_pReqData_0 = NDR_PULL_GET_MEM_CTX(ndr);
36973 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pReqData, LIBNDR_FLAG_REF_ALLOC);
36974 0 : NDR_CHECK(ndr_pull_RPC_BIDI_REQUEST_CONTAINER(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pReqData));
36975 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReqData_0, LIBNDR_FLAG_REF_ALLOC);
36976 0 : NDR_PULL_ALLOC(ndr, r->out.ppRespData);
36977 0 : NDR_ZERO_STRUCTP(r->out.ppRespData);
36978 : }
36979 0 : if (flags & NDR_OUT) {
36980 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
36981 : if (r->in.pReqData == NULL) {
36982 : NDR_PULL_ALLOC(ndr, r->in.pReqData);
36983 : NDR_ZERO_STRUCTP(r->in.pReqData);
36984 : }
36985 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
36986 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
36987 0 : NDR_PULL_ALLOC(ndr, r->out.ppRespData);
36988 : }
36989 0 : _mem_save_ppRespData_0 = NDR_PULL_GET_MEM_CTX(ndr);
36990 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppRespData, LIBNDR_FLAG_REF_ALLOC);
36991 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ppRespData));
36992 0 : if (_ptr_ppRespData) {
36993 0 : NDR_PULL_ALLOC(ndr, *r->out.ppRespData);
36994 : } else {
36995 0 : *r->out.ppRespData = NULL;
36996 : }
36997 0 : if (*r->out.ppRespData) {
36998 0 : _mem_save_ppRespData_1 = NDR_PULL_GET_MEM_CTX(ndr);
36999 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ppRespData, 0);
37000 0 : NDR_CHECK(ndr_pull_RPC_BIDI_RESPONSE_CONTAINER(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ppRespData));
37001 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppRespData_1, 0);
37002 : }
37003 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppRespData_0, LIBNDR_FLAG_REF_ALLOC);
37004 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37005 : }
37006 0 : return NDR_ERR_SUCCESS;
37007 : }
37008 :
37009 0 : _PUBLIC_ void ndr_print_spoolss_SendRecvBidiData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_SendRecvBidiData *r)
37010 : {
37011 0 : ndr_print_struct(ndr, name, "spoolss_SendRecvBidiData");
37012 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37013 0 : ndr->depth++;
37014 0 : if (flags & NDR_SET_VALUES) {
37015 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37016 : }
37017 0 : if (flags & NDR_IN) {
37018 0 : ndr_print_struct(ndr, "in", "spoolss_SendRecvBidiData");
37019 0 : ndr->depth++;
37020 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
37021 0 : ndr_print_ptr(ndr, "pAction", r->in.pAction);
37022 0 : ndr->depth++;
37023 0 : if (r->in.pAction) {
37024 0 : ndr_print_string(ndr, "pAction", r->in.pAction);
37025 : }
37026 0 : ndr->depth--;
37027 0 : ndr_print_ptr(ndr, "pReqData", r->in.pReqData);
37028 0 : ndr->depth++;
37029 0 : ndr_print_RPC_BIDI_REQUEST_CONTAINER(ndr, "pReqData", r->in.pReqData);
37030 0 : ndr->depth--;
37031 0 : ndr->depth--;
37032 : }
37033 0 : if (flags & NDR_OUT) {
37034 0 : ndr_print_struct(ndr, "out", "spoolss_SendRecvBidiData");
37035 0 : ndr->depth++;
37036 0 : ndr_print_ptr(ndr, "ppRespData", r->out.ppRespData);
37037 0 : ndr->depth++;
37038 0 : ndr_print_ptr(ndr, "ppRespData", *r->out.ppRespData);
37039 0 : ndr->depth++;
37040 0 : if (*r->out.ppRespData) {
37041 0 : ndr_print_RPC_BIDI_RESPONSE_CONTAINER(ndr, "ppRespData", *r->out.ppRespData);
37042 : }
37043 0 : ndr->depth--;
37044 0 : ndr->depth--;
37045 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37046 0 : ndr->depth--;
37047 : }
37048 0 : ndr->depth--;
37049 : }
37050 :
37051 0 : static enum ndr_err_code ndr_push_spoolss_62(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_62 *r)
37052 : {
37053 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37054 0 : if (flags & NDR_IN) {
37055 0 : }
37056 0 : if (flags & NDR_OUT) {
37057 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37058 : }
37059 0 : return NDR_ERR_SUCCESS;
37060 : }
37061 :
37062 0 : static enum ndr_err_code ndr_pull_spoolss_62(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_62 *r)
37063 : {
37064 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37065 0 : if (flags & NDR_IN) {
37066 0 : }
37067 0 : if (flags & NDR_OUT) {
37068 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37069 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37070 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37071 : }
37072 0 : return NDR_ERR_SUCCESS;
37073 : }
37074 :
37075 0 : _PUBLIC_ void ndr_print_spoolss_62(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_62 *r)
37076 : {
37077 0 : ndr_print_struct(ndr, name, "spoolss_62");
37078 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37079 0 : ndr->depth++;
37080 0 : if (flags & NDR_SET_VALUES) {
37081 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37082 : }
37083 0 : if (flags & NDR_IN) {
37084 0 : ndr_print_struct(ndr, "in", "spoolss_62");
37085 0 : ndr->depth++;
37086 0 : ndr->depth--;
37087 : }
37088 0 : if (flags & NDR_OUT) {
37089 0 : ndr_print_struct(ndr, "out", "spoolss_62");
37090 0 : ndr->depth++;
37091 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37092 0 : ndr->depth--;
37093 : }
37094 0 : ndr->depth--;
37095 : }
37096 :
37097 0 : static enum ndr_err_code ndr_push_spoolss_63(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_63 *r)
37098 : {
37099 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37100 0 : if (flags & NDR_IN) {
37101 0 : }
37102 0 : if (flags & NDR_OUT) {
37103 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37104 : }
37105 0 : return NDR_ERR_SUCCESS;
37106 : }
37107 :
37108 0 : static enum ndr_err_code ndr_pull_spoolss_63(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_63 *r)
37109 : {
37110 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37111 0 : if (flags & NDR_IN) {
37112 0 : }
37113 0 : if (flags & NDR_OUT) {
37114 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37115 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37116 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37117 : }
37118 0 : return NDR_ERR_SUCCESS;
37119 : }
37120 :
37121 0 : _PUBLIC_ void ndr_print_spoolss_63(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_63 *r)
37122 : {
37123 0 : ndr_print_struct(ndr, name, "spoolss_63");
37124 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37125 0 : ndr->depth++;
37126 0 : if (flags & NDR_SET_VALUES) {
37127 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37128 : }
37129 0 : if (flags & NDR_IN) {
37130 0 : ndr_print_struct(ndr, "in", "spoolss_63");
37131 0 : ndr->depth++;
37132 0 : ndr->depth--;
37133 : }
37134 0 : if (flags & NDR_OUT) {
37135 0 : ndr_print_struct(ndr, "out", "spoolss_63");
37136 0 : ndr->depth++;
37137 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37138 0 : ndr->depth--;
37139 : }
37140 0 : ndr->depth--;
37141 : }
37142 :
37143 0 : static enum ndr_err_code ndr_push_spoolss_64(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_64 *r)
37144 : {
37145 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37146 0 : if (flags & NDR_IN) {
37147 0 : }
37148 0 : if (flags & NDR_OUT) {
37149 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37150 : }
37151 0 : return NDR_ERR_SUCCESS;
37152 : }
37153 :
37154 0 : static enum ndr_err_code ndr_pull_spoolss_64(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_64 *r)
37155 : {
37156 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37157 0 : if (flags & NDR_IN) {
37158 0 : }
37159 0 : if (flags & NDR_OUT) {
37160 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37161 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37162 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37163 : }
37164 0 : return NDR_ERR_SUCCESS;
37165 : }
37166 :
37167 0 : _PUBLIC_ void ndr_print_spoolss_64(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_64 *r)
37168 : {
37169 0 : ndr_print_struct(ndr, name, "spoolss_64");
37170 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37171 0 : ndr->depth++;
37172 0 : if (flags & NDR_SET_VALUES) {
37173 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37174 : }
37175 0 : if (flags & NDR_IN) {
37176 0 : ndr_print_struct(ndr, "in", "spoolss_64");
37177 0 : ndr->depth++;
37178 0 : ndr->depth--;
37179 : }
37180 0 : if (flags & NDR_OUT) {
37181 0 : ndr_print_struct(ndr, "out", "spoolss_64");
37182 0 : ndr->depth++;
37183 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37184 0 : ndr->depth--;
37185 : }
37186 0 : ndr->depth--;
37187 : }
37188 :
37189 0 : static enum ndr_err_code ndr_push_spoolss_65(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_65 *r)
37190 : {
37191 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37192 0 : if (flags & NDR_IN) {
37193 0 : }
37194 0 : if (flags & NDR_OUT) {
37195 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37196 : }
37197 0 : return NDR_ERR_SUCCESS;
37198 : }
37199 :
37200 0 : static enum ndr_err_code ndr_pull_spoolss_65(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_65 *r)
37201 : {
37202 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37203 0 : if (flags & NDR_IN) {
37204 0 : }
37205 0 : if (flags & NDR_OUT) {
37206 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37207 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37208 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37209 : }
37210 0 : return NDR_ERR_SUCCESS;
37211 : }
37212 :
37213 0 : _PUBLIC_ void ndr_print_spoolss_65(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_65 *r)
37214 : {
37215 0 : ndr_print_struct(ndr, name, "spoolss_65");
37216 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37217 0 : ndr->depth++;
37218 0 : if (flags & NDR_SET_VALUES) {
37219 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37220 : }
37221 0 : if (flags & NDR_IN) {
37222 0 : ndr_print_struct(ndr, "in", "spoolss_65");
37223 0 : ndr->depth++;
37224 0 : ndr->depth--;
37225 : }
37226 0 : if (flags & NDR_OUT) {
37227 0 : ndr_print_struct(ndr, "out", "spoolss_65");
37228 0 : ndr->depth++;
37229 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37230 0 : ndr->depth--;
37231 : }
37232 0 : ndr->depth--;
37233 : }
37234 :
37235 8 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_GetCorePrinterDrivers(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetCorePrinterDrivers *r)
37236 : {
37237 0 : uint32_t cntr_core_driver_dependencies_1;
37238 0 : uint32_t cntr_core_printer_drivers_1;
37239 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37240 8 : if (flags & NDR_IN) {
37241 8 : if (r->in.architecture == NULL) {
37242 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
37243 : }
37244 8 : if (r->in.core_driver_dependencies == NULL) {
37245 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
37246 : }
37247 8 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
37248 8 : if (r->in.servername) {
37249 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
37250 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
37251 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
37252 8 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
37253 : }
37254 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
37255 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
37256 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
37257 8 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
37258 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.core_driver_size));
37259 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.core_driver_size));
37260 8 : for (cntr_core_driver_dependencies_1 = 0; cntr_core_driver_dependencies_1 < (r->in.core_driver_size); cntr_core_driver_dependencies_1++) {
37261 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.core_driver_dependencies[cntr_core_driver_dependencies_1]));
37262 : }
37263 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.core_printer_driver_count));
37264 : }
37265 8 : if (flags & NDR_OUT) {
37266 0 : if (r->out.core_printer_drivers == NULL) {
37267 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
37268 : }
37269 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.core_printer_driver_count));
37270 0 : for (cntr_core_printer_drivers_1 = 0; cntr_core_printer_drivers_1 < (r->in.core_printer_driver_count); cntr_core_printer_drivers_1++) {
37271 0 : NDR_CHECK(ndr_push_spoolss_CorePrinterDriver(ndr, NDR_SCALARS, &r->out.core_printer_drivers[cntr_core_printer_drivers_1]));
37272 : }
37273 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
37274 : }
37275 8 : return NDR_ERR_SUCCESS;
37276 : }
37277 :
37278 22 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_GetCorePrinterDrivers(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetCorePrinterDrivers *r)
37279 : {
37280 14 : uint32_t _ptr_servername;
37281 22 : uint32_t size_servername_1 = 0;
37282 22 : uint32_t length_servername_1 = 0;
37283 22 : uint32_t size_architecture_1 = 0;
37284 22 : uint32_t length_architecture_1 = 0;
37285 22 : uint32_t size_core_driver_dependencies_1 = 0;
37286 14 : uint32_t cntr_core_driver_dependencies_1;
37287 22 : uint32_t size_core_printer_drivers_1 = 0;
37288 14 : uint32_t cntr_core_printer_drivers_1;
37289 22 : TALLOC_CTX *_mem_save_servername_0 = NULL;
37290 22 : TALLOC_CTX *_mem_save_core_driver_dependencies_1 = NULL;
37291 22 : TALLOC_CTX *_mem_save_core_printer_drivers_1 = NULL;
37292 22 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37293 22 : if (flags & NDR_IN) {
37294 18 : NDR_ZERO_STRUCT(r->out);
37295 :
37296 18 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
37297 18 : if (_ptr_servername) {
37298 18 : NDR_PULL_ALLOC(ndr, r->in.servername);
37299 : } else {
37300 0 : r->in.servername = NULL;
37301 : }
37302 18 : if (r->in.servername) {
37303 18 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
37304 18 : NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
37305 18 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
37306 18 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
37307 18 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
37308 18 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
37309 18 : if (length_servername_1 > size_servername_1) {
37310 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
37311 : }
37312 18 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
37313 18 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
37314 18 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
37315 : }
37316 18 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
37317 18 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
37318 18 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.architecture, &size_architecture_1));
37319 18 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.architecture, &length_architecture_1));
37320 18 : if (length_architecture_1 > size_architecture_1) {
37321 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_1, length_architecture_1);
37322 : }
37323 18 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_1, sizeof(uint16_t)));
37324 18 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, length_architecture_1, sizeof(uint16_t), CH_UTF16));
37325 18 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.core_driver_size));
37326 18 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.core_driver_dependencies));
37327 18 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.core_driver_dependencies, &size_core_driver_dependencies_1));
37328 18 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
37329 18 : NDR_PULL_ALLOC_N(ndr, r->in.core_driver_dependencies, size_core_driver_dependencies_1);
37330 : }
37331 18 : _mem_save_core_driver_dependencies_1 = NDR_PULL_GET_MEM_CTX(ndr);
37332 18 : NDR_PULL_SET_MEM_CTX(ndr, r->in.core_driver_dependencies, 0);
37333 548 : for (cntr_core_driver_dependencies_1 = 0; cntr_core_driver_dependencies_1 < (size_core_driver_dependencies_1); cntr_core_driver_dependencies_1++) {
37334 530 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.core_driver_dependencies[cntr_core_driver_dependencies_1]));
37335 : }
37336 18 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_core_driver_dependencies_1, 0);
37337 18 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.core_printer_driver_count));
37338 18 : NDR_PULL_ALLOC_N(ndr, r->out.core_printer_drivers, r->in.core_printer_driver_count);
37339 18 : memset(r->out.core_printer_drivers, 0, (r->in.core_printer_driver_count) * sizeof(*r->out.core_printer_drivers));
37340 18 : if (r->in.core_driver_dependencies) {
37341 18 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.core_driver_dependencies, r->in.core_driver_size));
37342 : }
37343 : }
37344 22 : if (flags & NDR_OUT) {
37345 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37346 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37347 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.core_printer_drivers));
37348 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.core_printer_drivers, &size_core_printer_drivers_1));
37349 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
37350 4 : NDR_PULL_ALLOC_N(ndr, r->out.core_printer_drivers, size_core_printer_drivers_1);
37351 : }
37352 4 : _mem_save_core_printer_drivers_1 = NDR_PULL_GET_MEM_CTX(ndr);
37353 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.core_printer_drivers, 0);
37354 8 : for (cntr_core_printer_drivers_1 = 0; cntr_core_printer_drivers_1 < (size_core_printer_drivers_1); cntr_core_printer_drivers_1++) {
37355 4 : NDR_CHECK(ndr_pull_spoolss_CorePrinterDriver(ndr, NDR_SCALARS, &r->out.core_printer_drivers[cntr_core_printer_drivers_1]));
37356 : }
37357 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_core_printer_drivers_1, 0);
37358 4 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
37359 4 : if (r->out.core_printer_drivers) {
37360 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.core_printer_drivers, r->in.core_printer_driver_count));
37361 : }
37362 : }
37363 8 : return NDR_ERR_SUCCESS;
37364 : }
37365 :
37366 14 : _PUBLIC_ void ndr_print_spoolss_GetCorePrinterDrivers(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetCorePrinterDrivers *r)
37367 : {
37368 14 : uint32_t cntr_core_driver_dependencies_1;
37369 14 : uint32_t cntr_core_printer_drivers_1;
37370 14 : ndr_print_struct(ndr, name, "spoolss_GetCorePrinterDrivers");
37371 14 : if (r == NULL) { ndr_print_null(ndr); return; }
37372 14 : ndr->depth++;
37373 14 : if (flags & NDR_SET_VALUES) {
37374 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37375 : }
37376 14 : if (flags & NDR_IN) {
37377 10 : ndr_print_struct(ndr, "in", "spoolss_GetCorePrinterDrivers");
37378 10 : ndr->depth++;
37379 10 : ndr_print_ptr(ndr, "servername", r->in.servername);
37380 10 : ndr->depth++;
37381 10 : if (r->in.servername) {
37382 10 : ndr_print_string(ndr, "servername", r->in.servername);
37383 : }
37384 10 : ndr->depth--;
37385 10 : ndr_print_ptr(ndr, "architecture", r->in.architecture);
37386 10 : ndr->depth++;
37387 10 : ndr_print_string(ndr, "architecture", r->in.architecture);
37388 10 : ndr->depth--;
37389 10 : ndr_print_uint32(ndr, "core_driver_size", r->in.core_driver_size);
37390 10 : ndr_print_ptr(ndr, "core_driver_dependencies", r->in.core_driver_dependencies);
37391 10 : ndr->depth++;
37392 10 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "core_driver_dependencies", (uint32_t)(r->in.core_driver_size));
37393 10 : ndr->depth++;
37394 540 : for (cntr_core_driver_dependencies_1 = 0; cntr_core_driver_dependencies_1 < (r->in.core_driver_size); cntr_core_driver_dependencies_1++) {
37395 530 : ndr_print_uint16(ndr, "core_driver_dependencies", r->in.core_driver_dependencies[cntr_core_driver_dependencies_1]);
37396 : }
37397 10 : ndr->depth--;
37398 10 : ndr->depth--;
37399 10 : ndr_print_uint32(ndr, "core_printer_driver_count", r->in.core_printer_driver_count);
37400 10 : ndr->depth--;
37401 : }
37402 14 : if (flags & NDR_OUT) {
37403 4 : ndr_print_struct(ndr, "out", "spoolss_GetCorePrinterDrivers");
37404 4 : ndr->depth++;
37405 4 : ndr_print_ptr(ndr, "core_printer_drivers", r->out.core_printer_drivers);
37406 4 : ndr->depth++;
37407 4 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "core_printer_drivers", (uint32_t)(r->in.core_printer_driver_count));
37408 4 : ndr->depth++;
37409 8 : for (cntr_core_printer_drivers_1 = 0; cntr_core_printer_drivers_1 < (r->in.core_printer_driver_count); cntr_core_printer_drivers_1++) {
37410 4 : ndr_print_spoolss_CorePrinterDriver(ndr, "core_printer_drivers", &r->out.core_printer_drivers[cntr_core_printer_drivers_1]);
37411 : }
37412 4 : ndr->depth--;
37413 4 : ndr->depth--;
37414 4 : ndr_print_HRESULT(ndr, "result", r->out.result);
37415 4 : ndr->depth--;
37416 : }
37417 14 : ndr->depth--;
37418 : }
37419 :
37420 0 : static enum ndr_err_code ndr_push_spoolss_67(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_67 *r)
37421 : {
37422 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37423 0 : if (flags & NDR_IN) {
37424 0 : }
37425 0 : if (flags & NDR_OUT) {
37426 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37427 : }
37428 0 : return NDR_ERR_SUCCESS;
37429 : }
37430 :
37431 0 : static enum ndr_err_code ndr_pull_spoolss_67(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_67 *r)
37432 : {
37433 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37434 0 : if (flags & NDR_IN) {
37435 0 : }
37436 0 : if (flags & NDR_OUT) {
37437 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37438 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37439 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37440 : }
37441 0 : return NDR_ERR_SUCCESS;
37442 : }
37443 :
37444 0 : _PUBLIC_ void ndr_print_spoolss_67(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_67 *r)
37445 : {
37446 0 : ndr_print_struct(ndr, name, "spoolss_67");
37447 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37448 0 : ndr->depth++;
37449 0 : if (flags & NDR_SET_VALUES) {
37450 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37451 : }
37452 0 : if (flags & NDR_IN) {
37453 0 : ndr_print_struct(ndr, "in", "spoolss_67");
37454 0 : ndr->depth++;
37455 0 : ndr->depth--;
37456 : }
37457 0 : if (flags & NDR_OUT) {
37458 0 : ndr_print_struct(ndr, "out", "spoolss_67");
37459 0 : ndr->depth++;
37460 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37461 0 : ndr->depth--;
37462 : }
37463 0 : ndr->depth--;
37464 : }
37465 :
37466 4 : static enum ndr_err_code ndr_push_spoolss_GetPrinterDriverPackagePath(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetPrinterDriverPackagePath *r)
37467 : {
37468 4 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37469 4 : if (flags & NDR_IN) {
37470 4 : if (r->in.architecture == NULL) {
37471 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
37472 : }
37473 4 : if (r->in.package_id == NULL) {
37474 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
37475 : }
37476 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
37477 4 : if (r->in.servername) {
37478 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
37479 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
37480 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
37481 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
37482 : }
37483 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
37484 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
37485 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
37486 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
37487 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.language));
37488 4 : if (r->in.language) {
37489 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.language, CH_UTF16)));
37490 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
37491 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.language, CH_UTF16)));
37492 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.language, ndr_charset_length(r->in.language, CH_UTF16), sizeof(uint16_t), CH_UTF16));
37493 : }
37494 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.package_id, CH_UTF16)));
37495 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
37496 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.package_id, CH_UTF16)));
37497 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.package_id, ndr_charset_length(r->in.package_id, CH_UTF16), sizeof(uint16_t), CH_UTF16));
37498 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.driver_package_cab));
37499 4 : if (r->in.driver_package_cab) {
37500 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.driver_package_cab_size));
37501 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.driver_package_cab, r->in.driver_package_cab_size, sizeof(uint16_t), CH_UTF16));
37502 : }
37503 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.driver_package_cab_size));
37504 : }
37505 4 : if (flags & NDR_OUT) {
37506 0 : if (r->out.required == NULL) {
37507 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
37508 : }
37509 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.driver_package_cab));
37510 0 : if (r->out.driver_package_cab) {
37511 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.driver_package_cab_size));
37512 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->out.driver_package_cab, r->in.driver_package_cab_size, sizeof(uint16_t), CH_UTF16));
37513 : }
37514 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.required));
37515 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
37516 : }
37517 4 : return NDR_ERR_SUCCESS;
37518 : }
37519 :
37520 4 : static enum ndr_err_code ndr_pull_spoolss_GetPrinterDriverPackagePath(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetPrinterDriverPackagePath *r)
37521 : {
37522 0 : uint32_t _ptr_servername;
37523 4 : uint32_t size_servername_1 = 0;
37524 4 : uint32_t length_servername_1 = 0;
37525 4 : uint32_t size_architecture_1 = 0;
37526 4 : uint32_t length_architecture_1 = 0;
37527 0 : uint32_t _ptr_language;
37528 4 : uint32_t size_language_1 = 0;
37529 4 : uint32_t length_language_1 = 0;
37530 4 : uint32_t size_package_id_1 = 0;
37531 4 : uint32_t length_package_id_1 = 0;
37532 0 : uint32_t _ptr_driver_package_cab;
37533 4 : uint32_t size_driver_package_cab_1 = 0;
37534 4 : TALLOC_CTX *_mem_save_servername_0 = NULL;
37535 4 : TALLOC_CTX *_mem_save_language_0 = NULL;
37536 4 : TALLOC_CTX *_mem_save_driver_package_cab_0 = NULL;
37537 4 : TALLOC_CTX *_mem_save_required_0 = NULL;
37538 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37539 4 : if (flags & NDR_IN) {
37540 4 : NDR_ZERO_STRUCT(r->out);
37541 :
37542 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
37543 4 : if (_ptr_servername) {
37544 4 : NDR_PULL_ALLOC(ndr, r->in.servername);
37545 : } else {
37546 0 : r->in.servername = NULL;
37547 : }
37548 4 : if (r->in.servername) {
37549 4 : _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
37550 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
37551 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
37552 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
37553 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
37554 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
37555 4 : if (length_servername_1 > size_servername_1) {
37556 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
37557 : }
37558 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
37559 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
37560 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
37561 : }
37562 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
37563 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
37564 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.architecture, &size_architecture_1));
37565 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.architecture, &length_architecture_1));
37566 4 : if (length_architecture_1 > size_architecture_1) {
37567 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_architecture_1, length_architecture_1);
37568 : }
37569 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_architecture_1, sizeof(uint16_t)));
37570 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, length_architecture_1, sizeof(uint16_t), CH_UTF16));
37571 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_language));
37572 4 : if (_ptr_language) {
37573 0 : NDR_PULL_ALLOC(ndr, r->in.language);
37574 : } else {
37575 4 : r->in.language = NULL;
37576 : }
37577 4 : if (r->in.language) {
37578 0 : _mem_save_language_0 = NDR_PULL_GET_MEM_CTX(ndr);
37579 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.language, 0);
37580 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.language));
37581 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.language));
37582 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.language, &size_language_1));
37583 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.language, &length_language_1));
37584 0 : if (length_language_1 > size_language_1) {
37585 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_language_1, length_language_1);
37586 : }
37587 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_language_1, sizeof(uint16_t)));
37588 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.language, length_language_1, sizeof(uint16_t), CH_UTF16));
37589 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_language_0, 0);
37590 : }
37591 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.package_id));
37592 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.package_id));
37593 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.package_id, &size_package_id_1));
37594 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.package_id, &length_package_id_1));
37595 4 : if (length_package_id_1 > size_package_id_1) {
37596 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_package_id_1, length_package_id_1);
37597 : }
37598 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_package_id_1, sizeof(uint16_t)));
37599 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.package_id, length_package_id_1, sizeof(uint16_t), CH_UTF16));
37600 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_package_cab));
37601 4 : if (_ptr_driver_package_cab) {
37602 0 : NDR_PULL_ALLOC(ndr, r->in.driver_package_cab);
37603 : } else {
37604 4 : r->in.driver_package_cab = NULL;
37605 : }
37606 4 : if (r->in.driver_package_cab) {
37607 0 : _mem_save_driver_package_cab_0 = NDR_PULL_GET_MEM_CTX(ndr);
37608 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.driver_package_cab, 0);
37609 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.driver_package_cab));
37610 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.driver_package_cab, &size_driver_package_cab_1));
37611 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.driver_package_cab, size_driver_package_cab_1, sizeof(uint16_t), CH_UTF16));
37612 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_package_cab_0, 0);
37613 : }
37614 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.driver_package_cab_size));
37615 4 : NDR_PULL_ALLOC(ndr, r->out.required);
37616 4 : NDR_ZERO_STRUCTP(r->out.required);
37617 4 : if (r->in.driver_package_cab) {
37618 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.driver_package_cab, r->in.driver_package_cab_size));
37619 : }
37620 : }
37621 4 : if (flags & NDR_OUT) {
37622 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37623 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37624 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_package_cab));
37625 0 : if (_ptr_driver_package_cab) {
37626 0 : NDR_PULL_ALLOC(ndr, r->out.driver_package_cab);
37627 : } else {
37628 0 : r->out.driver_package_cab = NULL;
37629 : }
37630 0 : if (r->out.driver_package_cab) {
37631 0 : _mem_save_driver_package_cab_0 = NDR_PULL_GET_MEM_CTX(ndr);
37632 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.driver_package_cab, 0);
37633 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.driver_package_cab));
37634 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.driver_package_cab, &size_driver_package_cab_1));
37635 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->out.driver_package_cab, size_driver_package_cab_1, sizeof(uint16_t), CH_UTF16));
37636 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_package_cab_0, 0);
37637 : }
37638 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
37639 0 : NDR_PULL_ALLOC(ndr, r->out.required);
37640 : }
37641 0 : _mem_save_required_0 = NDR_PULL_GET_MEM_CTX(ndr);
37642 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.required, LIBNDR_FLAG_REF_ALLOC);
37643 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.required));
37644 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_required_0, LIBNDR_FLAG_REF_ALLOC);
37645 0 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
37646 0 : if (r->out.driver_package_cab) {
37647 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.driver_package_cab, r->in.driver_package_cab_size));
37648 : }
37649 : }
37650 4 : return NDR_ERR_SUCCESS;
37651 : }
37652 :
37653 0 : _PUBLIC_ void ndr_print_spoolss_GetPrinterDriverPackagePath(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetPrinterDriverPackagePath *r)
37654 : {
37655 0 : ndr_print_struct(ndr, name, "spoolss_GetPrinterDriverPackagePath");
37656 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37657 0 : ndr->depth++;
37658 0 : if (flags & NDR_SET_VALUES) {
37659 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37660 : }
37661 0 : if (flags & NDR_IN) {
37662 0 : ndr_print_struct(ndr, "in", "spoolss_GetPrinterDriverPackagePath");
37663 0 : ndr->depth++;
37664 0 : ndr_print_ptr(ndr, "servername", r->in.servername);
37665 0 : ndr->depth++;
37666 0 : if (r->in.servername) {
37667 0 : ndr_print_string(ndr, "servername", r->in.servername);
37668 : }
37669 0 : ndr->depth--;
37670 0 : ndr_print_ptr(ndr, "architecture", r->in.architecture);
37671 0 : ndr->depth++;
37672 0 : ndr_print_string(ndr, "architecture", r->in.architecture);
37673 0 : ndr->depth--;
37674 0 : ndr_print_ptr(ndr, "language", r->in.language);
37675 0 : ndr->depth++;
37676 0 : if (r->in.language) {
37677 0 : ndr_print_string(ndr, "language", r->in.language);
37678 : }
37679 0 : ndr->depth--;
37680 0 : ndr_print_ptr(ndr, "package_id", r->in.package_id);
37681 0 : ndr->depth++;
37682 0 : ndr_print_string(ndr, "package_id", r->in.package_id);
37683 0 : ndr->depth--;
37684 0 : ndr_print_ptr(ndr, "driver_package_cab", r->in.driver_package_cab);
37685 0 : ndr->depth++;
37686 0 : if (r->in.driver_package_cab) {
37687 0 : ndr_print_string(ndr, "driver_package_cab", r->in.driver_package_cab);
37688 : }
37689 0 : ndr->depth--;
37690 0 : ndr_print_uint32(ndr, "driver_package_cab_size", r->in.driver_package_cab_size);
37691 0 : ndr->depth--;
37692 : }
37693 0 : if (flags & NDR_OUT) {
37694 0 : ndr_print_struct(ndr, "out", "spoolss_GetPrinterDriverPackagePath");
37695 0 : ndr->depth++;
37696 0 : ndr_print_ptr(ndr, "driver_package_cab", r->out.driver_package_cab);
37697 0 : ndr->depth++;
37698 0 : if (r->out.driver_package_cab) {
37699 0 : ndr_print_string(ndr, "driver_package_cab", r->out.driver_package_cab);
37700 : }
37701 0 : ndr->depth--;
37702 0 : ndr_print_ptr(ndr, "required", r->out.required);
37703 0 : ndr->depth++;
37704 0 : ndr_print_uint32(ndr, "required", *r->out.required);
37705 0 : ndr->depth--;
37706 0 : ndr_print_HRESULT(ndr, "result", r->out.result);
37707 0 : ndr->depth--;
37708 : }
37709 0 : ndr->depth--;
37710 : }
37711 :
37712 0 : static enum ndr_err_code ndr_push_spoolss_69(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_69 *r)
37713 : {
37714 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37715 0 : if (flags & NDR_IN) {
37716 0 : }
37717 0 : if (flags & NDR_OUT) {
37718 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37719 : }
37720 0 : return NDR_ERR_SUCCESS;
37721 : }
37722 :
37723 0 : static enum ndr_err_code ndr_pull_spoolss_69(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_69 *r)
37724 : {
37725 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37726 0 : if (flags & NDR_IN) {
37727 0 : }
37728 0 : if (flags & NDR_OUT) {
37729 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37730 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37731 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37732 : }
37733 0 : return NDR_ERR_SUCCESS;
37734 : }
37735 :
37736 0 : _PUBLIC_ void ndr_print_spoolss_69(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_69 *r)
37737 : {
37738 0 : ndr_print_struct(ndr, name, "spoolss_69");
37739 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37740 0 : ndr->depth++;
37741 0 : if (flags & NDR_SET_VALUES) {
37742 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37743 : }
37744 0 : if (flags & NDR_IN) {
37745 0 : ndr_print_struct(ndr, "in", "spoolss_69");
37746 0 : ndr->depth++;
37747 0 : ndr->depth--;
37748 : }
37749 0 : if (flags & NDR_OUT) {
37750 0 : ndr_print_struct(ndr, "out", "spoolss_69");
37751 0 : ndr->depth++;
37752 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37753 0 : ndr->depth--;
37754 : }
37755 0 : ndr->depth--;
37756 : }
37757 :
37758 0 : static enum ndr_err_code ndr_push_spoolss_6a(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_6a *r)
37759 : {
37760 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37761 0 : if (flags & NDR_IN) {
37762 0 : }
37763 0 : if (flags & NDR_OUT) {
37764 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37765 : }
37766 0 : return NDR_ERR_SUCCESS;
37767 : }
37768 :
37769 0 : static enum ndr_err_code ndr_pull_spoolss_6a(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_6a *r)
37770 : {
37771 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37772 0 : if (flags & NDR_IN) {
37773 0 : }
37774 0 : if (flags & NDR_OUT) {
37775 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37776 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37777 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37778 : }
37779 0 : return NDR_ERR_SUCCESS;
37780 : }
37781 :
37782 0 : _PUBLIC_ void ndr_print_spoolss_6a(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_6a *r)
37783 : {
37784 0 : ndr_print_struct(ndr, name, "spoolss_6a");
37785 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37786 0 : ndr->depth++;
37787 0 : if (flags & NDR_SET_VALUES) {
37788 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37789 : }
37790 0 : if (flags & NDR_IN) {
37791 0 : ndr_print_struct(ndr, "in", "spoolss_6a");
37792 0 : ndr->depth++;
37793 0 : ndr->depth--;
37794 : }
37795 0 : if (flags & NDR_OUT) {
37796 0 : ndr_print_struct(ndr, "out", "spoolss_6a");
37797 0 : ndr->depth++;
37798 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37799 0 : ndr->depth--;
37800 : }
37801 0 : ndr->depth--;
37802 : }
37803 :
37804 0 : static enum ndr_err_code ndr_push_spoolss_6b(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_6b *r)
37805 : {
37806 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37807 0 : if (flags & NDR_IN) {
37808 0 : }
37809 0 : if (flags & NDR_OUT) {
37810 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37811 : }
37812 0 : return NDR_ERR_SUCCESS;
37813 : }
37814 :
37815 0 : static enum ndr_err_code ndr_pull_spoolss_6b(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_6b *r)
37816 : {
37817 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37818 0 : if (flags & NDR_IN) {
37819 0 : }
37820 0 : if (flags & NDR_OUT) {
37821 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37822 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37823 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37824 : }
37825 0 : return NDR_ERR_SUCCESS;
37826 : }
37827 :
37828 0 : _PUBLIC_ void ndr_print_spoolss_6b(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_6b *r)
37829 : {
37830 0 : ndr_print_struct(ndr, name, "spoolss_6b");
37831 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37832 0 : ndr->depth++;
37833 0 : if (flags & NDR_SET_VALUES) {
37834 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37835 : }
37836 0 : if (flags & NDR_IN) {
37837 0 : ndr_print_struct(ndr, "in", "spoolss_6b");
37838 0 : ndr->depth++;
37839 0 : ndr->depth--;
37840 : }
37841 0 : if (flags & NDR_OUT) {
37842 0 : ndr_print_struct(ndr, "out", "spoolss_6b");
37843 0 : ndr->depth++;
37844 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37845 0 : ndr->depth--;
37846 : }
37847 0 : ndr->depth--;
37848 : }
37849 :
37850 0 : static enum ndr_err_code ndr_push_spoolss_6c(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_6c *r)
37851 : {
37852 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37853 0 : if (flags & NDR_IN) {
37854 0 : }
37855 0 : if (flags & NDR_OUT) {
37856 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37857 : }
37858 0 : return NDR_ERR_SUCCESS;
37859 : }
37860 :
37861 0 : static enum ndr_err_code ndr_pull_spoolss_6c(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_6c *r)
37862 : {
37863 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37864 0 : if (flags & NDR_IN) {
37865 0 : }
37866 0 : if (flags & NDR_OUT) {
37867 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37868 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37869 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37870 : }
37871 0 : return NDR_ERR_SUCCESS;
37872 : }
37873 :
37874 0 : _PUBLIC_ void ndr_print_spoolss_6c(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_6c *r)
37875 : {
37876 0 : ndr_print_struct(ndr, name, "spoolss_6c");
37877 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37878 0 : ndr->depth++;
37879 0 : if (flags & NDR_SET_VALUES) {
37880 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37881 : }
37882 0 : if (flags & NDR_IN) {
37883 0 : ndr_print_struct(ndr, "in", "spoolss_6c");
37884 0 : ndr->depth++;
37885 0 : ndr->depth--;
37886 : }
37887 0 : if (flags & NDR_OUT) {
37888 0 : ndr_print_struct(ndr, "out", "spoolss_6c");
37889 0 : ndr->depth++;
37890 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37891 0 : ndr->depth--;
37892 : }
37893 0 : ndr->depth--;
37894 : }
37895 :
37896 0 : static enum ndr_err_code ndr_push_spoolss_6d(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_6d *r)
37897 : {
37898 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37899 0 : if (flags & NDR_IN) {
37900 0 : }
37901 0 : if (flags & NDR_OUT) {
37902 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37903 : }
37904 0 : return NDR_ERR_SUCCESS;
37905 : }
37906 :
37907 0 : static enum ndr_err_code ndr_pull_spoolss_6d(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_6d *r)
37908 : {
37909 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37910 0 : if (flags & NDR_IN) {
37911 0 : }
37912 0 : if (flags & NDR_OUT) {
37913 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
37914 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
37915 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
37916 : }
37917 0 : return NDR_ERR_SUCCESS;
37918 : }
37919 :
37920 0 : _PUBLIC_ void ndr_print_spoolss_6d(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_6d *r)
37921 : {
37922 0 : ndr_print_struct(ndr, name, "spoolss_6d");
37923 0 : if (r == NULL) { ndr_print_null(ndr); return; }
37924 0 : ndr->depth++;
37925 0 : if (flags & NDR_SET_VALUES) {
37926 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
37927 : }
37928 0 : if (flags & NDR_IN) {
37929 0 : ndr_print_struct(ndr, "in", "spoolss_6d");
37930 0 : ndr->depth++;
37931 0 : ndr->depth--;
37932 : }
37933 0 : if (flags & NDR_OUT) {
37934 0 : ndr_print_struct(ndr, "out", "spoolss_6d");
37935 0 : ndr->depth++;
37936 0 : ndr_print_WERROR(ndr, "result", r->out.result);
37937 0 : ndr->depth--;
37938 : }
37939 0 : ndr->depth--;
37940 : }
37941 :
37942 0 : static enum ndr_err_code ndr_push_spoolss_GetJobNamedPropertyValue(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_GetJobNamedPropertyValue *r)
37943 : {
37944 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
37945 0 : if (flags & NDR_IN) {
37946 0 : if (r->in.hPrinter == NULL) {
37947 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
37948 : }
37949 0 : if (r->in.pszName == NULL) {
37950 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
37951 : }
37952 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.hPrinter));
37953 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
37954 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszName, CH_UTF16)));
37955 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
37956 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszName, CH_UTF16)));
37957 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszName, ndr_charset_length(r->in.pszName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
37958 : }
37959 0 : if (flags & NDR_OUT) {
37960 0 : if (r->out.pValue == NULL) {
37961 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
37962 : }
37963 0 : NDR_CHECK(ndr_push_spoolss_PrintPropertyValue(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pValue));
37964 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
37965 : }
37966 0 : return NDR_ERR_SUCCESS;
37967 : }
37968 :
37969 0 : static enum ndr_err_code ndr_pull_spoolss_GetJobNamedPropertyValue(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_GetJobNamedPropertyValue *r)
37970 : {
37971 0 : uint32_t size_pszName_1 = 0;
37972 0 : uint32_t length_pszName_1 = 0;
37973 0 : TALLOC_CTX *_mem_save_hPrinter_0 = NULL;
37974 0 : TALLOC_CTX *_mem_save_pValue_0 = NULL;
37975 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
37976 0 : if (flags & NDR_IN) {
37977 0 : NDR_ZERO_STRUCT(r->out);
37978 :
37979 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
37980 0 : NDR_PULL_ALLOC(ndr, r->in.hPrinter);
37981 : }
37982 0 : _mem_save_hPrinter_0 = NDR_PULL_GET_MEM_CTX(ndr);
37983 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.hPrinter, LIBNDR_FLAG_REF_ALLOC);
37984 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.hPrinter));
37985 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hPrinter_0, LIBNDR_FLAG_REF_ALLOC);
37986 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
37987 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszName));
37988 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszName));
37989 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszName, &size_pszName_1));
37990 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszName, &length_pszName_1));
37991 0 : if (length_pszName_1 > size_pszName_1) {
37992 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszName_1, length_pszName_1);
37993 : }
37994 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszName_1, sizeof(uint16_t)));
37995 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszName, length_pszName_1, sizeof(uint16_t), CH_UTF16));
37996 0 : NDR_PULL_ALLOC(ndr, r->out.pValue);
37997 0 : NDR_ZERO_STRUCTP(r->out.pValue);
37998 : }
37999 0 : if (flags & NDR_OUT) {
38000 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
38001 : if (r->in.hPrinter == NULL) {
38002 : NDR_PULL_ALLOC(ndr, r->in.hPrinter);
38003 : NDR_ZERO_STRUCTP(r->in.hPrinter);
38004 : }
38005 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
38006 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
38007 0 : NDR_PULL_ALLOC(ndr, r->out.pValue);
38008 : }
38009 0 : _mem_save_pValue_0 = NDR_PULL_GET_MEM_CTX(ndr);
38010 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pValue, LIBNDR_FLAG_REF_ALLOC);
38011 0 : NDR_CHECK(ndr_pull_spoolss_PrintPropertyValue(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pValue));
38012 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pValue_0, LIBNDR_FLAG_REF_ALLOC);
38013 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
38014 : }
38015 0 : return NDR_ERR_SUCCESS;
38016 : }
38017 :
38018 0 : _PUBLIC_ void ndr_print_spoolss_GetJobNamedPropertyValue(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_GetJobNamedPropertyValue *r)
38019 : {
38020 0 : ndr_print_struct(ndr, name, "spoolss_GetJobNamedPropertyValue");
38021 0 : if (r == NULL) { ndr_print_null(ndr); return; }
38022 0 : ndr->depth++;
38023 0 : if (flags & NDR_SET_VALUES) {
38024 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
38025 : }
38026 0 : if (flags & NDR_IN) {
38027 0 : ndr_print_struct(ndr, "in", "spoolss_GetJobNamedPropertyValue");
38028 0 : ndr->depth++;
38029 0 : ndr_print_ptr(ndr, "hPrinter", r->in.hPrinter);
38030 0 : ndr->depth++;
38031 0 : ndr_print_policy_handle(ndr, "hPrinter", r->in.hPrinter);
38032 0 : ndr->depth--;
38033 0 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
38034 0 : ndr_print_ptr(ndr, "pszName", r->in.pszName);
38035 0 : ndr->depth++;
38036 0 : ndr_print_string(ndr, "pszName", r->in.pszName);
38037 0 : ndr->depth--;
38038 0 : ndr->depth--;
38039 : }
38040 0 : if (flags & NDR_OUT) {
38041 0 : ndr_print_struct(ndr, "out", "spoolss_GetJobNamedPropertyValue");
38042 0 : ndr->depth++;
38043 0 : ndr_print_ptr(ndr, "pValue", r->out.pValue);
38044 0 : ndr->depth++;
38045 0 : ndr_print_spoolss_PrintPropertyValue(ndr, "pValue", r->out.pValue);
38046 0 : ndr->depth--;
38047 0 : ndr_print_WERROR(ndr, "result", r->out.result);
38048 0 : ndr->depth--;
38049 : }
38050 0 : ndr->depth--;
38051 : }
38052 :
38053 0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetJobNamedProperty(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_SetJobNamedProperty *r)
38054 : {
38055 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
38056 0 : if (flags & NDR_IN) {
38057 0 : if (r->in.hPrinter == NULL) {
38058 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
38059 : }
38060 0 : if (r->in.pProperty == NULL) {
38061 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
38062 : }
38063 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.hPrinter));
38064 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
38065 0 : NDR_CHECK(ndr_push_spoolss_PrintNamedProperty(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pProperty));
38066 : }
38067 0 : if (flags & NDR_OUT) {
38068 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
38069 : }
38070 0 : return NDR_ERR_SUCCESS;
38071 : }
38072 :
38073 2 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetJobNamedProperty(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_SetJobNamedProperty *r)
38074 : {
38075 2 : TALLOC_CTX *_mem_save_hPrinter_0 = NULL;
38076 2 : TALLOC_CTX *_mem_save_pProperty_0 = NULL;
38077 2 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
38078 2 : if (flags & NDR_IN) {
38079 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
38080 2 : NDR_PULL_ALLOC(ndr, r->in.hPrinter);
38081 : }
38082 2 : _mem_save_hPrinter_0 = NDR_PULL_GET_MEM_CTX(ndr);
38083 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.hPrinter, LIBNDR_FLAG_REF_ALLOC);
38084 2 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.hPrinter));
38085 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hPrinter_0, LIBNDR_FLAG_REF_ALLOC);
38086 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
38087 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
38088 2 : NDR_PULL_ALLOC(ndr, r->in.pProperty);
38089 : }
38090 2 : _mem_save_pProperty_0 = NDR_PULL_GET_MEM_CTX(ndr);
38091 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pProperty, LIBNDR_FLAG_REF_ALLOC);
38092 2 : NDR_CHECK(ndr_pull_spoolss_PrintNamedProperty(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pProperty));
38093 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pProperty_0, LIBNDR_FLAG_REF_ALLOC);
38094 : }
38095 2 : if (flags & NDR_OUT) {
38096 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
38097 : if (r->in.hPrinter == NULL) {
38098 : NDR_PULL_ALLOC(ndr, r->in.hPrinter);
38099 : NDR_ZERO_STRUCTP(r->in.hPrinter);
38100 : }
38101 : if (r->in.pProperty == NULL) {
38102 : NDR_PULL_ALLOC(ndr, r->in.pProperty);
38103 : NDR_ZERO_STRUCTP(r->in.pProperty);
38104 : }
38105 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
38106 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
38107 : }
38108 0 : return NDR_ERR_SUCCESS;
38109 : }
38110 :
38111 2 : _PUBLIC_ void ndr_print_spoolss_SetJobNamedProperty(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_SetJobNamedProperty *r)
38112 : {
38113 2 : ndr_print_struct(ndr, name, "spoolss_SetJobNamedProperty");
38114 2 : if (r == NULL) { ndr_print_null(ndr); return; }
38115 2 : ndr->depth++;
38116 2 : if (flags & NDR_SET_VALUES) {
38117 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
38118 : }
38119 2 : if (flags & NDR_IN) {
38120 2 : ndr_print_struct(ndr, "in", "spoolss_SetJobNamedProperty");
38121 2 : ndr->depth++;
38122 2 : ndr_print_ptr(ndr, "hPrinter", r->in.hPrinter);
38123 2 : ndr->depth++;
38124 2 : ndr_print_policy_handle(ndr, "hPrinter", r->in.hPrinter);
38125 2 : ndr->depth--;
38126 2 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
38127 2 : ndr_print_ptr(ndr, "pProperty", r->in.pProperty);
38128 2 : ndr->depth++;
38129 2 : ndr_print_spoolss_PrintNamedProperty(ndr, "pProperty", r->in.pProperty);
38130 2 : ndr->depth--;
38131 2 : ndr->depth--;
38132 : }
38133 2 : if (flags & NDR_OUT) {
38134 0 : ndr_print_struct(ndr, "out", "spoolss_SetJobNamedProperty");
38135 0 : ndr->depth++;
38136 0 : ndr_print_WERROR(ndr, "result", r->out.result);
38137 0 : ndr->depth--;
38138 : }
38139 2 : ndr->depth--;
38140 : }
38141 :
38142 0 : static enum ndr_err_code ndr_push_spoolss_DeleteJobNamedProperty(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_DeleteJobNamedProperty *r)
38143 : {
38144 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
38145 0 : if (flags & NDR_IN) {
38146 0 : if (r->in.hPrinter == NULL) {
38147 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
38148 : }
38149 0 : if (r->in.pszName == NULL) {
38150 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
38151 : }
38152 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.hPrinter));
38153 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
38154 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszName, CH_UTF16)));
38155 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
38156 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszName, CH_UTF16)));
38157 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszName, ndr_charset_length(r->in.pszName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
38158 : }
38159 0 : if (flags & NDR_OUT) {
38160 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
38161 : }
38162 0 : return NDR_ERR_SUCCESS;
38163 : }
38164 :
38165 0 : static enum ndr_err_code ndr_pull_spoolss_DeleteJobNamedProperty(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_DeleteJobNamedProperty *r)
38166 : {
38167 0 : uint32_t size_pszName_1 = 0;
38168 0 : uint32_t length_pszName_1 = 0;
38169 0 : TALLOC_CTX *_mem_save_hPrinter_0 = NULL;
38170 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
38171 0 : if (flags & NDR_IN) {
38172 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
38173 0 : NDR_PULL_ALLOC(ndr, r->in.hPrinter);
38174 : }
38175 0 : _mem_save_hPrinter_0 = NDR_PULL_GET_MEM_CTX(ndr);
38176 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.hPrinter, LIBNDR_FLAG_REF_ALLOC);
38177 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.hPrinter));
38178 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hPrinter_0, LIBNDR_FLAG_REF_ALLOC);
38179 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
38180 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszName));
38181 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszName));
38182 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszName, &size_pszName_1));
38183 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszName, &length_pszName_1));
38184 0 : if (length_pszName_1 > size_pszName_1) {
38185 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszName_1, length_pszName_1);
38186 : }
38187 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszName_1, sizeof(uint16_t)));
38188 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszName, length_pszName_1, sizeof(uint16_t), CH_UTF16));
38189 : }
38190 0 : if (flags & NDR_OUT) {
38191 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
38192 : if (r->in.hPrinter == NULL) {
38193 : NDR_PULL_ALLOC(ndr, r->in.hPrinter);
38194 : NDR_ZERO_STRUCTP(r->in.hPrinter);
38195 : }
38196 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
38197 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
38198 : }
38199 0 : return NDR_ERR_SUCCESS;
38200 : }
38201 :
38202 0 : _PUBLIC_ void ndr_print_spoolss_DeleteJobNamedProperty(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_DeleteJobNamedProperty *r)
38203 : {
38204 0 : ndr_print_struct(ndr, name, "spoolss_DeleteJobNamedProperty");
38205 0 : if (r == NULL) { ndr_print_null(ndr); return; }
38206 0 : ndr->depth++;
38207 0 : if (flags & NDR_SET_VALUES) {
38208 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
38209 : }
38210 0 : if (flags & NDR_IN) {
38211 0 : ndr_print_struct(ndr, "in", "spoolss_DeleteJobNamedProperty");
38212 0 : ndr->depth++;
38213 0 : ndr_print_ptr(ndr, "hPrinter", r->in.hPrinter);
38214 0 : ndr->depth++;
38215 0 : ndr_print_policy_handle(ndr, "hPrinter", r->in.hPrinter);
38216 0 : ndr->depth--;
38217 0 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
38218 0 : ndr_print_ptr(ndr, "pszName", r->in.pszName);
38219 0 : ndr->depth++;
38220 0 : ndr_print_string(ndr, "pszName", r->in.pszName);
38221 0 : ndr->depth--;
38222 0 : ndr->depth--;
38223 : }
38224 0 : if (flags & NDR_OUT) {
38225 0 : ndr_print_struct(ndr, "out", "spoolss_DeleteJobNamedProperty");
38226 0 : ndr->depth++;
38227 0 : ndr_print_WERROR(ndr, "result", r->out.result);
38228 0 : ndr->depth--;
38229 : }
38230 0 : ndr->depth--;
38231 : }
38232 :
38233 0 : static enum ndr_err_code ndr_push_spoolss_EnumJobNamedProperties(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_EnumJobNamedProperties *r)
38234 : {
38235 0 : uint32_t cntr_ppProperties_2;
38236 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
38237 0 : if (flags & NDR_IN) {
38238 0 : if (r->in.hPrinter == NULL) {
38239 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
38240 : }
38241 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.hPrinter));
38242 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
38243 : }
38244 0 : if (flags & NDR_OUT) {
38245 0 : if (r->out.pcProperties == NULL) {
38246 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
38247 : }
38248 0 : if (r->out.ppProperties == NULL) {
38249 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
38250 : }
38251 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcProperties));
38252 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ppProperties));
38253 0 : if (*r->out.ppProperties) {
38254 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.pcProperties));
38255 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (*r->out.pcProperties); cntr_ppProperties_2++) {
38256 0 : NDR_CHECK(ndr_push_spoolss_PrintNamedProperty(ndr, NDR_SCALARS, &(*r->out.ppProperties)[cntr_ppProperties_2]));
38257 : }
38258 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (*r->out.pcProperties); cntr_ppProperties_2++) {
38259 0 : NDR_CHECK(ndr_push_spoolss_PrintNamedProperty(ndr, NDR_BUFFERS, &(*r->out.ppProperties)[cntr_ppProperties_2]));
38260 : }
38261 : }
38262 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
38263 : }
38264 0 : return NDR_ERR_SUCCESS;
38265 : }
38266 :
38267 0 : static enum ndr_err_code ndr_pull_spoolss_EnumJobNamedProperties(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_EnumJobNamedProperties *r)
38268 : {
38269 0 : uint32_t _ptr_ppProperties;
38270 0 : uint32_t size_ppProperties_2 = 0;
38271 0 : uint32_t cntr_ppProperties_2;
38272 0 : TALLOC_CTX *_mem_save_hPrinter_0 = NULL;
38273 0 : TALLOC_CTX *_mem_save_pcProperties_0 = NULL;
38274 0 : TALLOC_CTX *_mem_save_ppProperties_0 = NULL;
38275 0 : TALLOC_CTX *_mem_save_ppProperties_1 = NULL;
38276 0 : TALLOC_CTX *_mem_save_ppProperties_2 = NULL;
38277 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
38278 0 : if (flags & NDR_IN) {
38279 0 : NDR_ZERO_STRUCT(r->out);
38280 :
38281 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
38282 0 : NDR_PULL_ALLOC(ndr, r->in.hPrinter);
38283 : }
38284 0 : _mem_save_hPrinter_0 = NDR_PULL_GET_MEM_CTX(ndr);
38285 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.hPrinter, LIBNDR_FLAG_REF_ALLOC);
38286 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.hPrinter));
38287 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hPrinter_0, LIBNDR_FLAG_REF_ALLOC);
38288 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
38289 0 : NDR_PULL_ALLOC(ndr, r->out.pcProperties);
38290 0 : NDR_ZERO_STRUCTP(r->out.pcProperties);
38291 0 : NDR_PULL_ALLOC(ndr, r->out.ppProperties);
38292 0 : NDR_ZERO_STRUCTP(r->out.ppProperties);
38293 : }
38294 0 : if (flags & NDR_OUT) {
38295 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
38296 : if (r->in.hPrinter == NULL) {
38297 : NDR_PULL_ALLOC(ndr, r->in.hPrinter);
38298 : NDR_ZERO_STRUCTP(r->in.hPrinter);
38299 : }
38300 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
38301 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
38302 0 : NDR_PULL_ALLOC(ndr, r->out.pcProperties);
38303 : }
38304 0 : _mem_save_pcProperties_0 = NDR_PULL_GET_MEM_CTX(ndr);
38305 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcProperties, LIBNDR_FLAG_REF_ALLOC);
38306 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcProperties));
38307 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcProperties_0, LIBNDR_FLAG_REF_ALLOC);
38308 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
38309 0 : NDR_PULL_ALLOC(ndr, r->out.ppProperties);
38310 : }
38311 0 : _mem_save_ppProperties_0 = NDR_PULL_GET_MEM_CTX(ndr);
38312 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppProperties, LIBNDR_FLAG_REF_ALLOC);
38313 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ppProperties));
38314 0 : if (_ptr_ppProperties) {
38315 0 : NDR_PULL_ALLOC(ndr, *r->out.ppProperties);
38316 : } else {
38317 0 : *r->out.ppProperties = NULL;
38318 : }
38319 0 : if (*r->out.ppProperties) {
38320 0 : _mem_save_ppProperties_1 = NDR_PULL_GET_MEM_CTX(ndr);
38321 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ppProperties, 0);
38322 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.ppProperties));
38323 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)r->out.ppProperties, &size_ppProperties_2));
38324 0 : NDR_PULL_ALLOC_N(ndr, *r->out.ppProperties, size_ppProperties_2);
38325 0 : _mem_save_ppProperties_2 = NDR_PULL_GET_MEM_CTX(ndr);
38326 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ppProperties, 0);
38327 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (size_ppProperties_2); cntr_ppProperties_2++) {
38328 0 : NDR_CHECK(ndr_pull_spoolss_PrintNamedProperty(ndr, NDR_SCALARS, &(*r->out.ppProperties)[cntr_ppProperties_2]));
38329 : }
38330 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (size_ppProperties_2); cntr_ppProperties_2++) {
38331 0 : NDR_CHECK(ndr_pull_spoolss_PrintNamedProperty(ndr, NDR_BUFFERS, &(*r->out.ppProperties)[cntr_ppProperties_2]));
38332 : }
38333 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppProperties_2, 0);
38334 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppProperties_1, 0);
38335 : }
38336 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppProperties_0, LIBNDR_FLAG_REF_ALLOC);
38337 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
38338 0 : if (*r->out.ppProperties) {
38339 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.ppProperties, *r->out.pcProperties));
38340 : }
38341 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (size_ppProperties_2); cntr_ppProperties_2++) {
38342 0 : }
38343 : }
38344 0 : return NDR_ERR_SUCCESS;
38345 : }
38346 :
38347 0 : _PUBLIC_ void ndr_print_spoolss_EnumJobNamedProperties(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_EnumJobNamedProperties *r)
38348 : {
38349 0 : uint32_t cntr_ppProperties_2;
38350 0 : ndr_print_struct(ndr, name, "spoolss_EnumJobNamedProperties");
38351 0 : if (r == NULL) { ndr_print_null(ndr); return; }
38352 0 : ndr->depth++;
38353 0 : if (flags & NDR_SET_VALUES) {
38354 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
38355 : }
38356 0 : if (flags & NDR_IN) {
38357 0 : ndr_print_struct(ndr, "in", "spoolss_EnumJobNamedProperties");
38358 0 : ndr->depth++;
38359 0 : ndr_print_ptr(ndr, "hPrinter", r->in.hPrinter);
38360 0 : ndr->depth++;
38361 0 : ndr_print_policy_handle(ndr, "hPrinter", r->in.hPrinter);
38362 0 : ndr->depth--;
38363 0 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
38364 0 : ndr->depth--;
38365 : }
38366 0 : if (flags & NDR_OUT) {
38367 0 : ndr_print_struct(ndr, "out", "spoolss_EnumJobNamedProperties");
38368 0 : ndr->depth++;
38369 0 : ndr_print_ptr(ndr, "pcProperties", r->out.pcProperties);
38370 0 : ndr->depth++;
38371 0 : ndr_print_uint32(ndr, "pcProperties", *r->out.pcProperties);
38372 0 : ndr->depth--;
38373 0 : ndr_print_ptr(ndr, "ppProperties", r->out.ppProperties);
38374 0 : ndr->depth++;
38375 0 : ndr_print_ptr(ndr, "ppProperties", *r->out.ppProperties);
38376 0 : ndr->depth++;
38377 0 : if (*r->out.ppProperties) {
38378 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "ppProperties", (uint32_t)(*r->out.pcProperties));
38379 0 : ndr->depth++;
38380 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (*r->out.pcProperties); cntr_ppProperties_2++) {
38381 0 : ndr_print_spoolss_PrintNamedProperty(ndr, "ppProperties", &(*r->out.ppProperties)[cntr_ppProperties_2]);
38382 : }
38383 0 : ndr->depth--;
38384 : }
38385 0 : ndr->depth--;
38386 0 : ndr->depth--;
38387 0 : ndr_print_WERROR(ndr, "result", r->out.result);
38388 0 : ndr->depth--;
38389 : }
38390 0 : ndr->depth--;
38391 : }
38392 :
38393 0 : static enum ndr_err_code ndr_push_spoolss_72(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_72 *r)
38394 : {
38395 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
38396 0 : if (flags & NDR_IN) {
38397 0 : }
38398 0 : if (flags & NDR_OUT) {
38399 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
38400 : }
38401 0 : return NDR_ERR_SUCCESS;
38402 : }
38403 :
38404 0 : static enum ndr_err_code ndr_pull_spoolss_72(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_72 *r)
38405 : {
38406 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
38407 0 : if (flags & NDR_IN) {
38408 0 : }
38409 0 : if (flags & NDR_OUT) {
38410 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
38411 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
38412 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
38413 : }
38414 0 : return NDR_ERR_SUCCESS;
38415 : }
38416 :
38417 0 : _PUBLIC_ void ndr_print_spoolss_72(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_72 *r)
38418 : {
38419 0 : ndr_print_struct(ndr, name, "spoolss_72");
38420 0 : if (r == NULL) { ndr_print_null(ndr); return; }
38421 0 : ndr->depth++;
38422 0 : if (flags & NDR_SET_VALUES) {
38423 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
38424 : }
38425 0 : if (flags & NDR_IN) {
38426 0 : ndr_print_struct(ndr, "in", "spoolss_72");
38427 0 : ndr->depth++;
38428 0 : ndr->depth--;
38429 : }
38430 0 : if (flags & NDR_OUT) {
38431 0 : ndr_print_struct(ndr, "out", "spoolss_72");
38432 0 : ndr->depth++;
38433 0 : ndr_print_WERROR(ndr, "result", r->out.result);
38434 0 : ndr->depth--;
38435 : }
38436 0 : ndr->depth--;
38437 : }
38438 :
38439 0 : static enum ndr_err_code ndr_push_spoolss_73(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_73 *r)
38440 : {
38441 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
38442 0 : if (flags & NDR_IN) {
38443 0 : }
38444 0 : if (flags & NDR_OUT) {
38445 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
38446 : }
38447 0 : return NDR_ERR_SUCCESS;
38448 : }
38449 :
38450 0 : static enum ndr_err_code ndr_pull_spoolss_73(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_73 *r)
38451 : {
38452 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
38453 0 : if (flags & NDR_IN) {
38454 0 : }
38455 0 : if (flags & NDR_OUT) {
38456 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
38457 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
38458 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
38459 : }
38460 0 : return NDR_ERR_SUCCESS;
38461 : }
38462 :
38463 0 : _PUBLIC_ void ndr_print_spoolss_73(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_73 *r)
38464 : {
38465 0 : ndr_print_struct(ndr, name, "spoolss_73");
38466 0 : if (r == NULL) { ndr_print_null(ndr); return; }
38467 0 : ndr->depth++;
38468 0 : if (flags & NDR_SET_VALUES) {
38469 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
38470 : }
38471 0 : if (flags & NDR_IN) {
38472 0 : ndr_print_struct(ndr, "in", "spoolss_73");
38473 0 : ndr->depth++;
38474 0 : ndr->depth--;
38475 : }
38476 0 : if (flags & NDR_OUT) {
38477 0 : ndr_print_struct(ndr, "out", "spoolss_73");
38478 0 : ndr->depth++;
38479 0 : ndr_print_WERROR(ndr, "result", r->out.result);
38480 0 : ndr->depth--;
38481 : }
38482 0 : ndr->depth--;
38483 : }
38484 :
38485 8 : static enum ndr_err_code ndr_push_spoolss_LogJobInfoForBranchOffice(struct ndr_push *ndr, ndr_flags_type flags, const struct spoolss_LogJobInfoForBranchOffice *r)
38486 : {
38487 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
38488 8 : if (flags & NDR_IN) {
38489 8 : if (r->in.hPrinter == NULL) {
38490 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
38491 : }
38492 8 : if (r->in.pBranchOfficeJobDataContainer == NULL) {
38493 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
38494 : }
38495 8 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.hPrinter));
38496 8 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobDataContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pBranchOfficeJobDataContainer));
38497 : }
38498 8 : if (flags & NDR_OUT) {
38499 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
38500 : }
38501 8 : return NDR_ERR_SUCCESS;
38502 : }
38503 :
38504 8 : static enum ndr_err_code ndr_pull_spoolss_LogJobInfoForBranchOffice(struct ndr_pull *ndr, ndr_flags_type flags, struct spoolss_LogJobInfoForBranchOffice *r)
38505 : {
38506 8 : TALLOC_CTX *_mem_save_hPrinter_0 = NULL;
38507 8 : TALLOC_CTX *_mem_save_pBranchOfficeJobDataContainer_0 = NULL;
38508 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
38509 8 : if (flags & NDR_IN) {
38510 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
38511 8 : NDR_PULL_ALLOC(ndr, r->in.hPrinter);
38512 : }
38513 8 : _mem_save_hPrinter_0 = NDR_PULL_GET_MEM_CTX(ndr);
38514 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.hPrinter, LIBNDR_FLAG_REF_ALLOC);
38515 8 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.hPrinter));
38516 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hPrinter_0, LIBNDR_FLAG_REF_ALLOC);
38517 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
38518 8 : NDR_PULL_ALLOC(ndr, r->in.pBranchOfficeJobDataContainer);
38519 : }
38520 8 : _mem_save_pBranchOfficeJobDataContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
38521 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pBranchOfficeJobDataContainer, LIBNDR_FLAG_REF_ALLOC);
38522 8 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobDataContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pBranchOfficeJobDataContainer));
38523 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBranchOfficeJobDataContainer_0, LIBNDR_FLAG_REF_ALLOC);
38524 : }
38525 8 : if (flags & NDR_OUT) {
38526 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
38527 : if (r->in.hPrinter == NULL) {
38528 : NDR_PULL_ALLOC(ndr, r->in.hPrinter);
38529 : NDR_ZERO_STRUCTP(r->in.hPrinter);
38530 : }
38531 : if (r->in.pBranchOfficeJobDataContainer == NULL) {
38532 : NDR_PULL_ALLOC(ndr, r->in.pBranchOfficeJobDataContainer);
38533 : NDR_ZERO_STRUCTP(r->in.pBranchOfficeJobDataContainer);
38534 : }
38535 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
38536 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
38537 : }
38538 8 : return NDR_ERR_SUCCESS;
38539 : }
38540 :
38541 0 : _PUBLIC_ void ndr_print_spoolss_LogJobInfoForBranchOffice(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct spoolss_LogJobInfoForBranchOffice *r)
38542 : {
38543 0 : ndr_print_struct(ndr, name, "spoolss_LogJobInfoForBranchOffice");
38544 0 : if (r == NULL) { ndr_print_null(ndr); return; }
38545 0 : ndr->depth++;
38546 0 : if (flags & NDR_SET_VALUES) {
38547 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
38548 : }
38549 0 : if (flags & NDR_IN) {
38550 0 : ndr_print_struct(ndr, "in", "spoolss_LogJobInfoForBranchOffice");
38551 0 : ndr->depth++;
38552 0 : ndr_print_ptr(ndr, "hPrinter", r->in.hPrinter);
38553 0 : ndr->depth++;
38554 0 : ndr_print_policy_handle(ndr, "hPrinter", r->in.hPrinter);
38555 0 : ndr->depth--;
38556 0 : ndr_print_ptr(ndr, "pBranchOfficeJobDataContainer", r->in.pBranchOfficeJobDataContainer);
38557 0 : ndr->depth++;
38558 0 : ndr_print_spoolss_BranchOfficeJobDataContainer(ndr, "pBranchOfficeJobDataContainer", r->in.pBranchOfficeJobDataContainer);
38559 0 : ndr->depth--;
38560 0 : ndr->depth--;
38561 : }
38562 0 : if (flags & NDR_OUT) {
38563 0 : ndr_print_struct(ndr, "out", "spoolss_LogJobInfoForBranchOffice");
38564 0 : ndr->depth++;
38565 0 : ndr_print_WERROR(ndr, "result", r->out.result);
38566 0 : ndr->depth--;
38567 : }
38568 0 : ndr->depth--;
38569 : }
38570 :
38571 : #ifndef SKIP_NDR_TABLE_spoolss
38572 : static const struct ndr_interface_public_struct spoolss_public_structs[] = {
38573 : {
38574 : .name = "spoolss_TimeCtr",
38575 : .struct_size = sizeof(struct spoolss_TimeCtr ),
38576 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_TimeCtr,
38577 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_TimeCtr,
38578 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_TimeCtr,
38579 : },
38580 : {
38581 : .name = "spoolss_PrinterInfo0",
38582 : .struct_size = sizeof(struct spoolss_PrinterInfo0 ),
38583 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterInfo0,
38584 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterInfo0,
38585 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrinterInfo0,
38586 : },
38587 : {
38588 : .name = "spoolss_UNIDRVEXTRA",
38589 : .struct_size = sizeof(struct spoolss_UNIDRVEXTRA ),
38590 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_UNIDRVEXTRA,
38591 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_UNIDRVEXTRA,
38592 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_UNIDRVEXTRA,
38593 : },
38594 : {
38595 : .name = "spoolss_DeviceMode",
38596 : .struct_size = sizeof(struct spoolss_DeviceMode ),
38597 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DeviceMode,
38598 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeviceMode,
38599 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DeviceMode,
38600 : },
38601 : {
38602 : .name = "spoolss_PrinterInfo1",
38603 : .struct_size = sizeof(struct spoolss_PrinterInfo1 ),
38604 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterInfo1,
38605 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterInfo1,
38606 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrinterInfo1,
38607 : },
38608 : {
38609 : .name = "spoolss_PrinterInfo2",
38610 : .struct_size = sizeof(struct spoolss_PrinterInfo2 ),
38611 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterInfo2,
38612 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterInfo2,
38613 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrinterInfo2,
38614 : },
38615 : {
38616 : .name = "spoolss_PrinterInfo3",
38617 : .struct_size = sizeof(struct spoolss_PrinterInfo3 ),
38618 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterInfo3,
38619 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterInfo3,
38620 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrinterInfo3,
38621 : },
38622 : {
38623 : .name = "spoolss_PrinterInfo4",
38624 : .struct_size = sizeof(struct spoolss_PrinterInfo4 ),
38625 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterInfo4,
38626 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterInfo4,
38627 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrinterInfo4,
38628 : },
38629 : {
38630 : .name = "spoolss_PrinterInfo5",
38631 : .struct_size = sizeof(struct spoolss_PrinterInfo5 ),
38632 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterInfo5,
38633 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterInfo5,
38634 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrinterInfo5,
38635 : },
38636 : {
38637 : .name = "spoolss_PrinterInfo6",
38638 : .struct_size = sizeof(struct spoolss_PrinterInfo6 ),
38639 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterInfo6,
38640 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterInfo6,
38641 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrinterInfo6,
38642 : },
38643 : {
38644 : .name = "spoolss_PrinterInfo7",
38645 : .struct_size = sizeof(struct spoolss_PrinterInfo7 ),
38646 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterInfo7,
38647 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterInfo7,
38648 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrinterInfo7,
38649 : },
38650 : {
38651 : .name = "spoolss_DevmodeContainer",
38652 : .struct_size = sizeof(struct spoolss_DevmodeContainer ),
38653 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DevmodeContainer,
38654 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DevmodeContainer,
38655 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DevmodeContainer,
38656 : },
38657 : {
38658 : .name = "spoolss_JobInfo1",
38659 : .struct_size = sizeof(struct spoolss_JobInfo1 ),
38660 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_JobInfo1,
38661 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_JobInfo1,
38662 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_JobInfo1,
38663 : },
38664 : {
38665 : .name = "spoolss_JobInfo2",
38666 : .struct_size = sizeof(struct spoolss_JobInfo2 ),
38667 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_JobInfo2,
38668 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_JobInfo2,
38669 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_JobInfo2,
38670 : },
38671 : {
38672 : .name = "spoolss_JobInfo3",
38673 : .struct_size = sizeof(struct spoolss_JobInfo3 ),
38674 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_JobInfo3,
38675 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_JobInfo3,
38676 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_JobInfo3,
38677 : },
38678 : {
38679 : .name = "spoolss_JobInfo4",
38680 : .struct_size = sizeof(struct spoolss_JobInfo4 ),
38681 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_JobInfo4,
38682 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_JobInfo4,
38683 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_JobInfo4,
38684 : },
38685 : {
38686 : .name = "spoolss_JobInfoContainer",
38687 : .struct_size = sizeof(struct spoolss_JobInfoContainer ),
38688 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_JobInfoContainer,
38689 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_JobInfoContainer,
38690 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_JobInfoContainer,
38691 : },
38692 : {
38693 : .name = "spoolss_SetPrinterInfoCtr",
38694 : .struct_size = sizeof(struct spoolss_SetPrinterInfoCtr ),
38695 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_SetPrinterInfoCtr,
38696 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPrinterInfoCtr,
38697 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_SetPrinterInfoCtr,
38698 : },
38699 : {
38700 : .name = "spoolss_StringArray",
38701 : .struct_size = sizeof(struct spoolss_StringArray ),
38702 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_StringArray,
38703 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_StringArray,
38704 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_StringArray,
38705 : },
38706 : {
38707 : .name = "spoolss_AddDriverInfoCtr",
38708 : .struct_size = sizeof(struct spoolss_AddDriverInfoCtr ),
38709 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_AddDriverInfoCtr,
38710 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddDriverInfoCtr,
38711 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_AddDriverInfoCtr,
38712 : },
38713 : {
38714 : .name = "spoolss_DriverInfo1",
38715 : .struct_size = sizeof(struct spoolss_DriverInfo1 ),
38716 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverInfo1,
38717 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverInfo1,
38718 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverInfo1,
38719 : },
38720 : {
38721 : .name = "spoolss_DriverInfo2",
38722 : .struct_size = sizeof(struct spoolss_DriverInfo2 ),
38723 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverInfo2,
38724 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverInfo2,
38725 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverInfo2,
38726 : },
38727 : {
38728 : .name = "spoolss_DriverInfo3",
38729 : .struct_size = sizeof(struct spoolss_DriverInfo3 ),
38730 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverInfo3,
38731 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverInfo3,
38732 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverInfo3,
38733 : },
38734 : {
38735 : .name = "spoolss_DriverInfo4",
38736 : .struct_size = sizeof(struct spoolss_DriverInfo4 ),
38737 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverInfo4,
38738 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverInfo4,
38739 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverInfo4,
38740 : },
38741 : {
38742 : .name = "spoolss_DriverInfo5",
38743 : .struct_size = sizeof(struct spoolss_DriverInfo5 ),
38744 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverInfo5,
38745 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverInfo5,
38746 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverInfo5,
38747 : },
38748 : {
38749 : .name = "spoolss_DriverInfo6",
38750 : .struct_size = sizeof(struct spoolss_DriverInfo6 ),
38751 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverInfo6,
38752 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverInfo6,
38753 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverInfo6,
38754 : },
38755 : {
38756 : .name = "spoolss_DriverInfo7",
38757 : .struct_size = sizeof(struct spoolss_DriverInfo7 ),
38758 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverInfo7,
38759 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverInfo7,
38760 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverInfo7,
38761 : },
38762 : {
38763 : .name = "spoolss_DriverInfo8",
38764 : .struct_size = sizeof(struct spoolss_DriverInfo8 ),
38765 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverInfo8,
38766 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverInfo8,
38767 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverInfo8,
38768 : },
38769 : {
38770 : .name = "spoolss_DriverFileInfo",
38771 : .struct_size = sizeof(struct spoolss_DriverFileInfo ),
38772 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverFileInfo,
38773 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverFileInfo,
38774 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverFileInfo,
38775 : },
38776 : {
38777 : .name = "spoolss_DriverInfo101",
38778 : .struct_size = sizeof(struct spoolss_DriverInfo101 ),
38779 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverInfo101,
38780 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverInfo101,
38781 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverInfo101,
38782 : },
38783 : {
38784 : .name = "spoolss_DriverDirectoryInfo1",
38785 : .struct_size = sizeof(struct spoolss_DriverDirectoryInfo1 ),
38786 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DriverDirectoryInfo1,
38787 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DriverDirectoryInfo1,
38788 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DriverDirectoryInfo1,
38789 : },
38790 : {
38791 : .name = "spoolss_PrintProcessorInfo1",
38792 : .struct_size = sizeof(struct spoolss_PrintProcessorInfo1 ),
38793 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrintProcessorInfo1,
38794 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrintProcessorInfo1,
38795 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrintProcessorInfo1,
38796 : },
38797 : {
38798 : .name = "spoolss_PrintProcessorDirectoryInfo1",
38799 : .struct_size = sizeof(struct spoolss_PrintProcessorDirectoryInfo1 ),
38800 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrintProcessorDirectoryInfo1,
38801 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrintProcessorDirectoryInfo1,
38802 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrintProcessorDirectoryInfo1,
38803 : },
38804 : {
38805 : .name = "spoolss_DocumentInfoCtr",
38806 : .struct_size = sizeof(struct spoolss_DocumentInfoCtr ),
38807 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_DocumentInfoCtr,
38808 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_DocumentInfoCtr,
38809 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_DocumentInfoCtr,
38810 : },
38811 : {
38812 : .name = "spoolss_OSVersion",
38813 : .struct_size = sizeof(struct spoolss_OSVersion ),
38814 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_OSVersion,
38815 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_OSVersion,
38816 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_OSVersion,
38817 : },
38818 : {
38819 : .name = "spoolss_OSVersionEx",
38820 : .struct_size = sizeof(struct spoolss_OSVersionEx ),
38821 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_OSVersionEx,
38822 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_OSVersionEx,
38823 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_OSVersionEx,
38824 : },
38825 : {
38826 : .name = "spoolss_FormInfo1",
38827 : .struct_size = sizeof(struct spoolss_FormInfo1 ),
38828 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_FormInfo1,
38829 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_FormInfo1,
38830 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_FormInfo1,
38831 : },
38832 : {
38833 : .name = "spoolss_FormInfo2",
38834 : .struct_size = sizeof(struct spoolss_FormInfo2 ),
38835 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_FormInfo2,
38836 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_FormInfo2,
38837 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_FormInfo2,
38838 : },
38839 : {
38840 : .name = "spoolss_AddFormInfoCtr",
38841 : .struct_size = sizeof(struct spoolss_AddFormInfoCtr ),
38842 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_AddFormInfoCtr,
38843 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddFormInfoCtr,
38844 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_AddFormInfoCtr,
38845 : },
38846 : {
38847 : .name = "spoolss_PortInfo1",
38848 : .struct_size = sizeof(struct spoolss_PortInfo1 ),
38849 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PortInfo1,
38850 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PortInfo1,
38851 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PortInfo1,
38852 : },
38853 : {
38854 : .name = "spoolss_PortInfo2",
38855 : .struct_size = sizeof(struct spoolss_PortInfo2 ),
38856 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PortInfo2,
38857 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PortInfo2,
38858 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PortInfo2,
38859 : },
38860 : {
38861 : .name = "spoolss_PortInfo3",
38862 : .struct_size = sizeof(struct spoolss_PortInfo3 ),
38863 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PortInfo3,
38864 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PortInfo3,
38865 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PortInfo3,
38866 : },
38867 : {
38868 : .name = "spoolss_PortInfoFF",
38869 : .struct_size = sizeof(struct spoolss_PortInfoFF ),
38870 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PortInfoFF,
38871 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PortInfoFF,
38872 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PortInfoFF,
38873 : },
38874 : {
38875 : .name = "spoolss_MonitorInfo1",
38876 : .struct_size = sizeof(struct spoolss_MonitorInfo1 ),
38877 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_MonitorInfo1,
38878 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_MonitorInfo1,
38879 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_MonitorInfo1,
38880 : },
38881 : {
38882 : .name = "spoolss_MonitorInfo2",
38883 : .struct_size = sizeof(struct spoolss_MonitorInfo2 ),
38884 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_MonitorInfo2,
38885 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_MonitorInfo2,
38886 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_MonitorInfo2,
38887 : },
38888 : {
38889 : .name = "spoolss_SetPortInfo1",
38890 : .struct_size = sizeof(struct spoolss_SetPortInfo1 ),
38891 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_SetPortInfo1,
38892 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPortInfo1,
38893 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_SetPortInfo1,
38894 : },
38895 : {
38896 : .name = "spoolss_SetPortInfo2",
38897 : .struct_size = sizeof(struct spoolss_SetPortInfo2 ),
38898 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_SetPortInfo2,
38899 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPortInfo2,
38900 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_SetPortInfo2,
38901 : },
38902 : {
38903 : .name = "spoolss_SetPortInfo3",
38904 : .struct_size = sizeof(struct spoolss_SetPortInfo3 ),
38905 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_SetPortInfo3,
38906 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPortInfo3,
38907 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_SetPortInfo3,
38908 : },
38909 : {
38910 : .name = "spoolss_SetPortInfoFF",
38911 : .struct_size = sizeof(struct spoolss_SetPortInfoFF ),
38912 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_SetPortInfoFF,
38913 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPortInfoFF,
38914 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_SetPortInfoFF,
38915 : },
38916 : {
38917 : .name = "spoolss_SetPortInfoContainer",
38918 : .struct_size = sizeof(struct spoolss_SetPortInfoContainer ),
38919 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_SetPortInfoContainer,
38920 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPortInfoContainer,
38921 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_SetPortInfoContainer,
38922 : },
38923 : {
38924 : .name = "UNIVERSAL_FONT_ID_ctr",
38925 : .struct_size = sizeof(struct UNIVERSAL_FONT_ID_ctr ),
38926 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_UNIVERSAL_FONT_ID_ctr,
38927 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_UNIVERSAL_FONT_ID_ctr,
38928 : .ndr_print = (ndr_print_function_t) ndr_print_flags_UNIVERSAL_FONT_ID_ctr,
38929 : },
38930 : {
38931 : .name = "spoolss_MonitorContainer",
38932 : .struct_size = sizeof(struct spoolss_MonitorContainer ),
38933 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_MonitorContainer,
38934 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_MonitorContainer,
38935 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_MonitorContainer,
38936 : },
38937 : {
38938 : .name = "spoolss_PrintProcDataTypesInfo1",
38939 : .struct_size = sizeof(struct spoolss_PrintProcDataTypesInfo1 ),
38940 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrintProcDataTypesInfo1,
38941 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrintProcDataTypesInfo1,
38942 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrintProcDataTypesInfo1,
38943 : },
38944 : {
38945 : .name = "spoolss_PortVarContainer",
38946 : .struct_size = sizeof(struct spoolss_PortVarContainer ),
38947 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PortVarContainer,
38948 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PortVarContainer,
38949 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PortVarContainer,
38950 : },
38951 : {
38952 : .name = "spoolss_NotifyOption",
38953 : .struct_size = sizeof(struct spoolss_NotifyOption ),
38954 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_NotifyOption,
38955 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_NotifyOption,
38956 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_NotifyOption,
38957 : },
38958 : {
38959 : .name = "spoolss_NotifyInfo",
38960 : .struct_size = sizeof(struct spoolss_NotifyInfo ),
38961 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_NotifyInfo,
38962 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_NotifyInfo,
38963 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_NotifyInfo,
38964 : },
38965 : {
38966 : .name = "spoolss_UserLevelCtr",
38967 : .struct_size = sizeof(struct spoolss_UserLevelCtr ),
38968 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_UserLevelCtr,
38969 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_UserLevelCtr,
38970 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_UserLevelCtr,
38971 : },
38972 : {
38973 : .name = "spoolss_PrinterEnumValues",
38974 : .struct_size = sizeof(struct spoolss_PrinterEnumValues ),
38975 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterEnumValues,
38976 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterEnumValues,
38977 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrinterEnumValues,
38978 : },
38979 : {
38980 : .name = "spoolss_PortData1",
38981 : .struct_size = sizeof(struct spoolss_PortData1 ),
38982 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PortData1,
38983 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PortData1,
38984 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PortData1,
38985 : },
38986 : {
38987 : .name = "spoolss_PortData2",
38988 : .struct_size = sizeof(struct spoolss_PortData2 ),
38989 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PortData2,
38990 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PortData2,
38991 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PortData2,
38992 : },
38993 : {
38994 : .name = "spoolss_MonitorUi",
38995 : .struct_size = sizeof(struct spoolss_MonitorUi ),
38996 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_MonitorUi,
38997 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_MonitorUi,
38998 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_MonitorUi,
38999 : },
39000 : {
39001 : .name = "RPC_BIDI_REQUEST_CONTAINER",
39002 : .struct_size = sizeof(struct RPC_BIDI_REQUEST_CONTAINER ),
39003 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_RPC_BIDI_REQUEST_CONTAINER,
39004 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_RPC_BIDI_REQUEST_CONTAINER,
39005 : .ndr_print = (ndr_print_function_t) ndr_print_flags_RPC_BIDI_REQUEST_CONTAINER,
39006 : },
39007 : {
39008 : .name = "RPC_BIDI_RESPONSE_CONTAINER",
39009 : .struct_size = sizeof(struct RPC_BIDI_RESPONSE_CONTAINER ),
39010 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_RPC_BIDI_RESPONSE_CONTAINER,
39011 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_RPC_BIDI_RESPONSE_CONTAINER,
39012 : .ndr_print = (ndr_print_function_t) ndr_print_flags_RPC_BIDI_RESPONSE_CONTAINER,
39013 : },
39014 : {
39015 : .name = "spoolss_CorePrinterDriver",
39016 : .struct_size = sizeof(struct spoolss_CorePrinterDriver ),
39017 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_CorePrinterDriver,
39018 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_CorePrinterDriver,
39019 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_CorePrinterDriver,
39020 : },
39021 : {
39022 : .name = "spoolss_PrintPropertyValue",
39023 : .struct_size = sizeof(struct spoolss_PrintPropertyValue ),
39024 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrintPropertyValue,
39025 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrintPropertyValue,
39026 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrintPropertyValue,
39027 : },
39028 : {
39029 : .name = "spoolss_PrintNamedProperty",
39030 : .struct_size = sizeof(struct spoolss_PrintNamedProperty ),
39031 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_PrintNamedProperty,
39032 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrintNamedProperty,
39033 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_PrintNamedProperty,
39034 : },
39035 : {
39036 : .name = "spoolss_BranchOfficeJobDataContainer",
39037 : .struct_size = sizeof(struct spoolss_BranchOfficeJobDataContainer ),
39038 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_spoolss_BranchOfficeJobDataContainer,
39039 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_spoolss_BranchOfficeJobDataContainer,
39040 : .ndr_print = (ndr_print_function_t) ndr_print_flags_spoolss_BranchOfficeJobDataContainer,
39041 : },
39042 : { .name = NULL }
39043 : };
39044 :
39045 : static const struct ndr_interface_call spoolss_calls[] = {
39046 : {
39047 : "spoolss_EnumPrinters",
39048 : sizeof(struct spoolss_EnumPrinters),
39049 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrinters,
39050 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrinters,
39051 : (ndr_print_function_t) ndr_print_spoolss_EnumPrinters,
39052 : { 0, NULL },
39053 : { 0, NULL },
39054 : },
39055 : {
39056 : "spoolss_OpenPrinter",
39057 : sizeof(struct spoolss_OpenPrinter),
39058 : (ndr_push_flags_fn_t) ndr_push_spoolss_OpenPrinter,
39059 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_OpenPrinter,
39060 : (ndr_print_function_t) ndr_print_spoolss_OpenPrinter,
39061 : { 0, NULL },
39062 : { 0, NULL },
39063 : },
39064 : {
39065 : "spoolss_SetJob",
39066 : sizeof(struct spoolss_SetJob),
39067 : (ndr_push_flags_fn_t) ndr_push_spoolss_SetJob,
39068 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetJob,
39069 : (ndr_print_function_t) ndr_print_spoolss_SetJob,
39070 : { 0, NULL },
39071 : { 0, NULL },
39072 : },
39073 : {
39074 : "spoolss_GetJob",
39075 : sizeof(struct spoolss_GetJob),
39076 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetJob,
39077 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetJob,
39078 : (ndr_print_function_t) ndr_print_spoolss_GetJob,
39079 : { 0, NULL },
39080 : { 0, NULL },
39081 : },
39082 : {
39083 : "spoolss_EnumJobs",
39084 : sizeof(struct spoolss_EnumJobs),
39085 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumJobs,
39086 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumJobs,
39087 : (ndr_print_function_t) ndr_print_spoolss_EnumJobs,
39088 : { 0, NULL },
39089 : { 0, NULL },
39090 : },
39091 : {
39092 : "spoolss_AddPrinter",
39093 : sizeof(struct spoolss_AddPrinter),
39094 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrinter,
39095 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrinter,
39096 : (ndr_print_function_t) ndr_print_spoolss_AddPrinter,
39097 : { 0, NULL },
39098 : { 0, NULL },
39099 : },
39100 : {
39101 : "spoolss_DeletePrinter",
39102 : sizeof(struct spoolss_DeletePrinter),
39103 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinter,
39104 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinter,
39105 : (ndr_print_function_t) ndr_print_spoolss_DeletePrinter,
39106 : { 0, NULL },
39107 : { 0, NULL },
39108 : },
39109 : {
39110 : "spoolss_SetPrinter",
39111 : sizeof(struct spoolss_SetPrinter),
39112 : (ndr_push_flags_fn_t) ndr_push_spoolss_SetPrinter,
39113 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPrinter,
39114 : (ndr_print_function_t) ndr_print_spoolss_SetPrinter,
39115 : { 0, NULL },
39116 : { 0, NULL },
39117 : },
39118 : {
39119 : "spoolss_GetPrinter",
39120 : sizeof(struct spoolss_GetPrinter),
39121 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinter,
39122 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinter,
39123 : (ndr_print_function_t) ndr_print_spoolss_GetPrinter,
39124 : { 0, NULL },
39125 : { 0, NULL },
39126 : },
39127 : {
39128 : "spoolss_AddPrinterDriver",
39129 : sizeof(struct spoolss_AddPrinterDriver),
39130 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrinterDriver,
39131 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrinterDriver,
39132 : (ndr_print_function_t) ndr_print_spoolss_AddPrinterDriver,
39133 : { 0, NULL },
39134 : { 0, NULL },
39135 : },
39136 : {
39137 : "spoolss_EnumPrinterDrivers",
39138 : sizeof(struct spoolss_EnumPrinterDrivers),
39139 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrinterDrivers,
39140 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrinterDrivers,
39141 : (ndr_print_function_t) ndr_print_spoolss_EnumPrinterDrivers,
39142 : { 0, NULL },
39143 : { 0, NULL },
39144 : },
39145 : {
39146 : "spoolss_GetPrinterDriver",
39147 : sizeof(struct spoolss_GetPrinterDriver),
39148 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterDriver,
39149 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterDriver,
39150 : (ndr_print_function_t) ndr_print_spoolss_GetPrinterDriver,
39151 : { 0, NULL },
39152 : { 0, NULL },
39153 : },
39154 : {
39155 : "spoolss_GetPrinterDriverDirectory",
39156 : sizeof(struct spoolss_GetPrinterDriverDirectory),
39157 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterDriverDirectory,
39158 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterDriverDirectory,
39159 : (ndr_print_function_t) ndr_print_spoolss_GetPrinterDriverDirectory,
39160 : { 0, NULL },
39161 : { 0, NULL },
39162 : },
39163 : {
39164 : "spoolss_DeletePrinterDriver",
39165 : sizeof(struct spoolss_DeletePrinterDriver),
39166 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterDriver,
39167 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterDriver,
39168 : (ndr_print_function_t) ndr_print_spoolss_DeletePrinterDriver,
39169 : { 0, NULL },
39170 : { 0, NULL },
39171 : },
39172 : {
39173 : "spoolss_AddPrintProcessor",
39174 : sizeof(struct spoolss_AddPrintProcessor),
39175 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrintProcessor,
39176 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrintProcessor,
39177 : (ndr_print_function_t) ndr_print_spoolss_AddPrintProcessor,
39178 : { 0, NULL },
39179 : { 0, NULL },
39180 : },
39181 : {
39182 : "spoolss_EnumPrintProcessors",
39183 : sizeof(struct spoolss_EnumPrintProcessors),
39184 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrintProcessors,
39185 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrintProcessors,
39186 : (ndr_print_function_t) ndr_print_spoolss_EnumPrintProcessors,
39187 : { 0, NULL },
39188 : { 0, NULL },
39189 : },
39190 : {
39191 : "spoolss_GetPrintProcessorDirectory",
39192 : sizeof(struct spoolss_GetPrintProcessorDirectory),
39193 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrintProcessorDirectory,
39194 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrintProcessorDirectory,
39195 : (ndr_print_function_t) ndr_print_spoolss_GetPrintProcessorDirectory,
39196 : { 0, NULL },
39197 : { 0, NULL },
39198 : },
39199 : {
39200 : "spoolss_StartDocPrinter",
39201 : sizeof(struct spoolss_StartDocPrinter),
39202 : (ndr_push_flags_fn_t) ndr_push_spoolss_StartDocPrinter,
39203 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_StartDocPrinter,
39204 : (ndr_print_function_t) ndr_print_spoolss_StartDocPrinter,
39205 : { 0, NULL },
39206 : { 0, NULL },
39207 : },
39208 : {
39209 : "spoolss_StartPagePrinter",
39210 : sizeof(struct spoolss_StartPagePrinter),
39211 : (ndr_push_flags_fn_t) ndr_push_spoolss_StartPagePrinter,
39212 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_StartPagePrinter,
39213 : (ndr_print_function_t) ndr_print_spoolss_StartPagePrinter,
39214 : { 0, NULL },
39215 : { 0, NULL },
39216 : },
39217 : {
39218 : "spoolss_WritePrinter",
39219 : sizeof(struct spoolss_WritePrinter),
39220 : (ndr_push_flags_fn_t) ndr_push_spoolss_WritePrinter,
39221 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_WritePrinter,
39222 : (ndr_print_function_t) ndr_print_spoolss_WritePrinter,
39223 : { 0, NULL },
39224 : { 0, NULL },
39225 : },
39226 : {
39227 : "spoolss_EndPagePrinter",
39228 : sizeof(struct spoolss_EndPagePrinter),
39229 : (ndr_push_flags_fn_t) ndr_push_spoolss_EndPagePrinter,
39230 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EndPagePrinter,
39231 : (ndr_print_function_t) ndr_print_spoolss_EndPagePrinter,
39232 : { 0, NULL },
39233 : { 0, NULL },
39234 : },
39235 : {
39236 : "spoolss_AbortPrinter",
39237 : sizeof(struct spoolss_AbortPrinter),
39238 : (ndr_push_flags_fn_t) ndr_push_spoolss_AbortPrinter,
39239 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AbortPrinter,
39240 : (ndr_print_function_t) ndr_print_spoolss_AbortPrinter,
39241 : { 0, NULL },
39242 : { 0, NULL },
39243 : },
39244 : {
39245 : "spoolss_ReadPrinter",
39246 : sizeof(struct spoolss_ReadPrinter),
39247 : (ndr_push_flags_fn_t) ndr_push_spoolss_ReadPrinter,
39248 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_ReadPrinter,
39249 : (ndr_print_function_t) ndr_print_spoolss_ReadPrinter,
39250 : { 0, NULL },
39251 : { 0, NULL },
39252 : },
39253 : {
39254 : "spoolss_EndDocPrinter",
39255 : sizeof(struct spoolss_EndDocPrinter),
39256 : (ndr_push_flags_fn_t) ndr_push_spoolss_EndDocPrinter,
39257 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EndDocPrinter,
39258 : (ndr_print_function_t) ndr_print_spoolss_EndDocPrinter,
39259 : { 0, NULL },
39260 : { 0, NULL },
39261 : },
39262 : {
39263 : "spoolss_AddJob",
39264 : sizeof(struct spoolss_AddJob),
39265 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddJob,
39266 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddJob,
39267 : (ndr_print_function_t) ndr_print_spoolss_AddJob,
39268 : { 0, NULL },
39269 : { 0, NULL },
39270 : },
39271 : {
39272 : "spoolss_ScheduleJob",
39273 : sizeof(struct spoolss_ScheduleJob),
39274 : (ndr_push_flags_fn_t) ndr_push_spoolss_ScheduleJob,
39275 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_ScheduleJob,
39276 : (ndr_print_function_t) ndr_print_spoolss_ScheduleJob,
39277 : { 0, NULL },
39278 : { 0, NULL },
39279 : },
39280 : {
39281 : "spoolss_GetPrinterData",
39282 : sizeof(struct spoolss_GetPrinterData),
39283 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterData,
39284 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterData,
39285 : (ndr_print_function_t) ndr_print_spoolss_GetPrinterData,
39286 : { 0, NULL },
39287 : { 0, NULL },
39288 : },
39289 : {
39290 : "spoolss_SetPrinterData",
39291 : sizeof(struct spoolss_SetPrinterData),
39292 : (ndr_push_flags_fn_t) ndr_push_spoolss_SetPrinterData,
39293 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPrinterData,
39294 : (ndr_print_function_t) ndr_print_spoolss_SetPrinterData,
39295 : { 0, NULL },
39296 : { 0, NULL },
39297 : },
39298 : {
39299 : "spoolss_WaitForPrinterChange",
39300 : sizeof(struct spoolss_WaitForPrinterChange),
39301 : (ndr_push_flags_fn_t) ndr_push_spoolss_WaitForPrinterChange,
39302 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_WaitForPrinterChange,
39303 : (ndr_print_function_t) ndr_print_spoolss_WaitForPrinterChange,
39304 : { 0, NULL },
39305 : { 0, NULL },
39306 : },
39307 : {
39308 : "spoolss_ClosePrinter",
39309 : sizeof(struct spoolss_ClosePrinter),
39310 : (ndr_push_flags_fn_t) ndr_push_spoolss_ClosePrinter,
39311 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_ClosePrinter,
39312 : (ndr_print_function_t) ndr_print_spoolss_ClosePrinter,
39313 : { 0, NULL },
39314 : { 0, NULL },
39315 : },
39316 : {
39317 : "spoolss_AddForm",
39318 : sizeof(struct spoolss_AddForm),
39319 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddForm,
39320 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddForm,
39321 : (ndr_print_function_t) ndr_print_spoolss_AddForm,
39322 : { 0, NULL },
39323 : { 0, NULL },
39324 : },
39325 : {
39326 : "spoolss_DeleteForm",
39327 : sizeof(struct spoolss_DeleteForm),
39328 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeleteForm,
39329 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeleteForm,
39330 : (ndr_print_function_t) ndr_print_spoolss_DeleteForm,
39331 : { 0, NULL },
39332 : { 0, NULL },
39333 : },
39334 : {
39335 : "spoolss_GetForm",
39336 : sizeof(struct spoolss_GetForm),
39337 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetForm,
39338 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetForm,
39339 : (ndr_print_function_t) ndr_print_spoolss_GetForm,
39340 : { 0, NULL },
39341 : { 0, NULL },
39342 : },
39343 : {
39344 : "spoolss_SetForm",
39345 : sizeof(struct spoolss_SetForm),
39346 : (ndr_push_flags_fn_t) ndr_push_spoolss_SetForm,
39347 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetForm,
39348 : (ndr_print_function_t) ndr_print_spoolss_SetForm,
39349 : { 0, NULL },
39350 : { 0, NULL },
39351 : },
39352 : {
39353 : "spoolss_EnumForms",
39354 : sizeof(struct spoolss_EnumForms),
39355 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumForms,
39356 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumForms,
39357 : (ndr_print_function_t) ndr_print_spoolss_EnumForms,
39358 : { 0, NULL },
39359 : { 0, NULL },
39360 : },
39361 : {
39362 : "spoolss_EnumPorts",
39363 : sizeof(struct spoolss_EnumPorts),
39364 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPorts,
39365 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPorts,
39366 : (ndr_print_function_t) ndr_print_spoolss_EnumPorts,
39367 : { 0, NULL },
39368 : { 0, NULL },
39369 : },
39370 : {
39371 : "spoolss_EnumMonitors",
39372 : sizeof(struct spoolss_EnumMonitors),
39373 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumMonitors,
39374 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumMonitors,
39375 : (ndr_print_function_t) ndr_print_spoolss_EnumMonitors,
39376 : { 0, NULL },
39377 : { 0, NULL },
39378 : },
39379 : {
39380 : "spoolss_AddPort",
39381 : sizeof(struct spoolss_AddPort),
39382 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddPort,
39383 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPort,
39384 : (ndr_print_function_t) ndr_print_spoolss_AddPort,
39385 : { 0, NULL },
39386 : { 0, NULL },
39387 : },
39388 : {
39389 : "spoolss_ConfigurePort",
39390 : sizeof(struct spoolss_ConfigurePort),
39391 : (ndr_push_flags_fn_t) ndr_push_spoolss_ConfigurePort,
39392 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_ConfigurePort,
39393 : (ndr_print_function_t) ndr_print_spoolss_ConfigurePort,
39394 : { 0, NULL },
39395 : { 0, NULL },
39396 : },
39397 : {
39398 : "spoolss_DeletePort",
39399 : sizeof(struct spoolss_DeletePort),
39400 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePort,
39401 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePort,
39402 : (ndr_print_function_t) ndr_print_spoolss_DeletePort,
39403 : { 0, NULL },
39404 : { 0, NULL },
39405 : },
39406 : {
39407 : "spoolss_CreatePrinterIC",
39408 : sizeof(struct spoolss_CreatePrinterIC),
39409 : (ndr_push_flags_fn_t) ndr_push_spoolss_CreatePrinterIC,
39410 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_CreatePrinterIC,
39411 : (ndr_print_function_t) ndr_print_spoolss_CreatePrinterIC,
39412 : { 0, NULL },
39413 : { 0, NULL },
39414 : },
39415 : {
39416 : "spoolss_PlayGDIScriptOnPrinterIC",
39417 : sizeof(struct spoolss_PlayGDIScriptOnPrinterIC),
39418 : (ndr_push_flags_fn_t) ndr_push_spoolss_PlayGDIScriptOnPrinterIC,
39419 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_PlayGDIScriptOnPrinterIC,
39420 : (ndr_print_function_t) ndr_print_spoolss_PlayGDIScriptOnPrinterIC,
39421 : { 0, NULL },
39422 : { 0, NULL },
39423 : },
39424 : {
39425 : "spoolss_DeletePrinterIC",
39426 : sizeof(struct spoolss_DeletePrinterIC),
39427 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterIC,
39428 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterIC,
39429 : (ndr_print_function_t) ndr_print_spoolss_DeletePrinterIC,
39430 : { 0, NULL },
39431 : { 0, NULL },
39432 : },
39433 : {
39434 : "spoolss_AddPrinterConnection",
39435 : sizeof(struct spoolss_AddPrinterConnection),
39436 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrinterConnection,
39437 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrinterConnection,
39438 : (ndr_print_function_t) ndr_print_spoolss_AddPrinterConnection,
39439 : { 0, NULL },
39440 : { 0, NULL },
39441 : },
39442 : {
39443 : "spoolss_DeletePrinterConnection",
39444 : sizeof(struct spoolss_DeletePrinterConnection),
39445 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterConnection,
39446 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterConnection,
39447 : (ndr_print_function_t) ndr_print_spoolss_DeletePrinterConnection,
39448 : { 0, NULL },
39449 : { 0, NULL },
39450 : },
39451 : {
39452 : "spoolss_PrinterMessageBox",
39453 : sizeof(struct spoolss_PrinterMessageBox),
39454 : (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterMessageBox,
39455 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterMessageBox,
39456 : (ndr_print_function_t) ndr_print_spoolss_PrinterMessageBox,
39457 : { 0, NULL },
39458 : { 0, NULL },
39459 : },
39460 : {
39461 : "spoolss_AddMonitor",
39462 : sizeof(struct spoolss_AddMonitor),
39463 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddMonitor,
39464 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddMonitor,
39465 : (ndr_print_function_t) ndr_print_spoolss_AddMonitor,
39466 : { 0, NULL },
39467 : { 0, NULL },
39468 : },
39469 : {
39470 : "spoolss_DeleteMonitor",
39471 : sizeof(struct spoolss_DeleteMonitor),
39472 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeleteMonitor,
39473 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeleteMonitor,
39474 : (ndr_print_function_t) ndr_print_spoolss_DeleteMonitor,
39475 : { 0, NULL },
39476 : { 0, NULL },
39477 : },
39478 : {
39479 : "spoolss_DeletePrintProcessor",
39480 : sizeof(struct spoolss_DeletePrintProcessor),
39481 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrintProcessor,
39482 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrintProcessor,
39483 : (ndr_print_function_t) ndr_print_spoolss_DeletePrintProcessor,
39484 : { 0, NULL },
39485 : { 0, NULL },
39486 : },
39487 : {
39488 : "spoolss_AddPrintProvidor",
39489 : sizeof(struct spoolss_AddPrintProvidor),
39490 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrintProvidor,
39491 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrintProvidor,
39492 : (ndr_print_function_t) ndr_print_spoolss_AddPrintProvidor,
39493 : { 0, NULL },
39494 : { 0, NULL },
39495 : },
39496 : {
39497 : "spoolss_DeletePrintProvidor",
39498 : sizeof(struct spoolss_DeletePrintProvidor),
39499 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrintProvidor,
39500 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrintProvidor,
39501 : (ndr_print_function_t) ndr_print_spoolss_DeletePrintProvidor,
39502 : { 0, NULL },
39503 : { 0, NULL },
39504 : },
39505 : {
39506 : "spoolss_EnumPrintProcessorDataTypes",
39507 : sizeof(struct spoolss_EnumPrintProcessorDataTypes),
39508 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrintProcessorDataTypes,
39509 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrintProcessorDataTypes,
39510 : (ndr_print_function_t) ndr_print_spoolss_EnumPrintProcessorDataTypes,
39511 : { 0, NULL },
39512 : { 0, NULL },
39513 : },
39514 : {
39515 : "spoolss_ResetPrinter",
39516 : sizeof(struct spoolss_ResetPrinter),
39517 : (ndr_push_flags_fn_t) ndr_push_spoolss_ResetPrinter,
39518 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_ResetPrinter,
39519 : (ndr_print_function_t) ndr_print_spoolss_ResetPrinter,
39520 : { 0, NULL },
39521 : { 0, NULL },
39522 : },
39523 : {
39524 : "spoolss_GetPrinterDriver2",
39525 : sizeof(struct spoolss_GetPrinterDriver2),
39526 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterDriver2,
39527 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterDriver2,
39528 : (ndr_print_function_t) ndr_print_spoolss_GetPrinterDriver2,
39529 : { 0, NULL },
39530 : { 0, NULL },
39531 : },
39532 : {
39533 : "spoolss_FindFirstPrinterChangeNotification",
39534 : sizeof(struct spoolss_FindFirstPrinterChangeNotification),
39535 : (ndr_push_flags_fn_t) ndr_push_spoolss_FindFirstPrinterChangeNotification,
39536 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_FindFirstPrinterChangeNotification,
39537 : (ndr_print_function_t) ndr_print_spoolss_FindFirstPrinterChangeNotification,
39538 : { 0, NULL },
39539 : { 0, NULL },
39540 : },
39541 : {
39542 : "spoolss_FindNextPrinterChangeNotification",
39543 : sizeof(struct spoolss_FindNextPrinterChangeNotification),
39544 : (ndr_push_flags_fn_t) ndr_push_spoolss_FindNextPrinterChangeNotification,
39545 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_FindNextPrinterChangeNotification,
39546 : (ndr_print_function_t) ndr_print_spoolss_FindNextPrinterChangeNotification,
39547 : { 0, NULL },
39548 : { 0, NULL },
39549 : },
39550 : {
39551 : "spoolss_FindClosePrinterNotify",
39552 : sizeof(struct spoolss_FindClosePrinterNotify),
39553 : (ndr_push_flags_fn_t) ndr_push_spoolss_FindClosePrinterNotify,
39554 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_FindClosePrinterNotify,
39555 : (ndr_print_function_t) ndr_print_spoolss_FindClosePrinterNotify,
39556 : { 0, NULL },
39557 : { 0, NULL },
39558 : },
39559 : {
39560 : "spoolss_RouterFindFirstPrinterChangeNotificationOld",
39561 : sizeof(struct spoolss_RouterFindFirstPrinterChangeNotificationOld),
39562 : (ndr_push_flags_fn_t) ndr_push_spoolss_RouterFindFirstPrinterChangeNotificationOld,
39563 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterFindFirstPrinterChangeNotificationOld,
39564 : (ndr_print_function_t) ndr_print_spoolss_RouterFindFirstPrinterChangeNotificationOld,
39565 : { 0, NULL },
39566 : { 0, NULL },
39567 : },
39568 : {
39569 : "spoolss_ReplyOpenPrinter",
39570 : sizeof(struct spoolss_ReplyOpenPrinter),
39571 : (ndr_push_flags_fn_t) ndr_push_spoolss_ReplyOpenPrinter,
39572 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_ReplyOpenPrinter,
39573 : (ndr_print_function_t) ndr_print_spoolss_ReplyOpenPrinter,
39574 : { 0, NULL },
39575 : { 0, NULL },
39576 : },
39577 : {
39578 : "spoolss_RouterReplyPrinter",
39579 : sizeof(struct spoolss_RouterReplyPrinter),
39580 : (ndr_push_flags_fn_t) ndr_push_spoolss_RouterReplyPrinter,
39581 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterReplyPrinter,
39582 : (ndr_print_function_t) ndr_print_spoolss_RouterReplyPrinter,
39583 : { 0, NULL },
39584 : { 0, NULL },
39585 : },
39586 : {
39587 : "spoolss_ReplyClosePrinter",
39588 : sizeof(struct spoolss_ReplyClosePrinter),
39589 : (ndr_push_flags_fn_t) ndr_push_spoolss_ReplyClosePrinter,
39590 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_ReplyClosePrinter,
39591 : (ndr_print_function_t) ndr_print_spoolss_ReplyClosePrinter,
39592 : { 0, NULL },
39593 : { 0, NULL },
39594 : },
39595 : {
39596 : "spoolss_AddPortEx",
39597 : sizeof(struct spoolss_AddPortEx),
39598 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddPortEx,
39599 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPortEx,
39600 : (ndr_print_function_t) ndr_print_spoolss_AddPortEx,
39601 : { 0, NULL },
39602 : { 0, NULL },
39603 : },
39604 : {
39605 : "spoolss_RouterFindFirstPrinterChangeNotification",
39606 : sizeof(struct spoolss_RouterFindFirstPrinterChangeNotification),
39607 : (ndr_push_flags_fn_t) ndr_push_spoolss_RouterFindFirstPrinterChangeNotification,
39608 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterFindFirstPrinterChangeNotification,
39609 : (ndr_print_function_t) ndr_print_spoolss_RouterFindFirstPrinterChangeNotification,
39610 : { 0, NULL },
39611 : { 0, NULL },
39612 : },
39613 : {
39614 : "spoolss_SpoolerInit",
39615 : sizeof(struct spoolss_SpoolerInit),
39616 : (ndr_push_flags_fn_t) ndr_push_spoolss_SpoolerInit,
39617 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_SpoolerInit,
39618 : (ndr_print_function_t) ndr_print_spoolss_SpoolerInit,
39619 : { 0, NULL },
39620 : { 0, NULL },
39621 : },
39622 : {
39623 : "spoolss_ResetPrinterEx",
39624 : sizeof(struct spoolss_ResetPrinterEx),
39625 : (ndr_push_flags_fn_t) ndr_push_spoolss_ResetPrinterEx,
39626 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_ResetPrinterEx,
39627 : (ndr_print_function_t) ndr_print_spoolss_ResetPrinterEx,
39628 : { 0, NULL },
39629 : { 0, NULL },
39630 : },
39631 : {
39632 : "spoolss_RemoteFindFirstPrinterChangeNotifyEx",
39633 : sizeof(struct spoolss_RemoteFindFirstPrinterChangeNotifyEx),
39634 : (ndr_push_flags_fn_t) ndr_push_spoolss_RemoteFindFirstPrinterChangeNotifyEx,
39635 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_RemoteFindFirstPrinterChangeNotifyEx,
39636 : (ndr_print_function_t) ndr_print_spoolss_RemoteFindFirstPrinterChangeNotifyEx,
39637 : { 0, NULL },
39638 : { 0, NULL },
39639 : },
39640 : {
39641 : "spoolss_RouterReplyPrinterEx",
39642 : sizeof(struct spoolss_RouterReplyPrinterEx),
39643 : (ndr_push_flags_fn_t) ndr_push_spoolss_RouterReplyPrinterEx,
39644 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterReplyPrinterEx,
39645 : (ndr_print_function_t) ndr_print_spoolss_RouterReplyPrinterEx,
39646 : { 0, NULL },
39647 : { 0, NULL },
39648 : },
39649 : {
39650 : "spoolss_RouterRefreshPrinterChangeNotify",
39651 : sizeof(struct spoolss_RouterRefreshPrinterChangeNotify),
39652 : (ndr_push_flags_fn_t) ndr_push_spoolss_RouterRefreshPrinterChangeNotify,
39653 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterRefreshPrinterChangeNotify,
39654 : (ndr_print_function_t) ndr_print_spoolss_RouterRefreshPrinterChangeNotify,
39655 : { 0, NULL },
39656 : { 0, NULL },
39657 : },
39658 : {
39659 : "spoolss_44",
39660 : sizeof(struct spoolss_44),
39661 : (ndr_push_flags_fn_t) ndr_push_spoolss_44,
39662 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_44,
39663 : (ndr_print_function_t) ndr_print_spoolss_44,
39664 : { 0, NULL },
39665 : { 0, NULL },
39666 : },
39667 : {
39668 : "spoolss_OpenPrinterEx",
39669 : sizeof(struct spoolss_OpenPrinterEx),
39670 : (ndr_push_flags_fn_t) ndr_push_spoolss_OpenPrinterEx,
39671 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_OpenPrinterEx,
39672 : (ndr_print_function_t) ndr_print_spoolss_OpenPrinterEx,
39673 : { 0, NULL },
39674 : { 0, NULL },
39675 : },
39676 : {
39677 : "spoolss_AddPrinterEx",
39678 : sizeof(struct spoolss_AddPrinterEx),
39679 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrinterEx,
39680 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrinterEx,
39681 : (ndr_print_function_t) ndr_print_spoolss_AddPrinterEx,
39682 : { 0, NULL },
39683 : { 0, NULL },
39684 : },
39685 : {
39686 : "spoolss_SetPort",
39687 : sizeof(struct spoolss_SetPort),
39688 : (ndr_push_flags_fn_t) ndr_push_spoolss_SetPort,
39689 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPort,
39690 : (ndr_print_function_t) ndr_print_spoolss_SetPort,
39691 : { 0, NULL },
39692 : { 0, NULL },
39693 : },
39694 : {
39695 : "spoolss_EnumPrinterData",
39696 : sizeof(struct spoolss_EnumPrinterData),
39697 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrinterData,
39698 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrinterData,
39699 : (ndr_print_function_t) ndr_print_spoolss_EnumPrinterData,
39700 : { 0, NULL },
39701 : { 0, NULL },
39702 : },
39703 : {
39704 : "spoolss_DeletePrinterData",
39705 : sizeof(struct spoolss_DeletePrinterData),
39706 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterData,
39707 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterData,
39708 : (ndr_print_function_t) ndr_print_spoolss_DeletePrinterData,
39709 : { 0, NULL },
39710 : { 0, NULL },
39711 : },
39712 : {
39713 : "spoolss_4a",
39714 : sizeof(struct spoolss_4a),
39715 : (ndr_push_flags_fn_t) ndr_push_spoolss_4a,
39716 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_4a,
39717 : (ndr_print_function_t) ndr_print_spoolss_4a,
39718 : { 0, NULL },
39719 : { 0, NULL },
39720 : },
39721 : {
39722 : "spoolss_4b",
39723 : sizeof(struct spoolss_4b),
39724 : (ndr_push_flags_fn_t) ndr_push_spoolss_4b,
39725 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_4b,
39726 : (ndr_print_function_t) ndr_print_spoolss_4b,
39727 : { 0, NULL },
39728 : { 0, NULL },
39729 : },
39730 : {
39731 : "spoolss_4c",
39732 : sizeof(struct spoolss_4c),
39733 : (ndr_push_flags_fn_t) ndr_push_spoolss_4c,
39734 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_4c,
39735 : (ndr_print_function_t) ndr_print_spoolss_4c,
39736 : { 0, NULL },
39737 : { 0, NULL },
39738 : },
39739 : {
39740 : "spoolss_SetPrinterDataEx",
39741 : sizeof(struct spoolss_SetPrinterDataEx),
39742 : (ndr_push_flags_fn_t) ndr_push_spoolss_SetPrinterDataEx,
39743 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPrinterDataEx,
39744 : (ndr_print_function_t) ndr_print_spoolss_SetPrinterDataEx,
39745 : { 0, NULL },
39746 : { 0, NULL },
39747 : },
39748 : {
39749 : "spoolss_GetPrinterDataEx",
39750 : sizeof(struct spoolss_GetPrinterDataEx),
39751 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterDataEx,
39752 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterDataEx,
39753 : (ndr_print_function_t) ndr_print_spoolss_GetPrinterDataEx,
39754 : { 0, NULL },
39755 : { 0, NULL },
39756 : },
39757 : {
39758 : "spoolss_EnumPrinterDataEx",
39759 : sizeof(struct spoolss_EnumPrinterDataEx),
39760 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrinterDataEx,
39761 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrinterDataEx,
39762 : (ndr_print_function_t) ndr_print_spoolss_EnumPrinterDataEx,
39763 : { 0, NULL },
39764 : { 0, NULL },
39765 : },
39766 : {
39767 : "spoolss_EnumPrinterKey",
39768 : sizeof(struct spoolss_EnumPrinterKey),
39769 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrinterKey,
39770 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrinterKey,
39771 : (ndr_print_function_t) ndr_print_spoolss_EnumPrinterKey,
39772 : { 0, NULL },
39773 : { 0, NULL },
39774 : },
39775 : {
39776 : "spoolss_DeletePrinterDataEx",
39777 : sizeof(struct spoolss_DeletePrinterDataEx),
39778 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterDataEx,
39779 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterDataEx,
39780 : (ndr_print_function_t) ndr_print_spoolss_DeletePrinterDataEx,
39781 : { 0, NULL },
39782 : { 0, NULL },
39783 : },
39784 : {
39785 : "spoolss_DeletePrinterKey",
39786 : sizeof(struct spoolss_DeletePrinterKey),
39787 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterKey,
39788 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterKey,
39789 : (ndr_print_function_t) ndr_print_spoolss_DeletePrinterKey,
39790 : { 0, NULL },
39791 : { 0, NULL },
39792 : },
39793 : {
39794 : "spoolss_53",
39795 : sizeof(struct spoolss_53),
39796 : (ndr_push_flags_fn_t) ndr_push_spoolss_53,
39797 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_53,
39798 : (ndr_print_function_t) ndr_print_spoolss_53,
39799 : { 0, NULL },
39800 : { 0, NULL },
39801 : },
39802 : {
39803 : "spoolss_DeletePrinterDriverEx",
39804 : sizeof(struct spoolss_DeletePrinterDriverEx),
39805 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterDriverEx,
39806 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterDriverEx,
39807 : (ndr_print_function_t) ndr_print_spoolss_DeletePrinterDriverEx,
39808 : { 0, NULL },
39809 : { 0, NULL },
39810 : },
39811 : {
39812 : "spoolss_AddPerMachineConnection",
39813 : sizeof(struct spoolss_AddPerMachineConnection),
39814 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddPerMachineConnection,
39815 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPerMachineConnection,
39816 : (ndr_print_function_t) ndr_print_spoolss_AddPerMachineConnection,
39817 : { 0, NULL },
39818 : { 0, NULL },
39819 : },
39820 : {
39821 : "spoolss_DeletePerMachineConnection",
39822 : sizeof(struct spoolss_DeletePerMachineConnection),
39823 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePerMachineConnection,
39824 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePerMachineConnection,
39825 : (ndr_print_function_t) ndr_print_spoolss_DeletePerMachineConnection,
39826 : { 0, NULL },
39827 : { 0, NULL },
39828 : },
39829 : {
39830 : "spoolss_EnumPerMachineConnections",
39831 : sizeof(struct spoolss_EnumPerMachineConnections),
39832 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPerMachineConnections,
39833 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPerMachineConnections,
39834 : (ndr_print_function_t) ndr_print_spoolss_EnumPerMachineConnections,
39835 : { 0, NULL },
39836 : { 0, NULL },
39837 : },
39838 : {
39839 : "spoolss_XcvData",
39840 : sizeof(struct spoolss_XcvData),
39841 : (ndr_push_flags_fn_t) ndr_push_spoolss_XcvData,
39842 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_XcvData,
39843 : (ndr_print_function_t) ndr_print_spoolss_XcvData,
39844 : { 0, NULL },
39845 : { 0, NULL },
39846 : },
39847 : {
39848 : "spoolss_AddPrinterDriverEx",
39849 : sizeof(struct spoolss_AddPrinterDriverEx),
39850 : (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrinterDriverEx,
39851 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrinterDriverEx,
39852 : (ndr_print_function_t) ndr_print_spoolss_AddPrinterDriverEx,
39853 : { 0, NULL },
39854 : { 0, NULL },
39855 : },
39856 : {
39857 : "spoolss_5a",
39858 : sizeof(struct spoolss_5a),
39859 : (ndr_push_flags_fn_t) ndr_push_spoolss_5a,
39860 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_5a,
39861 : (ndr_print_function_t) ndr_print_spoolss_5a,
39862 : { 0, NULL },
39863 : { 0, NULL },
39864 : },
39865 : {
39866 : "spoolss_5b",
39867 : sizeof(struct spoolss_5b),
39868 : (ndr_push_flags_fn_t) ndr_push_spoolss_5b,
39869 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_5b,
39870 : (ndr_print_function_t) ndr_print_spoolss_5b,
39871 : { 0, NULL },
39872 : { 0, NULL },
39873 : },
39874 : {
39875 : "spoolss_5c",
39876 : sizeof(struct spoolss_5c),
39877 : (ndr_push_flags_fn_t) ndr_push_spoolss_5c,
39878 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_5c,
39879 : (ndr_print_function_t) ndr_print_spoolss_5c,
39880 : { 0, NULL },
39881 : { 0, NULL },
39882 : },
39883 : {
39884 : "spoolss_5d",
39885 : sizeof(struct spoolss_5d),
39886 : (ndr_push_flags_fn_t) ndr_push_spoolss_5d,
39887 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_5d,
39888 : (ndr_print_function_t) ndr_print_spoolss_5d,
39889 : { 0, NULL },
39890 : { 0, NULL },
39891 : },
39892 : {
39893 : "spoolss_5e",
39894 : sizeof(struct spoolss_5e),
39895 : (ndr_push_flags_fn_t) ndr_push_spoolss_5e,
39896 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_5e,
39897 : (ndr_print_function_t) ndr_print_spoolss_5e,
39898 : { 0, NULL },
39899 : { 0, NULL },
39900 : },
39901 : {
39902 : "spoolss_5f",
39903 : sizeof(struct spoolss_5f),
39904 : (ndr_push_flags_fn_t) ndr_push_spoolss_5f,
39905 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_5f,
39906 : (ndr_print_function_t) ndr_print_spoolss_5f,
39907 : { 0, NULL },
39908 : { 0, NULL },
39909 : },
39910 : {
39911 : "spoolss_60",
39912 : sizeof(struct spoolss_60),
39913 : (ndr_push_flags_fn_t) ndr_push_spoolss_60,
39914 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_60,
39915 : (ndr_print_function_t) ndr_print_spoolss_60,
39916 : { 0, NULL },
39917 : { 0, NULL },
39918 : },
39919 : {
39920 : "spoolss_SendRecvBidiData",
39921 : sizeof(struct spoolss_SendRecvBidiData),
39922 : (ndr_push_flags_fn_t) ndr_push_spoolss_SendRecvBidiData,
39923 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_SendRecvBidiData,
39924 : (ndr_print_function_t) ndr_print_spoolss_SendRecvBidiData,
39925 : { 0, NULL },
39926 : { 0, NULL },
39927 : },
39928 : {
39929 : "spoolss_62",
39930 : sizeof(struct spoolss_62),
39931 : (ndr_push_flags_fn_t) ndr_push_spoolss_62,
39932 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_62,
39933 : (ndr_print_function_t) ndr_print_spoolss_62,
39934 : { 0, NULL },
39935 : { 0, NULL },
39936 : },
39937 : {
39938 : "spoolss_63",
39939 : sizeof(struct spoolss_63),
39940 : (ndr_push_flags_fn_t) ndr_push_spoolss_63,
39941 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_63,
39942 : (ndr_print_function_t) ndr_print_spoolss_63,
39943 : { 0, NULL },
39944 : { 0, NULL },
39945 : },
39946 : {
39947 : "spoolss_64",
39948 : sizeof(struct spoolss_64),
39949 : (ndr_push_flags_fn_t) ndr_push_spoolss_64,
39950 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_64,
39951 : (ndr_print_function_t) ndr_print_spoolss_64,
39952 : { 0, NULL },
39953 : { 0, NULL },
39954 : },
39955 : {
39956 : "spoolss_65",
39957 : sizeof(struct spoolss_65),
39958 : (ndr_push_flags_fn_t) ndr_push_spoolss_65,
39959 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_65,
39960 : (ndr_print_function_t) ndr_print_spoolss_65,
39961 : { 0, NULL },
39962 : { 0, NULL },
39963 : },
39964 : {
39965 : "spoolss_GetCorePrinterDrivers",
39966 : sizeof(struct spoolss_GetCorePrinterDrivers),
39967 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetCorePrinterDrivers,
39968 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetCorePrinterDrivers,
39969 : (ndr_print_function_t) ndr_print_spoolss_GetCorePrinterDrivers,
39970 : { 0, NULL },
39971 : { 0, NULL },
39972 : },
39973 : {
39974 : "spoolss_67",
39975 : sizeof(struct spoolss_67),
39976 : (ndr_push_flags_fn_t) ndr_push_spoolss_67,
39977 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_67,
39978 : (ndr_print_function_t) ndr_print_spoolss_67,
39979 : { 0, NULL },
39980 : { 0, NULL },
39981 : },
39982 : {
39983 : "spoolss_GetPrinterDriverPackagePath",
39984 : sizeof(struct spoolss_GetPrinterDriverPackagePath),
39985 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterDriverPackagePath,
39986 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterDriverPackagePath,
39987 : (ndr_print_function_t) ndr_print_spoolss_GetPrinterDriverPackagePath,
39988 : { 0, NULL },
39989 : { 0, NULL },
39990 : },
39991 : {
39992 : "spoolss_69",
39993 : sizeof(struct spoolss_69),
39994 : (ndr_push_flags_fn_t) ndr_push_spoolss_69,
39995 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_69,
39996 : (ndr_print_function_t) ndr_print_spoolss_69,
39997 : { 0, NULL },
39998 : { 0, NULL },
39999 : },
40000 : {
40001 : "spoolss_6a",
40002 : sizeof(struct spoolss_6a),
40003 : (ndr_push_flags_fn_t) ndr_push_spoolss_6a,
40004 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_6a,
40005 : (ndr_print_function_t) ndr_print_spoolss_6a,
40006 : { 0, NULL },
40007 : { 0, NULL },
40008 : },
40009 : {
40010 : "spoolss_6b",
40011 : sizeof(struct spoolss_6b),
40012 : (ndr_push_flags_fn_t) ndr_push_spoolss_6b,
40013 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_6b,
40014 : (ndr_print_function_t) ndr_print_spoolss_6b,
40015 : { 0, NULL },
40016 : { 0, NULL },
40017 : },
40018 : {
40019 : "spoolss_6c",
40020 : sizeof(struct spoolss_6c),
40021 : (ndr_push_flags_fn_t) ndr_push_spoolss_6c,
40022 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_6c,
40023 : (ndr_print_function_t) ndr_print_spoolss_6c,
40024 : { 0, NULL },
40025 : { 0, NULL },
40026 : },
40027 : {
40028 : "spoolss_6d",
40029 : sizeof(struct spoolss_6d),
40030 : (ndr_push_flags_fn_t) ndr_push_spoolss_6d,
40031 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_6d,
40032 : (ndr_print_function_t) ndr_print_spoolss_6d,
40033 : { 0, NULL },
40034 : { 0, NULL },
40035 : },
40036 : {
40037 : "spoolss_GetJobNamedPropertyValue",
40038 : sizeof(struct spoolss_GetJobNamedPropertyValue),
40039 : (ndr_push_flags_fn_t) ndr_push_spoolss_GetJobNamedPropertyValue,
40040 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetJobNamedPropertyValue,
40041 : (ndr_print_function_t) ndr_print_spoolss_GetJobNamedPropertyValue,
40042 : { 0, NULL },
40043 : { 0, NULL },
40044 : },
40045 : {
40046 : "spoolss_SetJobNamedProperty",
40047 : sizeof(struct spoolss_SetJobNamedProperty),
40048 : (ndr_push_flags_fn_t) ndr_push_spoolss_SetJobNamedProperty,
40049 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetJobNamedProperty,
40050 : (ndr_print_function_t) ndr_print_spoolss_SetJobNamedProperty,
40051 : { 0, NULL },
40052 : { 0, NULL },
40053 : },
40054 : {
40055 : "spoolss_DeleteJobNamedProperty",
40056 : sizeof(struct spoolss_DeleteJobNamedProperty),
40057 : (ndr_push_flags_fn_t) ndr_push_spoolss_DeleteJobNamedProperty,
40058 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeleteJobNamedProperty,
40059 : (ndr_print_function_t) ndr_print_spoolss_DeleteJobNamedProperty,
40060 : { 0, NULL },
40061 : { 0, NULL },
40062 : },
40063 : {
40064 : "spoolss_EnumJobNamedProperties",
40065 : sizeof(struct spoolss_EnumJobNamedProperties),
40066 : (ndr_push_flags_fn_t) ndr_push_spoolss_EnumJobNamedProperties,
40067 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumJobNamedProperties,
40068 : (ndr_print_function_t) ndr_print_spoolss_EnumJobNamedProperties,
40069 : { 0, NULL },
40070 : { 0, NULL },
40071 : },
40072 : {
40073 : "spoolss_72",
40074 : sizeof(struct spoolss_72),
40075 : (ndr_push_flags_fn_t) ndr_push_spoolss_72,
40076 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_72,
40077 : (ndr_print_function_t) ndr_print_spoolss_72,
40078 : { 0, NULL },
40079 : { 0, NULL },
40080 : },
40081 : {
40082 : "spoolss_73",
40083 : sizeof(struct spoolss_73),
40084 : (ndr_push_flags_fn_t) ndr_push_spoolss_73,
40085 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_73,
40086 : (ndr_print_function_t) ndr_print_spoolss_73,
40087 : { 0, NULL },
40088 : { 0, NULL },
40089 : },
40090 : {
40091 : "spoolss_LogJobInfoForBranchOffice",
40092 : sizeof(struct spoolss_LogJobInfoForBranchOffice),
40093 : (ndr_push_flags_fn_t) ndr_push_spoolss_LogJobInfoForBranchOffice,
40094 : (ndr_pull_flags_fn_t) ndr_pull_spoolss_LogJobInfoForBranchOffice,
40095 : (ndr_print_function_t) ndr_print_spoolss_LogJobInfoForBranchOffice,
40096 : { 0, NULL },
40097 : { 0, NULL },
40098 : },
40099 : { .name = NULL }
40100 : };
40101 :
40102 : static const char * const spoolss_endpoint_strings[] = {
40103 : "ncacn_np:[\\pipe\\spoolss]",
40104 : "ncalrpc:",
40105 : };
40106 :
40107 : static const struct ndr_interface_string_array spoolss_endpoints = {
40108 : .count = 2,
40109 : .names = spoolss_endpoint_strings
40110 : };
40111 :
40112 : static const char * const spoolss_authservice_strings[] = {
40113 : "host",
40114 : };
40115 :
40116 : static const struct ndr_interface_string_array spoolss_authservices = {
40117 : .count = 1,
40118 : .names = spoolss_authservice_strings
40119 : };
40120 :
40121 :
40122 : const struct ndr_interface_table ndr_table_spoolss = {
40123 : .name = "spoolss",
40124 : .syntax_id = {
40125 : {0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
40126 : NDR_SPOOLSS_VERSION
40127 : },
40128 : .helpstring = NDR_SPOOLSS_HELPSTRING,
40129 : .num_calls = 117,
40130 : .calls = spoolss_calls,
40131 : .num_public_structs = 67,
40132 : .public_structs = spoolss_public_structs,
40133 : .endpoints = &spoolss_endpoints,
40134 : .authservices = &spoolss_authservices
40135 : };
40136 :
40137 : #endif /* SKIP_NDR_TABLE_spoolss */
|