summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/rpc_echo.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/rpc/rpc_echo.c')
-rw-r--r--source4/librpc/rpc/rpc_echo.c102
1 files changed, 81 insertions, 21 deletions
diff --git a/source4/librpc/rpc/rpc_echo.c b/source4/librpc/rpc/rpc_echo.c
index b7e3bf4e7c..38b394dbf6 100644
--- a/source4/librpc/rpc/rpc_echo.c
+++ b/source4/librpc/rpc/rpc_echo.c
@@ -1,44 +1,104 @@
-/* dcerpc client calls auto-generated by pidl */
+/* 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)
{
- return 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);
+ 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)
{
- return 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);
+ 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)
{
- return 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);
+ 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)
{
- return 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);
+ 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)
{
- return dcerpc_ndr_request(p, DCERPC_TESTCALL, mem_ctx,
- (ndr_push_fn_t) ndr_push_TestCall,
- (ndr_pull_fn_t) ndr_pull_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;
}