From 4c64e4d4af3403559b370381d7f14a83a39adfa7 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 30 Jul 2010 13:12:35 -0400 Subject: s3-dceprc: Improve dcerpc_guess_sizes() interface Make it possible to pass in the NDR padding size so that theoretically client and server code can decide to use a different alignment. Pass in the header length as a parameter so that this function can be used for different type of packets. Make sure padding size will not make the fragment exceed the maximum length. Calculate padding taking in account the header length. --- source3/librpc/rpc/dcerpc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/librpc/rpc/dcerpc.h') diff --git a/source3/librpc/rpc/dcerpc.h b/source3/librpc/rpc/dcerpc.h index fd80dbeb04..f07403ae44 100644 --- a/source3/librpc/rpc/dcerpc.h +++ b/source3/librpc/rpc/dcerpc.h @@ -140,7 +140,8 @@ NTSTATUS dcerpc_pull_dcerpc_auth(TALLOC_CTX *mem_ctx, struct dcerpc_auth *r, bool bigendian); NTSTATUS dcerpc_guess_sizes(struct pipe_auth_data *auth, - size_t data_left, size_t max_xmit_frag, + size_t header_len, size_t data_left, + size_t max_xmit_frag, size_t pad_alignment, size_t *data_to_send, size_t *frag_len, size_t *auth_len, size_t *pad_len); NTSTATUS dcerpc_add_auth_footer(struct pipe_auth_data *auth, -- cgit