summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-23 12:00:12 +0100
committerSimo Sorce <idra@samba.org>2010-07-07 23:45:50 -0400
commitcb9eddb31248f0c7b0ffcff642154ca4b0230276 (patch)
tree02d6b9797d7bdcb44bbc4190f5b8491005294a81 /source3/rpc_client
parent0cbe0f3c5fab1da968486269d65c02ffa44e54ca (diff)
downloadsamba-cb9eddb31248f0c7b0ffcff642154ca4b0230276.tar.gz
samba-cb9eddb31248f0c7b0ffcff642154ca4b0230276.tar.bz2
samba-cb9eddb31248f0c7b0ffcff642154ca4b0230276.zip
s3-dcerpc: add dcerpc_pull_ncacn_packet().
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index db6fdc5ba2..5b3894c6ec 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -336,6 +336,28 @@ NTSTATUS dcerpc_push_ncacn_packet(TALLOC_CTX *mem_ctx,
}
/*******************************************************************
+*******************************************************************/
+
+NTSTATUS dcerpc_pull_ncacn_packet(TALLOC_CTX *mem_ctx,
+ const DATA_BLOB *blob,
+ struct ncacn_packet *r)
+{
+ enum ndr_err_code ndr_err;
+
+ ndr_err = ndr_pull_struct_blob(blob, mem_ctx, r,
+ (ndr_pull_flags_fn_t)ndr_pull_ncacn_packet);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ return ndr_map_error2ntstatus(ndr_err);
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_DEBUG(ncacn_packet, r);
+ }
+
+ return NT_STATUS_OK;
+}
+
+/*******************************************************************
Use SMBreadX to get rest of one fragment's worth of rpc data.
Reads the whole size or give an error message
********************************************************************/