1 /*
2  * Please do not edit this file.
3  * It was generated using ndrgen.
4  */
5 
6 #include <strings.h>
7 #include <smbsrv/ndr.h>
8 #include <smbsrv/ndl/eventlog.ndl>
9 
10 extern struct ndr_typeinfo ndt__char;
11 extern struct ndr_typeinfo ndt_s_char;
12 extern struct ndr_typeinfo ndt__uchar;
13 extern struct ndr_typeinfo ndt_s_uchar;
14 extern struct ndr_typeinfo ndt__wchar;
15 extern struct ndr_typeinfo ndt_s_wchar;
16 extern struct ndr_typeinfo ndt__short;
17 extern struct ndr_typeinfo ndt_s_short;
18 extern struct ndr_typeinfo ndt__ushort;
19 extern struct ndr_typeinfo ndt_s_ushort;
20 extern struct ndr_typeinfo ndt__long;
21 extern struct ndr_typeinfo ndt_s_long;
22 extern struct ndr_typeinfo ndt__ulong;
23 extern struct ndr_typeinfo ndt_s_ulong;
24 
25 
26 
27 int ndr__logr_handle (struct ndr_reference *encl_ref);
28 struct ndr_typeinfo ndt__logr_handle = {
29 	1,		/* NDR version */
30 	3,		/* alignment */
31 	NDR_F_STRUCT,	/* flags */
32 	ndr__logr_handle,	/* ndr_func */
33 	20,		/* pdu_size_fixed_part */
34 	0,		/* pdu_size_variable_part */
35 	20,		/* c_size_fixed_part */
36 	0,		/* c_size_variable_part */
37 };
38 
39 
40 /*
41  *  */
42 int
43 ndr__logr_handle (struct ndr_reference *encl_ref)
44 {
45 	struct logr_handle *val = (struct logr_handle *) encl_ref->datum;
46 	struct ndr_reference myref;
47 
48 	(void) bzero(&myref, sizeof (myref));
49 	myref.enclosing = encl_ref;
50 	myref.stream = encl_ref->stream;
51 
52 	/* do all basic elements first */
53 	NDR_MEMBER (_ulong, data1, 0UL);
54 	NDR_MEMBER (_ulong, data2, 4UL);
55 
56 	/* do all constructed elements w/o pointers */
57 	NDR_MEMBER_ARR_WITH_DIMENSION (_ushort, data3, 8UL,
58 		2);
59 	NDR_MEMBER_ARR_WITH_DIMENSION (_uchar, data4, 12UL,
60 		8);
61 
62 	/* do members with pointers in order */
63 
64 	return 1;
65 }
66 
67 
68 
69 int ndr__logr_string (struct ndr_reference *encl_ref);
70 struct ndr_typeinfo ndt__logr_string = {
71 	1,		/* NDR version */
72 	3,		/* alignment */
73 	NDR_F_STRUCT,	/* flags */
74 	ndr__logr_string,	/* ndr_func */
75 	8,		/* pdu_size_fixed_part */
76 	0,		/* pdu_size_variable_part */
77 	8,		/* c_size_fixed_part */
78 	0,		/* c_size_variable_part */
79 };
80 
81 
82 /*
83  *  */
84 int
85 ndr__logr_string (struct ndr_reference *encl_ref)
86 {
87 	struct logr_string *val = (struct logr_string *) encl_ref->datum;
88 	struct ndr_reference myref;
89 
90 	(void) bzero(&myref, sizeof (myref));
91 	myref.enclosing = encl_ref;
92 	myref.stream = encl_ref->stream;
93 
94 	/* do all basic elements first */
95 	NDR_MEMBER (_ushort, length, 0UL);
96 	NDR_MEMBER (_ushort, allosize, 2UL);
97 
98 	/* do all constructed elements w/o pointers */
99 
100 	/* do members with pointers in order */
101 	NDR_MEMBER_PTR (s_wchar, str, 4UL);
102 
103 	return 1;
104 }
105 
106 
107 
108 int ndr__logr_record (struct ndr_reference *encl_ref);
109 struct ndr_typeinfo ndt__logr_record = {
110 	1,		/* NDR version */
111 	3,		/* alignment */
112 	NDR_F_STRUCT,	/* flags */
113 	ndr__logr_record,	/* ndr_func */
114 	860,		/* pdu_size_fixed_part */
115 	0,		/* pdu_size_variable_part */
116 	860,		/* c_size_fixed_part */
117 	0,		/* c_size_variable_part */
118 };
119 
120 
121 /*
122  *  */
123 int
124 ndr__logr_record (struct ndr_reference *encl_ref)
125 {
126 	struct logr_record *val = (struct logr_record *) encl_ref->datum;
127 	struct ndr_reference myref;
128 
129 	(void) bzero(&myref, sizeof (myref));
130 	myref.enclosing = encl_ref;
131 	myref.stream = encl_ref->stream;
132 
133 	/* do all basic elements first */
134 	NDR_MEMBER (_ulong, Length1, 0UL);
135 	NDR_MEMBER (_ulong, Reserved, 4UL);
136 	NDR_MEMBER (_ulong, RecordNumber, 8UL);
137 	NDR_MEMBER (_ulong, TimeGenerated, 12UL);
138 	NDR_MEMBER (_ulong, TimeWritten, 16UL);
139 	NDR_MEMBER (_ulong, EventID, 20UL);
140 	NDR_MEMBER (_ushort, EventType, 24UL);
141 	NDR_MEMBER (_ushort, NumStrings, 26UL);
142 	NDR_MEMBER (_ushort, EventCategory, 28UL);
143 	NDR_MEMBER (_ushort, ReservedFlags, 30UL);
144 	NDR_MEMBER (_ulong, ClosingRecordNumber, 32UL);
145 	NDR_MEMBER (_ulong, StringOffset, 36UL);
146 	NDR_MEMBER (_ulong, UserSidLength, 40UL);
147 	NDR_MEMBER (_ulong, UserSidOffset, 44UL);
148 	NDR_MEMBER (_ulong, DataLength, 48UL);
149 	NDR_MEMBER (_ulong, DataOffset, 52UL);
150 	NDR_MEMBER (_ulong, Length2, 856UL);
151 
152 	/* do all constructed elements w/o pointers */
153 	NDR_MEMBER_ARR_WITH_DIMENSION (_uchar, info, 56UL,
154 		800);
155 
156 	/* do members with pointers in order */
157 
158 	return 1;
159 }
160 
161 
162 
163 int ndr__logr_EventLogClose (struct ndr_reference *encl_ref);
164 struct ndr_typeinfo ndt__logr_EventLogClose = {
165 	1,		/* NDR version */
166 	3,		/* alignment */
167 	NDR_F_OPERATION,	/* flags */
168 	ndr__logr_EventLogClose,	/* ndr_func */
169 	44,		/* pdu_size_fixed_part */
170 	0,		/* pdu_size_variable_part */
171 	44,		/* c_size_fixed_part */
172 	0,		/* c_size_variable_part */
173 };
174 
175 
176 /*
177  * [operation(2)]
178  */
179 int
180 ndr__logr_EventLogClose (struct ndr_reference *encl_ref)
181 {
182 	struct logr_EventLogClose *val = (struct logr_EventLogClose *) encl_ref->datum;
183 	struct ndr_reference myref;
184 
185 	(void) bzero(&myref, sizeof (myref));
186 	myref.enclosing = encl_ref;
187 	myref.stream = encl_ref->stream;
188 
189 	/* do all members in order */
190     if (NDR_DIR_IS_IN) {
191 	NDR_TOPMOST_MEMBER (_logr_handle, handle);
192     }
193     if (NDR_DIR_IS_OUT) {
194 	NDR_TOPMOST_MEMBER (_logr_handle, result_handle);
195     }
196     if (NDR_DIR_IS_OUT) {
197 	NDR_TOPMOST_MEMBER (_ulong, status);
198     }
199 
200 	return 1;
201 }
202 
203 
204 
205 int ndr__logr_EventLogQueryCount (struct ndr_reference *encl_ref);
206 struct ndr_typeinfo ndt__logr_EventLogQueryCount = {
207 	1,		/* NDR version */
208 	3,		/* alignment */
209 	NDR_F_OPERATION,	/* flags */
210 	ndr__logr_EventLogQueryCount,	/* ndr_func */
211 	28,		/* pdu_size_fixed_part */
212 	0,		/* pdu_size_variable_part */
213 	28,		/* c_size_fixed_part */
214 	0,		/* c_size_variable_part */
215 };
216 
217 
218 /*
219  * [operation(4)]
220  */
221 int
222 ndr__logr_EventLogQueryCount (struct ndr_reference *encl_ref)
223 {
224 	struct logr_EventLogQueryCount *val = (struct logr_EventLogQueryCount *) encl_ref->datum;
225 	struct ndr_reference myref;
226 
227 	(void) bzero(&myref, sizeof (myref));
228 	myref.enclosing = encl_ref;
229 	myref.stream = encl_ref->stream;
230 
231 	/* do all members in order */
232     if (NDR_DIR_IS_IN) {
233 	NDR_TOPMOST_MEMBER (_logr_handle, handle);
234     }
235     if (NDR_DIR_IS_OUT) {
236 	NDR_TOPMOST_MEMBER (_ulong, rec_num);
237     }
238     if (NDR_DIR_IS_OUT) {
239 	NDR_TOPMOST_MEMBER (_ulong, status);
240     }
241 
242 	return 1;
243 }
244 
245 
246 
247 int ndr__logr_EventLogGetOldestRec (struct ndr_reference *encl_ref);
248 struct ndr_typeinfo ndt__logr_EventLogGetOldestRec = {
249 	1,		/* NDR version */
250 	3,		/* alignment */
251 	NDR_F_OPERATION,	/* flags */
252 	ndr__logr_EventLogGetOldestRec,	/* ndr_func */
253 	28,		/* pdu_size_fixed_part */
254 	0,		/* pdu_size_variable_part */
255 	28,		/* c_size_fixed_part */
256 	0,		/* c_size_variable_part */
257 };
258 
259 
260 /*
261  * [operation(5)]
262  */
263 int
264 ndr__logr_EventLogGetOldestRec (struct ndr_reference *encl_ref)
265 {
266 	struct logr_EventLogGetOldestRec *val = (struct logr_EventLogGetOldestRec *) encl_ref->datum;
267 	struct ndr_reference myref;
268 
269 	(void) bzero(&myref, sizeof (myref));
270 	myref.enclosing = encl_ref;
271 	myref.stream = encl_ref->stream;
272 
273 	/* do all members in order */
274     if (NDR_DIR_IS_IN) {
275 	NDR_TOPMOST_MEMBER (_logr_handle, handle);
276     }
277     if (NDR_DIR_IS_OUT) {
278 	NDR_TOPMOST_MEMBER (_ulong, oldest_rec);
279     }
280     if (NDR_DIR_IS_OUT) {
281 	NDR_TOPMOST_MEMBER (_ulong, status);
282     }
283 
284 	return 1;
285 }
286 
287 
288 
289 int ndr__logr_EventLogOpen (struct ndr_reference *encl_ref);
290 struct ndr_typeinfo ndt__logr_EventLogOpen = {
291 	1,		/* NDR version */
292 	3,		/* alignment */
293 	NDR_F_OPERATION,	/* flags */
294 	ndr__logr_EventLogOpen,	/* ndr_func */
295 	48,		/* pdu_size_fixed_part */
296 	0,		/* pdu_size_variable_part */
297 	48,		/* c_size_fixed_part */
298 	0,		/* c_size_variable_part */
299 };
300 
301 
302 /*
303  * [operation(7)]
304  */
305 int
306 ndr__logr_EventLogOpen (struct ndr_reference *encl_ref)
307 {
308 	struct logr_EventLogOpen *val = (struct logr_EventLogOpen *) encl_ref->datum;
309 	struct ndr_reference myref;
310 
311 	(void) bzero(&myref, sizeof (myref));
312 	myref.enclosing = encl_ref;
313 	myref.stream = encl_ref->stream;
314 
315 	/* do all members in order */
316     if (NDR_DIR_IS_IN) {
317 	NDR_TOPMOST_MEMBER_PTR (_ulong, server_name);
318     }
319     if (NDR_DIR_IS_IN) {
320 	NDR_TOPMOST_MEMBER (_logr_string, log_name);
321     }
322     if (NDR_DIR_IS_IN) {
323 	NDR_TOPMOST_MEMBER (_ulong, reg_module_name);
324     }
325     if (NDR_DIR_IS_IN) {
326 	NDR_TOPMOST_MEMBER (_ulong, major_version);
327     }
328     if (NDR_DIR_IS_IN) {
329 	NDR_TOPMOST_MEMBER (_ulong, minor_version);
330     }
331     if (NDR_DIR_IS_OUT) {
332 	NDR_TOPMOST_MEMBER (_logr_handle, handle);
333     }
334     if (NDR_DIR_IS_OUT) {
335 	NDR_TOPMOST_MEMBER (_ulong, status);
336     }
337 
338 	return 1;
339 }
340 
341 
342 
343 int ndr__logr_EventLogRead (struct ndr_reference *encl_ref);
344 struct ndr_typeinfo ndt__logr_EventLogRead = {
345 	1,		/* NDR version */
346 	3,		/* alignment */
347 	NDR_F_OPERATION,	/* flags */
348 	ndr__logr_EventLogRead,	/* ndr_func */
349 	48,		/* pdu_size_fixed_part */
350 	0,		/* pdu_size_variable_part */
351 	48,		/* c_size_fixed_part */
352 	0,		/* c_size_variable_part */
353 };
354 
355 
356 /*
357  * [operation(10)]
358  */
359 int
360 ndr__logr_EventLogRead (struct ndr_reference *encl_ref)
361 {
362 	struct logr_EventLogRead *val = (struct logr_EventLogRead *) encl_ref->datum;
363 	struct ndr_reference myref;
364 
365 	(void) bzero(&myref, sizeof (myref));
366 	myref.enclosing = encl_ref;
367 	myref.stream = encl_ref->stream;
368 
369 	/* do all members in order */
370     if (NDR_DIR_IS_IN) {
371 	NDR_TOPMOST_MEMBER (_logr_handle, handle);
372     }
373     if (NDR_DIR_IS_IN) {
374 	NDR_TOPMOST_MEMBER (_ulong, read_flags);
375     }
376     if (NDR_DIR_IS_IN) {
377 	NDR_TOPMOST_MEMBER (_ulong, rec_offset);
378     }
379     if (NDR_DIR_IS_IN) {
380 	NDR_TOPMOST_MEMBER (_ulong, nbytes_to_read);
381     }
382     if (NDR_DIR_IS_OUT) {
383 	NDR_TOPMOST_MEMBER_REF_WITH_SIZE_IS (_uchar, buf,
384 		val->nbytes_to_read);
385     }
386     if (NDR_DIR_IS_OUT) {
387 	NDR_TOPMOST_MEMBER (_ulong, sent_size);
388     }
389     if (NDR_DIR_IS_OUT) {
390 	NDR_TOPMOST_MEMBER (_ulong, min_bytes_needed);
391     }
392     if (NDR_DIR_IS_OUT) {
393 	NDR_TOPMOST_MEMBER (_ulong, status);
394     }
395 
396 	return 1;
397 }
398 
399 
400 
401 int ndr__logr_interface (struct ndr_reference *encl_ref);
402 struct ndr_typeinfo ndt__logr_interface = {
403 	1,		/* NDR version */
404 	3,		/* alignment */
405 	NDR_F_INTERFACE,	/* flags */
406 	ndr__logr_interface,	/* ndr_func */
407 	48,		/* pdu_size_fixed_part */
408 	0,		/* pdu_size_variable_part */
409 	48,		/* c_size_fixed_part */
410 	0,		/* c_size_variable_part */
411 };
412 
413 
414 /*
415  * [interface(0)]
416  */
417 int
418 ndr__logr_interface (struct ndr_reference *encl_ref)
419 {
420 	union logr_interface *val = (union logr_interface *) encl_ref->datum;
421 	struct ndr_reference myref;
422 
423 	(void) bzero(&myref, sizeof (myref));
424 	myref.enclosing = encl_ref;
425 	myref.stream = encl_ref->stream;
426 
427     switch (encl_ref->switch_is) {
428     case 2:
429 	NDR_PARAMS_MEMBER (_logr_EventLogClose, EventLogClose);
430 	break;
431 
432     case 4:
433 	NDR_PARAMS_MEMBER (_logr_EventLogQueryCount, EventLogQueryCount);
434 	break;
435 
436     case 5:
437 	NDR_PARAMS_MEMBER (_logr_EventLogGetOldestRec, EventLogGetOldestRec);
438 	break;
439 
440     case 7:
441 	NDR_PARAMS_MEMBER (_logr_EventLogOpen, EventLogOpen);
442 	break;
443 
444     case 10:
445 	NDR_PARAMS_MEMBER (_logr_EventLogRead, EventLogRead);
446 	break;
447 
448     default:
449 	NDR_SET_ERROR(encl_ref, NDR_ERR_SWITCH_VALUE_INVALID);
450 	return 0;
451 	break;
452     }
453 
454 
455 	return 1;
456 }
457