[jcifs] Re: Tridge's PIDL compiler and the Samba4 IDLs.

Christopher R. Hertel crh at ubiqx.mn.org
Fri Aug 13 17:28:23 GMT 2004

On Fri, Aug 13, 2004 at 04:16:18AM -0400, Michael B Allen wrote:
> On Thu, 12 Aug 2004 23:48:54 -0500
> "Christopher R. Hertel" <crh at ubiqx.mn.org> wrote:
> > > I know you're taking the diplomatic position here but to be honest I
> > > actually doubt PIDL could be adjusted to generate good Java stubs. Not
> > > easily. You know there's actually some C code embedded in a few spots?
> > 
> > He's not being diplomatic, he's right.  The C code you're seeing is in one
> > 
> > of the back-ends.  It's not fixed into the compiler.
> No, I mean't there's code in the IDL:


Tridge (sitting next to me) says yeah, that's bad.  It's a temporary hack 
that will be moved out as the parser improves.

Of course, you could help improve this code too.  :)

> $ grep "\->" *
> epmapper.idl:		[value(ndr_size_epm_towers(&r->towers))] uint32 
> tower_length;
> eventlog.idl:		[value(2*strlen_m(r->name))] uint16 name_len;
> eventlog.idl:		[value(r->name_len)]       uint16 name_size;
> lsa.idl:		[value(2*strlen_m(r->name))] uint16 name_len;
> lsa.idl:		[value(r->name_len)] uint16 name_size;
> misc.idl:	/* security_descriptor->type bits */
> netlogon.idl:		[value(strlen_m(r->string)*2)]  uint16 size;
> netlogon.idl:		[value(r->size)]                uint16 length;
> netlogon.idl:		[value(r->length)] uint16 size;
> samr.idl:		[value(ndr_size_security_descriptor(r->sd))] uint32 sd_size;
> samr.idl:		[value(2*strlen_m(r->name))] uint16 name_len;
> samr.idl:		[value(r->name_len)] uint16 name_size;
> samr.idl:		[value(strlen_m(r->name))] uint16 name_len;
> samr.idl:		[value(strlen_m(r->name))] uint16 name_size;
> winreg.idl:		[value(strlen_m_term(r->name)*2)] uint16 name_len;
> winreg.idl:		[value(r->name_len)]              uint16 name_size;
> > Note:  We've found that not all RPCs are NDR encoded.  There's some new 
> > encoding that's started to show up.
> Well you can use transmit_as and basically bypass the usual encoding
> entirely. I'm not surprised. Somebody could have just punted on
> IDL-izing and memcpy'd instead maybe.

It's something called TNEF.  Jelmer says you can find info if you look on
the MSDN MAPI site.

Chris -)-----

"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org

More information about the jcifs mailing list