diff options
author | Günther Deschner <gd@samba.org> | 2009-04-01 23:07:03 +0200 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-07-08 00:29:33 -0400 |
commit | 77e3fffd09e5548ded472bed25109ddda2d45b30 (patch) | |
tree | 8fdc098e313d9863a3d866f0a5bade807b3660f0 | |
parent | 389a6774264b273fa210dcd30669d58a5c0db615 (diff) | |
download | samba-77e3fffd09e5548ded472bed25109ddda2d45b30.tar.gz samba-77e3fffd09e5548ded472bed25109ddda2d45b30.tar.bz2 samba-77e3fffd09e5548ded472bed25109ddda2d45b30.zip |
s3-dcerpc: add dcerpc_pull_ncacn_packet_header().
Guenther
Signed-off-by: Simo Sorce <idra@samba.org>
-rw-r--r-- | source3/include/proto.h | 3 | ||||
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 22 |
2 files changed, 25 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index ed1dc3d400..99afcf3e05 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4844,6 +4844,9 @@ 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); +NTSTATUS dcerpc_pull_ncacn_packet_header(TALLOC_CTX *mem_ctx, + const DATA_BLOB *blob, + struct ncacn_packet_header *r); struct tevent_req *rpc_pipe_bind_send(TALLOC_CTX *mem_ctx, struct event_context *ev, struct rpc_pipe_client *cli, diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 8969c14db8..5d4d19bf6f 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -358,6 +358,28 @@ NTSTATUS dcerpc_pull_ncacn_packet(TALLOC_CTX *mem_ctx, } /******************************************************************* +*******************************************************************/ + +NTSTATUS dcerpc_pull_ncacn_packet_header(TALLOC_CTX *mem_ctx, + const DATA_BLOB *blob, + struct ncacn_packet_header *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_header); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + return ndr_map_error2ntstatus(ndr_err); + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_DEBUG(ncacn_packet_header, r); + } + + return NT_STATUS_OK; +} + +/******************************************************************* ********************************************************************/ static NTSTATUS dcerpc_push_schannel_bind(TALLOC_CTX *mem_ctx, |