pickling / unpickling self-relative (was: Re: Quick question on IDL)

Tatsukawa, Seiichi stat at rational.com
Tue Oct 16 11:57:11 GMT 2001


> just took a look at it, compiled up the encoding example,
> i notice that it sends the idl UUID at the beginning,
> plus the idl version number etc.
> 
> here is an example that i wish to encode / decode.
> 
> note that it doesn't have an idl UUID at the front:
> i can live with that, by faking up the UUID at the
> front of the buffer, and doing anything else necessary.

idl_es_pvt_header_t is defined in sys_idl/idlddefs.h .

> the nasty bit about this example is the pointers.
> note at offsets 0014 and 001c indicating self-relative
> offsets to 0x20 and 0x29.

I think that I already answered this when you are looking at pickling
Security Descriptors. The self-relative Security Descriptor is NOT
NDR-encoded stream. It can't be expressed by the IDL file. So, some
structures probably need to be hand-un/marshalled.

---  Seiichi

P.S.
Well, the layout of auth_verifier could be NDR-encoded by using the nested
structures. (See "Algorithm for Deferral of Referents" in NDR spec., part of
OpenGroup's "DCE 1.1: Remote Procedure Call " Spec.) However, if I remember
correctly, OSF DCE IDL's NDR-encoder uses the sequentially incremented
referent identifier (starting from 1). Since the referent identifier is an
unsigned long integer (non-zero, uniquely defined within output NDR stream),
you can replace it with the byte offset within the output stream.




More information about the samba-technical mailing list