summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/rpc_echo.c
blob: 38b394dbf64c996a5a818e94bd2cbdc98f435289 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/* dcerpc client calls generated by pidl */

#include "includes.h"


NTSTATUS dcerpc_echo_AddOne(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct echo_AddOne *r)
{
	NTSTATUS status;

        if (p->flags & DCERPC_DEBUG_PRINT_IN) {
		NDR_PRINT_IN_DEBUG(echo_AddOne, r);		
	}

	status = dcerpc_ndr_request(p, DCERPC_ECHO_ADDONE, mem_ctx,
				    (ndr_push_fn_t) ndr_push_echo_AddOne,
				    (ndr_pull_fn_t) ndr_pull_echo_AddOne,
				    r);

        if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
		NDR_PRINT_OUT_DEBUG(echo_AddOne, r);		
	}

	return status;
}

NTSTATUS dcerpc_echo_EchoData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct echo_EchoData *r)
{
	NTSTATUS status;

        if (p->flags & DCERPC_DEBUG_PRINT_IN) {
		NDR_PRINT_IN_DEBUG(echo_EchoData, r);		
	}

	status = dcerpc_ndr_request(p, DCERPC_ECHO_ECHODATA, mem_ctx,
				    (ndr_push_fn_t) ndr_push_echo_EchoData,
				    (ndr_pull_fn_t) ndr_pull_echo_EchoData,
				    r);

        if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
		NDR_PRINT_OUT_DEBUG(echo_EchoData, r);		
	}

	return status;
}

NTSTATUS dcerpc_echo_SinkData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct echo_SinkData *r)
{
	NTSTATUS status;

        if (p->flags & DCERPC_DEBUG_PRINT_IN) {
		NDR_PRINT_IN_DEBUG(echo_SinkData, r);		
	}

	status = dcerpc_ndr_request(p, DCERPC_ECHO_SINKDATA, mem_ctx,
				    (ndr_push_fn_t) ndr_push_echo_SinkData,
				    (ndr_pull_fn_t) ndr_pull_echo_SinkData,
				    r);

        if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
		NDR_PRINT_OUT_DEBUG(echo_SinkData, r);		
	}

	return status;
}

NTSTATUS dcerpc_echo_SourceData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct echo_SourceData *r)
{
	NTSTATUS status;

        if (p->flags & DCERPC_DEBUG_PRINT_IN) {
		NDR_PRINT_IN_DEBUG(echo_SourceData, r);		
	}

	status = dcerpc_ndr_request(p, DCERPC_ECHO_SOURCEDATA, mem_ctx,
				    (ndr_push_fn_t) ndr_push_echo_SourceData,
				    (ndr_pull_fn_t) ndr_pull_echo_SourceData,
				    r);

        if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
		NDR_PRINT_OUT_DEBUG(echo_SourceData, r);		
	}

	return status;
}

NTSTATUS dcerpc_TestCall(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct TestCall *r)
{
	NTSTATUS status;

        if (p->flags & DCERPC_DEBUG_PRINT_IN) {
		NDR_PRINT_IN_DEBUG(TestCall, r);		
	}

	status = dcerpc_ndr_request(p, DCERPC_TESTCALL, mem_ctx,
				    (ndr_push_fn_t) ndr_push_TestCall,
				    (ndr_pull_fn_t) ndr_pull_TestCall,
				    r);

        if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
		NDR_PRINT_OUT_DEBUG(TestCall, r);		
	}

	return status;
}