summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-01-11 11:17:26 +0100
committerVolker Lendecke <vl@samba.org>2009-01-11 22:53:24 +0100
commitce5eded7e03d86d5d7f2ee1a9d975fae116d2306 (patch)
tree3a88e37d2095847aa3b25cf9aa83519d89295aa9 /source3/rpc_client
parentcd5039b18843485074bb8e502434b518265d10e9 (diff)
downloadsamba-ce5eded7e03d86d5d7f2ee1a9d975fae116d2306.tar.gz
samba-ce5eded7e03d86d5d7f2ee1a9d975fae116d2306.tar.bz2
samba-ce5eded7e03d86d5d7f2ee1a9d975fae116d2306.zip
Move cli_api_pipe() to its only user cli_pipe.c
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 3fd31e2867..c87df09019 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -834,6 +834,32 @@ static NTSTATUS cli_pipe_reset_current_pdu(struct rpc_pipe_client *cli, RPC_HDR
}
/****************************************************************************
+ Call a remote api on an arbitrary pipe. takes param, data and setup buffers.
+****************************************************************************/
+
+static bool cli_api_pipe(struct cli_state *cli, const char *pipe_name,
+ uint16 *setup, uint32 setup_count,
+ uint32 max_setup_count,
+ char *params, uint32 param_count,
+ uint32 max_param_count,
+ char *data, uint32 data_count,
+ uint32 max_data_count,
+ char **rparam, uint32 *rparam_count,
+ char **rdata, uint32 *rdata_count)
+{
+ cli_send_trans(cli, SMBtrans,
+ pipe_name,
+ 0,0, /* fid, flags */
+ setup, setup_count, max_setup_count,
+ params, param_count, max_param_count,
+ data, data_count, max_data_count);
+
+ return (cli_receive_trans(cli, SMBtrans,
+ rparam, (unsigned int *)rparam_count,
+ rdata, (unsigned int *)rdata_count));
+}
+
+/****************************************************************************
Send data on an rpc pipe via trans. The prs_struct data must be the last
pdu fragment of an NDR data stream.