/* [<][>][^][v][top][bottom][index][help] */
DEFINITIONS
This source file includes following definitions.
- rpccli_echo_AddOne
- rpccli_echo_EchoData
- rpccli_echo_SinkData
- rpccli_echo_SourceData
- rpccli_echo_TestCall
- rpccli_echo_TestCall2
- rpccli_echo_TestSleep
- rpccli_echo_TestEnum
- rpccli_echo_TestSurrounding
- rpccli_echo_TestDoublePointer
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
5
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_echo.h"
8
9 NTSTATUS rpccli_echo_AddOne(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
10 TALLOC_CTX *mem_ctx,
11 uint32_t in_data /* [in] */,
12 uint32_t *out_data /* [out] [ref] */)
13 {
14 struct echo_AddOne r;
15 NTSTATUS status;
16
17 /* In parameters */
18 r.in.in_data = in_data;
19
20 if (DEBUGLEVEL >= 10) {
21 NDR_PRINT_IN_DEBUG(echo_AddOne, &r);
22 }
23
24 status = cli->dispatch(cli,
25 mem_ctx,
26 &ndr_table_rpcecho,
27 NDR_ECHO_ADDONE,
28 &r);
29
30 if (!NT_STATUS_IS_OK(status)) {
31 return status;
32 }
33
34 if (DEBUGLEVEL >= 10) {
35 NDR_PRINT_OUT_DEBUG(echo_AddOne, &r);
36 }
37
38 if (NT_STATUS_IS_ERR(status)) {
39 return status;
40 }
41
42 /* Return variables */
43 *out_data = *r.out.out_data;
44
45 /* Return result */
46 return NT_STATUS_OK;
47 }
48
49 NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
50 TALLOC_CTX *mem_ctx,
51 uint32_t len /* [in] */,
52 uint8_t *in_data /* [in] [size_is(len)] */,
53 uint8_t *out_data /* [out] [size_is(len)] */)
54 {
55 struct echo_EchoData r;
56 NTSTATUS status;
57
58 /* In parameters */
59 r.in.len = len;
60 r.in.in_data = in_data;
61
62 if (DEBUGLEVEL >= 10) {
63 NDR_PRINT_IN_DEBUG(echo_EchoData, &r);
64 }
65
66 status = cli->dispatch(cli,
67 mem_ctx,
68 &ndr_table_rpcecho,
69 NDR_ECHO_ECHODATA,
70 &r);
71
72 if (!NT_STATUS_IS_OK(status)) {
73 return status;
74 }
75
76 if (DEBUGLEVEL >= 10) {
77 NDR_PRINT_OUT_DEBUG(echo_EchoData, &r);
78 }
79
80 if (NT_STATUS_IS_ERR(status)) {
81 return status;
82 }
83
84 /* Return variables */
85 memcpy(out_data, r.out.out_data, r.in.len * sizeof(*out_data));
86
87 /* Return result */
88 return NT_STATUS_OK;
89 }
90
91 NTSTATUS rpccli_echo_SinkData(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
92 TALLOC_CTX *mem_ctx,
93 uint32_t len /* [in] */,
94 uint8_t *data /* [in] [size_is(len)] */)
95 {
96 struct echo_SinkData r;
97 NTSTATUS status;
98
99 /* In parameters */
100 r.in.len = len;
101 r.in.data = data;
102
103 if (DEBUGLEVEL >= 10) {
104 NDR_PRINT_IN_DEBUG(echo_SinkData, &r);
105 }
106
107 status = cli->dispatch(cli,
108 mem_ctx,
109 &ndr_table_rpcecho,
110 NDR_ECHO_SINKDATA,
111 &r);
112
113 if (!NT_STATUS_IS_OK(status)) {
114 return status;
115 }
116
117 if (DEBUGLEVEL >= 10) {
118 NDR_PRINT_OUT_DEBUG(echo_SinkData, &r);
119 }
120
121 if (NT_STATUS_IS_ERR(status)) {
122 return status;
123 }
124
125 /* Return variables */
126
127 /* Return result */
128 return NT_STATUS_OK;
129 }
130
131 NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
132 TALLOC_CTX *mem_ctx,
133 uint32_t len /* [in] */,
134 uint8_t *data /* [out] [size_is(len)] */)
135 {
136 struct echo_SourceData r;
137 NTSTATUS status;
138
139 /* In parameters */
140 r.in.len = len;
141
142 if (DEBUGLEVEL >= 10) {
143 NDR_PRINT_IN_DEBUG(echo_SourceData, &r);
144 }
145
146 status = cli->dispatch(cli,
147 mem_ctx,
148 &ndr_table_rpcecho,
149 NDR_ECHO_SOURCEDATA,
150 &r);
151
152 if (!NT_STATUS_IS_OK(status)) {
153 return status;
154 }
155
156 if (DEBUGLEVEL >= 10) {
157 NDR_PRINT_OUT_DEBUG(echo_SourceData, &r);
158 }
159
160 if (NT_STATUS_IS_ERR(status)) {
161 return status;
162 }
163
164 /* Return variables */
165 memcpy(data, r.out.data, r.in.len * sizeof(*data));
166
167 /* Return result */
168 return NT_STATUS_OK;
169 }
170
171 NTSTATUS rpccli_echo_TestCall(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
172 TALLOC_CTX *mem_ctx,
173 const char *s1 /* [in] [ref,charset(UTF16)] */,
174 const char **s2 /* [out] [ref,charset(UTF16)] */)
175 {
176 struct echo_TestCall r;
177 NTSTATUS status;
178
179 /* In parameters */
180 r.in.s1 = s1;
181
182 if (DEBUGLEVEL >= 10) {
183 NDR_PRINT_IN_DEBUG(echo_TestCall, &r);
184 }
185
186 status = cli->dispatch(cli,
187 mem_ctx,
188 &ndr_table_rpcecho,
189 NDR_ECHO_TESTCALL,
190 &r);
191
192 if (!NT_STATUS_IS_OK(status)) {
193 return status;
194 }
195
196 if (DEBUGLEVEL >= 10) {
197 NDR_PRINT_OUT_DEBUG(echo_TestCall, &r);
198 }
199
200 if (NT_STATUS_IS_ERR(status)) {
201 return status;
202 }
203
204 /* Return variables */
205 *s2 = *r.out.s2;
206
207 /* Return result */
208 return NT_STATUS_OK;
209 }
210
211 NTSTATUS rpccli_echo_TestCall2(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
212 TALLOC_CTX *mem_ctx,
213 uint16_t level /* [in] */,
214 union echo_Info *info /* [out] [ref,switch_is(level)] */)
215 {
216 struct echo_TestCall2 r;
217 NTSTATUS status;
218
219 /* In parameters */
220 r.in.level = level;
221
222 if (DEBUGLEVEL >= 10) {
223 NDR_PRINT_IN_DEBUG(echo_TestCall2, &r);
224 }
225
226 status = cli->dispatch(cli,
227 mem_ctx,
228 &ndr_table_rpcecho,
229 NDR_ECHO_TESTCALL2,
230 &r);
231
232 if (!NT_STATUS_IS_OK(status)) {
233 return status;
234 }
235
236 if (DEBUGLEVEL >= 10) {
237 NDR_PRINT_OUT_DEBUG(echo_TestCall2, &r);
238 }
239
240 if (NT_STATUS_IS_ERR(status)) {
241 return status;
242 }
243
244 /* Return variables */
245 *info = *r.out.info;
246
247 /* Return result */
248 return r.out.result;
249 }
250
251 NTSTATUS rpccli_echo_TestSleep(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
252 TALLOC_CTX *mem_ctx,
253 uint32_t seconds /* [in] */)
254 {
255 struct echo_TestSleep r;
256 NTSTATUS status;
257
258 /* In parameters */
259 r.in.seconds = seconds;
260
261 if (DEBUGLEVEL >= 10) {
262 NDR_PRINT_IN_DEBUG(echo_TestSleep, &r);
263 }
264
265 status = cli->dispatch(cli,
266 mem_ctx,
267 &ndr_table_rpcecho,
268 NDR_ECHO_TESTSLEEP,
269 &r);
270
271 if (!NT_STATUS_IS_OK(status)) {
272 return status;
273 }
274
275 if (DEBUGLEVEL >= 10) {
276 NDR_PRINT_OUT_DEBUG(echo_TestSleep, &r);
277 }
278
279 if (NT_STATUS_IS_ERR(status)) {
280 return status;
281 }
282
283 /* Return variables */
284
285 /* Return result */
286 return NT_STATUS_OK;
287 }
288
289 NTSTATUS rpccli_echo_TestEnum(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
290 TALLOC_CTX *mem_ctx,
291 enum echo_Enum1 *foo1 /* [in,out] [ref] */,
292 struct echo_Enum2 *foo2 /* [in,out] [ref] */,
293 union echo_Enum3 *foo3 /* [in,out] [ref,switch_is(*foo1)] */)
294 {
295 struct echo_TestEnum r;
296 NTSTATUS status;
297
298 /* In parameters */
299 r.in.foo1 = foo1;
300 r.in.foo2 = foo2;
301 r.in.foo3 = foo3;
302
303 if (DEBUGLEVEL >= 10) {
304 NDR_PRINT_IN_DEBUG(echo_TestEnum, &r);
305 }
306
307 status = cli->dispatch(cli,
308 mem_ctx,
309 &ndr_table_rpcecho,
310 NDR_ECHO_TESTENUM,
311 &r);
312
313 if (!NT_STATUS_IS_OK(status)) {
314 return status;
315 }
316
317 if (DEBUGLEVEL >= 10) {
318 NDR_PRINT_OUT_DEBUG(echo_TestEnum, &r);
319 }
320
321 if (NT_STATUS_IS_ERR(status)) {
322 return status;
323 }
324
325 /* Return variables */
326 *foo1 = *r.out.foo1;
327 *foo2 = *r.out.foo2;
328 *foo3 = *r.out.foo3;
329
330 /* Return result */
331 return NT_STATUS_OK;
332 }
333
334 NTSTATUS rpccli_echo_TestSurrounding(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
335 TALLOC_CTX *mem_ctx,
336 struct echo_Surrounding *data /* [in,out] [ref] */)
337 {
338 struct echo_TestSurrounding r;
339 NTSTATUS status;
340
341 /* In parameters */
342 r.in.data = data;
343
344 if (DEBUGLEVEL >= 10) {
345 NDR_PRINT_IN_DEBUG(echo_TestSurrounding, &r);
346 }
347
348 status = cli->dispatch(cli,
349 mem_ctx,
350 &ndr_table_rpcecho,
351 NDR_ECHO_TESTSURROUNDING,
352 &r);
353
354 if (!NT_STATUS_IS_OK(status)) {
355 return status;
356 }
357
358 if (DEBUGLEVEL >= 10) {
359 NDR_PRINT_OUT_DEBUG(echo_TestSurrounding, &r);
360 }
361
362 if (NT_STATUS_IS_ERR(status)) {
363 return status;
364 }
365
366 /* Return variables */
367 *data = *r.out.data;
368
369 /* Return result */
370 return NT_STATUS_OK;
371 }
372
373 NTSTATUS rpccli_echo_TestDoublePointer(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
374 TALLOC_CTX *mem_ctx,
375 uint16_t ***data /* [in] [ref] */)
376 {
377 struct echo_TestDoublePointer r;
378 NTSTATUS status;
379
380 /* In parameters */
381 r.in.data = data;
382
383 if (DEBUGLEVEL >= 10) {
384 NDR_PRINT_IN_DEBUG(echo_TestDoublePointer, &r);
385 }
386
387 status = cli->dispatch(cli,
388 mem_ctx,
389 &ndr_table_rpcecho,
390 NDR_ECHO_TESTDOUBLEPOINTER,
391 &r);
392
393 if (!NT_STATUS_IS_OK(status)) {
394 return status;
395 }
396
397 if (DEBUGLEVEL >= 10) {
398 NDR_PRINT_OUT_DEBUG(echo_TestDoublePointer, &r);
399 }
400
401 if (NT_STATUS_IS_ERR(status)) {
402 return status;
403 }
404
405 /* Return variables */
406
407 /* Return result */
408 return NT_STATUS_OK;
409 }
410