summaryrefslogtreecommitdiff
path: root/source4/libcli/rpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-03 09:18:38 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-03 09:18:38 +0000
commit399fff106d268a5ea95fd2e60735d92b80bcecb1 (patch)
tree3b3409a7451b76f514cc200d12b7c4f510563878 /source4/libcli/rpc
parent87ef172531add2672185ec8935180104c3667894 (diff)
downloadsamba-399fff106d268a5ea95fd2e60735d92b80bcecb1.tar.gz
samba-399fff106d268a5ea95fd2e60735d92b80bcecb1.tar.bz2
samba-399fff106d268a5ea95fd2e60735d92b80bcecb1.zip
added rpcecho EchoData test
(This used to be commit 9c7e4db4712d1b2b7d8125e3ae535efd50b80f58)
Diffstat (limited to 'source4/libcli/rpc')
-rw-r--r--source4/libcli/rpc/rpc_echo.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/source4/libcli/rpc/rpc_echo.c b/source4/libcli/rpc/rpc_echo.c
index c3075ecedc..ab793a1ffa 100644
--- a/source4/libcli/rpc/rpc_echo.c
+++ b/source4/libcli/rpc/rpc_echo.c
@@ -52,3 +52,34 @@ NTSTATUS dcerpc_rpcecho_addone(struct dcerpc_pipe *p,
talloc_destroy(mem_ctx);
return status;
}
+
+
+/*
+ echodata interface
+*/
+NTSTATUS dcerpc_rpcecho_echodata(struct dcerpc_pipe *p,
+ TALLOC_CTX *mem_ctx,
+ int len,
+ const char *in_data,
+ int *out_len,
+ char **out_data)
+{
+ struct rpcecho_echodata r;
+ NTSTATUS status;
+
+ /* fill the .in side of the call */
+ r.in.len = len;
+ r.in.data = in_data;
+
+ /* make the call */
+ status = dcerpc_ndr_request(p, RPCECHO_CALL_ECHODATA, mem_ctx,
+ (ndr_push_fn_t) ndr_push_rpcecho_echodata,
+ (ndr_pull_fn_t) ndr_pull_rpcecho_echodata,
+ &r);
+
+ /* and extract the .out parameters */
+ *out_len = r.out.len;
+ *out_data = r.out.data;
+
+ return status;
+}