pidl decode/encode from/to buffer
Andrew Bartlett
abartlet at samba.org
Fri Dec 31 13:48:52 MST 2010
On Fri, 2010-12-31 at 15:16 +0100, Martin Vogt wrote:
> Hello,
>
> I'm currently writing a IDL based smartcard interface for freerdp:
>
> http://www.freerdp.com/
> http://msdn.microsoft.com/en-us/library/cc242792%28v=PROT.10%29.aspx
>
> with Visual Studio (and midl) everything works fine, but now I like to
> use pidl for linux in a similar way like Microsoft midl.
>
> midl has the option to do the serialization to/from a buffer, they
> call it "pickle" and in the windows SDK there is an example for it.
> (writing a structure as "wire" data into a file and reading
> it back from the file into the structure)
> Is there a similar way to achieve this kind of serialization from/to a
> buffer with pidl?
Yes. Samba4's libndr should do what you want, and you should be able to
handle it with the ndr_pull_struct_blob() and ndr_push_struct_blob()
macros around the generated ndr_pull_xxx and ndr_push_xxx functions.
Others on the list should be able to comment on the best way for you to
use this in your project, but I just wanted to confirm that it should
all be practical.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
More information about the samba-technical
mailing list