s3-dceprc: Improve dcerpc_guess_sizes() interface
commitc12e4f2cb13f4fdd52602d3d0fe2bb36731a31f6
authorSimo Sorce <idra@samba.org>
Fri, 30 Jul 2010 17:12:35 +0000 (30 13:12 -0400)
committerGünther Deschner <gd@samba.org>
Tue, 10 Aug 2010 14:31:39 +0000 (10 16:31 +0200)
treef04f087cbe5d35f5b0fed39cca1082de5ec7c18b
parentda1b08d3c957dc78c2d8ffe3329494331d3af6ae
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.
(cherry picked from commit 4c64e4d4af3403559b370381d7f14a83a39adfa7)
source3/librpc/rpc/dcerpc.h
source3/librpc/rpc/dcerpc_helpers.c
source3/rpc_client/cli_pipe.c