summaryrefslogtreecommitdiff
path: root/source4/libcli/rpc/rpc_echo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-03 10:01:20 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-03 10:01:20 +0000
commit0a427a43c4464c05bdceb662fd6d3895790ea581 (patch)
tree484d6610cbdfbd6aa459e336e1ae7252e833d482 /source4/libcli/rpc/rpc_echo.c
parent399fff106d268a5ea95fd2e60735d92b80bcecb1 (diff)
downloadsamba-0a427a43c4464c05bdceb662fd6d3895790ea581.tar.gz
samba-0a427a43c4464c05bdceb662fd6d3895790ea581.tar.bz2
samba-0a427a43c4464c05bdceb662fd6d3895790ea581.zip
added SinkData and SourceData tests for rpcecho
(This used to be commit 7c356350e6148078725de6b6829eb0855771ae17)
Diffstat (limited to 'source4/libcli/rpc/rpc_echo.c')
-rw-r--r--source4/libcli/rpc/rpc_echo.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/source4/libcli/rpc/rpc_echo.c b/source4/libcli/rpc/rpc_echo.c
index ab793a1ffa..d73f9bda9c 100644
--- a/source4/libcli/rpc/rpc_echo.c
+++ b/source4/libcli/rpc/rpc_echo.c
@@ -83,3 +83,55 @@ NTSTATUS dcerpc_rpcecho_echodata(struct dcerpc_pipe *p,
return status;
}
+
+/*
+ sourcedata interface
+*/
+NTSTATUS dcerpc_rpcecho_sourcedata(struct dcerpc_pipe *p,
+ TALLOC_CTX *mem_ctx,
+ int len,
+ int *out_len,
+ char **out_data)
+{
+ struct rpcecho_sourcedata r;
+ NTSTATUS status;
+
+ /* fill the .in side of the call */
+ r.in.len = len;
+
+ /* make the call */
+ status = dcerpc_ndr_request(p, RPCECHO_CALL_SOURCEDATA, mem_ctx,
+ (ndr_push_fn_t) ndr_push_rpcecho_sourcedata,
+ (ndr_pull_fn_t) ndr_pull_rpcecho_sourcedata,
+ &r);
+
+ /* and extract the .out parameters */
+ *out_len = r.out.len;
+ *out_data = r.out.data;
+
+ return status;
+}
+
+/*
+ sinkdata interface
+*/
+NTSTATUS dcerpc_rpcecho_sinkdata(struct dcerpc_pipe *p,
+ TALLOC_CTX *mem_ctx,
+ int len,
+ char *data)
+{
+ struct rpcecho_sinkdata r;
+ NTSTATUS status;
+
+ /* fill the .in side of the call */
+ r.in.len = len;
+ r.in.data = data;
+
+ /* make the call */
+ status = dcerpc_ndr_request(p, RPCECHO_CALL_SINKDATA, mem_ctx,
+ (ndr_push_fn_t) ndr_push_rpcecho_sinkdata,
+ (ndr_pull_fn_t) ndr_pull_rpcecho_sinkdata,
+ &r);
+
+ return status;
+}