summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_echo.c
blob: afe7f0c87365a45115abcd60c3fb6ef90a1bd12d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* parser auto-generated by pidl */

#include "includes.h"

NTSTATUS ndr_push_echo_AddOne(struct ndr_push *ndr, struct echo_AddOne *r)
{
	NDR_CHECK(ndr_push_uint32(ndr, *r->in.v));

	return NT_STATUS_OK;
}

NTSTATUS ndr_pull_echo_AddOne(struct ndr_pull *ndr, struct echo_AddOne *r)
{
	NDR_CHECK(ndr_pull_uint32(ndr, r->out.v));

	return NT_STATUS_OK;
}

NTSTATUS ndr_push_echo_EchoData(struct ndr_push *ndr, struct echo_EchoData *r)
{
	NDR_CHECK(ndr_push_uint32(ndr, r->in.len));
	if (r->in.data) {
		NDR_CHECK(ndr_push_array_uint8(ndr, r->in.data, r->in.len));
	}

	return NT_STATUS_OK;
}

NTSTATUS ndr_pull_echo_EchoData(struct ndr_pull *ndr, struct echo_EchoData *r)
{
	if (r->out.data) {
		NDR_CHECK(ndr_pull_array_uint8(ndr, r->out.data, r->in.len));
	}

	return NT_STATUS_OK;
}

NTSTATUS ndr_push_echo_SinkData(struct ndr_push *ndr, struct echo_SinkData *r)
{
	NDR_CHECK(ndr_push_uint32(ndr, r->in.len));
	if (r->in.data) {
		NDR_CHECK(ndr_push_array_uint8(ndr, r->in.data, r->in.len));
	}

	return NT_STATUS_OK;
}

NTSTATUS ndr_pull_echo_SinkData(struct ndr_pull *ndr, struct echo_SinkData *r)
{

	return NT_STATUS_OK;
}

NTSTATUS ndr_push_echo_SourceData(struct ndr_push *ndr, struct echo_SourceData *r)
{
	NDR_CHECK(ndr_push_uint32(ndr, r->in.len));

	return NT_STATUS_OK;
}

NTSTATUS ndr_pull_echo_SourceData(struct ndr_pull *ndr, struct echo_SourceData *r)
{
	if (r->out.data) {
		NDR_CHECK(ndr_pull_array_uint8(ndr, r->out.data, r->in.len));
	}

	return NT_STATUS_OK;
}